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 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 os | |
import pandas as pd | |
import time | |
import seaborn as sns | |
from matplotlib import pyplot as plt | |
import matplotlib.gridspec as gridspec | |
label_dict = { | |
"0_preface/abstract.tex" : "thesis noncontent", | |
'0_preface/abstractGerman.tex' : "thesis noncontent", |
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 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
Download Music from a Telegram Conversation | |
- youtube-dl lives here https://github.com/ytdl-org | |
- telegram data can be downloaded in the desktop app via preferences -> advanced -> export | |
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
import flickrapi | |
import json | |
import pandas as pd | |
import requests # to get image from the web | |
import shutil # to save it locally | |
from tqdm import tqdm | |
def download_jpg(image_url, index): | |
# Open the url image, set stream to True, this will return the stream content. |
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
# The code for my article with the same name. You can find it at the URL below: | |
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python | |
# MIT License | |
# | |
# Copyright (c) 2021 Manohar Vanga | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
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
import matplotlib.colors | |
def colors2cmap(*args, name=None): | |
"""Create a colormap from a list of given colors. | |
Parameters: | |
*args: Arbitrary number of colors (Named color, HEX or RGB). | |
name (str): Name with which the colormap is registered. | |
Returns: |
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 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
# We want to generate a reciprobit plot like it is used in the context of LATER models. | |
# Here, we generate normally distributed data. In the reciprobit plot that should appear linear | |
rm(list=ls()) | |
library(ggplot2) | |
N = 1000 | |
f = rnorm(N,mean=300,sd=50) | |
x = sort(1/f,decreasing=T) | |
y = (1:N)/N |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder