Skip to content

Instantly share code, notes, and snippets.

View catermelon's full-sized avatar
🚩
oh no

Rachelle Green catermelon

🚩
oh no
View GitHub Profile
@catermelon
catermelon / Autodoc not worky
Created July 18, 2013 17:04
Autodoc not worky
Running Sphinx v1.1.3+
building [html]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
reading sources... [ 20%] attendee
reading sources... [ 40%] changelog
reading sources... [ 60%] contributing
reading sources... [ 80%] exchange2010calendarevent
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pyexchange/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
'''
Allows scoring of text using n-gram probabilities
17/07/12
'''
from math import log10
# make a class called ngram_score
# which is wrong, Python classes are always CamelCased so it should be NGramScore but whatever
class ngram_score(object):
'''
Allows scoring of text using n-gram probabilities
17/07/12
'''
from math import log10
class ngram_score(object):
def __init__(self,ngramfile,sep=' '):
''' load a file containing ngrams and counts, calculate log probabilities '''
self.ngrams = {}
@catermelon
catermelon / gist:f3b1d2e9e4d094d118fa
Last active August 29, 2015 14:12
Things to do in SF

Weather

So the SF pasttime isn't baseball or anything like that, it's laughing at tourists who wear shorts. All the visions of warm, beachy California are lies spread by the Los Angeles tv industry. SF can be cold and windy even in summer (actually especially in summer, the land warms up and causes the fog to roll in) and the fog is beautiful but it's FRICKIN COLD. I always bring a jacket to SF no matter what time of year it is. It can be 30 deg C maybe 20 miles away and 10 degrees C in SF. No joke.

Food

SF has awesome food, with a lot of Asian and Mexican influence. Here's a great list from all price ranges: http://www.sfgate.com/food/top100/2014/

Pay particular attention to Mexican/Central and South American food, since I know the UK has great Asian food but not Mexican. The burrito is a Californian staple. Try the al pastor and the carnitas.

@catermelon
catermelon / example_response.xml
Created August 22, 2014 23:11
Search for calendar events in exchange
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" MajorVersion="14" MinorVersion="3" MajorBuildNumber="195" MinorBuildNumber="1"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:RootFolder TotalItemsInView="20" IncludesLastItemInRange="true">