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
function LessToCss() | |
let current_file = shellescape(expand('%:p')) | |
let filename = shellescape(expand('%:r')) | |
let command = "silent !lessc " . current_file . " " . filename . ".css" | |
echo 'less compilation finished' | |
execute command | |
endfunction | |
autocmd BufWritePost,FileWritePost *.less call LessToCss() |
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
import itertools | |
import random | |
import math | |
def map_d(c): | |
return math.hypot(random.random(), random.random()) | |
def reduce_d(count_inside, d): | |
if d < 1: | |
return count_inside + 1 |
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
gitfs_remotes: | |
- https://github.com/saltstack-formulas/nginx-formula.git | |
- https://github.com/saltstack-formulas/apache-formula.git | |
- https://github.com/saltstack-formulas/mysql-formula.git | |
- https://github.com/saltstack-formulas/vim-formula.git | |
- https://github.com/saltstack-formulas/build-essential-formula.git | |
- https://github.com/saltstack-formulas/pip-formula.git | |
fileserver_backend: | |
- git |
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
def retry(exception): | |
def retry_decorator(func): | |
def _wrapper(*args, **kwargs): | |
tries = 0 | |
while True: | |
try: | |
return func(*args, **kwargs) | |
except exception as error: | |
tries += 1 | |
if tries <= 5: |
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
import requests | |
from concurrent import futures | |
from faker import Factory | |
import functools | |
from collections import namedtuple | |
fake = Factory.create() | |
url = 'http://www.solucionescamelot.com/index.php/contactenos' | |
DataTuple = namedtuple('DataTuple', ['email', 'name']) |
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 django.http import StreamingHttpResponse | |
from django.conf import settings | |
import subprocess | |
def _backup(): | |
db_config = settings.DATABASES['default'] | |
db_config['HOST'] = db_config.get('HOST') or 'localhost' | |
db_config['PORT'] = db_config.get('PORT') or 3306 |
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
A = 3200 | |
B = 1800 | |
C = 1920 | |
D = 1080 | |
E = 2 | |
F = 2 | |
values = { |
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
GitHub username:armonge | |
Day job:Web Developer | |
Favorite open source project:Django | |
Open Source contributions (if any): | |
Stranded on an island, what 3 items do you take:Flashlight,matches, satellite phone | |
Tie-breaker, pick a number between 1 and 20,000:32433 |
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
Day job: Web Developer in Nicaragua | |
Favorite Python project: Django | |
Favorite Conference: Haven't attended any yet :( | |
Python Experience Level: Intermediate |
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
Day job: Web Developer | |
What is your language of choice: Python | |
Open Source contributions: No biggies here, just some patch in https://github.com/mozes/smpp.pdu | |
How do you use GitHub: Mostly i work for organizations that provide me some git repos here, but i also mantain some gists and template django projects i use regularly |
OlderNewer