- Reference GO code: https://gist.github.com/ernado/9d6bb51ab91887cc02a9540df4fb535d
- Reference C++ code: https://habr.com/ru/post/450512/#comment_20140076
- rust = 636ms
- gcc = 653ms
- go = 663ms
- clang = 799ms
Roughly 10ms deviations observed.
| alias gd='git diff' | |
| alias gst='git status' | |
| alias gc='git commit -v' | |
| alias ga='git add' | |
| alias gb='git branch' | |
| alias gds='git diff --staged' | |
| alias gp='git push' | |
| alias gup='git pull --rebase' | |
| alias gupa='git pull --rabase --autostash' | |
| alias gco='git checkout' |
| @import url('http://fonts.googleapis.com/css?family=Crimson+Text'); | |
| @import url('http://fonts.googleapis.com/css?family=Source+Code+Pro'); | |
| /* Change code font */ | |
| .CodeMirror pre { | |
| font-family: 'Input Mono Narrow', 'Source Code Pro', Consolas, monocco, monospace; | |
| } | |
| div.input_area { | |
| border-color: rgba(0,0,0,0.10); |
| import ctypes | |
| class MKLThreads(object): | |
| _mkl_rt = None | |
| @classmethod | |
| def _mkl(cls): | |
| if cls._mkl_rt is None: | |
| try: |
| def lighten_color(color, amount=0.5): | |
| """ | |
| Lightens the given color by multiplying (1-luminosity) by the given amount. | |
| Input can be matplotlib color string, hex string, or RGB tuple. | |
| Examples: | |
| >> lighten_color('g', 0.3) | |
| >> lighten_color('#F034A3', 0.6) | |
| >> lighten_color((.3,.55,.1), 0.5) | |
| """ |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| # Based on Ubuntu 16.04 | |
| config.vm.box = "ubuntu/xenial32" | |
| config.vm.provider "virtualbox" do |vb| | |
| # Customize VirtualBox machine |
Roughly 10ms deviations observed.
| # ssh-agent | |
| check-ssh-agent() { | |
| test -S "$SSH_AUTH_SOCK" && { | |
| ssh-add -l >& /dev/null | |
| if [ $? -ne 2 ]; then | |
| echo "ssh-agent is already running ($SSH_AUTH_SOCK)" | |
| true | |
| else | |
| false | |
| fi |
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| import time | |
| import logging | |
| import argparse | |
| import subprocess | |
| import threading | |
| import webbrowser |
| {%- extends 'slides_reveal.tpl' -%} | |
| {% block input_group -%} | |
| <div class="input_wrapper"> | |
| {{ super() }} | |
| </div> | |
| {% endblock input_group %} | |