Skip to content

Instantly share code, notes, and snippets.

View optimistanoop's full-sized avatar
💭
<tod-fod-code>

Anoop Kumar optimistanoop

💭
<tod-fod-code>
View GitHub Profile
@optimistanoop
optimistanoop / youtube-upload.js
Created October 18, 2022 07:21 — forked from soygul/youtube-upload.js
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs
//
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');
@optimistanoop
optimistanoop / app.md
Last active January 23, 2022 13:37
firebase and firestore special commands

To setup github actions

firebase init hosting:github

To get indexes

firebase firestore:indexes

To deploy indexes

firebase deploy --only firestore:indexes

@optimistanoop
optimistanoop / app.md
Last active February 24, 2021 11:32
install nodejs

Installing Node.js and npm from NodeSource

NodeSource is a company focused on providing enterprise-grade Node support. It maintains an APT repository containing multiple Node.js versions. Use this repository if your application requires a specific version of Node.js.

At the time of writing, NodeSource repository provides the following versions:

v14.x - The latest stable version. v13.x v12.x - The latest LTS version. v10.x - The previous LTS version.

@optimistanoop
optimistanoop / logging.py
Created July 23, 2019 09:08
python logging
import logging
sysdate = str(datetime.date.today())
logging.basicConfig(filename=sysdate+'.log',
filemode='a',
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%H:%M:%S',
level=logging.DEBUG)
logging.info('anp main')
@optimistanoop
optimistanoop / offline.py
Created July 23, 2019 09:05
Offline sqlite python
import sqlite3
class Offline:
def __init__(self):
print('hello offline')
self.conn = sqlite3.connect('offline.db')
c = self.conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS visitors (id INTEGER PRIMARY KEY, clientId text, locationId text, cameraNumber text, frame text)''')
c.execute('''CREATE TABLE IF NOT EXISTS errors (id INTEGER PRIMARY KEY, clientId text, locationId text, cameraNumber text, frame text, errors text, er_cat text)''')
# sql1 = 'DELETE FROM Frames_and_Scores'
# c.execute(sql1)
@optimistanoop
optimistanoop / app.md
Last active June 24, 2019 07:20
running wesense app

Running wesense app

nohup python <file name>.py &

to see the output from a file

tail -f

@optimistanoop
optimistanoop / app.md
Last active May 8, 2019 12:53
python modules installed in local folder

pip3 install numpy -t py_modules/

pip3 install -r requirements.txt -t py_modules/

Use this below lines for referencing your local py_modules

import os
import sys

where_am_i = os.path.dirname(os.path.abspath(file))

@optimistanoop
optimistanoop / pyinstallerWithMxnet.md
Last active June 24, 2019 07:27
generate exe from pyinstaller

To generate .exe file

pyinstaller -F --add-data <path of open cv file>;. <main file of codebase>

example

pyinstaller -F --add-data C:\Users\Anoop\AppData\Local\Programs\Python\Python35\Lib\site-packages\cv2\opencv_ffmpeg410_64.dll;. roi_version.py

other commands

pyinstaller -F getface.py

@optimistanoop
optimistanoop / readme.md
Last active April 9, 2019 10:59
AI python issues

ImportError: numpy.core.multiarray failed to import

pip install -U numpy

ImportError: DLL load failed: The specified procedure could not be found.

pip install protobuf==3.6.0

{
"name": "Commonfloor",
"short_name": "CF",
"display": "minimal-ui",
"start_url": "/",
"theme_color": "#673ab6",
"background_color": "#111111",
"icons": [
{
"src": "cf_logo.png",