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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Python: Current File", | |
| "type": "python", | |
| "request": "launch", |
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
| #!/bin/bash | |
| # Get postman app | |
| wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
| sudo tar -xzf postman.tar.gz -C /opt | |
| sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
| #Create a Desktop Entry | |
| cat > ~/.local/share/applications/postman.desktop <<EOL | |
| [Desktop Entry] | |
| Encoding=UTF-8 |
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
| import pycountry | |
| from pprint import pformat | |
| from data.model_languages import bert_languages, xlm_lang_codes | |
| def get_codes(language): | |
| lang = pycountry.languages.get(name=language) | |
| alpha_2 = alpha_3 = None | |
| try: |
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
| #!/usr/bin/env bash | |
| say() { | |
| echo "$@" | sed \ | |
| -e "s/\(\(@\(red\|green\|yellow\|blue\|magenta\|cyan\|white\|reset\|b\|u\)\)\+\)[[]\{2\}\(.*\)[]]\{2\}/\1\4@reset/g" \ | |
| -e "s/@red/$(tput setaf 1)/g" \ | |
| -e "s/@green/$(tput setaf 2)/g" \ | |
| -e "s/@yellow/$(tput setaf 3)/g" \ | |
| -e "s/@blue/$(tput setaf 4)/g" \ | |
| -e "s/@magenta/$(tput setaf 5)/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
| import sys | |
| from pprint import pformat | |
| def read_pip_freeze_file(file_path): | |
| try: | |
| with open(file_path, 'r') as f: | |
| return [l.strip() for l in f.readlines()] | |
| except Exception as e: | |
| print("Error while reading pip freeze file: {}".format(e)) |
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
| # NOTE: To make any function here work with 'watch': | |
| # export -f your-function-name | |
| # watch --exec bash -c your-function-name | |
| # =============================================== | |
| # Generic functions | |
| # =============================================== | |
| function say() { |
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
| #!/usr/bin/env python3 | |
| """ | |
| quicky script that compares two conda environments | |
| can be handy for debugging differences between two environments | |
| This could be made much cleaner and more flexible -- but it does the job. | |
| Please let me know if you extend or improve it. |
The correct way of creating a private frok by duplicating the repo is documented here.
We assume the following:
- Old or original repo is:
git@github.com:<user>/<old-repo>.git - New mirror will be:
git@github.com:<your_username>/mirror.git
For this, the commands are:
- Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)