Skip to content

Instantly share code, notes, and snippets.

@jikamens
jikamens / namecheap-dns.py
Last active February 13, 2024 10:54
namecheap-dns.py - Export/import DNS records from/to Namecheap
#!/usr/bin/env python3
"""
namecheap-dns.py - Export/import DNS records from/to Namecheap
This script can export DNS records from a domain in Namecheap to a YAML file or
import records from a YAML file in the same format into Namecheap. I use this
script to maintain my Namecheap DNS records in a source repository with change
history, i.e., "configuration as code" for my Namecheap DNS records.
@anthonynsimon
anthonynsimon / aiohttp_trace.py
Last active May 7, 2024 05:48
aiohttp tracing
import aiohttp
def request_tracer(results_collector):
"""
Provides request tracing to aiohttp client sessions.
:param results_collector: a dict to which the tracing results will be added.
:return: an aiohttp.TraceConfig object.
:example:
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
# coding=UTF-8
from __future__ import division
import nltk
from collections import Counter
# This is a simple tool for adding automatic hashtags into an article title
# Created by Shlomi Babluki
# Sep, 2013
@brendano
brendano / autolog.py
Created October 10, 2008 23:00
python decorators to log all method calls, show call graphs in realtime too
# Written by Brendan O'Connor, brenocon@gmail.com, www.anyall.org
# * Originally written Aug. 2005
# * Posted to gist.github.com/16173 on Oct. 2008
# Copyright (c) 2003-2006 Open Source Applications Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#