Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Over the last 3 years or so I've helped a bunch of companies, small and large, switch to Django. As part of that, I've done a lot of teaching Django (and Python) to people new to the platform (and language). I'd estimate I've trained something around 200-250 people so far. These aren't people new to programming — indeed, almost all of them are were currently employed as software developers — but they were new to Python, or to Django, or to web development, or all three.
In doing so, I've observed some patterns about what works and what doesn't. Many (most) of the failings have been my own pedagogical failings, but as I've honed my coursework and my skill I'm seeing, time and again, certain ways that Django makes itself difficult to certain groups of users.
This document is my attempt at organizing some notes around what ways different groups struggle. It's not particularly actionable — I'm not making any arguments about what Django should or shouldn't do (at least
var async = require('async'); | |
exports.bfs = function bfs(start, moves, goal, done) { | |
goal(start, function(err, res) { | |
if (res) done(null, [start]); | |
else explore([start], 1); | |
}); | |
var depth = 0; | |
var foundGoal = null; | |
var visited = {}; |
This article contains some basic condensed knowledge about food.
Water - your metabolism needs it. Have a full hand-held bottle nearby at all times. Drink liberally - most estimates of recommended amount fall between 3-5 liters per day (a lot more than what you will usually drink).
Infact, forget all other drinks, especially soft drinks and artificial juices. Most of them are sugary and will become fat minutes after you drink them. Replace them all with water.
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
library(twitteR) | |
library(ggplot2) | |
tweets <- list() | |
dates <- paste("2012-07-",11:18,sep="") # need to go to 18th to catch tweets from 17th | |
for (i in 2:length(dates)) { | |
print(paste(dates[i-1], dates[i])) | |
tweets <- c(tweets, searchTwitter("#ISMB", since=dates[i-1], until=dates[i], n=1500)) | |
} |
#!/bin/bash | |
MEM=1024 | |
LAN=eth0 | |
BRIDGE=virtbr | |
ARCH=x86_64 # i386 | |
#BIOS="-bios OVMF.fd" # to emulate an UEFI netboot | |
# supported wifi interfaces can be bridged if you set 4addr mode first: | |
# iw dev $LAN set 4addr on |
#include <OneWire.h> | |
#include <LiquidCrystal.h> | |
// For every sensor found it outputs to serial: | |
// SensorID,CurrentTemp,Readout time,Current time | |
// Info at: http://wiki.spodeli.org/Хаклаб/Температура | |
OneWire ds(12); // on pin 12 | |
LiquidCrystal lcd(6, 7, 8, 9, 10, 11); |
#include <sys/capability.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define nitems(x) (sizeof(x) / sizeof(x[0])) | |
int | |
main(void) { |