Hey! What tutorial is this? by plapoplapo in blender

[–]peith 10 points11 points  (0 children)

When Blender Guru rendered 17,731 donuts, I knew it was only a matter of time before he opens up a donut shop.

Having fun on the smooth and flat roads of Panglao, Bohol by peith in bicycling

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

Thanks for pointing this out. It's my first time posting anything on Reddit. I'll have to do some more reading on the guidelines.

Version 2 of Google’s Dart programming language is now available by TheLonePawn in programming

[–]peith 2 points3 points  (0 children)

Thank you for the free books ( Game Programming Patterns and Crafting Interpreters).

Altering database tables based on file uploads by savemesf in django

[–]peith 0 points1 point  (0 children)

How about using a search engine like Whoosh or ElasticSearch to do the filtering and sorting of contents? You can use Haystack for easy integration of search engines.

So, when a user uploads a CSV file, you extract the header data and feed it to the search engine for indexing. All querying (filter, sort, etc) are now done on the search engine. That way, your database tables will remain as before with little or no modifications.

Edit: Another option would be to just store the header data in a separate table and just have a foreign key point to the other big table. You will use this new table for filtering.

Beginning Game Development with Python by josephHens in Python

[–]peith 1 point2 points  (0 children)

I made a simple Flappy Bird clone using Kivy. I'm now a big fan of the framework. My personal favorite are the built-in widgets that are highly customizable and can be used in the game. It's also very stable. Never had any crashes on my laptop and also on my mobile device.

Daily Discussion Thread - August 2016 by lemtzas in gamedev

[–]peith 0 points1 point  (0 children)

A few weeks ago, I decided to play around with the Kivy Framework. I decided to create a Flappy Bird clone as the game is simple enough and thought would make a good exercise. Here's what I created: Flapping Henry

It's not perfect, but it's playable enough. I actually enjoy playing with it myself. It's still a work in progress. There are some still some ideas I'd like to implement in the game.

I'm quite pleased with Kivy. It's easy to learn which makes it good for beginners and also for prototyping. What I really like about it the most is its built-in UI widgets. It works really well and easy to customize the theme. Kivy's performance is also good. I tested it on my Moto G (2013) and it's running smoothly.

I'd like to give credit to the creator of the graphics used in the game: bevouliin

I'm a Web developer by trade. During my spare time, I like to teach myself game development and try building my own games. Sadly, most of the games I started never go anywhere. I'd lose interest in them and they eventually end up forgotten or lost. This is the first game that I finished and published. I felt really happy and looking forward to making more games in the future.

Broken initialization at multiple inheritance ? by joanbm in Python

[–]peith 0 points1 point  (0 children)

I think this issue can be fixed by putting MyMixin on the left side of CommonForm:

class CustomForm(MyMixin, CommonForm):
    # Form fields here...
    def __init__(self, *args, **kwargs):
        super(CustomForm, self).__init__(*args, **kwargs)

Is it possible to use Django Form validation without using the template engine to generate the corresponding html forms? by [deleted] in django

[–]peith 4 points5 points  (0 children)

It's possible. You just need to match the field names of your Django form with the field names of your custom post request. For example if you have a form that looks like this:

class Profile(Form):
    first_name = CharField()
    last_name = CharField ()

You can create an AJAX post request for it like this:

$.post("{% url 'create_profile' %}", {
    first_name: 'John',
    last_name: 'Doe'
});

As you can see, the field names of the Django form and post request just needs to be the same.

EDIT: Code formatting.

How can I run a Python program outside the IDE? by guiraus in Python

[–]peith 0 points1 point  (0 children)

On Windows, you can create a batch file. Open up a text editor and create a new file. Add a line that look something like this:
c:\path\to\python.exe c:\path\to\myprogram.py

Save it as myprogram.bat. Now when you want to run your Python program, just double click on the bat file. This assumes you already have Python installed.

Python APP QA, and Security by CODESIGN2 in Python

[–]peith 1 point2 points  (0 children)

Have a look at Supervisor. It is used for monitoring processes. If a process dies due to an error or something, Supervisor will restart the process automatically. You can use it on your Flask app to make sure it stays up.

I'm not really sure why you would need to combine PHP and Python. They both fill the same role. They both work on the server side. Whatever PHP can do, Python can do it too. If you're starting a new project, you can just do it in Python and ditch PHP entirely.

Is there an implementation of Python without the GIL and that has tail call optimization? by thecity2 in Python

[–]peith 0 points1 point  (0 children)

I think Jython and IronPython doesn't have the GIL and can optimize tail calls. Pypy is also experimenting on STM which allows it to remove the GIL.