Skip to content

Instantly share code, notes, and snippets.

View AlfredoTigolo's full-sized avatar

AlfredoTigolo

View GitHub Profile
@AlfredoTigolo
AlfredoTigolo / creating a time zone date time.py
Last active May 20, 2021 00:59
Python Clock Timer GUI example
'''
[email protected]
I first installed the python-dateutil package. With this package, we can import the modules dateutil and tz to help
assist us in getting the different time zones in different regions of the world.
Using the datetime and time class, we can obtain our current time zone and us strftime class to help with formatting
month, day, year, time, hours, minutes, and seconds
Once we have some examples of different time zone regions, we can start using python graphic widgets like Tk(), label,
and radiobutton to help change the different time zone regions
@AlfredoTigolo
AlfredoTigolo / TestHTMLParser.py
Last active February 4, 2021 19:51
sample python html parser
# Source https://docs.python.org/3/library/html.parser.html
from html.parser import HTMLParser
from html.entities import name2codepoint
class TestHTMLParser(HTMLParser):
# Initializing lists
lsStartTags = list()
lsEndTags = list()
lsStartEndTags = list()
@AlfredoTigolo
AlfredoTigolo / LogToExcel.bsh
Created April 7, 2019 20:53
Script that reads a log file and attempts to convert it to csv
====
# This bash script is created for advent ticket CS-49173
#!/bin/bash
filerstrun="/advent/app/logs/rstrun.log"
list=$(awk -F"START" '{ print $2 }' /advent/app/logs/rstrun.log | awk -F"-" '{ print $5 }' | awk -F" " '{ print$1}')
for i in $list; do
#echo $i
#echo
#echo "=== START ==="
@AlfredoTigolo
AlfredoTigolo / JavaScript_Sample
Created March 11, 2019 21:58
Show JavaScript Fundamentals
<html>
<body>
<p id="prime"></p>
<script>
var i; // outer loop
var j; // inner loop
var flag; // flag checking prime number