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
#!/bin/sh | |
output="" | |
inside_msgstr=0 | |
newline="" | |
add_newline_to_output() { | |
if [ -z "$output" ]; then | |
output="${newline}\n" | |
else |
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
#!/bin/sh | |
output="" | |
while read line; do | |
if [ -z "$line" ]; then | |
continue | |
fi; | |
escaped_line=$(echo $line | sed -e 's/"/\\"/g') | |
new_line="msgid \"$escaped_line\"\nmsgstr \"\"" |
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
:: Uses as Make GNU, for example `make start` | |
:: will executes :start function. | |
:: Keep in mind that this implementation | |
:: has some limitations. For example, you can't | |
:: call more than one command from another command | |
:: if the called command has an `goto :end` line, | |
:: because the script will terminate on first | |
:: `goto <command>` invocation. | |
:: Do not display commands |
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
# DataFrame example | |
df = pd.DataFrame(data={'col1': ["one", 2], 'col2': [3, "four"]}) | |
df = df.to_dict() # You need to pass as dict | |
%md table $df # <---- In Jupyter Notebook cell | |
#------------------------------------------------------------ | |
# Dict structure example |
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
from re import sub | |
from timeit import timeit | |
from json import loads | |
from requests import get | |
def test(res): | |
return type(res) == list and \ | |
type(res[0]) == dict and \ | |
type(res[0]["last_updated"]) == 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
"use strict"; | |
import gulp from "gulp"; | |
import uglify from "gulp-uglify"; | |
import babel from "gulp-babel"; | |
const dirs = { | |
src: "src/*.js", | |
dest: "build" | |
} |
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
<html> | |
<title> | |
Articles | |
</title> | |
<body> | |
<h1>Articles page</h1> | |
<p><img src="images/images.jpg"/></p> | |
</body> | |
</html> |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
#!/bin/bash | |
echo && echo "Selecciona el entorno virtual que quieres usar" | |
echo "1. Python (pyenv)" | |
echo "2. NodeJS (jsenv)" | |
echo "3. Ruby (rbenv)" | |
read -n 1 c | |
if [ $c == 1 ]; then | |
source pyenv/bin/activate |
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
# Add multimedia source | |
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install deb-multimedia-keyring # if this aborts, try again | |
apt-get update | |
# Go to local source directory | |
cd /usr/local/src |