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
| # Install ucu4c via Brew | |
| brew install icu4c | |
| # Create relative symlinks for icu4c | |
| brew link --force icu4c | |
| # Install pyicu via pip | |
| # Make sure ICU_VERSION matches the one you just installed | |
| sudo ICU_VERSION=60.2 pip install pyicu |
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
| CREATE TEMP FUNCTION | |
| cleanup(text | |
| STRING | |
| ) | |
| RETURNS | |
| STRUCT < | |
| key string, | |
| value string> | |
| LANGUAGE js AS """ | |
| return JSON.parse(text); |
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
| # force a reload of the config file | |
| unbind r | |
| bind r source-file ~/.tmux.conf | |
| set -g history-limit 5000 | |
| set -g default-terminal "screen-256color" | |
| set -g status-left-length 24 | |
| # remap prefix from 'C-b' to 'C-a' |
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
| sudo mhwd -a pci nonfree 0300 | |
| pacman -S cuda cudnn | |
| yaourt Ananconda | |
| git clone https://github.com/fastai/fastai | |
| cd fastai | |
| conda-env create -f environment.yaml | |
| build gcc 6 | |
| yay -S gcc6 |
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/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc b/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc | |
| index 0f7adaf24a..934ccbada6 100644 | |
| --- a/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc | |
| +++ b/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc | |
| @@ -69,7 +69,7 @@ __global__ void concat_variable_kernel( | |
| IntType num_inputs = input_ptr_data.size; | |
| // verbose declaration needed due to template | |
| - extern __shared__ __align__(sizeof(T)) unsigned char smem[]; | |
| + extern __shared__ __align__(sizeof(T) > 16 ? sizeof(T) : 16) unsigned char smem[]; |
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
| clear mod1 | |
| clear mod4 | |
| keycode 64 =Super_L | |
| keycode 133 = Alt_L | |
| add mod1 = Alt_L | |
| add mod4 = Super_L | |
| ! Unmap capslock | |
| clear Lock | |
| keycode 66 = Hyper_L | |
| ! Set mod3 to capslock |
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
| mapkey('\\F', "Toggle fullscreen (YouTube)", ytFullscreen, { | |
| repeatIgnore: true, | |
| domain: /(youtube\.com)/i | |
| }); | |
| function ytFullscreen() { | |
| $('.ytp-fullscreen-button.ytp-button').click(); | |
| } | |
| // 优酷搜索 | |
| addSearchAliasX('yk', 'youku', 'http://www.soku.com/search_video/q_', 's', 'http://tip.soku.com/search_tip_1?query=', function(response) { |
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
| {"lastUpload":"2020-12-30T06:47:43.145Z","extensionVersion":"v3.4.3"} |
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
| DATA_DIR=./data | |
| field_keywords=$(wildcard $(DATA_DIR)/field_keywords_*) | |
| out_keywords=$(patsubst $(DATA_DIR)/field_keywords_%,out%.txt,$(field_keywords)) | |
| REAL_PATH=$(abspath $(DATA_DIR)) | |
| NN_FRAMEWORK_DATA=~/.nn_framework_Data | |
| field_keyword=$(patsubst $(DATA_DIR)/field_keywords_%,$(DATA_DIR)/field_keywords_\%,$(word 1,$(field_keywords))) | |
| ## all: run command | |
| all: $(out_keywords) |
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
| special_tok_ids = {} | |
| for tok_name, tok_symbol in tokenizer.special_tokens_map.items(): | |
| idx = tokenizer.all_special_tokens.index(tok_symbol) | |
| special_tok_ids[tok_name] = tokenizer.all_special_ids[idx] | |
| class JigSawDataset(Dataset): | |
| def __init__(self, data, special_tok_ids, is_training, targets=None): | |
| self.special_tok_ids = special_tok_ids | |
| self.is_training = is_training | |
| if self.is_training: |