Skip to content

Instantly share code, notes, and snippets.

if(a != b) {
return 0;
} else if(c > d) {
return 1;
} else if(e != f) {
e++;
return 3;
} else {
a.doSomeStuff();
c.makeSomeThingsWith(b);
#include <stdlib.h>
#include <string.h>
#define false 0
#define true 1
typedef int bool;
bool error(int depth) {
if(depth == 0) {
return true;
NotEmptyList<T> getItems(); // always has at least one element.
List<T> maybeGetItems(); // might have zero elements.
T average(NotEmptyList<T> items) {
T value = 0;
for (T item: items.get()) {
value += item;
}
return value / items.get().size();
}
isPosix = os.name == 'posix'
isNt = os.name == 'nt'
isWin9x = os.name == 'win9x'
isMac = os.name == 'macos'
if isPosix:
do_posix_version()
elif isNt:
do_window_version()
elif isWin9x:
10000000 1381753 V2WUU2
10000000 221103 A0A0W0FIN8
10000001 1381753 V2XGB0
10000001 221103 A0A0W0F6P5
1000000 192259 S8BUG6
10000002 1381753 V2XRT4
10000002 221103 A0A0W0F264
10000003 1381753 V2WQU0
10000003 221103 A0A0W0EWU1
10000004 1381753 V2XU54
use std::fs::File;
use pbr::ProgressBar;
use std::io::Read;
pub struct ProgressFile {
file: File,
progress: ProgressBar<::std::io::Stdout>,
}
impl ProgressFile {
start
test_mock (test_upload.UploaderTest) ... FAIL
NoneType: None
======================================================================
FAIL: test_mock (test_upload.UploaderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py", line 1191, in patched
return func(*args, **keywargs)
#![allow(unused_imports)]
extern crate regex;
#[macro_use]
extern crate lazy_static;
extern crate itertools;
extern crate pbr;
extern crate colored;
use std::collections::VecDeque;
use itertools::Itertools;
use pbr::ProgressBar;
extern crate itertools;
extern crate linked_hash_set;
use itertools::Itertools;
use std::collections::HashMap;
use std::collections::HashSet;
use linked_hash_set::LinkedHashSet;
#[derive(Debug, Copy, Clone)]
enum OpType {
use quickcheck::*;
use fasthash::MetroHasher;
use itertools::Itertools;
use im_rc::hashset::HashSet;
fn make_std_set(items: &[i32]) -> std::collections::HashSet<i32> {
items.iter().cloned().collect()
}
fn make_set(items: &[i32]) -> HashSet<i32, MyHasher> {