This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dt = datetime.datetime.utcfromtimestamp(seconds_since_epoch) | |
iso_format = dt.isoformat() + 'Z' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
""" | |
parse.py is a simple Python script which converts a feature file written by the Driver GUI | |
application (part of NNRCCar) into octave matrix files suitable for training the neural network. | |
This script expects to find the input file nnrccar.features in the current directory. It outputs | |
files y.dat and X.dat which are expected input to the octave script nnrcar.m | |
""" | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class S{public static void main(String...a){int i=a[0].indexOf(48),j;char | |
k=48,c[]=a[0].toCharArray();if(i<0)System.out.print(c);else | |
for(;++k<58;){for(j=81;j-->0&&((j-i)%9*(j/9^i/9)*(j/27^i/27|j%9/3^i%9/3) | |
|c[j]^k)!=0;);c[i]=k;if(j<0)main("".valueOf(c));}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p:+{(=x)x}'p,,3/:_(p:,/'+:\9#'!9)%3 | |
1@,/$*{$[&/x;,x;,/.z.s'@[x;i;:;]'&27=x[,/p i:x?0]?!10]}@.:'*.z.x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(int j,char**V){char*R=V[1],i=0,k=48,x;for(;*R>k;*++R||puts(R-i))++i; | |
for(;++k<58;*R=1)for(j=81;j--&&R[x=j-i]^k|x%9*(j/9-i/9)* | |
(j/27^i/27|j%9/3^i%9/3);)!j&&main(*R=k,V);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(int j,char**V){char*R=V[1],i=0,k=48;for(;*R>k;*++R|| | |
puts(R-i))++i;for(;++k<58;*R&&main(*R=k,V),*R=1)for(j=81;j | |
--;)*R*=R[j-i]-k||i/9^j/9&&i%9^j%9&&i/27^j/27|i%9/3^j%9/3;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def r(a){def i=a.indexOf(48);if(i<0)print a else(('1'..'9')-(0..80).collect{ | |
j->g={(int)it(i)==(int)it(j)};g{it/9}|g{it%9}|g{it/27}&g{it%9/3}?a[j]:'0'}) | |
.each{i==0?r(it+a[i+1..-1]):r(a[0..<i]+it+a[i+1..-1])}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z""a=a | |
z('0':b)t=foldr(++)""[z b$t++[x]|x<-['1'..'9'],notElem x | |
d]where{d=[h$m`mod`9+i*9|i<-a]++[h$m-j 9+i|i<-a]++[h$i*9`mod`26+m-j 3-j | |
27+j 9|i<-a];j=mod m;m=length t;h=(!!)$t++'0':b;a=[0..8]} | |
z(c:b)a=z b$a++[c] | |
main=do | |
a<-getLine | |
putStr$z a"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open String let rec s p=try let rec(%)=(mod)and i=index p '0'and b | |
j=i<>j&(i/9=j/9||i%9=j%9||i/27=j/27&i%9/3=j%9/3)&p.[i]=p.[j]||j<80&b(j+1)in | |
iter(fun c->p.[i]<-c;b 0||()=s p;())"948721536";p.[i]<-'0'with | |
_->print_string p;;s(read_line()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$_=$`.$_.$'.<>;split//;${/[@_[map{$i-($i="@-")%9+$_,9*$_+$i% | |
9,9*$_%26+$i-$i%27+$i%9-$i%3}0..8]]/o||do$0}for/0/||print..9 |
OlderNewer