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
running 2 tests | |
test pool_tests::dont_drop ... Completed in 1 iterations | |
ok | |
test pool_tests::dont_drop_across_threads ... thread 'main' panicked at 'assertion failed: item.drop.load(Ordering::SeqCst)', src/pool_tests.rs:78:9 | |
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | |
thread 'main' panicked at 'cannot access a scoped thread local variable without calling `set` first', /Users/voletibv/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:186:9 | |
stack backtrace: | |
0: 0x107636045 - backtrace::backtrace::libunwind::trace::h911c6edb13c01562 | |
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88 |
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
Running target/release/deps/bench-95eabc715d9c749f | |
Gnuplot not found, using plotters backend | |
Benchmarking insert_remove_local/sharded_slab/100: Warming up for 3.0000 s | |
Warning: Unable to complete 100 samples in 15.0s. You may wish to increase target time to 32.4s or reduce sample count to 40. | |
Benchmarking insert_remove_local/sharded_slab/100: Collecting 100 samples in estimated 32.414 insert_remove_local/sharded_slab/100 | |
time: [22.860 us 23.181 us 23.506 us] | |
Found 3 outliers among 100 measurements (3.00%) | |
3 (3.00%) high mild | |
Benchmarking insert_remove_local/slab_biglock/100: Collecting 100 samples in estimated 15.714 insert_remove_local/slab_biglock/100 | |
time: [193.69 us 195.18 us 196.37 us] |
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
async fn handle_graphql( | |
ctx: AppData<Context>, | |
query: body::Json<juniper::http::GraphQLRequest>, | |
) -> Response { | |
let response = query.execute(&Schema::new(Query, Mutation), &ctx); | |
debug!("Query: {:?} response: {}", query, response); | |
let status = if response.is_ok() { | |
StatusCode::OK | |
} else { | |
StatusCode::BAD_REQUEST |
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
void insertion_sort(int list[], int length) | |
{ | |
int j = 1; | |
int key = list[j]; | |
std::cout << key << std::endl; | |
while(j < length) | |
{ | |
int i = j - 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
import time | |
import random | |
import os | |
def read_grid(array): | |
""" | |
Reads a given grid from a text file and sanitizes it to be used with the | |
script. | |
Keyword arguments: |
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
# Object oriented implementaition of Conway's Game of life | |
import random | |
import time | |
import os | |
class GOL(): | |
def __init__(self, rows, cols, delay, num_generations,\ | |
alive_cell="*", dead_cell="."): | |
self.rows = rows | |
self.cols = cols |
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
var Person = function(p) { | |
this.firstName = p.firstName; | |
this.lastName = p.lastName; | |
this.age = p.age; | |
this.setFirstName = function(name){ | |
if(typeof name != 'string'){ | |
throw ': NameError: Hey my should be a proper name man!'; | |
} | |
else { |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
# This line does not work anymore as the script has moved to https://www.npmjs.com/install.sh | |
# curl https://www.npmjs.org/install.sh | sh |
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
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): |
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
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): |