Skip to content

Instantly share code, notes, and snippets.

Avatar
🗿
.

Bob Poekert bobpoekert

🗿
.
View GitHub Profile
View yt_pop_greasemonkey.js
// ==UserScript==
// @name remove popular videos
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.youtube.com/
// @grant none
// ==/UserScript==
View liked.js
setInterval(function() { if (window.location.pathname == '/home') { var s = document.querySelectorAll('path[d="M12 21.638h-.014C9.403 21.59 1.95 14.856 1.95 8.478c0-3.064 2.525-5.754 5.403-5.754 2.29 0 3.83 1.58 4.646 2.73.814-1.148 2.354-2.73 4.645-2.73 2.88 0 5.404 2.69 5.404 5.755 0 6.376-7.454 13.11-10.037 13.157H12z"'); for (var i=0; i < s.length; i++) { var e = s[i]; var ee = e.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; ee.parentNode.removeChild(ee); }}}, 200);
View t.js
setInterval(function() { var s = document.querySelectorAll('path[d="M20.75 2H3.25C2.007 2 1 3.007 1 4.25v15.5C1 20.993 2.007 22 3.25 22h17.5c1.243 0 2.25-1.007 2.25-2.25V4.25C23 3.007 21.993 2 20.75 2zM17.5 13.504c0 .483-.392.875-.875.875s-.875-.393-.875-.876V9.967l-7.547 7.546c-.17.17-.395.256-.62.256s-.447-.086-.618-.257c-.342-.342-.342-.896 0-1.237l7.547-7.547h-3.54c-.482 0-.874-.393-.874-.876s.392-.875.875-.875h5.65c.483 0 .875.39.875.874v5.65z"]'); for (var i=0; i < s.length; i++) { var e = s[i].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; e.parentElement.removeChild(e); }}, 200);
View slippy.ml
(* https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Zoom_levels *)
let pi = 3.1415926535897932384626433832795028841
let tile_number zoom lat lon =
let n = 2. ** (float_of_int zoom) in
(* return (Math.floor((tt+180)/360*Math.pow(2,zoom1))); *)
let xtile = int_of_float (floor ((lon +. 180.) /. 360. *. n)) in
(* (Math.floor((1-Math.log(Math.tan(lat*Math.PI/180) + 1/Math.cos(lat*Math.PI/180))/Math.PI)/2 *Math.pow(2,zoom2))) *)
View spectral_cluster.py
import numpy as np
from scipy.sparse import csr_matrix
from sklearn.decomposition import TruncatedSVD
import sklearn.cluster as cl
import sys
import os
import threading
from multiprocessing import cpu_count
# your input (graph.bin) represents a set of pairwise counts (thing a, thing b, count)
View shade.py
def shade(points, width=1280, height=1024):
max_x = np.max(points[:, 0])
max_y = np.max(points[:, 1])
min_x = np.min(points[:, 0])
min_y = np.min(points[:, 1])
bin_width = (max_x - min_x) / width
bin_height = (max_y - min_y) / height
View algae.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pdf_urls.txt
This file has been truncated, but you can view the full file.
https://www.pdf-archive.com/2011/01/01/great-big-hug-cowl-pattern-version-1/great-big-hug-cowl-pattern-version-1.pdf
https://www.pdf-archive.com/2011/01/01/brentsteinbergillustrations/brentsteinbergillustrations.pdf
https://www.pdf-archive.com/2011/01/01/summing-up-transfers-on-january-1st/summing-up-transfers-on-january-1st.pdf
https://www.pdf-archive.com/2011/01/03/10-retro/10-retro.pdf
https://www.pdf-archive.com/2011/01/03/10-vol/10-vol.pdf
https://www.pdf-archive.com/2011/01/03/progress-report-28-12-2010/progress-report-28-12-2010.pdf
https://www.pdf-archive.com/2011/01/03/guide/guide.pdf
https://www.pdf-archive.com/2011/01/03/dating-relationships-and-all-that-awkward-stuff/dating-relationships-and-all-that-awkward-stuff.pdf
https://www.pdf-archive.com/2011/01/04/q1-and-q2/q1-and-q2.pdf
@bobpoekert
bobpoekert / readme.md
Last active Aug 31, 2017
How to load keras graphs from clojure
View readme.md
  1. train your model in keras in python
  2. use serialize() to write the graph with parameters out to a file
  3. use load-graph to load that file using the tensorflow java api
View gist:e10d7947b80d593250ddb11b70cc2ffd
'figure': 2.7995377623971058,
'heading': 2.7494888513321079,
'list': 2.8587943944205776,
'paragraph': 2.9397276751874042,
'table': 4.1352922428576822