Skip to content

Instantly share code, notes, and snippets.

Daniel Watkins OddBloke

Block or report user

Report or block OddBloke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View count-stubhub-tickets.js
// This assumes that you are using Chrome, as it relies on the $x function in the development console
// 1) Scroll all the way down through the list of tickets, so that all of them are loaded on the page
// 2) Open the Chrome Developer Tools (Ctrl-Shift-J)
// 3) Paste the below in to the console and press return
// 4) Curse out the filthy scalpers
$x('//div[@class="ticketsText"]/text()').map(ticket_text => {
match = /(\d+) tick/.exec(ticket_text.textContent);
if (match) {
return parseInt(match[1], 10)
View .gitignore
*.json
.mypy_cache
*.html
output/
njpw_results
View pending-uploads.md
View reproducer.yaml
- builder:
name: Macro
builders:
- shell: ""
- job:
name: Job
builders:
- conditional-step:
condition-kind: file-exists
@OddBloke
OddBloke / Output When Run Against example.py.txt
Created Aug 30, 2017
A simple typed_ast script to find nested classes
View Output When Run Against example.py.txt
--- nested.py ---
Foo -> Bar
Foo -> Bar -> Baz
Foo -> Lolz
*InMethod -> InInMethod
Foo -> Eggs
*InFunc -> InInFunc
Second -> InSecond
InIf -> InInIf
InElse -> InInElse
@OddBloke
OddBloke / README.md
Last active Aug 22, 2017
eq_plugin.py: mypy plugin to check that types are only compared to themselves
View README.md

How to Use

  1. Put eq_plugin.py somewhere in your project
  2. Add plugins=path/to/eq_plugin.py to the mypy section of your mypy.ini (see example in this gist)
  3. Run mypy

Example

View gist:dbd78409dcd53bdbb6b3b8571bd29720
$ cut -d: -f1 < out | cut -d/ -f1-3 | sort | uniq -c | sort -r -n
355 third_party/2and3/boto
229 third_party/2and3/jinja2
99 third_party/2and3/Crypto
81 third_party/2and3/pynamodb
43 third_party/2and3/requests
33 third_party/2and3/yaml
21 third_party/2and3/click
10 third_party/3/itsdangerous.pyi
10 stdlib/2and3/formatter.pyi
View AWS_Pricing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OddBloke
OddBloke / README.md
Last active Jan 6, 2017 — forked from smoser/README.md
publishing image to azure
View README.md

Publishing an image on Azure

Installation of azure cli tools

The azure cli tool is used to do this publication. To install it follow below. For further questions see Azure CLI Install

# add ~/bin and add it to path
mkdir -p ~/bin/
[ "${PATH#*$HOME/bin}" = "$PATH" ] || PATH=$HOME/bin:$PATH

# install npm
View example.py
class Foo(object):
def __init__(self):
self._endpoint = None
@property
def endpoint(self):
if self._endpoint is None:
self._endpoint = self._find_endpoint()
return self._endpoint
You can’t perform that action at this time.