Skip to content

Instantly share code, notes, and snippets.

View benyblack's full-sized avatar

Behnam Yousefi benyblack

View GitHub Profile
@benyblack
benyblack / stock_chart.py
Last active June 10, 2019 08:21
Stock chart with oscillator using bokeh
import numpy as np
from bokeh.layouts import column
from bokeh.plotting import figure, show, output_file
# imports for the example
import random
from bokeh.sampledata.stocks import AAPL, GOOG, IBM, MSFT
def datetime(x):
return np.array(x, dtype=np.datetime64)
import time
import dateparser
import pytz
import json
import csv
import datetime
from dateutil.rrule import rrule, MONTHLY
from binance.client import Client
import os
import sys
#MaxHotkeysPerInterval 200
$WheelUp::
Send {WheelDown}
Return
$WheelDown::
Send {WheelUp}
Return
@benyblack
benyblack / mbp.ahk
Created September 11, 2017 02:40
MyAHK
+BS::send {Del}
^q::send !{F4}
Capslock::Send, {Alt Down}{Shift Down}
KeyWait, Capslock
Send, {Alt Up}{Shift Up}
return
RCtrl & Tab::AltTab
LCtrl & Right::
@benyblack
benyblack / minCoinChange.cs
Created July 21, 2017 07:15
Minimum Coin Change
using System;
using System.Collections.Generic;
public class Solution {
public int CoinChange(int[] coins, int amount) {
if (amount == 0) return 0;
if(coins.Length==1){
if(amount%coins[0]==0)
return amount/coins[0];
else
@benyblack
benyblack / TrieNode.cs
Last active April 13, 2017 13:18
Trie structure in c#
using System;
using System.Collections.Generic;
using System.Linq;
namespace MyTrie {
public class TrieNode {
Dictionary<char, TrieNode> children = new Dictionary<char, TrieNode>();
public int Size { get; set; }
public TrieNode() {
Size = 0;