git config core.fileMode false
Les tests unitaires consistent à tester individuellement les composants de l’application. On pourra ainsi valider la qualité du code et les performances d'un module.
Ces tests sont exécutées pour valider l'intégration des différents modules entre eux et dans leur environnement exploitation définitif.
with grep, to show only line number and string on the line: grep -n "[string_to_search]" [filename] |cut -f1,2 -d:
Executer cette commande dans le terminal
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
Ajouter ces lignes à la fin de du fichier ~/.bashrc
- source ~/.git-prompt.sh
- PS1="[$GREEN]\t[$RED]-[$BLUE]\u[$YELLOW][$YELLOW]\w[\033[m][$MAGENTA]$(__git_ps1)[$WHITE]$ "
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 | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
r = requests.get("http://donnees.ville.montreal.qc.ca/api/3/action/package_list") | |
binary = r.content | |
output = json.loads(binary) | |
for package in output["result"]: |
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: utf8 -*- | |
import json | |
import requests | |
from ConfigParser import SafeConfigParser | |
from urlparse import urlparse, urlunparse | |
import urllib | |
config = SafeConfigParser() | |
config.read('field_uploader.ini') |
This command will retrieve the last 100 datasets created with the metadata_created date from 2014-01-01 from 2014-12-15 from donnees.ville.montreal.qc.ca
http donnees.ville.montreal.qc.ca/api/3/action/package_search q=metadata_created:'[2014-01-01T00:00:00Z TO 2014-12-15T23:59:59Z]' rows=100
Then you want to save to a json the results
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
nice -n15 mysqldump -h[remoteservername] -u [mysqluser] -p[mysqlpass] [databasename] > mydumpfile.sql |