Skip to content

Instantly share code, notes, and snippets.

View eiAlex's full-sized avatar
🐍
Programming....

Álex Junio eiAlex

🐍
Programming....
View GitHub Profile
@eiAlex
eiAlex / API's.md
Created March 29, 2024 19:17 — forked from Soheab/API's.md
See here some of the API's you can use in your discord bot or anything

Some API's for you.

See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.

A much bigger list of APIs can be found here


[TOKEN] = API requires a token to access some if not all endpoints.

The descriptions are mostly copied from the API, sometimes personal or from the dev.

@eiAlex
eiAlex / fastapilonginlogout.py
Last active February 9, 2024 16:57
fastapilonginlogout.py
from fastapi import FastAPI, Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from jose import JWTError, jwt
from datetime import datetime, timedelta
from typing import Optional
app = FastAPI()
# Secret key to sign JWT tokens
SECRET_KEY = "your_secret_key"
'''Ola meu amigo! om auxilio da biblioteca xmltodict disponível em [link][1] é possível realizar o parser de xml para dict ou json e também realizar o caminho de volta.'''
#dependências
import xmltodict
import pprint
import json
my_xml = """
<nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
from pyspark.sql import functions as f
from pyspark.sql import SparkSession
class Transformation:
def __init__(self, id_execution, path_to_read, path_to_save):
self.id_execution = id_execution
self.path_to_read = path_to_read
self.spark = SparkSession.builder.appName('teste').getOrCreate()
{
"[sql]": {},
"mssql.connections": [
{
"server": "10.150.3.4\\MIBHPROAUTO003 ,1454",
"database": "",
"authenticationType": "Integrated",
"password": ""
}
],
@eiAlex
eiAlex / CalculaCirculo.java
Created April 20, 2019 13:22
Caucula circulo em java
import java.util.Scanner;
public class Principal {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Informe o raio do círculo");
double raio = in.nextDouble();
SELECT * FROM V$INSTANCE; // Lista as instancias , não estou certo se busca instancias de outra database.
SELECT * FROM dict;
DESC (TABELA); //O comando DESC DESCRIBE (abreviaÇÃO DESCRIBE) é utilizado para descrever um objecto do oracle.
@eiAlex
eiAlex / ExpressãoRegular.java
Last active January 13, 2018 02:14
ExpressãoRegular
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ExpressaoRegular {
public static void main(String[] args) {
boolean b = "JAVA".matches("JAVA"); //expressões regulares são sencivels a maiusculas e minusculas
System.out.println(b);
/* MODIFICADORES