Skip to content

Instantly share code, notes, and snippets.

View obestwalter's full-sized avatar
❄️
winter is coming

Oliver Bestwalter obestwalter

❄️
winter is coming
View GitHub Profile
@kasteph
kasteph / workshop.md
Last active February 11, 2021 16:52
PyCon Berlin 2019: Poetry Workshop

Package and Dependency Management with Poetry

The Poetry repository can be found here and the website here.

For documentation on the pyproject.toml file specific to Poetry, go here.

The goal of this workshop is to have a pyproject.toml that poetry can use to build your package to a distribution and then publish it to a private repository.

@zzzeek
zzzeek / sql.py
Last active August 15, 2023 10:00
The SQL is just as easy as an ORM challenge
""" "Writing SQL is just as fast as using an ORM" proof of concept
Below is a simple Python object model, where we represent a database that
stores the names of employees at a company, some of whom are "engineers",
and a list of the jobs they do and the programming languages they use.
We'd like to persist the state represented by this Python object model
in a relational database, using our Python objects as a start. Then we'd
like to write SQL queries for rows in this database, and we get back instances
of Python objects exactly as they were created.
@dmelliot
dmelliot / i3wm title bar icons
Last active August 1, 2022 01:22
i3wm window icon alternative using FontAwesome (or other icon based fonts)
# Title bar icons
for_window [class="(?i)firefox"] title_format "<tt></tt><span foreground='#FF6611'>  </span><tt> </tt>%title"
for_window [class="(.*)terminal(.*)"] title_format "<tt></tt><span foreground='#00FF00' background='#000000'>  </span><tt> </tt>%title"
for_window [class="(.*)Chromium-browser(.*)"] title_format "<tt></tt><span foreground='#367dd0' background='#d9e5f4'>  </span><tt> </tt>%title"
for_window [class="Evolution"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [title=".* Evolution"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="Slack"] title_format "<tt></tt><span foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="Signal"] title_format "<tt></tt><span background='#2090ea' foreground='#FFFFFF' >  </span><tt> </tt>%title"
for_window [class="VirtualBox Machine"] title_format "<tt></tt><span background='#073624' foreground='#AAAAFF' >  </span><tt> </tt>%title"
for_window [cla
@mipimipi
mipimipi / Install_Arch_Linux_on_USB_Stick.md
Last active February 9, 2022 14:27
Installing Arch Linux on an USB stick with encryted file system

Installing Arch Linux on an USB stick with encryted file system

Objective

Goal is to have an USB stick that ...

  • has a persistent Linux installed
  • can be connected and booted on different computers
  • has an encrypted file system

Approach

@notwaldorf
notwaldorf / list.md
Last active January 13, 2024 11:09
Meownica's packing list

Meownica's packing list

I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency you have
  • 🚎Local public transport cards
@binaerbaum
binaerbaum / arch-linux-install
Last active April 6, 2022 03:16 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
@dabeaz
dabeaz / bug.py
Created January 7, 2016 10:11
Diabolical bug involving code that behaves differently in a class decorator vs. a metaclass
# bug.py
def decorate(func):
print('Decorating', func.__name__)
return func
def wrap_methods(cls):
for name in vars(cls):
if name.startswith('f_'):
setattr(cls, name, decorate(getattr(cls, name)))
@ossanna16
ossanna16 / Beginner-friendly Python Open Source Projects
Last active February 5, 2024 09:46
This is a list of beginner-friendly Python open source projects. I'm always looking for new projects to add to my list, if you have an idea please tweet me at @ossanna16 :)
* OpenHatch - https://openhatch.org/search/?q=&language=Python
* PyLadies - https://github.com/pyladies
* New Coder - https://github.com/econchick/new-coder
* Django Girls - https://github.com/DjangoGirls
* Matplotlib - https://github.com/matplotlib/matplotlib
* Hylang - http://docs.hylang.org/en/latest/, https://github.com/hylang/hy
* Open Slides (Django) - http://openslides.org/
* Zeeguu - https://zeeguu.unibe.ch
* Project Jupyter - https://github.com/jupyter
* nbgrader - https://github.com/jupyter/nbgrader
@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.