I hereby claim:
- I am larsendt on github.
- I am larsendt (https://keybase.io/larsendt) on keybase.
- I have a public key ASBH5NIfZN5i33Zsrmu6F5XZTL0eHQNZhYppFLi59Y8tWQo
To claim this, I am signing this object:
class ChatClient(object): | |
def __init__(self): | |
self._conn = ServerConnection() | |
self._renderer = AndroidRenderer() | |
self._local_user = "bob" | |
self._current_room = "politics and shit" | |
self._room_metadata = Blah() | |
self._last_seen_timestamp = 0 | |
def run(self): |
class ChatServer(object): | |
def __init__(self): | |
self._rooms = {} # dict of room name -> room | |
self._conn_manager = ConnectionManager() | |
def run(self): | |
while True: | |
for conn in self._conn_manager.get_connections(): | |
events = conn.get_user_events() | |
for room in self._rooms: |
from enum import Enum | |
class CityGrid(object): | |
pass | |
class TrafficLightController(object): | |
def run(self): | |
raise NotImplementedException() | |
class LaneState(Enum): |
#!/bin/bash | |
gcc dane_bit_viewing.c -o dane_bit_viewing && ./dane_bit_viewing |
void print_bits(int v) { | |
for(int i = 1; i <= (sizeof(int)*8); i++) { | |
printf("%d", (v >> ((sizeof(int)*8) - i)) & 1); | |
} | |
printf("\n"); | |
} | |
int my_function(int x, int y) { | |
print_bits(x); | |
} |
I hereby claim:
To claim this, I am signing this object:
int NUM_PIXLES = 24; | |
int cur_pixel; | |
int cur_brightness; | |
const int BRIGHTENING_MODE = 0; | |
const int DIMMING_MODE = 1; | |
const int CHANGE_DELAY = 2; // milliseconds | |
int cur_mode; | |
void setup() { |
def has_two_pair(hand): | |
numbers = [] | |
for card in hand: | |
numbers.append(card[0]) | |
numberset = set(numbers) #each item in numberset is unique | |
paircount = 0 | |
for number in numberset: | |
if numbers.count(number) == 2: | |
paircount += 1 |
hand = [["2", "C"], ["2", "D"], ["K", "H"]] | |
def has_two_of_a_kind(hand): | |
numbers = [] | |
for card in hand: | |
numbers.append(card[0]) | |
for number in numbers: | |
if numbers.count(number) >= 2: | |
return True |