For precision programmatic animation!
Translated from the JavaScript in Sean Yen’s Easing equations
Illustrations adapted from Andrey Sitnik and Ivan Solovev’s Easings.net
Example usage:
duration = 30
from threading import Thread | |
from pyray import * | |
from raylib import * | |
from time import sleep | |
# control variables | |
downloadPressed = False | |
uploadPressed = False |
For precision programmatic animation!
Translated from the JavaScript in Sean Yen’s Easing equations
Illustrations adapted from Andrey Sitnik and Ivan Solovev’s Easings.net
Example usage:
duration = 30
rm -rf ~/.config/JetBrains/GoLand2021.3/eval | |
rm -rf ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
touch ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
rm -rf ~/.java/.userPrefs/jetbrains/goland |
#!/usr/bin/env python3 | |
import i3ipc | |
from i3ipc import Event | |
from i3ipc.events import IpcBaseEvent, Event | |
i3 = i3ipc.Connection() | |
# callback for when workspace focus changes | |
def on_workspace(i3, e:IpcBaseEvent): | |
print(e.__dict__) |
#!/bin/bash | |
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev libxcb-xrm-dev | |
cd /tmp | |
# clone the repository | |
git clone https://www.github.com/Airblader/i3 i3-gaps | |
cd i3-gaps | |
# compile & install |
#Принудительно меняем раскладу для Konsole и kitty | |
#Для телеграм меняем на Русский | |
#Для всего остального меняю на английский | |
from i3ipc import Connection, Event | |
import subprocess,os |
Install k3s on master node:
curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token
Install k3s on worker nodes as agents:
Proof of concept of distributed rate limiting multiple workers processing speed.
Rate limiting follows a leaky bucket algorithim. The bucket is implemented using a speical token-bucket queue. Max size of the bucket is enforced by using the max length of a token queue. The bucket is refilled by a single worker, which also is responsible for the refill rate.
Workers must get a token before fetching and processing any tasks.
from flask import Flask | |
import webview | |
import sys | |
import threading | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello World!' |
""" | |
This is a simple example of usage of CallbackData factory | |
For more comprehensive example see callback_data_factory.py | |
""" | |
import asyncio | |
import logging | |
from aiogram import Bot, Dispatcher, executor, types | |
from aiogram.contrib.fsm_storage.memory import MemoryStorage |