Skip to content

Instantly share code, notes, and snippets.

View decause's full-sized avatar

Remy DeCausemaker decause

View GitHub Profile

Update: download the new Pokemon Go app - it fixes all of this. Download it, and reauth, and you should be set. The grant scopes and prompt are correct and visible now too! Now if only I could actually find a pikachu...

Pokemon tokens are requested with these understandable scopes:

-- paste into http://elm-lang.org/try and click "compile"
-- http://imgur.com/gallery/W6TwgZw
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Text
import Color exposing (..)
import Time
import Signal
@bonzanini
bonzanini / run_luigi.py
Created October 24, 2015 14:56
Example of Luigi task pipeline
# run with a custom --n
# python run_luigi.py SquaredNumbers --local-scheduler --n 20
import luigi
class PrintNumbers(luigi.Task):
n = luigi.IntParameter(default=10)
def requires(self):
return []
@ralphbean
ralphbean / stats-for-decause.py
Created August 11, 2015 15:54
stats for decause. bodhi comments and copr builds over the last few years (from fedmsg data)
""" stats-for-decause.py
so, 0 years ago is august 2014 to august 2015
1 years ago is august 2013 to august 2014
2 years ago is august 2012 to august 2013, etc..
the anonymous comments don't add up back 2 years ago because the
anonymous format changed in the message payload -- the "contains"
thing doesn't work exactly that far back.
Output:
Copyright (c) 2015 Tim D. Smith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@rossdylan
rossdylan / emoji.swift
Last active January 10, 2021 05:38
wat
func sleep_cry_pumpkin_snake(horse_ghost_cd_camcorder: [[String]]) -> Void {
var whale_cat_mailbox_flag_symbols = [Int](count: horse_ghost_cd_camcorder.count, repeatedValue: 0)
var shooting_star = 0
ambulance_horse(horse_ghost_cd_camcorder, whale_cat_mailbox_flag_symbols)
while true {
if shooting_star >= horse_ghost_cd_camcorder.count {
return
} else if whale_cat_mailbox_flag_symbols[shooting_star] < horse_ghost_cd_camcorder[shooting_star].count - 1 {
ant_pigsnout_penguin_monkey(&whale_cat_mailbox_flag_symbols, shooting_star)
whale_cat_mailbox_flag_symbols[shooting_star] += 1
@ralphbean
ralphbean / linear-regression-on-text.py
Created May 1, 2014 15:07
Messing around with linear regression over text data
""" Messing around with scikit-learn. """
import sys
import numpy as np
import scipy.sparse
import sklearn.linear_model
import sklearn.datasets
import sklearn.svm
@decause
decause / caldashy2014.txt
Created January 22, 2014 02:02
cal -y > cal2014.txt | vim -- or I took the output of cal -y, which displays the calendar for the year, and then stacked the calendars on top of each other, and used vim to normalize spacing. It took a minute, so I figured "hey, maybe this would be useful for someone else to not have to do?"
2014
January
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
@sloria
sloria / bobp-python.md
Last active June 26, 2024 15:54
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@ralphbean
ralphbean / list-all-repos.py
Created June 7, 2013 23:17
Script to list all repos for a github organization
#!/usr/bin/env python
""" Print all of the clone-urls for a GitHub organization.
It requires the pygithub3 module, which you can install like this::
$ sudo yum -y install python-virtualenv
$ mkdir scratch
$ cd scratch
$ virtualenv my-virtualenv