New Code
dbForge Studio for PostgreSQL 2.3.212
HTMLPad 2020 16.2
WeBuilder 2020 16.2
Rapid CSS 2020 16.2
Rapid PHP 2020 16.2
C# HTML to PDF 2020.8.1
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Top Code
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Apphitect Airbnb Clone Script 1.0
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
Code Listing by Ori Peleg

Code 1-10 of 11   Pages: Go to  1  2  Next >>  page  

Overriding __setattr__ in classes requires care when setting attributes yourself. Here's an idea for safely setting attributes in __init__.

Update: this idea doesn't work. See Mike Foord's recipe for one that does:

When comparing text generated on different platforms, the newlines are different. This recipe normalizes any string to use unix-style newlines.

This code is used in the TestOOB unit testing framework (

Adding new format specifiers to the logging module.
In this example, it's for the user name and the name of the function that logged the message.

A 'fields' class is a class that acts like a struct full of fields, e.g.:

class Titles:
def __init__(self, name): = name
def dr(self): return "Dr. " +
def mr(self):... - Similar to Unix's expand(1) command, but can edit the files in-place.

Convert strings to floats in the range [0, 1), using a hash function

Create an proxy that forwards methods to a group of observers

Extremely simple/straightforward implementation.

Posted mainly to receive comments on alternative implementations.

Great for deciding automatically whether to use colors.

Based on

Note: This recipe is superceded by TestOOB, a Python unit testing framework that extends unittest and provides many new features - including running tests in threads!

Trying to extend unittest to provide...