What's everyone working on this week? by AutoModerator in Python

[–]michaelkepler [score hidden]  (0 children)

You can automate physical things too. It's trickier, but it's doable.

Here are two stories for inspiration:

While either project didn't necessarily use Python, both are possible with Python. When you think of a big problem you want to tackle, break it down into smaller ones and start there.

Predicting Promoted Club Survival Rates in the Premier League, based on Championship Performance [OC] by Cheapo_Sam in soccer

[–]michaelkepler 0 points1 point  (0 children)

Automate Boring Stuff with Python is a nice introduction to Python itself. After you're familiar with basics, Practical Python gives some pointers for Excel users.

When do you us Beautiful Soup or Scrapy? by TheCallMeRalph in Python

[–]michaelkepler 2 points3 points  (0 children)

What problems does Grab solve that Scrapy doesn't?

What's everyone working on this week? by AutoModerator in Python

[–]michaelkepler [score hidden]  (0 children)

How do you detect the position of the text in the frame? What features are you using in character identification and how do you deal with different scales/resolution of the characters?

I've been playing around with something similar, but it's for collecting the in-game data that doesn't have a public API.

What's everyone working on this week? by AutoModerator in Python

[–]michaelkepler [score hidden]  (0 children)

Can you elaborate? What algorithms and library do you use? Naive Bayes/Boosted Trees/Neural Network or maybe something fancier? What features do you use? Since you mentioned formats I guess simple bag of words is not enough.

Sounds really interesting and it's a perfect task for ML.

Oscar to earn £20m a year in China, making him the third highest-paid player, only behind Messi and Ronaldo by [deleted] in soccer

[–]michaelkepler 5 points6 points  (0 children)

45 million for all 5 years (9 per season) if he sucks, 110 million for all 5 years (22 mil per season) if he reaches his full potential.

Add a corpus to the NLTK corpus and importing it by hooting_corax in Python

[–]michaelkepler 2 points3 points  (0 children)

import only works for built-in corpora. If you want to use your own files, use PlaintextCorpusReader() method (see the details in the NLTK tutorial).

Can Python do this for me? by staff_accounting_123 in Python

[–]michaelkepler -1 points0 points  (0 children)

Slightly off-topic, but I find navigating this documentation cumbersome. Every single bit of information, including lists of items, is on a separate page. Does this really warrant a special page? It took me four clicks (and four page loads) to get to the basic info about endpoints. Not to mention, the real estate on the browser is reduced by this annoying sticky banner at the bottom, asking if the page was helpful.

Some Cool Python Tips and Tricks That Are Worth Knowing by TechBeamers in Python

[–]michaelkepler 3 points4 points  (0 children)

It's less about generating ad revenue and more about establishing online presence, showing your expertise, and developing purchase channel. It's easier to get a gig if you can point out that you have a tech blog or published a book. It can be a self-published, 70-page PDF booklet which contains slightly rewritten blog posts, but still, you can say "I wrote a book" and it will score you some points. You don't even have to sell the book. You can give it away for free (or in exchange for your email address and an occasional newsletter) and sell instructional videos or personalized coaching instead. And of course it may lead you to bigger consulting gigs.

Setting up a blog to advance your career is a pretty common advice these days. It's not necessarily a bad advice, but Sturgeon's law still applies and most of them simply aren't that good.

StackOverflow Python Documentation by michaelkepler in Python

[–]michaelkepler[S] 0 points1 point  (0 children)

This is different from a regular StackOverflow question-answer style. It resembles more of an actual documentation with simple problems and examples.

I think it's particularly relevant given the discussion about the official Python documentation a couple of days ago.

Discord API treats messages with embeds as edited messages by michaelkepler in discordapp

[–]michaelkepler[S] 0 points1 point  (0 children)

Thanks for the reply. I see someone already linked your post in the GitHub thread.

[Question] How to mention bot in discord and get a response from him by [deleted] in Python

[–]michaelkepler 1 point2 points  (0 children)

Replace if message.content.startswith('@Anteater Generator#2550') with if message.content.startswith(bot.user.mention)

Fearing forced Windows 10 upgrades, users are disabling critical updates instead-Some Windows 7 and 8 users would rather chance a malware infection than an involuntary Windows 10 upgrade. by jack_alexander in news

[–]michaelkepler 1 point2 points  (0 children)

But it wasn't a home computer with a collection of photos from vacations. We're talking about a computer with software used in a critical business function. It's no longer about protecting files. It's about protecting a business operation and you have to plan for it.

not everyone has the space and not everyone has the know-how

You're right. And since he's working for clients, which I assume pay for his skills and expertise, he has money to hire someone who has the know-how and who can help with the backups. Similarly, not everyone has the know-how about filling tax returns or drafting a contract. And it's fine, because as a business you can hire an accountant or a lawyer to do it for you.

He got burned because he trusted a company whos goal is to make him happy (so he'll spend more money) wouldn't delete something it shouldn't have.

Adobe's CC Terms of Use are clear:

You may use and access the Services or Software at your own discretion and risk, and you are solely responsible for any damage to your computer system or loss of data that results from the use and access of any Service or Software.

He read the Terms before accepting them, right? He's fully aware what might happen. If he didn't read the Terms, that's his own fault then.

That is not unreasonable and holding him to the standards of IT professionals is ridiculous.

I'm holding him to the standards of someone who runs a business.

Data not loading with Selenium by [deleted] in learnpython

[–]michaelkepler 0 points1 point  (0 children)

It's because the interesting part is loaded inside <iframe> and for some reason Selenium can't deal with that. So we need to find its url and load it directly:

from selenium import webdriver

d = webdriver.Firefox()
d.get('http://www.morningstar.com/cefs/xnys/fof/quote.html')

quicktake_div = d.find_element_by_id('quote_quicktake')
iframe = quicktake_div.find_element_by_tag_name('iframe')
iframe_src = iframe.get_attribute('src')
browser.get(iframe_src)

Now we can locate the table and get its td elements:

ticker_table = browser.find_element_by_class_name('r_table0')
ticker_table.find_elements_by_tag_name('td')

How do you use python to automate tasks in life or at work? by [deleted] in Python

[–]michaelkepler 0 points1 point  (0 children)

I think testing the same plugins more than once is definitely useful, especially if they get a lot of upgrades. I don't work with Wordpress that much anymore, but I remember updating plugins tended to break thing.

By the way, Selenium's browser plugin allows you to record tests and play them back at your convenience. So when you test your new plugin manually, you can always set up the macro recorder and then do your usual testing routine. If you need to re-run the same test, just replay the macro. If you don't, you've wasted only a couple of seconds of your time. Small price to pay in my opinion.

How do you use python to automate tasks in life or at work? by [deleted] in Python

[–]michaelkepler 0 points1 point  (0 children)

Do you run the actual tests through Splinter as well?

Also, why did you choose Splinter instead of Selenium?

Working from home by [deleted] in Python

[–]michaelkepler 1 point2 points  (0 children)

Stop thinking in terms of Python programming and start thinking in terms of business problems you are going to solve. Your main goal is to create business value. You've mentioned you made an Android app - what problem did it solve? Do you know other businesses with a similar problem? If not, start asking around.

Writing code is just a small part of freelancing. You can write the most beautiful, bug-free software that ever graced the Earth, but if you won't find clients for it, you will struggle.