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
from github import Github | |
from datetime import datetime | |
# Change start date here | |
start = datetime(2020, 4, 6) | |
def print_list(l, title=None): | |
"""From list of PullRequest of Issue objects, | |
print their number and title. |
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
from github import Github | |
import plotly.express as px | |
from datetime import datetime | |
# First create a Github instance | |
# using an access token | |
g = Github("your own token here") | |
repo = g.get_repo("scikit-image/scikit-image") |
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 plotly.express as px | |
import pandas as pd | |
# Analytics file downloaded from matomo, each line is a visit | |
df = pd.read_csv('december10-skimage.csv', encoding='utf-16le') | |
df['unit'] = 1 | |
df['hour'] = pd.to_datetime(df['serverTimePretty']).dt.hour | |
# For each country and hour, count number of visitors | |
dfg = df[['unit', 'country', 'hour']].groupby(['country', 'hour']).sum() | |
dfg.reset_index(inplace=True) |
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 dash | |
from dash.dependencies import Input, Output | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.graph_objects as go | |
import plotly.express as px | |
gapminder = px.data.gapminder().query("year == 2007").reset_index() | |
app = dash.Dash(__name__) |
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
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output | |
import plotly.graph_objs as go | |
import numpy as np | |
from skimage import data | |
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 dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output | |
import plotly.graph_objs as go | |
import numpy as np | |
from skimage import data | |
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
import numpy as np | |
import inspect | |
from skimage import exposure, feature, filters, measure, morphology, \ | |
restoration, segmentation, transform, util, data, color | |
from timeit import default_timer | |
import pandas as pd | |
import cv2 | |
import time | |
###this python script returns a csv of function runtimes |
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 | |
from sklearn.externals.joblib import Parallel, delayed | |
def apply_parallel(func, data, *args, chunk=100, overlap=10, n_jobs=4, | |
**kwargs): | |
""" | |
Apply a function in parallel to overlapping chunks of an array. | |
joblib is used for parallel processing. |
NewerOlder