Welcome to the KriyaNiti Group.
We are learners and we make learners.
We are very passionate about simplifying complex task...
Here we provide basic and needy scripts...
for learning purpose.....
Thankyou for joining us
@KriyaNiti
Here is a source code for a simple inventory management system using Google Apps Script: function checkInventory() { var sheet = SpreadsheetApp.getActiveSheet(); var data = sheet.getDataRange().getValues(); var message = "Inventory:\n"; for (var i = 1; i < data.length; i++) { var item = data[i][0]; var quantity = data[i][1]; message += item + ": " + quantity + "\n"; } Browser.msgBox(message); } function updateInventory(item, amount) { var sheet = SpreadsheetApp.getActiveSheet(); var data = sheet.getDataRange().getValues(); for (var i = 1; i < data.length; i++) { if (data[i][0] == item) { var newQuantity = parseInt(data[i][1]) + amount; sheet.getRange(i+1, 2).setValue(newQuantity); break; } } } function submitForm(e) { var i...
sales forecasting ML model in retail using the Prophet algorithm from the Facebook Prophet library: import pandas as pd from fbprophet import Prophet # Load the sales data into a pandas dataframe sales_data = pd.read_csv('sales_data.csv') # Convert the date column to a pandas datetime object sales_data['date'] = pd.to_datetime(sales_data['date']) # Rename the columns to 'ds' and 'y' for Prophet compatibility sales_data = sales_data.rename(columns={'date': 'ds', 'sales': 'y'}) # Create and train the Prophet model model = Prophet() model.fit(sales_data) # Create a future dataframe for the next 30 days future = model.make_future_dataframe(periods=30) # Make sales predictions for the next 30 days sales_predictions = model.predict(future) # Print the sales predictions for the next 30 days print(sales_predictions.tail(30)) In this code, we first load the sales data into a pandas dataframe and convert the date column to a...
Nginx serve static file and got 403 forbidden Just want to help somebody out. yes ,you just want to serve static file using nginx, and you got everything right in nginx.conf : location /static { autoindex on; #root /root/downloads/boxes/; alias /root/downloads/boxes/; } But , in the end , you failed. You got "403 forbidden" from browser... ---------------------------------------- The Answer Below: ---------------------------------------- The Solution is very Simple: Way 1 : Run nginx as the user as the '/root/downloads/boxes/' owner In nginx.conf : #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; YES, in the first line " #user noboy; " , just delete " # " , and change " nobody " to your own username in Linux/OS X, i.e change to " root " for test. The restart nginx. reference by -https://stackoverflow.com/questions/16808813/nginx-serve-static-file...
Comments
Post a Comment