Skip to content

Instantly share code, notes, and snippets.

View SnipyJulmy's full-sized avatar
🐻
Yolo

Sylvain Julmy SnipyJulmy

🐻
Yolo
View GitHub Profile

Keybase proof

I hereby claim:

  • I am snipyjulmy on github.
  • I am snipy (https://keybase.io/snipy) on keybase.
  • I have a public key ASBX0Xc5YD5m4C0-tphLyPxt6KwihT3fS_Aofo0pa13q-wo

To claim this, I am signing this object:

Run experiment on any_cycle1_any_cycleN_10_3_10_1_4
Test set: Average loss: -0.9990, Accuracy: 20000/20000 (100%)
Run experiment on any_cycle1_any_cycleN_10_3_10_2_5
Test set: Average loss: -0.9985, Accuracy: 19997/20000 (100%)
Run experiment on any_cycle1_no_cycleN_10_3_10_1_4
Test set: Average loss: -0.9993, Accuracy: 20000/20000 (100%)
Run experiment on any_cycle1_no_cycleN_10_3_10_2_5
Test set: Average loss: -0.9993, Accuracy: 20000/20000 (100%)
Run experiment on any_cycle1_one_cycleN_10_3_10_1_4
Test set: Average loss: -0.9991, Accuracy: 20000/20000 (100%)
@SnipyJulmy
SnipyJulmy / mysql_lost_connection_error.txt
Created December 1, 2018 14:14
mysql lost connection to server error
thingy_yellow_server | events.js:183
thingy_yellow_server | throw er; // Unhandled 'error' event
thingy_yellow_server | ^
thingy_yellow_server |
thingy_yellow_server | Error: Connection lost: The server closed the connection.
thingy_yellow_server | at Protocol.end (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:112:13)
thingy_yellow_server | at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:97:28)
thingy_yellow_server | at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:502:10)
thingy_yellow_server | at emitNone (events.js:111:20)
thingy_yellow_server | at Socket.emit (events.js:208:7)
@SnipyJulmy
SnipyJulmy / ex5_test.pl
Created November 28, 2018 09:53
Test s10 ex5
go :-
L1 = ['a','b','(','c','c',')','*'],
exp(Ast,L1,[]),
writef("%q",[Ast]), nl,
Ast = exp([char(a),char(b),iter(exp([char(c),char(c)]))]),
L2 = ['a'],
exp(Ast2,L2,[]),
writef("%q",[Ast2]),nl,
Ast2 = exp([char(a)]),
L3 = ['a','b','c'],
@SnipyJulmy
SnipyJulmy / ex1.pl
Created November 21, 2018 10:09
Ex1 from series 09
/*
* File : ex1.pl
* Exercice : 1
* Description : Series 10 of the Functionnal and Logic Programming course at UniFR
* Author : Sylvain Julmy
* Email : sylvain.julmy(at)unifr.ch
*/
% Ex1.1
% DCG that recognize the language [0]*[1][0]*[1]
@SnipyJulmy
SnipyJulmy / fibonacci_CPS.hs
Created October 26, 2018 10:21
Fibonacci in CPS style
fib :: Int -> Int
fib n = inner n (\x -> x) where -- setup the identity function for the base cases
inner :: Int -> (Int -> Int) -> Int
inner 0 cont = cont 0 -- base case for fibonacci, first two number are known
inner 1 cont = cont 1
-- 1st : function is tail recursive, so we call inner no matter what
-- we have to progress to the base case, so we decrement n
-- since fib n = fib (n-1) + fib (n-2), we already have the call to (n-1)
-- and have to add the call to (n-2)
-- the call to inner (n-2) also need a continuation function, which is juste x + y since both (n-1) and (n-2) have to be summed