Skip to content

Instantly share code, notes, and snippets.

#include <pokemon.h>
int main(int argc, char **argv)
{
FILE *f;
PkmnState s;
int i;
// Replicate Gen 1
s->IgnoreAbilities(true);
#!/usr/bin/python2
import csv, psycopg2, sys
conn = psycopg2.connect(database="pokedex", user="pokedex", password="pokedex17984", host="meth.guru")
def berries():
print(" Importing Berries")
cur = conn.cursor()
cur.execute("CREATE TABLE berries (id int, item_id int, firmness_id int, natural_gift_power int, natural_gift_type_id int, size int, max_harvest int, growth_time int, soil_dryness int, smoothness int, PRIMARY KEY(id));")
f = open("../berries.csv", "rb")
d = csv.DictReader(f)
to_db = [(i["id"], i["item_id"], i["firmness_id"], i["natural_gift_power"], i["natural_gift_type_id"], i["size"], i["max_harvest"], i["growth_time"], i["soil_dryness"], i["smoothness"]) for i in d]
#include "detect.hpp"
#include <gtest/gtest.h>
char useragents[][128] = {
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36", //0 Linux, Chrome, Desktop
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", //1 OS X, Chrome, Desktop
"Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25", //2 OS X, Safari, Mobile
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A", //3 OS X, Safari, Desktop
"Mozilla/5.0 (X11; Mageia; Linux x86_64; rv:10.0.9) Gecko/20100101 Firefox/10.0.9", //4 Linux, Firefox, Desktop
"Mozilla/5.0 (Android; U; Android; pl; rv:1.9.2.8) Gecko/20100202 Firefox/3.5.8", //5 Linux, Firefox, Mobile
#!/usr/bin/perl -w --
# generated by wxGlade 0.6.3 on Sun Apr 24 21:53:14 2011
# To get wxPerl visit http://wxPerl.sourceforge.net/
use Wx 0.15 qw[:allclasses];
use strict;
package MyUnicorns;
use base qw(Wx::App);
use strict;
#define __DBL_MIN_EXP__ (-1021)
#define __UINT_LEAST16_MAX__ 65535
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __UINT_LEAST8_TYPE__ unsigned char
#define __INTMAX_C(c) c ## L
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 255
#define __WINT_MAX__ 4294967295U
#define __SIZE_MAX__ 18446744073709551615UL
#define __WCHAR_MAX__ 2147483647
#!/usr/bin/env perl
# circe - Perl replacement for Redis
# Copyright 2011 Alexandria M. Wolcott <alyx@sporksmoo.net>
# Released under the same terms as Perl itself.
use warnings;
use strict;
package Circe;
use Tree::RB;
************* Module bot
F: 10: Unable to import 'eventlet'
F: 11: Unable to import 'eventlet.green'
C: 17: Invalid name "cg" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 18: Invalid name "cfile" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 21: Invalid name "cg" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 22: Invalid name "cfile" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 24: Invalid name "conf" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 62:IRCCli.onjoin: No exception type(s) specified
E: 61:IRCCli.onjoin: Class 'events' has no 'join' member
************* Module bot
C: 17: Invalid name "cg" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 18: Invalid name "cfile" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 21: Invalid name "cg" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 22: Invalid name "cfile" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 24: Invalid name "conf" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 62:IRCCli.onjoin: No exception type(s) specified
E: 61:IRCCli.onjoin: Class 'events' has no 'join' member
C: 62:IRCCli.onjoin: More than one statement on a single line
W: 66:IRCCli.onpart: No exception type(s) specified
use strict;
use warnings;
use Data::Dumper;
my %people = (
cody => {
friends => ['aaron', 'alyx', 'foo', 'cow']
},
aaron => {
friends => ['alyx', 'cody', 'foo', 'bar', 'moo', 'cow']
@alyx
alyx / tokenize.c
Created October 9, 2011 23:11
tokenizer with memory asplosion
/* Sigyn - A reasonably sane IRC bot.
* Copyright (c) Alexandria Wolcott <alyx@malkier.net>
* Released under the BSD license.
*/
#include "sigyn.h"
int tokenize(char *message, char **parv)
{
int i;