Tags » Python

Labour beating the Tories...on Twitter

The Conservatives may be leading in the opinion polls, but the Labour Party seem to be generating more interest on Twitter.

According to data collected via Twitter’s API since 9 October, Labour’s Twitter account has continuously had more followers than any other party. 122 more words

Data Science

Six Weeks Training

Six-Week
Training is an indispensable part of B.Tech, it is usually a part of the 5th
semester. I being a Computer Science and Engineering Student… 481 more words

AI

MySQL select with where

import mysql.connector

pid=input(“Enter Product ID: “)

dbase=mysql.connector.connect(user=”root”,password=”root”,database=”testdb”)

cursor=dbase.cursor()

sqlCriteria=”select * from testdb.product where Product_Id=’%s'”

params=(pid)

try:

       print(sqlCriteria % params)

       cursor.execute(sqlCriteria % params)
       products = cursor.fetchall() 54 more words

Python

Why Everyone Should Try Coding (at least once)

After a long long period of hiatus, I recently reconnected with my inner nerd and went for a 1-day Python coding workshop. It was nerve wrecking to say the least, as I sat down with other 20 people in the room, who all looked like they knew what they were in for (except me). 486 more words

Learning

Binary Classification Model for MiniBooNE Particle Identification Using Python Take 5

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a… 256 more words

Blog

Binary Classification Model for MiniBooNE Particle Identification Using Python Take 5

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a… 256 more words

Blog

"MAC : " or "MAC "with python re module

In [315]: po = re.compile("[\s|\t]*MAC[(\s:\s)|\s]+([0-9a-zA-Z]+)")

In [316]: mo = po.match('MAC : 12as34df')

In [317]: mo.group(1)
Out[317]: '12as34df'

pattern object and match object, why?

In [397]: pt = '[\s|\t]*MAC[(\s:\s)|\s]+([' + string.hexdigits + ']+)'

In [398]: re.search(pt, '  MAC : 981709182734asdf83 ')[1]
Out[398]: '981709182734a' 184 more words