Skip to content

Instantly share code, notes, and snippets.

View headsrooms's full-sized avatar
🦊

Pablo Cabezas headsrooms

🦊
  • SNGULAR
  • Madrid
  • 21:28 (UTC +02:00)
View GitHub Profile
Listado de Proxies para Telegram
Copia y pega los enlaces en el navegador para que se abran con Telegram.
Añade los servidores y DESACTIVA el proxy mientras no lo necesites.
Podéis gestionarlos desde Ajustes > Datos y almacenamiento > Proxy
*23/03/2024*
tg://proxy?server=proxy.digitalresistance.dog&port=443&secret=d41d8cd98f00b204e9800998ecf8427e
@qcoumes
qcoumes / pytest_mute_signals_fixture.py
Last active April 17, 2024 15:56
This fixture disable django's signals in every test. You can indiviually enable them for a function using '@pytest.mark.enable_signals' decorator or for a file using 'pytestmark = pytest.mark.enable_signals'
@pytest.fixture(autouse=True)
def mute_signals(request):
# Skip applying, if marked with `enabled_signals`
if 'enable_signals' in request.keywords:
return
signals = [pre_save, post_save, pre_delete, post_delete, m2m_changed]
restore = {}
for signal in signals:
restore[signal] = signal.receivers
@brews
brews / dask-test-workflow.yaml
Last active October 31, 2023 16:22
Argo Workflow demo to launch kubernetes dask distributed job
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dask-test-
spec:
entrypoint: dask
activeDeadlineSeconds: 1800 # Safety first, kids!
templates:
- name: dask
script:
@PhilippHomann
PhilippHomann / app.py
Last active July 22, 2023 17:11
FastAPI file upload with streaming_form_data to parse multipart/form-data
from fastapi import FastAPI, UploadFile, HTTPException
from starlette.requests import Request
from streaming_form_data import StreamingFormDataParser
from streaming_form_data.targets import FileTarget
from tempfile import NamedTemporaryFile
import os
import shutil
@jasondilworth56
jasondilworth56 / example_image_utils.py
Last active March 4, 2024 03:41 — forked from turicas/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@AFAgarap
AFAgarap / autoencoder-full.py
Last active March 27, 2022 14:56
TensorFlow 2.0 implementation for a vanilla autoencoder. Link to tutorial: https://medium.com/@abien.agarap/implementing-an-autoencoder-in-tensorflow-2-0-5e86126e9f7
"""TensorFlow 2.0 implementation of vanilla Autoencoder."""
import numpy as np
import tensorflow as tf
__author__ = "Abien Fred Agarap"
np.random.seed(1)
tf.random.set_seed(1)
batch_size = 128
epochs = 10
@DangerOnTheRanger
DangerOnTheRanger / importhooks.py
Last active August 19, 2022 02:54
Example showing how to use import hooks in Python 3 - original article: https://dev.to/dangerontheranger/dependency-injection-with-import-hooks-in-python-3-5hap
import importlib.abc
import importlib.machinery
import sys
import types
class DependencyInjectorFinder(importlib.abc.MetaPathFinder):
def __init__(self, loader):
self._loader = loader
def find_spec(self, fullname, path, target=None):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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: