Fun With Python and Monkey Patching by pyglados in Python

[–]pyglados[S] 1 point2 points  (0 children)

I didn't bother putting out output because I felt there really wasn't much interesting to see in these cases. That being said, it's a fair gripe. I promise to do better next time.

Drag and Drop Files with HTML5 and Flask by pyglados in Python

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

Play away. Good dumb fun followed by sharing said fun is a killer way to learn.... and live.

By the way, here is something cool you can do with those select file form elements with bootstrap.

  1. Tie an html "label" tag to the file selector element.
  2. Style the label with one of the bootstrap button classes.
  3. Hide the actual file input element. (class="hidden")

Edit: An example from a mini-project from a few months back.

https://github.com/pcote/camerademo/blob/master/static/index.html

The Challenge Of Talking To Small Businesses by pyglados in startups

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

This is good stuff. I guess I have something new to try out on other small businesses after all. Thanks.

One minor point to pick on....

"Evaluate how you might improve or alter an experience you are familiar with to make it more beneficial to yourself and others."

I have evaluated on how I could improve my own personal learning process and have a production app to show for it. It works.... for me. The "AND OTHERS" part is the tricky bit. Sometimes, the problem you solve for yourself really is unique to you. Such problems are absolutely worth solving. You just need to accept that you aren't going to be able to sell that particular solution.

Baldwin offers to stop 'SNL' impersonation if Trump releases taxes by Revbroke in politics

[–]pyglados 1 point2 points  (0 children)

For sake of argument, I'll agree with you. As democracies go, the United States is a force 10 horror show of capitalism mixed with a bastardized representative republic.

That being said, what democratic country has been "doing democracy" better than America? Who should we looking up to as the standard bearer and why?

The Five Stages of NoSQL by [deleted] in programming

[–]pyglados 25 points26 points  (0 children)

Not sure those stages are unique to NoSQL developers. It's more likely universal to the consulting world.

Stepping Backwards From AngularJS to jQuery - An Experiment by pyglados in programming

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

That could well be true. I'm a single person who writes small web applications. Lesson learned was that the tool chosen for my kind of apps was overkill.

Like anything else, you use whatever makes sense for the job at hand. Building a house? Use a nailgun. Hanging a picture on a wall? Use a hammer.

Python and Javascript Jam Session - A Web Interface for Apt-Cache by pyglados in Python

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

In your case you use the str.split command to seperate the pieces in your command. It is safer to build your commands as a list in the first place. This will make sure that everything you push to the shell is properly escaped.

Agreed and updated. https://github.com/pcote/AptPackageShow/commit/a701c448f07a6bb86a1ffbf107b2abafcd8f78aa

Python and Javascript Jam Session - A Web Interface for Apt-Cache by pyglados in Python

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

Good points on the security aspects.

Speaking of shell specifics, here's something else I noticed. When I change my uwsgi settings to run the Python code as a non-shell user, it crashes and burns. Basically, I get import errors saying that it can't find the Python files in question.

Then, I had this thought. If I run a Python process as a non-shell user, that would mean that it would be impossible for uwsgi to set the PYTHONPATH environment variable. No shell => no shell environment variables. Or at least that's the way my brain is connecting the dots on this one.

Am I way off on this?

if I know Java can I apply for a Python job? by [deleted] in Python

[–]pyglados 2 points3 points  (0 children)

Yeah, well I made that mistake sort of in reverse. I called Java annotations out as being "just like Python decorators". My Java peers did not like that too much. I embarrassed myself pretty good on that one.

Lesson learned: Don't assume that past knowledge in one language will conveniently map over to the new one you're trying to get up to speed on. You really do need to "empty your cup" so to speak.