(Since version 2.0.0) Use SparkSession.builder instead
(Since version 2.0.0) Use SparkSession.builder instead
Convert a BaseRelation created for external data sources into a DataFrame.
Convert a BaseRelation created for external data sources into a DataFrame.
1.3.0
Caches the specified table in-memory.
Caches the specified table in-memory.
1.3.0
Removes all cached tables from the in-memory cache.
Removes all cached tables from the in-memory cache.
1.3.0
Applies a schema to a List of Java Beans.
Applies a schema to a List of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.6.0
Applies a schema to an RDD of Java Beans.
Applies a schema to an RDD of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.3.0
Applies a schema to an RDD of Java Beans.
Applies a schema to an RDD of Java Beans.
WARNING: Since there is no guaranteed ordering for fields in a Java Bean, SELECT * queries will return the columns in an undefined order.
1.3.0
:: DeveloperApi :: Creates a DataFrame from a java.util.List containing Rows using the given schema.
:: DeveloperApi :: Creates a DataFrame from a JavaRDD containing Rows using the given schema.
:: DeveloperApi :: Creates a DataFrame from an RDD containing Rows using the given schema.
:: DeveloperApi :: Creates a DataFrame from an RDD containing Rows using the given schema. It is important to make sure that the structure of every Row of the provided RDD matches the provided schema. Otherwise, there will be runtime exception. Example:
import org.apache.spark.sql._ import org.apache.spark.sql.types._ val sqlContext = new org.apache.spark.sql.SQLContext(sc) val schema = StructType( StructField("name", StringType, false) :: StructField("age", IntegerType, true) :: Nil) val people = sc.textFile("examples/src/main/resources/people.txt").map( _.split(",")).map(p => Row(p(0), p(1).trim.toInt)) val dataFrame = sqlContext.createDataFrame(people, schema) dataFrame.printSchema // root // |-- name: string (nullable = false) // |-- age: integer (nullable = true) dataFrame.createOrReplaceTempView("people") sqlContext.sql("select name from people").collect.foreach(println)
1.3.0
:: Experimental :: Creates a DataFrame from a local Seq of Product.
:: Experimental :: Creates a DataFrame from a local Seq of Product.
1.3.0
:: Experimental :: Creates a DataFrame from an RDD of Product (e.g.
:: Experimental :: Creates a DataFrame from an RDD of Product (e.g. case classes, tuples).
1.3.0
:: Experimental :: Creates a Dataset from a java.util.List of a given type.
:: Experimental ::
Creates a Dataset from a java.util.List of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
List<String> data = Arrays.asList("hello", "world"); Dataset<String> ds = spark.createDataset(data, Encoders.STRING());
2.0.0
:: Experimental :: Creates a Dataset from an RDD of a given type.
:: Experimental ::
Creates a Dataset from an RDD of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
2.0.0
:: Experimental :: Creates a Dataset from a local Seq of data of a given type.
:: Experimental ::
Creates a Dataset from a local Seq of data of a given type. This method requires an
encoder (to convert a JVM object of type T
to and from the internal Spark SQL representation)
that is generally created automatically through implicits from a SparkSession
, or can be
created explicitly by calling static methods on Encoders.
import spark.implicits._ case class Person(name: String, age: Long) val data = Seq(Person("Michael", 29), Person("Andy", 30), Person("Justin", 19)) val ds = spark.createDataset(data) ds.show() // +-------+---+ // | name|age| // +-------+---+ // |Michael| 29| // | Andy| 30| // | Justin| 19| // +-------+---+
2.0.0
(Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options.
(Scala-specific) Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Create an external table from the given path based on a data source, a schema and a set of options.
Create an external table from the given path based on a data source, a schema and a set of options. Then, returns the corresponding DataFrame.
1.3.0
(Scala-specific) Creates an external table from the given path based on a data source and a set of options.
(Scala-specific) Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path based on a data source and a set of options.
Creates an external table from the given path based on a data source and a set of options. Then, returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
Creates an external table from the given path based on a data source and returns the corresponding DataFrame.
1.3.0
Creates an external table from the given path and returns the corresponding DataFrame.
Creates an external table from the given path and returns the corresponding DataFrame. It will use the default data source configured by spark.sql.sources.default.
1.3.0
Drops the temporary table with the given table name in the catalog.
Drops the temporary table with the given table name in the catalog. If the table has been cached/persisted before, it's also unpersisted.
the name of the table to be unregistered.
1.3.0
Returns a DataFrame with no rows or columns.
Returns a DataFrame with no rows or columns.
1.3.0
:: Experimental :: A collection of methods that are considered experimental, but can be used to hook into the query planner for advanced functionality.
:: Experimental :: A collection of methods that are considered experimental, but can be used to hook into the query planner for advanced functionality.
1.3.0
Return all the configuration properties that have been set (i.e.
Return all the configuration properties that have been set (i.e. not the default). This creates a new copy of the config properties in the form of a Map.
1.0.0
Return the value of Spark SQL configuration property for the given key.
Return the value of Spark SQL configuration property for the given key. If the key is not set
yet, return defaultValue
.
1.0.0
Return the value of Spark SQL configuration property for the given key.
Return the value of Spark SQL configuration property for the given key.
1.0.0
:: Experimental :: (Scala-specific) Implicit methods available in Scala for converting common Scala objects into DataFrames.
:: Experimental :: (Scala-specific) Implicit methods available in Scala for converting common Scala objects into DataFrames.
val sqlContext = new SQLContext(sc) import sqlContext.implicits._
1.3.0
Returns true if the table is currently cached in-memory.
Returns true if the table is currently cached in-memory.
1.3.0
An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.
An interface to register custom org.apache.spark.sql.util.QueryExecutionListeners that listen for execution metrics.
Returns a SQLContext as new session, with separated SQL configurations, temporary tables, registered functions, but sharing the same SparkContext, cached data and other things.
Returns a SQLContext as new session, with separated SQL configurations, temporary tables, registered functions, but sharing the same SparkContext, cached data and other things.
1.6.0
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in an range from start
to end
(exclusive) with an step value, with partition number
specified.
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in an range from start
to end
(exclusive) with an step value, with partition number
specified.
1.4.0
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with a step value.
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with a step value.
2.0.0
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with step value 1.
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from start
to end
(exclusive) with step value 1.
1.4.0
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from 0 to end
(exclusive) with step value 1.
:: Experimental ::
Creates a DataFrame with a single LongType column named id
, containing elements
in a range from 0 to end
(exclusive) with step value 1.
1.4.1
Returns a DataFrameReader that can be used to read non-streaming data in as a DataFrame.
Returns a DataFrameReader that can be used to read non-streaming data in as a DataFrame.
sqlContext.read.parquet("/path/to/file.parquet") sqlContext.read.schema(schema).json("/path/to/file.json")
1.4.0
:: Experimental :: Returns a DataStreamReader that can be used to read streaming data in as a DataFrame.
:: Experimental :: Returns a DataStreamReader that can be used to read streaming data in as a DataFrame.
sparkSession.readStream.parquet("/path/to/directory/of/parquet/files") sparkSession.readStream.schema(schema).json("/path/to/directory/of/json/files")
2.0.0
Set the given Spark SQL configuration property.
Set the given Spark SQL configuration property.
1.0.0
Set Spark SQL configuration properties.
Set Spark SQL configuration properties.
1.0.0
Executes a SQL query using Spark, returning the result as a DataFrame.
Executes a SQL query using Spark, returning the result as a DataFrame. The dialect that is used for SQL parsing can be configured with 'spark.sql.dialect'.
1.3.0
Returns a StreamingQueryManager that allows managing all the
StreamingQueries active on this
context.
Returns a StreamingQueryManager that allows managing all the
StreamingQueries active on this
context.
2.0.0
Returns the specified table as a DataFrame.
Returns the specified table as a DataFrame.
1.3.0
Returns the names of tables in the given database as an array.
Returns the names of tables in the given database as an array.
1.3.0
Returns the names of tables in the current database as an array.
Returns the names of tables in the current database as an array.
1.3.0
Returns a DataFrame containing names of existing tables in the given database.
Returns a DataFrame containing names of existing tables in the given database. The returned DataFrame has two columns, tableName and isTemporary (a Boolean indicating if a table is a temporary one or not).
1.3.0
Returns a DataFrame containing names of existing tables in the current database.
Returns a DataFrame containing names of existing tables in the current database. The returned DataFrame has two columns, tableName and isTemporary (a Boolean indicating if a table is a temporary one or not).
1.3.0
A collection of methods for registering user-defined functions (UDF).
A collection of methods for registering user-defined functions (UDF). Note that the user-defined functions must be deterministic. Due to optimization, duplicate invocations may be eliminated or the function may even be invoked more times than it is present in the query.
The following example registers a Scala closure as UDF:
sqlContext.udf.register("myUDF", (arg1: Int, arg2: String) => arg2 + arg1)
The following example registers a UDF in Java:
sqlContext.udf().register("myUDF", new UDF2<Integer, String, String>() { @Override public String call(Integer arg1, String arg2) { return arg2 + arg1; } }, DataTypes.StringType);
Or, to use Java 8 lambda syntax:
sqlContext.udf().register("myUDF", (Integer arg1, String arg2) -> arg2 + arg1, DataTypes.StringType);
1.3.0
Removes the specified table from the in-memory cache.
Removes the specified table from the in-memory cache.
1.3.0
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
(Since version 1.3.0) Use createDataFrame instead.
Construct a DataFrame representing the database table accessible via JDBC URL url named table.
Construct a DataFrame representing the database table accessible via JDBC URL url named table. The theParts parameter gives a list expressions suitable for inclusion in WHERE clauses; each one defines one partition of the DataFrame.
(Since version 1.4.0) Use read.jdbc() instead.
Construct a DataFrame representing the database table accessible via JDBC URL url named table.
Construct a DataFrame representing the database table accessible via JDBC URL url named table. Partitions of the table will be retrieved in parallel based on the parameters passed to this function.
the name of a column of integral type that will be used for partitioning.
the minimum value of columnName
used to decide partition stride
the maximum value of columnName
used to decide partition stride
the number of partitions. the range minValue
-maxValue
will be split
evenly into this many partitions
(Since version 1.4.0) Use read.jdbc() instead.
Construct a DataFrame representing the database table accessible via JDBC URL url named table.
Construct a DataFrame representing the database table accessible via JDBC URL url named table.
(Since version 1.4.0) Use read.jdbc() instead.
(Since version 1.4.0) Use read.json() instead.
Loads a JSON file (one object per line) and applies the given schema, returning the result as a DataFrame.
Loads a JSON file (one object per line) and applies the given schema, returning the result as a DataFrame.
(Since version 1.4.0) Use read.json() instead.
Loads a JSON file (one object per line), returning the result as a DataFrame.
Loads a JSON file (one object per line), returning the result as a DataFrame. It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
Loads a JavaRDD[String] storing JSON objects (one object per record) inferring the schema, returning the result as a DataFrame.
Loads a JavaRDD[String] storing JSON objects (one object per record) inferring the schema, returning the result as a DataFrame.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record) inferring the schema, returning the result as a DataFrame.
Loads an RDD[String] storing JSON objects (one object per record) inferring the schema, returning the result as a DataFrame.
(Since version 1.4.0) Use read.json() instead.
Loads an JavaRDD<String> storing JSON objects (one object per record) and applies the given schema, returning the result as a DataFrame.
Loads an JavaRDD<String> storing JSON objects (one object per record) and applies the given schema, returning the result as a DataFrame.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record) and applies the given schema, returning the result as a DataFrame.
Loads an RDD[String] storing JSON objects (one object per record) and applies the given schema, returning the result as a DataFrame.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a DataFrame.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a DataFrame. It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a DataFrame.
Loads an RDD[String] storing JSON objects (one object per record), returning the result as a DataFrame. It goes through the entire dataset once to determine the schema.
(Since version 1.4.0) Use read.json() instead.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame, using the given schema as the schema of the DataFrame.
(Since version 1.4.0) Use read.format(source).schema(schema).options(options).load() instead.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Scala-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Java-specific) Returns the dataset specified by the given data source and a set of options as a DataFrame.
(Since version 1.4.0) Use read.format(source).options(options).load() instead.
Returns the dataset stored at path as a DataFrame, using the given data source.
Returns the dataset stored at path as a DataFrame, using the given data source.
(Since version 1.4.0) Use read.format(source).load(path) instead.
Returns the dataset stored at path as a DataFrame, using the default data source configured by spark.sql.sources.default.
Returns the dataset stored at path as a DataFrame, using the default data source configured by spark.sql.sources.default.
(Since version 1.4.0) Use read.load(path) instead.
Loads a Parquet file, returning the result as a DataFrame.
The entry point for working with structured data (rows and columns) in Spark 1.x.
As of Spark 2.0, this is replaced by SparkSession. However, we are keeping the class here for backward compatibility.
1.0.0


TestRailIntegration¶ ↑
This game made for interaction between TestRail and Ruby automation framework Cucumber+Watir
Installation¶ ↑
Add this line to your application's Gemfile:
gem 'test_rail_integration' gem 'thor'
And then execute:
$ bundle
Or install it yourself as:
$ gem install test_rail_integration
Usage¶ ↑
After installation type
test_rail_integration perform
This command generate executable file run_test_run.rb. You should run this file with parameter - number on test run in TestRail Fill all data in test_rail_data.yml.
Add TestRail::Hook.update_test_rail into “ after |scenario| ” hook.
For standard running use command
ruby run_test_run.rb <run_number>
For generate test run by default use
ruby run_test_run.rb auto <1st parameter> <2nd parameter>
Command that will generated is placed in test_rail_data.yml :exec_command:
After running command for generating executable file run
./cucumber_run.sh
For perform this actions in Jenkins just create Execute shell “ruby run_test_run.rb $Testrun_id ; ./cucumber_run.sh;” where $Testrun_id its string parameter for parameterized builds.
Contributing¶ ↑
-
Fork it ( github.com/kirikami/test_rail_integration/fork )
-
Create your feature branch (
git checkout -b my-new-feature
) -
Commit your changes (
git commit -am 'Add some feature'
) -
Push to the branch (
git push origin my-new-feature
) -
Create a new Pull Request


Pictures from around the globe throughout my travels, favorite places, and my 2 pets!
The vast beauty within Hudson Valley, NY allows for looking at things through different perspectives especially through the trees around us.
Escaping to take a walk on Marist College campus allows for much needed relaxation, tranquility, and peace to become one with nature.
Featuring the sacred Temple of the Emerald Buddha in Bangkok, Thailand, enlightening the value of spiritual journey in Buddhist culture.
Featuring Xunantunich Mayan Ruins in San Jose, Belize, exemplify the history, culture, and artisan craft within Mayan culture.
Freedom for all, in New York City. Stands a tragic yet hopeful reminder of the city's darkest days and future to come.
Sometimes it is not about the destination but the journey along the path to get there. To our past and future endeavours.
Border Collie x Lab Cross, his piercing eyes will catch your heart in addition to his energetic, fearless, and loving personality.
Hound x Lab Cross, she will become your best friend by going for a walk, ride, or playing fetch with her favorite tennis ball.


Chapter VIII (Gates)
Prev: Hoon Computes Next: Tiles
"Anyone who thinks he's original is merely ignorant." (Nicolás Gómez Dávila)
It's nice that we got decrement working in the last chapter. But we didn't actually produce a decrement function. So, let's do that now.
Gates and "lambda"
While we can hardly stop you from saying "function," the proper
Urbit terminology is gate
.
A gate is a kind of core - you might remember our discussion in chapter 4. A core is
[battery payload]
The battery is one or more formulas; the payload is any noun.
In a gate, there is exactly one arm - whose name is $
, buc
or
blip
- ie, nothing. One arm, one twig, one formula. Moreover,
the payload is always a cell, arbitrarily labeled sample
and
context
.
So - to combine several ways of deconstructing a noun - a gate looks like this:
glus gras
lusgal lusgar
+< +>
[formula [sample context]]
- +
hep lus
Does this remind you of anything? I hope not! Unfortunately some readers may be previously familiar with legacy functional languages from the late 20th century. Legacy? Perhaps this is a little sharp - let's say "classical."
In classical FP, something quite like a Hoon gate is known as a "lambda." We try not to use this term, really. Hoon is obviously not based on the lambda calculus, and it's not nice to define other people's words for them. (This is also why we don't say "monad.") But we may slip up sometimes and that's okay. (We may also get caught with "closure" or even "continuation.")
But there is a big difference: in classical FP, "lambda" is a fundamental semantic primitive. Since these are functional languages after all, it makes sense that defining and calling functions would be fundamental primitives.
But gates - Hoon's equivalent of functions - are no more than a design pattern: a convention, and a relatively funky convention at that. Plus some sugary macros that make things convenient.
Since Hoon's primitives are actually primitive (it doesn't get much more primitive than Nock), we can combine them to produce not only classic, function-oriented FP, but also a broader garden of funky patterns at the same complexity level as function calling. But different from function calling. What? We'll see some of these patterns in a bit.
We make a gate
Our goal this time is not just to build decrement - it's to build
decrement right. That is, as a decrement function - a gate.
If this is called deq
(there already being a perfectly usable
dec
) and we want decrementing a
to look like Lisp:
(deq a)
then we can expect our program to look something like
!: :: To write a trivial Hoon program
|= * ::
|= [a=@ ~] :: For educational purposes only
:_ ~ :_ ~ ::
:- %$ :: Preserve this mysterious boilerplate square
!> ::
::::::::::::::::: Produce a value below
=> XXXXX :: some twig or other
(deq a)
This XXXXX twig, whatever it is, must extend the subject to contain a core which includes an arm which produces our gate.
Extend the subject to contain a core which includes an arm which produces our gate? Sure:
=> |%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
(deq a)
Or more conveniently:
=< (deq a)
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
Does this work?
: /~zod/try/25/bin/hec/hoon
~zod/try=> :hec 42
41
But this doesn't mean we understand it.
Sure, we read the last chapter. So we understand how and why
|%
turned into |.
, which then turned into |-
. The loop.
But this strange beast seems to contain... three cores?
We understand a gate
Of course we need three nested cores. Actually, we have a lot
more than three nested cores, because the subject we are getting
for the application contains all of zuse.hoon
and hoon.hoon
.
A stack of cores in which the core below is the context of the
one above, all the way down to the innermost core whose payload
is a simple constant (for hoon.hoon
, always the Kelvin version)
is called, for obvious reasons, a reef
. With our three cores,
we are adding no more than a few decorative polyps to our reef.
For example, we can just as well use the standard decrement,
dec
- it's in there too:
=< (dec a)
|%
++ deq
=+ x=0
|.
=+ y=0
|-
?: =(x +(y))
y
$(y +(y))
--
(We've used a more conservative indentation here - uglier and less compact, but arguably clearer.)
We define deq
, but we seem to be able to just call dec
. Why?
Because we read past cores which don't bind the arm we're looking
for, we can read all the way to the deepest layer in the Hoon 164
reef - which contains the official, original dec
.
(It remains important not to profoundly abuse this magic power. Every layer of core you add, of course, puts you farther from some of the gates you want to use. A smart interpreter can smooth over this issue a little, but smart isn't free either.)
Thus, it should be perfectly clear what the three bar
runes -
implying three cores - mean. First, we have the |%
which
contains ++deq
. (When referring to an arm in informal text,
we use this syntax, though the actual language of course requires
a double space - when searching in a file, "++ arm" will always
find the definition of arm
and nothing else.)
This outer core defines the library our decrement gate is in.
Actually, "library" (or book
- defined as a core which
contains only code and constant data) is not quite the right
terminology here. Even though we don't use it and it shouldn't
in fact be there, the payload of this core contains dynamic
information such as a
.
In actual fact our nascent integer math library is really an
"object" or cart
- ie, a core containing dynamic state. This
is just wrong and we'll see later on how to do it right.
As in every core, the subject of every arm is the core itself.
Naturally, the |%
twig uses its own subject as the payload,
creating the familiar reef effect as the stack of cores piles up.
And this library is the context
(or +>
, gras
) of our gate.
Thus, the twig in the gate can use anything in the library - of
course as needed.
The sample
(or +<
, glus
) of our gate is simply any default
noun for the type we want to compute on. Remember, of course,
that the whole point of gates is that we change the sample, then
compute the formula. Hoon is a typed language, so the sample can
be safely replaced by any noun in the same type.
Within =+
, tislus
, the old subject becomes the context, and
the new subject adds the sample ^=(b 0)
. This pair of sample
and context then becomes the payload within |.
Hence, we build
a gate.
And then, within this gate - the third core is the decrement loop itself, as we built it in the last chapter. Note that if decrement did not need a counter variable or other incremental state, we would need only two cores - we could recurse through the decrement gate itself. We'll see this in a little bit.
Let's eschew synthetic runes and show the three cores as they really are:
=< (deq a)
|%
++ deq
=+ x=0
|%
++ $
=+ y=0
=< $
|%
++ $
?: =(x +(y))
y
$(y +(y))
--
--
--
On the other hand, if we don't mind synthetics and lots of parentheses, our decrement gate can also be a one-liner. This is perfectly legitimate Hoon style:
|% ++ deq =+(x=0 |.(=+(y=0 |-(?:(=(x +(y)) y $(y +(y)))))))
--
We call a gate
Note that we've still totally failed to explain (deq a)
. This
is obviously an irregular form. Let's try to turn it back into
natural hoons, and figure out what it's doing.
We know that deq
builds a gate. We already know how to change
the sample, +<
or glus
, in that gate. So let's drag it out
and do it the ugly way:
=< =+ foo=deq :: create the gate
=+ bar=foo(+< a) :: replace its sample
$.bar :: invoke the gate
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
Does this work? It's always nice to check...
: /~zod/try/28/bin/hec/hoon
~zod/try=> :hec 42
41
We don't actually need a separate bar
:
=< =+ foo=deq :: create the gate
$.foo(+< a) :: replace the sample and invoke
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
But what we'd actually like to be able to get away with is... something that won't work - but that looks like it might:
=< $.deq(+< a) :: create, replace and invoke
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
We try it and - doh!
: /~zod/try/31/bin/hec/hoon
~zod/try=> :hec 42
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[2 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[3 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[4 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[4 8].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[5 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[6 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[8 1].[23 3]>
! /~zod/hec/bin/~2014.1.13..22.55.29..8975/try:<[8 5].[8 16]>
! type-fail
! exit
(This means we had a type failure between columns 5 and 16 of line 8, by the way. More on troubleshooting errors later.)
Because when we wrote deq(+< a)
, we didn't mean: compute deq
,
then modify the +<
of its result to be a
. We meant: compute
deq
, with the +<
of the core that contains deq
- ie, with
the +<
of the library - changed to a
. Needless to say,
that's not what we want at all.
The change in =%
- remember that deq(+< a)
is a short form
for =%(deq +< a)
- is always before the invocation.
So we can't do this as easily as it looks like we should be able
to do it - because we can't edit the gate until we build it.
Fortunately, we have a synthetic hoon to do this. What hoon is
(deq a), anyway? It's %-
, cenhep
, %cnhp
:
=< %- deq
a
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
Let's look at the definition of %cnhp
, our function caller.
Here are the relevant clips from hoon.hoon
:
++ twig
|% [%cnhp p=twig q=tusk]
==
++ tusk (list twig)
++ open
^- twig
?- gen
[%cnhp *]
?~(q.gen [%tsgr p.gen [%cnzy %$]] [%cncl p.gen [%cltr q.gen]])
::
[%cncl *]
[%cnsg [%$ ~] p.gen q.gen]
::
[%cnsg *]
[%cntr p.gen q.gen [[[[%& 6] ~] r.gen] ~]]
::
[%cntr *]
:+ %tsls
q.gen
:+ %cnts
(weld p.gen `wing`[[~ 2] ~])
(turn r.gen |=([p=wing q=twig] [p [%tsgr [~ 3] q]]))
==
You're not expected to understand this. At least, not yet. But
we see that %-
, so far from being a primitive, actually is a
special case of %:
, which is a special case of %~
, which is a
special case of %*
, which seems to do... something.
Which probably makes you think %cnhp
is insanely complicated.
Actually it just shows what an interesting family of things
which are like function calls, but which are not function calls,
we have here in Hoon. Defining %cnhp
this way saves code, but
it doesn't help us understand the humble function call.
If we just wanted %cnhp to be simple, we'd define it this way:
++ twig
|% [%cnhp p=twig q=twig]
==
++ open
^- twig
?- gen
[%cnhp *]
:+ %tsls q.gen
:+ %tsgl [%cnzy %$]
[%cnhp [[%& 2] ~] [[[%& 6] ~] [%tsgl [~ 3] p.gen]] ~]
==
This also is not terribly readable. Let's translate it into the code that we'd write if we were writing this macro out by hand:
=< =+ deq :: create the gate
$.-(+< =>(+ a)) :: replace the sample and invoke
|%
++ deq
=+ x=0
|. =+ y=0
|- ?: =(x +(y))
y
$(y +(y))
--
Compare this to the working example above. The main difference is that this is what a Lisp fan would call a "hygienic macro." It does not create private symbols of its own, or if it does they are not visible to the programmer. For instance, when we write
=+ deq
instead of
=+ foo=deq
we see how wrong it is to think of the latter as "declaring a
variable foo
and assigning it to deq
." Actually, we have no
need within a synthetic hoon to bind a name. After the =+
, we
can reach the gate with just -
.
But we cannot simply replace the sample with a
- because the
programmer who wrote a
meant to write a twig against the
original subject, not against the cell of gate and subject.
Fortunately, =>(+ a)
gets us our original subject back - and
%-
works exactly as if it was a natural hoon. That's hygiene.
Sequel hook
So is this the right way to write decrement (assuming we didn't already have decrement)? No - there is actually a hoon designed specifically for building gates.
The right code (which we saw earlier) is:
=< (deq a)
|%
++ deq
|= x=@
=| y=@
|- ?: =(x +(y))
y
$(y +(y))
--
But this requires us to understand x=@
- which isn't even a
twig. Rather, it's something else, called a tile
. We'll make
friends with the tiles in the next chapter.
For those with classic FP experience, it's very tempting to read
|=
(bartis
, %brts
) as "lambda." I hope it's clear by now
that the difference between Hoon and classic FP languages is like
the difference between a bat and a bird. Both have wings and use
them to fly, but below that level everything is different.


The organization comittee takes care of the logistic and communication aspects of the conference. It builds the scientific committee.
Fatiha Saïs
Chair, Université Paris-Sud, UPsay
Olivier Fercoq
Co chair, Télécom ParisTech, UPsay
Isabelle Huteau
Conference Communication Leader, Digicosme
The scientific committee chooses the keynote speakers, builds and supervises the program committee. It decides on the rules for the prize for the best communication. It also helps the organization committee asking for funding and writes the call for contributions.
Florence d'Alché-Buc
Télécom ParisTech, UPsay
Marco Cuturi
ENSAE ParisTech, UPSay
Olivier Fercoq
Télécom ParisTech, UPsay
Alexandre Gramfort
Inria Saclay, UPSay
Cristina Manfredotti
AgroParisTech, UPSay
Nicoleta Preda
Université de Versailles-Saint-Quentin-en-Yvelines, UPsay
Gianluca Quercini
Centrale-Supélec, UPSay
Fatiha Saïs
Université Paris-Sud, UPsay
Michaël Thomazo
Inria Saclay, UPSay
Paula Tubaro
CNRS, UPSay
The program committee reviews the extended abstracts submitted and selects the ones which will be allowed to be presented at the conference. It will also be in charge of the reviewing and the selection of the student posters and demos to be presented during the conference.


Greetings!
Welcome to this page.
- A Bit about me
- I Recieved a bachlors in Anthropology from Beloit College in 2015.
- Later that year, I moved to the west coast and started working for Seattle Childrens Hospital.
- I stayed there for three years, working my way from an entry level family service coordinator role to the Supervisor of Scheduling for the Neurosciences team.


Woman strikes hubby with axe
A woman from Matobo allegedly struck her husband with an axe twice on the head after the man assaulted her over a missing hoe.
by Sukulwenkosi Dube-MatutuCharity Sithole (29) of Lushongwe Village is expected to appear in court on December 16 facing an attempted murder charge after striking Elias Dube (58) with an axe.
“On 23 September at around 10PM, Mr Dube arrived home from the local bottle store drunk. A misunderstanding arose between them over a hoe which had been misplaced by their children.
“Mr Dube demanded the hoe from his wife and accused her of being careless and failing to properly look after their household property.
Related Articles
ZRP beefs up security in ‘machete warzone’
Nov 19, 2019 37,070 4
Life in jail for axe rampage killer
Nov 19, 2019 24,574 1
Man kills neighbour in fight over married lover
Nov 19, 2019 25,848 0
EFF’s Floyd Shivambu in court on assault charge
Nov 18, 2019 13,481 1
“They started fighting and Sithole took an axe and struck her husband twice on the head and he fell to the ground and bled profusely.
“Upon realising that her husband had been injured, Sithole reported the matter to the police who attended the scene.
“Mr Dube was rushed to Masiye Camp Clinic where he was further referred to United Bulawayo Hospitals,” read the State papers.
In another case, a Filabusi man has appeared in court for assaulting his neighbour.
Nicodemus Siziba (29) pleaded not guilty to assault when he appeared before Gwanda magistrate, Mrs Nomagugu Sibanda.
He was remanded in custody to November 25 for trial.
Prosecuting, Mr Silent Shoko said Siziba attacked Okay Shoko on September 11.
“On September 11 at around 11PM at Base 2 Umzingwane Panning Site in West Nicholson, Okay was having a dispute with his wife in their tent and she went out.
“Siziba got out of his tent and asked Okay what was going on between him and his wife. Okay became furious and ordered Siziba to stay out of his family issues.
“Siziba then grabbed Okay by the belt and pushed him to the ground.

“Okay screamed for help and neighbours intervened and restrained Siziba from further assaulting him,” he said. The Chronicle


Date¶
Description¶
A date/time object.
Methods¶
| getDate readonly | Returns the day of the month of the specified Date object in local time. |
| getDay readonly | Returns the day of the week for the specified Date object in local time. |
| getFullYear readonly | Returns the four digit year of the specified Date object in local time. |
| getHours readonly | Returns the hour of the specified Date object in local time. |
| getMilliseconds readonly | Returns the milliseconds of the specified Date object in local time. |
| getMinutes readonly | Returns the minutes of the specified Date object in local time. |
| getMonth readonly | Returns the month of the specified Date object in local time. |
| getSeconds readonly | Returns the seconds of the specified Date object in local time. |
| getTime readonly | Returns the number of milliseconds since midnight January 1,1970 UTC for the specified Date object. |
| getTimezoneOffset readonly | Returns the difference in minutes between the computer’s local time and UTC. |
| getUTCDate readonly | Returns the day of the month of the specified Date object according to UTC. |
| getUTCDay readonly | Returns the day of the week for the specified Date object according to UTC. |
| getUTCFullYear readonly | Returns the four digit year of the specified Date object according to UTC. |
| getUTCHours readonly | Returns the hour of the specified Date object according to UTC. |
| getUTCMilliseconds readonly | Returns the milliseconds of the specified Date object according to UTC. |
| getUTCMinutes readonly | Returns the minutes of the specified Date object according to UTC. |
| getUTCMonth readonly | Returns the month of the specified Date object according to UTC. |
| getUTCSeconds readonly | Returns the seconds of the specified Date object according to UTC. |
| getYear readonly | Returns the year of the specified Date object, as a difference from 1900, in local time. |
| setDate readonly | Sets the day of the month of a specified Date object according to local time. |
| setFullYear readonly | Sets the year of a specified Date object according to local time. |
| setHours readonly | Sets the hours of a specified Date object according to local time. |
| setMilliseconds readonly | Sets the milliseconds of a specified Date object according to local time. |
| setMinutes readonly | Sets the minutes of a specified Date object according to local time. |
| setMonth readonly | Sets the month of a specified Date object according to local time. |
| setSeconds readonly | Sets the seconds of a specified Date object according to local time. |
| setTime readonly | Sets the date of a specified Date object in milliseconds since midnight, January 1, 1970. |
| setUTCDate readonly | Sets the date of a specified Date object according to universal time. |
| setUTCFullYear readonly | Sets the year of a specified Date object according to UTC, can also set the month and date. |
| setUTCHours readonly | Sets the hours of a specified Date object according to UTC. |
| setUTCMilliseconds readonly | Sets the milliseconds of a specified Date object according to UTC. |
| setUTCMinutes readonly | Sets the minutes of a specified Date object according to UTC. |
| setUTCMonth readonly | Sets the month of a specified Date object according to UTC. |
| setUTCSeconds readonly | Sets the seconds of a specified Date object according to UTC. |
| setYear readonly | Sets the year of a specified Date object according to local time, as a difference between the current year and 1900. |
| toDateString readonly | |
| toGMTString readonly | |
| toLocaleDateString readonly | |
| toLocaleString readonly | |
| toLocaleTimeString readonly | |
| toSource readonly | Creates a string representation of this object that can be fed back to?eval()?to re-create an object. Works only with built-in classes. |
| toString readonly | Returns a string value representing the date and time stored in the Date object in human readable format. |
| toTimeString readonly | |
| toUTCString readonly | |
| valueOf readonly | The valueOf() method returns the number of milliseconds that have passed since midnight, Returns an integer. |


Additional information can be found on the last slide of the presentation http://geco.mines.edu/scripts
Array jobs offer a mechanism for submitting and managing collections of similar jobs quickly and easily. All jobs must have the same initial options (e.g. size, time limit, etc.), however it is possible to change some of these options after the job has begun execution using the command specifying the JobID of the array or individual ArrayJobID.
To submit a array of jobs you add the --array option to your sbatch command. For example
# Submit a job array with index values between 0 and 31 $ sbatch --array=0-31 -N1 tmp # Submit a job array with index values of 1, 3, 5 and 7 $ sbatch --array=1,3,5,7 -N1 tmp # Submit a job array with index values between 1 and 7 # with a step size of 2 (i.e. 1, 3, 5 and 7) $ sbatch --array=1-7:2 -N1 tmp
Array jobs will have additional environment variables set.
SLURM_ARRAY_JOB_ID will be set to the first job ID of the array. SLURM_ARRAY_TASK_ID will be set to the job array index value. SLURM_ARRAY_TASK_MAX will be set to the maximum array index value. SLURM_ARRAY_TASK_MIN will be set to the minimum array index value.
For example a job submission of this sort:
sbatch --array=1-3 -N1 some_script
will generate a job array containing three jobs.
The sbatch command responds will respond with the batch job id, say 361234. Then three copies of the job will be run with the environment variables will set as follows:
SLURM_ARRAY_JOB_ID=361234 SLURM_ARRAY_TASK_MIN=1 SLURM_ARRAY_TASK_MAX=3 SLURM_JOBID=361234 SLURM_ARRAY_TASK_ID=1 SLURM_ARRAY_JOB_ID=361234 SLURM_ARRAY_TASK_MIN=1 SLURM_ARRAY_TASK_MAX=3 SLURM_JOBID=361235 SLURM_ARRAY_TASK_ID=2 SLURM_ARRAY_JOB_ID=361234 SLURM_ARRAY_TASK_MIN=1 SLURM_ARRAY_TASK_MAX=3 SLURM_JOBID=361236 SLURM_ARRAY_TASK_ID=3
Each instance in the array gets defined a successive values for SLURM_ARRAY_TASK_ID starting at 1. They also each get successive values for SLURM JOB ID starting at SLURM_ARRAY_JOB_ID. SLURM_ARRAY_JOB_ID is the same for all of the instances in the array job.
These environmental variables can be used to specify different data sets for each run. For example you might have a file that lists a subdirectory or other parameters for a run. You can then use SLURM_ARRAY_TASK_ID to pick a line from the file. A quick (most likely not intuitive) way of doing this is in your script is with the sed command:
cmd=`echo $SLURM_ARRAY_TASK_ID"q;d"` aline=`sed -e $cmd $SLURM_SUBMIT_DIR/pars`
This will "pick" line number $SLURM_ARRAY_TASK_ID from the file $SLURM_SUBMIT_DIR/pars where $SLURM_SUBMIT_DIR is the starting directory for your run.
The values on the line can then be used to create strings for command line arguments or directory names.
For example, assume $SLURM_ARRAY_TASK_ID=18 the 18th line of our file is:
1 100 86 83
and the following lines were in our script:
cmd=`echo $SLURM_ARRAY_TASK_ID"q;d"` aline=`sed -e $cmd $SLURM_SUBMIT_DIR/pars` cl=`echo $aline | awk '{print("-v x " $1 " -v y " $2 " -v z " $3)}'` dir=`echo $aline | awk '{print($1"/"$2"/"$3)}'` echo "Line " $SLURM_ARRAY_TASK_ID " is " $aline echo "cl=" $cl echo "dir=" $dir
We would get
Line 18 is 1 100 86 83 cl= -v x 1 -v y 100 -v z 86 dir= 1/100/86
The string $dir could be used to create a directory and the string $cl could be used as input for a program.
The program "dummy.c" requires that an environmental variable FLIST be set before it is run. FLIST is the name of a file that contains a list of directories. dummy.c takes the $SLURM_ARRAY_TASK_ID line from this list. It then does a cd to that directory. The rest of the program runs in that directory. The first call to split_it starts MPI and puts you in the directory. The second call to split_it quits MPI. You can modify the program to do your work in between. For example:
int main(int argc, char **argv, char **envp) { //first call starts MPI and puts you in a directory split_it(&argc, &argv, envp); printf("// Your stuff goes here\n"); //second call stops MPI split_it(&argc, &argv, envp); return 0; }
The MPI programs c_array.c, f_array.f 90 and p_array are C, Fortran, and python are more or less versions of the same program. They simply start MPI and then read the environmental variables SLURM_JOB_ID, SLURM_ARRAY_JOB_ID, and SLURM_ARRAY_TASK_ID. They also read the command line arguments used to run the program. The environmental variables and the command line arguments are printed.
The worker*.* programs are discussed in a presentation on bag of task parallelism. Email<EMAIL_ADDRESS>for more information. spam.c shows how to write a C routine callable from python.
module purge module load StdEnv module load PrgEnv/python/gcc/2.7.11 make
This script runs the *_array programs discussed in the previous paragraph. If first uses the $SLURM_ARRAY_TASK_ID to create a directory name. The directory is created and entered. Then the programs are run with $SLURM_ARRAY_TASK_MAX $SLURM_ARRAY_TASK_MIN passed in as command line arguments.
This script runs the dummy.c program. Recall that this program reads the environmental variable FLIST which is set in the script. FLIST is the name of a file that contains a list of directories. dummy.c takes the $SLURM_ARRAY_TASK_ID line from this list. It then does a cd to that directory. The rest of the program runs in that directory.
This script runs p_array. First it creates a base directory using the environmental variable $SLURM_ARRAY_JOB_ID and enters the directory. Next it uses the environmental variable $SLURM_ARRAY_TASK_ID to select a line from the file $SLURM_SUBMIT_DIR/pars as discussed above. It them creates a directory based on the values on the given line and runs the program in that directory.
This script contains some examples, as comments, on how you might create a "pars" file.
If we used the command:
for a in `seq 0 2 10` ; do for b in `seq 1 8 20` ; do for c in `seq 5 5 10` ; do echo $a $b $c >> pars done done done
the pars file would contain 36 lines. We could run the script as follows
[tkaiser@mio001 bot]$ !sbatch sbatch --array=1-36 array4 Submitted batch job 3492514
This would give us the directory structure and output files:
3492514/0/1/10/out.dat 3492514/0/1/5/out.dat 3492514/0/9/10/out.dat 3492514/0/9/5/out.dat 3492514/0/17/5/out.dat 3492514/0/17/10/out.dat 3492514/2/1/5/out.dat 3492514/2/1/10/out.dat 3492514/2/9/5/out.dat 3492514/2/9/10/out.dat 3492514/2/17/5/out.dat 3492514/2/17/10/out.dat 3492514/4/1/5/out.dat 3492514/4/1/10/out.dat 3492514/4/9/5/out.dat 3492514/4/9/10/out.dat 3492514/4/17/5/out.dat 3492514/4/17/10/out.dat 3492514/6/1/5/out.dat 3492514/6/1/10/out.dat 3492514/6/17/5/out.dat 3492514/6/17/10/out.dat 3492514/6/9/5/out.dat 3492514/6/9/10/out.dat 3492514/8/1/5/out.dat 3492514/8/1/10/out.dat 3492514/8/9/5/out.dat 3492514/8/9/10/out.dat 3492514/8/17/5/out.dat 3492514/8/17/10/out.dat 3492514/10/1/5/out.dat 3492514/10/1/10/out.dat 3492514/10/17/5/out.dat 3492514/10/17/10/out.dat 3492514/10/9/5/out.dat 3492514/10/9/10/out.dat


TFTOPL(1) TFTOPL(1) NAME tftopl - convert TeX font metric (tfm) files to property lists SYNOPSIS tftopl [OPTIONS] tfm_name[.tfm] [pl_name[.pl]] DESCRIPTION This manual page is not meant to be exhaustive. The complete documenta‐ tion for this version of TeX can be found in the info file or manual Web2C: A TeX implementation. The tftopl program translates a (program-oriented) font metric file to a (human-oriented) property list file. Thus, you can edit the contents of the TFM files, if the font designer has not done his or her job properly, or if you're encountering strange difficulties, or if you're just curi‐ ous. It also serves as a TFM-file validating program, i.e., if no error messages are given, the input file is correct. The pl_name is extended with .pl if it lacks a suffix. If pl_name is not given, standard output is used. Likewise, tfm_name is extended with .tfm if it lacks a suffix. Also, path searching is done for the TFM file using the environment variable TEXFONTS. If that is not set, tftopl uses the system default. See tex(1) for the details of the searching. OPTIONS -charcode-format=format The argument format specifies how character codes are output in the PL file. By default, only letters and digits are output using the C integer code (i.e., in ASCII); the others are output in octal. (Unless the font's coding scheme starts with TeX math sy or TeX math ex, in which case all character codes are output in octal.) If format is ascii, all character codes that correspond to graphic characters, besides the left and right parentheses, are output in ASCII. Finally, if format is octal, all character codes are output in octal. -verbose Without this option, tftopl operates silently. With it, a banner and progress report are printed on stdout. SEE ALSO pltotf(1), Donald E. Knuth, TeX for nroffware. Donald E. Knuth, The Metafontbook (Volume C of Computers and Typeset‐ ting), Addison-Wesley, 1986, ISBN 0-201-13445-4. AUTHORS Donald E. Knuth wrote the program. It was published as part of the TeX for nroffware technical report, available from the TeX Users Group. Howard Trickey and Pavel Curtis originally ported it to Unix. Web2C 2012 17 December 1994 TFTOPL(1)


This template provides a starting point for creating your web
application. This easily configurable template allows you to define the
map, title and subtitle for the site. This read-me file explains how to
setup and configure the template to run on your web server. We've also
provided a few tips on how to personalize the template by adding a
company logo, customizing the content in the sidebar and adding an
overview map.
This template uses the Twitter search api to find and display
geocoded tweets on the map. The Twitter API requires OAuth for authentication read more about Twitter authentication here. If you are setting up this template on your web server you will need to setup a proxy that makes requests and recieves results from Twitter without the client side app handling the oAuth authentication. There's a Twitter oAuth Search Proxy application written using PHP available on github that you can use. See the Twitter oAuth Search Proxy php for more details.
Table of Contents
Install the web application
These instructions assume that you have a web server like Internet Information Services
(IIS)
installed and setup on your machine. If you are using another web
server the general installation steps will be the same but you will
need to check your web server's documentation for specific information
on deploying and testing the application.
- Copy the contents of the zip file into your web server's
root directory. In IIS, the default location for the root
folder is
c:\inetpub\wwwroot
.
- If your application edits features in a feature service,
enables the elevation chart, contains secure services, web maps that
aren't publicly shared, or generates requests that exceed 2000
characters you may need to setup and use a proxy page. Common
situations where you may exceed the URL length are, using complext
polygons as input to a task or specifying a spatial reference using
well-known text (wkt).
For details on installing and
configuring a proxy page, see Using
the proxy page. After setting up the proxy set the proxyUrl
option in index.html to point to your proxy.
- Test the page using the following URL:
http://localhost/[template name]/index.html, where [template name] is
the name of the folder where you extracted the zip contents.
Top
Configure the application
Now let's configure the application to use a different map,
title or subtitle.
- Every saved map has a unique identifier. To
find the map id, and find the map you want to display. If it
is one of your maps, make
sure it's shared with everyone (public). View the map details and copy
the ID from the URL in the top of your browser. The section you need to
copy is highlighted in yellow in the image below.
- Open the index.html file in a text editor. You can edit
this file to set the following application properties:
- webmap:unique identifier for
the map.
- title:if not specified
the map's title is used
- subTitle:if not specified
the web map's summary is used
- bingMapsKey:if the map uses data
from Bing Maps, enter your Bing Maps Key
- sharingurl:
specify the ArcGIS Online Organization or Portal for ArcGIS where the
map resides.
- To modify the map, replace the string for webmap with your
map's id.
function init(){
//The ID for the map
webmap = "dbd1c6d52f4e447f8c01d14a691a70fe";
- If your map contains data from Bing Maps, enter
your Bing
Maps key in commonConfig.js.
bingMapsKey = "Enter your Bing Maps Key here";
- By default, the application displays the map's
title as the applications title and the map's summary as the subtitle.
You can change this by setting the title and subtitle properties.
title = "This is a custom title for your map";
subtitle = "This is a custom subtitle";
- Modify sharingurl,
found
inside index.html, to point to your sharing service URL if you are
using an ArcGIS Online organization or Portal for
ArcGIS.
- The default value is null, and
automatically attempts to use www.arcgis.com.
- For an organization, specify the url as
follows: http://MyOrg.maps.arcgis.com
- For Portal for ArcGIS, specify the url as follows: http://<fully qualified
domain name>/<web adaptor instance name>. For
example,
http://myportal.domain.com/arcgis.
sharingurl: "Sharing URL",
- Save the file then test your application
and note that it now displays your map and if specified your custom
title and subtitle.
Top
Specify Map Options
When creating a new map you can specify optional parameters
that define various map options, For example, whether pan
arrows or a slider are
displayed, if popups defined in web map display and if the map
supports continous pan across the dateline. View the API reference for
the Map
class for more details. Note: continous pan across the dateline is only
supported if the map's spatial reference is WGS84 or Web Mercator.
- Modify sharingurl,
found inside index.html, to point to your sharing service URL if you
are using an ArcGIS Online organization or Portal for
ArcGIS.
- The default value is null, and
automatically attempts to use www.arcgis.com.
- For an organization, specify the url as
follows: http://MyOrg.maps.arcgis.com
- For Portal for ArcGIS, specify the url as follows: http://<fully qualified
domain name>/<web adaptor instance name>. For
example,
http://myportal.domain.com/arcgis.
sharingurl: "Sharing URL",
-
To change the map options in your application open the
layout.js file
search for mapOptions then add or remove map options. In this example,
we turn off the map slider, display the pan arrows and enable support
for continous pan across the dateline.
mapOptions: {
slider: false,
nav: true,
wrapAround180:true
}
Top
Personalize the application
In this section, you'll see how to personalize the application
by adding a logo, moving the sidebar and modifying the sidebar content.
Top
Add a logo to the application
You can personalize your site by adding a custom logo to the
application's header next to the map title.
- First copy your custom logo to the images subdirectory.
- Open index.html in a text editor.
- Find the section of code that has an id of "header" and add
the code in red to this section.

- Open the layout.css file from the css folder in a text
editor. This file defines the look and formatting of the web
application. In this step we'll add a new style rule that defines how
the custom logo looks. Copy the code below and paste it at the bottom
of the css file. Then modify the background url to match the name of
your logo image. Modify the width to match the width of your custom
logo.
#logo {
float:left;
width:65px;
height:65px;
margin:4px;
background:url(../images/santabarbara.png) top left no-repeat;
}
- The header area that contains the logo, title and subtitle
has a default height of 80 pixels. If your image is large you may need
to increase the height in order for it to display well. To increase the
height, open the layout.css file and find the #header section. Try
setting the header to the image height plus 8.We add 8 because if you
look at the logo style you created in the last step a margin of 4px was
specified to add a little extra space around the logo.
#header{
border:solid 1px #999;
height:80px;
- Run the application and the custom logo should appear to
the left of the title in the application header.
Top
Add an overview map
The ArcGIS
API for JavaScript has several dijits that you can use to add
additional functionality to the application. Let's look at how to add
the OverviewMap
dijit to the application. The OverviewMap dijit shows the current
extent for the map within the context of a larger area.
- Open layout.js in the javascript folder in a text editor
and add the line in red to the dojo.require section.
dojo.require("esri.map");
dojo.require("esri.arcgis.utils");
dojo.require("dijit.layout.StackContainer");
dojo.require("esri.dijit.OverviewMap");
- The overview map dijit can display in its own window or
attach to a corner of the map. In this example we are going to attach
it to the corner of the map. However the map currently has navigation
displayed which adds an icon to the map corners. Let's turn this off so
we can display the overview map icon in the corner instead.To turn off
the navigation images, set the nav value to false in this section of
code from layout.js.
mapOptions: {
slider: true,
nav: false
- Next find the section of code that sets the
map
to response.map
and paste the code in red
beneath that line. This code checks to see if the map is loaded, if it
is it runs a function that adds the overview map to the application.
map = response.map;
if(map.loaded){
addOverviewMap();
}
else{
dojo.connect(map,"onLoad",addOverviewMap);
}
if (bingMapsKey) {
- Now add the
addOverviewMap
function to the very bottom of the layout.js file.
function addOverviewMap() {
var overviewMapDijit = new esri.dijit.OverviewMap({
map: map,
attachTo: "top-right",
visible: true
});
overviewMapDijit.startup();
}
The code above adds an overview map to the upper right
corner of the map. You can modify this location by specifying one of
the other options ("top-right","bottom-right","bottom-left"). The
visible parameter is set to true which expands the overview map when
the applciation is first displayed. You can use additional parameters
to modify the color and opacity of the rectangle, set the width and
height etc. View the API Reference for the OverviewMap
for more information.
Configure
custom utility services and
other external URLs
The application can be configured to use
your
own
utility services.. The instructions below detail the steps necessary to
configure
your application to use custom utility services, as well as your own
internally hosted JSAPI.
- Specify a
custom print service. In commonConfig.js, replace the URL
value in quotes for the printTask
property with your custom print service. For example:
printTask:{
url: location + protocol + "//MyServer/../rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
}
Note:
If a custom print service is not configured, the application uses the
ArcGIS.com default print service.
- Specify a
custom geometry
service. In
commonConfig.js, replace the URL
value in quotes for the geometry
property with your custom print service. For example:
geometry:{
url: location + protocol + "//MyServer/../rest/services/Geometry/GeometryServer"
}
Note:
If a custom geometry service is not configured, the application uses
the
ArcGIS.com default geometry service.
- Specify a
custom geocode
service. In
commonConfig.js, replace the URL
value in quotes for the geocode
property with your custom print service. For example:
geocode:{
url: location + protocol + "//MyServer/../rest/services/World/GeocodeServer"
}
Note: If a custom geocode
service is not configured, the application uses the
ArcGIS.com World geocode service by default.
- Search and
replace Javascript API (JSAPI) references. In index.html, use a text
search to find all instances of
"//serverapi.arcgisonline.com/jsapi/arcgis/3.5". Your search should find three
references to the ArcGIS.com JSAPI. Replace these three references with
your internally hosted JSAPI. Be aware you may need to modify the
search and replace text strings to correctly update the references to
point to your
hosted JSAPI.
If you are using Portal for ArcGIS, you can update
the references to use the portal's internally hosted JSAPI,
for
example:
Search for: //serverapi.arcgisonline.com/jsapi/arcgis/3.5
Replace with: //MyPortalServer.domain.com/arcgis/jsapi/jsapi
Confirm the update
was successful by opening one of the updated references in a web
browser. If the file contents are displayed properly in the web
browser, the
update was succesful. For example:
Open in web browser: "http://MyPortalServer.domain.com/arcgis/jsapi/jsapi/js/dojo/dojox/layout/resources/FloatingPane.css"
Note: If
JSAPI
references are not updated, the application uses the JSAPI hosted by
ArcGIS.com.
External URLs that cannot
be modified
This template uses the Twitter API to display
tweets. Because of this dependency, this template is not supported in a
disconnected environment. Access to Twitter is a requirement for use.
Top


Basic example
Welcome to Snippeter! Snippeter allows you to easily insert snippets at the cursor position of an input element. To enable Snippeter type two # as the start tag.
Advanced example
choose your start tag:
Type your start tag to enable Snippeter.
Complex example
Starttag:
Type your start tag to enable Snippeter.


100ms Flutter SDK 🎉
Here you will find everything you need to build experiences with video using 100ms iOS/Android SDK. Dive into our SDKs, quick starts, add real-time video, voice, and screen sharing to your web and mobile applications.
📲 Download the Sample iOS app here: https://testflight.apple.com/join/Uhzebmut
🤖 Download the Sample Android app here: https://appdistribution.firebase.dev/i/b623e5310929ab70
🏃♀ How to run the Sample App
- In project root, run
flutter pub get
- Change directory to
example
folder, runflutter packages pub run build_runner build --delete-conflicting-outputs
- Run either
flutter build ios
ORflutter build apk
- Finally,
flutter run
🧐 Key Concepts
Room
- A room represents real-time audio, video session, the basic building block of the 100mslive Video SDKTrack
- A track represents either the audio or video that makes up a streamPeer
- A peer represents all participants connected to a room. Peers can be "local" or "remote"Broadcast
- A local peer can send any message/data to all remote peers in the room
Generating Auth Token
Auth Token is used in HMSConfig instance to setup configuration.
So you need to make an HTTP request. you can use any package we are using http
package.
You will get your token endpoint at your 100ms dashboard and append api/token
to that endpoint and make an http post request.
Example:
http.Response response = await http.post(Uri.parse(Constant.getTokenURL),
body: {'room_id': room, 'user_id': user, 'role': Constant.defaultRole});
after generating token parse it using json.
var body = json.decode(response.body);
String token = body['token'];
You will need this token later explained below.
♻ Setup event listeners
100ms SDK provides callbacks to the client app about any change or update happening in the room after a user has joined by implementing HMSUpdateListener
. These updates can be used to render the video on screen or to display other info regarding the room.
abstract class HMSUpdateListener {
/// This will be called on a successful JOIN of the room by the user
///
/// This is the point where applications can stop showing its loading state
/// - Parameter room: the room which was joined
void onJoin({required HMSRoom room});
/// This is called when there is a change in any property of the Room
///
/// - Parameters:
/// - room: the room which was joined
/// - update: the triggered update type. Should be used to perform different UI Actions
void onRoomUpdate({required HMSRoom room, required HMSRoomUpdate update});
/// This will be called whenever there is an update on an existing peer
/// or a new peer got added/existing peer is removed.
///
/// This callback can be used to keep a track of all the peers in the room
/// - Parameters:
/// - peer: the peer who joined/left or was updated
/// - update: the triggered update type. Should be used to perform different UI Actions
void onPeerUpdate({required HMSPeer peer, required HMSPeerUpdate update});
/// This is called when there are updates on an existing track
/// or a new track got added/existing track is removed
///
/// This callback can be used to render the video on screen whenever a track gets added
/// - Parameters:
/// - track: the track which was added, removed or updated
/// - trackUpdate: the triggered update type
/// - peer: the peer for which track was added, removed or updated
void onTrackUpdate(
{required HMSTrack track,
required HMSTrackUpdate trackUpdate,
required HMSPeer peer});
/// This will be called when there is an error in the system
///
/// and SDK has already retried to fix the error
/// - Parameter error: the error that occurred
void onError({required HMSError error});
/// This is called when there is a new broadcast message from any other peer in the room
///
/// This can be used to implement chat is the room
/// - Parameter message: the received broadcast message
void onMessage({required HMSMessage message});
/// This is called when someone asks for change or role
///
/// for eg. admin can ask a peer to become host from guest.
/// this triggers this call on peer's app
void onRoleChangeRequest({required HMSRoleChangeRequest roleChangeRequest});
/// This is called every 1 second with list of active speakers
///
/// A HMSSpeaker object contains -
/// - peerId: the peer identifier of HMSPeer who is speaking
/// - trackId: the track identifier of HMSTrack which is emitting audio
/// - audioLevel: a number within range 1-100 indicating the audio volume
///
/// A peer who is not present in the list indicates that the peer is not speaking
///
/// This can be used to highlight currently speaking peers in the room
/// - Parameter speakers: the list of speakers
void onUpdateSpeakers({required List<HMSSpeaker> updateSpeakers});
void onReconnecting();
void onReconnected();
}
🤔 How to listen to Track, Peer and Room updates?
The HMS SDK sends updates to the application about any change in HMSPeer , HMSTrack or HMSRoom via the callbacks in HMSUpdateListener. Application need to listen to the corresponding updates in onPeerUpdate , onTrackUpdate or onRoomUpdate
The following are the different types of updates that are emitted by the SDK -
HMSPeerUpdate
case PEER_JOINED A new peer joins the room
case PEER_LEFT - An existing peer leaves the room
case BECAME_DOMINANT_SPEAKER - A peer becomes a dominant speaker
case NO_DOMINANT_SPEAKER - There is silence in the room (No speaker is detected)
HMSTrackUpdate
case TRACK_ADDED - A new track is added by a remote peer
case TRACK_REMOVED - An existing track is removed from a remote peer
case TRACK_MUTED - An existing track of a remote peer is muted
case TRACK_UNMUTED - An existing track of a remote peer is unmuted
case TRACK_DESCRIPTION_CHANGED - The optional description of a track of a remote peer is changed
🛤 How to know the type and source of Track?
HMSTrack contain a field called source which denotes the source of the Track. Source can have the following values - regular (normal), screen (for screenshare)and plugin (for plugins)
To know the type of track, check the value of type which would be one of the enum values - AUDIO or VIDEO
🤝 Provide joining configuration
To join a room created by following the steps described in the above section, clients need to create a HMSConfig
instance and use that instance to call join
method of HMSSDK
// Create a new HMSConfig
HMSConfig config = HMSConfig( userId: userId,
roomId: roomId,
authToken: token,
userName: userName);
userId
: should be unique we are using Uuid
package to generate one.
roomId
: id of the room which you want to join.
token
: follow the above step 1 to generate token.
userName
: your name using which you want to join the room.
🙏 Join a room
Use the HMSConfig and HMSUpdateListener instances to call the join method on the instance of HMSSDK created above. Once Join succeeds, all the callbacks keep coming on every change in the room and the app can react accordingly
HMSMeeting meeting = HMSMeeting()
meeting.joinMeeting(config: this.config);
👋 Leave Room
Call the leave method on the HMSSDK instance
meeting.leave() // to leave a room
🙊 Mute/Unmute Local Audio
// Turn on
meeting.switchAudio(isOn:true)
// Turn off
meeting.switchAudio(isOn:false)
🙈 Mute/Unmute Local Video
meeting.startCapturing()
meeting.stopCapturing()
meeting.switchCamera()
🛤 HMSTracks Explained
HMSTrack
is the super-class of all the tracks that are used inside HMSSDK
. Its hierarchy looks like this -
HMSTrack
- AudioTrack
- LocalAudioTrack
- RemoteAudioTrack
- VideoTrack
- LocalVideoTrack
- RemoteVideoTrack
🎞 Display a Track
To display a video track, first get the HMSVideoTrack
& pass it on to HMSVideoView
using setVideoTrack
function. Ensure to attach the HMSVideoView
to your UI hierarchy.
VideoView(
track: videoTrack,
args: {
'height': customHeight,
'width': customWidth,
},
);
Change a Role
To change role, you will provide peerId of selected peer and new roleName from roles. If forceChange is true, the system will prompt user for the change. If forceChange is false, user will get a prompt to accept/reject the role. After changeRole is called, HMSUpdateListener's onRoleChangeRequest will be called on selected user's end.
meeting.changeRole(
peerId: peerId, roleName: roleName, forceChange: forceChange);
📨 Chat Messaging
You can send a chat or any other kind of message from local peer to all remote peers in the room.
To send a message first create an instance of HMSMessage
object.
Add the information to be sent in the message
property of HMSMessage
.
Then use the Future<void> sendMessage(String message)
function on instance of HMSMeeting.
When you(the local peer) receives a message from others(any remote peer), void onMessage({required HMSMessage message})
function of HMSUpdateListener
is invoked.
// following is an example implementation of chat messaging
// to send a broadcast message
String message = 'Hello World!'
meeting.sendMessage(message); // meeting is an instance of `HMSMeeting` object
// receiving messages
// the object conforming to `HMSUpdateListener` will be invoked with `on(message: HMSMessage)`, add your logic to update Chat UI within this listener
void onMessage({required HMSMessage message}){
let messageReceived = message.message // extract message payload from `HMSMessage` object that is received
// update your Chat UI with the messageReceived
}
🏃♀ Checkout the sample implementation in the Example app folder.
🎞 Preview
You can use our preview feature to unmute/mute audio/video before joining the room.
You can implement your own preview listener using this abstract class HMSPreviewListener
abstract class HMSPreviewListener {
//you will get all error updates here
void onError({required HMSError error});
//here you will get room instance where you are going to join and your own local tracks to render the video by checking the type of trackKind and then using the
//above mentioned VideoView widget
void onPreview({required HMSRoom room, required List<HMSTrack> localTracks});
}
🚂 Setup Guide
-
Sign up on https://dashboard.100ms.live/register & visit the Developer tab to access your credentials.
-
Get familiarized with Tokens & Security here
-
Complete the steps in Auth Token Quick Start Guide
-
Get the HMSSDK via pub.dev. Add the
hmssdk_flutter
to your pubspec.yaml
Android Integration
Add following permissions in Android AndroidManifest.xml file
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
☝ Pre-requisites
- Support for Android API level 24 or higher
- Support for Java 8
📱 Supported Devices
The Android SDK supports Android API level 21 and higher. It is built for armeabi-v7a, arm64-v8a, x86, and x86_64 architectures.
iOS Integration
Add following permissions in iOS Info.plist file
<key>NSMicrophoneUsageDescription</key>
<string>{YourAppName} wants to use your microphone</string>
<key>NSCameraUsageDescription</key>
<string>{YourAppName} wants to use your camera</string>
<key>NSLocalNetworkUsageDescription</key>
<string>{YourAppName} App wants to use your local network</string>


If you notice that the information above is not correct, please contact HCOD.
The overview of your experiences will be the combination of experiences outside of and within IIT
sorted by date, showing the latest/most recent experience on top. The order of this list will also updated when saving.>


This is a simple front-end webapp demostrating Agave's support for running Docker compute containers.
This demo is meant for evaluation purposes, kicking the tires, taking it for a spin around the block,
trying it on for size.
See how I didn't use the words production,
real work, mission critical, etc. That's
because this demo is backed by a enough compute power to get you around the block one or two times. Trying
to do much more than that will cause the server to get very sad at you and, more than likely, pack up
its containers and go home.
Not to worry, though. Stick to the happy path of this demo and you'll get a good idea of how easy it can
be to run Docker containers with Agave. Once you're ready to take on something a bit meatier, you can point
Agave at your own Docker host(s) and cut loose.
Getting started
To use this webapp:
- Login so you can access your apps and data.
- Select the compute container you want to run
- Fill in the job request form
- Specify your data.
- Press sumbit to run your job
- Monitor the progress in the right pane
Further reading
For more information about accessing your own systems with Agave, please visit the App Management Tutorial on the Agave Developer's site.
For more information about Reproducible Science with Agave and Docker, please visit the Agave blog
Open Source
You can download the full source code for this example app and client application from the Agave Docker Runner Webapp Demo Github repository. You can also
view the live app on the github pages site.


We expect you to prioritise collective learning over personal goals.
We want the tech industry to be a place where people from all backgrounds can thrive.
We provide digital solutions to non-profits through our Tech for Better programme.
18:30 - 20:30*
Tech for Better projects
Mentoring abroad
Course facilitation


I came to Chicago to matriculate at the University of Chicago. I swam breaststoke for the swim team my first year and fell in love with the city. (The actions were unrelated in every way but temporarily.) I was and am fascinated by the Enlightenment, so I studied history, and wrote my thesis on the English Revolution of 1689. After graduating, I worked full-time in legal support for two years. There I discovered the joy of automating a small task, and was obsessed with figuring out exactly what I could make that machine do.
I quit my job to teach myself Python, and I quit teaching myself Python to do Dev Bootcamp, starting in February 2016. When I'm not working, I can be found doing pilates and reading books.


Road accident claims 12 lives in Niger
by Agency ReportThe Federal Road Safety Corps (FRSC) in Niger said that 12 people were killed in an accident on Friday in Gwacipe village of Gurara Local Government Area of the state.
FRSC Sector Commander, Joel Dagwa, told News Agency of Nigeria (NAN) on Friday in Minna that the accident involved a DAF trailer with registration number KMW 08 AX and Toyota Hiace with registration number SSU 08 XA.
“The accident involved 25 people, 12 of them were killed while nine sustained injuries and taken to the Federal Medical Centre, Gawu for treatment.
“All corpses have been deposited at the hospital,” he said.
READ ALSO: APC headquarters approves six aspirants for Bayelsa governorship primary
The sector commander attributed the cause of the accident to speeding and dangerous overtaking.
He said that the Corps would continue to monitor road users to guard against overloading and dangerous driving.
He appealed to road users to obey traffic rules and regulations to avoid crashes. (NAN)


--- layout: category title: Projects description: List of all my projects. category: projects permalink: /projects/ ---
Fun projects I've worked on so far.


Noah Kittleson - Portfolio
Hello, my name is Noah Kittleson and I am a recently enrolled student at Epicodus. I have made this page to display my many talents (particularly those pertaining to programming). Anyway I don't really have much to actually say in this paragraph so here is some Latin to fill up the space in this section just a little bit:
Semper Ubi Sub Ubi .Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
About Me
Experience
For the past year I have been teaching myself programming through working on various different projects. I have worked mosty with C++ and a library called SFML that is aimed at simple implementation of multimedia components like audio and video rendering. To a lesser extent I also experimented around with Java and Python to see if the grass truly was greener on the other side (it was not, C++ remains my favorite language). Recently I have enrolled at the Epicodus school in Portland where I am learning HTML, CSS, and Bootstrap, as well as many more things to come! OH, and did I mention that Latin is great for filler text?
Semper Ubi Sub Ubi .Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Interests
When I am not writing code I enjoy playing games, both of the video and board variety. Here is a list of my top five video games:
- Dark Souls
- Metal Gear Solid 3: Snake Eater
- Super Smash Bros
- Gone Home
- Her Story
And Here is a list of my top five board games:
- Galaxy Trucker
- Arkham Horror
- Diplomacy
- Arabian Nights
- Ticket to Ride
I also love to read books. Here are the last 5 books that I read (ranking my top five favorite books is too hard):
- Johnathon Strange and Mr Norrell by Susanna Clarke
- The Ladies of Grace Adieu by Susanna Clarke
- The Thirteen and a Half Lives of Captian Bluebear by Walter Moers
- Seven Gothic Tales by Isak Dinesen
- My Abandonment by Peter Rock
Oh, and also if you couldn't guess by the Imperial logo at the top of the page I am way into Star Wars.


Python Training Agenda
This document provides an agenda for a four-day course in beginning
Python programming.
Day 1 AM:
- Introductions, administrative matters.
- Agenda and outline of the course. Goals for the course.
- Introduction to Python: (1) description of Python; (2) comparison
and differences between Python and other scripting languages (Perl,
Tcl, etc); (3) comparison with other languages (C, C++, Java, etc);
(4) comparison of Python and Jython.
- Guidance to available on-line resources: http:/www.python.org, the
standard Python documentation, SIGs (special interest groups), etc.
- Lexical matters: (1) variables and names, (2) line structure, (3)
comments, (4) block structure, (5) operators.
Day 1 PM:
- Preview of Python execution model: (1) how Python evaluates
and runs code; (2) the Python object model.
- Preview of selected statements, for example assignment, print, and
for statements.
- Built-in data types and operations on built-in types: numerical
types, lists/arrays, dictionaries, strings, etc.
- Practical exercises: (1) creating and using tuples and lists; (2)
creating and using dictionaries; (3) creating strings, string
operations, and formatting strings.
Day 2 AM:
- Built-in data types, continued.
- Introduction to structured Python: (1) functions, (2) classes,
(3) modules, (4) packages.
- Practical exercises: (1) functions; (2) simple classes; (3)
modules.
- Python statements: (1) assignment, (2) import, (3) print,
(4) if-then-else.
Day 2 PM:
- Python statements, continued: (1) for; (2) while; (3) continue and
break; (4) try-except; (5) raise.
- Practical exercises -- statements.
Day 3 AM:
- Statements continued: (1) del, (2) exec and eval().
- Structured Python -- functions.
- Practical exercises: statements and functions.
Day 3 PM:
- Structured Python, continued -- Object-oriented programming,
classes, and instances.
- More structured Python -- modules and packages.
- Review of Python execution model.
- Iterators and generators.
- Practical exercises: (1) functions; (2) classes and object-oriented
programming; (3) iterators and generators.
Day 4 AM:
- Object-oriented Python -- Implementing and using classes.
- The Python standard libraries -- A review of some significant
modules.
- Practical exercises -- Using the Python standard library.
Day 4 PM:
- Advanced topics -- (1) Embedded Python. (2) Extended Python;
extending Python in other languages (SWIG, Pyrex, etc). Comparison
with equivalent tasks for Jython.
- Practical exercises: (1) functions; (2) classes; (3) modules.
- Practical exercises -- Application related tasks and problems
suggested by class members. Possible topics: (1) XML processing in
Python; (2) database access with Python; (3) more text processing;
(4) etc.


Breadth First search is known as an uninformed search because it does not use any information about how far the robot has traveled or how far the robot is from the goal. BFS begins at the starting position of the robot (root node) and begins looking for the goal by expanding all of the successors of the root node. If those successors are not the goal, then BFS expands each of those nodes, and this loop continues until the goal node is reached. During the implementation of the algorithm we keep track of the nodes by maintaining a queue.
Depth first search is the complement to breadth first search. It is also an uninformed search method. Starting from the root node it expands all the successors of the start node same as BFS. However after the first node, DFS always expands the last successor added.If DFS gets to a point where it can not find any more successors for the node it is currently expanding, it will then move to the newest discovered node that hasn’t been expanded. The stack data structure is used during implementation to maintain the Last In First Out order for nodes.
A* is like Dijkstra’s Algorithm in that it can be used to find a shortest path. A* is like Greedy Best-First-Search in that it can use a heuristic to guide itself. It combines the pieces of information that Dijkstra’s Algorithm uses (favoring vertices that are close to the starting point) and information that Greedy Best-First-Search uses (favoring vertices that are close to the goal). The heuristic followed by A* balances between the exact cost of the node from the start and the estimated cost of the node to the goal to optimize the final path.
The Greedy Best-First-Search algorithm works by visiting vertices in the graph starting with the object’s starting point following some estimate (called a heuristic) of how far from the goal any vertex is. Instead of selecting the vertex closest to the starting point, it selects the vertex closest to the goal. Greedy Best-First-Search is not guaranteed to find a shortest path.
We observe that A* and BFS obtain the optimal path in all map scenarios. While, both A* and BFS have very high space complexity, A-star is more streamlined due to its heuristic. DFS has low space complexity and computation cost but it tends to result in suboptimal pathing. Greedy best first guided by its goal oriented heuristic tends to be fastest when goal is present in direct line of sight of the start but ends up being suboptimal otherwise.
| 'empty' map | 'misc' map | 'narrow1' map | 'narrow2' map | 'three-sections' map | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Search Iterations | Path Length | Search Iterations | Path Length | Search Iterations | Path Length | Search Iterations | Path Length | Search Iterations | Path Length | |
| Breadth First Search | 3501 | 8.00 | 3235 | 9.80 | 1567 | 8.00 | 2094 | 11.40 | 3165 | 14.20 |
| Depth First Search | 1782 | 130.40 | 2289 | 98.20 | 1293 | 76.20 | 1181 | 65.00 | 1629 | 98.00 |
| A-star Search | 2240 | 8.00 | 2692 | 9.80 | 932 | 8.00 | 1528 | 11.40 | 2414 | 14.20 |
| Greedy Best First Search | 81 | 8.00 | 2074 | 17.80 | 81 | 8.00 | 138 | 11.40 | 906 | 14.20 |


FAQ¶
Here are some commonly raised questions from users of ONNX Runtime and brought up in Issues.
Do the GPU builds support quantized models?¶
The default CUDA build supports 3 standard quantization operators: QuantizeLinear, DequantizeLinear, and MatMulInteger. The TensorRT EP has limited support for INT8 quantized ops. In general, support of quantized models through ORT is continuing to expand on a model-driven basis. For performance improvements, quantization is not always required, and we suggest trying alternative strategies to performance tune before determining that quantization is necessary.
How do I change the severity level of the default logger to something other than the default (WARNING)?¶
Setting the severity level to VERBOSE is most useful when debugging errors.
Refer to the API documentation:
Python - RunOptions.log_severity_level
import onnxruntime as ort
ort.set_default_logger_severity(0)
C - SetSessionLogSeverityLevel
How do I load and run models that have multiple inputs and outputs using the C/C++ API?¶
See an example from the ‘override initializer’ test in test_inference.cc that has 3 inputs and 3 outputs.
std::vector<Ort::Value> ort_inputs;
ort_inputs.push_back(std::move(label_input_tensor));
ort_inputs.push_back(std::move(f2_input_tensor));
ort_inputs.push_back(std::move(f11_input_tensor));
std::vector<const char*> input_names = {"Label", "F2", "F1"};
const char* const output_names[] = {"Label0", "F20", "F11"};
std::vector<Ort::Value> ort_outputs = session.Run(Ort::RunOptions{nullptr}, input_names.data(),
ort_inputs.data(), ort_inputs.size(), output_names, countof(output_names));
How do I force single threaded execution mode in ORT? By default, session.run() uses all the computer’s cores.¶
To limit use to a single thread only:
If built with OpenMP, set the environment variable OMP_NUM_THREADS to 1. The default inter_op_num_threads in session options is already 1.
If not built with OpenMP, set the session options intra_op_num_threads to 1. Do not change the default inter_op_num_threads (1).
It’s recommended to build onnxruntime without openmp if you only need single threaded execution.
This is supported in ONNX Runtime v1.3.0+
Python example:
#!/usr/bin/python3
os.environ["OMP_NUM_THREADS"] = "1"
import onnxruntime
opts = onnxruntime.SessionOptions()
opts.inter_op_num_threads = 1
opts.execution_mode = onnxruntime.ExecutionMode.ORT_SEQUENTIAL
ort_session = onnxruntime.InferenceSession('/path/to/model.onnx', sess_options=opts)
C++ example:
// initialize enviroment...one enviroment per process
Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "test");
// initialize session options if needed
Ort::SessionOptions session_options;
session_options.SetInterOpNumThreads(1);
#ifdef _WIN32
const wchar_t* model_path = L"squeezenet.onnx";
#else
const char* model_path = "squeezenet.onnx";
#endif
Ort::Session session(env, model_path, session_options);


{{$LocalTimestamp}}
{{#if_eq $EventType "$A1E77000"}} Alert condition {{Condition}} detected on {{DashboardTitle}}/{{ChartTitle}}
Explore detected results in Seq
Query - [ ]
{{Query}}
Measurement window
Suppression time
Detected range start
Detected range end
Signal {{#if SignalTitles}}
Owner
Error {{#each Errors}}
Results {{#each Results}}
{{#each $Properties}}
** {{@key}} ** {{pretty this}}
{{/each}} {{#if $Exception}} Exception
{{$Exception}}
{{/if}} {{/if_eq}}
Sent by Seq installed at <{{$ServerUri}}>.


---
layout: post
tag: Algorithm
excerpt: Maximum Matching problem is interesting and maximum bipartite problem is relatively easy to tackle with. Matching a couple of single women and single men is actually a bipartite matching problem!
---
Matching
Maximum Matching
Use greedy algorthim, we can find a maximal matching, denote it as \(M\). If the maximum matching is \(M^*\), then \(|M| \ge \frac{1}{2} |M^*|\).
If \(A\) and \(B\) are two maximal matching, then \(|A| \ge \frac{1}{2} |B|\) and \(|B| \ge \frac{1}{2} |A|\).
Consider \(A\backslash B\) and \(B \backslash A\). For \(\forall e \in B \backslash A\), it can be adjacent to at most 2 edges in \(A \backslash B\) (at the two ends) as \(A\) is a matching. For \(\forall u \in A\backslash B\), there are three cases:
- \(u\) has no adjacent edges in \(G\). This means it should appear in both \(A\) and \(B\) \(\Rightarrow\) contradiction.
- \(u\) has at least one adjacent edge in \(B \backslash A\).
- \(u\) has adjacent edges, none of which is in \(B \backslash A\). Then \(u + B\) is still a matching, with cardinality larger than \(B\) \(\Rightarrow\) contradiction.
Thus for \(\forall u \in A\backslash B\), it should be adjacent to some edge in \(B\backslash A\). Then we have
\[
\begin{gathered}
|A \backslash B| \le 2 |B \backslash A| \\
|A| = |A \backslash B| + |A \cap B| \le 2 |B \backslash A| + 2|B \cap A| = 2 |B|
\end{gathered}
\]
Augmenting Path Algorithm
Augmenting path algorithm can be used to find maximum matching (weighted/unweighted) in a bipartite graph. The same idea extends to a general graph. See this post for details.
Maximum Matching in Bipartite Graph
Both Augmenting Path Algorithm and Max Flow Algorithm can be used to find maximum matching in a bipartite graph. We can actually describe this problem in the form of optimization problem.
\[
\begin{split}
\max\text{ } &{\mathbf{1}^T x} \\
\text{s.t. } &Ax \le \mathbf{1}\\
&x \in \{0, 1\}
\end{split}
\]
where \(A\) is the node-edge incidence matrix and \(x\) is the indicate vector of dimension \(m\).
This is an Integer Programming Problem and NP hard. However, when the constraint \(A\) is Totally Unimodular , we can solve it just as a Linear Programming Problem.
Cycle Cover and Minimum Weight Perfect Matching
A perfect matching is a matching which matches all vertices of the graph. That is, every vertex of the graph is incident to exactly one edge of the matching. The mini-weight perfect matching problem can be solved in polynomial time.
minimum weight cycle cover of a graph: Let \(H = (V, E)\) be a directed graph with non-negative arc weights given by \(w: E \rightarrow R ^+\).
We wish to find a minimum weight collection of vertex-disjoint directed cycles in \(H\) such that every vertex is in exactly one of those cycles. We need this to give an approximation algo to the Asymmetric Traveling Salesman Problem (ATSP). For ATSP, there always exists a cycle cover, but for a general graph, there might be no cycle cover.
For each node \(v \in V\), split it into \(v^+\) and \(v^-\), where \(v^+\) is the 'in-node' and \(v^-\) is the 'out-node'. Connect the edges accordingly and note that there is no edge between in-nodes and out-nodes. Thus, we actually get a bipartite graph. Now we can add a source node \(s\) and a sink node \(t\). Connect \(s\) to all 'out-nodes' and connect \(t\) to all 'in-nodes'. If we want to determine if there is a cycle cover, we can set all the capacity to 1 and run Max Flow on the graph. If the max flow equals \(n\), then there is a cycle cover. If we want to find the minimum cycle cover, we can either run Minimum Perfect Matching on the graph (without the source and sink nodes) or run Max Flow with modified capacity.
References


LDD Release Process¶
When a Local Data Dictionary (LDD) Steward is ready to submit a new version of an LDD for release you have two options:
Release Timeframe¶
Nominal Release with PDS4 Information Model¶
By default, all Discipline LDDs will be built at the time of PDS4 IM Release. See the PDS4 Build Schedule for more details on the timing of those builds.
Off-Nominal Release¶
Note
Please try to avoid this wherever possible. In order to minimize overhead of manual processing of LDDs, please coordinate with data providers to stick to the PDS4 Build Schedule wherever posisble.
At any time, you can direct providers to the build/development directory of your LDD repository in order for them to have immediate access to the dictionaries for development and testing purposes.
If an immediate bug fix and release is needed off PDS4 Build cycle, see the Preparing a Release for instructions for how to tag a release.
Preparing a Release¶
(preferred) Tag a Release In Github¶
Add your IngestLDD to the
src/
directory in your repoCreate a branch with
release
in the name, e.g.release/<IP_ADDRESS>
Add your changes to the branch, commit, and push to Github. If you do not have any changes to commit, you can perform an empty commit via the command-line (not sure how to do this via Github Desktop). For example:
git commit --allow-empty -m "Prep for tagging release"
Push your new branch to Github
Create a Pull Request for your branch.
Optional: monitor the generation of the dictionaries via the
Actions
tab in your Github repository.Once the build completes, you should see the new LDD auto-generated (after ~2-3 minutes) in both the
build/development
andbuild/release
directories.Once you get approval from the appropriate stakeholders, merge your pull request.
You should then see a new release tagged in your repo in a URL like https://github.com/pds-data-dictionaries/ldd-img/releases
Then move on to Submit Release Request below to submit ticket to the EN Operations Github repo.
Submit Manually¶
If you are unable to submit to Github, see Submit Release Request to upload a zip of your generated artifacts.
Reviewing a Staged Release¶
See the Review a Pull Request How-to


Recent Reviews
Featured Articles
Supergirl hitting TV soon. Get a look at the first images.
2.25.15
Spider-Man in the MCU
It may have taken forever, but Sony and Marvel finally come to terms on use of the Spider-Man character in the MCU.
2.25.15
Spider-Man in the MCU
It may have taken forever, but Sony and Marvel finally come to terms on use of the Spider-Man character in the MCU.


Head office Address: 8 king street, Melbourne 89 AUS Phone: +22 6 4567 8900
Sub office Address: 8 queen street, California 89 USA Phone: +22 6 4567 8900