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
#!/usr/bin/env python | |
# coding: utf-8 | |
# # Exercícios | |
# In[11]: | |
import pandas as pd | |
get_ipython().run_line_magic('pylab', 'inline') |
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
{"openapi": "3.0.0", "servers": [{"url": "http://localhost:8080"}], "info": {"title": "Hathor API", "version": "0.16.0-beta"}, "consumes": ["application/json"], "produces": ["application/json"], "paths": {"/p2p/peers": {"x-visibility": "private", "post": {"tags": ["p2p"], "operationId": "p2p_peers", "summary": "Add p2p peers", "description": "Connect to the given peers", "requestBody": {"description": "Peers you want to connect to", "required": true, "content": {"application/json": {"schema": {"type": "array", "description": "List of peers to connect in the format \"protocol:host:port\"", "items": {"type": "string"}}, "examples": {"peer_list": {"summary": "List of peers", "value": ["tcp:localhost:8000", "tcp:17.24.137.234:40403"]}}}}}, "responses": {"200": {"description": "The peers we connected to (we don't try connecting to already known peers)", "content": {"application/json": {"examples": {"success": {"summary": "Peers added", "value": {"success": true, "peers": ["tcp:localhost:8000", "tcp:17.24.137.234:4 |
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
from flask import Flask | |
import plotly_express as px | |
import pandas as pd | |
import geopandas as gp | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] |
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
''' | |
Pure cython version | |
compile with: | |
$ cython cgibbs.pyx | |
$ gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.6 -o cgibbs.so cgibbs.c | |
then import from python shell and call main() | |
''' | |
import random,math, time |
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
To install this init script, you should save mongodb to /etc/init.d/ and mongosharding.conf to /etc/ | |
then run the following commands as root or with sudo: | |
chmod 755 /etc/init.d/mongodb | |
chown root:root /etc/init.d mongodb | |
update-rc.d mongodb defaults | |
This installation procedure was tested on UBUNTU 11.10 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
12 13 5 0 11AVENIDA GOVERNADOR EDMUNDO PINTO 72 ACRELANDIA 01 00100169945000 | |
12 13 5 0 11AVENIDA GOVERNADOR EDMUNDO PINTO 72 ACRELANDIA |
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
from numpy.random import uniform, multinomial, exponential | |
#from numpy import arange, array, empty,zeros | |
import numpy as np | |
cimport numpy as np | |
import time | |
from random import random | |
DTYPE = np.double | |
ctypedef np.double_t DTYPE_t | |
ctypedef np.int_t INT_t |
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
<script src="/js/d3.v2.js"></script> | |
<link type="text/css" rel="stylesheet" href="/css/colorbrewer/colorbrewer.css"> | |
<style type="text/css"> | |
svg { | |
background: #eee; | |
width: 960px; | |
height: 500px; | |
} | |
#polygons path { | |
stroke: #fff; |
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 -*- | |
""" | |
Tests for the virtualenvmagic extension | |
Author: Flávio Codeço Coelho - @fccoelho | |
""" | |
import os | |
import nose.tools as nt | |
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
# Ubuntu upstart file at /etc/init/mongodb.conf | |
pre-start script | |
mkdir -p /var/lib/mongodb/ | |
mkdir -p /var/log/mongodb/ | |
end script | |
start on runlevel [2345] | |
stop on runlevel [06] |
NewerOlder