lein new NAME # Cria um novo projeto
lein deps # Baixa as dependências
lein repl # Iniciar o REPL
lein compile # Gera o war
Exemplo de project.clj para o Google App Engine
[tool.pylint.master] | |
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the | |
# number of processors available to use. | |
# Note: You have to experiment with this number, in noticed that starting too many | |
# jobs can slow down Pylint | |
jobs = 4 | |
# Add files or directories matching the regex patterns to the ignore-list. The | |
# regex matches against paths. | |
ignore-paths = [".*/migrations", "src/config/settings"] | |
# Disable the message, report, category or checker with the given id(s). |
import re | |
from typing import Union | |
class InvalidCNPJ(Exception): | |
pass | |
def clean_cnpj(value: Union[int, str]) -> str: | |
""" |
import json | |
from dateutil import parser | |
data = json.loads(open('messages.json').read()) | |
for c in data: | |
with open("conversations/" + "-".join(c["participants"]) + ".txt", "w") as f: | |
for m in c["conversation"]: | |
created_at = parser.parse(m["created_at"]).strftime("%Y-%m-%d %H:%M") |
# Delete all branches that have been merged | |
git branch -r --merged | grep -v origin/master | sed 's/origin\///' | xargs git push origin --delete | |
# Get a list of git branches, ordered by most recent commit | |
git branch -r --sort=committerdate --format="%(refname:short) %(committerdate:short)" |
import functools | |
from xmlrpc.client import dumps, loads | |
from requests import session | |
class XMLRPC: | |
def __init__(self, url): | |
self.session = session(url) |
import sys | |
import time | |
from array import array | |
A = array('d', range(3000)) | |
n = len(A) | |
max_sum = -sys.maxsize | |
von = bis = 0 | |
add = 0 |
local POLLING = 2 | |
local Sand = 'minecraft:sand' | |
local CFSpray = 'IC2:itemFoamSprayer' | |
local Scaffold = 'IC2:blockIronScaffold' | |
local Reinforced = 'IC2:blockAlloy' | |
local function SelectByName(name) | |
for i=1,16 do | |
local detail = turtle.getItemDetail(i) | |
if detail and detail.name == name then |
(defn make-dict [] | |
(let [vals (range 256)] | |
(zipmap (map vector vals) vals))) | |
(defn compress- [{:keys [dict index w out] :as a} b] | |
(let [buffer (conj w b)] | |
(if (contains? dict buffer) | |
(assoc a :w buffer) | |
{:dict (assoc dict buffer index) |
#!/usr/bin/env ruby | |
# | |
# Runs during git flow hotfix start | |
# | |
# Positional arguments: | |
# $1 Version | |
# | |
# Return VERSION - When VERSION is returned empty, git-flow will stop as the | |
# version is necessary | |
# |