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
// vim: ts=2 sw=2 et | |
#include <cassert> | |
#include <algorithm> | |
#include <vector> | |
#include <iostream> | |
template <typename Container, typename Predicate> | |
void | |
RemoveIf(Container& container, Predicate predicate) |
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
// vim: ts=2 sw=2 et | |
#include <cmath> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <atomic> | |
#include <vector> | |
namespace bits { | |
template <typename Storage, bool Atomic> |
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 math import ( | |
pi, | |
cos, | |
sin, | |
log, | |
atan, | |
exp | |
) | |
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/env python | |
from boto import connect_s3 | |
from argparse import ArgumentParser | |
from tempfile import TemporaryFile | |
from shutil import copyfileobj | |
from ssl import SSLError | |
from socket import error as SocketError | |
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 | |
func main() { | |
for i:= 0; i < 1000000; i++ { | |
400c00: 48 31 c0 xor %rax,%rax | |
400c03: 48 3d 40 42 0f 00 cmp $0xf4240,%rax | |
400c09: 7d 0b jge 400c16 <main.main+0x16> | |
400c0b: 48 ff c0 inc %rax | |
400c0e: 48 3d 40 42 0f 00 cmp $0xf4240,%rax | |
400c14: 7c f5 jl 400c0b <main.main+0xb> |
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
a.out: file format elf64-x86-64 | |
Disassembly of section .init: | |
00000000004003a8 <_init>: | |
4003a8: 48 83 ec 08 sub $0x8,%rsp | |
4003ac: 48 8b 05 45 0c 20 00 mov 0x200c45(%rip),%rax # 600ff8 <_DYNAMIC+0x1d0> | |
4003b3: 48 85 c0 test %rax,%rax |
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
#include <cmath> | |
#include <algorithm> | |
#include <iostream> | |
#include <tuple> | |
#include <vector> | |
int | |
main() | |
{ | |
using namespace std; |
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
#!/bin/bash | |
# vim: ts=2 sw=2 et ai tw=80 | |
################################################################################ | |
# Script designed to shape system bandwidth usage based on the very fine | |
# reference found https://www.iplocation.net/traffic-control | |
################################################################################ | |
set -e | |
# -- CONSTANTS | |
TC=/sbin/tc |
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 sys import stdin | |
def compute(A, B): | |
A.sort(reverse=True) | |
B.sort(reverse=False) | |
return sum(i * j for i, j in zip(A, B)) | |
test_cases = int(next(stdin)) | |
for case in range(test_cases): | |
_ = next(stdin) |
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
#include "ExitHandler.hpp" | |
#include <cstdlib> | |
#include <vector> | |
namespace ExitHandler { | |
namespace { | |
std::vector<AtExitFunctor> Functors; |