Skip to content

Instantly share code, notes, and snippets.

View BenderV's full-sized avatar
🎯
Focusing

Benjamin BenderV

🎯
Focusing
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 18, 2024 01:40
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@stepney141
stepney141 / BookmarkAPI_en.md
Last active April 4, 2023 01:45
(DEPRECATED) Twitter Undocumented Endpoints for Bookmark
@nitred
nitred / db_manager.py
Last active January 19, 2024 10:09
Creating thread safe and managed sessions using SQLAlchemy
"""Creating thread safe and managed sessions using SQLAlchemy.
The sessions that are created are expected to be:
- thread safe
- handle committing
- handle rolling back on errors
- handle session removal/releasing once context or thread is closed.
Author: Nitish Reddy Koripalli
License: MIT
@leodutra
leodutra / mapStatesTwoWay.vuex.js
Last active June 9, 2019 09:09
Function for mapping Vuex states two way
import { mapState } from 'vuex'
export default function mapStatesTwoWay (namespace, states, updateCb) {
const mappedStates = mapState(namespace, states)
const res = {}
for (const key in mappedStates) {
res[key] = {
set (value) {
updateCb.call(this, { [key]: value })
},
@amberjrivera
amberjrivera / Pipeline-guide.md
Created January 26, 2018 05:02
Quick tutorial on Sklearn's Pipeline constructor for machine learning

If You've Never Used Sklearn's Pipeline Constructor...You're Doing It Wrong

How To Use sklearn Pipelines, FeatureUnions, and GridSearchCV With Your Own Transformers

By Emily Gill and Amber Rivera

What's a Pipeline and Why Use One?

The Pipeline constructor from sklearn allows you to chain transformers and estimators together into a sequence that functions as one cohesive unit. For example, if your model involves feature selection, standardization, and then regression, those three steps, each as it's own class, could be encapsulated together via Pipeline.

Benefits: readability, reusability and easier experimentation.
@levelsio
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@sublimino
sublimino / gist:a854b3bf9ac1cb94f640cd966c987f69
Last active July 13, 2022 13:50
tmux, terminator, and copyq

This has caused a not-inconsiderable amount of trouble! But finally, I've fixed copypasta:

Terminator

  1. enable global -> smart copy (only affects mapping of ctl-c if text selected)
  2. Disable profile -> copy on selection

copyq

  1. store clipboard
  2. store text using mouse
  3. ^^paste clipboard with mouse^^
@LouisBrunner
LouisBrunner / region-dpts-France.py
Last active March 1, 2023 20:41 — forked from mlorant/region-dpts-France.py
Liste des régions et départements français (dict. Python)
REGIONS = {
'Auvergne-Rhône-Alpes': ['01', '03', '07', '15', '26', '38', '42', '43', '63', '69', '73', '74'],
'Bourgogne-Franche-Comté': ['21', '25', '39', '58', '70', '71', '89', '90'],
'Bretagne': ['35', '22', '56', '29'],
'Centre-Val de Loire': ['18', '28', '36', '37', '41', '45'],
'Corse': ['2A', '2B'],
'Grand Est': ['08', '10', '51', '52', '54', '55', '57', '67', '68', '88'],
'Guadeloupe': ['971'],
'Guyane': ['973'],
'Hauts-de-France': ['02', '59', '60', '62', '80'],

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

## Useful Commands
Get kubectl version
kubectl version
Get cluster info: