File reading: 18 ms
JSON parse: 2243 ms
Vertex parse: 1818 ms
Find routes: 9468 ms
----
Total time: 13548 ms
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
pub struct Vertice { | |
pub source: int, | |
pub target: int, | |
pub weight: int, | |
} | |
pub struct Node { | |
pub id: int, | |
pub vertices: Vec<Vertice>, | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>feedly from @unfo</title> | |
</head> | |
<body> | |
<outline text="Must Read" title="Must Read"> | |
<outline type="rss" text="Ho/Ax (@snare)" title="Ho/Ax (@snare)" xmlUrl="http://ho.ax/feed.xml" htmlUrl="http://ho.ax//"/> | |
<outline type="rss" text="lcamtuf's blog" title="lcamtuf's blog" xmlUrl="http://lcamtuf.blogspot.com/feeds/posts/default" htmlUrl="http://lcamtuf.blogspot.com/"/> |
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
# Should be used with | sort | uniq -c | |
# Example input: | |
# 2 0 | |
# 3 1 | |
# 46 2 | |
# 6 3 | |
# 20 4 | |
# 115 5 | |
function draw_graph() { | |
awk 'BEGIN { highest= -1 } { sum += $1; items += 1 ; if ($1 > highest) { highest = $1 } ; values[$2] = $1; } END { print highest; for (val in values) { print values[val] " " val } }' | \ |
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 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
extern crate hyper; | |
use hyper::*; | |
fn main() { | |
let mut client = client::Client::new(); | |
let res = client.get("http://ip.nebula.fi/").send().unwrap(); | |
println!("Got response: {:?}", res.status_raw); | |
let mut contents = String::new(); |
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
Host *.labs.overthewire.org | |
SendEnv WECHALLTOKEN | |
SendEnv WECHALLUSER |
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
#!/usr/bin/python | |
import sys | |
def min_needed(percentage, decimals): | |
top = 1.0 | |
bottom = 1.0 | |
percentage = round(percentage, decimals) | |
current = round(100 * (top / bottom), decimals) |
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
|----------------- eax -----------------| | |
|-- ah -| |-- al -| | |
0001 0001 1000 1000 0000 0000 1111 1111 | |
<< 8 | |
1000 1000 0000 0000 1111 1111 0000 0000 |
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 SimpleHTTPServer | |
import SocketServer | |
import logging | |
import cgi | |
import sys | |
if len(sys.argv) > 2: | |
PORT = int(sys.argv[2]) |