The Tyndall25 module has an Atmega 128L processor, 128-Kbyte self-programming Flash Program Memory, 4-Kbyte SRAM, 4-Kbyte EEPROM, and 64K of optional external memory. i.e. 128K bytes.
Here is a programming board with a Tyndall25 mote attached. It has two programmable green LEDs, a UART connection (upper-left), and a JTAG interface (upper-right). A red LED next to the power plug indicates whether the unit is powered on.
.
Here is a Tyndall25 mote an its battery pack.
Here is a programming board connected to the PC via a JTAG board. Note that the serial cable connected to the programming board's UART is not connected. After flashing the mote's memory using the JTAG, swap the JTAG board with the serial cable so the mote can communicate with the PC.
First install TinyOS and Agilla as described here. Note that the instructions tell you to download the latest version of Agilla off of TinyOS's CVS repository. An older version of Agilla released on 8/17/2005 is available, but it only supports weak migrations, and remote tuple space operations across the UART. It comes in two parts: A NesC part, and a Java part. I recommend not using this version, but rather the version that's on the TinyOS CVS repository.
Before you can compile Agilla for the Tyndall25 platform, you must install the platform-specific code, which can be downloaded here. Version 0.7 is for the Tyndall25 motes with the Nordic nRF2401 radio and TriCOME TCA10FR 2.4GHz embedded antenna. Version 0.8 is for the version that has Zigbee. Agilla has only been tested using the Nordic Radios.
After installing all of the packages (TinyOS, NesC, Tyndall25), you should have the following packages:
liang@herd /opt/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla $ rpm -qa tinyos-tools-1.1.0-1 task-tinydb-1.1.3July2004cvs-1 tinyos-contrib-1.1.3Mar2005cvs-1 avr-insight-6.3-1 avarice-2.0.20030825cvs-1w avr-gcc-3.3tinyos-1w tos_dsys-0.7-1 mspgcc-win32tinyos-20041204-2 make-3.80tinyos-1 tinyos-1.1.14Jul2005cvs-1 mate-asvm-2.2.2Apr2005-1 avr-libc-20030512cvs-1w avr-binutils-<IP_ADDRESS>-1w nesc-1.1.2b-1
To get proper reset functionality, open $TOSROOT/tos/system/Reset.h and comment
out lines 47 and 53. The method resetMote()
should look like the following:
void resetMote() { //#if defined(PLATFORM_MICA) || defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) cli(); wdt_enable(0); while (1) { __asm__ __volatile__("nop" "\n\t" ::); } //#endif }
** Note: The following two changes are specific to TinyOS 1.1.14 and the dsys25 0.7 rpms. If you're not running these versions, you may not have to make these changes.
Add the following to $TOSROOT/tos/platform/dsys25/avrhardware.h
:
inline void __nesc_atomic_sleep() { /* Atomically enable interrupts and sleep */ sei(); // Make sure interrupts are on, so we can wake up! asm volatile ("sleep"); TOSH_wait(); }
Add the following lines of code to $TOSROOT/tos/platform/dsys25/HPLPowerManagementM.nc
:
async command result_t PowerManagement.enable() { return SUCCESS; } async command result_t PowerManagement.disable() { return SUCCESS; }
Add the following line in /etc/profile
:
export JTAG=/dev/ttyS0This is assuming you have the JTAG board connected to COM1. Adjust
/dev/ttyS0
to match whatever COMM port the Tyndall25 is connected
to.
There are two green LEDs on the Tyndall25 programming board. The mote itself
does not have any LEDs. The default files in package tos_dsys-0.7-1
only allows you to
control
the LED closer to the UART using the "red" interface provided by
the LedsC component. To get both LEDs working, download the following
hardware.h file and save it in $TOSROOT/tos/platform/dsys25/
replacing
the existing hardware.h file (be sure to make a backup of the original!). With
this new file, you can control the LED closer to the UART using the "green"
LED and the LED closer to the power using the "red" led interface
provided by LedsC.
I have found that the Tyndall25 is very sensitive to the fuse settings. The fuse settings can be set using ATMEL's AVR Studio v3.56. Download and install this program. After launching the program, hit alt+F8 or go to Tools/JTAG ICE. This will open a JTAG ICE window with several tabbed panes. Click on the "Fuses" tab and check to ensure that the fuse settings match those shown below:
If you get a "Detecting.. FAILED!" error, make sure all connectors are secure and power-cycle the mote.
First compile Agilla's firmware:
liang@spud ~ $ cd $TOSROOT/contrib/wustl/apps/Agilla liang@spud /opt/tinyos-1.x/contrib/wustl/apps/Agilla $ make dsys25 compiling Agilla to a dsys25 binary ncc -o build/dsys25/main.exe -Os -board= -target=dsys25 -g -DTOSH_DATA_LENGTH=27 -DAGILLA_NUM_AGENTS=3 -DAGILLA_NETWORK_INTERFACE_RECEIVE_QUEUE_SIZE=4 -DAGILLA_ NETWORK_INTERFACE_SEND_QUEUE_SIZE=4 -DAGILLA_SNDR_BUFF_SIZE=1 -DAGILLA_SNDR_RETR Y_TIMER=512 -DAGILLA_SNDR_MAX_RETRIES=2 -DAGILLA_SNDR_RXMIT_TIMER=290 -DAGILLA_S NDR_MAX_RETRANSMITS=4 -DAGILLA_RCVR_ABORT_TIMER=1000 -DAGILLA_RCVR_FIN_TIMER=300 -DAGILLA_MAX_NUM_NEIGHBORS=20 -DAGILLA_REMOTE_TS_OP_Q_SIZE=3 -DAGILLA_TS_SIZE=1 00 -DAGILLA_RTS_TIMEOUT=256 -DAGILLA_RTS_MAX_NUM_TRIES=4 -DAGILLA_TS_BOUNCEQ_SIZ E=2 -DREACTION_MGR_BUFFER_SIZE=5 -DBEACON_PERIOD=2048 -DBEACON_RAND=1024 -DBEACO N_TIMEOUT=9216 -DENABLE_SPACE_LOCALIZER=1 -DOMIT_AGENT_SENDER=0 -DOMIT_AGENT_REC EIVER=0 -DOMIT_CONTEXT_DISCOVERY=0 -DINCLUDE_DEFAULT_AGENT=0 -I components/Conte xtDiscovery -I components/AgentReceiver -I components/AgentSender -I components/ NetworkInterface -I components -I opcodes -I contexts -I types -I interfaces -I ../SpaceLocalizer -I ../LEDBlinker -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc -all -finline-limit=100000 -fnesc-cfile=build/dsys25/app.c Agilla.nc -lm C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/dsys25/nRF2401_PEFRG_RadioIntM.nc:6 78: warning: `DutyCycleTimer.start' called asynchronously from `nRF2401Control.P ktRX' C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/dsys25/nRF2401_PEFRG_RadioIntM.nc:6 77: warning: `DutyCycleTimer.stop' called asynchronously from `nRF2401Control.Pk tRX' compiled Agilla to build/dsys25/main.exe 43580 bytes in ROM 2911 bytes in RAM avr-objcopy --output-target=srec build/dsys25/main.exe build/dsys25/main.srec
Next write Agilla's firmware onto the Tyndall25 mote. Be sure the "JTAG" environment variable is set correctly:
liang@spud /opt/tinyos-1.x/contrib/wustl/apps/Agilla $ make dsys25 reinstall.0 installing dsys25 binary set-mote-id build/dsys25/main.srec build/dsys25/main.srec.0.out `echo reinstall. 0 |perl -pe 's/^reinstall.//; $_=hex if /^0x/i;'` ice-insight build/dsys25/main.srec.0.out AVaRICE version 2.0.20030825cvs, Aug 25 2003 20:53:25 JTAG config starting. Hardware Version: 0xc1 Software Version: 0x7e Reported JTAG device ID: 0x9702 Configured for device ID: 0x9702 atmega128 -- Matched with atmega128 LockBits -> 0xff Reading Fuse Bytes: Extended Fuse byte -> 0xff High Fuse byte -> 0x19 Low Fuse byte -> 0xff JTAG config complete. Downloading FLASH image to target............................................... ................................................................................ ................................................................................ ................................................................................ ....................................................... Download complete. Waiting for connection on port 6423. Connection opened by host <IP_ADDRESS>, port 1622. gdb exited.
The following GUI will appear:
Just close it. Now swap the JTAG programmer with the Tyndall25's UART port. Also power cycle the programming board.
First make sure you have a Makefile.Agilla
file in $TOSROOT/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/
.
This file should contain:
#MIG = mig -target=pc java MIG = mig java
Next compile the AgentInjector:
$ cd $TOSROOT/contrib/wustl/tools/java/ $ make
After compiling the AgentInjector, start it using the following command:
$ java -Djava.security.policy=java.policy edu.wustl.mobilab.agilla.AgentInjector -comm COM1:19200 -dThe following GUI should appear:
To test Agilla, first inject the following simple agent into node 0 at (1,1):
BEGIN pushc 25 // toggle red putled pushc 1 sleep rjump BEGIN
The "red" LED, which is the one closer to the power plug assuming you installed the new hardware.h file mentioned above, should now be blinking. Here is the output for a successful agent injection:
liang@spud /opt/tinyos-1.x/contrib/wustl/tools/java $ java -Djava.security.policy=java.policy edu.wustl.mobilab.agilla.AgentInjecto r -comm COM1:19200 -d AgentInjector: Created MoteIF: COM1:19200 serial@COM1:19200: resynchronising Injecting Agent to 0 AgentSender: Sending Agent: ID: [AgillaAgentID: 0] PC: 0 Condition: 0 OpStack: [empty] Heap: [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid ], [invalid], [invalid], [invalid], [invalid], [invalid] Reactions: [none] Code: 0xd9 0x16 0xc1 0x13 0xbc AgentSender: PendingAgent: nCodeBlocks = 1 AgentSender: PendingAgent: nHeapMsgs = 0 AgentSender: PendingAgent: nOSMsgs = 0 AgentSender: PendingAgent: nRxnMsgs = 0 AgentSender: SendState(): StateMsg: STATE MESSAGE: AgentID = [AgillaAgentID: 0] Dest = 0 Reply Address = 126 Stack Pointer = 0 Opcode = 23 Condition = 0 Codesize = 5 Number of Heap Msgs = 0 Number of Reaction Msgs = 0 AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... AgentSender: SendState(): ACK ACCEPTED state message. AgentSender: SendCode(): CODE message 0: CODE MESSAGE: [AgillaAgentID: 0] MsgNum: 0 Code: 0:0xd9 1:0x16 2:0xc1 3:0x13 4:0xbc 5:0x00 6:0x00 7:0x00 8:0x00 9 :0x00 10:0x00 11:0x00 12:0x00 13:0x00 14:0x00 15:0x00 16:0x00 17:0x00 18:0x00 19:0x00 20:0x00 21:0x00 AgentSender: SendCode(): Sending CODE message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendCode(): Received ACK for Code message 0, ACCEPTED AgentSender: SendCode(): Sent Code. AgentSender: Done sending agent..
Sometimes you may encounter the following error when injecting an agent:
gentInjector: Created MoteIF: COM1:19200 serial@COM1:19200: resynchronising Injecting Agent to 0 AgentSender: Sending Agent: ID: [AgillaAgentID: 0] PC: 0 Condition: 0 OpStack: [empty] Heap: [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid] Reactions: [none] Code: 0xd9 0x16 0xc1 0x13 0xbc AgentSender: PendingAgent: nCodeBlocks = 1 AgentSender: PendingAgent: nHeapMsgs = 0 AgentSender: PendingAgent: nOSMsgs = 0 AgentSender: PendingAgent: nRxnMsgs = 0 AgentSender: SendState(): StateMsg: STATE MESSAGE: AgentID = [AgillaAgentID: 0] Dest = 0 Reply Address = 126 Stack Pointer = 0 Opcode = 23 Condition = 0 Codesize = 5 Number of Heap Msgs = 0 Number of Reaction Msgs = 0 AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... TimoutTimer: TIMED OUT! AgentSender: SendState(): Timed out while waiting for ack from 0, nTries = 1... AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... TimoutTimer: TIMED OUT! AgentSender: SendState(): Timed out while waiting for ack from 0, nTries = 2... AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... TimoutTimer: TIMED OUT! AgentSender: SendState(): Timed out while waiting for ack from 0, nTries = 3... AgentSender: SendState(): Sending state message to 0...
When this happens, make sure all connectors are tight and power-cycle the mote. Sometimes rebooting the PC also helps.
Taking sensor readings. To test whether sensor data can be delivered to the base station, inject the following agent into node (1,1):
pushc 0 setvar 0 BEGIN pushc 25 putled // toggle "red" LED getvar 0 copy inc setvar 0 pushc accelx sense // sense x axis of accelerometer pushc 2 pushloc uart_x uart_y rout // remote out tuple containing accelx reading to laptop pushc 1 sleep rjump BEGIN
You should now see the "red" LED blink and the following output on your base station:
liang@spud /opt/tinyos-1.x/contrib/wustl/tools/java $ java -Djava.security.policy=java.policy edu.wustl.mobilab.agilla.AgentInjecto r -comm COM1:19200 -d serial@COM1:19200: resynchronising AgentInjector: Created MoteIF: COM1:19200 Injecting Agent to 0 AgentSender: Sending Agent: ID: [AgillaAgentID: 0] PC: 0 Condition: 0 OpStack: [empty] Heap: [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid ], [invalid], [invalid], [invalid], [invalid], [invalid] Reactions: [none] Code: 0xc0 0x70 0xd9 0x16 0x60 0x10 0x0b 0x70 0xc6 0x1f 0xc2 0x52 0x00 0x01 0x39 0xc1 0x13 0xb1 AgentSender: PendingAgent: nCodeBlocks = 1 AgentSender: PendingAgent: nHeapMsgs = 0 AgentSender: PendingAgent: nOSMsgs = 0 AgentSender: PendingAgent: nRxnMsgs = 0 AgentSender: SendState(): StateMsg: STATE MESSAGE: AgentID = [AgillaAgentID: 0] Dest = 0 Reply Address = 126 Stack Pointer = 0 Opcode = 23 Condition = 0 Codesize = 18 Number of Heap Msgs = 0 Number of Reaction Msgs = 0 AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... AgentSender: SendState(): ACK ACCEPTED state message. AgentSender: SendCode(): CODE message 0: CODE MESSAGE: [AgillaAgentID: 0] MsgNum: 0 Code: 0:0xc0 1:0x70 2:0xd9 3:0x16 4:0x60 5:0x10 6:0x0b 7:0x70 8:0xc6 9 :0x1f 10:0xc2 11:0x52 12:0x00 13:0x01 14:0x39 15:0xc1 16:0x13 17:0xb1 18:0x00 19:0x00 20:0x00 21:0x00 AgentSender: SendCode(): Sending CODE message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendCode(): Received ACK for Code message 0, ACCEPTED AgentSender: SendCode(): Sent Code. AgentSender: Done sending agent. TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 0] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 1] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 2] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 3] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 4] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 5]
Notice the resulting tuples containing sensor information is being inserted into the AgentInjector's local tuple space.
Migration. To test whether an agent can migrate between two nodes, program another mote with address 1:
liang@spud /opt/tinyos-1.x/contrib/wustl/apps/Agilla $ make reinstall.1 dsys25 installing dsys25 binary set-mote-id build/dsys25/main.srec build/dsys25/main.srec.1.out `echo reinstall. 1 |perl -pe 's/^reinstall.//; $_=hex if /^0x/i;'` ice-insight build/dsys25/main.srec.1.out AVaRICE version 2.0.20030825cvs, Aug 25 2003 20:53:25 JTAG config starting. Hardware Version: 0xc1 Software Version: 0x7e Reported JTAG device ID: 0x9702 Configured for device ID: 0x9702 atmega128 -- Matched with atmega128 LockBits -> 0xff Reading Fuse Bytes: Extended Fuse byte -> 0xff High Fuse byte -> 0x19 Low Fuse byte -> 0xff JTAG config complete. Downloading FLASH image to target............................................... ................................................................................ ................................................................................ ................................................................................ ....................................................... Download complete. Waiting for connection on port 6423. Connection opened by host <IP_ADDRESS>, port 1816. gdb exited.
Next, with mote 0 attached to the programming board and mote 1 powered up, launch the AgentInjector and inject the following agent:
BEGIN pushc 25 putled // toggle the red LED pushc 2 sleep // sleep for 1 second pushc 25 putled // toggle the red LED addr pushc 0 ceq rjumpc GOTO1 GOTO0 pushc 0 wmove pushc 28 putled // toggle yellow LED when migration fails halt GOTO1 pushc 1 wmove pushc 28 putled // toggle yellow LED when migration fails haltYou should now see the green LED closer to the power plug of both motes blink alternatively. This demonstrates an agent migrating between the two motes. Note that the reliability of agent migration on the Tyndall25 platform is still fairly poor and slow. It appears as though the nordic radio is more lossy than the CC1000 radios on a Mica2.
Remote Tuple Space Operations. This example is a slight extension to the Taking Sensor Readings example given above. The main difference is instead of injecting the sensing agent onto mote 0, inject it onto mote 1. You should see the following output:
liang@spud /opt/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla $ java -Djava.security.policy=java.policy edu.wustl.mobilab.agilla.AgentInjecto r -comm COM1:19200 -d No agilla.properties file file. Consider creating an agilla.properties file in contrib/wustl/tools/java. See README for details AgentInjector: Created MoteIF: COM1:19200 serial@COM1:19200: resynchronising Injecting Agent to 0 AgentSender: Sending Agent: ID: [AgillaAgentID: 0] PC: 0 Condition: 0 OpStack: [empty] Heap: [invalid], [invalid], [invalid], [invalid], [invalid], [invalid], [invalid ], [invalid], [invalid], [invalid], [invalid], [invalid] Reactions: [none] Code: 0xc0 0x70 0xd9 0x16 0x60 0x10 0x0b 0x70 0xc6 0x1f 0xc2 0x52 0x00 0x01 0x39 0xc1 0x13 0xb1 AgentSender: PendingAgent: nCodeBlocks = 1 AgentSender: PendingAgent: nHeapMsgs = 0 AgentSender: PendingAgent: nOSMsgs = 0 AgentSender: PendingAgent: nRxnMsgs = 0 AgentSender: SendState(): StateMsg: STATE MESSAGE: AgentID = [AgillaAgentID: 0] Dest = 0 Reply Address = 126 Stack Pointer = 0 Opcode = 23 Condition = 0 Codesize = 18 Number of Heap Msgs = 0 Number of Reaction Msgs = 0 AgentSender: SendState(): Sending state message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendState(): Awaiting ACK for state message from 0... AgentSender: SendState(): ACK ACCEPTED state message. AgentSender: SendCode(): CODE message 0: CODE MESSAGE: [AgillaAgentID: 0] MsgNum: 0 Code: 0:0xc0 1:0x70 2:0xd9 3:0x16 4:0x60 5:0x10 6:0x0b 7:0x70 8:0xc6 9 :0x1f 10:0xc2 11:0x52 12:0x00 13:0x01 14:0x39 15:0xc1 16:0x13 17:0xb1 18:0x00 19:0x00 20:0x00 21:0x00 AgentSender: SendCode(): Sending CODE message to 0... TimoutTimer: Starting TimeoutTimer, duration 512 AgentSender: SendCode(): Received ACK for Code message 0, ACCEPTED AgentSender: SendCode(): Sent Code. AgentSender: Done sending agent. TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 0] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 1] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 2] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 3] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 4] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 5] TupleSpace: processRequest(): OUTing tuple: TUPLE: flags = 0x0, numFields = 2 Field 0: [reading type = ACCEL_X, reading = 65535] Field 1: [value: 6]
The sensor readings are being sent over a wireless link to the base station.
The main obstacle with porting Agilla over to the Tyndall25 mote platform is the fact that it limits packets to have a maximum size of 27 bytes, and it has a maximum of 21 timers.
This webpage was last updated on November 18, 2005 9:33 AM by Chien-Liang Fok.


| AvgICTFFeatureExtractor<T> |
Average Inverse DocumentCollection Term Frequency as defined in
Carmel, Yom-Tov Estimating query difficulty for Information Retrieval
log(|D| / tf)
|
| AvgIDFFeatureExtractor<T> |
Average IDF, idf calculated using log( 1+ (N - N_t + 0.5)/(N_t + 0.5))
where N is the total number of docs, calculated like in BM25
|
| BM25FeatureExtractor<T> |
This feature extractor will compute BM25 score as according to Lucene 5.3 documentation
The formula is the same, but the computation of docSize is slghtly different,
Lucene uses the norm value encoded in the index, we are calculating it as is
also we do not have any boosting, the field norm is also not available
|
| DocSizeFeatureExtractor<T> |
Returns the size of the document
|
| MatchingTermCount<T> |
Computes the number of query terms that are found in the document.
|
| PMIFeatureExtractor<T> |
PMI implemented as
PMI(t1, t2) = log (Pr(t1, t2|D) / Pr(t1|D)Pr(t2|D)),
where pr are the MLE
described on page 22 of Carmel, Yom-Tov 2010
|
| QueryLength<T> |
QueryCount
Compute the query length (number of terms in the query).
|
| SCQFeatureExtractor<T> |
This feature computes collection query similarity, avgSCQ defined as
Avg( (1 + log(tf(t,D))) * idf(t)) found on page 33 of Carmel, Yom-Tov 2010
D is the collection term frequency
|
| SimplifiedClarityFeatureExtractor<T> |
SCS = sum (P[t|q]) * log(P[t|q] / P[t|D])
page 20 of Carmel, Yom-Tov 2010
|
| SumMatchingTf<T> |
Computes the sum of the term frequencies of the matching terms.
|
| TermFrequencyFeatureExtractor<T> |
Computes the sum of termfrequencies for each query token
|
| TFIDFFeatureExtractor<T> |
Computes the TFIDF feature according to Lucene's formula,
Not the same because we don't compute length norm or query norm, with boost 1
|
| UniqueTermCount<T> |
Count of unique query terms
|


YouTube External Subtitle
Toggle navigation
Illumina SBS video with Eric's comments in captions. Sorry, fullscreen not available with captions.


Welcome to Kavish's Website!
Click here
My favorite dessert(or piece of candy!) is a Milk chocalate Hersheys candy bar


LiMA (Living Meta-Analysis) Invite Codes
Paste your codes here and then print
test # paste your codes here and then print
LiMA
Living Meta–Analysis
Invitation
your code:
lima.soc.port.ac.uk


Editing
There are situations when the end user need to edit data, in this case the q-grid provides a lot of possibilities.
Edit Cell
Setup edit mode equals to cell
to turn on editing. Use canEdit
column attribute to disable editing of particular columns.
<q-grid editMode="cell">
<q-grid-column key="birth" canEdit="false"></q-grid-column>
</q-grid>
Edit Model
Edit model could give extended control over data edit, to access these possibilities use model.edit()
type.
const { commit, commitShortcuts, state } = myGridModel.edit();
Edit State
Indicates the current q-grid status in term of data manipulation.
view
means that q-grid now is in the data browsing mode.edit
indicates that q-grid editor is opened.startBatch
andendBatch
show status of the batch edit.
Edit commands & shortcuts
Use commands to have a global control over q-grid editing. Use shortcuts that have {columnType: [keyboardKey]}
type to setup editing shortcuts.
gridModel.edit({
enter: {
canExecute: e => e.column.class === 'data'
},
commitShortcuts: {
'$default': 'tab|shift+tab|enter|ctrl+s',
'reference': 'ctrl+s',
'form': 'ctrl+s',
'bool': 'tab|shift+tab|left|right|up|down|home|end|pageUp|pageDown'
}
});
Batch Edit
Use editMethod
property to activate batch editing, this method activates cell handler that could be dragged to apply start cell value to the selected cells.
<q-grid editMode="cell" editMethod="batch"></q-grid>
Dropdown & Autocomplete
To populate list of items in dropdown/autocomplete columns use fetch
editor property. Fetch option supports next data types.
- Array of objects or basic types.
- Function that returns array of basic types/objects/observables/promises.
- Observable with an array argument.
- Promise with an array argument.
import { of } from 'rxjs';
@Component({
template: `
<q-grid editMode="cell">
<q-grid-columns>
<q-grid-column key="number" editor="dropdown" [editorOptions]="dropdownOptions">
</q-grid-column>
</q-grid-columns>
</q-grid>
`,
})
export class MyComponent {
dropdownOptions = {
fetch: of([Math.PI, Math.LN10, Math.LN2, Math.E, Math.LOG10E, Math.LOG2E, Math.SQRT1_2])
};
}
Edit Row
Use edit trigger component to show auto generated form that allows to change appropriate row data.
<q-grid [rows]="rows | async" [columns]="columns" editMode="row">
<q-grid-columns>
<q-grid-column key="editForm" type="row-options" pin="left">
<ng-template for="body" let-$cell>
<q-grid-edit-form-trigger [caption]="$cell.row.name" [cell]="$cell">
</q-grid-edit-form-trigger>
</ng-template>
</q-grid-column>
</q-grid-columns>
</q-grid>
Data Manipulation
Use Data Manipulation plugin to extend the q-grid with additional edit options. Please note that options and indicator column are not required to be present in the particular q-grid.
- Add new rows through the action bar.
- Delete rows using
row options
column. - Cell and row color coding.
- If
row indicator
column exists it will be used to show row status. - Access to the touched entities through the
dataManipulation
model.
import { Grid, GridModel } from 'ng2-qgrid';
@Component({
selector: 'my-component',
template: `
<q-grid [model]="gridModel">
<q-grid-columns generation="deep">
<q-grid-column key="rowIndicator" type="row-indicator"></q-grid-column>
<q-grid-column key="rowOptions" type="row-options"></q-grid-column>
</q-grid-columns>
<q-grid-data-manipulation [rowFactory]="myRowFactory">
</q-grid-data-manipulation>
</q-grid>`
})
export class MyComponent {
gridModel: GridModel;
constructor(qgrid: Grid, dataService: MyDataService) {
this.gridModel = qgrid.model();
dataService
.getPeople()
.subscribe(rows => this.gridModel.data({ rows }));
}
myRowFactory() {
return new Human();
}
submit() {
const { added, edited, deleted } = gridModel.dataManipulation();
dataService
.addPeople(added)
.editPeople(edited)
.deletePeople(deleted);
}
}
Validation
The q-grid validation is based on language independent validation rules called LIVR. Use q-grid-rule
component to specify which specifications should be applied to appropriate column.
<q-grid editMode="cell">
<q-grid-validation>
<q-grid-rule for="cell" key="salary" required></q-grid-rule>
<q-grid-rule for="cell" key="name" required [lengthBetween]="[3, 40]"></q-grid-rule>
</q-grid-validation>
</q-grid>


Galaxy Quest Review
At first I was intrigued by the strange cast and odd creatures on the Galaxy Quest trailer, but that was before I saw the film. Now my view has completely changed. It's time to embrace for impact, because this is a very bumpy ride. The story begins with the cast of Galaxy Quest including: Jason Nesmith (Tim Allen), Alexander Dane (Alan Rickman), Gwen Demarco (Sigourney Weaver) signing autographs at a convention. They meet fans who dress up in costumes, fans who worship the ground they walk on, and a group of aliens called Thermians who believe that they are the ultimate saviors against the dreaded alien colony lead by Sarris (Robin Sachs). Of course they are unaware of this until they actually begin performing their duties, and meet the ugly aliens themselves. Thus begins the long adventure to help save the Thermians. The movie plays like a really bad Star Trek episode, in fact it's worse. I don't even think Trekkies will appreciate this weak spoof, because quite frankly it's just not funny. All the jokes are basically collected observations from the series. One such continuous joke involves a simple crew member who believes he will die in space, because no extra on the TV show ever lives, as proven in the Star Trek series. Creative jokes like this may seem like a clever idea, but not when they are used to death. A person can only take so much. We do not need to be tortured, especially when you have to pay for it. It's pretty bad when even Tim Allen is pitiful. It's not like I expected an Oscar worthy performance form him, but a few laughs would have been helpful. Speaking of acting, 2 fine talents were wasted as well. Sigourney Weaver was here to show cleavage, well at least it worked. It's pretty bad when the only entertaining value of the film is cleavage. It just shows you how disgraceful the film really is. Alan Rickman however was not so lucky. After his last hit (Dogma) he embarrasses himself by doing this sloppy mess. It's just a shame to see talented actors and actresses throw their ability away. When the film couldn't get any worse, thankfully some nice special effects pop up. Like many big blockbusters (Armageddon, The Haunting to name a few) they rely heavily on effects to help boost the film's box office results. 9 out of 10 times it works, but unfortunately we have to shell out hard earned money and suffer through this junk. When will it stop? I am getting tired of being suckered into seeing such trash. It may look fine and dandy, but we need to at least have a story. Is that too much to ask? Obviously it is. When Galaxy Quest finally ends, it literally crash lands. Aside from the impressive looking creatures from Industrial Light And Magic, it's an embarrassment to the cast, and it's embarrassing to the science fiction genre. It's not the least bit fun, nor was it entertaining. The only place where this movie belongs is to infinity and beyond.
Grade: D-
www.chud.com http://jump.to/moviepage
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


Questa Coverage Report
Contents:
Testplan hierarchy:
Back to top...
Design hierarchy:
- fp_add_tb
- add_coverage (no coverage)
- dut
- dlyA (no coverage)
- dlyB (no coverage)
- dlyExpectedC (no coverage)
- fp_helper_pkg (no coverage)
- utils_pkg (no coverage)
- fp_type_pkg__mti__sv__equiv__implct__pack (no coverage)
- fp_coverage_sv_unit (no coverage)
Back to top...
Design units:
Back to top...


hello.
Area404.
World Weather Data.
Fist Logistics.
H2O to GO.
AREA404
An Atlanta Lifestyle website featuring
personalized user pages. User input is
gathered and curated to create the
perfect personalized lifestyle page
for each user.
web development.
Area404
WeatherApp
Fist Logistics
H2O to GO


We do this by supporting community organisations and partners that share our business goals and aspirations for healthy, happy vibrant lives.
Comvita has sponsored TEDxTauranga since its inception in 2013. This independently organised TED event provides a platform for sharing innovative, inspiring and worthwhile ideas in the Bay of Plenty.
Since 2005, and in association with Tauranga City Council, more than 20,000 native plants have been planted in Kopurererua Valley, as part of Birds, Bees, Kids and Trees. The hands-on environmental programme educates young people about the importance of preserving nature for the generations to come.
As Paengaroa’s largest employer, Comvita has always been a close supporter of the area’s local school. This has included sponsoring Paengaroa Top School since 2003 and funding a new community garden on school grounds.
Comvita has supported the Otanewainuku Kiwi Trust since its establishment in 2002. Formed by Te Puke Forest and Bird, the trust is focused on growing the brown kiwi population in the Otanewainuku Forest.
Comvita provides Medihoney Antibacterial Wound Gel® to Waipuna Hospice to support their wound care. The hospice, located in Te Puna, provides specialist medical care for patients living with a life-limiting illness and support services for their families.
Comvita is a longtime sponsor of Kiwi Can Eastern Bay of Plenty. This energy-packed in-school education programme teaches values, such as integrity and respect, to primary school students aged five to 12.
Our sponsorship budget is allocated at the start of each financial year, with the exception of a small fund set aside to support one-off requests, up to the value of $1,000 Requests for this sponsorship should be made at least six weeks prior to the date required.
"Comvita has been a fabulous supporter of Paengaroa School and surrounding community clubs as far back as i can remember. Since 2003, Comvita has remained the main naming right sponsor for Comvita Top School and they recently founded our Paengaroa Community Garden on schools Grounds. This is a fantastic asset. Thanks Comvita, we really appreciate your community minded approach."
"Comvita has contributed an enormous amount of time, energy and funds for more than a decide towards the restoration of Kopurererua valley and educion of youg people to raise their awareness and fan their passion for our precious environment for generations to come. Comvita is a terrific Project Tauranga Partner making a huge and lasting diffrence"
"Comvita has been a supporter of the Otanewainuku Kiwi Trust since we were established in 2002. We are greatly appreciative of Comvita’s sponsorship, which supports the trust’s efforts in promotion, education and communication."


Invalid email format
Sorry, your user name does not exist Sign Up
Server error
Email address can't be empty
Password requires at least 6 characters.
Incorrect username or password
Password can't be empty


Click the button below to remove the type attribute of the input element above.
Note: When removing the type attribute of an input element, the element will be of type text, which is the default value.
Note: In Internet Explorer 8 and earlier, the removedNamedItem returns the attribute as it should, but it does not remove the attribute.


require 'open3'
dir = File.expand_path "#{__FILE__}/../.."
describe "Documentation" do
%w(
driver
migration
persistence
).each do |name|
it "should execute '#{name}.rb' without errors" do
stdin, stdout, stderr = Open3.popen3 "ruby #{dir}/docs/#{name}.rb"
stderr.read.should be_empty
end
end
end


[gecode-users] Symmetries, activity branching, and graph coloring
Christian Schulte
cschulte at kth.se
Mon Jul 1 16:28:21 CEST 2013
Hi Stefano,
Cool. One question: did you try restarts? That should help. A lot! (the next
version of Gecode 4.2.0 will even have no-goods from restarts...)
Cheers
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
> -----Original Message-----
> From: Stefano Gualandi [mailto:stefano.gualandi at gmail.com]
> Sent: Friday, June 28, 2013 10:27 PM
> To: cschulte at kth.se
> Subject: Re: [gecode-users] Symmetries, activity branching, and graph
coloring
>
> Finally, I have posted about Graph Coloring, Gecode and LDBS:
>
> http://stegua.github.io/blog/2013/06/28/gecol/
>
> cheers,
> Stefano
>
>
>
>
> On May 23, 2013, at 5:56 PM, Christian Schulte <cschulte at kth.se> wrote:
>
> > Brilliant, thanks! Of course, you are contributing author, you even
helped me a
> lot in getting the bug fixed!
> >
> > Thanks
> > Christian
> >
> > --
> > Christian Schulte, Professor of Computer Science, KTH,
> > www.ict.kth.se/~cschulte/
> >
> >
> > From: Stefano Gualandi [mailto:stefano.gualandi at gmail.com]
> > Sent: Thursday, May 23, 2013 11:36 AM
> > To: Christian Schulte
> > Subject: Re: [gecode-users] Symmetries, activity branching, and graph
> > coloring
> >
> > Everything works as a charm now, thanks!
> > (I have tested my own script with 135 DIMACS graph coloring instances)
> >
> > > Oh, btw: if you want me to add your modification of the example to
Gecode,
> I'll do that, provided you:
> > > - Add yourself as contributing author.
> > > - Make it controllable from the commandline whether to use LDSB or
not.
> >
> > The modified gecode graph coloring example is attached, with a command
> > line option for using LDSB, and restricting the color domains in {0,.,
> > g.n_v-1} :-)
> >
> > Regarding adding myself as a contributing author, it is up to you, my
> contribution is so *microscopic*.
> > As you like.
> >
> > cheers,
> > Stefano
> >
> >
> >
> >
> > On May 15, 2013, at 8:38 PM, Christian Schulte <cschulte at kth.se> wrote:
> >
> > >
> > > Cheers
> > > Christian
> > >
> > >
> > > --
> > > Christian Schulte, www.ict.kth.se/~cschulte/
> > >
> > > From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> > > Behalf Of Christian Schulte
> > > Sent: Wednesday, May 15, 2013 8:34 PM
> > > To: 'Stefano Gualandi'; users at gecode.org
> > > Subject: Re: [gecode-users] Symmetries, activity branching, and
> > > graph coloring
> > >
> > > Hi Stefano,
> > >
> > > Yes, that should be symmetric. The bug was a missing initialization
and is
> now fixed in the trunk.
> > >
> > > I also attached a patch
> > >
> > > Thanks a lot!
> > > Christian
> > >
> > > --
> > > Christian Schulte, www.ict.kth.se/~cschulte/
> > >
> > > From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> > > Behalf Of Stefano Gualandi
> > > Sent: Wednesday, May 15, 2013 6:04 PM
> > > To: users at gecode.org
> > > Subject: [gecode-users] Symmetries, activity branching, and graph
> > > coloring
> > >
> > > Hi,
> > > the new Lightweight Dynamic Symmetry Breaking could be used also for
> > > the graph coloring example, since the color values are symmetric,
right?
> > >
> > > Something like (referring to gecode/example/graph-color.cpp)
> > >
> > > Symmetries syms;
> > > syms << ValueSymmetry(IntArgs::create(g.n_v,0));
> > > [.]
> > > branch(*this, v, INT_VAR_SIZE_MIN(), INT_VAL_MIN(), syms);
> > >
> > > If the answer is "no", forget about the remaining of this email :-)
> > >
> > >
> > >
> > > If the answer is "yes", then there is something wrong when using
> > > symmetry breaking together with an activity based branching as:
> > >
> > > branch(*this, v, INT_VAR_ACTIVITY_SIZE_MAX(opt.decay()),
> > > INT_VAL_MIN(), sums);
> > >
> > > Since the example gives "seg fault". I have tried all the variable
> > > selection strategies, but only those based on the "activity" have this
issue.
> > >
> > > You can find attached a modified graph-color.cpp example that
> > > exposes the problem (with an additional option for the activity-based
> branching):
> > >
> > > ./examples/graph-color -branching sizeact
> > >
> > > Thanks in advance,
> > > cheers,
> > > Stefano
> > >
> > > _______________________________________________
> > > Gecode users mailing list
> > > users at gecode.org
> > > https://www.gecode.org/mailman/listinfo/gecode-users
> >
More information about the users
mailing list


---
layout: post
title: New Android Licensing System
categories:
- Android News
tags: []
status: publish
type: post
published: true
meta:
_edit_last: '2'
---
There are two interesting Android blog posts about a new licensing/copy protection system for apps. Check it out.
http://android-developers.blogspot.com/2010/07/licensing-service-for-android.html
http://android-developers.blogspot.com/2010/07/licensing-service-technology-highlights.html


521. Longest Uncommon Subsequence I
Difficulty: Easy
Topics: Strings
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings.
A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements. Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string.
The input will be two strings, and the output needs to be the length of the longest uncommon subsequence. If the longest uncommon subsequence doesn’t exist, return -1.
Example 1:
Input: "aba", "cdc"
Output: 3
Explanation: The longest uncommon subsequence is "aba" (or "cdc"), because "aba" is a subsequence of "aba", but not a subsequence of any other strings in the group of two strings.
Note:
- Both strings’ lengths will not exceed 100.
- Only letters from a ~ z will appear in input strings.
Solution
Language: Python
class Solution(object):
def findLUSlength(self, a, b):
"""
:type a: str
:type b: str
:rtype: int
"""
if a == b: return -1
return max(len(a),len(b))
Notes
- This question is asking us to return the longest uncommon subsequance. There are only 2 scenarios:
- a == b: return -1, as mentioned
- a != b: return the longer str, because we just need find the longest uncommon subsequence, don’t over-thinking!!!


You can edit me
Country code:
Chapter 1
Chapter 2
Quiz
Chapter 1 content goes here
Chapter 2 content goes here
Quiz content goes here


Modules
The Module is the final piece, and is what is needed to move a game forward.
The MpGameModule
class looks like this:
public abstract class MpGameModuleBase<TService, TGame, TPlayer> : ModuleBase<SocketCommandContext>
where TService : MpGameService<TGame, TPlayer>
where TGame : GameBase<TPlayer>
where TPlayer : Player
{
protected MpGameModuleBase(TService gameService);
protected TService GameService { get; }
protected TGame Game { get; }
protected TPlayer Player { get; }
protected CurrentlyPlaying GameInProgress { get; }
protected bool OpenToJoin { get; }
protected IReadOnlyCollection<IUser> JoinedUsers { get; }
protected virtual bool RegisterPlayerTypeReader { get; }
public abstract Task OpenGameCmd();
public abstract Task CancelGameCmd();
public abstract Task JoinGameCmd();
public abstract Task LeaveGameCmd();
public abstract Task StartGameCmd();
public abstract Task NextTurnCmd();
public abstract Task GameStateCmd();
public abstract Task EndGameCmd();
protected Task ResendUnsentDMsAsync();
}
public enum CurrentlyPlaying
{
None,
ThisGame,
DifferentGame
}
Other versions of this class with less generic parameters also exist, so you don't need to supply all the type parameters. Consult IntelliSense for the details.
CurrentlyPlaying
is an enum that indicates if the channel already
has a game going on, and if it is the game type that this module handles
or another game type. You can use this to ensure that you won't get
two different games being played simultaniously in the same channel.
RegisterPlayerTypeReader
is an overridable flag with which you can specify
to add a TypeReader for your Player
type so that you can take in that type
as a command parameter directly. The default value of this flag is true
.
There are 8 methods you can implement, corresponding to the
actions needed in most games. When you implement these, you decorate them with [Command]
so that the command system recognizes them. There may be methods you don't want or need to
implement, in which case you can omit the [Command]
attribute so it can't be called.
Likewise, you'll most likely be adding more commands in order to control your game.
One command is predefined which will retry sending a DM
to a user after they have been notified to enable DMs.
If you want to make use of this command, you will need to override
it just to call the base method and add the [Command]
attribute.
With your own service class and a data type for persistent data, you should derive from this class as follows:
public class CardGameModule : MpGameModuleBase<CardGameService, CardGame, CardPlayer>
{
public CardGameModule(CardGameService service)
: base(service)
{
}
private DataType _data;
protected override void BeforeExecute(CommandInfo command)
{
// If you choose to override this method, you *must* call the base version first.
base.BeforeExecute(command);
// If you have any persistent data of your own, load
// the relevant instance from the dictionary
// in your service class here and store
// the result in a private field.
GameService.SomeDataDictionary.TryGetValue(Context.Channel.Id, out _data);
}
}
While having an explicit service class will make it easier to expand in the future, you can omit the type parameter to use the default if you have no other persistent data to store for your game:
public class CardGameModule : MpGameModuleBase<CardGame, CardPlayer>
{
public CardGameModule(MpGameService<CardGame, CardPlayer> service)
: base(service)
{
}
}
Example implementations for the abstract methods can be found on the API documentation page. An extensive example can be found as my implementation of Secret Hitler.
Inheriting a different ModuleBase
To aid in composability, starting in version 1.2.0, MpGameModuleBase<>
is decoupled from the MpGameService<>
. So if you wish to combine MpGame
with a different ModuleBase (or inherit only ModuleBase<T>
directly),
you can do that by
- injecting the instance of the service into your module
- overriding
BeforeExecute()
where you can callGetGameData()
to get the associated data for that context.


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
| Interface Summary | |
| HasConstValue | |
| Node | |
| Parser.yyInput | must be implemented by a scanner object to supply input to the parser. |
| Class Summary | |
| ArithIfStmt | Arithmetic IF statement |
| AssignGotoStmt | assigned GO TO statement |
| AssignLabelStmt | ASSIGN statement |
| AssignOrFuncStmt | Assignment statement or statement-function defining statement. |
| BaseManager | |
| BinaryNode | Binary Expression |
| BlockIfStmt | Block IF statement: block_if_part opt_else_if_parts opt_else_part END_IF |
| CallStmt | Call statement |
| CloseStmt | |
| CommonManager | Manage Common variables |
| Complex | |
| ComplexConstNode | Complex constant |
| ComplexExp | Complex expression |
| ComputedGoto | Computed goto statement |
| ConcatNode | Concat Expression |
| ConstManager | Constant manager. |
| ContinueStmt | CONTINUE statement |
| DeclManager | Declaration Manager |
| DoListNode | |
| DoubleComplexExp | DoubleComplex expression |
| EndStmt | END statement |
| EntryStmt | Entry statement |
| EntryType | |
| EquivManager | Equivalence values Manager |
| ExecStmtManager | |
| F77Hir | |
| F77Scanner | |
| F77Sym | |
| F77TestDriver | A FORTRAN compiler driver. |
| FComplex | |
| FDouble | |
| FFloat | |
| FInteger | |
| FirList | |
| FirToHir | Main class for Fir to Hir translation |
| FNumber | Constant evaluator |
| FNumberTest | |
| FormatStmt | only using in parsing. |
| FortranCharacterExp | |
| FStmt | Super class for all FORTRAN statements |
| GotoStmt | |
| HeaderStmt | |
| HirUtility | HIR wrapper class |
| I77Utils | File I77wrapper.java Utility class to use libI77. |
| IfStmt | IF statement |
| ImplicitManager | Implicit Manager |
| InquireStmt | |
| IntrinsicUtility | Intrinsic Utility |
| LabeledDoStmt | DO statement of the form DO 10 i = 1, 30 ... |
| OpenStmt | |
| OtherIOStmt | |
| Pair | |
| Parser | |
| Parser.YyCheckClass | |
| Parser.YyDefRedClass | |
| Parser.YyDgotoClass | |
| Parser.YyGindexClass | |
| Parser.YyLenClass | |
| Parser.YyLhsClass | |
| Parser.YyNameClass | |
| Parser.YyRindexClass | |
| Parser.YySindexClass | |
| Parser.YyTableClass | |
| PauseStmt | Pause statement |
| PowerNode | Powered expression left ** right |
| ProcessData | |
| Quad | |
| ReadStmt | |
| ReturnStmt | RETURN statement |
| Scanner | This class is a scanner generated by JFlex 1.4.1 on 04/11/16 11:07 from the specification file D:/ko1/coins/coins-0.10.2/src/coins/ffront/f77k.lex |
| StmtFuncParamType | Statement-function-parameter type |
| StmtFuncType | Statement-function type |
| StopStmt | STOP statement |
| SubscrOrFunCallNode | Subscripted variable reference or function call |
| SubstringNode | |
| Token | |
| Triple | |
| TypeUtility | |
| UnaryNode | |
| UnLabeledDoStmt | |
| WriteStmt | WRITE statement WRITE '(' ci_list ')' opt_io_list Currently, ci_list must be list of two '*'s, and opt_io_list must be list of variables. |
| Exception Summary | |
| Parser.yyException | thrown for irrecoverable syntax errors and stack overflow. |
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


In Excel 7.0 workbooks with shared lists, FILESHARING2 contains either a dummy password if the workbook is not write-protected or a valid password if the workbook is write-protected. If the workbook does not contain shared lists, this record does not appear in the file.
This record does not appear in BIFF5 files.
Record Data
|
Offset |
Field Name |
Size |
Contents |
|
4 |
fReadOnlyRec |
2 |
=1 if the Read Only Recommended option is selected in the Options dialog box |
|
6 |
wResPass |
2 |
Encrypted password (if this field is 0 (zero), there is no write reservation password) |
|
8 |
cch |
1 |
Length of the user name |
|
9 |
stUNWriteRes |
var |
User name |


Enter Your Vanilla Rom
Vanilla ROM is loaded
x
Select Your Game Mode
What's in the logic for each game mode?
Standard - Major / Minor
Standard - Full
Recall - Major / Minor
Recall - Full
Select Any Other Settings
Item Fanfare:
On
Off
Seed Settings:
Random
Fixed
Randomize!
Your Seed's URL:


Easy Gmail Scheduler
Subject
Date
Error: Please select a date in the future
Time
Scheduled Emails
Subject
Date
Delete
is logged in
Logout


Contents
Self-supervised optical flow estimation
from __future__ import print_function, division
import os
import math
import cv2
import numpy as np
import matplotlib.pyplot as plt
import torch
from PIL import Image
import torchvision.transforms as T
from torch.utils.data import Dataset, DataLoader, IterableDataset
from torchvision import transforms, utils
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions.normal import Normal
from google.colab.patches import cv2_imshow
# Ignore warnings
import warnings
warnings.filterwarnings("ignore")
plt.ion() # interactive mode
%matplotlib inline
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
# please uncomment the following lines if you want to
# upload a video file from your local file system
# from google.colab import files
# uploaded = files.upload()
# VIDEO_PATH = list(uploaded.keys())[0] #"/content/freeze.mkv"
# Please update the following line to change the video path
VIDEO_PATH = '/content/video.mp4'
# code adapted from here
# https://github.com/NVIDIA/flownet2-pytorch/blob/master/utils/flow_utils.py
TAG_CHAR = np.array([202021.25], np.float32)
def write_flow(filename,uv,v=None):
""" Write optical flow to file.
If v is None, uv is assumed to contain both u and v channels,
stacked in depth.
Original code by Deqing Sun, adapted from Daniel Scharstein.
"""
nBands = 2
if v is None:
assert(uv.ndim == 3)
assert(uv.shape[2] == 2)
u = uv[:,:,0]
v = uv[:,:,1]
else:
u = uv
assert(u.shape == v.shape)
height,width = u.shape
f = open(filename,'wb')
# write the header
f.write(TAG_CHAR)
np.array(width).astype(np.int32).tofile(f)
np.array(height).astype(np.int32).tofile(f)
# arrange into matrix form
tmp = np.zeros((height, width*nBands))
tmp[:,np.arange(width)*2] = u
tmp[:,np.arange(width)*2 + 1] = v
tmp.astype(np.float32).tofile(f)
f.close()
class VideoFrameDataset(IterableDataset):
"""Video Frame dataset."""
def __init__(self, video_file, root_dir=None, transform=None):
"""
Args:
video_file (string): Path to the video file.
root_dir (string): Directory with all the videos.
transform (callable, optional): Optional transform to be applied
on a sample.
"""
self.video_file = video_file
self.root_dir = root_dir
self.transform = transform
self.cap = cv2.VideoCapture(self.video_file)
def frame_width(self):
return round(self.cap.get(cv2.CAP_PROP_FRAME_WIDTH))
def frame_height(self):
return round(self.cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
def __iter__(self):
ret, old_frame = self.cap.read()
num_frames = (int(self.cap.get(cv2.CAP_PROP_FRAME_COUNT)))
old_frame = cv2.cvtColor(old_frame, cv2.COLOR_BGR2GRAY)
for num in range(num_frames - 1):
ret,frame = self.cap.read()
#frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
if ret:
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
else:
frame = old_frame.copy()
if self.transform:
x = self.transform(old_frame)
y = self.transform(frame)
else:
x = old_frame
y = frame
old_frame = frame.copy()
yield x, y
def __exit__(self, exc_type, exc_value, traceback):
cv2.destroyAllWindows()
cap.release()
video_dataset = VideoFrameDataset(VIDEO_PATH)
video_height = video_dataset.frame_height()
video_width = video_dataset.frame_width()
vol_shape = (video_height,video_width)
loader = DataLoader(video_dataset,batch_size=1)
class ConvBlock(nn.Module):
"""
Reference:
From here.
https://github.com/voxelmorph/voxelmorph/blob/master/voxelmorph/torch/networks.py
Specific convolutional block followed by leakyrelu for unet.
"""
def __init__(self, ndims, in_channels, out_channels, stride=1):
super().__init__()
Conv = getattr(nn, 'Conv%dd' % ndims)
self.main = Conv(in_channels, out_channels, 3, stride, 1)
self.activation = nn.LeakyReLU(0.2)
def forward(self, x):
out = self.main(x)
out = self.activation(out)
return out
class Unet(nn.Module):
"""
Reference:
Modified from here.
https://github.com/voxelmorph/voxelmorph/blob/master/voxelmorph/torch/networks.py
A unet architecture. Layer features can be specified directly as a list of encoder and decoder
features or as a single integer along with a number of unet levels. The default network features
per layer (when no options are specified) are:
encoder: [16, 32, 32, 32]
decoder: [32, 32, 32, 32, 32, 16, 16]
"""
def __init__(self, inshape, nb_features=None, nb_levels=None, feat_mult=1):
super().__init__()
"""
Parameters:
inshape: Input shape. e.g. (192, 192, 192)
nb_features: Unet convolutional features. Can be specified via a list of lists with
the form [[encoder feats], [decoder feats]], or as a single integer. If None (default),
the unet features are defined by the default config described in the class documentation.
nb_levels: Number of levels in unet. Only used when nb_features is an integer. Default is None.
feat_mult: Per-level feature multiplier. Only used when nb_features is an integer. Default is 1.
"""
# ensure correct dimensionality
ndims = len(inshape)
assert ndims in [1, 2, 3], 'ndims should be one of 1, 2, or 3. found: %d' % ndims
# build feature list automatically
if isinstance(nb_features, int):
if nb_levels is None:
raise ValueError('must provide unet nb_levels if nb_features is an integer')
feats = np.round(nb_features * feat_mult ** np.arange(nb_levels)).astype(int)
self.enc_nf = feats[:-1]
self.dec_nf = np.flip(feats)
elif nb_levels is not None:
raise ValueError('cannot use nb_levels if nb_features is not an integer')
else:
self.enc_nf, self.dec_nf = nb_features
self.upsample = nn.Upsample(scale_factor=2, mode='nearest')
# configure encoder (down-sampling path)
prev_nf = 2
self.downarm = nn.ModuleList()
for nf in self.enc_nf:
self.downarm.append(ConvBlock(ndims, prev_nf, nf, stride=2))
prev_nf = nf
# configure decoder (up-sampling path)
enc_history = list(reversed(self.enc_nf))
self.uparm = nn.ModuleList()
for i, nf in enumerate(self.dec_nf[:len(self.enc_nf)]):
channels = prev_nf + enc_history[i] if i > 0 else prev_nf
self.uparm.append(ConvBlock(ndims, channels, nf, stride=1))
prev_nf = nf
# configure extra decoder convolutions (no up-sampling)
prev_nf += 2
self.extras = nn.ModuleList()
for nf in self.dec_nf[len(self.enc_nf):]:
self.extras.append(ConvBlock(ndims, prev_nf, nf, stride=1))
prev_nf = nf
def forward(self, x):
# get encoder activations
x_enc = [x]
for layer in self.downarm:
x_enc.append(layer(x_enc[-1]))
# conv, upsample, concatenate series
x = x_enc.pop()
for layer in self.uparm:
x = layer(x)
x = self.upsample(x)
_x = x_enc.pop()
try:
x = torch.cat([x, _x], dim=1)
except:
x3d = list(x.shape)[2]
_x3d = list(_x.shape)[2]
if x3d > _x3d :
pd = (0,0,x3d-_x3d,0)
_x = F.pad(_x, pd, mode='constant', value=0)
elif x3d < _x3d:
pd = (0,0,_x3d-x3d,0)
x = F.pad(x, pd, mode='constant', value=0)
x = torch.cat([x, _x], dim=1)
# extra convs at full resolution
for layer in self.extras:
x = layer(x)
return x
class SpatialTransformer(nn.Module):
"""
[SpatialTransformer] represesents a spatial transformation block
that uses the output from the UNet to preform an grid_sample
https://pytorch.org/docs/stable/nn.functional.html#grid-sample
"""
def __init__(self, size, mode='bilinear'):
"""
Instiatiate the block
:param size: size of input to the spatial transformer block
:param mode: method of interpolation for grid_sampler
"""
super(SpatialTransformer, self).__init__()
# Create sampling grid
vectors = [ torch.arange(0, s) for s in size ]
grids = torch.meshgrid(vectors)
grid = torch.stack(grids) # y, x, z
grid = torch.unsqueeze(grid, 0) #add batch
grid = grid.type(torch.FloatTensor)
self.register_buffer('grid', grid)
self.mode = mode
def forward(self, src, flow):
"""
Push the src and flow through the spatial transform block
:param src: the original moving image
:param flow: the output from the U-Net
"""
try:
new_locs = self.grid + flow
except:
new_locs = self.grid[:,:,:list(flow.shape)[2],:]
shape = flow.shape[2:]
# Need to normalize grid values to [-1, 1] for resampler
for i in range(len(shape)):
new_locs[:,i,...] = 2*(new_locs[:,i,...]/(shape[i]-1) - 0.5)
if len(shape) == 2:
new_locs = new_locs.permute(0, 2, 3, 1)
new_locs = new_locs[..., [1,0]]
elif len(shape) == 3:
new_locs = new_locs.permute(0, 2, 3, 4, 1)
new_locs = new_locs[..., [2,1,0]]
return F.grid_sample(src, new_locs, mode=self.mode)
def gradient_loss(s, penalty='l2'):
if len(s.shape) > 4:
dy = torch.abs(s[:, :, 1:, :, :] - s[:, :, :-1, :, :])
dx = torch.abs(s[:, :, :, 1:, :] - s[:, :, :, :-1, :])
dz = torch.abs(s[:, :, :, :, 1:] - s[:, :, :, :, :-1])
else:
dy = torch.abs(s[:, 1:, :, :] - s[:, :-1, :, :])
dx = torch.abs(s[:, :, 1:, :] - s[:, :, :-1, :])
dz = torch.abs(s[:, :, :, 1:] - s[:, :, :, :-1])
if(penalty == 'l2'):
dy = dy * dy
dx = dx * dx
dz = dz * dz
d = torch.mean(dx) + torch.mean(dy) + torch.mean(dz)
return d / 3.0
def mse_loss(x, y):
return torch.mean( (x - y) ** 2 )
def diceLoss(y_true, y_pred):
top = 2 * (y_true * y_pred, [1, 2, 3]).sum()
bottom = torch.max((y_true + y_pred, [1, 2, 3]).sum(), 50)
dice = torch.mean(top / bottom)
return -dice
def ncc_loss(I, J, win=None):
"""
calculate the normalize cross correlation between I and J
assumes I, J are sized [batch_size, *vol_shape, nb_feats]
"""
ndims = len(list(I.size())) - 2
assert ndims in [1, 2, 3], "volumes should be 1 to 3 dimensions. found: %d" % ndims
if win is None:
win = [9] * ndims
conv_fn = getattr(F, 'conv%dd' % ndims)
I2 = I*I
J2 = J*J
IJ = I*J
sum_filt = torch.ones([1, 1, *win]).to("cuda")
pad_no = math.floor(win[0]/2)
if ndims == 1:
stride = (1)
padding = (pad_no)
elif ndims == 2:
stride = (1,1)
padding = (pad_no, pad_no)
else:
stride = (1,1,1)
padding = (pad_no, pad_no, pad_no)
I_var, J_var, cross = compute_local_sums(I, J, sum_filt, stride, padding, win)
cc = cross*cross / (I_var*J_var + 1e-5)
return -1 * torch.mean(cc)
def compute_local_sums(I, J, filt, stride, padding, win):
I2 = I * I
J2 = J * J
IJ = I * J
I_sum = F.conv2d(I, filt, stride=stride, padding=padding)
J_sum = F.conv2d(J, filt, stride=stride, padding=padding)
I2_sum = F.conv2d(I2, filt, stride=stride, padding=padding)
J2_sum = F.conv2d(J2, filt, stride=stride, padding=padding)
IJ_sum = F.conv2d(IJ, filt, stride=stride, padding=padding)
win_size = np.prod(win)
u_I = I_sum / win_size
u_J = J_sum / win_size
cross = IJ_sum - u_J * I_sum - u_I * J_sum + u_I * u_J * win_size
I_var = I2_sum - 2 * u_I * I_sum + u_I * u_I * win_size
J_var = J2_sum - 2 * u_J * J_sum + u_J * u_J * win_size
return I_var, J_var, cross
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
nb_enc_features = [32, 32, 32, 32]
nb_dec_features = [32, 32, 32, 32, 32, 16]
class FramePredNet(nn.Module):
""""" implementation of voxelmorph.
"""
def __init__(self, vol_size, enc_nf, dec_nf, full_size=True):
"""
Instiatiate 2018 model
:param vol_size: volume size of the atlas
:param enc_nf: the number of features maps for encoding stages
:param dec_nf: the number of features maps for decoding stages
:param full_size: boolean value full amount of decoding layers
"""
super(FramePredNet, self).__init__()
dim = len(vol_size)
self.unet_model = Unet(vol_size, [enc_nf, dec_nf])
# One conv to get the flow field
conv_fn = getattr(nn, 'Conv%dd' % dim)
self.flow = conv_fn(dec_nf[-1], dim, kernel_size=3, padding=1)
# Make flow weights + bias small. Not sure this is necessary.
nd = Normal(0, 1e-5)
self.flow.weight = nn.Parameter(nd.sample(self.flow.weight.shape))
self.flow.bias = nn.Parameter(torch.zeros(self.flow.bias.shape))
self.spatial_transform = SpatialTransformer(vol_size)
def forward(self, src, tgt):
"""
Pass input x through forward once
:param src: moving image that we want to shift
:param tgt: fixed image that we want to shift to
"""
x = torch.cat([src, tgt], dim=1)
x = self.unet_model(x)
flow = self.flow(x)
y = self.spatial_transform(src, flow)
return y, flow
fpnet = FramePredNet(vol_shape,nb_enc_features,nb_dec_features)
fpnet.to(device)
FramePredNet(
(unet_model): Unet(
(upsample): Upsample(scale_factor=2.0, mode=nearest)
(downarm): ModuleList(
(0): ConvBlock(
(main): Conv2d(2, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(2): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(3): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
(uparm): ModuleList(
(0): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(2): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(3): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
(extras): ModuleList(
(0): ConvBlock(
(main): Conv2d(34, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
)
(flow): Conv2d(16, 2, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(spatial_transform): SpatialTransformer()
)
from torch.optim import Adam
lr = 0.001
n_iter = 8000
reg_param = 0.015
opt = Adam(fpnet.parameters(), lr=lr)
data_loss = 'mse'
sim_loss_fn = ncc_loss if data_loss == "ncc" else mse_loss
grad_loss_fn = gradient_loss
train = True
if train:
i = 0
for old,new in loader:
# Generate the moving images and convert them to tensors.
moving_image, input_fixed = old.unsqueeze(0), new.unsqueeze(0)
input_moving = moving_image.to(device).float()
#input_moving = input_moving.permute(0, 3, 1, 2)
input_fixed = input_fixed.to(device).float()
#input_fixed = input_fixed.permute(0, 3, 1, 2)
# Run the data through the model to produce warp and flow field
warp, flow = fpnet(input_moving, input_fixed)
# Calculate loss
recon_loss = sim_loss_fn(warp, input_fixed)
grad_loss = grad_loss_fn(flow)
loss = recon_loss + reg_param * grad_loss
print("%d,%f,%f,%f" % (i, loss.item(), recon_loss.item(), grad_loss.item()), flush=True)
# Backwards and optimize
opt.zero_grad()
loss.backward()
opt.step()
i += 1
save_file_name = os.path.join(os.getcwd(), 'deformation_5objs_latest.pt')
torch.save(fpnet.state_dict(), save_file_name)
0,6497.458496,6497.458496,0.000000
1,37.764408,37.761917,0.166102
2,32.692089,32.690269,0.121394
3,13.145593,13.145446,0.009795
4,180.017563,180.017380,0.012302
5,164.921753,164.920990,0.050777
6,13.704789,13.704455,0.022225
7,12.541230,12.541147,0.005543
8,183.336227,183.336227,0.000314
9,9.726167,9.726140,0.001804
10,9.086883,9.086849,0.002232
11,8.320355,8.320333,0.001501
12,30.687416,30.687403,0.000934
13,200.564346,200.564331,0.000885
14,7.542757,7.542750,0.000490
15,7.552512,7.552500,0.000775
16,26.674955,26.674940,0.001072
17,168.292618,168.292603,0.000842
18,8.485906,8.485893,0.000821
19,6.713073,6.713059,0.000916
20,7.119402,7.119374,0.001915
21,6.442109,6.442076,0.002237
22,310.897430,310.897400,0.001943
23,25.985098,25.985083,0.000993
24,6.646648,6.646630,0.001223
25,38.873253,38.873234,0.001284
26,425.139557,425.139526,0.002354
27,5.537656,5.537633,0.001556
28,5.502376,5.502356,0.001354
29,5.495192,5.495169,0.001486
30,22.187490,22.187468,0.001513
31,206.053726,206.053696,0.002221
32,5.963037,5.962993,0.002919
33,5.548494,5.548461,0.002241
34,4.939898,4.939874,0.001632
35,561.801025,561.800964,0.002510
36,6.838946,6.838898,0.003215
37,4.800401,4.800372,0.001920
38,4.890824,4.890795,0.001958
39,5.068452,5.068416,0.002381
40,239.692307,239.692276,0.002495
41,17.118317,17.118284,0.002166
42,4.333231,4.333200,0.002052
43,50.804127,50.804092,0.002228
44,392.813812,392.813782,0.002444
45,5.205127,5.205090,0.002452
46,4.606869,4.606833,0.002351
47,74.957275,74.957237,0.002300
48,4.291326,4.291291,0.002312
49,444.324615,444.324585,0.002632
50,4.775305,4.775267,0.002507
51,4.744421,4.744384,0.002484
52,11.959225,11.959189,0.002379
53,252.365417,252.365372,0.002835
54,7.472833,7.472795,0.002523
55,4.706389,4.706348,0.002777
56,4.000462,4.000417,0.003030
57,3.792920,3.792872,0.003217
58,618.391785,618.391663,0.006687
59,4.185783,4.185727,0.003721
60,4.368200,4.368145,0.003661
61,6.231583,6.231529,0.003592
62,552.639832,552.639648,0.012817
63,3.682194,3.682147,0.003179
64,3.417124,3.417068,0.003681
65,3.413906,3.413833,0.004848
66,25.601942,25.601852,0.006037
67,254.274460,254.274246,0.014433
68,3.680347,3.680257,0.005986
69,3.550388,3.550307,0.005426
70,31.517414,31.517311,0.006863
71,79.797073,79.796829,0.016374
72,5.331400,5.331208,0.012808
73,4.023260,4.023131,0.008571
74,5.420501,5.420284,0.014477
75,3.997721,3.997521,0.013315
76,80.902466,80.902252,0.014348
77,4.093969,4.093848,0.008103
78,4.192214,4.192122,0.006175
79,5.432484,5.432407,0.005163
80,13.038890,13.038813,0.005151
81,3.921356,3.921288,0.004523
82,3.226351,3.226285,0.004381
83,2.978292,2.978222,0.004645
84,3.239496,3.239420,0.005084
85,195.393021,195.392899,0.008549
86,3.243718,3.243606,0.007431
87,3.348650,3.348530,0.008000
88,32.409481,32.409374,0.007158
89,577.378662,577.377808,0.057671
90,3.076495,3.076417,0.005240
91,3.742520,3.742429,0.006018
92,3.090460,3.090338,0.008080
93,3.135967,3.135745,0.014831
94,517.845886,517.841187,0.315116
95,7.507407,7.506933,0.031596
96,3.711178,3.710858,0.021284
97,13.239008,13.238442,0.037685
98,105.347588,105.334641,0.863215
99,6.144554,6.143668,0.059075
100,4.894633,4.893854,0.051958
101,3.866505,3.865714,0.052748
102,189.484528,189.408646,5.058968
103,3.996107,3.995416,0.046086
104,5.311914,5.311180,0.048953
105,4.721871,4.721072,0.053300
106,22.828537,22.825047,0.232669
107,295.596985,295.186951,27.334942
108,4.499934,4.499087,0.056441
109,4.378980,4.378343,0.042474
110,28.989946,28.989393,0.036877
111,4.500497,4.500082,0.027631
112,373.205841,373.205475,0.024664
113,5.228292,5.228050,0.016138
114,4.922992,4.922797,0.012967
115,18.699724,18.699556,0.011164
116,117.971016,117.970856,0.010631
117,5.822562,5.822358,0.013586
118,4.747872,4.747760,0.007495
119,6.846033,6.845813,0.014674
120,546.781006,546.780518,0.033111
121,7.972880,7.972753,0.008458
122,3.998756,3.998554,0.013442
123,4.911378,4.911211,0.011150
124,33.569027,33.568527,0.033234
125,402.126556,402.124420,0.142050
126,6.372011,6.371430,0.038767
127,6.557664,6.557109,0.036999
128,3.939497,3.939348,0.009905
129,4.632147,4.632036,0.007403
130,37.455784,37.455627,0.010413
131,4.744842,4.744692,0.009941
132,4.198380,4.198279,0.006749
133,43.203770,43.203697,0.004919
134,4.553544,4.553482,0.004101
135,4.760857,4.760777,0.005309
136,4.552505,4.552453,0.003513
137,4.370286,4.370227,0.003963
138,14.389585,14.389483,0.006719
139,4.230917,4.230797,0.007953
140,6.306021,6.305934,0.005778
141,4.396436,4.396367,0.004604
142,258.112122,258.112030,0.005930
143,4.450982,4.450890,0.006110
144,4.435209,4.435123,0.005765
145,18.239716,18.239651,0.004352
146,343.189697,343.189545,0.010947
147,4.243820,4.243742,0.005229
148,3.851938,3.851859,0.005238
149,3.943512,3.943446,0.004416
150,3.951298,3.951231,0.004454
151,632.934448,632.933228,0.081726
152,3.519461,3.519376,0.005727
153,3.880617,3.880531,0.005734
154,4.206617,4.206497,0.008028
155,70.380676,70.380043,0.042296
156,6.927636,6.927446,0.012628
157,21.947483,21.946623,0.057378
158,11.571051,11.570889,0.010752
159,20.990273,20.990110,0.010756
160,488.441040,488.437744,0.220356
161,5.010396,5.010134,0.017467
162,7.042328,7.041969,0.023936
163,16.184656,16.184450,0.013749
164,136.922134,136.918610,0.234722
165,5.516968,5.516756,0.014184
166,5.110192,5.110038,0.010288
167,15.340808,15.340602,0.013745
168,4.557229,4.557062,0.011134
169,125.798126,125.785362,0.851184
170,5.124773,5.124410,0.024180
171,5.196053,5.195641,0.027473
172,5.803378,5.803013,0.024364
173,112.237808,112.198578,2.615428
174,5.562547,5.561838,0.047309
175,4.870254,4.869709,0.036267
176,4.596796,4.596250,0.036392
177,4.950268,4.949561,0.047149
178,87.625565,87.531601,6.264331
179,4.591483,4.590637,0.056407
180,7.339795,7.338266,0.101907
181,5.427411,5.425820,0.106004
182,30.020006,29.978699,2.753849
183,4.178414,4.176938,0.098452
184,4.048848,4.047461,0.092486
185,4.401186,4.399849,0.089102
186,69.063911,68.765007,19.927015
187,18.779215,18.753864,1.690020
188,5.160125,5.159291,0.055584
189,4.233915,4.233346,0.037957
190,23.944427,23.930128,0.953321
191,210.588806,210.433487,10.354409
192,4.578473,4.578047,0.028423
193,4.426763,4.426372,0.026072
194,23.473318,23.467672,0.376398
195,5.927239,5.926208,0.068689
196,352.147949,351.340851,53.806164
197,6.198597,6.197415,0.078814
198,5.531940,5.531019,0.061450
199,9.706484,9.705269,0.080975
200,48.420612,48.231457,12.610438
201,5.877305,5.876252,0.070147
202,9.387589,9.386115,0.098230
203,6.948053,6.946325,0.115221
204,91.171463,90.900894,18.038105
205,7.358476,7.356653,0.121548
206,5.533244,5.531433,0.120763
207,7.575775,7.573434,0.156068
208,5.336005,5.334010,0.132964
209,442.031006,439.875275,143.715790
210,20.444912,20.441751,0.210756
211,12.536901,12.535452,0.096644
212,52.651855,52.633484,1.224687
213,15.098417,15.095715,0.180194
214,146.715363,146.261002,30.290241
215,16.555691,16.554079,0.107408
216,12.608523,12.607585,0.062570
217,9.678734,9.677842,0.059420
218,30.471613,30.464964,0.443320
219,5.264663,5.264484,0.011929
220,8.030340,8.029506,0.055628
221,8.125108,8.124228,0.058633
222,85.589699,85.521812,4.525875
223,5.969231,5.969088,0.009530
224,7.309106,7.308800,0.020434
225,5.370643,5.370534,0.007285
226,4.703967,4.703795,0.011484
227,206.563095,206.556076,0.467598
228,6.110492,6.109974,0.034521
229,4.808315,4.808156,0.010588
230,4.954266,4.954180,0.005737
231,5.218604,5.218462,0.009436
232,276.321472,276.319824,0.110811
233,4.399605,4.399464,0.009436
234,8.942548,8.942247,0.020058
235,4.479096,4.478885,0.014096
236,38.497505,38.496170,0.089078
237,4.704425,4.704346,0.005311
238,4.347454,4.347373,0.005368
239,4.014314,4.014215,0.006591
240,30.149481,30.149225,0.017007
241,4.978992,4.978883,0.007280
242,3.862601,3.862521,0.005289
243,3.919084,3.919005,0.005214
244,3.774141,3.774048,0.006174
245,234.888184,234.880173,0.534296
246,3.799204,3.799064,0.009360
247,3.694633,3.694516,0.007808
248,11.301555,11.300711,0.056268
249,5.130127,5.130027,0.006629
250,270.992615,270.764618,15.200628
251,3.652598,3.652461,0.009140
252,33.310059,33.291794,1.217555
253,5.284556,5.284256,0.019974
254,298.396881,298.106659,19.348181
255,4.191291,4.190999,0.019488
256,6.656976,6.656655,0.021397
257,45.841259,45.833122,0.542377
258,227.505981,227.023453,32.168079
259,6.410053,6.409821,0.015468
260,4.973380,4.973095,0.018970
261,7.123013,7.122635,0.025187
262,26.359034,26.319458,2.638368
263,252.993362,252.048477,62.992485
264,5.751922,5.751673,0.016612
265,6.479440,6.479043,0.026446
266,13.350635,13.347279,0.223727
267,6.973058,6.972736,0.021444
268,81.014626,80.871986,9.509090
269,4.452511,4.452188,0.021561
270,9.100903,9.100159,0.049616
271,4.282208,4.281953,0.017012
272,23.307816,23.278860,1.930390
273,4.073989,4.073804,0.012381
274,4.935879,4.935702,0.011793
275,8.678267,8.676386,0.125466
276,17.781136,17.780033,0.073465
277,4.284546,4.284400,0.009691
278,3.848605,3.848409,0.013078
279,4.102587,4.102399,0.012525
280,3.809279,3.809147,0.008794
281,78.567314,78.525024,2.819560
282,3.868964,3.868832,0.008766
283,28.902439,28.900187,0.150117
284,3.420171,3.420059,0.007464
285,3.594066,3.593956,0.007329
286,95.195335,95.007721,12.507755
287,5.705455,5.705332,0.008171
288,14.899425,14.894061,0.357575
289,6.085381,6.085199,0.012109
290,94.091171,93.976669,7.633456
291,5.070717,5.070572,0.009659
292,4.503181,4.503029,0.010168
293,71.414963,71.140198,18.317513
294,65.365738,64.514809,56.728683
295,18.026192,17.996576,1.974346
296,4.287024,4.286793,0.015367
297,3.361862,3.361682,0.011988
298,17.959854,17.954798,0.337043
299,103.300140,102.720482,38.643997
300,3.632776,3.632542,0.015595
301,3.765522,3.765278,0.016265
302,4.227058,4.226909,0.009933
303,3.450473,3.450341,0.008782
304,273.421265,273.115082,20.411863
305,4.341418,4.341276,0.009465
306,92.716141,92.690720,1.694508
307,3.067001,3.066812,0.012656
308,519.895142,519.118225,51.794449
309,35.412037,35.410759,0.085280
310,74.790955,74.752708,2.549969
311,69.378807,69.373489,0.354359
312,183.362518,182.345612,67.793533
313,28.434235,28.431013,0.214752
314,11.167187,11.165689,0.099876
315,21.392334,21.391993,0.022795
316,60.012768,59.960102,3.510966
317,448.888214,448.028320,57.326347
318,6.784513,6.784249,0.017617
319,22.179609,22.179304,0.020314
320,6.547755,6.547507,0.016528
321,6.595774,6.595497,0.018436
322,157.282364,157.018204,17.610950
323,8.474428,8.474092,0.022393
324,20.576744,20.576410,0.022239
325,6.993746,6.993460,0.019073
326,292.068146,290.716827,90.088463
327,1576.791626,1535.776001,2734.373779
# Please uncomment this the line below if you would like to load the saved model
fpnet.load_state_dict(torch.load('deformation_5objs_latest.pt'))
<All keys matched successfully>
video_dataset = VideoFrameDataset(VIDEO_PATH)
loader = DataLoader(video_dataset,batch_size=1)
fpnet.eval()
FramePredNet(
(unet_model): Unet(
(upsample): Upsample(scale_factor=2.0, mode=nearest)
(downarm): ModuleList(
(0): ConvBlock(
(main): Conv2d(2, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(2): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(3): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
(uparm): ModuleList(
(0): ConvBlock(
(main): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(2): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(3): ConvBlock(
(main): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
(extras): ModuleList(
(0): ConvBlock(
(main): Conv2d(34, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
(1): ConvBlock(
(main): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(activation): LeakyReLU(negative_slope=0.2)
)
)
)
(flow): Conv2d(16, 2, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(spatial_transform): SpatialTransformer()
)
def flow2hsv(flow, show_style=1):
mag, ang = cv2.cartToPolar(flow[..., 0], flow[..., 1])
hsv = np.zeros((flow.shape[0], flow.shape[1], 3), np.uint8)
if show_style == 1:
hsv[..., 0] = ang * 180 / np.pi / 2
hsv[..., 1] = 255
hsv[..., 2] = cv2.normalize(mag , None, 0, 255, cv2.NORM_MINMAX)
elif show_style == 2:
hsv[..., 0] = ang * 180 / np.pi / 2
hsv[..., 1] = cv2.normalize(mag , None, 0, 255, cv2.NORM_MINMAX)
hsv[..., 2] = 255
bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
return bgr
def draw_hsv(flow):
h, w = flow.shape[:2]
fx, fy = flow[:,:,0], flow[:,:,1]
ang = np.arctan2(fy, fx) + np.pi
v = np.sqrt(fx*fx+fy*fy)
hsv = np.zeros((h, w, 3), np.uint8)
hsv[...,0] = ang*(180/np.pi/2)
hsv[...,1] = 255
hsv[...,2] = np.minimum(v*4, 255)
bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
return bgr
def draw_flow(img, flow, step=16):
h, w = img.shape[:2]
y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1).astype(int)
fx, fy = flow[y,x].T
lines = np.vstack([x, y, x + fx, y+fy]).T.reshape(-1, 2, 2)
lines = np.int32(lines + 0.5)
#For fpnet
vis = cv2.cvtColor(np.float32(img), cv2.COLOR_GRAY2BGR)
#vis = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
cv2.polylines(vis, lines, 0, (0, 255, 0))
for (x1, y1), (x2, y2) in lines:
cv2.circle(vis, (x1, y1), 1, (0, 255, 0), -1)
return vis
i = 0
for old,new in loader:
# Generate the moving images and convert them to tensors.
moving_image, input_fixed = old.unsqueeze(0), new.unsqueeze(0)
input_moving = moving_image.to(device).float()
input_fixed = input_fixed.to(device).float()
# Run the data through the model to produce warp and flow field
warp, flow = fpnet(input_moving, input_fixed)
_flow = flow.detach().cpu().squeeze().permute(1,2,0).numpy()
_flow = np.rint(_flow)
_flow_img = flow2hsv(_flow,show_style=2)
#_flow_img = draw_flow(moving_image.squeeze(),flow.detach().cpu().squeeze().permute(1,2,0).numpy())
#_flow = flow.detach().cpu().squeeze().permute(1,2,0).numpy()
#_flow_img = draw_flow(moving_image.squeeze(),_flow)
if i >=5:
break
i += 1
cv2_imshow(_flow_img)
def warp_flow(img, flow):
h, w = flow.shape[:2]
flow = -flow
flow[:,:,0] += np.arange(w)
flow[:,:,1] += np.arange(h)[:,np.newaxis]
res = cv2.remap(img, flow, None, cv2.INTER_LINEAR)
return res
from random import randint
import sys
cam = cv2.VideoCapture(VIDEO_PATH)
ret, prev = cam.read()
width = int(cam.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cam.get(cv2.CAP_PROP_FRAME_HEIGHT))
target_fps = int(cam.get(cv2.CAP_PROP_FPS))
if not ret:
sys.exit(1)
prevgray = cv2.cvtColor(prev, cv2.COLOR_BGR2GRAY)
video_writer = cv2.VideoWriter('overlay_output_results.mp4',
cv2.VideoWriter_fourcc(*"mp4v"),
target_fps,
(width, height))
i_frames = 0
# folder saving the flo files
flows_folder = '/content/flows_results/flos'
if not os.path.exists(flows_folder):
os.makedirs(flows_folder)
while cam.isOpened():
ret, img = cam.read()
if ret:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
moving_image = torch.from_numpy(prevgray).unsqueeze(0).unsqueeze(0)
input_fixed = torch.from_numpy(gray).unsqueeze(0).unsqueeze(0)
input_moving = moving_image.to(device).float()
input_fixed = input_fixed.to(device).float()
# Run the data through the model to produce warp and flow field
warp, flow = fpnet(input_moving, input_fixed)
_flow_c = flow.detach().cpu().squeeze().permute(1,2,0).numpy()
#flows.append(_flow_c) # np.rint round to int
flow_filename = os.path.join(flows_folder,f'flow_{i_frames:06}.flo')
write_flow(flow_filename, _flow_c)
_flow_img = draw_hsv(_flow_c)
out_img = cv2.addWeighted(img,0.3,_flow_img,0.7,0.2)
video_writer.write(out_img)
if i_frames % 100 == 0:
print('current frame: ',i_frames)
cv2_imshow(_flow_img)
cv2_imshow(out_img)
prevgray = gray
i_frames += 1
else:
break
cv2.destroyAllWindows()
cam.release()
video_writer.release()
current frame: 0
current frame: 100
current frame: 200
current frame: 300
# install flowiz for read .flo optiocal flow files
!pip install flowiz -U
import glob
import flowiz as fz
flow_files = glob.glob('/content/flows_results/*.flo')
uv = fz.convert_from_file(flow_files[0])
plt.imshow(uv)
<matplotlib.image.AxesImage at 0x7f8a48f69e80>
uv = fz.read_flow(flow_files[1])
f, axarr = plt.subplots(1,2)
f.set_size_inches(15, 5)
axarr[0].set_title('Horizontal Flow (U)')
axarr[0].imshow(uv[...,0],cmap=plt.get_cmap('binary'))
axarr[1].set_title('Vertical Flow (V)')
axarr[1].imshow(uv[...,1],cmap=plt.get_cmap('binary'))
<matplotlib.image.AxesImage at 0x7f8a48eb4908>
# Please uncomment the following file if you would like to convert flo files to png files and save them to a video file
#!python -m flowiz /content/flows_results/*.flo --outdir /content/flows_results/png --videodir /content/flows_results/mp4
#Download the flo result files
!zip -r flows_results.zip /content/flows_results
from google.colab import files
files.download('/content/flows_results.zip')
Reference:
VoxelMorph at TMI
Diffeomorphic VoxelMorph at MedIA
Neurite Library - CVPR


PSMERGE(1) PSMERGE(1) NAME psmerge - filter to merge several PostScript files into one SYNOPSIS psmerge [ -oout.ps ] file.ps ... DESCRIPTION Psmerge merges PostScript documents into a single document. It only works in the specific case the the files were created using the same applica‐ tion, with the same device setup and resources (fonts, procsets, pat‐ terns, files, etc) loaded. If the -o option is used, output will be sent to the file named, other‐ wise it will go to standard output. Psmerge will merge multiple files concatenated into a single file as if they were in separate files. AUTHOR Copyright (C) Angus J. C. Duggan 1991-1995 SEE ALSO psbook(1), psselect(1), pstops(1), epsffit(1), psnup(1), psresize(1), psmerge(1), fixscribeps(1), getafm(1), fixdlsrps(1), fixfmps(1), fixps‐ ditps(1), fixpspps(1), fixtpps(1), fixwfwps(1), fixwpps(1), fixwwps(1), extractres(1), includeres(1), showchar(1) TRADEMARKS PostScript is a trademark of Adobe Systems Incorporated. BUGS psmerge is for a very specific case; it does not merge files in the gen‐ eral case. PSUtils Release 1 Patchlevel 17 PSMERGE(1)


infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll
infinity scroll #1
infinity scroll #2
infinity scroll #3
infinity scroll #4
infinity scroll #5


{% extends "base.html" %} {% block content %}
Having a problem? Have a question?
Send me an email at brett.vanderwerff@gmail.com


THE COOK, THE THIEF, HIS WIFE & HER LOVER A film review by Mark R. Leeper Copyright 1990 Mark R. Leeper
Capsule review: HBO is hiring established directors to do segments of its "Tales from the Crypt" series. Peter Greenaway didn't wait to be asked. He lovingly made a two- hour horror comic story with some hilarious detail. Somehow it is being treated as an art film. A unique film that certainly will not be for all audiences. Rating: +2.
Peter Greenaway's most famous film to this point was THE DRAUGHTSMAN'S CONTRACT. On the surface that was a mystery set at a country estate. Its subtext was that beneath the affected surface of the upper class there is mischief and dirt. The style was, however, very affected and uninvolving and bloodless. To be frank, I could not wait for the film to end. In THE COOK, THE THIEF, HIS WIFE & HER LOVER, Greenaway seems once again to have it in for the upper classes (or at least for the nouveau riche) who dine at a very fine French restaurant (as well as for the people who put up letters on theater marquees). But this time around the cold and uninvolving style is gone. Really gone. The film starts like a Monty Python sketch that goes on a bit too long, then it fades to John Waters, then Herschel Gordon Lewis, and when it is all over we find we have been watching an intricately mounted E.~C.~Comic and a story that could have been taken from the pages of VAULT OF HORROR or TALES FROM THE CRYPT. I laughed my way through the film, was delighted by every ghoulish turn, but I have to say that I cannot recommend this film to most of the people I know. I do not remember when I have seen a film that more people walked out on.
What we have here is one week behind the scenes at The Restaurant From Hell. Actually, the restaurant is "La Hollandais"--soon to be known as "Spica and Boarst's." Richard Boarst is a superb Cordon-Bleu-class French chef whose restaurant was taken over by gangster Albert Spica. Spica does not live by halfway measures.  Night after night he holds forth at his restaurant, piling vulgarity on vulgarity and often savaging his customers. We are led to assume that the cuisine must be very, very good for anyone to be willing to sit in the same restaurant as Spica. The gangster repeatedly brutalizes his wife Georgina, whom he virtually holds prisoner. Georgina, however, is able to sneak away from Spica occasionally to rendezvous with a rather studious, quiet customer, Michael, with whom she makes passionate love.
Greenaway, who wrote as well as directed, has written what could well have been a stage play. There are only a very limited number of sets, and the sets are designed for use of color and for effect rather than for accuracy. First we see the parking lot infested with a veritable army of stray dogs. The kitchen is a hilarious revelation of what goes on behind the scenes at a fancy restaurant. What goes on in the kitchen is unbelievable. The transition from this kitchen that you would not feed a dog from to the ultra-posh dining room stuns the viewer. And so it goes, from one room to the next.
Michael Gambon plays Spica and must speak two-thirds of the lines in the film. He never shuts up and he never says anything you want to hear. Gambon was good in the BBC drama THE SINGING DETECTIVE but his Albert Spica will easily eclipse that role. Helen Mirren is usually good and this is probably a role that will get more attention than her (perhaps better) films such as THE LONG GOOD FRIDAY.
THE COOK, THE THIEF, HIS WIFE & HER LOVER is not really an art film but a ghoulish horror comic book with art film trappings. If you see it, I cannot promise you will like it, but I can promise you that you have not seen any other film like it. I give it a +2 on the -4 to +4 scale.
Mark R. Leeper att!mtgzx!leeper<EMAIL_ADDRESS>.
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


Museum of Today
06 Oct 2009If you have ever been to a science museum, you know what to expect: wild animals preserved in threatening poses, strange bugs from across the planet and, if you're lucky, some dinosaur bones. Things have changed a bit at the California Academy of Sciences. Last year they completed a major overhaul to their facility in Golden Gate Park in San Francisco, and transformed it into the greenest museum in the world (LEED Platinum). The usual bugs and bones remain, but the exhibits have been designed to increase visibility and interaction. You can walk through a four-story glass orb that contains the rainforest exhibit, explore the amazing aquarium, stare at the night sky in the planetarium, or watch researchers do their actual work in front of you.
My favorite exhibit is the building itself. It is packed with green features but none are obtrusive. The average visitor may not notice the solar array, computer-controlled natural ventilation, or rainwater collection, but they will definitely notice the result: a beautiful, light-filled, comfortable museum which prompts you to spend the day learning. The grandest green feature it its 2.5 acre green roof which looks like a green carpet floating above the whole museum. Architect Renzo Piano sketched it with one undulating line. From the observation deck you can enjoy an impressive view of the native plantings and species that call the roof their home, as well as the rest of the park and city beyond. I wish my office was up there; it is amazing.
More info:- California Academy of Sciences
- Inhabitat article about Cal Academy


My Awesome Site
Everyone is welcome. This site is evolving
Things I really like:
Coding
This class
Coffee
Beer


[1]
queen size bed in one room and were there.
[2]
the bathroom had shower toilet and bunks in the other.


| Home | Trees | Indices | Help |
|
|---|
|
|
object --+ | common.Client.Client --+ | DfpClient
Provides entry point to all web services.
Allows instantiation of all DFP API web services.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|
|||
auth_pkl_name = 'dfp_api_auth.pkl'
|
|||
config_pkl_name = 'dfp_api_config.pkl'
|
|||
|
Inherited from |
|
|||
|
Inherited from Inherited from |
|
Inits Client. Args: [optional] headers: dict Object with populated authentication credentials. config: dict Object with client configuration values. path: str Relative or absolute path to home directory (i.e. location of pickles and logs/). Example: headers = { 'email'<EMAIL_ADDRESS>'password': 'secret', 'authToken': '...', 'applicationName': 'GoogleTest', 'networkCode': 'ca-01234567', 'oauth2credentials': 'See use_oauth2.py' } config = { 'home': '/path/to/home', 'log_home': '/path/to/logs/home', 'proxy': 'http://example.com:8080', 'xml_parser': '1', # PYXML = 1, ELEMENTREE = 2 'debug': 'n', 'raw_debug': 'n', 'xml_log': 'y', 'request_log': 'y', 'raw_response': 'n', 'strict': 'y', 'pretty_xml': 'y', 'compress': 'y', 'access': '' } path = '/path/to/home'
|
Load existing authentication credentials from dfp_api_auth.pkl. Returns: dict Dictionary object with populated authentication credentials. |
Write updated authentication value for a key in dfp_api_auth.pkl. Args: key: str Key to update. new_value: str New value to update the key with. |
Load existing configuration values from dfp_api_config.pkl. Returns: dict Dictionary object with populated configuration values. |
Set default configuration values for missing elements in the config dict. Args: config: dict Object with client configuration values. Returns: dict The config dictionary with default values added. |
Call API method directly, using raw SOAP message. For API calls performed with this method, outgoing data is not run through library's validation logic. Args: soap_message: str SOAP XML message. url: str URL of the API service for the method to call. server: str API server to access for this API call. http_proxy: str HTTP proxy to use for this API call. Returns: tuple Response from the API method (SOAP XML response message).
|
Generic method to create a service. Args: service_name: str Name of the service to create. [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. op_config: dict service configuration. Returns: GenericDfpService New object representing the SOAP service. |
Create a CompanyService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the CompanyService object. |
Create a ContentService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the ContentService object. |
Create a CreativeService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the CreativeService object. |
Create a CreativeTemplateService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the CreativeTemplateService object. |
Create a CustomTargetingService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the CustomTargetingService object. |
Create a ForecastService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the ForecastService object. |
Create a InventoryService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the InventoryService object. |
Create a LabelService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the LabelService object. |
Create a LineItemCreativeAssociationService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the LineItemCreativeAssociationService object. |
Create a LineItemService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the LineItemService object. |
Create a NetworkService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the NetworkService object. |
Create a OrderService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the OrderService object. |
Create a PlacementService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the PlacementService object. |
Create a PublisherQueryLanguageService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the PublisherQueryLanguageService object. |
Create a ReportService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the ReportService object. |
Create a SuggestedAdUnitService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the SuggestedAdUnitService object. |
Create a ThirdPartySlotService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the ThirdPartySlotService object. |
Create a UserService. Args: [optional] server: str API server to access for API calls. The default value is 'https://www.google.com'. version: str API version to use. http_proxy: str HTTP proxy to use. Returns: GenericDfpService New object representing the UserService object. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |


Welcome to cf-node-debugger!
You may proceed directly to the debugger.
For more info on cf-node-debugger, visit https://www.npmjs.org/package/cf-node-debug
cf-node-debugger uses https://www.npmjs.org/package/cf-node-inspector for the debugger user interface.
node-inspector uses Chrome's Dev Tools for the debugger user interface.


Products
Product One
Product Two
Product Three
Product Four
Product Five
Partners
Partner Benefits
Partner Application
Partner Listing
Customers
Customer One
Customer Two
Customer Three
Customer Four
Customer Five
Customer Six
Customer Seven
About Us
Executive Team
Investors
Career
Press Center
Success Stories
Contact Us


Artwork - more questions
-
anonymous
I just found this app, and I am enjoying it so far, but I have one problem. Like others who have posted here, I don't really understand the thinking when it comes to the artwork. I have scanned the artwork for all the CD I have imported into iTunes, and ( unless I have missed something here ) they are now imbedded into the file. Synergy pulls that inage from the file and saves it again as a .tiff file in another folder. I like haveing the artwork displayed with the song/album info, but with a powerbooks limited storage, I cannot afford to have this redundancy. Is there no way to disable the save of the artwork in to Synergy's folder, while still displaying it?
Thanks.
-
Greg Hurrell
This is a historical legacy that stems from the fact that Synergy had artwork support before Apple ever released iTunes 4 (the first version which allowed you to embed artwork).
So all that caching thing was Synergy's way of dealing with it before iTunes 4 came along. When iTunes 4 did arrive Synergy added the ability to take art from iTunes, but it continued using the cache because that was the "engine" of the whole cover art support.
Synergy Advance doesn't have to work with this historical baggage, because it's a completely new product. You'll see some nifty features related to album art when Synergy Advance gets released...
Reply
This topic is now closed.