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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="436" height="436" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
// from kanjivg, see kanjivg's license |
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
// ==UserScript== | |
// @name Block Reddit | |
// @version 1 | |
// @grant none | |
// @include http://*.reddit.com/* | |
// @include https://*.reddit.com/* | |
// @run-at document-start | |
// ==/UserScript== | |
async function delete_page() |
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
# from the comments on https://gist.github.com/jeetsukumaran/1291836 edited to use lists instead of strings | |
import copy | |
class Rijndael(object): | |
@classmethod | |
def create(cls): | |
if hasattr(cls, "RIJNDAEL_CREATED"): | |
return | |
# [keysize][block_size] |
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
// ==UserScript== | |
// @name Google Fonts preview override | |
// @version 1 | |
// @grant unsafeWindow | |
// @include https://fonts.google.com/* | |
// ==/UserScript== | |
function overwrite(e, text) | |
{ |
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
#!/usr/bin/env python | |
from math import ceil, sqrt | |
from PIL import Image | |
import gc | |
import sys | |
from time import time |
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
#!/usr/bin/env python | |
from math import ceil, sqrt | |
from PIL import Image | |
import gc | |
import sys | |
from time import time |
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
#include <GL/gl3w.h> | |
#include <GLFW/glfw3.h> | |
#include <stdio.h> | |
#define STB_IMAGE_IMPLEMENTATION | |
#define STBI_ONLY_PNG | |
#include "include/stb_image.h" | |
#define max(X,Y) (((X)>(Y))?(X):(Y)) |
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
#!sh | |
# On mingw, YOU NEED TO EDIT mecab.h to change DLL_EXPORT to MECAB_DLL_EXPORT or similar. on other platforms, you need to edit the first g++ line below to use DDLL_EXPORT instead (remove mconsole while you're at it) | |
cd src | |
MECAB_DEFAULT_RC="\"C:/Program Files/mecab/etc/mecabrc\"" | |
DIC_VERSION="102" | |
g++ -O3 -m64 -mconsole -I.. -DDIC_VERSION=$DIC_VERSION -DMECAB_DEFAULT_RC="$MECAB_DEFAULT_RC" -DHAVE_CONFIG_H -Wfatal-errors -DMECAB_DLL_EXPORT learner.cpp tagger.cpp viterbi.cpp char_property.cpp dictionary_compiler.cpp feature_index.cpp learner_tagger.cpp nbest_generator.cpp tokenizer.cpp connector.cpp dictionary_generator.cpp iconv_utils.cpp param.cpp utils.cpp context_id.cpp dictionary_rewriter.cpp lbfgs.cpp string_buffer.cpp dictionary.cpp eval.cpp writer.cpp libmecab.cpp -shared -static -static-libgcc -static-libstdc++ -lpthread -liconv -o libmecab.dll | |
g++ -Os -fdata-sections -ffunction-sections -fwhole-program -Wl,--gc-sections -Wl,--strip-all -m64 -mconsole -I.. -DDIC_VERSION=$DIC_VERSION -DMECAB_DEFA |
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
#!python | |
from bs4 import BeautifulSoup | |
import urllib | |
from urllib.parse import urljoin | |
import sys | |
import aiohttp | |
import asyncio |
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
#!python | |
from bs4 import BeautifulSoup | |
import urllib | |
from urllib.parse import urljoin | |
import sys | |
def get_top_300(url): | |
r = urllib.request.urlopen(url) | |
data = r.read() |