text:
Random passwords vs Common passwords
On Github, there is a list of the 10,000 most common passwords.  I've also generated my own list of random passwords.
Your job is to identify the difference between the two lists (with 100% accuracy).
Therefore, your program needs to accept a string, and return:

A truthy value if the password is on the common passwords list
A falsy value if the password is on the random passwords list
Anything you'd like if the password isn't on either

For those that are interested, my program generates passwords between 5-10 characters in length, and each character is either a lowercase letter or a digit.
Note: You should not use these passwords in anything secure. My generation algorithm is not secure at all, and the results are posted online for all to see

You've put the tag [tag:regular-expression] but this doesn't seem to be necessary for the challenge? Did you intend for it to be?

@FryAmTheEggman I'm assuming most answers are going to be regex, so I added it for those that are interested in such challenges.

I'm slightly confused ... what's to prevent a short PowerShell like $args[0]-in(gc .\10k-passwords.txt)? Are we to come up with some sort of pattern that recognizes the one but not the other?

@TimmyD if you use other files, then the byte count of those files are included in your score.

CJam, 2262 908 620 512 503 bytes
0000000: 6c3a4c412c73277b2c39373e2b3a422d2c4c4c65752e3d65  l:LA,s'{,97>+:B-,LLeu.=e
0000018: 602c33653c5f333d5c5b513222011523a1d079937afebb7b  `,3e<_3=\[Q2"..#..y.z..{
0000030: 31a4ddf41a5e5038ef2aced9debeac5dc01fc4d27d809e0a  1....^P8.*.....]....}...
0000048: 2631e25b9e7d3314f1438f227b3235366233366242663d2f  &1.[.}3..C."{256b36bBf=/
0000060: 2b7d3a447e332205a4f76b4584be674d02001a36a250f949  +}:D~3"...kE..gM...6.P.I
0000078: 7bd0f1966deff2baab26a259813a0caa266155328064f0ee  {...m....&.Y.:..&aU2.d..
0000090: 20245dfab515c8faf39b08e80880c6e06c51728c57c153ec   $].............lQr.W.S.
00000a8: 9907a8365894bb8163bacd3a67173b50641c928f3ca87e89  ...6X...c..:g.;Pd...<.~.
00000c0: 81c1e95e5f049b61688fc7316e6a639876d00cdf4c01a100  ...^_..ah..1njc.v...L...
00000d8: 998bd12ccf3fb8ca61c89f5a57cedf8170b4b062653d947e  ...,.?..a..ZW...p..be=.~
00000f0: 9f6d5ba729db151b79151ae044cd6416274c73110e777172  .m[.)...y...D.d.'Ls..wqr
0000108: 22445132220133e9dcda9e224435224dc7621a0ae9224433  "DQ2".3...."D5"M.b..."D3
0000120: 220980cb1f885db429b742f47062cc1190767d82e6e956b7  ".....].).B.pb...v}...V.
0000138: 1de25dd9c2be7bf5224451322201c9167dd15a8c8cdd110f  ..]...{."DQ2"...}.Z.....
0000150: e956678cd6467ed95c22d7700c1d37a5b1ad94d3b3a3531e  .Vg..F~.\".p..7.......S.
0000168: 639ba99f27cde7e9c81c686adb874d6d5ac411d8d5e44363  c...'.....hj..MmZ.....Cc
0000180: deff8759ed48c97a32b5eeed5ef23be112773a0e0454e6a5  ...Y.H.z2...^.;..w:..T..
0000198: d064d43adf998c7050910c723616dccb5874a8b3640e39e0  .d.:...pP..r6...Xt..d.9.
00001b0: b7545841c7b3152d13ab3e83857530313cb737c799837a4b  .TXA...-..>..u01<.7...zK
00001c8: 396a39e68c9722443322d87648012832adde4e33e27615e2  9j9..."D3".vH.(2..N3.v..
00001e0: 4b6bf7e94bec9022445d3d7b4c5c23297d253a2b215e7c    Kk..K.."D]={L\#)}%:+!^|

This prints a positive integer for common passwords and zero for others.
Verification
$ xxd -c 24 -g 24 testall.cjam
0000000: 714e257b3a4c412c73277b2c39373e2b3a422d2c4c4c6575  qN%{:LA,s'{,97>+:B-,LLeu
0000018: 2e3d65602c33653c5f333d5c5b513222011523a1d079937a  .=e`,3e<_3=\[Q2"..#..y.z
0000030: febb7b31a4ddf41a5e5038ef2aced9debeac5dc01fc4d27d  ..{1....^P8.*.....]....}
0000048: 809e0a2631e25b9e7d3314f1438f227b3235366233366242  ...&1.[.}3..C."{256b36bB
0000060: 663d2f2b7d3a447e332205a4f76b4584be674d02001a36a2  f=/+}:D~3"...kE..gM...6.
0000078: 50f9497bd0f1966deff2baab26a259813a0caa2661553280  P.I{...m....&.Y.:..&aU2.
0000090: 64f0ee20245dfab515c8faf39b08e80880c6e06c51728c57  d.. $].............lQr.W
00000a8: c153ec9907a8365894bb8163bacd3a67173b50641c928f3c  .S....6X...c..:g.;Pd...<
00000c0: a87e8981c1e95e5f049b61688fc7316e6a639876d00cdf4c  .~....^_..ah..1njc.v...L
00000d8: 01a100998bd12ccf3fb8ca61c89f5a57cedf8170b4b06265  ......,.?..a..ZW...p..be
00000f0: 3d947e9f6d5ba729db151b79151ae044cd6416274c73110e  =.~.m[.)...y...D.d.'Ls..
0000108: 77717222445132220133e9dcda9e224435224dc7621a0ae9  wqr"DQ2".3...."D5"M.b...
0000120: 224433220980cb1f885db429b742f47062cc1190767d82e6  "D3".....].).B.pb...v}..
0000138: e956b71de25dd9c2be7bf5224451322201c9167dd15a8c8c  .V...]...{."DQ2"...}.Z..
0000150: dd110fe956678cd6467ed95c22d7700c1d37a5b1ad94d3b3  ....Vg..F~.\".p..7......
0000168: a3531e639ba99f27cde7e9c81c686adb874d6d5ac411d8d5  .S.c...'.....hj..MmZ....
0000180: e44363deff8759ed48c97a32b5eeed5ef23be112773a0e04  .Cc...Y.H.z2...^.;..w:..
0000198: 54e6a5d064d43adf998c7050910c723616dccb5874a8b364  T...d.:...pP..r6...Xt..d
00001b0: 0e39e0b7545841c7b3152d13ab3e83857530313cb737c799  .9..TXA...-..>..u01<.7..
00001c8: 837a4b396a39e68c9722443322d87648012832adde4e33e2  .zK9j9..."D3".vH.(2..N3.
00001e0: 7615e24b6bf7e94bec9022445d3d7b4c5c23297d253a2b21  v..Kk..K.."D]={L\#)}%:+!
00001f8: 5e7c7d2524656070                                  ^|}%$e`p
$ echo $LANG
en_US
$ cjam testall.cjam < 10k-common-passwords.txt
[[9989 1] [4 2] [2 3] [3 5] [2 7]]
$ cjam testall.cjam < generated_passwords.txt
[[1000 0]]

Whatever it is, I like it. +1

Would you mind explaining roughly what the thinking is behind this?

@ASimmons After filtering non-alphanumeric passwords, I'm counting the number of groups of letters or digits. If there are two or less, it's probably common; if there are three or more, it's probably random. That misclassifies over 300 passwords, which are hardcoded in the unprintable strings. I'll provide a detailed explanation once I'm satisfied with my score.

Python, 719 664 bytes
import re
lambda s:re.search(r"(?!.*([xvonkj]0|p[9q5]|i2|q[4rt]|xk|m8|jp|jg|4k|2n|0b|y.[xj7]|mnw|c.3|7.2|4wu|061|zt[ub]|r6[d8]|o.0|jd[be]|j[wz]o|hk[cj]|^(wb|wd|v3|ub|s2|s1|pb|ml|j5|hv|h1|g8|g6|ft|f4|94|0t)|(we|ha|93|80)4|(xj|x5|03|qa|fz|w)9|3[65]0|zbx|(w.|v|o.?|54)7|[th]82|ssg|g(lc|ij|v|1[34]|bx|bk)|wvf|uax|mss|uhl|306|4.[mr]|9p|rob$))^.*((^([14]?\D+|\D*\d+|\d{3}\D{5}|(?=^\D*\d\D*$).{6}|\D+4\D+|[1-4a-eqwr]+)|sx|[ekru]s|t4u|zx|[avy]y|x[prs]|w[mp2]|uz|tp|tn|sc|qq|qj|p[mov]|r[deq]|oo|n[4tu]|me|k[23c]|jf|[2ag]t|ed|bq|a1|3r|5g)$|\W|123|^(nc|tr|w0|sa|rj|q[bnqu]|ni|mo|mw|le|kc|ib|hz|g9|f0|cb|b9|8d|7k|6u|5w|3m|1q)|z.g|bo|em|x35|t.d|p.o|p39|mar|ki4|id8|ebk|53x)",s)

I'm having a bit of trouble testing this in Retina, so here's Python for now. Test by giving the lambda a name and running it on the word lists:
>>> len([x for x in common if f(x)])
10000
>>> len([x for x in generated if f(x)])
0

It's a very large regex, so I'm taking a break from golfing it for a bit.

Compressing this might actually be better than switching to Retina, but I'm having trouble getting the compression working.

Bash - 5324 bytes
gunzip -c rp.gz|grep $1|wc -l

where rp.gz is located at http://dl.tyzoid.com/rp.gz
This returns 1 if on the random list. This is falsy, as bash evalutes 0 as a truty value.

Rename rp.gz to a 1-byte filename to save 4 bytes...

@Doorknob: And save, what? .08%? Seems like a micro-optimization where the solution itself is clunky at best.

xz seems better for this use case. Smaller command and higher compression ratio afaik.

No need for separate gunzip and grep, also no need for wc: zgrep -c $1 rp.gz. Also micro-optimiztion, but xz compresses insignificantly better. By the way, wouldn't be better to use -x (--line-regexp) or -w (--word-regexp) to not match word fragments?

Something like sort rpass.txt | 7z -si -mx=9 a r.gz should give you a shave off of about 480 bytes ...

Haskell, 8047 bytes
main=interact$show.flip notElem(words"viy130k57 d69z0 iz7q4d u26q3h 4mr6bhwa4 d36p5d 83554s 70r310py dz3js3 i1w86i0 2c4bk9 26w4kg52 u8i1g22ge 86k4br 875orut1 kw5786758 4k87v nfi5f2h9 x303978 43r4qb 963lnbs h5c1vq6s2 0iyv53vr2 nf5tmbp8 31ieq5xlh 9b450m ohv69d 5297m29 jvsxd20k fuha432 o8i84sh mss63 56vl8kzv8 73hh251 zr3r3zph 5f195v3kq 4o224g8 yi3y1lgi7 5ihcc t1krtr8w6 g7x9cuv4 128ov7 10adfe9 1p3lw 2523v xpj3h6z w2546kzx5 4042nle 0vv7i7ng xxzmf5vl efh601zby 19i0o63 8l20191 xm7e96pl 691p7m3p2 ksx29c2q3 auhli 7jq5e9e 786wo1q 1gwiaj7y8 3r19f26 x2nnr7 3u235s 076zr95m xzr32d 0lo70 v6o391 72pm08fo 79p1v9 uw98b 9mh7q3 2mh6bz a4qqw8d zve8z 790gkwc t975y 7d206t06 0zkvd9q0e y0cb34 9tltcs41w 079bp2y lwk12f 58gz4p 7lrkl io89he175 49dcu m2qg1 1ic76l kt9k9525i 6jwd8 4m9xwe86 3212janr r694ax 2raflx7s s26km575 n0z3hsdhj 9zl3x5 88c96968n 1lbw1v 20kri 799934a91 6c51846 61o78mjun 3d1yn 13113u8ev z22n5ni 0jxuc 79zwnl3tx xv4h4kz7 001n9 2u0f2 8msf6t g83r6v 81j4tt5e 20ucmaf j576783 v64ar 3u16pj83p r817zu6d xgc63 4y1rpo0 031606p 43q08m3x 1sg237d1n dt85c vg30a u4ge5t 4bv27l432 0612939 8glq6zo g64m0r4 593erv6 962a24u 94rop d28fs6k xy78efw3 yd0kyj1 y02rl 3n21q esg5y9m9 8408qpscw 5lapn9k26 4x1k27 7mb8054 4s1x7olv5 10s7726 00eib 84pu58e6 505l3s6 ldgx9e7d hv4d6u56s 5ren77w uf6pmf2 0sfum 1ik8mx vzqtj77 cvjc1ta us90844jb 84r0d4td plab52n 7946vj4l7 qy5gjtr 49lpq 4w49fm 44y0rh472 07jt8 1tju72 q0733u1 375ojd0 1t28s9ag1 ppj60t704 wi67b877 jgrrh388 ftvu98 h214l3x 3nirvrdu mrg14 52s65y 9f587 2629v os80p7 3h89mqk xt5845q9m 68h53w 8b3309g 16967k 38356nk 34oyt he3v5vn2 m1g2c8 8n324x6 2by0e7x 1a4mit7 ge91p60y b170o 9v5rys 6wq3959ue ed9u3 kd4wy1 c853gz k56gel09h 789ygx5pk 1f9f2 84fxtdx d02fdz9i 6gj4i4 6p8jtsax 3v38hkcs2 80090i 8084xb4m c4xv4x79 pilbux017 9m193zg5 qwq5o6x5 90cw69n96 n237351i cm40sj1x 3727d9p q0x74ityn 3ez6679 t7vs045 r7jg22xyr 3z34a96 miu8lm62 cpzjf226u vb2545x 4f9qg7sdq 2rf6t kq0ixi32n rjdeuj g8x5p3 d776c 4x1385 830nug s1tysl o679090 93kgz18 91pu8l n05i73 mdmq4c 31her5 6r10e0il i02np063 75jf619gg 1cft96o9 9j9x4g 12to97 5z6o922 2z1mtcg 3ea7l4 12h2gl0 bl12h638 k1sd9a4y v06po5yn 3ac6le459 0f1ljw ctkjzo4 u9k5rzx82 pa5d2om 32c4713q2 1bp33y 9384p7 v12i1aqp7 nb2w98 76ss0 24cy672 lasprob p1y3g4 ssekkgij 8x1o4 n1rgsm51d 2f73n9t 7gq430y 7lu476llc l8y3oa yjjb67d8 9n01v95gy w7792 061d339f xj989 v3tm27h rqytegr1c qoe96g o81680pg 563bmt680 s2lx9qc14 wpd4o1jb x67a06h83 ll508m 13067 m6578u vn64b 8zm25nd v0ny28346 nh5etpuub 6sl8acai 3hbd5 94103 981by1ri n4k4jzi m5704w7lt a6x3f 9chs9 ivk55n 14j50d 77p684h nt569aek br6yv97 iso7qi 7h1eh 0801fwq 54en7 8celizu j4c1i1409 9di5p1 to3re10m1 t1v246wkb 1n0l9r9 x46l2vwbp m4st1un7u 5apkz94 z9lp3i 3754cl r67up 446exk983 40n6454sf b6y1z1uf b8ca9w0je n9ga6 06156 3n551 71860lr sh9n3 zo6x54 5qwx9 6p2ko1d lzafd6a esv073963 871fu3 64wd2 68j49k4q 3s6b901 3k6x0 3br349yx2 2ev963aa op5t394ig jdbh9 sk364u8 u25m3s0r1 1050ln80w 322ggt12 7xq6z75 279q2 oxys3id7 c78v2 7jfjk1 8aq82y4b 0f43100 4afw4ck p88s6h0k azuaxn q128b 7y0ewmp ikpgn519d 54zq981 18chi4u 5xski3b ztb242 8199b0 886f7 lytj1 d52kr nv060 68tdhr01 0nky3o r9y6g fn24cg3 2i585fw0 c5oj4 d8220hbh rtjwom45 x8ws8 l0vk6945 140jsy6 cx70q6vc s26536 3un5314 koxd24tgw khpz47o 8h0wcv10m dc33280 14i9770 cnj67sv n142iu 3yysx7e6d k5g38u4 7vs103i5 21o1tmi bz7di 4u3m7y2m5 407z8ln9o 3dvz58 372fz3lhq lc8g15yp p9f6lq 5zaz5n5y f4j25y46 s369474nb 6qtfog8 x69wy42 ma2b56i34 e2tv3 jqp515 agbkd95 x3h7kqa0 v27rnd 14zo577s im809s n8pr1y3 o6w6u915z 4v1566be 1k8v4 ie2t65f yoci2 43f3741pr 1iihw59 99k77378o 081sgssg 8e472q 86ui90 9154298yg 03azelrv it3500 8p52k hc5tj my7ok34u9 4k2l9 svys9nx3s 6jc7b54 4wuhh ehkc19 7m242 1p5255e20 7uj997 8gsxl 4m4l4 u0057w 698u0vd8 1pbh99 g30zxku dvj20a7a uyt82 3nhy7i794 98aps9z f9zhx9i5 k686or3 2pc8fo086 f12p2r5y4 gg133 7d7moa92 6787230in ro8113t5 sk01s6ua y219c2679 4p2j48u tww6708 8g0ze8kxh ox2up4c06 acyflgv r2cf66p 51hgd6biq cepo0k5 3gkz3 so47e745 d1550k5 084h64t n5402i a2354hgu 1969f31xc 4ug5te 88av1 psaao7r r73zl z0dupumi 8o3ln n1k76r 3yj1i14 7ea10s8ny ek468v2 07sqhdn pc52r 3q01f1 dhku90f 1wqu1pitk 4xq2d se6v9du e99e82qt 0094y96 36cjds546 2ga756498 63w66053i 76pe39 5j9645gq ld8l156 m0bcb9hj 32kuy b751a8e25 02v61 j4zf5q6 80x964nyd 52ij7 u26vv r718r2d 09czm6116 1bd9a 12t874q5b 7i4ro i07mwc7g5 i4jug5y6 0srfbc0g9 l7j853e p0bcges6 46g56mn c6p6g38v7 5rr875 atpqnbl w177s30 e4pm1d117 y79mt10c 7xa2l69 nw7rrm4z8 36te6593 6r1x9z xai3b 4t6r0uz87 9m568v573 u40y29157 vvl2t4 f1kc0m wp56h1qkm 3xq8ivnr3 535i062 69m2kwb1 d4w2ze 1wjqh0 pb948 w9874d j5oo220d 28hro vx873f55x 5n2q70f 74358tngl 038048 662b16s i0psi7chi 3e98l80d5 hu7rwtl 3j7igy914 0v98t 9s17y8t 61g71jq6 375h1d icx59 plyp2n nm26m22c 3k2028 n13j9l9gh 1sy2a 76f4f glcn1 h3z12 0ctw14 ws2qr p97658 ann1oe63 67i2c5sp 5c6yu 894g7 kl8i8 kqlr6d 29w3z wk8qh26 62ma13brr ho08mctfw 65q3h2 8se1b7 970y4c577 c3f793 2mu9e od8vjhyt 17628 81pfy7 ee14q69t4 005r25c86 50w71m3l9 6se3p8l 9d9c5r7 hdq9rfb0b y29cf26 729xvd u4n91c 35u2q h16334 36xk98 ov1t6 54h6k9 ml63553 2c27tlqc fv1tv v767658 x1u10k 92q1j7b9 40e5is 6su1q59 h90636ll 757m459y0 ke163r6 qf5v8f2n m6h2a 4p88p yfmq2975a g4bv1t k8d8whp65 qz175so3 520g61e 55m6bh235 j6n5y 6w0t76th b0wtl7q lcuw96 mp2l8d1c w4kr923y1 d8741bp4v l245i3 fcmnw 9m4kg85z 6bis4cjs 1sf0g8gq uu36o4l0 a3h31u pvy4em 5q1t37g sb5cbsv3g yejeol og087z9 3d26hrlw7 05s7g2 4yp46v6 1sd3ot g04evj87 d1w1ra6 89g5t8 64a42ihm coh4kq 01ejx 4frus6 3k938303 0y0z1xyx 799v26 7651514aw 3ddi4i8l oc8aa 9u42f 70t17439 vg7o54 xw8c3yz 1i1aq3p23 k6i4j4 41et377k 9r25jic 65o4n1s zt8s9a8 4n88b7 or0974 96it6 ox041b kkk0hi 5ocny 316547 r873o h1z5mb wbw0497 6i422j 54d54bt reh822 r6818 dogwoi2n7 wvfur h51y36k 49d0lhf3m 73714y 3ukt0 45eeq s6686xxn 3395o i67mh66 68093462 4j9ls 74047i54o 1k6i5fawg p3m491 mqy94h6 666kf ue5ry g6g6xw 0bmgtx 75j9nsvf 90g583 hkjhib2 p9460431 a3wi5nd5 hgc0w7 9r1spo63z 87913e 6bz0fc m82jox78 q4c87t 8i6i51c83 ezp12r 6g5i7 ubarl 14k71597 901b2 kb2ya9 xkl93 awh7jmblw q2gbkmvk 91nw3a05i 6qga3 lcg5m 01wur23b 29t7171u cs9u8 a4v3xg0 j5kqpfciu u1o31 xjt16f5v 02165z3 17ow5 lqrq9 v9jt5 g8113 qa9637 ez29eqc9t 2a6ra1r 00767x y9pjem d8xw7s 2i5c5 kve255m7u 41v7yn8 o952s446 q26okdrbr f50xm5 a3l8v744 l8q977 ub2ag2 2307p 079pv6 n4wup 5b46t 0i599u7q t46j1ush8 03a6x c5idf535 566f3l8 r42t11p9 966e5412 82rl29tn9 k032o4 hlra31t2 87f8q8s 57u1vt5o8 g6081 pny7v101a g7ar1z zw697yh4 v96p1180 dg86uo9qh 0oo5r2n1 wse3c6 87qf041y hylxbrj yul0jc1 70394 3i44dn yoi246 7ccmsts0 2c2iqn qytx7c42w hgy3zx1k 0h76k267 vf528wz84 24i92r34t i15h1 0l2n93b 4ysso34 gb4p098p9 5x0p4pk5v la00fg39 2596p esno00 pfz9149 3tl43q0 p9mw947g xrd60n2g 5pcp2n 22vu57d1 169vqkf s6uwxk7 4cx1s 5z89490d8 u2o88803m f4236 94xpjzu 975gcg2b1 2s6ow85w0 r68w68 4valqzgs1 j967p577 wdz4t oy567kh05 v382yl ma0k273m 0qv13 3h79r 1a7286 xlv11nqg g64q2pq7f hh7bl2t65 8oqmq 3230i 9kspnz0 1o58m8 g3g8un0 9s70irfzh 4mqjge4 0pmjw 87jq5lvc 6rr41zav6 146v3 2pj9i leawe46 aojfx1h rbz7s7n0 aka0x 4q31u e069n swj06 l52s891 w7ta9p7 8641c3bj5 o8p3jx mci7g yb0mx95 jperua8 x1sh6whl q13u23s p9h3m 4u561 544u556g psm8vv 5338dmhe 6nmacyod 7qk0e0cx4 1s6zv2ycy 40360 2m3w8h2ee 110o27 w730108t 4547b0 0e998 d62io mjri4m90m 822xgu 7404u73i3 6g73d1 292uv351 789e6 f6721070g 5752261 y5l2i vh471uy 1p06933q o2l85722 axoz605ic yd97s 78whg y8eeb5b sr76mqe wc0855h6j 4ztui 4bc8n5 hvyuovxl4 0tifec 2coog5s6n j2mbd344h bgbx7 m7a4t2j77 vdc2d854 mizbxb2 1xj676 5oi49bw66 t451834gd 1xh7o t006va 6c0jy 126ly2n5 i432l5t61 myrou93w v0t5fi5s4 1zne2o rysfj8k 44x53c 9kk15 8938quif d6f7x 3nz3p cjg70t v309011 07nw947ey 6rc18 n11551so 24dtm5159 qpd4p40 f3794b9y9 8hcx5oo5 570bu cl442vxg l59bl10jx lj5gz00u b7tn6uu08 45m43uf53 t62861qf9 780288ew 3867o8p7 3k8uc we7zh sub593fof qxyi7 q634jlqz 9acjc 24v0eksmu ltx1crj 0y0b73qt 64c8yd 5hbes3 c791g97o2 tg9j2 8736l v2am0 4yq2yg943 193di7141 ss6xq y60lv92r 77b1v383 o9acsyje 163449n0 mnw167 2skcq u5z4v3i 4u70jc 8w872 42q9k44f fshyn004 qr1fa 59599zxbh g25wi69l 61vfy6 01474kb7 6mp11b 62t63e3l 198njo 673s491p ab8dr4qz 2s243 7hwz6lq79 d999oo3 6vsy1 6pf862 79x2dmq85 7q6q48i2 21g4mzy25 do85ib82x r0wb2 6zq2rmf 5q2jp41 bc60yv x18t30 5c0zt6m3 na80h6tc y5r6n o40r45v 0ufog 49w11ce0 10i3cbapw 606z0ti kowx5iro l59quc0 4t00o8")

This seems to be the best that I can figure out without breaking out compression algorithms, and none of the languages I like to use really have a brief built-in compression method.
The "algorithm" is extremely simple; check if it's in the list of random passwords and return False if it is and True if it isn't.


text:
Is the time linear?
I like patterns in time. My favorite is when the time lines up. For example, all of these line up:
3:45
12:34
23:45
3:21
6:54

This is because each digit in the hour/minute is increasing/decreasing by one each time.
Your task is to take the current time and check if it "lines up" in this pattern in a program. (You will output a truthy or falsey value according to this check.) Along with the times above, your program should match these:
1:23
4:32
2:10

And not match these:
1:00
12:13
1:21
1:34

You may take the time as an argument to a function/through STDIN, but this incurs a +125% byte penalty on your program. You may take the time from UTC or system time; 12-hour or 24-hour. This is a code golf, so the shortest program in bytes wins.

This challenge is very similar to Find all times that follow a pattern, things valid for this program are also valid for the other program

@Ferrybig except this uses the actual time and includes a different method

+125%? Seems like it should be +25%.

@CatsAreFluffy no, I mean 125.

-1 for penalty. Either take current time or time via input, but trying to do both makes for silly scores.

Should it match 9:01?

@DanielM. no it should not.

Jolf, 10 21 19 28 bytes
Replace ♂ with \x11, or use this link.
 eZd♂Μf5dpq+EH20d&=FnH h±01H

This can be golfed (?).
Explanation:
 eZd♂Μf5dpq+EH20d&=FnH h±01H
       f5                      [hours, minutes]
      Μ  dpq+EH20              pad (>_>)
     ♂                         singleton; so [13,45] => [1,3,4,5]
  Zd                           delta list; [1,3,4,5] => [2,1,1]
_e               d             check if
                   =FnH        each member is equal to the first
                  &    _h±01H  and if it is in the array [-1,1] (0 +- 1)

Unless I'm misunderstanding something, this would return true at 1:00, because the minutes aren't padded to two digits.

@Dennis Nice catch. How did you notice?

I ran f5 alone to see what it does, and it was 1:05 when I did it.

@Dennis o_o wow. This challenge is certainly full of coincidences.

Pyth, 67.5 54 38 bytes
sm.v%"q1l.{.e%skvb+`.d6.[\0`.d7 2"d"+-

Or old version, 30 bytes (takes input from stdin)
 zsm.v%"q1l.{.e%skvb:z\:k"d"+-

Thanks @drobilc for reminding me of the other .d arguments ;)
Explanation:
sm.v%"q1l.{.e%skvb+`.d6.[\0`.d7 2"d"+-
 m                                 "+- -  [V for d in "+-"]
    %                             d    -   V%d
     "                           "     -    stringify code V
                   `.d6                -          repr(current_hour)
                  +                    -         ^+V
                           `.d7        -           repr(current_minute)
                       .[\0     2      -          pad("0",^,2)
           .e                          -        [V for k,b in enumerate(^)]
                vb                     -          eval(b)
             %s                        -         V (either + or -) ^
               k                       -          k
         .{                            -       set(^)
        l                              -      len(^)
      q1                               -     ^==1
  .v                                   -  eval(^)
s                                      - True in ^

Basically, for both + and - it tests to see if by performing that operation on the index on the character and the character itself  you get the same values.
Try it here!
Or try a test suite!

There's a 125% penalty for reading the time as user input.

Can't you get the time using something like +.d6+k.d7?

Oh yeah, I didn't get it when I searched for time ;)

Unless I'm misunderstanding something, this would return true at 1:00, because the minutes aren't padded to two digits.

Bash, 79 78 bytes
[[ $(date +%-H%M|fold -1|sed 'p;{1d;$d}'|paste -sd-\\n|bc|sort -u) =~ ^-?1$ ]]

Remarkably competitive for the usually-painfully-verbose Bash.
Thanks to @DigitalTrauma for 2 bytes!
Walkthrough:

date +%-H%M: returns the date in HHMM form (ex. 1234).
fold -1: puts each character on a separate line (so now we have 1\n2\n3\n4\n).
sed:

p: duplicate each line.
{1d;$d}: delete the first and last lines.

Now we have 1 2 2 3 3 4 (spaces used in place of newlines for readability).
paste -sd '-\n': turns this into 1-2 2-3 3-4.
bc: piped through an arithmetic calculator, now we have -1 -1 -1.
sort -u: remove duplicates, so now we have -1.
[[ $(...) =~ ^-?1$ ]]: check if the resulting string matches the regex /^-?1$/.
If the time is "linear," the differences between each consecutive line will all be either 1 or -1.

Remarkably competitive, yes.  But not as competitive as this ;-).  Looks like I posted 1 minute after you.

Bash brace expansions can be very useful to produce sequences in either direction.

paste -sd-\\n

I think you need date +%-H%M too so 1-digit hours are not space-padded

What about date +%-H%M|fold -1|sed 'p;{1d;$d}'|paste -sd-\\n|bc|grep -Evc ^-?1$?  Outputs 0 for truthy and +ve for falsey.

@DigitalTrauma Thanks! I've incorporated some of your suggestions, and I'll try to play with the grep thing if I have time later today. (Sorry for the late response.)

Pyth, 23 22 bytes
}+.d6%"%02d".d7jks_BU7

Constructs the string "0123456543210" and check if the time without the colon is a substring of it.
In pythonic pseudocode:
                   k = ""
}+.d6%"%02d".d7    ( currentHour() + format("%02d",currentMinute()) ) in \
  jks_BU7             sum([range(7),range(7)[::-1]]).join(k)

05AB1E, 10 × 125% = 24.75 22.5 bytes
Code:
R.d¬¹1£ŸJQ

Explanation:
R           # Reverse the input
 .d         # Keep the digits
   ¬        # Head, push the first character of the string
    ¹       # First value from the input register
     1£     # Take the first character from the input
       Ÿ    # Inclusive range
        J   # Join the list to a string
         Q  # If equal to the input, return 1, else 0

Try it online! or Try all test cases at once!

@Dennis Which in my opinion is not fair for languages who don't have time support...

I don't disagree...

Jelly, 24.75 22.5 bytes
~ḟ0IµḢ×=1P

The code is 10 bytes long and is subject to the 125% penalty.
Try it online!
How it works
~ḟ0IµḢ×=1P  Main link. Input: S (time string)

~           Apply bitwise NOT to all characters.
            This attempts to cast to integer, and returns 0 on failure.
            For example, '1'~ -> 1~ -> -2, but ':'~ -> 0.
 ḟ0         Filter out the 0, which corresponds to the colon.
   I        Compute all increments/deltas.
    µ       Begin a new, monadic chain. Argument: A (list of deltas)
     Ḣ      Pop the first delta.
      ×     Multiply the remaining list items by the popped one.
            The list should now consist of 1's for a truthy test case.
       =1   Compare the list items with 1.
         P  Take the product of the resulting Booleans.

MATL, 24 18 19 bytes
'%i%2i'1$4:5Z'YDdtdw|qh~

Try it online!
Output is an array consisting of only ones (which is truthy) if the time matches, and an array with at least one zero (that's falsy) otherwise.
To test the code it's better to split it in two parts as follows:

1$4:5Z' produces a 2-number vector with the current hour and minute.
'%i%2i'iYDdtdw|qh~ takes from stdin a 2-number vector with hours and minutes and computes the result.

In the combined code, the second part takes its input from the stack as produced by the first.
Explanation
A matching occurs if the following two conditions are met:

All differences between consecutive digits have absolute value 1;
All differences between those consecutive differences are 0.

Minutes have to be zero padded (thanks to Dennis for that!). Zero-padding, if it actually occurs (minute is 9 or less) will always produce a falsy result. So I use space-padding instead, whivh has the same effect.
Code:
'%i%2i'     % format string for sprintf, including padding for minutes
1$4:5Z'     % get current hour and minute as a 2x1 numeric array
d           % differences between consecutive digits (chars)
td          % duplicate. Compute differences again. Will be all zero if time matches
w|q         % swap, absolute value, subtract 1. Will be all zero if time matches
h~          % concatenate both arrays and apply logical negate

Batch, 130 bytes
@set t=%time:~,5%
@goto %t::=% 2>nul
:0012
:0123
:0210
:0234
:0321
:0345
:0432
:0456
:0543
:0654
:1234
:2345
@echo 1

Edit: Back to the old approach. %time% contains the time in hh:mm:ss.ss format. The first 5 characters are extracted into t and the colon is deleted. If the result is one of the 12 possible linear times then 1 is output to indicate a truthy value, otherwise there is no output to indicate a falsy value.

I liked your jump-table approach :-)

@Kenney Good news, it's back! (I had some useless entries in the table which was bloating the answer, but that's fixed now.)

JavaScript (ES6), 75 73 bytes
_=>"0123456543210".match((m=(new Date+"").match`([1-9].?):(..)`)[1]+m[2])

2 bytes saved thanks to @Neil!
Explanation
Credit to @busukxuan for the digit string idea!
Checks the digits of the current time in the string 0123456543210. Returns null for false and an array containing the time digits for true.
_=>
  "0123456543210".match(     // check if the time digits are in this string
    (m=
      (new Date+"")          // get a string with the current time (among other things)
      .match`([1-9].?):(..)` // get time digits with leading zero removed
    )
    [1]+m[2]                 // construct a string of only the time digits
  )

I tried (m=(new Date+"").match(/([1-9].?):(..)/))[1]+m[2] but it's the same length.

@Neil Ah, I forgot to try using capture groups. Thanks, this saves 2 bytes by calling match with a tagged template string.

Well, I'm glad I was of help after all!

Julia, 92 71 bytes
f(d=diff(["$(Dates.hour(now()))""$(now())"[15:16]...]))=all(d[1]d.==1)

This is a function that takes no arguments and returns a boolean. To call it, simply execute f().
We define the keyword argument d of f to be the cumulative difference in the ASCII codes associated with the digits of the hours and minutes of the current time. Then, for each difference, we multiply the first difference in the list by each successive difference and determine whether all are equal to 1. If so, the digits of the time are either monotone increasing by 1 or monotone decreasing by 1.
Saved 21 bytes and fixed an issue thanks to Dennis!

Pyth, 38*2.25 = 86 bytes
JsMfnT\:zK.b-NYt.>J1tJ|qlKlx1KqlKlx_1K

Try it here!
Explanation
Works by converting the time to a list of integers, mapping this to a list of differences and checking if this list only contains -1 or 1.
Difference checking works by rotating the integer list one to right and doing an elementwise subtraction with the original integer list using all elements but the first one in each list.

JsMfnT\:zK.b-NYt.>J1tJ|qlKlx1KqlKlx_1K  # z = input

   fnT\:z                               # filter the : out
 sM                                     # map the digits to integers
J                                       # assign the list to J
          .b                            # parallel  map (with N and Y) to
            -NY                         # difference of N and Y
               t.>J1                    # over all but the first element of J, rotated right
                    tj                  # and all but the first element of J
         K                              # assign the result to K
                      |qlKlx1KqlKlx_1K  # check if K only contains -1 or 1

Mathematica, 85 84 bytes
#==Range[#[[1]],Last@#,Sign[Last@#-#[[1]]]]&@Flatten@IntegerDigits@DateList[][[4;;5]]

Pretty basic. Compares the time (as a list of digits) to a range from [first digit] to [last digit].

Retina, 78 63 62 60 * 125% = 135
:

.
$0$*aa:
^(a*)(:\1a:\1aa(:\1aaa)?|aaa:\1aa:+\1a(:\1)?):$

15 bytes thanks to Maria^H^H^H^H^HDigital Trauma, and for paving the way for 3 additional bytes.
Prints 1 for success, 0 for failure. I imagine this isn't optimal, but I can't think of a better approach. This method requires that 1 be added to each of the time digits, otherwise 0 causes some problems.
Try it online!
You can try a slightly modified program here that runs on multiple lines.

Doubled spaces? I'm suspicious.

thanks to xxxx Digital Trauma

Ahh... right ok, edited :P

Bash + coreutils, 59
t=`date +%-H%M`
((`eval printf %s {${t::1}..${t: -1}}`==t))

Shell return code is set to 0 (truthy) or 1 (falsey).

Save just the hours and minutes numbers of the date in variable t
Construct a bash brace expansion that runs from the first digit to the last digit of $t.  The run produced by the expansion will automatically run in the right direction
eval allows the variable expansions to happen before the brace expansion
printf outputs the concatenated expansion as one string with no space separators
The result will be equal to $t in the truthy case - arithmetic evaluation to test this is shorter than the usual [ ... ] test.

Ideone.

Perl, 90 65 bytes
@i=`date +%R`=~/\d/g;@n=reverse@m=0..9;print"@m"=~/@i/|"@n"=~/@i/

New approach: generate strings "0 1 2 3 4 5 6 7 8 9" and it's reverse and do a regexp match.

The previous approach (90 bytes):
@l=map{("$_=>1,","$_-")}`date +%R`=~/\d/g;@a=%h=eval"@l[1..$#l-1]";print@a==2&&1==abs$a[1]

Commented:
@l=
    map{
        ("$_=>1,","$_-")      # return parts of expressions
    }
    `date +%R`=~              # grab the time, quick 'n' dirty, and apply a regexp
       /\d/g;                 # match all digits and return a list

@a=                           # 'cast' the hash to a list
   %h=                        # 'cast' the list to a hash
      eval                    # evaluate the string
           "@l                # this string is interpolated as join ' ', @l
            [1..$#l-1]";      # but only after discarding the first and last element

print @a==2 && 1==abs $a[1]   # check that the hash has 1 key and that it's value is +1/-1

It's not going to win any prizes, but I had fun on this one so I'll share my work. The basic idea is the same as some/most other answers: calculate the deltas and make sure they are all either -1 or +1.
The expression that is evaled for the time 12:34 is constructed as follows:
@l=                     [1,      $#l]          "@l[...]"                    %h
(("1=>1", "1-"),        (        "1-",
 ("2=>1", "2-"),  ->     "2=>1", "2-",   ->    1-2=>1, 2-3=>1, 3-4=>1      (-1 => 1)
 ("3=>1", "3-"),         "3=>1", "3-",
 ("4=>1", "4-"))         "4=>1",      )

Some things I tried that don't work:

using exit to save a byte. It sometimes returns 2.
merely calculating the number of hash keys (74 bytes). This also matches all the time pattern where all the digits are the same.
@l=map{("$_=>1,","$_-")}`date +%F`=~/\d/g;%h=eval"@l[1..$#l-1]";print%h==1

calculating the absolute normalized sum of the deltas (79 bytes). This grew from the approach to eval into a scalar. The total sum would have to be ±2 for 3 digits and ±3 for 4 digits, easily normalized with the $#array syntax. The false positive 12:24 made this approach unfeasible:
@l=map{($_,"+","$_-")}@x=`date +%R`=~/\d/g;print 1==eval"abs(@l[2..$#l-2])/$#x"

Python 2, 93 bytes
import time,numpy
print len(set(numpy.diff([int(time.asctime()[10+k])for k in[1,2,4,5]])))==1

Not subject to the byte penalty. Small chance this doesn't work if time.asctime() changes during the loop. +4 bytes to fix this:
import time,numpy
x=time.asctime()
print len(set(numpy.diff([int(x[10+k])for k in[1,2,4,5]])))==1

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Model a probability table using 15-bit fixed probabilities
A histogram is an array of integers that counts the number of times a symbol occurs. For example, for the string "aaabbbabbdebabbbebebdbaaabbabaaaaeebeaabaaba" a histogram is a: 18, b: 18, c: 0, d: 2, e: 6, or [18, 18, 0, 2, 6] in short.
If we were to pick a random character out of this string, what would the chance be that it is a particular character? We can calculate a probability table using the histogram. Simply divide every number by the sum of the histogram. So we have a 18/44 chance to get a.
Probability tables are used in compression algorithms. But compression algorithms have to be fast and always do the same computation on every machine. We can't use ratios, as they're slow and get big (1248148/13468235) and we can't use floating point as rounding errors differ from machine to machine. So we use... fixed point probability!
A 15-bit fixed point probability is a 15-bit integer representing a probability. If n is the integer, then it represents the real probability n / 0x7fff. So 0 is never, 0x7fff is always, and 0x3fff is (nearly) 50%.
So, the challenge is to compute a 15-bit fixed point probability table, given a histogram. But there are a few assumptions that the output must fulfill:

Every symbol in the histogram has a respective 15-bit fixed point probability in the probability table.
A symbol with count 0 in the histogram must have zero probability.
A symbol with count > 0 in the histogram may not have zero probability.
The cumulative probability must be 1: the probability table must sum to 0x7fff.

Your score for a certain histogram will be the sum of squared differences between the real probabilities and the 15-bit fixed point approximations.
The score for your answer will be the sum of scores you get on the set of histograms generated by the following Python (2 or 3) program:
import random
random.seed(0)
for _ in range(100):
    l = 1 + min(int(random.expovariate(1/100.)), 1000)
    print([int(random.expovariate(1/10.)) for _ in range(l)])

Alternatively, you can view the test set here. I may change the test set in the future, do not optimize for this particular one.
If you write your probability tables in a Python list format, one per line, the following Python program can score your answer in one fell swoop using python score.py hist.txt prob.txt:
from __future__ import division
import sys
scores = []
with open(sys.argv[1]) as hist, open(sys.argv[2]) as prob:
    skip_empty_lines = lambda it: filter(lambda s: s.strip(), it)
    for hist_l, prob_l in zip(skip_empty_lines(hist), skip_empty_lines(prob)):
        hist, prob = eval(hist_l), eval(prob_l)
        scores.append(sum((p/0x7fff - h/sum(hist))**2 for h, p in zip(hist, prob)))
print(sum(scores))

Lowest score wins, ties broken by asymptotic complexity before first answer.

Python, score 8.682671033510566e-07, O(n * log(n))
#!/usr/bin/env python
from __future__ import division
from ast import literal_eval
from fractions import Fraction
from operator import itemgetter
from sys import argv
import fileinput

def model(hist):
    TOTAL_FINAL = 0x7fff
    TOTAL_INIT = sum(hist)
    SCALE = Fraction(TOTAL_FINAL, TOTAL_INIT)
    hist_probs = [Fraction(x, TOTAL_INIT) for x in hist]
    res = [max(int(x*SCALE),1) if x > 0 else 0 for x in hist]

    adjust = TOTAL_FINAL - sum(res)
    res_probs = [Fraction(x,TOTAL_FINAL) for x in res]
    diffs = [(x-y)**2 for x,y in zip(hist_probs, res_probs)]
    d2 = [(x-y) for x,y in zip(hist_probs, res_probs)]
    if adjust > 0:
        idx, vals = zip(*list(filter(lambda x:x[1]>0, sorted(((i,x) for (i,x) in enumerate(d2) if hist[i]), key=itemgetter(1), reverse=True))))
        i = 0
        while i < adjust:
            res[idx[i%len(idx)]] += 1
            i += 1
    else:
        idx, vals = zip(*list(filter(lambda x:x[1]<0,sorted(((i,x) for (i,x) in enumerate(d2) if hist[i]), key=itemgetter(1)))))
        i = 0
        while i < adjust:
            res[idx[i%len(idx)]] -= 1
            i += 1

    return res

if __name__ == '__main__':
    for line in fileinput.input():
        print(model(literal_eval(line)))

This takes input as a file (or sequence of files) with one Python-list-format histogram per line, with the filename(s) provided on the command line (like python prog.py hist.txt).
The general strategy here is to make a (decent) initial guess at the best probability representation, by doing integer scaling of the input histogram to 15 bits. This almost always gets the resultant list just shy of 32767 total. To adjust the probabilities, the items with the largest squared differences from the input histogram get incremented. If the result is too high initially, the largest value in the array is decreased by the excess, instead.
Time Complexity
O(n * log(n)), based on the sorting, which is the most time-consuming operation for each histogram.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What time is it again?
The Inspiration
The Challenge
I'm tired of seeing the same old-same old clock in my top-right-hand corner of my screen. It's time for a new clock. While the clock clock sated my lack of interesting clock for a little while, it simply will do no longer. Your job: make a better, more interesting clock.
The Rules
Make a clock, provided that:

Output is either graphical or directed to STDOUT or equivalent.
You do not use ASCII numbers as the output (don't just print out the time).
It must run continuously until stopped by closing the window or by CTRL-C or equivalent.
It may NOT print out an infinite amount of lines (if using STDOUT).
It must be human-readable, in any way.
It must be accurate to 1/10th of a second to the system clock, and update with any changes to the system clock (so if I change system settings, it will update to my system clock).
Your program cannot exceed 1024 bytes.

Pop-con Objectives
The voters should keep in mind the following:

Creativity should be valued above all.

The better the explanation, the greater the up-votes.

You are saying it has to be accurate to 1/10 of a second of the system clock. Do we have to include those in the output or is hh:mm:ss enough?

@DenkerAffe HH:MM:SS is enough, however, it should be verifiable with the system clock. Debug version would be awesome. :)

This has two issues: 1. It must be a human-readable clock is not an objective validity criterion. 2. The primary voting criterion is creativity, making the challenge too broad.

sigh I wish these considerations had been brought up in the sandbox. Oh, well.

Bash
watch -tn.1 date +%T\|figlet

Yeah, yeah, I know it's not golf (28 bytes!), but I do like the minimalism:

watch is a tool provided by the procps package that repeatedly runs a command every <specified interval of time> and outputs the updated results. (An example of where this is handy: watch -n.1 ls -lh ~/downloads/foo to view the progress of a download.)
The -t flag for watch represents --no-title, as otherwise it would look like this:

The -n 0.1 flag simply means "update every 0.1 seconds."
Then comes the command that we're watching over. First, date +%T prints the date in the desired format (date comes from coreutils):
       %T     time; same as %H:%M:%S

Then this is piped to figlet (unsurprisingly provided by the figlet package), which converts STDIN to ASCII art.
(|  |  _            _   _,            _|   _
 |  | / \_|  |     /   / |  /|/|     / |  / \_
  \/|/\_/  \/|_/   \__/\/|_/ | |_/   \/|_/\_/
   (|

             _/  _/                                      _/
    _/_/_/  _/  _/        _/_/_/    _/_/    _/  _/_/  _/_/_/_/    _/_/_/
 _/    _/  _/  _/      _/_/      _/    _/  _/_/        _/      _/_/
_/    _/  _/  _/          _/_/  _/    _/  _/          _/          _/_/
 _/_/_/  _/  _/      _/_/_/      _/_/    _/            _/_/  _/_/_/

        _|                   |    |   |    _)
  _ \  |    __ \   _ \  _` | __|  __| __ \  | __ \   _` |  __|
 (   | __|  |   |  __/ (   | |    |   | | | | |   | (   |\__ \
\___/ _|   _|  _|\___|\__,_|\__| \__|_| |_|_|_|  _|\__, |____/
                                                   |___/
                       _
    o_|_|_  _|_|_  _  |_o _ | __|_ ._ .__  _ .__.._ _
\/\/| |_| |  |_| |(/_ | |(_||(/_|_ |_)|(_)(_||(_|| | |o
                          _|       |       _|

Hmm. Figlet. goes off to run apt-get install figlet I like.

Are you sure this doesn't violate the requirement not to print an infinite number of lines?


text:
The middle-square method
Introduction
The middle-square method is used for the generation of pseudorandom numbers. However, this is not a good method in practice, since its period is usually very short and has some severe weaknesses. How does this work? Let's take an example:
For the seed, we pick 123456:
Seed     123456

The seed squared (seed × seed), is equal to:
Seed²  15241383936

We started with a 6-digit number. That means that the seed squared should deliver a 12-digit number. If this is not the case, leading zeroes are added to compensate:
Seed²  015241383936

We then take the middle part of the number, with the same size as the seed:
Seed²  015241383936
          ^^^^^^

This is then our new seed: 241383. We repeat the same process as shown above. We get the following:
0:     123456
    015241383936
       |    |
1:     241383
    058265752689
       |    |
2:     265752
    070624125504
       |    |
3:     624125
    389532015625
       |    |
4:     532015
    283039960225
       |    |
5:     039960
    001596801600
       |    |
6:     596801

And this keeps on in a while... Now we know what the middle-square method is, let's get to the challenge:

The Task
Every seed has a period. The period of a n-digit seed cannot be longer than 8n. For example, the seed 82. This would give the following sequence:
82 > 72 > 18 > 32 > 02 > 00 > 00 > 00 > 00 > 00
|____|____|____|____|____|____|____|____|____|___...
0    1    2    3    4    5    6    7    8    9

You can see that the period is equal to 5, before containing the same digit again. Your task is, when given a seed greater than 0 containing no leading zeroes, output the period of the seed. So, in this case, you need to output 5.
Another example is: 24, which gives the following:
24 > 57 > 24
|____|____|___...
0    1    2

As you can see, not all sequences end in 0. This cycle has a period of 1.

Test cases
Input   >   Output
24      >   1
82      >   5
123456  >   146
8989    >   68
789987  >   226

The pastebins with the sequences for 123456, 8989, 789987
This is code-golf, so the submission with the least amount of bytes wins!
You can assume that the input will never have an uneven number of digits.

Nit pick: That's not a period. Period implies that the sequence eventually goes back it its initial state.  24 is periodic (with period 2, I'd say), 82 is eventually periodic (with period 1).

So "period" is the 0-index of the last state which is different from all previous states?

@LuisMendo Yes, that is correct. My mathematical knowledge isn't the best :p.

It'd be more like 'the number of iterations before it stabilizes'

@WashingtonGuedes See this pastebin. Does that make it more clear?

Just did some tests for 2-digit numbers, and found some interesting results.  It turns out there are only 5 possible end results for all numbers 0-99.  It will either stabilize on 0 (most common: 62% of all inputs), or stabilize on 10 (19%), 50 (1%), 60 (15%), or an endless loop of 24 and 57 (3%).  50 is only possible if you start with 50.

@DarrelHoffman I also found this diagram, which also might be interesting :).

@Adnan - Yes, I more or less derived the same diagram myself.  I thought about posting it, but it'd need to be as an answer to this challenge, and I don't have one of those.

Jelly, 26 24 18 bytes
³DL⁵*
²:¢½¤%¢µÐĿL’

Try it online!
How it works
³DL⁵*         Helper link. No arguments.

³             Yield the original input.
 D            Convert from integer to base 10.
  L           Get l, the length of the decimal representation.
   ⁵*         Compute 10 ** l.

²:¢½¤%¢µÐĿL’  Main link. Input: n (integer)

²             Square n.
  ¢½¤         Call the helper link and take the square root of the result.
 :            Integer division; divide the left result by the right one.
      ¢       Call the helper link.
     %        Take the left result modulo the right one.
       µ      Convert the previous chain into a link, and begin a new chain.
        ÐĿ    Repeat the previous chain until the results are no longer unique,
              updating n in each iteration. Collect the intermediate results.
          L   Get the length of the list of results.
           ’  Decrement.

Pure bash, 162 131 116 113 107
Saved 3 bytes by using $c...
Thanks @Dennis for help me to save 6 more bytes.
---- begin middleSquare ----
for((b=$1;i[c=10#$b]<2;)){ a=${#b}
printf -v b %0$[a*2]d $[c*c]
b=${b:a/2:a};((i[10#$b]++))
};echo ${#i[@]}

---- end middleSquare ----
for testCase in 24 82 123456 8989 789987 111111;do
    printf "%12s: " $testCase
    bash middleSquare $testCase
  done
          24: 2
          82: 5
      123456: 146
        8989: 68
      789987: 226
      111111: 374

Square formated, 131
---- begin middleSquare ----
for((b=$1;i[
10#$b]<2;1))
do a="${#b}"
printf -v b\
 %0$[a*2]d \
$[10#$b**2];
b=${b:a/2:a}
((i[10#$b]++
));done;ech\
o ${#i[@]:0}

---- end middleSquare ----
for testCase in 24 82 123456 8989 789987 111111;do
    printf "%12s: %9d\n" $testCase $(
        bash middleSquare $testCase)
  done
          24:         2
          82:         5
      123456:       146
        8989:        68
      789987:       226
      111111:       374

Old but with fancy output, 162
---- begin middleSquare ----
for((b=$1;i[10#$b
]<2;1))do a=${#b}
printf -v b %0$[a
*2]d  $[10#$b**2]
b=${b:a/2:a};((i[
10#$b]++));print\
f "%9d %s\n" ${#\
i[@]} $b;done;ec\
ho -- ${#i[@]} --

---- end middleSquare ----
bash middleSquare 24
        1 57
        2 24
        2 57
-- 2 --

for testCase in 24 82 123456 8989 789987 111111
    do while read f v f
        do r=$v;done < <(
        bash middleSquare $testCase)
    printf "%12s: %11d\n" $testCase $r
  done
          24:           2
          82:           5
      123456:         146
        8989:          68
      789987:         226
      111111:         374

Python 3 2, 139 114 97 bytes
Thanks to Seeq for golfing off 25 bytes and thanks to Dennis for golfing off 17 bytes! Code:
s=`input()`;u=[];l=len(s)/2
while not s in u:u+=[s];s=`int(s)**2`.zfill(l*4)[l:3*l]
print~-len(u)

Can definitely be golfed further. This was also the code used to make the test cases :P.

JavaScript (ES7), 82 bytes
f=(n,p={},m=-1,l=n.length)=>p[n]?m:f(`${n*n+100**l}`.substr(l/2+1,l,p[n]=1),p,++m)

Accepts input in the form of a string, e.g. "82", and returns an integer. Simple tail recursive technique to check each seed in turn against a hash of seeds that have already been seen. I add 100**l to the square to ensure a consistent length.

@Downgoat Accepts input in the form of a string.

oh yeah, I guess I can't read :|

@WashingtonGuedes No, that doesn't work when the intermediate value begins with enough zeros. (This is why I "wasted" 7 bytes adding 100**l.)

@WashingtonGuedes There are cases where it doesn't work, for instance try following the chain from 5288.

Julia, 64 bytes
f(n,A=[],p=10^endof(dec(n)))=n∈A?-1:f(n^2÷√p%p,[A...n],p)+1

Try it with Coding Ground.

MATL, 33 35 40 bytes
`t0)2^10GVnXK2/^/k10K^\vtun@>]n2-

Try it online!
`           % do...while
  t         %   duplicate. Take input implicitly on first iteration
  0)        %   pick last value of array
  2^        %   square
  10        %   push 10
  GVn       %   number of digits of input
  XK        %   copy that to clipboard K
  2/        %   divide by 2
  ^         %   power
  /k        %   divide and floor. This removes rightmost digits from the square value
  10K^      %   10 ^ number of digits of input
  \         %   modulo. This takes the central part of the squared number
  v         %   concatenate this new number to array of previous numbers
  tun@>     %   does the number of unique values exceed the iteration index?
]           % if so: next iteration. Else: exit loop
n2-         % desired result is the amount of numbers minus 2. Implicitly display

Pyth, 21 bytes
tl.us_<>_`^N2/lz2lzsz

Try it online: Demonstration or Test Suite
edit: Found the edge case 1000, which didn't worked with my previous code. Fixed it for 1 byte.
Explanation:
tl.us_<>_`^N2/lz2lzsz   implicit: z = input string
  .u               sz   apply the following instructions to N, starting with N = int(z),
                        until it runs into a loop:
          ^N2              square it
         `                 convert it to a string
        _                  reverse order
       >     /lz2          remove the first len(z)/2
      <          lz        remove everything but the first len(z)
     _                     reverse order
    s                      convert to int
  .u                   returns the list of all intermediate values
 l                     compute the length of this list
t                      minus 1

any reason to use sz instead of Q?

@user1737909 If I use Q, I have to replace all the lz with l`Qs.

mh, it seems surprising Pyth doesn't share input. I guess it's really meant to allow for a second stdin read..?

@user1737909 Yes. The only possibility to share input is with .z and .Q, though they read multiple lines of input and store them in lists. But I haven't actually seen somebody use this feature. It's only 1 byte to evaluate a string or to stringify a number.

Okay, so you can read stdin at most 4 times in Pyth, Qz.Q.z?

@user1737909 No, you can also read input using E (evaluated input) and with w (string input). The four ways you described read input at the beginning of the program and autoinitialize them to the variables Q, z, .Q, .z. The other two E and w don't initialize the input to some variable. Just try this: http://pyth.herokuapp.com/?code=E%0AQ%0AE%0Aw%0Aw%0Az&input=first+line%0A123456%0A1%0A2%0Atest%0Ahallo&debug=0

Thanks – would it make sense then to have z and Q share input?

I don't think so. Quite often you need to read a string and a number and use both data multiple times. So it's quite handy to have 2 auto-assigning variables. It's quite rare though, that you need to share memory. And as I said, converting is only 1 byte. If you want to talk more, we should probably switch to http://chat.stackexchange.com/rooms/24159/pyth instead of spamming the comments.

Oracle SQL 11.2, 184 bytes
WITH v(v,p,n)AS(SELECT:1,'0',-1 FROM DUAL UNION ALL SELECT SUBSTR(LPAD(POWER(v,2),LENGTH(v)*2,0),LENGTH(v)/2+1,LENGTH(v)),v,n+1 FROM v)CYCLE v SET c TO 1 DEFAULT 0 SELECT MAX(n)FROM v;

Un-golfed
WITH v(v,p,n) AS
(
  SELECT :1,'0',-1 FROM DUAL
  UNION ALL
  SELECT SUBSTR(LPAD(POWER(v,2),LENGTH(v)*2,0), LENGTH(v)/2+1, LENGTH(v)),v,n+1 FROM v
)
CYCLE v SET c TO 1 DEFAULT 0
SELECT MAX(n) FROM v;

It uses the build in cycle detection to stop the recursivity.

Python, 124 bytes
def f(s,p=-1,n=0,m=[]):
 x=len(str(s))*2
 while n not in m:m+=[s];y=str(s*s).zfill(x);n=int(y[x/4:x*3/4]);p+=1;s=n
 return p

VBSCRIPT, 131 bytes
s=inputbox(c):l=len(s):do:t=t&","&s:s=space(l*2-len(s*s))&s*s:s=mid(s,l/2+1,l):i=i+1:loop until instr(t,","&s)>0:msgbox i-1

Best I could do with vbscript, first time poster so go easy on me!

Welcome to Programming Puzzles and Code Golf Stack Exchange! Great first post! I edited the formatting of your post a little bit to make it more readable and to conform to our standards more. Happy golfing!

Mathematica, 80 bytes
(a=10^⌊Log10@#+1⌋;Length@NestWhileList[⌊#^2/a^.5⌋~Mod~a&,#,Unequal,All]-2)&

CJam, 37 bytes
q{__,W*:D;~_*sD2/<D>]___|=:A;~A}g],((

Ran into an annoying stack-order issue that I can't immediately see how to resolve. It's also incredibly slow.
How it works:
Each iteration pushes the new value on top of the stack, then we wrap the stack into an array, and see if it's the same as its union with itself (to see if it has any duplicate elements). When it has duplicate elements, stop, and see how many elements are in the stack.

Python 2, 82 bytes
def f(n,A=[],l=0):l=l or len(`n`)/2;return-(n in A)or-~f(n*n/10**l%100**l,A+[n],l)

Try it on Ideone.


text:
The knight's next tour
We've all heard of the Knight's Tour puzzle: find a route for a knight that passes through all the squares on a chess board. But let's be honest, it's a little bit boring. So, let's give the knight a bit of a challenge.
Task
Write a program that takes the knight through all the squares on an arbitrary-sized, arbitrary-shaped chess board. It should take the chess board as input and output the set of moves and the starting position. In the event of an impossible board, it should output the set of moves and starting position for a tour with the longest possible length. Note: the knight doesn't need to take a round trip; assume they have another way to get home.
Chess pieces are small, so your code needs to be small enough for the knight to carry around.
Input
The input will be a string-based or array-based representation of a chess board, where a non-blank / truthy value is a square, and a blank / falsy value is an empty space. For simplicity's sake I will use #s and  s arranged in a grid for the examples.
Output
The output will be two large integers, followed by a series of 4-bit integers, or your language's equivalent. The two large integers will represent the starting co-ordinates, and the following numbers will represent a move like so:
 7 0
6   1
  K
5   2
 4 3

where K is the position before the move, and the number is the position after the move.
Examples
As there are a lot of possible solutions to the Knight's Tour puzzle, I will only provide example outputs. There may be more outputs.
###
# #
###
0 0 3 0 5 2 7 4 1
AFC
D H
GBE

## ##
  ##
 ##
(4, 0) [5, 6, 3, 1, 6, 3, 0]
CF HA
  BE
 DG

New challenge: Come up with more examples

"for the longest"  ->  "for a longest    ?

Are you after a Hamiltonian path or a Hamiltonian cycle?

@PeterTaylor Whichever's golfier! A path is fine; so is a cycle because it's a valid path.

In your first example, does the tour start in the top left? If so it looks like “3 0 5 2” takes you to the bottom right corner and the final move “1” takes you to row 2, column 3. It might be helpful to spell this out.

@Anush I thought so too, but it is spelled out in the output section. (Unless you had something different in mind?)

I meant a walk though of the examples you have given.

@Anush Like this?

Python 3.8 (pre-release), 254 bytes
n=-2,-1,1,2,2,1,-1,-2
l=len
e=enumerate
s=lambda b,x,y,t:max([1>((a:=[p:=x+_,q:=y+n[i-6]])in t)<l(b)>p>-1<q<l(b[p])>0<b[p][q]and[i]+s(b,p,q,t+[a])or[]for i,_ in e(n)],key=l)
f=lambda b:max([(z:=[x,y])+s(b,*z,[z])for x,r in e(b)for y,c in e(r)if c],key=l)

Try it online!
Pass input to the function f as a 2d array of truthy/falsey values.
Thanks to ovs and wizzwizz4

Welcome to Code Golf, and nice first answer! You may not assume the input is saved in a variable, such as b, per our default rules. You can change it to a function for 276 bytes. Additionally, this qualifies for this bounty offer of mine, so I've gone ahead and started a +100 bounty for you

You can save two bytes by replacing and b[p][q]and with if b[p][q]if - list comprehensions can have multiple if's.

I added another example, which your answer fails; I think your solution's finding the first, rather than the longest, solution. (Unless I typed it in wrong, that is.)

Um, holy... +1, and I hope it ends up being +1000 or so. Great answer!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
When will I have a binary car?
I noticed that my car's odometer was at 101101 when I got to work today. Which is a cool number because it's binary (and a palindrome, but that's not important). Now, I want to know when the next time I'll have a binary odometer reading. I can't read the odometer while I'm driving, because that would be dangerous, so it'll have to be binary either when I get to work or get home.
There's really bad traffic on the way to and from my office, so I have to take a different route each day.
For the purposes of this challenge, a day is a round trip and starts with my commute to work.
You'll need to take the initial reading of the odometer and a 10 element sequence representing the amount of miles each way. This sequence should be repeated until you get to a binary odometer reading. You should then output the number of days it takes until we get to a binary reading.
Both the milage for the route and the odometer reading will be positive integers. The count of days will either be x or x.5, so your output of the day count needs to support floating point for half days. If the day count is an integer, you don't need to output the .0. The odometer will always eventually reach a binary state.
Any form of input/output is acceptable and standard loopholes are disallowed.
Test cases:
101101, [27, 27, 27, 27, 27, 27, 27, 27, 27, 27] == 165.0
1, [13, 25, 3, 4, 10, 8, 92, 3, 3, 100] == 22.5
2, [2, 3, 1, 2, 7, 6, 10, 92, 3, 7] == 2.0

Will a day result only ever be an integer or an integer plus a half?

@FryAmTheEggman Yes. Each step is half a day.

What should happen if the odometer never becomes binary?

@CatsAreFluffy It always will. You don't have to worry about that case.

The days will be floating point. Could you elaborate a bit on that?

@Dennis The day count will either be x or x.5. That's all I meant. If you want to display that by formatting a string, or some other method, that's fine. It just needs to be in the format x or x.5.

@MorganThrapp isn't that fixed-point?

@cat You might be right, my math terminology is shaky at best.

Where do you work/live that 3, 25 and 92 miles (km?) are regular acceptable commute distances?

@kingofzeal A wormhole.

Heh, I hit that mark just a few days earlier – 101101 km

How many digits in the odometer?  Actually, that doesn't matter, because it's a 1 that's lost in the roll-over.  So we can code as if it always has enough room for one more digit.  :-)

@TobySpeight It's a magical odometer with an infinite number of digits.

Jelly, 22 17 16 bytes
RịS+³DṀ=1
Ṡç1#SH

Try it online!
How it works
Ṡç1#SH     Main link. Left input: n (initial reading). Right input: A (distances)

Ṡ          Compute the sign of n. Since n is positive, this returns 1.
 ç         Apply the helper link to 1, 2, 3, ... until...
  1#         one match is found. Return the match in an array.
    S      Compute the sum of the array. This yields the match.
     H     Halve the result.

RịS+³DṀ=1  Helper link. Left argument: k (integer). Right argument: A (distances)

R          Range; yield [1, ..., k].
 ị         Retrieve the elements of A at those indices.
           Indexing in modular in Jelly.
  S        Compute the sum of the retrieved distances.
   +³      Add n (left input) to the sum.
     D     Convert the sum to base 10.
      Ṁ    Get the maximum digit.
       =1  Compare it with 1.

Javascript, 68 63 61 60 52 bytes
5 bytes off thanks @ETHproductions. 2 3 11!! bytes off thanks @NotthatCharles.
f=(i,a,m=0)=>/[^01]/.test(i+=a[m++%10])?f(i,a,m):m/2

Test here.

Darn, you beat me to it.

Would (i+=a[++m%10]) work?

@ETHproductions. Good one!! I forgot it will always be 10

why not initialize r as 0.5?  Or not initialize r or m whatsoever (they should default to null, ie., 0)

@NotthatCharles. Starting with .5 was smart, thanks... Unfortunately, javascript throws undefined instead setting null or 0 for uninitialized variables

You can also save a byte by making m=0 in the initializer and increment after modulo (m++%10)... at which point you can just drop r entirely.  The whole method is then in the low 50s

@NotthatCharles. I was sure I tried that before, thanks again ;)

MATL, 29 26 25 bytes
`tvyyYs+V50<!A~]xx1Mf1)2/

Input format is
[27; 27; 27; 27; 27; 27; 27; 27; 27; 27]
101101

EDIT (June 10, 2016): The following link replaces v by &v (26 bytes) to adapt to changes in the language
Try it online!
`              ]           % do---while loop. Exit loop when top of stack is falsy
 t                         % duplicate. Takes first input (array) first time
  v                        % concat vertically (doubles length of array)
   yy                      % copy top two. Takes second input (todasy's value) first time
     Ys                    % cumulative sum of (repeated) miles each way
       +                   % add to today's value
        V                  % convert each number to a string
         50<!A             % true for strings than only contain '01 ' (ASCII less than 50)
              ~            % negate. This is the loop condition
                xx         % delete stack contents
                  1M       % push again array that tells which strings only contain '01 '
                    f1)    % pick index of first true entry
                       2/  % divide by 2

Java, 112 miles bytes
float c(int r,int[]d){float y=0;for(int i=0;;i%=d.length){y+=.5;r+=d[i++];if((""+r).matches("[01]+"))return y;}}

Lua, 108 Bytes
First time using the repeat..until loop in a codegolf!
function f(o,t)i=0repeat i,o=i+1,(o+t[i%#t+1]).."."o=o:sub(1,o:find("%.")-1)until tonumber(o,2)print(i/2)end

Ungolfed
function f(o,t)               -- o can either be a number or a string, t is a table
                              -- call it like f(2,{27,14,5...})
  i=0                         -- initialise the travel count
  repeat                      -- proceed like a do..while in C
    i,o=i+1,(o+t[i%#t+1]).."."-- increment i, and add t[i] to the odometer
    o=o:sub(1,o:find("%.")-1) -- remove the decimal part of the odometer
  until tonumber(o,2)         -- tries to convert o from binary to decimal
                              -- return nil (and repeat the loop) if it can't
  print(i/2)                  -- print i/2 which is the number of days for i travels
end

After the first loop, o will have a decimal part because of tonumber, I had to remove it... And to add it for the first case, that's why I concatenate it with a ".".

PowerShell, 84 73 67 59 57 bytes
param($a,$b)do{$a+=$b[$i++%10]}until(!+($a-replace1))$i/2

Takes input $a and $b, expecting $b to be an explicit array of mileages (e.g., .\binary-car.ps1 1 @(13,25,3,4,10,8,92,3,3,100)). We then enter a do/until loop. Each iteration, we increment $a with the mileage in $b at position $i++ % 10 so that we continually loop through the array. This will start at zero since for the first loop the $i is not initialized, and so evaluates to $null, which equates to 0 in this context, and it's only after that evaluation that the ++ occurs.
Then, the until statement checks if our number is only 0 and 1 by first -replaceing all 1 with nothing, casting that back as an integer with +, and then taking the Boolean-not with !. If it evaluates true, we'll finish the loop, output $i / 2, and terminate the program.
Explanation for the loop conditional -- In PowerShell, any non-zero integer is $true, and any non-empty string is also $true. For example, 231145 (an integer) will change to "2345" (a string) after the -replace, which will integer-cast as 2345 (an integer), the ! of which is $false. However, 101101 (an integer) will change to "00" (a string) which will cast as 0 (an integer), the ! of which is $true. If we didn't have the +, the "00" will ! to $false since it's a non-empty string.
Edit - Saved 11 bytes by swapping equality-on-length for strictly-zero
Edit 2 -- Saved another 6 bytes by realizing that $b.count will always be 10 ...
Edit 3 -- Saved another 8 bytes by using do/until instead of for
Edit 4 -- If the object being -replaced is an integer value, don't need quotes, saving another 2 bytes

05AB1E, 31 bytes
Code:
0IE\[²vs>sy+D§'aT«-""Qi\2/?}Ž}Ž

Somehow, the code doesn't stop running (and I can't figure out why). Apparently I forgot that there are three loops going on instead of 2. So it would still get into an infinite loop...
Try it online!

Ruby, 58
Nothing special.  Just a cycle...
->s,a,i=0{a.cycle{|e|i+=0.5;break i if/[2-9]/!~'%d'%s+=e}}

How do you run it?

@bogl It's a lambda - the easiest way is to append the params in square brackets.  Or you can assign the lambda to a variable and, again, append params in square brackets.  E.g., ->s,a,i=0{a.cycle{|e|i+=0.5;break i if/[2-9]/!~'%d'%s+=e}}[1, [13, 25, 3, 4, 10, 8, 92, 3, 3, 100]] or... f=->s,a,i=0{a.cycle{|e|i+=0.5;break i if/[2-9]/!~'%d'%s+=e}}; f[1, [13, 25, 3, 4, 10, 8, 92, 3, 3, 100]]

Pyth, 36 32 30 bytes
Jvz.V0=J+J@QbI<ssM{`J2KbB;chK2

Try it here!
Explanation

Jvz.V0=J+J@QbI<ssM{`J2KbB;chK2  # Q = input sequence

Jvz                             # assign starting value to J
   .V0                          # Start an infinite loop iterating over b starting at 0
      =J                        # Set J to
        +J                      # the sum of J
          @Qb                   # and the value at Q[b % len(q)]
             I                  # if
              <      2          # lower than 2
                  {`J           # Remove duplicate digits from J
               ssM              # Map the remaning digits back to integers and sum them
                      KbB       # if the above evals to true, save b to K and leave the loop
                         ;      # End loop body
                           hK   # Increment K because we missed one loop increment
                          c  2  # and divide it by 2 to get the days

Mathematica, 92 bytes
(y=1;x=#+#2[[1]];While[!StringMatchQ[ToString@x,{"0","1"}..],x+=#2[[y++~Mod~10+1]]];N@y/2)&

Yep.
Input is the odometer and a list of times. Output is the day count.

PHP, 102 98
function f($i,$s){while(1)foreach($s as$v){$d+=.5;$i+=$v;if(preg_match('/^[01]+$/',$i))return$d;}}

Ungolfed Version
function f($i,$s) {
    $d = 0;
    while(true) {
        foreach($s as $v) {
            $d += 0.5;
            $i+=$v;
            if(preg_match('/^[0|1]+$/', $i)) {
                return $d;
            }
        }
    }
}

PHP Notices can be removed of extra cost of 4 characters $d = 0; in golfed version.
Example
$i = 101101;
$s = [27, 27, 27, 27, 27, 27, 27, 27, 27, 27];
f($i,$s);

Removing the curly braces around the if, removing the 0 from 0.5, and removing the | between the 1 and 0 in your regex saves you 4 bytes. function f($i,$s){while(1)foreach($s as$v){$d+=.5;$i+=$v;if(preg_match('/^[01]+$/',$i))return$d;}}

@Samsquanch, good suggestion, brackets and 0 before .5 clearly I missed. Changed now.

C Sharp, 180.
Dear lord C# is long.
using System.Text.RegularExpressions;class a{double c(int a,int[]b){var d=0.5;a+=b[0];var i=1;while(!Regex.IsMatch(a.ToString(),"^[01]+$")){a+=b[i];i+=1;i=i%10;d+=0.5;}return d;}}


text:
Sum of Binary Substrings
This challenge is simple, given a decimal number, convert to binary, and calculate the sum of the sub-strings of the binary number, whose length is shorter than the original number. Here is an example:
Input:
  11
Binary:
  11 -> 1011
Substrings:
  101 = 5
  011 = 3
  10  = 2
  01  = 1
  11  = 3
  1   = 1
  0   = 0
  1   = 1
  1   = 1
Sum:
  5+3+2+1+3+1+0+1+1=17
Output:
  17

Your program should take a single decimal integer as input and output the sum of the binary sub-strings, as seen above. You may assume the input will always have more than two digits in its binary representation and that in input will not cause any errors during your program's execution.
This is code-golf, shortest code in bytes wins!
Test cases:
2  => 1
3  => 2
4  => 3
5  => 5
6  => 7
7  => 9
8  => 7
9  => 10
10 => 14
11 => 17

Curiously, the exclusion of the full-length substring is a significant extra challenge.

Jelly, 10 7 bytes
BṡRḄFS_

Try it online!
How it works
BṡRḄFS_  Main link. Input: n

B        Convert n to base 2.
  R      Yield [1, ..., n].
 ṡ       Get all overlapping slices of lengths 1 to n.
         This yields empty arrays if the slice size is longer than the binary list.
   Ḅ     Convert each binary list to integer.
    F    Flatten the resulting, nested list.
     S   Compute the sum of the result.
      _  Subtract n from the sum.

What encoding gives you 1 byte/char for that program?

@TobySpeight Jelly uses its own code page.

Pyth, 10
sPiR2.:.BQ

Try it online or run the Test Suite
Explanation:
sPiR2.:.BQ    ##   Q = eval(input())
       .BQ    ##   get binary string of Q
     .:       ##   get all substrings of that
  iR2         ##   convert them all to base 10
sP            ##   sum all but the last element, which is the input number

CJam, 27 21 bytes
Shoutout to Dennis for helping me save 6 bytes!
q~:Q{)Q2bew2fb~}%1bQ-

Works only with the newest version of CJam (available on TIO). Try it online!
Old version:
qi2b_,,0-\f{ew}{{2b}%}%e_:+

Try it online.

Python 3, 111 characters
N=bin(int(input()))[2:];L=len(N);r=range;print(sum(int(n,2)for n in[N[j:j+i]for i in r(1,L)for j in r(L-i+1)]))

EDIT: Explanation:
N=bin(int(input()))[2:]

Convert input string to an int, then the int to a binary string and remove its first two characters, since the bin method returns a string in the format of 0b...
Take all substrings of the binary string, convert them to decimal using int(n, 2) and sum them.
[N[j:j+i]for i in r(1,L)for j in r(L-i+1)]

is a list of all substrings. Ungolfed version:
def all_substrings(N):
    result = []
    for i in range(1, len(N)):
        for j in range(len(N) - i + 1):
            result.append(N[j:j+i])
    return result

Hope this helps.

98 bytes using a format string and removing the list comprehension

96 bytes as a function

CJam (22 bytes)
This is one byte longer than the current best CJam answer, but the approach can probably be adapted to some other languages quite profitably.
3,ri_2b_,,:).*\+fbW%:-

Online demo
Analysis
Suppose that the question were

calculate the sum of the sub-strings of the binary number

without the bit

whose length is shorter than the original number

Then it's not too hard to show that the most significant bit occurs with total weight 1*(2^B-1) where B is the number of bits; the second-most significant bit occurs with total weight 2*(2^(B-1)-1); down to the Bth-most significant bit, which occurs with total weight B*(2^1-1).
Taking into account now the subtraction of the original number, x, we end up with the sum
sum_i (x & 2^i) * 2^i * 2*(B-i)  -  sum_i (x & 2^i) * (B-i)  -  x

Dissection
3,        e# Put [0 1 2] on the stack - we'll need it later
ri_       e# Get the input x and copy it
2b        e# Convert the copy to base 2
_,,:).*   e# Pointwise multiply by 1 plus the index
\+        e# Append x to the resulting array, giving A
fb        e# Map a base conversion
W%:-      e# Reverse and fold a subtraction

The conversion to base 2 gives the first part of the main sum plus x; to base 1 gives the second part plus x; and to base 0 gives just x, so subtracting the base-1 from the base-2 the xs cancel, and subtracting the base-0 gives the desired result.

JavaScript (ES6), 78 bytes
n=>[...n.toString(2)].map(c=>[...s+=c].map((_,i)=>n-='0b'+s.slice(i)),s='')|-n

The outer map builds up leading substrings of n's binary representation; the inner one extracts trailing substrings of the leading substrings, thus covering all possible substrings, including the original binary representation.
Each substring is converted from binary back to decimal and subtracted from the original input as this is slightly shorter than adding them together and subtracting the original input.

Perl 5 -p, 53 bytes
$\=-$_;$_=sprintf'%b',$_;/.*(?{$\+=oct"0b$&"})(?!)/}{

Try it online!
-p          # <cli> Read input and output result automatically
$\=-$_;     # This method will count the full length entry, need to offset that
$_=sprintf'%b',$_; # Convert input to a binary string
/                  # Pattern match
 .*                # Any number of characters
  (?{              # Execute code, within this pattern match
   $\+=            # Add to the result
   oct"0b$&"       # What has been matched, converted to decimal
  })
 (?!)              # Look ahead, do not match anything
/
}{                 # Close the implicit loop, suppressing output of $_, but outputting $\

The key part is the (?!) in the pattern match.  It forces the match to fail, causing the system to backtrack and try again.  However, the code block within the match has already executed before this check, so the candidate match will be added to our total.

Mathematica, 73 70 bytes
Tr[FromDigits[#,2]&/@StringCases[#~IntegerString~2,__,Overlaps->All]]&

Function. Integer->Integer

A pity mathematica doesn't have great tools for dealing with sublists.

C, 71 bytes
f(n){int a=0,m=0,i;for(;++m<n;m+=m)for(i=n;i+i>m;i/=2)a+=i&m;return a;}

We maintain an accumulator a and mask m.  The mask starts at 1 and gets one bit longer each time around the outer loop.  In the inner loop, a copy i of the input is successively shifted right until it is shorter than the mask, accumulating the masked value each time.
Test program
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
    while (*++argv) {
        int n = atoi(*argv);
        printf("%d -> %d\n", n, f(n));
    }
    return 0;
}

Test output
./73793 $(seq 0 11)
0 -> 0
1 -> 0
2 -> 1
3 -> 2
4 -> 3
5 -> 5
6 -> 7
7 -> 9
8 -> 7
9 -> 10
10 -> 14
11 -> 17

Retina, 64
.*
$*
+`(1+)\1
$1a
a1
1
r&!M`.*
&!M`.*
^.*

+`1(a*)\b
a$.1$*1;
;

Try it online!
A high level stage by stage description: convert decimal to unary, unary to binary, get prefixes, get suffixes of prefixes, dump the original number, convert binary to unary, return count. I'll write a more detailed description once I'm done golfing, a lot of these stages seem suspicious...

C#, 148 bytes
int x(int i){int s,r=0,j=i,p=System.Convert.ToString(i,2).Length+1,k;for(;--p>-1;){k=j;s=-1;for(;++s<p;)r+=(k>>=1);j=(i&((1<<p-1)-1))<<1;}return r;}

Or, if I add Import "using static System.Math;" then 138 with
int x(int i){int s,r=0,j=i,p=(int)Round(Log(i,2)+1.49,0),k;for(;--p>-1;){k=j;s=-1;for(;++s<p;)r+=(k>>=1);j=(i&((1<<p-1)-1))<<1;}return r;}

OOP languages like C# won't win such a race, but I wanted to try it anyway. Here is a more beautified version + tester.
class Program
{
    // Tester: 50 bytes
    static void Main(string[] args)
    {
        int i=2;
        do System.Console.WriteLine($"{i} -> {x(i++)}"); while (i < 12);
        System.Console.Read();
    }
    // Function: 65 bytes (size according to ILDASM.exe)
    static int x(int iOrg)
    {
        int pos, shift, retVal=0, iPrev=iOrg, iTemp;
        pos = System.Convert.ToString(iOrg, 2).Length;
        do {
            iTemp = iPrev; shift = 0;
            do retVal += (iTemp >>= 1); while (++shift < pos);
            iPrev = (iOrg & ((1 << pos - 1) - 1)) << 1;
        } while (--pos > -1);
        return retVal;
    }
}

The nested do-while adds the right-shifted value of iTemp (after assigning it) as long as shift+1 is smaller then pos.
The next line calculates the next shifted value of iPrev
x1 = 1 << p -1; // 1 << 4 -1 = 8 [1000]
x2 = x1 - 1;    // 8 -  1 = 7    [0111]
x3 = i & x2;    // 1011 & 0111 = 0011
x4 = x3 << 1;   // 0011 << 1 = 00110
i2 = x4;

x1 und x2 calculate the mask, x3 applies it and then left-shifts it, since the last digit is always dropped. For 11, it looks like this:
START -> _1011[11]
101
10
1   -->  X0110[6], r=0+5+2+1=8
 011
 01
 0  -->  XX110[6], r=8+4=12
  11
  1 -->  XXX10[2], r=12+4=16
   1 ->  XXXX0[X], r=16+1=17

I know, most answers in C work seamless in C# as well (@Tony-Speight worked without problems), but I that would defy the purpose. Also, I didn't looked at the comments (well, except the Bold headers) until I was finished myself, so there was no danger of doing it "like C".

Vyxal 3 s, 6 bytes
bṢḶṪᵛB

Try it Online!

6 bytes flagless (roughly ports my Japt) by subtracting the input from the sum rather than removing it from the sublist array

Japt, 7 6 bytes
n¢ã xÍ

Try it
n¢ã xÍ
n        The input subtracted from:
 ¢         The input as a binary string
  ã        Substrings, including the original string
    x      Sum this list after mapping each substring to:
     Í       It converted to decimal

The n is only necessary because ã includes the original string.
It should be 5 bytes:
n¢ãÍx

As according to the docs, when passed a function f, ã “returns all substrings of S after passing each through f.”
But there's a bug in the interpreter, and Japt isn't maintained anymore, so 6 bytes it is.

Scala 2, 156 147 140 bytes
A port of @DW.com's C# answer in Scala.
Saved 16 bytes thanks to @ceilingcat

Golfed version. Attempt This  Online!
i=>{var p=Integer.toBinaryString(i).size;var r=0;var P=i;do{var s=0;var z=P;do{z/=2;r+=z;s+=1;}while(s<p);P=i+i&(1<<p)-2;p-=1}while(-1<p);r}

Ungolfed version. Attempt This Online!
object Main {
  def main(args: Array[String]): Unit = {
    var i = 2
    do {
      println(s"$i -> ${x(i)}")
      i += 1
    } while (i < 12)
    scala.io.StdIn.readLine() // to mimic System.Console.Read() for pausing
  }

  def x(iOrg: Int): Int = {
    var pos = Integer.toBinaryString(iOrg).length
    var shift = 0
    var retVal = 0
    var iPrev = iOrg
    var iTemp = 0

    do {
      iTemp = iPrev
      shift = 0
      do {
        iTemp >>= 1
        retVal += iTemp
        shift += 1
      } while (shift < pos)
      iPrev = (iOrg & ((1 << pos - 1) - 1)) << 1
      pos -= 1
    } while (pos > -1)
    retVal
  }
}

Python 3, 96 bytes
def f(n):N=f"{n:b}";L=len(N);r=range;return sum(int(N[i:i+l],2)for l in r(1,L)for i in r(L-l+1))

Try it online!
Improved version of shooqies answer.

PARI/GP, 72 bytes
72 bytes, it can be golfed more.
f(n)=sum(i=1,(#b=binary(n))-1,sum(j=1,#b-i+1,fromdigits(b[j..j+i-1],2)))

Attempt This Online!

PowerShell v2+, 138 Bytes
param($a)$a=[convert]::ToString($a,2);(($b=$a.length-1)..1|%{$l=$_;0..($b-$l+1)|%{[convert]::ToInt32($a.substring($_,$l),2)}})-join'+'|iex

Ooof. That conversion to/from binary is expensive.
Takes input $a, then uses the .NET call [convert]::ToString($a,2) to turn it into the binary representation. From there, we go through two loops -- the first counts backwards from the end of the string down to 1, and the second counts upward from 0. (The first is how long of a substring to pull out, and the second is the index of where in the string to start the substring.) We set a helper $l along the way to pass that through to the inner loop.
Inside the inner loop, we use another .NET call [convert]::ToInt32() to convert the appropriate .substring() from base 2 into an integer. Each of those is then left on the pipeline. We encapsulate all of that with parens () and -join them together with a +, then toss that off to iex (short for Invoke-Expression and similar-ish to eval).
I think this technically requires v2 or newer to properly call the .NET calls.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/