This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+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:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MaxHotkeysPerInterval 200 | |
$WheelUp:: | |
Send {WheelDown} | |
Return | |
$WheelDown:: | |
Send {WheelUp} | |
Return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################### | |
# Based on https://gist.github.com/teamon/27ed7e551d188930c9fa0b5e19bd76b7# | |
########################################################################### | |
FROM node:latest as build-node | |
# prepare build dir | |
RUN mkdir -p /app/assets | |
WORKDIR /app | |
# set build ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:1.9.2 as mixer | |
ENV MIX_ENV=test | |
ENV PORT=4000 | |
# COPY . /app | |
RUN mkdir /app | |
WORKDIR /app | |
RUN mix local.hex --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
database: | |
image: "postgres" | |
environment: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: "hello_world_test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RED='\033[0;31m' | |
BLUE='\033[1;34m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
R="${BLUE}Running ${NC}" | |
D="${GREEN}Done! ${NC}" | |
clear | |
sleep 1 | |
echo "${BLUE}Create a Postgres server by docker ${NC}" | |
echo "${R} docker pull postgres" |
OlderNewer