This repository is trending on Github since some days now. Watch it, we will add many updates in the future. Thank you for your support.
Check the website.
""" | |
Single Responsibility Principle | |
“…You had one job” — Loki to Skurge in Thor: Ragnarok | |
A class should have only one job. | |
If a class has more than one responsibility, it becomes coupled. | |
A change to one responsibility results to modification of the other responsibility. | |
""" | |
class Animal: | |
def __init__(self, name: str): |
-- Hammerspoon configuration to switch keyboard languages with shortcuts | |
-- Table to keep track of the last modifiers and if another key was pressed | |
local lastModifiers = {} | |
local otherKeyPressed = false | |
-- Function to handle single taps on modifier keys | |
local function singleTapHandler(event) | |
local newModifiers = event:getFlags() | |
local keyCode = event:getKeyCode() |
This repository is trending on Github since some days now. Watch it, we will add many updates in the future. Thank you for your support.
Check the website.
A collection of anything from basics to advanced recommended methods and usages with Django REST Framework for creating browsable and awesome web API's. This could also serve as a quick reference guide.
Here is DRF's official documentation in case you need everything in detail.
Summarized from the official docs:
I hereby claim:
To claim this, I am signing this object:
version: '3' | |
services: | |
docker-registry: | |
container_name: docker-registry | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
restart: always | |
volumes: |
import resource | |
from functools import wraps | |
def mem_it(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
print( | |
'Pre-memory usage: {} (mb)'.format( | |
resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024 |
sudo lsblk -p
to list all mounted devices, and select your SDsudo umount /dev/your-SD-device
sudo dd if=image.img of=/dev/your-SD-device status=progress
to install image on SDMore details you can find in documentation.
This document assumes Go version 1.0.3.