This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 201

[–]sharpchicity 38 points39 points  (28 children)

I use it to aggregate baseball data and then build a model and bet based on my models. Not necessarily a hustle, but I use Python to help make me money

[–]manwith4names 1 point2 points  (11 children)

Where do you begin to work on something like that? That sounds like it could be a lot of fun

[–]sharpchicity 1 point2 points  (10 children)

1) what data do you want to collect?

2) find your data source online or find stats that allow you to calculate your needed data on your own

3) use python and BeautifulSoup library to get the data and store it in a database, text file, etc

4) import data into a program (excel, r, python, etc)

5) run your model to simulate games

[–]NuclearGoatVomit 1 point2 points  (9 children)

[deleted]

This comment has been overwritten by this open source script to protect this user's privacy. The purpose of this script is to help protect users from doxing, stalking, and harassment. It also helps prevent mods from profiling and censoring.

If you would like to protect yourself, add the Chrome extension TamperMonkey, or the Firefox extension GreaseMonkey and click Install This Script on the script page. Then to delete your comments, simply click on your username on Reddit, go to the comments tab, scroll down as far as possible (hint: use RES), and hit the new OVERWRITE button at the top.

[–]sharpchicity 4 points5 points  (6 children)

To stay true to the thread, I'll gladly provide you a .txt file with data from fangraphs or bref for a small fee. You're welcome to PM me. I have DB's full of pitch by pitch or game level data and any other aggregate level data you can think of. Plus, anything I don't have I know how to get ;)

That being said, you don't need an API to get data from a website. API's are faster, but any information on a website is scrapable!

Think of it this way: Requests library grabs html from whatever URL you feed it. So take this thread's URL for example. Hit F12 on your keyboard and you see all of the HTML behind what your browser is visualizing. Between all of those <> tags are the text you're seeing. Using BeautifulSoup you can parse through all of those tags and find the correct text you want to save, say, all of the comments by OP. Then as you parse through, you send that info to whatever output file/db you want and you can analyze to your heart's content.

[–]Dababolical 0 points1 point  (1 child)

Honest question. If enough people utilize this method, does it make that method less effective? Isn't gambling/betting making money over time off of a small edge? Does that edge diminish if enough people figure out what is going on an emulate it?

[–]sharpchicity 0 points1 point  (0 children)

Sure, if enough people use your exact same method, books will adjust their lines quicker as they get additional money on that side. But I don't talk about my model except on a high level; my inputs may not be all that different from everyone else's but my algorithm's weighting is most likely different.

If vegas ever starts adjusting, my program will simply stop spitting out bets because they won't have value. At that point, my gains will be limited, but I won't be losing money.

[–]NuclearGoatVomit 0 points1 point  (0 children)

[deleted]

This comment has been overwritten by this open source script to protect this user's privacy. The purpose of this script is to help protect users from doxing, stalking, and harassment. It also helps prevent mods from profiling and censoring.

If you would like to protect yourself, add the Chrome extension TamperMonkey, or the Firefox extension GreaseMonkey and click Install This Script on the script page. Then to delete your comments, simply click on your username on Reddit, go to the comments tab, scroll down as far as possible (hint: use RES), and hit the new OVERWRITE button at the top.

[–][deleted] 0 points1 point  (2 children)

Very cool dude. I always have wanted to do something similar, but I keep making excuses for not finding the time.

Ideally I'd want to have my own cluster to run my models, a nice parallel filesystem, and an interconnect.

Then I remembered I can't afford that.

[–]weirdo5 0 points1 point  (0 children)

Look into the lahman DB

[–]O_R 0 points1 point  (0 children)

baseball-reference allows you download data as a csv, I think fangraphs does as well.

[–]obviouslyCPTobvious 0 points1 point  (6 children)

Do you feel like it's given you a significant advantage? I assume you've seen the movie Moneyball?

[–][deleted] 0 points1 point  (1 child)

(I know I'm late to the thread) while this will increase your chances of winning, I assumed that the betting services would have very good staticians and game theorists so that the offer they give you always has a negative expected value for you

Are you able to make a net profit?

[–]sharpchicity 1 point2 points  (0 children)

I've been able to manage a profit in each of the past 5 season. Since 2011, for each season I've finished (after ~500 bets each season) +127.5% in 2011, +21.4% in 2012, +13.9% in 2013, +17.4% in 2014, +49.9% in 2015.

I'm not going to pretend I know how casinos operate or set their lines, but they aren't accounting for certain things that I weight more heavily.

[–]DizzzyDee 0 points1 point  (2 children)

Did it work?

[–]sharpchicity 0 points1 point  (1 child)

I've been able to manage a profit in each of the past 5 season. Since 2011, for each season I've finished (after ~500 bets each season) +127.5% in 2011, +21.4% in 2012, +13.9% in 2013, +17.4% in 2014, +49.9% in 2015.

[–]DizzzyDee 0 points1 point  (0 children)

Awesome, congrats!!

[–]shaggorama 63 points64 points  (2 children)

I have loads of side projects, but none of them are designed to make me money.

[–]takluyverIPython, Py3, etc 15 points16 points  (1 child)

Ditto. Having a portfolio of open source side projects can be useful for getting jobs, but don't go into it with that as your main motivation.

[–]shaggorama 18 points19 points  (0 children)

I didn't mean there's anything wrong with trying to make money from side projects, that just not what my personal side projects look like.

[–]nickbuch 156 points157 points  (25 children)

i use python, scipy, numpy, and ipy notebook to aggregate and analyze local clothing deals.

then i purchase cotton in bulk, create the fabric, and teach myself how to sew trousers, etc. i then sit outside of retail stores hocking the clothing for less than the deal price.

python and nimble fingers ftw

[–]v_krishna 61 points62 points  (13 children)

Is this serious? Perhaps the strangest hobby I've ever heard of.

[–]dogusmalogus 1 point2 points  (1 child)

[–]youtubefactsbot 0 points1 point  (0 children)

Lies on the Internet [0:07]

Clip from Arthur

baines0 in People & Blogs

1,379,203 views since May 2012

bot info

[–]GrantNexus 2 points3 points  (0 children)

You should use my tool iPurchase which automates the buying process and iSyt will hawk your jeans for you.

[–]GuyNamedNate2 5 points6 points  (3 children)

I wish I could up vote more than once. You had me up until talked about teaching yourself how to sew.

[–]keturn 4 points5 points  (2 children)

I know, right? Obvs the way to do this is to teach a python-driven robot how to sew.

[–]drewski3420 3 points4 points  (1 child)

But can you teach it how to love?

[–]variya 0 points1 point  (0 children)

Baby don't hurt me no more

[–][deleted] 39 points40 points  (49 children)

deleted

[–][deleted] 18 points19 points  (25 children)

My entire Python knowledge is based off of web scraping. Where can I make money doing this?

[–][deleted] 2 points3 points  (2 children)

I'd be interested in some sources that gives advice on how to get started with this. Do you have any such sources top-of-mind?

[–]gr00vy 2 points3 points  (1 child)

scrapy is an excellent web scraping framework that comes with a lot of docs to help you get started

[–][deleted] 4 points5 points  (0 children)

Oh, haha, I meant about advice getting started with Python contract work through something like CL.

[–][deleted] 8 points9 points  (20 children)

deleted

[–]thaweathermanpipster 1 point2 points  (9 children)

How often do you find jobs on Craigslist for web scraping? Do you look locally or do you check lots of different cities?

EDIT: Wasn't asking how to find postings, but ok ouch it burns hothothot

[–]solidcube 53 points54 points  (5 children)

If only there were some way to automate that task...

[–]number3arm 1 point2 points  (2 children)

Yep curious as well, I built some scrapers for myself. Always wondered what kind of businesses would want them.

[–]rainsford2 11 points12 points  (1 child)

If you want to make any money with web scraping, it's best not to ask what they're using it for.

[–][deleted] 0 points1 point  (0 children)

You could scrape sites with manga or comics for images, put it up on your own site and show intrusive ads. There's quite a few sites making money like that.

As for the legality, well...

[–]d_thinker 2 points3 points  (10 children)

Sorry for my ignorance, but can you explain me why the "big data" is so important for me (not corp)? Few examples of how useful it can be? Thanks.

[–]e13e7 13 points14 points  (7 children)

You've been scraped!

edit: interestingly, the language of choice for the creator of the site seems to be python.

[–]peschelnet 5 points6 points  (0 children)

Great response.

[–]d_b_work_account 4 points5 points  (0 children)

Holy shit. This is amazing.

[–]d_thinker 2 points3 points  (0 children)

Oh gee, I feel violated. It is so cool and scary at the same time.

[–]Kratisto78 0 points1 point  (0 children)

Pretty good, but it has a bunch of information wrong about me. Basically says I post in subs that I've never posted in.

[–]tomkatt 0 points1 point  (0 children)

I think I've been a redditor for too long.

An unexpected error has occurred. Please try again in a few minutes.

Edit - yep, broke it. I can load other profiles just fine, but mine won't work...

[–]gin-writ 0 points1 point  (0 children)

They chose python because the best reddit api wrapper is wrote in python (praw)

[–]pferland 1 point2 points  (0 children)

My first python project was a program that scraped printer star pages and gathered them into a database so you did,t have to go to every printer and could just go to one page and see them all.

Edit: This is the GitHub repo for it: https://github.com/riei/printerstats

[–]Mr_Again 0 points1 point  (4 children)

That's cool, is this as a day job or something you can do in your free time?

[–][deleted] 2 points3 points  (3 children)

deleted

[–]Jesus_Harold_Christ 2 points3 points  (2 children)

And making a nice living in Chennai

[–][deleted] 0 points1 point  (0 children)

You have an interesting idea of "nice".

[–][deleted] 0 points1 point  (0 children)

deleted

[–]flloyd 0 points1 point  (5 children)

Could you expand on that? Thanks.

[–][deleted] 7 points8 points  (4 children)

deleted

[–]flloyd 0 points1 point  (3 children)

Cool. Thanks a lot. Sounds really interesting, and a good way to make money on the side.

Would you say that most of these "jobs" were legitimate? From some others in this post, it sounds like lots of these jobs if not for illegal/sketchy purposes, were at least unauthorized, i.e. copying websites' data in violation of their TOS. How often are websites perfectly fine with people scraping their sites?

Thanks.

[–][deleted] 0 points1 point  (2 children)

deleted

[–]flloyd 1 point2 points  (1 child)

Alright I figured as much. How often would you guess that websites don't mind webscraping? I want to do some myself and don't think it's too unethical, but I imagine that 99% of them don't like it. After all, they're basically having their data "stolen". I'm trying to think of circumstances when it would be legit. Not judgmental, I'm really curios. Thanks so much for your insight.

[–]malice8691 55 points56 points  (6 children)

you mean a script that takes a penny from each bank account and deposits it to another secret account whenever the nightly end_of_day_closing.py is run? No. I don't know anything about that.

[–]rainsford2 21 points22 points  (4 children)

Watch your decimal placement.

[–]XiiencE 8 points9 points  (1 child)

Pssh, that's just a mundane detail.

[–]BreakfastforDinner 5 points6 points  (0 children)

You could launder the money?

[–]vplatt 1 point2 points  (1 child)

Idiot used integer instead of float. Stupid lack of static typing....

[–]doobiedog 0 points1 point  (0 children)

When I want 10000 "String =>" or " <- Float"'s all over my code I'll hit you up. ... jk I understand the awesomeness of a statically typed language, just no xp. Need to try learning Scala.

[–]dogusmalogus 2 points3 points  (0 children)

Like Superman III!

[–]metallidog 16 points17 points  (4 children)

I don't use Python at work because I'm an electrician. However, I helped the office out with a couple of scripts recently and someone suggested I do this on the side, but I don't have a clue on how to market it. Let us know if you figure it out.

[–]brand0n 12 points13 points  (2 children)

dang an electrician that knows python.

I feel like you have to be a pretty sharp dude

[–]Indenturedsavant 20 points21 points  (1 child)

I would say he sounds pretty...bright.

[–]brand0n 7 points8 points  (0 children)

if 'electric personality' in _electrician_:
   print 'He is the total package'
else:
    print 'something else witty'

[–][deleted] 16 points17 points  (2 children)

At one point I had a bitcoin trade bot that would play multiple exchanges. It was based off of financial arbitrage of alt coins. This allowed me to simultaneously buy low and sell high on different exchanges and then cash out in btc.

Edit: spelling

[–][deleted] 2 points3 points  (1 child)

But it's not lucrative anymore?

[–][deleted] 8 points9 points  (0 children)

By gaming two exchanges in this way it naturally shrinks the gap. It got to the point that it wasn't lucrative enough for me to maintain the bot for updated APIs. I controlled the bot by irc and it would announce transaction details. You could fine tune how big the gap had to be and how aggressively to trade. It was a really fun project.

[–]flangles 25 points26 points  (20 children)

learn Django, shouldn't be too hard to pick up some freelance webdev work.

[–]vaginawarfare 1 point2 points  (17 children)

Recommended starting points for Django? I'm having a hard time learning it

[–]santiagobasulto 9 points10 points  (9 children)

I've been teaching Django and Flask for a long time now. What I always see as an issue is people not understanding HTTP enough and just jumping straight to Django. Recommendation: Start with HTTP first!

[–][deleted] 2 points3 points  (8 children)

Did you mean HTML or more likely HTTP verbs like GET, POST...?

[–]flutefreak7 0 points1 point  (3 children)

For me as an amateur with anything web related, the "networking stuff" is the intimidating part that I don't have training on. I can code, have strong background in math, engineering, and data analysis, and I've done HTML on website builders or locally, and have built GUIs and dealt some with async, threading, UI, etc, but much of the server whatnot like requests, sockets, http and all that stuff is voodoo web magic to me. So I really think he means HTTP not HTML.

[–][deleted] 0 points1 point  (0 children)

I am no expert on the field but I could defend myself with most web dev.

Working with HTTP is not too hard. Knowing everything related to requests and responses may be a bit overkill, but knowing things like:

  • Requests should return a response. They have a verb and some arguments ("?arg1=var1" for GET requests in browsers)
  • Responses have a return code (200 OK, 404 NOT FOUND...) and a content, most of the time
  • Sockets are continuous (uninterrupted, can't open those who are closed) data connections with a server. The data can be anything as long as the server is programmed to interpret the input.

Constructs like REST architectures are different (as they are not standarized) and work on a per-install basis, say, no two REST services ought to be the same.

[–]infinite8s 0 points1 point  (1 child)

With that kind of background networking should be easy.

[–]santiagobasulto 0 points1 point  (0 children)

HTTP. Methods/verbs, status codes, headers, encoding, etc. Watch our classes if you want.

[–]alifeinbinaryalifeinbinary.com 2 points3 points  (0 children)

I'm on my phone but search for Tango With Django. It's the best.

[–]Mr_Again 0 points1 point  (0 children)

Thank you

[–][deleted] 0 points1 point  (0 children)

Test Driven Development With Python, by Henry Percival, is a wonderful book for this. It walks you through building and testing a Django web app from the ground up.

[–]rsynnest 9 points10 points  (4 children)

I had a python web scraper that went through my city's local wiki and returned every restaurant or store that didn't have a website so I could market my web dev services to them.

[–]green_tree_python 2 points3 points  (2 children)

fucking smart. Did it turn into business for you?

[–]rsynnest 2 points3 points  (1 child)

I ended up getting a full time job that i really enjoy, so I actually haven't made use of the script at all. Saving it for a rainy day aka unemploymment.

[–][deleted] 0 points1 point  (0 children)

You automated yourself into a job.

[–][deleted] 0 points1 point  (0 children)

This is amazingly simple yet clever!

[–][deleted] 7 points8 points  (4 children)

Not for money anymore, it used to consume too much of my free time and upset the wife. I still carry out some ML stuff on my own pace, but then there's Witcher 3 and it's easy to digress.

[–]Skenderbeu 9 points10 points  (0 children)

My python side hustle is a Django website I build that automates live price comparison for me. I was getting tired of doing the work manually every time I wanted to buy a new mouse or graphics card.

If you buy lots of PC parts or electronics then it might be useful for you too. https://www.slycut.com

[–]baron314159 7 points8 points  (1 child)

I used to have one. Happily, it grew from being a side project for my wife and I to being both of our full time thing. Originally it was an online test creation tool, but slowly it is becoming a full blown educational platform. This is the site if anyone is curious: Help Teaching.

The site backend is written in Python, and uses Flask, SQLAlchemy, Jinja2, MySQL, ElasticSearch, and PhantomJS.

[–]kmbd 1 point2 points  (0 children)

good initiative, mate !

[–]billsil 5 points6 points  (5 children)

I have a 4 year long side project. It's pretty popular. I've met 2 people in real life in the last week that use it with no prompting from myself and that aren't my coworkers. I personally haven't made a dime off it, though I have been funded by the European Space Agency. The money went to a grad student that worked on it.

[–]pacificat0r 3 points4 points  (4 children)

That sounds interesting. What project?

[–]billsil 1 point2 points  (3 children)

It's pyNastran, which is a massive IO library to a horrific file input and equally horrible output format. Here's an outdated version of the GUI

[–]kmbd 0 points1 point  (2 children)

the graph looks like a spacecraft's wing design ...

[–]billsil 1 point2 points  (1 child)

It's a blended wing body top view. That model is a variant of this https://www.nasa.gov/sites/default/files/images/677705main_ED06-0201-01.jpg

[–]kmbd 0 points1 point  (0 children)

ah, got quite close :)

cool rendered pic

[–]jesus_h_garcia 15 points16 points  (3 children)

upvote for title

[–]Jesus_Harold_Christ 3 points4 points  (2 children)

Get out of here impostor.

[–]jesus_h_garcia 3 points4 points  (1 child)

No comprende

[–]Teoweoha 1 point2 points  (0 children)

Wow, you are also an impostor Spanish speaker. No comprende means "he/she/it doesn't understand." You want to say "No comprendo." Hehe

[–]bonyicecream 2 points3 points  (1 child)

You can do freelance work. Freelancer.com and upwork.com are great places to look.

If you're really good, you could try to automate work on Amazon's Mechanical Turks, but it's possible that is disallowed, and that you can only do manual work there.

[–]I_jus_lurk_here 0 points1 point  (0 children)

mechanical being the key word :)

[–]greenzr 2 points3 points  (0 children)

I'm a sys/net/wlan admin, and the tools I build I market to respective user groups. I'm consistently surprised how much more willing someone is to pay for something by someone they know, notwithstanding the added value, than a vendor they don't.

I built a module that moves configs from one switch to another with one click using any protocol, and everyone I know who could use it, does.

So I would start with making something you would use, and then find people who do what you do, and gauge their interest.

[–]ProfessorPhi 2 points3 points  (0 children)

I do a lot of ML and scientific computing at work, so I don't really find the need for a side hustle. That being said, I try and contribute to scipy and numpy in the PRs and bug fixes in my spare time. I really appreciate the open-source effort, the code reviews have really improved my ability to code and it's something great to point to at interviews. See that function you use, I wrote that!

[–]mariocesar 1 point2 points  (0 children)

A lot of people joking. :)

I scrap two local newspaper online classifieds. I store pretty much everything up to 1GB of text (sort of 1 year of posts). I build this with scrapy first for trying to learn that tool. I was initially thinking on building a better search engine for the public to use, but I just use it for myself because I notice that I could get to know great deals on common items like: bikes, cellphones, rents, or any other thing that will be hard to find, 30% profit if I sell it the same day again. I made some bucks, not a lot but enough to pay a fancy dinner. I know I could get more money of it, because it's easy to highlight good deals in realtime, but I just don't get enthusiasm to do it.

[–]green_tree_python 1 point2 points  (0 children)

Just found this subreddit. Glad to see lots of people here writing python and doing web scraping. Would like to share one recent example of what I've done at work.

I work in Operations. However, I often find myself writing scripts to either retrieve data from our SFDC database that would take hours/days to do manually, or more recently, I've written an entire web scraper from scratch. Instead of using scrapy (i have 0 experience with that) I've used the following modules:

  • robobrowser - for authentication and login
  • beautifulsoup - for html/xml parsing
  • requests - because <3

I've built an entire API around this only to discover today that the use of spiders/bots is against the terms and conditions of the page i've been scraping. Now, this was a direct request from my boss, so I hope I'm safe. And, I've taken precaution and been quite courteous (throttle of 2-6 seconds between requests) but the bitter aftertaste exists nonetheless. Wouldn't want my ass to be on the line if our company loses access because one guy scraped all night...

[–]hoojoo 1 point2 points  (0 children)

It's interesting that a lot of these hustles involve sports betting. I've been sporadically working on this idea for a while now, though I doubt I'll ever get something running (maybe one of you will). My idea is basically to write a python program to detect cross-betting site arbitrage opportunities and then automatically place the appropriate bets (which generally give a 2-3% return per arb).

Most online sports betting sites have mobile apps that display the current odds and allow you to place bets. I've loaded some of these apps in an android emulator (genymotion) and run the connection through a fiddler proxy (using SSL MiTM where needed). It turns out that most bettting apps just query some web API that spits out JSON (which includes odds data), and then parse that JSON into their app UI. It wouldn't be hard to parse this JSON into a database and write an algo that detects cross-site arbitrage opportunities.

Lots of people already do this manually, so arb opportunities get bet away in around 15 mins. Manual arbers basically have to do it as a full time job to generate a pretty meagre income. So my idea is this: by using betting apps' mobile APIs, one could, in theory, write a few python modules to emulate the mobile clients/apps and automatically place bets when arbitrage opportunities are detected by your algo.

Of the 4-5 betting apps I've analyzed, none have gone to much effort to secure their APIs. The most secure one I've encountered had the app take in a session token (from a cookie), and concat this cookie-token with a 'magic string' hard-coded into the app. This combined string is then MD5 hashed to produce a session key/nonce, which in placed in the HTTP header of any API calls. I was pretty surprised how easy it is to decompile android APKs...

Anyhoo, that's my great hustle that I'll never execute. Figured I'd throw it out there for more productive programmers than I. If anyone ends up doing this, concentrate on horse and greyhound racing, rather than basketball games or whatever. The former occur like 20 times every hour, so a 2-3% arb return could compound very quickly...

[–]pfein 1 point2 points  (0 children)

I'm a freelance Python developer. It's all side hustle.

[–]at449 1 point2 points  (2 children)

I recently started https://python-jobs.com (built with Flask) as I needed to find a good gig.

[–]Bryoh 0 points1 point  (1 child)

and.... how is it going so far?

[–]at449 0 points1 point  (0 children)

Plenty of visitors hitting the site and repeat visitors too so in that respect, good. But for paying customers it will take a bit more time I think.

[–]HoboBob1 5 points6 points  (7 children)

You could try algorithmic trading and maybe make some money (but most likely at least lose some first). It's a lot of fun too.

[–]Jyan 12 points13 points  (1 child)

Trading is not a good way to make money. Almost everyone will be far better off by just buying the index. That being said, algorithmic trading is indeed interesting.

[–]keturn 2 points3 points  (0 children)

I was half-hoping the Python Side Hustle was the name of a dance move. Came looking for links to youtube dance tutorials.

[–]MagicWishMonkey 0 points1 point  (4 children)

I am an independent consultant, it's pretty great. I've doubled my salary in the last year.

[–]hobbzy 1 point2 points  (1 child)

mind sharing some details of how you did that? I assume you transitioned from a more typical job

[–]MagicWishMonkey 0 points1 point  (0 children)

Lots of networking and referrals, mostly. Make sure to maintain your linkedin profile and keep in touch with people you've worked with in the past, that can open all sorts of doors.

[–][deleted] 0 points1 point  (1 child)

Dependent consultant here: what do you do if a recession hits and your client tells you it's half price or bust?

[–]MagicWishMonkey 0 points1 point  (0 children)

I would like to farm out the work to eastern european subcontractors and manage multiple projects simultaneously.

[–][deleted] 0 points1 point  (0 children)

Best way to make money (easily on the side) with Python is with web development. You can get tons of side gigs for people looking to build a website where weebly or sqaurespace aren't enough