Abstract Class Aquatic. Represents all object in Aquarium such as Piranha, Guppy, Snail, Pellet, and Coin.
More...
#include <Aquatic.hpp>
Abstract Class Aquatic. Represents all object in Aquarium such as Piranha, Guppy, Snail, Pellet, and Coin.
◆ Aquatic() [1/2]
A constructor.
Constructs a new Aquatic object.
- Parameters
-
◆ Aquatic() [2/2]
| Aquatic::Aquatic |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
move_speed, |
|
|
Aquarium * |
aquarium |
|
) |
| |
A constructor.
Constructs a new Aquarium object.
- Parameters
-
| double | x Initial x-position of the object in the aquarium. |
| double | y Initial y-position of the object in the aquarium. |
| double | move_speed Object move speed. |
| Aquarium | *aquarium The Aquarium that contains the object. |
◆ dead()
| virtual void Aquatic::dead |
( |
| ) |
|
|
pure virtual |
◆ getAquarium()
Getter for aquarium.
- Returns
- Aquarium *aquarium Pointer to the Aquarium that contains the object.
◆ getLastCurrTime()
| double Aquatic::getLastCurrTime |
( |
| ) |
const |
Getter for last_curr_time.
- Returns
- double last_curr_time The last time the object was updated.
◆ getLastProgressTime()
| double Aquatic::getLastProgressTime |
( |
| ) |
|
Getter for last_progress_times.
- Returns
- double last_progress_time The last time the object progress time was updated.
◆ getMoveSpeed()
| double Aquatic::getMoveSpeed |
( |
| ) |
const |
Getter for move_speed.
- Returns
- double move_speed
◆ getProgress()
| int Aquatic::getProgress |
( |
| ) |
|
Getter for progress.
- Returns
- int progress The progress of the state.
◆ getState()
| State Aquatic::getState |
( |
| ) |
|
Getter for state.
- Returns
- State state The current state of the Aquatic : movingRight, movingLeft, turningRight, turningLeft, stillLeft, stillRight, deadLeft, deadRight
◆ getX()
Getter for x.
- Returns
- double x x-axis position of the object.
◆ getY()
Getter for y.
- Returns
- double y y-axis position of the object.
◆ isInside()
| bool Aquatic::isInside |
( |
| ) |
|
Check whether the object is inside the aquarium or not.
- Returns
- bool true if inside
◆ move()
| virtual void Aquatic::move |
( |
| ) |
|
|
pure virtual |
◆ setLastCurrTime()
| void Aquatic::setLastCurrTime |
( |
double |
t | ) |
|
Setter for curr_time.
- Parameters
-
◆ setLastProgressTime()
| void Aquatic::setLastProgressTime |
( |
double |
t | ) |
|
Setter for last_progress_time.
- Parameters
-
◆ setProgress()
| void Aquatic::setProgress |
( |
int |
progress | ) |
|
Setter for progress.
- Parameters
-
◆ setState()
| void Aquatic::setState |
( |
State |
state | ) |
|
Setter for state.
- Parameters
-
◆ setX()
| void Aquatic::setX |
( |
double |
x | ) |
|
◆ setY()
| void Aquatic::setY |
( |
double |
y | ) |
|
◆ updateProgress()
| virtual void Aquatic::updateProgress |
( |
| ) |
|
|
pure virtual |
◆ updateState()
| virtual void Aquatic::updateState |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:


[gecode-users] Strange Error Concerning Memory
Yunus Acikoz
yunusacikoz at gmail.com
Tue Aug 9 10:01:02 CEST 2016
Hi Christian,
I can't compile in debug mode because of some other library (OR-tools) I'm
using. Instead I compile in RelWithDebInfo. Thanks anyway. I'll see if I
can provide more information later.
Thanks,
Yunus Acikoz
On Mon, Aug 8, 2016 at 5:28 PM, Christian Schulte <cschulte at kth.se> wrote:
> Hi Yunus,
>
>
>
> Really no idea. But what you could do: compile your application in
> Debugmode (that’s why the Gecode packages also contain debug variants of
> its dlls) and let it run under the Microsoft debugger. Please make sure
> that the debugger picks up the pdb symbol files (it should by default).
>
>
>
> At least you should see more with that!
>
>
>
> Cheers
>
> Christian
>
>
>
> --
>
> Christian Schulte, www.gecode.org/~schulte
>
> Professor of Computer Science, KTH, cschulte at kth.se
>
> Expert Researcher, SICS, cschulte at sics.se
>
>
>
> *From:* users-bounces at gecode.org [mailto:users-bounces at gecode.org] *On
> Behalf Of *Yunus Acikoz
> *Sent:* Monday, August 8, 2016 16:23
> *To:* users at gecode.org
> *Subject:* [gecode-users] Strange Error Concerning Memory
>
>
>
> Hello,
>
>
>
> I've implemented a model that is derived from Gecode::IntMinimizeSpace.
> The model contains a propagator which is derived from Gecode::Propagator.
> My propagator holds four integer ViewArrays, each having around 15000
> views. And each view in three of these arrays is assigned an advisor which
> is derived from Gecode::Advisor (making approximately 45000 advisors in
> total). This propagator also holds two integer vectors of size 15000 which
> I am using as labels in propagation. These two vectors are allocated from
> Gecode space. This little information might give an idea about the problem
> size.
>
>
>
> At some point while solving the model with the BAB search engine, an
> exception is thrown and stack trace only points to the Gecode dll and
> nothing more. I used Microsoft's Application Verifier tool, it gives the
> following output:
>
>
>
>
>
> <avrf:logEntry Time="2016-08-05 : 10:44:39"
> LayerName="Exceptions" StopCode="0x650" Severity="Error">
>
> <avrf:message>Attempt to execute code in non-executable memory (first
> chance).</avrf:message>
>
> <avrf:parameter1>24c4ab54e88 - Address being accessed.</avrf:parameter1>
>
> <avrf:parameter2>24c4ab54e88 - Code performing invalid
> access.</avrf:parameter2>
>
> <avrf:parameter3>fde92fe1f0 - Exception record. Use .exr to display
> it.</avrf:parameter3>
>
> <avrf:parameter4>fde92fdd00 - Context record. Use .cxr to display
> it.</avrf:parameter4>
>
> <avrf:stackTrace>
>
> <avrf:trace>vfbasics!+7ffab0f981b2 ( @ 0)</avrf:trace>
>
> <avrf:trace>vfbasics!+7ffab0f9787e ( @ 0)</avrf:trace>
>
> <avrf:trace>ntdll!MD5Update+a43 ( @ 0)</avrf:trace>
>
> <avrf:trace>ntdll!RtlImageNtHeaderEx+17b ( @ 0)</avrf:trace>
>
> <avrf:trace>ntdll!KiUserExceptionDispatcher+3a ( @ 0)</avrf:trace>
>
> <avrf:trace>????????+0000024C4AB54E88</avrf:trace>
>
> </avrf:stackTrace>
>
> </avrf:logEntry>
>
>
>
>
>
>
>
> I don't expect any detailed answer with this much information, but maybe
> you can tell me where to look or what kind of mistake I should look for in
> my code. Because I don't have any idea about what may be causing this.
>
>
>
> Thanks,
>
> Yunus Acikoz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20160809/a465092e/attachment-0001.html>
More information about the users
mailing list


Inventory
Agent camera focus (Press 'F' to toggle)
Agent camera focus enabled. Mouse dragging disabled on map.
Server connection
Connected
Awaiting new command...
Log


We want to help you with your work, whether its lorem ipsum sum dumquam etiat tenebaum lesquam forque et nequam forceps pulchrissima
Swing by the lab and see the magic in action!
Science Hall M390Tanya Buckingham would love to hear about your design idea.
1.608.262.1363<EMAIL_ADDRESS>Roth wants to hear your ideas for research in cartography
375 Science Hall<EMAIL_ADDRESS>2015© UWCL. All Rights Reserved.


Fort Concho is a former United States Army installation and a National Historic Landmark located in San Angelo, Texas. It was established in 1867 and was an active military base for 22 years. The fort was the base of the 4th Cavalry from 1867 to 1875, and of the "Buffalo Soldiers" of the 10th Cavalry from 1875 to 1882. The fort was abandoned in June 1889 and over the next twenty years was divided into residences and businesses, with the buildings repurposed or recycled for their materials. Efforts to preserve and restore Fort Concho began in the 1900s and the Fort Concho Museum was founded in 1928. Fort Concho was named a National Historic Landmark District on July 4, 1961, and is one of the best-preserved
Former South African president Jacob Zuma (pictured) is sentenced to 15 months in prison for contempt of court.
An extreme heat wave kills more than 130 people in the Pacific Northwest of North America.
In Saskatchewan, Canada, 751


I don't know
My Language Applications
Modern Landsat Assertations
Mode Language A
Modern Linguistics Assosiations
Modest Language Association
Modern Language Association
Masked Language Applet
Modern Language Associates
Formatting
Literary Devices
Citations
Writing Style
Essay Length
Compound
Complex


Sails is committed to providing a secure framework, and quickly responding to any suspected security vulnerabilities. Contributors work carefully to ensure best practices, but we also rely heavily on the community when it comes to discovering, reporting, and remediating security issues.
If you believe you've found a security vulnerability in Sails, Waterline, or one of the other modules maintained by the Sails core team, please send an email to critical at sailsjs dot com. In the spirit of responsible disclosure, we ask that you privately report any security vulnerability at that email address, and give us time to patch the issue before publishing the details.
A security vulnerability is any major bug or unintended consequence that could compromise a Sails.js app in production.
For example, an issue where Sails crashes in a development environment when using non-standard Grunt tasks is not a security vulnerability. On the other hand, if it was possible to perform a trivial DoS attack on a Sails cluster running in a production environment and using documented best-practices (a la the Express/Connect body parser issue), that is a security vulnerability and we want to know about it.
Note that this definition includes any such vulnerability that exists due to one of our dependencies. In this case, an upgrade to a different version of the dependency is not always necessary: for example, when Express 3 deprecated multipart upload support in core, Sails.js dealt with the feature mismatch by implementing a wrapper around the
multiparty
module called Skipper.
Please respect the core team's privacy and do not send bugs resulting from undocumented usage, questions, or feature requests to this email address.
When you report a vulnerability, one of the project members will respond to you within a maximum of 72 hours. This response will most likely be an acknowledgement that we've received the report and will be investigating it immediately. Our target patching timeframe for most security vulnerabilities is 14 days.
Based upon the nature of the vulnerability, and the amount of time it would take to fix, we'll either send out a patch that disables the broken feature, provide an estimate of the time it will take to fix, and/or document best practices to follow to avoid production issues.
You can expect follow-up emails outlining the progression of a solution to the vulnerability along with any other questions we may have regarding your experience.
No. The Sails framework is available under the MIT license, which does not include a service level agreement. However, the core team and contributors care deeply about Sails, and all of us have websites and APIs running on Sails in production. We will always publish a fix for any serious security vulnerability as soon as possible-- not just out of the kindness of our hearts, but because it could affect our apps (and our customer's apps) too.
For more support options, see https://sailsjs.com/support.


CSS is the language for describing the presentation of Web pages,including colors, layout, and fonts. It allows one to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language. The seperation of HTML from CSS makes it easier to maintain sites, share style sheets across pages, and tailor pages to different environments. This is referred to as the seperation of structure(or:content)from presentation.


Homework 0 by Cheng
鄭丞佑 b06502128
Installation of visual studio code
Installation of module
1.Installation of beautify
2.Installation of open in default browser
3.Installation of Traditional Chinese language pack


This is a portable music stand with adjustable height and angle. It is particularly suitable for stage performance, congress rooms, schools and public facilities.
Features:
-The music stand with metal rivets assured reversed flexibility of the plate and stability of the disc.
-The music stands are made of thickened metal in order to reach festivity and strong.
-Metal spring arm extensions hold music sheets securely in place.
-The music stand with the screw button, the locking knob is strongly tightened to tighten the plate.


SEED Infotech Ltd.
ABOUT SEED
SERVICES
CLIENTS
CONTACT US
CAREERS AT SEED
Career Life Cycle
History
Retails
Enterlirize
Staffing
Certificates
Corporate Clients
Institutional Clients
Retail Clients
Certificates
Vacancies
Life at SEED
Enquiry Form
Cultural Events
Technology Summit


<#include "top.html"> <#include "left.html">
审核记录查看
<#list yearList as year>
${year}~${year+1}年
#list>
检索
×
点击查看详情查看教研室详情


diddy.diddy
The main module for Diddy.
Diddy includes various features:
* External functions
* Screen Based Framework
* Input Cache
* Tweening
* Collections
* Assertions
* Skinned GUI
* Simple GUI
* Serialization
* XML Parser
* Base64 Encoding/Decoding
* IO
* Tiled Loader
* Filesystem Wrapper
* i18n
* Particle System
* String Builder
* Storyboarding
* Vector2d
Table of contents:
Constants:
name
( Const name:String = "Diddy" )
Const name:String = "Diddy"
Description:
The name constant contains the library's name, "Diddy".
This document was generated using the
Jungle IDE
document generator version 14.02.11-A


Aftermath
To play: write a sentence, fold it up, and then pass it on to the next person.
Fold Up ↑
Unfold & Read


I had already tripped on 5-MeO-DiPT 4 times before a friend and I decided to independently try a high dose. (he's going to dose next weekend) Here's what I remember:
At 6:30pm I measured out 18mL of 5-MeO-DiPT solution. I drank it down and ate some chocolate to get rid of the awful taste. (my friend and I had just discovered this) I called up some friends and headed over to their apartment on foot. After about a 20 minute walk I arrived at their place. I was starting to feel it come on at this point.
At about T+1hr we passed a joint around. I only took a couple hits off it. After that things started to get really weird. Time was _very_ distorted.
Around T+2hr (I think :) we popped in a movie and turned the lights off. I'd say that around this time I peaked. Things were much more visual than they normally are on 5-MeO-DiPT. I was getting some light open eye visuals and very strong closed eye visuals. We all lost interest in the movie after about 30 minutes and proceeded into a lit room. I was still tripping pretty hard at this point and we all had a nice mellow conversation. Time was still moving very slowly.
The next couple hours were rather uneventful. At approximately T+5 hours we busted out the bong since we were about to go to the movie theater. Things had calmed down at this point, but after a couple hits I was back to the strange land of a few hours before.
At T+5:30 we arrived at the movie theater. As we were walking in I knew I was in for a very strange movie. About all can say about how I felt at this point was that I didn't feel like I was inside my body. Everything felt very far away. I must admit that this was the weirdest trip I had ever experienced. (even weirder than 4 hits of acid)
Well T+7:30 and the movie was over. I was still tripping. (still...) The movie left me in a very introspective mood. I bid my friends farewell and walked home alone. A short while later I was home and quite hungry. (I had skipped dinner to trip) After a quick meal I attempted to sleep. It was T+8 or T+8:30 and I had considerable difficulty getting to bed.
That's it. I can't say that I will ever do more than 12mg of 5-MeO-DiPT again, but I will try smoking pot with a lower dosage to see how that is. I will say that I _never_ thought I would trip that hard on 5-MeO-DiPT. All my previous trips had been pretty uneventful. If this stuff was better known and didn't leave such a nasty taste in my mouth then it would be very worthwhile.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


NWU Lekwena Radar
About
Blog
FAQ
Media
Radar
Satellite
GFS Forecast
404 Error
Ah snap! We could not find what you are looking for!
Try got get back to the Home Page and start over!
Go to the Home Page


Directive for loading responsive image when container (which is preventing reflow) is in viewport. Available as a bower and npm component. This module was made while working on the KLM travel inspiration finder as a test to contribute to Open Source, see Github for our source. We would like to thank Sandra Maas for making this possible. Resize, reload and scroll to see what gets actually loaded and when. Below you will find more examples.
Example showing another aspect ratio. The parent container always sets the max width available for the image to align.
Browser reflow is bad, especially when lazy loading images. The container aspect ratio setup sets the correct image container height (so no total repainting takes place when image is appended) based on it's css class which uses aspect-ratio. If you want different aspect ratio's for different srcset setup then introduce your own classnames.
Destroy $scope (no leaks)
Shout our for our Eden devops team: Martijn, Joel and Ramon.


sudo apt-mark auto package_name- Hold a package at its current version and prevent updates to it:
sudo apt-mark hold package_name- Allow a package to be updated again:
sudo apt-mark unhold package_name- Show manually installed packages:
apt-mark showmanual- Show held packages that aren't being updated:
apt-mark showhold


| Interface | Description |
|---|---|
| DbGroupScan |
A DbGroupScan operator represents the scan associated with a database.
|
| DbSubScan | |
| Exchange | |
| FileGroupScan |
FileGroupScan operator represents all data which will be scanned from FileSystem by a given physical plan.
|
| FragmentLeaf |
A Physical Operator that can be the leaf node of one particular execution
fragment.
|
| FragmentRoot |
Describes the root operation within a particular Fragment.
|
| GroupScan |
A GroupScan operator represents all data which will be scanned by a given physical
plan.
|
| HasAffinity |
Describes a physical operator that has affinity to particular nodes.
|
| IndexGroupScan |
An IndexGroupScan operator represents the scan associated with an Index.
|
| LateralContract |
Contract between Lateral Join and any operator on right side of it consuming the input
from left side.
|
| Leaf |
Operator which specifically is a lowest level leaf node of a query plan
across all possible fragments.
|
| PhysicalOperator | |
| PhysicalVisitor<RETURN,EXTRA,EXCEP extends Throwable> |
Visitor class designed to traversal of a operator tree.
|
| Receiver |
A receiver is one half of an exchange operator.
|
| Root |
Marker interface describe the root of a query plan.
|
| Scan | |
| Sender |
A sender is one half of an exchange node operations.
|
| Store |
An interface which supports storing a record stream.
|
| SubScan |
A SubScan operator represents the data scanned by a particular major/minor
fragment.
|
| Writer |
Writer physical operator
|
| Class | Description |
|---|---|
| AbstractBase | |
| AbstractDbGroupScan | |
| AbstractDbSubScan | |
| AbstractExchange | |
| AbstractFileGroupScan | |
| AbstractGroupScan | |
| AbstractGroupScanWithMetadata<P extends TableMetadataProvider> |
Represents table group scan with metadata usage.
|
| AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B>> |
This class is responsible for filtering different metadata levels.
|
| AbstractJoinPop | |
| AbstractMultiple |
Describes an operator that expects more than one children operators as its input.
|
| AbstractPhysicalVisitor<T,X,E extends Throwable> | |
| AbstractReceiver | |
| AbstractSender | |
| AbstractSingle |
Describes an operator that expects a single child operator as its input.
|
| AbstractStore | |
| AbstractSubScan | |
| AbstractWriter | |
| PhysicalOperatorUtil | |
| ScanStats |
Cost estimate for a scan.
|
| SchemalessBatchCreator |
The operator for creating
SchemalessBatch instances |
| SchemalessScan |
The type of scan operator, which allows to scan schemaless tables (
DynamicDrillTable with null selection) |
| Enum | Description |
|---|---|
| Exchange.ParallelizationDependency |
Exchanges are fragment boundaries in physical operator tree.
|
| ScanStats.GroupScanProperty |
Copyright © 2021 The Apache Software Foundation. All rights reserved.


Before Change
var_cardinality = len(var_states)
state_counts = self.state_counts(variable, parents)
sample_size = len(self.data)
num_parents_states = float(len(state_counts.columns))
score = 0
for (
After Change
num_parents_states = float(state_counts.shape[1])
counts = np.asarray(state_counts)
log_likelihoods = np.zeros_like(counts, dtype=np.float_)
// Compute the log-counts
np.log(counts, out=log_likelihoods, where=counts > 0)
// Compute the log-conditional sample size
log_conditionals = np.sum(counts, axis=0, dtype=np.float_)
np.log(log_conditionals, out=log_conditionals, where=log_conditionals > 0)
// Compute the log-likelihoods
log_likelihoods -= log_conditionals
log_likelihoods *= counts
score = np.sum(log_likelihoods)
score -= 0.5 * log(sample_size) * num_parents_states * (var_cardinality - 1)


FalStar is a tool for the falsification of hybrid systems. It takes as an input a model (currently: Simulink) and a configuration file and tries to come up with an input signal such that the output signal produced by the model falsifies given requirements.
Requirements
Contact: gidonernst (*) gmail.com
Gidon Ernst, Sean Sedwards, Zhenya Zhang, Ichiro Hasuo: Fast Falsification of Hybrid Systems using Probabilistically Adaptive Input, QEST 2019, Preprint: https://arxiv.org/abs/1812.04159
Gidon Ernst, Sean Sedwards, Zhenya Zhang, and Ichiro Hasuo: Falsification of hybrid systems using adaptive probabilistic search, Transactions on Modeling and Computer Simulations, 2021
Determine MATLAB path
./falstar-config.sh
Compile falstar.jar
make compile
Test whether everything worked
./falstar.sh # prints usage instructions
make test # run a simple test case
This falsifies a Simulink model of an automatic transmission against
specification always_[0,30] speed < 120
and displays
various input and output signals. Here’s the output:
trial 1/1
property always_[0.0, 30.0] speed < 120.0
algorithm adaptive
control points: 2 2 3 3 3 4
exploration ratio: 0.25
budget: 100
starting matlab ... connected (4s)
initializing 'automatic_transmission' ... done (17s)
......
inputs
t__ = [0.0; 10.0; 25.0; 30.0]
u__ = [75.0 0.0; 100.0 0.0; 37.5 243.75; 37.5 243.75]
falsified with robustness -6.849703872580591
statistics
simulations 6
total time 29s
peak memory 37111 kb
bye
If you’re tired of waiting for Matlab to initialize on every trial, you can keep an active instance running. Be aware that this caches initialized models as well, so if you change those, you need to restart the session. It’s a simple command line interface to Matlab (currently without error handling, and it will terminate if you type in an invalid command).
./falstar-session.sh
Simulink models are accessed through their input and output ports and
through the Matlab function sim
. The model must currently
be prepared for use as follows
[t__, u__]
. This will cause the simulation to read these
two variables off the workspace and interpret them as the simulation
input. t__
is a column matrix of time points and
u__
provides the corresponding input vectors in each row
for the respective time points (see an example above). The falsification
tool provides these variables to the Matlab simulation engine in this
form.tout
and
yout
(which are the default settings).usage: falstar [-dv] file_1 ... file_n
-d dummy run, parse and validate configuration only
-v be more verbose
In particular, the -v
flag shows all interaction with
the Matlab engine.
The syntax is S-expression based. Line comments are introduced with
;
.
FalStar maintains a context, consisting of
relative to which formulas are interpreted (e.g., parameter and input/output signal names). Similar to SMT-LIB, contexts can be saved and restored with
(push)
...
(pop)
The configuration file can be composed of multiple parts, where
<path>
is a doubly-quoted path that is interpreted
relative to the working directory of FalStar:
(include <path>)
The path is relatve to the inluding file, except when it starts with ‘.’ or with ‘/’ then it is used as given.
System declarations (see below) and requirements for some models are
in the models
subfolder, ready to be used.
See src/resource/configuration/test.cfg
for an example.
Currently supported system types: simulink
and
matlab
.
(define-system <identifier>
; two alternative ways to set up systems
(simulink <path> [<load>])
(matlab <name> <path> <init> <run>)
; common configuration options
(parameters p1 ... pk)
(inputs i1 ... in)
(outputs o1 ... om)
; valid input ranges
(constant pi <num>)
(constant pi <num> <num>)
(constant ij <num>)
(constant ij <num> <num>)
(piecewise-constant ij <num> <num>)
)
A system definition comprises of a declaration of how the simulation
is executed, by a simulink
or matlab
clause,
followed by a declaration of the system’s interface in terms of
parameters, input, and output ports; and a declaration of valid ranges
reps. values for these which can later be overriden if desired
simulink
A simulink system is declared by
(simulink <path> [<load>])
where <path>
must point to a .mdl
or
.slx
file. An optional list <load>
of
.m
files or .mdl
files can be specified. The
initialization sequence runs
addpath(<dir>) % where <dir> is the directory containing <path>
load_system(<name>) % where <name> is the file name stem (without suffix)
<load> % execute .m files without suffix
load(<load>) % load .mat files
and each simulation is executed with the sim
function,
where the stopping time and the external inputs are explicitly given by
Falstar (i.e., those defined in the model are overriden).
A system scripted in Matlab is declared by
(matlab <name> <path> <init> <run>)
where <name>
is an arbitrary identifier (implicit
for Simulink systems from the file name), <path>
is
the base path where scripts are located, and <init>
and <run>
are two Matlab functions used to initialize
the system and run simulations respectively.
Falstar executes initially
addpath(<path>)
<init>
and for each simulation
<run>(p, u, T)
where p
is an array of values for the parameters,
u
is a time-varying input signal, and T
is the
stopping time. The expected result is a pair [tout, yout]
describing the output trace, in the same format as .tout
and .yout
from the Array
format specified for
Simulink systems.
The interface description consists of
p1
, …, pk
, which are names of
MATLAB variables that will be initialized by FalStari1
, …, in
, which give names to
top-level input ports of the Simulink system (In
blocks),
in order of their numbers in Simulink (the names attached to the ports
in the model are ignored)o1
, …, om
, analogously for the
output ports (Out
blocks)The following lines declare the ranges of parameters and inputs, one statement for each.
pi
can be either a fixed constant value or a
range, from which the value is chosen during falsification.ii
can be either a fixed value, a constant input
signal, or a piecewise constant input signal, again with a range of
values in the latter two cases. Note that the time intervals for which
these are held constant depends on the configuration of the
falsification solver.More than one system can be defined within a Falstar script. You can pick the system that is going to be used for the subsequent falsification attempts or for validation:
(select-system <identifier>
<overrides>)
where <identifier>
refers to a previously declared
system, and <overrides>
are
(constant ...)
or (piecewise-constant ...)
definitions that can be used to override some of the settings from the
system declaration. This comes in handy if a system has several modes of
operation (like the Powertrain model).
May refer to signal names (defined by the current model)
Arithmetic operators:
< > <= >= == != + - * / abs in
Logical connectives:
! => || && true false not implies and or always eventually
For example
(abs (* 1.5 x))
denotes the absolute value of
1.5 x
where x
is a signal name(in x a b)
= (and (<= a x) (<= x b))
asserts that x
lies in the range [a,b]
(always (10 30) phi)
asserts that subformula
phi
holds over time interval [10,30]
Abbreviations, which are really just macros, can be defined as
(define <id> <S-Expr>)
These are expanded immediately when encountered in certain places, but interpreted only alongside the surrounding context. Definitions are expanded in formulas and almost in all places where numbers are expected.
First, a falsification method has to be selected. Currently the following are supported
Random sampling
(set-solver random <cp> <max-iter>)
, where
<cp>
denotes the number of control points/segments of
piecewise constant input signals and and <max-iter>
is the upper bound of iterations/simulations to run
Adaptive probabilistic search
(set-solver adaptive (<cp1> <cp2> ...) <exploration> <max-iter>)
,
where <cp1>
, <cp2>
, … declares an
(increasing) sequence of granularity levels with the
corresponding number of control points, <exploration>
is the exploration ratio (a good value is 0.25
) and
<max-iter>
is the maximum number of
iterations
Moreover, the following bridge might still work (untested):
(<set-solver breach <cp> <opt> <max-iter>)
selects falsification by Breach with <cp>
control
points, optimization method <opt>
(from
cmaes
, global_nelder_mead
, …)Requirements can be falsified by
(falsify <formula1> <formula2> ...)
Results are logged to in .csv
format if specified (in
double quotes, relative to the current file FalStar). The log file
collects entries for each individual falsification trial, whereas the
report groups them together (cf. (set-repeat _)
below) with
aggregated information on number of simulations, running time, and
success rate.
(set-log <path>)
(set-report <path>)
Usually, log and report are written only at the end, but they can be
flushed eagerly with (flush-log)
, which reads in any
previous values stored in that file and integrates the new results. It
is important to note that different solvers produce different columns in
the table, such that this merging is necessary.
The initial random seed can be specified by
(set-seed <number>)
To request each falsification trial (falsify ... )
to be
repeated multiple times (with different seeds)
(set-repeat <num>)
The general procedure for validation is described separately in file
Validation.md
. In order to make use of this feature, one
has to provide particular scripts as follows. First, set up where the
results should be stored, in a similar format to falsification runs.
Both files will be in .csv
format, existing files with
results are extended.
(set-log <path>)
(set-report <path>)
In order to validate, one can give the path to a .csv
file simply by
(validate <path>)
This assumes that all models referred to by this
<path>
in terms of their mnenonic codes have been set
up properly in the script before this line.


?Plants
of
Puerto
Rico
MAPR
Herbarium
-
Department
of
Biology
University
of
Puerto
Rico,
Mayagiiez,
PR
OLEACEAE
Forestiera
segregata
(Jacq.)
Krug
&
Urb.
Puerto
Rico,
Cabo
Rojo,
Llanos
Costa,
Las
Palmas,
Sierra
Bermeja,
northwestern
region
of
southern
hills.
Phil
Sollins
property
above
Las
Palmas,
on
steep
ENE-facing
slope.
17¡
59'22"
N,
67¡
07'43"
W
Alt:
150m
Shrub,
2
m
tall,
multistemed
from
base;
bark
grey,
smooth;
flowers
yellowish-green;
fruits
blue
with
grey
bloom;
oblong
when
mature,
immature
fruits
fusiform.
In
lower
branches
of
shrubs
and
low
trees
in
low
forest.
Breckon,
G.
7118
With:
P.
Sollins
4
November
2003
BOTANICAL
010072-
<^J>IHASED
01007218
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


My long term goal is to be a full stack developer and AWS or Azure solutions architect. I would like to work in different countries to learn more about other cultures and to work for companies that incentive people growth and wellbeing.
I am a full time student now so I can focus all my energy into learning. I believe I am a good team player, easy going and friendly, so these would be my strengths for the bootcamp. Perhaps the lack of knowledge would be a limitation, but that is why we are studying, right?
I believe the mental stress will be the biggest non-technical challenge. I put a lot of stress on myself to learn and get a job. Dealing with people can also be challenging at times depending on their personality.
Self-awareness and reflection are the skills I am working on. I believe they are the core skills to help with all the others.
To be patient, helpful and support the students technically and emotionally.
I am a calm, easy going and outgoing person, so I have no problems expressing myself. I will be following all the instructions from the teachers and the material and if I have any problems I will let them know. I believe this will be very enjoyable. I am looking forward.
My long term goal is to become a full stack developer within a year and be able to work from anywhere in the world. My wife is also in technology, so we would like to live in different countries and spend some time closer to our families.
At the moment, I am still working full time, so it has been quite challenging to get everything done. I only have one more week of work, so that is good. My biggest challenge has been to understand JavaScript, but I believe I need lots of practice (even with HTML and CSS) to fix the concepts in my mind. I am a very dedicated student and I have been studying for 6 months most days. I really want to make this happen.
I have a lot of experience dealing with people, so I don’t think there is much to develop here. This is my strongest part.
I have been told by other developers, that I have to control my time in front of the screen and sleep well because is really easy to burnout when you are learning to code. Working and studying with others is the best way of accumulating knowledge and practice your learnings. I believe that you always get what you give.
Ask for help and guidance. My 2 best friends are software developers and I also have the school to support me.
Most of the daily problems I try to sort with google and my own notes. If I cant sort it by myself, I would try the school, either a classmate or facilitator. If cant get help from the school for some reason, I would reach out to my friends.
Guidance, support and help when stuck.
I am fully commited to studying at the moment. I go to the gym and play football to relax my mind. I also play drums once a week to distract myself.


The following are basic instructions on how to get Pd installed and running on your machine. More details are maintained online on the pure-data.info site.
Pd runs under Microsoft Windows, Linux, and macOS. How to get Pd up and running depends on your operating system, but the overall strategy is the same. You must first get and install it, and then untangle whatever problems arise in handling audio and MIDI input and output, and finally get Pd to meet its real-time obligations reliably.
Installation instructions are platform-specific; the following three sections will describe what to do for various operating systems you might have. In case of trouble also consult the Pd mailing list archive on https://lists.puredata.info/listinfo/pd-list. , which often has late-breaking news about configuration problems and solutions. The rest of this section describes how to get audio and MIDI to work.
To test audio and MIDI, start Pd and select "test Audio and MIDI" from the "Media" menu. You should see a window like this:
First, try to get Pd to play a sine wave over your speakers. The "TEST TONE" control at top left turns this on and off. Normally, all the output channels are turned on so that when you turn the tone on (to a soft -40 dB or a louder -20 dB) you should get output on the first eight of your output channels. (If you have fewer than 8 output channels open, the extra channels aren't played; and if you have more, this particular patch won't use them.)
If there's anything wrong, the most likely outcome is that you will hear nothing at all. This could be for any of at least three reasons: Pd might have failed to open the audio device; the audio card's output volume might be set to zero; or your audio system might not be set to amplify the computer output.
The number boxes labeled "AUDIO INPUT" show the levels of incoming audio, in dB, with 100 being maximum. (Incoming signals may clip at RMS levels below 100; for instance, a sinusoid clips at about 97 dB.) Any DC present in the input (such as you get with cheap audio hardware) will show up as level unless you turn on the "input hipass" toggle at right; then the DC component is filtered out before metering.
To test the quality of audio input and output, turn on "monitor" (also at right) which causes the inputs to be played to the outputs at unit gain. You should hear a faithful, non-distorted copy of whatever is sent through the patch.
It is easy to get two copies of Pd running by accident; on most machines only one at a time may be inputting and outputting sound. (Some copy of Pd might have audio or MIDI devices open and prevent the copy you're trying to use from getting access to them.) Having extra copies of Pd around will also eat CPU cycles uselessly.
You may be interested in getting only audio output or audio input, or you may need both to run simultaneously. By default, Pd will try to run both, but if you don't need either input or output, you may find that Pd runs more reliably, or at least more efficiently, with the unused direction turned off. This may be specified in Pd's command line flags or using the "audio settings" dialog panel.
Depending on your application you will have a more or less stringent latency requirement. Ideally, when any input (audio, MIDI, keyboard, network) is available, the outputs (in particular the audio output) should react instantly. In real life, it is necessary to buffer the audio inputs and outputs, trying always to keep some number of milliseconds ahead of real time to prepare for the inevitable occasions where the CPU runs off to service some different task from Pd. How small this latency can be chosen depends on your OS and your audio driver.
TIP: If Pd starts up but you get distortion or glitches in the audio output, this could be either because the "audio I/O buffer" isn't big enough, or else because the CPU load of the patch you're running is too great for the machine you have, or else because the ADC and DAC are out of sync or even at different sample rates. To test for the first possibility, try increasing the audio latency in the command line or the "audio settings" dialog (but see also under your OS below.) For the second, start up your favorite performance monitor program; and for the third, try starting Pd up with ADCs disabled.
In addition to the "test audio and MIDI" patch, the "Media" menu contains items for controlling audio and MIDI settings. The first two items, "Audio on" and "Audio off", open or close the audio devices and start or stop Pd's audio computation.
If there is a choice of audio API to make, the Media menu will display them. (On Linux, they are OSS, ALSA, and Portaudio; on Windows, you get MMIO and ASIO). On Mac the only one is Portaudio. More information about the APIs appears in the sections below.
Selecting an API (even if it's the one already in use), or, alternatively, selecting "Audio Settings..." from Preferences, opens a dialog panel like this:
Next you get a choice of input and output device. If you want to open more than one, hit "use multiple devices" and you'll be allowed up to 4 in and 4 out. Each audio device is 2 channels by default, but you may specify more if your hardware supports it. Other parameters may be tweaked using the command line; see under preferences and startup options .
System exclusive MIDI message input and output are theoretically supported but does not work uniformly across all operating systems..
Pd should work under any version of Windows since 95. You can download as a self-extracting archive (a ".exe" file). Run this and select a destination directory when prompted, such as "\pd" or "Program Files\pd".
If for example you put Pd in "C:Program Files\pd", the executable program will be "C:Program Files\pd\bin\pd". You can simply adjust your path to include C:\pd\bin and then invoke "pd" in a command prompt window. You can also make a shortcut to the executable program (left-click on it and drag to the desktop, for example.)
Pd requires "TCP/IP networking" to be turned on. This doesn't mean you have to be on a real network, but simply that Pd actually consists of two programs that make a "network link" (locally) to intercommunicate.
Pd offers both the ASIO and MMIO APIs in Windows. Which of these works better will depend on your audio hardware.
MIDI timing is very poor if you are using simultaneous audio input and output; if you suppress either audio input or output things will improve somewhat under Window; you can apparently get the jitter down to ~40 msec. On W95 performance is simply terrible. W98, with either audio input or output suppressed, offers fairly good MIDI timing (~5 msec jitter). The "first edition" used to crash occasionally; this might be fixed in the "second edition".
As of version 0.35 Pd supports ASIO. Invoke Pd as "pd -asio" and, if needed, specify "-sounddev" (etc.) flags to specify which device (see "the Pd command line" below.) You can also specify a "-blocksize" different from the default (256 samples) and "-audiobuf" in milliseconds. Pd will round this down to a power of two buffers, each of "-blocksize" in sample frames.
TIP: Often your machine will allow you to use ASIO with built-in PC audio hardware. Sometimes it is necessary to set a ridiculously high block size for this to work (on my machine I have to set it to 4096 -- about 1/10 of a second!)
Using MMIO I've been able to get very low latencies (6 msec) using M-audio PCI converters (Delta 44).
What to do depends on which flavor of Linux you are running (e.g., Debian or Red Hat). The instructions here should work for Pd 0.33 and up regardless of your situation. (If not, you can read the Pd mailing list archives for recent problems; if you have found a new problem you're welcome to post it to the list.)
Pd is available via the package systems for some Linux distributions, but not always in the most recent version possible. It's relatively easy to compile your own copy of Pd and that is the approach described here.
Before you start, you might want to check that you have the resources Pd needs. The main things you need are the C compiler, X windows (including the X development package for Pd to link against), TK, and the ALSA "devel" headers. It should be enough to load "tcl-devel", "tk-devel", and "alsa-devel" packages using yum or apt-get.
There are two parallel compilation setups now available. The old one is described here; as of 0.43 I still use that but I plan to discontinue this for 0.44 and start using only the new one. The following description applies to the old one. Look in the INSTALL.txt file to see how to use the new one.
Download Pd, perhaps from http://msp.ucsd.edu/software.html , to file such as "pd-linux-033.tar.gz". Open a "shell" window, cd to the directory containing the file, and type the command,
tar xzf pd-linux-033.tar.gz
which creates a directory named "pd". I do this from my home directory. Next, compile it. "cd" to pd and read the INSTALL.txt, or else just cd to "pd/src" and type
./autogen.sh
./configure
make
You can pass flags to "configure" to customize your compilation:
To enable debugging (and losing code optimization) add "--enable-debug". To use Portaudio, add "--enable-portaudio". To put Pd in /usr/bin instead of /usr/local/bin, add "--prefix=/bin".Alsa and Jack support should auto-configure, but "--enable-alsa" od "--enable-jack" will force their inclusion.
After "make", just type "~/pd/bin/pd" to run pd.
Alternatively, as superuser, you can run "make install" after "make depend" and then anyone on your system can just type "pd" to run it.
Next try audio. We want to know whether audio output works, whether audio input works, and whether they work simultaneously. First run "aumix" (or any newer audio mixer app) to check audio input and output gains and learn which input (mic; line; etc.) is "recording". Then test audio output by running
pd -noadc
and selecting "test audio and MIDI" from the "Media" menu. You should see a patch. Turn on the test tone and listen. Do the usual where's-the-signal business.
Then quit Pd and test audio input via
pd -nodac
Re-open the test patch and hit "meter"; look at the levels. 100 dB is a hard clip; arrange gains so that the input signal tops out around 80 or 90, but no higher.
Now see if your audio driver can do full duplex by typing "pd" with no flags. If you see error messages involving /dev/dsp or /dev/dsp2, you're probably not able to run audio in and out at the same time. If on the other hand there's no complaint, and if the audio test patch does what you want, you might wish to experiment with the "-audiobuffer" flag to see what values of audio latency your audio system can handle.
Installing and testing audio and MIDI drivers in Linux can take days or weeks. There appears to be no single place where you can get detailed information on Linux audio.
There are two widely-used driver sets, called "OSS" and "ALSA". ALSA is included in the standard Linux kernel since 2.4 or so. However, for some audio cards you can find newer versions than are included in the kernel releases. You can get ALSA from http://www.alsa-project.org/ .
ALSA is able to emulate OSS, so that you can usually run Pd using the "OSS" driver settings even if it's actually ALSA that's running.
By default, Pd uses ALSA. You can ask Pd to use ALSA's OSS emulation by adding the "-oss" flag to the command line or fooling with the "media" menu items.
You can add ALSA devices by name on the Pd command line:
pd -alsaadd loupgarouThis instructs Pd to offer the 'loupgarou' audio device in the Audio Settings panel.
Here are some of my own experiences with sound cards so far. See also the Pd mailing list archives.
This is the best PCI sound card out there; it costs around $500 and has 3 ADAT I/O ports and one SPDIF. There is a "baby hammerfall" also, which I think is the "9632." DO NOT CONFUSE THE 9652/9632 WITH OTHER RME BOARDS WHICH MIGHT NOT WORK WITH PD.
The easiest way to use Hammerfall boards in Pd is via ALSA and jack; but you can use ALSA alone:
pd -alsa -channels 26works for me.
Midiman sells PCI devices (delta 44, 66, 1010, and 1010LT) with between 4 and 10 channels in and out, for which there are ALSA drivers. These are also very good, and they are a bit cheaper than Hammerfalls. The driver name is "ice1712".
Ed Kelly reports success with the Lexicon series of USB 1.0 devices (e.g., the Omega Studio; apparently 4 channels in and 4 out). Also known to work well is the Edirol box (2 channels in and out).
As of Sept. 2011, the only multi-channel USB device I've been able to use with Pd is the Native Instruments Traktor Audio series. (I have the Audio Traktor 10 which does indeed get 10 discrete channels in and out; the box is designed for turntables and the I/O is all RCA. I haven't yet tested whether the inputs are RIAA equalized or flat. To run this device you'll need to compile and install an ALSA snapshot from at least September 2011. This won't start showing up in Linux distros for at least some months.
The Alsa developer list is reporting progress on the M-audio Ultra series, which goes up to 6 in and out (analog) with 2 more as SP/DIF. Things work OK for input or output separately but "full duplex" (in and out simultaneously) has sync problems.
Pd version 0.35 and up support macOS. Recent versions of Pd require 10.6 or up.
To install Pd you can always download the sources and compile them yourself, or (easier) just download the Mac binary from the download page: http://msp.ucsd.edu/software.html or from the Pure Data community site: https://puredata.info This is in the form of a compressed tar.gz archive; just double click on it to extract the Pd application. Open this and you should be running.
You might get various warnings about Pd trying to open an internet port. This is normal although some system administrators will prevent you from doing this (in which case you can't run Pd on that machine).
Whether you've downloaded the source or the "package" you can always compile Pd for yourself, whether to make your own improvements, or possibly so that you can get the newest version before it shows up compiled for macOS.
To be able to compile Pd, you must have Tcl/Tk installed in the standard places. I think this is true for all reasonably recent releases of macOS.
Overview: Just as for Linux, extract pd-#.#.#.tar.gz into a directory such as ~/pd-0.47-1, cd to ~/pd-0.47-1, run:
./autogen.sh
./configure
make
Then type ~/pd-0.47-1/bin/pd to a shell and enjoy!
Detailed build instructions can be found in the INSTALL.txt included with the Pd source distribution.
If you wish you can put a line such as,
alias pd ~/pd/bin/pd
in the file, ~/.tcshrc, so that you can later just type "pd" to a shell. (The shell only reads the ~/.tcshrc file on startup, so this won't take effect in any existing shells unless you specially type
source ~/.tcshrc
to them.)
Follow the general directions above for testing audio and/or MIDI as needed.
To get MIDI working, you have to do the macOS magic to get a USB MIDI interface installed. I've seen this done with Midisport devices and I think you just download the macOS driver and follow directions.
Pd's behavior may be customized to instruct it where to find files, which audio devices to open, what font size to use, and so on. Most of these may also be changed using the various dialogs you can open from Pd's menus. Others take effect only when Pd starts up; some of these appear on the "startup" dialog and some of them, too cranky to put in a GUI, must be typed as command line arguments .
In addition to the Audio and MIDI settings (see Audio and MIDI ), you can customize font size (from the "edit" menu), directories to search for files (see How Pd searches for files ), and additional startup parameters described below.
All of these settings may be saved automatically between Pd sessions. It is also possible to specify settings directly via the command line . (A third mechanism, using configuration files, is deprecated and isn't described here.) The Pd command line is described in the next section. Command line settings, if given, each override the corresponding setting that was saved from Pd.
The startup settings (i.e., those that take effect only when Pd is started) are controlled using the "startup..." dialog from the File menu. The dialog appears as follows:
The "defeat real-time scheduling" control, if enabled, makes Pd run without its usual effort to become a real-time process (whatever this means in the operating system you are using.) In Unix, Pd must usually be setuid to allow real-time scheduling at all.
The "startup flags" allow you to add to Pd's command line on startup. This is specified as described below, except that the initial word, "pd", is understood. For example, putting "-rt" in this field sets real-time scheduling; "-sleepgrain 1" sets the sleep grain to 1 (see under MIDI below), and typing "-rt -sleepgrain 1" does both.
You may save the current settings for future Pd sessions with the "save all settings" button; this saves not only the path but all other settings as well.
Pd may be run as a "command line" program from your "terminal emulator," "shell," or "MSDOS prompt." In Windows, if Pd is started using a "shortcut" it is also run from a command line which you can edit using the "properties" dialog for the shortcut. In any operating system, Pd can be called from a script (called a batch file on Windows or a shell script on macOS or Unix). The command line is just a line of text, which should be of the form:
pd [options] [patches to open]
although you may have to specify a path (such as "~/pd/bin/pd" or "C:\program files\pd\bin\pd") so your command interpreter can find Pd. Possible options include:
audio configuration flags: -r <n> -- specify sample rate -audioindev ... -- sound in device list; e.g., "2,1" for second and first -audiooutdev ... -- sound out device list, same as above -audiodev ... -- specify both -audioindev and -audiooutdev together -inchannels ... -- number of audio in channels (by device, like "2" or "16,8") -outchannels ... -- number of audio out channels (by device) -channels ... -- specify both input and output channels -audiobuf <n> -- specify size of audio I/O buffer in msec -blocksize <n> -- specify audio I/O block size in sample frames -sleepgrain <n> -- specify number of milliseconds to sleep when idle -nodac -- suppress audio output -noadc -- suppress audio input -noaudio -- suppress audio input and output (-nosound is synonym) -listdev -- list audio and MIDI devices (linux specific audio:) -oss -- use ALSA audio drivers -alsa -- use ALSA audio drivers -pa -- use portaudio (experimental version 19) -alsadev <n> -- obsolete: use -audiodev -32bit -- (probably obsolete) -- use 32 bit OSS extension -alsaadd <dev> -- add a device to the ALSA device list (Windows specific audio:) -mmio -- use MMIO drivers and API -asio -- use ASIO drivers and API MIDI configuration flags: -midiindev ... -- midi in device list; e.g., "1,3" for first and third -midioutdev ... -- midi out device list, same format -mididev ... -- specify -midioutdev and -midiindev together -nomidiin -- suppress MIDI input -nomidiout -- suppress MIDI output -nomidi -- suppress MIDI input and output -alsamidi -- use ALSA midi API general flags: -path <path> -- add to file search path -nostdpath -- don't search standard ("extra") directory -stdpath -- search standard directory (true by default) -helppath <path> -- add to help search path -open <file> -- open file(s) on startup -lib <file> -- load object library(s) -font <n> -- specify default font size in points -verbose -- extra printout on startup and when searching for files -version -- don't run Pd; just print out which version it is -d <n> -- specify debug level -noloadbang -- suppress all loadbangs -stderr -- send printout to standard error instead of GUI -nogui -- suppress starting the GUI -guiport <n> -- connect to pre-existing GUI over port 'n' -guicmd "cmd..." -- substitute another GUI program (e.g., rsh) -send "msg..." -- send a message at startup (after patches are loaded) -rt or -realtime -- use real-time priority (needs root privilege) -nrt -- don't use real-time priority -nosleep -- never relinquish CPU (only for multiprocessors!)
Here are some details on some of the audio, MIDI, and scheduler options (but see also the next section on file management.)
You can specify multiple MIDI input and output devices. For example, "pd -midiindev 3 -midioutdev 4,2" asks for the third MIDI input device and the fourth and second MIDI output device.
Audio device selection is similar, except that you can also specify channels by device: "-audioindev 1,3 -inchannels 2,8" will try to open device 1 (2 channels) and device 3 (8 channels.)
The sample rate controls Pd's logical sample rate which need not be that of the audio input and output devices. If Pd's sample rate is wrong, time will flow at the wrong rate and synthetic sounds will be transposed. If the output and input devices are running at different rates, Pd will constantly drop frames to re-sync them, which will sound bad. You can disable input or output if this is a problem.
You can specify an audio buffer size in milliseconds, typically between 10 and 300, depending on how responsive your OS and drivers are. If this is set too low there will be audio I/O errors ("data late"). The higher the value is, on the other hand, the more throughput delay you will hear from the audio and/or control inputs (MIDI, GUI) and the audio coming out.
You can also specify the audio block size in sample frames. This is 64 by default (except for MMIO for which it's 256), and may be 64, 128, or 256.
In Linux, if you ask for "pd -midioutdev 1" for instance, you get /dev/midi0 or /dev/midi00 (or even /dev/midi). "-midioutdev 45" would be /dev/midi44. In Windows, device number 0 is the "MIDI mapper", which is the default MIDI device you selected from the control panel; counting from one, the device numbers are card numbers as listed by "pd -listdev."
The "sleepgrain" controls how long (in milliseconds) Pd sleeps between periods of computation. This is normally the audio buffer divided by 4, but no less than 0.1 and no more than 5.
Pd has a search path feature; you specify the path on the command line using the "-path" option. Paths may contain any number of files. If you specify several files in a single "-path" option they're separated by colons in Unix or semicolons in Windows.
You can see and edit the path while Pd is running using the "path..." item in the "File" menu:
The path must be correctly set before you load a patch or it may fail to find abstractions, etc., that are needed to construct the patch. When Pd searches for an abstraction or an "extern" it uses the path to try to find the necessary file. The "read" messages to qlists and arrays (aka tables) do this too.
If "use standard extensions" is enabled, the usual "extras" directory is also searched. This contains standard external objects like "expr" and "fiddle", and perhaps much more depending on the distribution of Pd you're using.
You may save the current settings for future Pd sessions with the "save all settings" button; this saves not only the path but all other settings as well.
Path entries may be relative to the patch directory; for instance, if your path has an item, "../sound", and your patch is in "my stuff/all mine", then Pd will look in "my stuff/sound". Spaces should be OK in the path to the patch, but not in the path entry (../sound) itself. This is useful if you have a patch and supporting files (even a supporting snapshot of pd) that you want to distribute or carry around together.
Regardless of path, Pd should look first in the directory containing the patch before searching down the path. Pd does not automatically look in the current directory however; to enable that, include "." in the path. The "extra" directory, if enabled, is searched last.
Filenames in Pd are always separated by (Unix-style) forward slashes, even
if you're on Windows (which uses backslashes). This is so that patches can be
ported more easily between operating systems. On the other hand, if you
specify a filename on the command line (as in "pd -path c:\pdlib") the file
separator should agree with the operating system.
A filename specified in a patch with any "/" characters in it (such as "../sounds/sample1.wav") causes Pd to to look both in the path and relative to the directory containing the patch. You may also invoke externs that way.
As of version 0.35, there may be spaces in the path to Pd itself; also, the "openpanel" and "savepanel" objects can handle spaces. Spaces in the path should work as of version 0.38.


\(df(t, X_t) = \left(\frac{\partial f}{\partial t} + \mu_{t}\frac{\partial f}{\partial x} + \frac{1}{2} \sigma^2_t\frac{\partial^2 f}{\partial x^2}\right) dt + \sigma_t\frac{\partial f}{\partial x} dB_t\)
This is an equation called Ito's Lemma which is very commonly used in mathematical finance.
The first line says that you have a new function over time that has a "non-wiggly" part added to a "wiggly" part. Typically this is a stock price which has a "non-wiggly" part and a "wiggly" part.
So the first line just defines the process.
Now I want to calculate a new function that is based on the random process. A trivial example is if I have the equation for one share of stock and I want to calculate the behavior of two shares of stock. A less trivial example would be if I have a basket of stocks that is changing over time, or if I have something like a stock option which whose value isn't a trivial function of that stock.
The second line says that if I perform a function on a random process (i.e a function with a "non-wiggly" and a "wiggly" part) that I get a new random process with a different "non-wiggly" and a "wiggly" part.


This tutorial explores the use of monads to structure functional programs.
Monads increase the ease with which programs may be modified. They can mimic the effect of impure features such as exceptions, state, and continuations; and also provide effects not easily achieved with such features. The types of a program reflect which effects occur.
As part of the tutorial, a simple interpreter is modified to support various extra features: error messages, state, output, and non-deterministic choice.
One factor that should influence my choice is the ease with which a program can be modified. Pure languages ease change by making manifest the data upon which each operation depends. But, sometimes, a seemingly small change may require a program in a pure language to be extensively restructured, when judicious use of an impure feature may obtain the same effect by altering a mere handful of lines.
Say I write an interpreter in a pure functional language. To add error handling to it, I need to modify the result type to include error values, and at each recursive call to check for and handle errors appropriately. Had I used an impure language with exceptions, no such restructuring would be needed.
To add an execution count to it, I need to modify the the result type to include such a count, and modify each recursive call to pass around such counts appropriately. Had I used an impure language with a global variable that could be incremented, no such restructuring would be needed.
To add an output instruction to it, I need to modify the result type to include an output list, and to modify each recursive call to pass around this list appropriately. Had I used an impure language that performed output as a side effect, no such restructuring would be needed.
Or I could use a monad.
This tutorial walks you through using monads to structure an interpreter so that the changes mentioned above are simple to make. In each case, all that is required is to redefine the monad and to make a few local changes. This programming style regains some of the flexibility provided by various features of impure languages. It also may apply when there is no corresponding impure feature.
Though this tutorial concentrates on the use of monads in a program tens of lines long, it also sketches our experience using them in a program three orders of magnitude larger.
A term is either a variable, a constant, a sum, a lambda expression, or an application.
type Name = String data Term = Var Name | Con Integer | Term :+: Term | Lam Name Term | App Term Term deriving (Show)
The interpreter has been kept small for ease of illustration. It can easily been extended to deal with additional values, such as booleans, pairs, and lists; and additional term forms, such as conditional and fixpoint.
The following will serve as test data.
term0 = (App (Lam "x" (Var "x" :+: Var "x")) (Con 10 :+: Con 11))
In more conventional notation this would be written ((\ x -> x + x) (10 + 11)). The value corresponding to the evaluation of term0 is "42".
A value is either Wrong, a number, or a function. The value Wrong indicates an error, such as an unbound variable, an attempt to add non-numbers, or an attempt to apply a non-function.
data Value = Num Integer | Fun (Value -> M Value) | Wrong instance Show Value where show (Num x) = show x show (Fun _) = "" show Wrong = " "
For our purposes, a monad is a triple (M,return,>>=) consisting of a type constructor M and a pair of polymorphic functions.
return :: a -> M a (>>=) :: M a -> (a -> M b) -> M b
The basic idea in converting a program to monadic form is this: a function of type a -> b is converted to one of type a -> M b. Thus, in the definition of Value, functions have type Value -> M Value rather than Value -> Value, and the interpreter function interp has type Term -> Environment -> M Value rather than type Term -> Environment -> Value.
Similarly for the auxiliary functions lookupEnv, add, and apply.
type Environment = [(Name, Value)] interp :: Term -> Environment -> M Value interp (Var x) env = lookupM x env interp (Con i) _ = return (Num i) interp (t1 :+: t2) env = do v1 <- interp t1 env v2 <- interp t2 env add v1 v2 interp (Lam x e) env = return $ Fun $ \ v -> interp e ((x,v):env) interp (App t1 t2) env = do f <- interp t1 env v <- interp t2 env apply f v lookupM :: Name -> Environment -> M Value lookupM x env = case lookup x env of Just v -> return v Nothing -> return Wrong add :: Value -> Value -> M Value add (Num i) (Num j) = return (Num (i + j)) add _ _ = return Wrong apply :: Value -> Value -> M Value apply (Fun k) v = k v apply _ _ = return Wrong test :: Term -> String test t = showM $ interp t []
The identity function has type a -> a. The corresponding function in monadic form is return, which has type a -> M a. It takes a value into its corresponding representation in the monad.
Consider the case for constants.
interp (Con i) _ = return (Num i)
The expression (Num i) has type Value, so applying return to it yields the corresponding M Value, as required to match the type of interp.
For the more interesting cases we use the do notation. Consider the case for sums.
interp (t1 :+: t2) env = do v1 <- interp t1 env v2 <- interp t2 env add v1 v2
This can be read as follows: evaluate t1; bind v1 to the result; evaluate t2; bind v2 to the result; add v1 to v2.
Application is handled similarly; in particular, both the function and its argument are evaluated, so this interpreter is using a call-by-value strategy.
Just as the type Value represents a value, the type M Value can be thought of as representing a computation. The purpose of return is to coerce a value into a computation; the purpose of >>= is to evaluate a computation, yielding a value.
Informally, return gets us into a monad, and >>= gets us around the monad. How do we get out of the monad? In general, such operations require a more ad hoc design. For our purposes, it will suffice to provide the following.
showM :: M Value -> StringThis is used in test.
By changing the definitions of M, return, >>=, and showM, and making other small changes, the interpreter can be made to exhibit a wide variety of behaviours, as will now be demonstrated.
type M a = Identity a showM ma = show (runIdentity ma)
Identity encapsulates the identity function on types, return is the identity function, >>= is postfix application, and showM extracts the value and shows it. Simplifying in the above definition we obtain the standard meta-circular interpreter for lambda calculus:
interp :: Term -> Environment -> Value interp (Var x) e = lookup x e interp (Con i) e = Num i interp (u :+: v) e = add (interp u e) (interp v e) interp (Lam x v) e = Fun (\ a -> interp v ((x,a):e)) interp (App t u) e = apply (interp t e) (interp u e)The other functions in the interpreter simplify similarly.
For this variant of the interpreter, evaluating test term0 returns the string "42", as we would expect.
For each of the following exercises (variations), copy var0.hs as varn.hs and update it as the exercise requires.
Instead of using the Wrong value to record failed evaluations, define M as the Maybe monad and use Nothing to record failed evaluations.
You need to remove Wrong and its aparitions and need to redefine showM, and change the definitions of lookupM, add, and apply.
To improve the error messages, use the Either monad.
The showM function must display either the successful result introduced by "Success: ", or the error message introduced by "Error: ".
To modify the interpreter, substitute monad E for monad M, and replace each occurrence of return Wrong by a suitable Left expression. The only occurrences are in lookupM, add, and apply. No other changes are required. The error messages should be:
Evaluating test term0 should return "Success: 42"; and evaluating
test (App (Con 7) (Con 2))should return "Error: should be function: 7".
In an impure language, this modification could be made using exceptions or continuations to signal an error.
To illustrate the manipulation of state, the interpreter is must be modified to keep count of the number of reductions that occur in computing the answer. The same technique could be used to deal with other state-dependent constructs, such as extending the interpreted language with reference values and operations that side-effect a heap.
The monad of state transformers is the State monad.
A state transformer takes an initial state and returns a value paired with the new state. The return function returns the given value and propagates the state \ unchanged. The >>= function takes a state transformer ma :: M a and a function k :: a -> M b. It passes the initial state to the transformer ma; this yields a value paired with an intermediate state; function k is applied to the value, yielding a state transformer (k a :: S b), which is passed the intermediate state; this yields the result paired with the final state.
To model execution counts, take the state to be an integer.
type M a = State Integer aThe showM should use the function runState with the initial state 0 and should prints the final value and counter.
Evaluating test term0 should return "Value: 42; Count: 3".
To achieve this, define the computation to increase the counter:
tickS :: M ()and modify functions add or apply using tickS to increase the counter for each call to them.
You can either use the state :: (s -> (a,s)) -> M a function to embed a simple state action into the monad, or the modify :: (s -> s) -> M () to map an old state to a new state inside the state monad.
A further modification extends the language to allow access to the current execution count.
First, define a function to return the current count.
fetchS :: S sYou can either use the state :: (s -> (a,s)) -> M a function or the get :: M s which returns the state from the internals of the monad.
Second, extend the term data type, and add a new term Count.
Third, define interp for Count to fetches the number of execution steps performed so far, and returns it as the (Num) value of the term. For example, applying test to
(Con 1 :+: Con 2) :+: Countshould return "Value: 4; Count: 2", since only one addition occurs before Count is evaluated.
In an impure language, these modifications could be made using state to contain the count.
Next we modify the interpreter to perform output. The state monad seems a natural choice, but it's a poor one: accumulating the output into the final state means no output will be printed until the computation finishes.
Instead, we will use the Writer monad.
type M a = Writer String a
The Writer monad behaves as follows. Each value is paired with the output produced while computing that value. The return function returns the given value and produces no output. The >>= function performs an application and concatenates the output produced by the argument to the output produced by the application.
Modify showM function to print the output followed by the value. You can use the runWriter :: M a -> (a, w) to extract the value and the output from a computation.
Extend the language an output operation, by adding a new term Out Term.
Evaluating Out u causes the value of u to be sent to the output, and also returned as the value of the term.
For example, applying test to
Out (Con 41) :+: Out (Con 1)should return "Output: 41; 1; Value: 42".
In an impure language, this modification could be made using output as a side effect.
We now modify the interpreter to deal with a non-deterministic language that returns a list of possible answers.
To do so, we will use the monad of lists.
type M a = [a]
Extend the interpreted language with two new constructs: Fail and Amb Term Term.
Evaluating Fail should return no value, while evaluating Amb u v should return all values returned by either u or v. Extend interp to achieve this semantics.
For example, applying test to
App (Lam "x" (Var "x" :+: Var "x")) (Amb (Con 1) (Con 2))should return "[2,4]".
It is more difficult to see how to make this change in an impure language. Perhaps one might create some form of coroutine facility.


Currently in the business world, we are witnessing a fact that the Internet is essential to modern living. It is hard to think how businesses can communicate and operate fast without the Internet. Companies nowadays use the web to perform their business processes efficiently and allow them to expand easily. It gives them the edge and the ability to connect with other businesses and organizations and promote their products and services. These services we offer are just about it and we have proven to deliver them with quality and excellence.
We are built to build web solutions that can help execute business processes efficiently.
We help create unique web personalities and make brands completely stand out and make things attractive.
We are readily equipped to implement various innovative mobile apps for any reason.
We can fashion effective videos that are fresh, slick, groundbreaking and revolutionary.
We fabricate automation, sensor, and wireless control systems by coupling hardware with software.
We are privileged to work with companies who have passion for technology and entrepreneurs who want to bring something new to the world. We are engaged in different ways and we don't take this lightly. We help them solve business and real world problems by bringing innovation that help them succeed and create value in a networked world.
Our team uses a wide range of tools to bring the best software to our clients. Through continuous learning, we make sure we don't get left behind with technology.
We are a bunch of crazy geeks and artists with one common passion, the love for design and code. We decided to start a company with a single vision in mind - that through teamwork, great attitude and good appearance, we'll ascend above the circumstances and burst beyond the limits set by men in order to provide service that is excellent, remarkable, and awesome and allows our clients to prevail against the challenges of the competitive market.
The Movie Junkie
The Art Enthusiast
The Skater
The Musician
The Resident DJ
The Tinker
The Daddy
The Video Game Fanatic
The Selfie
The Magic Card Player
The Fashionista
Your passion
(632) 551 6196
<EMAIL_ADDRESS>UPH-G Burgundy Corporate Tower
252 Senator Gil Puyat AvenueMakati City 1200


--- layout: page title: About header-img: "img/about-bg.png" ---
A proponent of the precise, efficient nature of coding while also craving the whimsical nature of snowboarding. Keep life simple. Keep life balanced.


Hello, I am Christyn Garcia,
A Full Stack Software Development Student
About Me
Eager and versatile Entry Level Software Developer with verifiable experience in creating programs and projects utilizing HTML, CSS, JavaScript, JQuery, MySQL, Bootstrap and more. Dedicated, focused, and excels at prioritizing, completing multiple tasks simultaneously and following through to achieve project goals. Currently attending a Full Stack Software Development Bootcamp through UT Austin and upon graduation, will be seeking a position within an organization where my skills and experience will be both valued and utilized.
Front End Development
Optimizing the user experience using HTML, JavaScript and CSS to bring concepts to life.
Back End Development
Creating and maintaining technology at the back end of the website (the server, database and application).
Projects
Jobster - A web app where users can track all of their applications in one place by submitting the appropriate information in our forms.
Stargazers - A website designed to allow users to enter their location and see the constellations above them or anywhere else in the world.
Weather Dashboard - This website allows the user to input their location and receive back the current weather, as well as, an additional five day forecast.
Day Scheduler - This website functions as a work day planner that allows you to input your daily schedule according to time. As each hour passes, the color of each hour row will change colors to represent past, present
and future.


Modules
|
Alphabetical List
|
Class List
|
Directories
|
File List
|
File Members
|
GIL Home Page
Generic Image Library
Documentation
A Quick, Hands-on
Tutorial
.
A Detailed
Design Guide
.
Modules
Basic Concepts
Point
Concepts
Models
Algorithms and Utility Functions
Color, Color Space, and Layout
Concepts
Models
Channel
Concepts
Models
Algorithms and Utility Functions
ColorBase
Concepts
Models
Algorithms and Utility Functions
PixelBased
Concepts
Models
Algorithms and Utility Functions
Pixel
Concepts
Models
Algorithms and Utility Functions
Pixel Dereference Adaptor
Concepts
Models
Pixel Iterator
Concepts
Models
Pixel Locator
Concepts
Models
Image View
Concepts
Models
Algorithms and Utility Functions
Image
Concepts
Models
Metafunctions
Type Factory Metafunctions
Type Analysis Metafunctions
Variant
I/O
JPEG I/O
TIFF I/O
PNG I/O
Generated on Thu Nov 8 21:53:16 2007 for Generic Image Library by
1.4.4


Analyzing text and exploring strategies to gain a competitive edge.
Jeopardy: Probability and Statistics
Analyzing text and exploring strategies to gain a competitive edge.
1. About Jeopardy!
Jeopardy! is an American television game show created by Merv Griffin. The show features a quiz competition in which contestants are presented with general knowledge clues in the form of answers, and must phrase their responses in the form of questions. Three contestants, including the previous show’s champion, compete in a quiz game comprising three rounds: Jeopardy!, Double Jeopardy!, and Final Jeopardy!. The material for the clues covers a wide variety of topics, including history and current events, the sciences, the arts, popular culture, literature, and languages.
The first episode aired on: September 10, 1984
2. Exploring the Data
To increase our chances of winning, we will analyze content from previously aired episodes. To do this we will scrape our data from J-Archive, a fan-created archive of Jeopardy! games. Our dataset includes the following columns:
| Columns | Definition |
|---|---|
| Show Number | Jeopardy episode from which the question appeared. |
| Air Date | The date the episode aired. |
| Round | The Jeopardy round the question was asked in. |
| Category | The category of the question. |
| Value | The value gained or lost depending on answering correctly. |
| Question | The question being asked. |
| Answer | The correct answer to the question. |
import csv
import numpy as np
import pandas as pd
# Read the dataset into a Dataframe called jeopardy
jeopardy = pd.read_csv("jeopardy.csv")
# Print the number of rows and columns
print(jeopardy.shape)
# Print out the first 5 rows of jeopardy
jeopardy.head()
(19999, 7)
| Show Number | Air Date | Round | Category | Value | Question | Answer | |
|---|---|---|---|---|---|---|---|
| 0 | 4680 | 2004-12-31 | Jeopardy! | HISTORY | $200 | For the last 8 years of his life, Galileo was ... | Copernicus |
| 1 | 4680 | 2004-12-31 | Jeopardy! | ESPN's TOP 10 ALL-TIME ATHLETES | $200 | No. 2: 1912 Olympian; football star at Carlisl... | Jim Thorpe |
| 2 | 4680 | 2004-12-31 | Jeopardy! | EVERYBODY TALKS ABOUT IT... | $200 | The city of Yuma in this state has a record av... | Arizona |
| 3 | 4680 | 2004-12-31 | Jeopardy! | THE COMPANY LINE | $200 | In 1963, live on "The Art Linkletter Show", th... | McDonald's |
| 4 | 4680 | 2004-12-31 | Jeopardy! | EPITAPHS & TRIBUTES | $200 | Signer of the Dec. of Indep., framer of the Co... | John Adams |
As you can see each row in the dataset represents a single question on a single episode of Jeopardy. Further observing the format of the data, we can see that our column names have unwanted spaces around them and need to be cleaned up.
# List out the columns of jeopardy using jeopardy.columns
list(jeopardy.columns)
['Show Number',
' Air Date',
' Round',
' Category',
' Value',
' Question',
' Answer']
We will remove the spaces in each item in jeopardy.columns, and then assign the result back to jeopardy.columns to fix the column names.
jeopardy.columns = ['Show Number', 'Air Date', 'Round', 'Category', 'Value', 'Question', 'Answer']
3. Normalizing the Data
Before we can start doing any analysis on the Jeopardy questions, we need to normalize all of the text columns (the Question
and Answer
columns).
What we want to do is lowercase all of the words and remove punctuation so Don't
and don't
aren’t considered to be different words when we compare them.
Our function to normalize the text will:
- Take in a string
- Convert the string to lowercase
- Remove all punctuation in the string
- Return the string
import re
def normalize_text(text):
text = text.lower()
text = re.sub("[^A-Za-z0-9\s]", "", text)
return text
We can now apply our function to the Question
and Answer
columns and assign the resulsts to newly created columns clean_questions
and clean_answers
respectfully.
jeopardy["clean_question"] = jeopardy["Question"].apply(normalize_text)
jeopardy["clean_answer"] = jeopardy["Answer"].apply(normalize_text)
Our text columns are now normalized (Questions
and Answers
), but we still have more columns to take care of. The Value
column needs to be numeric to allow us to appropriately work with our data. We will create a function that will:
- Take in a string
- Remove any punctuation in the string
- Convert the string to an integer
- If the conversion has an error, assign 0 instead
- Return the integer
def normalize_values(text):
text = re.sub("[^A-Za-z0-9\s]", "", text)
try:
text = int(text)
except Exception:
text = 0
return text
We can now apply our function to the Value
column and asign the results to a newly created column clean_value
.
jeopardy["clean_value"] = jeopardy["Value"].apply(normalize_values)
Finally, we can convert the Air Date
column to the correct data type, datetime, using the pandas.to_datetime
function.
jeopardy["Air Date"] = pd.to_datetime(jeopardy["Air Date"])
Here is a look at each columns data type:
jeopardy.dtypes
Show Number int64
Air Date datetime64[ns]
Round object
Category object
Value object
Question object
Answer object
clean_question object
clean_answer object
clean_value int64
dtype: object
4. Forming a Strategy
In order to figure out whether to study past questions, study general knowledge, or not study it all, we will start by trying to answer the following questions:
1. How often the answer is deducible from the question?
- We will be looking to find out how many times words in the answer also occur in the question
2. How often new questions are repeats of older questions?
- We will do this by seeing how often complex words (
> 6 characters
) reoccur
4.1 Cross Referencing Answers and Questions
Our function to solve question 1:
def count_matches(row):
# Split the clean_answer column on the space character, and assign to the variable split_answer
split_answer = row["clean_answer"].split(" ")
# Split the clean_question column on the space character, and assign to the variable split_question
split_question = row["clean_question"].split(" ")
# If "the" is in split_answer, remove it using the remove method on lists
if "the" in split_answer:
split_answer.remove("the")
# If the length of split_answer is 0, return 0. This prevents a division by zero error later
if len(split_answer) == 0:
return 0
match_count = 0
# Loop through each item in split_answer, and see if it occurs in split_question. If it does, add 1 to match_count
for item in split_answer:
if item in split_question:
match_count += 1
# Divide match_count by the length of split_answer, and return the result
return match_count / len(split_answer)
'''
Count how many times terms in clean_answer occur in clean_question.
Use the Pandas apply method on Dataframes to apply the function to each row in jeopardy.
Pass the axis=1 argument to apply the function across each row.
Assign the result to the answer_in_question column.
'''
jeopardy["answer_in_question"] = jeopardy.apply(count_matches, axis=1)
# Find the mean of the answer_in_question column using the mean method on Series
jeopardy["answer_in_question"].mean()
0.060493257069335914
The answer only appears in the question about 6%
of the time and it doesn’t look like we’ll get much use from this approach. Let’s take a look at recycled questions.
4.2 Question Overlap
For question 2, we need to investigate how often new questions are repeats of older ones by creating a function that:
- Sorts our data in ascending order by the
Air Date
column - Create a set called
terms_used
that will be used to cross reference the occurance of a word - Iterate through each row of jeopardy
- Remove any word shorter than 5 characters to filter out words like
the
andthan
, that are commonly used, but don’t tell us much about the question - Increment a counter for word occurance
- Add each word to
terms_used
# Create an empty list called question_overlap
question_overlap = []
# Create an empty set called terms_used
terms_used = set()
# Use the iterrows DataFrame method to loop through each row of jeopardy
for i, row in jeopardy.iterrows():
# Split the clean_question column of the row on the space character (), and assign to split_question
split_question = row["clean_question"].split(" ")
# Remove any words in split_question that are less than 5 characters long
split_question = [q for q in split_question if len(q) > 4]
# Set match_count to 0
match_count = 0
# Loop through each word in split_question
for word in split_question:
# If the term occurs in terms_used, add 1 to match_count
if word in terms_used:
match_count += 1
# Add each word in split_question to terms_used using the add method on sets
for word in split_question:
terms_used.add(word)
# If the length of split_question is greater than 0, divide match_count by the length of split_question
if len(split_question) > 0:
match_count /= len(split_question)
# Append match_count to question_overlap
question_overlap.append(match_count)
# Assign question_overlap to the question_overlap column of jeopardy
jeopardy["question_overlap"] = question_overlap
# Find the mean of the question_overlap column and print it
jeopardy["question_overlap"].mean()
0.7513452152538761
There is around 75% overlap between terms in new questions and terms in old questions. Our function has given us some insight that it might be worth looking further into the recycling of questions based on phrases as opposed to single terms.
4.3 Low Value vs High Value Questions
Let’s say we only want to study questions that pertain to high value questions instead of low value questions. We can figure out which terms correspond to high-value questions using a chi-squared test.
First we need to narrow down the questions into two categories:
- Low value: Any row where Value is less than 800
- High value: Any row where Value is greater than 800
# If the clean_value column is greater than 800, assign 1 to value, otherwise assign 0 to value
def determine_value(row):
value = 0
if row["clean_value"] > 800:
value = 1
return value
jeopardy["high_value"] = jeopardy.apply(determine_value, axis=1)
jeopardy.head(2)
| Show Number | Air Date | Round | Category | Value | Question | Answer | clean_question | clean_answer | clean_value | answer_in_question | question_overlap | high_value | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4680 | 2004-12-31 | Jeopardy! | HISTORY | $200 | For the last 8 years of his life, Galileo was ... | Copernicus | for the last 8 years of his life galileo was u... | copernicus | 200 | 0.0 | 0.0 | 0 |
| 1 | 4680 | 2004-12-31 | Jeopardy! | ESPN's TOP 10 ALL-TIME ATHLETES | $200 | No. 2: 1912 Olympian; football star at Carlisl... | Jim Thorpe | no 2 1912 olympian football star at carlisle i... | jim thorpe | 200 | 0.0 | 0.0 | 0 |
We’ll be able to reuse our term_used
set to loop through each of the terms and:
- Find the number of low value questions the word occurs in
- Find the number of high value questions the word occurs in
- Find the percentage of questions the word occurs in
- Find counts, based on the percentage of questions the word occurs in
- Compute the chi squared value based on the expected counts and the observed counts for high and low value questions
def count_usage(term):
low_count = 0
high_count = 0
for i, row in jeopardy.iterrows():
if term in row["clean_question"].split(" "):
if row["high_value"] == 1:
high_count += 1
else:
low_count += 1
return high_count, low_count
comparison_terms = list(terms_used)[:5]
observed_expected = []
for term in comparison_terms:
observed_expected.append(count_usage(term))
observed_expected
[(0, 2), (1, 0), (0, 1), (0, 1), (1, 0)]
We can now find the words with the biggest differences in usage between high and low value questions, by selecting the words with the highest associated chi-squared values.
5. Applying the Chi-Squared Test
Computing the expected counts and the chi-squared value.
import numpy as np
from scipy.stats import chisquare
# Find the number of rows in jeopardy where high_value is 1, and assign to high_value_count
high_value_count = jeopardy[jeopardy["high_value"] == 1].shape[0]
# Find the number of rows in jeopardy where high_value is 0, and assign to low_value_count
low_value_count = jeopardy[jeopardy["high_value"] == 0].shape[0]
# Create an empty list called chi_squared
chi_squared = []
# Loop through each list in observed_expected
for obs in observed_expected:
# Add up both items in the list (high and low counts) to get the total count, and assign to total
total = sum(obs)
# Divide total by the number of rows in jeopardy to get the proportion across the dataset. Assign to total_prop
total_prop = total / jeopardy.shape[0]
# Multiply total_prop by high_value_count to get the expected term count for high value rows
high_value_exp = total_prop * high_value_count
# Multiply total_prop by low_value_count to get the expected term count for low value rows
low_value_exp = total_prop * low_value_count
# Use the scipy.stats.chisquare function to compute the chi-squared value and p-value given the expected and observed counts
observed = np.array([obs[0], obs[1]])
expected = np.array([high_value_exp, low_value_exp])
# Append the results to chi_squared
chi_squared.append(chisquare(observed, expected))
chi_squared
[Power_divergenceResult(statistic=2.4877921171956752, pvalue=0.11473257634454047),
Power_divergenceResult(statistic=0.40196284612688399, pvalue=0.52607729857054686),
Power_divergenceResult(statistic=0.80392569225376798, pvalue=0.36992223780795708),
Power_divergenceResult(statistic=2.4877921171956752, pvalue=0.11473257634454047),
Power_divergenceResult(statistic=2.4877921171956752, pvalue=0.11473257634454047)]
None of the terms had a significant difference in usage between high value and low value rows. Additionally, the frequencies were all lower than 5, so the chi-squared test isn’t as valid. It would be better to run this test with only terms that have higher frequencies.
6. Recommendations
1. Find a better way to eliminate non-informative words than just removing words that are less than 5 characters long. For example:
- Manually create a list of words to remove, like the, than, etc
- Find a list of stopwords to remove
- Remove words that occur in more than a certain percentage (like 5%) of questions
2. Perform the chi-squared test across more terms to see what terms have larger differences.
- Use the apply method to make the code that calculates frequencies more efficient
- Only select terms that have high frequencies across the dataset, and ignore the others
3. Look more into the Category column and see if any interesting analysis can be done with it.
- See which categories appear the most often
- Find the probability of each category appearing in each round
- Use phrases instead of single words when seeing if there’s overlap between questions. Single words don’t capture the whole context of the question well


 It’s Said from the Developer Community at Hewlett Packard Enterprise. This month I’m excited to share some interesting news about HPE’s commitment to design. I’ll let Bryan Jacquot, newly appointed Chief Design Officer for Hewlett Packard Enterprise (HPE) lay out his vision, and show how design thinking impacts the collaboration work you contribute to in the HPE DEV community.
 With over one million licenses shipped, chances are that you have already worked with HPE OneView. The HPE DEV portal has links to over 30 repositories, demos, guides, SDKs and language bindings, and other technical resources for you to access.
Let’s take a look at how design thinking, working closely with developers, has improved customer experiences in a specific integration for HPE OneView 4.1— HPE OneView for VMware vRealize Orchestrator.
By integrating HPE infrastructure management features directly into VMware vCenter, administrators can use a VMware management toolset they’re already familiar with to deploy, monitor, manage, and update infrastructure resources directly from the vCenter console. That simplicity and ease of use is what can be achieved when design thinking and customer focus is incorporated into an application development plan.
|
|
|
|
Explore the Platform here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sir Hackington’s Corner - aka HPE DEV Events
|
|
|
Remember Sir Hackington Appbuilder III? He’s HPE DEV team’s mascot and has been busy traveling over the past few months. You can read about his (and our) adventures talking to developers at events like OSCON,
Google Cloud Next, and VMworld.
If you missed HPE DEV at these past events, you'll have lots more chances over the next few months. The team will be heading to Orlando for Microsoft Ignite in September and Seattle for KubeCon in December! Sir Hackington will also journey across the Atlantic in November where he'll be in Madrid for HPE Discover
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
News from the Community
|
|
|
|
For the latest news and updates from HPE DEV, dive into this recent round of developer blogs and associated content from the HPE DEV community. Staying up to date with our latest how-to’s can give you quick insight into technical challenges you may be facing as well as suggestions on how to resolve them.
|
|
|
|
|
|
|
|
DevOps – The Need for New Skills and Competencies
|
|
|
|
Simply put, the goal of DevOps is to change and improve the relationship between development and IT Operations teams. To do so, businesses need better ways to communicate and collaborate, which calls for news skills and different ways of thinking. DevOps provides a vehicle for organizational transformation from siloed, traditionally adversarial groups to collaborative, shared ownership teams with a common goal and collective responsibility. That’s the kind of deep transformation that can give companies a competitive advantage in the marketplace.
|
|
|
|
Read more
|
|
|
|
|
|
|
|
|
|
Managing iLO sessions with Redfish
|
|
|
|
HPE Integrated Lights-Out (iLO) is an embedded server management technology that provides the use of a dedicated channel for managing network devices—in other words, Out-of-Band Management. iLO makes it possible for administrators to monitor and perform activities on servers from a remote location. For developers familiar with iLO, this blog walks you through the ways you can use the Redfish® RESTful API to prevent reaching the maximum number of HTTP sessions through two common management techniques, as well as how to use the session management object in Redfish.
|
|
|
|
Read more
|
|
|
|
|
|
|
|
|
|
DevOps – Your 3-step transformation journey
|
|
|
|
As with design thinking, transforming your operations into one that can embrace rapid iterations and failing fast, rather than failing silently, is one that pays off in the long run. Embracing a DevOps practice allows companies to do this by expanding agile practices beyond IT, shifting left (testing early) within a continuous culture, and embracing the right kinds of failure.  This month we launched a search feature to make it easier to find all the content related to a given project or platform. You can find this new search icon on the upper right corner of the
HPE DEV portal.
Got an idea for improvements to the site? Drop us a line and maybe we can get it added to our next Design Sprint!
|
Search the site
|
|
|
|
The strength of our developer community is driven by you. Have some code or a technical blog you want to share? Chances are good someone else in our community is eager to see it as well. And chances are equally good there’s some knowledge on our site from one of your peers that’s just right for your latest project. Come join our growing ranks and see for yourself.
|
|
|
|
Get started today
|
|
|
|
|
|
|
|
You can also join the conversation on our Slack Channel, and learn from and contribute your insights right away.
|
|
|
|
Join the Slack channel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Become part of the Community
|
|
|
|
Hewlett Packard Enterprise is the only company with the innovation and leadership in the enterprise and open source communities to help developers and customers exceed. Help us build, communicate and collaborate together
|
|
|
|


Scales Code Coverage
Statistics generated at Mon Jul 08 07:04:55 BST 2013
Lines of code:
56
Statements:
19
Clases per package:
4.0
Methods per class:
2.25
Non comment lines of code:
0
Packages:
4
Classes:
1
Methods:
9
Total 20 Project Risks
Test
Test.MeasuredInstruction
Test2
Test.MeasuredClass
<empty>
0 / 4 ( 0.0 %)
0 / 19 ( 0.0 %)