Skip to content

Instantly share code, notes, and snippets.

View TkTech's full-sized avatar
Converting coffee into code

Tyler Kennedy TkTech

Converting coffee into code
View GitHub Profile
@TkTech
TkTech / gist:5582408
Last active December 17, 2015 08:49
crawl lcbo in one titanic go.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Piss quick script to dump all of LCBO
"""
import sys
import urlparse
import requests
import lxml.html
#!/usr/bin/env python
# -*- coding: utf8 -*-
import re
from collections import namedtuple
import requests
BukkitPluginUser = namedtuple('BukkitPluginUser', [
'name',
#!/usr/bin/env python
# -*- coding: utf8 -*-
import re
import sys
import getopt
from jawa import JarFile, ConstantMethodRef, ConstantInterfaceMethodRef
_method_types = (ConstantMethodRef, ConstantInterfaceMethodRef)
@classmethod
def shorten(cls, url):
# Make sure the URL hasn't already been shortened, since github
# may does this in the future for web hooks. Better safe than silly.
if re.search(r'^https?://git.io', url):
return url
# Only github URLs can be shortened by the git.io service, which
# will return a 201 created on success and return the new url
# in the Location header.
class JawaEditorPanel(wx.Panel):
"""
Constructs the right panel which contains the viewer window.
"""
def __init__(self, *args, **kwargs):
super(JawaEditorPanel, self).__init__(*args, **kwargs)
self._notebook = notebook = wx.aui.AuiNotebook(
self,
wx.ID_ANY, style=(
wx.EXPAND |
20:50 Starting query in Freenode with papna
20:50 > I would rather not annoy kloeri
20:50 > Disclaimer, everything said here will be public
20:50 > Agreed?
20:50 Starting query in Freenode with papna
20:50 > I would rather not annoy kloeri
20:50 > Disclaimer, everything said here will be public
20:50 > Agreed?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Foreground Color</key>
<dict>
<key>Red Component</key>
<real>0.776470588235294</real>
<key>Blue Component</key>
<real>0.482352941176471</real>
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
An example showing how to create a "Hello World" class from scratch.
"""
from jawa import ClassFile
from jawa.assemble import assemble
if __name__ == '__main__':
cf = ClassFile.create('HelloWorld')
import sys
from datetime import datetime
from collections import namedtuple
Message = namedtuple('Message', [
'title',
'description',
'location',
'added',