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 libtorrent as lt | |
import time | |
import pickle | |
import MySQLdb as mdb | |
#import sqlite3 as lite | |
#import BeautifulSoup as bs | |
import bs4 as bs | |
import pickle | |
import urllib2 | |
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 csv | |
import os | |
import sys | |
numberOfDigits = 2 | |
# From: http://stackoverflow.com/a/3682332 | |
def int_wrapper(reader): | |
for v in reader: | |
yield map(int, v) |
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
""" | |
The portfolio rebalancing bot will buy and sell to maintain a | |
constant asset allocation ratio of exactly 20/80 = fiat/BTC | |
""" | |
import strategy | |
import os | |
import threading | |
import weakref | |
import inspect |
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
####################################################################### | |
# You will need gmusicapi (https://github.com/simon-weber/gmusicapi) | |
# You can install it with: | |
# pip install gmusicapi | |
####################################################################### | |
import sys,warnings,subprocess,os,time | |
from gmusicapi import Mobileclient | |
from random import shuffle | |
import curses |
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
#!/bin/bash | |
# Inspired by: | |
# http://nialldonegan.me/2007/03/10/converting-microsoft-access-mdb-into-csv-or-mysql-in-linux/ | |
# http://cltb.ojuba.org/en/articles/mdb2sqlite.html | |
# Dave's Modifications: | |
# Line 25: Added code to remove COMMENT and SET statements. | |
# Lines 28 to 37: Added code to handle primary keys. | |
# Line 51: Added "postgres" to mdb-export command. |
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 urllib.request | |
import sys | |
import os | |
import re | |
import sqlite3 as lite | |
from bs4 import BeautifulSoup, Comment | |
# Using https://fediverse.network to get the list of Mastodon Instances | |
url = 'https://fediverse.network/mastodon' |
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
#!/bin/bash | |
# Example Dovecot checkpassword script that may be used as both passdb or userdb. | |
# | |
# Originally written by Nikolay Vizovitin, 2013. | |
# Assumes authentication DB is in /etc/dovecot/users, each line has '<user>:<password>' format. | |
# Place this script into /etc/dovecot/checkpassword.sh file and make executable. | |
# Implementation guidelines at http://wiki2.dovecot.org/AuthDatabase/CheckPassword |
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
<?php | |
$key = "<API Key>"; | |
$from = "info@example.com"; | |
$to = "dave@example.com"; | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
if(isset($_POST['timestamp']) && isset($_POST['token']) && isset($_POST['signature']) && hash_hmac('sha256', $_POST['timestamp'] . $_POST['token'], $key) === $_POST['signature']) | |
{ | |
if($_POST['event'] == 'complained') { |
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
OlderNewer