Skip to content

Instantly share code, notes, and snippets.

View udhayprakash's full-sized avatar
🎯
Focusing

Udhay Prakash Pethakamsetty udhayprakash

🎯
Focusing
View GitHub Profile
from requests import get
from re import compile
html = get( 'http://www.ancebergamo.it/schedaimpresa.asp?idimpresa=1263')
text = html.text
textRegex = compile(r'<title>(.*)</title>')
data = textRegex.search(text)
print 'data.group()', data.group()
print 'data.group(0)', data.group(0)
@udhayprakash
udhayprakash / list_string_operation.py
Created October 2, 2017 10:03
list_string_operation.py
# input : data = ["a","b","c"]
#
# output : data = ["a"."b"."c"]
>>> data = ["a","b","c"]
>>> data
['a', 'b', 'c']
>>> str(data)
"['a', 'b', 'c']"
@udhayprakash
udhayprakash / dictionary_reformatting.py
Created September 22, 2017 16:31
dictionary_reformatting.py
""""
Input :
{'fruits':{'a':'no','b':'no',c:'yes'},'vegetables':{'x':'no','y':'yes'}}
Output:
[{'fruits':{c:'yes'},'vegetables':{'y':'yes'}}]
(if value contain "no" then remove that pairs)
"""
@udhayprakash
udhayprakash / devops_training.txt
Created April 5, 2017 07:11 — forked from ssmythe/devops_training.txt
Training materials for DevOps
======
Videos
======
DevOps
What is DevOps? by Rackspace - Really great introduction to DevOps
https://www.youtube.com/watch?v=_I94-tJlovg
Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept)
@udhayprakash
udhayprakash / gist:fbe8d320aa3a9c6ab307d7696cc809ad
Created February 13, 2017 13:11
Unable to import cx_Oracle
In [7]: import cx_Oracle
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-d1ecebcba3d2> in <module>()
----> 1 import cx_Oracle
ImportError: DLL load failed: The specified module could not be found.
from __future__ import division
from bs4 import BeautifulSoup as bs
import requests
import re
import time
from pymongo import MongoClient
from time import mktime
from datetime import datetime
import plotly.plotly as py
import plotly.graph_objs as go