This file contains hidden or 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
| use std::vec::Vec; | |
| use std::fs::File; | |
| use std::io::Read; | |
| use std::result::Result; | |
| fn get_data() -> Result<Vec<Vec<f64>>, std::io::Error> | |
| { | |
| let mut file = File::open("info.txt")?; | |
| let mut text = String::new(); | |
| file.read_to_string(&mut text)?; |
This file contains hidden or 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 | |
| # -*- coding: utf-8 -*- | |
| from collections import OrderedDict | |
| import json | |
| import sys | |
| from io import open | |
| import re | |
| entries = json.load(open("zero-shinjirin.json", encoding="utf-8"), object_pairs_hook=OrderedDict) |
This file contains hidden or 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 | |
| mypath = "M26.75,23.5c1.48-0.24,3.35-0.52,5.49-0.84C46.03,20.62,63,17.75,74,17.25c4-0.18,6.09,0.97,5.5,4.75C76.25,42.75,77.25,71.75,92,87.75c6.95,7.54,5.75,1,6-5.5" | |
| commands = "MmZzLlHhVvCcSsQqTtAaBb"; | |
| rules = [ | |
| ["comma", r"^(,)(.*)"], | |
| ["number", r"^([+\-]?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+))(.*)"], |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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)) |