I hereby claim:
- I am jpoler on github.
- I am panoptijon (https://keybase.io/panoptijon) on keybase.
- I have a public key ASALE6iJxJg70brYfYnVqGfzENhPPBfd7OLYz2T6k_CDwgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def dp(subjects, maxWork): | |
m = [[(0,[]) for _ in range(maxWork + 1)] for _ in range(len(subjects) + 1)] | |
name_list = subjects.keys() | |
works = [i[WORK] for i in subjects.values()] | |
vals = [i[VALUE] for i in subjects.values()] | |
for s in range(len(subjects)+1): | |
for w in range(maxWork+1): | |
if s == 0 or w == 0: |
(ns clojechosrv.core | |
(:import (java.io File FileInputStream InputStreamReader BufferedReader | |
BufferedWriter OutputStreamWriter FileOutputStream) | |
(java.net ServerSocket))) | |
(require '[clojure.string :as str]) | |
(defn sock-write [writer msg] | |
(let [line (str msg "\r\n")] | |
(. writer write line 0 (count line)))) |
from collections import deque | |
from itertools import islice | |
import pdb | |
NON_INCREASING = -1 | |
NON_DECREASING = 1 | |
def summation(x): | |
return (x * (x -1))/2 |
""" | |
This is the solution for the Sorted Set problem in Quora Haqaton, held on december 2014. | |
https://www.hackerrank.com/quora-haqathon | |
""" | |
import socket | |
import sys | |
import os | |
import threading | |
from struct import unpack, pack | |
from operator import itemgetter |
from heapq import heappush, heappop | |
class StreamScore(object): | |
def __init__(self, stream, key, value): | |
self.stream = stream | |
self.key = key | |
self.value = value | |
def __lt__(self, other): |
//UVa problem 10278 "Fire Stations" C++ solution by @browserapps and @jdp5087 | |
/* to test: | |
g++ UVa10278.cpp -o UVa10278 | |
cat test-case | ./UVa10278 | |
*/ | |
#include <iostream> | |
#include <limits> |
### Code CracklePop ### | |
### I have been learning assembly recently | |
### and this project was a good fit for my skill level | |
### to assemble on linux, please use: | |
### as code_crackle_pop.S -o crackle.o | |
### ld crackle.o -o crackle | |
### and run the program with: | |
### ./crackle |
;; range function [start, stop) | |
(define (range start stop) | |
(define (iter start stop seq) | |
(if (= stop start) | |
(cons start seq) | |
(iter start (- stop 1) (cons stop seq)))) | |
(iter start (- stop 1) '())) | |
(define (divides? divisor dividend) | |
(= (remainder dividend divisor) 0)) |