Skip to content

Instantly share code, notes, and snippets.

Wypili moją krew na hejnał

Glutexo Glutexo

Wypili moją krew na hejnał
  • Frýdek, Czechia
View GitHub Profile
Glutexo / combinations.exs
Created Jun 13, 2022
Recursive combinations with subsets
View combinations.exs
defmodule Combination do
def combine([]) do
def combine([head | tail]) do
tail_combinations = combine(tail)
merged_combinations =
[[]] ++ tail_combinations,
fn c -> c ++ [head] end
Glutexo / Pokemon.csv
Last active Mar 21, 2022
Hra na myšlenou potvoru
View Pokemon.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Stáhněte si z
Glutexo /
Last active Feb 4, 2022
Get Insights Core version from Insights Client RPM
from contextlib import contextmanager
from os.path import join
from rpmfile import open as rpm_open
from sys import argv
from zipfile import ZipFile
EGG_PATH = join(".", "etc", "insights-client", "rpm.egg")
VERSION_PATH = join("insights", "VERSION")
Glutexo /
Last active Nov 30, 2021
A cell object that doesn’t require knowledge of any names
_NOTHING = object()
DELETE = object()
class Cell:
def __init__(self, value=_NOTHING):
if value is not _NOTHING:
self.value = value
def __call__(self, value=_NOTHING):
Glutexo /
Created Nov 30, 2021
A mutable cell with the simplest API possible
_SENTINEL = object()
class Cell:
def __init__(self, value=_SENTINEL):
if value is not _SENTINEL:
self.value = value
def __call__(self, value=_SENTINEL):
if value is not _SENTINEL:
Glutexo / data_collector.patch
Last active Nov 9, 2021
Data Collector patch for Insights Core to limit collection only to a single file
View data_collector.patch
Index: insights/client/
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
diff --git a/insights/client/ b/insights/client/
--- a/insights/client/ (revision 42907d96132d4877ac588e6aa090b0cd4adbfcf1)
+++ b/insights/client/ (date 1636398517420)
@@ -320,6 +320,13 @@
rm_commands = rm_conf.get('commands', [])
Glutexo /
Last active Mar 21, 2022
Get a file from an Insights archive
from collections import namedtuple
from contextlib import contextmanager
from functools import partial
from io import BytesIO
from io import StringIO
from os.path import join
from re import escape
from re import fullmatch
from shlex import quote
from tarfile import open as tar_open
Glutexo / uninstall-all-pip-packages.xonsh
Created Sep 12, 2021
xonsh script to uninstall all pip packages
View uninstall-all-pip-packages.xonsh
for line in $(pip freeze).split("\n"):
. try:
. package, _ = line.split("==")
. except ValueError:
. continue
. else:
. $(pip uninstall -y @(package))
View gist:5669c06ef54e60684c4433e0a9e29534
* 2020.08.27 APA - FINAL AZ signature only - Legal Redactions
* 1. Definitions.
* 1.1. “Accounting Standards” means International Financial Reporting Standards (IFRS).
* 1.2. “Additional Doses” has the meaning given in Section 5.3.
Glutexo / pomodoro.html
Created Sep 24, 2020
A simple experiment with JavaScript objects
View pomodoro.html
<meta charset="utf-8"/>