Skip to content

Instantly share code, notes, and snippets.

View kanglicheng's full-sized avatar
🦜
LLMs ftw

Stephen Cheng kanglicheng

🦜
LLMs ftw
View GitHub Profile

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

@philosodad
philosodad / SvnHelper.java
Last active May 18, 2017 06:24
This gist is a solution to a code Kata I've used to teach a little bit about Mocking and Stubbing. The idea of the Kata is to use TDD to develop a method that will fetch a SVN repository and get the names of each directory entry in the repository. SvnHelperTest uses mocks, stubs, and partial mocks (spys) to test the method. The last time I taugh…
package svnhelpers;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.TransformerUtils;
import org.tmatesoft.svn.core.SVNDirEntry;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
@bradmontgomery
bradmontgomery / count_words.py
Last active August 15, 2022 19:11
playing with python's `collections.Counter`
"""
Use a Counter to find the most common words in "The Wonderful Wizard of Oz" by
L. Frank Baum.
Available in (mostly) plain text at:
https://archive.org/stream/wonderfulwizardo00baumiala/wonderfulwizardo00baumiala_djvu.txt
Note: This code also counts the words in the header, so it's not a *realistic*
applicaton, but more of a demonstration of python's Counter.
@mattsches
mattsches / Roman.php
Created January 30, 2013 08:06
PHP Roman Numerals Code Kata solution. A collaborative effort of the people @ PHP User Group Rheinhessen, Jan '13.
<?php
/**
* Converts Roman numbers to integers
*/
class Roman
{
/**
* @var array
*/
These are some features. They can be implemented in any order you prefer.
* an elevator responds to calls containing a source floor and direction
* an elevator delivers passengers to requested floors
* an elevator doesn't respond immediately. consider options to simulate time
* elevator calls are queued not necessarily FIFO
* you may validate passenger floor requests
* you may implement current floor monitor
* you may implement direction arrows
* you may implement doors (opening and closing)
@h3h
h3h / gist:4437224
Last active May 3, 2021 15:02
My thoughts on Open Allocation, from Michael O. Church.

Original Post

Evaluating Team Members

If people want to move, and the leads of those projects deem them qualified, there’s no reason not to allow this.

Deeming someone qualified is a pretty nuanced and difficult process. I wouldn’t expect all or even most temporary tech leads to get it right (or even be close) for a long time.

@jacobo
jacobo / gist:4163419
Created November 28, 2012 19:18
Talks

Bio

Jacob is the world's foremost expert on (within the subset of people who: work in Ruby for a living, surf the Pacific regularly, and brew sour beers). He does all these things in San Francisco California, while working at Engine Yard.



title

@dave-maldonado
dave-maldonado / PC1
Created November 16, 2012 20:04
Programming Challenges (Skiena) - first problem "3n+1 problem"
class myStuff implements Runnable{
/* Collatz conjecture problem: Skiena's Programming Challenges textbook:
* This program accepts two ints representing a range of ints from the robo-judge.
* For each int in the range it peforms the HOTPO operation to produce a hailstone sequence.
* outputs (prints) the first and second ints inputted and the largest hailstone sequence.
* produced from the range
*/
public void run(){
@textbook
textbook / ProblemSet4.py
Created October 23, 2012 22:08
MIT 6.00x - PSet 4 answers by jonrsharpe
# 1. Word Scores
def getWordScore(word, n):
return (len(word) * sum(SCRABBLE_LETTER_VALUES[x] for x in word)) + (50 if len(word) == n else 0)
# Test implementation
def getFrequencyDict(aStr):
return dict((letter, aStr.count(letter)) for letter in aStr)
# 2. Dealing with hands
def updateHand(hand, word):
@saltavenger
saltavenger / hangman
Created October 23, 2012 14:45
python hangman
# 6.00 Problem Set 3
#
# Hangman game
#
# -----------------------------------
# Helper code
# You don't need to understand this helper code,
# but you will have to know how to use the functions
# (so be sure to read the docstrings!)