This file contains 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
from unicodedata import name | |
ANIMALS = ( | |
"🐶🐱🐭🐹🐰🦊🐻🐼🐻🐨🐯🦁🐮🐷🐽🐸🐵🙈🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🪱🐛🦋🐌🐞🐜🪰🪲🪳🦟🦗🕷🕸🦂🐢🐍🦎🦖🦕🐙🦑🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🦭🐊" | |
"🐅🐆🦓🦍🦧🦣🐘🦛🦏🐪🐫🦒🦘🦬🐃🐂🐄🐎🐖🐏🐑🦙🐐🦌🐕🐩🦮🐈🪶🐓🦃🦤🦚🦜🦢🦩🕊🐇🦝🦨🦡🦫🦦🦥🐁🐀🐿🦔🐾🐉🐲" | |
) | |
class Emoticons: |
This file contains 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
ANIMALS = { | |
"🐇": "🐰", | |
"🐁": "🐭", | |
"🐈": "🐱", | |
"🐕": "🐶", | |
"🐅": "🐯", | |
"🐄": "🐮", | |
"🐖": "🐷", | |
"🐒": "🐵", | |
"🐥": "🐤", |
This file contains 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
defmodule Combination do | |
def combine([]) do | |
[] | |
end | |
def combine([head | tail]) do | |
tail_combinations = combine(tail) | |
merged_combinations = Enum.map( | |
[[]] ++ tail_combinations, | |
fn c -> c ++ [head] end |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains 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
Stáhněte si z https://raw.githubusercontent.com/frenzymadness/Data_analysis_workshop/master/data/Pokemon.csv. |
This file contains 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
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") | |
This file contains 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
_NOTHING = object() | |
DELETE = object() | |
class Cell: | |
def __init__(self, value=_NOTHING): | |
if value is not _NOTHING: | |
self.value = value | |
def __call__(self, value=_NOTHING): |
This file contains 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
_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: |
This file contains 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
Index: insights/client/data_collector.py | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/insights/client/data_collector.py b/insights/client/data_collector.py | |
--- a/insights/client/data_collector.py (revision 42907d96132d4877ac588e6aa090b0cd4adbfcf1) | |
+++ b/insights/client/data_collector.py (date 1636398517420) | |
@@ -320,6 +320,13 @@ | |
rm_commands = rm_conf.get('commands', []) |
This file contains 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
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 |
This file contains 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
for line in $(pip freeze).split("\n"): | |
. try: | |
. package, _ = line.split("==") | |
. except ValueError: | |
. continue | |
. else: | |
. $(pip uninstall -y @(package)) |
NewerOlder