Skip to content

Instantly share code, notes, and snippets.

View pathologicalhandwaving's full-sized avatar
:shipit:
If you are the smartest person in the room, run TF out of that room

UnMary pathologicalhandwaving

:shipit:
If you are the smartest person in the room, run TF out of that room
View GitHub Profile
@pathologicalhandwaving
pathologicalhandwaving / wiki_description.rb
Last active November 23, 2021 15:40 — forked from bshyong/wiki_description.rb
Quick scraper to fetch first paragraph of Wikipedia for a list of topics
require 'open-uri'
require 'nokogiri'
require 'csv'
require 'cgi'
# BASE_URL = 'http://en.wikipedia.org/w/api.php?format=json&action=query&prop=revisions&rvprop=content&titles='
BASE_URL = 'http://en.wikipedia.org/wiki/'
while($input_filename.nil?)
puts "Enter input filename (should be a CSV)"
@pathologicalhandwaving
pathologicalhandwaving / random_LSFR.cpp
Created October 17, 2015 03:05 — forked from tomkaith13/random_LSFR.cpp
Linear Feedback Shift Register Based uniform random number generator ... it generates 2**32 -1 random numbers
#include<iostream>
using namespace std;
int rand_gen(unsigned int x) {
/*
XOR Linear feedback shift register based random gen
*/
unsigned int a=1;
@pathologicalhandwaving
pathologicalhandwaving / Dropbox File Picker.py
Created October 17, 2015 03:04 — forked from omz/Dropbox File Picker.py
Dropbox File Picker.py
# IMPORTANT SETUP INSTRUCTIONS:
#
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary)
# 2. Select "Create App"
# 3. Select the following settings:
# * "Dropbox API app"
# * "Files and datastores"
# * "(No) My app needs access to files already on Dropbox"
# * "All file types"
# * (Choose any app name)