Skip to content

Instantly share code, notes, and snippets.

View bswck's full-sized avatar
😃

Bartosz Sławecki bswck

😃
View GitHub Profile
import pandas as pd
x = pd.DataFrame()
@bswck
bswck / im_done.md
Last active May 8, 2024 15:44
100% is not enough

Acing a recruitment task? Get ready to be rejected!

I'm done, guys. In April, I sent an application for a Fullstack Python Developer internship at Samsung R&D.
After (allegedly) reviewing my CV, they decided to invite me to a test assessing my technical skills:

invitation to test

Great! I indeed got the e-mail with the invitation link soon after: test link

@bswck
bswck / english_is_beautiful.md
Last active March 27, 2024 20:48
Words and phrases I learned from jaraco
@bswck
bswck / jaraco_namespace.py
Last active February 6, 2024 18:58
jaraco.* projects
#!/usr/bin/env -S pip-run -v httpx tabulate pyarrow pandas pypistats
from __future__ import annotations
import re
import xmlrpc.client
from functools import cache
import pandas as pd
from httpx import HTTPStatusError, get
from pypistats import recent
@bswck
bswck / projects.txt
Last active February 2, 2024 13:28
jaraco.develop testing
/jaraco/jaraco.functools [fork] (python, stdlib, functools)
/pypa/setuptools [fork] (python, python packaging, packaging, setuptools)
mempip (python, pip, caching)
@bswck
bswck / terms.txt
Created December 18, 2023 14:28
Polish math terms
abak
abakus
aksjomat
aksjomat Euklidesa
aksjomaty planimetrii
aksjomatyczna teoria mnogości
alef zero
alternatywa
analiza matematyczna
arcus cosinus
from __future__ import annotations
import re
import xmlrpc.client
from functools import cache
from posixpath import basename
import pandas as pd
from httpx import HTTPStatusError, get
from pypistats import recent
@bswck
bswck / descriptor_source_check.py
Last active September 17, 2023 16:47
Check whether the descriptor was called from the owner's method or from somewhere else.
# (C) 2023, bswck
import inspect
from collections.abc import Callable
from types import MethodType
class Descriptor:
def __init__(
self,
stack_offset: int = 1,
@bswck
bswck / xss.jpg
Last active January 22, 2023 14:36
xss.svg
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
<rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />
<script type="text/javascript">
alert("XSS");
</script>
</svg>
@bswck
bswck / emailing.py
Last active November 11, 2022 20:21
Minimal, persistent and multi-threaded e-mail delivery system in Flask
"""
Remember to set the SMTP_HOST environment variable
or pass it as a keyword argument to EmailWorker()!
Requirements:
pip install flask-mail persist-queue
Usage:
# To deliver an e-mail
from flask_mail import Message