Skip to content

Instantly share code, notes, and snippets.

View cscorley's full-sized avatar
🐷
PIG MODE

Christopher Corley cscorley

🐷
PIG MODE
View GitHub Profile
{
"kind": "discovery#restDescription",
"description": "Business logic for the Meetings app.",
"servicePath": "",
"rootUrl": "https://meetings.googleapis.com/",
"basePath": "",
"ownerDomain": "google.com",
"name": "meetings",
"batchPath": "batch",
"revision": "20181113",
class Test
def thing
@thing ||= "Hi"
end
def thing=(new_thing)
@thing = new_thing
end
def do_stuff
@cscorley
cscorley / worklog-generator.py
Created September 14, 2020 00:17
personal worklog generator for leo
@language python
import datetime
import os.path
worklog_name = 'Worklogs'
numdays = 5 * 365
def generate_node(primary_node, node_name, child=True, body_text=''):
node = g.findNodeInTree(c, primary_node, node_name)
def clone(source, target, bare=False, fresh=False):
if os.path.exists(target) and fresh:
shutil.rmtree(target)
# so dulwich doesn't shit the bed when given a github url
if not source.endswith('.git'):
source = source + '.git'
if not os.path.exists(target):
mkdir(target)
private IDisposable _shimContext { get; set; }
/// <summary>
/// <para>Rules for evaluating expected HTTP requests under test.</para>
/// <para>When a rule is matched, the shim will be set up with the information contained in the tuple: the raw HTTP return code and response string.</para>
/// <para>Each rule is a function and is given the original Uri of the request and, as a convenience, the parsed query portion of the HTTP request.
/// The functions are expected to return a boolean value of whether the parameters match.</para>
/// </summary>
protected Dictionary<Func<Uri, NameValueCollection, bool>, Tuple<HttpStatusCode, string>> expectedHttpRequests;

Keybase proof

I hereby claim:

  • I am cscorley on github.
  • I am cscorley (https://keybase.io/cscorley) on keybase.
  • I have a public key ASDxMaBvgb7zXe9DQlaHKVzbXD7gV1qs8vjJH6RMJG_kyAo

To claim this, I am signing this object:

@cscorley
cscorley / proposal.md
Last active September 10, 2015 18:59

the general algo goes like so:

for chunk in corpus:
  e-step
  m-step

gensim hacks in multiple passes:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from node import Node
class LinkedList:
def __init__(self, iterable=None):
last = None
if iterable:
for item in reversed(iterable):
@cscorley
cscorley / README.md
Last active August 29, 2015 14:10
Teaching SOP
\newcommand{\attn}[1]{{\color{red}#1}}
\newcommand{\desc}[1]{{\emph{\color{blue}#1}}}
\newcommand{\needcite}{\attn{\tiny{[cite]}}}