|
Hammerite posted:I am aware now, after reading his second post, that he is just trying to retrieve arbitrary elements from a list of their offsets. When I responded to his first post, I misunderstood what he wanted, because he used the term "slice". In his second post, he used the term "slice" again, and I presumed that on that occasion he had used the term in that way intentionally and was asking me a follow-up question about slicing. I for one am glad you answerd the "wrong" question, as I learned something from it. And while it is important to point out when an answer is not correct, or to the wrong question, it is too bad people are frequently more harsh about it than they need be. (I am guilty of this as well, sadly)
|
# ¿ Oct 26, 2012 19:36 |
|
|
# ¿ May 19, 2024 17:51 |
|
QuarkJets posted:My girlfriend is interested in learning more web development skills. Maintaining a web site is a small facet of her job, so it actually does have some applicability to what she's doing. For instance, she knows how to use CSS and javascript. She knows that I've been using Python for a long time, and she has asked me if Python is a useful language to learn for web development purposes. I wasn't sure what to tell her; I've never done any web stuff. "It depends" I'm sure you know this already, but for the sake of clarity: To make nice looking websites, you don't need any languages other than HTML / CSS.... To make nice looking database driven websites, you'll need some sort of server language. Python is one of them, and like all the other languages one could use, there are a bunch of MVC frameworks that help you do common tasks like url routing, validating form input, getting data from the DB, displaying data in templates, etc. Two of the biggies in python-land are Flask and Django. They are both good, have different "philosophies". That said, depending on her needs, something like WordPress (shudder) might be better than diving into a development framework.
|
# ¿ Apr 17, 2013 16:05 |
|
ahmeni posted:Is there something decent as a 2d game library these days? There's a ton of abandoned half-finished libraries. What I know about so far: With Apple introducing it's own 2d game framework for iOS, cocos2d for iOS is all but dead. I know they had a big push to make javascript it's primary focus, so maybe that will keep it around, and the tutorials may all start switching to JS...
|
# ¿ Jul 25, 2013 17:57 |
|
duck monster posted:That I doubt. Cocos2d for ios has the lionshare of the market, is conceptually multiplatform via cocos2s-x and its html5 spin-off and has zynga as the 700lb gorilla backing it. Zynga is dying fast,but that's besides the point. For iOS (again, I'm being specific to iOS here) cocos2D is going to all but vanish. This does not mean cocos2D is going away. I was pointing out that it's heavy focus on iOS will be going away most likely, as that was one of the original poster's concerns: that so much of it's tutorials / samples were iOS related. I'm simply pointing out that the focus of cocos2D will shift away from iOS, and has been slowly for a little while, but that trend will accelerate since Apple's new 2D game API will likely be getting a large dev mind-share in iOS-land.
|
# ¿ Jul 31, 2013 15:07 |
|
Misogynist posted:Most of the dynamic content (polls, visualizations, etc.) on the Washington Post's website is also Django. They've got a pile of extensions on their GitHub account. I also believe these little sites called "Pinterest" and "Instagram" are Django / python apps.
|
# ¿ Nov 4, 2013 14:40 |
|
Speaking of SQLAlchemy... I am about to start an app in python that will be calling stored procedures on an MSSQL database. After looking around a bit, I think SQLAlchemy is probably the right way to connect / call, but I'd love to hear any alternate solutions or gotchas if anyone has done this before.
|
# ¿ Nov 5, 2013 22:44 |
|
Pollyanna posted:Disregard previous post! Got something working, finally. Go check out How are my stocks doing? and follow the instructions there for great fun! "Python flask get URL variables value" and you will see many ways.
|
# ¿ Dec 16, 2013 12:38 |
|
John DiFool posted:Yes, hi mr. duck monster what is your question sir? You must please with asking the question. Someday we will be able to harness Duck Monster's impotent rage into a source of energy for the entire planet.
|
# ¿ Jan 10, 2014 14:50 |
|
Dominoes posted:I'm looking for advice on how to store database information for a Django web app on RHCloud. I'm uploading raw text info of temporary flying restrictions, and want to store and reference them. Columns would be something like this: "id, start date, end date, category, min alt, max alt" etc. There would probably be a few thousand entries. You can write your own ModelManager to handle hooking up the ORM to a remote DB. We are in the process of writing a Django app that uses a custom ModelManager coupled with SQLAlchemy to use a (*shudder*) Azure Cloud MSSQL store for our data.
|
# ¿ Jan 12, 2014 14:15 |
|
lufty posted:
Assuming I understand what you are asking, this will prompt the user if they want to continue after an error: Python code:
|
# ¿ Apr 9, 2014 15:56 |
|
Ahz posted:I asked this in Djagno thread, but it should probably go here: I used this: https://pypi.python.org/pypi/qrcode with much success in a project. I have no idea if it's the "Best" but it generated QR codes really fast and didn't blow up, and somebody as dumb as me could figure out how to use it.
|
# ¿ Apr 10, 2014 00:44 |
|
As was posted just above: http://www.greenteapress.com/thinkpython/
|
# ¿ Oct 8, 2014 17:56 |
|
Literally Elvis posted:I'm writing a small django app thing and I need to set a few GET parameters to None if they're not in the URL, is it better to do: I believe you want to do something like so: Python code:
Python code:
Lumpy fucked around with this message at 17:37 on Dec 31, 2014 |
# ¿ Dec 31, 2014 17:32 |
|
Thermopyle posted:
Serious question: is PyCharm worth allowing Java to be installed on my machine? I've kept it off of all my computers for the last 6+ years due to security paranoia. I use MacVim and love it, but all the folks loving PyCharm had me wanting to try it, but then Java.
|
# ¿ Apr 18, 2015 01:58 |
|
dantheman650 posted:This is something I'll check into. I thought I had remembered seeing the bug upon a fresh run of the program but perhaps I'm remembering incorrectly. I'll report back soon, thanks! In addition to the testing goat recommended above, get a copy of Kent Beck's: Test Driven Development by Example. It sold me on the virtues of TDD in addition to a nice intro into the practice.
|
# ¿ May 14, 2015 23:13 |
|
I searched the thread a bit and didn't see any recent discussion on it, so I shall ask about pulling text from PDF documents. I found a lot of packages that do this, but would love to hear any personal experience with them if people have any. I don't need any sort of images or charts from the docs, just plain old text. Thanks!
|
# ¿ May 31, 2016 17:01 |
|
|
# ¿ May 19, 2024 17:51 |
|
Dren posted:it will work with varying degrees of success. Depends on the PDF. Could be the pdf you think is text is actually a bunch of images, in which case you'll get nothing. Could be there is some formatting that the text extractor will inconsistently be tripped up by. pdf is a crazy format. onionradish posted:Echoing Dren's response. I've used the pdfminer library -- actually the pdf2txt.py CLI script that comes with it -- to extract text from short document PDFs. The order of various text blocks is often mixed up if there is multi-column content, captions, headings or headers/footers. Line breaks are often "hard breaks" requiring re-wrapping of paragraph text. Almost all of that has to do with the PDF format itself. The CLI script has some parameters that can help rejoin blocks of text. Thanks for your responses. I know that PDFs are no fun, and that I can only strive for a "least worst" solution, but anything better than manually copying and pasting thousands of docs is an improvement!
|
# ¿ Jun 2, 2016 16:43 |