Tagged Questions

A generator is a generalization of a subroutine, primarily used to simplify the writing of iterators. The yield statement in a generator does not specify a co-routine to jump to, but rather passes a value back to a parent routine.

I've rewritten my original parser generator to a header-only library which uses templates and functionals for better type safety and clarity. The generated parser creates an abstract syntax tree which ...

I am building TiKZ files, one pdf for each image I have. The purpose is to add text to each separately. The images are legion, so I created a script to generate the text files instead of generating ...

I am retrieving information from an SQLite database that gives me back around 20 million rows that I need to process. This information is then transformed into a dict of lists which I need to use. I ...

I wrote the following code to parse some weak ciphers out of an nmap.xml report. I am wondering if there is a more elegant way to write this code in order to avoid the nested for loops with the double ...

I have a backup job that walks across a huge directory with potentially millions of files. Python's os.walk() works just fine.
Now, I have implemented a feature to ignore files based in a black list ...

I'm not a Python developper, but I enjoy programming with it, and for a project I wanted to have generators that I can easily index. Using python's slice model is obviously the way to go, and here's ...

I have a method that takes a generator, converts it into a tuple to sort it, then into a list. It works perfectly, but being as I am fairly new to the Python world, I keep asking myself if it is worth ...

I'm implementing a checkers engine for a scientific experiment. I found out through profiling that this is one of the functions that takes up a lot of time. I'm not looking for an in-depth analysis, ...

Is there better way to read from a file and connect all data in one big data than to use generators?
At the moment, I do the following:
use generators to read data from files.
use NumPy to pack all ...

Based on a python name generator grammar I found here I've decided to write my own in objective-C. The idea is I can load the grammar from a plist file and generate random names from it.
I'm looking ...

I'm a few months into learning C++ programming and I want to know if I'm moving generally in the right direction or not with the following code. This is the most advanced thing I've created so far, ...

I've written a python module that randomly generates a list of ideas that
can be used as the premises for furthur research. For instance, it would be useful in situations where a new thesis topic is ...