2013-09-01ãã1ã¶æéã®è¨äºä¸è¦§
åã«ãã£ã¦ãæ°ããããã ãã©ãã¨ã£ãã«ã§ã¦ããªãã£ãã®ã§ã°ã°ã£ã¦èª¿ã¹ã¦ãã How do you split a list into evenly sized chunks in Python? - Stack Overflow # coding=utf-8 def chunks(l, n): """ Yield successive n-sized chunks from l. """ for i â¦
æ¨æ¥ã¡ãã£ã¨è©¦ããcsvkitãããå°ã触ã£ã¦ã¿ã csvãã¡ã¤ã«ãjsonå½¢å¼ã«å¤æãã ä¾ãã°ãããªcsvãã¡ã¤ã«ã $ head japan_pref_population.csv pref,people,size,population æç¥ç,"7,425,952","5,165.12","1,437.71" æåªç,"1,414,996","5,678.33",249.â¦
csvãã¡ã¤ã«ãæ±ãããã®ã³ãã³ãã©ã¤ã³ãã¼ã«ãéããã©ã¤ãã©ãªãpython製ãcsvkit 0.6.2 (beta) â csvkit 0.6.2 (beta) documentationãããã試ãã¦ã¿ããã¾ãcsvãã¡ã¤ã«ãç¨æã 以ä¸ã®ãµã¤ãããã¬ã³ã大éªã®å¹´é試åã¹ã±ã¸ã¥ã¼ã«ãcsvãã¡ã¤ã«ã§DLãâ¦
Django Vanilla Views - Beautifully simple class based views Djangoã®Class-Based-Viewã¯ç¶æ¿é¢ä¿ãè¤éã§ãã¡ãã£ã¨ã½ã¼ã¹ãè¦ã¦ããã¯ãã¤ã³ãã確èªãããã£ã¦ããã¨ãã«çµæ§ããã©ããããDjango Vanilla Viewsã¯æ©è½ã¯ãã®ã¾ã¾ã§å®è£ ãã·ã³ãã«ã«ãâ¦
ã¡ãã£ã¨åã«bufioã使ã£ããã¡ã¤ã«ã³ãã¼ã®ãµã³ãã«ãæ¸ãããã©ããæ®æ®µæ £ãã¦ãpythonã¨æ¯ã¹ã¦é¢åã ãªã¨æã£ããã©ãioutilã¨ãã便å©ããã±ã¼ã¸ããã£ã¦ããã¡ãã使ãã¨æ¥½ã ã£ãã package main import ( "flag" "io/ioutil" ) func main() { flag.Parâ¦
ãã®éãGoã§ãã¡ã¤ã«ãèªã¿æ¸ããããµã³ãã«ãæ¸ãã¦ã¿ããã©ãããããã°Closeã¨ãä½ããã¦ãªãã£ãã 調ã¹ã¦ã¿ãã¨Fileãªãã¸ã§ã¯ãã«Closeã¡ã½ããããã£ã¦ãdeferã§å¼ã¶ã¨é¢æ°ã®ä¸çªæå¾ã«å®è¡ãã¦ãããããããEffective Go - The Go Programming Lanâ¦
æ¨æ¥ã®å»¶é·ã§ãcsvãã¡ã¤ã«ã®èªã¿æ¸ãã試ãã¦ã¿ãã encoding/csvããã±ã¼ã¸ã使ãã 以ä¸ã¯csvãã¡ã¤ã«ãèªã¿è¾¼ãã§tsvã«ãã¦åºåãããµã³ãã« package main import ( "encoding/csv" "flag" "io" "os" ) func main() { flag.Parse() var reader *csv.Readâ¦
ãã¡ã¤ã«ã®ãªã¼ãã³ãèªã¿åºããæ¸ãåºããããã®åå¼·ã®ããã«ãµã³ãã«æ¸ãã¦ã¿ãã å¼æ°1ã§æ¸¡ããããã¡ã¤ã«åã§ãã¡ã¤ã«ããªã¼ãã³ããï¼è¡ãã¤èªã¿ã ãã¦ãå¼æ°2ã®ãã¡ã¤ã«åã«æ¸ãåºãã¦ãã ãã ã¨ã©ã¼ã¯ã»ã¨ãã©ç¡è¦ã§ãEOFã ãã¯ãã§ãã¯ãã¦ããã pâ¦
Goã§ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ãæ±ãå ´åã¯flagããã±ã¼ã¸ã使ãã 以ä¸ã¯echoã®ä¾ package main import ( "flag" "fmt" ) var ( nflag = flag.Bool("n", false, "print the trailing newline character") ) func main() { flag.Parse() var s string = "" fâ¦
go製ã®jsonãcsvã«å¤æããã³ãã³ãã©ã¤ã³ãã¼ã«jehiah/json2csv ã¤ã³ã¹ãã¼ã« go get github.com/jehiah/json2csv 使ãæ¹ $ json2csv --help Usage of json2csv: -i="": /path/to/input.json (optional; default is stdin) -k=[]: fields to output -o="": â¦
ã¡ãã£ã¨ãã¤ãã試ãã¦ã¾ãããã sqlãçç¥ããªã ããã©ã«ãã ã¨ãã°ã«åºåãããsqlã¯ã«ã©ã ãçç¥ããã¾ãã以ä¸ã®è¨å®ã追å ãããã¨ã§çç¥ãããªããªãã¾ãã DEVSERVER_TRUNCATE_SQL = False ajaxã¬ã¹ãã³ã¹ããã°åºåãã AjaxDumpModuleã追å DEVâ¦
æ¸ãã®ãé ããªãã¾ãããã9/17ã«éå¬ããã大éªGoåå¼·ä¼ã«åå ããã¦ãããã¾ããã第1å 大éªGoåå¼·ä¼ on Zusaarè³æã¯ãã¡ã https://github.com/todoa2c/hango/blob/master/vol01.mdã°ã©ã³ããã³ããã§ãããã¦è¾¿ãçããæ°ãããªãã£ãã®ã§æåããåâ¦
djangoæ¨æºã®runserverãç½®ãæãã¦ãéçºæã«ä¾¿å©ãªæ©è½ã使ããããã«ãããã®ããããdjango-devserver 0.6.2 : Python Package Index ã¤ã³ã¹ãã¼ã« pip install git+git://github.com/dcramer/django-devserver#egg=django-devserver è¨å®ãINSTALLED_APâ¦
mockã使ã£ã¦ãã¹ãæ¸ãã¦ã¦ããé¢æ°ãå®è¡ããããã¨ãããã¹ãããã®ã«ãassert_called_withã¨ãassert_called_once_withã¨ãããããç¨æããã¦ãã¦ä¾¿å©ã ã£ãã§ããé¢æ°ãå®è¡ãããªãã£ããã¨ãããã¹ãããã®ã¯ã©ãããã®ãã¨æã£ã¦èª¿ã¹ããä¾ãã°ããâ¦
ãããªWarningãåºã¦ãã®ã§èª¿ã¹ãã DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-â¦
jsonãè¿ããããªAPIã®ãã¹ããã©ã¼ã ãä½ãã¨ãã«ä¾¿å©ããjson.human.js - Json Formatting for Human Beings
æè¿emacsãã¤ã³ã¹ãã¼ã«ãç´ãããã.emacs.dãä½ãç´ããããã¦ãã®ã§ãã¤ãã§ã«ä»ã¾ã§ä½¿ã£ã¦ãªãæ©è½ãã¡ããã¨è¨å®ãã¦ä½¿ã£ã¦ãããã¨èãä¸ã ä»æ¥ã¯åå¨ã¯ç¥ã£ã¦ããã©ãç¹ã«ä½¿ã£ã¦ãªãã£ãanything-resumeã使ãããã«ãã¦ã¿ãã anythingã®ã»ãã·ã§â¦
ããããã¸ã§ã¯ãã§ãã¹ãå®è¡ããã以ä¸ã®ãããªwarningãåºã¦ãã®ã§ãçºçç®æã調ã¹ã UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if aBuf[:len(chunk)] == chunk:ã½â¦
以ä¸ã®ã¨ã³ããªã§åãã¦ç¥ã£ã5 Unix Commands I Wish I'd Discovered Years EarlierSpotlightã®ã¤ã³ããã¹ã使ã£ã¦é«éã«æ¤ç´¢ãããã¨ãã§ããåè :Macã®ã¿ã¼ããã«ãããã¡ã¤ã«ãé«éã«æ¤ç´¢åè :Spotlightãç°¡åã«è¦ã¤ããããªããã¡ã¤ã«ãçºè¦ããæ¹æ³ â¦
ãããã¨ãªãã¤ã³ããããã®ã§ã3.0 EAPã使ã£ã¦ã¿ããã¨ã«ãããããããããã¨ããã§ãPython Consoleã§variablesãè¦ããããã«ãªã£ã¦ããå½ç¶Django Consoleã§ã使ããã ä»ã«ãããããæ©è½ããããããã©ã調ã¹ã¦ãªããPyCharm 3.0 EAP build 131.91 aâ¦
favico.js - Make a use of your favicon é¢ç½ãã+1ãã¿ã³ãæ¼ãã¨ãfaviconã«ã¤ããããã¸ã®æ°å¤ãã¢ãã¡ã¼ã·ã§ã³ä»ãã§ä¸ãã£ã¦ããã 9ãè¶ ããã¨9+ã«ãªããPlay Videoãæ¼ãã¨ãfaviconãåç»ã«ãªããé³ãé³´ãã®ã§æ³¨æãsafariã ã¨åããªããªã模æ§ã
軽ãããã£ã¦ã¿ã¦é°å²æ°ãã¿ã¦ã¿ãfactory_boy â Factory Boy 2.1.2 documentation rbarrois/factory_boy ã¤ã³ã¹ãã¼ã« $ pip install factory_boyãããªã¨ã©ã¼ãã§ããã©ãpip install -U setuptoolsãã¦ãªãã©ã¤ãããæåãã pkg_resources.VersionConflâ¦
toggle-frame-fullscreenã§å ¨ç»é¢ã«ã§ããªãã£ãã®ã§ã調ã¹ãã¨ããHEADããã¤ã³ã¹ãã¼ã«ããªãã¨ã ãã ã£ããHEADããå ¥ããªãã brew install emacs --cocoa --HEAD --use-git-headããªãæéãããã£ãã ãã¨ã¯ãã®è¨å®ãããããå ¨ç»é¢è¡¨ç¤ºã§ããããã«â¦
åã¯ã½ã¼ã¹ã«ãããå½ã¦ã¦ãã«ããã¦ã£ã¦ãã£ã¦ãè¨æ¶ããããã©ãbrewã§å ¥ãã¦ã¿ãã æ¥æ¬èªã¯å ¥åã§ããããå³ä¸ã®å ¨ç»é¢ã¢ã¤ã³ã³ãã¡ããã¨å¹ããã $ brew install emacs --cocoa ==> Downloading http://ftpmirror.gnu.org/emacs/emacs-24.3.tar.gz Alrâ¦
dict_a.update(dict_b)ã ã¨ãdict_aã®å¤ãdict_bã®å¤ã§ä¸æ¸ããã¦ãã¾ãã®ã§ãä¸æ¸ãããªãã§ãã¼ã¸ããæ¹æ³ã調ã¹ã¦ãã # coding=utf-8 DEFAULT_OPTIONS = {'foo': 1, 'bar': 2} def sample_method(options=None): if not options: options = {} # å ¥åå¤â¦
function greet (){ console.log('I am ' + this.name)} // çºè¡è ãä½æ var publisher = _.extend({name: 'publisher'}, Backbone.Events); // è³¼èªè ãä½æ var observer = _.extend({name: 'observer'}, Backbone.Events); // çºè¡è ã«greetã¤ãã³ããçºâ¦
explainshell.com - match command-line arguments to their help text éçºæãããã¥ã¡ã³ãã¨ãwikiã«ãªã«ãã®æç¶ãã®ã·ã§ã«ã³ãã³ããè²¼ãã¤ãã¦ãã£ã¦ãæå³ã解ããªãã£ãããã©å¿ãããå ´åã¯ããã§ã¿ãã¨ãããããä¾ ssh -i keyfile -f -N -L 1234:â¦
ãã¼ã ãã£ã¬ã¯ããªã«ãGoogle ãã©ã¤ããã¨ããååã§ãã£ã¬ã¯ããªãä½ããã¦ããã®ã§ãGoogleDriveã«å¤ãããã£ã è¨å®ã«ã¯é ç®ããªããã¡ãã£ã¨èª¿ã¹ããã©è¦ã¤ããããçµå±ä»¥ä¸ã®æé ã§ç¡çããå¤ãããã¨ãã§ããã1. Google ãã©ã¤ããçµäº 2. ãã£ã¬ã¯â¦
golangã®pluginããã¦ãgoã®ã½ã¼ã¹éãã¦ã¿ããDarculaã ã¨ããªãè¦ã¥ããã£ãã®ã§ãããããå¤ãã¦ã¿ããå¤æ´å å¤æ´å¾ è¨å®ã¯settings->Editor -> Colors & Fonts -> Google Goã§è¡ã
ã¯ã¬ã«ã¯ããã¨æåã ãã©ãã¨ã£ãã«ã§ã¦ããªãã®ã§ã¡ã¢ãã¦ããæ¥æ¬ã®å ¨ã¨ã³ã¸ãã¢ã«æ§ãï¼ç¾å¨å ¬éããã¦ãããã¹ãç¨ããã¼ãã¼ã¿ä¸è¦§ | Find Job ! Startup