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
h = findobj(gca,'Type','Line'); | |
xd = get(h,'XData'); | |
yd = get(h,'YData'); | |
if iscell(xd) && iscell(yd) % Multi plot object | |
exprt = NaN*ones(length(yd{1}),length(yd)+1); | |
exprt(:,1) = xd{1}; | |
for i = 1:length(yd) | |
exprt(:,i+1) = yd{i}; | |
end | |
else % Single plot object |
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
detex main.tex | grep 'the the\|had had\|we we\|And\|is is\|to the' |
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
# Make sure the port is allowed for SSH on the server | |
REMOTE_PORT=1234 | |
LOCAL_PORT=1234 | |
USER="" | |
MACHINE="" | |
ssh -N -L localhost:${REMOTE_PORT}:localhost:${LOCAL_PORT} ${USER}@${MACHINE}.inf.ed.ac.uk | |
### James Owers port forwarding setup | |
local_port=1234 | |
remote_port=1234 |
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
ENV_NAME='name' | |
conda activate $ENV_NAME | |
python -m ipykernel install --user --name $ENV_NAME |
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
fairseq-train qa_en_small-bin \ | |
--log-interval=10 \ | |
--log-format=json \ | |
--tensorboard-logdir=/users/tom/ed/sp/pretrain/tests/fairseq/bart_en_small/logs \ | |
--seed=1 \ | |
--cpu \ | |
--min-loss-scale=0.0001 \ | |
--model-parallel-size=1 \ | |
--criterion=cross_entropy \ |
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
source ~/miniconda3/bin/activate allen | |
LANG=en | |
TASK=qa_en_small | |
for SPLIT in train valid | |
do | |
python -m examples.roberta.multiprocessing_bpe_encoder \ | |
--encoder-json encoder.json \ | |
--vocab-bpe vocab.bpe \ | |
--inputs "$TASK/$SPLIT.$LANG" \ |
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
# coding=utf-8 | |
# Copyright 2020 The HuggingFace Inc. team. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
splits="444 555" | |
locales="fr pt es de zh" | |
samples="01 05 10 20 50" | |
for sp in $splits; | |
do echo $sp; | |
for loc in $locales; | |
do echo $loc; | |
for sample in $samples; | |
do echo $sample; |
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
"(\w*)\.(\w*)\s(?:[=<>]{1,2})\s\'?(\w*)\'?" | |
(\w*)\.(\w*)\s([=<>]{1,2})\s(?:\'|\")?(\w*\.?(?! AND) ?\w*)(?:\'|\")? | |
(\w*)\.(\w*)\s([=<>]{1,2})\s(?:\'|\")?(\w*\.?(?! (?:AND|OR)) ?\w*)(?:\'|\")? |