- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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
var BuildTemplate = ' \ | |
<h2 class="small-caps">build</h2> \ | |
'; | |
var BuildV = BaseV.extend({ | |
className: 'btn-group-vertical', | |
initialize: function(o){ | |
this.__player = o.player; |
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
import urllib2 | |
import re | |
import sys | |
from collections import defaultdict | |
from random import random | |
""" | |
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS | |
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE | |
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt" |
One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.
At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:
- Todo
- Question
- Thought
- Bug
- Feature
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
;; flengyel's solution to Game of Life | |
;; https://4clojure.com/problem/94 | |
(fn [board] | |
(letfn [ (remap [board] | |
(->> (for [v board] | |
(->> (map (fn [c] (if (= (str c) " ") 0 1)) v) | |
(apply vector))) | |
(apply vector))) | |
(unmap [matrix] |
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
;; flengyel's solution to Sum Some Set Subsets | |
;; https://4clojure.com/problem/131 | |
(fn [s & ss] | |
(letfn [ | |
(subsets [s] | |
(if (empty? s) | |
#{#{}} | |
(let [x (set (list (first s))) | |
dx (clojure.set/difference s x) |
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
;; flengyel's solution to Power Set | |
;; https://4clojure.com/problem/85 | |
(fn power [s] | |
(if (empty? s) | |
#{#{}} | |
(let [x (set (list (first s))) | |
dx (clojure.set/difference s x) | |
t (power dx)] | |
(clojure.set/union t |
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
;; flengyel's solution to Juxtaposition | |
;; https://4clojure.com/problem/59 | |
(fn [x & xs] | |
(fn [y & ys] (vec (for [f (vec (concat [x] xs))] (apply f (vec (concat [y] ys))))))) |
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
;; flengyel's solution to Sequs Horribilis | |
;; https://4clojure.com/problem/112 | |
(fn [n s] | |
(letfn [(sequs [n s] | |
(loop [acc 0 v [] s s] | |
(if (or (empty? s) (< n acc)) | |
[acc v] | |
(let [elt (first s)] | |
(if (vector? elt) |
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
;; flengyel's solution to Longest Increasing Sub-Seq | |
;; https://4clojure.com/problem/53 | |
(fn [v] | |
(let [[maybe n cur _] | |
(let [v1 (first v)] | |
(reduce | |
(fn | |
[[longest maxlen current prv] elt] | |
(if (>= prv elt) |
NewerOlder