Where to buy last minute Christmas gifts online: last delivery dates
Find out when the last delivery dates for Amazon, John Lewis, Currys PC World and more are this Christmas.
by Ashleigh MacroChristmas may be just around the corner, . There is still time to buy last minute Christmas gifts, right up until the day itself. Here, we talk you through the last days to order from the likes of Amazon and other online retailers, as well as last minute gifts that don’t require delivery at all.
If you're still stuck for what to buy, you might find our round-up of the best Christmas gifts of the year useful.
Last days to order from Amazon
The last days to order from Amazon will depend on whether or not you have Prime, or how much you’re willing to pay to get your items on time.
If you haven't already used your Amazon Prime 30 day free trial (you can use it once a year) we'd highly recommend doing so in order to save money on your deliveries this Christmas. You can sign up to the 30-day free trial here.
Without Prime
Free delivery: Order by Friday 20 December at 11:59pm
Standard delivery: Order by Sunday 22 December at 9:30am
One-day delivery (£5.99 per delivery for non-Prime members): Order by Monday 23 December, by last order time (as listed on product page) to receive the item by Christmas Day. This also depends on the item and your location.
Same-day delivery (evening delivery): Order by Tuesday 24 December at midday if you're in Greater London or in one of the other eligible cities.
With Prime
Prime Members receive free One-Day delivery as the default option (that is, if the product you buy is eligible for One-Day delivery).
One-day delivery: Order by Saturday 23 December, last order time depends on the item and your location. The item should arrive by 24 December.
Same-day delivery: Order by Sunday 24 December at midday if you live in one of the 14 eligible cities.
Prime Now
Order by 24 December (Christmas Eve) - Get free 2-hour delivery by midnight on Christmas Eve for order values over £40 if you order by 9:15pm (7:15pm in Glasgow). One-hour delivery will cost £7.99 and orders must be made by 10:59pm for delivery by midnight. Prime Now operates in one of the nine eligible cities: Birmingham, Glasgow, Leeds, Liverpool, London, Manchester, Newcastle, Portsmouth, and Sheffield. Read more about Prime Now.
Christmas Day - No deliveries made
You can get most things from Amazon and that leaves you the most time to do so, particularly if you have Prime, but there are still other options available. Below you’ll find the last dates for most major online retailers in the UK.
| Retailer | Last date for standard delivery (free or low-cost) | Last Day for Delivery before Christmas | Click and Collect |
| AO | Deliveries carry on as usual until 24 December, so 22 December is the cut off for standard two-day delivery (from £5) | 23 December, before 5pm for Next Day Delivery (from £10) No Next Day service on the 24-26 December. Delivery resumes on 27 December (subject to availability) but stops again between 31 December to 1 January. |
Depending on availability, can be ready for next day collection by 9pm before 24 December |
| Currys PC World | 19 December, free | 22 December, 7pm for Next-Day delivery on large items 22 December, 9pm for Next-Day delivery on small items |
24 December, 2pm |
| Debenhams | 20 December, by 7pm | 23 December for Next-Day or Nominated-Day before 7pm 22 December before 10pm for Next Evening or Nominated Evening |
23 December, before 7pm |
| John Lewis | 19 December, 7pm | 22 December, 8pm for Next Day (£6.95) or Next day before 10:30 am (£10.95) 20 December for Next Day evening (£9.95) |
Free for orders over £30, order by 8pm for next day collection at 2pm |
| M&S | 18 December, 8pm | 23 December, 6pm for nominated-day delivery | 23 December (in-store pick up), order by 6pm |
| Next | 22 December, midnight for Next Day Delivery | 22 December, midnight for Next Day Delivery | 23 December for in-store collection 23 December, 6pm for delivery to a store by 24 December |
| Zavvi | 21 December (£1.99) | 23 December, 5pm for for Next Day Standard Delivery (£3.99) 22 December before midnight for Next Day evening delivery by 23 December |
N/A |
Last minute Christmas Gift Cards
If you're shopping on Christmas Eve and can't find anything to buy from Currys PC World, you might like to buy a digital gift that can be sent via email or printed at home. Go to Currys to get one.
Amazon offers digital gift cards too which are available here.
You'll also find lots of e-gift cards online, including ones for retailers like Debenhams, Starbucks and lots more.
Next gift cards are available to buy digitally here.
One4All is another gift card option which works in over 55,000 stores on the High Street and online. Standard shipping costs 99p though is free for orders over £50 and arrives in 2 to 3 days. Special Delivery costs £6.50 and takes 1-2 business days to arrive.


Global Options
Under normal circumstances, only info
, warn
and error
logs are printed to the console. For development, you may also want to see debug
logs.
log.level
: The minimum level log messages must have to be shown
By default the CLI assumes that it is connecting to servers that use TLS certificates that are trusted by the operating system. When connecting to servers with self-signed certificates or a custom CA, the ca
option can be used to trust those certificates. When connecting servers that don’t use TLS, the insecure
option can be used.
ca
: CA certificate fileinsecure
: Connect without TLS
The CLI can keep track of multiple configurations and multiple credentials. The credentials-id
flag selects the set of credentials that are used to connect to servers. The login
command registers the hosts that are configured at that moment, and will prevent leaking credentials to other hosts. This can be circumvented with the allow-unknown-hosts
option.
credentials-id
: Credentials ID (if using multiple configurations)allow-unknown-hosts
: Allow sending credentials to unknown hosts
By default the CLI uses JSON as the input and output format. It is also possible to use a Go template as output format.
input-format
: Input formatoutput-format
: Output format
API Options
The CLI needs to be configured with the addresses of the OAuth server. The Getting Started guide gives a good example configuration for a typical deployment.
oauth-server-address
: OAuth Server addressidentity-server-grpc-address
: Identity Server addressgateway-server-enabled
: Gateway Server enabledgateway-server-grpc-address
: Gateway Server addressnetwork-server-enabled
: Network Server enablednetwork-server-grpc-address
: Network Server addressapplication-server-enabled
: Application Server enabledapplication-server-grpc-address
: Application Server addressjoin-server-enabled
: Join Server enabledjoin-server-grpc-address
: Join Server addressdevice-claiming-server-grpc-address
: Device Claiming Server addressdevice-template-converter-grpc-address
: Device Template Converter addressqr-code-generator-grpc-address
: QR Code Generator address


The Newest
triple-action
HOO
$400 New!
Now only $299 !!!
Contact: 555 555 555
The Newest
triple-action
HOO
$400 6
Now only $299 !!!
Contact: 555 555 555
The Newest
triple-action
HOO
$400
Now only $299 !!!
Contact: 555 555 555
The Newest
triple-action
HOO
Before $400
Now only $299 !!!
Contact: 555 555 555
The Newest
triple-action
HOO
Before $400
Now only $299 !!!
Contact: 555 555 555
The Newest
triple-action
HOO
Before $400
Now only $299 !!!
Contact: 555 555 555


| DOSE: T+ 0:00 |
1 drop |
oral |
DOB |
(liquid) |
| T+ 0:00 |
repeated |
smoked |
Cannabis |
|
| T+ 3:00 |
repeated |
smoked |
Cannabis |
|
| T+ 4:30 |
1 hit |
oral |
MDMA |
(pill / tablet) |
| T+ 7:00 |
repeated |
smoked |
Cannabis |
|
| T+ 7:30 |
0.5 hits |
oral |
MDMA |
(pill / tablet) |
| T+ 8:00 |
repeated |
smoked |
Cannabis |
|
| T+ 9:30 |
repeated |
smoked |
Cannabis |
|
10:30 am DOB/Liquid (eyedropper)/unknown amount
10:30 am Cannabis/Kief/Bong
+4:00 hours 1 pill LV Green Ecstasy/Cut with caffeine
+5:30 hours Cannabis/Smoked/Bong/repeated
+0:30 hours Cannabis/Smoked/Zong/repeated
+3:00 hours Ĺ pill LV Green Ecstasy
+0:30 hours Cannabis/Smoked/Bong/repeated
Do not allow the title to fool you, this trip was anything but bitter.
I was gifted with a rare chance to take a drug which prior to when I received it I had no knowledge of its existence and effects. This drug is known DOB it is a synthetic psychedelic, very rarely found on the streets. Though it is very uncommon, what it is known for is its slow onset and potentially long trip (trips have been report to last upwards of 17 hours at high doses). Having done as much research on this gem as I could I decided I would take the DOB early in the morning with the initial intent of being able to sleep at a normal time. However what would come would be a long, profound trip unlike any of which I have experienced.
Allow me to first introduce myself in terms of my history of drug experiences. My first experience with a mind altering substance was during 8th grade when I got drunk for the first time. I then moved onto weed my freshmen year of high school. For the first two years of high school I was smoking weed basically everyday. Allow me to illustrate the point now that marijuana has a profound and amazing contribution to this trip. My following year of high school I turned my weed and drinking down to focus on school. Then senior year rolled around and I was back smoking everyday. I now am a freshman in college.
It is here that I have finally been turned onto the use of psychedelics, by my friend, brother, and fellow psychonaut J. He was an experienced tripper before he had come to college having tried shrooms, acid, ecstasy, and mescaline on several occasions. I had not trip till college but the drugs were always around me and Iíve wanted to do them. So college was a perfect time to catch upÖ and catch up I have done. My first 5 months of college I have experienced acid once (the first psych I took loved it), shrooms twice (a drug that truly fits me and I hold true heart, also taken with ecstasy on one occasion), ecstasy probably six times, and now have taken DOB.
To me psychedelic drugs are a pathway to the mind and a key to the door on reality. On my friend Jís birthday the hippie flip we did lead to myself, J, and our friend G in an intense conversion for three hours about everything. My fellow psychonauts and I get closer every time we bond over these substances. Whether itís giving one another a cool furry blanket on e, tripping one another out on psychs, or packing another bowl we connect even further as the chemicals alter our brain function to new dimensions.
To continue on with this and to who I am I must explain the use of marijuana in my life. To me weed is like any other part of my daily routine. Wake up, smoke a bowl, go to class, eat, smoke, repeat, etc (still do well in school 3.3 gpa as a Genetic Engineering Major). And I wish to also explain the extent of my marijuana use. A wake and bake for me is packing 6-7 bowls into my amazing bong. I then continue on with my day, class etc. smoke another 2-3 bowls around 11 am, eat lunch, re-up my high from eating with 2-3 bowls. Next comes class, sports, surfing, gym, etc. Then 4/20 sessions are often another 4-5 bowls or a joint. After dinner is always a free for all with packing bowls and smoking out of any devices that come our way. Essentially will go put of my weed to chill and blaze with anyone. So as you can probably tell I Love Cannabis (soon to be a medical patient). I believe weed is a key to the mind and you are able to learn a lot from her.
Now back to my point of why cannabis is so important to this trip. Long story short I went out of town and smoked my entire weed before hand. All of my hooks were out of town until the night so I couldnít smoke until then. What I believe and I will hopefully convince you of is that there may be some reaction between weed and DOB triggering peaks along with peaking ecstasy. What Iím about to tell you happened to me was quite interesting me being an analytic, logical person. I live my life in such an elevated state so often that weed can trigger the effects of certain psychedelics. Iím not sure about how much research had gone into this idea but it has interesting potential.
What weed did to my DOB trip is indescribable. It would propel me into a world of euphoria and closed as well as open eye visuals. The ecstasy would start to peak and the visuals from the DOB would come back artistic visuals and complete 3-D visuals. Also the onset of the DOB would cause amazing auditory hallucinations and perception changes that I would literally enjoy my friend saying extravagant words to me. Understand that I was unable to smoke weed until night, and that is when the DOB actually triggered almost 7 hours after dosing it. The weed brought the DOB to a level where I was able to control when I wanted to trip hard. All I needed to do for nearly 6 hours was smoke a bowl and I would be plunged into DOB/MDMA hyper-drive.
Allow me to continue on with the intent that you understand the extent to which weed smoking allowed me to alter my trip and bring myself in and out of the next dimension. I will continue with putting forth the idea that I have been unable to find much information on DOB not to mention mixing DOB with MDMA. So I wish to propose to the world a name for this combination of drugs. I call mixing DOB with MDMA a Bitter Flip. Allow me to explain my logic. For those of you that have not taken DOB the very first thing I experienced is a very bitter flavor. This is where they saying ďIf its bitter, itís a spitterĒ comes from. This saying is a rhyme to tell potential acid takers that it their blotter tastes bitter it is most likely DOB because acid has no taste due to how low the active doses are.
Then the next piece of the puzzle is the MDMA which is typically called a ďflipĒ in poly-drug use. Thus I came up with the name Bitter Flip and I hope the world will like it (especially if more of you discover how amazing this combination truly is) (also I apologize if you have done this and call it something else but I thought it was really a good name and you know what I mean by the bitter taste).
I will now actually enlighten the world to the extraordinary derivative of a hero of mine Dr. Alexander Shulgin as with the combination of MDMA and the expansion of my mind through cannabis use.
10:30 am- My usual wake and bake partner is out of town so I decide to take the DOB at this time as I learned that it can take upwards of 3 hours to kick in. My acquisition of the DOB was completely random. J and I decided to not go to Psychology lecture half way walking there. As we are returning to the dorms we see some acquaintances and walk over to them. A guy we barely know asks if we knew anyone who would want ecstasy, we said we did, we all went to my room. After the e deal he asked if I wanted some DOB, a drug Iíd never heard of. I said yes, always up for a new adventure. I researched it then a few days later did it.
T+3:00 - A group of friends and I decide to go get breakfast.  On the way down sounds slowly become sharper and more pristine. I had heard auditory hallucinations were some signs of DOB kicking in, so I rolled with it.
T+4:30 - The DOB really isnít doing anything for me at all. At this point Iím not stoned at all, I decide to take a hit of the ecstasy I had purchased to see how the roll is.
T+5:30 - Rolling along pretty well, just listening to my friend G play his guitar.
T+7:00 - J finally gets back and we decide that we both need to go buy some weed. After making numerous phone calls we find a hook, get on our bikes and ride off. We get to the dealers place and pick up 1/8 of G-13 and 1/8 of Bubba Kush. Our dealer has a nice bong and since neither of us was high we smoked a few bowls. This is where the night would change for me, because as soon as that weed started engulfing my mind, it sent the effects of the DOB into hyperdrive.
T+7:15 - We hop on our bikes to begin the venture back to our dorm rooms. This is when my perception is changed. As we walked down the stairs initially to get our bikes I notice sound is more pleasant and even ask J to say some cool words jut because they were awesome to me. When I started riding my bike the night sky was clear and full of stars. As Iím looking into the sky I begin to notice shapes forming and odd other things occurring. At this time I think to myself ďthere is no way the DOB is finally kicking inĒ. As Iím riding along my friends gradually ride away from me as amazing visuals of color pour down the backset canvas of the night. As soon as I could catch up to J I said the DOB is finally kicking in and that it was amazing.
T+7:30 - Upon arrival to the dorms I get off my bike and commence to sitting down in admiration of the amazingly colorful sky. We all walk upstairs after a little while and J asks me for the rest of the ecstasy we had purchased. Offering the idea that he would trip with me I willingly handed over 1.5 pills, the other .5 I took myself.
T+8:00 - We keeping smoking bowls and every time I smoke one it sends into DOB hyperspace. I was able to smoke a bowl and decide if I wanted to close my eyes fore some awesome CEV or I could look out the window into the sky and have awesome OEV. After as little while I discovered how awesome the I Tunes visualizer was as I persisted to stare at it for probably 15 minutes. Every now and then I would try to grab the lights and images the visualizer was putting out, is was all 3-D in my mind, I never ended up catching any of it.
T+8:15 - As the roll starts to kick in for both J and I we decide to go buy cigarettes. On the walk there would be when the DOB would really start to peak. As we start the walk the back light from moonshine and lamp posts reflect light onto the trees surrounding our path. As I began to look into the branches, they formed remarkable shapes. Many of the visuals here reminded me much of my 70x salvia trip, in the comedown. Often I would see human figures, often dancing then it would suddenly change to another object. As we continued our walk, the sky morphed into everything from mushrooms to jesters.
T+9:00 - Just walking around enjoying the trip for what it is.
T+9:30 - Head back to my place where we commence to smoke more weed which in turn continues to send me into DOB hyperspace.
At this point time is just sort of a blur the only thing I remember is at 3 am smoking some more and it still persisted to send me into the visual DOB trip.
The next morning- I wake up pretty early, which is normal.  My body is tingling from the after effects of the e and DOB, my mind is in a slight haze from the entire experiment. J walks into my room, we wake and bake and I begin to share my experience with him and my other friends. I was ecstatically pleased on how the trip went thus was more then welcome to share any piece of information. As the continued we gradually racked up bong rips and I suddenly feel different, I believe at this point the DOB slightly repeaked and for 30 minutes I had a semi-out-of-body experience.
I thank you for reading though this report, as I hope more psychonauts will discover the potential of DOB. Happy Bitter Flipping!!!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Tyler D Clark
I like to develop software and chew bubble gum... And I'm all of out of gum.
The background animation was created using the Marching squares algorithm and OpenSimplex noise function. Made with p5.js and ♥.
Send message View Github
Start/stop background
Back


prepare('SELECT projectname,projectdescription,projectchapters FROM users WHERE id = ?'); // In this case we can use the account ID to get the account info. $stmt->bind_param('i', $_SESSION['id']); $stmt->execute(); $stmt->bind_result($projectname,$projectdescription,$projectchapters); $stmt->fetch(); $stmt->close(); ?>
Project name: |
=$projectname?> |
Project description: |
=$projectdescription?> |
Chapters: |
=$projectchapters?> |
Video: |
|


Facebook to consolidate payment tools across its apps with Facebook Pay
Facebook Pay will begin rolling out on Facebook and Messenger this week in the United States
by ReutersFacebook Inc said on Tuesday it was launching Facebook Pay, a service that will help consolidate payments tools across its social media platforms including Whatsapp and Instagram.
The company said the service allows users to send money or making a payment, while giving them an option to add a PIN or use biometrics on their smartphones including touch or face ID for security.
Facebook said the service will collect user information such as payment method, date, billing and contact details when a transaction is made and that it would use the data to show targeted advertisements to users.
Facebook Pay will begin rolling out on Facebook and Messenger this week in the United States, the social media giant in a blog post.


In order to debug code JITed by LLVM, you need GDB 7.0 or newer, which is available on most modern distributions of Linux. The version of GDB that Apple ships with XCode has been frozen at 6.3 for a while. LLDB may be a better option for debugging JITed code on Mac OS X.
Consider debugging the following code compiled with clang and run through lli:
#include <stdio.h> void foo() { printf("%d\n", *(int*)NULL); // Crash here } void bar() { foo(); } void baz() { bar(); } int main(int argc, char **argv) { baz(); }
Here are the commands to run that application under GDB and print the stack trace at the crash:
# Compile foo.c to bitcode. You can use either clang or llvm-gcc with this # command line. Both require -fexceptions, or the calls are all marked # 'nounwind' which disables DWARF exception handling info. Custom frontends # should avoid adding this attribute to JITed code, since it interferes with # DWARF CFA generation at the moment. $ clang foo.c -fexceptions -emit-llvm -c -o foo.bc # Run foo.bc under lli with -jit-emit-debug. If you built lli in debug mode, # -jit-emit-debug defaults to true. $ $GDB_INSTALL/gdb --args lli -jit-emit-debug foo.bc ... # Run the code. (gdb) run Starting program: /tmp/gdb/lli -jit-emit-debug foo.bc [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7f55164 in foo () # Print the backtrace, this time with symbols instead of ??. (gdb) bt #0 0x00007ffff7f55164 in foo () #1 0x00007ffff7f550f9 in bar () #2 0x00007ffff7f55099 in baz () #3 0x00007ffff7f5502a in main () #4 0x00000000007c0225 in llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) () #5 0x00000000007d6d98 in llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::string, std::allocator<std::string> > const&, char const* const*) () #6 0x00000000004dab76 in main ()
As you can see, GDB can correctly unwind the stack and has the appropriate function names.
Without special runtime support, debugging dynamically generated code with GDB (as well as most debuggers) can be quite painful. Debuggers generally read debug information from the object file of the code, but for JITed code, there is no such file to look for.
Depending on the architecture, this can impact the debugging experience in different ways. For example, on most 32-bit x86 architectures, you can simply compile with -fno-omit-frame-pointer for GCC and -disable-fp-elim for LLVM. When GDB creates a backtrace, it can properly unwind the stack, but the stack frames owned by JITed code have ??'s instead of the appropriate symbol name. However, on Linux x86_64 in particular, GDB relies on the DWARF call frame address (CFA) debug information to unwind the stack, so even if you compile your program to leave the frame pointer untouched, GDB will usually be unable to unwind the stack past any JITed code stack frames.
In order to communicate the necessary debug info to GDB, an interface for registering JITed code with debuggers has been designed and implemented for GDB and LLVM. At a high level, whenever LLVM generates new machine code, it also generates an object file in memory containing the debug information. LLVM then adds the object file to the global list of object files and calls a special function (__jit_debug_register_code) marked noinline that GDB knows about. When GDB attaches to a process, it puts a breakpoint in this function and loads all of the object files in the global list. When LLVM calls the registration function, GDB catches the breakpoint signal, loads the new object file from LLVM's memory, and resumes the execution. In this way, GDB can get the necessary debug information.
At the time of this writing, LLVM only supports architectures that use ELF object files and it only generates symbols and DWARF CFA information. However, it would be easy to add more information to the object file, so we don't need to coordinate with GDB to get better debug information.


Our team is a conglomerate of highly skilled, talented and versatile Engineers.
We deploy our wealth of experiences in delivering top-notch services and utmost client satisfaction.
We've got your back anytime any day!
Our team is a conglomerate of highly skilled, talented and versatile Engineers.
We deploy our wealth of experiences in delivering top-notch services and utmost client satisfaction.
We've got your back anytime any day!


{% extends 'layout.html' %} {% block contentclass %} center{% endblock %} {% block content %}
Redis-V8 is free software implementing structured memory store with Google's V8 JavaScript engine built into it. It resembles an ORM in the way it is used for database scripting and record retrieval. The project's goals are: elegance and ease of use, high performance, bandwidth conservation and filling the missing spots in Redis tooling.
This project is a Redis fork that is compiled and run completely independent of any other Redis installation you might be using. It allows the creation and execution of complex JS scripts within the database itself, significantly increasing a Redis database performance in many scenarios and making data manipulation simple, convenient and efficient.
Redis is fast, but Redis-V8 is even faster! See the benchmarks.
$ ./redis-cli JS "return redis.set('hello', 'world');" { "ret" : true , "cmds" : 1 } JS "return redis.get('hello')" { "ret" : "world" , "cmds" : 1 } JS "var arr = [1, 2, 3, {hello: 'world'}]; return arr" { "ret" : [ 1, 2, 3, { "hello" : "world" } ] , "cmds":0}
Model('post') .head(100) .where('time',function(time){ return time > (+new Date - 86400*7); }) .getAll() .orderBy('rating', 'DESC') .limit(10) .each(function(post){ post.author = Model('author').get(post.author); post.comments = Model('post:'+post.id+':comment').getAll(); })
Redis is an open source, BSD licensed, advanced in-memory key-value store. It is often referred to as a database server for it's structured values, and capable data abstractions.
read moreV8 is Google's open source JavaScript runtime environment. V8 is written in C++ and is used in Chromium, the open source browser from Google. V8 can run standalone, or can be embedded into any C++ application.
read more


The Asbestos Industries creates safe, intuitive, and cheap E-commerce solutions for your company.
The mission: Help small companies conquer the online market.


Methods
| Name | Description | |
|---|---|---|
| AsGate(ActionCancellationToken) |
Creates a Gate with the supplied action
| |
| AsGateTParameterType(ActionTParameterType, CancellationToken) |
Creates a Gate with the supplied action
|
See Also


loklak
This is the front-end of Loklak
, an application which is able to collect and analyse messages from various sources, including Twitter. The application is divided into two parts: loklak
.net, the front-end (these pages) and loklak
.org, the search- and collecting back-end.
The back-end is not only able to collect millions of messages anonymously from Twitter, it can also distribute the collection workload into a peer-to-peer network. The back-end also stores the messages into an Elasticsearch search index and a downloadable message dump which can be imported into fresh, new loklak peers. The front-end uses a simple API to retrieve messages and mass-message statistics from the back-end. This front-end site is created in angular.js and node.js
This software is free and can be downloaded from the loklak GitHub project


Manage Place Order
| Code | Description | QTY | Unit Price | Total | Action |
|---|---|---|---|---|---|
| I001 | Mouse | 1 | 750.00 | 750.00 | |
| I002 | KeyBoard | 1 | 1750.00 | 1750.00 | |
| I003 | Pen Drive | 1 | 950.00 | 950.00 |
| Code | Description | QTY | Unit Price | Total | Action |
|---|---|---|---|---|---|
| I001 | Mouse | 1 | 750.00 | 750.00 | |
| I002 | KeyBoard | 1 | 1750.00 | 1750.00 | |
| I003 | Pen Drive | 1 | 950.00 | 950.00 |


| Microsoft Typography | ...on the Web | ...embedding | Microsoft WEFT 3 | |||
| WEFT 3 release notes | |||
|
When you see this screen the embedding process is complete, and you should move on to testing the embedded fonts created by WEFT and the Web pages it has modified. You may also wish to save the current WEFT settings by selecting 'Save' from WEFT's 'File' menu or by clicking the 'Save' button.
Options on this screen Back : Use this button to return to the 'Publish Web pages' screen. Finish : Click here to exit the WEFT wizard and return you to the main WEFT screen. Cancel : This button has the same effect as 'Finish'. Clicking this button will exit the WEFT wizard and return you to the main WEFT screen.
|
|||
| WEFT 3 release notes | |||
| Microsoft Typography | ...on the Web | ...embedding | Microsoft WEFT 3 | |||


The Board of Directors represent the upper level leadership of UmassEMS. They are elected each calendar year and serve one year terms.
The Administrative Staff is critical to keep UmassEMS running. These positions are appointed by the directors each academic year.


source file: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/s3transfer/manager.py
file stats: 293 lines, 103 executed: 35.2% covered
1. # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2. # 3. # Licensed under the Apache License, Version 2.0 (the "License"). You 4. # may not use this file except in compliance with the License. A copy of 5. # the License is located at 6. # 7. # http://aws.amazon.com/apache2.0/ 8. # 9. # or in the "license" file accompanying this file. This file is 10. # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11. # ANY KIND, either express or implied. See the License for the specific 12. # language governing permissions and limitations under the License. 13. import copy 14. import logging 15. import threading 16. 17. from botocore.compat import six 18. 19. from s3transfer.utils import get_callbacks 20. from s3transfer.utils import signal_transferring 21. from s3transfer.utils import signal_not_transferring 22. from s3transfer.utils import CallArgs 23. from s3transfer.utils import OSUtils 24. from s3transfer.utils import TaskSemaphore 25. from s3transfer.utils import SlidingWindowSemaphore 26. from s3transfer.exceptions import CancelledError 27. from s3transfer.exceptions import FatalError 28. from s3transfer.futures import IN_MEMORY_DOWNLOAD_TAG 29. from s3transfer.futures import IN_MEMORY_UPLOAD_TAG 30. from s3transfer.futures import BoundedExecutor 31. from s3transfer.futures import TransferFuture 32. from s3transfer.futures import TransferMeta 33. from s3transfer.futures import TransferCoordinator 34. from s3transfer.download import DownloadSubmissionTask 35. from s3transfer.upload import UploadSubmissionTask 36. from s3transfer.copies import CopySubmissionTask 37. from s3transfer.delete import DeleteSubmissionTask 38. from s3transfer.bandwidth import LeakyBucket 39. from s3transfer.bandwidth import BandwidthLimiter 40. 41. KB = 1024 42. MB = KB * KB 43. logger = logging.getLogger(__name__) 44. 45. 46. class TransferConfig(object): 47. def __init__(self, 48. multipart_threshold=8 * MB, 49. multipart_chunksize=8 * MB, 50. max_request_concurrency=10, 51. max_submission_concurrency=5, 52. max_request_queue_size=1000, 53. max_submission_queue_size=1000, 54. max_io_queue_size=1000, 55. io_chunksize=256 * KB, 56. num_download_attempts=5, 57. max_in_memory_upload_chunks=10, 58. max_in_memory_download_chunks=10, 59. max_bandwidth=None): 60. """Configurations for the transfer mangager 61. 62. :param multipart_threshold: The threshold for which multipart 63. transfers occur. 64. 65. :param max_request_concurrency: The maximum number of S3 API 66. transfer-related requests that can happen at a time. 67. 68. :param max_submission_concurrency: The maximum number of threads 69. processing a call to a TransferManager method. Processing a 70. call usually entails determining which S3 API requests that need 71. to be enqueued, but does **not** entail making any of the 72. S3 API data transfering requests needed to perform the transfer. 73. The threads controlled by ``max_request_concurrency`` is 74. responsible for that. 75. 76. :param multipart_chunksize: The size of each transfer if a request 77. becomes a multipart transfer. 78. 79. :param max_request_queue_size: The maximum amount of S3 API requests 80. that can be queued at a time. A value of zero means that there 81. is no maximum. 82. 83. :param max_submission_queue_size: The maximum amount of 84. TransferManager method calls that can be queued at a time. A value 85. of zero means that there is no maximum. 86. 87. :param max_io_queue_size: The maximum amount of read parts that 88. can be queued to be written to disk per download. A value of zero 89. means that there is no maximum. The default size for each element 90. in this queue is 8 KB. 91. 92. :param io_chunksize: The max size of each chunk in the io queue. 93. Currently, this is size used when reading from the downloaded 94. stream as well. 95. 96. :param num_download_attempts: The number of download attempts that 97. will be tried upon errors with downloading an object in S3. Note 98. that these retries account for errors that occur when streamming 99. down the data from s3 (i.e. socket errors and read timeouts that 100. occur after recieving an OK response from s3). 101. Other retryable exceptions such as throttling errors and 5xx errors 102. are already retried by botocore (this default is 5). The 103. ``num_download_attempts`` does not take into account the 104. number of exceptions retried by botocore. 105. 106. :param max_in_memory_upload_chunks: The number of chunks that can 107. be stored in memory at a time for all ongoing upload requests. 108. This pertains to chunks of data that need to be stored in memory 109. during an upload if the data is sourced from a file-like object. 110. The total maximum memory footprint due to a in-memory upload 111. chunks is roughly equal to: 112. 113. max_in_memory_upload_chunks * multipart_chunksize 114. + max_submission_concurrency * multipart_chunksize 115. 116. ``max_submission_concurrency`` has an affect on this value because 117. for each thread pulling data off of a file-like object, they may 118. be waiting with a single read chunk to be submitted for upload 119. because the ``max_in_memory_upload_chunks`` value has been reached 120. by the threads making the upload request. 121. 122. :param max_in_memory_download_chunks: The number of chunks that can 123. be buffered in memory and **not** in the io queue at a time for all 124. ongoing dowload requests. This pertains specifically to file-like 125. objects that cannot be seeked. The total maximum memory footprint 126. due to a in-memory download chunks is roughly equal to: 127. 128. max_in_memory_download_chunks * multipart_chunksize 129. 130. :param max_bandwidth: The maximum bandwidth that will be consumed 131. in uploading and downloading file content. The value is in terms of 132. bytes per second. 133. """ 134. self.multipart_threshold = multipart_threshold 135. self.multipart_chunksize = multipart_chunksize 136. self.max_request_concurrency = max_request_concurrency 137. self.max_submission_concurrency = max_submission_concurrency 138. self.max_request_queue_size = max_request_queue_size 139. self.max_submission_queue_size = max_submission_queue_size 140. self.max_io_queue_size = max_io_queue_size 141. self.io_chunksize = io_chunksize 142. self.num_download_attempts = num_download_attempts 143. self.max_in_memory_upload_chunks = max_in_memory_upload_chunks 144. self.max_in_memory_download_chunks = max_in_memory_download_chunks 145. self.max_bandwidth = max_bandwidth 146. self._validate_attrs_are_nonzero() 147. 148. def _validate_attrs_are_nonzero(self): 149. for attr, attr_val, in self.__dict__.items(): 150. if attr_val is not None and attr_val <= 0: 151. raise ValueError( 152. 'Provided parameter %s of value %s must be greater than ' 153. '0.' % (attr, attr_val)) 154. 155. 156. class TransferManager(object): 157. ALLOWED_DOWNLOAD_ARGS = [ 158. 'VersionId', 159. 'SSECustomerAlgorithm', 160. 'SSECustomerKey', 161. 'SSECustomerKeyMD5', 162. 'RequestPayer', 163. ] 164. 165. ALLOWED_UPLOAD_ARGS = [ 166. 'ACL', 167. 'CacheControl', 168. 'ContentDisposition', 169. 'ContentEncoding', 170. 'ContentLanguage', 171. 'ContentType', 172. 'Expires', 173. 'GrantFullControl', 174. 'GrantRead', 175. 'GrantReadACP', 176. 'GrantWriteACP', 177. 'Metadata', 178. 'RequestPayer', 179. 'ServerSideEncryption', 180. 'StorageClass', 181. 'SSECustomerAlgorithm', 182. 'SSECustomerKey', 183. 'SSECustomerKeyMD5', 184. 'SSEKMSKeyId', 185. 'WebsiteRedirectLocation' 186. ] 187. 188. ALLOWED_COPY_ARGS = ALLOWED_UPLOAD_ARGS + [ 189. 'CopySourceIfMatch', 190. 'CopySourceIfModifiedSince', 191. 'CopySourceIfNoneMatch', 192. 'CopySourceIfUnmodifiedSince', 193. 'CopySourceSSECustomerAlgorithm', 194. 'CopySourceSSECustomerKey', 195. 'CopySourceSSECustomerKeyMD5', 196. 'MetadataDirective' 197. ] 198. 199. ALLOWED_DELETE_ARGS = [ 200. 'MFA', 201. 'VersionId', 202. 'RequestPayer', 203. ] 204. 205. def __init__(self, client, config=None, osutil=None, executor_cls=None): 206. """A transfer manager interface for Amazon S3 207. 208. :param client: Client to be used by the manager 209. :param config: TransferConfig to associate specific configurations 210. :param osutil: OSUtils object to use for os-related behavior when 211. using with transfer manager. 212. 213. :type executor_cls: s3transfer.futures.BaseExecutor 214. :param executor_cls: The class of executor to use with the transfer 215. manager. By default, concurrent.futures.ThreadPoolExecutor is used. 216. """ 217. self._client = client 218. self._config = config 219. if config is None: 220. self._config = TransferConfig() 221. self._osutil = osutil 222. if osutil is None: 223. self._osutil = OSUtils() 224. self._coordinator_controller = TransferCoordinatorController() 225. # A counter to create unique id's for each transfer submitted. 226. self._id_counter = 0 227. 228. # The executor responsible for making S3 API transfer requests 229. self._request_executor = BoundedExecutor( 230. max_size=self._config.max_request_queue_size, 231. max_num_threads=self._config.max_request_concurrency, 232. tag_semaphores={ 233. IN_MEMORY_UPLOAD_TAG: TaskSemaphore( 234. self._config.max_in_memory_upload_chunks), 235. IN_MEMORY_DOWNLOAD_TAG: SlidingWindowSemaphore( 236. self._config.max_in_memory_download_chunks) 237. }, 238. executor_cls=executor_cls 239. ) 240. 241. # The executor responsible for submitting the necessary tasks to 242. # perform the desired transfer 243. self._submission_executor = BoundedExecutor( 244. max_size=self._config.max_submission_queue_size, 245. max_num_threads=self._config.max_submission_concurrency, 246. executor_cls=executor_cls 247. 248. ) 249. 250. # There is one thread available for writing to disk. It will handle 251. # downloads for all files. 252. self._io_executor = BoundedExecutor( 253. max_size=self._config.max_io_queue_size, 254. max_num_threads=1, 255. executor_cls=executor_cls 256. ) 257. 258. # The component responsible for limiting bandwidth usage if it 259. # is configured. 260. self._bandwidth_limiter = None 261. if self._config.max_bandwidth is not None: 262. logger.debug( 263. 'Setting max_bandwidth to %s', self._config.max_bandwidth) 264. leaky_bucket = LeakyBucket(self._config.max_bandwidth) 265. self._bandwidth_limiter = BandwidthLimiter(leaky_bucket) 266. 267. self._register_handlers() 268. 269. def upload(self, fileobj, bucket, key, extra_args=None, subscribers=None): 270. """Uploads a file to S3 271. 272. :type fileobj: str or seekable file-like object 273. :param fileobj: The name of a file to upload or a seekable file-like 274. object to upload. It is recommended to use a filename because 275. file-like objects may result in higher memory usage. 276. 277. :type bucket: str 278. :param bucket: The name of the bucket to upload to 279. 280. :type key: str 281. :param key: The name of the key to upload to 282. 283. :type extra_args: dict 284. :param extra_args: Extra arguments that may be passed to the 285. client operation 286. 287. :type subscribers: list(s3transfer.subscribers.BaseSubscriber) 288. :param subscribers: The list of subscribers to be invoked in the 289. order provided based on the event emit during the process of 290. the transfer request. 291. 292. :rtype: s3transfer.futures.TransferFuture 293. :returns: Transfer future representing the upload 294. """ 295. if extra_args is None: 296. extra_args = {} 297. if subscribers is None: 298. subscribers = [] 299. self._validate_all_known_args(extra_args, self.ALLOWED_UPLOAD_ARGS) 300. call_args = CallArgs( 301. fileobj=fileobj, bucket=bucket, key=key, extra_args=extra_args, 302. subscribers=subscribers 303. ) 304. extra_main_kwargs = {} 305. if self._bandwidth_limiter: 306. extra_main_kwargs['bandwidth_limiter'] = self._bandwidth_limiter 307. return self._submit_transfer( 308. call_args, UploadSubmissionTask, extra_main_kwargs) 309. 310. def download(self, bucket, key, fileobj, extra_args=None, 311. subscribers=None): 312. """Downloads a file from S3 313. 314. :type bucket: str 315. :param bucket: The name of the bucket to download from 316. 317. :type key: str 318. :param key: The name of the key to download from 319. 320. :type fileobj: str 321. :param fileobj: The name of a file to download to. 322. 323. :type extra_args: dict 324. :param extra_args: Extra arguments that may be passed to the 325. client operation 326. 327. :type subscribers: list(s3transfer.subscribers.BaseSubscriber) 328. :param subscribers: The list of subscribers to be invoked in the 329. order provided based on the event emit during the process of 330. the transfer request. 331. 332. :rtype: s3transfer.futures.TransferFuture 333. :returns: Transfer future representing the download 334. """ 335. if extra_args is None: 336. extra_args = {} 337. if subscribers is None: 338. subscribers = [] 339. self._validate_all_known_args(extra_args, self.ALLOWED_DOWNLOAD_ARGS) 340. call_args = CallArgs( 341. bucket=bucket, key=key, fileobj=fileobj, extra_args=extra_args, 342. subscribers=subscribers 343. ) 344. extra_main_kwargs = {'io_executor': self._io_executor} 345. if self._bandwidth_limiter: 346. extra_main_kwargs['bandwidth_limiter'] = self._bandwidth_limiter 347. return self._submit_transfer( 348. call_args, DownloadSubmissionTask, extra_main_kwargs) 349. 350. def copy(self, copy_source, bucket, key, extra_args=None, 351. subscribers=None, source_client=None): 352. """Copies a file in S3 353. 354. :type copy_source: dict 355. :param copy_source: The name of the source bucket, key name of the 356. source object, and optional version ID of the source object. The 357. dictionary format is: 358. ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note 359. that the ``VersionId`` key is optional and may be omitted. 360. 361. :type bucket: str 362. :param bucket: The name of the bucket to copy to 363. 364. :type key: str 365. :param key: The name of the key to copy to 366. 367. :type extra_args: dict 368. :param extra_args: Extra arguments that may be passed to the 369. client operation 370. 371. :type subscribers: a list of subscribers 372. :param subscribers: The list of subscribers to be invoked in the 373. order provided based on the event emit during the process of 374. the transfer request. 375. 376. :type source_client: botocore or boto3 Client 377. :param source_client: The client to be used for operation that 378. may happen at the source object. For example, this client is 379. used for the head_object that determines the size of the copy. 380. If no client is provided, the transfer manager's client is used 381. as the client for the source object. 382. 383. :rtype: s3transfer.futures.TransferFuture 384. :returns: Transfer future representing the copy 385. """ 386. if extra_args is None: 387. extra_args = {} 388. if subscribers is None: 389. subscribers = [] 390. if source_client is None: 391. source_client = self._client 392. self._validate_all_known_args(extra_args, self.ALLOWED_COPY_ARGS) 393. call_args = CallArgs( 394. copy_source=copy_source, bucket=bucket, key=key, 395. extra_args=extra_args, subscribers=subscribers, 396. source_client=source_client 397. ) 398. return self._submit_transfer(call_args, CopySubmissionTask) 399. 400. def delete(self, bucket, key, extra_args=None, subscribers=None): 401. """Delete an S3 object. 402. 403. :type bucket: str 404. :param bucket: The name of the bucket. 405. 406. :type key: str 407. :param key: The name of the S3 object to delete. 408. 409. :type extra_args: dict 410. :param extra_args: Extra arguments that may be passed to the 411. DeleteObject call. 412. 413. :type subscribers: list 414. :param subscribers: A list of subscribers to be invoked during the 415. process of the transfer request. Note that the ``on_progress`` 416. callback is not invoked during object deletion. 417. 418. :rtype: s3transfer.futures.TransferFuture 419. :return: Transfer future representing the deletion. 420. 421. """ 422. if extra_args is None: 423. extra_args = {} 424. if subscribers is None: 425. subscribers = [] 426. self._validate_all_known_args(extra_args, self.ALLOWED_DELETE_ARGS) 427. call_args = CallArgs( 428. bucket=bucket, key=key, extra_args=extra_args, 429. subscribers=subscribers 430. ) 431. return self._submit_transfer(call_args, DeleteSubmissionTask) 432. 433. def _validate_all_known_args(self, actual, allowed): 434. for kwarg in actual: 435. if kwarg not in allowed: 436. raise ValueError( 437. "Invalid extra_args key '%s', " 438. "must be one of: %s" % ( 439. kwarg, ', '.join(allowed))) 440. 441. def _submit_transfer(self, call_args, submission_task_cls, 442. extra_main_kwargs=None): 443. if not extra_main_kwargs: 444. extra_main_kwargs = {} 445. 446. # Create a TransferFuture to return back to the user 447. transfer_future, components = self._get_future_with_components( 448. call_args) 449. 450. # Add any provided done callbacks to the created transfer future 451. # to be invoked on the transfer future being complete. 452. for callback in get_callbacks(transfer_future, 'done'): 453. components['coordinator'].add_done_callback(callback) 454. 455. # Get the main kwargs needed to instantiate the submission task 456. main_kwargs = self._get_submission_task_main_kwargs( 457. transfer_future, extra_main_kwargs) 458. 459. # Submit a SubmissionTask that will submit all of the necessary 460. # tasks needed to complete the S3 transfer. 461. self._submission_executor.submit( 462. submission_task_cls( 463. transfer_coordinator=components['coordinator'], 464. main_kwargs=main_kwargs 465. ) 466. ) 467. 468. # Increment the unique id counter for future transfer requests 469. self._id_counter += 1 470. 471. return transfer_future 472. 473. def _get_future_with_components(self, call_args): 474. transfer_id = self._id_counter 475. # Creates a new transfer future along with its components 476. transfer_coordinator = TransferCoordinator(transfer_id=transfer_id) 477. # Track the transfer coordinator for transfers to manage. 478. self._coordinator_controller.add_transfer_coordinator( 479. transfer_coordinator) 480. # Also make sure that the transfer coordinator is removed once 481. # the transfer completes so it does not stick around in memory. 482. transfer_coordinator.add_done_callback( 483. self._coordinator_controller.remove_transfer_coordinator, 484. transfer_coordinator) 485. components = { 486. 'meta': TransferMeta(call_args, transfer_id=transfer_id), 487. 'coordinator': transfer_coordinator 488. } 489. transfer_future = TransferFuture(**components) 490. return transfer_future, components 491. 492. def _get_submission_task_main_kwargs( 493. self, transfer_future, extra_main_kwargs): 494. main_kwargs = { 495. 'client': self._client, 496. 'config': self._config, 497. 'osutil': self._osutil, 498. 'request_executor': self._request_executor, 499. 'transfer_future': transfer_future 500. } 501. main_kwargs.update(extra_main_kwargs) 502. return main_kwargs 503. 504. def _register_handlers(self): 505. # Register handlers to enable/disable callbacks on uploads. 506. event_name = 'request-created.s3' 507. self._client.meta.events.register_first( 508. event_name, signal_not_transferring, 509. unique_id='s3upload-not-transferring') 510. self._client.meta.events.register_last( 511. event_name, signal_transferring, 512. unique_id='s3upload-transferring') 513. 514. def __enter__(self): 515. return self 516. 517. def __exit__(self, exc_type, exc_value, *args): 518. cancel = False 519. cancel_msg = '' 520. cancel_exc_type = FatalError 521. # If a exception was raised in the context handler, signal to cancel 522. # all of the inprogress futures in the shutdown. 523. if exc_type: 524. cancel = True 525. cancel_msg = six.text_type(exc_value) 526. if not cancel_msg: 527. cancel_msg = repr(exc_value) 528. # If it was a KeyboardInterrupt, the cancellation was initiated 529. # by the user. 530. if isinstance(exc_value, KeyboardInterrupt): 531. cancel_exc_type = CancelledError 532. self._shutdown(cancel, cancel_msg, cancel_exc_type) 533. 534. def shutdown(self, cancel=False, cancel_msg=''): 535. """Shutdown the TransferManager 536. 537. It will wait till all transfers complete before it completely shuts 538. down. 539. 540. :type cancel: boolean 541. :param cancel: If True, calls TransferFuture.cancel() for 542. all in-progress in transfers. This is useful if you want the 543. shutdown to happen quicker. 544. 545. :type cancel_msg: str 546. :param cancel_msg: The message to specify if canceling all in-progress 547. transfers. 548. """ 549. self._shutdown(cancel, cancel, cancel_msg) 550. 551. def _shutdown(self, cancel, cancel_msg, exc_type=CancelledError): 552. if cancel: 553. # Cancel all in-flight transfers if requested, before waiting 554. # for them to complete. 555. self._coordinator_controller.cancel(cancel_msg, exc_type) 556. try: 557. # Wait until there are no more in-progress transfers. This is 558. # wrapped in a try statement because this can be interrupted 559. # with a KeyboardInterrupt that needs to be caught. 560. self._coordinator_controller.wait() 561. except KeyboardInterrupt: 562. # If not errors were raised in the try block, the cancel should 563. # have no coordinators it needs to run cancel on. If there was 564. # an error raised in the try statement we want to cancel all of 565. # the inflight transfers before shutting down to speed that 566. # process up. 567. self._coordinator_controller.cancel('KeyboardInterrupt()') 568. raise 569. finally: 570. # Shutdown all of the executors. 571. self._submission_executor.shutdown() 572. self._request_executor.shutdown() 573. self._io_executor.shutdown() 574. 575. 576. class TransferCoordinatorController(object): 577. def __init__(self): 578. """Abstraction to control all transfer coordinators 579. 580. This abstraction allows the manager to wait for inprogress transfers 581. to complete and cancel all inprogress transfers. 582. """ 583. self._lock = threading.Lock() 584. self._tracked_transfer_coordinators = set() 585. 586. @property 587. def tracked_transfer_coordinators(self): 588. """The set of transfer coordinators being tracked""" 589. with self._lock: 590. # We return a copy because the set is mutable and if you were to 591. # iterate over the set, it may be changing in length due to 592. # additions and removals of transfer coordinators. 593. return copy.copy(self._tracked_transfer_coordinators) 594. 595. def add_transfer_coordinator(self, transfer_coordinator): 596. """Adds a transfer coordinator of a transfer to be canceled if needed 597. 598. :type transfer_coordinator: s3transfer.futures.TransferCoordinator 599. :param transfer_coordinator: The transfer coordinator for the 600. particular transfer 601. """ 602. with self._lock: 603. self._tracked_transfer_coordinators.add(transfer_coordinator) 604. 605. def remove_transfer_coordinator(self, transfer_coordinator): 606. """Remove a transfer coordinator from cancelation consideration 607. 608. Typically, this method is invoked by the transfer coordinator itself 609. to remove its self when it completes its transfer. 610. 611. :type transfer_coordinator: s3transfer.futures.TransferCoordinator 612. :param transfer_coordinator: The transfer coordinator for the 613. particular transfer 614. """ 615. with self._lock: 616. self._tracked_transfer_coordinators.remove(transfer_coordinator) 617. 618. def cancel(self, msg='', exc_type=CancelledError): 619. """Cancels all inprogress transfers 620. 621. This cancels the inprogress transfers by calling cancel() on all 622. tracked transfer coordinators. 623. 624. :param msg: The message to pass on to each transfer coordinator that 625. gets cancelled. 626. 627. :param exc_type: The type of exception to set for the cancellation 628. """ 629. for transfer_coordinator in self.tracked_transfer_coordinators: 630. transfer_coordinator.cancel(msg, exc_type) 631. 632. def wait(self): 633. """Wait until there are no more inprogress transfers 634. 635. This will not stop when failures are encountered and not propogate any 636. of these errors from failed transfers, but it can be interrupted with 637. a KeyboardInterrupt. 638. """ 639. try: 640. transfer_coordinator = None 641. for transfer_coordinator in self.tracked_transfer_coordinators: 642. transfer_coordinator.result() 643. except KeyboardInterrupt: 644. logger.debug('Received KeyboardInterrupt in wait()') 645. # If Keyboard interrupt is raised while waiting for 646. # the result, then exit out of the wait and raise the 647. # exception 648. if transfer_coordinator: 649. logger.debug( 650. 'On KeyboardInterrupt was waiting for %s', 651. transfer_coordinator) 652. raise 653. except Exception: 654. # A general exception could have been thrown because 655. # of result(). We just want to ignore this and continue 656. # because we at least know that the transfer coordinator 657. # has completed. 658. pass


My name is Oluwafemi Oyedeji. I was born in Lagos, Southwestern part of Nigeria. I graduated with a degree in electrical engineering from Poma International Business University, Benin. Right from the time I was a teenager, I played with computers a lot as my hobby, my passion, and my way of learning. Like most kids I enjoyed computer games. When my uncle gave me a computer as a reward for making honor roll in my fourth year at high school, I mastered DOS, Windows, and WordPerfect within six months. I then went on to teach myself programming basics.
Also, in my second year at college I took two programming classes in which I had an A’s. From then I developed a lot of interest in computer science and which to develop my career in that direction. I am currently enrolled at the boot camp coding program at the University of Minnesota to enable me achieving my dream of becoming a professional software engineer where I will have the opportunity to qualify for numerous computing jobs. At the completion of this program, I would have acquired the necessary technical know-how needed to build my own web and mobile applications which is my ultimate goal.


MD VIEW
BOTH
HTML VIEW
MARKDOWN
--- __Advertisement :)__ - __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image resize in browser. - __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly i18n with plurals support and easy syntax. You will like those projects! --- # h1 Heading 8-) ## h2 Heading ### h3 Heading #### h4 Heading ##### h5 Heading ###### h6 Heading ## Horizontal Rules ___ --- *** ## Typographic replacements Enable typographer option to see result. (c) (C) (r) (R) (tm) (TM) (p) (P) +- test.. test... test..... test?..... test!.... !!!!!! ???? ,, -- --- "Smartypants, double quotes" and 'single quotes' ## Emphasis **This is bold text** __This is bold text__ resize: none; font-size: medium; *This is italic text* _This is italic textid="htmlpreview"_ ~~Strikethrough~~ ## Blockquotes > Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows. ## Lists Unordered + Create a list by starting a line with `+`, `-`, or `*` + Sub-lists are made by indenting 2 spaces: - Marker character change forces new list start: * Ac tristique libero volutpat at + Facilisis in pretium nisl aliquet - Nulla volutpat aliquam velit + Very easy! Ordered 1. Lorem ipsum dolor sit amet 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa 1. You can use sequential numbers... 1. ...or keep all the numbers as `1.` Start numbering with offset: 57. foo 1. bar ## Code Inline `code` Indented code // Some comments line 1 of code line 2 of code line 3 of code resize: none; font-size: medium; Block code "fences" ``` Sample text here... ``` Syntax highlighting ``` js var foo = function (bar) { return bar++; }; console.log(foo(5)); ``` resize: none; font-size: medium; ## Tables | Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Right aligned columns | Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Markdown | Less | Pretty --- | --- | --- *Still* | `renders` | **nicely** 1 | 2 | 3 ## Links [link text](http://dev.nodeca.com) [link with title](http://nodeca.github.io/pica/demo/ "title text!") Autoconverted link https://github.com/nodeca/pica (enable linkify to see) ## Images ![Minion](https://octodex.github.com/images/minion.png) ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") Like links, Images also have a footnote style syntax ![Alt text][id] With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" ## Plugins The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). ### [Emojies](https://github.com/markdown-it/markdown-it-emoji) > Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: > > Shortcuts (emoticons): :-) :-( 8-) ;) see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji. resize: none; font-size: medium; ### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup) - 19^th^ - H~2~O afsdfsfdaasdf ### [\
](https://github.com/markdown-it/markdown-it-ins) tabfunction ++Inserted text++ ### [\
](https://github.com/markdown-it/markdown-it-mark) ==Marked text== ### [Footnotes](https://github.com/markdown-it/markdown-it-footnote) Footnote 1 link[^first]. Footnote 2 link[^second]. Inline footnote^[Text of inline footnote] definition. Duplicated footnote reference[^second]. [^first]: Footnote **can have markup** and multiple paragraphs. [^second]: Footnote text.  Term 2 with *inline markup* : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. _Compact style:_ Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b ### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr) This is HTML abbreviation example. It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. *[HTML]: Hyper Text Markup Language ### [Custom containers](https://github.com/markdown-it/markdown-it-container) ::: warning *here be dragons* :::
HTML


{% extends "layout.html" %} {% block content %}
FLASK BLOGGING WEB APP A blogging site where you can post a blog of anything you like! {% endblock content %}


Image APIs
Please read general API doc first if you are not familiar with AirSim APIs.
Getting a Single Image
Here's a sample code to get a single image from camera named "0". The returned value is bytes of png format image. To get uncompressed and other format as well as available cameras please see next sections.
Python
import airsim #pip install airsim
# for car use CarClient()
client = airsim.MultirotorClient()
png_image = client.simGetImage("0", airsim.ImageType.Scene)
# do something with image
C++
#include "vehicles/multirotor/api/MultirotorRpcLibClient.hpp"
int getOneImage()
{
using namespace std;
using namespace msr::airlib;
//for car use CarRpcLibClient
msr::airlib::MultirotorRpcLibClient client;
vector<uint8_t> png_image = client.simGetImage("0", VehicleCameraBase::ImageType::Scene);
//do something with images
}
Getting Images with More Flexibility
The simGetImages
API which is slightly more complex to use than simGetImage
API, for example, you can get left camera view, right camera view and depth image from left camera in a single API call. The simGetImages
API also allows you to get uncompressed images as well as floating point single channel images (instead of 3 channel (RGB), each 8 bit).
Python
import airsim #pip install airsim
# for car use CarClient()
client = airsim.MultirotorClient()
responses = client.simGetImages([
# png format
airsim.ImageRequest(0, airsim.ImageType.Scene),
# uncompressed RGBA array bytes
airsim.ImageRequest(1, airsim.ImageType.Scene, False, False),
# floating point uncompressed image
airsim.ImageRequest(1, airsim.ImageType.DepthPlanner, True)])
# do something with response which contains image data, pose, timestamp etc
Using AirSim Images with NumPy
If you plan to use numpy for image manipulation, you should get uncompressed RGBA image and then convert to numpy like this:
responses = client.simGetImages([ImageRequest("0", airsim.ImageType.Scene, False, False)])
response = responses[0]
# get numpy array
img1d = np.fromstring(response.image_data_uint8, dtype=np.uint8)
# reshape array to 4 channel image array H X W X 4
img_rgba = img1d.reshape(response.height, response.width, 4)
# original image is fliped vertically
img_rgba = np.flipud(img_rgba)
# just for fun add little bit of green in all pixels
img_rgba[:,:,1:2] = 100
# write to png
airsim.write_png(os.path.normpath(filename + '.greener.png'), img_rgba)
Quick Tips
-
The API
simGetImage
returnsbinary string literal
which means you can simply dump it in binary file to create a .png file. However if you want to process it in any other way than you can handy functionairsim.string_to_uint8_array
. This converts binary string literal to NumPy uint8 array. -
The API
simGetImages
can accept request for multiple image types from any cameras in single call. You can specify if image is png compressed, RGB uncompressed or float array. For png compressed images, you getbinary string literal
. For float array you get Python list of float64. You can convert this float array to NumPy 2D array usingairsim.list_to_2d_float_array(response.image_data_float, response.width, response.height)
You can also save float array to .pfm file (Portable Float Map format) usingairsim.write_pfm()
function.
C++
int getStereoAndDepthImages()
{
using namespace std;
using namespace msr::airlib;
typedef VehicleCameraBase::ImageRequest ImageRequest;
typedef VehicleCameraBase::ImageResponse ImageResponse;
typedef VehicleCameraBase::ImageType ImageType;
//for car use
//msr::airlib::CarRpcLibClient client;
msr::airlib::MultirotorRpcLibClient client;
//get right, left and depth images. First two as png, second as float16.
vector<ImageRequest> request = {
//png format
ImageRequest("0", ImageType::Scene),
//uncompressed RGBA array bytes
ImageRequest("1", ImageType::Scene, false, false),
//floating point uncompressed image
ImageRequest("1", ImageType::DepthPlanner, true)
};
const vector<ImageResponse>& response = client.simGetImages(request);
//do something with response which contains image data, pose, timestamp etc
}
Ready to Run Complete Examples
Python
For a more complete ready to run sample code please see sample code in AirSimClient project for multirotors or HelloCar sample. This code also demonstrates simple activities such as saving images in files or using numpy
to manipulate images.
C++
For a more complete ready to run sample code please see sample code in HelloDrone project for multirotors or HelloCar project.
See also other example code that generates specified number of stereo images along with ground truth depth and disparity and saving it to pfm format.
Available Cameras
Car
The cameras on car can be accessed by following names in API calls: front_center
, front_right
, front_left
, fpv
and back_center
. Here FPV camera is driver's head position in the car.
Multirotor
The cameras in CV mode can be accessed by following names in API calls: front_center
, front_right
, front_left
, bottom_center
and back_center
.
Computer Vision Mode
Camera names are same as in multirotor.
Backward compatibility for camera names
Before AirSim v1.2, cameras were accessed using ID numbers instead of names. For backward compatibility you can still use following ID numbers for above camera names in same order as above: "0"
, "1"
, "2"
, "3"
, "4"
. In addition, camera name ""
is also available to access the default camera which is generally the camera "0"
.
"Computer Vision" Mode
You can use AirSim in so-called "Computer Vision" mode. In this mode, physics engine is disabled and there is no vehicle, just cameras. You can move around using keyboard (use F1 to see help on keys). You can press Record button to continuously generate images. Or you can call APIs to move cameras around and take images.
To active this mode, edit settings.json that you can find in your Documents\AirSim
folder (or ~/Documents/AirSim
on Linux) and make sure following values exist at root level:
{
"SettingsVersion": 1.2,
"SimMode": "ComputerVision"
}
Here's the Python code example to move camera around and capture images.
This mode was inspired from UnrealCV project.
Setting Pose in Computer Vision Mode
To move around the environment using APIs you can use simSetVehiclePose
API. This API takes position and orientation and sets that on the invisible vehicle where the front-center camera is located. All rest of the cameras move along keeping the relative position. If you don't want to change position (or orientation) then just set components of position (or orientation) to floating point nan values. The simGetVehiclePose
allows to retrieve the current pose. You can also use simGetGroundTruthKinematics
to get the quantities kinematics quantities for the movement. Many other non-vehicle specific APIs are also available such as segmentation APIs, collision APIs and camera APIs.
Camera APIs
The simGetCameraInfo
returns the pose (in world frame, NED coordinates, SI units) and FOV (in degrees) for the specified camera. Please see example usage.
The simSetCameraOrientation
sets the orientation for the specified camera as quaternion in NED frame. The handy airsim.to_quaternion()
function allows to convert pitch, roll, yaw to quaternion. For example, to set camera-0 to 15-degree pitch, you can use:
client.simSetCameraOrientation(0, airsim.to_quaternion(0.261799, 0, 0)); #radians
Gimbal
You can set stabilization for pitch, roll or yaw for any camera using settings.
Please see example usage.
Changing Resolution and Camera Parameters
To change resolution, FOV etc, you can use settings.json. For example, below addition in settings.json sets parameters for scene capture and uses "Computer Vision" mode described above. If you omit any setting then below default values will be used. For more information see settings doc. If you are using stereo camera, currently the distance between left and right is fixed at 25 cm.
{
"SettingsVersion": 1.2,
"CameraDefaults": {
"CaptureSettings": [
{
"ImageType": 0,
"Width": 256,
"Height": 144,
"FOV_Degrees": 90,
"AutoExposureSpeed": 100,
"MotionBlurAmount": 0
}
]
},
"SimMode": "ComputerVision"
}
What Does Pixel Values Mean in Different Image Types?
Available ImageType Values
Scene = 0,
DepthPlanner = 1,
DepthPerspective = 2,
DepthVis = 3,
DisparityNormalized = 4,
Segmentation = 5,
SurfaceNormals = 6,
Infrared = 7
DepthPlanner and DepthPerspective
You normally want to retrieve the depth image as float (i.e. set pixels_as_float = true
) and specify ImageType = DepthPlanner
or ImageType = DepthPerspective
in ImageRequest
. For ImageType = DepthPlanner
, you get depth in camera plan, i.e., all points that are in plan parallel to camera have same depth. For ImageType = DepthPerspective
, you get depth from camera using a projection ray that hits that pixel. Depending on your use case, planner depth or perspective depth may be the ground truth image that you want. For example, you may be able to feed perspective depth to ROS package such as depth_image_proc
to generate a point cloud. Or planner depth may be more compatible with estimated depth image generated by stereo algorithms such as SGM.
DepthVis
When you specify ImageType = DepthVis
in ImageRequest
, you get an image that helps depth visualization. In this case, each pixel value is interpolated from black to white depending on depth in camera plane in meters. The pixels with pure white means depth of 100m or more while pure black means depth of 0 meters.
DisparityNormalized
You normally want to retrieve disparity image as float (i.e. set pixels_as_float = true
and specify ImageType = DisparityNormalized
in ImageRequest
) in which case each pixel is (Xl - Xr)/Xmax
, which is thereby normalized to values between 0 to 1.
Segmentation
When you specify ImageType = Segmentation
in ImageRequest
, you get an image that gives you ground truth segmentation of the scene. At the startup, AirSim assigns value 0 to 255 to each mesh available in environment. This value is than mapped to a specific color in the pallet. The RGB values for each object ID can be found in this file.
You can assign a specific value (limited to the range 0-255) to a specific mesh using APIs. For example, below Python code sets the object ID for the mesh called "Ground" to 20 in Blocks environment and hence changes its color in Segmentation view:
success = client.simSetSegmentationObjectID("Ground", 20);
The return value is a boolean type that lets you know if the mesh was found.
Notice that typical Unreal environments, like Blocks, usually have many other meshes that comprises of same object, for example, "Ground_2", "Ground_3" and so on. As it is tedious to set object ID for all of these meshes, AirSim also supports regular expressions. For example, the code below sets all meshes which have names starting with "ground" (ignoring case) to 21 with just one line:
success = client.simSetSegmentationObjectID("ground[\w]*", 21, True);
The return value is true if at least one mesh was found using regular expression matching.
It is recommended that you request uncompressed image using this API to ensure you get precise RGB values for segmentation image:
responses = client.simGetImages([ImageRequest(0, AirSimImageType.Segmentation, False, False)])
img1d = np.fromstring(response.image_data_uint8, dtype=np.uint8) #get numpy array
img_rgba = img1d.reshape(response.height, response.width, 4) #reshape array to 4 channel image array H X W X 4
img_rgba = np.flipud(img_rgba) #original image is fliped vertically
#find unique colors
print(np.unique(img_rgba[:,:,0], return_counts=True)) #red
print(np.unique(img_rgba[:,:,1], return_counts=True)) #green
print(np.unique(img_rgba[:,:,2], return_counts=True)) #blue
A complete ready-to-run example can be found in segmentation.py.
Unsetting object ID
An object's ID can be set to -1 to make it not show up on the segmentation image.
How to Find Mesh Names?
To get desired ground truth segmentation you will need to know the names of the meshes in your Unreal environment. To do this, you will need to open up Unreal Environment in Unreal Editor and then inspect the names of the meshes you are interested in using the World Outliner. For example, below we see the mesh names for he ground in Blocks environment in right panel in the editor:
If you don't know how to open Unreal Environment in Unreal Editor then try following the guide for building from source.
Once you decide on the meshes you are interested, note down their names and use above API to set their object IDs. There are few settings available to change object ID generation behavior.
Changing Colors for Object IDs
At present the color for each object ID is fixed as in this palate. We will be adding ability to change colors for object IDs to desired values shortly. In the meantime you can open the segmentation image in your favorite image editor and get the RGB values you are interested in.
Startup Object IDs
At the start, AirSim assigns object ID to each object found in environment of type UStaticMeshComponent
or ALandscapeProxy
. It then either uses mesh name or owner name (depending on settings), lower cases it, removes any chars below ASCII 97 to remove numbers and some punctuations, sums int value of all chars and modulo 255 to generate the object ID. In other words, all object with same alphabet chars would get same object ID. This heuristic is simple and effective for many Unreal environments but may not be what you want. In that case, please use above APIs to change object IDs to your desired values. There are few settings available to change this behavior.
Getting Object ID for Mesh
The simGetSegmentationObjectID
API allows you get object ID for given mesh name.
Infrared
Currently this is just a map from object ID to grey scale 0-255. So any mesh with object ID 42 shows up with color (42, 42, 42). Please see segmentation section for more details on how to set object IDs. Typically noise setting can be applied for this image type to get slightly more realistic effect. We are still working on adding other infrared artifacts and any contributions are welcome.
Example Code
A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in GenerateImageGenerator.hpp. This example generates specified number of stereo images and ground truth disparity image and saving it to pfm format.


Distributed Stochastic PCA
Intro
Mahout has a distributed implementation of Stochastic PCA1. This algorithm computes the exact equivalent of Mahout’s dssvd(\(\mathbf{A-1\mu^\top}\)
) by modifying the dssvd
algorithm so as to avoid forming \(\mathbf{A-1\mu^\top}\)
, which would densify a sparse input. Thus, it is suitable for work with both dense and sparse inputs.
Algorithm
Given an m \(\times\)
n matrix \(\mathbf{A}\)
, a target rank k, and an oversampling parameter p, this procedure computes a k-rank PCA by finding the unknowns in \(\mathbf{A−1\mu^\top \approx U\Sigma V^\top}\)
:
- Create seed for random n
\(\times\)
(k+p) matrix\(\Omega\)
. \(\mathbf{s_\Omega \leftarrow \Omega^\top \mu}\)
.\(\mathbf{Y_0 \leftarrow A\Omega − 1 {s_\Omega}^\top, Y \in \mathbb{R}^{m\times(k+p)}}\)
.- Column-orthonormalize
\(\mathbf{Y_0} \rightarrow \mathbf{Q}\)
by computing thin decomposition\(\mathbf{Y_0} = \mathbf{QR}\)
. Also,\(\mathbf{Q}\in\mathbb{R}^{m\times(k+p)}, \mathbf{R}\in\mathbb{R}^{(k+p)\times(k+p)}\)
. \(\mathbf{s_Q \leftarrow Q^\top 1}\)
.\(\mathbf{B_0 \leftarrow Q^\top A: B \in \mathbb{R}^{(k+p)\times n}}\)
.\(\mathbf{s_B \leftarrow {B_0}^\top \mu}\)
.- For i in 1..q repeat (power iterations):
- For j in 1..n apply
\(\mathbf{(B_{i−1})_{∗j} \leftarrow (B_{i−1})_{∗j}−\mu_j s_Q}\)
. \(\mathbf{Y_i \leftarrow A{B_{i−1}}^\top−1(s_B−\mu^\top \mu s_Q)^\top}\)
.- Column-orthonormalize
\(\mathbf{Y_i} \rightarrow \mathbf{Q}\)
by computing thin decomposition\(\mathbf{Y_i = QR}\)
. \(\mathbf{s_Q \leftarrow Q^\top 1}\)
.\(\mathbf{B_i \leftarrow Q^\top A}\)
.\(\mathbf{s_B \leftarrow {B_i}^\top \mu}\)
.
- For j in 1..n apply
- Let
\(\mathbf{C \triangleq s_Q {s_B}^\top}\)
.\(\mathbf{M \leftarrow B_q {B_q}^\top − C − C^\top + \mu^\top \mu s_Q {s_Q}^\top}\)
. - Compute an eigensolution of the small symmetric
\(\mathbf{M = \hat{U} \Lambda \hat{U}^\top: M \in \mathbb{R}^{(k+p)\times(k+p)}}\)
. - The singular values
\(\Sigma = \Lambda^{\circ 0.5}\)
, or, in other words,\(\mathbf{\sigma_i= \sqrt{\lambda_i}}\)
. - If needed, compute
\(\mathbf{U = Q\hat{U}}\)
. - If needed, compute
\(\mathbf{V = B^\top \hat{U} \Sigma^{−1}}\)
. - If needed, items converted to the PCA space can be computed as
\(\mathbf{U\Sigma}\)
.
Implementation
Mahout dspca(...)
is implemented in the mahout math-scala
algebraic optimizer which translates Mahout’s R-like linear algebra operators into a physical plan for both Spark and H2O distributed engines.
def dspca[K](drmA: DrmLike[K], k: Int, p: Int = 15, q: Int = 0):
(DrmLike[K], DrmLike[Int], Vector) = {
// Some mapBlock() calls need it
implicit val ktag = drmA.keyClassTag
val drmAcp = drmA.checkpoint()
implicit val ctx = drmAcp.context
val m = drmAcp.nrow
val n = drmAcp.ncol
assert(k <= (m min n), "k cannot be greater than smaller of m, n.")
val pfxed = safeToNonNegInt((m min n) - k min p)
// Actual decomposition rank
val r = k + pfxed
// Dataset mean
val mu = drmAcp.colMeans
val mtm = mu dot mu
// We represent Omega by its seed.
val omegaSeed = RandomUtils.getRandom().nextInt()
val omega = Matrices.symmetricUniformView(n, r, omegaSeed)
// This done in front in a single-threaded fashion for now. Even though it doesn't require any
// memory beyond that is required to keep xi around, it still might be parallelized to backs
// for significantly big n and r. TODO
val s_o = omega.t %*% mu
val bcastS_o = drmBroadcast(s_o)
val bcastMu = drmBroadcast(mu)
var drmY = drmAcp.mapBlock(ncol = r) {
case (keys, blockA) ⇒
val s_o:Vector = bcastS_o
val blockY = blockA %*% Matrices.symmetricUniformView(n, r, omegaSeed)
for (row ← 0 until blockY.nrow) blockY(row, ::) -= s_o
keys → blockY
}
// Checkpoint Y
.checkpoint()
var drmQ = dqrThin(drmY, checkRankDeficiency = false)._1.checkpoint()
var s_q = drmQ.colSums()
var bcastVarS_q = drmBroadcast(s_q)
// This actually should be optimized as identically partitioned map-side A'B since A and Q should
// still be identically partitioned.
var drmBt = (drmAcp.t %*% drmQ).checkpoint()
var s_b = (drmBt.t %*% mu).collect(::, 0)
var bcastVarS_b = drmBroadcast(s_b)
for (i ← 0 until q) {
// These closures don't seem to live well with outside-scope vars. This doesn't record closure
// attributes correctly. So we create additional set of vals for broadcast vars to properly
// create readonly closure attributes in this very scope.
val bcastS_q = bcastVarS_q
val bcastMuInner = bcastMu
// Fix Bt as B' -= xi cross s_q
drmBt = drmBt.mapBlock() {
case (keys, block) ⇒
val s_q: Vector = bcastS_q
val mu: Vector = bcastMuInner
keys.zipWithIndex.foreach {
case (key, idx) ⇒ block(idx, ::) -= s_q * mu(key)
}
keys → block
}
drmY.uncache()
drmQ.uncache()
val bCastSt_b = drmBroadcast(s_b -=: mtm * s_q)
drmY = (drmAcp %*% drmBt)
// Fix Y by subtracting st_b from each row of the AB'
.mapBlock() {
case (keys, block) ⇒
val st_b: Vector = bCastSt_b
block := { (_, c, v) ⇒ v - st_b(c) }
keys → block
}
// Checkpoint Y
.checkpoint()
drmQ = dqrThin(drmY, checkRankDeficiency = false)._1.checkpoint()
s_q = drmQ.colSums()
bcastVarS_q = drmBroadcast(s_q)
// This on the other hand should be inner-join-and-map A'B optimization since A and Q_i are not
// identically partitioned anymore.
drmBt = (drmAcp.t %*% drmQ).checkpoint()
s_b = (drmBt.t %*% mu).collect(::, 0)
bcastVarS_b = drmBroadcast(s_b)
}
val c = s_q cross s_b
val inCoreBBt = (drmBt.t %*% drmBt).checkpoint(CacheHint.NONE).collect -=:
c -=: c.t +=: mtm *=: (s_q cross s_q)
val (inCoreUHat, d) = eigen(inCoreBBt)
val s = d.sqrt
// Since neither drmU nor drmV are actually computed until actually used, we don't need the flags
// instructing compute (or not compute) either of the U,V outputs anymore. Neat, isn't it?
val drmU = drmQ %*% inCoreUHat
val drmV = drmBt %*% (inCoreUHat %*% diagv(1 / s))
(drmU(::, 0 until k), drmV(::, 0 until k), s(0 until k))
}
Usage
The scala dspca(...)
method can easily be called in any Spark, Flink, or H2O application built with the math-scala
library and the corresponding Spark
, Flink
, or H2O
engine module as follows:
import org.apache.mahout.math._
import decompositions._
import drm._
val (drmU, drmV, s) = dspca(drmA, k=200, q=1)
Note the parameter is optional and its default value is zero.


Nitin Balsaraf
on 2012-02-28 07:19:30
How can i include Validation.php file in javascript and also have to call validate( with some parameters) function from javascript. I have to pass parameters from javascript to validate function.
How to do this please suggest me?????


AnimData(bpy_struct)¶
base class — bpy_struct
-
class
bpy.types.
AnimData
(bpy_struct)¶ Animation data for data-block
-
action_blend_type
¶ Method used for combining Active Action’s result with result of NLA stack
REPLACE
Replace, The strip values replace the accumulated results by amount specified by influence.COMBINE
Combine, The strip values are combined with accumulated results by appropriately using addition, multiplication, or quaternion math, based on channel type.ADD
Add, Weighted result of strip is added to the accumulated results.SUBTRACT
Subtract, Weighted result of strip is removed from the accumulated results.MULTIPLY
Multiply, Weighted result of strip is multiplied with the accumulated results.
Type: enum in [‘REPLACE’, ‘COMBINE’, ‘ADD’, ‘SUBTRACT’, ‘MULTIPLY’], default ‘REPLACE’
-
action_extrapolation
¶ Action to take for gaps past the Active Action’s range (when evaluating with NLA)
NOTHING
Nothing, Strip has no influence past its extents.HOLD
Hold, Hold the first frame if no previous strips in track, and always hold last frame.HOLD_FORWARD
Hold Forward, Only hold last frame.
Type: enum in [‘NOTHING’, ‘HOLD’, ‘HOLD_FORWARD’], default ‘HOLD’
-
action_influence
¶ Amount the Active Action contributes to the result of the NLA stack
Type: float in [0, 1], default 1.0
-
drivers
¶ The Drivers/Expressions for this data-block
Type: AnimDataDrivers
bpy_prop_collection
ofFCurve
, (readonly)
-
nla_tracks
¶ NLA Tracks (i.e. Animation Layers)
Type: NlaTracks
bpy_prop_collection
ofNlaTrack
, (readonly)
-
use_nla
¶ NLA stack is evaluated when evaluating this block
Type: boolean, default False
-
use_tweak_mode
¶ Whether to enable or disable tweak mode in NLA
Type: boolean, default False
-
nla_tweak_strip_time_to_scene
(frame, invert=False)¶ Convert a time value from the local time of the tweaked strip to scene time, exactly as done by built-in key editing tools. Returns the input time unchanged if not tweaking.
Parameters: - frame (float in [-1.04857e+06, 1.04857e+06]) – Input time
- invert (boolean, (optional)) – Invert, Convert scene time to action time
Returns: Converted time
Return type: float in [-1.04857e+06, 1.04857e+06]
-
classmethod
bl_rna_get_subclass
(id, default=None)¶ Parameters: id (string) – The RNA type identifier. Returns: The RNA type or default when not found. Return type: bpy.types.Struct
subclass
-
classmethod
bl_rna_get_subclass_py
(id, default=None)¶ Parameters: id (string) – The RNA type identifier. Returns: The class or default when not found. Return type: type
-
Inherited Properties
Inherited Functions
References


按钮显示完全宽度，且不包含内边距padding
button-light
button-stable
button-positive
button-calm
button-balanced
button-energized
button-assertive
button-royal
button-dark


CenturyLink offering $1,000 to watch 24 Hallmark Christmas movies in 12 days
by Brandon ArbuckleWhat better way to celebrate the holidays than through a Christmas challenge?
A news release from CenturyLink said the company will be awarding $1,000 to someone who can watch 24 Hallmark Christmas movies in 12 days.
In addition to the cash prize, the participant will also receive a Hallmark movie-watching kit.
The company said it is interested to see how the participant chooses to watch the films along with what role Christmas movies play in their holiday traditions.
Applications will be open until Dec. 6. Anyone interested in the challenge can apply here.
Hallmark will be releasing 40 new movies this season.


{{timestamp}} by {{author}}
{{text}}
Post Title
Post Text
COMMENTS BLOCK
Comment Summary
Comment Text
{{comment.author}} at {{comment.timestamp}}
Text: {{comment.text}}


About
The Salmon Cookies-Stand shop is a creative idea created to merege the passion between the backing cookies within a peach environment, so we created this crazy idea to mix the salmon and the sea fruits with our passion in making cookies, Located in next to beach in very important location around the world, the shop has quickly become the a highly recommended for those love to taste something new and live new experience.Locations & hours
Seattle, 8AM-9:00PM
Tokyo, 8AM-9:00PM
Dubai, 8AM-9:00PM
Paris, 8AM-9:00PM
Lima, 8AM-9:00PM


the and with were >. for nylidrin was influenza (N.D.) viral virus that against cells {background antiviral from The using margin activity {border-style px;} #ffffff;} (>.) (Figure []. infection receptor three MDCK active concentration infected which (pH Figure fusion protein Influenza antibody chemical its not nylidrin, After compounds could had membrane presence (.) This are but compounds, electrostatic into mice Nylidrin additional analysis control incubated their (HN), Viral [,]. acidic agonist also cell days field formation ifenprodil nylidrin. performed px; strains they used viruses {font-family (>,) ADRB HA, HA-mediated basis clenbuterol during effective font-size medium oseltamivir pharmacophore proton these two under weight (cat A/HN DMSO absence assay compound day described double; drug function hemagglutinin hydrochloride ifenprodil, inhibitor min. no. nuclear one p.i. phenyl positive proteins resistance resulting revealed strains, this time viability < (>) (HN) (Table (≥%), -well Antiviral PR-infected Statistical USA). administered aminoethanol anti-HA assay. before between blocking body border-color border-width clenbuterol, completely development dose eliprodil endosomal group have host human inactive incubation maPR mock-infected neutral only plates points previously results small solid; step supernatants survival targeting trypsin vRNPs virus. whether {font-style {font-weight β-Adrenergic (A) (B) (Supplementary (i.e., (μM) A/Brisbane// Assay B). For HK, Infect. Korea M.K.; MOI OSV-C PBS RNA Rab S). Sino These amantadine analogues analogues, anti-influenza antibodies blot bold canine cells, cells. cellular changes channel comparisons conformational courier; days. determined direct-acting effect em; entry fenoterol, followed following further improve infection. inhibited inhibitory kidney mean min min, model modifications molecular molecules mouse negative number oral plaque polymerase preincubated pt;} reduction same samples selected showed subtype suggest therapeutic treated two-tailed unpaired various virus, when β-adrenergic μM)


localStorage • audio • video • device orientation • progress • regions • svg
resize • media queries • 3D transforms • masks • gradients • file API
typed arrays • web SQL • notifications • full screen • mouse lock • offline
http://codepen.io/pixelgrid/pen/ECrKd
http://workshop.chromeexperiments.com/stars/
Plus, all the cool kids are using
HTML5 for apps and games now.
CompoHub.com


{% extends "base_generic.html" %} {% block content %}
Exercising maintains muscle strength and flexibility enabling a fuller and more active life at all ages. Our color graph reflects your level of expected mobility given the types and amount of activity you have performed.
Life expectancy is based on several factors but personal health is a core factor. As a result, we can expect our life expectancy to grow as we perform more exercise. We illustrate through an expansion in the size of the above initial life expectancy circle to the larger green circle.
Exercise produces endorphines that help lower stress and together with overall fitness our sense of wellbeing. You can see your measure of overall wellbeing increase or decline in line with sustained activity levels.


{{ address }}
You have enabled Single-Address-Mode in settings, the address above is always the same address. If you enable staking with
the Single-Address-Mode, you will receive staking rewards on generated change addresses, not on the single
address above.
When this address is used, you will receive another address. Addresses can be used multiple times. Make sure you always use a fresh
address to increase your privacy.


AtomForm encapsulates HTML form functionality in AJAX form. HTML form redirects entire page upon response and this causes loss of form data. But AtomForm posts bound data to post url, and on successful response atom-next action set will be executed.
AtomForm only provides AJAX post, but we also need default form layout with label description etc, so we have created one more control, that gives simple form layout easily.
Unlike HTML Form, AtomForm posts only associated data with the form itself, and it merges data from mergeData properties. Input and other controls must bind properties of Data. This helps in binding non standard HTML properties of AtomControls. In above example, FirstName and LastName properties of Data will be posted. Since data will be inherited most of the times, we have provided mergeData property to merge different set of properties before posting.
In AJAX, uploading file is not supported due to previous versions of IE, there is no inbuilt file upload provided by Atoms.js. However, we have provided an upload plugin that helps you uploading files easily with Atoms.js, it blends with Atoms.js property model and it provides progress which is totally customizable.


Symbol Index for "Completed Activity"
Symbol Index for diagram
"Completed Activity"
Abandoned Activity (Class)
Activity State (Class)
Activity To Be Done (Class)
Activity Under Consideration (Class)
Activity/State (Generalization Node)
actual user (Association)
Completed Activity (Class)
Decomposed Activity (Class)
end location for (Association)
Instantiated Activity (Class)
Location (Class)
Not Required Activity (Class)
Performance Rejected Activity (Class)
Performance Suspended Activity (Class)
Performer Accepted Activity (Class)
Performer Rejected Activity (Class)
Performer Selected Activity (Class)
Resource For Completed Activity (Class)
Scheduled Activity (Class)
Started Activity (Class)


MOAL.software_engineering.problem_solving.design_patterns.unix package¶
Submodules¶
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity module¶
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
AppAuthentication
[source]¶ -
authenticate
(*args, **kwargs)¶
-
new_user
(*args, **kwargs)¶
-
reset
(*args, **kwargs)¶
-
send_auth_link
(*args, **kwargs)¶
-
update_password
(*args, **kwargs)¶
-
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
AppModel
[source]¶ -
create
(*args, **kwargs)¶
-
delete
(*args, **kwargs)¶
-
read
(*args, **kwargs)¶
-
update
(*args, **kwargs)¶
-
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
AppRenderer
[source]¶ -
get_static
(*args, **kwargs)¶
-
parse_template
(*args, **kwargs)¶
-
render
(*args, **kwargs)¶
-
render_to_json
(*args, **kwargs)¶
-
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
AppRouter
[source]¶ -
get_params
(*args, **kwargs)¶
-
get_post
(*args, **kwargs)¶
-
parse_route
(*args, **kwargs)¶
-
route
(*args, **kwargs)¶
-
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
AppView
[source]¶ Handles the application request/response cycle
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
BigBloatedAppClass
[source]¶ -
authenticate
(*args, **kwargs)¶
-
create_model
(*args, **kwargs)¶
-
delete_model
(*args, **kwargs)¶
-
get_params
(*args, **kwargs)¶
-
get_static
(*args, **kwargs)¶
-
new_user
(*args, **kwargs)¶
-
parse_route
(*args, **kwargs)¶
-
parse_template
(*args, **kwargs)¶
-
read_model
(*args, **kwargs)¶
-
render
(*args, **kwargs)¶
-
render_to_json
(*args, **kwargs)¶
-
request
(*args, **kwargs)¶
-
respond
(*args, **kwargs)¶
-
route
(*args, **kwargs)¶
-
update_model
(*args, **kwargs)¶
-
upload
(*args, **kwargs)¶
-
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
FtpView
[source]¶ Bases:
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.AppView
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
HttpView
[source]¶ Bases:
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.AppView
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
JsonView
[source]¶ Bases:
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.AppView
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.
TemplateRenderer
[source]¶ Bases:
MOAL.software_engineering.problem_solving.design_patterns.unix.modularity.AppRenderer
MOAL.software_engineering.problem_solving.design_patterns.unix.representation module¶
-
MOAL.software_engineering.problem_solving.design_patterns.unix.representation.

Source: http://www.catb.org/esr/writings/taoup/html/ch01s06.html
“Data is more tractable than program logic. It follows that where you see a choice between complexity in data structures and complexity in code, choose the former. More: in evolving a design, you should actively seek ways to shift complexity from code to data.”
Also see: http://www.catb.org/esr/writings/taoup/html/generationchapter.html
-
MOAL.software_engineering.problem_solving.design_patterns.unix.representation.
example_1_bad_method
(arg)[source]¶ This is convoluted and hard to read. It is also potentially less performant, since the logic branching must be generated and evaluated.
-
MOAL.software_engineering.problem_solving.design_patterns.unix.representation.
example_1_good_method
(arg)[source]¶ This employees pure data, and is fast as it assumes a lookup, which is always O(N). The failed assumption is caught and handled, and new lookups can be quickly added, without adding much to the complexity.
-
MOAL.software_engineering.problem_solving.design_patterns.unix.representation.
example_2_bad_method
(arg1, arg2)[source]¶ Continuing down this path of complicated conditional branching, things get hairy very fast. Think about cognitive processing time when reading this code – it’s easy to make a mistake here.
-
MOAL.software_engineering.problem_solving.design_patterns.unix.representation.
example_2_good_method
(arg1, arg2)[source]¶ Mapping inputs to this nested dictionary is easy and intuitive, compared to the more cognitively challenging task of parsing multiple levels of conditional branching statements. It is obvious almost immediately to look at the arguments and map them to the data and see what the result is.
This is exemplified in the below quote from catb.org:
“In Chapter 1 we observed that human beings are better at visualizing data than they are at reasoning about control flow.”
More advanced examples of this concept are discussed within the context of clojure s-expressions on the amazing “macronomicon” video by Michael Fogus: https://www.youtube.com/watch?v=0JXhJyTo5V8 this is not surprising to me because lisp-style languages are typically homoiconic, or nearly so, and so the code-as-data paradigm is commonplace for them.
MOAL.software_engineering.problem_solving.design_patterns.unix.robustness module¶
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.robustness.
BasicCalculator
[source]¶ All methods here have type checking in place so that bad inputs are automatically handled without throwing an error. This allows the behavior to be piped, etc, without any fatal error in behavior.
-
class
MOAL.software_engineering.problem_solving.design_patterns.unix.robustness.
BasicCalculatorAlternate
[source]¶ Bases:
MOAL.software_engineering.problem_solving.design_patterns.unix.robustness.BasicCalculator
Another way to achieve this is to use kwargs with expected defaults, but this uses required args as kwargs, which are typically optional, and therefore not recommended.


×
13MSE1149
Campus
Vellore
Chennai
Bengaluru
Amaravati
Settings
Profile
Logout
Credits
Developers
My Page
Edu
Events
Clubs
Info


Source: http://www.github.com/unleashtech/maxchars Documentation: http://www.unleashed-technologies.com/blog/2010/11/05/jquery-maxchars-plugin
Select which elements to manipulate, set some options, and choose an action.


Of all the technology trends that are taking place right now, perhaps the biggest one is the Internet of Things; it’s the one that’s going to give us the most disruption as well as the most opportunity over the next five years.
Daniel Burrus The Internet of Things Is Far Bigger Than Anyone Realizes


I'm a London based freelance sound recordist and commercial drone pilot (licensed to fly commercially in the UK, Europe, USA, Finland, Canada). Over 14 very enjoyable years working across various formats for all the major broadcasters, both in the UK and around the world. Multiple long running series with 20+ contributors have made me comfortable managing complex workflows with high track counts, and helped me develop a really solid technical understanding of my craft.
I feel privileged to have a job that has allowed me to see so much of the world, and the opportunity to work alongside such talented people. I'm a motivated team player and thoroughly enjoy my work, especially the challenges of working in remote locations. Away from work I like to spend as much time as possible in the mountains and am a keen climber and mountain biker.
I take pride in looking after my kit, and stay up to speed with the latest technologies. I have enough kit in my arsenal to immediately cover the needs of most jobs, see below for a comprehensive list.
Please take a look at my credits/CV/resume to see what I've been up to, and don't hesitate to contact me to discuss your upcoming projects.
To check my availability please call me on 07866 927 591 or, send an email to<EMAIL_ADDRESS>My doco kit packs down into a motorcycle in case I need to get across town in a hurry.