https://realpython.com/python-descriptors/
https://realpython.com/python-keyerror/
https://realpython.com/inheritance-composition-python/
https://tryexceptpass.org/article/distributing-python-applications/
pythonwtf
num_list = [2, 4, 1, 6, 40, 2, 24, 3, 1, 5, 6, 8, 12, 9, 31, 45, 7, 14, 19, 20] | |
count = 5 | |
paritioned_list = [] | |
for i in range(count-1): | |
paritioned_list.append(num_list[i*count:(i+1)*count]) | |
two_d_4x4 = [ | |
list(set(first_list).intersection(second_list)) | |
for first_list in paritioned_list | |
for second_list in paritioned_list |
--- | |
- hosts: all | |
vars: | |
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx' | |
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx' | |
UBUNTU_COMMON_LOGWATCH_EMAIL: [email protected] | |
ubuntu_common_deploy_user_name: deploy | |
ubuntu_common_deploy_public_keys: | |
- ~/.ssh/id_rsa.pub |
This is my main.py
.
.
.
.
try:
cmd_type = sys.argv[1]
except IndexError:
cmd_type = "run"
import datetime | |
from web_service.models import ServerCves | |
from web_service.tasks import schedule_server_cve_relations | |
date_of_core_hotfix_update = datetime.datetime(2020, 1, 12, 0, 0) | |
broken_servercves = ServerCves.objects.filter(added_date__gt=date_of_core_hotfix_update) | |
cve_list = broken_servercves.values_list('cve', flat=True).distinct() | |
broken_servercves.delete() | |
schedule_server_cve_relations(cve_list) |
#!/bin/bash | |
# | |
# Author: Patrick Bailey | |
# License: MIT | |
# | |
# Set the percentage of 200, 404, and 500 errors you want | |
# Set the hourly rate you want | |
# Set a URL for 200, 404 and 500 | |
# | |
# Then run it. it will suffle the 200, 404, and 500 urls |
##TCP FLAGS## | |
Unskilled Attackers Pester Real Security Folks | |
============================================== | |
TCPDUMP FLAGS | |
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
Pester = PSH = [P] (Push Data) | |
Real = RST = [R] (Reset Connection) | |
Security = SYN = [S] (Start Connection) |
#include "LiquidCrystal.h" | |
#include "Timer.h" | |
Timer Count; | |
// rs, en, d4, d5, d6, d7 | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
long rpmcount; | |
const int hallPin = 2; | |
int time_now = 0; |
yum search
yum info
rpm -qa | grep package
yum repolist
search on epel repo only and you can pipe it with grep package
yum --disablerepo="*" --enablerepo="epel" list available
@dataclass | |
class FieldUpdate | |
field_name: str | |
value: Any # ``Any`` and ``Union`` are taken from the ``typing`` module. | |
invalid_reason: Union[FieldErrors.Unknown, FieldErrors.Immutable, None] | |
class ModelUpdate: | |
def __init__(self, model_class, request_body): | |
updates = [] |