Skip to content

Instantly share code, notes, and snippets.

View josecolella's full-sized avatar
📱
Comms Platform at Gusto

Jose Miguel Colella josecolella

📱
Comms Platform at Gusto
View GitHub Profile
@josecolella
josecolella / python-selenium-open-tab.md
Last active September 3, 2015 09:54 — forked from lrhache/python-selenium-open-tab.md
Python Selenium - Open new tab / focus tab / close tab

On a recent project, I ran into an issue with Python Selenium webdriver. There's no easy way to open a new tab, grab whatever you need and return to original window opener.

Here's a couple people who ran into the same complication:

So, after many minutes (read about an hour) of searching, I decided to do find a quick solution to this problem.

#!/usr/bin/env python
from multiprocessing import Process, Pool
import time
import urllib2
def millis():
return int(round(time.time() * 1000))
def http_get(url):
@josecolella
josecolella / forum.py
Last active August 29, 2015 13:57
Forum Challenge TeamTreehouse
#!/usr/bin/env python3
# Author: Jose Miguel Colella
import urllib.request as http
import os.path
import re
import pprint
# The url of the essay
essayUrl = 'http://treehouse-forum-contests.s3.amazonaws.com/visualizing-information/part-one/essays-first-series.txt'
@josecolella
josecolella / getBenchmarkResults.py
Created January 12, 2014 13:42
Benchmarks results
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
ABaws1FileIndex = "abaws1"
ABaws2FileIndex = "abaws2"
ABazure1FileIndex = "abazure1"
ABazure2FileIndex = "abazure2"
@josecolella
josecolella / automateRPM.sh
Created January 11, 2014 23:22
automateRPM
#!/bin/bash
# Author: Jose Miguel Colella
# Description: Script creado para automatizar el proceso
# de instalar todo
cd ../
sudo yum update
sudo yum groupinstall -y "Development tools"
# Instalar web.py
@josecolella
josecolella / benchmarksAutomate.py
Created January 11, 2014 21:57
Automatizar los benchmarks
#!/usr/bin/env python3
import os
import sys
def generateAbBenchmarks(argument):
for i in range(1, 6):
if argument == "azure1":
@josecolella
josecolella / automate.sh
Created January 11, 2014 18:08
Automating deployment of Web.py Python Application on a Server
#!/bin/bash
# Author: Jose Miguel Colella
# Description: Script creado para automatizar el proceso
# de instalar todo
cd ../
sudo apt-get update
sudo apt-get install -y language-pack-en
sudo apt-get install -y build-essential
sudo apt-get install -y python-dev
@josecolella
josecolella / gist:6493336
Created September 9, 2013 09:18
html: starting template
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>