Skip to content

Instantly share code, notes, and snippets.

@syrusakbary
syrusakbary / benchmark.md
Created March 16, 2024 20:16
Pystone benchmark comparison (Native vs CPython interpreter vs Nuitka)

Native

When executing Python natively:

$ python pystone.py
Pystone(1.1) time for 50000 passes = 0.129016
This machine benchmarks at 387549 pystones/second
@sergiecode
sergiecode / curso-java.md
Last active April 19, 2024 12:45
Instalaciones Necesarias y recomendadas para el curso de JAVA
@bcschwimm
bcschwimm / smtplib_with_MIME_gmail.py
Last active April 19, 2024 12:42
Tutorial on Sending an email using Python with Subject & BCC
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from_addr = 'yourgmail@gmail.com'
to_addr = 'recipiantmail@gmail.com'
bcc = ['emailone@gmail.com', 'emailtwo@gmail.com']
msg = MIMEMultipart()
@Teufen
Teufen / nt2024.md
Last active April 19, 2024 12:41
Northern Traverse 2024

Northern Traverse - 6-8 April 2024

Start of the C2C walk

The Northern Traverse follows Alfred Wainwright's Coast to coast walk, as he described it in his book. It garantees hours of fun on a 300km cours from Saint Bees at the Irish Sea, through 3 National Parks: Lake District, Yorkshire Dales, North York Moors, to Robin Hood's Bay on the shores of the Northsea.

@virgiliojr94
virgiliojr94 / desafio-backend-jr.md
Last active April 19, 2024 12:41
Desafio: Terminal de Gerenciamento de Investimentos [Off] [Estagiário] [Junior]

Desafio: Terminal de Gerenciamento de Investimentos [Off] [Estagiário] [Junior]

Contexto

Ativos financeiros representam a posse de um direito econômico que pode gerar lucro ao longo do tempo. Os ativos possuem preço, identificação, titular, tipo (ações, títulos do tesouro direto, títulos de CDB, etc...) e podem ser negociados no mercado financeiro dependendo da política de cada tipo. Também são conhecidos como "papéis" embora sejam títulos digitais intangíveis. Um ativo financeiro pode aumentar de rentabilidade ao longo do tempo, por exemplo, quem comprou uma ação da Empresa A na bolsa da Nasdaq no dia 2 de novembro de 2020, pagou $52,95. Hoje esse mesmo ativo está valendo $69,33 representando uma rentabilidade de %30,93 para o titular.

Aplicativos de carteira de investimentos são muito comuns no mercado financeiro quando estamos falando do gerenciamento de ativos financeiros. A ideia é ajudar investidores a manterem sua lista de ativos comprados, rendimento, valor total por ativo, tipo de operação, et

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active April 19, 2024 12:41
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally
  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

*.ipynb filter=strip-notebook-output  
@qianguigui1104
qianguigui1104 / Pam Qian_Tic Tac Toe_2016.py
Last active April 19, 2024 12:40
A traditional Tic Tac Toe game written in Python
# Pam Qian 2016 Fall CS 112 Python Midterm Project II
# Tic Tack Toe
def main():
# The main function
introduction = intro()
board = create_grid()
pretty = printPretty(board)
symbol_1, symbol_2 = sym()
full = isFull(board, symbol_1, symbol_2) # The function that starts the game is also in here.
@joulgs
joulgs / terminal.txt
Last active April 19, 2024 12:34
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096