#!/usr/bin/perl
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
#use MongoDB;
#use Smart::Comments;
#use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
#use Data::Dumper;
#
ect;
use IO::Socket::INET;
use lib "./";
use plugin_eng;
use POE qw(Component::Server::TCP);
#use JSON::XS;
use Clone qw(clone);
use Encode;
use Smart::Comments;
use Data::Dumper;
our $rule;
our $fac
#!/usr/bin/perl
#use JSON::XS;
use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "/home/wuyabo/shell/";
#use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;
# http://p
#!/usr/bin/perl
#use JSON::XS;
use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "/home/wuyabo/shell/";
use Conn_mongo_jc;
use Data::Dumper;
use IO::File;
#use Add_info;
# http://po
!/usr/bin/perl
#词词距离计算
#输入为:
#老虎
#鲜花
#月亮
#狮子
use POSIX;
#use JSON::XS;
use Clone qw(clone);
use MongoDB;
use Smart::Comments;
use lib "/home/wyb/shell/";
#use
t;
use warnings FATAL => 'all';
use utf8;
use open qw(:std :utf8);
use Carp;
use HTTP::Tiny;
use JSON::PP;
use MIME::Base64;
sub new {
my ($class, @params) = @_;
croak "You should use new
nsport_security_state_static.json?format=TEXT';
my $base64_content = $self->_get_content_from_url( $url );
my $content = decode_base64 $base64_content;
my $json = $self->_get_data_without_
comments( $content );
my $data = decode_json $json;
return $data;
}
sub _get_data_without_comments {
my ($self, $data) = @_;
my $output;
foreach my $line (split /\n/, $data) {
e;
# ABSTRACT: create new templates from existing spreadsheets
use Class::Load 'load_class';
use JSON;
has parser_class => (
is => 'ro',
isa => 'Str',
default => 'Spreadsheet:
self = shift;
my ($filename) = @_;
my $data = $self->parser->parse($filename);
return JSON->new->pretty->canonical->encode($data);
}
__PACKAGE__->meta->make_immutable;
no Moose;
1;
__EN
my $generator = Spreadsheet::Template::Generator->new;
open my $fh, '>:encoding(utf8)', 'out.json';
$fh->print($generator->generate($filename));
=head1 DESCRIPTION
This module is used to crea
Spreadsheet::Template::Helpers::Xslate::VERSION = '0.05';
use strict;
use warnings;
use JSON;
my $JSON = JSON->new;
use Sub::Exporter 'build_exporter';
my $import = build_exporter({
exports =>
$contents, $format, $type, %args) = @_;
$type = 'string' unless defined $type;
return $JSON->encode({
contents => "$contents",
format => _formats($package, $format),
$contents, $format, $type, %args) = @_;
$type = 'string' unless defined $type;
return $JSON->encode({
range => _parse_range($range),
contents => "$contents",
form
by any classes which consume this
role. It should take the contents of the template and return a JSON file as
described in L<Spreadsheet::Template>. This typically just means running it
through a tem
vent::Twitter;
use AnyEvent::Twitter::Stream;
use HTML::Entities;
use Regexp::Common qw/URI/;
use JSON::MaybeXS;
with 'MooseX::Log::Log4perl';
=head1 NAME
POE::Component::Server::Twirc - Twitter/IR
twitter_rest_api_request => 'request',
},
);
sub to_json { JSON::MaybeXS->new->encode($_[1]) }
sub to_pretty_json { JSON::MaybeXS->new->pretty>encode($_[1]) }
# force build of users by
keepalive");
},
on_friends => sub {
TRACE("on_friends: ", $self->to_json(@_));
$self->yield(friends_ids => shift);
},
on_event => sub {
;
use Moose;
# ABSTRACT: generate spreadsheets from a template
use Class::Load 'load_class';
use JSON;
has processor_class => (
is => 'ro',
isa => 'Str',
default => 'Spreadshe
return $class->new($self->processor_options);
},
);
has json => (
is => 'ro',
default => sub {
return JSON->new;
}
);
sub _writer {
my $self = shift;
my $class
late, $vars);
# not decode_json, since we expect that we are already being handed a
# character string (decode_json also decodes utf8)
my $data = $self->json->decode($contents);
return
atalyst::Plugin::Authentication::Credential::GooglePlus;
use Crypt::OpenSSL::X509;
use JSON::WebToken;
use JSON::MaybeXS;
use MIME::Base64;
use LWP::Simple qw(get);
use Date::Parse qw(str2time);
use
he
cert using L<Crypt::OpenSSL::X509>. Finally, uses the pubkey to decrypt a
Google token using L<JSON::WebToken>.
See https://github.com/errietta/Catalyst-Plugin-Authentication-Credential-GooglePlus
ld} ||= "id_token";
bless $self, $class;
}
=head1 METHODS
=head2 authenticate
Retrieves a JSON web token from either $authinfo, or GET or POST query
parameters. If null, throws exception.
Oth
right cell, or by an
Excel-style range (like C<A1:C3>).
=item true
Returns C<JSON::true>.
=item false
Returns C<JSON::false>.
=back
=head1 ATTRIBUTES
=head2 syntax
Which Xslate syntax engine
head1 CONFIGURATION
C<Twirc> uses L<Config::Any>, so you can configure C<twirc> using XML, YAML,
JSON, Apache-style configuration, Windows INI file format, or even Perl code.
A configuration file is
t;
my $method = shift || 'TO_JSON';
my $config = shift;
if (ref $method && ref $method ne 'CODE') {
$config = $method;
$method = 'TO_JSON';
}
return ext_parcel(
use JSON::MaybeXS;
use Web::Util::ExtPaging;
sub dispatch_request {
my $people_rs = get_rs();
sub (/people) {
[
200,
[ 'Content-type', 'application/json' ],
[ encode_json(ext_paginate($rs->search(undef, { rows => 25 }))) ],
]
},
sub (/people_lite) {
[
200,
[ 'Content-type', 'application/json' ],
[
:Server::Twirc::State::VERSION = '0.20';
use Moose;
use MooseX::Storage;
with Storage(format => 'JSON', io => 'File');
has access_token => isa => 'Str', is => 'rw';
has access_token_secret
:Random::Secure qw(random_bytes);
use MIME::Base64;
use Digest::SHA qw(sha256_base64 sha256);
use JSON;
use utf8;
use Encode;
use strict;
use Exporter;
use vars qw($VERSION);
use vars qw($VERSION @I
sh {
my ($json) = @_;
my $h;
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
# convert to utf-8
$js->utf8;
eval {
# eval required for no exception if bad json
$h = $j
@_;
my $s = '';
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
$js->pretty(1) if ($pretty);
eval {
# eval required for no exception if bad json
$s = $js->encode($h);
package WebService::Cryptsy;
use Moo;
our $VERSION = '1.008007'; # VERSION
use URI;
use JSON::MaybeXS;
use LWP::UserAgent;
use Digest::SHA qw/hmac_sha512_hex/;
use HTTP::Request::Common qw/POST/;
lf, $json, $method ) = @_;
unless ( $json ) {
$self->error('Network error: got no data');
return
}
$self->error( undef );
my $decoded = eval { decode_json( $json );
};
if ( $@ ) {
$self->error('JSON parsing error: ' . $@);
return;
}
unless ( $decoded and $decoded->{success} ) {
$self->error( $decoded && $decoded->{error}
TTP::Request;
use LWP::UserAgent;
use Data::Dumper;
use MIME::Base64;
use Text::ASCIITable;
use JSON;
sub new {
my $class = shift;
my $self = bless {
lwhome => "$ENV{HOME}/.lw",
apiconfig
uidWeb API Secret: ";
chomp($self->{configure}{secret} = <STDIN>);
print "Default output type [json,perl,table]: ";
chomp($self->{configure}{output} = <STDIN>);
print "Save auth credentials lo
fetchDocs;
if (($self->{configure}{save} =~ m/y/i) ? 1 : 0) {
$self->{configure}{output} ||= 'json';
open my $session, '>', $self->{apiconfig} or die $!;
print $session "username=$self->{conf
SCRIPTION
This class implements L<Spreadsheet::Template::Processor>, and just passes
through the JSON data without modification.
=for Pod::Coverage process
=head1 AUTHOR
Jesse Luehrs <doy@tozt.n