Skip to content

Instantly share code, notes, and snippets.

View dusekdan's full-sized avatar
🟠
MIA

Daniel Dusek dusekdan

🟠
MIA
View GitHub Profile
def ips_in_net(ip='192.168.1.8', subnet='255.255.255.0'):
from ipaddress import ip_address, ip_network
hosts = list(ip_network(f"{ip}/{subnet}", strict=False).hosts())
return [f"{host}" for host in hosts]
@dusekdan
dusekdan / Šablona emailu pro Credit Now | České Aukce | AB Partners
Last active August 17, 2019 17:55
Šablona emailu k poslání na platby@credit-now.info a info@abpartners.cz
Stali jste se obětí podvodných praktik firem České Aukce popřípadě Credit Now a morálně zpochybnitelných praktik jejich
zastupující advokátní kanceláře AB Partners (Mgr. Petr Bílý, Mgr. Jan Ambrož)? Využijte tuto šablonu pro email, který
povede na ukončení celé záležitosti.
Níže naleznete šablonu emailu, který zaslat na emailové adresy:
- info@abpartners.cz
- platby@credit-now.info
Tuto šablonu, ani její části nepovažujte za právní radu. Text šablony si PŘEČTĚTE A UPRAVTE, ABY VAŠE INFORMACE SEDĚLY
@dusekdan
dusekdan / prepare_for_github.py
Last active June 30, 2019 15:09
Fragments files in the directory so they can be pushed into Github.
# Recursively goes through the TARGET directory and zips files that are
# over SIZE_LIMIT bytes into PART_SIZE_7z parts, deleting the originals.
#
# Uses 7zip utility that needs to be ADDED INTO THE $PATH.
#
# Results in a directory structure that can be pushed into
# the GitHub without issues with oversized files.
import os, sys, subprocess
from time import sleep
@dusekdan
dusekdan / MuellerReportScaper.py
Created April 21, 2019 04:43
Scrapes the Mueller report from the wired's embedded article reader.
"""
Wired Article with embeded web-reader: https://www.wired.com/story/mueller-report-russia-redacted-trump-barr-read/
How to use this script:
- Python3 & installed requests package (run: 'pip install requests')
- Create "report" folder in the same directory as this script
- run: 'python MuellerReportScraper.py'
"""
import os
import requests

Keybase proof

I hereby claim:

  • I am dusekdan on github.
  • I am dusekdan (https://keybase.io/dusekdan) on keybase.
  • I have a public key ASAl4ufteQh0y0tFaOVvsM9y-yTQYwUVC2IH2D4H2USl4go

To claim this, I am signing this object:

console.log("whatever");
eval(document.domain); // oh shit
import sys
import os
import datetime
from shutil import copy
# By far the easiest way to get song duration is to use mutagen library. You
# can install it using PIP as follows:
# pip install mutagen
from mutagen.mp3 import MP3
from mutagen import MutagenError
SHELL := /bin/bash
# Retrieves todo items from LaTeX file and prints them (+ their count)
define get_todo_items
@allTodoItems=$$(grep -i '% todo' xdusek21.tex | wc -l); echo -e "\n\e[33mFound \e[91m$$allTodoItems \e[33mTODO items:\n"
@grep -i '% todo' xdusek21.tex | while read -r line ; do echo -e "\t \e[92m$$line\n" ; done ; echo -e "\e[39m"
endef
all:
# Spotify fix
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 desktop.spotify.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 audio2.spotify.com
127.0.0.1 www.omaze.com
127.0.0.1 omaze.com

Vypracování otázek z první přednášky

2.01: Sebereflexe a sebeřízení

2.01.1 Peníze:

  • A. Nefungují jako motivace, pouze jako faktor hygieny, tedy stimulace.
  • B. Jsou stimulantem, protože nemohou vyvolat pocit motivace.
  • C. Mohou motivovat i stimulovat, byť je schopnost motivace omezena.
  • D. Fungují jako nejsilnější faktor motivace i stimulace zároveň.

2.01.2 Ke které behaviorální kompetenci se vztahuje následující chování: "Kritika ho uráží anebo pobuřuje, na útoky reaguje agresivně, často reaguje emocionálně a nekontroluje se. Vůči ostatním je zaujatý.":