Instantly share code, notes, and snippets.

🐷
PIG MODE

# Christopher Corley cscorley

🐷
PIG MODE
Last active Mar 9, 2022
View why_nil.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 class Test def thing @thing ||= "Hi" end def thing=(new_thing) @thing = new_thing end def do_stuff
Created Sep 14, 2020
personal worklog generator for leo
View worklog-generator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 @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)
Created Jul 24, 2016
View clone-github.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 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)
Last active Apr 26, 2016
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 private IDisposable _shimContext { get; set; } /// /// Rules for evaluating expected HTTP requests under test. /// 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. /// 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. /// protected Dictionary, Tuple> expectedHttpRequests;
Created Jan 9, 2016
View keybase.md

### 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:

Last active Sep 10, 2015
View proposal.md

the general algo goes like so:

for chunk in corpus:
e-step
m-step

gensim hacks in multiple passes:

Last active Aug 29, 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/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):
Last active Aug 29, 2015
Teaching SOP