Category : python

Im new to the laravel. Thus my knowledge about integrating another language into laravel is limited. Thus i needed help. For description, I try to make a calculative webpage. The user input a few json file then the laravel will pass the file to python. Then the python calculate the json file and send back ..

Read more

I need to save a Json like this: { "48:CE:B8:09:7D:AD": [ "-91" ], "70:61:91:66:6B:1E": [ "-81", "-69", "-79", "-65", "-74" ], "4B:6F:42:53:EB:82": [ "-84", "-73", "-81" ], "43:FD:25:20:5A:7B": [ "-76", "-84", "-76", "-88", "-77", "-86" ], "C1:04:08:03:3C:05": [ "-73" ], "7F:D2:44:60:82:BD": [ "-88", "-79", "-88" ], "FE:47:DA:73:90:29": [ "-55", "-43", "-59", "-35", "-46", "-38", "-49" ..

Read more

I have api with php laravel and main.py, in php API I send the text like this to main.py // php laravel ( API ) setlocale(LC_CTYPE, "en_US.UTF-8"); putenv("PYTHONIOENCODING=utf-8"); return shell_exec("cd ../../laravel/Athina/python/code && python3 main.py "$param""); and this is the python file // main.py tdf = sys.argv[1].decode("utf-8") print(tdf) when I send the text to main.py I ..

Read more

I have a problem, when I go to reload the Laravel page to which I am sending a JSON file I get this error however both in the route and in the request I use the post method. Can someone help me? Laravel code for the route: Route::post(‘dictionary’, [DictionaryController::class, ‘store’])->name(‘dictionary’); Laravel code for controller: class ..

Read more

I need to send a json file from a raspberry (programmed in python) to Laravel. Looking on the internet I found this function for python: https://docs.python-requests.org/en/latest/ but when I go to view the json file on laravel nothing appears. The code in python is this: def readFile(): with open("/home/pi/Desktop/Progetti SIoTD/Bluetooth/device.txt", "r") as file: for i ..

Read more

I have this code from https://flashsoft.ai/en/doc/api-doc the original code is python, I covert code to php[laravel] and this is what I can do,I’m new PHP and Laravel and I cant python,I want to know where I went wrong This is my code that i covert to Laravel My error messages in Laravel is Invalid authorization ..

Read more

I have a laravel app in which i’m getting data from python software data i’m getting from software – clock in time(when user sign in on software) & clock out time(when user is living the software) what i want to achieve – i want to get the amount of time user spend in software for ..

Read more

I’m trying to display a plot that is generated with plotly in python, inside my laravel application. When I execute python3.8 ../storage/app/public/rcs/line-chart.py command in my terminal from the public directory of my laravel project, the plot is displayed. However, when I send a request to my laravel application to execute the same command using symfony ..

Read more

Suppose a schema contains the following entity and attributes: i. User A. id (biginteger), first name(varchar), last name(varchar), contact number(varchar), gen- der(char), dob(date), status(char) ii. Products A. product id(varchar), product name(varchar), quantity(integer), description(text), man- ufacture(date), expire(date), price(decimal) iii. Carts A. cart id(varchar), product id(varchar), user id(varchar), quantity(integer), total(decimal) iv. Checkouts A. ckout id(varchar), cart id(varchar), ..

Read more

Suppose a schema contains the following entity and attributes: i. User A. id (biginteger), first name(varchar), last name(varchar), contact number(varchar), gen- der(char), dob(date), status(char) ii. Products A. product id(varchar), product name(varchar), quantity(integer), description(text), man- ufacture(date), expire(date), price(decimal) iii. Carts A. cart id(varchar), product id(varchar), user id(varchar), quantity(integer), total(decimal) iv. Checkouts A. ckout id(varchar), cart id(varchar), ..

Read more