This class implements origin-based algorithm B. More...
#include <DAGraphB.h>
Public Member Functions | |
| DAGraphB (StarNetwork *net, ODMatrix *mat, FPType zeroFlow, FPType dirTol, int originIndex, bool useMultiStep) | |
| bool | moveFlow () |
| Public Member Functions inherited from DAGraph | |
| bool | addLink (StarLink *link) |
| bool | removeUnusedLinks () |
| bool | removeUnusedLinks (const std::list< StarLink * > &links) |
| void | getOutLinks (int nodeIndex, std::list< StarLink * > &listRef) |
| void | getInLinks (int nodeIndex, std::list< StarLink * > &listRef) |
| std::list< StarLink * > | getOutLinksCopy (int nodeIndex) const |
| std::list< StarLink * > | getInLinksCopy (int nodeIndex) const |
| int | beginAscPass () |
| int | getNextAscPass () |
| int | beginDescPass () |
| int | getNextDescPass () |
| bool | topologicalSort () |
| void | buildMinMaxTrees (int destIndex) |
| bool | addBetterLinks () |
| void | addOriginFlow (int linkIndex, FPType demand) |
| void | addOriginFlowAndCreateLink (StarLink *link, FPType demand) |
| void | setOriginFlow (int index, FPType flow) |
| void | setOriginFlowToZero (int linkIndex) |
| FPType | getOriginFlow (int linkIndex) const |
| int | getOriginIndex () const |
| void | print () const |
| void | printOriginFlow () const |
| void | printShPath (int node) |
| void | printMaxShPath (int node) |
| FPType | checkOFlowsFeasibility () |
| FPType | getNbLinksInBush () const |
Protected Member Functions | |
| virtual FPType | calcFlowStep (Path *minPath, Path *maxPath) const |
| Protected Member Functions inherited from DAGraph | |
| DAGraph (StarNetwork *net, ODMatrix *mat, FPType zeroFlow, int originIndex) | |
| FPType | getDemand (int nodeIndex) const |
| DAGraphNode * | getNode (int index) const |
| bool | removeLink (int index) |
| virtual bool | handleBackEdge (StarLink *link) |
| virtual void | handleExploredLink (StarLink *link) |
| virtual bool | checkPositiveFlow (int linkIndex) |
Protected Attributes | |
| int | nbIter |
| Protected Attributes inherited from DAGraph | |
| int * | nodeIndexes_ |
| int | nodeSize_ |
Private Member Functions | |
| bool | performFlowMove (int index, int origin) |
| void | addFlow (StarLink *link, FPType dFlow) |
| void | printMinPathOFlows (int index) const |
| void | printMaxPathOFlows (int index) const |
Static Private Attributes | |
| static bool | useMultiStep_ = false |
| static FPType | dirTol_ = 0.0 |
Additional Inherited Members | |
| Static Protected Attributes inherited from DAGraph | |
| static StarNetwork * | net_ = NULL |
| static ODMatrix * | mat_ = NULL |
| static FPType | zeroFlow_ = 0.0 |
Detailed Description
This class implements origin-based algorithm B.
For details see [7].
Constructor & Destructor Documentation
| DAGraphB::DAGraphB | ( | StarNetwork * | net, |
| ODMatrix * | mat, | ||
| FPType | zeroFlow, | ||
| FPType | dirTol, | ||
| int | originIndex, | ||
| bool | useMultiStep | ||
| ) |
- Parameters
-
useMultiStep true if multiple Newton steps must be applied, false otherwise. dirTol tolerance of the direction of descent.
Member Function Documentation
|
private |
Adds flow dFlow to link, updates corresponding origin flow and recalculates travel time of link.
Implements Newton flow step. See DAGraphBWithStep for other step size implementations.
Reimplemented in DAGraphBWithStep.
|
virtual |
This method must be implemented by derived classes. It must change origin flows and corresponding link flows and travel times by brining the current solution closer to equilibrium.
Implements DAGraph.
|
private |
Perform a flow move: flow is moved from longest path to shortest path that belong to the bush and start at origin and finish at node index. It is assumed that minPath and maxPath do not have common links.
|
private |
For debugging.
|
private |
For debugging.
The documentation for this class was generated from the following files:
- DAGraphB.h
- DAGraphB.cpp


Some applications need to expose an API that will not only handle synchronous requests, but also open a websocket to asynchronously push new notifications to the visualization client and accept plain socket channels from other information feeders. This tutorial will explain how to implement an application that offers three different interfaces to its Akka actors: HTTP request, plain socket and websocket.
As an illustration, we will mimic an Easter eggs hunt, with one map for the various participants to hide their own egg and another map to find the hidden eggs.
ReactiveSystem
application object.ReactiveApi
and its associated services FindService
and HideService
.SocketService
actor.WebSocketServer
websocket server.SocketActor
, FindActor
, HideActor
and MarkerActor
.The application will eventually present a visual interface such as the following screenshot when run with the default configuration:
In order to organize our Easter eggs hunt, a deeper thought into our application will reveal the need for many resources.
Each of these resources could be considered as a single service. However, we basically need only two services: one to hide one single egg and one to find where the eggs were deposited.
As previously shown, some of the resources are independent of these services and would be handled as common stuff. This oversimplification leaves a hole since we lost the plain socket interface and the websocket interface, called from both map pages through JavaScript.
The API will then be split into five services:
SocketService
opens its own port to listen for plain socket connections, distinct from the following HTTP-based services;FindService
defines the routes to static resources (index.html
and find.js
) for the map;HideService
defines the routes to static resources (index.html
and hide.js
) for the map, as well as an HTTP-based (REST-like) webservice;RootService
handles the static routes to common stuff, as well as the routing to the above two services;WebSocketServer
websockets server is a Spray service as the above four other services.The ReactiveSystem
application object is responsible for initializing the actor system, the websockets' server, the plain socket listener actor and the HTTP request listener actor.
The SocketService
opens its own port to listen for plain socket connections, distinct from the other HTTP-based services.
IO(Tcp) ! Tcp.Bind(socketService, new InetSocketAddress(Configuration.host, Configuration.portTcp))
Each time a new connection is established, it is handled to a new instance of the SocketActor
.
sender ! Tcp.Register(context.actorOf(Props(classOf[SocketActor], sender)))
The actor can then handle each received data message to analyze it and send further messages into the actor system.
val coords = "(-?\\d+\\.\\d+) (-?\\d+\\.\\d+)".r
override def receive = {
case Tcp.Received(data) =>
data.utf8String.trim match {
case coords(lng, lat) =>
marker ! MarkerActor.Move(lng, lat)
case msg => log.info(msg)
}
The WebSocketServer
websockets' server is a Spray service using the WebSocket for spray-can despite its lacking the ease of use of the RFC6455 basic methods.
The WebSocketServer
allows for registration of several actors reacting each one to its own resource URL, in much the same way as the routes are usually defined with Spray.
val wsService = system.actorOf(Props(new RootService[WebSocketServer](wsroutes)), "wss")
lazy val wsroutes = logRequest(showReq _) {
new FindService(find).wsroute ~
new HideService(hide).wsroute ~
complete(NotFound)
}
IO(UHttp) ! Http.Bind(wsService, Configuration.host, Configuration.portWs)
As the WebSocketServer
registers at most one actor for each resource URL, it can forward to this actor the incoming web socket's TextFrame
as Message
, web socket's CloseFrame
and HTTP's Http.ConnectionClosed
as Close
as well as HTTP's Http.ErrorClosed
as Error
, thus getting closer to the RFC6455 methods through the use of ReactiveServerMessage
.
// this is the actor's behavior after the WebSocket handshaking resulted in an upgraded request
override def businessLogic = {
case TextFrame(message) =>
ping
handler ! WebSocket.Message(this, message.utf8String)
// ...
case Http.ErrorClosed(cause) =>
handler ! WebSocket.Error(this, cause)
case CloseFrame(status, reason) =>
handler ! WebSocket.Close(this, status.code, reason)
case Http.Closed =>
handler ! WebSocket.Close(this, StatusCode.NormalClose.code, "")
// ...
}
Note that there is no way to force the registered handler
actor to correctly handle the four messages defining the server-side protocol in the WebSocket
companion object.
object WebSocket {
sealed trait WebSocketMessage
case class Open(ws : WebSocket) extends WebSocketMessage
case class Message(ws : WebSocket, msg : String) extends WebSocketMessage
case class Close(ws : WebSocket, code : Int, reason : String) extends WebSocketMessage
case class Error(ws : WebSocket, reason : String) extends WebSocketMessage
}
Let's explore the ReactiveApi
trait, which defines the REST endpoints. In keeping with the structure exposed above, each endpoint has been kept in its own class. The ReactiveApi
trait constructs the classes for these endpoints and then concatenates their respective routes.
trait ReactiveApi extends RouteConcatenation with StaticRoute with AbstractSystem {
this : MainActors =>
private def showReq(req : HttpRequest) = LogEntry(req.uri, InfoLevel)
val rootService = system.actorOf(Props(new RootService[BasicRouteActor](routes)), "routes")
lazy val routes = logRequest(showReq _) {
new FindService(find).route ~
new HideService(hide).route ~
staticRoute
}
val wsService = system.actorOf(Props(new RootService[WebSocketServer](wsroutes)), "wss")
lazy val wsroutes = logRequest(showReq _) {
new FindService(find).wsroute ~
new HideService(hide).wsroute ~
complete(NotFound)
}
val socketService = system.actorOf(Props[SocketService], "tcp")
}
The RootService
then routes the incoming HTTP requests accordingly.
class RootService[RA <: RouteActor](val route : Route)(implicit tag : ClassTag[RA]) extends HttpServiceActor with ActorLogging {
override def receive = {
case connected : Http.Connected =>
// implement the "per-request actor" pattern
sender ! Http.Register(context.actorOf(Props(tag.runtimeClass, sender, route)))
case whatever => log.debug("RootService got some {}", whatever)
}
}
trait RouteActor extends HttpServiceActor {
def connection : ActorRef
def route : Route
}
private[api] class BasicRouteActor(val connection : ActorRef, val route : Route) extends RouteActor {
override def receive = runRoute(route)
}
Since the FindService
is rather simple, let's study the HideService
implementation instead.
class HideService(val hide : ActorRef)(implicit system : ActorSystem) extends Directives with ApplicationJsonFormats {
private implicit val moveFormat = jsonFormat2(MarkerActor.Move)
lazy val route =
pathPrefix("hide") {
val dir = "hide/"
pathEndOrSingleSlash {
get {
getFromResource(dir + "index.html")
} ~
post {
handleWith {
move : MarkerActor.Move =>
hide ! move
"hidden"
}
}
} ~
path("ws") {
requestUri { uri =>
val wsUri = uri.withPort(Configuration.portWs)
system.log.debug("redirect {} to {}", uri, wsUri)
redirect(wsUri, StatusCodes.PermanentRedirect)
}
} ~
getFromResourceDirectory(dir)
}
lazy val wsroute =
pathPrefix("hide") {
path("ws") {
implicit ctx =>
ctx.responder ! WebSocket.Register(ctx.request, hide, true)
}
}
}
This service will handle all requests under the /hide
path prefix. For the /hide/ws
path, it will redirect the request to the websocket port. A special treatment is reserved to the /hide/
path. For all other URL, it will try to serve the named resource from the hide
resources directory.
Depending on the HTTP method used to access the /hide/
path, either the index.html
is served for a GET
or, for a POST
, the body of the request is unmarshalled from the JSON representation of a MarkerActor.Move
object and sent forward to the hide
actor.
Testing such an architecture involves testing every distinct service and the routes which lead to the static pages. Since this is the simplest task, we will start with these tests, before extending to the more complex cases for services out of the reach of Spray routing capabilities.
Testing the static routes mainly consists in sending a request to the routes
defined in the ReactiveApi
and checking the response status and content are as expected.
There is no need to start any real HTTP server, since the HTTP request objects are simply created and directly handled to the routes
.
class ReactiveApiSpec extends Specification with Specs2RouteTest with MainActors with ReactiveApi {
def actorRefFactory = system
"Reactive API" should {
"return the correct page for GET requests to the pages' path" in {
Get() ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("Easter Eggs")
}
Get("/") ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("Easter Eggs")
}
Get("/find") ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("-- Find")
responseAs[String] must contain ("find.js")
responseAs[String] must contain (">Find<")
}
Get("/hide") ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("-- Hide")
responseAs[String] must contain ("hide.js")
responseAs[String] must contain (">Hide<")
}
}
"return the javascripts for GET requests to the js files" in {
Get("/find/find.js") ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("function")
}
Get("/hide/hide.js") ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must contain ("function")
}
}
"return the image for GET requests to the markers files" in {
Get("/markers/marker0.png") ~> routes ~> check {
status === StatusCodes.OK
mediaType must be (MediaTypes.`image/png`)
}
// ...
Get("/markers/markerC.png") ~> routes ~> check {
status === StatusCodes.OK
mediaType must be (MediaTypes.`image/png`)
}
}
"redirect the GET requests to websocket paths" in {
Get("/find/ws") ~> routes ~> check {
status === StatusCodes.PermanentRedirect
}
Get("/hide/ws") ~> routes ~> check {
status === StatusCodes.PermanentRedirect
}
}
"leave GET requests to unknown paths unhandled" in {
Get("/play") ~> routes ~> check {
status === StatusCodes.NotFound
}
}
}
}
As the availability of the ReactiveApi
does not depend on the system instantiation, this enables to write tests that exercise just that API.
Building HTTP request and passing them to the routes
is very similar to the case for static resources. The main differences may be the necessity to build the entity body or to add credentials headers, before handing the request object to the routes
.
@RunWith(classOf[JUnitRunner])
class HideServiceSpec extends Specification with Directives with Specs2RouteTest with MainActors with ReactiveApi {
def actorRefFactory = system
"Reactive API" should {
"hide bunny" in {
Post("/hide").withEntity(HttpEntity(MediaTypes.`application/json`, """
{"longitude" : "-38.4798", "latitude" : "-3.8093"}
""")) ~> routes ~> check {
status === StatusCodes.OK
responseAs[String] must === ("hidden")
}
}
}
}
In order to test the websocket service, we need to start the server from within the test.
@RunWith(classOf[JUnitRunner])
class WebSocketTest extends FunSuite with MainActors with ReactiveApi {
implicit lazy val system = ActorSystem("reactive-socket-WebSocketTest")
sys.addShutdownHook({ system.shutdown })
test("websocket connection") {
val wss = system.actorOf(Props(new RootService[WebSocketServer](new FindService(find).wsroute ~ new HideService(hide).wsroute)), "wswss")
IO(UHttp) ! Http.Bind(wss, Configuration.host, Configuration.portWs)
Thread.sleep(2000L) // wait for all servers to be cleanly started
Then we can start one websocket client to each service.
var wsmsg = ""
val wsf = system.actorOf(Props(new TestingWebSocketClient {
override def businessLogic = {
case WebSocket.Release => close
case TextFrame(msg) => wsmsg = msg.utf8String
case whatever => // ignore
}
}))
wsf ! WebSocket.Connect(Configuration.host, Configuration.portWs, "/find/ws")
val wsh = system.actorOf(Props(new TestingWebSocketClient {
override def businessLogic = {
case WebSocket.Send(message) =>
log.info("Client sending message {}", message)
send(message)
case WebSocket.Release => close
case whatever => // ignore
}
}))
wsh ! WebSocket.Connect(Configuration.host, Configuration.portWs, "/hide/ws")
And only then we can really perform the tests, sending some messages through the websocket linked to the hide service and checking for the correct answer from the websocket linked to the find service.
wsh ! WebSocket.Send("2.1523721 41.4140567")
Thread.sleep(1000L)
val first = """\{"move":\{"id":"[-0-9a-f]+","idx":"0","longitude":2\.1523721,"latitude":41\.4140567\}\}""".r
assert(None != first.findFirstIn(wsmsg))
Testing the plain socket service will be very similar, but instead of starting the websocket listener actor for the hide service, we will start the plain socket service.
@RunWith(classOf[JUnitRunner])
class PlainSocketTest extends FunSuite with MainActors with ReactiveApi {
implicit lazy val system = ActorSystem("reactive-socket-PlainSocketTest")
sys.addShutdownHook({ system.shutdown })
test("pure socket connection") {
val wss = system.actorOf(Props(new RootService[WebSocketServer](new FindService(find).wsroute)), "pswss")
IO(UHttp) ! Http.Bind(wss, Configuration.host, Configuration.portWs)
IO(Tcp) ! Tcp.Bind(socketService, new InetSocketAddress(Configuration.host, Configuration.portTcp))
Thread.sleep(2000L) // wait for all servers to be cleanly started
The tests will then be performed by sending some messages through a socket to our hide service and checking for the correct answer from the websocket linked to the find service.
val conn = new Socket
conn.connect(new InetSocketAddress("localhost", Configuration.portTcp))
conn.getOutputStream.write("2.1523721 41.4140567\n".getBytes)
conn.getOutputStream.flush
Thread.sleep(1000L)
val first = """\{"move":\{"id":"[-0-9a-f]+","idx":"C","longitude":2\.1523721,"latitude":41\.4140567\}\}""".r
assert(None != first.findFirstIn(wsmsg))
This tutorial exposed a solution to implement an application that offers three different kind of interfaces to its Akka actors: HTTP request, plain socket and websocket.
Testing such an architecture involves testing every distinct service and the routes which lead to the static resources. Strategies to organize the tests have been presented.
Further reading for more elaborated architectures are the following Activator templates:


1. The term "angle of attack" is defined as the angle
Between the wing chord line and the relative wind Between the airplane's climb angle and the horizon Formed by the longitudinal axis of the airplane and the chord line of the wing
2. What is the purpose of the rudder on an airplane?
To control roll To control overbanking tendency To control yaw
3. An airplane said to be inherently stable will?
Be difficult to stall Require less effort to control Not spin
4. Which basic flight maneuver increases the load factor on an airplane as compared to straight-and-level flight?
Climbs Turns Stalls
5. What is one purpose of wing flaps?
To enable the pilot to make steeper approaches to a landing without increasing the airspeed To relieve the pilot of maintaining continuous pressure on the controls To decrease wing area to vary the lift


We are very pleased to bring you Brewery Finder! Thank you for visiting us and I hope you enjoy many breweries that you stumble upon. We are a team of three that are all currently involved in the University of Pennsylvania's Coding Bootcamp. We are well under our way to becoming Full Stack Web Developers and are pleased to have you on our journey! Below you will find a way to contact us! We are not afraid of feedback or check out other projects we have done. Thank You!


{% extends "base_content.html" %} {% load engine_tags %} {% block headtitle %} Upload Data {% endblock %} {% block ribbon %} {% include 'widgets/upload_button.html' %} {% endblock %} {% block content %}
Upload a file
Your storage space is {{ maximum_size|filesizeformat }}. Across all projects you use {{ current_size|filesizeformat }}.
File or zip collection of files you want to analyze.
Direct Data Entry
You may manually create a dataset here.
Name of the data.
Enter data as text instead of uploading a file ( {{ form.input_text.field.max_length }} characters ).


RECENT UPDATES
2001/07/17
Registration form
is up; registration is now open.
2001/07/13
Detailed tentative
schedule
for Sunday
2001/07/12
Invited tutorials information page
2001/07/12
Updated Latex .sty and Word example files for authors; detailed instructions from Sheridan Printing
2001/07/04
Final paper due changed to Aug. 14
2001/07/04
Accepted papers
2001/06/12
Student Travel grants: guidelines for applications
2001/06/07
Invited speakers
2001/06/01
Workshops call for papers


2021 Middlew Montsalvat: Intel SGX Shielding for GraalVM Native Images Yuhala, Peterson, Ménétrey, Jämes, Felber, Pascal, Schiavoni, Valerio, Tchana, Alain, Thomas, Gaël, Guiroux, Hugo, and Lozi, Jean-Pierre In Proceedings of the 22nd International Middleware Conference 2021 DSN Plinius: Secure and Persistent Machine Learning Model Training Yuhala, Peterson, Felber, Pascal, Schiavoni, Valerio, and Tchana, Alain In 51st Annual {IEEE/IFIP} International Conference on Dependable Systems and Networks, {DSN} 2021, Taipei, Taiwan, June 21-24, 2021 2021 Bib PDF @inproceedings{DBLP:conf/dsn/YuhalaFST21, abbr = {DSN}, author = {Yuhala, Peterson and Felber, Pascal and Schiavoni, Valerio and Tchana, Alain}, title = {Plinius: Secure and Persistent Machine Learning Model Training}, booktitle = {51st Annual {IEEE/IFIP} International Conference on Dependable Systems and Networks, {DSN} 2021, Taipei, Taiwan, June 21-24, 2021}, pages = {52--62}, publisher = {{IEEE}}, year = {2021}, url = {https://doi.org/10.1109/DSN48987.2021.00022}, doi = {10.1109/DSN48987.2021.00022}, timestamp = {Mon, 09 Aug 2021 14:59:44 +0200}, biburl = {https://dblp.org/rec/conf/dsn/YuhalaFST21.bib}, bibsource = {dblp computer science bibliography, https://dblp.org}, bibtex_show = {true}, pdf = {https://arxiv.org/pdf/2104.02987.pdf}, selected = {true} } VEE (No)Compromis: paging virtualization is not a fatality Teabe, Boris, Yuhala, Peterson, Tchana, Alain, Hermenier, Fabien, Hagimont, Daniel, and Muller, Gilles In {VEE} '21: 17th {ACM} {SIGPLAN/SIGOPS} International Conference on Virtual Execution Environments, Virtual USA, April 16, 2021 2021 Bib PDF @inproceedings{DBLP:conf/vee/TeabeYTHHM21, abbr = {VEE}, author = {Teabe, Boris and Yuhala, Peterson and Tchana, Alain and Hermenier, Fabien and Hagimont, Daniel and Muller, Gilles}, editor = {Titzer, Ben L. and Xu, Harry and Zhang, Irene}, title = {(No)Compromis: paging virtualization is not a fatality}, booktitle = {{VEE} '21: 17th {ACM} {SIGPLAN/SIGOPS} International Conference on Virtual Execution Environments, Virtual USA, April 16, 2021}, pages = {43--56}, publisher = {{ACM}}, year = {2021}, url = {https://doi.org/10.1145/3453933.3454013}, doi = {10.1145/3453933.3454013}, timestamp = {Thu, 15 Apr 2021 15:02:47 +0200}, biburl = {https://dblp.org/rec/conf/vee/TeabeYTHHM21.bib}, bibsource = {dblp computer science bibliography, https://dblp.org}, bibtex_show = {true}, pdf = {https://hal.archives-ouvertes.fr/hal-03183858/file/_No_Compromis__Paging_virtualization_is_not_a_fatality%285%29.pdf}, selected = {true} }


A RMS is a resource management system based on a content mangement system.
The content management system stores data of sensors an prework this data to feeds.
here the open source system emoncms is used for inputs and feed data send by pieces of internet of things.
the content management system gets richer by syncing other information apon this fetched data.
this is be done by the project energy2use (university of paderborn), where people will look on the collected data on a specialised view and comment them and put information apon them at any datapoint.
The global system is based on sensors that are sending there input data to other systems i.e. emonHUB.
this data gets its place in a cms system i.e. emoncms.
the difficulty is in the view of internet of things, that these data or data sources has to be unique.
so a node has to have a unique id (UUID) this should be firstly done by input or better by sensor.
in this way we have the possibility to get a collaborating federated system. every late node can decide weather he should handle the data by interpreting the UUID.
so the emonTH and emonTX should send instead of a "port" number a UUID or a UUID together with the "port" number. the emonhub should give this UUID together with the data instead of a "input" number and "node" number and together with the UUID of the target CMS. the data can than be encoded for data secure. cause the target system can then decode it of knowing by the UUID.
inside the CMS (emoncms) this UUID are managed.
the previous nodes can sends node information together with this UUID by time or change on them.ike emonvie
like emonview should.
CMS should get versioning on these data. resend data should stored by a new version number.
therefore there must be changes in the main of the PHPFI*, Timestore and Mysql parts, but them ar not so big in my opinion. in this way we get a redundant CMS system for the data and data will get federative.
cause of a uniqe id of the data this data are usable over different checking systems by giving them free for the systems, like allowed for UUID *** in UUID management.
like a CouchDB the emoncms data can then get synced together to targeting systems.
This is only a first scatch, but in work with the university of Paderborn (slab) and some companies around it, we will have a
vision with this. we are researching on internet of things and internet of everything and the human machine interface of this. this is a part of the m2m communication for using the fetched data.I have emoncms and the OpenEnergyMonitor project on focus since over a year and are working with it.
so i like to do a fetch of emoncms, emonhub and emonview and bring the changes in.
We will try to make a research project out of this for the 2nd half of 2015.
what do you think about it?
Re: UUID over all parts of emon* to get a federated datawarehouse
Fist thing i tried out, is to check for the inputs and the nodes.
It is no problem in standard emoncms to use UUID by sending data instead of numbers for identifiers.
So it is possible to be unique over all installations. the only thing is to bring this UUID to be sent by emonHUB.
This should not be such a Problem.
Re: UUID over all parts of emon* to get a federated datawarehouse
As I heard the node module in emoncms is not longer needed cause of emonHub is replacing it.
Is this correct?
So in my opinon the node module in emoncms should be the counterpart to the nodesview in emonview, set by the emonhub.cfg. It should be possible to send the information by emonview to emoncms a vice versa maybe.


Development is easy these days
Tomáš Tomeček
Red Hat
Intro
- Engineer @ Red Hat
- Codes a lot
- Doing containers again
Full workflow
- Setting up a development environment
- Tinkering terminal environment
- Writing code
- Running code
- And of course testing code
Deploying code
Runtime environment
- Separate your project from others
- Ecosystem based
- virtualenv
- RVM
- npm/go/rust out of the box
- System based - containers
- Virtualization (vagrant)
Automate!
- Don't be shy with makefiles
- Or whatever the community is suggesting
Terminal environment - shell
- Tinker your shell
- Improving prompt
[user@hostname this-directory]
user@hostname ~/g/this-directory [→2] [master|3+]
- Use aliases, please!
- Petr Hodač: today 12:15, Pokročilé tipy a triky v shellu.
- Michal Halenka: today 14:30, Z shell
Terminal environment
- Terminal multiplexer (tmux)
- Easy filesystem navigation (autojump)
- *-sensible
Editor
- Pick the right one
- And become a ninja in your editor
- E.g. I picked vim
- Petr Hodač: in parallel, VIM - advanced
Code
- Style conventions
- go-fmt, autopep8
- Static analysis - linter
- Reviews
Running the code
FROM fedora
RUN dnf install -y @dependencies
COPY . /app
CMD ["/app/start-the-app"]
Running the code II
FROM fedora
RUN dnf install -y @compiler @libraries
COPY . /app
WORKDIR /app
CMD ["make"]
Running the code III
docker-compose up
Tests
- CI
- Running tests
- Integration tests
Running tests
FROM the-app-image
RUN dnf install -y @dependencies @test-libraries
CMD ["make", "unit-test"]
git
- Rebase
- cherry-pick
- reset --hard
- Resolving conflicts
- tig
Dotfiles
- Public/private
- Submodules
- Install script
- stow
Invitation to our workshop
- E112, Sunday, 10.00 - 13.00
- me and Peter Schiffer
- Containers: workshop
- Bring your own projects you want to containerize
Questions are welcome!
- TomasTomecek/openalt-2016-talk
- @TomasTomec


Filmoteka
Search result not successful. Enter the correct movie name and try again
Hey there, {{ displayName }}!
Currently logged in as {{ email }}


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
IN THE HIGH COURT OF JUDICATURE AT PATNA Criminal Miscellaneous No.45165 of 2018 Arising Out of PS.Case No. -25 Year- 2018 Thana -M ALI District- AURANGABAD ====================================================== 1. Ram Chandra Yadav S/o Shivnandan Yadav, R/o Vill.- Sasna, P.S.- Badem, District- Aurangabad (Bihar). .... .... Petitioner/s Versus 1. The State of Bihar .... .... Opposite Party/s ====================================================== Appearance : For the Petitioner/s : Mr. Lal Bahadur Singh For the Opposite Party/s : Mr. Sri Jagdhar Prasad ====================================================== CORAM: HONOURABLE MR. JUSTICE VINOD KUMAR SINHA ORAL ORDER
2 02-08-2018 The petitioner is apprehending his arrest in connection with Mali P.S. Case No. 25/2018, registered for offences punishable under Sections 379, 411/34 of the Indian Penal Code, Section 4/40 of Bihar Minor Mineral Concession Rules, 1972 and Section 15 of Prevention of Pollution Act.
Allegation as per F.I.R. is that the tractor of the petitioner was intercepted with loaded sand.
Submission of learned counsel for the petitioner is that the allegation is false and concocted and it was not seized along with the sand rather his tractor was parked beside the road and was seized.
Heard learned A.P.P. also.
Having heard both sides, let the petitioner above named, in the event of his arrest or surrender before the court below within a period of six weeks from the date of receipt/production of Patna High Court Cr.M isc. No.45165 of 2018 (2) dt.02-08-2018 2/2 a copy of this order, be enlarged on bail on furnishing bond of Rs. 25,000 (Rs. Twenty Five Thousand) with two sureties of the like amount each to the satisfaction of learned ACJM-V, Aurangabad (Bihar) in connection with Mali P.S. Case No. 25/2018, subject to the conditions as laid down under Section 438(2) of the Cr.P.C, it is further subject to the condition that:-
(i) One of the bailors of the petitioner shall be a local person having sufficient immovable property within the jurisdiction of the concerned Court.
(ii) The petitioner shall cooperate in the investigation and make himself available as and when required by the police and on the event of failure on his part to appear before the police on two consecutive dates without showing any genuine reasons, the prosecution is free to move for cancellation of his bail bonds.
(Vinod Kumar Sinha, J) sunil/Amjad/-
U T


| Package | Description |
|---|---|
| org.cojen.tupl |
See
Database to get started with Tupl. |
| org.cojen.tupl.ext |
Support for database extensions.
|
| org.cojen.tupl.tools |
| Modifier and Type | Field and Description |
|---|---|
protected Index |
VerificationObserver.index
Index currently being verified.
|
protected Index |
CompactionObserver.index
Index currently being compacted.
|
| Modifier and Type | Method and Description |
|---|---|
Index |
Database.findIndex(byte[] name)
Returns the given named index, returning null if not found.
|
default Index |
Database.findIndex(String name)
Returns the given named index, returning null if not found.
|
default Index |
Database.indexById(byte[] id)
Returns an index by its identifier, returning null if not found.
|
Index |
Database.indexById(long id)
Returns an index by its identifier, returning null if not found.
|
Index |
Database.newTemporaryIndex()
Creates a new unnamed temporary index.
|
Index |
Database.openIndex(byte[] name)
Returns the given named index, creating it if necessary.
|
default Index |
Database.openIndex(String name)
Returns the given named index, creating it if necessary.
|
| Modifier and Type | Method and Description |
|---|---|
Runnable |
Database.deleteIndex(Index index)
Fully closes and deletes the given index, but does not immediately reclaim the pages it
occupied.
|
boolean |
CompactionObserver.indexBegin(Index index)
Called before full index compaction begins.
|
boolean |
VerificationObserver.indexBegin(Index index,
int height)
Called before full index verification begins.
|
boolean |
CompactionObserver.indexComplete(Index index)
Called after index compaction has finished.
|
boolean |
VerificationObserver.indexComplete(Index index,
boolean passed,
String message)
Called after index verification has finished.
|
void |
Database.renameIndex(Index index,
byte[] newName)
Renames the given index to the one given.
|
default void |
Database.renameIndex(Index index,
String newName)
Renames the given index to the one given.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
ReplicationManager.notifyDrop(Index index)
Notification to replica after an index is dropped.
|
default void |
ReplicationManager.notifyRename(Index index,
byte[] oldName,
byte[] newName)
Notification to replica after an index is renamed.
|
default void |
ReplicationManager.notifyStore(Index index,
byte[] key,
byte[] value)
Notification to replica when an entry is stored into an index.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Verify.indexBegin(Index ix,
int height) |
Copyright © 2011–2016 Cojen. All rights reserved.


People Analytics uses advanced computer vision and machine learning technologies to analyze surveillance video and detect anomalies.


The EntitySignal object sets the state of a SignalThreshold object when it receives an incoming entity.
The SignalThreshold and its new state are specified by the TargetSignalThreshold and NewState keywords, respectively.


--- layout: archive permalink: /year-archive/ title: "Short packets" author_profile: true classes: wide redirect_from: - /wordpress/blog-posts/ ---
“It has long been an axiom of mine that the little things are infinitely the most important.” ― Arthur Conan Doyle, The Memoirs of Sherlock Holmes.{% for post in site.posts %} {% if post.categories contains 'blog' %} {% include archive-single.html type="grid"%} {% endif %} {% endfor %}


{% extends "slideshowEditor.html" %} {% block modalClass %} {{super()}} apos-files-editor apos-slideshow-editor apos-ui-modal-no-sidebar {% endblock %} {% block modalLabel %} {{ __('Edit File(s)') }} {% endblock %} {% block modalInstructions %}
{{ __('Choose PDF, Office, .txt or .rtf files. Drag them into the order you prefer.
You can also drag files from your computer into the dashed area below.') }}


{{Infobox prepared food | name = Campanelle | image = | caption = Campanelle with summer vegetables and grated cheese | alternate_name = | country = Italy | region = Italy | creator = | course = | type = Pasta | served = | main_ingredient = wheat | variations = | calories = | other = }} Campanelle {{IPA-it|kampaˈnɛlle|}} (Italian for "bellflowers"<ref name= "barilla"/> or "little bells"), is a type of pasta which is shaped like a cone with a ruffled edge,<ref name= "pastafits"/> or a bell-like flower. It is also sometimes referred to as gigli or riccioli.{{cn|date=May 2014}} It is intended to be served with a thick sauce,<ref name= "barilla"/> or in a casserole.
Campanelle can also refer to "handbells." <ref name= "geek"/>
{{reflist|refs= <ref name= "pastafits">{{cite web| url= http://pastafits.org/pasta-dictionary/| title= Pasta Shapes Dictionary | work= pastafits.org |accessdate= 2014-04-14| quote= Campanelle (“Bells”): Campanelle pasta resembles a small cone with a ruffled edge. Campanelle pasta can be paired with lean proteins, vegetables or sauces of any base. These shapes can also be a treat in a cold pasta salad }}</ref> <ref name= "barilla">{{cite web| url= http://www.barilla.com/content/product/campanelle | title= Campanelle| publisher= Barilla| accessdate= 2014-04-14| quote= Campanelle, or 'bellflowers' in Italian, has fluted, petal-like edges and a hollow center for capturing sauce. ... Campanelle is delicious paired with hearty dairy-based sauces like cheese or béchamel, vegetable sauces like beans, lentils, chickpeas, pumpkin, or other chunky vegetables. It also goes well with meat sauces, fish-based sauces, or robust tomato-based sauces.}}</ref> <ref name= "geek">{{cite web| url= http://www.wisegeek.net/what-is-campanelle.htm| title= What Is Campanelle?| publisher= wiseGEEK| accessdate= 2014-04-14| quote= The name “campanelle” is Italian for “little bells” and also refers to a musical instrument that consists of small bells, sometimes called hand bells. This pasta is named for the shape of the pasta, which resembles a simple bell shape or a cone shape with ruffled edges that make it quite appealing once on a plate.}}</ref> }}
{{Pasta}}
{{Italy-cuisine-stub}}


Distributed Training in MXNet
Distributed Training in MXNet
MXNet supports distributed training enabling us to leverage multiple machines for faster training. In this document, we describe how it works, how to launch a distributed training job and some environment variables which provide more control.
Types of Parallelism
There are two ways in which we can distribute the workload of training a neural network across multiple devices (can be either GPU or CPU). The first way is data parallelism, which refers to the case where each device stores a complete copy of the model. Each device works with a different part of the dataset, and the devices collectively update a shared model. These devices can be located on a single machine or across multiple machines. In this document, we describe how to train a model with devices distributed across machines in a data parallel way.
When models are so large that they don't fit into device memory, then a second way called model parallelism is useful. Here, different devices are assigned the task of learning different parts of the model. Currently, MXNet supports Model parallelism in a single machine only. Refer Training with multiple GPUs using model parallelism for more on this.
How Does Distributed Training Work?
The following concepts are key to understanding distributed training in MXNet:
Types of Processes
MXNet has three types of processes which communicate with each other to accomplish training of a model. - Worker: A worker node actually performs training on a batch of training samples. Before processing each batch, the workers pull weights from servers. The workers also send gradients to the servers after each batch. Depending on the workload for training a model, it might not be a good idea to run multiple worker processes on the same machine. - Server: There can be multiple servers which store the model's parameters, and communicate with workers. A server may or may not be co-located with the worker processes. - Scheduler: There is only one scheduler. The role of the scheduler is to set up the cluster. This includes waiting for messages that each node has come up and which port the node is listening on. The scheduler then lets all processes know about every other node in the cluster, so that they can communicate with each other.
KV Store
MXNet provides a key-value store, which is a critical component used for multi-device training. The communication of parameters across devices on a single machine, as well as across multiple machines, is relayed through one or more servers with a key-value store for the parameters. Each value in this store is represented by a key and value, where each parameter array in the network is assigned a key, and value refers to the weights of that parameter array. Workers push
gradients after processing a batch, and pull
updated weights before processing a new batch.
We can also pass in optimizers for the KVStore to use while updating each weight. Optimizers like Stochastic Gradient Descent define an update rule,
essentially a mathematical formula to compute the new weight based on the old weight, gradient, and some parameters.
If you are using a Gluon Trainer object or the Module API, it uses a kvstore object internally to aggregate gradients from multiple devices on the same machine as well as across different machines.
Although the API remains the same whether or not multiple machines are being used,
the notion of kvstore server exists only during distributed training.
In this case, each push
and pull
involves communication with the kvstore servers. When there are multiple devices on a single machine, gradients from these devices are first aggregated on the machine and then sent to the servers.
Note that we need to compile MXNet with the build flag USE_DIST_KVSTORE=1
to use distributed training.
The distributed mode of KVStore is enabled by calling mxnet.kvstore.create
function
with a string argument which contains the word dist
as follows:
kv = mxnet.kvstore.create('dist_sync')
Refer KVStore API for more information about KVStore.
Distribution of Keys
Each server doesn't necessarily store all the keys or parameter arrays.
Parameters are distributed across different servers. The decision of which server stores a particular key is made at random.
This distribution of keys across different servers is handled transparently by the KVStore.
It ensures that when a key is pulled, that request is sent to the server which has the corresponding value.
If the value of some key is very large, it may be sharded across different servers. This means that different servers hold different parts of the value.
Again, this is handled transparently so that the worker does not have to do anything different.
The threshold for this sharding can be controlled with the environment variable MXNET_KVSTORE_BIGARRAY_BOUND
.
See environment variables for more details.
Split training data
When running distributed training in data parallel mode, we want each machine to be working on different parts of the dataset.
For data parallel training on a single worker,
we can use mxnet.gluon.utils.split_and_load
to split a batch of samples provided by the data iterator, and then load each part of the batch on the device which will process it.
In the case of distributed training though, we would need to divide the dataset into n
parts at the beginning, so that each worker gets a different part. Each worker can then use split_and_load
to again divide that part of the dataset across different devices on a single machine.
Typically, this split of data for each worker happens through the data iterator,
on passing the number of parts and the index of parts to iterate over.
Some iterators in MXNet that support this feature are mxnet.io.MNISTIterator and mxnet.io.ImageRecordIter.
If you are using a different iterator, you can look at how the above iterators implement this.
We can use the kvstore object to get the number of workers (kv.num_workers
) and rank of the current worker (kv.rank
).
These can be passed as arguments to the iterator.
You can look at example/gluon/image_classification.py
to see an example usage.
Updating weights
KVStore server supports two modes, one which aggregates the gradients and updates the weights using those gradients, and second where the server only aggregates gradients. In the latter case, when a worker process pulls from kvstore, it gets the aggregated gradients. The worker then uses these gradients and applies the weights locally.
When using Gluon there is an option to choose between these modes by passing update_on_kvstore
variable when you create the Trainer object like this:
trainer = gluon.Trainer(net.collect_params(), optimizer='sgd',
optimizer_params={'learning_rate': opt.lr,
'wd': opt.wd,
'momentum': opt.momentum,
'multi_precision': True},
kvstore=kv,
update_on_kvstore=True)
When using the symbolic interface, it performs the weight updates on the server without the user having to do anything special.
Different Modes of Distributed Training
Distributed training itself is enabled when kvstore creation string contains the word dist
.
Different modes of distributed training can be enabled by using different types of kvstore.
dist_sync
: In synchronous distributed training, all workers use the same synchronized set of model parameters at the start of every batch. This means that after each batch, the server waits to receive gradients from each worker before it updates the model parameters. This synchronization comes at a cost because the worker pulling parameters would have to wait till the server finishes this process. In this mode, if a worker crashes, then it halts the progress of all workers.dist_async
: In asynchronous distributed training, the server receives gradients from one worker and immediately updates its store, which it uses to respond to any future pulls. This means that a worker who finishes processing a batch can pull the current parameters from server and start the next batch, even if other workers haven't finished processing the earlier batch. This is faster thandist_sync
because there is no cost of synchronization, but can take more epochs to converge. The update of weights is atomic, meaning no two updates happen on the same weight at the same time. However, the order of updates is not guaranteed. Inasync
mode, it is required to pass an optimizer because in the absence of an optimizer kvstore would replace the stored weights with received weights and this doesn't make sense for training in asynchronous mode. Hence, when using Gluon withasync
mode we need to setupdate_on_kvstore
toTrue
.dist_sync_device
: Same asdist_sync
except that when there are multiple GPUs being used on each node, this mode aggregates gradients and updates weights on GPU while dist_sync does so on CPU memory. This is faster thandist_sync
because it reduces expensive communication between GPU and CPU, but it increases memory usage on GPU.dist_async_device
: The analogue ofdist_sync_device
but in asynchronous mode.
Gradient Compression
When communication is expensive, and the ratio of computation time to communication time is low, communication can become a bottleneck. In such cases, gradient compression can be used to reduce the cost of communication, thereby speeding up training. Refer Gradient compression for more details.
Note: For small models when the cost of computation is much lower than cost of communication, distributed training might actually be slower than training on a single machine because of the overhead of communication and synchronization.
How to Start Distributed Training?
MXNet provides a script tools/launch.py to make it easy to launch a distributed training job. This supports various types of cluster resource managers like ssh
, mpirun
, yarn
and sge
.
If you already have one of these clusters setup, you can skip the next section on setting up a cluster.
If you want to use a type of cluster not mentioned above, skip ahead to Manually launching jobs section.
Setting up the Cluster
An easy way to set up a cluster of EC2 instances for distributed deep learning is by using the AWS CloudFormation template.
If you can not use the above, this section will help you manually set up a cluster of instances
to enable you to use ssh
for launching a distributed training job.
Let us denote one machine as the master
of the cluster through which we will launch and monitor the distributed training on all machines.
If the machines in your cluster are a part of a cloud computing platform like AWS EC2, then your instances should be using key-based authentication already.
Ensure that you create all instances using the same key, say mxnet-key
and in the same security group.
Next, we need to ensure that master has access to all other machines in the cluster through ssh
by
adding this key to ssh-agent and forwarding it to master when we log in. This will make mxnet-key
the default key on master.
ssh-add .ssh/mxnet-key
ssh -A user@MASTER_IP_ADDRESS
If your machines use passwords for authentication, see here for instructions on setting up password-less authentication between machines.
It is easier if all these machines have a shared file system so that they can access the training script. One way is to use Amazon Elastic File System to create your network file system. The options in the following command are the recommended options when mounting an AWS Elastic File System.
sudo mkdir efs && sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 NETWORK_FILE_SYSTEM_IP:/ efs
Tip: You might find it helpful to store large datasets on S3 for easy access from all machines in the cluster. Refer Using data from S3 for training for more information.
Using Launch.py
MXNet provides a script tools/launch.py to make it easy to launch distributed training on a cluster with ssh
, mpi
, sge
or yarn
.
You can fetch this script by cloning the mxnet repository.
git clone --recursive https://github.com/apache/incubator-mxnet
Example
Let us consider training a VGG11 model on the CIFAR10 dataset using example/gluon/image_classification.py.
cd example/gluon/
On a single machine, we can run this script as follows:
python image_classification.py --dataset cifar10 --model vgg11 --epochs 1
For distributed training of this example, we would do the following:
If the mxnet directory which contains the script image_classification.py
is accessible to all machines in the cluster (for example if they are on a network file system), we can run:
../../tools/launch.py -n 3 -H hosts --launcher ssh python image_classification.py --dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync
If the directory with the script is not accessible from the other machines in the cluster, then we can synchronize the current directory to all machines.
../../tools/launch.py -n 3 -H hosts --launcher ssh --sync-dst-dir /tmp/mxnet_job/ python image_classification.py --dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync
Tip: If you don't have a cluster ready and still want to try this out, pass the option
--launcher local
instead ofssh
Options
Here, launch.py is used to submit the distributed training job. It takes the following options:
- -n
denotes the number of worker nodes to be launched.
- -s
denotes the number of server nodes to be launched.
If it is not specified, it is taken to be equal to the number of worker nodes.
The script tries to cycle through the hosts file to launch the servers and workers.
For example, if you have 5 hosts in the hosts file and you passed n
as 3 (and nothing for s
).
The script will launch a total of 3 server processes,
one each for the first three hosts and launch a total of 3 worker processes, one each for the fourth, fifth and first host.
If the hosts file has exactly n
number of worker nodes, it will launch a server process and a worker process on each of the n
hosts.
- --launcher
denotes the mode of communication. The options are:
- ssh
if machines can communicate through ssh without passwords. This is the default launcher mode.
- mpi
if Open MPI is available
- sge
for Sun Grid Engine
- yarn
for Apache Yarn
- local
for launching all processes on the same local machine. This can be used for debugging purposes.
- -H
requires the path of the hosts file
This file contains IPs of the machines in the cluster. These machines should be able to communicate with each other without using passwords.
This file is only applicable and required when the launcher mode is ssh
or mpi
.
An example of the contents of the hosts file would be:
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
- --sync-dst-dir
takes the path of a directory on all hosts to which the current working directory will be synchronized. This only supports ssh
launcher mode.
This is necessary when the working directory is not accessible to all machines in the cluster. Setting this option synchronizes the current directory using rsync before the job is launched.
If you have not installed MXNet system-wide
then you have to copy the folder python/mxnet
and the file lib/libmxnet.so
into the current directory before running launch.py
.
For example if you are in example/gluon
, you can do this with cp -r ../../python/mxnet ../../lib/libmxnet.so .
. This would work if your lib
folder contains libmxnet.so
, as would be the case when you use make. If you use CMake, this file would be in your build
directory.
python image_classification.py --dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync
is the command for the training job on each machine. Note the use ofdist_sync
for the kvstore used in the script.
Terminating Jobs
If the training job crashes due to an error or if we try to terminate the launch script while training is running,
jobs on all machines might not have terminated. In such a case, we would need to terminate them manually.
If we are using ssh
launcher, this can be done by running the following command where hosts
is the path of the hostfile.
while read -u 10 host; do ssh -o "StrictHostKeyChecking no" $host "pkill -f python" ; done 10<hosts
Manually Launching Jobs
If for some reason, you do not want to use the script above to start distributed training, then this section will be helpful.
MXNet uses environment variables to assign roles to different processes and to let different processes find the scheduler.
The environment variables are required to be set correctly as follows for the training to start:
- DMLC_ROLE
: Specifies the role of the process. This can be server
, worker
or scheduler
. Note that there should only be one scheduler
.
When DMLC_ROLE
is set to server
or scheduler
, these processes start when mxnet is imported.
- DMLC_PS_ROOT_URI
: Specifies the IP of the scheduler
- DMLC_PS_ROOT_PORT
: Specifies the port that the scheduler listens to
- DMLC_NUM_SERVER
: Specifies how many server nodes are in the cluster
- DMLC_NUM_WORKER
: Specifies how many worker nodes are in the cluster
Below is an example to start all jobs locally on Linux or Mac. Note that starting all jobs on the same machine is not a good idea. This is only to make the usage clear.
export COMMAND='python example/gluon/image_classification.py --dataset cifar10 --model vgg11 --epochs 1 --kvstore dist_sync'
DMLC_ROLE=server DMLC_PS_ROOT_URI=<IP_ADDRESS> DMLC_PS_ROOT_PORT=9092 DMLC_NUM_SERVER=2 DMLC_NUM_WORKER=2 $COMMAND &
DMLC_ROLE=server DMLC_PS_ROOT_URI=<IP_ADDRESS> DMLC_PS_ROOT_PORT=9092 DMLC_NUM_SERVER=2 DMLC_NUM_WORKER=2 $COMMAND &
DMLC_ROLE=scheduler DMLC_PS_ROOT_URI=<IP_ADDRESS> DMLC_PS_ROOT_PORT=9092 DMLC_NUM_SERVER=2 DMLC_NUM_WORKER=2 $COMMAND &
DMLC_ROLE=worker DMLC_PS_ROOT_URI=<IP_ADDRESS> DMLC_PS_ROOT_PORT=9092 DMLC_NUM_SERVER=2 DMLC_NUM_WORKER=2 $COMMAND &
DMLC_ROLE=worker DMLC_PS_ROOT_URI=<IP_ADDRESS> DMLC_PS_ROOT_PORT=9092 DMLC_NUM_SERVER=2 DMLC_NUM_WORKER=2 $COMMAND
For an in-depth discussion of how the scheduler sets up the cluster, you can go here.
Environment Variables
For tuning performance
MXNET_KVSTORE_REDUCTION_NTHREADS
Value type: Integer Default value: 4 The number of CPU threads used for summing up big arrays on a single machine This will also be used fordist_sync
kvstore to sum up arrays from different contexts on a single machine. This does not affect summing up of arrays from different machines on servers. Summing up of arrays fordist_sync_device
kvstore is also unaffected as that happens on GPUs.MXNET_KVSTORE_BIGARRAY_BOUND
Value type: Integer Default value: 1000000 The minimum size of a big array. When the array size is bigger than this threshold,MXNET_KVSTORE_REDUCTION_NTHREADS
threads are used for reduction. This parameter is also used as a load balancer in kvstore. It controls when to partition a single weight to all the servers. If the size of a single weight matrix is less than this bound, then it is sent to a single randomly picked server; otherwise, it is partitioned to all the servers.MXNET_ENABLE_GPU_P2P
GPU Peer-to-Peer communication Value type: 0(false) or 1(true) Default value: 1 If true, MXNet tries to use GPU peer-to-peer communication, if available on your device. This is used only when kvstore has the typedevice
in it.
Communication
DMLC_INTERFACE
Using a particular network interface Value type: Name of interface Example:eth0
MXNet often chooses the first available network interface. But for machines with multiple interfaces, we can specify which network interface to use for data communication using this environment variable.PS_VERBOSE
Logging communication Value type: 1 or 2 Default value: (empty)PS_VERBOSE=1
logs connection information like the IPs and ports of all nodesPS_VERBOSE=2
logs all data communication information
When the network is unreliable, messages being sent from one node to another might get lost.
The training process can hang when a critical message is not successfully delivered.
In such cases, an additional ACK can be sent for each message to track its delivery.
This can be done by setting PS_RESEND
and PS_RESEND_TIMEOUT
- PS_RESEND
Retransmission for unreliable network
Value type: 0(false) or 1(true)
Default value: 0
Whether or not to enable retransmission of messages
- PS_RESEND_TIMEOUT
Timeout for ACK to be received
Value type: Integer (in milliseconds)
Default value: 1000
If ACK is not received in PS_RESEND_TIMEOUT
milliseconds, then the message will be resent.


Ballet is a type of performance dance that originated in the Italian Renaissance courts of the 15th century and later developed into a concert dance form in France and Russia. It has since become a widespread, highly technical form of dance with its own vocabulary based on French terminology. It has been globally influential and has defined the foundational techniques used in many other dance genres. Ballet requires years of training to learn and master, and much practice to retain proficiency. It has been taught in ballet schools around the world, which have historically incorporated their own cultures to evolve the art. Ballet may also refer to a ballet dance work, which consists of the choreography and music for a ballet production. A well-known example of this is The Nutcracker, a two-act ballet that was originally choreographed by Marius Petipa and Lev Ivanov with a music score by Pyotr Ilyich Tchaikovsky. Ballet dance works are choreographed and performed by trained artists. Many classical ballet works are performed with classical music accompaniment and are theatrical and use elaborate costumes and staging, though there are exceptions to this, such as neoclassical works by George Balanchine.
Click here to know more about this dance form


by Forum Modi
Sign up on October 26 and 27 from 6:30-8:30 and October 28th from 12:30-2:30 during conferences(you can sign up in room 601 in the beginning of next week)
by Forum Modi
Cleanup the beach on October 22 at Sandy Hook and South Amboy. More Info
by Forum Modi
Sign up on October 26 and 27 from 6:30-8:30 and October 28th from 12:30-2:30 during conferences(you can sign up in room 601 in the beginning of next week)
by Forum Modi
Cleanup the beach on October 22 at Sandy Hook and South Amboy. More Info
by Forum Modi
After Key Club go to Judd from 3:30-4:30 to help the kids do their homework. It goes on every tuesday even if there isn't a key club meeting.
by Forum Modi
Volunteer on the Homecoming football game this Friday to help count and organise the food.
by Forum Modi
We won't have Key Club for a couple of weeks, but we're back on October 11th. Make sure to come!
by Forum Modi
The Purple for Pappas 5k is on the same day as fall rally -- October 9th. Make sure to sign up if you want to help out during it. Also, you can participate in the run as well.
by Forum Modi
Fall rally is on October 9th! If you are going be excited and bring some school spirit with you. It be great to win the spirit cup this year!
by Forum Modi
Make sure you pay your dues if you want to join keyclub! If you do not pay $xx by xx then you will not be an official member of key club and will not get your community service hours!
by Forum Modi
The first meeting is coming up on September 13 at 2:30pm afterschool in the new cafeteria. Don't worry about signing up before hand because you will learn about how to officially sign up at the meeting. We all look forward to meeting you and hope you enjoy Key Club!


Creating Classes / in Ruby
February 7, 2016
Alyssa Page
Classes in Ruby are a blue print for an object. Each time you call .new on a class a new instance of that class has been created. Creating and using classes allows you to create instances and share methods so that these all don't have to be defined each time. This is why each time you create an instance of an array class it has access to the array class methods.
Say you want to create a class dog (and why wouldn't you?) to be able to set and get information about different dogs. Since class names are constant they will be capitalized. We will create a Dog class that takes the arguments of breed and age.
class Dog
def initialize(breed, age)
@breed = breed
@age = age
end
end
Now each time a new instance of the class dog is created the initialize method will run and create instance variables @breed and @age that can be used throughout the class. You can distinguish instance variables by the @ symbol preceeding the name.
Ok so we have a class that doesn't do much. If we want to get information we will need to use a getter method or even better use a reader attribute. Reader attributes only retrieve information and do not change anything about it. Setter methods and writer attributes can change information (like age if the dog is now a year older). The accessor attribute can both read and write. Since a dog's breed won't change it only needs a reader method but it's age will change with time so it will need a reader and a writer, so an accessor.
class Dog
attr_reader :breed
attr_accessor :age
def initialize(breed, age)
@breed = breed
@age = age
end
def print_info
puts "--New Dog --"
puts "breed: #{:breed}"
puts "age: #{:age}"
end
end
I also added a method print_info that does just that! It prints out the information of the instance of the class. So now anytime you want to create a new object with breed and age information about a dog all you have to do is create an instance of a class. Let's try it out.
charles_barkley = Dog.new("corgi", 7)
charles_barkley.print_info
returns -->
--New Dog--
breed: corgi
age: 7


Salmon River Summer Marathon
Salmon ID/USA
Website: www.salmonmarathon.com
Race Winners
(25 runnings)
02 Jul
1994
2:47:33
2:56:32
03 Jul
1993
2:36:54
3:13:20
04 Jul
1992
2:58:09
3:33:05
06 Jul
1991
2:39:14
3:04:58
30 Jun
1990
2:49:35
3:21:42
01 Jul
1989
2:46:05
3:39:50
02 Jul
1988
2:37:38
3:23:08
04 Jul
1987
2:40:44
3:13:02
05 Jul
1986
2:36:54
3:31:57
05 Jul
1985
2:45:39
3:15:15
07 Jul
1984
2:48:06
2:57:57
02 Jul
1983
2:45:49
3:34:05
03 Jul
1982
2:27:37
3:04:10
04 Jul
1981
2:34:24
4:21:28
05 Jul
1980
2:36:44
3:30:26
Notes: 1980 was the inaugural year. The course thru 1994 was point-to-point,
starting 42 km south of Salmon at 4392 feet (1339 m) elevation, following
Highway 93 and finishing in Salmon and an elevation of 3945 feet (1202 m, drop
3.2 m/km). The 2008-date races have started in Tendoy, 32 km southeast of Salmon at
4881 feet (1488 m) elevation and have finished at 3931 feet (1198m, drop 6.87 m/km).
This race was held as part of the Salmon River Days Festival and was known as
the Salmon River Summer Marathon and the Salmon River Days Marathon thru 1994.
09 Sep
2017
2:59:52
Andrew Ulrey (OH/USA)
3:38:35
Sarah Mueller (USA)
10 Sep
2016
2:51:49
Mike Brunette (IL/USA)
3:24:05
Jackie Elo (USA)
12 Sep
2015
2:57:01
Brian Baker-4
3:36:31
Tiedji Baker (USA)
06 Sep
2014
2:55:59
Brian Baker-3
3:29:04
Gretchen Fishman (USA)
07 Sep
2013
2:53:35
Thomas Lloyd (USA)
3:34:05
Caolyn Loffer (USA)
08 Sep
2012
2:55:51.8
John Fenton (USA)
3:07:57.9
Kristen Munson (UT/USA)
10 Sep
2011
2:59:18
Brian Baker-2
3:10:18
Alyssa Shaw (CO/USA)
18 Sep
2010
2:59:32
Jake Renz (USA)
3:03:24
Anja Wechsler (MT/USA)
12 Sep
2009
3:00:20
Brian Baker (ID/USA)
3:25:43
Leone Rusher (ID/USA)
13 Sep
2008
2:52:38
Chuck Teixeira (USA)
3:26:11
Kira Dale Pfisterer (UT/USA)
1995-2007
---
not held
---
not held
Charles Possin (WI/USA)
Monica Pawlowski (ID/USA)
Bill Brist-2
Kirsten Raudenbush (ID/USA)
Mike Medberry (ID/USA)
Janet Holmgren (ID/USA)
Jarrow Wahman (MN/USA)
Alydia Barton (UT/USA)
Marc Wiitala (OR/USA)
Nancy Rochon (ID/USA)
Kurt Gutnecht (UT/USA)
Janet Hancock (IN/USA)
Bill Brist (MT/USA)
Sandra Kiddy (CA/USA)
Paul Peterson-2
Gunhild Swanson (WA/USA)
Paul Peterson (WA/USA)
Nancy Stover
(CA/USA)
Mac McCoy (MT/USA)
Christine Brick (MT/USA)
Bob Coolidge
Mary Wood (CO/USA)
Grant Compton
Molly Leabo
Patrick McGuire (CO/USA)
Cynthia Pickering (CO/USA)
Jim Walker-2
Fran Phillips
Jim Walker (ID/USA)
Linda Robinson (ID/USA)
Most Wins (1980-date)
Men
4
Brian Baker (ID/USA)
2009,2011,2014-15
Women
No woman has won more than once.
Prize Money
(ADR qualified runners)
No prize money has been awarded at this race.
Race Time Bias
(sec/km)
Insufficient data to calculated the race time bias.
Competitive Level
(1990-date)
Insufficient data to calculated the competitive level.
Quality Performances
Men No men under 2:20 Women No women under 2:50
Finishers
Year Fin 2017 38 2016 96 2015 29 2014 45 2013 84 2012 95 2011 110 2010 129 2009 183 2008 127 .... 1994 77 1993 65 1992 40 1991 71 1990 55 1989 33 1988 43 1987 38 1986 30 1985 40 1984 29 1983 40 1982 34 1981 42 1980 33 Sum 1606
Last Updated on 11 Sep 2017
Contributors: Denise Shirmer, Maurice Wilson (4), Juraj Gasparovic (5)


The Reasoner framework provides a powerful, yet simple way of analyzing the running OSGi framework with regard to Exceptions or problems in general during runtime. Take a look at the {@code ReasoningServiceProvider} and the helper classes of base implementations of the API in the {@code net.mjahn.inspector.reasoner.base} package.


The A to Z guide to Hibersap
Develop an example application step by step
Submit issues and feature requests to the Hibersap issue tracker on GitHub
Ask questions and share your ideas on the Sourceforge Hibersap forums
The Hibersap code base
Example Java EE application showing how to use Hibersap and the Cuckoo Resource Adapter for SAP in combination
Open source resource adapter compatible to the Java EE Connector Architecture (JCA) standard. Recommended if you use Hibersap in a Java EE application.
Component to integrate Hibersap into your Apache Camel routes, by Björn Bength
A JBoss Forge plugin to generate Hibersap classes to connect to a SAP system, by Max Schwaab
Use JBoss Forge to generate Hibersap classes that call sap functions
A screen-cast on Vimeo showing how to use the JBoss Forge plugin
Presentation held by Carsten Erker on October 10th, 2012 at JBoss OneDayTalk conference in Munich
Presentation held by Serge Pagop and Carsten Erker on October 2nd, 2013 at RedHat Partner Conference, Madrid
Article in JavaSpektrum 6/2014 by Torsten Fink and Carsten Erker (in German)
Article in Java Magazin 9/2010 by by Torsten Fink and Carsten Erker (in German)
Blog about integrating Hibersap with the Apache Camel component, by Warmuuh
Blog about using Hibersap with Project Lombok, by Warmuuh


Welcome !!
{{successAlertText}}
Users list
Add user
Enter user ID:
Search
Left
Right
You cought {{countPokemon}} Pokemons!
You missed {{missPokemon}} Pokemons...
Your level is: {{level}} !


This address is for BTC only Send only BTC to this deposit address. Sending any other currency to this address may result in the loss of your deposit.
bc1qkq6v7ctxlz67pnhnxl9mjux29cm36ycwltjjt6


lingvo.core.input_generator_helper module¶
Helper functions for model.
-
lingvo.core.input_generator_helper.
ComputeSplits
(batch_size, num_splits)[source]¶ Creates a tensor of size num_splits of number of values per split.
Assigns each split floor(batch_size/num_splits) and round-robins the remainder (if any) to each split.
Example:
batch_size: [5] num_splits: 3 returns: [2, 2, 1]
Parameters: - batch_size – tensor of rank 0, size of tensor to be split
- num_splits – number of splits to split tensor into
Returns: tensor of length num_splits containing sizes of each split
-
lingvo.core.input_generator_helper.
SplitTensors
(xs, num_splits)[source]¶ Splits tensors in
xs
evenly into num_splits along the 1st dimenion.Parameters: - xs – A tuple of tensors. Each tensor’s 1st dimension is the same size.
- num_splits – A python integer.
Returns: A tuple of lists of tensors, num elements in the tuple = len(xs).
i-th element in each list corresponds to i-th split of each tensor in xs along the first dimension of each tensor.
-
lingvo.core.input_generator_helper.
SplitDictOfTensors
(t_dict, num_splits)[source]¶ Splits tensors in
t_dict
evenly intonum_splits
along the 1st dimenion.Parameters: - t_dict – A dictionary of tensors. Each tensor’s 1st dimension is the same size.
- num_splits – A python integer.
Returns: A list of dictionaries of tensors, num elements in the list = num_splits
i-th dictionary in the list corresponds to i-th split of each tensor along the first dimension of each tensor for each key in the original dict.


- Marital Status: {{roll.maritalStatus.name}}
- Children: {{roll.children.name}}
- Primary Career: {{roll.primaryCareer.jobs[0].name}}
-
Primary Career: Career Hopper
-
Secondary Career: {{roll.secondaryCareers[0].jobs[0].name}}
Secondary Career: {{roll.secondaryCareers[0].careerType.name}}
-
Secondary Careers:
-
- {{career.jobs[0].name}}
- {{career.careerType.name}}
-
Generational Goal: {{roll.generationalGoal.name}}
-
Miscellaneous Fun: {{roll.miscellaneousFun.name}}
Roll Your Own: http://simsroller.com


Hi I tried to create a user account sometime ago and wasn't sure I had succeeded. Today and previously I tried to create another account. but it says my email is already in use. I tried the "forgotten password" 3 or 4 times but never received an email with new password.
I created an entirely new account with another "created for the occasion" email address. I got the password and logged on OK. I changed the password successfully but no matter how many times I tried I cannot change the email address even to another one not previously used. Would appreciate some advice on how to do this as I really want to use my own "proper" email address. Cheers.
Andy
Andy
Re: Trying to join and create user account
FWIW, my "formal" email address is rarely if ever used by the system.
At one stage, I used to be notified when other comments had been posted, but that's not happening now. Not sure why this feature has stopped, but I don't miss it. I just log on most days and see what's new.
The 'track' tab is great for showing any changes to threads that you've already contributed to.
Re: Trying to join and create user account
Andy, Let me know via a PM the user name you want to use, and the email address you want to use with it, and the user name(s) you want deleting.
[Edit: The rogue account has been reset and the "second" account used to post the above has been deleted with Andy's agreement.]


--- layout: post title: Quick Web performance test script date: "2013-01-25" ---
I was interested in testing out my new homepage server's performance in rather simple terms. I thought bombarding a single URL with Apache Benchmark would distort the results too much, and I also didn't want to load the resources outside my control (e.g. Google Analytics). I made a simple BASH script that loops indefinitely and does a wget call that fetches all the resources and links on my homepage recursively and displays the time it took to do that for each iteration.
This simple shell script should work for on most platforms as long as you have "date" that supports "+%s.%N" -format and "wget".
{{< highlight bash >}} #!/usr/bin/env bash # Make sure we have an URL as a parameter url="${1}" if [ -z "${url}" ]; then echo "Usage: $0 http://url.to.test/" exit 1 fi # Command to load the page wget="$(which wget) -m -nd -q -O /dev/null" # Command to get current time date="$(which date) +%s.%N" while [ true ]; do start=$($date) $wget "${url}" end=$($date) elapsed=$(echo "${end}-${start}" | bc) echo "Iteration done in ${elapsed} seconds" done {{< /highlight >}}Put the code in some file, and run it with: ./somefile.sh http://someurl.com/


IAO_0022057 - ringgold identifier
Label
ringgold identifier
Sub class of
Definition
The Ringgold Identifier is a unique numerical identifier applied to organizations in the scholarly supply chain
Definition source
Term editor
PERSON: Michael Conlon
Label
ringgold identifier
Sub class of
Definition
The Ringgold Identifier is a unique numerical identifier applied to organizations in the scholarly supply chain
Definition source
Term editor
PERSON: Michael Conlon


Links
mkbook uses standard MarkDown notation for links:
[link text](link url)
Links can be separated into three types:
- External links (prepended by
http://
orhttps://
) - Internal links (relative path names)
- Reference links (prepended by
ref://
and then followed by the chapter title) to refer to other chapters in the book**
Note: Reference links aren’t implemented yet!


| Level | End of Run | Great Vault | Crests to upgrade (End of Run, Great Vault) |
| 2 | 402 | 415 | Whelpling, Drake |
| 3 | 405 | 418 | Whelpling, Drake |
| 4 | 405 | 421 | Whelpling, Drake |
| 5 | 408 | 421 | Whelpling, Drake |
| 6 | 408 | 424 | Whelpling, Drake |
| 7 | 411 | 424 | Whelpling, Drake |
| 8 | 411 | 428 | Whelpling, Wyrm |
| 9 | 415 | 428 | Drake, Wyrm |
| 10 | 415 | 431 | Drake, Wyrm |
| 11 | 418 | 431 | Drake, Wyrm |
| 12 | 418 | 434 | Drake, Wyrm |
| 13 | 421 | 434 | Drake, Wyrm |
| 14 | 421 | 437 | Drake, Wyrm |
| 15 | 424 | 437 | Drake, Wyrm |
| 16 | 424 | 441 | Drake, Aspect |
| 17 | 428 | 441 | Wyrm, Aspect |
| 18 | 428 | 444 | Wyrm, Aspect |
| 19 | 431 | 444 | Wyrm, Aspect |
| 20 | 431 | 447 | Wyrm, Cannot upgrade |
The chest at the end of the run guarantees the GROUP two pieces of loot from the dungeon loot table, even if you don't beat the timer. One piece of loot will be at the item level that corresponds to the level of keystone you completed and one will be at a lower item level.
If you beat the timer, the group will be awarded two pieces of loot at the item level that corresponds to the level of the keystone you completed.
Example: Your group times a +15, two pieces of 424 loot drop in the end of run chest. Later, your group fails to time a +15. One piece of loot drops at 424 and one drops at 421 item level.
At reset, the Great Vault will have a keystone based on the highest level keystone run you completed the week before. However, the keystone will degrade if you do not continue to complete keystones at higher or equal levels to what you previously completed.
Example: You timed a +16 last week. This week at reset you get a +16 keystone from your chest. This week you don't time anything higher than a +16. Next week at reset you get a +15 key from the vault.
Gear that drops from keystone runs and from the Great Vault can be upgraded to a maximum item level of 441 using Flightstones and Crests. More info about Flightstones and Crests below.
It is best to complete a +20 every week to get the highest gear value from your weekly chest.


additional info::
report
COPYING
flights tracking demo::
XML
GeoXML
KML
Google Maps
Update
Download
flights.xml
Download
geoflights.xml
Download
flights.kml
load
reload
Log::


Original filtering/summarizing:
guns_pnw <- guns %>%
filter(state == c("Oregon", "California", "Washington")) %>%
group_by(year, state) %>%
summarize(guns_sold_year = sum(guns_sold))
## Warning in `==.default`(state, c("Oregon", "California", "Washington")):
## longer object length is not a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
guns_pnw
## # A tibble: 53 x 3
## # Groups: year [?]
## year state guns_sold_year
## <int> <fct> <int>
## 1 1998 California 1834
## 2 1998 Oregon 383
## 3 1999 California 270712
## 4 1999 Oregon 57759
## 5 1999 Washington 42676
## 6 2000 California 228888
## 7 2000 Oregon 47193
## 8 2000 Washington 40299
## 9 2001 California 218652
## 10 2001 Oregon 47770
## # ... with 43 more rows
Original graph:
guns_pnw_graph <- ggplot(guns_pnw, aes(x = year, guns_sold_year)) +
geom_point(aes(color = state)) +
ggtitle("Guns sold per year in Oregon, California, and Washington") +
labs(x = "Year", y = "Guns Sold")
guns_pnw_graph
This is graph would be better if it included guns sold normalized by population instead. That would allow us to better compare the change over time between states.
#adding the state population mean:
#note: I filtered out 2015 since there were some errors in the data there--population was 11 for California at one point.
guns_pnw_2 <- guns %>%
filter (year != 2015) %>%
filter(state == c("Oregon", "Washington", "California")) %>%
group_by(state, year, population) %>%
summarise(guns_sold_year = sum(guns_sold), state_pop = mean(as.double(population)))
## Warning in `==.default`(state, c("Oregon", "Washington", "California")):
## longer object length is not a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
guns_pnw_2
## # A tibble: 50 x 5
## # Groups: state, year [?]
## state year population guns_sold_year state_pop
## <fct> <int> <chr> <int> <dbl>
## 1 California 1999 38041430<PHONE_NUMBER>1430
## 2 California 2000 38041430<PHONE_NUMBER>1430
## 3 California 2001 38041430<PHONE_NUMBER>1430
## 4 California 2002 38041430<PHONE_NUMBER>1430
## 5 California 2003 38041430<PHONE_NUMBER>1430
## 6 California 2004 38041430<PHONE_NUMBER>1430
## 7 California 2005 38041430<PHONE_NUMBER>1430
## 8 California 2006 38041430<PHONE_NUMBER>1430
## 9 California 2007 38041430<PHONE_NUMBER>1430
## 10 California 2008 38041430<PHONE_NUMBER>1430
## # ... with 40 more rows
#creating the guns sold per thousand people:
guns_pnw_2 <- guns_pnw_2 %>%
mutate(guns_sold_year_normalized_per_thousand = (1000*guns_sold_year/state_pop))
guns_pnw_2
## # A tibble: 50 x 6
## # Groups: state, year [50]
## state year population guns_sold_year state_pop guns_sold_year_no…
## <fct> <int> <chr> <int> <dbl> <dbl>
## 1 California 1999 38041430<PHONE_NUMBER>1430 6.63
## 2 California 2000 38041430<PHONE_NUMBER>1430 5.49
## 3 California 2001 38041430<PHONE_NUMBER>1430 6.08
## 4 California 2002 38041430<PHONE_NUMBER>1430 4.45
## 5 California 2003 38041430<PHONE_NUMBER>1430 3.32
## 6 California 2004 38041430<PHONE_NUMBER>1430 3.69
## 7 California 2005 38041430<PHONE_NUMBER>1430 4.12
## 8 California 2006 38041430<PHONE_NUMBER>1430 4.18
## 9 California 2007 38041430<PHONE_NUMBER>1430 3.53
## 10 California 2008 38041430<PHONE_NUMBER>1430 3.94
## # ... with 40 more rows
#the plot:
ggplot(guns_pnw_2, aes(x = year, y = guns_sold_year_normalized_per_thousand, color = state)) +
geom_point(alpha = .7) +
ggtitle("Guns sold per thousand people in Oregon, California, \nand Washington") +
labs(x = "Year", y = "Guns Sold per thousand") +
coord_cartesian(xlim = c(1998, 2014)) +
scale_x_continuous(breaks=seq(1998, 2014, 2)) +
scale_color_hue(breaks=c("Oregon", "Washington", "California"))
This graph is a scatter plot.
This data comes from the NY Times gun sales data, forked to Hadley Wickham’s github. It is located here. It has information on guns sales in the US from 1998 to 2015. It includes 34 different variables such as state, year, month, population, and guns sold.
Here, I am aiming for a fairly general audience–anyone with some familiarity with scatter plots. No previous knowledge about this specific data is required.
Scatter plots are used to show the relationship between two variables. One variable is on the x-axis and another is on the y-axis. For each point in a scatter plot, the horizontal position indicates its x-axis value and the vertical height represents its y-axis value. Tread lines or lines of best fit can be used to show the pattern between these two variables more clearly, and color can be used to add another variable layer to the plot.
This graph shows the relationship between year and guns sold per thousand people across three states: Oregon, California, and Washington. It shows us that Oregon sold the most guns in comparison to its population in every year in this data set. Additionally, we see a generally upward trend across all three states since 1999.
A newbie should first pay special attention to the title and x- and y-axis labels. This should indicate what kind of relationship the graph is trying to show. Then, the viewer should identify some specific points, and look at their x- and y-values, to get a sense of how to read the graph. Finally, the viewer should look at the overall relationship shown–how does the change along the x-axis affect the change along the y-axis?
Annotation: Annotation can be used on a scatter plot to point out a specific point of importance or to show an overall comparison value. In our graph we don’t make use of annotation.
Color: Color can be used on a scatter plot to add another variable layer. Scatter plots automatically have an x and y variable, but then the relationship between these variables and a third one can be added by coloring sets of points by a third variable. For instance, in our graph we color the points by state. Thus, we not only see the relationship between year and guns sold per thousand people, but we see it across states.
Size: Size can also be used like color to add on another variable layer. You can vary the size of the points in the scatter point to indicate their position within a third variable.
Arrangement: Scale can be used to vary how “close together” points seem. Here, we just take the automatic scale created by ggplot. However, we could have zoomed out or added more tick marks to vary the perception of the relationship.
There are some variations of scatter plots. Here, we didn’t include tread lines or a line of best fit, but some scatter plots do to make the pattern clearer.
I used ggplot2 in R. I created the x, y, and color variable using aes(x = year, y = guns_sold_year_normalized_per_thousand, color = state)
to map year to x, guns sold per thousand to y, and state to color of the points. I used a geom_point(alpha = .7)
layer for the scatter plot, where the alpha indicated that the points are semiopaque. I added the x- and y-axis labels and the title using labs()
and ggtitle()
respectively. I then used coord_cartesian()
and scale_x_continous()
to change the x axis tick marks. And finally I used scale_color_hue(breaks=c())
to change the order of the legend.


Introduction
In this tutorial we implemented a long/short equity strategy based on fundamental factors. The idea comes from AQR white book: A New Core Equity Paradigm[ref]A New Core Equity ParadigmOnline Copy[/ref]. The original version is a long only strategy. We developed it into a long/short version. The paper strategy used some fundamental data as measures of value, quality and momentum, and then ranked all the stocks in the universe according to the factors. The strategy only long the stocks ranking at the top, but our algorithm would at the same time short the stocks ranking at the bottom. This strategy consistently beats the market and has solid economic intuition.
Factors
The paper strategy used three factors together to rank stocks: value, quality and momentum.
Value: The most commonly used measure for value is P/B ratio(price-to-book value). Intuitively, the stocks with high P/B ratio are likely to be overpriced, and those stocks are labeled as growth stock. On the other hand, the stocks with low P/B value are considered to be value stocks. Following this logic, we use book value per share as a measure for value in our algorithm: the stocks with high book value per share rank high.
Quality: Quality is a comprehensive factor. The paper used total profits over asset, gross margins, and free cash flow over assets. For simplicity, we used only operation margin as our quality factor. Here we assume that the companies with high operation margin are profitable, and their stocks are the quality ones.
Momentum: The paper strategy is quarterly rebalanced, so it used recent one-year return, three-month and returns around earning events as measures for momentum. While our algorithm is monthly rebalanced, we simply use recent monthly return as our momentum factor.
Ranking
Ranking is the core process for stock selection. We first rank all the stocks according to each factor, then assign weights to each factor to get the final rank.
Specifically, in our algorithm we have 250 stocks in total. We rank them according to their book values per share, operation margins and one-month returns by descending order. For each stock, its index in each sorted list is its score on each factor. e.g. If stock A ranks 1st by value, 10th by quality and 30th by momentum, its scores on the value, quality and momentum are 1, 10 and 30 respectively.
The last step is to calculate the final score of each stocks. We use the same weight as the paper does: 40% on value, 40% on quality and 20% on momentum. In this way, stock A's final score is 1*0.4 + 10*0.4 + 30*0.2 = 10.4. Finally, we can rank all the stocks by their scores by ascending order. It worth attention that the stock with the lowest score is the best and it ranks 1st, and the one with the highest score is the worst.
Implementation
In this implementation, the FineSelectionFunction would be the core part because we have to rank the stocks in this process. We also need a ScheduledEvent handler to rebalance the portfolio every month. We would introduce the process step by step.
CoarseSelectionFunction
This function is a filter for the whole asset universe(around 8000 stocks). We select the top 250 with highest dollar volume to ensure liquidity. We also filter out the stocks without fundamental information or with a too low price(less than $5).
def CoarseSelectionFunction(self, coarse):
# self.reb is a flag to control, making it make selection once per month to save time.
if self.reb != 1:
return (List[Symbol]())
# drop stocks which have no fundamental data or have too low prices
selected = [x for x in coarse if (x.HasFundamentalData)
and (float(x.Price) > 5)]
sortedByDollarVolume = sorted(selected, key=lambda x: x.DollarVolume, reverse=True)
# self.num_coarse is the number to pass through this filter, we set it to 250 in this algo
top = sortedByDollarVolume[:self.num_coarse]
list = List[Symbol]()
for x in top:
list.Add(x.Symbol)
return list
FineSelectionFunction
Here is the core function. The process is that we make three sorted list to store the stocks, and then use a dictionary to store the score information. For the dictionary, the keys are Symbols and the values are their scores. Finally we sort the dictionary to get the final rank. we store the top 20 stocks to long in the list self.long and the bottom 20 stocks to short in the list self.short.
def FineSelectionFunction(self, fine):
# return null list if it's not time to rebalance
if self.reb != 1:
return (List[Symbol]())
self.reb = 0
# drop stocks which don't have the information we need.
filtered_fine = [x for x in fine if x.OperationRatios.OperationMargin.Value
and x.ValuationRatios.PriceChange1M and x.ValuationRatios.BookValuePerShare]
# rank stocks by three factor.
sortedByfactor1 = sorted(filtered_fine, key=lambda x: x.OperationRatios.OperationMargin.Value, reverse=True)
sortedByfactor2 = sorted(filtered_fine, key=lambda x: x.ValuationRatios.PriceChange1M, reverse=True)
sortedByfactor3 = sorted(filtered_fine, key=lambda x: x.ValuationRatios.BookValuePerShare, reverse=True)
stock_dict = {}
# assign a score to each stock, you can also change the rule of scoring here.
for i,ele in enumerate(sortedByfactor1):
rank1 = i
rank2 = sortedByfactor2.index(ele)
rank3 = sortedByfactor3.index(ele)
score = sum([rank1*0.2,rank2*0.4,rank3*0.4])
stock_dict[ele] = score
# sort the stocks by their scores
self.sorted_stock = sorted(stock_dict.items(), key=lambda d:d[1],reverse=False)
sorted_symbol = [x[0] for x in self.sorted_stock]
# sotre the top stocks into the long_list and the bottom ones into the short_list
self.long = [x.Symbol for x in sorted_symbol[:self.num_fine]]
self.short = [x.Symbol for x in sorted_symbol[-self.num_fine:]]
topFine = self.long+self.short
list = List[Symbol]()
for x in topFine:
list.Add(x)
return list
Rebalance
Our portfolio is rebalanced monthly, so first of all we should write a ScheduledEvent handler in the Initialize function:
def Initialize(self):
# Use SPY as a benchmark for market open
self.Schedule.On(self.DateRules.MonthStart(self.spy), self.TimeRules.AfterMarketOpen(self.spy,5), Action(self.rebalance))
Our rebalanced method is straightforward: We first liquidate the stocks that are no longer in the long/short list, and then assign equal weight to the stocks we are going to long or short.
def rebalance(self):
# if this month the stock are not going to be long/short, liquidate it.
long_short_list = self.long + self.short
for i in self.Portfolio.Values:
if (i.Invested) and (i.Symbol not in long_short_list):
self.Liquidate(i.Symbol)
# Assign each stock equally. Always hold 10% cash to avoid margin call
for i in self.long:
self.SetHoldings(i,0.9/self.num_fine)
for i in self.short:
self.SetHoldings(i,-0.9/self.num_fine)
Summary
The paper strategy was backtest at a 60-year timespan. It's persistent, systematic and intuitive. Although our version is very different from the paper one, the logic and intuition behind are the same. It has a better performance than the paper strategy because we added short positions.
For further development, we can try to rank a large number of stocks, and do some portfolio optimization instead of holding stocks equally.
Algorithm
https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_0c0ded24cd37f6f5df88856de650f899.html


All the people we met on the streets of Torpoint during the 2000s
Way back in the early to mid 2000s, we went out capturing the moments that defined the parish neighbourhood
by Miles O'Leary
Torpoint - it's the patch on the west Tamar side of Cornwall that arguably gets forgotten about.
Loads of us moan about the ferry crossing - but perhaps we think less about the face it has a really strong community bursting with pride.
Way back in the early to mid 2000s, we went out capturing the moments that defined the parish neighbourhood.
So many lovely faces feature in our archives and so it made sense to rustle up a gallery honouring them all.
Just hit the link below to take a wonderful trip back down memory lane. No doubt you'll spot a face or two that look remarkably familar.
80 names and faces from Torpoint you knew way back when
View gallery
Have you got a story to tell? Contact Plymouth Live reporter Miles O'Leary on 01752 293 066.


Using a pre-trained model from TensorFlow.js Layers trained on short movie review.
This model is trained to predict the sentiment of a short movie review (as a score between 0 and 1)
The model is trained using movie reviews that have been truncated to a maximum of 200 words, only the 20000 most used
words in the reviews are used.


| 005:069 Khan | : |
Surely, those who believe (in the Oneness of Allah, in His Messenger Muhammad SAW and all that was revealed to him from Allah), those who are the Jews and the Sabians and the Christians, - whosoever believed in Allah and the Last Day, and worked righteousness, on them shall be no fear, nor shall they grieve. |
| 005:069 Maulana | : |
Surely those who believe and those who are Jews and the Sabeans and the Christians -- whoever believes in Allah and the Last Day and does good -- they shall have no fear nor shall they grieve. |
| 005:069 Pickthal | : |
Lo! those who believe, and those who are Jews, and Sabaeans, and Christians - Whosoever believeth in Allah and the Last Day and doeth right - there shall no fear come upon them neither shall they grieve. |
| 005:069 Rashad | : |
Surely, those who believe, those who are Jewish, the converts, and the Christians; any of them who (1) believe in GOD and (2) believe in the Last Day, and (3) lead a righteous life, have nothing to fear, nor will they grieve. |
| 005:069 Sarwar | : |
The believers, Jews, Sabaeans, and the Christians who believe in God and the Day of Judgment and who do what is right will have nothing to fear nor will they be grieved. |
| 005:069 Shakir | : |
Surely those who believe and those who are Jews and the Sabians and the Christians whoever believes in Allah and the last day and does good-- they shall have no fear nor shall they grieve. |
| 005:069 Sherali | : |
Surely those who believed, and the Jews, and the Sabians, and the Christians - whoso believes in ALLAH and the Last Day and does good deeds, on them shall come no fear, nor shall they grieve. |
| 005:069 Yusufali | : |
Those who believe (in the Qur'an), those who follow the Jewish (scriptures), and the Sabians and the Christians,- any who believe in Allah and the Last Day, and work righteousness,- on them shall be no fear, nor shall they grieve. |
Concepts/Themes Covered: الإيمان > الإيمان بالله > الإيمان والعمل Faith> Belief In Allah> The Faith and the Action الإيمان > المؤمنون > لا خوف عليهم Faith> The Believers> There is no Fear on them الدعوة إلى الله > حدودها > التساهل مع المسالمين The Call for Allah> Its Limits> Lenient with the Peace-Loving الديانات > أهل الكتاب: ( اليهود و النصارى) > وجوب التساهل معهم(مع غير المحاربين) Religions> The People of the Book (the Jews and the Christians)> The Necessity to be Easy with them (with the Non-Fighters) الديانات > الصابئون Religions>The Sobians الديانات > النصارى > أجر المؤمنين منهم Religions>The Christians>The Believers' Reward from them
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


拆 (Marked for Destruction)
A political analog photography exhibited project that criticized the inhumaned policy of the Beijing government
Prague, Czech Republic, 2017
#AnalogPhotography #Exhibition
#AnalogPhotography #Exhibition


I am a self-taught developer who appreciates simplicity and efficiency. I took an online javascript course in august of 2018 and never looked back! I am currently exploring more opportunities to learn and build. I worked as a full stack developer using React, ASP.Net and T-SQL. Currenly exploring Node.JS and always looking to expand my javascript knowledge. Please scroll down and take a look at my resume. Thank you!
Helped create a web app that encourages dog owners to walk their dogs! The app tracks the dog walks through Google API and incentivizes the owners with points with which they can redeem through their local sponsors! More details in my resume.
Tech: React, ASP.NET, T-SQL
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close ProjectLorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close ProjectLorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close Project


[§90D-9] Rules. The commission may adopt rules under chapter 91 to implement this chapter. [L 2002, c 88, pt of §1]


Welcome to the Chip website!
This project provides a Coq specification and executable functions for change impact analysis, as used in build systems and tools for regression test selection. By extraction to OCaml code, practical certified tools for change impact analysis can be obtained as well.
This is an open source project, licensed under the MIT license.
The current stable release of Chip can be downloaded from GitHub.
The coqdoc presentations of releases can be browsed online:
The formalization and tool is described in the following publication(s):