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
function classof(o) { | |
if (o === null) return "Null"; | |
if (o === undefined) return "Undefined"; | |
return Object.prototype.toString.call(o).slice(8, -1); | |
} |
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
argv IS $1 | |
t IS $255 | |
k GREG 0 | |
LOC Data_Segment | |
GREG @ | |
NewLn BYTE #a,0 | |
LOC #100 | |
Main SET k,0 | |
Loop LDOU t,argv,k | |
BZ t,Term |
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
cnt IS $0 | |
argv IS $1 | |
t IS $255 | |
k GREG 0 | |
LOC Data_Segment | |
GREG @ | |
NewLn BYTE #a,0 | |
LOC #100 | |
Main SET k,0 | |
Loop LDOU t,argv,k |
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
% Algorithm P: Print table of 500 primes | |
L IS 500 % The number of primes to find | |
t IS $255 % Temporary storage | |
n GREG 0 % Prime candidate | |
q GREG 0 % Quotient | |
r GREG 0 % Remainder | |
jj GREG 0 % Index for PRIME[j] | |
kk GREG 0 % Index for PRIME[k] | |
pk GREG 0 % Value of PRIME[k] | |
mm IS kk % Index for output lines |
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
LOC #100 | |
Main GETA $255,Silly | |
TRAP 0,Fputs,StdOut | |
TRAP 0,Halt,0 | |
Silly BYTE 3+"pills"+6 % 3+'p','i','l','l','s'+6 |
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
var input = [], | |
s2n = function (s) { return parseInt(s, 10) }, | |
solve = function (r, c, candy_box) { | |
var result = 0; | |
for (var i = 0; i < r; i += 1) { | |
for (var j = 0; j < c; j += 1) { | |
if (candy_box[i][j] !== 'o') | |
continue; | |
if (j > 0 && j < c - 1 && candy_box[i][j - 1] === '>' && candy_box[i][j + 1] === '<') { | |
result += 1; |
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 | |
import unittest | |
import os | |
import sys | |
r, s, m = 43, 22, 2**32 | |
X = [] | |
def setup(xs): |
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 | |
# required requests and beautifulsoup4 | |
# pip install requests | |
# pip install beautifulsoup4 | |
import os | |
import sys | |
import re | |
import pickle |
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
# Autocomplete Git Commands and Branch Names in Bash | |
# | |
# Download .git-completion.bash script | |
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
# | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
# Git branch in prompt. |
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
WIDTH = 360 | |
HEIGHT = 240 | |
def setup(): | |
global img | |
img = None | |
noLoop() | |
size(WIDTH, HEIGHT) | |
frame.setResizable(True) | |
background(200) |