Do something amazing and change healthcare forever.
We are replatforming health care to change the way patients and providers interact. If you want to do something that’s never been done – and have fun doing it – then MedQuack is the place for you. Our team members have immense potential to grow, learn and succeed within the company. We invest in our employees by providing opportunities for learning, training and acquiring industry knowledge.
MedQuack provides its employees with professional development programs, tuition reimbursement programs and onsite training.Our work for and with people requires a respectful approach. Through mutual respect, employees create the prerequisite conditions for top performance in the team.Employees are enthusiastic about ambitious objectives and deliver above-average effort. Management recognizes and encourages the abilities of employees to contribute to the objectives of MedQuack Healthcare Services.
MedQuack recognizes the importance of benefits and wellness for employees and their families. In addition to time off to support work life balance and enjoyment, we offer a comprehensive benefit package designed for employees’ individual needs (including domestic partners).Our employees benefit from a comprehensive range of training opportunities. The courses include occupational, vocational and academic training and further education. In addition to classroom teaching, e-learning offers the chance to study anytime, anywhere.All our courses are taught by qualified faculty lecturers.
Over 250 voluntary helpers are involved at MedQuack Services and perform valuable work for the benefit of patients. Someone to talk to, a helping hand, a smile or just the presence of another person is a great gift for many people when they are ill. Your time and attention are greatly appreciated!
What you can do for our patients
For More Information about careers, check our website medquack.com


I wanted to see if there is any relationship between the days of rest (or not actually rest, but days since last match) to the amount of goals a team will score in a game. I used the data from football-data.co.uk for the english premier league season 2018-2019.
| Date | Team | Goals | Days | |
|---|---|---|---|---|
| 15 | 2018-08-18 00:00:00 | West Ham | 1 | 6 |
| 14 | 2018-08-18 00:00:00 | Tottenham | 3 | 7 |
| 13 | 2018-08-18 00:00:00 | Leicester | 2 | 8 |
| 11 | 2018-08-18 00:00:00 | Chelsea | 3 | 7 |
| 10 | 2018-08-18 00:00:00 | Cardiff | 0 | 7 |
| … |
Where days is the number of days since last match of that specific team.
Looking at the data, I personally can not see any clear trend out of it. Decided to run a linear regression anyway. This regression is pretty simple as I only have on independent variable.
\[\text{Goals} \sim Pois(\lambda_i) \\ \lambda_i = \alpha + \beta * \text{Days} \\ \alpha \sim N(0, 1) \\ \beta \sim N(0, 1)\]Regression summary shows the slope hdi is on both sides of the zero, meaning there is no clear trend.
| mean | sd | hdi_3% | hdi_97% | |
|---|---|---|---|---|
| a | 0.375 | 0.072 | 0.249 | 0.518 |
| b | -0.004 | 0.009 | -0.02 | 0.013 |
To see it with our own eyes:
The dashed line is the estimated mean of all samples for the \(\lambda\) parameter and the lines above and under indicate 95% highest density interval for that parameter.
Problem with this analysis that I included resting days of over 7 days which is probably due to holiday or international break (Nations league, EURO Quanlifiers, WC Qualifiers). I wanted to see if there is any trend within 7 days only. Meaning during regular season, if I eliminate breaks, is there a different if a team is given 6 days of rest or only 3 ? I know I can not just decide to cut my data in half and run regression but I just wanted to peek if there’s any trend at all that worth exploring.
So same as before, no clear direction at all. Wether a team had only three days of resting or seven, it doesn’t seem to affect their ability to score goals at all.
I think what still needs to be checked is more of intensity periods. Maybe a team can play one game only three games after their last game without it affecting their ability, but what if they had to play 3,4,5 games in a period of two weeks or less ? I’ll check that in the future.


Casino Inc is a project I did for my graduation on IGAD.
It is a top-down management simulation game, where the player builds his own casino.
Data:
- Platform
- PC
- Genre
- Management
- Simulation
- Time
- January 2019 - June 2019
- Team
- just myself
- Engine
- Unreal
Casino Inc is a project I worked on for 6 months as graduation project for IGAD.
It is a Game where you build and manage your own casino.
The player starts from almost nothing, and has to build up their own casino to a place where they are making as much money as they can.
This project has been heavily inspired by games as Prison Architect, Another Brick In The Mall, and Academia: School Simulator.
Each of these games are top-down tile based management simulations of their respective theme's.
A 30 minute powerpoint presentation (with voice over) that I used for the defence can be downloaded using the following links: powerpoint, script
Additionally, the full source can be found on github using this link.
And the latest builds can be found here.
The goals I've set myself for this project where to make a playable game, and get experience with more advanced AI systems.
Both of these goals where to add a new piece of work to my portfolio, and to give me more programming experience.
For the AI systems I wanted to use a Goal Orientated Action Planner (GOAP) as I've not used that before, and it's often used in games I like to play.
The specifications for the game I made are the following:
With this size a project, I needed to plan a lot. I did this by deviding the project in the following 10 milestones:
The tilemap is the part of the game that shows everything, as the name implies it’s a map made of a grid of tiles.
I’ve used this as this is the style that the preview games use to, and it’s a staple of a lot of different other management games.
For this I use a combination of Unreals build in tilemap, and my own made tilemap.
This combination is made because the unreal tilemap is purely cosmetic, so only draws the tiles, but for this game I need separate behaviours for different type of tiles.
The system I made myself to give different tiles different behaviours consists of a list of actors with the bare minimum, which have all information about what type of tile it is, and some shared info like if its walkable and which sprite to use for it. With added on top of this are actor components for the tiles that need additional behavior.
For Pathfinding of the characters walking around I've implemented a A* algorithm, which is a widely used best-first search.
The combination between this algorithm and the tilemap was straight forward, and it uses the tiles as nodes.
To make it that the game still has a normal fps, I needed to make this pathfinding multi-threaded which is not the most easy thing to do in unreal engine.
The biggest problem for this is that there's barely any documentation on this, and the biggest sources are outdated and incorrect.
As a thread safe way of returning the found paths to the main thread, I first got to the Delegate's that unreal has build in, that according to multiple sources are thread safe, but ended up not being safe.
Instead of this I needed to use a TQueue, which is a queue that is thread safe, as long as you only take out of it from the main thread, but you're still allowed to put things onto it from any sub thread you want.
Source code for the pathfinding can be found at this link.
To keep track of which tasks the player gives to the AI’s, there’s also the need of a AI Task Manager.
This consists of a actor with as main function 2 hybrid First in first out queue’s, with the addition that it will take the first task allowed for the AI in question, so not always the very first task.
Example of this is when there’s a queue of building 2 walls, cleaning trash, building another wall, and working at a poker table.
The returned task for a dealer will be the work at a table task and not the build wall task, because he can’t do any of the others.
Another thing that I wanted to have added to the task queue is a way to take tasks to the front of the queue to prioritize them, this was done by simply adding a 2nd queue which will be worked in a similar way, but always checked before the normal queue.
For the AI decision making I wanted to use a system I’ve not used before, which is a Goal Oriented Action Planner, or GOAP for short.
GOAP is a system where the AI plans a set of actions that will take it from its current state till a specified goal state.
For example, a builder wanting to build a wall would need building tools, and building materials.
An AI using GOAP will then be able to think out itself that it needs to pickup these tools from a tool storage, and materials from a storage room before it can go to the build location.
But if the AI already has tools, it creates a plan of action with only getting materials before going to the build task.
For this action planning I’ve used an algorithm very close to A star pathfinding, but instead of location nodes, it’s using the actions as nodes.
The start and end of the path are the states that the AI needs/has, and using the difference between this as heuristics you can create a path from action to action between the goal and start.
The staff is currently made up of builders and dealers, but written in such a way that its easily expandable to include other jobs like janitors, guards, or waiters.
They do their respective tasks using the before explained manager and GOAP systems.
The player has to hire each person in staff, and is in full control to give them different working times and lenghts.
The main element to make the game a simulation, The guests walk around the casino playing different games that make the player money.
They're setup with a Utility Theory setup to decide on what they want to do. The way this is setup is that each type of interactable has their own score, with a calculation based on the current stats of the guest to influence this score further.
When each score is calculated, the results are used as a weighted chance for what the guest is actually going to do.
This way, the behaviour of the guests is expandable, but keeps being very light weighted, and won't impact the games performace much.
This all has come together in a small game I’ve been calling Casino Inc.
I am very happy with how it all ended up working and looking, and think I’ve made a very fun little game. Which also works very well.
The player is able to fully build and run their own casino, and watch the guests go around it playing the games.
This also gives a good basis which can still be expanded massively, for example with the guests needing food and drinks, more games, and more types of AIs such as janitors to keep everything clean.
All with all, I am very proud of what I’ve managed to do in the alloted time, and how it all went without very big disappointments.
A 30 minute powerpoint presentation (with voice over) that I used for the defence can be downloaded using the following links: powerpoint, script
Additionally, the full source can be found on github using this link.
And the latest builds can be found here.


{{ .Params.Lead | safeHTML }}
Get startedUse openssl in your project object way.
Encrypt and decrypt key with Advanced encryption standard.
You can encrypt/decrypt text with key pairs. This library also allow you to sign and verify signed text.
Simple solution to create CAs and sign users certificates. Now its suported users, server and code sign certificate type.
Do you need feature which is not provided? No problem you can extend this library as you wish or you can use interfaces to help you with it.
This library is distributed under MIT license.


This project is in very early stage of development.
The sole purpose of this project is to help doctors in classifying diseases.
Detect COVID-19 from CXR Scans with an accuracy of 99.1%
Click HereDetect Retinal Disease from OCT Scans with an accuracy of 96.5%
Click Here


2 men plead guilty to setting 3rd man on fire in New Jersey
by APMAYS LANDING, New Jersey -- Two southern New Jersey men have pleaded guilty to aggravated assault for setting another man on fire as he slept at a friend's home in what police described as a "prank that went terribly, terribly wrong."
The Atlantic County prosecutor said 23-year-old Brandon Perez of Hammonton and 24-year-old David Sult of Mays Landing entered the pleas Thursday in exchange for a recommendation of five-year sentences.
Authorities said the defendants originally maintained that the 27-year-old victim was burned accidentally by an electronic smoking device, but an investigation concluded that lighter fluid was sprayed on him and ignited.
Prosecutors said the victim had severe burns to his back. He told NJ Advance Media that he lost 30 pounds and endured multiple skin grafts and blood transfusions.


Class ArrayCollection
Collection of entities which are already loaded in php memory.
$collection = new ArrayCollection(array( new FooEntity, new FooEntity, $repository->getById(123), $repository->getById(124), ));
- Orm\Object
- Orm\ArrayCollection implements Orm\IEntityCollection
Namespace: Orm
Package: Orm
Subpackage: Mappers\Collection
Author: Petr Procházka
Located at Mappers/Collection/ArrayCollection.php
Package: Orm
Subpackage: Mappers\Collection
Author: Petr Procházka
Located at Mappers/Collection/ArrayCollection.php
final public
|
|
final public
|
#
orderBy( string|array $key, string $direction =
Selects columns to order by.
|
final public
|
|
final public
|
|
final public
array
|
|
final public
array
|
|
final public
array
|
#
fetchPairs( string $key = NULL, string $value = NULL )
Fetches all records like $key => $value pairs.
|
final public
|
|
final public
integer
|
|
final public
integer
|
|
final public
|
|
final public
|
|
final public
|
|
final public
|
|
final public
|
|
final public
array
|
__callStatic(),
__get(),
__isset(),
__set(),
__unset()
|
ASC,
DESC
|


The Department of Energy (DOE) Office of Scientific and Technical Information (OSTI) is building a new DOE software center.
DOE Code is the reimagining of OSTI's current product for the submission of software, the Energy Science and Technology Software Center, or ESTSC. Since DOE Code is still under development, if you need to submit, search, or order software, please visit the ESTSC site for instructions.
DOE Code, when launched, will provide a best-in-class service for the submission of software. As a form of scientific and technical information, software is a result of the Department's research and development activities at the DOE national laboratories and other DOE facilities/contractors.
DOE Code will provide an open source, social platform for DOE scientific software. DOE Code will connect to repositories on GitHub, Bitbucket, and others, but will also provide a place to host code for users that are unable to use other hosting services. Since DOE Code is itself an open source product, other institutions will be able to download and deploy it for their own purposes too. You can follow DOE Code’s development at the DOE Code GitHub site.
To provide a new, modern way of interacting, DOE Code will not only provide the ability to link to references (papers, datasets) but also to other documents, manuals, examples, charts, forums, etc., in one place. All of this scientific and technical information will be linked to scientific software, whether it be software for modeling and simulation, data analytics or instrument control.
The current software center, ESTSC, contains over 3,500 distinct pieces of software resulting from DOE R&D, as well as selected software from the Nuclear Energy Agency of the Organization for Economic Cooperation and Development. ESTSC is the centralized DOE software management portal. The ESTSC portal provides access to software packages, including source code, executable object code, and the minimum support documentation (e.g., software user guide or manual) needed to use the software or to modify the software to support subsequent development efforts.
ESTSC and DOE Code are managed and operated by DOE OSTI.


Hello {{receiver.first_name}},
{{sender.full_name}} sent you an invite to join the {{society_name}} Esusu savings society.
Click here to join.
Warm regards,
The Esusu Team.


Smoking exit sign prompts evacuation of UW-Madison dorm
by Logan RudeMADISON, Wis. - A malfunctioning "Exit" sign triggered the fire alarms inside Witte Hall at the University of Wisconsin-Madison on Friday, causing the building to be evacuated, according to fire officials.
Engine Company 3 responded to the residence hall at 9:30 a.m. as students were evacuating. Fire officials said they found an "Exit" sign on the fourth floor that had shorted out and began smoking.
UW-Madison facilities staff members will oversee repairs or replacement of the sign.


POMATO
Restaurant
Login
User
Signup
Login
About
Restaurant info
{{message2}}
{{message}}
Address
Select State
Please select State first
Please select district first
SignUp
Restaurant Login
Send code
User Login
Send code
User SignUp
Send code


This intention converts access to an indexed value using ".getAt()" or ".setAt()" methods to the equivalent [] form.


On the one road and the right track?
Sir, – Anyone unlucky enough to drive on Northern Ireland’s A5, the only direct route from Dublin to Derry and northern Donegal, including Letterkenny, will testify to the atrocious quality of the route.
A motorway of three lanes each way will reduce to one hour the journey from Monaghan town to Letterkenny.
When this eventually happens, it is a further imperative that the chosen corridor accommodate a rail link from Dublin to those two major settlements, largely compensating for the demolition of the Portadown to Derry mainline in 1965 and restoring adequate public transport to such traditional railway towns as Aughnacloy, Omagh and Strabane. – Yours, etc,
CHRISTIAN MORRIS,
Howth,
Dublin 13.


Holiday Card NFTs
How I Made My Holiday Cards NFTs, Kind Of — And How You Can Get In On The Next Block
Before we begin, I want to make it clear that this isn’t a ‘genuine’ NFT, in many regards and for a few reasons. If anything, this is more of a traditional token (and it’s not even that) since the physical holiday cards themselves all have the same properties — they’re literally fungible.
There is no money being made here. In fact, the proof of work this cost me along with the total lack of utility means I’ll forever be in the red. But, this is an interesting project & one that gave me a much deeper understanding of blockchain. I hope it does the same for you.
In this post I’m going to go over
- Why I did this — and a brief history lesson
- How I did it — and why this works
- How to confirm your card if you’re a node. i.e., got my card in the mail
Project Overview & Inspiration
First, I’ll address your initial questions: "what is this thing, Nick? I thought blockchains were on the web, or in the cloud, or.. everywhere! Not on a Christmas card!"
You’d be mostly correct, but not fully.
I’ve been involved in crypto since 2017 and the past year have been working as the Growth Manager at Mimo, a stable coin issuance protocol.
Earlier this year I started watching Gary Gensler’s MIT course on blockchain and money. While my mind was consistently blown, a particular section caught my attention. Gary asked the class what the longest running blockchain is. Naturally, murmurs of Bitcoin fill the air. But although Bitcoin solved somethings in a novel fashion and created a new application for the tech, the first blockchain was consistently running for more than a decade prior.
As it turns out, this blockchain has been maintained since 1995 and a new ‘block’ is published every Sunday in the New York Times.
Now, bear with me, because if you don’t understand crypto entirely yet, this will truly make things seen in a different, tangible light.
First, we need to understand some quick fundamentals on blockchain.
We’ve got a couple key components:
Hashes, nonces, and unique, immutable data.
When it comes to cryptocurrencies you’re probably using today, the data piece are the transactions that take place in each block; while the hashes and nonces might even go unseen as we abstract ourselves away from the underlying tech.
So, when you consider that this is all that is required to successfully maintain a blockchain, you realize tech itself, or computers, aren’t even necessary - though, makes it actually feasible, sure.
The New York Times is a pretty popular publication that gets distributed into many hands. These act as our confirmation nodes. The Times is also dated. Something that couldn’t really be forged.
Vitalik Buterin even mentions how difficult it would be to break this chain. The same attack could be done if someone decided to forge my greeting cards.
How & Why This Works (through a distributed greeting card)
Enough history, here’s where we are now. Although I would’ve loved to build a chain from scratch, the tech debt became entirely unworthy. It’d not be unlike spending $100 in electricity to mine $0.50 of ETH. So, take some liberties with me and enjoy the ride no matter how unsecure it is.
I piggyback off Anders Brownworth’s Blockchain 101 site.
Now, of course we shouldn’t trust anyone, so I decided — in typical crypto fashion — to fork it. Even more on-brand, we hard forked it. This just means that I’m now maintaining this separately from the upcoming blocks on the other chain. Of course in this example, it’s not a live, moving, chain, but the concepts are still there.
Although you can install your own instance of the Nick Calabro Holiday Card Global Chain, Anders’ works as of right now so you can simply use this.
So, how’s it work?
First let’s look at the components of the holiday card. We have the .png
, a hash, a URL, and - most importantly - a postage date. The date is what makes each and every block unique & verifiable.
For the purposes of my cards, we assume their dates are Christmas day of that block’s year. Again, this is a brutally imperfect implementation.
The schema for how we display the block’s data is as follows:
December 25, 2021
If we imagine that date having to match an immutable postage date, we have a truly verifiable blockchain.
The URL is also a piece that an attacker would be needing a forge as well.
So, all we have to do is mine the first block, enter the data from the card onto a new block, and mine #2. If the created hash matches the one on the token, you’ve verified your holiday card is truly from me.
Of course the vector for attack is ripe. There’s only 1 block so far. So, in theory, all one would have to do is send everyone cards with my face on it, make up their own data, and they can effectively hack the chain.
There are 2 reasons why it’s still entirely easy:
As the years go on and I send more cards, the chain grows, and then the attacker would have to repeat the previous year’s cards to recreate the entire chain to match up with their current block’s hash.
()
As the years progress, you’ll have to install the chain’s history to catch up. And, as more years go on, more people are going to enter my network and start receiving holiday cards. These are all extra entities carrying a copy of the ledger since they’ll have that latest hash.
If almost everyone in my network decided to burn their cards, and an attacker tried overtaking the whole chain, so long as there’s 1 person with a card still on their fridge, that would disprove the new side-chain.
How To Confirm Your Holiday Card On-Chain
To ensure you’re getting genuine holiday cards from me, the one and only, you can either trust me, or you can verify me.
Why would you trust the greeting card is from myself & truly authentic? Well, the incentive to fake a holiday card from me is quite low. These cards aren’t being traded and they’re really an ephemeral slice of cardboard that gets tossed by 95% of recipients anyway. Trust, in this case, is not a bug - nor even a feature.
But, in the spirit of overly-optimizing, let’s verify:
Details & Schema
To collect the data necessary to confirm the hash on your card, there are a couple things we’ll need to look out for.
Date: an immutable timestamp that can never be recreated.
Unique id: each block (holiday card) comes with an image. That URL is used to verify as well.
Genesis Block: The first block has already been mined and is ready to be built upon, the data in that block also helps make up the hash that you’re seeing on your card now. If you can’t confirm that first block, you’re already side-chaining and no further cards can be trusted.
You’ll know you have the correct Genesis Block when:
- its previous hash is 64 0s
- its data is simply:
nick.finance
- its nonce is:
4008
- and its current hash after mining is
000094ad55d3f7eccb5a1c1d6f1d2c36f52d77ee47ca98a26371267cddb53bf0
Step 1: Claiming
One of my investment philosophies is to buy things that you want to own. This is how most die-hards get away with holding on to certain NFTs regardless of where they’re trading at. By accepting the card, you’ve "claimed your token".
Step 2: The Timestamp
One of the properties surrounding this entire chain is the concept of time. Since there’s only 1 moment of time that can never be changed, it’s a great function to use as it’ll be different every time.
Now, if we were creating a truly secure chain, we’d already be broken, as the postal service is subject to human-error and may not stamp the card at the chain’s expected time. So for the purposes of the Nick Calabro Holiday Card Global Chain, we’re going to assume the date is always December 25.
Step 3: The Data
Now that we have all the components necessary to mine, we can go ahead and put it together to create the next block’s hash that is written on your card.
December 25, 2021
https://nick.finance/holiday-2021.png
This is block #2’s data. If we followed this patter, you could even guess next year’s, but that would be wildly insecure! So, know that although we’re not running this through any random number generators, the filename for the next block will not be holiday-2022.png
.
Step 4: Mining
As we discussed above, this is a hard fork from Anders Brownworth’s example that you can find on his website. In fact, you might be best off using his to confirm (for now) since you’ll be forced to install and run my fork locally. This aspect is even similar to the first days of Bitcoin.
Edit: As of writing this, the Nick Calabro Holiday Card Global Chainhard fork is not modified for prime-time. Tech debt..
So, Whether you’re using Anders’ or installed your own ledger locally, let’s mine the chain and confirm you have an authentic greeting card.
On the blockchain tab, you’ll find a series of blocks.
We know the data for the genesis block: nick.finance
, and that’s all you need to input before hitting mine
.
Mining the block will find the correct nonce to create our first hash. On the second block, gather your data and enter it. The previous block’s hash is pre-loaded for you.
You’ll notice the block is still red, meaning it hasn’t been mined yet or simply broken. If the data is entered correctly, go ahead and mine the block.
Finally, block #2’s hash should match the card on your greeting card, thus giving you proper verification that this is truly from me.
You’ll know you won if your screen looks like this:
Known attack vectors & imperfections:
- The timestamp. The postal service is run by humans. Humans are prone to error. Unlike the NYT example where the operation is smooth enough to ensure there’s always an issue being distributed on a particular day of the week, I don’t trust that we can be so specific with this case.
So, by creating the rule now, that the date of new blocks will be December 25, we can assume this will always be true — until we hard-fork and change the whole thing again.


Set X and Y coordinates
Get X and Y coordinates
Set CSS style of an element.
Get CSS style of an element.


PL2 W7K was a labour of passionate love by four second-year Engineering Physics bozos students at the University of British Columbia.
Depending on your privacy permissions on Chrome and Windows, there may be some uptown funk with the email links. Here are our emails, laid out in plaintext if you want to reach out to us! (nowhere near as cool as the buttons):
Save ewoks. Bridge gaps. Filter and detect varying IR signals. Zoom down ziplines. Look cool.
PL2 W7K was tasked with a perilious journey.
Navigate black tape using custom-coded PID control
Build a mechanism to autonomously detect the ewoks scattered at different locations
Filter and read different IR frequency signals
Identify and cross two 6" gaps
Navigate across a narrow region with no tape
Build a mechanism to return the ewoks to the start using a zipline
Complete a run within two minutes
Despite several challenges, the competition lent itself open to a myriad of different approaches. Teams could opt to skip the IR beacon entirely and go to Chewey, others opted to complete the whole course, and others still decided to complete the course partially, optimizing for speed and reliability instead.
The official competition document can be found
here!
Modules
Peek under the hood
Strategy and Overview
Our approach
CAD
Mechanical Design
Circuits
Electrical Design
Control Code
STM32 & C++
Project Management
Delegation and integration
Performance Analysis and Post-Mortem
Lessons learned
Strategy and Overview
Our approach to tackling the course.
Our approach to completing the course was to have a separate mechanism for each obstacle. We designed a forklift-style mechanism to lay a bridge over the gaps. The infrared-triggered spinning platform was avoided using an active-filtering IR detection circuit and a QSD122 phototransistor.
The bridge mechanism allowed us to avoid requiring the first zipline, while the second was used to transport our ewok-filled basket back to the "safe zone". The pathless bridge would be traversed using an edge detect-and-follow algorithm.
PL2 was designed to be compact, fast, and nimble. The Ewok-grabbing claws employed an optical detection mechanism using an IR emitter and phototransistor to create a beam that would be interrupted when an ewok was present. The fast detection allowed the robot to grab the ewoks without ever having to stop moving.
Ultimately, as time became constrained, we shifted our focus to having PL2 reliably pick up three ewoks and then perform a turn-around deploy maneuveur. This allowed us to perfect existing mechanisms and work toward speed and reliability, which paid dividends on competition day.
CAD Designs
An overview of our CAD and mechanical design decisions
We built our mechanical components using OnShape and SolidWorks. The majority of our components, such as our chassis
were lasercut, while a few other parts were water jet, such as the claws. We focused our mechanical design on keeping PL2 compact, modular and light. This allowed us to execute certain maneuveurs with more precision and enabled rapid prototyping (e.g swapping out different claw prototypes was a breeze).
Chassis
Our chassis was lasercut with slots to allow for quick and easy assembly without the need for glue or screws. Compartments for electrical components, batteries, servos and the drivetrain (which is why there is an elevated section in the interior) were all built in.
Claw
Our claw consisted of two components - the clamp and arm. The clamp and arm were both powered by servos and made out of light aluminum sheet metal. Using throughholes to mount an IR emitter and phototransistor on the clamp, we created an optical detection mechanism.
Basket deployment
Our basket was a simple enough mechanism, consisting of wide slats on the sides to allow the arms to reach in and drop ewoks, and a curved pole with washers to latch onto the zipline.
The basket deployment mechanism was built by modifying a fixed limit servo to become a continuous servo which pulled a string-and-pulley, lifting the platform up the guiderail. We chained two limit switches together to create an AND gate for use in the control logic.
Based on the button states, we could determine how long to lift the platform, and when to begin lowering it once it had the zipline.
Drivetrain
MAXIMUM OVERDRIVE
Our drivetrain was kept as a modular component that could be quickly popped in and out of the main chassis. This allowed us to finick with different gear ratios and debug issues with the motors separately.
The additional gear and orange boxes you may note above were for rotary encoders to keep track of distances and allow for finer movement control. We ultimately abandoned rotary encoders as we found we were able to get sufficient precision using our QRD sensors and timed movements.
Circuitry, Wiring and Electric Bugaloo
An overview of the key circuits used to drive motor logic and filter infrared frequencies, and wire management.
Motor Drivers
PL2 used H-bridges to allow motors to be driven at high voltages and currents while being controlled through low-voltage signals from the Bluepill mirco-controller.
Our h-bridges consist of electrical switches (N-Type MOSFETS) controlled by a high-side gate driver IC chip which recieved PWM outputs from the Bluepill.
Opposite pairs of MOSFETs were activated so current could flow through the motor in two directions allowing both forward and backwards travel.
Each H-bridge was decoupled through capacitor along input and output voltage lines so that noise propagation was kept to a minimum to not influence other componants in the electrical system.
IR Detection Circuits
One of the obstacles of the course was decoding an infrared signal beacon. This beacon was placed just before the archway, and its signal would switch randomly between flashing at a frequency of 1kHz and 10kHz. If the robot passed through the archway when the signal was at 1kHz a platform beyond the archway would start rotating, breaking the tape the robot used to navigate the course. PL2 had two IR detection circuits that were used to differentiate the 1kHz and 10kHz signals. Both circuits were identical, with the exception of the filter explained below.
This analog circuit was a series of signal manipulators to decode the flashing of the beacon into a signal understood (i.e a digital high or low) by the Bluepill mirco-controller. The components of the circuit are as follows:
DC-Block: The DC-Block was used to eliminate the steady 60Hz infra-red emitted from standard household lights (i.e ambient lighting) as a part of the competition enviroment.
Amplification: At a distance that was relevant to robot manuverability the signal would come across quite weak (in the milli-volts range) the amplificating was used to strengthen the incoming signal
Filter: Since PL2 was required to differentiate 1kHz and 10kHz, the respective circuits were built to ignore the opposite frequency.
Analog to digital conversion and final amplification: The final conversion is required to turn the detection of the appropriate signal into a digital high that the mirco-controller may interpret. The amplification is required in the event the non-fluctuating voltage is not large enough for the mirco-controller to read a digital high.
Voltage inverter
A simple voltage inverter was built to supply -VCC to the OpAmps.
Encoders
Originally it was planned to include encoders in the development of PL2 to aid in the navigation of the course. In retrospect we should have started the development of the Encoder interpretation much sooner to ensure reliable usage. The primary difficulty was recieving a steady, noise-free pulse signal from the encoders.  The mirco-controller may interpret distance through the number of times the switches are turned on, and direction through the high/low phase shift between the two switches. Due to mechanical inaccuracies the signal is very noise and, initially, the mirco-controller would read high when it should not have, thus, misinterpretation the signal.
To fix this we built a RC filter circuit and Schmitt-trigger to filter out high frequency noise, and to employ hysterisis to ensure a clean pulse signal could be read by the mirco-controller. As mentioned before, this development occured too late, for we had already started to used hardcoded motor-on times for precise movments.
Direct IR Sampling
Due to the extremely fast clock cycle of the Bluepill mirco-controller (72MHz) it was also possible to directly interpret signals at a frequency in the kHz range as required for the competition. The circuit was simply an amplifier and comparator to ensure the signal was properly read, and the sine wave was converted into a pulse. This development also occurred too late in the 6 week timeline and while it did work it was a back-up plan in the event the analog circuits failed for some unknown reason.
Control Code
Written in C++ and powered by an STM32 Blue Pill
STM32 Blue Pill
The compute power that ran PL2's brains was the STM32 Blue Pill microcontroller. With several analog, PWM and digital pins, and a fast clock cycle, this board allowed us to integrate all the electrical components that we needed to without running out of pins.
State Machine and Object Abstraction
One of the key challenges to making the robot was creating a sensible and easy to follow logic flow. To do so, we created state diagrams and a virtual state machine that allowed us to track "where and what" the robot was doing at all times. This provided certainty to the motions the robot was doing, and allowed us to couple different mechanisms (such as basket raising, bridge lowering, claw mechanisms, etc.) to the motor control, making it easy to express what actions we wanted the robot to take. For example, in the control states, we may delegate states 10-19 as "a bridge dropping sequence". In each state, a different component of the maneuver would be executed (find the edge, stop the motors, back up, lower the bridge, wait, etc.)
Using the state machine in conjunction with abstracting different modules on the robot to their own particular class allowed for the code to be kept clean, modular and easy to debug.
Menu System
Additionally, we also developed a menu system using the onboard Blue Pill memory, EEPROM, to allow us to quickly alter values and make rapid changes without having to resort to uploading code after every proposed change. This allowed us to toy with several key variables for different maneuvers (such as PID constants for tap efollowing, timing vlaues for different maneuvers, and speeds) in a way conducive to rapid testing.
Project Management
Delegation of tasks, milestones and adhering to a timeline
.
Version Control
As you may be able to tell, we relied on Git to manage our documentation and code. This allowed us to work concurrently on several different components of the robot while ensuring everyone was still being kept up to date with the latest devleopments.
Task Management
Building from scratch is quite an undertaking, with several tasks that can be tackled concurrently. To allow us to delegate tasks efficiently and formulate realistic scheduling estimates, we used Trello. This forced us to express, in tangible terms, the work that needed to be done and then allocate it effectively among our members. It also allowed us to assess what tasks may be blocking others, enabling us to allocate ourselves to the work more efficiently.
Results and Lessons Learned
This section highlights our competition day performance and our major take-aways.
The Result
PL2 was able to consistently rescue 3 of the 5 plushies, obtaining a total of 9 points (out of 17 - Chewbacca was worth extra). Due to time constraints, we opted to focus on reliably completing the first half of the course than pursuing the second half, meaning we forfeited Chewbacca. This allowed us to focus on speed and consistency, snagging us 5th place of 16 teams in the final competition.
The Takeaway
The team picked up many "dos and don'ts" along the way, as we strongly noticed what worked and what did not work. Perhaps our biggest takeaway was to plan "the small things" thoroughly to avoid spending time on them later. Examples:
Avoid using header pins - they do not make reliable connections in wired applications
Commit to wire placement - Many times we were using connections that would disconnect consitantly, creating a very unreliable system. Having never designed wire managment before we were worried about changing are minds with how we did something, thus having to restart. We ended up changing how we managed our wired three times (complete reboot with solder) anyway and it would have saved time if we just commited and tried sooner.
Decoupling Capacitors - Saved our lives. At one point when the 14.5V rail was activated and our motors started the Bluepill mirco-contoller would reset. This was likely caused through an extremly fast voltage drop along the 3.3V rail powering the mirco-contoller. A 500uF capacitor fixed that up instantly through maitining the 3.3V rail high enough for the brief moment it dropped.
Design modularly - ensure that each part/system can be easily accessed, replaced and maintained without interfering with other systems. We learned this specifically with our powertrain. It was detachable, thus, changes could be made without invading on the rest of the chassis design.
Continuously test - test subsystems, systems and sequences not only for functionality but also for consistency alongside development to save time debugging
Sample size - consider outliers in your analysis but do not base your judgement single occurrences (for both failures and successes)
Task Delegation - At some points, mainly during testing, it was not necessary for every group memeber to be present. In the event of too many people working on one componant the multitude of opinions bogged down progress. This being said, it was critical in many situations that more than one person was reviewing work to ensure mistakes where not being missed for a long time.
Late Nights - Sometimes staying up to un-Godly hours was more of a way to have fun with the lads than actually working efficiently..


A space occulter used to hunt for new planets
In the summer of 2014 I interned at NASA's Jet Propulsion Laboratory (JPL) for 10 weeks working on Project Starshade. Though I cannot disclose specifics on the project, I have written up a general description of my work. Most of the information below can readily be found online.
A starshade, also dubbed an external occulter, is a precisely shaped screen that flies in far-away formation with a space telescope. The device blocks a star's light to create a high-contrast shadow, so that only light from an orbiting exoplanet enters the telescope for detailed study. The starshade has flower shaped petals which are patterned in a very precise manner to reduce the bending of light waves. Advantages of the starshade include its versatility (the starshade could be use with most current telescopes) and the fact that it encourages simpler future telescope designs (since they would not have to deal with light from the star). Despite the benefits, there are challenges in the form of precision: the starshade must launch and deploy so that everything ends up in the right place - within millimeters. Achieving such tolerances is more impressive when you consider the fact that the starshade could be over 100 feet.
This concept has moved beyond the drawing board at JPL and as part of the process, I helped show part of the starshades feasibility. Specifically, I helped show that the necessary ring truss could be created and deployed to within the desired tolerances. My work primarily included building the truss and designing procedures for ease of repeatibilty when building the frame. Ensuring that my work was well documented and repeatable was essential to this projects, thus several fixtures were designed and created in order to help future employees assemble the Starshade with precision. On top of this, the fixtures and methods were designed with the thought of minimizing loads on the various components used.
A released photo of my work this summer can be seen below. The ring truss originally stows in the center cylinder and deploys to the seen full position. An animation of the expected finished product, along with more information on the project, can be seen here
A released summary of my work is shown below:
August 2014 brought the unveiling of the Starshade Deployment Testbed (SDT) at JPL. This testbed is meant to enable scientists and engineers to meet the challenging petal stowing and deployment requirements for a possible future Starshade mission.
The first sub-assembly test was the deployment of a 10m diameter expanding ring truss, to which the Starshade petals attach. Led by three early-career JPL engineers, the truss concept design began in February 2014 and involved a team of six interns and four student workers. By August, the truss concept with 4 of the design's 28 petals was ready for a functional deployment. The designing and building of this prototype provided the opportunity for these university students to be critical members in the flight path development of an exciting potential NASA mission.
This testbed, open to investigators from all institutions, will be a platform for advancing the technology readiness level of the many Starshade subsystems. These include the optical shield, petal stowing and unfurling system, and the many critical interfaces to the spacecraft.


Professor
More information about Prof. Kenji Satou
The professor who is responsible for my internship at the laboratory of Bioinformatics is Professor Kenji Satou. His research fields are Bioinformatics and Text Mining for medical science. These are examples of his papers:
- A deductive database system PACADE for the three dimensional structure of protein 1991/01
- Application of a deductive database system PACADE toward discovery of clusters of similar structures in proteins 1994/01
- Automated template discovery for information extraction from biomedical literature 2004/07
- Drug interaction ontology (DIO) for inferences of possible drug-drug interactions 2004/09
- Phylogenetic reconstruction from non-genomic data 2007/01
- A Novel Over-Sampling Method and its Application to Cancer Classification from Gene Expression Data 2013/01


Taskinator
Click the button below to add a new task!
Pick a task type
Print
Web
Mobile
Add Task
Tasks to Do
Tasks In Progress
Tasks Completed


The Postman (1997) 1/2 * A movie review by Serdar Yegulalp Copyright 1997 by Serdar Yegulalp
CAPSULE: Why is this movie three hours long?
THE POSTMAN may be the single dumbest movie I've ever seen. Not the worst -- I still leave that accolade to be divided between STARSHIP TROOPERS and MONEY TRAIN -- but by far the dumbest. It takes a situation that had plenty of possibilities, which are all better examined in the David Brin novel that THE POSTMAN has been sensessly cannibalized from, and turns them into an idiot's delight. People should be able to buy insulin along with their popcorn for this one, it's so saccharine and treacly.
Not too far into the future, America has been ravaged by a war which has shattered civilization. The exact details of this war are conveniently omitted -- I imagine they felt "it wasn't important", or some other such lame writer's left-handed excuse. Omitting critical detail is not the same thing as creative restraint, and in this movie they add up to glaring empty places in the story.
Wandering through the shattered landscape (snore) is a man with no name (double snore) who comes across the uniform and truck of a dead mailman. He's used to sleazing his way from one end of hell to the other, so he puts on the uniform (hey, it's in pretty good shape for a guy who's been dead at LEAST a decade!) and tries to scam whatever little pockets of civilization are left into offering him shelter, by pretending to be a letter carrier for the "Restored United States of America".
We are supposed to believe that the movie is about how this drifted inspires people by his "example". Wrong: the movie is not about anything, because it's too busy drowning in jackass cliches and godawful writing to ever manage a Statement of Purpose. It's one part Western, one part MAD MAX and one part Hollywood self-congratulatory sentimentalism, none of which works. It's also an ass- (and bladder-) breaking three hours. TITANIC, in comparison, felt half as long because it was so watchable and so swift on its feet. THE POSTMAN is a lumbering, boneheaded wreck of a movie that doens't know when to lie down and give up.
The silliness is just unstoppable. One painfully unfunny scene has Costner's character trying to do Shakespeare from memory (and we learn, over and over and over again, that he can't do it without cue cards). Another one has him doing his letter-carrying rounds on horseback, shot in such agonizing slow motion that we want to shout instructions at the projectionist. Maybe when this is released on tape and in a deluxe CAV letterboxed collector's edition laserdisc set (as it inevitably will be), we can thumb the fast-forward and make up for Costner's hamhandedness in the director's chair.
Monty Python once had a recurring character they named D.P. Gumby, an utter dimwit who approached everything from brain surgery to flower arranging with granite-jawed seriousness. Watching THE POSTMAN, I felt many associations could be drawn between Mr. Gumby and Kevin Costner as a filmmaker. Costner is just so ploddingly, heart-rendingly, goddamned *earnest* in this movie -- both as an actor and as the creative mind behind it -- that he fails to notice he's making a complete and utter fool of himself.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Aspirational Hobby: I want to learn composing and also singing like a professional singer.
 I am a fan of him, but I am not a crazy fangirl hh. Following him does make me become a better me. When I am frustrated in my real life, I will watch some TV show of him. It really heals me well. Or sometimes I want to be lazy, I will think like "He is already successful but he is still working". This does push me to continue studying.
Jenny Zhang
Summer Feelz: Excited to chill
Aspirational Hobby: I would want to try skydiving.
Ask me About: I enjoy learning Japanese. I went to Japan with my friends after senior year and it was an amazing experience. I am currently doing a minor in Japanese Studies and I hope to visit Japan again someday.
Teammate C Name
Summer Feelz:
Aspirational Hobby:
Ask me About:
Teammate D Name (delete if you team only has 3 students)


Do you need help?
Contact me
Depending on my time and skills, I can provide you help with:
- data analyses
- analysis programming
- statistical modeling
- scientific writing
Send me an inquiry explaining your case 👉🏽👉🏽 e-mail Samuel 👈🏽👈🏽
Depending on my time and skills, I can provide you help with:
Send me an inquiry explaining your case 👉🏽👉🏽 e-mail Samuel 👈🏽👈🏽


If I get to be a legend, I've achieved my goal.
-Usain Bolt
Photo: Usain bolt after winning gold in the 100m event. Beijing,China (2008)
He has broken 9 records (100m,200m,4x100m).
He has about twenty-eight (28) medals.
He was born on the 21st of August.
Usain has been to three (3) olympics:
Beijeng 2008
England 2012
Brazil 2016
He is 30 years of age
Born in Trelawny,Jamaica.
Currently the fastest man in the world.
He has the record for the 100m, 200m and 4x100m.


Graph 500 Benchmark 1 ("Search")
Contributors: David A. Bader (Georgia Institute of Technology), Jonathan Berry (Sandia National Laboratories), Simon Kahan (Pacific Northwest National Laboratory and University of Washington), Richard Murphy (Sandia National Laboratories), E. Jason Riedy (Georgia Institute of Technology), and Jeremiah Willcock (Indiana University).
Version History:
- V0.1
- Draft, created 28 July 2010
- V0.2
- Draft, created 29 September 2010
- V0.3
- Draft, created 30 September 2010
- V1.0
- Created 1 October 2010
- V1.1
- Created 3 October 2010
Version 0.1 of this document was part of the Graph 500 community benchmark effort, led by Richard Murphy (Sandia National Laboratories). The intent is that there will be at least three variants of implementations, on shared memory and threaded systems, on distributed memory clusters, and on external memory map-reduce clouds. This specification is for the first of potentially several benchmark problems.
References: "Introducing the Graph 500," Richard C. Murphy, Kyle B. Wheeler, Brian W. Barrett, James A. Ang, Cray User’s Group (CUG), May 5, 2010.
"DFS: A Simple to Write Yet Difficult to Execute Benchmark," Richard C. Murphy, Jonathan Berry, William McLendon, Bruce Hendrickson, Douglas Gregor, Andrew Lumsdaine, IEEE International Symposium on Workload Characterizations 2006 (IISWC06), San Jose, CA, 25-27 October 2006.
Table of Contents
1 Brief Description of the Graph 500 Benchmark
Data-intensive supercomputer applications are an increasingly important workload, but are ill-suited for platforms designed for 3D physics simulations. Application performance cannot be improved without a meaningful benchmark. Graphs are a core part of most analytics workloads. Backed by a steering committee of 30 international HPC experts from academia, industry, and national laboratories, this specification establishes a large-scale benchmark for these applications. It will offer a forum for the community and provide a rallying point for data-intensive supercomputing problems. This is the first serious approach to augment the Top 500 with data-intensive applications.
The intent of this benchmark problem ("Search") is to develop a compact application that has multiple analysis techniques (multiple kernels) accessing a single data structure representing a weighted, undirected graph. In addition to a kernel to construct the graph from the input tuple list, there is one additional computational kernel to operate on the graph.
This benchmark includes a scalable data generator which produces edge tuples containing the start vertex and end vertex for each edge. The first kernel constructs an undirected graph in a format usable by all subsequent kernels. No subsequent modifications are permitted to benefit specific kernels. The second kernel performs a breadth-first search of the graph. Both kernels are timed.
There are five problem classes defined by their input size:
- toy
- 17GB or around 1010 bytes, which we also call level 10,
- mini
- 140GB (1011 bytes, level 11),
- small
- 1TB (1012 bytes, level 12),
- medium
- 17TB (1013 bytes, level 13),
- large
- 140TB (1014 bytes, level 14), and
- huge
- 1.1PB (1015 bytes, level 15).
Table classes provides the parameters used by the graph generator specified below.
1.1 References
D.A. Bader, J. Feo, J. Gilbert, J. Kepner, D. Koester, E. Loh, K. Madduri, W. Mann, Theresa Meuse, HPCS Scalable Synthetic Compact Applications #2 Graph Analysis (SSCA#2 v2.2 Specification), 5 September 2007.
2 Overall benchmark
The benchmark performs the following steps:
- Generate the edge list.
- Construct a graph from the edge list (timed, kernel 1).
- Randomly sample 64 unique search keys with degree at least one, not counting self-loops.
-
For each search key:
- Compute the parent array (timed, kernel 2).
- Validate that the parent array is a correct BFS search tree for the given search tree.
- Compute and output performance information.
Only the sections marked as timed are included in the performance information. Note that all uses of "random" permit pseudorandom number generation.
3 Generating the edge list
3.1 Brief Description
The scalable data generator will construct a list of edge tuples containing vertex identifiers. Each edge is undirected with its endpoints given in the tuple as StartVertex and EndVertex.
The intent of the first kernel below is to convert a list with no locality into a more optimized form. The generated list of input tuples must not exhibit any locality that can be exploited by the computational kernels. Thus, the vertex numbers must be randomized and a random ordering of tuples must be presented to kernel 1. The data generator may be parallelized, but the vertex names must be globally consistent and care must be taken to minimize effects of data locality at the processor level.
3.2 Detailed Text Description
The edge tuples will have the form <StartVertex, EndVertex> where StartVertex is one endpoint vertex label and EndVertex is the other endpoint vertex label. The space of labels is the set of integers beginning with zero up to but not including the number of vertices N (defined below). The kernels are not provided the size N explicitly but must discover it.
The input values required to describe the graph are:
- SCALE
- The logarithm base two of the number of vertices.
- edgefactor
- The ratio of the graph's edge count to its vertex count (i.e., half the average degree of a vertex in the graph).
These inputs determine the graph's size:
- N
- the total number of vertices, 2SCALE. An implementation may use any set of N distinct integers to number the vertices, but at least 48 bits must be allocated per vertex number. Other parameters may be assumed to fit within the natural word of the machine. N is derived from the problem’s scaling parameter.
- M
- the number of edges. M = edgefactor * N.
The graph generator is a Kronecker generator similar to the Recursive MATrix (R-MAT) scale-free graph generation algorithm [Chakrabarti, et al., 2004]. For ease of discussion, the description of this R-MAT generator uses an adjacency matrix data structure; however, implementations may use any alternate approach that outputs the equivalent list of edge tuples. This model recursively sub-divides the adjacency matrix of the graph into four equal-sized partitions and distributes edges within these partitions with unequal probabilities. Initially, the adjacency matrix is empty, and edges are added one at a time. Each edge chooses one of the four partitions with probabilities A, B, C, and D, respectively. These probabilities, the initiator parameters, are provided in Table initiator.
| A = 0.57 | B = 0.19 |
| C = 0.19 | D = 1-(A+B+C) = 0.05 |
The next section details a high-level implementation for this generator. High-performance, parallel implementations are included in the reference implementation.
The graph generator creates a small number of multiple edges between two vertices as well as self-loops. Multiple edges, self-loops, and isolated vertices may be ignored in the subsequent kernels but must be included in the edge list provided to the first kernel. The algorithm also generates the data tuples with high degrees of locality. Thus, as a final step, vertex numbers must be randomly permuted, and then the edge tuples randomly shuffled.
It is permissible to run the data generator in parallel. In this case, it is necessary to ensure that the vertices are named globally, and that the generated data does not possess any locality, either in local memory or globally across processors.
The scalable data generator should be run before starting kernel 1, storing its results to either RAM or disk. If stored to disk, the data may be retrieved before starting kernel 1. The data generator and retrieval operations need not be timed.
3.3 Sample high-level implementation of the Kronecker generator
The GNU Octave routine in Algorithm generator is an attractive implementation in that it is embarrassingly parallel and does not require the explicit formation of the adjacency matrix.
function ij = kronecker_generator (SCALE, edgefactor) %% Generate an edgelist according to the Graph500 %% parameters. In this sample, the edge list is %% returned in an array with two rows, where StartVertex %% is first row and EndVertex is the second. The vertex %% labels start at zero. %% %% Example, creating a sparse matrix for viewing: %% ij = kronecker_generator (10, 16); %% G = sparse (ij(1,:)+1, ij(2,:)+1, ones (1, size (ij, 2))); %% spy (G); %% The spy plot should appear fairly dense. Any locality %% is removed by the final permutations. %% Set number of vertices. N = 2^SCALE; %% Set number of edges. M = edgefactor * N; %% Set initiator probabilities. [A, B, C] = deal (0.57, 0.19, 0.19); %% Create index arrays. ij = ones (2, M); %% Loop over each order of bit. ab = A + B; c_norm = C/(1 - (A + B)); a_norm = A/(A + B); for ib = 1:SCALE, %% Compare with probabilities and set bits of indices. ii_bit = rand (1, M) > ab; jj_bit = rand (1, M) > ( c_norm * ii_bit + a_norm * not (ii_bit) ); ij = ij + 2^(ib-1) * [ii_bit; jj_bit]; end %% Permute vertex labels p = randperm (N); ij = p(ij); %% Permute the edge list p = randperm (M); ij = ij(:, p); %% Adjust to zero-based labels. ij = ij - 1;
3.4 Parameter settings
The input parameter settings for each class are given in Table classes.
3.5 References
D. Chakrabarti, Y. Zhan, and C. Faloutsos, R-MAT: A recursive model for graph mining, SIAM Data Mining 2004.
Section 17.6, Algorithms in C (third edition). Part 5 Graph Algorithms, Robert Sedgewick (Programs 17.7 and 17.8)
P. Sanders, Random Permutations on Distributed, External and Hierarchical Memory, Information Processing Letters 67 (1988) pp 305-309.
4 Kernel 1 – Graph Construction
4.1 Description
The first kernel may transform the edge list to any data structures (held in internal or external memory) that are used for the remaining kernels. For instance, kernel 1 may construct a (sparse) graph from a list of tuples; each tuple contains endpoint vertex identifiers for an edge, and a weight that represents data assigned to the edge.
The graph may be represented in any manner, but it may not be modified by or between subsequent kernels. Space may be reserved in the data structure for marking or locking. Only one copy of a kernel will be run at a time; that kernel has exclusive access to any such marking or locking space and is permitted to modify that space (only).
There are various internal memory representations for sparse graphs, including (but not limited to) sparse matrices and (multi-level) linked lists. For the purposes of this application, the kernel is provided only the edge list and the edge list's size. Further information such as the number of vertices must be computed within this kernel. Algorithm kernel1 provides a high-level sample implementation of kernel 1.
The process of constructing the graph data structure (in internal or external memory) from the set of tuples must be timed.
function G = kernel_1 (ij) %% Compute a sparse adjacency matrix representation %% of the graph with edges from ij. %% Remove self-edges. ij(:, ij(1,:) == ij(2,:)) = []; %% Adjust away from zero labels. ij = ij + 1; %% Find the maximum label for sizing. N = max (max (ij)); %% Create the matrix, ensuring it is square. G = sparse (ij(1,:), ij(2,:), ones (1, size (ij, 2)), N, N); %% Symmetrize to model an undirected graph. G = spones (G + G.');
4.2 References
Section 17.6 Algorithms in C third edition Part 5 Graph Algorithms, Robert Sedgewick (Program 17.9)
5 Sampling 64 search keys
The search keys must be randomly sampled from the vertices in the graph. To avoid trivial searches, sample only from vertices that are connected to some other vertex. Their degrees, not counting self-loops, must be at least one. If there are fewer than 64 such vertices, run fewer than 64 searches. This should never occur with the graph sizes in this benchmark, but there is a non-zero probability of producing a trivial or nearly trivial graph. The number of search keys used is included in the output, but this step is untimed.
6 Kernel 2 – Breadth-First Search
6.1 Description
A Breadth-First Search (BFS) of a graph starts with a single source vertex, then, in phases, finds and labels its neighbors, then the neighbors of its neighbors, etc. This is a fundamental method on which many graph algorithms are based. A formal description of BFS can be found in Cormen, Leiserson, and Rivest. Below, we specify the input and output for a BFS benchmark, and we impose some constraints on the computation. However, we do not constrain the choice of BFS algorithm itself, as long as it produces a correct BFS tree as output.
This benchmark's memory access pattern (internal or external) is data-dependent with small average prefetch depth. As in a simple concurrent linked-list traversal benchmark, performance reflects an architecture's throughput when executing concurrent threads, each of low memory concurrency and high memory reference density. Unlike such a benchmark, this one also measures resilience to hot-spotting when many of the memory references are to the same location; efficiency when every thread's execution path depends on the asynchronous side-effects of others; and the ability to dynamically load balance unpredictably sized work units. Measuring synchronization performance is not a primary goal here.
You may not search from multiple search keys concurrently.
ALGORITHM NOTE We allow a benign race condition when vertices at BFS level k are discovering vertices at level k+1. Specifically, we do not require synchronization to ensure that the first visitor must become the parent while locking out subsequent visitors. As long as the discovered BFS tree is correct at the end, the algorithm is considered to be correct.
6.2 Kernel 2 Output
For each search key, the routine must return an array containing valid breadth-first search parent information (per vertex). The parent of the searchkey is itself, and the parent of any vertex not included in the tree is -1. Algorithm kernel2 provides a sample (and inefficient) high-level implementation of kernel two.
function parent = kernel_2 (G, root) %% Compute a sparse adjacency matrix representation %% of the graph with edges from ij. N = size (G, 1); %% Adjust from zero labels. root = root + 1; parent = zeros (N, 1); parent (root) = root; vlist = zeros (N, 1); vlist(1) = root; lastk = 1; for k = 1:N, v = vlist(k); if v == 0, break; end [I,J,V] = find (G(:, v)); nxt = I(parent(I) == 0); parent(nxt) = v; vlist(lastk + (1:length (nxt))) = nxt; lastk = lastk + length (nxt); end %% Adjust to zero labels. parent = parent - 1;
7 Validation
It is not intended that the results of full-scale runs of this benchmark can be validated by exact comparison to a standard reference result. At full scale, the data set is enormous, and its exact details depend on the pseudo-random number generator and BFS algorithm used. Therefore, the validation of an implementation of the benchmark uses soft checking of the results.
We emphasize that the intent of this benchmark is to exercise these algorithms on the largest data sets that will fit on machines being evaluated. However, for debugging purposes it may be desirable to run on small data sets, and it may be desirable to verify parallel results against serial results, or even against results from the executable specification.
The executable specification verifies its results by comparing them with results computed directly from the tuple list.
Kernel 2 validation: after each search, run (but do not time) a function that ensures that the discovered breadth-first tree is correct by ensuring that:
- the BFS tree is a tree and does not contain cycles,
- each tree edge connects vertices whose BFS levels differ by exactly one,
- every edge in the input list has vertices with levels that differ by at most one or that both are not in the BFS tree,
- the BFS tree spans an entire connected component's vertices, and
- a node and its parent are joined by an edge of the original graph.
Algorithm validate shows a sample validation routine.
function out = validate (parent, ij, search_key) out = 1; parent = parent + 1; search_key = search_key + 1; if parent (search_key) != search_key, out = 0; return; end ij = ij + 1; N = max (max (ij)); slice = find (parent > 0); level = zeros (size (parent)); level (slice) = 1; P = parent (slice); mask = P != search_key; k = 0; while any (mask), level(slice(mask)) = level(slice(mask)) + 1; P = parent (P); mask = P != search_key; k = k + 1; if k > N, %% There must be a cycle in the tree. out = -3; return; end end lij = level (ij); neither_in = lij(1,:) == 0 & lij(2,:) == 0; both_in = lij(1,:) > 0 & lij(2,:) > 0; if any (not (neither_in | both_in)), out = -4; return end respects_tree_level = abs (lij(1,:) - lij(2,:)) <= 1; if any (not (neither_in | respects_tree_level)), out = -5; return end
8 Computing and outputting performance information
8.1 Timing
Start the time for a search immediately prior to visiting the search root. Stop the time for that search when the output has been written to memory. Do not time any I/O outside of the search routine. If your algorithm relies on problem-specific data structures (by our definition, these are informed by vertex degree), you must include the setup time for such structures in each search. The spirit of the benchmark is to gauge the performance of a single search. We run many searches in order to compute means and variances, not to amortize data structure setup time.
8.2 Performance Metric (TEPS)
In order to compare the performance of Graph 500 "Search" implementations across a variety of architectures, programming models, and productivity languages and frameworks, we adopt a new performance metric described in this section. In the spirit of well-known computing rates floating-point operations per second (flops) measured by the LINPACK benchmark and global updates per second (GUPs) measured by the HPCC RandomAccess benchmark, we define a new rate called traversed edges per second (TEPS). We measure TEPS through the benchmarking of kernel 2 as follows. Let timeK2(n) be the measured execution time for kernel 2. Let m be the number of input edge tuples within the component traversed by the search, counting any multiple edges and self-loops. We define the normalized performance rate (number of edge traversals per second) as:
TEPS(n) = m / timeK2(n)
8.3 Output
The output must contain the following information:
- SCALE
- Graph generation parameter
- edgefactor
- Graph generation parameter
- NBFS
- Number of BFS searches run, 64 for non-trivial graphs
- construction_time
- The single kernel 1 time
- min_time, firstquartile_time, median_time, thirdquartile_time, max_time
- Quartiles for the kernel 2 times
- mean_time, stddev_time
- Mean and standard deviation of the kernel 2 times
- min_nedge, firstquartile_nedge, median_nedge, thirdquartile_nedge, max_nedge
- Quartiles for the number of input edges visited by kernel 2, see TEPS section above.
- mean_nedge, stddev_nedge
- Mean and standard deviation of the number of input edges visited by kernel 2, see TEPS section above.
- min_TEPS, firstquartile_TEPS, median_TEPS, thirdquartile_TEPS, max_TEPS
- Quartiles for the kernel 2 TEPS
- harmonic_mean_TEPS, harmonic_stddev_TEPS
- Mean and standard deviation of the kernel 2 TEPS. Note: Because TEPS is a rate, the rates are compared using harmonic means.
Additional fields are permitted. Algorithm output provides a high-level sample.
function output (SCALE, edgefactor, NBFS, kernel_1_time, kernel_2_time, kernel_2_nedge) printf ("SCALE: %d\n", SCALE); printf ("edgefactor: %d\n", edgefactor); printf ("NBFS: %d\n", NBFS); printf ("construction_time: %20.17e\n", kernel_1_time); S = statistics (kernel_2_time); printf ("min_time: %20.17e\n", S(1)); printf ("firstquartile_time: %20.17e\n", S(2)); printf ("median_time: %20.17e\n", S(3)); printf ("thirdquartile_time: %20.17e\n", S(4)); printf ("max_time: %20.17e\n", S(5)); printf ("mean_time: %20.17e\n", S(6)); printf ("stddev_time: %20.17e\n", S(7)); S = statistics (kernel_2_nedge); printf ("min_nedge: %20.17e\n", S(1)); printf ("firstquartile_nedge: %20.17e\n", S(2)); printf ("median_nedge: %20.17e\n", S(3)); printf ("thirdquartile_nedge: %20.17e\n", S(4)); printf ("max_nedge: %20.17e\n", S(5)); printf ("mean_nedge: %20.17e\n", S(6)); printf ("stddev_nedge: %20.17e\n", S(7)); TEPS = kernel_2_nedge ./ kernel_2_time; N = length (TEPS); S = statistics (TEPS); S(6) = mean (TEPS, 'h'); %% Harmonic standard deviation from: %% Nilan Norris, The Standard Errors of the Geometric and Harmonic %% Means and Their Application to Index Numbers, 1940. %% http://www.jstor.org/stable/2235723 tmp = zeros (N, 1); tmp(TEPS > 0) = 1./TEPS(TEPS > 0); tmp = tmp - 1/S(6); S(7) = (sqrt (sum (tmp.^2)) / (N-1)) * S(6)^2; printf ("min_TEPS: %20.17e\n", S(1)); printf ("firstquartile_TEPS: %20.17e\n", S(2)); printf ("median_TEPS: %20.17e\n", S(3)); printf ("thirdquartile_TEPS: %20.17e\n", S(4)); printf ("max_TEPS: %20.17e\n", S(5)); printf ("harmonic_mean_TEPS: %20.17e\n", S(6)); printf ("harmonic_stddev_TEPS: %20.17e\n", S(7));
8.4 References
Nilan Norris, The Standard Errors of the Geometric and Harmonic Means and Their Application to Index Numbers, The Annals of Mathematical Statistics, vol. 11, num. 4, 1940. http://www.jstor.org/stable/2235723
9 Sample driver
A high-level sample driver for the above routines is given in Algorithm driver.
SCALE = 10; edgefactor = 16; NBFS = 64; rand ("seed", 103); ij = kronecker_generator (SCALE, edgefactor); tic; G = kernel_1 (ij); kernel_1_time = toc; N = size (G, 1); coldeg = full (spstats (G)); search_key = randperm (N); search_key(coldeg(search_key) == 0) = []; if length (search_key) > NBFS, search_key = search_key(1:NBFS); else NBFS = length (search_key); end search_key = search_key - 1; kernel_2_time = Inf * ones (NBFS, 1); kernel_2_nedge = zeros (NBFS, 1); indeg = histc (ij(:), 1:N); % For computing the number of edges for k = 1:NBFS, tic; parent = kernel_2 (G, search_key(k)); kernel_2_time(k) = toc; err = validate (parent, ij, search_key (k)); if err <= 0, error (sprintf ("BFS %d from search key %d failed to validate: %d", k, search_key(k), err)); end kernel_2_nedge(k) = sum (indeg(parent >= 0))/2; % Volume/2 end output (SCALE, edgefactor, NBFS, kernel_1_time, kernel_2_time, kernel_2_nedge);
10 Evaluation Criteria
In approximate order of importance, the goals of this benchmark are:
- Fair adherence to the intent of the benchmark specification
- Maximum problem size for a given machine
- Minimum execution time for a given problem size
Less important goals:
- Minimum code size (not including validation code)
- Minimal development time
- Maximal maintainability
- Maximal extensibility
Date: 2010-10-05 10:35:40 EDT
HTML generated by org-mode 7.01trans in emacs 24


Maximum Likelihood
layout: post comments: true title: Maximum Likelihood Estimate date: 2020-05-23 tags: Statistics —
I want to review MLE.
MLE: \(\hat{\mu} = \text{arg max}_{\mu \in \Gamma} \{I_x(\mu)\}\)
Can be extened to provide maximum likelihood estimate for a function \(\hat{\theta} = T(\hat{\mu})\)
\[I_x(\theta) = \log f_{\theta}(x)\]\(\hat{\theta}\) is always the MLE of $\theta$
Fisher information is the variance of $\dot{l}_x(\theta)$
Note $\dot{l}_x(\theta)$ is a family of functions parameterized by $\theta$.
\[\italic{I}_{\theta} = \int_X \dot{l}_x(theta)^2 f_{\theta}(x) dx\]The reason to consider such derivative is that at $\hat{\theta}$ $\italic{I}_{\theta}$ should be 0.
Fisher’s fundamental theomre for the MLE, in large samples
\[\hat{\theta} \dot{\sim} \mathcal{N}(\theta, \frac{1}{n\italic{I}_{\theta}}\]what does it even mean? $\theta$ is the parameters that varies in the familiy $\Omega$, why put it as mean?


Esa's Google Maps API Experiments. Wheel Zoom.
Map coming...
JavaScript must be enabled to get the map.
Scroll Wheel Zoom
Came documented with v=2.78
Syntax: map.enableScrollWheelZoom();
Can be used with continuous zoom
map.enableContinuousZoom();
The animated red corners overflow outside map container
Try scrollzooming close to an edge of the map
The overflow can be hidden by css
map.getContainer().style.overflow="hidden";
Webpage scrolls along with the map zoom
Preventing unwanted page scroll takes an event listener
Prevent page scroll when mouse on map
JS-Kit Comments
Now with rating
Try it. Leave a comment.
Get it.
Example index


WebChecker
{{lan}}
{{ext}}
Welcome to the WebChecker.
Please input a website to check and it will return:
The server its on
Last time it was modified
And the content type of the site
{{ form.csrf_token }} {{ form.website.label}} {{ form.website(placeholder="http://") }}
{% block content %} {% endblock %}


|
Dune
Without reading earlier drafts, Lynch went to work on a screenplay capable of satisfying his vision. "The most difficult aspect of course, was being true to the whole," he remarked in Prevue magazine. "I couldn't reduce it to the point where the story's essence is lost - millions of fans would feel raped!" The four-year production expanded to include Sting, Kyle Maclachlan, Patrick Stewart, Alicia Witt, Max von Sydow, Dean Stockwell, Sean Young, Jack Nance, and an uncredited cameo by Lynch as a Spice worker. After reviewing the finished project, Lynch was so horrified by his efforts that he lobbied to have his name removed from the credits altogether. The actors and actresses appeared embarrassed just standing there, and numerous elements of the film dripped with unintentional homoeroticism worthy of The Ambiguously Gay Duo. Production assistants quietly wondered amongst themselves if they weren't just collaborating to manufacture more of Frank Herbert's Dung. Even Sting's opinion of the film slowly morphed over time as he came to realize Dune would be inextricably linked to his reputation and career: September, 1983: "I met David and I loved him. He's a madman in sheep's clothing, and I just felt I had to do the movie because I know he's going to do something extraordinary." July 1985: "I didn't even like the film, I don't have a clue what it was about, it was very confusing." November 1987: "I refuse to take responsibility for any film I'm in. It's the directors movie." May, 1998: "There's no actor who's been in nothing but great movies, nothing but successes. You can make a few lousy movies in relative obscurity." April, 1998: "I was flicking through the channels in a hotel room in the Midwest. Suddenly there they were, the flying underpants. They were great but very tricky to get on under your flares. I still don't actually know what Dune was about and I don't know if anyone did." "I started selling out on Dune," Lynch recalls. "Looking back, it's no one's fault but my own. I probably shouldn't have done that picture, but I saw tons and tons of possibilities for things I loved, and this was the structure to do them in. there was so much room to create a world. But I got strong indications from Dino De Laurentiis of what kind of film they expected, and I knew I didn't have final cut.  Things I felt I could get away with within their framework. So it was destined to be a failure, to me." To this day, the only people who claim Dune is a great movie are those who developed a grade-school fondness for the series of novels. Abstract rumors regularly circulate in excitable chat rooms and sci-fi conventions: have you heard about the four hour version? The six hour version? What about the director's "choice cut" ten hour version? The legacy of Dune includes eight sequels (by Frank Herbert, his son Brian and other authors), two television miniseries on the SciFi channel, five computer games, countless Marvel comics, action figures, birthday party plates, board games, and Viewmaster discs. "In retrospect," laments Lynch, "I can see that I started getting into trouble with Dune early on, and it wasn't just the final editing that did it, although I think the film could be way, way of better. I still worry that I don't know if it could ever be a great film, or even a real good film. I don't know. I forget so much about it." |


Video Cache
Profile
Logout
Main
Access
Debug
Statistics
Videos
Transfers
Settings
Overview
Memory
Disks
System
Network
PHP
Version:
5.3.4 [ok]
OS:
WINNT [ok]
Debug:
no
Memory limit:
128M
Expose:
1
Safe mode:
Software
Linux version:
MYSQL Version:
5.1.53-community-log
APACHE Version:
Apache/2.2.17 (Win32) PHP/5.3.4
Videos
Cached videos:
0
Videos total size:
0


Dorota was born and raised in the small beach town of Sopot, Poland. After moving to New York, she became fascinated with health and fitness. She received her certification as a personal trainer and nutrition coach, but she always loved cooking. She continued looking for ways to help people get the most nutrition out of their food and meals.
Dorota strives to create meals that are not only delicious, but nutritious too. As a fitness and nutrition coach, as well as a triathlete herself, she inspires her clients to lead active and healthy lifestyles.
She believes that by making eating healthy as convenient as possible, a healthy lifestyle and fitness goals are well within our reach.


RADICAL ADMIN
Administrator
21:00
Sat,October 1st 2029
Index
Customers
Account
Add New Account
Edit Admin Profile
Storage
All Materials
Add New Material
Products
B&W Products
Full Color Products
Outdoor Products
JB Products
Fotocopy Products
Other Products
Additional Products
Add New Product
Materials
Material Id
Material Code
Material Name
Smallest Unit
Stock per Unit
Unit Name
Quantity
Add
Dashboard
Dashboard v.1
Dashboard v.2
Layout
Top Navigation
Boxed
Charts
ChartJs
Morris
Flot
SparkLine
Ui Elements
Color
Weather
Typography
Icons
Buttons
Media
Panels & Tabs
Notifications & Tooltip
Badges & Label
Progress
Sliders
Timeline
Modals
Forms
Form Element
Wizard
File Upload
Text Editor
Tables
Data Tables
handsontable
Static
Calendar
Mail
Inbox
Compose Mail
View Mail
Pages
Forgot Password
SignIn
SignUp
Article v1
Search Result v1
Product Grid
Profile v1
Invoice v1
MultiLevel
Level 1
Level 1
Level 1
Level 2
Level 2
Level 2
Credits


*** User 2017-05-05 20:42:10.419 ***
20:42:10.419 [info] Disabling blocking sync...
*** User 2017-05-05 20:42:10.425 ***
20:42:10.425 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-1@MacBook-Pro-de-Anne-France'
*** User 2017-05-05 20:42:11.936 ***
20:42:11.936 [info] Enabling membership...
*** User 2017-05-05 20:42:11.938 ***
20:42:11.938 [info] Disabling blocking sync...
*** User 2017-05-05 20:42:11.942 ***
20:42:11.942 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-2@MacBook-Pro-de-Anne-France'
*** User 2017-05-05 20:42:13.430 ***
20:42:13.430 [info] Enabling membership...
*** User 2017-05-05 20:42:13.431 ***
20:42:13.431 [info] Disabling blocking sync...
*** User 2017-05-05 20:42:13.436 ***
20:42:13.436 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-3@MacBook-Pro-de-Anne-France'
*** User 2017-05-05 20:42:13.664 ***
Joining node: 'node-3@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60996
*** User 2017-05-05 20:42:13.665 ***
Joining issued: 'node-3@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60996
*** User 2017-05-05 20:42:13.665 ***
Joining node: 'node-2@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60981
*** User 2017-05-05 20:42:13.665 ***
Joining issued: 'node-2@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60981
*** User 2017-05-05 20:42:13.666 ***
Joining node: 'node-1@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60970
*** User 2017-05-05 20:42:13.666 ***
Joining issued: 'node-1@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 60970
*** User 2017-05-05 20:42:13.727 ***
Waiting for join to complete with manager: partisan_default_peer_service_manager
*** User 2017-05-05 20:42:13.729 ***
Finished.
*** CT 2017-05-05 20:42:13.729 *** COVER INFO
Adding nodes to cover test: ['runner@MacBook-Pro-de-Anne-France']
*** CT 2017-05-05 20:42:13.738 *** COVER INFO
Successfully added nodes to cover test: []
*** User 2017-05-05 20:42:21.773 ***
Case finished: orset_test
*** User 2017-05-05 20:42:28.819 ***
20:42:28.819 [info] Application lasp exited with reason: stopped
*** User 2017-05-05 20:42:28.820 ***
20:42:28.820 [info] Application partisan exited with reason: stopped
=== Ended at 2017-05-05 20:42:28
=== successfully completed test case
=== Returned value: ok
Test run history
| Top level test index


Preparation time
less than 30 mins
Cooking time
less than 10 mins
Serves
Serves 1
Dietary
Preheat the oven to 180C/350F/Gas 4.
For the pomegranate mousse, whip the cream and sugar together in a bowl until soft peaks form when the whisk is removed. Gently fold in the yoghurt and the pomegranate seeds.
For the shortbread, place all of the shortbread ingredients into a food processor and pulse, gradually adding enough water to bind into a dough. Tip the dough out onto a floured work surface and knead lightly to bring the dough together into a ball.
Roll the dough out to a thickness of 1cm/½inch and cut into rectangles. Place onto a non-stick baking sheet and sprinkle over the caster sugar and prick the dough with a fork. Bake in the oven for 5-7 minutes, or until golden-brown.
To serve, spoon the mousse into a tall serving glass and garnish with a sprig of mint. Serve the shortbread on a plate alongside.


Thank you for helping us decide BusMall's very first batch of catalogue products! Please click The picture of the product you would be most likely to purchase! Once you have voted 25 times in total, we will show you a chart of the data we have collected from all the other participants, so that you can see how your opinions compare to others'!
As compensation for your assistance, you will recieve a set of our limited edition dining set, available only to BusMall volunteers!


PATIENT AUTHORIZATIONS, ASSIGNMENT OF BENEFITS (AOB) & FINANCIAL RESPONSIBILITIES
I authorize Exact Sciences Laboratories (Exact) to bill my insurance/health plan and furnish them with my Cologuard order information, test results, or other information requested
for reimbursement. I assign all rights and benefits under my insurance plans to Exact and authorize Exact to appeal and contest any reimbursement denial, including in any
administrative or civil proceedings necessary to pursue reimbursement. I authorize all reimbursements to be paid directly to the laboratory in consideration for services performed.
I understand that I am responsible for any amount not paid, including amounts for non-covered services or services determined by my plan to be provided by an out-of-network
provider. I further understand that if I am a Medicaid enrollee in a state where Exact is enrolled as a Medicaid provider, Exact will accept as payment in full the amounts paid by the
Medicaid program, plus any deductible, coinsurance or copayment which may be required by the Medicaid program to be paid by me.


# dbbase/base.py
"""
This module maintains database info common to all the modules.
This implements database creation and dropping. In addition, a
database class takes in a config for the URI of the database.
Because this module implements database creation and dropping,
the config variables must not only have a URI as a string. There
must be also knowledge of a superuser with the rights to perform the
needed actions, and a base database such as with PostgreSQL.
To that end there is also a config function for flexibility.
"""
import logging
import importlib
import sqlalchemy
from sqlalchemy import create_engine, orm, Table
from sqlalchemy.sql.elements import BinaryExpression
from . import model
from .column_types import WriteOnlyColumn
from .serializers import STOP_VALUE
from .utils import xlate
from .doc_utils import (
process_expression,
_property,
_function,
_binary_expression,
_foreign_keys,
)
logger = logging.getLogger(__name__)
[docs]class DB(object):
"""
This class defines a central location for accepting database
configuration information, creating connections and sessions.
Default:
DB(config, model_class=None, checkfirst=True, echo=False)
Args:
config: (str) : Configuration string for the database,
the equivalent of SQLALCHEMY_DATABASE_URI.
model_class: (obj) : An alternate Model class can be inserted.
Otherwise it defaults to Model in this package.
checkfirst: (bool) : create tables only if the table
does not exist
echo: (bool) : log actions in database engine
"""
def __init__(
self,
config,
model_class=None,
checkfirst=True,
echo=False,
*args,
**kwargs
):
# not a fan of this
if config != "sqlite///:memory:":
self.config = config
else:
self.config = "sqlite://"
self.engine = None
self.session = None
for key in sqlalchemy.__all__:
self.__setattr__(key, sqlalchemy.__dict__.__getitem__(key))
# column types
self.__setattr__("WriteOnlyColumn", WriteOnlyColumn)
# these are being added on an as-needed basis
orm_functions = ["relationship", "aliased", "lazyload"]
for key in orm_functions:
self.__setattr__(key, orm.__dict__.__getitem__(key))
# all of the orm is available here
self.orm = orm
self.Model = self.load_model_class(model_class)
self.Model.db = self
# now create_session is done after importing models
self.session = self.create_session(
checkfirst=checkfirst, echo=echo, *args, **kwargs
)
[docs] @staticmethod
def load_model_class(model_class=None):
""" load_model_class
This function creates a fresh copy of the declarative base.
This causes a reset of the metaclass.
Default:
load_model_class(model_class=None)
Args:
model_class: (obj) : An alternate Model class can be
inserted. Otherwise it defaults to Model in this
package.
Returns:
model_class (obj)
"""
importlib.reload(model)
if model_class is None:
return model.Model
[docs] def create_engine(self, echo=False, *args, **kwargs):
""" create_engine
Basically a pass through to sqlalchemy.
Default:
create_engine(echo=False)
Args:
config: (str) : Configuration string for the database
echo: (bool) : log actions in database engine
Returns:
engine (obj) : newly created engine
"""
self.engine = create_engine(self.config, echo=echo)
self.engine.connect()
return self.engine
[docs] def create_session(self, checkfirst=True, echo=False, *args, **kwargs):
"""create_session
This function instantiates an engine, and connects to the database.
A session is initiated. Finally, any new tables are created.
Default:
create_session(checkfirst=True, echo=False)
Args:
checkfirst: (bool) : If True, will not recreate a table
that already exists.
echo: (bool : str) : logs interactions with engine
to INFO. defaults to False. echo can also be "debug" for more
detail.
Returns:
session (obj)
"""
engine = self.create_engine(self.config, echo=echo, *args, **kwargs)
engine.connect()
session = orm.sessionmaker(bind=engine)()
self.Model().metadata.create_all(engine, checkfirst=checkfirst)
self._apply_db()
return session
[docs] def get_table_list(self):
"""
This function returns a list of tables as found in the database.
Note that this list can be different from a list of model objects in
the case where the tables were created outside of the models.
"""
engine = create_engine(self.config)
return engine.table_names()
[docs] def drop_all(self, tables=None, checkfirst=True, echo=False):
""" drop_all
Drop all tables and sequences.
This function drops tables.
Default:
drop_all(self, tables=None, checkfirst=True, echo=False)
Args:
tables: (None | list) : An optional list of tables, rather than all
checkfirst: (bool) : Can verify the existence prior to attempting
the drop
echo: (bool : str) : logs interactions with engine
to INFO. defaults to False. echo can also be "debug" for more
detail.
"""
# see how this session is not the 'session' object
self.orm.session.close_all_sessions()
engine = create_engine(self.config, echo=echo)
self.Model().metadata.drop_all(engine, tables=tables, checkfirst=checkfirst)
[docs] def create_all(self, bind=None, checkfirst=True):
"""create_all
This function creates all available tables.
Default:
create_all(bind=None, checkfirst=True)
Args:
bind: (obj) : sqlalchemy.engine.base.Engine
checkfirst: (bool) : If True, will not recreate a table
that already exists.
"""
if bind is None:
bind = self.session.bind
self.Model.metadata.create_all(bind, checkfirst=checkfirst)
self._apply_db()
def _apply_db(self):
""" _apply_db
This function walks the Model classes and inserts the query
and db objects. Applying db helps in situations where the
db has changed from the original creation of the Model.
"""
for cls in self.Model._decl_class_registry.values():
if hasattr(cls, "__table__"):
if isinstance(cls.__table__, Table):
self.apply_db(cls)
[docs] def apply_db(self, cls):
""" apply_db
This function receives a Model class and applies db and session
to the class. This enables model classes to be added if not in
the original initialization.
Args:
cls: (Model) : the Model class having the attributes updated.
"""
cls.query = self.session.query(cls)
cls.db = self
[docs] def doc_tables(self, class_list=None, to_camel_case=False):
""" doc_tables
This function creates a dictionary of all the table configuratons.
The function can be used in several ways:
* Communicate characteristics about a resource in an API.
* Provide a basis for unittesting a table to verify settings.
* Enable API resource validation prior to record creation.
Usage:
doc_tables(
class_list=None
to_camel_case=False
)
Args:
#class_list: (None : list) : if left as None, returns all classes
to_camel_case: (bool) : converts the column names to camel case
serial_fields: (None : list) : specify a limited list of columns
Return:
doc (dict) : a dict of the classes with an initial key of
'definitions'
The column props included are name, type, required, default detail,
foreign_keys, and unique.
"""
if class_list is None:
classes = self.Model._decl_class_registry.values()
class_names = self.Model._decl_class_registry.keys()
else:
class_names = [cls.__name__ for cls in class_list]
classes = [
self.Model._decl_class_registry[class_name]
for class_name in sorted(class_names)
]
doc_list = [
self.doc_table(cls, to_camel_case=to_camel_case)
for cls in classes
if isinstance(cls, type) and issubclass(cls, self.Model)
]
doc = {"definitions": {}}
for doc_cls in doc_list:
doc["definitions"].update(doc_cls)
return doc
[docs] def doc_table(
self,
cls,
to_camel_case=False,
serial_fields=None,
serial_field_relations=None,
level_limits=None,
orig_cls=None,
):
""" doc_table
This function creates a dictionary of a table configuraton to aid in
documenting.
The function can be used in several ways:
* Communicate characteristics about a resource in an API.
* Provide a basis for unittesting a table to verify settings.
* Enable API resource validation prior to record creation.
Usage:
doc_table(
cls,
to_camel_case=False,
serial_fields=None,
serial_field_relations=None,
level_limits=None,
orig_cls=None
)
Args:
cls: (class) : the table to be documented
to_camel_case: (bool) : converts the column names to camel case
serial_fields: (None : list) : specify a limited list of columns
serial_field_relations: (None: dict) : Can control what serial
fields are included in relationships
level_limits: (None : dict) : A technical variable related to
preventing runaway recursion. Best to leave it alone.
orig_cls: (None: str) : A technical variable related to recursion,
leave this variable alone as well.
Return:
doc (dict) : a dict of the column values
"""
def _post_value(key, item_dict):
if to_camel_case:
key = xlate(key)
properties[key] = item_dict
if level_limits is None:
level_limits = {}
orig_cls = cls._class()
if cls._class() in level_limits:
# it has already been done
if not cls._has_self_ref():
return STOP_VALUE
elif level_limits[cls._class()] > 1:
return STOP_VALUE
properties = {}
doc = {
cls.__name__: {
"type": "object",
"properties": properties,
"xml": cls.__name__,
}
}
if serial_fields is not None:
columns = serial_fields
else:
columns = [
key
for key in cls.__dict__.keys()
if key not in cls._get_serial_stop_list()
]
for key in columns:
value = cls.__dict__[key]
if hasattr(value, "expression"):
if isinstance(value.expression, self.Column):
# it is a column
item_dict = process_expression(value.expression)
# done afterwards because keys in expression can change
elif isinstance(value.expression, BinaryExpression):
var_cls = value.prop.entity.class_._class()
if orig_cls is not None and var_cls in level_limits:
# avoids erroneous exclusion
level_limits.pop(var_cls)
# relationship or None
item_dict = _binary_expression(
value,
to_camel_case=to_camel_case,
serial_field_relations=serial_field_relations,
level_limits=level_limits,
bidirectional=cls._is_bidirectional(key),
)
else:
item_dict = {
"readOnly": True,
"unknown": str(value.expression),
}
if item_dict is not None:
_post_value(key, item_dict)
elif isinstance(value, property):
item_dict = _property(cls, key, value)
_post_value(key, item_dict)
elif callable(value):
item_dict = _function(value)
if item_dict is not None:
_post_value(key, item_dict)
else:
# skip as unnecessary
pass
table_constraints = self._process_table_args(cls)
if table_constraints is not None:
doc.update(table_constraints)
return doc
def _process_table_args(self, cls):
table_args = cls.__dict__.get("__table_args__")
key = "constraints"
constraints = []
if table_args:
# skipping if table_args is a dict
# probably param about schemas, so out of scope
if isinstance(table_args, tuple):
for item in table_args:
if isinstance(item, self.CheckConstraint):
ddict = {"check_constraint": item.sqltext.text}
constraints.append(ddict)
elif isinstance(item, self.ForeignKeyConstraint):
fk_key = "foreign_key_constraint"
ddict = {fk_key: {}}
ddict[fk_key].update(_foreign_keys(item.elements))
ddict[fk_key].update({"column_keys": item.column_keys})
constraints.append(ddict)
elif isinstance(item, self.UniqueConstraint):
ddict = {"unique_contraint": {"columns": []}}
for uniq_col in item.columns:
ddict["unique_contraint"]["columns"].append(
uniq_col.expression.name
)
constraints.append(ddict)
if constraints:
return {key: constraints}
return None
[docs] def doc_column(self, cls, column_name):
""" doc_column
This function extracts the documentation dictionary for a column.
Args:
cls : (class) : the class that the column belongs to.
column_name : (str) : the name of the column to be documented.
Returns:
dict
"""
return process_expression(getattr(cls, column_name).expression)


If this error repeats, please contact customer service.<PHONE_NUMBER> (available monday until saturday between 9:00 & 18:00).