Skip to content

Instantly share code, notes, and snippets.

View M3nin0's full-sized avatar
🌍

Felipe M3nin0

🌍
View GitHub Profile
@denguir
denguir / cuda_install.md
Last active November 15, 2024 20:13
Installation procedure for CUDA / cuDNN / TensorRT

How to install CUDA / cuDNN / TensorRT on Ubuntu

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@c-neto
c-neto / clone-all-repos-github.sh
Last active May 25, 2024 23:06
Bash script for cloning all GitHub repositories associated with a specific user, provided as an argument.
#!/bin/bash
# Cloning all GitHub repositories belonging to a specific user provided as an argument.
#
# Command Execution Example:
# ./clone-all-repos-github.sh <USERNAME>
#
# Arguments:
# <USERNAME> GitHub username whose repositories will be cloned.
#
import os
from bs4 import BeautifulSoup
import json
def get_filepaths(path):
return [os.path.join(path, talk) for talk in os.listdir(path)]
def extract_questions_talk(filepath):
@gnthibault
gnthibault / installGDAL.sh
Created March 27, 2018 11:52
Installing GDAL (c++ anf python) on ubuntu 16.04
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
sudo apt-get install libgdal-dev libgdal1i
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@thomasbnt
thomasbnt / code_colors_discordjs.md
Last active November 17, 2024 13:42
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
@filipemeneses
filipemeneses / fatec-siga-get-nome.js
Created December 13, 2017 02:43
Login e raspagem do nome no SIGA da Fatec
const request = require('request-promise-native')
const cheerio = require('cheerio')
const login = ({user, pass}) => {
let options = {
method: 'POST',
uri: 'https://siga.cps.sp.gov.br/aluno/login.aspx',
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded',
'Origin': 'https://siga.cps.sp.gov.br'
import numpy as np
from keras import backend as K
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.preprocessing.image import ImageDataGenerator
from sklearn.metrics import classification_report, confusion_matrix
#Start
train_data_path = 'F://data//Train'
@ellisvalentiner
ellisvalentiner / bulk-insert.py
Last active January 10, 2023 19:03
Recipe for (fast) bulk insert from python Pandas DataFrame to Postgres database
#!/usr/bin/env/python
import psycopg2
import os
from io import StringIO
import pandas as pd
# Get a database connection
dsn = os.environ.get('DB_DSN') # Use ENV vars: keep it secret, keep it safe
conn = psycopg2.connect(dsn)
@miguelmota
miguelmota / events.js
Created June 21, 2017 04:23
JavaScript class extend EventEmitter
const EventEmitter = require('events')
class MyClass extends EventEmitter {
constructor() {
super() // required
this.emit('event', 100)
}
}