renogybt-emulator: A Python Emulator for Renogy BT-1 and BT-2
My latest Python project emulates Renogy BT-1 and BT-2 Bluetooth communication for testing solar-monitoring software without a physical controller.
My latest Python project emulates Renogy BT-1 and BT-2 Bluetooth communication for testing solar-monitoring software without a physical controller.
You can enable quick file sharing using python3 by activating its built-in internal webserver python3 -m http.server The default webserver will listen to port 8000, you can change to any port above 1024 without root privileges by specifying the port number after the command: python3 -m http.server 9090
Found a great Python code snippet for listing the most popular URL from Apache / NGINX ‘access.log’ file. Very practical! import collections logfile = open(“access.log”, “r”) clean_log=[] for line in logfile: try: # copy the URLS to an empty list. # We get the part between GET and HTTP clean_log.append(line[line.index(“GET”)+4:line.index(“HTTP”)]) except: pass counter = collections.Counter(clean_log) […]
This is a follow-up of my previous post “What to do when your Google disabled your Gmail account?“. Here’s how to download all emails from your GMail account with Gmvault: Download and setting up gmvault 1. First you need to install python-pip [bash] sudo apt-get install python-pip [/bash] 2. Then using ‘pip’, install gmvault [bash] […]
Bitcoin is a form of decentralize digital currency, so unlike other digital currency services (like e-gold), bitcoin is not susceptible to be frozen, seized or invalidated. Bitcoin can be transfered transfered directly from person to person directly without intermediaries. Bitcoin are generated over the internet by application called bitcoin miners using a set of algorithm […]
Embedding web browser or a screen for parsing HTML is easy in PyGTK. You only need to import the pymozembed, and add a few lines of code in your pygtk library, and you are set to go. Here’s a sample PyGTK application that embeds a web-browser as well as a “Back” button for demonstration purpose […]
For the last few weeks I’ve been working hard to finish up my research project, most of it concerning about on mobile phone application usability and context-aware applications. This leaves me with less time to devote for this blog and I started to realise that I might have a ‘burn-out’ issue at the same time. […]
Ever find yourself in need to share file over the network quickly, but find yourself lacking time to setup a proper NFS or samba share? Here’s a way to do this with the good old Python CLI. First, go to the directory that you want to share, for example ~/Desktop Then run this command “python […]
This was brought to my attention when I’m working on a python code to parse xml documents. I found out that in Ubuntu Hardy, the python-xml package has moved xml.dom.ext.* package to /usr/lib/python2.5/site-packages/oldxml thus breaking python code which depended on python-xml. One way to work around this bug is to append : sys.path.append(‘/usr/lib/python%s/site-packages/oldxml’ % sys.version[:3]) […]
I just want to share with you about gnome-osd, a GNOME desktop add-on that I find handy when working on my computer’s desktop. This add-on provide informational on-screen display when triggered by certain events such as new email, somebody mentions your nick over the irc and when the music player changes the song. Personally, I […]