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
# Implements a beta binomial distribution using the scipy discrete random | |
# variable API. | |
# Requires scipy 0.14.0 or newer; recommend scipy 0.15.0 or newer | |
# Distribution functions unapologetically adapted from Wikipedia | |
# http://en.wikipedia.org/wiki/Beta-binomial_distribution | |
from numpy import exp, floor, ceil, sqrt, r_, maximum, where, sum, zeros, linspace | |
from numpy.lib.function_base import vectorize | |
from scipy.stats._distn_infrastructure import rv_discrete, rv_frozen | |
from scipy.stats import beta, binom |
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/python3 | |
import re, sys, argparse, random | |
TileMap = -1000 # 0xc3a0 | |
AttrMap = -1000 # 0xccd9 | |
SCREEN_WIDTH = 20 | |
SCREEN_HEIGHT = 18 | |
z80table = [ | |
# $00 |
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
The RNG update function is as follows: | |
* The value at 0xFF04 (rDIV) is read and added, with carry, to 0xFFE1 (hRandomAdd); the value is stored back to hRandomAdd. | |
* The value at rDIV is read again (it may have incremented) and subtracted, with carry, from 0xFFE2 (hRandomSub); the value is stored back to hRandomSub and returned in the accumulator. | |
Every time the VBlank interrupt toggles, the RNG is called. This happens once every frame. | |
When you turnframe or step onto a tile that can generate an encounter, the RNG is rolled a number of times for that encounter. This excludes the first 5 steps after loading the current map from a connection, warp, or battle; during this time, no wild encounters may be generated so as to prevent the player from being encounter-locked. Note that encounters are not rolled until the frame your step or turnframe finishes. The pattern is as such: | |
* Roll RNG and compare it with the modified encounter rate. If the rolled number is greater than the encounter rate, the ro |
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
APCGX7rC47Q43Cpp4Y8E9sHsJWJPlVzbUyRCbxcRHCEkb4na8b3e6LPZ | |
F7RXzOZn-I846wC8K-ajSNH2B0PX1U9GWcxG5tsx102uC_0jPsLsVqUU | |
GdAUOqrmHXOPu5ciaQ6ARunk9EYVx2jNH6o9N2cxIUbEL06e5a75oW5J | |
mR2ruEhtEz6TTvUDJ46tEieWq1QD_909sVCleLz_4BK8C3RnTVoEifvk | |
B_r2L9YaQGI8EgtN3EUaNvC329BeGP0FxznOOB28fwz5Y9HBX_eEvy25 | |
vdYw1EvfJLlWxCM4XHwzhXN9zyANs7-3dlHOjXTG0cr8KcJ5W2juJNw1 | |
udF91MCBjyJjpi3_8FQ08YW2w38ndZ7CsIHjcjdVk8A1S1BUGEAslnxB | |
a8b3FcCM9t4wGQbcDTT2XschjREgz2rWha4bSnhMRTCaAr3h2vebTly6 | |
GkyBAZhQHKl-xwQfFDT016lKrhCNtVygxYy6vXFMWVyBqJwldq7gvy7z | |
YJvwS1mASoOfW1AJpcMLWL317bLSq1kaJk-7JRgzrqyJSEclWNkBQ2P5 |
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 unittest | |
import sqlite3 | |
from utils import sql | |
from collections import namedtuple | |
User = namedtuple('User', ['id', 'name']) | |
Context = namedtuple('Context', ['author']) | |
me = User(148462033770119168, 'PikalaxALT') | |
ctx = Context(me) |
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 asyncio | |
import discord | |
from discord.ext import commands | |
from collections import Counter | |
class FooCog: | |
THUMBS_UP = '\U0001ff4d' | |
THUMBS_DOWN = '\U0001ff4e' |
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 <stdio.h> | |
#include <getopt.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct Section { | |
unsigned short end; | |
bool invalid; | |
char * name; |
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 argparse | |
from functools import total_ordering | |
from z80table import z80table, extdtable | |
import re | |
def fread(file, n): | |
return int.from_bytes(file.read(n), 'little') | |
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
.file "" | |
.text | |
.syntax divided | |
.section .rodata | |
.align 2 | |
.thumb | |
.syntax unified | |
.align 1 | |
.p2align 2,,3 | |
.arch armv4t |
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
Name | Effect | Power | Type | Accuracy | PP | Effect chance | Is damaging? | |
---|---|---|---|---|---|---|---|---|
POUND | EFFECT_NORMAL_HIT | 40 | NORMAL | 100 | 35 | 0 | TRUE | |
KARATE_CHOP | EFFECT_NORMAL_HIT | 50 | FIGHTING | 100 | 25 | 0 | TRUE | |
DOUBLESLAP | EFFECT_MULTI_HIT | 15 | NORMAL | 85 | 10 | 0 | TRUE | |
COMET_PUNCH | EFFECT_MULTI_HIT | 18 | NORMAL | 85 | 15 | 0 | TRUE | |
MEGA_PUNCH | EFFECT_NORMAL_HIT | 80 | NORMAL | 85 | 20 | 0 | TRUE | |
PAY_DAY | EFFECT_PAY_DAY | 40 | NORMAL | 100 | 20 | 0 | TRUE | |
FIRE_PUNCH | EFFECT_BURN_HIT | 75 | FIRE | 100 | 15 | 10 | TRUE | |
ICE_PUNCH | EFFECT_FREEZE_HIT | 75 | ICE | 100 | 15 | 10 | TRUE | |
THUNDERPUNCH | EFFECT_PARALYZE_HIT | 75 | ELECTRIC | 100 | 15 | 10 | TRUE |
OlderNewer