Skip to content

Instantly share code, notes, and snippets.

View Eunoia1729's full-sized avatar
:octocat:
Looking out for awesome projects to contribute

Eunoia Eunoia1729

:octocat:
Looking out for awesome projects to contribute
View GitHub Profile
@Eunoia1729
Eunoia1729 / fibonacci.mysql
Created December 28, 2021 13:01
Generating fibonacci sequence in MySQL
WITH
RECURSIVE fib(n, a, b) AS
(
SELECT 1, 1, 0
UNION ALL
SELECT n + 1, a + b, a
FROM fib
WHERE n < 10
)
SELECT a
@skeeto
skeeto / README.md
Last active December 20, 2021 14:00
AI driving simulation
@4OH4
4OH4 / tfidf_adv.py
Last active April 13, 2023 21:56
TF-idf model with stopwords and lemmatizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
from nltk import word_tokenize
from nltk.stem import WordNetLemmatizer
import nltk
from nltk.corpus import stopwords
# Download stopwords list
nltk.download('punkt')
stop_words = set(stopwords.words('english'))
@ayan-b
ayan-b / c-cpp-oops.md
Last active January 24, 2024 19:27
C, C++ & OOPS for Interviews

DEPRECATED

New results will be saved in https://github.com/achow101/coin-selection-simulation

Performed in 2022:

Method Current Balance Mean #UTXO Current #UTXO #Deposits #Inputs Spent #Withdraws #Uneconomical outputs spent #Change Created #Changeless Min Change Value Max Change Value Mean Change Value Std. Dev. of Change Value Total Fees Mean Fees per Withdraw Cost to Empty Total Cost Min Input Size Max Input Size Mean Input Size Std. Dev. of Input Size BnB Usage SRD Usage Knapsack Usage #BnB no change #SRD no change #Knapsack no change
Master (7d1cef26) 16.55857290 128.469688101 58 4065 11182 7893 2 7175 718 0.00002240 274.32706193 17.5661542098 47.1756762651 0.44316889 0.0000561470784239 -0.0000394400000 0.443129450000 1 102 1.41669834030 2.50732528322 716 1936 5241 716 0 2
@jscarto
jscarto / pansharpen.js
Last active July 19, 2022 02:45
Pan-sharpen and display a Landsat 8 scene in Google Earth Engine
// Band combinations
var natural = ['B4', 'B3', 'B2'];
var swir = ['B6', 'B5', 'B3'];
var urban = ['B7', 'B6', 'B4'];
var veg = ['B5', 'B4', 'B3'];
// Get a Landsat scene
var scene = ee.Image('LANDSAT/LC8_L1T_TOA/LC80450332015263LGN00');
// Convert the RGB bands to the HSV