Skip to content

Instantly share code, notes, and snippets.

View gpsarkar's full-sized avatar
💭
🚀

Ganapati Sarkar gpsarkar

💭
🚀
View GitHub Profile
@gpsarkar
gpsarkar / install.sh
Created March 4, 2020 11:42 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@gpsarkar
gpsarkar / openssl_commands.md
Created July 1, 2019 15:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@gpsarkar
gpsarkar / JS-LINQ.js
Created July 22, 2018 14:23 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
@gpsarkar
gpsarkar / YahooDataGrabber.py
Created July 16, 2017 21:28
Simple scripts to bulk download historical data from Yahoo! Finance
#!/usr/bin/env python
import csv
import Queue
import threading
import ystockquote as ys
def gen_info_list(tickers, start, end):
'''
@gpsarkar
gpsarkar / Technical Indicators without TA-lib.py
Created July 16, 2017 18:56 — forked from kevincdurand1/Technical Indicators without TA-lib.py
Technical Indicators without TA-lib #tags: Technical Indicators, Quant
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)
return df
@gpsarkar
gpsarkar / 01-02.py
Created July 12, 2017 22:13 — forked from dimi-tree/01-02.py
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@gpsarkar
gpsarkar / maintenance-mode.conf
Created June 30, 2017 17:10 — forked from rictorres/maintenance-mode.conf
nginx maintenance mode
server {
listen 80;
server_name mysite.com;
root /var/www/mysite.com/;
location / {
if (-f $document_root/maintenance.html) {
return 503;
}
... # the rest of your config goes here
@gpsarkar
gpsarkar / xvfb
Created April 15, 2017 08:09 — forked from jterrace/xvfb
xvfb init script for Ubuntu
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)