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
UNIDADE = 1 | |
CAIXA_PCTE = 2 | |
DUZIA = 3 | |
def formata_codigo(codigo): | |
return codigo.zfill(10) | |
def formata_nome(nome): | |
return nome.upper() |
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
''' | |
this is util for copy a lot of resources from diferent places and put them in a single place | |
In my case I use this for to copy dozens of jar files from my m2 local repository | |
''' | |
import shutil | |
''' | |
inform in a txt file all paths that you would like to copy, line by line | |
''' |
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
""" | |
Download springpython-[release].tar.gz | |
Unpack and type python setup.py install | |
http://static.springsource.org/spring-python/1.2.x/sphinx/html/index.html | |
""" | |
from springpython.config import PythonConfig | |
from springpython.config import Object | |
from springpython.context import scope |
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
""" | |
simple script for download pdfs from a specific page | |
depends of BeautifulSoup http://www.crummy.com/software/BeautifulSoup/bs4/doc/ | |
""" | |
import urllib2 | |
import urllib | |
from bs4 import BeautifulSoup | |
#url from where are the pdfs |
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
package br.com.soeirosantos | |
import java.text.SimpleDateFormat | |
class CustomMethods { | |
static isNotBlank(String self) { | |
!self.trim().isEmpty() | |
} | |
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
''' | |
sources: | |
http://stackoverflow.com/questions/191359/how-to-convert-a-file-to-utf-8-in-python | |
http://stackoverflow.com/questions/2212643/python-recursive-folder-read | |
''' | |
import os, sys, codecs | |
def convert(filepath): | |
BLOCKSIZE = 1048576 |
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
function main() { | |
var IMPRESSIONS = 10; | |
var CTR = 0.01; | |
//var AVG_CPC = 2.00; | |
var keywords = AdWordsApp.keywords(). | |
withCondition('CampaignStatus = ENABLED'). | |
withCondition('AdGroupStatus = ENABLED'). | |
withCondition('Status = ENABLED'). |
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 os, sys, codecs | |
all_aliases = [] | |
pattern = re.compile(r'[a-zA-Z_]+\$+[a-zA-Z_]+\$+[a-zA-Z_]+\$+[a-zA-Z_]+|[a-zA-Z_]+\$+[a-zA-Z_]+\$+[a-zA-Z_]+|[a-zA-Z_]+\$+[a-zA-Z_]+') | |
walk_dir = os.path.abspath('/caminho/para/o/diretorio/') | |
for root, subdirs, files in os.walk(walk_dir): | |
[all_aliases.extend(pattern.findall(" ".join( open(os.path.join(root, filename) ).readlines()))) for filename in files if filename.endswith("DAOOracle.java")] | |
plus_30_aliases = [alias for alias in all_aliases if len(alias) > 30] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<jaxws:bindings wsdlLocation="DetranMock.wsdl" | |
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:annox="http://annox.dev.java.net" | |
jxb:extensionBindingPrefixes="xjc annox"> | |
<jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> | |
<jaxws:bindings | |
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://detran.mock']"> | |
<jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" |
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 | |
#Title : wildfly-install.sh | |
#Description : Script to install Wildfly 8.x on CentOS 7 | |
#Original script: http://sukharevd.net/wildfly-8-installation.html | |
# This version is the only variable to change when running the script | |
WILDFLY_VERSION=8.2.1.Final | |
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION | |
WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz |
OlderNewer