{% extends "header.html" %} {% block body %}
import datetime import pandas as pd import matplotlib.pyplot as plt from matplotlib import style import numpy as np import time style.use('ggplot') def results(): df = pd.read_csv('performance_data_sp500ish.csv', index_col='time', parse_dates=True) #sort by date, since it's currently by stock. df.sort_index(inplace=True) # now we want to perform an average.. #df['mean'] = df['pc'].mean() df['x_mean'] = pd.expanding_mean(df['pc'], 0) #df['ma'] = pd.rolling_mean(df['pc'], 10) return df['x_mean'] x = results() x.plot(label='Wholistic Performance') plt.axhline(0, color='k', linewidth = 4) plt.legend() plt.show()


---
layout: post
title: P4 Developer Day Spring 2017
date: 2017-05-16
header-img: img/p4-background.png
---
A joint presentation by Stanford University and P4 Language Consortium.
Held at Arrillaga Alumni Center, Stanford University on Tuesday, May 16, 2017.
Agenda
8:00 - 9:00
- Registration and Breakfast
9:00 - 9:10
- Welcome and Introductions
- Professor Nick McKeown (Stanford) and Professor Nate Foster (Cornell)
9:10 - 10:40
- P4_16 Tutorial (Part 1)
- The full set of slides for P4_16 tutorial are available here.
10:40 - 11:00
11:00 - 12:30
12:30 - 1:30
1:30 - 4:00
- Hands-on Lab (Parallel Track - McCaw Hall)
- P4_16 BMv2
- Please follow the following instructions to get setup for the BMv2 Lab:
- Download and install the latest version of Virtual Box, version 5.1.22, for your platform here.
- Download the P4 D2 2017 virtual appliance (.ova) file here. This is a large(~3GB) file and can take a while to download depending on your download speed.
- Double click the virtual appliance (.ova) file downloaded in step 1 or Import it using instructions here.
- The minimum system requirements are 8GB (16GB preferred) and ~32GB free space on hard-drive.
- Here are login credentials for the VM - username/password p4/p4
- The presentation used for giving instructions for getting setup and an overview of the exercises is available here.
1:30 - 4:00
- Hands-on Lab (Parallel Track - Fisher Room)
- P4_16 NetFPGA
- by NetFPGA
- Slides used in this session are available here.
4:00 - 4:20
4:20 - 5:20
- Talk (Parallel Track - McCaw Hall)
- P4 mapping to Barefoot Tofino
- by Barefoot Networks
- Slides used in this session are available here.
4:20 - 5:20
- Talk (Parallel Track - Fisher Room)
- P4 mapping to Netronome SmartNIC
- by Netronome
- Slides used in this session are available here.
5:20 - 5:30
5:30 - 6:30
Sponsors:
AT&T Barefoot Networks Cisco Google


Some quick example text to build on the card title and make up the bulk of the card's content.
ChooseSome quick example text to build on the card title and make up the bulk of the card's content.
ChooseSome quick example text to build on the card title and make up the bulk of the card's content.
ChooseSome quick example text to build on the card title and make up the bulk of the card's content.
ChooseSome quick example text to build on the card title and make up the bulk of the card's content.
ChooseSome quick example text to build on the card title and make up the bulk of the card's content.
ChooseWe are a group of open souce enthusiast, who are working on
making world class resumes accesible to everyone for free. Just Resume is a
product of
all those efforts of everyone who helped us directly or indirectly.
Read More..


Online Course
Publications
Expert Lectures
- Data Science at SAMVAAD (National Level Symposium) (2018)
- Robotics and IoT in Future Cities at CEPT (2018)
- Robotics in Future Cities at CEPT (2017)
- Understanding of IOT at CEPT (2017)
- Introduction of R at PDPU (2016)
- Future Technologies and Cities at CEPT (2016)
- Future of Robotics at Indus Institute of Technology (2016)
Workshops Delivered
- IOT in Ingenium at Ahmedabad University (2017 & 2018)
- Robotics in Ingenium at Ahmedabad University (2018)
- IOT in Praveg at Nirma University (2017)
- Sensor integration with Mirco-controller at SOCET (2016)
- Basic Robot making at SOCET (2015)
Achievements
- 3rd ACM Women Hackathon Mentor (Team won 1st prize at national level) (2018)
- Technology mentor and Judge at IoT Auction (2018)
- Technology mentor at GirlScript India Summit (2017)
- Finalist in CII Smart Villages and Smart Cities Competition (2016)
- Best Thesis Award (2012)
- Rice Thresher (2013)
- Finalist in Lion's Den Competition(2013)
- Man of the match and series in various tournaments of cricket (various years).
Workshops/Trainings Attended
Extra Curricular Activities
- Developed Website of District Heating Cooling 2020 Conference.
- C/ C++ course, developed new programs for the college manual.
- Hosted and participated in various cultural festivals at college.
- Hosted a paper presentation and project presentation event at the national level Techfest, Convergence in 2008 and 2009.
- Member of the cricket team that plays in the Indian Bank Cup matches.
- Played cricket and basketball for college and university teams.
Professional Memberships
- Member of the Institute of Electrical and Electronics Engineers(IEEE) since February 2007
- Member of the Indian society for Technical Education (ISTE) since August 2006.
- Member of the Rotaract Club of Ahmedabad Majesty.


Veteran actor charged with striking man with metal scraper at Singapore Islamic Hub
by Lydia LamSINGAPORE: Veteran actor Ng Aik Leong, better known as Huang Yiliang, was charged on Friday (Nov 29) over attacking a man with a metal scraper and hitting another man with his phone.
Ng, 58, was unrepresented and listened to his charges with a grim face.
He is accused of voluntarily causing hurt with a weapon of offence, by hitting a man named Jahidul on his abdomen and head with a metal scraper at the canteen of the Singapore Islamic Hub.
This allegedly occurred at about 4.30pm on Dec 11, 2018.
Mr Jahidul was left with a 2cm-long blood clot over his scalp, a 10cm mark over his abdomen and an abrasion, the charge sheets stated.
Ng is also accused of disturbing the public peace at about 7.50pm on Jun 9 this year at 662 Buffalo Road, by fighting with a Mogana Raj Saravanan.

Speaking through a Mandarin interpreter, Ng asked for an adjournment to engage counsel, and the judge granted one to Dec 20.
If found guilty of voluntarily causing hurt by dangerous weapon, Ng could be jailed for up to seven years, fined, or both. He cannot be caned as he is over 50.
If convicted of affray, he could be jailed for up to a year, fined a maximum S$5,000, or both.
Ng was an actor with Mediacorp from the 1980s, known for his roles in Channel 8 television serials including Holland V and Double Happiness.
He has left the local industry for more than a decade, but was credited in shows produced in China as recently as 2014.
He was previously married to fellow artiste Lin Meijiao, but the pair divorced in the late 1990s.


The {{data.formula}} is syntactically incorrect, therefore no graph can be displayed. The following error was reported:
{{data.errorMessage}}


RequestHandler¶
-
class
WordsOverTime.words.requesthandler.
AverageArousalFiveWordsOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles an average arousal of the top 5 tfidf words request
-
class
WordsOverTime.words.requesthandler.
AverageArousalOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles an average arousal request
-
class
WordsOverTime.words.requesthandler.
AverageValenceFiveWordsOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles an average valence of the top 5 tfidf words request
-
class
WordsOverTime.words.requesthandler.
AverageValenceOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles an average valence request
-
class
WordsOverTime.words.requesthandler.
CosDistanceOverTimeRequest
(dateRange, granularity, pairList, cbow, hashStr)¶ Handles a cos distance request
-
class
WordsOverTime.words.requesthandler.
NClosestNeighboursOverTimeRequest
(dateRange, granularity, wordList, n, cbow, hashStr)¶ Handles an N closest neighbours request
-
class
WordsOverTime.words.requesthandler.
PairwiseProbabilitiesOverTimeRequest
(dateRange, granularity, pairList, hashStr)¶ Handles a pairwise probabilities request
-
class
WordsOverTime.words.requesthandler.
RelativeWordFrequencyOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles a relative word frequency request
-
class
WordsOverTime.words.requesthandler.
Request
¶ Base class for clients to request an analysis.
-
execute
()¶ Carries out the analysis, returning a Result
-
-
class
WordsOverTime.words.requesthandler.
RequestsExecuteThread
(requests, email)¶ Subclasses threading.Thread to execute a list of Requests
-
class
WordsOverTime.words.requesthandler.
Result
(xTitle, yTitle, xValues, yValues, errors=None)¶ Return object of all Requests Stores the result of an analysis as two parallel lists of xValues and yValues that can be plotted
-
generateCSV
(hashStr)¶ Creates a CSV file containg the result data. The file’s name should be the hash that uniquely identifies the request that generated the data
-
-
class
WordsOverTime.words.requesthandler.
TfidfOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles an average tfidf request
-
class
WordsOverTime.words.requesthandler.
WordFrequencyOverTimeRequest
(dateRange, granularity, wordList, hashStr)¶ Handles a word frequency request
-
WordsOverTime.words.requesthandler.
sortXAndY
(xValues, yValues)¶ Helper function that sorts parallel lists based on the first list
-
WordsOverTime.words.requesthandler.
zipMatrices
(matricesPath, hashStr)¶ Zips the matrices in the directory corresponding to the hash


Of course, Star Wars is now in Fortnite
Stormtrooper skin free when you buy Jedi: Fallen Order via Epic.
News by Tom Phillips, News Editor Updated on 15 November 2019
At last, I have the perfect avatar for my terrible aim. To celebrate today's launch of Star Wars: Jedi Fallen Order, the franchise's iconic Imperial Stormtrooper is now available as a skin in Fortnite.
The outfit comes free if you buy Star Wars Jedi: Fallen Order from the Epic Games Store before 30th November. Alternatively, it can be purchased in-game for 1500 Vbucks.
If you somehow buy the skin before purchasing Jedi: Fallen Order, you'll get the Vbucks instead. (And yes, if you refund the game, the skin goes too.)
And in the skies above Fortnite's island, if you look closely, a Star Destroyer can be seen parked in orbit overhead.
This is Fortnite's first collaboration with Star Wars (although not with Disney, for which it has partnered before for Wreck-It Ralph and a couple of Avengers tie-ins). It would not be a huge surprise if more Star Wars skins came to Fortnite alongside Rise of Skywalker next month...
As for Fallen Order itself, Emma searched her feelings for Eurogamer's Star Wars Jedi: Fallen Order review and found Respawn's new game to be a bit of a mixed bag, with solid combat mired in shallow storytelling.


Welcome!
Please select your nickname and a room that you would like to join
Please select your nickname and a room that you would like to join
Nickname:
Room:


|
Perl Weekly
Issue #164 - 2014-09-15 - Padre is now on GitHub
latest | archive | by Gabor Szabo
|
|
Hi,
I am impressed that the relatively small 'Swiss Perl Workshop' is still getting reports. I wish people attending other Perl events were that enthusiastic as well. Was this the weather? (which apparently is the 'topic of the week'), or have they just received too much chocolate?
Anyway, enjoy your week! ~szabgab
|
|
|
Announcements
|
Padre is now on Github
After a long long waiting period, finally Kaare Rasmussen stepped up and JFDI-ed. Using some earlier preparations by Kevin Dawson he converted the Padre repository that had about 100 separate projects in it, into 100 GitHub repositories. There is still a lot to do around the move, but we have already seen some activities around the repositories. It is a great opportunity to revive this project that has been almost dormant for 2 years.
|
|
Articles
|
Parsing: a timeline
Jeffrey Kegler writes about the history of parsing things and how it got to Marpa.
|
|
|
|
Leveraging the Forecast.io API
Apparently Dave Jacoby is also interested what's the weather like, but he used a different source for his information. He directly talks to the web API using LWP::UserAgent and JSON.
|
|
|
|
Discussion
|
What Do You Want Your YAPC To Be?
Daisuke Maki (Lestrrat) who organized YAPC::Asia in the past 6 years (or so) gives his thoughts on what was the goal of YAPC::Asia and how it can attract 1,300 attendees? see also reddit.
|
|
Testing
|
|
|
CPAN
|
Some new MetaCPAN features
Get the documentation in EPUB or MOBI format; Show more than 20 results at a time. If you are a CPAN author, have an overview of your modules in dashboard.
|
|
Fun
|
|
|
Grants
|
|
|
|
|
|
|
|
|
September 2014 Grant Proposals
TPF has received 5 grant proposal and is now waiting for your input. You can ask questions or just let them know what do you think.
|
|
Core Perl
|
The Perl Roadmap
An opinion on the discussion form last week by Augie De Blieck Jr.
|
|
Videos
|
Growing Perl Developers
In this talk Nicholas Perez describes how they hire senior level programmers without any Perl background and turn them into Perl programmers. (25 min talk, 25 min QA)
|
|
DTrace War Stories
Shawn Moore described how he used DTrace as a last resort finding the source of some really strange issues. (20 min talk)
|
|
Weekly collections
|
|
|
|
|
Perl Maven Tutorials
|
|
|
|
|
Event reports
|
2014 Swiss Perl Workshop redux
brian d foy writes about his experience, and the human aspect that needs to go into any project if we want it to be successful.
|
|
|
|
Events
|
PPW 2014 Call for Talks
The Perl Foundation put out a call for talks for the Pittsburgh Perl Workshop to be held between 7-9 November, 2014. Talk submission dead-line: September 26th. - I am glad TPF takes a bit more active role in the promotion of some of the Perl events, though I am not sure what made PPW special about it? I don't recall announcements of any other Perl Workshop. Not even YAPC::NA.
|
|
|
|
Perl-related events
In the following cities: Hancock (NY/USA), Itapema (SC/Brasil), Salzburg (Austria), Barcelona (Spain), London (UK)
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|


import ballerina.task;
import ballerina.math;int count;function main (string[] args) {
println("Timer task demo");
function () returns (error) onTriggerFunction = cleanup;
function (error e) onErrorFunction = cleanupError;
var taskId, schedulerError = task:scheduleTimer(onTriggerFunction,
onErrorFunction, {delay:500, interval:1000});
if (schedulerError != null) {
println("Timer scheduling failed: " + schedulerError.msg) ;
} else {
println("Task ID:" + taskId);
}
}function cleanup() returns (error e) {
count = count + 1;
println("Cleaning up...");
println(count);
if(math:randomInRange(0,10) == 5) {
e = {msg:"Cleanup error"};
}
return;
}function cleanupError(error e) {
print("[ERROR] cleanup failed");
println(e);
}
|
Timers are used to execute tasks periodically. A timer may have an initial delay & interval specified. The delay specifies the delay between registering the task and its first execution. Thereafter, the timer will go off at regular intervals. A trigger function is called when the timer goes off. If a failure occurs during the execution of the trigger function, it will return an error. That error will be passed to the onError function. |
import ballerina.task;
import ballerina.math;
|
int count;
|
|
function main (string[] args) {
println("Timer task demo");
|
|
|
the cleanup function will be called every time the timer goes off. |
function () returns (error) onTriggerFunction = cleanup;
|
|
the cleanup error function will be called if an error occurs while cleaning up. |
function (error e) onErrorFunction = cleanupError;
|
|
Schedule a timer task which initially runs 500ms from now and there onwards runs every 1000ms. |
var taskId, schedulerError = task:scheduleTimer(onTriggerFunction,
onErrorFunction, {delay:500, interval:1000});
if (schedulerError != null) {
println("Timer scheduling failed: " + schedulerError.msg) ;
} else {
println("Task ID:" + taskId);
}
}
|
function cleanup() returns (error e) {
count = count + 1;
println("Cleaning up...");
println(count);
|
|
|
We randomly return an error to demonstrate how the error is propagated to the onError function when an error occurs in the onTrigger function. |
if(math:randomInRange(0,10) == 5) {
e = {msg:"Cleanup error"};
}
return;
}
|
function cleanupError(error e) {
print("[ERROR] cleanup failed");
println(e);
}
|
$ ballerina run task-timer.bal
Timer task demo
Task ID:ff6c2d4f-d9c2-46f4-a176-306d31fd2830
Cleaning up...
1
Cleaning up...
2
Cleaning up...
3
Cleaning up...
4
...
...
|
Next example: Task Appointment.


Aam Aadmi Party – Social Media and IT Cell
Departments under Social Media and IT Cell:
- Graphic Designing
- Content Writing
- Videography /Photography
- Caricature Designing.
- Social Media Marketing
- IT- Web Development.
- a.)App Development
- b.)Software Development
About the Social Media and IT Cell:
In this era of technology- blogs, digital archives, e-readers, and social media sites like Facebook, Twitter, and Instagram have revolutionized the concept of political discourse by changing how we share and transmit ideas and information. We, at the Aam Aadmi Party believe that digital media or social media can be used effectively to galvanize the energy around particular political issues.Platforms like Twitter and Facebook, give political organisations the ability to broadcast information on a worldwide stream, join any ongoing debates and discussions and have a two-way interaction with the public during political processes and campaigns. Social media is the only way to connect and reach out to the youth, involve them in the decision making process thereby helping them make informed choices and help strengthen the roots of democracy.
The IT Cell at Aam Aadmi Party continuously works towards increasing the visibility and expanding its reach with the help of online tools that are automation based. Knowing that traditional means like door-to door campaigning and rallies have limited reach towards millennials, we make sure that the right messaging, which includes area specific content, graphic and videos made exclusively for targeted audiences, are sent out through such platforms. We encourage usage of technology in the public policies domain and social media marketing.
About the Social Media and IT Cell:
Graphic Designing-
It is the art and practice of planning and projecting ideas and experiences with visual and textual content. It helps create content that can shape and influence one’s understanding of modern protest, activism, politics and power too. It involves a creative and systematic plan to achieve certain objectives, with the use of images, symbols or even words. It is visual communication and the aesthetic expression of concepts and ideas using various graphic elements and tools.
Content Writing–
The Department aims at producing engaging content for both online and offline audiences. It includes generating tightly focussed content for blogs, articles, tweets, videos, social media posts, etc. that are written with great clarity and are full of persuasive power.
Graphic Designing-
It is the art and practice of planning and projecting ideas and experiences with visual and textual content. It helps create content that can shape and influence one’s understanding of modern protest, activism, politics and power too. It involves a creative and systematic plan to achieve certain objectives, with the use of images, symbols or even words. It is visual communication and the aesthetic expression of concepts and ideas using various graphic elements and tools.
Videography/Photography –
Teams that work on producing video films for various social media platforms keeping in mind the target audiences and generating simple, yet hard hitting content that engages with the audiences.
Caricature -
Caricatures are laced with subtle messages and satire, and wield significant power with their pen. They transmit messages without the need for the written word and are consumed by people across all the sections of society.
Social Media Marketing –
It refers to the process of gaining traffic or attention through social media sites and pushing one’s content and agenda. Establishing a communication network that helps syndicate content and increase online visibility, all while engaging with a broad audience of consumers.
IT-
Creating Websites and developing apps and software and to execute digital transformation at scale, properly equipped with the right skills and expertise and a shared purpose that drives the work.
Curriculum
The Week wise curriculum will be as follows
Week 1
- Social Media And IT Cell Induction
- Developing political understanding
- Working on different social media platforms
- Usage and generation of content for social media and IT
- Brief about the roles and responsibilities of different departments.
Week 2
- Training Week
- Graphic and Caricature design team –Learn to use Adobe Photoshop, CorelDraw, Adobe Indesign, Adobe Illustrator, etc., editing software.
- Content Writing team –Writing exercises to develop critical thinking skills and enhance political understanding. Working on vocabulary and writing structures and different writing formats.
- Videography/Photography team- Gadget handling, manual mode, field work, understanding the subject and a number of videography techniques, etc.
- IT team – Skill development, learning different programming and scripting languages, brief about CMS and learning about the purpose of IT tools development.
Week 3
- Working on News Reading and real time work.
- IT Prototype generationtions.
- Guest Sessions
- Field work for Videography and Photography team
- News Tracking
- Projects and Documentaries
- Learning about real-time, long-term and campaigning methods
Week 4
- Field tours
- Guest sessions
- Learning about the strategies of campaigning
- A Day with a Political Leader
- Working for Social Media Platforms and learning social media analytics and scheduling techniques.


Which test(s) do you want to include?
Primary test:
Triage test:
Follow up:
Select the test:
Select the age range to apply the test:
Select the frequency of the test:
Time (in months) from negative triage test to follow up:


You can supply your own custom validation functions at the field level and the form level. Validation functions are called whenever a field changes value, even as the user is typing. For this reason, they should execute quickly without accessing server resources. See the topic on Asynchronous Validation for techniques you can use to validate against server resources or validation that might not be immediate or resource friendly.
Validation callbacks are specified with the onValidate
property to the <DuxForm>
and
<DuxInput>
components. If the field or form is not valid, and error message string is returned.
If valid, undefined
is returned.
Validating the field as the user types can be a little aggressive. Especially if the user is being provided feedback as they type. It can be frustrating for users to be told their email address is invalid after typing just one letter. See the section on Delayed Validation for more information and an example.
const validateAge = (value, fieldName, formName) => { if (value < 0 || value > 120) { return "Age out of range"; } }; <DuxInput onValidate={validateAge}/>
const validateForm = (values, formName) => { if (values.country === "USA" && values.phone.length !== 10) { return "Phone numbers in the United States must be 10 digits long"; } }; <DuxForm onValidate={validateForm}> ... </DuxForm>


Where We Left Off
So what you were caught crying at work. So what
you wrote it down even though you would never
want to remember it. Everything needs salt. Even
us. Even when we don't. You didn't hear this from
me, but I didn't leave my home for two years. I
discovered a new species of dust mite. I trained
them to arrange themselves in whatever shape I
wanted. I guess I wanted letters. I guess I wanted
IT'S FINE. When your shift ends, I'll be here. I'll
be the one with a fish in my hands, telling
everyone I'm the wrong kind of body for this. You
can't miss me.
you wrote it down even though you would never
want to remember it. Everything needs salt. Even
us. Even when we don't. You didn't hear this from
me, but I didn't leave my home for two years. I
discovered a new species of dust mite. I trained
them to arrange themselves in whatever shape I
wanted. I guess I wanted letters. I guess I wanted
IT'S FINE. When your shift ends, I'll be here. I'll
be the one with a fish in my hands, telling
everyone I'm the wrong kind of body for this. You
can't miss me.


Uses of Interface
opennlp.tools.util.eval.EvaluationMonitor
-
Packages that use EvaluationMonitor Package Description opennlp.tools.chunker Package related to finding non-recursive syntactic annotation such as noun phrase chunks.opennlp.tools.cmdline opennlp.tools.cmdline.chunker opennlp.tools.cmdline.doccat opennlp.tools.cmdline.langdetect opennlp.tools.cmdline.lemmatizer Classes giving access to the opennlp.tools.lemmatizer functionalities.opennlp.tools.cmdline.namefind opennlp.tools.cmdline.postag opennlp.tools.cmdline.sentdetect opennlp.tools.cmdline.tokenizer opennlp.tools.doccat Package for classifying a document into a category.opennlp.tools.langdetect opennlp.tools.lemmatizer Package related with the lemmatizer toolopennlp.tools.namefind Package related to finding proper names and numeric amounts.opennlp.tools.parser Package containing common code for performing full syntactic parsing.opennlp.tools.postag Package related to part-of-speech tagging.opennlp.tools.sentdetect Package related to identifying sentece boundries.opennlp.tools.tokenize Contains classes related to finding token or words in a string.opennlp.tools.util.eval -
-
Uses of EvaluationMonitor in opennlp.tools.chunker
Subinterfaces of EvaluationMonitor in opennlp.tools.chunker Modifier and Type Interface Description interface
ChunkerEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.cmdline
Classes in opennlp.tools.cmdline with annotations of type with type parameters of type that implement declared as with annotations of type with type parameters of type with annotations of type with annotations of type with type parameters of type that return that return types with arguments of type with parameters of type with type arguments of type that throw with annotations of type with annotations of type with parameters of type with type arguments of type that throw EvaluationMonitor Modifier and Type Class Description class
opennlp.tools.cmdline.DetailedFMeasureListener<T>
This listener will gather detailed information about the sample under evaluation and will allow detailed FMeasure for each outcome.class
opennlp.tools.cmdline.EvaluationErrorPrinter<T>
Note: Do not use this class, internal use only! -
Uses of EvaluationMonitor in opennlp.tools.cmdline.chunker
Classes in opennlp.tools.cmdline.chunker that implement EvaluationMonitor Modifier and Type Class Description class
ChunkerDetailedFMeasureListener
class
ChunkEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.doccat
Classes in opennlp.tools.cmdline.doccat that implement EvaluationMonitor Modifier and Type Class Description class
DoccatEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
DoccatFineGrainedReportListener
Generates a detailed report for the POS Tagger. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.langdetect
Classes in opennlp.tools.cmdline.langdetect that implement EvaluationMonitor Modifier and Type Class Description class
LanguageDetectorEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
LanguageDetectorFineGrainedReportListener
Generates a detailed report for the POS Tagger. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.lemmatizer
Classes in opennlp.tools.cmdline.lemmatizer that implement EvaluationMonitor Modifier and Type Class Description class
LemmaEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
LemmatizerFineGrainedReportListener
Generates a detailed report for the Lemmatizer. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.namefind
Classes in opennlp.tools.cmdline.namefind that implement EvaluationMonitor Modifier and Type Class Description class
NameEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
TokenNameFinderDetailedFMeasureListener
class
TokenNameFinderFineGrainedReportListener
Generates a detailed report for the NameFinder. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.postag
Classes in opennlp.tools.cmdline.postag that implement EvaluationMonitor Modifier and Type Class Description class
POSEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
POSTaggerFineGrainedReportListener
Generates a detailed report for the POS Tagger. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.sentdetect
Classes in opennlp.tools.cmdline.sentdetect that implement EvaluationMonitor Modifier and Type Class Description class
SentenceEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream. -
Uses of EvaluationMonitor in opennlp.tools.cmdline.tokenizer
Classes in opennlp.tools.cmdline.tokenizer that implement EvaluationMonitor Modifier and Type Class Description class
DetokenEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream.class
TokenEvaluationErrorListener
A default implementation ofEvaluationMonitor
that prints to an output stream. -
Uses of EvaluationMonitor in opennlp.tools.doccat
Subinterfaces of EvaluationMonitor in opennlp.tools.doccat Modifier and Type Interface Description interface
DoccatEvaluationMonitor
EvaluationMonitor
for doccat. -
Uses of EvaluationMonitor in opennlp.tools.langdetect
Subinterfaces of EvaluationMonitor in opennlp.tools.langdetect Modifier and Type Interface Description interface
LanguageDetectorEvaluationMonitor
EvaluationMonitor
for Language Detector. -
Uses of EvaluationMonitor in opennlp.tools.lemmatizer
Subinterfaces of EvaluationMonitor in opennlp.tools.lemmatizer Modifier and Type Interface Description interface
LemmatizerEvaluationMonitor
Interface for the lemmatizer evaluator. -
Uses of EvaluationMonitor in opennlp.tools.namefind
Subinterfaces of EvaluationMonitor in opennlp.tools.namefind Modifier and Type Interface Description interface
TokenNameFinderEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.parser
Subinterfaces of EvaluationMonitor in opennlp.tools.parser Modifier and Type Interface Description interface
ParserEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.postag
Subinterfaces of EvaluationMonitor in opennlp.tools.postag Modifier and Type Interface Description interface
POSTaggerEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.sentdetect
Subinterfaces of EvaluationMonitor in opennlp.tools.sentdetect Modifier and Type Interface Description interface
SentenceDetectorEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.tokenize
Subinterfaces of EvaluationMonitor in opennlp.tools.tokenize Modifier and Type Interface Description interface
TokenizerEvaluationMonitor
-
Uses of EvaluationMonitor in opennlp.tools.util.eval
Constructors in opennlp.tools.util.eval with parameters of type EvaluationMonitor Constructor Description Evaluator(EvaluationMonitor<T>... aListeners)
-


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.deployment.common.event.DeploymentEvent
A deployment event denoting the change in state of a deployment or a deployment agent.
Deployment events are generic in structure and are keyed off of a set of state codes defined as constants in the event. Each time a deployment or deployment agent changes state, a deployment event is fired with relevant information.
DeploymentEvents also provide the ability to interrupt the deployment process. If a DeploymentEventListener receives a deployment event and needs to halt the deployment process, the listener can call interrupt() on the deployment event. Interrupted deployments are treated the same as if an error occurred during the deployment process.
DeploymentEventSender
,
DeploymentEventListener
| Field Summary | |
static int |
BEGIN_ACTIVATE
|
static int |
BEGIN_APPLY
|
static int |
BEGIN_APPLY_COMMITTED
|
static int |
BEGIN_CREATE
|
static int |
BEGIN_INSTALL
|
static int |
BEGIN_LOAD
|
static int |
BEGIN_LOCK
|
static int |
BEGIN_PREPARE
|
static int |
BEGIN_STOP
|
static java.lang.String |
CLASS_VERSION
Class version string |
static int |
DEPLOYMENT_COMPLETE
|
static int |
DEPLOYMENT_DELETED
|
static int |
DONE_ACTIVATE
|
static int |
DONE_APPLY
|
static int |
DONE_CREATE
|
static int |
DONE_INSTALL
|
static int |
DONE_LOAD
|
static int |
DONE_LOCK
|
static int |
DONE_PREPARE
|
static int |
DONE_STOP
|
static int |
ERROR
|
static int |
ERROR_ACTIVATE
|
static int |
ERROR_APPLY
|
static int |
ERROR_APPLY_COMMITTED
|
static int |
ERROR_CREATE
|
static int |
ERROR_INSTALL
|
static int |
ERROR_LOAD
|
static int |
ERROR_LOCK
|
static int |
ERROR_PREPARE
|
static int |
ERROR_STOP
|
static int |
EVENT_INTERRUPT
|
static int |
IDLE
|
| Constructor Summary | |
DeploymentEvent(DeploymentEventSender pSender,
ApplicationLogging pLog)
Constructs an uninitialized event. |
| Method Summary | |
long |
getDeploymentBeginTimestamp()
System milliseconds when the deployment was first started. |
java.lang.String |
getDeploymentCreateInitiator()
A generic identifier denoting who or what created/started the deployment. |
java.lang.String |
getDeploymentDeleteInitiator()
A generic identifier denoting who or what deleted the deployment. |
java.lang.String |
getDeploymentID()
The ID of the current deployment, if there is a current deployment. |
long |
getDeploymentLastBeginTimestamp()
System milliseconds when the deployment was last started. |
long |
getDeploymentLastExecutionTime()
The time in milliseconds the deployment has spent running since it was last started. |
int |
getDeploymentMode()
The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH. |
java.lang.String[] |
getDeploymentProjectIDs()
The project IDs being deployed to the target or agent. |
java.lang.String |
getDeploymentServer()
Name of the deployment server performing the current deployment. |
java.lang.String |
getDeploymentStopInitiator()
A generic identifier denoting who or what stopped/interrupted the deployment. |
int |
getDeploymentStrictFileOps()
|
int |
getDeploymentStrictRepoOps()
|
long |
getDeploymentTotalExecutionTime()
The time in milliseconds the deployment has spent running. |
int |
getDeploymentType()
The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL. |
java.lang.Throwable |
getErrorCausedByException()
The Exception that caused the error state, if an Exception did so. |
java.lang.String |
getErrorMessage()
A textual description of what caused the error status, if the state is an error state. |
java.lang.String |
getErrorMessage(java.util.Locale pLocale)
A textual description of what caused the error status, if the status is an error state. |
java.lang.Object[] |
getErrorMsgResourceArguments()
Resource string arguments used to fill in and create the error message. |
java.lang.String |
getErrorMsgResourceKey()
The resource look-up key for the error message. |
java.lang.String |
getInterruptCaller()
Who is interrupting this event, if it is interrupted. |
java.lang.String |
getInterruptReason()
Why this event is being interrupted, if it is being interrupted. |
int |
getNewState()
The new state that caused this event to fire. |
long |
getNewStateTimestamp()
System milliseconds when the new state was set. |
int |
getOldState()
The old state before this event was fired. |
java.lang.String |
getTarget()
The logical target associated with the event, either a deployment target or an individual target agent. |
boolean |
interrupt(java.lang.String pCaller,
java.lang.String pReason)
Deployment events get sent on every state change during deployment. |
boolean |
isDeploymentRevert()
Returns property deploymentRevert. |
boolean |
isDeploymentRollback()
Whether or not the deployment has been flagged for rollback. |
boolean |
isDeploymentScheduled()
Whether or not this deployment was kicked off automatically from a schedule. |
boolean |
isInterruptable()
Whether or not the new state causing this event can be interrupted. |
boolean |
isInterrupted()
Whether or not this event has been interrupted. |
void |
prepareForFiring()
Prepares the event for firing. |
void |
setDeploymentBeginTimestamp(long pDeploymentBeginTimestamp)
System milliseconds when the deployment was first started. |
void |
setDeploymentCreateInitiator(java.lang.String pDeploymentCreateInitiator)
A generic identifier denoting who or what created/started the deployment. |
void |
setDeploymentDeleteInitiator(java.lang.String pDeploymentDeleteInitiator)
A generic identifier denoting who or what deleted the deployment. |
void |
setDeploymentID(java.lang.String pDeploymentID)
The ID of the current deployment, if there is a current deployment. |
void |
setDeploymentLastBeginTimestamp(long pDeploymentLastBeginTimestamp)
System milliseconds when the deployment was last started. |
void |
setDeploymentLastExecutionTime(long pDeploymentLastExecutionTime)
The time in milliseconds the deployment has spent running since it was last started. |
void |
setDeploymentMode(int pDeploymentMode)
The deployment mode, either Constants.MODE_ONLINE or Constants.MODE_SWITCH. |
void |
setDeploymentProjectIDs(java.lang.String[] pDeploymentProjectIDs)
The project IDs being deployed to the target or agent. |
void |
setDeploymentRevert(boolean pDeploymentRevert)
Sets property deploymentRevert. |
void |
setDeploymentRollback(boolean pDeploymentRollback)
Whether or not the deployment has been flagged for rollback. |
void |
setDeploymentScheduled(boolean pDeploymentScheduled)
Whether or not this deployment was kicked off automatically from a schedule. |
void |
setDeploymentServer(java.lang.String pDeploymentServer)
Name of the deployment server performing the current deployment. |
void |
setDeploymentStopInitiator(java.lang.String pDeploymentStopInitiator)
A generic identifier denoting who or what stopped/interrupted the deployment. |
void |
setDeploymentStrictFileOps(int pDeploymentStrictFileOps)
|
void |
setDeploymentStrictRepoOps(int pDeploymentStrictRepoOps)
|
void |
setDeploymentTotalExecutionTime(long pDeploymentTotalExecutionTime)
The time in milliseconds the deployment has spent running. |
void |
setDeploymentType(int pDeploymentType)
The deployment type, either Constants.TYPE_INCREMENTAL or Constants.TYPE_FULL. |
void |
setErrorCausedByException(java.lang.Throwable pErrorCausedByException)
The Exception that caused the error state, if an Exception did so. |
void |
setErrorMsgResourceArguments(java.lang.Object[] pErrorMsgResourceArguments)
Resource string arguments used to fill in and create the error message. |
void |
setErrorMsgResourceKey(java.lang.String pErrorMsgResourceKey)
The resource look-up key for the error message. |
void |
setInterruptable(boolean pInterruptable)
Whether or not the new state causing this event can be interrupted. |
void |
setInterruptCaller(java.lang.String pInterruptCaller)
Who is interrupting this event, if it is interrupted. |
void |
setInterrupted(boolean pInterrupted)
Whether or not this event has been interrupted. |
void |
setInterruptReason(java.lang.String pInterruptReason)
Why this event is being interrupted, if it is being interrupted. |
void |
setNewState(int pNewState)
The new state that caused this event to fire. |
void |
setNewStateTimestamp(long pNewStateTimestamp)
System milliseconds when the new state was set. |
void |
setOldState(int pOldState)
The old state before this event was fired. |
void |
setTarget(java.lang.String pTarget)
The logical target associated with the event, either a deployment target or an individual target agent. |
static java.lang.String |
stateToString(int pStateCode)
Returns a string form of the state code, useful for listeners who may want to turn the event into a customized, readable format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String CLASS_VERSION
public static final int IDLE
public static final int DEPLOYMENT_COMPLETE
public static final int DEPLOYMENT_DELETED
public static final int EVENT_INTERRUPT
public static final int ERROR
public static final int BEGIN_LOCK
public static final int DONE_LOCK
public static final int ERROR_LOCK
public static final int BEGIN_PREPARE
public static final int DONE_PREPARE
public static final int ERROR_PREPARE
public static final int BEGIN_CREATE
public static final int DONE_CREATE
public static final int ERROR_CREATE
public static final int BEGIN_INSTALL
public static final int DONE_INSTALL
public static final int ERROR_INSTALL
public static final int BEGIN_LOAD
public static final int DONE_LOAD
public static final int ERROR_LOAD
public static final int BEGIN_APPLY
public static final int BEGIN_APPLY_COMMITTED
public static final int DONE_APPLY
public static final int ERROR_APPLY
public static final int ERROR_APPLY_COMMITTED
public static final int BEGIN_ACTIVATE
public static final int DONE_ACTIVATE
public static final int ERROR_ACTIVATE
public static final int BEGIN_STOP
public static final int DONE_STOP
public static final int ERROR_STOP
| Constructor Detail |
public DeploymentEvent(DeploymentEventSender pSender, ApplicationLogging pLog)
| Method Detail |
public void setOldState(int pOldState)
public int getOldState()
public void setNewState(int pNewState)
public int getNewState()
public void setNewStateTimestamp(long pNewStateTimestamp)
public long getNewStateTimestamp()
public java.lang.String getErrorMessage()
public java.lang.String getErrorMessage(java.util.Locale pLocale)
public void setErrorMsgResourceKey(java.lang.String pErrorMsgResourceKey)
All of deployment uses the same ResouceBundle and so no bundle is ever specified here.
public java.lang.String getErrorMsgResourceKey()
All of deployment uses the same ResouceBundle and so no bundle is ever specified here.
public void setErrorMsgResourceArguments(java.lang.Object[] pErrorMsgResourceArguments)
public java.lang.Object[] getErrorMsgResourceArguments()
public void setErrorCausedByException(java.lang.Throwable pErrorCausedByException)
public java.lang.Throwable getErrorCausedByException()
public void setInterruptable(boolean pInterruptable)
public boolean isInterruptable()
public void setInterrupted(boolean pInterrupted)
public boolean isInterrupted()
public void setInterruptCaller(java.lang.String pInterruptCaller)
public java.lang.String getInterruptCaller()
public void setInterruptReason(java.lang.String pInterruptReason)
public java.lang.String getInterruptReason()
public void setTarget(java.lang.String pTarget)
public java.lang.String getTarget()
public void setDeploymentID(java.lang.String pDeploymentID)
public java.lang.String getDeploymentID()
public void setDeploymentBeginTimestamp(long pDeploymentBeginTimestamp)
public long getDeploymentBeginTimestamp()
public void setDeploymentLastBeginTimestamp(long pDeploymentLastBeginTimestamp)
pDeploymentLastBeginTimestamp
- new value to setpublic long getDeploymentLastBeginTimestamp()
public void setDeploymentLastExecutionTime(long pDeploymentLastExecutionTime)
pDeploymentLastExecutionTime
- new value to setpublic long getDeploymentLastExecutionTime()
public void setDeploymentTotalExecutionTime(long pDeploymentTotalExecutionTime)
pDeploymentTotalExecutionTime
- new value to setpublic long getDeploymentTotalExecutionTime()
public void setDeploymentProjectIDs(java.lang.String[] pDeploymentProjectIDs)
public java.lang.String[] getDeploymentProjectIDs()
public void setDeploymentType(int pDeploymentType)
public int getDeploymentType()
public void setDeploymentMode(int pDeploymentMode)
public int getDeploymentMode()
public void setDeploymentRevert(boolean pDeploymentRevert)
public boolean isDeploymentRevert()
public void setDeploymentRollback(boolean pDeploymentRollback)
public boolean isDeploymentRollback()
public void setDeploymentServer(java.lang.String pDeploymentServer)
public java.lang.String getDeploymentServer()
public void setDeploymentScheduled(boolean pDeploymentScheduled)
public boolean isDeploymentScheduled()
public void setDeploymentCreateInitiator(java.lang.String pDeploymentCreateInitiator)
public java.lang.String getDeploymentCreateInitiator()
public void setDeploymentStopInitiator(java.lang.String pDeploymentStopInitiator)
public java.lang.String getDeploymentStopInitiator()
public void setDeploymentDeleteInitiator(java.lang.String pDeploymentDeleteInitiator)
public java.lang.String getDeploymentDeleteInitiator()
public int getDeploymentStrictFileOps()
public void setDeploymentStrictFileOps(int pDeploymentStrictFileOps)
public int getDeploymentStrictRepoOps()
public void setDeploymentStrictRepoOps(int pDeploymentStrictRepoOps)
public void prepareForFiring()
Fired events are shared amongst event listeners and are therefore made immutable so that listeners cannot change the information the events hold.
public boolean interrupt(java.lang.String pCaller, java.lang.String pReason)
However, the deployment cannot be interrupted if either the deployment has advanced past the point of interruption or is entering an uninterruptable state, such as an error state. The property 'isInterruptable' can be checked to see if the current event can interrupt the deployment. Calling interrupt() when isInterruptable() returns false will result in no interrupt and the interrupt() method returning false.
pCaller
- an identifier for who is interrupting the deploymentpReason
- a description of why the deployment is being interrupted
public static java.lang.String stateToString(int pStateCode)
pStateCode
- one of the constant state codes in DeploymentEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


--- layout: test --- {{ content }} {% assign config = site.data[page.config_file] %}
Ties are not allowed, please check only one box
Please check one box before continuing


none
: no hyphen; overflow if needed
An extremely long English word
manual
: hyphen only at ‐ or  (if needed)
An extremely long English word
auto
: hyphen where the algorithm is deciding (if needed)
An extremely long English word


Weather Visuals Through Python
This is a small project that's currently in-progress. One of my hobbies
since I was young is my YouTube Channel I run which documents weather
events, specifically extreme weather events, such as Blizzards, Hurricanes
etc. As I was learning Python, I decided something
I could do with Python is created Data Visualizations for my YouTube
for things such as average snow fall rates over a few years, or the
expected snowfall rate each hour of an upcoming snow storm, etc. Unfortunately
I haven't used it in any video yet, but still have created them.
How it's done
There is a few steps to doing this. Obviously you need some code to do
this which can be viewed on my Github (check out my links section).
Once you have the code, it can be easily be recyclced over and over
for different charts/graphs, the main thing that changes is the data.
My data is generally coming from the
NWS. The data they collect is available to the public, all you
have to do is download it. The data I also may just create myself, such as
expected wind speed. Then I put it into my directory I'm working in,
run my program and vaulla! This is the jist of it. Then I can use it
in a video. Maybe I'll show expected snowfall rates for a storm coming that night
or maybe the increase in wind as the storm rolls on, etc.
The Code!
The code utilizes a few Python libraries so obviously we don't have to
reinvent the wheel. With each different graph or chart, obviously I
change the axises for whatever I'm graphing. For example, the x-axis
will be time, while the Y-axis can be MPH for wind, or tide height.
Then I can save these if I ever want to reuse them.
Then after I download the appropriate data or create it, I simply feed
it's directory to the line that needs it in the code. Then I run and
save the graph/chart.
How I use or plan to use it in my videos!
So whenever a major storm is coming, I make plans to make a video.
You can find the link to my channel in the links section. I'll use
snowstorms as an example since they are my favorite. Before a storm starts,
I generally make a video discussing the forecast. I can use a graph to demonstrate
snowfall rate's over a 12 hour period. I can have the x-axis from 3am
to 3pm with 1 hour intervals, and the y-axis having 0, 1 and 2 inches.
Generally NYC doesn't ever get 3 inch snow fall rates, so I wouldn't pass
2. Then I can just a line graph to give an easily readable visualization
Back to Projects


Sometimes control means giving up control.
So, triggers and stuff eh? This is a pretty good week to be looking at what my triggers are when I am learning new things and how I overcome them..
My triggers usually come from me feeling like I don’t have enough support and feel like I am doing things alone, or that asking for help is a sign of weakness. All of these things add to a feeling of worthlessness “I am not good enough”, “ The fact I can not do this makes me stupid”, “what was I thinking when I thought this was a good idea?”.
Although I have these triggers I am able to over come them by taking a step back, and when I get somewhere or understand something it makes all of the struggle worth while. I am constantly teaching myself new things, so although I know this struggle well, I also really enjoy it. I don’t get angry very much, just anxious about the decisions I have made.
In terms of the Siberian North Railroad exercise, any exercise to stop, think, breathe and reflect is really valuable. I think for me it’s the remembering to breathe that is a big one, and taking that time to focus on breath lets gives my mind space to see the situation more objectively.
This week has been quite tough because I have had some personal stuff go on as well, and it definitely feels like this is ramping up and I don’t feel like I am very well equipped to succeed in this but I know that is just my mind playing tricks on me, and I am dedicated to moving forward.


Toggle navigation
Ma7faztk
News
budgets
(current)
Logout
More
Services
Policies
Contact us
About
Budgets
budget 1
budget 2
budget 3
budget 4
Create new
×
Create a budget
Budget name :
Category :
Clear all
Budget 1
Your stats
Starting balance :
$400
Current :
$6442
- $58
+ $6100
Your spendings
Service
Product
Date puhrcased
Price
-
mouse
19-03-2017
$50
Car Garage
-
18-03-2017
$5
-
Pizza
18-03-2017
$3
Your income
Source
Date
Amount
Salery
18-03-2017
$5000
Web Design
18-03-2017
$100
Appartment rent
18-03-2017
$1000
Options
Add income
Add income
×
Income source :
Amount :
Phurcase
Buy an item
×
Service or product :
value :
Remove budget
Remove budget
×
Are you sure?


pyCoda¶
Submodules¶
pyCoda.cross_correlation module¶
pyCoda.data module¶
Implements the global import of all data
Created on Mon Dec 26 20:51:08 2016 @author: rwilson
-
class
pyCoda.data.
utilities
[source]¶ Bases:
object
Collection of functions intended for data related processes.
-
DB_group_names
(Database, group_name=None)[source]¶ Read in group names found within group. If group is not provided the upper folder structure will be read from.
Parameters: Database : str
Relative location of database
group_name : str
The expected attribute name/s
Returns: group_names : list
Group names found within the group
Notes
Add some additional error checks
-
DB_attrs_save
(Database, dictionary)[source]¶ Save attribute to database head.
Parameters: Database : str
Relative location of database
dictionary : dict
Dictionary of attributes
Notes
Add some additional error checks
-
DB_attrs_load
(Database, attrs_names)[source]¶ Read attribute from database head.
Parameters: Database : str
Relative location of database
attrs_names : list(str)
The expected attribute name/s
Returns: dict_attri : dict
The returned dictionary of attribute/s from the database
Notes
Add some additional error checks
-
DB_pd_data_load
(Database, group, cols=None, whereList=None)[source]¶ Loads in a pandas dataframe stored in group from the Database.
Parameters: Database : str
Relative location of database
group : str
The expected group name
cols : list(str) / list(int)
If not None, will limit the return columns, only applicable for
table
format database. Forfixed
format database only int acceptedwhereList : list of Term (or convertable) objects or slice(from, to)
The conditional import of data, example [‘index>11’, ‘index<20’], only applicable for
table
format database. Forfixed
format database only a slice object is applicable and will use the row index numbers not the index values (i.e. df.iloc vs df.loc)Returns: group_df : DataFrame
The PV data stored in the group
PVdata
as a pandas dataframeTSsurvey = pd.read_hdf(h5file, ‘survey20180312093545’,
columns=[(1,1), (1,2)], # Load specific columns where = [‘index>11’, ‘index<20’]) # Load index 11 -> 20
-
DB_pd_data_save
(Database, group, df)[source]¶ Saves in a pandas dataframe stored in group from the Database.
Parameters: Database : str
Relative location of database
group : str
The expected group name
df : DateFrame
Pandas DataFrame to be stored in h5 file
Database
-
PV_TS_DB_merge
(CC, PVdata, mergeOnIndex=False)[source]¶ Merge/concatenate based on the time axis. The expected structures of ‘PVdata’ and ‘CC’ DataFrames is a
Time Stamp
axis and aTime
index level on which the concatenation takes place.Parameters: CC : DataFrame of list(DataFrame)
Expected to contain the processed data or a list of DataFrame with processed data. The index must be a timestam.
PVdata : DataFrame
A single DataFrame containing the corresponding perturbation information and must contain a column
Time Stamp
, which will be used during the concatentation/merge.mergeOnIndex : Default False
Merge based on the index values. Currently only works when a single
CC
DataFrame is provided, and not for a list of DF.Returns: PV_CC_df : DataFrame
Merged/concatenated dataframe of both PV and Coda processed data.
column_values : array
of tuples defining the multi-level indecies of the CC data.
-
DB_COL_stats
(DF, colList, baseName, stats=['mean', 'std'], norm=False)[source]¶ Extract stats from multiple columns with a
CommonKey
.Parameters: DF : DataFrame
Dataframe from which statistics will be generated.
colList : str
a list of columns from which the stats will be made.
baseName : str
The base name of the new columns to which ‘_[stats]’ will be appended.
stats : list
A list of strings containing the requested stats to be generated for columns with
CommonKey
.norm : list
Perform a min-max norm of the added statistic between 0 and 1.
Returns: DF : DataFrame
Original dataframe plus columns containing requested stats.
-
CC_lag
(CC_df, period, units='us', relVel=True)[source]¶ Convert CC lag or First Break Picked data from number of sample points to time or relative velocity change based on:
\[\dfrac{\delta v}{v} = \dfrac{\delta t}{t}\]Expected column names should either contain ‘lag’ in the last of a tuple, eg. col[-1] in the case of lag correction, or ‘FBP’ in the case of First Break Picking correction. If a ‘FBP’ correction is required, then the correct input initial velocity should be given.
Parameters: CC_df : DataFrame
Dataframe from which statistics will be generated. A three level dataframe is expected where the lowest level
period : float
Seconds per sample
units : str
unit of the arg (D,s,ms,us,ns) denote the unit, which is an integer or float number.
relVel : bool
Output the lag in terms of the relative velocity change.
Returns
——-
DF : DataFrame
Original dataframe with the lag columns modified as specified.
-
CC_integration
(DF, dx='index', intType='trapz')[source]¶ Performs the integration of multiple columns witin a dataframe which is expected to contain row index levels ‘srcNo’, ‘recNo’ and ‘Time’. Each srcNo and recNo pair over time will be integrated and added back into the DF.
Parameters: DF : DataFrame
Dataframe of the data to be integrated which must be row indexed by
datetime64[ns]
.dx : str (Default ‘index’)
If set to ‘index’ than integration is performed based on the time axis
intType : str (Default ‘trapz’)
The type of integration to use. trapz for trapezoid, cumsum for pure cummulative summation.
Returns
——-
DF_int : DataFrame
THe same dimensions and row indicies as DF containing the cumtrapz integration.
-
CC_to_K
(DF)[source]¶ Convert all Cross-correlation coefficients to decorrelation by applying the simple transform:
\[K = 1- CC\]Parameters: DF : DataFrame
Dataframe with multi level columns where the cross-correlation coefficients are expected to be named ‘CC’.
Returns: DF_int : DataFrame
The dataframe is returned with only the data of the columns modified.
-
Data_CSV_dump
(DF, fileName, colNames=None, indices=None, CCtoK=False, shiftCols=None, nthRow=None)[source]¶ Dumps data from pandas dataframe to csv, intended for tikz plotting. Note, the following char will be removed from the column names ,’_[]% and any row of the selected
colNames
containing atleast one NaN will be filled with0
.Parameters: DF : DataFrame
DataFrame to be dumped
fileName : str
Name of the csv file saved to current working directory.
colNames : list
The columns to be dumped.
indices : slice
The slice object of indix values to be dumped.
CCtoK : bool (Default = False)
Convert all cross-correlation data to decorrelation. Expected column names as tuples with the last entry equal to ‘CC’ or ‘CC_mean’
shiftCols : list (Default = None)
List of columns to begin as zero (The first value will be subtracted from all)
nthRow : list (Default = None)
List of columns to begin as zero (The first value will be subtracted from all)
-
Data_atGT
(DF, targetCols, outputCols, points, pointsCol, shiftCols=None)[source]¶ Extracts first datapoint greater than a defined column value
Parameters: DF : DataFrame
DataFrame to be dumped
targetCols : list
list of all target columns in
DF
outputCols : list
list of output column names to use in output dataframe
DF_out
. Must be of equal length to targetCols.points : list
list of points at which the first values > should be extracted from each entry in
targetCols
.pointsCol : str
list of output column names to use in output dataframe
DF_out
. Must be of equal length to targetCols.shiftCols : list (Default = None)
List of columns to begin as zero (The first value will be subtracted from all)
Returns: df_trans : DataFrame
Output dataframe containing the requested points
-
TS_Time
(DF, secPerSamp, traceSlice, resampleStr='1 us', csvDump=True, wdwPos=None, fileName='traces.csv')[source]¶ Takes raw time series dataframe, allowing the slicing, resampling and re-indexing. Output times are in seconds.
Parameters: DF : DataFrame
DataFrame to be modified.
secPerSamp : float
The sampling period or seconds per sample required to generate a time index for the dataframe.
traceSlice : slice
The slice object to extract from the DF.
resampleStr : str (default = ‘1 us’)
The resample string to reduce the size of each trace.
csvDump : bool (default = True)
Save data to
traces.csv
in pwd in the order, time [sec], trace1, trace2,….wdwPos : list
List of [start, stop] window positions in no. of smaples
fileName : str (Default = ‘traces.csv’)
Name of output csv file.
Returns: DF : DataFrame
Output dataframe.
wdwTimes : list
List of lists of the window positions in seconds
-
hdf_csv_dump
(DB_fdl)[source]¶ Dumps the processed databases to CC, PV, TShdrs to csv files. Note this function should be run in the run folder, not the database folder
—inputs— DB_fdl: relative or absolute location to the folder where all database files are located
-
run_dataLoad
(DB_fdl)[source]¶ Loads a previous processing session into memory ready for analysis.
- Inputs -
- DB_fdl: input folder holding the expected databases in the form
- ‘DB_fld/’
- Outputs -
PV_df: Main database holding PV, and CC data TS_DB: Database of TS data PV_df_full: Database including all PV data, empty if original PV and TS
data was coincident already.
-
-
class
pyCoda.data.
data_import
(TSfpath, PVloc, import_dtype, param=None)[source]¶ Bases:
object
This class handels the import and basic processing of all user imput data. The core data streams are the time series information (TS) and the corresponding Perturbation Vectors (PV)
Parameters: TSfpath : str
Defines the relative or absolute location of the TS data folder
TSlocL : list (default = None)
List of the relative or absolute location of the TS data files
PVloc : str
Defines the relative or absolute location of the PV’s
Database : str
Defines a common hdf5 database name
Database.h5
import_dtype: str
Defines several raw data types, “bin_par”: for data in a binary single trace per file and header data in .par files, “Shell_format”: all data in a single csv file (both PV and TS), ‘NoTShdrer_format’ “NoTShdrer_format”``.
notes
—–
The output of this class should be a single ``Database.h5`` database in the
run directory, containing all relevant data. All user defined parameters are
assigned to the attribues of the database head.
Examples
>>> import h5py >>> # Reading the user defined parameters from the database attributes >>> with h5py.File('Database.h5', 'r') as h5file: >>> print(dict(h5file.attrs.items()))
-
TSfiles
()[source]¶ This function lists the files in the TSfpath folder location reading all of the information contained within. The structure of this data is checked and the appropriate sub-function initiated based on the user defined parameter ‘import_dtype’
Parameters: headerDB : DataFrame
Database of header information
TSdataList : list
List of TS data file relative locations
Returns: headerDB : DataFrame or dict(DataFrames)
DataFrame of all header file information or dict of DataFrames. The structure should be index | srcNo | recNo | Time | “other header info”
-
read_finfd
(file_loc)[source]¶ Basic function to read files in folder and sort by numeric end digits Parameters ———- file_loc: str
Path to files.
-
TSfilesPar
()[source]¶ This function is intended to perform the TSfile function operations for a folder containing .par headerfiles and associated binary files.
Parameters: List of all header .par and Binary files
Returns: hdr_df Database of all header file information, multiple
- index file name. Must contain mandatory columns
['srcNo', 'recNo', 'Time', 'Survey']
.
TSdataL List of data files including relative location.
TODO:
- Add check for various header file types .txt ..etc
-
TSfilesPV_TS
()[source]¶ Loads in impuse response header data from a single folder. The expected format is the shell data structure.
Parameters: self.TSlocL : list
List of all files within given folder
Returns: df_hdr : DataFrame
Database of all header file information for each file. Must contain mandatory columns
['srcNo', 'recNo', 'Time', 'Survey']
.
-
TSfilesCSIRO
()[source]¶ Loads in impulse response header data from multiple subfolders throughout a survey. Each subfolder should be of the format “sometext”YYYYMMDDHHMMSS. Within each subfolder are files for each source receiver pair.
Parameters: self.TSlocL : list
List of all files within given
Returns: header_dict : dict
- Database of all header file information, multiple
index file name
TdeltaIdx : timedelta64[ns]
Time delta index of length equal to trace length of TS data
self.TSlocL : list of lists
Updated list of lists of each survey folders contents.
-
TSload
(TShdrs)[source]¶ Load the list of TS files
TSflist
found and output a matrix storing TS data columnweise.Parameters: TShdrs: DataFrame
A database of each file name containing the corresponding header. This is output from the function
TSfiles
.TSflist: list
A list of the files within the
TSfpath
folder location. This is output from the functionTSfiles
.Returns: TSdataMtx : numpy array or
None
A columnweise stored matrix of traces for a single receiver, or
None
if a multiple receiver survey is detected. In this case all TS data will be saved into a hdf5 database ‘TSdata.h5’.
-
TSsurveys
(hdr_df)[source]¶ Load TS data from a folder with sub-folders for each survey. The sub- folders should be named ‘sometext’(unique_number)’ (e.g. ‘survey20180312093545’). The individual csv files must be named ‘sometext’(unique_number)_(sourceNo)_(receverNo).(csv type formate) (e.g. ‘survey20180312093545_0001_01.csv’). A hdf5 database will be saved with the following group structure.
Database.h5 │ TSdata
│ └───survey20180312093545 │ Table └───survey20180312093555 │ Table : :Each table includes header data from the csv files imported from the second line of the csv files as Date=12-03-2018; Time=09:35:45.833000; TracePoints=4096; TSamp=0.10000; TimeUnits=1.00000e-006; AmpToVolts=1.0000; TraceMaxVolts=5.0000; PTime=0.00000; STime=0.00000;
Parameters: hdf_df : dict of DataFrames
A database of header information for each Time-series recorded. As a minimum must contain the first three columns of ‘srcNo’, ‘recNo’ and ‘time’. The remaining header info can be any order.
self.TSlocL : list of lists
List of lists of the files within each survey
Returns: _ : None
None indicating that data is stored in a HDF5 file.
Notes
No longer is the TdeltaIdx added to each dataframe, thus I should figure out how best to store this information into the h5 file.
Examples
>>> import pandas as pd >>> import h5py >>> with h5py.File('Database.h5', 'a') as h5file: >>> TSsurvey = pd.read_hdf(h5file, 'survey20180312093545') # basic load >>> # Load specific source-receiver pair for window between 11 and 500 >>> TSsurvey = pd.read_hdf(h5file, 'survey20180312093545', columns=[(1,1), (1,2)], # Load specific columns where = ['index>11', 'index<20']) # Load index 11 -> 20
-
TSloadBin
(TShdrs)[source]¶ Load in the binary file formate as expected from the ‘import_dtype’= ‘bin_par’.
-
PVload
()[source]¶ Load Perturbation Vectors into a single database and store in ‘Database.h5’ within group ‘PVdata’.
- Database.h5
│ PVdata
Table
Parameters: self.PVloc : str
Path to PV data file/files
self.import_dtype : str
Indication of the data type, either
['.xls', 'bin_par', 'CSIRO']
or the ‘Shell_format’.
-
pyCoda.dataStore module¶
Created on Thu Mar 16 17:28:03 2017
@author: rwilson
-
class
pyCoda.dataStore.
utilities
[source]¶ Bases:
object
A logical collection of functions for interacting with
-
static
DB_pd_data_load
(Database, group)[source]¶ Loads in a pandas dataframe stored in group from the Database.
Parameters: Database : str
Relative location of database
group : str
The expected group name
Returns: group_df : DataFrame
The PV data stored in the group
PVdata
as a pandas dataframe
-
static
hdf_csv_dump
(DB_fdl)[source]¶ Dumps the processed databases to CC, PV, TShdrs to csv files. Note this function should be run in the run folder, not the database folder
—inputs— DB_fdl: relative or absolute location to the folder where all database files are located
-
static
run_dataLoad
(DB_fdl)[source]¶ Loads a previous processing session into memory ready for analysis.
- Inputs -
- DB_fdl: input folder holding the expected databases in the form
- ‘DB_fld/’
- Outputs -
PV_df: Main database holding PV, and CC data TS_DB: Database of TS data PV_df_full: Database including all PV data, empty if original PV and TS
data was coincident already.
-
static
-
class
pyCoda.dataStore.
dataStore
(param={}, PV_df=[], PV_df_full=[], TS_df=[], TS_DB=[], TShdrs=[], CC=[])[source]¶ Bases:
object
This class is intended to handel the storage of all data aquired and or generated during the processing.
-
checkSetup
()[source]¶ This functions checks the setup file to determine if any param have changed. If yes, the processing will be re-run, otherweise the saved datebases will be loaded. return True if change is detected
-
to_pkl
(data, fname)[source]¶ Save pickel files data: data to pickel fname: file name rel or abs path
-
pyCoda.dispCWI module¶
pyCoda.dispCWI_DB module¶
-
class
pyCoda.dispCWI_DB.
dispCWI_DB
(param, DB, TS_DB, PV_full)[source]¶ Bases:
object
This class handels the interactive ploting of CC data stored within a single database.
-
CC_labels
(tuples)[source]¶ Handels the assignment of figure titles and axis labels. Basic functionality, checks if variables is assigned in param, if not a a default is assigned. tuples: tuples of (lag, self.self.wdw_pos)
-
pyCoda.postProcess module¶
Created on Mon Apr 24 16:17:07 2017
@author: rwilson
-
class
pyCoda.postProcess.
post_utilities
[source]¶ Bases:
object
A collection of post processing utility functions
-
detect_most_linear
(x, y, m, smooth=False, wdw_wdth=25, poly_ord=3)[source]¶ Finds the most linear portion of a line via Inputs: —— x : Series
y-axis array of values- y : Serues
- y-axis array of values
m : Length of most linear portion of line (x,y) smooth : bool
Smooth the curve before search
-
detect_peaks
(x, mph=None, mpd=1, threshold=0, edge='rising', kpsh=False, valley=False, show=False, ax=None)[source]¶ Detect peaks in data based on their amplitude and other features.
Parameters: x : 1D array_like
data.
mph : {None, number}, optional (default = None)
detect peaks that are greater than minimum peak height.
mpd : positive integer, optional (default = 1)
detect peaks that are at least separated by minimum peak distance (in number of data).
threshold : positive number, optional (default = 0)
detect peaks (valleys) that are greater (smaller) than threshold in relation to their immediate neighbors.
edge : {None, ‘rising’, ‘falling’, ‘both’}, optional (default = ‘rising’)
for a flat peak, keep only the rising edge (‘rising’), only the falling edge (‘falling’), both edges (‘both’), or don’t detect a flat peak (None).
kpsh : bool, optional (default = False)
keep peaks with same height even if they are closer than mpd.
valley : bool, optional (default = False)
if True (1), detect valleys (local minima) instead of peaks.
show : bool, optional (default = False)
if True (1), plot data in matplotlib figure.
ax : a matplotlib.axes.Axes instance, optional (default = None).
Returns: ind : 1D array_like
indeces of the peaks in x.
Notes
The detection of valleys instead of peaks is performed internally by simply negating the data: ind_valleys = detect_peaks(-x)
The function can handle NaN’s
See this IPython Notebook [R112].
References
[R112] (1, 2) http://nbviewer.ipython.org/github/demotu/BMC/blob/master/notebooks/DetectPeaks.ipynb Examples
>>> from detect_peaks import detect_peaks >>> x = np.random.randn(100) >>> x[60:81] = np.nan >>> # detect all peaks and plot data >>> ind = detect_peaks(x, show=True) >>> print(ind)
>>> x = np.sin(2*np.pi*5*np.linspace(0, 1, 200)) + np.random.randn(200)/5 >>> # set minimum peak height = 0 and minimum peak distance = 20 >>> detect_peaks(x, mph=0, mpd=20, show=True)
>>> x = [0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0] >>> # set minimum peak distance = 2 >>> detect_peaks(x, mpd=2, show=True)
>>> x = np.sin(2*np.pi*5*np.linspace(0, 1, 200)) + np.random.randn(200)/5 >>> # detection of valleys instead of peaks >>> detect_peaks(x, mph=0, mpd=20, valley=True, show=True)
>>> x = [0, 1, 1, 0, 1, 1, 0] >>> # detect both edges >>> detect_peaks(x, edge='both', show=True)
>>> x = [-2, 1, -2, 2, 1, 1, 3, 0] >>> # set threshold = 2 >>> detect_peaks(x, threshold = 2, show=True)
-
MLTWA_calc
(TS_DB, after_FB, Ewdth=None, wd_shift=0, ref_trace=0, mph=None, mpd=None, threshold=0, R1_Sign=False, grad_period=-50, verbose=False)[source]¶ Apply Multi Lapse-Time Window Analysis on the input database time -series. Additional parameters are calculated such as the B0 or ratio of R1 to R2 as well as their gradient difference.
Parameters: TS_DB : DataFrame
Time-series database in cronological order.
after_FB : DataFrame.index
Index of
TS_DB
after which the S-wave max value will be foundEwdth : list, optional (default = [len(TS_DB)//16,len(TS_DB)//16,len(TS_DB)//4]
The first two energy window widths in sample points
wd_shift : int
Shift parameter of the start of windows
ref_trace : int
The trace to use as a reference for calculation of R2
mph : {None, number}, optional (default = None)
detect peaks that are greater than minimum peak height.
mpd : positive integer, optional (default = 1)
detect peaks that are at least separated by minimum peak distance (in number of data).
threshold : positive number, optional (default = 0)
detect peaks (valleys) that are greater (smaller) than threshold in relation to their immediate neighbors.
R1_Sign : bool (Default False)
Apply sign change to R1.
grad_period : int (Default False)
The number of periods to use when calculating the gradient of ratios R1 and R2.
verbose: bool, optional (default = False)
Provide a details output
Returns: DB_MLTWA : DataFrame
Containing all of the MLTWA data with index equal to third expected Time column of the input
TS_DB
.dict_MLTWA: dictcontaining parameters pertaining to the MLTWA processing.
-R1: Ratio of
log_10 E_1(t_i)/ E_3(t_i)
-R2: Ratio oflog_10 E_1(t_u)/ E_1(t_i)
-E1: Integrated energy early S-wave -E2: Integrated energy mid S-wave -E3: Integrated energy late S-wave -E_wdw_pos: list of start, mid, end ofE1,E2,E3
-idx_break: list detected peaks in search of the S-wave arrivalverbose: bool, optional (default = False)
Provide a detailed output
Examples
>>> import postProcess as pp >>> idx = pp.post_utilities.MLTWA_calc(TScut_DB_in, after_FB = 0.00008, wd_shift=-500, mph=None, mpd=12, threshold=0, verbose=True)
-
PV_segmentation
(PV_df, Segments, targets, indexName='index', shiftCols=None, verbose=False)[source]¶ Apply a range of data parameterisation methods from segments of input data. Note, any row with a
nan
will be removed before segmentation.Parameters: PV_df : DataFrame
Time-series database in cronological order.
Segments: list
A list of indicies at which between which the input
PV_df
will be segmented and paramterised.targets: list
List of column names in
PV_df
.indexName : Str (Default ‘index’)
The index in which the
Segments
are defined.shiftCols : list (Default = None)
List of columns to begin as zero (The first value will be subtracted from all)
verbose: bool, optional (default = False)
Provide a detailed output
Returns: dict_Segments: dictcontaining parameters for each segment
-Sigma: Sigma of each segment -R2: R2 of each segment -Mean: mean of each segment -Skewedness: mean of each segment
Examples
>>> import postProcess as pp
>>> seg_list = [[4, 19.5], [21.74, 37.2], [39.68, 55.29]] # In Hours
>>> DF_Segments = pp.post_utilities.PV_segmentation(PV_df_in, seg_list,
targets = [‘Pore pressure| [MPa]’,’R1’,’R2’])
-
TS_FBP
(TS_DB, noiseWD, threshold=1, threshold_shift=0, mpd=1, verbose=False)[source]¶ This function is intended to perform first break picking
Parameters: TS_DB : DataFrame
Columnweise DataFrame of TS data, index of time expected
noiseWD : int
Window width in TS_DB index which is expected to be only noise in number of sample points.
threshold : int/float
Percentage of the noise standard deviation which will define the detection threshold.
threshold_shift : float
A shift to the (threshold * noiseStd)
mpd : int
Minimum poit distance in number of samples
verbose : bool
If True, the interactive plotting of picks will be made
Returns: idx_break : int
index of the first break detection.
-
TS_interactive
(TS_DB, idx=None, threshold=False, noiseWD=False, wdws=None)[source]¶ Interactive plot of time-series data with ability to plot detection parameters for analysis.
Parameters: TS_DB : dataframe
Database of all input time series in each columns
idx : int (default None)
The index of the detected peak
threshold : list (default False)
Thresholds for each trace in terms of amplitude
noiseWD : int (default False)
The noise zeroed window length
wdws : list (default None)
A list of window index start stop positions e.g. [[sta, stp]…].
-
CC_ch_drop
(CC_DB, channels=None, errors='raise')[source]¶ Drops channels from standard CCdata dataframe
Parameters: CC_DB : dataframe
Database containing in the first two levels src and rec numbers
channels : int (default = None)
the channels to remove from the dataframe, either a list of channels in which case both source and receivers will be dropped, or a list of channel pairs in which case only the defined pairs will be dropped.
errors : str (dfault = ‘raise’)
Raise error in attempted drop does not exist, ‘ignore’ to surpress the error.
-
calcSNR
(TSsurvey, Noise_channels, all_channels, wdws, noiseCutOff=0, inspect=False)[source]¶ Determines the channels which are above a certain SNR.
Parameters: TSsurvey : dataframe
Single survey dataframe of traces
Noise_channels : list
the channels on which the noise will be estimated
all_channels : list
All channels numbers
wdws : list
The windows in samples points at which the SNR is calculated
noiseCutOff: float
The threshold of SNR in Db to filter
inspect: bool (default = False)
Inspect the traces which are noted as noise.
Returns
——-
noiseyChannels : float
The noisey channels
-
smooth
(x, window_len=11, window='hanning')[source]¶ smooth the data using a window with requested size.
This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both ends so that transient parts are minimized in the begining and end part of the output signal.
- input:
x: the input signal window_len: the dimension of the smoothing window; should be an odd integer window: the type of window from ‘flat’, ‘hanning’, ‘hamming’, ‘bartlett’, ‘blackman’
flat window will produce a moving average smoothing.- output:
- the smoothed signal
example:
t=linspace(-2,2,0.1) x=sin(t)+randn(len(t))*0.1 y=smooth(x)
see also:
numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve scipy.signal.lfilter
TODO: the window parameter could be the window itself if an array instead of a string NOTE: length(output) != length(input), to correct this: return y[(window_len/2-1):-(window_len/2)] instead of just y.
-
PV_time_shift
(PVdata, PV_time_col, PV_time_col_unit, PVstart_date_time)[source]¶ Adjusts the Time Stamp column in the PVdata frame.
Parameters: PVdata : DataFrame
The dataframe on which operations are performed
PV_time_col : str
The name of the PV time column to be processed.
PV_time_col_unit : str
Unit of the time column
PV_time_col
.PVstart_date_time : str
The YYYY-MM-DD ..etc string defining the origin of the
PV_time_col
.Examples
>>> # Determine the origin time of the PVdata >>> origin = pd.to_datetime('20180212180703') - pd.Timedelta(43.6725, unit='D') >>> # Shift the PVdata to the new origin >>> pp.post_utilities.PV_time_shift(PVdata, 'Time(Days)', 'D', origin) >>> # Save the new PVdata back to the HDF5 database >>> dt.utilities.DB_pd_data_save('Ultrasonic_data_DB/Database.h5', 'PVdata', PVdata)
-
pyCoda.pre_process module¶
pyCoda.pycker module¶
pyCoda.runCWI module¶
pyCoda.userInput module¶
Created on Thu Jan 12 13:37:48 2017
@author: rwilson
-
class
pyCoda.userInput.
utilities
[source]¶ Bases:
object
Collection of functions tools applicable to user interaction.
-
static
query_yes_no
(question, default='yes')[source]¶ Ask a yes/no question via raw_input() and return their answer.
“question” is a string that is presented to the user. “default” is the presumed answer if the user just hits <Enter>.
It must be “yes” (the default), “no” or None (meaning an answer is required of the user).The “answer” return value is True for “yes” or False for “no”.
-
static
-
class
pyCoda.userInput.
userInput
(fileIn)[source]¶ Bases:
object
This class is intended to handle the direct input general information for the purpose of processing, display and documentation. A .txt file is expected with a basic, variable and value format. % comments are ignored.
var = val % val can be string or numeric input
All identified variables are saved into a dictionary of the format dic = {var1: val1, var2: val2 }
This class is also intended to compare the initial user input info with the previous run, and return re_run as False if the same inputs are given.
Parameters: fileIn Location of user input txt file Notes
- The accepted inputs are as follows:
Setup paramaters: import_raw : Request Raw data to be imported (Default: False)
re_run : Force the reprocessing, even if no changes found in input file.
import_dtype : The data type to import(bin_par, Shell_format, ‘CSIRO’.
- survey_type :
multiple
(Default) if multiple src/rec pairs in subfolder structure - is expected.
single
if a single src/rec pair is expected with no subfolders. - TSstart_date : str
- The start of TS acquistion in format YYYY-MM-DD. Only required if no absolute time data available in TS header information.
TSloc : location of folder/file containing the time series data.
PVloc : location of folder/file containing the perturbation data.
loadDB : If True, no attempt to reload raw data into database will be made
——————- Pre-processing inputs ——————- PVstart_date_time : (Default None) The time
YYYY-MM-DD HH:MM:SS.sssss
the first PV measurement was made, in sync with TS time.PV_time_col : (required) Name of time column to match in PV data
- PV_time_col_unit : (Default = ‘D’) the time unit of the PV column to match,
- see pd.to_datetime
- sampNo : The number of sample points in a single trace recording, only
- required as input if not found in TS header information.
sampFreq : The sampling frequence of TS data, [samp/sec]
——————- Cross-correlation parameters ——————- sig : bool
If True is given then a spectral significance test will be made for each correlation performed. This is an expensive calculation so will require considerable time to perform. Seecross-correlation
- lagOverlap : bool (Default True) UNDER DEVELOPMENT
- Allow overlap between rolling lag values (i.e. 1-3, 2-4). If set to
False
, only none overlapping lags will be calculated (e.g. 1-3, 3-5). - Eng_ref : int (Default None)
- Indicating the trace/survey to which all subsequent relative energy calculations will be referenced to.
- STA_meas : int/str (Default False)
- The first survey to include in the correlation processing, if false
then no start will be set. Note: only for
survey_type
multiple, a date string in the format YYYY-MM-DD HH:MM:sec.msec must be given, which corresponds to the survey folder number. - sta_wdws : int (Optional)
- If
wdwPos
andww_ol
as given then the user can also define the start of the series of overlapping windows. - end_wdws : int (Optional)
- If
wdwPos
andww_ol
as given then the user can also define the end of the series of overlapping windows. - wdwPos : (int, Default = False) The start position of the windows in trace sample numbers,
- if more than one is provided then
ww
must be of equal length. If not provided then bothww
andww_ol
should be given. - ww : (int) Width of each window in trace sample numbers,
- if more than one is provided then
wdwPos
must also be of equal length. - ww_ol : (int) (Default False)
- The percentage window overlap. The max number of windows of
ww
lenght which fit within a trace will be calculated. This will be ignored ifwdwPos
is provided. - taper : bool
- Apply a tukey window taper to each correlation window
- taperAlpha : float (Default 0.1)
- The alpha of the window taper to be applied.
- CC_folder : (str, Default = ‘CCprocessed’)
- The name of the folder within which the CC processed data will be saved.
——————- Display parameters ——————-
- disp_DB : bool (Default True)
- If set to true, some portion of the processed database will be plotted
to screen at the end of the Class
runCWI
.
- survey_type :
-
checkSetup
(check)[source]¶ This functions checks the setup file to determine if any param have changed. If yes, the processing will be re-run, otherweise the saved datebases will be loaded. return True if change is detected, False if any critical param are found and None if only non-critical param change
-
sys
= <module 'sys' (built-in)>¶


Horizontal Carousel
Infinite scrolling and Drag-Drop
Vertical Carousel
Infinite scrolling and Drag-Drop
Horizontal Carousel
Not an infinite loop
Vertical Carousel
Not an infinite loop + Disable Drag-Drop
@@include('./src/components/_global/include-header.html')
@@include('./src/components/_global/include-loader.html') @@include('./src/components/_global/include-toggle-trigger.html')Infinite scrolling and Drag-Drop
Infinite scrolling and Drag-Drop
Not an infinite loop
Not an infinite loop + Disable Drag-Drop


Right click on the toolbar button for other actions.
The extension would try to get the image from cache before sending the image to download manager, which causes a noticeable delay before download manager starts if the image is not cached.
These settings don't apply to batch download. Batch download settings are configured in batch download UI.
The pattern may include subfolder (separated with /).
/
You should remove subfolder part in the filename pattern if this option is checked.


A student with a passion for computer science and a talent for building projects that benefit thousands of people around the world.
I am currently working on machine learning compression research as an intern at Intel Labs while studying computer science at the University of California, Davis.


Q-Shield demonstrations and features
In this post, I would like to share main features of Q-Shield:
- PCB body frame size 10x10 cm and 3 cm in height (including Spark Core)
- Soft plastic propellors with diameter of 5.5 cm
- IMU sensor
- Digital Barometer
- 2 RGB LEDs with controllable by software
- 4 red LEDs on corners for indication
- Expansion ports for power source and I2C communication
- Li-Po battery of 380 mAh
- Charging is done through a mini-USB connector
Another very cool feature is that, it is actually an authentic ninja shuriken! Don't believe it? Check out this picture of a real shinobi using it in action. xD
How Do I Use the Nano Quadcopter?
Before plugging in the Spark core, include Q-Shield library with Spark firmware, compile, and flash it. That is it! You now have a nanoquadcopter to tinker with. Grab your controller!
The quad can be controlled through an android app or anything that is MAVLink enabled. Control inputs, parameter configuration, and flight logging are all done by MAVLink and MAVLink based GUI applications.
Below is a video of Q-SHIELD in Action! In this close up (yeah very shaky) recording, we tried to cover some basic flight functionalities, such as taking off hovering, etc. It is controlled by QGroundControl and a PS joystick. Please enjoy!


Workcation helps you find work-friendly rentals in beautiful locations so you can enjoy some nice weather even if you'r not on vacation.


Sep 23, 2011 Brad Pitt and Jonah Hill make a great team in. both senses of the term in this behind. Thankfully, though, Moneyball isn't so much a contemplation on the He realizes he has to completely change the game if his team has a
Moneyball opens to scenes of loss and emptiness. And how many people working in companies. large and small feel the same way? What defines a winning team and how do they get there? Jonah Hill as Peter Brand, Moneyball.
Sep 2, 2011 The second question I always ask is does the film make the sport. Jonah Hill shows some more of his. acting chops as Peter Brand, the. Moneyball is a good film, but it should be much better considering the talent involved Mar 13, 2012 Brad Pitt and Jonah Hill, changing how baseball is played with baseball there will be large stretches of this film, and much of its narrative, that you will have not a clue about But them's A hit, even if he didn't. get the Oscar.
Review: Director Bennett Miller, along with Brad. Pitt and Jonah Hill, take a niche subject Based on a true story, Moneyball is. a movie for anybody who has ever wonderful bits of natural acting in small bit parts which make so many scenes
Sep 21, 2011. Brad Pitt, Jonah Hill, Billy Beane & Michael Lewis talk "Moneyball" on Studio 42 with. Just as often, a writer will feel that too much of his book is lost in translation I get a bit romantic about it even though I'm not supposed to Moneyball movie review for parents, featuring 15 categories of content including profanity, sex, violence and more hires statistics wizard Peter Brand (JONAH HILL) away from the Cleveland Indians Peter has a different view regarding what . players should be on the team, all based on Thank you SO much for making it Feb 14, 2012. Or should we say, Academy Award Nominee Jonah Hill of unexpected inclusions and exclusions that draw public ire, in many cases with perfectly good reason Yet all the same, it is important to remember:. He's actually terrific in Moneyball Does Jonah Hill deserve to win. over Christopher Plummer?
Sep 21, 2011 Jonah Hill appeared on last night's Late Show With David Letterman to promote his new movie, the much-buzzed-about baseball film Moneyball. to think you' re a Wham! fan, he will spare no expense or effort to do so. on the Moneyball set was mess with the golf cart Hill used to get from one place to
Oct 5, 2011 And as much as Beane attempted to distill out the romantic, mystical elements, he in Jonah Hill and director Bennett Miller share a few laughs at the film's premiere Did making "Moneyball change. your view of the game? Sep 23, 2011 Instead, we get Capote-director Bennett Miller And he didn't do that bad of a job, but there's. too much left on the table and it leaves me disappointed. Jonah Hill deserves credit for injecting a much-needed dose of humor Jonah Hill on TMZ, your go-to source for celebrity news, photos, & videos ( 2009), Get Him to the Greek (2010), Moneyball (2011), and 21 Jump Street (2012 ). Beane goes to the A's owner and tells him that. he needs more money to get better players. man, Peter Brand (Jonah Hill), whisper to another man who whispers to Shapiro The next night, Beane calls Brand and asks what round would he have put Beane in The A's lose the game, and. continue to lose many games


-
{Clean} | Responsive Design
With is's clean, modern design and 10 premade color styles you can chose from, you'll be able to find perfect combination to suit your needs. Moderna also comes with many background patterns with which you can achieve both professional and creative look of your site.
Purchase theme -
{Social} | Widgets
Moderna offers you a new way of using social networks. It offers option to use flickr, dribble, pinterest, instagram, picasa, youtube, deviant art photo feed and special photo newsfeed. You can find this feeds and read more about them on media page.
Purchase theme -
Life is conversational. Web design should be the same way. On the web, you’re talking to someone you’ve probably never met ^aEUR“ so it’s important to be clear and precise. Thus, well structured navigation and content organization goes hand in hand with having a good conversation.
-


Building a Shiny Application from Scratch
1 Introduction
Shiny is a powerful R package which allows you to create interactive web applications using the R programming language. It is particularly useful for creating applications that run on data and include some sort of data analysis or visualization. In addition to leveraging the power of R and its thousands of packages, one of the big benefits of shiny is the ease of developing applications using R only. Although it is possible to incorporate more traditional web design languages such as custom CSS or Javascript into your shiny application, it is not required.
This online document was created to accompany workshops and webinars on how to build a Shiny application. This guide was created using the bookdown
package and is still a work in progress. If you find any errors or typos you would like to correct, please feel free to submit a pull request on github.
1.1 Getting Started
To get started, make sure you have the shiny package installed on your system. You can download shiny from CRAN using the command install.packages("shiny")
. The RStudio IDE contains a basic shiny application template you can use to create your first shiny application. To access this template, click on the new document icon in the top left corner of the IDE and select “Shiny Web App…”. This will create the R script file app.R
which contains the basic components of a shiny application. You can use this simple shiny application as a starting point for building your own applications. It will look something like this:
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button in the RStudio IDE or running the command runApp("app.R").
#
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Old Faithful Geyser Data"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
# Run the application
shinyApp(ui = ui, server = server)
Don’t worry about how the application works exactly. We will go through each code chunk and explain what each one of them does in the next section. For now, try running the application on your computer by clicking the the “Run App” button in the RStudio IDE. This will start the application and open up your default web browser so you view it.
1.2 Components of a Shiny Application
In this section, we’ll take a closer look at the shiny application code you just ran. Shiny applications are made up of 2 important components: the user interface (UI) and the server section.
UI Section
The UI section of your shiny application is where you define what your application will look like. In a nutshell, this is where you write your shiny functions and R code, which shiny will then take care of translating into html and CSS code that today’s modern web browsers can read and render into a beautiful web application. For example, the function shiny::fluidPage
is often used in the UI section to define the outer most layer of the UI. It creates a web page containing both rows and columns which is fluid, meaning it scales to fill all available browser width. fluidpage()
is R code, but once you initiate the rendering process from the console with the runApp()
function or by clicking the “Run App” button in the RStudio IDE, it will get converted into HTML and CSS code that defines the layout of your application.
Our example application used the default sidebarLayout
function to create a webpage with a small sidebar on the left hand side, typically used for adding input controls, and a larger column on the right, usually reserved for displaying plots and other content. You can easily change this layout by replacing the sidebarLayout
with other functions like fluidRow
and tabsetPanel
, for example.
Shiny needs to know which section of your script is the UI vs. which section is the server, so make sure to save your UI code to the ui
object. At the bottom of your script, you will need to pass both the ui and server sections to the function shiny::shinyApp()
.
Server Section
The server section of your shiny application is where the computation takes place. Any code you write for transforming data or creating visualizations will most likely be in this section.


Games are usually where a new technology comes to incubate. From advances in real time graphics, to AR, VR and Cloud Computing, games have always been the early adopters of new technologies. Blockchain tech also comes up with such promise, of disrupting the entire gaming industry by completely changing the way gamers interact with their in-game assets.
Blockchain is a peer to peer distributed ledger, where digital information can be recorded and distributed, and is accessible to everybody. Essentially, it is an immutable, decentralized, secure and transparent medium of storing and distributing digital information.
Blockchain enables creation of a new standard for digital assets, where a digital asset can be tied to a unique digital token and stored on the Blockchain. These unique digital tokens are called Non Fungible Tokens (NFTs).
Game Items when tied to unique digital tokens, can exhibit following exemplary properties
- Authentic Ownership - Players can truly own their in-game items, where no one can alter, replicate, destroy or take them away.
- Verifiable Scarcity - Players can verify if their assets are as rare as the developer claims them to be.
- Transparency - Players can have complete transparency into the in-game economies
- Liquidity - Players can have the opportunity to trade, sell, gift or rent their in-game items with complete autonomy.
Blockchain provides a wide avenue of possibilities for game developers to provide great control to players, and in-turn alleviate their overall gaming experience.


The file input plugin allows you to create a visually appealing file or image input widgets. Developed by Arnold Daniels at Jansy Bootstrap.
When uploading an image, it is possible to show a thumbnail instead of the filename.
Image preview only works in IE10+, FF3.6+, Safari6.0+, Chrome6.0+ and Opera11.1+. In older browsers the filename is shown instead.
Add .fileinput
to the container. Elements inside the container with .fileinput-new
and .fileinput-exists
are shown or hidden based on the current state. A preview of the selected file is placed in .fileinput-preview
. The text of .fileinput-filename
gets set to the name of the selected file.
The file input widget should be placed in a regular <form>
replacing a standard <input type="file">
. The server side code should handle the file upload as normal.
Add data-provides="fileinput"
to the .fileinput
element. Implement a button to clear the file with data-dismiss="fileinput"
. Add data-trigger="fileinput"
to any element within the .fileinput
widget to trigger the file dialog.
Using the given elements, you can layout the upload widget the way you want, either with a fixed width
and height
or with max-width
and max-height
.
| Name | type | description |
|---|---|---|
| name | string | Use this option instead of setting the name attribute on the <input> element to prevent it from being part of the post data when not changed. |
Initializes a file upload widget.
Clear the selected file.
Reset the form element to the original value.
| Event Type | Description |
|---|---|
| change.bs.fileinput | This event is fired after a file is selected. |
| clear.bs.fileinput | This event is fired when the file input is cleared. |
| reset.bs.fileinput | This event is fired when the file input is reset. |