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
#!/usr/bin/env python | |
# Original at http://tech.yipit.com/2011/11/16/183772396/ | |
# Insert this into .git/hooks/pre-commit | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<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
#!/usr/bin/env python | |
import os | |
import sys | |
from django.core.management import ManagementUtility | |
from django_test_runner import is_nosetest | |
from pycharm_run_utils import import_system_module | |
from teamcity import teamcity_presence_env_var |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
from boto.s3.connection import S3Connection | |
from cStringIO import StringIO | |
from PIL import Image as pil | |
AWS_KEY = '[AWS KEY HERE]' |
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
# coding: utf-8 | |
import functools | |
def _mock_condition(condition, *args, **kwargs): | |
return condition(*args, **kwargs) | |
def mock_condition(condition): |
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
# coding: utf-8 | |
class Image(object): | |
def __format(self): | |
return 'PNG' | |
image = Image() |
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
# -*- coding: utf-8 -*- | |
# django command to check if a url return a status != 2xx | |
import sys | |
import json | |
import aiohttp | |
import asyncio | |
from django.core.management.base import NoArgsCommand |
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
# coding: utf-8 | |
import os | |
import sys | |
import commands | |
import codecs | |
import time | |
import subprocess | |
musica_process_output = subprocess.check_output("tasklist /V /FO list /FI \"IMAGENAME eq vlc.exe\"", shell=False) |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
### REQUIREMENTS ### | |
# * python 3.5+ | |
# * aiohttp (pip install aiohttp) | |
import argparse | |
import os |
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
.frontend { | |
margin: nelson | |
} |
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
# coding: utf-8 | |
''' | |
Para rodar | |
python3 markdown_to_json.py file1 file2 | |
''' | |
import json | |
import sys |