Skip to content

Instantly share code, notes, and snippets.

jgarciabu

Block or report user

Report or block jgarciabu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jgarciabu
jgarciabu / moveFilesWithSizeLimit.py
Last active Oct 7, 2019
Script created to monitor an incoming file directory and move files, from oldest to newest, to another directory to be processed by another data flow process. The key to this script is to limit the file moves to 200MB so that the data flow process doesn't choke when RAM runs out. Additionally, if a single file exceeds 200 MB, then an email goes …
View moveFilesWithSizeLimit.py
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 25 10:16:33 2019
@author: jeffrey.garcia
"""
import os
import shutil
import smtplib
@jgarciabu
jgarciabu / con_fbml.py
Created Oct 10, 2018
Sample kick off script of member list automation process
View con_fbml.py
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 18 13:11:43 2018
@author: jeffrey.garcia
"""
from datetime import datetime
from ML_Automation import con_fb
from ML_Automation import ml_validation
@jgarciabu
jgarciabu / ml_automation.py
Created Oct 10, 2018
Code lib created to house all functions necessary to process data for this use case.
View ml_automation.py
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 18 11:56:27 2018
@author: jeffrey.garcia
"""
import pandas as pd
import numpy as np
import csv
@jgarciabu
jgarciabu / master_file_cleanup.py
Created Oct 5, 2018
Remove rows from file that cause failure in processing
View master_file_cleanup.py
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 18 09:05:18 2018
@author: jeffrey.garcia
"""
import pandas as pd
import os
import inspect; os.path
@jgarciabu
jgarciabu / filescan.py
Created Oct 5, 2018
File scan tool to report file metadata (number of columns, column names, filename, etc)
View filescan.py
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 8 13:57:08 2018
@author: jeffrey.garcia
"""
import pandas as pd
import os
import inspect; os.path
@jgarciabu
jgarciabu / gui_search.py
Created Oct 5, 2018
Directory Search Tool (With GUI)
View gui_search.py
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 27 14:03:28 2018
@author: jeffrey.garcia
"""
import wx
import pandas as pd
import os
@jgarciabu
jgarciabu / IBSBwithExceptionHandlingShareable.py
Created Aug 30, 2017
Python Selenium Bot used to create new mobile banking accounts for new consultants
View IBSBwithExceptionHandlingShareable.py
from selenium import webdriver
import csv
import getpass
# create new instance of Firefox driver
browser = webdriver.Firefox()
# go to First Ipswich Bank website
browser.get("https://ssl.selectpayment.com/mp/fnbicom/login/page.aspx")
# Fill out login credentials (username, password, company name)
@jgarciabu
jgarciabu / InvoiceProcessingScriptShareable.R
Created Aug 30, 2017
This R script uses dplyr and RODBC to combine individual CSVs into one dataframe that is then uploaded into a Azure SQL database. This cuts down manual processing significantly. Sometimes I'll get 10 or 12 individual csvs and this script frees me up to focus on other processes and tasks.
View InvoiceProcessingScriptShareable.R
library(plyr)
library(dplyr)
library(stringr)
library(RODBC)
#========================================
#Make sure working directory is new invoice folder in Dropbox
#Names of all files put in list to feed to merge code
filenames <- list.files()
View Ex 15 List Reverse.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Write a program (using functions!) that asks the user for a long string
containing multiple words. Print back to the user the same string, except with
the words in backwards order. For example, say I type the string:
My name is Michele
Then I would see the string:
@jgarciabu
jgarciabu / Ex 14 List Remove Duplicates.py
Last active Aug 9, 2017
Ex 14 List Remove Duplicates.py
View Ex 14 List Remove Duplicates.py
# -*- coding: utf-8 -*-
"""
Write a program (function!) that takes a list and returns a new list that
contains all the elements of the first list minus all the duplicates.
Extras:
Write two different functions to do this - one using a loop and constructing a
list, and another using sets.
Go back and do Exercise 5 using sets, and write the solution for that in a
You can’t perform that action at this time.