Top "Generator" questions

A generator is a generalisation of a subroutine, primarily used to simplify the writing of iterators.

Scapy SYN send on our own IP address

I tried to send SYN packets on my local network and monitoring them with Wireshark and everything works just fine, …

python generator send packet scapy
How to join/merge two generators output using python

I have two generators g1 and g2 for line in g1: print line[0] [a, a, a] [b, b, b] [c, …

python generator itertools
Koa / Co / Bluebird or Q / Generators / Promises / Thunks interplay? (Node.js)

I'm investigating building a web app in part with Koa, but I don't quite have a handle on the hows, …

node.js generator promise bluebird koa
generating an AVRO schema from a JSON document

Is there any tool able to create an AVRO schema from a 'typical' JSON document. For example: { "records":[{"name":"X1","…

json schema generator avro
using a python generator to process large text files

I'm new to using generators and have read around a bit but need some help processing large text files in …

python generator large-files chunks
Best way to receive the 'return' value from a python generator

Since Python 3.3, if a generator function returns a value, that becomes the value for the StopIteration exception that is raised. …

python generator
How can I make `await …` work with `yield return` (i.e. inside an iterator method)?

I have existing code that looks similar to: IEnumerable<SomeClass> GetStuff() { using (SqlConnection conn = new SqlConnection(connectionString)) using (…

c# ado.net async-await generator yield-return
Understanding nested yield / return in python

I have a function in python whose output is a generator : def main_function(x): r = get_range() for i …

python nested generator yield
rails g scaffold for existing model and DB table

I would like to create a structure with rails g scaffold Article, but I have already created the table Articles …

ruby-on-rails-3 activerecord model generator scaffold
compute mean in python for a generator

I'm doing some statistics work, I have a (large) collection of random numbers to compute the mean of, I'd like …

python generator mean