This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jmri | |
jmri.util.JmriJFrame.getFrame("PanelPro").setState(jmri.util.JmriJFrame.ICONIFIED) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jmri | |
from java.awt import Toolkit | |
screensize = Toolkit.getDefaultToolkit().getScreenSize() | |
for frame in jmri.util.JmriJFrame.getFrameList(): | |
if frame.title == "Analog Clock" and frame.isVisible(): | |
frame.setExtendedState(frame.getExtendedState() | frame.MAXIMIZED_BOTH) | |
frame.getContentPane().getComponents()[0].setSize(screensize) | |
frame.getContentPane().getComponents()[0].scaleFace() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import re | |
def closing_brace_pos(string): | |
"""Finds the position of the extra closing bracing ending the eval block""" | |
count = 0 | |
in_string = False | |
for i in range(0, string.__len__()): | |
if string[i] == "\"": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/formatc1702/Micro-Word-Clock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
umask 002 | |
echo "Attempting checkout on server..." | |
if git checkout -f ; then | |
echo "Success!" | |
else | |
echo "Failed!" | |
fi | |
echo "Attempting push to other remotes..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Code to renew all books from Surrey Uni library. If there are any issues check that the url is correct and has not changed! | |
""" | |
#!/usr/bin/python | |
import mechanize as m | |
#This should be the My Account login page URL | |
url = "https://capitadiscovery.co.uk/surrey-ac/login?message=borrowerservices_notloggedin&referer=https%3A%2F%2Fcapitadiscovery.co.uk%2Fsurrey-ac%2Faccount" |