rnings;
use utf8;
use Carp qw(croak);
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use JSON::XS;
use File::Basename;
use constant APIVERSION => 1;
use constant BASEURL => 'https://api-audi
uthorization => 'OAuth ' . $self->{token});
$ua->default_header('Content-Type' => 'application/json');
$self->{ua} = $ua;
bless $self, $class;
return $self;
}
=head2 getListOfSegments()
Re
ntent;
my $json;
eval {
$json = JSON::XS->new->utf8->decode( $response->content );
};
return undef if $@;
if (exists $json->{segments}) {
for my $Segment (@{$json->{segments}}) {
;
use warnings;
use utf8;
use Carp;
use Getopt::Long qw(GetOptionsFromArray);
use DBI;
use JSON::Parse 'json_file_to_perl';
use Data::Dumper;
use SqlBatch::AbstractConfiguration;
sub new {
my ($
croak "Configuration file '$path' not found"
unless -e $path;
}
$self->{loaded} = json_file_to_perl($path);
}
sub requirement_assertion {
my $self = shift;
my $id = shift;
Serge/Util/CLDRPlurals.pm';
print "Loading $INFILE\n";
open IN, $INFILE;
binmode IN, 'utf8';
my $json = join('', <IN>);
close IN;
my $tree = XML::Twig->new()->parsefile($INFILE);
my $revision = ($t
e provider for GitLab snippets
our $VERSION = '1.013';
use parent 'App::Nopaste::Service';
use JSON::MaybeXS;
use LWP::UserAgent;
use Path::Tiny;
use namespace::clean 0.19;
my $config;
sub config
}
? path($arg{filename})->basename
: 'nopaste';
my $json = encode_json({
title => $desc,
file_name => $filename,
visibility => $
'PRIVATE-TOKEN' => $self->config->{token},
Content => $json,
Content_Type => 'application/json',
);
return $self->return($res);
}
sub return {
my ($self, $
ithub.com/
our $VERSION = '1.013';
use parent 'App::Nopaste::Service';
use LWP::UserAgent;
use JSON::MaybeXS;
use Module::Runtime 'use_module';
use Path::Tiny;
use namespace::clean 0.19;
sub avail
$ua = LWP::UserAgent->new;
my $content = {
public => defined $arg{private} ? JSON->false : JSON->true,
defined $arg{desc} ? (description => $arg{desc}) : (),
};
my $file
$filename => {
content => $arg{text}
}
};
$content = encode_json($content);
my %auth = $self->_get_auth;
my $url = 'https://api.github.com/gists';
ERSION = '0.1.9';
use strict;
use warnings;
use 5.010;
use parent qw(Device::Firewall::PaloAlto::JSON);
use Device::Firewall::PaloAlto::Op::IPUserMap;
use Device::Firewall::PaloAlto::Errors qw(ERROR
eat::Render> in conjunction with L<Config::Neat> for
arbitrary data serialization/desrialization. JSON and YAML will work better
for this kind of task.
Why? Because Config::Neat was primarily designe
warnings;
use 5.010;
use DateTime::Format::Strptime;
use parent qw(Device::Firewall::PaloAlto::JSON);
# VERSION
# PODNAME
# ABSTRACT: Palo Alto IPSEC tunnel
sub _new {
my $class = shift;
# ABSTRACT: Representation of a Palo Alto FIB object.
use parent qw(Device::Firewall::PaloAlto::JSON);
sub _new {
my $class = shift;
my ($api_response) = @_;
my %obj;
# Return the
ERSION = '0.1.9';
use strict;
use warnings;
use 5.010;
use parent qw(Device::Firewall::PaloAlto::JSON);
use overload 'bool' => 'bool_overload';
# VERSION
# PODNAME
# ABSTRACT: A Palo Alto rulebase
ERSION = '0.1.9';
use strict;
use warnings;
use 5.010;
use parent qw(Device::Firewall::PaloAlto::JSON);
use overload 'bool' => 'bool_overload';
# VERSION
# PODNAME
# ABSTRACT: A Palo Alto NAT polic
erger - Merge the extra (HTML) reports into the master one (JSON).
=head1 SYNOPSYS
Merge the extra (HTML) reports into the master one (JSON).
These are methods that match the data in the extra repo
use File::Copy;
use File::Basename;
use Time::HiRes qw(time usleep);
use POSIX qw(strftime);
use JSON;
use LWP::Simple;
use HTML::TableExtract;
use Sport::Analytics::NHL::Vars qw(:scrape);
use Sport
n to crawl
Returns: hash reference of seasonal schedules where seasons are the keys, and decoded JSONs are the values.
=item C<get_game_url_args>
Sets the arguments to populate the game URL for a g
he JSON is retrieved. Unfortunately, the JSON does not contain the draft information, so another call to the HTML page is made to complete the information. The merged information is stored in a json f
1.77';
use Moo;
use Catmandu;
use HTTP::Request::Common;
use HTTP::Request::StreamingUpload;
use JSON;
use LWP::UserAgent;
use URI::URL;
use XML::LibXML;
use namespace::clean;
with 'Datahub::Factory
sub index {
my $self = shift;
my ($request_handler, $response, $request);
# Index the JSON data
$request_handler = url $self->{request_handler};
$request_handler->equery('commit=t
ation/json',
'Content-Length' => -s $self->{file_name},
),
);
$response = $self->out->request($request);
if ($response->is_success) {
return decode_json($resp
r_Solr]
request_handler = http://path_to_solr_data_import_handler
file_name = /tmp/upload.json
All plugins have their own configuration options in sections called C<[plugin_type_name]> where
Common constructor wrapper. Assigns the report plugin, and initializes the report object. For a json report usually an overloaded constructor is required. For an HTML report, the generic html_new (q
ts in the object.
=back
=cut
use Data::Dumper;
our %REPORT_TYPES = (
BS => 'json',
PB => 'json',
Player => 'json',
PL => 'html',
RO => 'html',
GS => 'html',
BH => 'html',
ES => 'html',
TV
nknown report type $args->{type}\n";
return undef;
}
$self = $REPORT_TYPES{$args->{type}} eq 'json'
? $plugin->new($args->{data})
: $plugin->html_new($args);
$self->{type} = $args->{type};
$
if grep {-r File::Spec->catfile($path, $_)}
grep /^datahubfactory.+(?:yaml|yml|json|pl)$/, readdir $dh;
}
Datahub::Factory->default_load_path;
}
has load_paths => (
is
$_;
map {File::Spec->catfile($dir, "datahubfactory*.$_")}
qw(yaml yml json pl)
} reverse @config_dirs;
my $config = Config::Onion->new(prefix_key => '_pref
se Storable qw(store retrieve dclone);
use POSIX qw(strftime);
use List::MoreUtils qw(uniq);
use JSON -convert_blessed_universally;
use Sport::Analytics::NHL::Vars qw(:all);
use Sport::Analytics::NH
* force - override the already present files and data
=item C<compile_file>
Compiles a single JSON or HTML report into a parsed hashref and stores it in a Storable file
Arguments:
* The options h
from the boxscore data structure. Saves the normalized boxscore both as a Perl storable and as a JSON. This is the highest level of integration that this package provides without a database (Mongo) i
ED_FILE => 'merged.storable',
NORMALIZED_FILE => 'normalized.storable',
NORMALIZED_JSON => 'normalized.json',
SUMMARIZED_FILE => 'SUMMARIZED',
DEFAULT_PLAYERFILE_EXPIRATION => 0.5,
ROTOFILE_EX
dhconveyor transport -g general.ini -i importer.ini -f fixer.ini -e exporter.ini
# Pushing a JSON file to a search index (Solr)
$ dhconveyor index -p solr.ini
# Pretty output
$ dhcon