# [Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484 Steven D'Aprano steve at pearwood.info Mon Aug 1 22:57:12 EDT 2016 - Previous message (by thread): [Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484 - Next message (by thread): [Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484 - Messages sorted by: - [ date ] - [ thread ] - [ subject ] - [ author ] On Tue, Aug 02, 2016 at 07:40:39AM +1000, Chris
My IRC Network Personal Cloud Ever heard of IRC? It’s sorta like Discord but way older. And also way better in a number of ways, none of which I’ll get into here. Basically… 1/26/2024 Org-Roam-Web I’m a big Emacs user, and around the time I started using it for almost everything I decided to move my personal wiki from Tiddlywiki to Org-Mode. Specifically… 4/23/2023 IRC Chatbot (under construction) 4/23/2023 Prompt Albums An album of new music created based on requirements generated by a python
The actor model as a higher-level abstraction for concurrency in Python
Measuring your Python program’s memory usage is not as straightforward as you might think. Learn two techniques, and the tradeoffs between them
# How to unpivot a dataset in Excel Power Query vs R vs Python Posted on July 11, 2022 by George Mount in Data science | 0 Comments This article was first published on Stringfest Analytics , and kindly contributed to python-bloggers . (You can report issue about the content on this page here ) What makes data clean? You may not be able to name those qualities, but you likely know messy data when you see it. In this blog post, we’ll look at a frequent offender: unpivoted data. You’ll learn what this is
# Python Last week I wrote a post on hiding cryptographic keys in decks of cards. I wrote some code for that post that shouldn’t work, but before fixing I noticed that it in fact did work. The code computes logarithms for integers larger than the largest representable float. For example, the largest float is on the order of 10308, and yet the following code works. >>> import math >>> math.log10(10**400) 400.0 The log, log2, and log10 functions have some code inside that handles large integers specially
Clone a voice from a short audio sample using the Python SDK
Let's explore two great Python libraries - itertools and more_itertools and see how to leverage them for data processing
Schinckel.net Generating dummy ABNs in Python Posted: 2014 - 09 - 14 @ 00:16:30 Tags: Comments: here . I had the need to generate a fake ABN the other day. Here’s a python function to do it: #! /usr/bin/python import sys import random weighting = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19] def validate(abn): """ Validate that the provided number is indeed an ABN. """ values = map(int, list(abn)) values[0] -= 1 total = sum([x * w for (x, w) in zip(values, weighting)]) return total % 89 == 0 def abn
[Twisted-Python] using a reactor in a loop Tom Brown brown at esteem.com Thu Mar 1 10:21:50 MST 2007 Previous message (by thread): [Twisted-Python] factory class has no __class__ attribute! Next message (by thread): [Twisted-Python] using a reactor in a loop Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hello, I am trying to use a reactor in a loop. The application will go through the loop twice then hang when trying to stop the protocol. Here's my loop: def main(): factory = Factory() fact