Learning Python

I need to learn Python because I'm entering the data analytics field.

I only have intermediate experience with programming in Java.

Do you guys recommend I use pic related to learn? Or what resource should I use?

You guys know any cool projects I can work on to learn it?

Attached: ShowCover.aspx.jpg (1024x1338, 196K)

Other urls found in this thread:

packtpub.com/application-development/modern-python-cookbook
scikit-learn.org/stable/index.html
interactivepython.org/runestone/static/thinkcspy/index.html
kaggle.com/competitions
boards.Jow
greenteapress.com/wp/think-python-2e/
twitter.com/SFWRedditVideos

packtpub.com/application-development/modern-python-cookbook

scikit-learn.org/stable/index.html

>learn python the meme way

dude stop being such a pussy. If you can actually code you'll be able to pick it up instantly. Just fucking start your job and check the docs as you go. Is everyone this incapable? Jesus

thanks

Damn, you right tho

>I need to learn Python because I'm entering the data analytics field
this is like a chicken egg thing
did you just wake up today and decide you're doing data analytics now?

if you want a cool project, try using scikit learn to classify tweets. I did it a while ago and it was pretty fun. If you want a twitter post collection script I can sauce you

Nah, process of elimination

that wud b laff.

# Using this script to collect data from twitter live

import tweepy
import json
import io
import pickle
from sklearn.linear_model import PassiveAggressiveClassifier

# Streams twitter posts

class StreamListener(tweepy.StreamListener):
# Handles the data stream
def __init__(self, count, filePrefix):
self.count = count
self.filePrefix = str(filePrefix)
print ('init')

def on_data(self, data):
if self.count > 0:
self.count-=1
dataParsed = json.loads(data)
print(dataParsed['text'])
with io.open(self.filePrefix + 'fetched_tweets.txt', 'a', encoding="utf-8") as tf:
tf.write(dataParsed['text'] + '|||')
return True
else:
return False
def on_error(self, status):
print(status)
def on_disconnect(self):
print('disconnect')

# get your own keys for auth, check tweepy docs

api = tweepy.API(auth)

pac = PassiveAggressiveClassifier()


def alternateStreams(pac, streams, alternateCount=5, count=200):
currStream = 0
while count > 0:
count -= 1
streamListener = StreamListener(count, currStream)
stream = tweepy.Stream(auth=api.auth, listener=streamListener)
stream.filter(track=[streams[currStream]], languages=['en'])
currStream = (currStream + 1) % len(streams)

alternateStreams(pac, [':)', ':('])

Attached: 1527869303941.jpg (347x387, 35K)

Learn python the hard way is 80% about printing your name over and over again

thank you

>tfw I've watched several tutorials and have no idea where to go after the basics.

Endless cycle I just don't have the self-discipline to do any projects.

>tfw doomed to shit jobs

Attached: IMG_20180423_223542.jpg (626x473, 36K)

> I tought this was a PS2 game cover

heads up there is some random half done shit there that doesn't need to be there

the difference between a good programmer and a bad one is that the good one doesn't give up. Everyone is shit at the start. How many people do you think gave up at the mortorcycle level of battle toads? Don't be a bitch

Teaches Python from the perspective of people who don't know how to program.
interactivepython.org/runestone/static/thinkcspy/index.html

However if you're like me and you only (really) learned python until after you got your degree and a job, then Python is really simple and easy to learn, you don't need ``resources''.

Just use Google every time you have a problem, you'll be fine.
It's sort of like learning JavaScript, except every answer is not just "download my stupid ass 3KB javascript module that solves your problem!"

The worst things in Python you will encounter is
1. package management and dependency hell, and
2. the import system.
The first can be effectively triaged by using a virtual environment, provided by either virtualenv (built into Python 3), or Anaconda (what everyone prefers because it doesn't fill your project folders with binaries)
The second can be mediated by not being a total fuckwit.

I mean, the worst thing that can happen to you is that you encounter an idiotic development group that optimized their package to be used as if you will only ever write single-file scripts (Fuck you MongoEngine), and so they totally butcher imports across all of your modules.

Because the import system is actually turing complete all by itself.

And yes, as the other user said, "stop being a pussy"

Try to get a firm grasp of Python as a general programming language before you dive deep into the gardens of data analytics packages. From what I've seen in the field, many people learn a narrow subset of the language's capabilities and stick to those forever.

Then you could get itno the mainstream packages like numpy, pandas and scikit-learn.

Finally, the best way to learn is to actually do something. Load up Kaggle's competitions page and just start doing project that you like. Having a Kaggle and/or Gitub profile with complete projects will give you a slight edge when you apply for jobs.

kaggle.com/competitions

>data analytics
Dodge the bullet by not going to that field.
Just think about it: you do not need any kind of previous knowledge to get into data analytics.
Don't you think there's gonna be a lot of "professionals" very very soon?
You wage is gonna drop pretty hard.

>Try to get a firm grasp of Python as a general programming language
How tho?

And thanks for the tips.

BTW guys, I just made this it's my first Python Program ever.

#modules
import requests
from bs4 import BeautifulSoup as bs
import os

#website
url = 'boards.Jow Forums.org/hr/thread/3167182'

#download info
page = requests.get(url)
soup = bs(page.text, 'html.parser')

#locate all tags
image_tags = soup.findAll('img')

#create directory for model images
if not os.path.exists('taytays'):
os.makedirs('taytays')

#move to new directory
os.chdir('taytays')

#image file variable name
x = 0

#writing images
for image in image_tags:
try:
url = f"https:{image['src']}"
tayTuple = url.rpartition('.')
babyTuple = tayTuple[0].rpartition('s')
url = babyTuple[0] + tayTuple[1] + tayTuple[2]
print(f'now downloading {url} …')
r = requests.get(url)
if r.status_code == 200:
with open('taytays-' + str(x) + '.jpg', 'wb') as f:
f.write(requests.get(url).content)
x +=1
except Exception as e:
print(e)


I dare you guys to run it without checking the thread, have atleast 180MB storage free (SFW).

take userinput and allow them to make the folder name and set up directory location

Attached: 1454474513351.jpg (600x600, 75K)

now I need to learn how to do this

Hey not bad user, that's a useful script ahahah

The thing that takes time is always the API, I mean python can be learned over a couple weeks(the core language).

greenteapress.com/wp/think-python-2e/
It's free, nice latex pdf and you will be able to finish it fast if you already have some programming experience.

Your logic is solid, but

>Just think about it: you do not need any kind of previous knowledge to get into data analytics.

You need to explain yourself.

I recommend finding the cheat sheet, you will be a pro after 10 min of experience

If it takes me an hour to find the cheat sheet, does that mean I can be a pro in an hour and 10 mins?

Im going into the same field user, Im starting with data analyst, but im gonna move onto machine learning/neural networks. Dont be scared, I think its a really interesting fields. Im not the best at math, but its not something I can't learn.

Attached: 1511406569396.jpg (400x400, 36K)

Where's the rm rf hidden? I can't spot it with just a glance.

Not op but can you use it to make a Twitter bot that automatically replies whenever someone posts a tweet?

DUDE WTF.
I ran this on my main computer, computer started to hang, so I tried effortlessly to kill the script, nothing would work so I hit the power button, now I can't boot.

Am in the process of trying to salvage data, but it looks like a lot of it has been corrupted. I had my thesis synced across 3 different drives on that computer, if I can't get it, I will find you and kill u motherfker!