Skip to content

Instantly share code, notes, and snippets.

View encukou's full-sized avatar

Petr Viktorin encukou

  • Python Software Foundation
  • Czech Republic
  • 10:55 (UTC +02:00)
View GitHub Profile
# pip install pyglet
import pyglet
window = pyglet.window.Window(
style=pyglet.window.Window.WINDOW_STYLE_BORDERLESS,
resizable=True,
)
label = pyglet.text.Label('Zavřít ', font_name=['Fira Mono', 'Courier New'])
# Shaped clock, adapted from:
# https://doc.qt.io/qt-6/qtwidgets-widgets-shapedclock-example.html
# pip install pyside6
from PySide6 import QtWidgets, QtCore, QtGui
app = QtWidgets.QApplication([])
class ShapedClock(QtWidgets.QWidget):
def __init__(self):

Turnaj v piškvorkách - podzim 2020

Účastnice:
    drak-1o
    kocka-1
    kun-2
    liska-1
 motyl-2
# To install/run/use, in a venv:
#
# $ python -m pip install flask flask-basicauth requests
# $ export FLASK_APP=quick-pypi-proxy.py
# $ export FLASK_DEBUG=1
# $ flask run
#
# $ python -m pip install --index-url http://127.0.0.1:8089/simple notebook
#
# (If you're testing pip with --use-feature=fast-deps, turn it off.)
#include <stdio.h>
#include <stdlib.h>
struct node {
int number;
struct node *left;
struct node *right;
};
void print_tree(struct node *tree, int depth, char rl) {
<!DOCTYPE html>
<!--
Tento soubor si otevři ve webovém prohlížeči.
Často v prohlížeči jde otevírat pomocí Ctrl+O.
-->
<html>
<head>
<title>HTML stránka</title>
import dnf
cachedir = '_dnf_cache_dir'
the_arch = 'x86_64'
base = dnf.Base()
conf = base.conf
conf.cachedir = cachedir
conf.substitutions['releasever'] = '32'
conf.substitutions['basearch'] = the_arch
@encukou
encukou / myfailures.py
Created July 25, 2019 12:17 — forked from hroncok/myfailures.py
Watch my FTBFSes
#! /usr/bin/env -S bash -c 'watch -n 300 I=$(whoami) python3.8 myfailures.py'
import re
import sys
import os
from urllib.request import urlopen
URL = 'https://kojipkgs.fedoraproject.org/mass-rebuild/f31-failures.html'
#USER = sys.argv[1]
def obrazek(level):
if level == 0:
return """
# Zpětná vazba k Hadímu workshopu, 13. 10. 2018
= Věci s "+" byly na zelených papírcích, s "-" na červených.
= Na některých papírcích bylo víc bodů; ty jsou tu rozděleny.
= V rámci anonymity byly poznámky přeloženy do češtiny (např. ze slovečiny)
a přechýleny do mužského rodu.
= Zhruba seřazeno od toho, co se povedlo nejvíc, k tomu co lidem nejvíc vadilo.
## Lidi a přístup