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 | |
import ( | |
"fmt" | |
"strings" | |
"golang.org/x/tour/wc" | |
) | |
func WordCount(s string) map[string]int { |
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
cmake_minimum_required(VERSION 3.3) | |
project(bitcoin) | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
add_custom_target(build-bitcoin ALL | |
COMMAND ./autogen.sh | |
COMMAND ./configure | |
COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
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
# tf quick test | |
# CUDA_VISIBLE_DEVICES=0 python | |
import os | |
# os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" | |
os.environ["CUDA_VISIBLE_DEVICES"]="0" | |
import tensorflow as tf | |
# gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333) |
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
cmake_minimum_required(VERSION 3.3) | |
project(bitcoin) | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
add_custom_target(build-bitcoin ALL | |
COMMAND ./autogen.sh | |
COMMAND ./configure | |
COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
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
# https://regex101.com/r/Serx4o/1 | |
# do not match the string if "someword" occurs anywhere in the string | |
# https://docs.python.org/3/howto/regex.html | |
^(?:(?!someword).)*$ |
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 sh | |
# adapted from https://gist.github.com/jc00ke/b55cf7d16d584fbb2b92 | |
sudo update-alternatives --install \ | |
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.9 200 \ | |
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.9 \ | |
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.9 \ | |
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.9 \ | |
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.9 \ | |
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.9 \ |
NewerOlder