%config InlineBackend.figure_format = 'retina'
This file contains hidden or 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
| application: you-app-name-here | |
| version: 1 | |
| runtime: python | |
| api_version: 1 | |
| default_expiration: "30d" | |
| handlers: | |
| - url: /(.*\.(appcache|manifest)) | |
| mime_type: text/cache-manifest |
This file contains hidden or 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
| # -------------------------------------- | |
| # Get a new repository | |
| git clone [email protected]:*project* | |
| # See the actual branch and modified files | |
| git status | |
| # Create a branch | |
| git branch *branch name* |
This file contains hidden or 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
| function toggle(source) { | |
| checkboxes = document.getElementsByName('foo'); | |
| for(var i=0, n=checkboxes.length;i<n;i++) { | |
| checkboxes[i].checked = source.checked; | |
| } | |
| } |
This file contains hidden or 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
| /* nbextensions/theme_alt.css */ | |
| /* | |
| CODEMIRROR CURSOR | |
| */ | |
| .CodeMirror div.CodeMirror-cursor { | |
| border-left: 2px solid #268bd2; | |
| z-index: 3; | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| file = open('../DS07/files/2002FemPreg.dat', 'r') | |
| def chr_int(a): | |
| if a == ' ': | |
| return 0 | |
| else: | |
| return int(a) | |
| preg=[] |
This file contains hidden or 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
| import numpy as np | |
| import pandas as pd | |
| from bokeh.charts import output_file, show, Chord | |
| from bokeh.sampledata.les_mis import data | |
| nodes = data['nodes'] | |
| names = [node['name'] for node in sorted(data['nodes'], key=lambda x: x['group'])] | |
| N = len(nodes) | |
| counts = np.zeros((N, N)) |
This file contains hidden or 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
| """ | |
| Settings for root logger. | |
| Log messages will be printed to console and also to log file (rotated, with | |
| specified size). All log messages from used libraries will be also handled. | |
| Three approaches for defining logging settings are used: | |
| 1. using logging classes directly (py25+, py30+) | |
| 2. using fileConfig (py26+, py30+) | |
| 3. using dictConfig (py27+, py32+) | |
| Choose any variant as you like, but keep in mind python versions, that |
This file contains hidden or 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
| #!/bin/bash | |
| NOW=$(date +"%Y-%m-%d-%H%M") | |
| WWW_DIR="" | |
| DB_USER="" | |
| DB_PASS="" | |
| DB_NAME="" | |
| DB_HOST="" | |
| BACK_DIR="/root/back/$DB_NAME" |