One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Force Layout with labels on edges</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style type="text/css"> | |
</style> | |
</head> |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
#Version: 2.0 | |
import urllib | |
import json | |
#Coloque as informações sobre suas comprar aqui: | |
compras = [ |
# When you're sure of the format, it's much quicker to explicitly convert your dates than use `parse_dates` | |
# Makes sense; was just surprised by the time difference. | |
import pandas as pd | |
from datetime import datetime | |
to_datetime = lambda d: datetime.strptime(d, '%m/%d/%Y %H:%M') | |
%time trips = pd.read_csv('data/divvy/Divvy_Trips_2013.csv', parse_dates=['starttime', 'stoptime']) | |
# CPU times: user 1min 29s, sys: 331 ms, total: 1min 29s | |
# Wall time: 1min 30s |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
1° Configura os nós: | |
-Configurando o nó para busca: | |
CREATE INDEX ON :Person(personID); | |
CREATE INDEX ON :Person(name); | |
-Configurando a chave: | |
CREATE CONSTRAINT ON (p:Person) ASSERT p.personID IS UNIQUE; | |
#Um INDEX não pode ser usado como chave, caso o tenha feito, usa-se: | |
DROP INDEX ON :Person(name); | |
para retirar o index. |
conn = psycopg2.connect("user='eliassoares' host='127.0.0.1' password='mysecretpassword'") | |
cur = conn.cursor() | |
cur.execute('SELECT datname FROM pg_database WHERE datistemplate = false;') | |
rows = cur.fetchall() | |
print(rows) |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
func dumpMap(space string, m map[string]interface{}) { | |
for k, v := range m { | |
if mv, ok := v.(map[string]interface{}); ok { |
from re import findall, M, I | |
import os.path | |
def parse_queries(): | |
""" | |
Irá parsear um arquivo .sql com as queries de SELECT necessárias | |
e irá retornar um dicionário contendo o nome da query no arquivo, como chave | |
e a query especificamente como valor. | |
""" |
-- An audit history is important on most tables. Provide an audit trigger that logs to | |
-- a dedicated audit table for the major relations. | |
-- | |
-- This file should be generic and not depend on application roles or structures, | |
-- as it's being listed here: | |
-- | |
-- https://wiki.postgresql.org/wiki/Audit_trigger_91plus | |
-- | |
-- This trigger was originally based on | |
-- http://wiki.postgresql.org/wiki/Audit_trigger |