This file contains hidden or 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
| Sub Refresh() | |
| ' THE FOLLOWING CODE ALL DUE TO EXCEL 2013 BUG ... force the window to shrink and restore back to get the ribbon etc painted correctly... | |
| wk_Curr_Window_State = Application.WindowState | |
| wk_Curr_Window_Width = Application.Width | |
| wk_Curr_Window_Height = Application.Height | |
| Application.WindowState = xlNormal 'Collapse the excel window | |
| Application.Width = 225 ' make the window really small to force Excel rethink ribbon content ... | |
| Application.Height = 271.5 ' both vertically and horizontally | |
| ' now restore the original window settings | |
| Application.Width = wk_Curr_Window_Width |
This file contains hidden or 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
| =IF(A2=0, "", EXACT(UPPER(A2),A2)) |
This file contains hidden or 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
| =IF(A2=0,"",IFERROR(INDEX(EIDDB!$A:$A,MATCH(A2,EIDDB!D:D,0)),"-")) |
This file contains hidden or 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
| =IF(A2=0,"",IFERROR(INDEX(EIDDBXXHR!$D:$D,MATCH(A2,EIDDB!D:D,0)),"X")) |
This file contains hidden or 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
| #Pulls FIRST.LAST from a description field. Useful for Cisco phone description fields where the format is: LAST, FIRST XXXXX | |
| =IF(D2=0,"",SUBSTITUTE((TRIM(LOWER(RIGHT(LEFT(D2,(LEN(D2)-6)),LEN(LEFT(D2,(LEN(D2)-6)))-FIND(", ",LEFT(D2,(LEN(D2)-6)),1)))&"."&(LOWER(LEFT(LEFT(D2,(LEN(D2)-6)),FIND(", ",D2,1)-1)))))," csf","")) | |
| #Lower Case version | |
| =LOWER(MID(A2,SEARCH(", ",A2)+2, SEARCH(" ",MID(A2&" ", SEARCH(", ",A2)+4,200))+1)&"."&IF(LEN(A2)=0,"",IF(ISERR(FIND(" ",A2)),A2,LEFT(A2,FIND(" ",A2)-2)))) |
This file contains hidden or 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 | |
| # Add an entry in your crontab to run this script on a timed interval | |
| logfile="/var/log/app_check.log" | |
| case "$(pidof app | wc -w)" in | |
| 0) echo "App found not running, (re)starting app: $(date)" >> $logfile | |
| DISPLAY=:0 /home/jdoe/app_script & |
This file contains hidden or 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
| %matplotlib inline | |
| import time | |
| import os | |
| import glob | |
| import seaborn as sns | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pylab as plt | |
| from matplotlib import rcParams | |
| rcParams.update({'figure.autolayout': False}) |
This file contains hidden or 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 os | |
| #Change csv to match the file extension you are searching for | |
| path = "C:/path/to/files/*.csv" | |
| for fname in glob.glob(path): | |
| temp1=os.path.basename(os.path.normpath(fname)) | |
| filename=temp1.split('.')[0] | |
| print(filename) |
This file contains hidden or 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 os | |
| #import glob | |
| #import time | |
| path = "C:/path/to?files/*.csv" | |
| for fname in glob.glob(path): | |
| temp1=os.path.basename(os.path.normpath(fname)) | |
| filename=temp1.split('.')[0] | |
| dt=time.strftime('%Y%m%d', time.gmtime(os.path.getmtime(fname))) | |
| print(filename+","+dt) |
This file contains hidden or 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
| %matplotlib inline | |
| import time | |
| import os | |
| import glob | |
| import seaborn as sns | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pylab as plt | |
| from matplotlib import rcParams | |
| rcParams.update({'figure.autolayout': False}) |