2014-02-01ãã1ã¶æéã®è¨äºä¸è¦§
é¢é£ : Python2ã§CodeEvalã®Minimum Coins - brainstorm
CodeEvalé¡é¢ã1ã3ã5ã®ã³ã¤ã³ãããã¨ããã åè¡ã®æ°åã«ãªãã³ã¤ã³ã®çµã¿åããã®ãã¡ãã³ã¤ã³æ°ããã£ã¨ãå°ãªãã¦æ¸ãå ´åã®ææ°ãåºåããinput.txt 11 20output 3 4
é¢é£ : Python2ã§CodeEvalã®Overlapping Rectangle - brainstorm
CodeEval åè¡ã«8ã®æ°å¤ãä¸ããããã æåã®2ã¤ãä¸ã¤ç®ã®rectangleã®å·¦ä¸ã®åº§æ¨ã 次ã®2ã¤ã1ã¤ç®ã®rectangleã®å³ä¸ã®åº§æ¨ã æ®ãã®4ã¤ã¯åæ§ã«2ã¤ç®ã®rectangleã®å·¦ä¸ã¨å³ä¸ã®åº§æ¨ã2ã¤ã®rectangleã座æ¨ä¸ã§éè¤ãã¦ãããã©ãããTrue or Falseã§è¿ã â¦
é¢é£ : Python2ã§CodeEvalã®Cash Register - brainstorm
é¢é£ : Python2ã§CodeEvalã®The Major Element - brainstorm
ã«ã³ãåºåãã®æååã§ãåæ°ä»¥ä¸ãå ãã¦ããè¦ç´ ãåºåããã 該å½ããè¦ç´ ããªãå ´åãNoneãåºåãããinput 92,19,19,76,19,21,19,85,19,19,19,94,19,19,22,67,83,19,19,54,59,1,19,19 92,11,30,92,1,11,92,38,92,92,43,92,92,51,92,36,97,92,92,92,43â¦
FormWizardã使ã£ã¦å ¥å確èªç»é¢ãå®è£ ããã¨ããã®ãããããã¦ãææ¸ããã¨ã³ããªãè¦è¿ãã¦ããFormWizardã§ç¢ºèªç»é¢ã表示ãã - brainstorm FormWizardã§å ¥å確èªè¡¨ç¤ºã®ã¨ãã®formãããã¼ã«ããã¨ãããã® #forms.py class DummyFrom(forms.Form): pasâ¦
input 5;0,1,2,3,0 20;0,1,10,3,2,4,5,7,6,8,11,9,15,12,13,4,16,18,17,14output 0 4 é¢é£ : Goè¨èªã§CodeEvalã®Array Absurdity - brainstorm
input 5;0,1,2,3,0 20;0,1,10,3,2,4,5,7,6,8,11,9,15,12,13,4,16,18,17,14output 0 4
sindresorhus/pageresç°¡åã«ã¹ã¯ãªã¼ã³ã·ã§ãããæ®ãã ã¤ã³ã¹ãã¼ã« npm install --save pageres 使ãæ¹ è§£å度ãæå®ã§ãã $ pageres Specify at least one url Get screenshots of websites in different resolutions. Specify urls and screen resolutâ¦
ãã¶ãrubyã®rvmãpythonã®virtualenvã¿ãããªãã®ãmoovweb/gvm ã¤ã³ã¹ãã¼ã« $ bash < <(curl -s https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer) Created profile for existing install of Go at /usr/local/go Installed GVM v1.0â¦
ã3413289830 a-bcdefghijãã ã£ããã3-413289830ãè¨ç®ãã¦è§£ãåºåããinput 3413289830 a-bcdefghij 776 a+bc 12345 a+bcde 1232 ab+cdoutput -413289827 83 2346 44 é¢é£ : python 2ã§CodeEvalã®Splitted Number - brainstorm
ã3413289830 a-bcdefghijãã ã£ããã3-413289830ãè¨ç®ãã¦è§£ãåºåããinput 3413289830 a-bcdefghij 776 a+bc 12345 a+bcde 1232 ab+cdoutput -413289827 83 2346 44
ã¡ãã£ã¨åã«3.1ããªãªã¼ã¹ããã¦ããã®ã§ã使ã£ã¦ã¿ããPycharm Blogã«ããã¨ããããnew featureããããã©ãã¨ãã«Search EveryWhereããããããªã®ã§ã©ããããã®ã試ãã¦ã¿ããAnnouncement: PyCharm 3.1 has been released! | JetBrains PyCharm Blog â¦
LuRsT / hrmacã ã¨brewã§ã¤ã³ã¹ãã¼ã«ã§ããã brew install hr ã¯ã³ã©ã¤ãã¼ã§ä¼¼ããããªãã¨ãã§ãã printf "%`tput cols`s"|tr ' ' '#' ãã¨goã§ãæ¸ãã¦ã¿ããyuhei0718/gohr package main import ( "os" "syscall" "code.google.com/p/go.crypto/ssh/tâ¦
>>> User.objects.values_list('id') [(1L,), (2L,), (3L,)] flat=Trueã§ã >>> User.objects.values_list('id', flat=True) [1L, 2L, 3L] åããã¨ã¯ãªã¹ãå å 表è¨ã使ã£ã¦ã§ãããã©ãã¾ãã¡ >>> [u.id for u in User.objects.all()] [1L, 2L, 3L]
xargs redis-cli KEYS "pattern:*" | xargs redis-cli DEL
pythonã§[]ãä»£å ¥ããæ¸ãæ¹ãããã£ã¦ç¥ããªãã£ãã # coding=utf-8 l = [i for i in range(0, 10)] assert l == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # ç¯å²ãæå®ãã¦å¤ãåé¤ # del [2:4] l[2:4] = [] assert l == [0, 1, 4, 5, 6, 7, 8, 9] goã®ã¹ã©ã¤ã¹ã â¦
ubuntuãµã¼ãã§åããã¦ããmysqlãè½ã¡ã¦ãã ãããç«ã¡ä¸ãããªããã¨ã©ã¼ãã° $ cat /var/log/mysql/error.log 140208 21:11:32 [Note] Plugin 'FEDERATED' is disabled. 140208 21:11:32 InnoDB: Initializing buffer pool, size = 8.0M 140208 21:11:3â¦
# coding=utf-8 d = {'john': 22, 'ringo': 22, 'paul': 20, 'george': 19} # æé assert sorted(d.items(), key=lambda x: x[1]) \ == [('george', 19), ('paul', 20), ('ringo', 22), ('john', 22)] # éé assert sorted(d.items(), key=lambda x: x[1],â¦
redisã§twitterã®ã¿ã¤ã ã©ã¤ã³ã®ããã«æç³»åã§ãã¼ã¿ãä¿åãããã¨ãèãã¦ã¿ããæ°ãã追å ããããã¼ã¿ãå ã«åå¾ã§ããããã«ããå¿ è¦ãããããã¼ã¸ã³ã°ããã®ã«ãæå¾ã«è¿ãããã¼ã¿ã®ãã¸ã·ã§ã³ã¯åå¾ã§ããããã¼ã¿ãã®ãã®ã渡ãããã¨ä»®å®ãã¤ã¾â¦
3å¹´ãããåã«ãã¼ã«ã«ã§ä½¿ãããã«ä½ã£ãRailsã¢ããªãåãããã¨ãã¦ãbundle installããããsqlite3-rubyã ãã¤ã³ã¹ãã¼ã«ã§ããªããè¦è¦ããããã¨ã©ã¼ã gem install sqlite3-ruby Building native extensions. This could take a while... ERROR: Errâ¦
æè¨å®ãã¦ãè¨æ¶ããããã ãã©ãã©ããã§ç°å¢ä½ããªãããã¨ããããããã©ã«ãã®é度ã«ãªã£ã¦ããããããä»æ¥ã¯åçªã«ãããããªããã«ã¼ã½ã«ã®é·ç§»é ãã¦ã¤ã©ã¤ã©ãããã¨æã£ãã®ã ãã©ãæ £ãã¨ããã®ã¯æããããã®ã§ãããã¨é·ãéé ãã«ã¼ã½ã«ã¨ä»â¦
Pycharmã®External Toolsã«ããã£ã¬ã¯ããªãã¨flake8ã®ãã§ãã¯ãããããã¼ã«ãè¨å®ããã¦ãããã ãã©ãsouthã®migrationsãã¡ã¤ã«ãã²ã£ãããã®ãã¤ãã¤ãã ã£ããexcludeè¨å®ãã§ããªãã¯ãã¯ãªããã ããæ©ãè¨å®ããã°ããã£ãã
rakyll/coop goroutineã¨channelã使ã£ã並è¡å¦çãããããããæ¸ãããããªæã3ç§å¾ã«é¢æ°ãå®è¡ // æå®ããæå»ã«é¢æ°ãå®è¡ done := coop.At(time.Now().Add(time.Second*3), func() { fmt.Println("Hello, world") }) <- done 1åå¾ã¾ã§ã3ç§ãã¨ã«é¢â¦
ã¡ãã£ã¨è§¦ã£ã¦ã¿ããã©é¢ç½ãã£ããCodeShare.io ã¢ã¯ã»ã¹ããã¨ä¸æãªãã¹ãå²ãæ¯ããã¦ããã¼ã¸ä¸ã«ã¨ãã£ã¿ã表示ããããä¸æãªURLãã·ã§ã¢ãããç¸æã«ä¼ãã¦éãã¦ãããã¨ãåãã¨ãã£ã¿ããªã¢ã«ã¿ã¤ã ã§é²è¦§ãç·¨éã§ããã試ãã¦ãªããã©ããããªâ¦