How to remove duplicate edges from graph in Python list

Published on

Remove duplicate edges from graph in Python list If a tuple (n1, (n2, distance)) represents a bidirectional connection, I would introduce a normalization property which constraints the ordering of the two nodes in the tuple. This way, each possible edge has exactly one unique representation. Consequently, a normalization function would map a given, potentially unnormalized, … Continue reading How to remove duplicate edges from graph in Python list

How to assign member variables temporarily in python?

Published on

Context managers may be used for it easily. Quoting official docs: Typical uses of context managers include saving and restoring various kinds of global state, locking and unlocking resources, closing opened files, etc. It seems like saving and restoring state is exactly what we want to do here. Example: from contextlib import contextmanager @contextmanager def … Continue reading How to assign member variables temporarily in python?

How to Speed Up WebSites with htaccess Caching

Published on

Awesome ways to implement caching on your website using Apache .htaccess (httpd.conf) files on the Apache Web Server. Both methods are extremely simple to set up and will dramatically speed up your site! Apache .htaccess Caching Code: # BEGIN EXPIRES <IfModule mod_expires.c> ExpiresActive On ExpiresDefault “access plus 10 days” ExpiresByType text/css “access plus 1 week” … Continue reading How to Speed Up WebSites with htaccess Caching

Get free virtual machine

Published on

Get free virtual machine from amazon(aws) The Amazon Web Services (AWS) Free Tier is designed to enable you to get hands-on experience with AWS Cloud Services. The AWS Free Tier includes services with a free tier available for 12 months following your AWS sign-up date, as well as additional service offers that do not automatically expire … Continue reading Get free virtual machine

Vodafone GPRS packs and short codes (*121*xx#) for Vodafone IN

Published on

Vodafone USSD Codes (Net Balance Check) (Own Number) (Loan MB) (2017) With the help of these Vodafone USSD Codes you can able to use all the information which you wanted. Vodafone USSD Codes Function Vodafone USSD Codes Vodafone Balance Check Ussd codes (Talktime Balance) *141# Vodafone Internet Balance Check ussd Code *111*6# Vodafone Call Balance … Continue reading Vodafone GPRS packs and short codes (*121*xx#) for Vodafone IN