Skip to content

Instantly share code, notes, and snippets.

View headsrooms's full-sized avatar
🦊

Pablo Cabezas headsrooms

🦊
  • SNGULAR
  • Madrid
  • 07:59 (UTC +02:00)
View GitHub Profile
@Morreski
Morreski / timed_cache.py
Last active May 15, 2025 01:49
Python lru_cache with timeout
from datetime import datetime, timedelta
import functools
def timed_cache(**timedelta_kwargs):
def _wrapper(f):
update_delta = timedelta(**timedelta_kwargs)
next_update = datetime.utcnow() + update_delta
# Apply @lru_cache to f with no cache size limit
@ylogx
ylogx / xgboost_incremental.ipynb
Last active July 18, 2025 20:17
XGBoost Incremental Learning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swalkinshaw
swalkinshaw / tutorial.md
Last active June 6, 2025 19:24
Designing a GraphQL API
@apahl
apahl / nim_magic.py
Last active October 21, 2019 13:53
Nim cell magic for Jupyter and JLab Notebooks
"""
nim_magic.py
Jupyter cell magic for your favorite programming language.
This is now also available as a proper repo:
https://github.com/apahl/nim_magic
All further changes will be tracked there.
Requirements: Nim (https://nim-lang.org), nimpy (`nimble install nimpy`, thanks to @yglukhov for this great library!)
@honewatson
honewatson / elm.nim
Created July 4, 2018 13:33
Nim Karax Elm Architecture Example
include karax / prelude
import strutils
type
Model = object
counter*: int
Dispatch = proc(model: Model): void
proc init(): Model =
result = Model(counter: 0)
@peillis
peillis / developer.md
Last active August 5, 2018 20:11
Doofinder developer

Python Developer

We are seeking a self-motivated and enthusiastic senior software engineer to join the Doofinder team. The Doofinder team develops since 2011 the top search engine for webs and ecommerce, that helps retailers online to increase their sales.

Python developers are responsible for developing and updating the solution. You will use a wide variety of technologies, such as Python, Django, Elixir, AWS, Machine Learning and other web technologies to improve and implement new Doofinder´s features.

We are looking for smart, innovative, and driven developers. We will consider applicants with, at least, 3-4 years experienced in the technologies listed below, however you must have strong Python skills.

Key Responsibilities:

@etienned
etienned / export.py
Created September 21, 2018 04:23
Function to export a requirements.txt from poetry
from poetry.console.application import Application
from poetry.semver import parse_constraint, VersionUnion
def export_requirements(tag=False):
app = Application()
installed_repo = app.poetry.locker.locked_repository(True)
output = []
@Integralist
Integralist / Python API Design.md
Last active November 15, 2018 10:20
[Python API Design] #api #design #python

Rules

  1. Raise exceptions near to the source of the error.
  2. Raise custom exceptions that are a subclass of a custom parent exception.
  3. Catch the custom parent exception near the top level of your application.
  4. Return True if an otherwise impure/side-effect driven operation succeeded.
  5. Send (and document) standardized error messages (e.g. NOUN_STATE == INPUT_INVALID)
  6. Send appropriate response status codes so callers can handle errors without parsing response structure.

Example

@gimenete
gimenete / readme.md
Last active March 9, 2024 16:36
Notas para orientación profesional como programador

Tras este tweet que publiqué

He sido freelance, emprendedor y trabajo desde hace años para empresas USA de diversos tamaños en remoto como programador fullstack. Ahora en GitHub. Si puedo ayudar a alguien en orientar su carrera, mis DMs están abiertos. Ask me anything.

he recibido muchos mensajes y escribo aquí algunos de los consejos que he dado en resumen. Nota: algunas cosas son concretas de trabajar en España. Si vas a trabajar desde Sudamérica sólo una nota: tienes la ventaja de la zona horaria para trabajar con EEUU.

Inglés

Tener un buen nivel de inglés es fundamental para poder trabajar con clientes extranjeros. El conocimiento del idioma tiene que mantenerse en el tiempo. Es como mantenerse en forma física; si lo dejas, lo pierdes. Personalmente aunque trabajo 100% en inglés desde hace bastantes años, intento crearme un entorno diario con el idioma para no perderlo:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.