Skip to content

Instantly share code, notes, and snippets.

@simecek
simecek / untitled1.ipynb
Last active Jun 11, 2020
Pandas_progress_apply.ipynb
View untitled1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View osmnx-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View celuloid_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View folium_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / datetimeindex.ipynb
Created Apr 30, 2020
DateTimeIndex.ipynb
View datetimeindex.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / cured_in_20days.R
Created Apr 26, 2020
Comparison to conversions to recovered (20 days gap, ggflags, gganimate)
View cured_in_20days.R
library(tidyverse)
library(countrycode) # to counvert country names to 2 letter codes
library(ggflags) # for flags
library(gganimate) # for video
# Getting data ------------------------------------------------------------
selected_countries <- c("Italy", "Spain", "France", "Germany",
"Portugal", "United States", "Slovakia", "South Korea", "Japan",
'Belgium', 'Sweden',
@simecek
simecek / sampling_saves_time.ipynb
Last active Mar 18, 2020
Sampling_Saves_Time.ipynb
View sampling_saves_time.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / iteration_on_combinations.ipynb
Last active Jan 15, 2020
Iteration_on_combinations.ipynb
View iteration_on_combinations.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View reflected-operands.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / save_env.py
Last active Oct 6, 2019
Save all objects from your session into a single compressed file
View save_env.py
import __main__
import pickle
from bz2 import BZ2File
from gzip import GzipFile
from typing import Optional, List
def save_env(path: str, objects: Optional[List[str]] = None, compress: str = 'gzip', protocol: int = -1):
"""
Save the environment (list of objects) of Jupyter Notebook into a compressed file
You can’t perform that action at this time.