Here's a cheat sheet for the Polars Python package, covering many of its key functions and features:
pip install polars
# Install Polars with all optional dependencies:
pip install 'polars[all]'
#!/bin/bash | |
# Change the date under CUTOFF_DATE to change how far back you want to delete | |
# Install the GitHub CLI tool by following the instructions in the official documentation: https://cli.github.com/manual/installation | |
# Make sure you auth first to github with 'gh auth login' | |
REPO_OWNER="OWNER" | |
REPO_NAME="REPO_NAME" | |
CUTOFF_DATE=$(date --date='30 days ago' +'%Y-%m-%dT%H:%M:%SZ') | |
PAGE=1 |
import asyncio | |
import sys | |
from pathlib import Path | |
import discord | |
from PIL import Image | |
def gerar_imagem(): | |
imagens = [ |
import asyncio | |
import psycopg2 | |
# dbname should be the same for the notifying process | |
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
cursor = conn.cursor() | |
cursor.execute(f"LISTEN match_updates;") |
This script makes it easier to copy Gnome settings and extensions from one pc to the other. It supports python>=3.5.
To use it, download it, then run python3 migrate_gnome_settings.py --export-settings
to create a tar.gz file with all the settings.
Then, on your new system, copy the script and the gzip to your user's home directory and run python3 migrate_gnome_settings.py --import-settings
.
For now, the script migrates:
Data Structures | |
- Stacks | |
- Queues | |
- Linked lists | |
- Graphs | |
- Trees | |
- Tries | |
Concepts | |
- Big O Notation |
# path on linux /usr/share/dbeaver/dbeaver.ini | |
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini | |
-vm | |
/usr/bin/java | |
-startup | |
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar | |
--launcher.library | |
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426 | |
-vmargs | |
-javaagent:/home/tunknown/.apps/dbeaver/dbeaver-agent.jar |
from django.db.models import Aggregate, FloatField | |
class Median(Aggregate): | |
function = 'PERCENTILE_CONT' | |
name = 'median' | |
output_field = FloatField() | |
template = '%(function)s(0.5) WITHIN GROUP (ORDER BY %(expressions)s)' |
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 | |
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
export VIMRUNTIME="$HOME/vim/runtime" | |
export PATH="$HOME/vim:$PATH" | |
cd - |
Here is the looks and feel of your terminal once the tutorial has been applied on your system:
Using Homebrew: