Since the answer has resolved your issue, kindly accept it (answers take up valuable time for respondents) - see What should I do when someone answers my question?
- Credits to desertnaut
[alias] | |
adog = log --all --graph --oneline --decorate --author-date-order | |
pushup = "!git push -u origin $(git branch --show-current)" | |
lcm = log -1 --no-merges --pretty=%s | |
lcmt = ! git lcm | grep -o -e "\"#[0-9a-zA-Z]\\+\"" | |
branch-prune = "!git fetch -p && for b in $(git for-each-ref --format='%(if:equals=[gone])%(upstream:track)%(then)%(refname:short)%(end)' refs/heads); do git branch -d $b; done" | |
merge-request = "!git remote get-url origin | sed 's|:|/|g' | sed 's|.*@|https://|g' | sed \"s|\\.git|/-/merge_requests/new\\?change_branches=true\\&merge_request%5Bsource_branch%5D=$(git branch --show-current | sed 's|/|%2F|g')\\&merge_request%5Btarget_branch%5D=$1|g\" #" | |
mr = merge-request | |
diff-commit-message-tag = "!git cherry -v \"$1\" \"$2\" | grep -e '^+*' | grep -o '#[0-9a-z]\\+' | sort | uniq #" | |
dcmt = diff-commit-message-tag |
git cherry -v master develop | grep -e '^+*' | grep -o '#[0-9a-z]\+' | sort | uniq |
library(httr) | |
library(magrittr) | |
library(xml2) | |
library(rvest) | |
url_raw <- "http://dados.cvm.gov.br/dados/FI/DOC/INF_DIARIO/DADOS/" | |
output_file <- "fundos/api/informe_diario.csv" | |
csv_links <- httr::GET(url_raw) %>% | |
httr::content("text") %>% |
FROM python:3.5.1 | |
MAINTAINER Katy Lavallee <[email protected]> | |
RUN mkdir -p /dockeripdb/ | |
ENTRYPOINT ["/usr/local/bin/python"] | |
WORKDIR /dockeripdb/ | |
ENV PYTHONPATH /dockeripdb/ | |
ENV DJANGO_SETTINGS_MODULE dockeripdb.settings |
function jurosCompostosAporteMensal(valorInicial: number, aporteMensal: number, jurosMensais: number, periodoMeses: number): number { | |
const porcentagemJurosMensais = jurosMensais / 100; | |
const taxaJurosMensais = 1 + porcentagemJurosMensais; | |
const totalTaxaJurosPeriodo = taxaJurosMensais ^ periodoMeses; | |
const ganhoValorInicial = valorInicial * totalTaxaJurosPeriodo; | |
const ganhoAportesMensais = aporteMensal * (totalTaxaJurosPeriodo - 1) / porcentagemJurosMensais; | |
return ganhoValorInicial + ganhoAportesMensais; | |
} |
Since the answer has resolved your issue, kindly accept it (answers take up valuable time for respondents) - see What should I do when someone answers my question?
./manage.py dumpdata --exclude auth.permission --exclude contenttypes > db.json
./manage.py loaddata db.json
Obtained from Coderwall
#!/bin/sh | |
# Absolute path to this script, e.g. /home/user/bin/foo.sh | |
SCRIPT=$(readlink -f "$0") | |
# Absolute path this script is in, thus /home/user/bin | |
SCRIPT_PATH=$(dirname "$SCRIPT") | |
default_port="8080" | |
default_server_volume="$SCRIPT_PATH/servers.json" | |
default_email="admin" | |
default_password="admin" |
from __future__ import unicode_literals | |
from django.db import models | |
# Create your models here. | |
class HasChangedModelMixin(models.Model): | |
class Meta: | |
abstract = True |
from django.apps import apps | |
app_models = apps.get_app_config('app').get_models() | |
for model in app_models: | |
model.objects.all().delete() |