I hereby claim:
- I am eloff on github.
- I am eloff (https://keybase.io/eloff) on keybase.
- I have a public key ASDauBK53p6pr6rbzVuveMaf3Hz9E-CJP1Xr2XuGnSkpgAo
To claim this, I am signing this object:
| use std::sync::atomic::{AtomicUsize, Ordering}; | |
| use std::thread; | |
| fn main() { | |
| static COUNTER: AtomicUsize = AtomicUsize::new(0); | |
| let cores = core_affinity::get_core_ids().expect("Failed to get core IDs"); | |
| let writer_core = cores.first().unwrap().clone(); | |
| let reader_core = cores.last().unwrap().clone(); |
| package fitnesse.html; | |
| import fitnesse.responders.run.SuiteResponder; | |
| import fitnesse.wiki.*; | |
| public class SetupTeardownIncluder { | |
| private PageData pageData; | |
| private boolean isSuite; | |
| private WikiPage testPage; | |
| private StringBuffer newPageContent; |
| package fitnesse.html; | |
| import fitnesse.responders.run.SuiteResponder; | |
| import fitnesse.wiki.*; | |
| // Note: I did not compile or run this, so it may have stupid errors | |
| public class TestableHtml { | |
| private PageData pageData; | |
| private WikiPage wikiPage; | |
| private PageCrawler pageCrawler; |
| pub use std::sync::{MutexGuard, RwLockReadGuard, RwLockWriteGuard}; | |
| use std::sync::{TryLockError, Mutex, RwLock}; | |
| pub struct SimpleMutex<T>(Mutex<T>); | |
| impl<T> SimpleMutex<T> { | |
| pub const fn new(t: T) -> Self { | |
| Self(Mutex::new(t)) | |
| } |
| // Public Domain | |
| use bytes; | |
| struct BytesAlike { | |
| data: *const u8, | |
| len: usize, | |
| _1: usize, | |
| _2: usize, | |
| } |
| use std::io; | |
| use std::result::Result; | |
| use rustls::{IoState, ClientConfig, ServerConfig, ClientConnection, ServerConnection, Connection, ServerName, Reader, Writer}; | |
| pub enum TransportTls { | |
| NoTls, | |
| Client(ClientConnection), | |
| Server(ServerConnection), | |
| } |
I hereby claim:
To claim this, I am signing this object:
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| fmt.Println(subset([]string{"test1", "test2", "test2"}, []string{"test1", "test2"})) | |
| } |
| def flatten src_array | |
| flat = [] | |
| # It would be more readable to just call flat.concat(flatten(...)) recurisvely | |
| # but that creates and destroys a lot of intermediate arrays, which may be costly | |
| append_all(flat, src_array) | |
| flat | |
| end | |
| def append_all dest_array, src_array | |
| src_array.each do |value| |
| from urlparse import urlparse, urlunparse | |
| from urllib import urlencode | |
| def add_query_args(uri, **params): | |
| parts = list(urlparse(uri)) | |
| qs = urlencode(params) | |
| if parts[4]: | |
| parts[4] += '&' + qs | |
| else: | |
| parts[4] = qs |