View gale_2.csv
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
man_1_preference_1 | man_1_preference_2 | man_2_preference_1 | man_2_preference_2 | woman_1_preference_1 | woman_1_preference_2 | woman_2_preference_1 | woman_2_preference_2 | woman_1_mariage | woman_2_mariage | ||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | ||
1 | 2 | 1 | 2 | 1 | 2 | 2 | 1 | 1 | 2 | ||
1 | 2 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | ||
1 | 2 | 1 | 2 | 2 | 1 | 2 | 1 | 2 | 1 | ||
1 | 2 | 2 | 1 | 1 | 2 | 1 | 2 | 1 | 2 | ||
1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 2 | ||
1 | 2 | 2 | 1 | 2 | 1 | 1 | 2 | 1 | 2 | ||
1 | 2 | 2 | 1 | 2 | 1 | 2 | 1 | 1 | 2 |
View lib.rs
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
#[derive(Clone, Debug, PartialEq)] | |
struct B { | |
x: bool, | |
y: f64, | |
} | |
pub trait AutoVec { | |
type Vec; | |
} |
View ethernet_delayed_echo_server.rs
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
// See https://www.reddit.com/r/rust/comments/yaqsqe/how_to_delay_lots_of_synchronous_actions/?sort=new | |
use pnet::datalink::{self}; | |
use pnet::datalink::Channel::Ethernet; | |
use pnet::datalink::DataLinkSender; | |
use pnet::packet::ethernet::MutableEthernetPacket; | |
use std::sync::mpsc; | |
use std::time::Instant; | |
fn main() { |
View advent_of_code_exercice_6.py
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
import sys | |
from numpy import * | |
from collections import Counter | |
n = int(sys.argv[1]) | |
def mat_fun(i,j): return (j == (i+1)%9) | ((i==6) & (j==0)) | |
M = matrix(fromfunction(mat_fun, (9, 9)), dtype=int)**n | |
ages=Counter(map(int,input().split(','))) | |
sizes=array([ages[i] for i in range(9)]) | |
print(M.dot(sizes).sum()) |
View asyncua_performance_measure.py
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
from asyncua import ua | |
from asyncua.ua import ua_binary | |
import sys | |
import timeit | |
obj = ua.WriteParameters(NodesToWrite=[ | |
ua.WriteValue( | |
NodeId_=ua.NodeId("hello_world"), | |
Value=ua.DataValue( | |
Value= |
View id_ed25519.pub
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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGZ4MWfrK3MrBbfj+xP72A5Up2JT5p6pT9fv1UmNs4WF ophir-x1 |
View read_logs.go
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
package main | |
import ( | |
"compress/gzip" | |
"context" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"os" |
View read_gzip_lines.go
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
package main | |
import ( | |
"bufio" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
) |
View dezoomify-cloudflare-worker.js
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
/** | |
* This is a cloudflare worker for dezoomify | |
*/ | |
/** | |
* Respond to the request | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { |
View fork_bomb.rs
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
use std::process::Command; | |
use std::env; | |
use std::process; | |
use std::time::SystemTime; | |
use crossbeam; // 0.7.3; | |
pub fn main() { | |
let myself = env::current_exe().expect("no current exe"); | |
let n: u64 = env::args() | |
.enumerate() |
NewerOlder