This file contains hidden or 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 tqdm import tqdm | |
import requests | |
url = "http://download.thinkbroadband.com/10MB.zip" | |
response = requests.get(url, stream=True) | |
with open("10MB", "wb") as handle: | |
for data in tqdm(response.iter_content()): | |
handle.write(data) |
This file contains hidden or 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 | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
This file contains hidden or 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
#define MEMBER_LIFT_CLASS(m) \ | |
struct member_##m { \ | |
template<class T, class... Ts> \ | |
auto operator()(T&& x, Ts&&... xs) const -> decltype(x.m(std::forward<Ts>(xs)...)) \ | |
{ return x.m(std::forward<Ts>(xs)...); } \ | |
}; |
This file contains hidden or 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 | |
while read x ; do echo $x ; done \ | |
| sed -e "s/.*error:.*/\x1b[1;36m&\x1b[0m/" \ | |
-e "s/.*warning:.*/\x1b[1;36m&\x1b[0m/" \ | |
-e "s/^\(.*\)\(required from\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
-e "s/^\(.*\)\(In instantiation of\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
-e "s/^\(.*\)\(In member\)/\x1b[1;36m\1\x1b[0mnote: \2/" \ | |
| sed -e "s/error:/\x1b[1;31m&\x1b[1;36m/" \ | |
-e "s/warning:/\x1b[1;35m&\x1b[1;36m/" \ | |
-e "s/note:/\x1b[1;30m&\x1b[0m/" |
This file contains hidden or 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 <boost/hana.hpp> | |
#include <iostream> | |
#include <string> | |
#include <type_traits> | |
#include <utility> | |
#include <memory> | |
#include <cassert> | |
using namespace boost::hana; | |
using namespace boost::hana::literals; |
This file contains hidden or 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
diff --git a/Makefile.osx b/Makefile.osx | |
index 2318559..95199f9 100644 | |
--- a/Makefile.osx | |
+++ b/Makefile.osx | |
@@ -1,35 +1,46 @@ | |
+PREFIX := /usr/local | |
+MACOS_SDK_PATH := | |
CXX := g++ | |
CC := gcc |
This file contains hidden or 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
--- Makefile.in.orig 2012-10-28 05:30:09.000000000 -0500 | |
+++ Makefile.in 2013-12-10 12:36:34.000000000 -0600 | |
@@ -1,6 +1,8 @@ | |
+PREFIX := @prefix@ | |
CXX := @CXX@ | |
-CXXFLAGS := -DHAVE_LIBSAMPLERATE -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DNDEBUG @CXXFLAGS@ @SRC_CFLAGS@ @SNDFILE_CFLAGS@ @FFTW_CFLAGS@ @Vamp_CFLAGS@ -Irubberband -I. -Isrc $(OPTFLAGS) | |
+CC := @CC@ | |
+CXXFLAGS := -DHAVE_LIBSAMPLERATE -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DNDEBUG -Irubberband -I. -Isrc @CXXFLAGS@ @SRC_CFLAGS@ @SNDFILE_CFLAGS@ @FFTW_CFLAGS@ @Vamp_CFLAGS@ $(OPTFLAGS) | |
CFLAGS := @CFLAGS@ $(OPTFLAGS) |
This file contains hidden or 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 <vector> | |
#include <map> | |
#include <set> | |
#include <string> | |
#include <iostream> | |
#include <tuple> | |
#include <fit/always.h> | |
#include <fit/capture.h> | |
#include <fit/identity.h> | |
#include <fit/fix.h> |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <list> | |
#include <tick/builder.h> | |
#include <tick/requires.h> | |
#include <fit/lambda.h> | |
#include <fit/function.h> | |
#include <fit/conditional.h> | |
#include <fit/reveal.h> |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <list> | |
#define REQUIRES(...) typename std::enable_if<(__VA_ARGS__), int>::type = 0 | |
#define REQUIRE_OF(...) template<class Id> using apply = typename std::enable_if<(Id()(__VA_ARGS__)), int>::type | |
template<class T> | |
struct always_void |