Skip to content

Instantly share code, notes, and snippets.

View yvan-sraka's full-sized avatar

Yvan Sraka yvan-sraka

View GitHub Profile
diff --git a/predict.py b/predict.py
index 716e2cd9..e2a2716f 100755
--- a/predict.py
+++ b/predict.py
@@ -90,24 +90,15 @@ def predict(foldrec_path: str, N=20, method: str='lr', verbose: bool=True):
key = (lambda x: x[2])
result.sort(key=key, reverse=True)
remove_all_pdbs('./tmp_pdb')
- for i in range(N):
+ for i in range(len(result)):
commit 3fafd3b97570a14a556520bc71481de4925e9580
Author: Yvan Sraka <[email protected]>
Date: Fri Dec 14 23:34:14 2018 +0100
WIP
diff --git a/about.md b/about.md
new file mode 100644
index 0000000..e169676
--- /dev/null
commit 8fd71c8755ca9eebe7a7ae0a3c3595cede043f1b
Author: Yvan Sraka <[email protected]>
Date: Sun Oct 28 20:44:57 2018 +0100
Add option to let user set redefine block symbol, e.g.: `-s="///!//"`
diff --git a/README.md b/README.md
index 9c539de..815701e 100644
--- a/README.md
+++ b/README.md
[20151118182938.046]0x00000000: 20151118182938.046 #gps start
[20151118182957.674]0x00000001: 20151118182957.674 #gps stop
[20151118192547.229]0x00000000: 20151118192547.229 #gps start
[20151118192615.735]0x00000001: 20151118192615.735 #gps stop
[20151118204420.455]0x00000000: 20151118204420.455 #gps start
[20151118204450.098]0x00000001: 20151118204450.098 #gps stop
[20151119010755.493]0x00000000: 20151119010755.493 #gps start
[20151119010756.105]0x00000001: 20151119010756.105 #gps stop
[20151119010756.497]0x00000000: 20151119010756.497 #gps start
[20151119010858.593]0x00000001: 20151119010858.593 #gps stop
// Hopfield.cpp
// (Discrete (Binary)) Hopfield Artificial Neural Network (ANN)
// For more info see:
// http://en.wikipedia.org/wiki/Hopfield_net
// http://www.scholarpedia.org/article/Hopfield_network
// Compiler used: Dev-C++ 4.9.9.2
// FB - 201011136
#include <iostream>
#include <conio.h> // getch()
using namespace std;
import Data.List (sortBy)
import Data.Ord (comparing)
import Text.Printf (printf)
-- (name, (value, weight))
items = [("beef", (36, 3.8)),
("pork", (43, 5.4)),
("ham", (90, 3.6)),
("greaves", (45, 2.4)),
("flitch", (30, 4.0)),

jsrt README

jsrt is a simple to understand Javascript implementation of ray tracing that was designed mainly to be easy to understand and modify. It only supports very basic features (spheres and planes are the only objects you can render) but is fast enough to render small animations in real time.

If you want to see it in action, there is a demo here.

@yvan-sraka
yvan-sraka / parallax_tgas.ipynb
Created March 25, 2018 19:58 — forked from eteq/parallax_GaiaDR2.ipynb
An demonstration of parallax using stars near the sun from the Gaia mission, astropy, astroquery, and matplotlib.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yvan-sraka
yvan-sraka / gradient_descent.py
Created March 19, 2018 19:10
Gradient Descent
def gradient_descent(point,step_size,threshold):
value = f(point)
new_point = point - step_size * gradient(point)
new_value = f(new_point)
if abs(new_value - value) < threshold:
return value
return gradient_descent(new_point,step_size,threshold)
// ********************************************************
// Les includes
// ********************************************************
#include <winsock2.h> // pour les fonctions socket
#include <cstdio> // Pour les Sprintf
#include <stdio.h> // Pour les Sprintf
#include <string>
#include <iostream>
using namespace std;
// ********************************************************