Skip to content

Instantly share code, notes, and snippets.

View thotypous's full-sized avatar

Paulo Matias thotypous

View GitHub Profile
@thotypous
thotypous / top.sby
Last active February 18, 2025 11:57
symbiyosys and yosys-smtbmc simple example (sby -f top.sby)
[options]
mode cover
depth 20
[engines]
smtbmc yices
[script]
read -formal top.v
prep -top top
@thotypous
thotypous / rede_de_dormir.py
Last active October 20, 2024 23:18
Cálculo do comprimento ideal de uma rede de dormir
#!/usr/bin/env python
from sympy import sinh, acosh, sqrt, nsolve, Symbol, Float
def calcular_rede(altura_rede, altura_ganchos, distancia_ganchos):
H = distancia_ganchos
h = altura_ganchos - altura_rede
a = Symbol('a')
L = Symbol('L')
@thotypous
thotypous / plot.py
Last active February 27, 2023 13:13
Medição de latência e velocidade de download e upload para diversos servidores
import re
import math
import itertools
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import numpy as np
from datetime import datetime
from collections import defaultdict
@thotypous
thotypous / synth-cw.py
Last active September 5, 2021 16:34
morse CW keyer using jack
#!/usr/bin/env python3
import jack
import curses
import queue
from math import sin, pi
f = 700 # Hz
#duration = 0.240 # seconds
duration = 0.080 # seconds
latency = 0.020 # seconds
@thotypous
thotypous / gerar_certificados_aciepe.py
Last active May 9, 2021 10:34
Gera automaticamente certificados para uma ACIEPE no SEI da UFSCar
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
from urllib.parse import urlencode
from html import unescape
import argparse
import requests
import locale
import time
import csv
import os
@thotypous
thotypous / check_trustees.py
Created September 5, 2020 22:09
Check if combined public key was correcly computed
#!/usr/bin/env python3
import requests
import sys
import os
import re
election_uuid = sys.argv[1]
base_url = 'https://votacao.ufscar.br'
login_url = '{}/auth/ldap/login'.format(base_url)
@thotypous
thotypous / reeval_pr.py
Created May 29, 2020 21:07
For NIZKCTF
#!/usr/bin/env python3
from nizkctf.team import Team
from nizkctf.acceptedsubmissions import AcceptedSubmissions
from nizkctf.settings import Settings
from nizkctf.proof import proof_open
import os
import sys
import requests
import datetime
import pytz
@thotypous
thotypous / PKGBUILD
Last active April 12, 2020 13:57
bluespec-git PKGBUILD
# Maintainer: Jiuyang Liu <[email protected]>
# Maintainer: Paulo Matias <[email protected]>
pkgname=bluespec-git
pkgver=r285.9dfe8f5
pkgrel=1
pkgdesc='Bluespec Compiler (BSC)'
arch=('x86_64')
url='https://github.com/B-Lang-org/bsc'
license=('BSD')
#!/usr/bin/python3
from nizkctf.team import Team, SUBMISSIONS_FILE
from nizkctf.acceptedsubmissions import AcceptedSubmissions
from nizkctf.subrepo import SubRepo
from nizkctf.settings import Settings
import os
import subprocess
import requests
import datetime
import pytz
@thotypous
thotypous / juggle.xml
Created December 30, 2018 17:06
35C3 Juggle challenge solution
<?xml version="1.0" encoding="UTF-8"?>
<meal>
<course> <!-- #0 -->
<!-- jump if there are iterations to do -->
<plate><paella>5</paella></plate> <!-- course number -->
<plate><paella>1</paella></plate>
<plate><불고기/></plate>
<plate><æblegrød/></plate>
<!-- otherwise print flag and exit -->