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
# NOT A TUPLE | |
1 # NOT A TUPLE | |
1, 2 # a 2-tuple | |
1, 2, 3 # a 3-tuple | |
, # SYNTAX ERROR | |
1, # a 1-tuple | |
1, 2, # a 2-tuple | |
1, 2, 3, # a 3-tuple |
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 | |
import time | |
quotefix_re = re.compile( | |
r''' | |
^( | |
(?: | |
(?: | |
(?:[^\n\\"]|(?:\\{2})*\\"|\\[^\n"])* | |
(?:\\{2})* |
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
Pichu: pokeathlon | |
Unown: pokeathlon | |
Castform: pokeathlon, type, moves (level-up) | |
Deoxys: effort, pokeathlon, stats, moves (level-up, tutor) | |
Burmy: pokeathlon | |
Wormadam: effort, pokeathlon, stats, type, moves (level-up, machine, tutor) | |
Cherrim: pokeathlon | |
Shellos: | |
Gastrodon: | |
Rotom: exp, pokeathlon, stats, type, moves (form-change) |
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
>>> f = open("X/exefs/code.bin", 'rb') | |
>>> data = [] | |
>>> for i in range(1, 65): | |
... _ = f.seek(0x4467d8 + i*22) | |
... data.append(f.read(22)) | |
... | |
>>> text = [line.strip() for line in open("xy/rips/text/en/141")] | |
>>> for d in data: text[d[12]], struct.unpack("<H", d[18:20])[0] | |
... | |
('Hatching Power Lv. 1', 125) |
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
; Pokemon X capture routine | |
; DllBattle.cro .text+0x2ee40 | |
; tl;dr everything is pretty much the same | |
; but with more floating point. | |
; there are four shake checks again instead of three | |
; and the fourth root is now a 16/3 root. | |
; looks like we're going to use a truly staggering number of registers | |
2ee40: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr} |
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
; arguments | |
; ??? | |
; ??? | |
; target pokemon | |
; ball | |
; shakes (out param) | |
; crit (out param) | |
; output | |
; returns whether capture succeeded | |
; [r4] number of shakes |
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
// Project euler #16 | |
#include <stdio.h> | |
int digits[1000] = {1}; | |
int len = 1; | |
void fold() { | |
int i, carry = 0; | |
for (i = 0; i < len; i++) { |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"math" |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { | |
if len(os.Args) != 4 { |
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 <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]; |