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
# pip install lottie cairosvg | |
import io | |
import re | |
import sys | |
import enum | |
import math | |
import json | |
import lottie | |
import pathlib | |
import argparse |
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 | |
import sys | |
import math | |
word = sys.argv[1] if len(sys.argv) > 1 else "loss" | |
rlen = 3 + len(word) | |
spacing = " " * int(math.floor(rlen / 3)) | |
for letter in word: |
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 | |
class Tape(object): | |
def __init__(self, data="", blank=None): | |
self.tape = dict(enumerate(data)) | |
self.pos = 0 | |
self.blank = blank | |
def move_right(self): |
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
#!/bin/bash | |
echo "This script will determine the future of all humanity" | |
read -n 1 -s -r -p $'Press \x1b[1mANY\x1b[m key to continue\n' | |
read -n 1 -s -r -p $'Do you want humanity to survive? [Y|n]\n' hooman | |
if [ "$hooman" = "n" ] | |
then | |
read -n 1 -s -r -p $'You are about to kill all humans, confirm? [y|N]\n' confirm | |
if [ "$confirm" = "y" ] | |
then |
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 | |
import sys | |
from argparse import ArgumentParser | |
from PIL import Image | |
import svgwrite | |
def pix2char(image, x, y, palette): | |
try: | |
l, a = image.getpixel((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
function find_components(header) | |
{ | |
var url = document.url(); | |
var components = url.split("/"); | |
var end = header ? components.length : components.length-1; | |
components = components.slice(3, end); | |
var cut = -1; | |
for ( cut = components.length-1; cut >= 0; cut-- ) | |
if ( components[cut] == "src" || components[cut] == "include" ) |
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> | |
<head> | |
<title>,</title> | |
</head> | |
<body> | |
<style> | |
.wrapper | |
{ |
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> | |
<head> | |
<title>Pony!</title> | |
</head> | |
<body> | |
<h1>Pony! <span id="next_pony"></span></h1> | |
<iframe | |
id="stream" | |
width="1024" |
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 <cmath> | |
#include <limits> | |
#include <iostream> | |
#include "melanolib/math/math.hpp" | |
using namespace melanolib; | |
template<class Float> | |
std::string float_to_string(Float value) |
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
import urllib | |
import json | |
import random | |
class PonyList(object): | |
api_url = "http://mlp.wikia.com/api.php" | |
query_common = { | |
"action": "query", | |
"list": "categorymembers", | |
"format": "json", |
NewerOlder