Skip to content

Instantly share code, notes, and snippets.

@simecek
simecek / progress_bar.py
Created July 12, 2021 21:00
Progress bar for Berlin Marathon tweets
# Print iterations progress - adapted from https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console
def printProgressBar (days, total=100, prefix = '', suffix = 'dní', decimals = 1, length = 20, fill = '█', printEnd = "\r"):
"""
Call in a loop to create terminal progress bar
@params:
days - Required : iterations remaining (Int)
total - Optional : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
@simecek
simecek / df_shrink_example.ipynb
Created April 17, 2021 14:04
df_shrink_example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / tqdm_nested_loops.ipynb
Created August 18, 2020 14:49
Tqdm_nested_loops.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / untitled1.ipynb
Last active June 11, 2020 22:58
Pandas_progress_apply.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / osmnx-example.ipynb
Last active May 25, 2020 00:17
Osmnx Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / celuloid_demo.ipynb
Created May 15, 2020 19:42
Celuloid_Demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / folium_demo.ipynb
Created May 13, 2020 00:18
Folium_Demo.ipynb
Loading
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 April 30, 2020 21:39
DateTimeIndex.ipynb
Loading
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 April 26, 2020 00:46
Comparison to conversions to recovered (20 days gap, ggflags, gganimate)
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 March 18, 2020 21:41
Sampling_Saves_Time.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.