Skip to content

Instantly share code, notes, and snippets.

@abdullah353
abdullah353 / technical_indicators.py
Created August 28, 2018 11:59
Technical Indicators
import numpy
import pandas as pd
import math as m
# REF : https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code
#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
@abdullah353
abdullah353 / webpack.config.js
Created October 8, 2018 09:34
webpack.config.js for React + Babel + Webpack + Eslint
const CopyWebpackPlugin = require('copy-webpack-plugin');
const webpack = require('webpack');
const path = require('path');
module.exports = {
mode: 'development',
entry: './web-app/index.js',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
@abdullah353
abdullah353 / package.json
Created October 8, 2018 09:36
package.json
{
"name": "My App",
"version": "0.0.0",
"main": "./web-app/index.js",
"scripts": {
"start": "webpack && webpack-dev-server --mode development",
"build": "webpack"
},
"license": "ISC",
"devDependencies": {
@abdullah353
abdullah353 / websocket.js
Created December 27, 2021 16:45 — forked from bearice/websocket.js
My own (and dirty) implementation of WebSocket-Protocol-Version-8 on nodejs
var crypto = require('crypto');
var WSProtocolHandler = {
"8":{
handshake:function(req,socket,head,callback){
var key = req.headers["sec-websocket-key"];
if(!key)return false;
key += "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
var sha1 = crypto.createHash('sha1');
sha1.update(key);