Skip to content

Instantly share code, notes, and snippets.

:octocat:
Rust > C++ > Go > TypeScript > C

Samuel Marks SamuelMarks

:octocat:
Rust > C++ > Go > TypeScript > C
Block or report user

Report or block SamuelMarks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View todo_app.py
from json import dumps, loads
from uuid import uuid4
from collections import OrderedDict
from klein import Klein
from exceptions import BaseException
class UniqueKeyError(BaseException):
pass
View server.py
from os import environ
from json import dumps, loads
from uuid import uuid4
from collections import OrderedDict
from klein import Klein
from exceptions import Exception
from pprint import PrettyPrinter
View build-libprotobuf.log
Warning 1 warning MSB8028: The intermediate directory (Release\) contains files shared from another project (libprotobuf-lite.vcxproj, libprotoc.vcxproj, lite-test.vcxproj, protoc.vcxproj, tests.vcxproj, test_plugin.vcxproj). This can lead to incorrect clean and rebuild behavior. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets 381 5 libprotobuf
Error 2 error C2146: syntax error : missing ';' before identifier 'ThreadCache' E:\Projects\protobuf\src\google\protobuf\arena.h 315 1 libprotobuf
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int E:\Projects\protobuf\src\google\protobuf\arena.h 315 1 libprotobuf
Error 4 error C2146: syntax error : missing ';' before identifier 'ThreadCache' E:\Projects\protobuf\src\google\protobuf\arena.h 315 1 libprotobuf
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int E:\Projects\protobuf\src\google\protobuf\arena.h 315 1 libprotobuf
Error 6 error C214
View Main.hs
module Main where
import Test
import Data.Typeable
main :: IO ()
main = do
putStrLn $ show $ double 2
putStrLn $ show $ quadruple 2
putStrLn $ show $ factorial 10
View output
beautifulsoup4==4.3.2
bettertutors-rest-api==0.2.5
bettertutors-user-api==0.2.8
bottle==0.12.8
gunicorn==19.2.1
six==1.9.0
waitress==0.8.9
WebOb==1.4
WebTest==2.0.18
@SamuelMarks
SamuelMarks / setup.py
Last active Aug 29, 2015
An attempt to explicitly installs package dependencies **before** running `setuptools.setup`…
View setup.py
from pip.commands import install
from pip.exceptions import DistributionNotFound
def setup2(**kwargs):
kwargs['install_requires'] = kwargs.get('dependency_links', []) + kwargs.get('install_requires', [])
if path.exists('requirements.txt'):
kwargs['install_requires'] += open('requirements.txt', 'r').readlines()
View gen_png_from_dot.bash
#!/usr/bin/env bash
if [ -z "$1" ]; then
>&2 echo "Usage: gen_png_from_dot <dot_file> <png_location=exports>"
exit 1
fi
while inotifywait -e close_write "$1";
do `which dot` -Tpng -o "${2:-exports}/${1%???}.png" "$1";
done
@SamuelMarks
SamuelMarks / cloud.md
Last active Aug 29, 2015
Docker cloud: PaaS, orchestration, resource-sharing, provisioning
View cloud.md

Experimenting with Docker technologies and related supporting infrastructure, as I'm sure many of you are.

Disclaimer: seeking an opinionated architecture, not a wiki (like: https://github.com/veggiemonk/awesome-docker)

In essence, I am building an open-source cloud that:

  • fans-in/out elastically

  • supports multiple public and private cloud providers

@SamuelMarks
SamuelMarks / CMakeLists.txt
Created Nov 17, 2015
phc-winner-argon2 CMake
View CMakeLists.txt
cmake_minimum_required(VERSION 3.3)
project(phc_winner_argon2)
set(SOURCE_FILES
src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c)
set(SRC_RUN src/run.c)
set(SRC_BENCH src/bench.c)
set(SRC_GENKAT src/genkat.c)
set(RUN argon2)
View split_session.py
#!/usr/bin/env python
import json
from sys import argv
from os import path
with open(argv[1]) as f:
s = f.readlines()
session = json.loads(s[4])
You can’t perform that action at this time.