Toggle navigation
Menu
Home
About
Information
Resources
Stories
Contact
Contact Us
Have questions or comments?
Send us a message!
Have an empowering t-shirt design? Submit it
here
! We will feature your name and design. Shirts will be sold for $12.50 and proceeds will be donated to National Eating Disorder Association.


You are not subscribed to Mycroft's membership program.
If would like to become a member, select one of the below options. Supporting Mycroft with a membership helps keep Mycroft's services open and available.
Proudly supporting Mycroft for {{accountMembership.duration}}!
Thank you for supporting Mycroft with your membership!
You can cancel your membership at any time. You can also update your credit card information.


Tim Bergling (Avicii)
A dance music icon
Avicii performing during a Vegas residency
Avicii's Iconic Songs
2010:
Seek Bromance
2011:
Levels
2012:
I Could Be The One
2013:
Wake Me Up
2014:
The Days
2015:
Waiting For Love
2017:
Lonely Together


Integrate with a directory server such as Active Directory or LDAP using the LDAP protocol. Users in LDAP can be mapped to Full-Admin / Read-Only Admin in Couchbase.
User {{ldapCtl.validateResult.test.username}} has {{ldapCtl.validateResult.role | formatRoleMessage}} access but it is recognized not via LDAP


Technical blog from Craig Russell.
Kotlin coroutines provide an elegant way to write asynchronous code, but sometimes coroutines make it difficult to write unit tests.
This post describes how to use TestCoroutineDispatcher
to write efficient and stable unit tests for code written with coroutines.
A new recommended way to test coroutines now exists. See Testing Coroutines using runTest for more info on the latest recommended practices for testing coroutines.
In order to reliably unit test a suspend
function written with Kotlin Coroutines, there are a few things we need to know.
At a minimum, we need to know how to build a coroutine from our unit tests and how to make our unit tests wait until all the jobs in the coroutine have finished.
Ideally beyond that, we will want to know how to make our unit test run as fast as possible, and not sit around waiting for a coroutine delay
to finish.
This post will describe how to achieve this so you can quickly and reliably unit test suspend
functions.
We are going to use the kotlinx-coroutines-test
library, so we’ll need to add that to our dependendies in build.gradle
.
ext {
coroutines = "1.3.1"
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
// testImplementation for pure JVM unit tests
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
// androidTestImplementation for Android instrumentation tests
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
}
Add the following class to your project - it can be included alongside your unit tests.
@ExperimentalCoroutinesApi
class CoroutineTestRule(val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()) : TestWatcher() {
override fun starting(description: Description?) {
super.starting(description)
Dispatchers.setMain(testDispatcher)
}
override fun finished(description: Description?) {
super.finished(description)
Dispatchers.resetMain()
testDispatcher.cleanupTestCoroutines()
}
}
This class is a unit test rule which watches for tests starting and finishing. It contains a reference to a TestCoroutineDispatcher
, and as tests are starting and stopping it overrides the default Dispatchers.Main
dispatcher and replaces the default with our test dispatcher.
Apply the unit test rule to your unit test class.
@ExperimentalCoroutinesApi
class HeavyWorkerTest {
@get:Rule
var coroutinesTestRule = CoroutineTestRule()
// todo - write some tests
}
With that setup done, we’re now ready to proceed.
Let’s take the following HeavyWorker
class as an example. It has a heavyOperation()
function which is suspendable
. Our goal here is to write unit tests for it that are stable and run as quickly as possible.
class HeavyWorker {
suspend fun heavyOperation(): Long {
return withContext(Dispatchers.Default) {
return@withContext doHardMaths()
}
}
// waste some CPU cycles
private fun doHardMaths(): Long {
var count = 0.0
for (i in 1..100_000_000) {
count += sqrt(i.toDouble())
}
return count.toLong()
}
}
There are multiple approaches to unit testing a suspend
function. But crucially, since you are calling a suspend
function, you’ll need to use a coroutine builder. There’s a few to choose from:
kotlinx.coroutines.runBlocking
❌kotlinx.coroutines.test.runBlockingTest
❌kotlinx.coroutines.test.TestCoroutineDispatcher.runBlockingTest
✅🤔 If you’re looking at the three options and wondering why they have such similar names, what the differences are and why they don’t all work, I don’t blame you. It’s confusing! And worse still, some will work for some suspend
functions but not for others.
Let’s go through each in turn and highlight the problem with that approach before finally explaining why the TestCoroutineDispatcher.runBlockingTest
approach is a good one.
runBlocking
❌
@Test
fun useRunBlocking() = runBlocking<Unit> {
val heavyWorker = HeavyWorker()
val expected =<PHONE_NUMBER>66
val result = heavyWorker.heavyOperation()
assertEquals(expected, result)
}
In this example, even with the long operation, the unit test will patiently wait for the coroutine’s completion before successfully passing. Depending on your hardware, this might take a few seconds to complete.
But crucially, it does pass. 🎉
OK, that was too easy. Let’s make things a bit trickier and see where runBlocking
begins to fail us. Let’s see what happens if the heavy worker code had reason to delay()
for 30 seconds during its execution.
suspend fun heavyOperation(): Long {
return withContext(Dispatchers.Default) {
delay(30_000)
return@withContext doHardMaths()
}
}
In this case, runBlocking<Unit>
waits for the entirety of the delay
period, meaning your unit test takes an additional 30s to run on top of the time it actually takes to crunch the numbers.
@Test
fun useRunBlockingTest() = runBlockingTest {
val heavyWorker = HeavyWorker()
val expected =<PHONE_NUMBER>66
val result = heavyWorker.heavyOperation()
assertEquals(expected, result)
}
runBlockingTest
was introduced as a newer coroutine builder than runBlocking
, specifically to help improve in areas such as not having to wait for the full delay
period. Other features listed:
This is all sounding really great, and likely to improve some areas of testing massively. However, it doesn’t work for this code 😢
Specifically, the test will fail with the following reason:
java.lang.IllegalStateException: This job has not completed yet
at kotlinx.coroutines.JobSupport.getCompletionExceptionOrNull(JobSupport.kt:1128)
at kotlinx.coroutines.test.TestBuildersKt.runBlockingTest(TestBuilders.kt:53)
at kotlinx.coroutines.test.TestBuildersKt.runBlockingTest$default(TestBuilders.kt:45)
at com.cdrussell.coroutines.testing.HeavyWorkerTest.useRunBlockingTest(HeavyWorkerTest.kt:25)
...
runBlockingTest
is smart enough to realise that you have a job started during your unit testing and that it hasn’t finished yet.
The fact that the unit test finishes before the invoked Job
finishes is bad. Your unit test which was stable albeit a bit slow using runBlocking
now breaks. That’s not much of an improvement 😞.
This feels like it should work, and I don’t know why it doesn’t. Maybe it’s a bug in the current implementation of runBlockingTest
. Maybe I’m trying to get it to do do something it isn’t designed to do. I’ve reached out to some folks who are building this to clarify.
UPDATE:
Manuel confirmed that the above example should work, and indeed, runBlockingTest
should work in all cases where you currently use runBlocking
.
The expectation is right, it should work. There's an open issue about this: https://t.co/HGDX9XM3NB
— Manuel Vivo (@manuelvicnt) November 11, 2019
You'd still need to inject a TCD if a new coroutine gets created in code under test. Moving to a different thread (e.g. using `withContext` in a suspend fun) should pass.
— Manuel Vivo (@manuelvicnt) November 11, 2019
Basically, it should work for all those cases you currently use `runBlocking`.
Injecting dispatchers shouldn’t be required for this scenario; runBlockingTest
should work on its own. However, injecting dispatchers will still be required when calling a function which launches a coroutine; there will be a follow-up blog post on testing this scenario.
So watch https://github.com/Kotlin/kotlinx.coroutines/issues/1204 for updates on when that is resolved.
This approach is very similar to the one we just tried (and failed) to use, but with a crucial difference; we’ll provide alternative coroutine dispatchers when running in a unit test to those we’d use in production.
And after providing an alternative coroutine dispatcher, used only when unit testing, we’ll make use of the dispatcher’s runBlockingTest
builder.
Let’s see what’s required.
The conclusion I’ve drawn is that we need to inject our dispatchers. I tried to find alternatives to doing this, as I don’t love having to inject dispatchers into production code, but I can’t find an alternative; it seems necessary.
And it seems Sean McQuillan and Manuel Vivo agree ☝; this was taken from their 2019 Android Dev Summit talk “Testing Coroutines on Android”
What does it mean to inject our dispatchers? Let’s revisit our production code.
suspend fun heavyOperation(): Long {
return withContext(Dispatchers.Default) {
return@withContext doHardMaths()
}
}
We have a hardcoded dispatcher here, Dispatchers.Default
, which cannot be changed. We cannot provide an alternative dispatcher under any condition, not even when unit testing. And it turns out that providing an alternative dispatcher during unit testing is exactly what we need.
In order to change the dispatcher that is used when unit testing, we need a way to inject the dispatcher into our HeavyWorker
production class.
In the example above, we used Dispatchers.Default
but we know there are other common dispatchers that we might encounter. As such, let’s define an interface which will allow classes to obtain whichever dispatcher they require.
interface DispatcherProvider {
fun main(): CoroutineDispatcher = Dispatchers.Main
fun default(): CoroutineDispatcher = Dispatchers.Default
fun io(): CoroutineDispatcher = Dispatchers.IO
fun unconfined(): CoroutineDispatcher = Dispatchers.Unconfined
}
class DefaultDispatcherProvider : DispatcherProvider
We define the interface and provide functions for the dispatchers, each of which have a default implementation.
main()
–> Dispatchers.Main
,default()
–> Dispatchers.Default
,io()
–> Dispatchers.IO
unconfined()
–> Dispatchers.Unconfined
Additionally, we define a DefaultDispatcherProvider
default implementation of the interface; this is what we’ll use in our production code.
In production, we’ll always use this default dispatcher provider, which will always result in using Dispatchers.Main
, Dispatchers.IO
etc…, and the production behavior will be as it always was.
In unit testing, however, we will not use this default dispatcher provider; we will provide an alternative version.
Now that we have interface defined, we need to modify HeavyWorker
class to make use of the interface instead of fetching the dispatchers in its current hardcoded fashion. To do this, we can inject the interface into the constructor.
class HeavyWorker(private val dispatchers: DispatcherProvider = DefaultDispatcherProvider()) {
suspend fun heavyOperation(): Long {
return withContext(dispatchers.default()) {
delay(30_000)
return@withContext doHardMaths()
}
}
}
Since you are specifying the default implementation of the provider should be used in production, you never have to actually pass a parameter when instantiating this class in production. HeavyWorker()
is still a valid way to construct the class, just as it was before.
We no longer hardcode dispatchers to use Dispatchers.Default
and instead use the provided dispatchers.default()
. To be clear, the production behaviour here would use DefaultDispatcherProvider
by default, and therefore no behavioural changes have happened in production 😌.
We now define an alternative dispatcher provider that we’ll use during unit testing.
val testDispatcherProvider = object : DispatcherProvider {
override fun default(): CoroutineDispatcher = testDispatcher
override fun io(): CoroutineDispatcher = testDispatcher
override fun main(): CoroutineDispatcher = testDispatcher
override fun unconfined(): CoroutineDispatcher = testDispatcher
}
You can define this wherever you like so long as it has access to the test dispatcher, but I chose to add it inside the CoroutineTestRule
itself.
@ExperimentalCoroutinesApi
class CoroutineTestRule(val testDispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()) : TestWatcher() {
val testDispatcherProvider = object : DispatcherProvider {
override fun default(): CoroutineDispatcher = testDispatcher
override fun io(): CoroutineDispatcher = testDispatcher
override fun main(): CoroutineDispatcher = testDispatcher
override fun unconfined(): CoroutineDispatcher = testDispatcher
}
override fun starting(description: Description?) {
super.starting(description)
Dispatchers.setMain(testDispatcher)
}
override fun finished(description: Description?) {
super.finished(description)
Dispatchers.resetMain()
testDispatcher.cleanupTestCoroutines()
}
}
@ExperimentalCoroutinesApi
class HeavyWorkerTest {
@get:Rule
var coroutinesTestRule = CoroutineTestRule()
@Test
fun useTestCoroutineDispatcherRunBlockingTest() = coroutinesTestRule.testDispatcher.runBlockingTest {
val heavyWorker = HeavyWorker(coroutinesTestRule.testDispatcherProvider)
val expected =<PHONE_NUMBER>66
val result = heavyWorker.heavyOperation()
assertEquals(expected, result)
}
}
Note:
runBlockingTest
that we obtain from the TestCoroutineDispatcher
, which is inside the CoroutineTestRule
.testDispatcherProvider
from inside the CoroutineTestRule
to the HeavyWorker
’s constructor.Using TestCoroutineDispatcher.runBlockingTest
as our coroutine builder, and injecting the test dispatcher, allows us full control over the coroutine jobs created when unit testing.
It allows us to achieve the reliability we need, combined with the speed in not having to wait for delays to end.
In this post, we saw how to write a reliable and fast unit test for code which uses Kotlin coroutines; specifically, how to unit test a suspend
function.
We saw that:
runBlocking
worked for us, but could result in slow tests.runBlockingTest
didn’t work at all.TestCoroutineDispatcher.runBlockingTest
worked, so long as we can inject coroutine dispatchers to our class under test.


string convert_uuencode ( string $data )
convert_uuencode() encodes a string using the uuencode algorithm. Uuencode translates all strings (including binary's ones) into printable characters, making them safe for network transmissions. Uuencoded data is about 35% larger than the original.
Returns the uuencoded data.


Chapter 1 PS 3, Chapter 5 Solutions
1.0.1 5.1
Ed can purchase water in a 0.75 liter and 2 liter bottle. He regards the two goods as perfect substitutes.
a.) Assuming Ed’s utility depends on the quantity of water consumed, express the utility function in terms of quantities of 0.75L containers (x) and 2L containers (y).
\[x=\frac{3}{4}L\] \[L=\frac{4}{3}x\]
so, \[\frac{y}{2}=\frac{4}{3}x\]
\[\frac{3}{8}y=x\] so, \[u= x+ \frac{3}{8}y\]That is that x little bottles contributes the same to utility as 3/8 of a big bottle.
(insert figure 1 here)
b.) State Ed’s demand function for x in terms of \(p_x, p_y,\) and I.
\(x=\frac{I}{p_x}\) if \(p_x\leq\frac{8}{3}p_y\)If the price of the little bottle is less than \(\frac{8}{3}\) the price of the big bottle, he should buy all little bottles.
c.) Graph the demand curve for x, holding I and p_y constant.
insert figure 2 here
d.) How do changes in I and \(p_y\) shift the demand curve for x?
insert figure 3
1.0.2 5.2
David receives only $3 a week and cares only about a particular sandwich bundle that is peanut butter and jelly. He uses exactly 1 oz of jelly and 2 oz of peanut butter for each sandwich.
a.) How much peanut butter and jelly will David buy with his $3 allowance in a week?
\[$Sandwhich=.05\times{2} + .1\times{1}\] \[=.1+.1\] \[=$.20\] \[\frac{$3}{$.20}=15 sandwiches\]
Davide will buy 15 oz jelly and 30 oz peanut butter in a week.
b.) Suppose the price of jelly were to rise to $0.15 an oz. How much of each commodity will be bought?
\[$Sandwich=.05\times2+.15\times1\] \[=$.25\] \[\frac{$3}{$.25}= 12 Sandwiches\]
David will buy 12 oz of jelly and 24 oz of peanut butter.
c.) By how much should David’s allowance be increased to compensate for the rise in price in jelly in part (b)?
\[15\times.25=$3.75\]
He needs $0.75 in compensation to be able to eat 15 sandwiches again.
d.) Graph your results in parts (a) to (c).
insert figure 4 here
- In what sense does this problem involve only a single commodity: peanut butter and jelly sandwiches? Graph the demand curve for this single commodity.
Since he really is interested in sandwiches, the components are consumed in fixed proportions.
insert figure 5
f.) Discuss the results of this problem in terms of the income and substitution effects involved in the demand for jelly.
No substitution effect. It is all manifest through the income effect.
1.0.2 5.5
Suppose the utility function for goods x and y is given by \(utility=U(x,y)=x\cdot{y}+y\).
a.)Calculate the uncompensated (Marshallian) demand function for x and y and describe how the demand curves for x and y are shifted by changes in I or the price of the other goods.
\[U(x,y)=x\cdot{y}+y\] \[!!!=x\cdot{y}+y+\lambda[I-p_x-p_y]\] ####FOC:####
An increase in income increase consumption of both x & y, but a price increase in x decrease consumption of x & increases consumption of y. An increase in the price of y decreases only consumption of y.
b.) Calculate the expenditure function for x and y.
\[V(p_x,p_y,I)= \frac{I-p_x}{2p_x}\cdot{\frac{I+p_x}{2p_y}}+\frac{I+p_x}{2p_y}\] \[\bar{u}=\frac{I+p_x}{2p_y}\cdot{\frac{I+p_x}{2p_x}}\] \[\sqrt{4p_xp_y\bar{u}}-p_x=I\] \[e(p_x,p_y,\bar{u})=2\sqrt{p_xp_y\frac{1}{u}}-p_x\]
c.) Use the expenditure function calculated in part (b) to compute the compensated demand functions for goods x and y. Describe how the compensated demand curves for x and y are shifted by changes in income or by changes in the price of the other good.
Two Ways:
1.) Plug e in for I in the Marshallian demands
\[x^c(p_x,p_y,\bar{u})=\frac{2\sqrt{p_xp_y\frac{1}{u}}-2p_x}{2p_x}=\frac{\sqrt{p_y\bar{u}}-\sqrt{p_x}}{\sqrt{p_x}}\] \[y^c(p_x,p_y,u)=\frac{2\sqrt{p_xp_y\bar{u}}}{2p_y}=\frac{\sqrt{p_x\bar{u}}}{\sqrt{p_y}}\]
2.) Shephard’s Lemma (p.167)
\[x^c(p_x,p_y,\bar{u})=\frac{\partial{e(p_x,p_y,\bar{u})}}{\partial{p_x}}\] \[=\frac{\sqrt{p_y\bar{u}}}{\sqrt{p_x}}-1=\frac{\sqrt{p_y\bar{u}}-\sqrt{p_x}}{\sqrt{p_x}}\] \[y^c(p_x,p_y,\bar{u})=\frac{\partial{p_x,p_y,\bar{u}}}{\partial{p_y}}\]\[=\frac{\sqrt{p_x\bar{u}}}{\sqrt{p_y}}\]
The compensated demand curves are unaffected by changes in income. They do, however, show that both cross prices affect x & y.
1.0.3 5.10 More on elasticities
Part (e) of Problem 5.9 has a number of useful applications because it shows how price responses depend ultimately on the underlying parameters of the utility function. Specifically, use that result together with the Slutsky equation in elasticity terms to show:
a.) In the Cobb-Douglas case (\(\sigma=1\)), the following relationship holds between the own-price elasticities of \(x\) and \(y: e_{x,p_x}+e_{y,p_y}=-2\).
First, Slutsky equation in elasticities
Remember, \(\frac{\partial{e}}{\partial{p_x}}=x^\star(p_x,p_y,\bar{u})\)
\[\frac{\partial{x^\star}}{\partial{p_x}}=\frac{\partial{x^c}}{\partial{p_x}}-\frac{\partial{x^\star}}{\partial{e}}\cdot{\frac{\partial{e}}{\partial{p_x}}}\] \[\frac{\partial{x^\star}}{\partial{p_x}}=\frac{\partial{x^c}}{\partial{p_x}}-\frac{\partial{x^\star}}{\partial{e}}\cdot{x^c}\]multiply through by \(\frac{p_x}{x}\)
\[\frac{\partial{x^\star}}{\partial{p_x}}\cdot{\frac{p_x}{x}}=\frac{\partial{x^c}}{\partial{p_x}}\cdot{\frac{p_x}{x}}-\frac{\partial{x^\star}}{\partial{e}}\cdot{x^c}\cdot{\frac{p_x}{x}}\]
multiply by \(\frac{e}{e}=1\) in income term
\[e_{x,p_x}=e^c_{x,p_x}-\frac{\partial{x^\star}}{\partial{e}}\cdot{\frac{e}{e}}\cdot{\frac{p_xx^c}{x}}\]
Substitute\(\frac{\partial{x^\star}}{\partial{e}}\cdot{\frac{e}{x}}=e_{x,I}\)
\[e_{x,p_x}=e^c_{x,p_x}-e_{x,I}\cdot{\frac{p_xx^c}{e}}\]
Substitute \(e=I\).
\[e_{x,p_x}=e^c_{x,p_x}-e_{x, I}\cdot{\frac{p_xx^c}{I}}\]
Substitute \(s_x=\) share of income spent on x.
\[e_{x,p_x}=e^c_{x,p_x}-e_{x, I}\cdot{s_x}\]
Now using 5.9 (e) \(e^c_{x,p_x}=-(1-s_x)\sigma=-(1-s_x)\) in the Cobb Douglass Case.
\[e_{x,p_x}=-(1-s_x)-e_x,I^{s_x}\]
Since \(e_{x,I}=1\) in Cobb Douglass case.
\[e_{x,p_x}=-1\]
Similarly for y, then \(e_{x,p_x}+e_{y,p_y}=-2\). Similarly you can show that \(e_{y,p_y}=-1\Rightarrow{e_{x,p_x}+e_{y,p_y}=-2}\)
b.) If \(\sigma>1\) then \(e_{x,p_x}+e_{y,p_y}<-2\), and if \(\sigma<1\) then \(e_{x,p_x}+e_{y,p_y}>-2\). Provide an intuitive explanation for this result.
Again by the slutsky equation in elasticities.
\[e_{x,p_x}=e^c_{x,p_x}-e_{x,I}\cdot{s_x}\] \[e_{x,p_x}= -(1-s_x)\sigma-e_{x,I}\cdot{s_x}\]
Since CES is homothetic, \(e_{x,I}=1\)
\[e_{x,p_x}=-(1-s_x)\sigma-s_x\] \[e_{x,p_x}=-\sigma+\sigma{s_x}-s_x\]\[=-\sigma+s_x(\sigma-1)\]
Similarly for y: \(e_{y,p_y}=-\sigma+s_y(\sigma-1)\)
\[\Rightarrow{e_{x,p_x}+e_{y,p_y}=-2\sigma+s_x(\sigma-1)+s_y(\sigma-1)}\] \[=-2\sigma-[s_x+s_y]+\sigma[s_x+s_y]\] \[-2\sigma-1+\sigma\] \[=-\sigma-1\]
\(<-2\) when \(\sigma>1\)
\(>-2\) when \(\sigma<1\)
Intuition
Written with StackEdit.


Judge rejects move to disqualify lawyer in state AGs' challenge to T-Mobile/Sprint deal
A federal judge on Thursday rejected a U.S. government effort to disqualify lawyers representing state attorneys general in their effort to block T-Mobile US' deal to buy Sprint Corp
NEW YORK: A federal judge on Thursday rejected a U.S. government effort to disqualify a lawyer representing 15 states and the District of Columbia in their effort to block T-Mobile US' deal to buy Sprint Corp.
U.S. Magistrate Judge Robert Lehrburger said the Department of Justice waited too long to seek the disqualification of Glenn Pomerantz, who had represented the department in 2011 when it stopped AT&T's purchase of T-Mobile. He also said Pomerantz's firm, Munger, Tolles & Olson LLP, could stay on the case.
The decision was made in a hearing before a Dec. 9 trial to determine whether T-Mobile, the third-largest U.S. wireless carrier, may go forward with its planned US$26.5 billion merger with smaller rival Sprint Corp , the fourth-largest wireless carrier.
State attorneys general from 15 states and the District of Columbia argue that the deal will lead to higher prices for consumers, particularly poorer ones.
Lehrburger said the Justice Department knew in mid-April about Pomerantz's role and should not have waited until a few weeks before the scheduled trial - and after the originally scheduled October trial date - to speak up.
"The division's application is untimely," the Manhattan judge said, referring to the Justice Department's Antitrust Division. "The division could have and should have moved much earlier."
(Reporting by Jon Stempel, writing by Diane Bartz; Editing by Dan Grebler)


The Macromedia Flash File Format (SWF) SDK is a C++ Library that provides all the functionality required to create Macromedia Flash (SWF) files. It is divided into two sections:
1.
The Low Level Manager
2.
The High Level Manager
The Low Level Manager has been designed to follow the structure of Macromedia Flash (SWF) as closely as possible. It includes a set of C++ classes that mirror the tag structure of Macromedia Flash (SWF). There is a C++ class for each tag that Macromedia Flash (SWF) defines. The parent of each of these classes is FObj (for Flash Object). Sometime we use an abstract class when several FObjs are closely related to each other, for example similar tags that changed only slightly between Macromedia Flash versions.
A FObjCollection is simply a list that contains all the FObjs in a Macromedia Flash (SWF) file.
Here is a breakdown of the basic classes in the Macromedia Flash File Format (SWF) SDK:
The Movie Object |
The overall container for a Macromedia Flash movie |
FObjCollection |
Holds the collection of Tag objects until it’s time to write to disk. |
|
Control Tag Classes C++ Objects for Control Tags that place, move, and modify a Data Tag on the Display List. Control classes have names beginning with “FCT” Data Tag Classes C++ Objects for Data Tags that store the basic graphics, text, and sound objects that comprise Macromedia Flash objects. Data classes all have names beginning with “FDT” |
|
Primitive Data Classes |
Data Packing Primitives hold the “guts” of the Data Tags. Data Primitives know how to write (serialize) themselves to a data stream so they save you from having to know how about compression and byte swapping. You add instances of these classes to the Control and Data Classes. |
Library Classes |
Helper libraries for sound and bitmaps |
The low level manager takes over ownership of the objects passed to it. So in the following example:
FCTSetBackgroundColor* background;
background = new FCTSetBackgroundColor(white);
allTags.AddFObj(background);
The memory pointed to by ‘background’ will be deleted by the low level manager when it writes the file stream. After ‘background’ is passed to the low level manager, it should be considered lost to the caller.
Some large objects are not deleted, owned, or modified by the low level manager. Specifically bitmaps and sounds, because of their size, are left in the control of the calling routines. The pointer to objects not deleted or modified by the low level manager are declared const.
The structure of a movie being created using the Macromedia Flash File Format (SWF) SDK is very similar to the structure of an Macromedia Flash (SWF) file. Here are the steps:
Here is an example of a routine we’ve created that creates a simple movie. The movie simply creates a red rectangle. Don’t worry about the particulars of each routine, simply look at the overall flow.
#include
"F3SDK.h"
#include
"FExample.h" //just the prototypes for our examples
Our routine creates a one
frame movie: a rectangle with a red fill color, a standard 1 pixel wide,
black line style
Create a collection of FObj's, allTags, to contain the
FObjs that make the movie
Each Macromedia Flash (SWF) tag in the movie will be represented by an FObj
FObjCollection allTags;
Construct first flash tag
object (set background color):
Define a color for the
background
const FColor white(0xff, 0xff, 0xff);
Construct the SetBackgroundColor
object which takes a color as an argument
All routines beginning
with FCT create Macromedia Flash Control Tags
FCTSetBackgroundColor* background;
background = new FCTSetBackgroundColor(white);
Add the SetBackgroundColor
tag to allTags, the FObjCollection
allTags.AddFObj(background);
Now start creating the
rectangle object. You must:
1. Create the bounds Rect
2. Create the DefineShape FObj and remember its ID for
use in the PlaceObject Tag
3. Create the Color for the fill
4. Create the Fill itself and pass it the color
5. Add the fill to the shape
6. Create the color for the rectangle's line style
7. Create the LineStyle record
8. Create the Edge records that define the rectangle and
add them to the shape
9. construct a rect that defines the shape's bounds
Create the bounding
rectangle (in TWIPs)
FRect* rectBounds = new FRect(1000, 5000, 1000, 5000);
Construct the
FDTDefineShape which will be the rectangle image
FDTDefineShape* rectangle = new FDTDefineShape(rectBounds);
Record its ID so that we
can later refer to it when we place it on the display list
U16 rectangleID = rectangle->ID();
Construct a red Fcolor to
fill the rectangle. Note that since a FDTDefineShape was used, we have
to use an FColor without an alpha channel.
FColor
red = FColor(0xff, 0, 0);
Use the Red FColor to
create a FillStyle record
Add the fill style to the
rectangle. You must record the position of the fill style in the fill style
array (the ID) so you can tell Flash when to use it.
Construct a black color
FColor black = FColor(0, 0, 0);
Construct a black, 1 pixel (20 TWIPS) wide line style
FLineStyle* blackLineStyle = new FLineStyle(20, black);
Add the line style to the
rectangle FObj, remembering to store the position of the line style just as in
the fill style
U32 blackLineStyleID =
rectangle->AddLineStyle(blackLineStyle);
Since you are done
creating fill and line styles, tell the LL manager so.
rectangle->FinishStyleArrays();
Construct the shape
records which will describe the rectangle.
The FShapeRecChange sets the X-Y position of the
initial line. (All points in Macromedia Flash are relative, like Postscripts
lineto.) FShapeRecEdgeStraight is used
to create the 4 lines of the rect, and FShapeRecEnd finishes it off.
FShapeRec* rectangleShapeRecords[6];
rectangleShapeRecords[0] = new FShapeRecChange(false, true, true,
false, true, 5000, 1000, NULL, redfillID, blackLineStyleID, NULL, NULL);
Create straight edge objects
rectangleShapeRecords[1] = new FShapeRecEdgeStraight( 0, 4000);
rectangleShapeRecords[2] = new FShapeRecEdgeStraight( -4000, 0);
rectangleShapeRecords[3] = new FShapeRecEdgeStraight( 0, -4000);
rectangleShapeRecords[4] = new FShapeRecEdgeStraight( 4000, 0);
rectangleShapeRecords[5] = new FShapeRecEnd();
Add the shape records to
the rectangle shape object
for (int i = 0; i < 6
; i++)
rectangle->AddShapeRec(rectangleShapeRecords[i]);
Add the rectangle to the
allTags object collection
allTags.AddFObj(rectangle);
Create a place object tag
which puts the rectangle on the display list
FCTPlaceObject2 *placeRectangle = new FCTPlaceObject2(false,
false,false, false, true, false, 1, rectangleID, NULL, NULL, NULL, NULL);
Add the place object tag
to the FObjCollection
allTags.AddFObj(placeRectangle);
Construct a show frame
object
FCTShowFrame *showFrame = new FCTShowFrame();
Add the show frame object
to the FObj collection;
allTags.AddFObj(showFrame);
Now create the movie
allTags.CreateMovie("rectangle.swf", 11000, 8000, 12);
}
The Macromedia Flash File Format (SWF) SDK contains a number of C++ examples that demonstrate how to use the Low-Level manager. These examples are listed below:
FExampleRectangle.cpp – Creates a low-level rectangle.
FExampleCircle.cpp – Creates a low-level circle
FExampleOval.cpp – Creates a low-level oval (or ellipse)
FExampleOverlap.cpp – Creates two overlapping low-level rectangles.
FExampleButton.cpp – Creates a low-level button.
FExampleFont.cpp – Creates a low-level font and text object.
FExampleEditText.cpp – Creates a low-level editable text field
FExampleMorph.cpp – Creates a low-level shape morph.
FExampleJpeg.cpp – Creates a low-level bitmap with Jpeg compression.
FExampleBitsLossless.cpp – Creates a low-level lossless bitmap
FExampleSound.cpp – Creates a low-level sound from a .wav file.
FExampleSprite.cpp – Creates a low-level sprite (or movie clip)
FExampleClip.cpp – Creates a low-level clipping shape that clips objects above it.
The High Level Manager provides a higher level of abstraction for creating Macromedia Flash (SWF) files. High level classes begin with the prefix “HF”. There are HF classes for creating movies, frames, circles, rectangles, text and bitmaps. High-level classes are much easier to use than low-level classes. For example, the HFCircle class creates a circle using a center point, and radius. There is no need to construct the circle with curved shape records.
HFMovie – High-level SWF movie.
HFFrame – Frame in a high-level movie.
HFObject – Parent class for all high-level characters.
HFSound – High-level sound.
HFButton – High-level button.
HFShape – Parent class for all high-level shapes.
HFRectangle – High-level circle.
HFBitmap – High-level rectangle filled with bitmap
HFCircle – High-level circle.
HFPolygon – High-level polygon.
HFOval – High-level oval (or ellipse).
HFFont – High-level static text.
HFText – High-level static text.
HFEditText – High-level editable text field.
HFAction – High-level action.
The high level manager copies the information from the objects passed to it. Sometimes it will modify the objects passed to it, but the high level manager will not delete them.. Objects passed to the high level manager can be created on the stack.
The memory model for the high level manager is almost the opposite of the low level manager.
Consider the following example:
HFMovie
movie;
{
HFRectangle rect( 0, 0, 200, 200 );
movie.Frame( 0 )->AddObject( &rect
);
}
movie.WriteMovie("wierd.swf");
The rectangle is written to the file without error, even though the object itself is out of scope. (This example is pedagogical in its structure – there is no need for the Rectangle object to have a smaller scope than the HFMovie object.)
Frames are allocated by the high level manager on an “as needed” basis when they are accessed with the Movie::Frame( int ) method call.
The Macromedia Flash Player uniquely identifies shapes by a tag (associated with its Define tag) and a depth. So two instances of the same object need to be on different depths to be unique. The high level manager hides this limitation and guarantees correct depths by writing each shape to a different depth in the Macromedia Flash (SWF) file.
The result is that the depth specified in the SetDepth call will correctly set a shape’s sorting order relative to other shapes, but this value will not be the depth written to the Macromedia Flash (SWF) file. Shapes set to the same depth with SetDepth have an undefined sorting order.
To summarize: higher depths are on top, and shapes with the same depths sort in an undefined order.
Here is an example of using the high-level manager to create a simple movie. This code creates a red rectangle and blue rectangle, places them on the display list, and displays the frame.
Include high-level class
definitions
#include
"HF3SDK.h"
void
HLCreateRectangleMovie()
{
First, construct a
high-level movie object.
HFMovie movie;
Create a rectangle with
the top-left corner at (0,0) and the bottom-right at (2000,2000)
HFRectangle* rect1 = new HFRectangle( 0, 0,
2000, 2000 );
Create another rectangle
with the top-left corner at (1000,1000) and bottom-right at (3000,3000)
HFRectangle* rect2 = new HFRectangle( 1000,
1000, 3000, 3000 );
Set the fill color of the
first rectangle to red.
rect1->SetSolidFillColor( Red_RGBA );
Set the fill color of the
second rectangle to blue.
rect2->SetSolidFillColor( Blue_RGBA );
Set the depth of the first
rectangle to 1 (the bottom of the stack).
rect1->SetDepth(1);
Set the depth of the
second rectangle to 2 (above the first rectangle).
rect2->SetDepth(2);
Add rect1 and rect2 to frame1, then place them on frame1
movie.Frame( 0 )->AddObject( rect1 );
movie.Frame( 0 )->AddObject( rect2 );
Write the movie to the SWF file.
movie.WriteMovie("HLrectangle.swf");
Clean up the memory.
delete rect1;
delete rect2;
}
The Macromedia Flash File Format (SWF) SDK contains a number of C++ examples that demonstrate how to use the High-Level manager. These examples are listed below:
HFExampleSquare.cpp – Creates a high-level square.
HFExampleRectangle.cpp – Creates a high-level rectangle.
HFExampleCircle.cpp – Creates a high-level circle.
HFExampleOval.cpp – Creates a high-level oval (or ellipse).
HFExampleButton.cpp – Creates a high-level button.
HFExampleFont.cpp – Creates a high-level font and text object.
HFExampleSound.cpp – Creates a high-level sound from a .wav file.
HFExample.cpp – The “mother of all examples”, writes a Flash movie with many objects.


|
facebook360_dep
Facebook360 Depth Estimation Pipeline
|
Classes | |
| class | OSType |
Functions | |
| def | get_os_type_local (platform=None) |
| def | get_flags (source) |
| def | get_flags_from_flagfile (flagfile_fn) |
| def | list_only_visible_files (src_dir) |
| def | list_only_visible_dirs (src_dir) |
| def | start_subprocess (name, cmd) |
| def | list_only_visible_files_recursive (src_dir) |
| def | intersect_lists (*args) |
| def | merge_lists (*args) |
| def | extract_tar (filename, dst=None) |
| def | run_command (shell_string, run_silently=False, stream=True, run_async=False, file_fn=None) |
| def | sh_buffered (arg, file=sys.stdout, use_shell=True) |
| def | sh_stream (arg, file=sys.stdout, use_shell=None) |
| def | get_catchable_signals () |
Variables | |
| facebook360_dep_root = str(Path(os.path.abspath(__file__)).parents[2]) | |
| def | image_type_paths = _set_image_type_paths() |
| def scripts.util.system_util.extract_tar | ( | filename, | |
dst = None |
|||
| ) |
Extracts a tar file. Args: filename (str): Path to the tar file. dst (str, optional): Directory where extraction should produce results. Returns: str: Path to the extracted directory.
| def scripts.util.system_util.get_catchable_signals | ( | ) |
Defines list of signals that can be caught (OS dependent). Returns: list[signal.signal]: Signals that can be caught.
| def scripts.util.system_util.get_flags | ( | source | ) |
Gets flags from a source file. Args: source (str): Path to the source file (could be any extension). Returns: list[dict[str, _]]: List of maps with keys "type", "name", "default", and "descr" for the respective fields corresponding to the flag.
| def scripts.util.system_util.get_flags_from_flagfile | ( | flagfile_fn | ) |
| def scripts.util.system_util.get_os_type_local | ( | platform = None | ) |
| def scripts.util.system_util.intersect_lists | ( | * | args | ) |
| def scripts.util.system_util.list_only_visible_dirs | ( | src_dir | ) |
Gets the visible directories in a directory. Args: src_dir (str): Path to the directory. Returns: list[str]: Names of visible directories (not full paths).
| def scripts.util.system_util.list_only_visible_files | ( | src_dir | ) |
Gets the visible files in a directory. Args: src_dir (str): Path to the directory. Returns: list[str]: Names of visible files (not full paths).
| def scripts.util.system_util.list_only_visible_files_recursive | ( | src_dir | ) |
Recursively gets the visible files in a directory. Args: src_dir (str): Path to the directory. Returns: list[str]: Names of visible files (not full paths).
| def scripts.util.system_util.merge_lists | ( | * | args | ) |
| def scripts.util.system_util.run_command | ( | shell_string, | |
run_silently = False , |
|||
stream = True , |
|||
run_async = False , |
|||
file_fn = None |
|||
| ) |
Run a shell command. Args: shell_string (str): Command to be run. run_silently (bool, optional): Whether or not to show stdout. stream (bool, optional): Whether or not to stream stdout. If run_silently is set to True, if the file_fn is not empty, or if running on a Windows host, this argument cannot be overrided (will be False). run_async (bool, optional): Whether or not to run command asynchronously. No output is returned if running async. file_fn (str, optional): Filename of where output should be saved. Returns: str: stdout from executing command.
| def scripts.util.system_util.sh_buffered | ( | arg, | |
file = sys.stdout , |
|||
use_shell = True |
|||
| ) |
Run a shell command with buffered output. Args: arg (str): Command to run. file (file, optional): File handler to write stdout to. use_shell (bool, optional): Whether or not to execute in a shell. Returns: str: stdout from executing command.
| def scripts.util.system_util.sh_stream | ( | arg, | |
file = sys.stdout , |
|||
use_shell = None |
|||
| ) |
Run a shell command with streaming output. Args: arg (str): Command to run. file (file, optional): File handler to write stdout to. use_shell (bool, optional): Whether or not to execute in a shell. Returns: str: stdout from executing command.
| def scripts.util.system_util.start_subprocess | ( | name, | |
| cmd | |||
| ) |
Synchronously runs a named command. Args: name (str): Process name. cmd (str): Command to execute. Returns: int: Return code of execution.
| scripts.util.system_util.facebook360_dep_root = str(Path(os.path.abspath(__file__)).parents[2]) |
| def scripts.util.system_util.image_type_paths = _set_image_type_paths() |


BOOGIE NIGHTS Review By David Wilcock (C)1998 Running Time: 152 minutes (2 1/2 hours)
Starring Mark Whalberg, Burt Reynolds, Julianne Moore and Heather Graham
Directed By Paul Thomas Anderson
One way of telling if a film is good or not is by the length. If a film is only 90 minutes, but feels like 300 minutes, then it's crap. But if a film last 2 1/2 hours, and feels like 90 minutes, then it's excellent. Boogie Nights falls into the latter catagory. The director, Anderson, delivers a funny, hip, yet sometimes violent film, which flies along.
Mark Whalberg, a.k.a Marky Mark, plays Eddie Adams, a seventeen year old with a certain 'gift' in the midriff area. Jack Horner (Reynolds) is a adult film director, who decides that Eddie would be great in the adult movie business. After running away from home, Eddie joins Jack, changes his name to Dirk Diggler, and starts making erotic movies.
In the movie business, Dirk meets a whole load of characters (which the film introduces very quickly and slickly) such as Scotty (Phillip Seymour Hoffman), Rollergirl (Graham) Amber (Moore) and Floyd (Phillip Baker Hall), and Little Bill (William H. Macy) All the characters are well written, well played, and the audience gets to know them pretty well, thanks to the excellent script. We learn about Ambers grief about not being able to see her child due to a divorce, Rollergirls hard time at school, and Little Bills wife, who sleeps with everyone except her husband.
But the best thing about the excellent Boogie Nights is Paul Andersons direction and writing. The direction is fast, thrilling, and never holds up. There are some great shots, some lovely steadiocam and handheld camera sequences, and lots of other neat directional touches. The writing is fabulous, with some intelligent dialogue, some funny dialogue, but none of the dialogue is crap, like most Hollywood films (such as The Lost World: Jurassic Park (1997), or Tommorow Never Dies (1997).) Boogie Nights really is a spectacular feat of direction and writing, on par (and sometimes betters) Quentin Tarantino's films Resevoir Dogs (1992) and Pulp Fiction (1994)
The soundtrack is also excellent. Like American Graffiti (1973), the film features some great old songs on the soundtrack, which heightens the atmosphere, and gives the film an extra lift. Also, the costumes are great. The clothes really do look like what people wore in the seventies and eighties.
The film, although excellent, does have some flaws. Firstly, Wahlberg, although excellent, cannot do highly scenes which require him to be angry. In both scenes where he has to act angry, his acting is so 'off', the scenes tension and anger is lost. But the rest of the cast are excellent. Burt Reynolds is brilliant, Julianne Moore shows real emotion, and William H. Macy is great aswell (but he always is.) Another flaw with the film, though, is that the ending seems a bit tacked on. It seems Anderson saw the film was going on a bit, and needed to wrap up quickly.
But they're small niggles really. Boogie Nights is an excellent film. Superb directing, writing, acting and music, all combine to make one spectacular film. Whatever you do, do not miss out on Boogie Nights.
OVERALL=****1/2 out of *****
REVIEW BY DAVID WILCOCK (C)1998
DAVID WILCOCK<EMAIL_ADDRESS>Visit the Wilcock Movie Page! http://wilcockmovie.home.ml.org -OR- http://www.geocities.com/hollywood/9061
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Toggle navigation
Meta Tic Tac Toe
{{$root.username}}
Profile
Logout
Login
Login:
Username
Password
Stay logged in
Sign In
New here?
Register
It seems you aren't registered yet. Please check your email.
Meta Tic Tac Toe


Tablet of Vision:
Communion with this tablet is complete. Get the next Stone of Commune from the mysterious wizard in the Forest of the Dead.


--- layout: post title: What coordinate system do our shapefiles use? date: '2016-03-03T17:37:04-06:00' author: Open Data Portal Team categories: - Open Data - Data Portal tags: - shapefiles - faq - tip - data explanation ---
We frequently get questions about what coordinate system our shapefile datasets use. The answer is State Plane Illinois East NAD 1983.
It is important to note that this answer applies to the files we upload – those of view type Files and Documents and “Original” exports of our newer map format. The “Shapefile” exports are created by the Data Portal software, even if the original file was also a shapefile, and use WGS84.


Kiosker is developed in with compatibility and ease of use in mind. Customer satisfaction is our number one priority. Don't hesitate to contact us if you see something you don't like or if you're having a feature request.
Kiosker handles all websites that support WebKit. Kiosker is full of features including JavaScript and popups.
We developed the app around the idea that anyone, regardless of their technical knowledge, should be able to set up and configure Kiosker.
Kiosker includes an advanced configuration panel that lets you customize Kiosker down to the last detail. Visit the docs for more information about configuration.
Once you're done configuring your first device, export your configuration and send it to your other devices.
Kiosker supports devices with iOS 9.3 or newer. This means that you can use Kiosker on iPad 2 or newer.
We give you Kiosker with full functionality in one version. There is no professional or enterprise version.
Kiosker is a fullscreen browser for iOS that is specifically designed for running on the iPad but also works on other devices (iPhone, iPod). As a highly customizable web browser, the application lets you display custom fullscreen content on the iPad. Our application lets you control the user experience by controlling what features will be available for the user. It's possible to hide or show the navigation bar, restrict domains, return to home after a certain amount of time or when the kiosk is inactive, turn off the screen when the kiosk is unused, disable user interaction partly or completely, pair an external flic button and much more.
For easy maintenance, there is an option to add an expandable menu over the web content. This onscreen menu gives you access to change settings, return home, show or hide the navigation bar and navigate to your favorite URLs. To prevent unauthorized access, the onscreen menu can be hidden and shown by double-tapping five times anywhere on the screen.
Kiosker handles any webpage (remote or local) and doesn't require any special coding. This differs from using the native "Add to Home Screen" function which requires a webpage that is specifically developed for being rendered in fullscreen.
The built-in screensaver functionality lets you dim down the screen and preserve power when the kiosk is unused or at a predefined time. The screensaver is automatically hidden when the screen is taped. On devices with iOS 11 or newer, it's possible to hide the screensaver when someone looks at the screen using the built-in camera for face detection.
Since Kiosker is specifically developed for beeing your tailored web browser, we are always interested in feedback regarding bugs, feature requests, improvement ideas, and success stories. Please use our contact form for getting in touch with us. If you need any help with setting up your web kiosk, please refer to our documentation. If you're happy with our application, we'd be more than happy if you rate us on the Apple App Store.
We are realy curious to see what you can make out of kiosker. Use our showroom as inspiration.
Tell your customers why they should buy your products by showing them an interactive product demo.
Control your modern home from a wall mounted iPad. Use any smart home controller that has a web-based control panel.
Let your customers sign up for your newsletter or your customer club.
Test your students' knowledge with a digital exam. Lock the device to Kiosker to prevent cheating.
Transform your iPad into a weather station by displaying an online weather forecast dashboard.
Show your visitors your success on social media, and encourage them to follow you on social media platforms.


Examples of the Box Model
HTML elements display as boxes on web pages. This div element is configured to have a light blue background, the
browser default padding (which is no padding), and a black 5 pixel border. The empty space where the page
background shows through between this element and the element above is an example of the margin.


{% extends "base.html" %} {% load rpx %} {% block title %}Associate a new login{% endblock %} {% load breadcrumbs %} {% block breadcrumbs %} {% breadcrumb 'Associate a new login' %} {% endblock %} {% block content %}
Here are the logins you have associated with your account.
{% for rpxdata in rpxdatas %}{% rpx_link "Click here to add another login to your account." extra rpx_response_path %}


Written by: Dana Klein
Produced by: Robert Carlock and Wendy Knoller
Transcribed by: Coffee Mug, Eleonora, Sebastiano & Vanessa
[Scene: Central Perk]
Rachel: You know, I'm thinking about letting Emma have her first cookie.
Joey: Her first cookie? She has cookies all the time!
Rachel: I've never given her a cookie. Have you?
Joey: No! No... and, for the record, I've also never given her a frosting from a can!
Monica: Hey Rach, the adoption agency needs letters of recommendation and we were wondering if you would write one for us.
Rachel: Of course, I'd be honored!
Chandler: Thanks!
Monica: Thank you!
(Joey looks at them, disappointed about their decision)
Joey: U-U-Um, I think there's been an oversight.
Chandler: Joey, we would've asked you, we just thought you wouldn't be interested.
Monica: Yeah, it's just we don't think of you as really being so much "with the words".
Joey: Whoo-weh hey weh-hey whoo hey!!
Monica: Clearly we were wrong.
Joey: I gotta a lot of nice stuff to say about you guys, ok? And I know how much you wanna have a baby, you know, and I would love to help you get one.
Monica: You know what? Then, Joey, we want you to do it.
Joey: Thank you! Alright, let me see how I'm gonna start... "Dear baby adoption decider people..."
Chandler: So excited about your letter!
(Phoebe enters)
Phoebe: Hey!
All: Hey Phoebe!
Joey: Hey!
Monica: Wow! Don't you look nice?!
Phoebe: Yes, I do! Today is Mike and my one-year anniversary.
Rachel: OH! What's it the anniversary of? Your first date, your first kiss, first time you had sex...
Phoebe: YEAH!
Chandler: So you must be going to somewhere fancy to celebrate?
Phoebe: Uh-uh. Ehm, a Knicks game.
Joey: Uhm... Aren't you a little overdressed?
Phoebe: Hey, you know what, I've never had a one-year anniversary before, so no matter where we go, I'm wearing something fancy pants, and... I'm gonna put on my finest jewelry and we're gonna have sex in a public rest room.
Monica: You guys do that?
Chandler: That's where people make number two!!
OPENING CREDITS
[Scene: Ross' apartment. Ross is grading papers. Charlie approaches him.]
Charlie: Hey! (They kiss and cuddle a little)
Ross: Hey...
Charlie: So, you know... I have a little time. If you... if you want to...
Ross: (surprised) Oh... (he pauses) (sounds disappointed) Ohh... I'd love to but I really have to grade these papers.
Charlie: Fine, it's fine... (she whispers) I'll just shower by myself...
Ross: (Writing on the papers) B, B, B, B, B!
Charlie: Oh, Ross, you gave a B to a Pottery Barn catalogue.
Ross: Well, it had some good ideas, take off your shirt.
(they start kissing but someone knocks at the door)
Ross: Damnit!
Amy: (yelling from outside) Rachel!! Open up!! It's your sister!! (she knocks on the door again) I have to talk to you!!
Ross: (he opens the door) Hi Amy!
Amy: You're not Rachel.
Ross: Still sharp as a tack!
Amy: Um... Charlie, this is Rachel's sister Amy. Amy, this is Charlie.
Charlie: Hi!
Amy: Hi!
Charlie: Nice to meet you.
Amy: H-Hi!!(to Ross) And you are...?
Ross: (pause) Ross? I... I grew up on your block! We had Thanksgiving together last year... I had a baby with your sister!
Amy: (looks confused) N-no... uhm... did I buy a falafel from you yesterday?
Ross: (gives up) Yes, yes, you did.
[Scene: Joey and Rachel's apartment]
(Ross enters the apartment with Amy)
Ross: Hi Rachel! Here's your sister Amy! She thinks I need pec implants!
Rachel: Amy! Hi! Oh-oh-hoh! (they hug) Wow! You remember Joey?
Amy: Yeah! Hey, sure! The "Days of Our Lives" guy!
Joey: That's right, yeah.
Amy: You're not good!
Joey: Always nice to meet a fan!
Rachel: So now, what are you doing here?
Amy: Well, I have huge news.
Rachel: (Emma starts crying in the other room) Oh sorry, hold on. Let me just check on the baby!
Amy: Wait, this is important! Can Ella wait? (Rachel goes to Emma)
Ross: Ehm... Her name is Emma.
Amy: Why did you change it, Ella was so much prettier!
Ross: What do I know? I just sell Middle Eastern food from a cart!
Amy: Hey, your English is getting better!!
Ross: (to Joey) Oh my God!
Joey: I know, she may be the hottest girl I've ever hated.
Ross: What... what you working on?
Joey: (using a laptop) Oh, Monica and Chandler's recommendation. I want it to sound smart but.. I don't know any big words or anything, so...
Ross: Why don't you use your Thesaurus?
Joey: What did I just say?
Ross: Watch. (he takes the laptop) Here, you ehm... You highlight the word
you want to change.
Go under Tools and the Thesaurus generates... 'gives'... 'gives' a whole list
of choices. You can pick the word that sounds smartest.
Joey: Oh my God, that's great! I'm smart!! No, no, I'm... (he uses the Thesaurus) "brainy, bright, clever", I love this thing! Look out ladies, Joey Tribbiani's got the whole package!!
[Scene: Rachel's room. Rachel is attending to Emma. Amy is standing behind her.]
Rachel: God!
Amy: So beautiful.
Rachel: Oh, I know, isn't she?
Amy: No, I was talking about your bedding.
Rachel: All right. What's your news, Amy?
Amy: Oh! Um... Well... I'm getting married.
Rachel: What? Oh my God! To who?
Amy: This guy! He has a killer apartment.
Rachel: A-And??
Amy: A-And it's on Fifth. And the elevator opens up right into the living room.
Rachel: No, what's he like?
Amy: Oh! He's ok. Do you remember my old boyfriend Mark?
Rachel: Yeah.
Amy: It's his dad.
Rachel: Huh... wow, so he's gotta be...
Amy: Old? Yeah! But he travels a lot, so he's hardly ever there.
Rachel: Sweety, I gotta tell ya... it sounds a little bit like you like the apartment more than you like...
Amy: Myron. Hmm... I told you he was old!
 Oh, honey, you know, I once also almost married somebody that I didn’t love. Do you remember Barry?
Amy: Humpf, remember him? How we used to make out all the time after you went to sleep.
Rachel: Sometimes just nodding is ok. (pause) Uhm, so but anyway, listen, not marrying Barry was the best decision that I ever, ever made. Honey, you deserve true love.  Someone that is your age, that is smart, that is fun and that you care about!
Amy: (thinks about it) You’re right, you’re right! I’m gonna do it!
Rachel: Ok.
Amy: I’m gonna marry Myron and keep looking for Mr Right.
Rachel: Ok, let’s keep talking.
[Scene: Madison Square Garden. Mike and Phoebe are walking to their seats.]
Phoebe: Excuse me, anniversary. Excuse me, anniversary. (looking at her ticket). Uhm, sir, could you move your nachos... they’re in my seat. It's my anniversary. (to Mike) Here we are! (Mike nods). Can’t believe it's been a whole year!
Mike: I know. This has been the best year... (the crowd starts cheering so he starts yelling) THIS HAS BEEN THE BEST YEAR OF MY LIFE!
Phoebe: ME TOO! I NEVER THOUGHT I COULD LOVE SOMEONE THIS MUCH!
Mike: I FEEL THE SAME WAY!
Phoebe: YOU’RE SO GENEROUS AND KIND AND (crowd stops cheering) YOU'RE AMAZING IN BED (everyone hears it and stare at them.) (to everybody) IT’S OUR ANNIVERSARY!
Announcer: Knicks fans, please turn your attention to the big screen on the score board. Someone has a special question to ask. (on the screen there’s written ‘Julie, will you marry me?’ and goes on to show a guy kneeling down in front of a girl holding out a ring to her)
Phoebe: Oh how lame... oh, it’s so tacky, and impersonal.
Mike: Really?
Phoebe: Oh, it’s the worst way to propose!
Mike: (looks strangely shocked) Excuse me... (he leaves, then Phoebe realizes what she did).
[Scene: Monica’s apartment. Joey enters the room]
Joey: Hey, finished my recommendation. (he hands it over to Chandler) Here. And I think you’ll be very, very happy. It’s the longest I ever spent on a computer without looking at porn.
Chandler: (reading) I don’t... uh... understand.
Joey: (sounding very proud of himself) Some of the words are a little too sophisticated for ya?
Monica: (also reading it) It doesn’t make any sense.
Joey: Of course it does! It’s smart! I used the the-saurus!
Chandler: On every word?
Joey: Yep!
Monica: Alright, what was this sentence originally? (shows the sentence to Joey)
Joey: Oh, ‘They are warm, nice, people with big hearts’.
Chandler: And that became ‘they are humid prepossessing Homo Sapiens with full sized aortic pumps...?
Joey: Yeah, yeah and hey, I really mean it, dude.
Monica: Hey Joey, I don’t think we can use this.
Joey: Why not?
Monica: Well, because you signed it baby kangaroo Tribbiani (Joey makes a 'and-what’s-wrong-with-that' look).
Chandler: You know what?
[Scene: The corridor. Amy knocks Joey’s door and Rachel opens the door.]
Rachel: Amy, hi!
Amy: I took your advice, I left Myron.
Rachel: Oh, good for you!
Amy: I know! I'm Erin Brockovich!
Rachel: Yes you are! Oh, I am so proud of you!
Amy: Thank you! So, can I stay with you?
Rachel: But Erin Brockovich had her own house.
(Joey comes out of Monica’s apartment and sees Rachel and Amy but does not notice the huge amount of bags)
Joey: Ah, look who’s back! (he sees the bags) Why do you have bags? RACH, WHY DOES SHE HAVE BAGS?
Amy: Well, I’m staying with you guys!
Joey: What?
Amy: We’re gonna be roomies! (she snaps her finger and points at Joey, snaps her fingers again and points to the bags) Come on!
[Scene: Joey’s apartment. Rachel is in the living room and Joey comes out of his room.]
Joey: You slept out here?
Rachel: Yeah...
Joey: But uhm, we're getting rid of her, right? Rach, please tell me we’re getting rid of her.
Rachel: Joey, I can’t do that!
Joey: Oh, come on! Last night I was finishing off a pizza and she said (aping Amy badly) "Uoh oh oh, a moment on the lips, forever on the hips!" I don’t need that kind of talk in my house!
Rachel: Well Joey, uhm look, I know that she’s difficult, but I think it’s really good that she’s here.
Joey: 'Cause we will appreciate it more when she’s gone?
Rachel: No, it's just... look, you know, when I first moved to the city I was a lot like her! I was spoiled, self-centered and you guys really took care of me.
Joey: Yeah, Monica made us!
Rachel: Well, uhm... whatever, I have really appreciated it, 'cause I don’t think I would be the person that I am today if it wasn’t for you guys. See, I wanna help Amy the way you guys helped me. And I know it’s gonna take patience, but that’s ok.
Amy: Good morning.
Joey: Yeaah.
Rachel: Amy, that’s what I was supposed to wear today, that’s why I hung it on the door.

Rachel: Amy, you know what? I was thinking that maybe now it'd be a good time for us to sit down and, you know, talk about your future.
Amy: Oh, I can’t, honey. I’m gonna go get my eyebrows shaped. (points at her eyebrows) I am not happy. (to Joey who has a pizza box in his hands) Oh... sure you wanna eat that?
Joey: (yelling at her) I’M CURVY, AND I LIKE IT!
[Scene: Monica’s Apartment. Rachel, Ross, Monica and Chandler are there, Phoebe enters the room]
Phoebe: Hi. I just had the worst anniversary ever.
Chandler: I doubt that! Tell her about us last year.
Monica: Oh, well, I bought Chandler a five hundred dollar watch and he wrote me a rap song.
Ross: Seriously?
Chandler: Word!
Phoebe: Well, mine was worse than that.
Rachel: Well, what happened?
Phoebe: We were at the game, and this guy proposed to his girlfriend on the big screen thing...
Rachel: Oh, that is so tacky.
Phoebe: Well, that’s what I said, but it turns out, Mike was planning on proposing to me that same way last night!
Monica: Oh my God, Mike was gonna propose?
Rachel: Phoebe, that’s huge!
Ross: Well, do you wanna marry him?
Phoebe: Yeah, I really do! Yes, but, after I dumped on the way he was gonna propose to me, I don’t think he’s ever gonna ask again! I mean, I said no in Barbados and now this!
Chandler: She's right! If I were a guy and... (stops himself mid-sentence...everyone stares at him) Did I just say if I were a guy..?
Monica: Maybe you don't need him to propose to you, maybe you can propose to him!
Phoebe: Oh, I don't know, I don't know, isn't that a little desperate?
Monica: I proposed to Chandler! (Phoebe stops herself from laughing) Alright, moving on...
Chandler: Oh, I don't think it was desperate, I think it was amazing!
Monica: Thank you.
Phoebe: (To Rachel and Ross) Well, do you think I should propose?
Rachel: I think it could be kind of great!
Ross: Absolutely! You'll love the feeling! There's nothing like it!
Phoebe: Ok, ok, so how should I do it?
Monica: How about at a game, on the big screen?
Rachel: (Sarcastically) Uuuh!! How about at a Footlocker? (claps her hands together, faking excitement)
Monica: What? what? He obviously thinks that's a nice way to be proposed to, plus he'd never suspect it!
Phoebe: Yeah, that does make sense. Ok, now, would... would you two (points to Ross and Chandler) like that?
Chandler: Sounds good to me... but what would a guy think?
(Amy walks in carrying a phone handset)
Amy: (To Rachel) Nana is on the phone (Hands the phone over to Rachel)
Rachel: (Takes the phone) Oh! That's interesting, since she died seven years ago!!
Amy: She did? Who got her condo in Boca?
Rachel: (Into the phone) Hello? (announces to Amy) Oh, it's our nanny! (goes back to the phone conversation) Hi! Oh... God! I hope you feel better! Ok, bye! (Hangs up) (To Ross) That's Molly, she's sick. Can you watch Emma today?
Ross: No, I can't. I have back-to-back classes. Did Molly say what she had? Because my throat's been hurting?
Rachel: Menstrual cramps.
Ross: I don't think that's what this is.
Rachel: (To Monica, Chandler and Phoebe) Can any of you watch Emma?
Monica: No, sorry sweety..
Phoebe: No, I've got work and then I'm proposing..
Rachel: (To Ross) Great, shoot, what are we gonna do?
Amy: Well, I can do it.
Rachel: (Thinks for a moment) Well, actually...
Ross: (He interrupts her immediately, and drags her by her arm to the other side of the room) Well, can I talk to you for a sec.?
Rachel: Yeah.
Ross: Um, I do not want her baby-sitting our child.
Rachel: Why not?
Ross: Well, for one thing, she keeps calling her Ella!
Rachel: (Defends Amy) Wha.. well, Ella's a nice name!
Ross: Fine, we'll call the next one Ella.
Rachel: (Shocked) Wha... the next one?
Ross: (a little confused) Okay, um... I don't want her watching our baby.
Rachel: Ross, I am trying to help her become a better person. This is a huge breakthrough for her! She just offered to do something for another human being!!
Ross: I... I don't know..
Rachel: Ross, I'm telling you, she's giving up getting her eyebrows (points at her own to emphasize the word) shaped to do this alright? Do you understand how important that is in our world?
(Amy approaches from behind)
Amy: um... listen, I couldn't help but overhear... 'cause I was trying to... Listen, let me do this alright? I really wanna help you guys out, and plus Rachel's been so wonderful to me... (looks at hem pleadingly)
(Rachel looks at Ross and her agrees silently)
Rachel: Absolutely.
Amy: (very excited) Oh! Great! So how much does it pay? (Ross just gives up and leaves)
[Scene: Central Perk. Joey is inside, Chandler and Monica walk in.]
Chandler: Hey Joe! How's the second draft of the letter coming?
Joey: Great, I'm finished! In fact, I just dropped it off at the agency.
(Chandler and Monica look shocked)
Monica: You dropped it off?
Joey: Yeah.
Chandler: Can we read it? Can you print out another copy?
Joey: No can do amigo. No, I didn't use the computer. Felt more personal to hand-write it. (Chandler and Monica look even more shocked)
Monica: You hand-wrote it?
Joey: Yeah, and don't worry. I didn't try to sound smart at all! See ya later!  We're never gonna get a kid. No, we're gonna be one of those old couples that collects orchids or has a lot of birds!
Chandler: It's ok, it's ok. You know what?
Chandler: (on the phone) Hello, this is Chandler Bing. Somebody just dropped off a handwritten recommendation letter, and.. (listens) Uh-huh... Uh-huh... okay... thank you. Good-bye. (hangs up looking very confused).
Monica: Ugh, we're screwed, aren't we? You know what? Just tell me on the way to the bird store.
Chandler: (Still looks confused) They loved it.
Monica: What?
Chandler: They thought it was very smart of us to have a child write the recommendation letter.
Monica: (surprised) They thought Joey was a child?
Chandler: She guessed 8, 9, based on his drawings.
(Amy comes in with Emma in a stroller)
Amy: Hi!
Monica: Hey, what did you guys do today?
Amy: Ella wanted to go out, so we went shopping and got some sushi.
Chandler: That sounds like fun.
Amy: Yeah, not really. Babies are dull.
(Rachel comes in, sees Amy and Emma)
Rachel: (To Emma) Hey! Hi, how's my girl?
Amy: I'm fine! And, I got you a present for letting me stay with you. Ready?
Rachel: (sounds excited) Yeah!
(Amy takes off Emma's hat)
Amy: Ta-daaa!
(Rachel looks at Emma)
Rachel: (not excited anymore) You pierced her ears!?
Amy: (Very excited about it) Doesn't it make her nose look smaller?
(Rachel looks very shocked)
COMMERCIAL BREAK
Rachel: You pierced her ears? How could you do this without telling me?
Amy: Well, if I had told you, then it wouldn't have been surprise, now would it?
Chandler: I think she looks cute. (Rachel turns around and stares at him angrily) ... but I am wrong!
 He's gonna flip out.
Amy: Why, did something happen to his falafel cart?

Monica and Chandler: Hi Ross.
Ross: Hey Emma. Oh, why is she wearing her hat so low? She can barely see. (Wants to take the hat off, but Rachel tries to stop him).
Rachel: Nah, I don't really want her to see.
Ross: Why not?
Monica: Because there are so many terrible sights in this world.
Chandler: Like war. Or that thing in Joey's refrigerator. Remember? It was in a milk carton but it looked like meat?
Ross: Come here (Removes Emma's hat) Oh! There she is! Hi!
(Rachel looks worried)
Ross: (sees how strangely Monica, Chandler and Rachel are looking at him) What?
Rachel: Nothing.
Ross: (Back to Emma) Hi! (Looks at her) What... (Moves the stroller away from him so he can get a better look at her. He looks at her confused. Finally he realizes the difference and gasps). Please tell me those are clip-ons.
Rachel: Oh, they're real!
Ross: Did she (points at Amy) do this to her? I told you we shouldn't have left Emma with her!
 (To Amy) You are soo irresponsible I am never letting you baby-sit ever again!
Amy: Hey you know what, this kid needs me, okay? She needs to have a cool fun aunt!
Monica: I'm a cool, fun aunt!
Amy: (Sarcastically) O-Okay!
Chandler: Hey! Monica can be cool and fun at organized indoor projects!
Rachel: I can't believe this. All I wanted to do was help you try to figure out what to do with your life and this is how you repay me?

Rachel: Oh yeah? Since when?
Amy: Since today... I am going to be a baby stylist.
Rachel: (looks at Ross and then at Amy again in disbelief) What?
Ross: That's not a thing!
Amy: Well, it should be. I'm gonna help babies learn how to accessorize, what colors to wear, what clothes are slimming...
Rachel: (shouting) Babies don't care if they're slim.
Amy: Enter Amy!
Ross: (very angry) Amy, I ju... I just... I just wanna...
Amy: What? What are you gonna do?
Ross: (pointing at Amy, shouting) No more falafel for you!
(Amy looks at Ross, angrily. Rachel clearly doesn't understand what he meant and looks at Ross who gestures "later".)
[Scene: Madison Square Garden. Phoebe and Mike are watching the game. There's cheering, but Phoebe seems distracted.]
Mike: Great game, huh?
Phoebe: Uhuh, uhuh... (seems distracted)
Mike: Why do you keep looking at the screen?
Phoebe: I'm not. I'm praying. (looking up) Please let the Knicks win... Thank you Thor! (Mike is standing up) Where... where are you going?
Mike: Going go to the bathroom.
Phoebe: Well, I think you should wait.
Mike: Why?
Phoebe: Well, if you don't... if you don't hold it in, you don't get all the nutrients.
Announcer: Knicks fans, please turn your attention to the big screen on the scoreboard. Someone has a special question to ask.
(We see the screen where it says: "Mike will you marry me?" and then we see Phoebe and Mike on the screen. Phoebe stands up and kneels in front of Mike.)
Phoebe: Mike Hannigan... will you marry me?  She's proposing to him. Guess we know who wears the pants in that family. (people are laughing, while Mike still seems bewildered)
Phoebe: That's not very enlightened!
(There's booing around them, and Mike sinks in his chair, holding his hand in above his eyes, hoping no-one would recognize him)
Phoebe: Hey, hey! (shouting) Boo us? Boo you!
[Scene: Rachel and Joey's. Joey is in the kitchen and the telephone rings.]
Joey: (picks up the phone) Hello? Yeah, this is Joey Tribbiani... Oh, hi! Well, I'm glad you liked my letter... No my mommy and daddy aren't home right now... (looks puzzled) Okay, bye bye. (hangs up) (to himself) She was nice!
(Rachel and Amy enter)
Rachel: Joey, get Amy's bags, she is moving out!
Joey: Whoo-hoo! (and leaves for Rachel's room)
Amy: You're kicking me out?
Rachel: You put holes in my baby's ears!
Amy: Yeah well, at least now people will know she is a girl!
Rachel: (gasps) I can't believe I ever even tried to help you. You are so beyond help.
Amy: You know what? Ever since I got here, you have been nothing but negative.
Rachel: Excuse me?
Amy: You didn't want me to marry the old guy with the great apartment. Then, I tried to help your daughter to de-emphasize her flaws (frantically pointing at her nose) And suddenly I am the bad guy?
Rachel: (yelling) Joey, where are those bags?
Joey: (Yelling from Rachel's room) She has a lot of crap!
Amy: You know what? When I moved in here I thought: This is gonna be so great.  Oh!
Rachel: (doesn't believe what she's hearing) Seriously?
Amy: hm-mmm... Mom said she gained like fifteen pounds.
Rachel: Hips or thighs?
Amy: Ass and face.
Rachel: (gasps) Oh! Oh my God! I thought she was on Atkins.
Amy: She was. Carbs found her... See, this is what I wanted. Two sisters, talking about real stuff.
Rachel: (embarrassed) Oh, I can give you that.
Amy: You can?
Rachel: Yeah. I just, I kept trying to make you a better person, but you're... you're already a pretty perfect version of what you are.
Amy: (touched) Thank you. I've got to admit, Emma does look cute.
Rachel: Did you just say Emma?
Amy: Ugh, I'm sorry... Ella.
[Scene: Mike and Phoebe at a restaurant.]
Phoebe: That woman at the game didn't know what she was talking about. Mike, obviously you have balls.
Mike: But please, let's just forget the whole thing.
Phoebe: (the waiter puts a piece of cake on the table) I would love it. Consider it forgotten... But just so you know... however and whenever you decide to propose, I promise I'll say yes.
(Mike's face changes from happy to sad, and he looks at the cake, disappointed.)
Phoebe: It's in the cake, isn't it?
 No Balls hide it? (he takes the ring from the cake, and cleans it with a napkin)
Phoebe: What's the matter with me? How do I keep ruining this? I'm sorry, I'm sorry!
Mike: No! It's my fault.
(Phoebe has this weird, anxious, nervous look on her face)
Mike: I'm gonna do this now.
Phoebe: Oh my God!
(Mike starts to kneel in front of Phoebe.)
Mike: Phoebe, I...
Phoebe: Wait! Oh wait! (she takes off a ring that was already on her left ring finger. After that Mike starts to kneel again, but then...) Oh no! (She was wearing rings on all her fingers and her thumb, and takes all of these off.)
Mike: Ready?
Phoebe: Uh-huh! (and now Mike kneels properly)
Mike: Phoebe, I love you. There's no-one else in the world I would ask to marry me... three times. But I wanna take care of you, have babies with you, and grow old with you... Phoebe Buffay, will you marry me?
Phoebe: Yes!
(Mike puts the ring on her finger)
Mike: I love you!
Phoebe: I love you more!
Mike: Not possible! (they kiss, and then Mike says proudly...) She's gonna be Mrs. No Balls.
(They kiss again, and Phoebe looks at the ring.)
COMMERCIAL BREAK
[Scene: The street in front of Central Perk. Rachel and Amy are walking on the sidewalk.]
Rachel: So how is the uhm... baby styling business going?
Amy: Not that great. It's almost if people don't want to hear that their babies are ugly.
Rachel: That's shocking!
Amy: Oh! It's Ross... Hey Ross! (She says hey to the guy at the falafel stand, whose only similarity with Ross would be his black hair.) Hello-oo Ross! (to Rachel) He's rude!
THE END


Utilities Documentation¶
Open Seismic uses some utilities functions in order to conduct proper inference. The documentation below goes in-depth as to the purpose and usage of the major utility functions.
Inference Argument Parsing and Copying Files¶
-
core.python.utils.argparse_util.
args
()¶ This function helps parse command line arguments. The configuration JSON file arguments will be passed to their respective submodules (conversion, OpenVINO optimization, and inference). However, this function is purely concerned with inference arguments. The other arguments are used for the user’s own conversion script or the model optimizer script that comes with OpenVINO.
- The main arguments are as follows:
model
: OpenVINO model folder path for swappable componentsgiven_model_name
: Open Seismic model namedata
: Data folder pathbenchmarking
: Flag to enable/disable model benchmarkingoutput
: Prediction output pathinfer_type
: (sync
/async
/fine_cube_sync
/fine_cube_async
/coarse_cube_sync
/section_sync
/section_async
) Type of inferencestreams
: Number of streams for inference
The optional arguments are as follows. Note that although they are optional, certain inference tasks need these arguments in order to run:
slice
: (full
/inline
/crossline
/timeslice
) ONLY FOR FINE CUBE/SECTION INFER. Slice type for cutting into datawindow
: (...;l1i:l2i,w1i:w2i,h1i:h2i;...
) ONLY FOR COARSE CUBE INFER. Infer oncube_i[l1i:l2i,w1i:w2i,h1i:h2i]
.subsampl
: ONLY FOR FINE CUBE/SECTION INFER. Look at every n-th pointslice_no
: ONLY FOR FINE CUBE/SECTION INFER. Slice numberim_size
: ONLY FOR FINE CUBE/COARSE CUBE/SECTION INFER. Side length of cube/section to window inreturn_to_fullsize
: ONLY FOR FINE CUBE INFER. Output will be the full size of the input (done through interpolation)
- Returns
Argument Namespace Object mapping arguments to their respective values.
-
core.python.utils.argparse_util.
copyfile
(src, dst, file)¶ This simple function copies a file named
file
from thesrc
path to thedst
path.- Parameters
src – Path of the source file.
dst – Path of the destination file.
file – Name of the file to be copied.
- Returns
None
Inference Utility Functions and Classes¶
-
class
core.python.utils.infer_util.
OV_simulator
(path_to_xml, path_to_bin, requests=1, streams='CPU_THROUGHPUT_AUTO')¶ The
OV_simulator
class is a bare-bones wrapper for doing inference in Open Seismic.-
__init__
(path_to_xml, path_to_bin, requests=1, streams='CPU_THROUGHPUT_AUTO')¶ Initialization of model.
- Parameters
path_to_xml – Path to xml file of model’s OpenVINO IR.
path_to_bin – Path to bin file of model’s OpenVINO IR.
requests – Number of requests to use during inference.
streams – Number of streams or a specification of stream usage.
n1n2n3 – Tuple representing size reference for input layer. Shape will be
(1, 1, n1, n2, n3)
.
-
get_idle_request_id
()¶ Get an idle request id. The
get_requests
andget_idle_request_id
methods are used for asynchronous inference.- Returns
Idle request id (int)
-
get_input_shape
()¶ Get shape of each input layer. If there is only one layer, then a tuple will be returned. If there are multiple layers, then a list of tuples will be returned.
- Returns
Tuple representing input layer shape or a dictionary mapping layer to shape if multiple layers
-
get_input_shape_dict
()¶ Get input shape dictionary where the return value is
{..., layer_i:layer_i_shape, ...}
.- Returns
Layer-to-shape dictionary
-
get_inputs
()¶ Get input layer name(s).
- Returns
List of strings representing the names of the input layers.
-
get_outputs
()¶ Get output layer name(s).
- Returns
List of strings representing the names of the output layers.
-
get_requests
()¶ Get requests object of model. The
get_requests
andget_idle_request_id
methods are used for asynchronous inference.- Returns
Requests object of model.
-
infer
(input_val)¶ Conduct simple inference.
- Parameters
input_dict – Input dictionary containing
{..., layer_name:input_val, ...}
.- Returns
Tuple containing (1) an output dictionary mapping output layer to output value and (2) latency in milliseconds.
-
reshape_input
(shape)¶ Change the shape of the input layers. Shape may be a tuple/list or it may be a dictionary mapping layers to their new shapes.
- Parameters
shape – Tuple/list representing the new desired input shape.
- Returns
None
-
-
class
core.python.utils.infer_util.
InferReqWrap
(request, req_id, custom_callback, callback_args, callback_queue)¶ The
InferReqWrap
class offers additional logic on top of the OpenVINO requests API in order to conduct and store inference per request.-
__init__
(request, req_id, custom_callback, callback_args, callback_queue)¶ Initialization of the
InferReqWrap
class.- Parameters
request – Request from model paired with
req_id
.req_id – The request id associated with
request
.custom_callback – A custom callback function to execute after inference is completed.
callback_args – Arguments to be passed into the custom_callback function.
callback_queue – A callback function from an
InferRequestsQueue
object.
-
callback
(status_code, user_data)¶ This callback function will be executed once an inference request is complete. First, the custom callback is called with its appropriate arguments. Then, the
InferRequestQueue
callback will be called to clean up the inference request and set the request associated with this object as idle.- Parameters
status_code – The status code of the inference request.
user_data – Arguments and other data used for the custom callback function.
- Returns
None
-
get_preds
()¶ Gets the predictions that were computed by
self.request
.- Returns
List of dictionaries that map output layers to their output values.
-
infer
(input_data, ground_truth=None, extra_params={})¶ Starts synchronous inference request.
- Parameters
input_data – A dictionary mapping layers to their input data.
ground_truth – Label for the associated input data
extra_params – Params that might need to be used in the callback.
- Returns
None
-
start_async
(input_data, file_name, extra_params={})¶ Starts asynchronous inference request.
- Parameters
input_data – A dictionary mapping layers to their input data.
file_name – Name of the file associated with the input data.
extra_params – Params that might need to be used in the callback.
- Returns
None
-
-
class
core.python.utils.infer_util.
InferRequestsQueue
(requests, callback, postprocess)¶ The
InferRequestQueue
manages the execution of requests that are wrapped inInferReqWrap
objects.-
__init__
(requests, callback, postprocess)¶ Initialization of the
InferRequestsQueue
.- Parameters
requests – A requests object from the execution network from
IECore
.callback – A custom callback that will be executed when an inference request is finished.
postprocess – A postprocess function that may or may not be in the custom callback function.
-
get_duration_in_seconds
()¶ Gets the total duration of inference in terms of seconds.
- Returns
total duration in seconds
-
get_idle_request
()¶ Gets an idle request.
- Returns
A request object that is idle.
-
put_idle_request
(req_id, latency)¶ Sets the request associated with
req_id
to idle.- Parameters
req_id – A request id associated with a request.
latency – The latency of the inference request.
- Returns
None
-
reset_times
()¶ Resets the inference times.
- Returns
None
-
wait_all
()¶ Waits for all inference requests to finish. This is particularly useful when all inputs have been put on the queue for execution. If called, this function will block the main thread until the requests have finished.
- Returns
None
-
-
core.python.utils.infer_util.
loader
(file)¶ Given a path
file
, this function converts this file type to a file type known by Open Seismic. The currently supported file types are.segy
,.npy
, and.dat
.- Parameters
file – Path to the file to be converted.
- Returns
The converted file
-
core.python.utils.infer_util.
segy_to_np
(filename)¶ Given a
file_path
of a segy file, this function converts the segy trace data to a numpy data representation.- Parameters
file_path – Path to the segy data.
- Returns
A tuple containing (1) NumPy data and (2) a dictionary with information from segy file.
JSON to Command Line Arguments¶
-
core.python.utils.jsonparse_util.
get_params_string
(filename)¶ A simple function that takes in a configuration file path
file_path
and parses it to convert the keys to command line tags and the values to their respective command line tag values.- Parameters
file_path – Path to JSON file.
- Returns
String representing arguments in a command line.
Model Paths Dictionary¶
This model_paths.py
file in the core/python/utils
folder maps Open Seismic model names
to a tuple containing (1) the xml path and (2) the bin path. The dictionary is structured
as follows:
fseg_bin = models_path + sep + 'fault' + sep + 'model' + sep + 'shp-fseg-60.bin'
salt_xml = models_path + sep + 'salt' + sep + 'model' + sep + 'saved_model.xml'
salt_bin = models_path + sep + 'salt' + sep + 'model' + sep + 'saved_model.bin'


Toggle navigation
Art of Fashion
About
My Account
Lookbooks
Contact
Create your own closet, and we'll do the work
so you don't have to
Twitter
Instagram
Facebook
1 / 6
2 / 6
3 / 6
4 / 6
5 / 6
6 / 6
❮
❯
Made By:
Twitter
Instagram
Facebook


| DOSE: |
15 mg |
smoked |
4-HO-MPT |
15mg vaporization 4-HO-MPT (freebase)
T 0:00:00 Substance vaporized in glass over steel wool.
T 0:00:05 Initial effects noted, coming strongly
T 0:00:10 Becoming saturated in the material, closing eyes and anticipating what more is to come
T 0:00:20 Feeling a dissolving, breakthrough experience. OEV very apparent and with much movement.
T 0:00:21-0:15:00 Time spent with eyes closed. Immersive fractal CEV fill the space, with an overlying presense of euphoria. A comfortable, lofty headspace occurs for this period in which one is away from reality
T 0:15:01-0:30:00 A declining comedown follows with still some dissociative thoughts
T 0:30:01-1:00:00 A decline towards baseline
T 1:00:01-2:00:00 Slight alertness, reaching a baseline eventually
Summary: Coming on very strong vaporized, such dosage provides breakthrough experiences. Calming and dissociative in its properties, supplying apparent CEV and OEV. It presents a tranquil escape from reality.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Functions | |
| bool | CxImage::Save (const TCHAR *filename, DWORD imagetype) |
| bool | CxImage::Encode (FILE *hFile, DWORD imagetype) |
| bool | CxImage::Encode (CxFile *hFile, DWORD imagetype) |
| bool | CxImage::Encode (CxFile *hFile, CxImage **pImages, int pagecount, DWORD imagetype) |
| bool | CxImage::Encode (FILE *hFile, CxImage **pImages, int pagecount, DWORD imagetype) |
| bool | CxImage::Encode (BYTE *&buffer, long &size, DWORD imagetype) |
| bool | CxImage::Encode2RGBA (CxFile *hFile, bool bFlipY=false) |
| bool | CxImage::Encode2RGBA (BYTE *&buffer, long &size, bool bFlipY=false) |
| bool CxImage::Encode | ( | BYTE *& | buffer, | |
| long & | size, | |||
| DWORD | imagetype | |||
| ) | [inherited] |
Saves to memory buffer the image in a specific format.
| buffer,: | output memory buffer pointer. Must be NULL, the function allocates and fill the memory, the application must free the buffer, see also FreeMemory(). | |
| size,: | output memory buffer size. | |
| imagetype,: | file format, see ENUM_CXIMAGE_FORMATS |
| bool CxImage::Encode | ( | FILE * | hFile, | |
| CxImage ** | pImages, | |||
| int | pagecount, | |||
| DWORD | imagetype | |||
| ) | [inherited] |
| bool CxImage::Encode | ( | CxFile * | hFile, | |
| CxImage ** | pImages, | |||
| int | pagecount, | |||
| DWORD | imagetype | |||
| ) | [inherited] |
Saves to disk or memory pagecount images, referenced by an array of CxImage pointers.
| hFile,: | file handle (CxMemFile or CxIOFile), with write access. | |
| pImages,: | array of CxImage pointers. | |
| pagecount,: | number of images. | |
| imagetype,: | can be CXIMAGE_FORMAT_TIF, CXIMAGE_FORMAT_GIF or CXIMAGE_FORMAT_ICO. |
| bool CxImage::Encode | ( | CxFile * | hFile, | |
| DWORD | imagetype | |||
| ) | [inherited] |
Saves to disk the image in a specific format.
| hFile,: | file handle (CxMemFile or CxIOFile), with write access. | |
| imagetype,: | file format, see ENUM_CXIMAGE_FORMATS |
| bool CxImage::Encode | ( | FILE * | hFile, | |
| DWORD | imagetype | |||
| ) | [inherited] |
Saves to disk the image in a specific format.
| hFile,: | file handle, open and enabled for writing. | |
| imagetype,: | file format, see ENUM_CXIMAGE_FORMATS |
| bool CxImage::Encode2RGBA | ( | BYTE *& | buffer, | |
| long & | size, | |||
| bool | bFlipY = false | |||
| ) | [inherited] |
exports the image into a RGBA buffer, Useful for OpenGL applications.
| buffer,: | output memory buffer pointer. Must be NULL, the function allocates and fill the memory, the application must free the buffer, see also FreeMemory(). | |
| size,: | output memory buffer size. | |
| bFlipY,: | direction of Y axis. default = false. |
| bool CxImage::Encode2RGBA | ( | CxFile * | hFile, | |
| bool | bFlipY = false | |||
| ) | [inherited] |
exports the image into a RGBA buffer, Useful for OpenGL applications.
| hFile,: | file handle (CxMemFile or CxIOFile), with write access. | |
| bFlipY,: | direction of Y axis. default = false. |
| bool CxImage::Save | ( | const TCHAR * | filename, | |
| DWORD | imagetype | |||
| ) | [inherited] |
Saves to disk the image in a specific format.
| filename,: | file name | |
| imagetype,: | file format, see ENUM_CXIMAGE_FORMATS |


klippy
is not available from CRAN, but you can install the development version from GitHub with:
As an intensive reader of R Markdown books and documents (thanks to knitr
), I selected on my screen dozens of R code blocks then press Ctrl+C
…
This package is a very small, but I hope helpful add-in for R Markdown to improve the reader experience.
For supported browsers, see clipboard.js
documentation.


Court: Executive Office has power to compensate institutional abuse victims in NI
The Court of Appeal in Northern Ireland has ruled that the Executive Office has the power to introduce a compensation scheme for victims of historical institutional abuse.
It follows a case brought by a survivor of historical abuse, referred to in court as JR80, to see compensation payments made to victims in the absence of devolved ministers.
Appeal court judges found that what children suffered in state and church-run homes between 1922 and 1995 amounted to torture.
The ruling comes as Westminster considers legislation to introduce compensation payments before Parliament is dissolved on Tuesday ahead of the General Election.
A redress scheme was recommended by the Historical Institutional Abuse Inquiry in 2017. However, the Northern Ireland Assembly collapsed before it could be enacted.
JR80, an elderly man who was subjected to physical and sexual mistreatment in children’s homes run by religious orders and the state, took a judicial review to force the Executive Office or Northern Ireland Secretary Julian Smith to bring forward the compensation scheme.
Today, the Court of Appeal concluded that the Executive Office does have the power to act in the absence of ministers.
The judgment noted the 2018 Northern Ireland Act which gave senior civil servants more legal clarity to make decisions in the absence of ministers, and said it “permits the Executive Office to exercise the prerogative in relation to the recommendation for example by establishing an ex gratia redress scheme”.
It found that the Secretary of State does not have the power to act, but should “consider giving a direction to the Executive Office”.
Abuse survivors celebrated the ruling as a victory outside court.
Margaret McGuckin, leader of Savia (Survivors & Victims of Institutional Abuse), also called for a public apology from the Executive Office to victims.
“So many of our victims, many who have now passed away, were not able to feed off this money, maybe even to pay for their own funerals, to make life a little better,” Ms McGuckin said.
“Now we head to Westminster and, if this legislation is not passed tomorrow, they (Executive Office) need to be starting this today and getting this scheme set up for all these people who have suffered terribly.
“We need an apology from them (the Executive Office), we really need an apology because they failed us.”
READ MORE
Paramilitarism remains a stark reality in Northern Ireland, report finds


--- layout: layout title: About titleinfo: pornvd desc: Alex Gibson is a front-end web developer from Newcastle upon Tyne, United Kingdom. canonical: '/about/' ---
My name is Alex Gibson. I'm a front-end web developer living in Newcastle upon Tyne, United Kingdom. I work for Mozilla. This is my personal blog.
You can find me online in the following places:
You can also find me over at keybase.io, where you can view websites and social accounts I have associated and verified using my public key.
All original content on this site is licensed under a Creative Commons License. All original source code is MIT Licensed unless stated otherwise.
This site is built using Jekyll and hosted on Surge. If you spot a mistake, inaccuracy or typo, please feel free to submit a pull request on Github.


SWF files are used by Adobe Flash (AKA Shockwave Flash, Macromedia Flash) to encode rich interactive multimedia content and are, essentially, a container for special bytecode instructions to play back that content. In early 2000s, it was dominant rich multimedia web format (.swf files were integrated into web pages and played back with a browser plugin), but its usage largely declined in 2010s, as HTML5 and performant browser-native solutions (i.e. JavaScript engines and graphical approaches, such as WebGL) emerged.
There are a lot of versions of SWF (~36), format is somewhat documented by Adobe.
This page hosts a formal specification of Adobe Flash (AKA Shockwave Flash, Macromedia Flash) using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.
meta:
id: swf
title: Adobe Flash (AKA Shockwave Flash, Macromedia Flash)
file-extension: swf
xref:
justsolve: SWF
pronom: fmt/507
# - fmt/{505..507} # Adobe Flash {8..10}
# - fmt/{757..776} # Adobe Flash {11..30}
loc:
- fdd000130 # SWF 7
- fdd000248 # SWF 8
mime: application/x-shockwave-flash
wikidata: Q594447
tags:
- executable
- media
license: CC0-1.0
endian: le
# imports:
# - abc_bytecode
doc: |
SWF files are used by Adobe Flash (AKA Shockwave Flash, Macromedia
Flash) to encode rich interactive multimedia content and are,
essentially, a container for special bytecode instructions to play
back that content. In early 2000s, it was dominant rich multimedia
web format (.swf files were integrated into web pages and played
back with a browser plugin), but its usage largely declined in
2010s, as HTML5 and performant browser-native solutions
(i.e. JavaScript engines and graphical approaches, such as WebGL)
emerged.
There are a lot of versions of SWF (~36), format is somewhat
documented by Adobe.
doc-ref: https://open-flash.github.io/mirrors/swf-spec-19.pdf
seq:
- id: compression
-orig-id: Signature
type: u1
enum: compressions
- id: signature
-orig-id: Signature
contents: "WS"
- id: version
-orig-id: Version
type: u1
- id: len_file
-orig-id: FileLength
type: u4
- id: plain_body
size-eos: true
type: swf_body
if: compression == compressions::none
- id: zlib_body
size-eos: true
process: zlib
type: swf_body
if: compression == compressions::zlib
types:
swf_body:
seq:
- id: rect
type: rect
- id: frame_rate
type: u2
- id: frame_count
type: u2
- id: file_attributes_tag
type: tag
if: _root.version >= 8
- id: tags
type: tag
repeat: eos
rect:
seq:
- id: b1
type: u1
- id: skip
size: num_bytes
instances:
num_bits:
value: b1 >> 3
num_bytes:
value: ((num_bits * 4 - 3) + 7) / 8
rgb:
seq:
- id: r
type: u1
- id: g
type: u1
- id: b
type: u1
tag:
seq:
- id: record_header
type: record_header
- id: tag_body
size: record_header.len
type:
switch-on: record_header.tag_type
cases:
'tag_type::define_sound': define_sound_body
'tag_type::do_abc': do_abc_body
'tag_type::script_limits': script_limits_body
'tag_type::symbol_class': symbol_class_body
'tag_type::set_background_color': rgb
'tag_type::export_assets': symbol_class_body
define_sound_body:
seq:
- id: id
-orig-id: SoundId
type: u2
- id: format
-orig-id: SoundFormat
type: b4
- id: sampling_rate
-orig-id: SoundRate
type: b2
enum: sampling_rates
doc: Sound sampling rate, as per enum. Ignored for Nellymoser and Speex codecs.
- id: bits_per_sample
-orig-id: SoundSize
type: b1
enum: bps
- id: num_channels
-orig-id: SoundType
type: b1
enum: channels
- id: num_samples
type: u4
enums:
sampling_rates:
0: rate_5_5_khz
1: rate_11_khz
2: rate_22_khz
3: rate_44_khz
bps:
0: sound_8_bit
1: sound_16_bit
channels:
0: mono
1: stereo
do_abc_body:
seq:
- id: flags
type: u4
- id: name
type: strz
encoding: ASCII
- id: abcdata
size-eos: true
#type: abc_bytecode
script_limits_body:
seq:
- id: max_recursion_depth
type: u2
- id: script_timeout_seconds
type: u2
symbol_class_body:
seq:
- id: num_symbols
type: u2
- id: symbols
type: symbol
repeat: expr
repeat-expr: num_symbols
types:
symbol:
seq:
- id: tag
type: u2
- id: name
type: strz
encoding: ASCII
record_header:
seq:
- id: tag_code_and_length
type: u2
- id: big_len
type: s4
if: small_len == 0x3f
instances:
tag_type:
value: 'tag_code_and_length >> 6'
enum: tag_type
small_len:
value: 'tag_code_and_length & 0b111111'
len:
value: 'small_len == 0x3f ? big_len : small_len'
enums:
compressions:
0x46: none # F
0x43: zlib # C
0x5a: lzma # Z
tag_type:
0: end_of_file
4: place_object
5: remove_object
9: set_background_color
14: define_sound
26: place_object2
28: remove_object2
43: frame_label
56: export_assets
65: script_limits
69: file_attributes
70: place_object3
76: symbol_class
77: metadata
78: define_scaling_grid
82: do_abc
86: define_scene_and_frame_label_data


Vue2 Google Maps - Examples
Demo Samples (using Vue component files)
-
All Components.
A semi-unofficial suite of most features. Until automated tests are
available, please ensure that all features on this page works.
Built using Webpack
-
List of simple demos.
-
Semi-automatically generated API
documentation dump.
Demo Samples (using pure HTML+JS)
-
Ground overlay on a Google Map.
Demonstrates how custom components can be written for Google Maps
using this library.
Built using Standalone
-
Basic tests on map centering and zoom.
-
Basic tests on map centering two-way binding.
-
Test Map Type Id Changes (#117).
-
Basic markers on a map.
-
Single infowindow with multiple markers.
A quick and easy solution to have only 1 infowindow shown with multiple markers.
-
Basic markers with clustering.
-
Basic markers with shape.
-
Place Input (deprecated).
-
Autocomplete.
-
Map Functions.
-
Street View Panorama (Experimental).
-
Resize Bus.
-
Map Destroy.
-
Info bars.
-
Polyline editing.
-
Polygon editing (simple).
-
Polygon editing (advanced).


|
Panda3D
|
Rotation Limit structure for generic joints. More...
Public Member Functions | |
| __init__ (const BulletRotationalLimitMotor copy) | |
| float | getAccumulatedImpulse () |
| float | getCurrentError () |
| int | getCurrentLimit () |
| Retrieves the current value of angle: 0 = free, 1 = at low limit, 2 = at high limit. More... | |
| float | getCurrentPosition () |
| bool | getMotorEnabled () |
| bool | isLimited () |
| setBounce (float bounce) | |
| setDamping (float damping) | |
| setHighLimit (float limit) | |
| setLowLimit (float limit) | |
| setMaxLimitForce (float force) | |
| setMaxMotorForce (float force) | |
| setMotorEnabled (bool enable) | |
| setNormalCfm (float cfm) | |
| setSoftness (float softness) | |
| setStopCfm (float cfm) | |
| setStopErp (float erp) | |
| setTargetVelocity (float velocity) | |
Public Attributes | |
| float | accumulated_impulse |
| float | current_error |
| int | current_limit |
| Retrieves the current value of angle: 0 = free, 1 = at low limit, 2 = at high limit. More... | |
| float | current_position |
| bool | limited |
| bool | motor_enabled |
Rotation Limit structure for generic joints.
| __init__ | ( | const BulletRotationalLimitMotor | copy | ) |
| float getAccumulatedImpulse | ( | ) |
| float getCurrentError | ( | ) |
| int getCurrentLimit | ( | ) |
Retrieves the current value of angle: 0 = free, 1 = at low limit, 2 = at high limit.
| float getCurrentPosition | ( | ) |
| bool getMotorEnabled | ( | ) |
| bool isLimited | ( | ) |
| setBounce | ( | float | bounce | ) |
| setDamping | ( | float | damping | ) |
| setHighLimit | ( | float | limit | ) |
| setLowLimit | ( | float | limit | ) |
| setMaxLimitForce | ( | float | force | ) |
| setMaxMotorForce | ( | float | force | ) |
| setMotorEnabled | ( | bool | enable | ) |
| setNormalCfm | ( | float | cfm | ) |
| setSoftness | ( | float | softness | ) |
| setStopCfm | ( | float | cfm | ) |
| setStopErp | ( | float | erp | ) |
| setTargetVelocity | ( | float | velocity | ) |
| float accumulated_impulse |
| float current_error |
| int current_limit |
Retrieves the current value of angle: 0 = free, 1 = at low limit, 2 = at high limit.
| float current_position |
| bool limited |
| bool motor_enabled |