Skip to content

Instantly share code, notes, and snippets.

View victorres11's full-sized avatar

Victor Torres victorres11

  • tento
  • New York
View GitHub Profile
@victorres11
victorres11 / pdfsplitter.py
Last active November 18, 2021 22:54
PDF Splitter for Morning Star Reports
from PyPDF2 import PdfFileReader, PdfFileMerger, PdfFileWriter
from datetime import datetime
import os, os.path
import errno
import sys
INTERNAL_FACTSHEET = "FS_Int"
MS_ESG_Report = "ESG"
CMP = "CMP"
REPORT_TYPES = [INTERNAL_FACTSHEET, MS_ESG_Report, CMP]
@victorres11
victorres11 / projectsReadme.md
Last active May 29, 2021 17:29
Automation Projects Summary for Justin Mares

Justin - I wasn’t sure exactly what you wanted, so I just took a stab at previewing some projects and technologies I’ve worked on in the past. It’s pretty widespread as I’m fairly tool agnostic, but would love to understand your pain points/needs to make any examples more tailored to potential opportunities that are relevant to your business. Looking forward to discussing further in greater detail!

Semi-Automated SDR Lead Generation:

Summary: This project was an experiment where I teamed up with the head of sales for an agency, to see if we could somewhat automate leads as he wanted to focus on closing deals more than manually going through his cold outreach. We defined the type of ecommerce companies he wanted to reach out to, and then set up a semi-automated omni channel e-mail/linkedin outreach campaign to see if we could get some intro calls scheduled:

Technologies used:

Web Scraping Services (get leads based on criteria)

Clearbit Data Enrichment (enrich leads)

@victorres11
victorres11 / instapage-segment.js
Last active December 2, 2021 01:06
Segment integration code to be used on Instapage
// callback to trigger code upon a landing page form submit - the main call to action.
window.instapageFormSubmitSuccess = function( form ){
// Instapage is a bit quirky with how it captures values of the form submit, but you should be able to use this code and replace the form fields with whatever your page is capturing.
var firstName = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'First Name' ) +'"]').val();
var lastName = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'Last Name' ) +'"]').val();
var email = ijQuery( form ).find( 'input[name="' + window.base64.base64_encode( 'Email') +'"]').val();
// Segment identify call.
analytics.identify(email, {
firstName: firstName,
@victorres11
victorres11 / registries_by_orch_or_platform3.sql
Created November 6, 2017 18:58
All integration types not AWS
select integration_type, count(distinct(host_id))
-- , sum(is_ecr_amazon) as is_ecr_amazon_count
,CAST((sum(is_ecr_amazon) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_ecr_amazon_pct
-- , sum(is_gcr_io) as is_ecr_amazon_percent_of_containers
,CAST((sum(is_gcr_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_gcr_io_pct
-- , sum(is_quay_io) as is_quay_io_count
,CAST((sum(is_quay_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_quay_io_pct
-- , sum(is_dockercloud) as is_dockercloud_count
,CAST((sum(is_dockercloud) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_dockercloud_pct
-- , sum(is_docker_io) as is_docker_io_count
@victorres11
victorres11 / registries_by_orch_or_platform2.sql
Created November 6, 2017 18:52
All integration types on just AWS
select integration_type, count(distinct(host_id))
-- , sum(is_ecr_amazon) as is_ecr_amazon_count
,CAST((sum(is_ecr_amazon) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_ecr_amazon_pct
-- , sum(is_gcr_io) as is_ecr_amazon_percent_of_containers
,CAST((sum(is_gcr_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_gcr_io_pct
-- , sum(is_quay_io) as is_quay_io_count
,CAST((sum(is_quay_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_quay_io_pct
-- , sum(is_dockercloud) as is_dockercloud_count
,CAST((sum(is_dockercloud) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_dockercloud_pct
-- , sum(is_docker_io) as is_docker_io_count
@victorres11
victorres11 / registries_by_orch_or_platform.sql
Created November 6, 2017 18:45
What container registries are being used with each orchestrator/platform?
select integration_type, count(distinct(host_id))
-- , sum(is_ecr_amazon) as is_ecr_amazon_count
,CAST((sum(is_ecr_amazon) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_ecr_amazon_pct
-- , sum(is_gcr_io) as is_ecr_amazon_percent_of_containers
,CAST((sum(is_gcr_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_gcr_io_pct
-- , sum(is_quay_io) as is_quay_io_count
,CAST((sum(is_quay_io) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_quay_io_pct
-- , sum(is_dockercloud) as is_dockercloud_count
,CAST((sum(is_dockercloud) * 100.0 / count(distinct(host_id))) AS numeric(10,2)) as is_dockercloud_pct
-- , sum(is_docker_io) as is_docker_io_count
select count(distinct(org_id)) as total_org_count
-- ,sum(only_latest) as only_latest_count
,CAST((sum(only_latest) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as only_latest_percent_of_orgs
-- ,sum(only_versioned) as only_versioned_count
,CAST((sum(only_versioned) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as only_versioned_percent_of_orgs
-- ,sum(both_latest_and_versioned) as both_latest_and_versioned_count
,CAST((sum(both_latest_and_versioned) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as both_latest_and_versioned_percent_of_orgs
-- ,sum(neither) as neither_count
,CAST((sum(neither) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as neither_percent_of_orgs
select location, count(distinct(org_id)) as total_org_count
,sum(sha256) as sha256
,sum(amazon_ecs_agent) as amazon_ecs_agent
,sum(postgres) as postgres
,sum(mongo) as mongo
,sum(mysql) as mysql
,sum(nginx) as nginx
,sum(elasticsearch) as elasticsearch
,sum(heapster) as heapster
,sum(ubuntu) as ubuntu
select integration_type, count(distinct(org_id)) as total_org_count
,sum(sha256) as sha256
,CAST((sum(sha256) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as sha256_percent_of_orgs
-- ,sum(amazon_ecs_agent) as amazon_ecs_agent
,CAST((sum(amazon_ecs_agent) * 100.0 / count(distinct(org_id))) AS numeric(10,2)) as amazon_ecs_agent_percent_of_orgs
-- ,sum(postgres) as postgres
,CAST((sum(postgres) * 100 / count(distinct(org_id))) AS numeric(10,2)) as postgres_ecs_agent_percent_of_orgs
-- ,sum(mongo) as mongo
,CAST((sum(mongo) * 100 / count(distinct(org_id))) AS numeric(10,2)) as mongo_ecs_agent_percent_of_orgs
-- ,sum(mysql) as mysql