Skip to content

Instantly share code, notes, and snippets.

View elliotpalmer's full-sized avatar

Elliot Palmer elliotpalmer

  • The Eco Plumbers
  • Ohio
View GitHub Profile
@elliotpalmer
elliotpalmer / upload_dataframe_to_snowflake.py
Last active December 25, 2025 17:10
Sample Code for Writing Data to Snowflake Tables
# Install Packages
### !pip install pandas "snowflake-connector-python[pandas]" sqlalchemy sqlalchemy-snowflake
# Import Packages
import pandas as pd
from sqlalchemy import create_engine
from snowflake.sqlalchemy import URL
import snowflake.connector
from snowflake.connector.pandas_tools import pd_writer, write_pandas
import datetime
@elliotpalmer
elliotpalmer / servicepytan_config.json
Created April 20, 2022 03:40
ServicePytan Credentials File
{
"CLIENT_ID": "cid.hhmdjd1jk9nqwertyr5cl6t5u5r5",
"CLIENT_SECRET": "cs2.yjnblmqpfiuzjyqwerty5gc28a35qabzo1qsss2l3fll5st64tgrxjxz",
"APP_ID": "12abc346skeg",
"APP_KEY": "ak1.qey12fgjhnch03lsm",
"TENANT_ID": "1234567890",
"TIMEZONE": ""
}
@elliotpalmer
elliotpalmer / servicepytan_jobs_request.py
Created April 20, 2022 03:37
ServicePytan Getting Started Example
import servicepytan
# Create the Jobs Endpoint Object
# API Endpoint: https://api.servicetitan.io/jpm/v2/tenant/{tenant}/jobs
# Folder: jpm, Endpoint: jobs
st_jobs_endpoint = servicepytan.Endpoint("jpm", "jobs")
options = {
"pageSize":"50", # Number of jobs to return per API Request
"page":"1", # Which page to return
function add_new_time(i, spacing=1, start=24){
// select the last open box
let d = $('.time__SlMg9').last()
d.click()
// The menu will be visible and accessible
let m = $(".visible.menu.transition")
// choose the first item in the list TODO: make this dynamic
m.children().children()[start + (spacing - 1) + (i) * spacing - i].click()