Skip to content

Instantly share code, notes, and snippets.

View dotted's full-sized avatar

Bo Fjord Jensen dotted

  • Denmark
  • 05:07 (UTC +01:00)
View GitHub Profile
import datetime
import requests
import csv
import time
base_url = "https://api.pushshift.io/reddit/search/submission/?subreddit={subreddit}&sort=asc&sort_type=created_utc&after={after}&size=1000&before={before}"
now = datetime.datetime.now()
now_stamp = datetime.datetime.strftime(now, "%s")
# UTC 2018/01/01 0:0:0
@dotted
dotted / hashbench.py
Created January 17, 2020 13:31 — forked from tiran/hashbench.py
Simple hashing benchmark for Python 2 and 3
#!/usr/bin/env python3
from __future__ import print_function
import os
import time
import sys
if sys.version_info.major >= 3:
timer = time.perf_counter
else:
timer = time.time
ALLOCA:
AR: ar
ARCHFILE:
ARCH_FLAG:
AS: as
ASFLAGS:
BASERUBY: echo executable host ruby is required. use --with-baseruby option.; false
BUILTIN_TRANSSRCS: newline.c
CAPITARGET: nodoc
CC: gcc
ALLOCA:
AR: ar
ARCHFILE:
ARCH_FLAG:
AS: as
ASFLAGS:
BASERUBY: echo executable host ruby is required. use --with-baseruby option.; false
BUILTIN_TRANSSRCS: newline.c
CAPITARGET: nodoc
CC: gcc
/usr/local/bigbluebutton/core
% sudo bundle
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Using builder (2.1.2)
Using diff-lcs (1.1.2)
Using json (1.4.6)
Using term-ansicolor (1.0.5)
Installing gherkin (2.2.9) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
$Global:passwordPath = $("$env:APPDATA\dotuserpass.xml")
$Global:passwordXml = @{}
$Global:loggedin = $false
<#
Unserialize xml into object
#>
function load_passwords()
{
try
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CalcInterestTable
{
class Program
{
/// <summary>
@dotted
dotted / invisionfree_schema.sql
Created April 12, 2012 20:40
Schema for InvisionFree Conversion dumps
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT=0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;