{% extends "base.html" %}
{% load puzzle_tags %}
{% block content %}
Rules
- The puzzlehunt starts on {% format_time start_time '%A, %B %-d at %-I:%M %p %Z' %} and ends on {% format_time end_time '%A, %B %-d at %-I:%M %p %Z' %}, at which point puzzle solutions will be available. {# However, we will leave the website running until {% format_time close_time '%A, %B %-d at %-I:%M %p %Z' %} so teams can still submit answers and go through the hunt at their own pace (see the FAQ for a more detailed explanation). #}
- Teams have a maximum size of {{ max_members_per_team }}. You may not create multiple accounts or be on multiple teams.
- A few puzzles will be available at the start, and the primary way to unlock new puzzles is by solving puzzles and progressing through the hunt, although puzzles may also be unlocked over time.
- Teams that complete the hunt will be ranked by the time at which they finish. Teams that do not complete the hunt will be ranked by number of puzzles solved and tie-broken by earliest last solve time.
Solving
- Each answer is a string of letters A–Z. Lowercase letters will be changed into uppercase, and any other characters will be stripped before checking for correctness.
- You have {{ max_guesses_per_puzzle }} total guesses for each puzzle. If you legitimately run out of guesses and need more, feel free to contact us, though we won’t grant your request if we see that you were, for example, guessing random thematic answers, or brute-forcing all 10-letter words.
{% if hints_enabled %}
Hints
- Starting on {% format_time hint_time '%A, %B %-d' %}, teams will receive hints at {% format_time hint_time '%-I:%M %p %Z' %} each day until the end of the hunt. The number of hints given each day will be at our discretion based on how the hunt is going.
{% if intro_hints %}
- The first {{ intro_hints }} hint{{ intro_hints|pluralize }} your team receives may only be used on the first set of puzzles in the hunt.
{% endif %}
- You can use a hint to get help on a puzzle. This can be something like a nudge in the right direction (i.e. you give us your progress on the puzzle and we’ll try to get you unstuck) or an answer to a question (e.g. “Which answers to these crossword clues are wrong?”).
{% if one_hint_at_a_time %}
- You can only have one open hint request at a time.
{% endif %}
{% endif %}
Other
- You may use any external sources for help, including other people, as long as they aren’t helping other teams and aren’t actively participating in the hunt.
- You may not publicly stream a solve of our hunt when the hunt is live.
- It won’t be necessary to look at the HTML source/JavaScript/CSS on any webpages for any puzzle, but you’re welcome to look anyway.
- We reserve the right to disqualify any team for unsportsmanlike conduct.
- We reserve the right to change any of these rules.
- If you have any questions about these rules, or if you want to contact us for any reason, email {{ contact_email }}. We will get back to you as soon as we can.
{% endblock %}


Set: mentally relaxed, apprehensive that the material might be dysphoric.
Setting: subject relaxed at home with a friend present
Subject has previous experience with psychoactives. He is familiar with MDMA and Methylone. He had had an experience with methylone two weeks previously, which could have affected his tolerance and had taken 100 mg 5-HTP earlier that day.
Summary
Very satisfying material. Empathic, tactile, euphoric. Has similarities with methylone and MDMA, but has a very unique character. It may be more challenging that the MDMA or methylone, that one may have to consciously channel energy rather than feel positive automatically. Quite stimulating. Some appetite suppression. No real visual effects, but some intensification, shifting visuals are obtained when cannabis is added.
Dosage: probably about 100 - 200 mg (stronger than methylone)
Duration: 3-4 hours (residual stimulating effects 3-4 hours more?)
21: 07 pm. The subject took 150 mg mebylone orally in water. The material tasted bitter, somewhat like methylone.
21: 30. He felt alerts after only seven minutes. After 10 minutes reported methylone-type surges of energy and feeling very euphoric. Music was intense and emotional, almost felt physically.
21: 40 He reported tingling in his fingers, lower arms and behind the ears. His breathing was shallow. He was at a 3+++, barely able to speak. Smoking some marijuana deepened and intensified the state.
21: 47 A peak was reached for about half an hour smoothly descending to a 2++ after about an hour. The subject experienced a very special state. His hands were shaking internally with energy, which spread to other parts of his body. He felt slightly alarmed. This was not expected. He felt that if he did not channel the energy it would not be positive. He focused the energy into a visualization of the heart chakra. The focused energy resulted in a novel euphoria. At that time he would not have wanted to take more but thought he had taken slightly too much. At one point he gasped: “I feel f*** amazing.”
22: 30 A ‘speedy’ phase is entered, all rapid enthusiastic thoughts and empathy. A 50mg booster is taken.
He looks at his friend and understands his unhappiness in his marriage without the need for much verbal communication.
He said: “There is only here and now. Nothing matters but here and now. Life can be so light, but sometimes it’s so heavy.” His friend insufflates some ketamine and is happy and apparently resolves some of his internal conflicts.
23: 00 Euphoria and stimulation still felt (although diminishing), although has little desire to move. He drifts off into internal fantasies.
23: 45 Some crashing experienced. The main effects of the material are gone.
00: 25 Residual stimulating still present.
03:00 – 04: 00 Subject slept with the aid of 10 mg valium.
Next day: slight hangover and lethargy, diminished appetite.
The subject expresses a desire to repeat this experiment as soon as possible. Synergy with methylone and perhaps ethylone are expected.
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.


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. | |
| 25 | * Other names may be trademarks of their respective owners.] | |
| 26 | * | |
| 27 | * ------------------- | |
| 28 | * VectorDataItem.java | |
| 29 | * ------------------- | |
| 30 | * (C) Copyright 2007-2009, by Object Refinery Limited. | |
| 31 | * | |
| 32 | * Original Author: David Gilbert (for Object Refinery Limited); | |
| 33 | * Contributor(s): -; | |
| 34 | * | |
| 35 | * Changes | |
| 36 | * ------- | |
| 37 | * 30-Jan-2007 : Version 1 (DG); | |
| 38 | * 24-May-2007 : Added getVector(), renamed getDeltaX() --> getVectorX(), | |
| 39 | * and likewise for getDeltaY() (DG); | |
| 40 | * 25-May-2007 : Moved from experimental to the main source tree (DG); | |
| 41 | * | |
| 42 | */ | |
| 43 | ||
| 44 | package org.jfree.data.xy; | |
| 45 | ||
| 46 | import org.jfree.data.ComparableObjectItem; | |
| 47 | ||
| 48 | /** | |
| 49 | * A data item representing data in the form (x, y, deltaX, deltaY), intended | |
| 50 | * for use by the {@link VectorSeries} class. | |
| 51 | * | |
| 52 | * @since 1.0.6 | |
| 53 | */ | |
| 54 | public class VectorDataItem extends ComparableObjectItem { | |
| 55 | ||
| 56 | /** | |
| 57 | * Creates a new {@code VectorDataItem} instance. | |
| 58 | * | |
| 59 | * @param x the x-value. | |
| 60 | * @param y the y-value. | |
| 61 | * @param deltaX the vector x. | |
| 62 | * @param deltaY the vector y. | |
| 63 | */ | |
| 64 | public VectorDataItem(double x, double y, double deltaX, double deltaY) { | |
| 65 |
2
1. 2. |
super(new XYCoordinate(x, y), new Vector(deltaX, deltaY)); |
| 66 | } | |
| 67 | ||
| 68 | /** | |
| 69 | * Returns the x-value. | |
| 70 | * | |
| 71 | * @return The x-value (never {@code null}). | |
| 72 | */ | |
| 73 | public double getXValue() { | |
| 74 |
1
1. getXValue : removed call to org/jfree/data/xy/VectorDataItem::getComparable → NO_COVERAGE |
XYCoordinate xy = (XYCoordinate) getComparable(); |
| 75 |
3
1. getXValue : removed call to org/jfree/data/xy/XYCoordinate::getX → NO_COVERAGE 2. getXValue : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getXValue → NO_COVERAGE 3. getXValue : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getXValue → NO_COVERAGE |
return xy.getX(); |
| 76 | } | |
| 77 | ||
| 78 | /** | |
| 79 | * Returns the y-value. | |
| 80 | * | |
| 81 | * @return The y-value. | |
| 82 | */ | |
| 83 | public double getYValue() { | |
| 84 |
1
1. getYValue : removed call to org/jfree/data/xy/VectorDataItem::getComparable → NO_COVERAGE |
XYCoordinate xy = (XYCoordinate) getComparable(); |
| 85 |
3
1. getYValue : removed call to org/jfree/data/xy/XYCoordinate::getY → NO_COVERAGE 2. getYValue : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getYValue → NO_COVERAGE 3. getYValue : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getYValue → NO_COVERAGE |
return xy.getY(); |
| 86 | } | |
| 87 | ||
| 88 | /** | |
| 89 | * Returns the vector. | |
| 90 | * | |
| 91 | * @return The vector (possibly {@code null}). | |
| 92 | */ | |
| 93 | public Vector getVector() { | |
| 94 |
3
1. getVector : removed call to org/jfree/data/xy/VectorDataItem::getObject → NO_COVERAGE 2. getVector : replaced return value with null for org/jfree/data/xy/VectorDataItem::getVector → NO_COVERAGE 3. getVector : mutated return of Object value for org/jfree/data/xy/VectorDataItem::getVector to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return (Vector) getObject(); |
| 95 | } | |
| 96 | ||
| 97 | /** | |
| 98 | * Returns the x-component for the vector. | |
| 99 | * | |
| 100 | * @return The x-component. | |
| 101 | */ | |
| 102 | public double getVectorX() { | |
| 103 |
1
1. getVectorX : removed call to org/jfree/data/xy/VectorDataItem::getObject → NO_COVERAGE |
Vector vi = (Vector) getObject(); |
| 104 |
3
1. getVectorX : negated conditional → NO_COVERAGE 2. getVectorX : removed conditional - replaced equality check with false → NO_COVERAGE 3. getVectorX : removed conditional - replaced equality check with true → NO_COVERAGE |
if (vi != null) { |
| 105 |
3
1. getVectorX : removed call to org/jfree/data/xy/Vector::getX → NO_COVERAGE 2. getVectorX : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getVectorX → NO_COVERAGE 3. getVectorX : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getVectorX → NO_COVERAGE |
return vi.getX(); |
| 106 | } | |
| 107 | else { | |
| 108 |
3
1. getVectorX : Substituted NaN with 1.0 → NO_COVERAGE 2. getVectorX : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getVectorX → NO_COVERAGE 3. getVectorX : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getVectorX → NO_COVERAGE |
return Double.NaN; |
| 109 | } | |
| 110 | } | |
| 111 | ||
| 112 | /** | |
| 113 | * Returns the y-component for the vector. | |
| 114 | * | |
| 115 | * @return The y-component. | |
| 116 | */ | |
| 117 | public double getVectorY() { | |
| 118 |
1
1. getVectorY : removed call to org/jfree/data/xy/VectorDataItem::getObject → NO_COVERAGE |
Vector vi = (Vector) getObject(); |
| 119 |
3
1. getVectorY : negated conditional → NO_COVERAGE 2. getVectorY : removed conditional - replaced equality check with false → NO_COVERAGE 3. getVectorY : removed conditional - replaced equality check with true → NO_COVERAGE |
if (vi != null) { |
| 120 |
3
1. getVectorY : removed call to org/jfree/data/xy/Vector::getY → NO_COVERAGE 2. getVectorY : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getVectorY → NO_COVERAGE 3. getVectorY : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getVectorY → NO_COVERAGE |
return vi.getY(); |
| 121 | } | |
| 122 | else { | |
| 123 |
3
1. getVectorY : Substituted NaN with 1.0 → NO_COVERAGE 2. getVectorY : replaced double return with 0.0d for org/jfree/data/xy/VectorDataItem::getVectorY → NO_COVERAGE 3. getVectorY : replaced return of double value with -(x + 1) for org/jfree/data/xy/VectorDataItem::getVectorY → NO_COVERAGE |
return Double.NaN; |
| 124 | } | |
| 125 | } | |
| 126 | ||
| 127 | } | |
Mutations | ||
| 65 |
1.1 2.2 |
|
| 74 |
1.1 |
|
| 75 |
1.1 2.2 3.3 |
|
| 84 |
1.1 |
|
| 85 |
1.1 2.2 3.3 |
|
| 94 |
1.1 2.2 3.3 |
|
| 103 |
1.1 |
|
| 104 |
1.1 2.2 3.3 |
|
| 105 |
1.1 2.2 3.3 |
|
| 108 |
1.1 2.2 3.3 |
|
| 118 |
1.1 |
|
| 119 |
1.1 2.2 3.3 |
|
| 120 |
1.1 2.2 3.3 |
|
| 123 |
1.1 2.2 3.3 |


Close
LESSONS
OOP
ALCO LESSON
PROGRAMMING TO C
PROGRAMMING TO CPP
PROGRAMMING LANGUAGES PRINCIPLES
PERSONAL PAGE
CREATED BY:NASTOS VASILEIOS
WHO AM I
NASTOS VASILEIOS
STUDENT AT DEPARTMENT OF INFORMATICS AND TELECOMMUNICATIONS AT DEPARTMENT OF IOANNINA
Interested at:Big Data,Gui Programming,WebPage Design,Bitcoin Mining,Data Analysis
PROGRAMMING LANGUAGES
C
C++
JAVA
Python
Html
IMAGE LINKS
REPOSITORY
IMAGE LINK
Scheduling Project
Image Link
Algorithms and Complexity
Image Link
Programming in Qt Framework
Image Link
Programming in C
Image Link
Programming in Python
Image Link
Learn Html
Image Link
Java Server Pages
Image Link


{% extends 'full-page.html' %} {% block content %}
{{cog[1]|safe}}
Maverun
Cookie
The orignal creator of Mee6. Nurevam was inspired by his bot/website. Receive his permission for webs used..


Deep Learning about Deep Learning Projects
Megha
Nagabhushan Rashmi Tripathi
School of Computing
and Engineering, University of Missouri-Kansas City
{mnbpc , rtrh6} @mail.umkc.edu
Abstract— There are a lot of open source
deep learning projects available on the internet. These existing projects
can be used to develop new innovative projects. The challenge is to understand
the functionalities implemented in these projects. By knowing the
functionalities, the developers can decide if they want to reuse the part of
the logic in their project. Apart from reusability it can help in increasing
productivity for any organization. With increasing complexity and tremendous
increase in changes across Deep Learning with each passing day, there is a need
of a system which can learn about the type of model that deep learning
technology possess and further work can be done on it easily. As part of this
project, a model is built that can analyze a source code and provide results
containing the functional semantics of the code as well as their
functionalities and dependencies. The model also segregates the code into
clusters based on their functionalities. The model should depict the kind of
deep learning involved like CNN, RNN etc. and then how the learning has been
done at each and every stage.
I. INTRODUCTION
Deep learning is a
branch of machine learning based on a set of algorithms that attempt to model
high level abstractions in data. Deep learning implements principles of neural
network like ability to express, Efficiency and Learnability. Deep learning is capable
of Natural language generation, automatic speech recognition, image recognition
and is also extensively used in health care industry. It has a lot of potential
to solve complex problems and therefore it is in high demand.
Google had
two deep-learning projects underway in 2012. Today it is pursuing more than
1,000 deep projects in all its major product sectors, including search,
Android, Gmail, translation, maps, YouTube, and self-driving cars. [figure-1]
Figure-1 Deep Learning Curve at Google.
Today, there are a lot of open source
deep learning
projects available on web based
repositories. GitHub, one of the popular online repository hosting service has
867 deep leaning projects available. Developers reuse the existing code from
these open source projects to develop their own new projects.
Understanding
the network and logical flow of the code is a challenge. In our project, we are
building an intelligent model that helps in internal learning and
interpretation of the existing model. This intelligent model can be used to
cascade the features of different projects and develop a new project.
II. RELATED
WORK
Our model shares
the same way in which python program are represented using Pycallgraph.
Pycallgraph: It is an
open source that creates call graph visualizations for Python
applications. However our model will show
the call graph by learning about the code
and then to analyze similar kind of source codes. It will scan the
whole source code
to show static or dynamically generated
call graph. For dynamic call graph we can use pycallgraph.
Static Call
Graph: It represents every possible run
of the program. The exact static call graph is an undecidable problem, so
static call graph algorithms are generally over approximations. That is, every
call relationship that occurs is represented in the graph, and possibly also
some call relationships that would never occur in actual runs of the program.
Dynamic
Call Graph: A dynamic call graph is a record of an execution of the program,
e.g., as output by a profiler. Thus, a dynamic call graph can be exact, but
only describes one run of the program.
III. OUR MODEL
To develop
a new model from the existing models, it is important to know the flow of logic
and semantics of the code. In this project; we have decided to use deep
learning technologies to design a model which is capable of analyzing the given
code and its behavior from two perspectives.
First one is static call graph which
represents how the deep learning is done at every stage w.r.t source code. It
is generalization of the source code with entry points and exit points. Here
all the combinations of paths from entry point to exit point are shown. In
contrast to second one i.e. dynamic call graph it will show one path from entry
point and exit point. This path is decided by the input program given by user.
Static and dynamic call graphs are best in their own way in terms of exposure
they can value add to application users.
Furthermore
for any organization, it will be interesting to adapt to a system which can
train people on open source projects quickly. The combination of virtual
reality world and call graph scan be proven best for the user’s understanding.
Users should have an application where they can observe these call graphs for
any open source project in virtual reality world. With the motion of their hand
like may be a swipe action, the application will reflect all the call graphs
for given user program to human eyes. User should be able to see the various
entry points, middle ones and the exit ones. Based upon the performance and the
shortest path between an entry and an exit point User can easily learn and
start making decision on what can be the best program for any particular goal.
The architecture diagram shown in
Figure-2 explains how our intelligent model works. The model takes a deep
learning model source code as input. The source code is analyzed to determine
functionality in terms of package structure, module, class structure, and
module structure. The code with similar functionality and structure is grouped
together into a cluster to reduce complexity. The next step will provide an
interesting visualization to these clusters in form of static and dynamic call
graphs.
Figure-2 Architecture
III. RESULTS AND CONTRIBUTIONS
For our experiment,
we are using Scikit-learn project. Scikit-learn is a free software machine
learning library for the Python programming language. Scikit has a huge code
base with 24 modules. Feature-selection is one module of Python with 15 python
files and a total of 83 methods. We are using pycallgraph library to generate
pictorial representation call graph [Figure -3 ].
Pycallgraph is a Python module that creates call graph visualizations for
Python applications.
In our project, we will build a model that
will enhance the understanding of the logical flow and semantics of the input code through innovative
Interface. The model will also help in knowing the logical flow from any point
in the code to another point
.
Figure-3 Pycallgraph for the Feature selection module of
Scikit-learn
B. TensorFlow
TensorFlow is open source
project created by Google Brains Team for machine learning purposes providing a
Python API and C++ API. It
is used for machine learning in depth. The experiment is executed in many
iterations.
In first iteration the system will generate
static call graph. A crawler is created to crawl through each python module to
associate the methods with respective packages and classes. There are total
number of 1356 API available and their respective packages are known. Counts
are shown below as per experiment:
|
Structure |
Total |
|
Packages |
319 |
|
Modules (Number of python
files) |
268 |
|
Classes |
Still in progress |
|
Important API’s |
1356 |
Furthermore
clustering is needed on them to associate them with type of it like entry
points, intermediate points and exit points. As part of this, we learned that
the module structure of TensorFlow have following main components:
· util: utility functions.
· select: various selection methods of
TensorFlow tensors and operations.
· match: TensorFlow graph matching. Think
of this as regular expressions for graphs (but not quite yet).
· reroute: various ways of rerouting tensors
to different consuming ops like swap or reroute_a2b.
· subgraph: the Subgraph View class, which
enables subgraph manipulations in a TensorFlow tf.Graph.
· edit: various editing functions
operating on subgraphs like detach, connect or bypass.
· transform: the Transformer class, which
enables transforming (or simply copying) a subgraph into another one.
In second iteration we need to
generate dynamic call graph. Here we are utilizing another open source software
as Pycallgraph. It is used to visualize call graph for any Python application.
Sample program is written in TensorFlow with basic string and print operations.
The following command is used to generate the graphical representation on
Ubuntu terminal
$ pycallgraph graphviz
-- ./sample.py
The
above command call at Ubuntu terminal will execute the python script and will
generate PNG file as pycallgraph as shown in figure 4. The figure depicts the
call graph generated for simple print hello python program.W.r.t Tensorflow , this resulted in an Triangulation error.


The release of MelbDjango 2.10 has been delayed by a week. Perhaps we wanted to merge a great new feature before the alpha cutoff on the 16th, or alternatively, I've been a bit too busy this past month to get the meetup organised.
Anyway! We're on for next week. Come by Common Space for some talks (to be announced over the next few days), plus some pizza and drinks (provided by Common Code).
We have a couple of people lined up to do talks already, but if you're interested in filling the 3rd or 4th spot, shoot me and email and I'll add you to the list.


Handsontable was embedded in a html table
{{handsontable_content|safe}}
Hei, this view demonstrate how handsontable can be embedded


Thomas Han - Lead Software Engineer @ Odecee
There's lots of bad explanations and definitions out there! Don't start with those.
The best way to learn RX is hands-on doing and reading.
It's really hard to switch your mind to view everything as streams.
Some of the good hands-on tutorials to start with are
Bible of RX
It's programming with streams of data.
What is data?
Data can be anything you choose it to be.
It turns out many companies working on different domains were independently discovering patterns for building software that looked the same. Reactive!
Reactive programming provides a higher abstraction than imperative or declarative programming, ultimately increasing productivity in domains where RX excelled at (in some cases by order of magnitudes).
Analogy: productivity gained by employing java over assembly as a general programming language.
The reactive extensions (RX) originally developed by Microsoft.
Application using RX showed the properties outlined in reactive manifesto.
Reactive: mindset that follows the reactive manifesto
Reactive Programming: programming paradigm that works with streams of data
RX: library that works with observables (streams of data)
Other libraries which implements reactive programming are Akka actor and Akka stream not part of the RX family.
and the complimentary slideshare - Reactive Microservice Architecture with Groovy and Grails
Reactive manifesto v1.1 states:
“An application must be reactive from top to bottom.”
Service Engine ≠ Reactive Microservice
Service Engine ≅ Microservice
Service engines use some reactive components (e.g. hystrix) but remember a reactive application has to be reactive from top to bottom.
The most important thing in building truly reactive microservices is the mindset and architecture and not the framework
The probability of six end-points going down is 1% = (0.01)
Now, lets divide the end-points so they fail independently
The probability of six endpoints going down is 0.0001% = (0.01 * 0.01 * 0.01)
We've put resiliency by setting up the services so they fail independently.
I hear you say: "But that's way harder to maintain"
High availability vs maintenance
Another perspective, which is worse?
Customers not being able to perform actions like making payments, transferring money overseas, listing accounts, etc
vs
Making it harder for devops to maintain
Because ESB
Low latency is king in the reactive land
Distribute the smarts to the microservices
The microservice should know how to:
Currently all inter-service communication is done through HTTP(S)
Assuming a typical latencies of 28ms, time to establish a connection
A word from an expert
It is unfortunate that REST is widely considered as the default Microservice communication protocol. It’s important to understand that REST is most often synchronous which makes it a very unfitting default protocol for inter-service communication.
-Reactive Microservices Architecture: Design Principles for Distributed Systems, Jonas Boner-
Reactive Microservices Architecture: Design Principles for Distributed Systems, highly recommended reading
nginx has a very comprehensive blog outlining the interaction styles.
Although using REST for request/response is good for exposing APIs to clients, it's not the best style for inter-service communication.
In fact they only use request/response once at the initialisaton phase and everything else is publish/subscribe or notification style interactions.
RX has built-in throttling controls or backpressure in reactive terminology.
Each microservice has config for throttling.
This is not going to work if you want dynamic scaling.
Kaboom!!
We need a better way to handle backpressure.
A centralised microservice to handle backpressure to each back-end system.
A single microservice should manage backpressure to each back-end system
There are two ways of handling backpressure
Lossless backpressure operators
Lossy backpressure operators
Can you guess which ones?
Netflix
> ./run.sh
Traditional - All requests to service1 will fail and be lost
Reactive - All requests will be queued up in the message bus. Service2 will pick up the message and process the messages once it's up.
Service2 doesn't need to be running at the same time as service1 to process the message successfully.
performance> ./hit_it.sh
service1> ./hit_it.sh 2
service2> ./run.sh
All services up and running
performance> ./hit_it.sh
service1> ./hit_it.sh 2


Can’t someone let us just eat in peace?
Our hunger for denial, thirst for more time
Just a few more seconds of joy and prime
When it’ll be us, just like everyone said,
Someone else shall pass the butter, hand the bread


WriteCGIData()
Syntax
Result = WriteCGIData(*Buffer, Size)Description
Writes binary data to the CGI output. When sending binary data, the 'content-type' header should be set to 'application/octet-stream'.
Parameters
*Buffer The memory buffer to write. Size The size (in bytes) to write.
Return value
Returns non-zero if the data has been successfully written to the CGI output.
Example
If Not InitCGI() Or Not ReadCGI() End EndIf WriteCGIHeader(#PB_CGI_HeaderContentType, "application/octet-stream") WriteCGIHeader(#PB_CGI_HeaderContentDisposition, "attachment; filename=image.png", #PB_CGI_LastHeader) If ReadFile(0, #PB_Compiler_Home + "examples/sources/data/world.png") Size = Lof(0) *Buffer = AllocateMemory(Size) ReadData(0, *Buffer, Size) ; Read the whole file into the new allocated buffer WriteCGIData(*Buffer, Size) ; Write the whole buffer to the CGI output CloseFile(0) EndIf
See Also
InitCGI(), WriteCGIHeader(), WriteCGIFile()
Supported OS
All


Select a location
You have selected: {{institution.formatted_name}}
To create an interactive map of their lending patterns, select an MSA to view:
{% load staticfiles %}
You have selected: {{institution.formatted_name}}
To create an interactive map of their lending patterns, select an MSA to view:


{{ post.title }}
Posted on {{ post.date | date_to_string }}
{{ post.content | strip_html | truncatewords: 45 }}{% assign wordcount = post.content | number_of_words %}{% if wordcount > 45 %}read more{% endif %}
--- layout: default title: We Don't Need Roads subtitle: Personal musings of Sam Chaffee description: This is the personal blog of Sam Chaffee. He is a software developer with Moodlerooms, Inc., has a background in GIS, and an interest in open-source software and technology. ---


This inspection reports any
catch
parameters that are unused in their corresponding blocks. This inspection will not report any
catch
parameters named "ignore" or "ignored".
Powered by InspectorGroovy


@remarks
This method is not synonymous with checking the length of a string for zero using the Len method. This method checks if the string parameter points to any kind of string, including an empty string (""). A null string is uninitialized.
Public Sub Main() Dim s As String s = vbNullString ' redundant, but illistrates null pointer. Console.WriteLine "Is Null: {0}", CorString.IsNull(s) s = "" Console.WriteLine "Is Null: {0}", CorString.IsNull(s) Console.ReadKey ' The example outputs: ' Is Null: True ' Is Null: False End Sub


Copper mug try-hard pitchfork pour-over freegan heirloom neutra air plant cold-pressed tacos poke beard tote bag. Heirloom echo park mlkshk tote bag selvage hot chicken authentic tumeric truffaut hexagon try-hard chambray.
Copper mug try-hard pitchfork pour-over freegan heirloom neutra air plant cold-pressed tacos poke beard tote bag. Heirloom echo park mlkshk tote bag selvage hot chicken authentic tumeric truffaut hexagon try-hard chambray.


Duration
15 minutes
Goals
The primary goal of this lab is to use XML to define the entries in a Toolbar's Actions menu. The image below shows the current state of the Recipes app after the completion of Exercise 1. In this exercise, your goal is to work on the highlighted area.
You will use an XML menu file to define menu items for the "favorite" and "about" actions. These actions will then appear inside the toolbar so you will be able to remove the buttons used in the current implementation. When you are done, the app should look like the image below - the "favorite" action is shown in the toolbar while the "about" action is hidden inside the toolbar's overflow area.
Required assets
This is a continuation of the previous exercise. You can use your existing solution or open the solution in the Exercise 1/Completed folder. The Exercise 2 folder contains a subfolder named Completed with a solution you can use to check your work. Please make sure you have these folders before you begin.
Challenge
- Create a new sub-folder named menu inside your app's Resources folder.
- Create a new XML file named actions.xml inside the menu folder.
- Populate the actions.xml file with an Android menu containing two items: one for "favorite" that will always be shown on the menu and one for "about" that will appear only in the overflow area.
- Inflate the menu from code.
- Respond to menu-item click events. For the "favorite" action you should toggle the current recipe's
IsFavorite
property and update the image on the menu item to match. For the "about" action you should navigate the app to the AboutActivity. - Remove the previous implementation of "favorite" and "about" (the XML for the buttons and the corresponding code).
Steps
Define the menu file
- Create a new sub-folder named menu inside your app's Resources folder.
- Create a new XML file named actions.xml inside the menu folder.
-
Add the following XML to the actions.xml file. Notice how it defines two actions:
one for "favorite" that will appear on the toolbar and one for "about" that will be in the overflow
area. Also, note that the items are given ids so they can be identified from code.
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app ="http://schemas.android.com/apk/res-auto"> <item android:id ="@+id/addToFavorites" android:title ="Add to Favorites" app:showAsAction="always" /> <item android:id ="@+id/about" android:title ="About" app:showAsAction="never" /> </menu>
Inflate the toolbar items
- Open DetailsActivity.cs.
-
Call the
InflateMenu
method on the toolbar to populate its Actions menu - passResource.Menu.actions
as the parameter. The code is shown below.
Handle menu click
-
Subscribe to the toolbar's
MenuItemClick
event.toolbar.MenuItemClick += OnMenuItemClick;
The required method signature is shown below.void OnMenuItemClick(object sender, Android.Support.V7.Widget.Toolbar.MenuItemClickEventArgs e) { }
-
In your handler, add a
switch
statement that tests the value of the parametere.Item.ItemId
. This will be the id of the menu items defined in the XML file. -
Add a case for
Resource.Id.addToFavorites
to theswitch
statement. Inside this case you should toggle the value of the current recipe'sIsFavorite
property and then update the image to reflect the new favorite status (you can use the existingSetFavoriteDrawable
method to load the new image). -
Replace the
SetFavoriteDrawable
method with the following implementation. This change is needed because we are now swapping the image on a menu item instead of a toggle button.void SetFavoriteDrawable(bool isFavorite) { if (isFavorite) toolbar.Menu.FindItem(Resource.Id.addToFavorites).SetIcon(Resource.Drawable.ic_favorite_white_24dp); // filled in 'heart' image else toolbar.Menu.FindItem(Resource.Id.addToFavorites).SetIcon(Resource.Drawable.ic_favorite_border_white_24dp); // 'heart' image border only }
-
Add a case for
Resource.Id.about
to theswitch
statement. Inside this case you should launch the AboutActivity. The code for the completed click handler is given below.
Remove unneeded code
- Open Details.axml.
-
Remove the nested
LinearLayout
that defines the "favorite"ToggleButton
and the "about"Button
. - Open DetailsActivity.cs.
-
Remove all the code dealing with the "favorite"
ToggleButton
(i.e. theCheckedChange
event subscription and theOnFavoriteCheckedChange
handler).// subscription var toggle = FindViewById<ToggleButton>(Resource.Id.favoriteButton); toggle.CheckedChange += OnFavoriteCheckedChange; // handler void OnFavoriteCheckedChange(object sender, CompoundButton.CheckedChangeEventArgs e) { recipe.IsFavorite = e.IsChecked; // update the recipe's state SetFavoriteDrawable(e.IsChecked); // toggle the image used on the button }
-
Remove the entire line of code that handles the "about" button's
Click
event:FindViewById<Button>(Resource.Id.aboutButton).Click += (sender, e) => StartActivity(typeof(AboutActivity));
Summary
This exercise asked you to use an XML file to define the entries for a toolbar's Actions menu. We used the standard Android menu-file format so the techniques you learned here can be applied to other Android menus as well.


This function does time averaging while applying a mask. The syntax is:
tmave(maskexpr,expr,timexpr1,timexpr2)
where:
maskexpr
- the mask expression; when evaluated at a fixed time, it must give a single valueexpr
- the expression to be averagedtimexpr1,2
- the limits of the time averaging domain
ave
function,
except for the masking. Using tmave
is much more efficient than using
maskout
with
ave
).
maskexpr
at each fixed time.
maskexpr
must yeild a single value. If this value
is the undefined/missing data value, then expr
for
that time is not included in the average.
maskexpr
is not the undefined data value, it is
used as the weight for expr
in the average. So if
you define maskexpr
accordingly, you can use the
tmave
function to do weighted time averaging.
tmave
is setting up
maskexpr
. If expr
is a grid
with X and/or Y and/or Z varying, then maskexpr
*MUST* refer to either a defined variable or a file with only time
varying. In general, you have to set up maskexpr
in advance.
slp
over some time range
but only when sst
over some region is above some value. You can
do this by:
set x 1 set y 1 set t 1 last define sstmask = aave(sst,lon=-180,lon=-90,lat=-20,lat=20) define sstmask = const(maskout(sstmask,sstmask-25.0),1)
Now sstmask
is a time series where the value is 1 when
the sst
areal average is above 25 and undefined when the
value is below 25. maskout
set the values
below 25 to missing; const
set the non-missing
values to 1. We can now do our tmave
:
set lon -180 -90 set lat -20 20 set t 1 d tmave(sstmask,slp,t=1,t=last)
dset maskfilename xdef 1 linear 1 1 ydef 1 linear 1 1 zdef 1 linear 1 1 tdef 100 linear ....


The <javaConstructorDef> element provides the constructor declaration
and is structured like a method declaration that has no result type.
Description
A constructor creates an
object that is an instance of a class:
ConstructorDeclaration::
ConstructorModifiersopt ConstructorDeclarator
Throwsopt ConstructorBody
ConstructorModifiers:
public protected private
|
The access modifiers values are
public,
protected,
and
private. Compilation errors occur if the same modifier appears
more than once in a constructor declaration, or if a constructor declaration
has more than one of the access modifier values.
ConstructorDeclarator:
SimpleTypeName ( FormalParameterListopt )
|
The SimpleTypeName in the ConstructorDeclarator must be the
simple name of the class that contains the constructor declaration. The
Throwsopt clause
for a constructor is identical in structure and behavior to the throws clause
for a method.
Unlike methods, a constructor cannot be abstract, static, final, native,
or synchronized.
Content model
(
(javaMethodAccess)
(optional) then
(javaParam)
(any number) then
(javaException)
(any number))


Anatomy of an Epiphany
Toward developing better solutions.
by Marty Nemko Ph.D.Marty Nemko Ph.D.
Sometimes brilliant solutions just pop into a person’s head out of nowhere.
Those may be beyond our control, but we may be able to generate epiphanies if we consciously use a process akin to developing a fine wine: raw ingredients, filtration, fermentation, and evaluation.
I’m a career counselor, so, as an example, let’s take my typical client who wants to figure out what career to pursue.
Raw ingredients: We create a master list of the client’s past accomplishments, current skills, interests, values, personal and familial limitations, plus any changes s/he’d like to make moving forward—We're not necessarily chained to our past.
Filtration: Because it’s impossible to consider everything, and because we want the most important factors to dominate the decision, we filter out all but the most important few factors. I frequently ask the client,, “So among all of these, what are your non-negotiables, good-to-haves, and optionals?”
Fermentation: The client leaves the session with an invitation to let those few career building blocks ferment. In the coming days, s/he’ll turn over various permutations of them, perhaps adding back one or two of the filtered factors. She’ll do that consciously and perhaps subconsciously, the ideas rolling around in her head, maybe even during sleep.
Evaluation. If the client is lucky, a fine wine of a career will have emerged. If it’s just an okay “wine,” we may add a factor, and if it’s vinegar, we’ll start again. After one to three attempts to create a fine "wine,", we’re likely to have come up with at least a demi-epiphany.
The takeaway
So, is there a big issue in your life that would benefit from an epiphany? If so and it hasn't magically appeared, you might create a master list of factors, building blocks from which an epiphany might be built. Filter out all but the most central factors Then allow a day or three for those factors to permute and meld. Finally, with clear-eyes, evaluate whether the best resulting idea is just another inadequate solution, a good one, or an epiphany.
I read this aloud on YouTube.
Post Comment
Your name
E-mail
The content of this field is kept private and will not be shown publicly.
Subject
Comment *
Notify me when new comments are posted
All comments
Replies to my comment
Leave this field blank


http://en.wikipedia.org/wiki/Preemption_(computing)#Preemptive_multitasking
It's also instructive to know about processor interrupts. Without them, your computer would just be a really expensive box that generates warm air.
http://en.wikipedia.org/wiki/Interrupt
To really understand how it all works you'd need to know more detail about how microprocessors in general work. I'll try to give a brief overview. Some of this info may be quite dated and obsolete (I'm an old fart and haven't delved into assembly programming in quite some time), but the basic principals are still valid.
Your microprocessor contains several registers which hold information about it's current operating state. Among these are pointers to the current instruction of the currently executing program, a pointer to the memory stack of the current program (where variables, function call addresses and suchlike are kept), and other stuff that's relevant only to the currently running program.
Your OS kernel is the primary program running on your computer. It manages running multiple other programs, seemingly simultaneously, by first, storing all the processor state info relevant to it's only operation, then loading in the processor state info for say an application that is running, then the applications instructions run for a while, oblivious to the OS kernel and any other program running.
How control gets switched back to the OS is generally handled through what is called an interrupt. An interrupt is basically a way for something (usually a hardware trigger for something external to the processor itself) to interrupt the main processor's current program. When an interrupt occurs, the processor saves its own state off, and jumps to a small program that has been loaded into memory called an interrupt handler. These interrupt handlers are usually supplied by your OS and loaded into memory when you boot up.
Things that commonly generate processor interrupts are any input device (your keyboard generates one every time you press or release a key) or certain other chips on your motherboard like the UART chip which contains the system clock that ticks off an interrupt every microsecond or so.
One of the interrupt handlers that your OS sets up is tied to the system clock and is designed to interrupt any running program after a short span of time and return control to the main kernel. The kernel can then let another program run for a bit.
This series of program switching happens very fast. Because processors are so much faster, it appears to us to be simultaneous, but it's really just an incredibly complex juggling act going on and most people don't have the slightest clue about the amount of pure genius that went in to making their phone work.
Don't know if this made any sense... It's really late for me.


--- layout: default title: View permalink: /view-course/ ---
There is an error! Contact russ if this continues.
Here there would be some sort of graphical representation of the course instead of just a list of marks.
Degrees True


Informal cross-border trade is a major feature of African economies: it creates jobs, contributes to food and energy security, and alleviates poverty. However many traders are unaware of their rights, required customs procedures and documentation, making them vulnerable to corruption and harassment.
Our mission is to empower cross-border traders to exercise their rights as citizens of the EAC – able to trade legally, safely and profitably across borders.
Through our anonymous reporting mechanism we crowd-source data to map incidents
of harassment and corruption at border crossings across East Africa.
Traders can use our number to find out what documentation, taxes and tariffs are applicable to their products, and receive regular updates on changes to border procedures.
We work with civil society organisations to use data collected through our platform
for evidence-based advocacy at community, national and regional levels.
Sauti means voice in Swahili and our mission is to empower cross-border traders to exercise their rights as citizens of the East African Community – able to trade freely and safely across borders and stand up for their rights with a loud and clear voice.


We have explicitly tested Identiji on the following third-party websites for you, so that you know it should theoretically work on these sites without having to spend time testing yourself.
(If there are any additional sites that you have tested and would like to add to the list, please feel free to let us know.)
Facebook (Last tested on: October 10, 2021)
Instagram (Last tested on: October 10, 2021)
Twitter (Last tested on: October 10, 2021)


pingouin.convert_effsize¶
-
pingouin.
convert_effsize
(ef, input_type, output_type, nx=None, ny=None)¶ Conversion between effect sizes.
- Parameters
- effloat
Original effect size.
- input_typestring
Effect size type of ef. Must be
'r'
or'd'
.- output_typestring
Desired effect size type. Available methods are:
'cohen'
: Unbiased Cohen d'hedges'
: Hedges g'eta-square'
: Eta-square'odds-ratio'
: Odds ratio'AUC'
: Area Under the Curve'none'
: pass-through (returnef
)
- nx, nyint, optional
Length of vector x and y. Required to convert to Hedges g.
- Returns
- effloat
Desired converted effect size
See also
compute_effsize
Calculate effect size between two set of observations.
compute_effsize_from_t
Convert a T-statistic to an effect size.
Notes
The formula to convert r to d is given in [1]:
\[d = \frac{2r}{\sqrt{1 - r^2}}\]The formula to convert d to r is given in [2]:
\[r = \frac{d}{\sqrt{d^2 + \frac{(n_x + n_y)^2 - 2(n_x + n_y)} {n_xn_y}}}\]The formula to convert d to \(\eta^2\) is given in [3]:
\[\eta^2 = \frac{(0.5 d)^2}{1 + (0.5 d)^2}\]The formula to convert d to an odds-ratio is given in [4]:
\[\text{OR} = \exp (\frac{d \pi}{\sqrt{3}})\]The formula to convert d to area under the curve is given in [5]:
\[\text{AUC} = \mathcal{N}_{cdf}(\frac{d}{\sqrt{2}})\]References
- 1
Rosenthal, Robert. “Parametric measures of effect size.” The handbook of research synthesis 621 (1994): 231-244.
- 2
McGrath, Robert E., and Gregory J. Meyer. “When effect sizes disagree: the case of r and d.” Psychological methods 11.4 (2006): 386.
- 3
Cohen, Jacob. “Statistical power analysis for the behavioral sciences. 2nd.” (1988).
- 4
Borenstein, Michael, et al. “Effect sizes for continuous data.” The handbook of research synthesis and meta-analysis 2 (2009): 221-235.
- 5
Ruscio, John. “A probability-based measure of effect size: Robustness to base rates and other factors.” Psychological methods 1 3.1 (2008): 19.
Examples
Convert from Cohen d to eta-square
>>> import pingouin as pg >>> d = .45 >>> eta = pg.convert_effsize(d, 'cohen', 'eta-square') >>> print(eta) 0.048185603807257595
Convert from Cohen d to Hegdes g (requires the sample sizes of each group)
>>> pg.convert_effsize(.45, 'cohen', 'hedges', nx=10, ny=10) 0.4309859154929578
Convert Pearson r to Cohen d
>>> r = 0.40 >>> d = pg.convert_effsize(r, 'r', 'cohen') >>> print(d) 0.8728715609439696
Reverse operation: convert Cohen d to Pearson r
>>> pg.convert_effsize(d, 'cohen', 'r') 0.4000000000000001


This data is transcribed speech data, in Amharic and Swahili and Wolof.
This repository is a result of the ALFFA project http://alffa.imag.fr
We distribute READY-to-use (or READY-to-train) KALDI ASR systems and (when possible) associated corpora....
A summary of these resources and ASR performances, as well as a description of the ALFFA project has been published in the following paper:
Collecting Resources in Sub-Saharan African Languages for Automatic Speech Recognition: a Case Study of Wolof. Elodie Gauthier, Laurent Besacier, Sylvie Voisin, Michael Melese and Uriel Pascal Elingui. To appear at LREC 2016.So far, the ASR directory contains Kaldi recipes for 4 languages : Amharic, Swahili, Hausa and Wolof.
@article {tachbelie2014, Author = {Martha Tachbelie and Solomon Teferra Abate and Laurent Besacier}, Date-Added = {2015-04-14 08:08:31 +0000}, Date-Modified = {2015-04-14 10:56:28 +0000}, Journal = {Speech Communication}, Publisher = {Elsevier}, Title = {Using different acoustic, lexical and language modeling units for ASR of an under-resourced language - Amharic}, Volume = {56}, Year = {2014} }
@InProceedings {gelas:hal-00954048, author = {Gelas, Hadrien and Besacier, Laurent and Pellegrino, Francois}, title = {{D}evelopments of {S}wahili resources for an automatic speech recognition system}, booktitle = {{SLTU} - {W}orkshop on {S}poken {L}anguage {T}echnologies for {U}nder-{R}esourced {L}anguages}, year = {2012}, address = {Cape-Town, Afrique Du Sud}, abstract = {no abstract}, x-international-audience = {yes}, url = {http://hal.inria.fr/hal-00954048} }
@article {gauthier2016collect, Author = {Gauthier, Elodie and Besacier, Laurent and Voisin, Sylvie and Melese, Michael and Elingui, Uriel Pascal}, Journal = {LREC}, Title = {Collecting Resources in Sub-Saharan African Languages for Automatic Speech Recognition: a Case Study of Wolof}, Year = {2016} }


Hi,
I just ordered in all the latest gear:-
EmonTX3
Pi B+
RFM12PiV2_433
Preloaded SD card
I have looked everywhere, how do I get started. Is there a guide showing how to configure this for first time use?
I'm not sure how to setup the Emoncms monitoring even though I have created the account on the website.
I have SSH working.
Can someone point me in the direction I need to go.
Thanks,
Tony.
Re: Where do I start ??
http://openenergymonitor.org/emon/guide
But I assume you have already tried to follow this and failed, so a bit more information about how far you got and where you're stuck would help.
Re: Where do I start ??
Yeah I did....
Lets start with Rpi. I put the RF module on and put the SD card in. Booted it and logged in via SSH. Since I have the preloaded version it looks like everything is ready to go.
What I cant find is where I enter the details linking up my Emoncms account for displaying the data and how to tell if it's going to do that locally or remotely to the server.
At this stage I want to use the online server to do the logging. Maybe later I'll run it locally.
This is where I am lost and cant find a clear indication of how to configure the server settings for my account.
Thanks,
Tony.
Re: Where do I start ??
Ok, so I read this guide ...
http://emoncms.org/site/docs/raspberrypigateway
However I cant see the file oemgateway.conf but I do have /emonhub/conf/emonhub.conf
I open that and I have the following ...
#######################################################################
####################### Reporters #######################
#######################################################################
[reporters]
# This reporter sends data to emonCMS
[[emonCMS]]
Type = EmonHubEmoncmsReporter
[[[init_settings]]]
[[[runtimesettings]]]
url = http://localhost/emoncms
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is this where I need so set up the URL and Apikey?
The guide says use the read write API key but I have a seperate key for read and another for write. Do I use teh write key?
And whats the url? ... http://emoncms.org ?
Re: Where do I start ??
I found some more info and set the url and write key in emonhub.conf.
I have gone back to my account but cant see any inputs despite the emontx being connected to a circuit and 1m from the pi.
Do I need to do anything with emoncms.org to get the inputs to show up ?
Re: Where do I start ??
Ok all good, found another guide and then realized I was changing the wrong conf file. It works now :)
Now to work out the dashboards. Can the be displayed nicely on an iphone? Or do you have to open them in a browser on your mobile device ?
Re: Where do I start ??
Yes, I agree the documentation is a little mixed up. Unfortunately, the RPi side development is going so fast it's hardly possible to keep up.
As far as emonCMS dashboards go, much the same applies. The best way is to dive in and experiment. As far as I know, some parts work on smartphones and there is ongoing work on an app, but as I don't own a smartphone I haven't taken much notice of it.


eir privacy statement:
We have developed this privacy statement because we want you to feel confident about the privacy and security of your personal details when you visit or use the eir.ie website. We operate a strict opt-in policy for residential customers. We will not send you any information unless you have requested it, or unless someone, who we will identify, has requested that we pass that information on to you. We will not pass on your details to any third party for email or marketing purposes.
eircom Limited is registered with the Data Protection Commissioner as a Data Controller and all handling and processing of your personal data is strictly in accordance with the data protection principles contained in the Data Protection Acts, 1988-2003.
The eir.ie servers are located in a secure facility and any access to your personal data is strictly controlled and limited only to persons who are authorised and have appropriate security clearance to access the servers.
Credit card details are transmitted by eir in an encrypted form to provide extra security for your online transactions.
How we collect information:
You have the option to register on the eir.ie website where you will need to provide us with some personal details to complete registration such as an email address, password, telephone number and account number. This will allow us to provide you with value add services such as viewing and paying your bill online. You can also provide us with additional information, which will allow us to provide you with a more personalised experience whenever you visit our website.
Customers should note that, while eir makes all commercial efforts to protect our customers’ privacy, customers should be aware that information disclosed while connected to the Internet is transferred to the eir servers over a publicly available telecommunications network. eir cannot be held responsible, and accept no liability, for unauthorised access to the public network beyond its reasonable control and all information provided by customers is done entirely at the customers’ own risk.
How we use your information:
We use your information provided to offer you a more personalised online experience and to inform you of products and services relevant to your needs. Registration also allows you access to value-add services such as e-billing, fault logging and ordering products in the online store. Your personal information may also be used to verify your identity, to protect against fraud, and to send you relevant updates e.g. notification of your bill. eir does not share your information with any third party.
Opt-in / Opt-out:
We operate a strict opt-in policy for our residential customers. That means we will not send you any information unless you have requested to receive email updates from us. For business customers, we operate, in compliance with the relevant legislation, an opt-out policy.
If you (whether a residential or business customer) wish to be removed from our list, at any time, (opt-out) you can do so by clicking on the link at the bottom of each email communication you receive from us.
Use of cookie technology:
The eir website creates a "cookie" when you first register online.  Our cookie will store some basic information, which helps us to identify if you have visited the site before. This will allow us provide you with personalised content or present you with product and service information based on your previous behaviour on the site.
How to disable cookies:
If you do not want a cookie to be created on your PC, web browsers such as Netscape and Internet Explorer provide the option to disable them. Please bear in mind that some personalised services on eir.ie, or from other non-eir websites, may not be available if you choose to disable cookies. You can find out more about cookies on www.cookiecentral.com.
Contact us:
If you have any additional questions about our privacy policy or how we collect and use your personal data, please Contact Us.
Update information:
If you would like to update your registration profile at any stage you can do so by logging into to the website with your email address and visit the 'My eir settings' area.


Shorten URL Microservice
User Stories
- I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.
- If I pass an invalid URL that doesn't follow the valid http://www.example.com format, the JSON response will contain an error instead.
- When I visit that shortened URL, it will redirect me to my original link.
*shortened* - the hostname "https://smoore-short-url.herokuapp.com/" is longer than many URLs, which confuses the intention of this Microservice.
It displays the ability to represent a standard URL as an integer. This is the same functionality as tinyurl.com.
This Microservice is intended for educational purposes to show NodeJS and ExpressJS Routing, as well as MongoDB CRUD and auto-increment functionality.
Sample request
https://smoore-short-url.herokuapp.com/new/http://www.google.com/
Sample results
{"original_url":"http://www.google.com/", "short_url":"https://smoore-short-url.herokuapp.com/4"}
short_url https://smoore-short-url.herokuapp.com/4
takes you to the original_url http://www.google.com/


Mendelian randomization as a concept. Mendelian randomization investigates if an exposure causes an outcome by using genetic variants that are strongly associated with the risk factor of interest. For example, genetic variants linked to education can be used to infer whether education has an effect Alzheimer’s disease risk.


SwitchAudio features access to some of the finest digital and analogue audio equipment available. With over 20 years of experience in the audio events industry we bring our passion to your service.


introduction
Hi, I'm Jeremiah. I work at Capgemini in Melbourne where I lead the AI Ambition Strategy team. I also head up tech at Evolved Projects. & lead data science at Tachyon Systems. I do everything from design, architecture, development, prototypes and project management in the artificial intelligence space. Check out some of my speaking events & articles below. Also check out my LinkedIn if you want to connect!
work
At Capgemini (current) —> Managing Data Science consultant; AI Ambition team lead, certified architect, developing and leading projects in the AI space.
At Capgemini (May 18 - Nov 18) —> Senior Data Science consultant; design, architecting, & leading projects in the AI space.
At Altis Consulting (Jan 17 - Apr 18) —> Data Science consultant; development of data science & AI projects in python on cloud systems. Using google tensorflow, keras, and NLP.
At IBM Watson (May 15 - Jan 17) —> Watson associate; I worked on implementing cognitive solutions using IBM Watson data science.
At Convetit (Aug 17 - Mar 18) —> Advisory board member; advisor on development of biotechnology AI applications and futures.
At General Assembly (Jan 17 - May 17) —> Assistant DS instructor; teaching classes & tutoring students in practical DS. Providing deep dives into NLP, neural networks and image analysis.
startup projects
Where my passion lies is bringing new and interesting ideas into the startup world. Recently Tachyon Systems has received $200k USD in funding to fuel the development of our platform.
Tachyon Systems Funded startup in the enterprise software space, merging reliable architecture with natural input
Evolved Projects Geelong based innovation company focused on exploring and developing the latest in emerging tech
AusTether Creating a fiat tethered currency for the australian markets
awards
Young Strategist of the Year Finalist (2019) —> Association for Data-driven Marketing and Advertising (ADMA).
Top 25 Analytics Professionals Australia (2018) —> Institute of Analytics Professionals of Australia (IAPA).
Top 100 Future Leaders 2017 (2017) —> AFR; Recognized as one of the Top 100 Future Leaders of 2017, for the Suncorp Innovation award.
Top 100 Future Leaders 2016 (2016) —> AFR; Recognized as one of the Top 100 Future Leaders of 2016, and nominated for the Accenture Design and User Experience award.
ACS Student Integrated Learning Scholarship (2015) —> ACS.
speaking events
World RPA 2018 Summit (07-12-18, Melbourne) —> Presenting 'Balancing innovation with business value in AI & RPA projects.'
Web Directions AI 2018 Summit (31-10-18, Sydney) —> Presenting 'AI: Actually prove it. Balancing innovation with business value.'
Making AI Approachable (03-07-18, Geelong) —> Running an event as a part of the Digital Innovation Festival Victoria.
Opportunities for Fintech in Regional Victoria (06-07-18, Geelong) —> Panel discussion with Brad Kitschke (CEO Fintech Australia), and Adam Lloyd (ITE) facilitated by Matthew Fletcher.
articles & features
Have a read of some of my rambles
How to Become a Data Science Consultant in 2018: 8 Actionable Tips—> (09-2018) - article written for LearnDataSci
The Drop: AI - Prove it!—> (07-2018) - interview
Amazon's Machine Learning platform SageMaker has been released—> (12-2017) - article
Part 3: Watson Conversation WCS Further Tips & Tricks—> (11-2017) - article
Part 2: Watson Conversation Entity & Dialog Design—> (10-2017) - article
Part 1: Watson Conversation WCS Intent Design—> (10-2017) - article
Image Analytics with Machine Learning—> (07-2017) - article
How I found my dream job: seven graduates tell—> (02-2017)- feature
contact
My website is on a brief hiatus, please contact me on one of the below!
Mobile
Github0416 093 033


Following up on New features I'd like to see in MySQL 5.8, here are statements I would like to see in MySQL 5.8:
- ENABLE EVENTS;
When promoting a slave to master, I want to be able to enable all those events that are in SLAVESIDE_DISABLED state. Today I script an iteration over the events an constructing the ALTER EVENT...ENABLE statement one by one. Just activate those! - SKIP GTID TRANSACTION;
I have a transaction on slave that I want to skip, and there's GTID. The sequence ofSTOP SLAVE; SET GTID_NEXT="..."; BEGIN; COMMIT; SET GTID_NEXT="AUTOMATIC"; START SLAVE;
is just something I don't want to do. To compute the GTID_NEXT; to open a transaction; to use session variables; this may seem straightforward to import the above from a shell script, but calculating the next GTID is not entirely trivial; issuing the above from your programming language makes for a weird "all these have to be in the same session AND you're going to do a transaction meanwhile". With golang it's actually a problem.
Make it simple for me. I'm willing to do the STOP/START SLAVE. - BINLOG ENTRY '<arbitrary text>';
Very selfishly, I want to be able to inject a comment into the binary log, of arbitrary text. I want this comment to appear in SBR format, as if it were a DDL.
My selfish reason: injection of Pseudo-GTID. But I can see various other use cases, such as application level injection of app-logic checkpointing; chef/glu injection of "code deployed at this time"; application injection of "daily audit done to this point". This is too cool and too easy to skip. - SHOW RELAY LOGS;
Similar to SHOW BINARY LOGS; - PURGE RELAY LOGS TO '...';
Similar to PURGE BINARY LOGS TO '...';
It's time relay logs stopped being 2nd class citizens. - SHOW NONBLOCKING [GLOBAL|SESSION] STATUS;
Issue a SHOW GLOBAL|SESSION STATUS query that only shows those variables for which it does not need to block. i.e. this is a safe, fast "show me everything you've got that I won't need to pay for".
Yes, yes, statements are also features, I know.
comments powered by Disqus


Testing APIs
(with Behat and PHPUnit)
Omni Adams
What you'll (hopefully) learn
- What are you going to learn today?
- start with testing an API with PHPUnit and CURL
- have a brief discussion about doing this locally
- finish with building tests in Behat
- and how to use these tests to guide your API development
What you'll (accidentally) learn
- I assume you already are familiar with some things
- What an API is
- How to run PHPUnit
- How to run Behat
- if you're not already familiar with them
- I take no responsibility for you accidentally learning
What you'll (probably not) learn
- You won't learn how to write unit tests
- or an API
- or integration tests
- Or the capitals of the nations of the world
What you'll (definitely not) learn
- We won't mention Selenium
- or how to test front end UI at all
- If this isn't what you were expecting
- I won't be offended if you leave
Testing with PHPUnit and cURL
- Let's start with a simple PHPUnit test
- This may be how you start trying to test your APIs
- And there's nothing really wrong with this
- But you'll hopefully see that Behat makes it easier
- To show how this stuff works, we're going to use FoxyCart
- I'm not affiliated with FoxyCart in any way
- I just think their hypermedia API is well thought out
- As opposed to many APIs, which make you want to → drink IPAs
APIs versus IPAs
- … drink IPAs
- Let's jump right in to FoxyCart's hypermedia API
- and test what happens when we make a GET request
- We'll look at a few of the things you might test
- like response codes, headers, and content
Testing with PHPUnit and cURL
function testBareGet() {
$ch = curl_init(
'https://api-sandbox.foxycart.com'
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$this->assertEquals(400, $info);
}
- This PHPUnit test sets up a cURL request to the root URL
- and doesn't set any headers or send any data
- FoxyCart has a required header that you must send
- So this is a bad request
- It returns HTTP 400 to tell us we messed up
HTTP Status Codes
- 1xx
- more information
- 2xx
- it's all good
- 3xx
- you're lost, let us help
- 4xx
- you really messed up
- 5xx
- not your fault, we broke things
- Here's a list of status code categories
- and what they mean
- 100 is used for chunking, caching, or opening web sockets mainly
- 200 means things are working, and tell how it succeeded
- 300 means the client should look somewhere else
- 400 means the server doesn't understand the client
- or the client is asking a bad question
- 500 means the server is messed up
Testing with PHPUnit and cURL
function testBareGet() {
$ch = curl_init(
'https://api-sandbox.foxycart.com'
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$this->assertEquals(400, $info);
}
- Using cURL will work to test this API
- However, you end up with this boilerplate code
- You'll either have to abstract it out or repeat it
- Obviously, neither of those are particularly great
- But let's continue with a few more PHPUnit tests
- and test some other pieces of this API endpoint
Testing with PHPUnit and cURL
function testContentTypeOnError() {
$ch = curl_init(
'https://api-sandbox.foxycart.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_exec($ch);
$info = curl_getinfo($ch,
CURLINFO_CONTENT_TYPE);
$this->assertEquals(
'application/vnd.error+json', $info);
}
- Here's a test for checking the content type
- You can see that it's very similar to the last one
- It uses curl_getinfo() to check the content-type header
- Easy enough, right?
- But what if you want to test other headers?
Testing with PHPUnit and cURL
function testCacheControlHeader() {
$ch = curl_init(…);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_HEADER, true);
$output = curl_exec($ch);
$this->assertContains('Cache-Control: no-cache',
$output);
}
- For the sake of argument
- let's check the cache-control header
- Cache control isn't exposed from curl_getinfo
- So we have to just check the header strings
- by → including them in the output
Testing with PHPUnit and cURL
function testCacheControlHeader() {
$ch = curl_init(…);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_HEADER, true);
$output = curl_exec($ch);
$this->assertContains('Cache-Control: no-cache',
$output);
}
- … including them in the output
- And seeing if they exist there
- Again, obviously not ideal
- But it will work
Testing with PHPUnit and cURL
public function testOutputContainsErrorMessage() {
$ch = curl_init(…);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
$output = curl_exec($ch);
$this->assertContains(
'FOXYCART-API-VERSION request header',
$output);
}
- Here we're checking the content of the API's output
- This shows another problem with doing it this way
- You can't really tell the difference between headers
- and the content returned by the API
Testing with PHPUnit and cURL
public function testOutputAsJson() {
$ch = curl_init(…);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
$output = curl_exec($ch);
$output = json_decode($output);
$this->assertContains(
'FOXYCART-API-VERSION request header',
$output[0]->message);
}
- One way to get around that particular problem
- Parse the response as JSON
- This is a bit more explicit,
- finding the message where we expect it in the output
Testing with PHPUnit and cURL
public function testRedirect() {
$ch = curl_init(REDIRECT_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$this->assertEquals(302, $info);
}
- What about testing redirects?
- Here we try to cURL a URL that sends a 302
- However, cURL follows the location header
- So you'll actually see the response of the final destination
- Probably a 200 code
- You've got two options here. First, don't → follow the redirect
Testing with PHPUnit and cURL
public function testRedirectNoFollow() {
$ch = curl_init(REDIRECT_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,
false);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$this->assertEquals(302, $info);
}
- don't … follow the redirect
- This is the default behavior of cURL
- cURL will stop at the first response
- This test will pass
- You could test the headers at this step here as well
- Specifically the location header
Testing with PHPUnit and cURL
public function testRedirectWithFollow() {
$ch = curl_init(REDIRECT_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,
true);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$this->assertEquals(302, $info);
}
- Your other option is to follow the redirect
- However, cURL will return the final status code
- So this test will now fail
- Bummer… So what's a good little geek supposed to do?
Testing with PHPUnit and cURL
public function testRedirectWithFollow() {
$ch = curl_init(REDIRECT_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,
true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,
true);
$output = curl_exec($ch);
…
}
- If we include the headers we can test them
- cURL will include them all in the output, one after another
- Unfortunately, now we have a whole bunch of headers
- followed by the normal output
- Here's → a sample of some headers
Sample header output
HTTP/1.1 302 Found
Location: /
HTTP/1.1 200 OK
Last-Modified: Fri, 28 Mar 2014 00:44:43 GMT
Content-Length: 1986
Vary: Accept-Encoding
Content-Type: text/html
- … a sample of some headers
- I had to get rid of some of the less interesting ones
- to fit everything on the slide
- But one thing you'll notice is that there are two → response codes
Sample header output
HTTP/1.1 302 Found
Location: /
HTTP/1.1 200 OK
Last-Modified: Fri, 28 Mar 2014 00:44:43 GMT
Content-Length: 1986
Vary: Accept-Encoding
Content-Type: text/html
- … response codes
- So to figure out the redirect stuff
- You'll need to parse this output
- which is a pain
- And you can have any number of redirects before you finish
Testing with PHPUnit and cURL
api-testing(200) /$ phpunit apiTest.php
PHPUnit 3.7.28 by Sebastian Bergmann.
.....
Time: 1.21 seconds, Memory: 2.75Mb
OK (5 tests, 5 assertions)
- Here's the PHPUnit output when we run our five tests
- Only five tests
- and our suite already takes over a second to run
- If we were to include these tests with our unit tests
- this would probably convince devs to stop running them
- after all, slow → tests are unrun tests
Testing with PHPUnit and cURL
- … tests are unrun tests
- So you may want to add a group annotation
- like integration or slow
- so developers can filter which get run
- One of the problems you're going to have
- writing tests against a shared environment is → collisions
Avoiding collisions
- One of the common ways to avoid this is to segment environments
- For example, each developer gets their own setup
- Using something like Vagrant and Virtualbox
- This also ensures that each developer has the same setup
- and fixes the → works on my machine problem
Avoiding collisions
- Juan Treminio has a full talk on vagrant tomorrow
- but the basic idea is to create an easy to use
- system for each developer to run their code on
- So instead of everyone connecting to the same database
- They have their own copy of the database
- Maybe with fake information, maybe with redacted data
Avoiding collisions
- A really easy way to set up the base for your local dev
- Is with Puphpet, a web front end for setting up
- both vagrant and puppet to run one or more Virtual machines
- Again, if you want to know more about that
- Go to Juan's talk
Avoiding collisions
api-testing(310 vagrant) /$ vagrant status
Current machine states:
api running (virtualbox)
cache running (virtualbox)
db running (virtualbox)
log not created (virtualbox)
monitor not created (virtualbox)
nosql not created (virtualbox)
web running (virtualbox)
This environment represents multiple VMs. The VMs are all
listed above with their current state. For more information
about a specific VM, run `vagrant status NAME`.
- Here's an example vagrant set up
- We've got seven virtual machines each with a different job
- Your setup will most likely be completely different
- But this kind of granularity lets you do even more testing
- For example, three of these machines aren't running
- Does your application handle not being able to talk to Mongo?
- You can just turn off your database or API
- And cleanly handle the errors for a better experience
Testing APIs with Behat
- Alright, enough with PHPUnit and vagrant
- Let's get in to a better way of doing these sorts of tests
- Again, there's nothing really wrong with PHPUnit
- It's just not the easiest tool for the job
- I don't like repeating myself with all of that boilerplate
Testing APIs with Behat
- Mink is a Behat extension that simulates a browser
- How many of y'all have used Mink to test web stuff?
Testing APIs with Behat
- Yeah, we're not going to talk about Mink
- Mink is good for some things
- But it is sloooooooooooow
- And we really don't want to emulate a browser to test an API
- Like PHPUnit and cURL, Mink will work
- It's just not the best tool for the job
Testing APIs with Behat
- Let's write some tests for a very simple heartbeat API
- This is a ping endpoint that responds to different methods
- We'll talk briefly about HTTP methods
- And then write an example Behat feature file for this API
- Can any of y'all name all 27 HTTP methods?
HTTP Methods
| GET |
POST |
| HEAD |
PUT |
| OPTIONS |
DELETE |
| TRACE |
"PATCH" |
| CONNECT |
- There's really only 8
- And one unofficial one
- And one of those you're unlikely to every encounter
- The ones on the left → are considered safe
HTTP Methods
| GET |
POST |
| HEAD |
PUT |
| OPTIONS |
DELETE |
| TRACE |
"PATCH" |
| CONNECT |
- … are considered safe
- So calling them should not change anything
- GET returns content
- HEAD is just looking for headers and response codes
- OPTIONS tells you about the resource and how to interact
- TRACE is used for diagnostics. I've never used it.
- Connect is used for proxying. I've never met anyone that's used it.
HTTP Methods
| GET |
POST |
| HEAD |
PUT |
| OPTIONS |
DELETE |
| TRACE |
"PATCH" |
| CONNECT |
- The ones on the right are unsafe, meaning they change things
- POST is used for creating new resources
- PUT is used for creating or updating named resources
- DELETE is used for creating new resources
- No, wait... it's probably for removing resources
- PATCH is for updating just a part of a resource
- It's not an offical method, but it's useful and frequently used
Testing APIs with Behat
# features/ping-controller.feature
Feature: Ping controller
To allow API testing
As a client
I should be able to ping the API
- Let's start some Behat testing of our Ping endpoint
- This is pretty standard Gherkin stuff
- Basically describing what this particular feature does
Testing APIs with Behat
Scenario: GET ping endpoint
When I send a GET request to "/ping"
Then the response code should be 200
And the response should contain json with a recent timestamp
- Here's the first scenario for our ping endpoint
- Sending a GET request
- to the ping endpoint
- Should give us a HTTP 200 OK
- And a recent timestamp
- Let's start on the feature file for this scenario
Testing APIs with Behat
use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
use Behat\Behat\Context\BehatContext;
use Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';
- First we have to include all of the standard use
- and require statements
- This is all pretty standard
- But I did warn you that you might accidentally learn this
Testing APIs with Behat
public function __construct(array $parameters) {
$curl = new \Buzz\Client\Curl();
$curl->setOption(CURLOPT_FOLLOWLOCATION,
false);
$browser = new \Buzz\Browser($curl);
$this->useContext('api',
new Behat\CommonContexts\WebApiContext(
$parameters['base_url'], $browser
));
…
- Here's the constructor for our FeatureContext
- We're using Buzz → under the covers for our cURL wrapper
Testing APIs with Behat
public function __construct(array $parameters) {
$curl = new \Buzz\Client\Curl();
$curl->setOption(CURLOPT_FOLLOWLOCATION,
false);
$browser = new \Buzz\Browser($curl);
$this->useContext('api',
new Behat\CommonContexts\WebApiContext(
$parameters['base_url'], $browser
));
…
- … under the covers for our cURL wrapper
- And explicitly not following redirects
- You may need to change that if you're testing redirects
- Next we → set the context up
Testing APIs with Behat
public function __construct(array $parameters) {
$curl = new \Buzz\Client\Curl();
$curl->setOption(CURLOPT_FOLLOWLOCATION,
false);
$browser = new \Buzz\Browser($curl);
$this->useContext('api',
new Behat\CommonContexts\WebApiContext(
$parameters['base_url'], $browser
));
…
- … set the context up
- This is the important part for speeding things up
- Since we're using cURL as our browser instead of Firefox
- It will also set the base URL from the Behat.yml file
Testing APIs with Behat
…
$this->getSubcontext('api')
->setPlaceHolder(
'BASE_URL',
$parameters['base_url']
);
}
- And then we set the URL placeholder for use later
Testing APIs with Behat
Scenario: GET ping endpoint
When I send a GET request to "/ping"
Then the response code should be 200
And the response should contain json with a recent timestamp
- Behat automagically handles the first two lines
- Making the request and checking the status code
- So all that we need to write is the response body check
Testing APIs with Behat
/**
* @Given /^the response should contain json with a recent timestamp$/
*/
public function theResponseShouldContainJsonWithARecentTimestamp() {
…
- In hindsight
- I probably should have chosen some shorter names for these things
- Oh well, we'll roll with this random wrapping
Testing APIs with Behat
…
$response = $this->getSubcontext('api')
->getBrowser()
->getLastResponse()
->getContent();
$time = time();
$response = json_decode($response, true);
…
- Here we're making a request to the server
- Then getting the current timestamp
- And parsing the JSON it sends back
- I put it in this weird order to help with timing issues
- JSON parsing in this case is real quick
- But for really big JSON blobs can take a while
Testing APIs with Behat
…
assertGreaterThan(
$time - 2000,
$response['time']
);
assertLessThan(
$time + 2000,
$response['time']
);
}
- Then finally, we make two assertions that our time is close
- You can't just check equality
- Since the two clocks are probably not exact
- And you have transit and processing time
Testing APIs with Behat
api-testing(200) /$ ./vendor/bin/behat tests/functional/ping.feature
Feature: Ping controller
To allow API testing
As a client
I should be able to ping the API
Scenario: GET ping endpoint
When I send a GET request to "/ping"
Then the response code should be 200
And the response should contain json with a recent timestamp
1 scenario (1 passed)
2 steps (2 passed)
0m0.137s
- If you run that fancy new feature test
- you'll hopefully see something more like this
- The most important thing to notice here is how fast it ran
- Compare that to firing up Firefox
- connecting to the API
- and then tearing down Firefox
Testing APIs with Behat
Scenario: OPTIONS ping endpoint
When I send a OPTIONS request to "/ping"
Then the response code should be 204
And the response should be empty
And the header 'Access-Control-Allow-Methods' should be 'GET,HEAD,OPTIONS,PATCH,POST,PUT'
- How about another test, this time on that OPTIONS method
- Options are how you query the API to find out what's allowed
- The OPTIONS method is not supposed to return any content
- So the → status code should be 204 no content
Testing APIs with Behat
Scenario: OPTIONS ping endpoint
When I send a OPTIONS request to "/ping"
Then the response code should be 204
And the response should be empty
And the header 'Access-Control-Allow-Methods' should be 'GET,HEAD,OPTIONS,PATCH,POST,PUT'
- … status code should be 204 no content
- And the body of the response should be empty
- All of the information that OPTIONS returns
- Will be in → the headers
Testing APIs with Behat
Scenario: OPTIONS ping endpoint
When I send a OPTIONS request to "/ping"
Then the response code should be 204
And the response should be empty
And the header 'Access-Control-Allow-Methods' should be 'GET,HEAD,OPTIONS,PATCH,POST,PUT'
- → the headers
- In this case we're going to check that it sends a header
- called Access-Control-Allow-Methods
- that is set to a list of allowed HTTP methods
Testing APIs with Behat
/**
* Asserts that the response is empty.
* @Given /^the response should be empty$/
*/
public function theResponseShouldBeEmpty() {
$response = $this->getSubcontext('api')
->getBrowser()->getLastResponse()
->getContent();
assertEquals('', $response);
}
- Testing that the body is empty is pretty trivial
- We just get the content from the response
- and compare it to an empty string
Testing APIs with Behat
/**
* @Given /^the header \'([^\']*)\' should be \'([^\']*)\'$/
*/
public function theHeaderShouldBe($name, $value) {
$headers = $this->getSubcontext('api')
->getBrowser()->getLastResponse()
->getHeaders();
assertContains($name . ': ' . $value, $headers);
}
- Headers are much easier here than they were with PHPUnit and cURL
- We call the → getHeaders()
Testing APIs with Behat
/**
* @Given /^the header \'([^\']*)\' should be \'([^\']*)\'$/
*/
public function theHeaderShouldBe($name, $value) {
$headers = $this->getSubcontext('api')
->getBrowser()->getLastResponse()
->getHeaders();
assertContains($name . ': ' . $value, $headers);
}
- … getHeaders() method on the response
- Which returns an array of headers
- We can then check that the header exists in the array
- Simple!
Testing APIs with Behat
- Hopefully you see why using PHPUnit and cURL isn't as good
- as Beecat errr; → Behat
Testing APIs with Behat
- … Behat
- So the idea here is to use these feature files
- to describe your API's responses
- Feature files are very easy to write
- you don't need to be that technical
- as long as you understand APIs
Designing APIs with Behat
- How would you go about using Behat to plan an API?
- I'd start with laying out my resource structure
- Each resource would have a feature file
Designing APIs with Behat
- And each feature would start with the HTTP methods
- define how the API should respond to each
- And build up from that humble beginning
Omni Adams
@omnicolor
Mashery
http://omni-spot.blogspot.com
https://joind.in/10811
- Thanks for your time
- My name is Omni Adams
- Find me on the Twitter as omnicolor
- Please give me (and all of the speakers) feedback!
/


如果你看到这个页面，证明页面初始化失败了，这很可能是由于你直接在本地打开简历的缘故。EasyResume需要用HTTP的方法访问才能初始化。若你已经安装了python, 可以尝试：
python -m SimpleHTTPServer
来启动HTTP服务，然后浏览器中输入http://localhost:8000去查看resume.html
If you can see this, EasyResume is not working right. This is probably because you're viewing this on your file system instead of a web server. If you have installed python, try running
python -m SimpleHTTPServer
and going to http://localhost:8000 then check resume.html


Times and Habits
which timebox and habits techniques did you try?
I havent had much of a chance to try any yet, usually what i do is a version of time boxing. My attntion span is usually quite short, so when i start to loose focus after say, 20 minutes I'll take a 5 minute brake doing something else that engages my mind such as reading or sudoku ect, then come back to the task while trying to not think too much about how much work is still to be done. the more stressed I am the more distractable I am.
What did you find interesting?
The tips and tricks for "getting into the zone"
What worked for you?
I haven't had a decent chance to test them out yet
Which will you experiment with further?
Timeboxing, with the recap and reviewing sessions at the beginning and end


{% if database.has_persistence %}
Currently, the data in this database is persisted on disk. Click on the button below to change persistence to memory only. Be aware that when the data is persisted only in memory, it will be lost if the database restarts.
{% else %}
Currently, the data in this database is kept only in memory. Click on the button below to persist the data on disk, and no data will be lost even if the database restarts.
{% endif %}
{% if last_change_persistence and last_change_persistence.is_status_error %}
{% else %}
{% endif %}
{% include "admin/confirmation_modal_input.html" with modal_id="persistence_modal" title="Change persistence" body_text="logical/modal/persistence_database.html" input_name="database_name" submit_button_value="Apply" submit_button_name="database_change_persistence" submit_button_id="id_persistence_btn" %}
{% include "admin/confirmation_modal.html" with modal_id="retry_change_persistence_modal" confirmation_message="Do you want to try changing the database persistence again?" box_title="Change persistence" button_type="submit" button_value="Retry Change Persistence" button_name="retry_change_persistence" %}
{% endblock %}
{% block database_button_save %}
{% endblock %}
{% block js_footer %}
{{ block.super }}
{% endblock %}


3. Quick start¶
3.1. Download and Install s3hark¶
The app is here if you haven’t got it. Follow the instruction here to download and install the application.
3.2. Download and Install OpenSees¶
The current version of s3hark utilizes OpenSees as its backend. Its internal backend is being developed and will be available in next release.
If you don’t have OpenSees installed, go to the download page to register.
After registration, you can proceed to the download page by entering your email address and clicking the Submit button.
Read through that page, then download and install the correct versions of OpenSees and Tcl depending on your system (Windows or Mac).
Remember the installation path of OpenSees.
3.3. Download input motion files¶
Click this link
to download demos for input rock motion files.
Unzip the downloaded file, and you’ll see two json demos: one is for 1D shaking, the other is for bi-directional shaking. You can use either one.
3.4. Add soil layers¶
Click the ‘+’ button on the top of the table to add a soil layer.
3.5. Run the analysis¶
Make sure the following two paths have been set correctly in the Configure tab:
- OpenSees executable path
- Ground motion file path
Click the ‘Analyze’ button to start the simulation.


Taiwan Tech Sector Slumps
by Computer Daily NewsTaiwan’s tech sector took its biggest hit of the year in October, with 19 companies monitored by the Nikkei Asian Review reporting combined a revenue drop of 3.5% on the year.
But key Apple and Huawei suppliers proved surprisingly resilient thanks to strong smartphone launches and strategic stockpiling by their two biggest clients.
The 19 Taiwanese tech suppliers included in the Nikkei’s monthly tech tacker serve as a bellwether of the global tech industry.
Their clients include hardware giants Apple, Huawei, HP, Dell and Cisco, as well as Internet companies such as Amazon and Google.


When you pick up the phone to call a potential customer do you ever have trouble figuring out what to say?

Why?
Maybe because you aren't doing sales the right way for you.
What would happen if you had a better way?
What if ?
You could show off your personal values along with your product or service?
Your customers were engaged from the moment you started speaking?
Sales was fun?
How?
It's time to stand out from your competition.
It's time to compel people to work with you.
It's time to find the best customers
It's time to change the game, telling YOUR story.
On June 24th, I will be releasing Story Selling: How to Tell the Tale of Success, shows you how to give your sales stories a happy ending.
In this book you will learn how stories can change how people see you.
You will learn how to craft your own story, make it relate-able, and strike the perfect chord in the people who need to hear it most, your future customers.

Ready to transform your business with Story Selling?