Result:
found more than 672 distributions - search limited to the first 2001 files matching your query ( run in 0.455 )


Dancer-Plugin-StreamData

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN

chunk at a time.  For example, the data could be fetched row by row from a
database server, with each row processed and then dispatched to the client via
the write() method.

The reason for this plugin is that the interface defined by PSGI for data
streaming is annoyingly complex and difficult to work with.  By hiding the
complexity, this plugin makes it simple to set up an application which streams
long responses instead of marshalling them into a single response message.

This plugin can be used with any L<PSGI> compatible web server, and includes a
method by which you can check whether the server supports streaming.

=head1 USAGE

=cut

# Between the PSGI interface standard and the way Dancer does things,
# streaming a response involves a callback that returns a callback that is
# passed a callback, none of which are called with the necessary parameters.
# So the easiest way to get the necessary information to the routines that
# need it is to store this information in private variables.  Not the most
# elegant solution, but it works.  In fact, Dancer itself stores a lot of
# things in private variables.

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN


register 'stream_data' => sub {
    
    my ($data, $call) = @_;
    
    # First make sure that the server supports streaming
    
    my $env = Dancer::SharedData->request->env;
    unless ( $env->{'psgi.streaming'} ) {
	croak 'Sorry, this server does not support PSGI streaming.';
    }
    
    # Store the parameters for later use by stream_callback()
    
    $stream_object = $data;

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN

    
    $stream_status = undef;
    @stream_headers = ();
    
    # Indicate to Dancer that the response will be streamed, and specify a
    # callback to set up the streaming.
    
    my $resp = Dancer::SharedData::response;
    $resp->streamed(\&prepare_stream);
    
    my $c = Dancer::Continuation::Route::FileSent->new(return_value => $resp);

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN



# This routine will be called by Dancer, and will be passed the status code
# and headers that have been determined for the response being assembled.  Its
# job is to return a callback that will in turn be called at the proper time
# to begin streaming the data.  Unfortunately, it will be called *twice*, the
# second time with an improper status code and headers.  Consequently, we must
# ignore the second invocation.

sub prepare_stream {

    my ($status, $headers) = @_;
    
    # Store the status and headers we were given, because the callback that
    # does the actual streaming will have to present them directly to the PSGI
    # interface.  We have no way of actually getting that information to it
    # other than a private variable (declared above).
    
    # The variable $stream_status is made undefined by the stream_data()
    # function (see above) and so we only set it if it has not been set

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN

	    }
	}
    }
    
    # Tell Dancer that it should call the function stream_callback() when
    # ready for streaming to begin.
    
    return \&stream_callback;
}

=pod

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN

erroneously report that the connection was closed prematurely before all of
the data was sent.

=cut

# This subroutine is called at the proper time for data streaming to begin.
# It is passed a callback according to the PSGI standard that can be called to
# procure a writer object to which we can actually write the data a chunk at a
# time.  As each chunk is written, it is sent off to the client as part of the
# response body.

lib/Dancer/Plugin/StreamData.pm  view on Meta::CPAN

	$stream_object->$stream_call($writer);
    }
}


=head2 server_supports_streaming

This function returns true if the server you are working with supports
PSGI-style streaming, false otherwise.

Here is an example of how you might use it:

    if ( server_supports_streaming ) {
	stream_data($query, 'streamResult');
    } else {
	return $query->generateResult();
    }

=cut

register 'server_supports_streaming' => sub {
    
    my $env = Dancer::SharedData->request->env;
    return 1 if $env->{'psgi.streaming'};
    return undef; # otherwise
};


register_plugin;

 view all matches for this distribution


Dancer2-Plugin-SendAs

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/SendAs.pm  view on Meta::CPAN

(if necessary). Both the uppercase 'type' and the provided case of the type are
used to find an appropriate serializer class to use.

The implementation of C<send_as> uses Dancer2's C<send_file>. Your route will be
exited immediately when C<send_as> is executed. C<send_file> will stream
content back to the client if your server supports psgi streaming.

=head1 ACKNOWLEDGEMENTS

This module has been written during the
L<Perl Dancer 2015|https://www.perl.dance/> conference.

 view all matches for this distribution


Dancer2-Plugin-WebSocket

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/WebSocket.pm  view on Meta::CPAN


C<Dancer2::Plugin::WebSocket> provides an interface to L<Plack::App::WebSocket>
and allows to interact with the webSocket connections within the Dancer app.

L<Plack::App::WebSocket>, and thus this plugin, requires a plack server that
supports the psgi I<streaming>, I<nonblocking> and I<io>. L<Twiggy>
is the most popular server fitting the bill.

=head1 CONFIGURATION

=over

 view all matches for this distribution


Dancer2

 view release on metacpan or  search on metacpan

lib/Dancer2/Core/App.pm  view on Meta::CPAN

    # content disposition
    ( exists $options{filename} )
      and $self->response->header( 'Content-Disposition' =>
          ($options{content_disposition} || "attachment") . "; filename=\"$options{filename}\"" );

    # use a delayed response unless server does not support streaming
    my $use_streaming = exists $options{streaming} ? $options{streaming} : 1;
    my $response;
    my $env = $self->request->env;
    if ( $env->{'psgi.streaming'} && $use_streaming ) {
        my $cb = sub {
            my $responder = $Dancer2::Core::Route::RESPONDER;
            my $res = $Dancer2::Core::Route::RESPONSE;
            return $responder->(
                [ $res->status, $res->headers_to_array, $fh ]

 view all matches for this distribution


Dash

 view release on metacpan or  search on metacpan

share/assets/dash_table/async~export.js.map  view on Meta::CPAN

{"version":3,"sources":["webpack://dash_table/./node_modules/xlsx/xlsx.js","webpack://dash_table/(webpack)/buildin/global.js","webpack://dash_table/./node_modules/process/browser.js","webpack://dash_table/./node_modules/buffer/index.js","webpack://da...

 view all matches for this distribution


Data-Dump-Streamer

 view release on metacpan or  search on metacpan

lib/Data/Dump/Streamer.pm  view on Meta::CPAN


=item To STREAMER

Specifies the object to print to. Data::Dump::Streamer can stream its
output to any object supporting the print method. This is primarily meant
for streaming to a filehandle, however any object that supports the method
will do.

If a filehandle is specified then it is used until it is explicitly
changed, or the object is destroyed.

 view all matches for this distribution


Data-Enumerable-Lazy

 view release on metacpan or  search on metacpan

lib/Data/Enumerable/Lazy.pm  view on Meta::CPAN

item.

=head2 Kafka example

Kafka consumer wrapper is another example of a lazy calculation application.
Lazy enumerables are very naturally co-operated with streaming data, like
Kafka. In this example we're fetching batches of messages from Kafka topic,
grep out corrupted ones and proceed with the mesages.

  use Kafka qw($DEFAULT_MAX_BYTES);
  use Kafka::Connection;

 view all matches for this distribution


Data-MessagePack-Stream

 view release on metacpan or  search on metacpan

lib/Data/MessagePack/Stream.pm  view on Meta::CPAN

=for stopwords
messagepack deserializer parsable unpacker unpacker's

=head1 NAME

Data::MessagePack::Stream - yet another messagepack streaming deserializer

=head1 SYNOPSIS

    use Data::Dumper;
    my $unpacker = Data::MessagePack::Stream->new;

lib/Data/MessagePack/Stream.pm  view on Meta::CPAN

        }
    }

=head1 DESCRIPTION

Data::MessagePack::Stream is streaming deserializer for MessagePack.

This module is alternate for L<Data::MessagePack::Unpacker>.
Unlike original unpacker, this module support internal buffer and it's possible to handle streaming data correctly.

=head1 METHODS

=head2 new

 view all matches for this distribution


Data-MessagePack

 view release on metacpan or  search on metacpan

lib/Data/MessagePack.pm  view on Meta::CPAN


The MessagePack format saves memory than JSON and Storable format.

=item STREAMING DESERIALIZER

MessagePack supports streaming deserializer. It is useful for
networking such as RPC.  See L<Data::MessagePack::Unpacker> for
details.

=back

lib/Data/MessagePack.pm  view on Meta::CPAN

MessagePack cannot deal with complex scalars such as object references,
filehandles, and code references. We should report the errors more kindly.

=item Streaming deserializer

The current implementation of the streaming deserializer does not have internal
buffers while some other bindings (such as Ruby binding) does. This limitation
will astonish those who try to unpack byte streams with an arbitrary buffer size
(e.g. C<< while(read($socket, $buffer, $arbitrary_buffer_size)) { ... } >>).
We should implement the internal buffer for the unpacker.

 view all matches for this distribution


Data-MuForm

 view release on metacpan or  search on metacpan

signup_form.html  view on Meta::CPAN

      </div>
      <div class="select label">
        <label for="source_type_user_reported">How did you hear about us?</label>
        <select name="source_type_user_reported" class="source_type_user_reported" data-where-field="source_type_user_reported_specific" id="source_type_user_reported">
          <option value="">- How did you hear about us? -</option>
          <option value="streaming" data-where="Which streaming service did you hear us on? (optional)">Streaming Audio (e.g. Spotify)</option>
          <option value="tv" data-where="Which TV station did you see us on? (optional)">TV</option>
          <option value="search_engine">Search Engine</option>
          <option value="mail" data-where="Offer code (optional)">In the Mail</option>
          <option value="radio_or_podcast" data-where="Which radio station did you hear us on? (optional)">Radio (AM/FM/XM)</option>
          <option value="magazine_ad" data-where="Offer code (optional)">Magazine ad / insert</option>

 view all matches for this distribution


Data-Password-Filter

 view release on metacpan or  search on metacpan

share/dictionary.txt  view on Meta::CPAN

mainstay's
mainstays
mainstream
mainstream's
mainstreamed
mainstreaming
mainstreams
maintain
maintainability
maintainable
maintained

share/dictionary.txt  view on Meta::CPAN

stream's
streamed
streamer
streamer's
streamers
streaming
streaming's
streamline
streamline's
streamlined
streamlines
streamlining

share/dictionary.txt  view on Meta::CPAN

upstarting
upstarts
upstate
upstream
upstreamed
upstreaming
upstreams
upsurge
upsurged
upsurges
upsurging

 view all matches for this distribution



Data-Password-zxcvbn-French

 view release on metacpan or  search on metacpan

lib/Data/Password/zxcvbn/RankedDictionaries/French.pm  view on Meta::CPAN

    'strates' => 14939,
    'stratford' => 23964,
    'stratification' => 24585,
    'stratos' => 28468,
    'stream' => 27544,
    'streaming' => 20258,
    'street' => 2976,
    'stress' => 6952,
    'strict' => 7454,
    'stricte' => 6666,
    'strictement' => 4370,

 view all matches for this distribution


Data-Password-zxcvbn

 view release on metacpan or  search on metacpan

lib/Data/Password/zxcvbn/RankedDictionaries/English.pm  view on Meta::CPAN

    'streaked' => 19793,
    'streaks' => 12060,
    'stream' => 2228,
    'streamed' => 11794,
    'streamer' => 27344,
    'streaming' => 6219,
    'streamline' => 14870,
    'streamlined' => 10083,
    'streamlining' => 21663,
    'streams' => 3638,
    'streatham' => 21689,

 view all matches for this distribution


Data-Random-Contact

 view release on metacpan or  search on metacpan

lib/Data/Random/Contact/Language/EN.pm  view on Meta::CPAN

mainstay's
mainstays
mainstream
mainstream's
mainstreamed
mainstreaming
mainstreams
maintain
maintainability
maintainable
maintained

lib/Data/Random/Contact/Language/EN.pm  view on Meta::CPAN

stream's
streamed
streamer
streamer's
streamers
streaming
streaming's
streamline
streamline's
streamlined
streamlines
streamlining

lib/Data/Random/Contact/Language/EN.pm  view on Meta::CPAN

upstarting
upstarts
upstate
upstream
upstreamed
upstreaming
upstreams
upsurge
upsurged
upsurges
upsurging

 view all matches for this distribution


Data-Random

 view release on metacpan or  search on metacpan

lib/Data/Random/dict  view on Meta::CPAN

streaks
stream
streamed
streamer
streamers
streaming
streamline
streamlined
streamliner
streamlines
streamlining

 view all matches for this distribution


Data-Riak-Fast

 view release on metacpan or  search on metacpan

lib/Data/Riak/Fast/MapReduce.pm  view on Meta::CPAN

=head1 METHOD
=head2 mapreduce

Execute the mapreduce query.

To enable streaming, do the following:

    my $results = $mr->mapreduce(chunked => 1);

=cut

 view all matches for this distribution


Data-Riak

 view release on metacpan or  search on metacpan

lib/Data/Riak/MapReduce.pm  view on Meta::CPAN


=head2 mapreduce

Execute the mapreduce query.

To enable streaming, do the following:

    my $results = $mr->mapreduce(chunked => 1);

=head1 AUTHORS

 view all matches for this distribution


Data-Unixish

 view release on metacpan or  search on metacpan

lib/Data/Unixish.pm  view on Meta::CPAN

from the returned filehandle. (Currently not yet supported on Windows due to no
support for open '-|').

The C<*duxl> functions returns result as list. It can be evaluated in scalar to
return only the first element of the list. However, the whole list will be
calculated first. Use C<*duxf> for streaming interface.

=head2 cduxa($func, $icallback) => ARRAYREF

=head2 cduxc($func, $icallback, $ocallback)

 view all matches for this distribution


Database-Async-Engine-PostgreSQL

 view release on metacpan or  search on metacpan

examples/roundtrip.pl  view on Meta::CPAN

                @$_
            )
        })
        ->completed;
    $log->infof('Copy data in');
    # Normally you'd have a proper source that's streaming from some other system,
    # this construct looks a bit unwieldy on its own but the ->from method
    # would also accept the arrayref-of-rows directly.
    await $db->query('copy roundtrip_one(name) from stdin')
        ->from([ map [ $_ ], qw(first second third) ])
        ->completed;

 view all matches for this distribution


Database-Async

 view release on metacpan or  search on metacpan

lib/Database/Async/Query.pm  view on Meta::CPAN


sub in {
    my ($self) = @_;
    $self->{in} //= do {
        my $sink = $self->db->new_sink;
        die 'already have streaming input but no original ->{in} sink' if $self->{streaming_input};
        $sink->source->completed->on_ready(sub { $log->debugf('Sink for %s completed with %s', $self, shift->state) });
        $self->{streaming_input} = $sink->source->buffer->pause;
        $self->ready_to_stream->on_done(sub {
            $log->debugf('Ready to stream, resuming streaming input');
            $self->streaming_input->resume;
        });
        $sink
    }
}

#sub {
#    my ($self) = @_;
#    my $engine = $self->{engine} or die 'needs a valid ::Engine instance';
#    my $sink = $self->in or die 'had no valid sink for streaming input';
#
#    my $src = $sink->buffer;
#    $src->pause;
#    $engine->stream_from($src);
#

lib/Database/Async/Query.pm  view on Meta::CPAN

#        })->on_cancel(sub {
#            $src->completed->cancel unless $sink->completed->is_ready;
#        });
#}

sub streaming_input { shift->{streaming_input} // die '->in has not yet been called' }

sub finish {
    my ($self) = @_;
    if($self->{in}) {
        $self->input_stream->done;

 view all matches for this distribution


Devel-Agent

 view release on metacpan or  search on metacpan

lib/Devel/Agent.pm  view on Meta::CPAN

  default=>0,
);

=item * on_frame_end=>CodeRef

This code ref is called when a frame is closed.  This should act as the default data streaming hook callback.  All tracing operations are halted durriong this callback.

Example:

  sub {
    my ($self,$last)=@_;

 view all matches for this distribution


Devel-SizeMe

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


0.01 2012-09-29 Tim Bunce

 * Created new Devel::Memory extension using a modified version of
    Devel::Size's perl memory data crawler, extended to support
    callbacks, a 'data path name' concept, data streaming,
    data processing and visualization.

 * The Devel::Memory core was based on 0.77. The generic changes
    will be fed back to Devel::Size so it will remain the
    canonical source of knowledge of how to crawl perl internals.

 view all matches for this distribution


Devel-hdb

 view release on metacpan or  search on metacpan

lib/Devel/hdb/App/Assets.pm  view on Meta::CPAN

        $fh->binmode();
    } else {
        $type = 'text/plain';
    }

    if ($env->{'psgi.streaming'}) {
        return [ 200, ['Content-Type' => $type], $fh];
    } else {
        local $/;
        my $buffer = <$fh>;
        return [ 200, ['Content-Type' => $type], [$buffer]];

 view all matches for this distribution


Device-SaleaeLogic

 view release on metacpan or  search on metacpan

lib/Device/SaleaeLogic.pm  view on Meta::CPAN


sub is_usb2 {
    return saleaeinterface_is_usb2($_[0]->{obj}, $_[1]);
}

sub is_streaming {
    return saleaeinterface_is_streaming($_[0]->{obj}, $_[1]);
}

sub get_channel_count {
    return saleaeinterface_get_channel_count($_[0]->{obj}, $_[1]);
}

lib/Device/SaleaeLogic.pm  view on Meta::CPAN


This method can be invoked from any callback provided to the C<new()> function
or from outside the callbacks as long as you have a copy of the
Device::SaleaeLogic object created by C<new()> and a copy of the C<$id> as well.

=item C<is_streaming($id)>

This method informs the user whether the device with ID C<$id> is streaming data
or not. This is useful to know before calling methods like C<read_start()>,
C<write_start()> and C<stop()>. It returns 1 if streaming is going on and 0
otherwise.

The way to invoke this method is as below:

    if ($self->is_streaming($id)) {
        # ... do something ...
        # ... look at the section for read_start() for an example ...
    }

This method can be invoked from any callback provided to the C<new()> function

lib/Device/SaleaeLogic.pm  view on Meta::CPAN


=item C<read_start($id)>

This method starts the data sampling from the Logic or Logic16 device given by
the ID C<$id>. This should be called only once and to check for whether to call
it or not the user should use C<is_streaming($id)> before that.

The way to invoke this method is as below:

    unless ($self->is_streaming($id)) {
        $self->read_start($id);
    }

This method should B<not> be invoked from any callback provided to the C<new()>
function. It has to be invoked from outside of the callbacks as shown in
F<share/example.pl> in the distribution.

=item C<stop($id)>

This method stops the data streaming that is currently happening for the Logic
or Logic16 device given by the device ID C<$id>. This should be called after
checking with C<is_streaming($id)>. 

The way to invoke this method is as below:

    if ($self->is_streaming($id)) {
        $self->stop($id);
    }

This method can be invoked from any callback provided to the C<new()> function
or from outside the callbacks as long as you have a copy of the

 view all matches for this distribution


Device-WebIO-Dancer

 view release on metacpan or  search on metacpan

lib/Device/WebIO/Dancer.pm  view on Meta::CPAN

    my $mime_type = $type1 . '/' . $type2;

    my $in_fh = $webio->vid_stream( $name, $channel, $mime_type );

    return send_file( '/etc/hosts',
        streaming    => 1,
        system_path  => 1,
        content_type => $mime_type,
        callbacks    => {
            around_content => sub {
                my ($writer, $chunk) = @_;

 view all matches for this distribution


Device-WebIO-RaspberryPi

 view release on metacpan or  search on metacpan

CHANGELOG  view on Meta::CPAN


- SPI interface

0.007 2014-11-30

- Video streaming

0.006 2014-11-22

- Use GStreamer to get image rather than calling raspistill
- Add quality parameter to examples/picture.pl

 view all matches for this distribution


Device-WebIO

 view release on metacpan or  search on metacpan

lib/Device/WebIO.pm  view on Meta::CPAN


=head3 vid_stream

  vid_stream( $name, $channel, $type );

Returns a filehandle for streaming the video channel.  C<$type> is one of the 
MIME types returned by C<vid_allowed_content_types()>.

=head2 Video Callback

These can be used if the device does the C<VideoOutputCallback> role.

lib/Device/WebIO.pm  view on Meta::CPAN


=head3 img_stream

  img_stream( $name, $channel, $type );

Returns a filehandle for streaming the video channel.  C<$type> is one of the 
MIME types return by C<img_allowed_content_types()>.

=head2 I2C

=head3 i2c_read

 view all matches for this distribution


Device-WxM2

 view release on metacpan or  search on metacpan

WxM2.pm  view on Meta::CPAN

		 $outsideTempHumIndex, 
		 $outsideTempHumIndexMaximum,
		 $avgWindChill, 
		 $windChillMinimum);

B<&getSensorImage> enables a continuous streaming of "live" weather
data from the Davis Wx Station.  I've found this stream to be very
easy to get out of sync, so this funcion reads a single block, stops
the streaming, and flushes the serial receive buffer.  The data
returned by this function are the current values and not average
values within a sample period, like &getArcImg returns.  The array
returned is as follows:

    @array = ($insideTemp, 

WxM2.pm  view on Meta::CPAN

    }
    return 1;
}

##
## `getSensorImage' enables a continuous streaming of 18 byte chunks of 
## weather data from the Davis Wx Station.  I've found this stream to be
## very easy to get out of sync, so this funcion read a single 18 byte chunk, 
## stops the streaming, and flushes the serial Rx buffer
##
sub getSensorImage {
    ##### LOOP ######
    #  Monitor, Wizard, and Perception Sensor Image:
    #       start of block                     1 byte

 view all matches for this distribution


Digest-HighwayHash

 view release on metacpan or  search on metacpan

highwayhash/c/highwayhash.h  view on Meta::CPAN

  HighwayHashState state;
  uint8_t packet[32];
  int num;
} HighwayHashCat;

/* Allocates new state for a new streaming hash computation */
void HighwayHashCatStart(const uint64_t key[4], HighwayHashCat* state);

void HighwayHashCatAppend(const uint8_t* bytes, size_t num,
                          HighwayHashCat* state);

 view all matches for this distribution


( run in 0.455 second using v1.01-cache-2.11-cpan-a5abf4f5562 )