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 python3 | |
import sys | |
import narc | |
from namedstruct import namedstruct | |
from itertools import islice | |
BaseStats = namedstruct('BaseStats', | |
"stat_hp:B stat_atk:B stat_def:B" |
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 binascii | |
import struct | |
import sys | |
import traceback | |
u16 = struct.Struct('<H') | |
u32 = struct.Struct('<L') | |
def read16(f): | |
b = f.read(2) |
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
-- even and odd as mutually recursive infinite lists | |
import Prelude hiding (even, odd) | |
module Main where | |
even = 0:(map (1+) odd) | |
odd = map (1+) even | |
main = putStr $ show $ even |
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
# Get a video url from screen.yahoo.com | |
# python3 yahoo.py 'http://screen.yahoo.com/raven-refused-sing-010647927.html' | xargs vlc | |
import sys | |
import contextlib | |
import json | |
import random | |
import re | |
import urllib.parse | |
import urllib.request |
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
"""Analyze statistics of movepool typing""" | |
from __future__ import division | |
import pokedex.db | |
import pokedex.db.tables as t | |
from sqlalchemy import sql | |
import argparse | |
from itertools import groupby |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"math" |
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
puts "String.concat" | |
1.upto(10) do |i| | |
i *= 10000 | |
start = Time.now() | |
s = "" | |
0.upto(i) { | |
s << 'a' | |
} | |
puts "#{i}: #{Time.now()-start}s" | |
end |
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
Altering Cave en location 490 | |
Altering Cave en location 529 | |
Antídoto es ability 90 | |
Antídoto es item 18 | |
Apricorn Box en item 446 | |
Apricorn Box en item_category 40 | |
Attack en conquest_stat 2 |
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
Bulbasaur | |
9 RBY | |
11 GSCRSECoXDFRLG | |
14 DPPtHGSSBWB2W2 | |
1386 | |
Ivysaur | |
10 RBY | |
13 GSCRSECoXDFRLG | |
16 DPPtHGSSBWB2W2 |
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 <stdint.h> | |
#include <stdio.h> /* fprintf, getchar, printf, putchar, stderr */ | |
#include <stdlib.h> /* exit, free, malloc */ | |
#include <string.h> /* memmove */ | |
#define N 9 | |
#define mask ((1<<N) - 1) | |
typedef uint16_t Cell; | |
Cell puz[N*N]; |