systemctl status mongod
systemctl start mongodb
systemctl stop mongodb
systemctl restart mongodb
serverUrl="http://192.168.1.2:44444/" | |
fileToDownload="sample.txt" | |
# echo "${url}" | |
curl -O "${serverUrl}${fileToDownload}" | |
#do your thing | |
# eg : Compile your code and save output file. | |
fileToUpload="output.txt" |
web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app |
from flask import Flask, session, redirect, url_for, escape, request | |
import random | |
app = Flask(__name__) | |
app.secret_key = "ASDF1234" | |
def getHint(randNumber,guess,noOfTry): | |
print('random number=',randNumber,type(randNumber)) | |
print('guessed number=',guess,type(guess)) | |
print('noOfTry=',noOfTry,type(noOfTry)) |
systemctl status mongod
systemctl start mongodb
systemctl stop mongodb
systemctl restart mongodb
ngrok http -host-header=<home_address> eg: ngrok http 3333 -host-header=localhost:3333
import cv2 | |
import time | |
ipcam_ip = "192.168.43.1" | |
ipcam_port = "8080" | |
ipcam_url = f"rtsp://{ipcam_ip}:{ipcam_port}/h264_ulaw.sdp" | |
cam = cv2.VideoCapture(ipcam_url) | |
cv2.namedWindow("ipcam") |
mysql> USE mysql;
mysql> CREATE USER 'YOUR_SYSTEM_USER'@'localhost' IDENTIFIED BY '';
mysql> GRANT ALL PRIVILEGES ON . TO 'YOUR_SYSTEM_USER'@'localhost';
mysql> UPDATE user SET plugin='unix_socket' WHERE User='YOUR_SYSTEM_USER';
mysql> FLUSH PRIVILEGES;
import requests | |
file_url = "https://github.com/jbrownlee/Datasets/releases/download/Flickr8k/Flickr8k_text.zip" | |
r = requests.get(file_url, stream = True) | |
placeToDownload = "/content/drive/My Drive/Colab Notebooks/image-caption-gen-flickr8k/Flickr8k_text.zip" | |
with open(placeToDownload, "wb") as file: | |
for block in r.iter_content(chunk_size = 1024): | |
if block: | |
file.write(block) |