Archive for 'Computing Notes'

Persistent Notification in Gnome 3

August 15th, 2020 – 11:18 am
Tagged as: Computing Notes

This is a GTK notification in Linux that remains on screen until it is clicked. #!/usr/bin/python3 import gi gi.require_version(‘Notify’, ’0.7′) from gi.repository import Notify gi.require_version(‘Gtk’, ’3.0′) Notify.init("Hello world") Hello = Notify.Notification.new("Hello world – the heading", "This is an example notification.", "dialog-information") # https://www.devdungeon.com/content/desktop-notifications-linux-python Hello.set_urgency(2) # Highest priority Hello.show() Last updated and tested 12 December 2020 [...]

Labeling variables in R

February 2nd, 2020 – 4:23 pm
Tagged as: Computing Notes

This great procedure makes it easy to remember what variables are related to in R. One of the troubles with exploratory data analysis is that when one has a lot of variables it can be confusing what the variable was created for originally.  Certainly code comments can help but that makes the files larger and [...]

My Favorite Function

May 25th, 2019 – 5:17 am
Tagged as: Computing Notes

My favorite function of all time is varsoc in Stata.  That’s saying a lot because I have been working with computers for decades and have written software in several languages, used many different types of administrative software tool sets, and owned a lot of books with code in them.  Varsoc regresses one variable, y, upon another variable, [...]

Synchronize time on CentOS 6

December 27th, 2011 – 8:45 pm
Tagged as: Computing Notes

This will start the time service and synchronize the clocks on CentOS 6. yum install ntp chkconfig ntpd on ntpdate pool.ntp.org /etc/init.d/ntpd start