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
Example with 'mlbench': | |
install.packages('mlbench', dependencies=TRUE, repos='http://cran.rstudio.com/') |
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
Start a screen session: | |
screen -S "vgg-regression" | |
To detach a screen session: | |
Ctrl-a d | |
To reattach the only screen session | |
Ctrl-a r | |
To reattach a session of given PID |
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
interactive -c 24 -t 08:00:00 |
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
```python | |
import collections , yaml | |
_mapping_tag = yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG | |
def dict_representer(dumper, data): | |
return dumper.represent_mapping(_mapping_tag, data.iteritems()) | |
def dict_constructor(loader, node): | |
return collections.OrderedDict(loader.construct_pairs(node)) |
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 apt-get install moreutils | |
expand -t 4 filein | sponge fileout |
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
Load image. | |
Duplicate it as many times as many types of ROI you want to draw. | |
GO --> Edit --> Selection --> Add to Manager. | |
Draw the ROI and add it to the manager. | |
Click on each ROI / each group of ROIs and then click "More" --> "Fill" inside the manager. | |
Save the resulting image as separate .png. | |
In case you want to work with the .roi format of ImageJ, use this python code to read the .zip and the .roi: | |
https://gist.githubusercontent.com/luispedro/3437255/raw/d3f0be5efbe37efe27946c5fa21f5ef523cdac43/readroi.py |
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
From \t to 4 spaces: | |
find . -type f -exec sed -i.orig 's/\t/ /g' {} + | |
From 4 spaces to \t: | |
find . -type f -exec sed -i.orig 's/ /\t/g' {} + |
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
history | |
Ctrl+R | |
Type the subject of your search, e.g. screen | |
Type Ctrl+R repeatedly until you find your match. |
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
merged = df1.merge(df2, indicator=True, how='outer') | |
merged[merged['_merge'] == 'left_only'] |
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
Find unique values within a specified column of a CSV with semicolor delimiter: csvcut -c SCATPC -d ";" /pstore/data/pio/Tasks/PIO-382/original_tables/table_scatpc.csv | sed 1d | sort | uniq |