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 os, io | |
import urllib.request | |
import tweepy | |
from google.cloud import vision | |
from google.cloud import vision_v1 | |
import urllib.parse, urllib.request | |
import hashlib, hmac, time | |
import requests |
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
/** | |
* Use this file to configure your truffle project. It's seeded with some | |
* common settings for different networks and features like migrations, | |
* compilation and testing. Uncomment the ones you need or modify | |
* them to suit your project as necessary. | |
* | |
* More information about configuration can be found at: | |
* | |
* truffleframework.com/docs/advanced/configuration | |
* |
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 threading # :( | |
class WaitGroup(object): | |
"""WaitGroup is like Go sync.WaitGroup. | |
Without all the useful corner cases. | |
""" | |
def __init__(self): | |
self.count = 0 | |
self.cv = threading.Condition() |
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
#include <future> | |
#include <iostream> | |
#include <thread> | |
#include <queue> | |
template <typename T> | |
class concurrent_queue { | |
private: | |
std::queue<T> _queue; | |
std::mutex _mutex; |
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
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
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 | |
import pandas as pd | |
import plotly.graph_objects as go | |
from finta import TA | |
if __name__ == '__main__': | |
ts = pd.date_range('1/1/2000', periods=100) | |
price = pd.DataFrame(np.random.randn(100, 1), index=ts, columns=['close']) |
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 | |
import pandas as pd | |
import plotly.graph_objects as go | |
from finta import TA | |
if __name__ == '__main__': | |
ts = pd.date_range('1/1/2000', periods=100) | |
price = pd.DataFrame(np.random.randn(100, 1), index=ts, columns=['close']) |
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
(* ocamlfind ocamlopt -o exmpl -package curl -linkpkg exmpl.ml *) | |
open Printf | |
let _ = Curl.global_init Curl.CURLINIT_GLOBALALL | |
(* | |
************************************************************************* | |
** Aux. functions | |
************************************************************************* | |
*) |
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
# maybe.py - a Pythonic implementation of the Maybe monad | |
# Copyright (C) 2014. Senko Rasic <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
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
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository | |
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# http://xiaofan.at | |
# 2 Jul 2015 - Xiaofan | |
# Machine name. | |
function box_name { |
NewerOlder