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
| extends KinematicBody2D | |
| const UP = Vector2(0, -1) | |
| const GRAVITY = 20 | |
| const ACCELERATION = 200 | |
| const MAX_SPEED = 600 | |
| const JUMP_HEIGHT = -750 | |
| var motion = Vector2() | |
| var num_jumps = 0 |
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
| import subprocess | |
| import os | |
| import sys | |
| import shutil | |
| SEC_LENGTH = 30 # section length - actual time (s) | |
| SEC_SEP = 120 # time petween sections - actual time (s) | |
| SPEEDUP = 1 | |
| FPS_FINAL = 15 | |
| PART_LENGTH = 59 # time - output time (s) |
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
| ; mod+shift+r or mod+r = reload this script | |
| #+r:: | |
| #r:: | |
| Reload | |
| return | |
| ; mod+shift+q = close active window | |
| #+q::WinClose A | |
| ; mod+shift+enter = browser |
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
| import math | |
| import subprocess | |
| import os | |
| import sys | |
| import shutil | |
| SEC_LENGTH = 30 # section length - actual time (s) | |
| SEC_SEP = 120 # time spetween sections - actual time (s) | |
| SPEEDUP = 20 | |
| FPS_SOURCE = 60 |
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
| import re | |
| text = "" | |
| output = "" | |
| with open("input.sql") as f: | |
| text = f.read() | |
| text = re.sub(r"--.*", "", text) | |
| for m_table in re.finditer(r"CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+"\ |
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
| #!/bin/sh | |
| img=$1 | |
| vid=$2 | |
| fps=${3:-25} | |
| out=${4:-timelapse.mp4} | |
| echo "insta-timelapse:" | |
| if [ $# -lt 2 ]; then | |
| echo "USAGE: ./insta-timelapse img_path vid_path [target_fps=$fps] [out_path=$out]" |
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
| // create table: ct | |
| // foreign key: fk | |
| // create key with type INTEGER, TEXT, BLOB, NULL, REAL respectively: cki, ckt, ckb, ckn, ckr | |
| // create key with type TEXT + PRIMARY KEY: cktp | |
| // create key with type REAL + NOT NULL: ckrn | |
| // create key with type INTEGER + UNIQUE: ckiu | |
| // PRIMARY KEY, NOT NULL, UNIQUE can be chained in any combination. E.g: ckipnu, ckrun, ckiupn | |
| { | |
| "Create Table": { | |
| "prefix" : "ct", |
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
| def human_number(num): | |
| """ | |
| return human-readable version of number. E.g: 30.4k | |
| """ | |
| # https://gist.github.com/pixelzery/eace0b100a381e7cf724612b7309a9d2 | |
| if num == 0: | |
| return "0" | |
| elif num < 0: | |
| return "-" + human_number(-num) |
NewerOlder