Skip to content

Instantly share code, notes, and snippets.

@darwing1210
darwing1210 / async_download_files.py
Last active March 12, 2024 04:42
Script to download files in a async way, using Python asyncio
import os
import asyncio
import aiohttp # pip install aiohttp
import aiofile # pip install aiofile
REPORTS_FOLDER = "reports"
FILES_PATH = os.path.join(REPORTS_FOLDER, "files")
def download_files_from_report(urls):
@arose13
arose13 / install-conda.sh
Last active February 18, 2024 12:20
Install Miniconda in Ubuntu
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniconda and make it the main Python interpreter
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh
export PATH=~/miniconda/bin:$PATH
@ekiara
ekiara / gist:7676136
Created November 27, 2013 13:59
SQL Alchemy SQLITE relative path
#SQL Alchemy SQLITE relative path
# Relative path is the path 'raw' after the three initial slashses
e = create_engine('sqlite:///path/to/database.db')
e = create_engine('sqlite:///relative/path/here.db')
# Absolute path is a slash after the three initial slashses
e = create_engine('sqlite:////tmp/absolute_path_database.db')