This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Python code to create bash script that block all Steam servers. | |
You must have installed ufw: | |
$ sudo apt install ufw | |
Then you can run this script and generated bash script: | |
$ python3 generate_block_steam_script.py > steam_block.sh | |
$ chmod +x steam_block.sh && sudo bash steam_block.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def dot(v, w): | |
x, y = v | |
X, Y = w | |
return x * X + y * Y | |
def length(v): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
from dataclasses import dataclass | |
from datetime import datetime | |
from typing import Optional, Iterator, cast | |
import bs4 | |
import requests | |
from bs4 import Tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Create widget with available icons from qt and based on freedesktop.org | |
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html | |
""" | |
from PyQt5.QtCore import QSize | |
from PyQt5.QtGui import QIcon | |
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QGridLayout, QStyle, \ | |
QFormLayout, QLabel, QScrollArea, QLineEdit, QTabWidget |