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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<templates> | |
<template autoinsert="true" context="java" deleted="false" description="Debug log" enabled="true" name="debug_log">Log.d(TAG + ".${enclosing_method}:" + Thread.currentThread().getStackTrace()[2].getLineNumber(), ${msg});</template> | |
<template autoinsert="true" context="java" deleted="false" description="Singleton pattern" enabled="true" name="singleton">private static ${enclosing_type} instance; | |
public static ${enclosing_type} getInstance(){ | |
if(instance == null){ | |
instance = new ${enclosing_type}(); | |
} | |
return instance; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Numbers" default="dist" basedir="."> | |
<property name="version.file" location="${basedir}/build.properties"/> | |
<target name="inc.revision.properties" unless="no.increment.revision"> | |
<propertyfile file="${version.file}"> | |
<entry key="minor.number" default="0" operation="=" type="int"/> | |
<entry key="major.number" default="1" operation="=" type="int"/> | |
<entry key="build.number" default="0" operation="+" type="int"/> | |
</propertyfile> | |
</target> |
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
## By: L. C. Berrocal | |
import sys; | |
fd = open(sys.argv[1]) | |
contents = fd.readlines() | |
fd.close() | |
new_contents = [] | |
of = open(sys.argv[2], "w") | |
print "Eliminanting white spaces from " + sys.argv[1] + " to " + sys.argv[2] |
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
INSERT INTO `mroute` (`id`, `name`) VALUES | |
(1, 'Route 1-2'), | |
(2, 'Route 2-3'), | |
(3, 'Route 4-5'); | |
INSERT INTO `point` (`id`, `route_id`, `name`, `x`, `y`, `pType`) VALUES | |
(1, 1, 'Punto 1', '-79.125', '9.08', 'STOP'), | |
(2, 1, 'Punto 2', '-79.185', '9.12', 'STOP'), | |
(3, 2, 'Punto 3', '-79.122', '9.081', 'STOP'), |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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 os, base64 | |
from Crypto.Cipher import AES | |
import hashlib | |
class Encryptor(object): | |
# the block size for the cipher object; must be 16, 24, or 32 for AES | |
block_size = 32 | |
padding = '{' | |
def __init__(self, secret): | |
self.secret = hashlib.sha256(secret).digest() |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<templates> | |
<template autoinsert="true" context="org.python.pydev.editor.templates.python" deleted="false" description="csv reader" enabled="true" name="vib_csv_reader">csv_filename= r'' | |
csvreader = csv.reader(open(csv_filename, 'rb'), delimiter=',', quotechar='|') | |
rc = 1 | |
for row in csvreader: | |
if rc != 1: | |
regexp = re.compile('[\s\(\)\[\]/{}.,]+') | |
clean_value = regexp.sub('', row[6]).strip() | |
rc += 1</template> |
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
########## LOGGING CONFIGURATION | |
# See: https://docs.djangoproject.com/en/dev/ref/settings/#logging | |
# A sample logging configuration. The only tangible logging | |
# performed by this configuration is to send an email to | |
# the site admins on every HTTP 500 error when DEBUG=False. | |
# See http://docs.djangoproject.com/en/dev/topics/logging for | |
# more details on how to customize your logging configuration. | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': 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
#!/bin/bash -e | |
VIRTUAL_ENVIRONMENT_FOLDER=~/virtual_environments | |
PYCHARM_PROJECT_FOLDER=~/PycharmProjects/ | |
cd $VIRTUAL_ENVIRONMENT_FOLDER; | |
/usr/local/Cellar/python3/3.4.1_1/bin/python3 /usr/local/lib/python3.4/site-packages/virtualenv.py --no-site-packages $1_env; | |
source $VIRTUAL_ENVIRONMENT_FOLDER/$1_env/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
@echo off | |
SET VIRTUAL_ENVIRONMENT_FOLDER=C:\python_environments | |
SET PYCHARM_PROJECT_FOLDER=%USERPROFILE%\PyCharmProjects | |
SET PYTHON_PROJECT=%~1 | |
SET PROJECT_ENVIRONMENT=%VIRTUAL_ENVIRONMENT_FOLDER%\%PYTHON_PROJECT%_env | |
cd %VIRTUAL_ENVIRONMENT_FOLDER% | |
REM echo %PYCHARM_PROJECT_FOLDER% | |
echo %PROJECT_ENVIRONMENT% | |
C:\Python34\python.exe C:\Python34\Lib\site-packages\virtualenv.py --no-site-packages %PROJECT_ENVIRONMENT% |
OlderNewer