Skip to content

Instantly share code, notes, and snippets.

View vieirin's full-sized avatar
🦦

Vieira Neto vieirin

🦦
View GitHub Profile
import requests
import json
endpoint = 'https://dadosabertos.camara.leg.br/api/v2/proposicoes'
params = {"numero": 2945, "ordem": 'ASC', "ordenarPor": "id", "ano": 2020}
response = requests.get(endpoint, params=params).json()
json.dump(response, open('/tmp/arquivosalvo.json', 'w'), indent=4, sort_keys=True)
@vieirin
vieirin / pdf.worker.js
Created February 11, 2021 23:10
PDF.js without sig
This file has been truncated, but you can view the full file.
/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2020 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
// secp256r1 OBJECT IDENTIFIER ::= {
// iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
// prime(1) 7 }
//
marshaledOID, err := asn1.Marshal(asn1.ObjectIdentifier{1, 3, 132, 0, 33})
if err != nil {
return nil, nil, fmt.Errorf("Could not marshal OID [%s]", err.Error())
}
pubkeyT := []*pkcs11.Attribute{
package main
/*
#cgo CFLAGS: -I/usr/include/
#cgo LDFLAGS: -ldinamo -ltacndlib
#include <dinamo.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
import time
numbers = [9] * 20
carry = 0
def foo(num):
global carry
sum = num + 1 + carry
if sum < 10:
return sum
package main
import (
"fmt"
"github.com/miekg/pkcs11"
)
func main() {
p := pkcs11.New("/usr/lib/libsofthsm2.so")
#include <vector>
#include <string>
#include <iostream>
struct tuple {
tuple(std::string name, int age) {
key = name;
value = age;
}
std::string key;
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
---
################################################################################
#
# Section: Organizations
#
@vieirin
vieirin / cidadesBR.json
Created October 15, 2018 21:02
Esse arquivo contém um json com todas as cidades dos Estados Brasileiros
{"ES": ["Afonso Cláudio", "Água Doce do Norte", "Águia Branca", "Alegre", "Alfredo Chaves", "Alto Rio Novo", "Anchieta", "Apiacá", "Aracruz", "Atilio Vivacqua", "Baixo Guandu", "Barra de São Francisco", "Boa Esperança", "Bom Jesus do Norte", "Brejetuba", "Cachoeiro de Itapemirim", "Cariacica", "Castelo", "Colatina", "Conceição da Barra", "Conceição do Castelo", "Divino de São Lourenço", "Domingos Martins", "Dores do Rio Preto", "Ecoporanga", "Fundão", "Governador Lindenberg", "Guaçuí", "Guarapari", "Ibatiba", "Ibiraçu", "Ibitirama", "Iconha", "Irupi", "Itaguaçu", "Itapemirim", "Itarana", "Iúna", "Jaguaré", "Jerônimo Monteiro", "João Neiva", "Laranja da Terra", "Linhares", "Mantenópolis", "Marataízes", "Marechal Floriano", "Marilândia", "Mimoso do Sul", "Montanha", "Mucurici", "Muniz Freire", "Muqui", "Nova Venécia", "Pancas", "Pedro Canário", "Pinheiros", "Piúma", "Ponto Belo", "Presidente Kennedy", "Rio Bananal", "Rio Novo do Sul", "Santa Leopoldina", "Santa Maria de Jetibá", "Santa Teresa", "São Domingos do
import (
"encoding/json"
"fmt"
"log"
"net/http"
"tb-to-composer/jsondef"
)
type RequestThingsBoard struct {
assets structures.Assets