title = "Menu Business Admin Details" url = "/account/company/:activationcode?" layout = "main" is_hidden = 0 == param('activationcode'); } function onStart() { $user=Auth::getUser(); if (! $user ) { return redirect("/".$this['activationcode']); } $this['invoices']= DB::select( "SELECT download_code, transaction_date, credits_purchased, price_paid, transaction_currency, concat((user_id*10),(id*10)) as invoice_number ". "FROM ok_payments ". "WHERE ". "user_id = ". $user->id . " " . "ORDER BY transaction_date DESC" ); } function onSave() { $user=Auth::getUser(); if (! $user ) { return redirect("/".$this['activationcode']); } // Collect input $Business_Name = post('Business_Name'); $Business_Description = post('Business_Description'); $ok_invoice_name = post('ok_invoice_name'); $ok_invoice_country = post('ok_invoice_country'); $ok_invoice_address_1 = post('ok_invoice_address_1'); $ok_invoice_address_2 = post('ok_invoice_address_2'); $ok_invoice_city = post('ok_invoice_city'); $ok_invoice_state = post('ok_invoice_state'); $ok_invoice_zip = post('ok_invoice_zip'); // Form Validation $validator = Validator::make( [ 'Business_Name' => $Business_Name, 'Business_Description' => $Business_Description, 'ok_invoice_name' => $ok_invoice_name, 'ok_invoice_country' => $ok_invoice_country, 'ok_invoice_address_1' => $ok_invoice_address_1, 'ok_invoice_address_2' => $ok_invoice_address_2, 'ok_invoice_city' => $ok_invoice_city, 'ok_invoice_state' => $ok_invoice_state, 'ok_invoice_zip' => $ok_invoice_zip, ], [ 'Business_Name' => 'required|max:255', 'Business_Description' => 'required|max:255', 'ok_invoice_name' => 'max:255', 'ok_invoice_country' => 'max:4', 'ok_invoice_address_1' => 'max:255', 'ok_invoice_address_2' => 'max:255', 'ok_invoice_city' => 'max:255', 'ok_invoice_state' => 'max:255', ] ); if ($validator->fails()) { $messages = $validator->messages(); Flash::error($messages->first()); return redirect('/account/company/'.$this['activationcode']); // throw new ApplicationException($messages->first()); } $user->ok_company_name = $Business_Name; $user->ok_vendor_data = $Business_Description; $user->ok_invoice_name = $ok_invoice_name; $user->ok_invoice_country = $ok_invoice_country; $user->ok_invoice_address_1 = $ok_invoice_address_1; $user->ok_invoice_address_2 = $ok_invoice_address_2; $user->ok_invoice_city = $ok_invoice_city; $user->ok_invoice_state = $ok_invoice_state; $user->ok_invoice_zip = $ok_invoice_zip; $user->save(); DB::table('operations.companies') ->where('uid', $user->ok_company_id) ->update(array( 'company_name_edited' => $Business_Name, 'vendor_data_edited' => $Business_Description, 'company_country' => $ok_invoice_country, )); $score=6; if($ok_invoice_country=="uk") $score=7; DB::table('operations.bp_supplier_positions') ->where('company_id', $user->ok_company_id) ->update(array( 'bp_position' => DB::raw("floor(bp_position/10)*10 + $score"), )); Flash::success("Settings Saved."); return redirect('/account/company/'.$this['activationcode']); // $to = System\Models\MailSettings::get('sender_email'); // $params = compact('website','name','email'); // Mail::sendTo($to, 'yourappname.website::mail.contactform', $params); } ?> == {% partial "head" %} {% partial "nav-top" %}
On this page you should amend your business details so they show up correctly when searchers find you.
{% else %}On this page you can amend your business details so they show up correctly when searchers find you.
You should also ensure your invoicing details are correct so you can generate correct invoices for credit purchases.
{% endif %}


Wild boar pappardelle recipe
by Angela HartnettLots of wild boar comes from Europe but you can look out for it from Scottish meat suppliers. You can easily replace it here with venison, too.
Prep time: 10 minutes | Cooking time: 2 hours 15 minutes
SERVES
Four
INGREDIENTS
- Oil, for cooking
- 300g mixed roughly chopped carrot, onion and celery
- 2 garlic cloves, finely chopped
- 500g wild boar meat, minced or finely chopped
- 1 tsp tomato purée
- 100ml red wine
- 200ml chicken stock
- 1 bay leaf
To serve:
- Freshly cooked pappardelle
- Chopped parsley
- Freshly grated Parmesan
METHOD
- Using a pan large enough to hold all the ingredients, start by heating three tablespoons of oil and add the chopped vegetables and garlic. Sauté until the vegetables are soft but haven’t taken on any colour.
- Add the meat and sauté briefly just until it loses its redness – it does not need to be cooked through.
- Add the tomato purée and cook for four minutes, then add the wine and reduce the liquid to a glaze before adding the stock, bay leaf and enough water to cover. Put the lid on and cook for a couple of hours, checking every once in a while to stir, until the meat is coated in a nice thick sauce.
- The sauce can be stored in the fridge for a couple of days, or served on the day with fresh pappardelle. Finish with chopped parsley and freshly grated Parmesan.


WeeWikiPaint is the web's premier collaborative painting site. Or at least, it could be. In the weeks to come, we'll be adding many new features. Check back soon!
You can watch this site get developed! This project is part of James Shore's Let's Code: Test-Driven Javascript screencast, a series focused on rigorous, professional Javascript development. Come join the fun!


Meet Our Team
Atri Das
DSC lead at Techno India University
Shaun Ray
DSC Kolkata Lead
Sayan Mandal
DSC lead at Techno India University


A scratchx extension to lock the pointer.
Inspired by this topic: https://scratch.mit.edu/discuss/topic/158162/
MIT License


|
Walt DisneyAfter a long, hot afternoon spent walking around Disneyland under the beating Anaheim sun, sooner or later you become obsessed with the hunt for air conditioning. At which point, you need to find someplace with a beefy climate control system, and fast. So now you have a choice to make: either spend another half hour standing in line outside the Pirates of the Caribbean, or head down to Main Street for some quality time with a robotic Abraham Lincoln.By the time you make your way to the town square, you start to sense something odd about the place. Unlike the other major attractions, there's never a line outside "Great Moments" (except during the peak of summer). On top of that, the overall facade somehow reminds you of a Scientology intake center. But there's something else you can't quite put your finger on. Then it hits you. Hey, that's kind of strange. Maybe you noticed it before and just forgot that, for some reason, the Great Emancipator got stuck with bottom billing. The marquee reads:
What kind of egomaniac puts his name next to -- much less atop -- Abraham Lincoln's? you wonder. Was that Walt's idea? While you're reeling from the sheer audacity, a neatly-dressed park employee with a beatific smile implores you to come inside. "The next showing will be in 15 minutes," she says. All of a sudden the Scientology vibe returns, only this time stronger. But it's still unbearably hot, so you try to ignore it. When you step inside, the arctic blast really soothes the nerves. It takes a few minutes for the sensation of coolness to wear off, then you notice you're in a museum. While everybody's waiting for Mr. Lincoln to finish delivering a rambling remix of his old speeches, you're stuck in a large antechamber stocked with exhibits. There are a few Lincoln-related items, but they're vastly outnumbered by artifacts of Walt. So this, you realize, is what they call The Walt Disney Story. The collection focuses on his long and successful career. There are photos of the Disneyland under construction, dignitaries in the park, and Walt doing his thing. The showcases are Walt's formal and working offices from Walt Disney Studios (behind glass, of course). They were relocated from Burbank, carpet and all. This attraction (if you can call it that) lacks the wit and playfulness evidenced elsewhere throughout in the park. It's almost like visiting a national monument, or possibly a religious shrine. There's even a guest book to sign. Everywhere you look it's dry and dull and actually makes you eager for the crappy show to start. By the time the long row of doors leading into the auditorium finally swing open, you've been straining to hasten the process by means of telekenesis. That is, unless you're some kind of Disney freak.  Then his family moved to Kansas City, where he grew up. In 1918 he dropped out of high school and left to join the Red Cross ambulance corps. He arrived in postwar France and spent a year as a chauffeur for Army officers.He returned to Kansas City in 1919 and spent a couple of years doing odd jobs. He got interested in animation and founded a company in 1922 to produce cartoons full time. Laugh-O-Gram Films got screwed by a couple of deadbeat clients and went bankrupt the following year. Then he went to California and started another cartoon company in 1923 with his brother Roy. A few years later, the Disney Brothers Studio finally had a hit on their hands with a character named Oswald the Lucky Rabbit. When Walt traveled to New York to renegotiate his distribution deal, it was only then that he discovered that he didn't own the rights to the character. Worse, the distributor offered Walt's staff more money if they would come to New York and work for him directly. Most of them jumped ship. Back in California, Walt, his brother Roy, and artist Ub Iwerks hald a meeting to decide what to do next. Their only choice was to dream up a new character to replace Oswald. The first idea, a cat, was rejected because there were already too damn many cartoon cats in the world. Somebody countered with a mouse. Walt wanted to name it Mortimer, but his wife insisted on the name Mickey. Coincidentally, the new mouse character bore a striking resemblance to Oswald the Lucky Rabbit. Mickey Mouse made his debut in the May 1928 cartoon "Plane Crazy." It was a minor success, but not what they needed. That was followed up by another Mickey vehicle, "The Gallopin Gaucho." Over the summer, they decided to use some of the latest technology to gain an edge on the competition. In November, they released "Steamboat Willie." It was the first cartoon set to a synchronized soundtrack -- the projector played all the music and made its own sound effects. People loved it, and a long series of Mickey Mouse cartoon followed. Then Walt got screwed yet again by another distributor -- actually, it's a pretty dull story. Skip forward 20 years. By then the company had become the world's leader in animated films, and Walt himself something of a celebrity. In fact, they even changed the name of the business to maximize his name recognition. It was rechristened Walt Disney Studios. Naturally, this attracted a lot of press, which forced the company to polish Walt's public image. A staff cartoonist designed his famous signature for him, and then taught Walt how to draw it. (He never quite mastered the thing -- genuine Walt Disney autographs look erratic and haphazard.) They wanted to project an image of him as a kindly father figure, interested mainly in artistry and not the business end of things. In fact, Disney certainly did love the artistic nature of his company's products. But he also quite plainly loved profits and market competition at least as much. Walt was not an easy man to work for. At night, he would go through employee desks to check their work and count the number of pens. It was studio policy not to pay animators for the time they spent not drawing. They had to punch out whenever they got up to use the bathroom, get a drink of water, or even sharpen a pencil. If that weren't enough, the animators who produced the cartoons never received screen credit. The only name audiences ever saw was Walt Disney's, even though he hadn't so much as picked up a sketchbook since 1930. So Walt always had to keep his eye out for any sign of labor troubles, of which there were plenty. In 1941, his animators finally went on strike, and they were joined on the picket line by several big names: Art Babbitt (Goofy), Bill Tytla (Dumbo), John Hubley (Mr. Magoo), Chuck Jones and Maurice Noble (Bugs Bunny), Bill Melendez (Charlie Brown), Bill Hurtz (Rocky and Bullwinkle), Hank Ketchum (Dennis the Menace), and Walt and Selby Kelly (Pogo). Disney publicly fumed that Communist agitators were responsible for the unrest. In that way, his hatred for labor unions dovetailed neatly with his overweening sense of patriotism. About that, Walt once remarked:
"Actually, if you could see close in my eyes, the American flag is waving in both of them and up my spine is growing this red, white and blue stripe." When World War II broke out, Walt Disney Studios participated aggressively in America's war effort, creating civilian propaganda, military training films, and even designing logos for the armed forces. In October 1947, Walt testified before the House Un-American Activities Committee. He was all too happy to tell them about how the Commies were trying to ruin his business. And he named four people he believed to be Communists. One of them was even a former Walt Disney Studios employee:
(By the way, Walt's human resources people must have kept fairly comprehensive records, for him to be able to find an ex-employee's professed religious beliefs in his dossier.) Anyway, over the next few years Disney was more than happy to help out the government any way he could. In 1954, while he was overseeing progress on a huge construction site in Southern California, the following memo made its way into Walt's FBI file:
Mr. Disney has recently established a business association with the American Broadcasting Company-Paramount Theaters Inc. for the production of a series of television shows, which for the most part are scheduled to be filmed at Disneyland, a multimillion-dollar amusement park being established under Mr. Disney's direction in the vicinity of Anaheim, Calif. Mr. Disney has volunteered representatives of this office complete access to the facilities of Disneyland for use in connection with official matters and for recreational purposes. Perhaps in part because of Walt's generous spirit, the FBI agent recommended that he be designated a secret informer:
Because of Mr. Disney's position as the foremost producer of cartoon films in the motion picture industry and his prominence and wide acquaintanceship in film production matters, it is believed that he can be of valuable assistance to this office and therefore it is my recommendation that he be approved as a Special Agent in Charge (SAC) contact. Meanwhile, Walt was in the process of spending a whole year and $17.5 million on that construction site in Anaheim.
DisneylandDisneyland opened its doors to an invitation-only gala on July 17, 1955. Walt had invited 11,000 people -- press, celebrities, other dignitaries and their families -- to participate in the grand opening. And they came, all right. In fact, 28,154 actually showed up, owing to a large supply of counterfeit tickets. The VIPs included the California governor Goodwin Knight, Frank Sinatra, Sammy Davis, Jr., Jerry Lewis, Danny Thomas, and many others.To fully capitalize on the star-studded event, Walt paid for live, coast-to-coast television coverage. It cost $11 million to stage the inauguration, which required 29 cameras, 63 technicians, and some celebrity hosts which included movie star Ronald Reagan. The 90-minute program reached an estimated audience of 90 million. From a business standpoint, the park was intended to generate revenue year-round. That would take a lot of the pressure off the motion picture business. The movies required years of effort and huge capital outlays. Since each film was bigger and costlier than the last, they were effectively betting the farm again and again. Also, the park would provide a venue for cross-promotions. In fact, he exploited this opportunity right away. The centerpiece of his park was Sleeping Beauty Castle, named after the Disney animated film currently under production and slated for release in 1959. Not to mention all the merchandizing opportunities. But there was also another thing. For a control freak like Disney, the idea of constructing an amusement park from scratch must have been irresistible. There would be endless details to lord over. And the way he laid it out, with a tall berm encircling the property to block views of the surrounding city of Anaheim, Walt was creating nothing less than a world unto itself, stretching from one artificial horizon to the next. People loved Disneyland, of course. Families were piling into their cars and driving hundreds of miles just to visit the park they saw on television every week. After a couple of shaky years it became a massive financial success, just as Walt had gambled. Furthermore, Disneyland became a cultural icon. Even world leaders like Henry Kissinger were drawn to the place. Legend has it that during Kruschev's visit to the United States, his major disappointment was being denied from visiting the park. (The Secret Service were concerned that they couldn't guarantee his safety.)
Disneyland 2.0After ten years, Walt had become dissatisfied with his creation. For one thing, he loathed the crappy hotels and restaurants that surrounded the park. And the site was so confined... he wished that he had more room at his disposal -- a lot more -- to pursue new ideas.So in 1965, he secretly spent $5.5 million acquiring vast parcels in central Florida. Before the orange farmers realized what was happening, almost 28,000 acres had been bought up. At the same time, Walt was engaged in secret negotiations with the state government, in order to ensure complete autonomy. Only after everything was locked up did he reveal his plans to the public in a press conference.
"Here in Florida, we have something special we never enjoyed at Disneyland -- the blessing of size. There's enough land here to hold all the ideas and plans we can possibly imagine." The property was so immense that there were no neighbors to complain about loud fireworks or traffic snarls. Additionally, the state of Florida basically granted Walt carte blanche to do whatever he felt like. They even granted him the legal authority to construct and maintain both an airport and a nuclear powerplant at any time in the future. (This blanket preapproval has yet to be exercised.) But then, before he could get any further, Walt suddenly died of a heart attack in December 1966. Contrary to the urban legend, no segment of Disney's corpse was cryogenically preserved for future revivification. He was cremated and his ashes interred in the Freedom mausoleum at Forest Lawn cemetery in Glendale, California.
the cultIn the years following his death, Disneyphiles the world over continued to mourn the loss of such a great man. But he was more than a kindly figurehead. Walt was the driving force behind everything his company created. His had the guiding vision. He was a micro-manager who had the final say on everything. His loss left a huge, gaping void in the company's core.His pet projects, Disneyland and Walt Disney World, continued along bravely for quite some time without their founder's supervision. After all, they could work from a veritable wishing well of plans and ideas Disney already put in the pipeline. New attractions continued to open, and animated films released -- all of them derived in whole or in part from ideas Walt had personally shaped. But when they started pursuing Walt's less-developed ideas, things became horribly fucked-up. He wanted to establish an actual city in Florida -- EPCOT (the Experimental Prototype Community of Tomorrow). 20,000 people were going to live and work in an ultramodern, technophilic paradise free of cars, crime, and pollution. After the management realized how much money this thing was going to cost, they scaled it back to the point where it's now nothing more than a world's fair. Finally, in 1977, the well ran completely dry. Space Mountain opened in Tomorrowland, and that was the end. It was the last attraction for which Walt had provided any substantial input. Then the project teams coasted for a while, coming to grips with the reality that nobody was going to uncover a hidden filing cabinet stuffed with more of Walt's great ideas. They were forced to continue on without him. In an attempt to preserve the Disney legacy, whenever a design question came up, the Imagineers and animators asked one other "What would Walt have done?" They rarely agreed. And even after they reached consensus, the navel-gazing resumed when their proposals were reviewed by upper management. All critical decisions were made by committee, leaving the company in a position later characterized by one author as resembling "the Roman Catholic Church, but without a Pope." As Disney animator Ward Kimball explained it, "any organization that was built by one man, one man's tastes and choices, will have a tough time adjusting to the rule of the committee where decisions are split among a group of people." The inevitable product of this institutional hesitancy was creative stagnation. The Jungle Book, released in 1967, was the last movie Walt worked on. A string of mediocre films followed: The Aristocats, Bedknobs and Broomsticks, Robin Hood, Pete's Dragon. Rampant groupthink was strangling the creative process, and nobody had a clear idea of what could be done about it. Not even the park was immune. Walt's greatest legacy, Disneyland, slipped into maintenance mode for a long while. Part of the problem had to do with all the Walt-hugging preservationists. Anything the man touched had to be treated like an archeological relic. This sentiment was by no means isolated to the employees of the Walt Disney Company. Many fans took it upon themselves to argue on behalf of leaving the classic Disney attractions undisturbed. They would prefer to limit Disneyland development, in order to maintain the park as a shrine. Finally, almost 20 years after Walt's death, the company realized that they had to start making hard decisions or attendance would shrivel up. So beginning in the mid-1980s there has been a series of sweeping changes. As particular rides become stale and lose popularity, they are rethemed to draw attendance. Most of Tomorrowland was gutted and replaced in 1998. The Swiss Family Treehouse became Tarzan's Treehouse in 1999. In 2002, the Country Bear Playhouse was bulldozed to make room for a Winnie the Pooh ride. This stuff doesn't sit well with the committed Disney fanatics. Walt Disney Company chairman Michael Eisner experienced this firsthand in 1985 during an interview with a newspaper reporter:
"On the 30th anniversary night, I came down here with Frank [Wells] and the writer from the New York Times. And I was proudly telling about all the things we were doing at Disneyland, and I got to the George Lucas 'Star Wars' ride... 'We're going to put in this great Star Wars attraction with technology that has never been seen before. It's gonna be the attraction that's going to replace that dog, [Adventure Thru] Inner Space.' She said, 'How can you say "that dog?" That's the most brilliant attraction ever at Disney! Walt Disney himself designed it! How can you ruin Disney?' She then dragged me to go over on it. We rode it twice. She called me a monster." That's when Eisner realized that, to the fundamentalists, changing anything in the park was immoral. And changing anything that Disney himself had personally created bordered on blasphemy. The hardcore fans would like to see the place declared a national monument, to preserve what remains of Walt's original vision. In their view, the best thing would be if somehow the entire park could be hermetically sealed, stuck behind glass just like Walt's office down on Main Street.
Timeline
|


View method manipulation¶
Control via kwargs
¶
Quantipy’s main focus is to provide a flexible, yet easy-to-use interface to generate important MR-centric data aggregations in a bulk. View methods provide a means to group similar computations or calculation flows into cohesive units that respond dynamically to their inputs.
The key element that controls view method behaviour is the specification of
kwargs
(key word arguments)
that dictate the aggregation process. For example, kwargs
control if an
aggregation of simple cell counts is turned into percentages and if so if the
latter will become column or row percentages. This can be seen by comparing
the defintions of the kwarg
parameter between the three
QuantipyViews.known_views
'counts'
, 'c%'
and 'r%'
:
self.known_methods['counts'] = {
'method': 'frequency',
'kwargs': {
'text': ''
}
}
self.known_methods['c%'] = {
'method': 'frequency',
'kwargs': {
'text': '',
'rel_to': 'y'
}
}
self.known_methods['r%'] = {
'method': 'frequency',
'kwargs': {
'text': '',
'rel_to': 'x'
}
}
All three are using the frequency
view method but the 'rel_to'
parameter passed in the kwargs
dictionary differs between them.
Internally, it instructs the execution of Quantity.normalize()
, yielding
the required representation of the result. Keeping in mind that the decision
to show absolute or relative frequency applies to other count-based
aggregations like nets as well, it seems rather natural to unite similar
calculations and control their differences via such kwargs
.
There is a set of common 'kwargs'
that are used by all view methods
since they are needed for the general process flow. Inside a view method
they are provided by using View.std_params()
which is returning a tuple
of the following items:
kwarg |
controls | defaults to | accepts [1] |
|---|---|---|---|
'weights' |
weighted aggregation | None |
var. name as str |
'pos' |
orientation of the result | 'x' |
'x' |
'relation' |
tbd. | None |
tbd. |
'rel_to' |
normalization of results | None |
'x' , 'y' ,
None |
'text' |
label for aggregations | '' |
any 'str' |
Except for 'text'
, the values of these common kwargs
are reflected
in the view notation.
Using ViewMapper
templates¶
To speed up the manipulation of view methods and allow for flexible batch
processing of aggregations, the ViewMapper
class offers three tools:
make_template()
will cycle through a selection of kwargs parameter values (given as lists) that should apply to a view method.add_method()
is building on the template created, specifying the remainingkwargs
to create different versions of an aggregation procedure.subset()
can extract a selection of view methods defined viaadd_method()
, to allow reusing template definitions while discretely applying the method specifications to portions of the Stack.
For example, you can create a template for calculating net code aggregations
by specifying iterators
for 'rel_to'
becoming [None
, 'y'
] and
'weights'
[None
, 'weight_a'
] to generate weighted and unweighted
versions of count and column percentages of the net. Then, by adding the
method details, you define the codes that should feed into Top- and Bottom-
Boxes alongside their appropriate labels and apply different versions to
groups of variables with different scale point ranges.
Please see the following use cases on how to generate custom Views:
frequency
¶
specific kwargs
:
kwarg |
controls | defaults to | accepts |
|---|---|---|---|
'logic' |
new code group(s) construction | None |
list, list of dicts, quantipy logic exp. |
'calc' |
sum or difference calculation of groups | None |
dict defining a calculation |
'calc_only' |
isolated appearance of
'calc' result |
False |
boolean |
1: Generating a simple net code, only counts version
Generating a new template without any iterators
>>> nets = qp.ViewMapper()
>>> nets.make_template('frequency')
Using the 'logic'
kwarg
to set up the codes to group and passing
it into add_method()
>>> net_spec = {'logic': [1, 2]}
>>> nets.add_method(name='net1', kwargs=net_spec)
Adding the View
>>> stack.add_link(x='q8', y=['@', 'gender'], views=nets)
Results
>>> stack.describe(index='view', columns=['x', 'y'])
x q8
y @ gender
view
x|frequency|x[(1,2)]:y|||net1 1 1
>>> stack[my_data_key]['no_filter']['q8']['@']['x|frequency|x[(1,2)]:y|||net1']
Question q8
Values @
Question Values
q8 net1 1040
2: Simple net, counts and column percentages, weighted and unweighted
Defining a template with iterators for counts and percentages, both weighted and unweighted
>>> nets = qp.ViewMapper()
>>> iterator_spec = {'rel_to': [None, 'y'], 'weights': [None, 'weight_a']}
>>> nets.make_template('frequency', iterators=iterator_spec)
Specifiyng the net code and adding the View as done before
>>> net_spec = {'logic': [1, 2]}
>>> nets.add_method(name='net1', kwargs=net_spec)
>>> stack.add_link(x='q8', y=['@', 'gender'], views=nets)
Results
>>> stack.describe(index='view', columns=['x', 'y'])
x q8
y @ gender
view
x|frequency|x[(1,2)]:y|y|weight_a|net1 1 1
x|frequency|x[(1,2)]:y|y||net1 1 1
x|frequency|x[(1,2)]:y||weight_a|net1 1 1
x|frequency|x[(1,2)]:y|||net1 1 1
>>> stack[my_data_key]['no_filter']['q8']['gender']['x|frequency|x[(1,2)]:y|y|weight_a|net1']
Question gender
Values 1 2
Question Values
q8 net1 44.263136 42.433038
3: Setting up a template, adding different methods, applying subsets
Defining the iterators for the template
>>> nets = qp.ViewMapper()
>>> iterator_spec = {'rel_to': [None, 'y']}
>>> nets.make_template('frequency', iterators=iterator_spec)
First net: codes 1&2
>>> nets.add_method(name='net1', kwargs={'logic': [1, 2]})
Second net: codes 3&4
>>> nets.add_method(name='net2', kwargs={'logic': [4, 5]})
Third net: codes 1, 2, 3, 4, 5, 6
>>> nets.add_method(name='net3', kwargs={'logic': [1, 2, 3, 4, 5, 6]})
Using subset()
to apply only specific nets where appropriate
>>> stack.add_link(x=['q5_1', 'q5_2'], y=['@', 'gender'], views=nets.subset(['net1', 'net2']))
>>> stack.add_link(x=['q2'], y=['@', 'gender'], views=nets.subset(['net3']))
Results
>>> stack.describe(index='view', columns=['x', 'y'])
x q2 q5_1 q5_2
y @ gender @ gender @ gender
view
x|frequency|x[(1,2)]:y|y||net1 NaN NaN 1 1 1 1
x|frequency|x[(1,2)]:y|||net1 NaN NaN 1 1 1 1
x|frequency|x[(1,2,3,4,5,6)]:y|y||net3 1 1 NaN NaN NaN NaN
x|frequency|x[(1,2,3,4,5,6)]:y|||net3 1 1 NaN NaN NaN NaN
x|frequency|x[(4,5)]:y|y||net2 NaN NaN 1 1 1 1
x|frequency|x[(4,5)]:y|||net2 NaN NaN 1 1 1 1
>>> stack[my_data_key]['no_filter']['q2']['gender']['x|frequency|x[(1,2,3,4,5,6)]:y|y||net3']
Question gender
Values 1 2
Question Values
q2 net3 84.561892 79.308136
4: Multiple code groups, weighted and unweighted counts, column %, row %
Defining the iterator template
>>> groups = qp.ViewMapper()
>>> iterator_spec = {'rel_to': [None, 'y', 'x'], 'weights': [None, 'weight_a']}
>>> groups.make_template('frequency', iterators=iterator_spec)
Setup of code groups, definition of method, adding the Views
>>> multi_groups = [
... {'Unlikely': [1, 2, 3]},
... {'Likely': [4, 5]},
... {'Does not apply/Not answered': [97, 98]}
... ]
>>> groups.add_method(name='likeliness', kwargs={'logic': groups})
>>> x_vars = ['q5_' + str(subquestion) for subquestion in xrange(1,7)]
>>> x_vars
['q5_1', 'q5_2', 'q5_3', 'q5_4', 'q5_5', 'q5_6']
>>> stack.add_link(x=x_vars, y=['gender'], views=groups)
Results
>>> stack.describe(index='views')
view
x|frequency|x[(1,2,3),(4,5),(97,98)]:y|x|weight_a|likeliness 6
x|frequency|x[(1,2,3),(4,5),(97,98)]:y|x||likeliness 6
x|frequency|x[(1,2,3),(4,5),(97,98)]:y|y|weight_a|likeliness 6
x|frequency|x[(1,2,3),(4,5),(97,98)]:y|y||likeliness 6
x|frequency|x[(1,2,3),(4,5),(97,98)]:y||weight_a|likeliness 6
x|frequency|x[(1,2,3),(4,5),(97,98)]:y|||likeliness 6
>>> link = stack[my_data_key]['no_filter']['q5_1']['gender']
>>> link['x|frequency|x[(1,2,3),(4,5),(97,98)]:y|x||likeliness']
Question gender
Values 1 2
Question Values
q5_1 Unlikely 53.318765 46.681235
Likely 42.334361 57.665639
Does not apply/Not answered 45.095095 54.904905
>>> link['x|frequency|x[(1,2,3),(4,5),(97,98)]:y|y||likeliness']
Question gender
Values 1 2
Question Values
q5_1 Unlikely 49.392713 39.716477
Likely 27.808704 34.789682
Does not apply/Not answered 22.798583 25.493842
5: Multiple code groups with additional calculation on aggregates
Iterator template
>>> nps = qp.ViewMapper()
>>> iterator_spec = {'rel_to': [None, 'y']}
>>> groups.make_template('frequency', iterators=iterator_spec)
Code groups and calculation method definition
>>> from operator import sub
>>> nps_groups = [
... {'Promoters': [9, 10]},
... {'Passives': [6, 7, 8]},
... {'Detractors': [1, 2, 3, 4, 5]}
... ]
... nps_score = {'NPS': (sub, ['Promoters', 'Detractors'])}
>>> method_spec_full = {'logic': nps_groups, 'calc': nps_score}
>>> method_spec_score = {'logic': nps_groups, 'calc': nps_score, 'calc_only': True}
>>> nps.add_method(name='nps_full', kwargs=method_spec_full)
>>> nps.add_method(name='nps_score', kwargs=method_spec_score)
>>> stack.add_link(x='q6_1', y='gender', views=nps)
Results
>>> stack.describe(index='view')
view
x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|y||nps_full 1
x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|y||nps_score 1
x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|||nps_full 1
x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|||nps_score 1
>>> link = stack[my_data_key]['no_filter']['q6_1']['gender']
>>> link['x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|y||nps_full']
Question gender
Values 1 2
Question Values
q6_1 Promoters 10.298583 10.969091
Passives 3.441296 3.137346
Detractors 86.260121 85.893563
NPS -75.961538 -74.924471
>>> link['x|frequency|x[(9,10),(6,7,8),(1,2,3,4,5)]:y|y||nps_score']
Question gender
Values 1 2
Question Values
q6_1 NPS -75.961538 -74.924471
descriptives
¶
specific kwargs
:
kwarg |
controls | defaults to | accepts |
|---|---|---|---|
'stats' |
the measure to compute | 'mean' |
valid str [2] |
'exclude' |
exclusion of codes/values | None |
list of float or
int |
'rescale' |
replacement of scale point factors | None |
dict mapping old to new codes |
1: Generating means, variance and standard deviation using iterators
Setting up the template iterators
>>> stats = qp.ViewMapper()
>>> iterator_spec = {'stats': ['mean', 'var', 'stddev']}
>>> stats.make_template('descriptives', iterators=iterator_spec)
Adding a method and adding the Views to the Stack (numeric x-axis)
>>> stats.add_method(name='stats')
>>> stack.add_link(x='age', y='gender', views=stats)
Results
>>> stack.describe(index='view', columns=['x', 'y'])
x age
y gender
view
x|mean|x:y|||stats 1
x|stddev|x:y|||stats 1
x|var|x:y|||stats 1
>>> stack[my_data_key]['no_filter']['age']['gender']['x|mean|x:y|||stats']
Question gender
Values 1 2
Question Values
age mean 33.97748 33.840576
>>> stack[my_data_key]['no_filter']['age']['gender']['x|var|x:y|||stats']
Question gender
Values 1 2
Question Values
age var 78.745886 81.08104
>>> stack[my_data_key]['no_filter']['age']['gender']['x|stddev|x:y|||stats']
Question gender
Values 1 2
Question Values
age stddev 8.873888 9.004501
2: Exluding cases with age above 20
Setting up the template iterators as done before
>>> stats = qp.ViewMapper()
>>> iterator_spec = {'stats': ['mean', 'var', 'stddev']}
>>> stats.make_template('descriptives', iterators=iterator_spec)
Preparing the list of code values to exclude and passing the 'exclude'
kwarg
to add_method())
>>> exclude_age = list(xrange(21, 110))
>>> stats_spec = {'exclude': exclude_age}
>>> stats.add_method(name='up_to_20', kwargs=stats_spec)
Results
>>> stack.describe(index='view', columns=['x', 'y'])
x age
y gender
view
x|mean|x:y|||up_to_20 1
x|stddev|x:y|||up_to_20 1
x|var|x:y|||up_to_20 1
>>> stack[my_data_key]['no_filter']['age']['gender']['x|mean|x:y|||up_to_20']
Question gender
Values 1 2
Question Values
age mean 19.504274 19.552083
>>> stack[my_data_key]['no_filter']['age']['gender']['x|var|x:y|||up_to_20']
Question gender
Values 1 2
Question Values
age var 0.251055 0.248149
>>> stack[my_data_key]['no_filter']['age']['gender']['x|stddev|x:y|||up_to_20']
Question gender
Values 1 2
Question Values
age stddev 0.501054 0.498146
3: Generating means and median, weighted and unweighted
Iterator definition
>>> stats = qp.ViewMapper()
>>> iterator_spec = {'stats': ['mean', 'median'], 'weights': [None, weight_a]}
>>> stats.make_template('descriptives', iterators=iterator_spec)
Method creation and adding View: code exclusion and rescaling 1-5 to 0-100 (categorical x-axis, metadata file assumed)
>>> met_def = {
... 'text': 'excl. 97, 98'
... 'exclude': [97, 98],
... 'rescale': {1: 0, 2: 25, 3: 50, 4:75, 5:100}
... }
>>> stats.add_method('means_medians', kwargs=met_def)
>>> x_vars = ['q5_' + str(subquestion) for subquestion in xrange(1,7)]
>>> x_vars
['q5_1', 'q5_2', 'q5_3', 'q5_4', 'q5_5', 'q5_6']
>>> stack.add_link(x=x_vars, y='locality', views=stats)
Results
>>> stack.describe(index='views')
view
x|mean|x[0,25,50,75,100]:y||weight_a|means_medians 6
x|mean|x[0,25,50,75,100]:y|||means_medians 6
x|median|x[0,25,50,75,100]:y||weight_a|means_medians 6
x|median|x[0,25,50,75,100]:y|||means_medians 6
>>> link = stack[my_data_key]['no_filter']['q5_1']['locality']
>>> link['x|mean|x[0,25,50,75,100]:y||weight_a|means_medians']
Question locality
Values 1 2 3 4 5
Question Values
q5_1 mean 63.601247 65.408707 62.950265 64.700972 65.006439
>>> link['x|mean|x[0,25,50,75,100]:y||weight_a|means_medians'].meta()['agg']['text']
Mean excl. 97, 98
>>> link['x|median|x[0,25,50,75,100]:y||weight_a|means_medians']
Question locality
Values 1 2 3 4 5
Question Values
q5_1 median 50 50 50 50 50
>>> link['x|median|x[0,25,50,75,100]:y||weight_a|means_medians'].meta()['agg']['text']
Median excl. 97, 98
Footnotes
| [1] | Please note: Currently, Quantipy can compute aggregations which are
applied to the x-axis of Link (xpos being 'x' , except for the
preset``rbase``). The rel_to parameter only applies to the
frequency() method for now. A future goal is to implement a full
broadcasting-like concept that is able to apply aggregations on the
y-axis of a Link as well, e.g. net codes that summarize column codes. |
| [2] | Supported: 'mean' , 'median' , 'var' , 'stddev' ,
'varcoeff' , 'sem' , 'max' , 'min' |


Wolves and Sheep: Crazy Transformation
The favorite of the pack, the young and carefree wolf Gray doesn’t know that he will soon be a stranger among his friends. Claiming the role of the leader of the pack and the hand (or rather, the paw) and the heart of the most beautiful wolf Bianchi, Gray continues to fool around and arrange pranks over her relatives. Everything turns upside down when he decides to change himself with a magic potion. A miracle really happens: Gray turns into a ram! Fearing for his own, now sheep, skin, Gray escapes from the wolves and settles in the village of sheep.
Now Gray is to not only regain the trust of his beloved and the flock, but also his former appearance. But how to do it, if you have only three days, and even horns and hooves?


Package algorithms.imageProcessing.util
Class RANSACAlgorithmIterations
- java.lang.Object
-
- algorithms.imageProcessing.util.RANSACAlgorithmIterations
-
public class RANSACAlgorithmIterations extends java.lang.Object
estimates the number of iterations for a RANSAC type algorithm that should be used to ensure with 99% certainty or other that a set of points is findable as a subset of n matchable points.nPoints is the number of points that contain true and false matches. nTruePoints is the number of true matches within nPoints. k is the number of points to draw at one time for a RANSAC sample test iteration. nCombinations is the number of combinations of samples of size k is nPoints!/(k!*(nPoints-k)!). For a sample, the first draw of a matching point out of nPoints has possibility of being all 'true' points = (nTruePoints/nPoints). For the same sample, the second draw in the sample has the possibility of being all 'true' points = (nTruePoints - 1)/(nPoints - 1). etc. The possibility that the sample is composed of all 'true' points is then (nTruePoints/nPoints) * ((nTruePoints - 1)/(nPoints - 1)) * ((nTruePoints - 2)/(nPoints - 2)) ... ((nTruePoints - k - 1)/(nPoints - k - 1)) The total number of 'true' samples within all possible combinations of size k from nPoints is then nCombinations * ((nTruePoints/nPoints)*(nTruePoints - 1)/(nPoints - 1)...((nTruePoints - k-1)/(nPoints - k-1)) (this is verified in algorithms.stats.ransac.CountingTest) The fraction of all 'true' samples, that is the number of samples composed of all 'true' points divided by number of all possible samples, is then just the possibility that a sample is all 'true', that is ((nTruePoints/nPoints)*(nTruePoints - 1)/(nPoints - 1)...((nTruePoints - k-1)/(nPoints - k-1)) let pSample be the fraction just calculated. knowing pSample for a sample now, need to calculate the number of samples that need to be drawn in order to have a high confidence that at least one sample was a true sample. Naively, that would be the inverse of pSample. Now that have the statistics in a form of 2 states, can use binomial statistics, the binomial theorem, to determine the number of fails before the first success (sample is 'true'). This is similar to a Geometric distribution when simplified below. m = the number of success trials which is the minimum here, '1' nIter is the number of iterations needed P(m|pSample,nIter) = pSample^m * (1 - pSample)^(nIter-m) * nCombinations = pSample * (1 - pSample)^(nIter-1) * nCombinations = pSample * nCombinations * (1 - pSample)^(nIter-1) having defined m = 1 and knowing pSample represents the number of true samples divided by nCombinations, can simplify pSample * nCombinations as '1' P(m|pSample,nIter) = (1 - pSample)^(nIter-1) P(m|pSample,nIter) is 1 - Pconfidence where Pconfidence used here will be 0.99 Then solving for nIter: math.log(1. - Pconfid) = (nIter-1) * math.log(1. - pSample) then nIter = (math.log(1. - Pconfid) / math.log(1. - pSample)) + 1
- Author:
- nichole
-
-
Constructor Summary
Constructors Constructor Description RANSACAlgorithmIterations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
numberOfSubsamplesFor95PercentInliers(int outlierPercent, int subSampleSize)
static int
numberOfSubsamplesOfSize7For95PercentInliers(int outlierPercent)
-


Admin
Portal
Admin
Dashboard
Merchants
Stores
Vouchers & Coupons
Promotions
Events
Users
Ongoing Jobs
200
Add New User
First Name
Last Name
Birthday
Day
- Select Day -
Indonesia
Month
- Select Month -
Indonesia
Year
- Select Year -
Indonesia
Contact Info
Street
Country
- Select Country
Indonesia
State/Province
- Select State/Province -
Bali
City
- Select City
Indonesia
Postal Code
Phone Number
Mobile Number
Email Address
Datepicker
Flatpickr
Input Masking
Currency/Money


Package org.drip.measure.gamma
Class R1ShapeScaleDistribution
- java.lang.Object
-
- org.drip.measure.continuous.R1Univariate
-
- org.drip.measure.gamma.R1ShapeScaleDistribution
-
- Direct Known Subclasses:
ErlangDistribution
,ExponentialDistribution
,MaxwellBoltzmannSquaredDistribution
,R1ShapeScaleDiscrete
public class R1ShapeScaleDistribution extends R1Univariate
R1ShapeScaleDistribution implements the Shape and Scale Parameterization of the R1 Gamma Distribution. The References are:
- Devroye, L. (1986): Non-Uniform Random Variate Generation Springer-Verlag New York
- Gamma Distribution (2019): Gamma Distribution https://en.wikipedia.org/wiki/Chi-squared_distribution
- Louzada, F., P. L. Ramos, and E. Ramos (2019): A Note on Bias of Closed-Form Estimators for the Gamma Distribution Derived From Likelihood Equations The American Statistician 73 (2) 195-199
- Minka, T. (2002): Estimating a Gamma distribution https://tminka.github.io/papers/minka-gamma.pdf
- Ye, Z. S., and N. Chen (2017): Closed-Form Estimators for the Gamma Distribution Derived from Likelihood Equations The American Statistician 71 (2) 177-181
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd Continuous/Discrete Probability Measures
- Package = R1 Gamma Distribution Implementation/Properties
- Author:
- Lakshmi Krishnamurthy
-
-
Constructor Summary
Constructors Constructor Description R1ShapeScaleDistribution(ShapeScaleParameters shapeScaleParameters, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
R1ShapeScaleDistribution Constructor
-
Method Summary
Modifier and Type Method Description double
bannehekeEkayanakeMedianApproximation()
Compute the Banneheke-Ekayanake Approximation for the Median when k gte 1double
chenRubinMedianLowerBound()
Compute the Chen-Rubin Median Lower Bounddouble
chenRubinMedianUpperBound()
Compute the Chen-Rubin Median Upper BoundR1UnivariateNormal
cltProxy()
Retrieve the Central Limit Theorem Equivalent Normal Distribution Proxydouble
cumulative(double t)
Compute the cumulative under the distribution to the given valuedouble
density(double t)
Compute the Density under the Distribution at the given Variatedouble
differentialEntropy()
Retrieve the Differential Entropy of the DistributionR1ToR1
digammaEstimator()
Retrieve the Digamma Estimatordouble
excessKurtosis()
Retrieve the Excess Kurtosis of the DistributionExponentialFamilyRepresentation
exponentialFamilyRepresentation(double x)
Generate the Exponential Family RepresentationR1ToR1
gammaEstimator()
Retrieve the Gamma Estimatordouble
laplacian(double s)
Compute the Laplaciandouble
logarithmicExpectation()
Compute the Logarithmic ExpectationR2ToR1
lowerIncompleteGammaEstimator()
Retrieve the Lower Incomplete Gamma Estimatordouble
mean()
Retrieve the Mean of the Distributiondouble
mode()
Retrieve the Mode of the DistributionR1ToR1
momentGeneratingFunction()
Construct the Moment Generating Functiondouble[]
naturalParameters()
Retrieve the Array of Natural Parametersdouble[]
naturalStatistics(double x)
Retrieve the Array of Natural Statisticsdouble
ramanujanChoiMedianApproximation()
Compute the Ramanujan-Choi Approximation for the Mediandouble
randomAhrensDieter1982()
Generate a Random Variable using the Ahrens-Dieter (1982) Schemedouble
randomMarsaglia1977()
Generate a Random Variable using the Marsaglia (1977) SchemeR1ShapeScaleDistribution
scale(double scaleFactor)
Generate a Scaled Gamma Distributionstatic R1ShapeScaleDistribution
ShapeRate(double shapeParameter, double rateParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Construct a Gamma Distribution from Shape and Rate ParametersShapeScaleParameters
shapeScaleParameters()
Retrieve the Shape-Scale Parametersstatic R1ShapeScaleDistribution
ShapeSummation(double[] shapeParameterArray, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Shape Summation Based ShapeScaleDistributiondouble
skewness()
Retrieve the Skewness of the Distributionstatic R1ShapeScaleDistribution
Standard(double shapeParameter, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Construct the Standard R1ShapeScaleDistribution Instancedouble[]
support()
Lay out the Support of the PDF Rangedouble
variance()
Retrieve the Variance of the Distribution-
Methods inherited from class org.drip.measure.continuous.R1Univariate
histogram, incremental, invCumulative, median, populationCentralMeasures, probabilityGeneratingFunction, random, randomArray, supported
-
-
-
-
Constructor Detail
-
R1ShapeScaleDistribution
public R1ShapeScaleDistribution(ShapeScaleParameters shapeScaleParameters, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator) throws java.lang.Exception
R1ShapeScaleDistribution Constructor- Parameters:
shapeScaleParameters
- Shape-Scale ParametersgammaEstimator
- Gamma EstimatordigammaEstimator
- Digamma EstimatorlowerIncompleteGammaEstimator
- Lower Incomplete Gamma Estimator- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Detail
-
ShapeRate
public static final R1ShapeScaleDistribution ShapeRate(double shapeParameter, double rateParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Construct a Gamma Distribution from Shape and Rate Parameters- Parameters:
shapeParameter
- Shape ParameterrateParameter
- Rate ParametergammaEstimator
- Gamma EstimatordigammaEstimator
- Digamma EstimatorlowerIncompleteGammaEstimator
- Lower Incomplete Gamma Estimator- Returns:
- Gamma Distribution from Shape Alpha and Rate Beta Parameters
-
ShapeSummation
public static final R1ShapeScaleDistribution ShapeSummation(double[] shapeParameterArray, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Shape Summation Based ShapeScaleDistribution- Parameters:
shapeParameterArray
- Shape Parameter ArrayscaleParameter
- Scale ParametergammaEstimator
- Gamma EstimatordigammaEstimator
- Digamma EstimatorlowerIncompleteGammaEstimator
- Lower Incomplete Gamma Estimator- Returns:
- Shape Summation Based ShapeScaleDistribution
-
Standard
public static final R1ShapeScaleDistribution Standard(double shapeParameter, double scaleParameter, R1ToR1 gammaEstimator, R1ToR1 digammaEstimator, R2ToR1 lowerIncompleteGammaEstimator)
Construct the Standard R1ShapeScaleDistribution Instance- Parameters:
shapeParameter
- Shape ParameterscaleParameter
- Scale ParametergammaEstimator
- Gamma EstimatordigammaEstimator
- Digamma EstimatorlowerIncompleteGammaEstimator
- Lower Incomplete Gamma Estimator- Returns:
- The R1ShapeScaleDistribution Instance
-
shapeScaleParameters
public ShapeScaleParameters shapeScaleParameters()
Retrieve the Shape-Scale Parameters- Returns:
- The Shape-Scale Parameters
-
gammaEstimator
public R1ToR1 gammaEstimator()
Retrieve the Gamma Estimator- Returns:
- Gamma Estimator
-
digammaEstimator
public R1ToR1 digammaEstimator()
Retrieve the Digamma Estimator- Returns:
- Digamma Estimator
-
lowerIncompleteGammaEstimator
public R2ToR1 lowerIncompleteGammaEstimator()
Retrieve the Lower Incomplete Gamma Estimator- Returns:
- Lower Incomplete Gamma Estimator
-
support
public double[] support()
Description copied from class:R1Univariate
Lay out the Support of the PDF Range- Specified by:
support
in classR1Univariate
- Returns:
- Support of the PDF Range
-
density
public double density(double t) throws java.lang.Exception
Description copied from class:R1Univariate
Compute the Density under the Distribution at the given Variate- Specified by:
density
in classR1Univariate
- Parameters:
t
- Variate at which the Density needs to be computed- Returns:
- The Density
- Throws:
java.lang.Exception
- Thrown if the input is invalid
-
cumulative
public double cumulative(double t) throws java.lang.Exception
Description copied from class:R1Univariate
Compute the cumulative under the distribution to the given value- Specified by:
cumulative
in classR1Univariate
- Parameters:
t
- Variate to which the cumulative is to be computed- Returns:
- The cumulative
- Throws:
java.lang.Exception
- Thrown if the inputs are invalid
-
mean
public double mean() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Mean of the Distribution- Specified by:
mean
in classR1Univariate
- Returns:
- The Mean of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Mean cannot be estimated
-
mode
public double mode() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Mode of the Distribution- Overrides:
mode
in classR1Univariate
- Returns:
- The Mode of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Mode cannot be estimated
-
variance
public double variance() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Variance of the Distribution- Specified by:
variance
in classR1Univariate
- Returns:
- The Variance of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Variance cannot be estimated
-
skewness
public double skewness() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Skewness of the Distribution- Overrides:
skewness
in classR1Univariate
- Returns:
- The Skewness of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Skewness cannot be estimated
-
excessKurtosis
public double excessKurtosis() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Excess Kurtosis of the Distribution- Overrides:
excessKurtosis
in classR1Univariate
- Returns:
- The Excess Kurtosis of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Skewness cannot be estimated
-
differentialEntropy
public double differentialEntropy() throws java.lang.Exception
Description copied from class:R1Univariate
Retrieve the Differential Entropy of the Distribution- Overrides:
differentialEntropy
in classR1Univariate
- Returns:
- The Differential Entropy of the Distribution
- Throws:
java.lang.Exception
- Thrown if the Entropy cannot be estimated
-
momentGeneratingFunction
public R1ToR1 momentGeneratingFunction()
Description copied from class:R1Univariate
Construct the Moment Generating Function- Overrides:
momentGeneratingFunction
in classR1Univariate
- Returns:
- The Moment Generating Function
-
cltProxy
public R1UnivariateNormal cltProxy()
Retrieve the Central Limit Theorem Equivalent Normal Distribution Proxy- Returns:
- The Central Limit Theorem Equivalent Normal Distribution Proxy
-
logarithmicExpectation
public double logarithmicExpectation() throws java.lang.Exception
Compute the Logarithmic Expectation- Returns:
- The Logarithmic Expectation
- Throws:
java.lang.Exception
- Thrown if the Logarithmic Expectation cannot be computed
-
bannehekeEkayanakeMedianApproximation
public double bannehekeEkayanakeMedianApproximation() throws java.lang.Exception
Compute the Banneheke-Ekayanake Approximation for the Median when k gte 1- Returns:
- The Banneheke-Ekayanake Approximation for the Median
- Throws:
java.lang.Exception
- Thrown if the Median cannot be computed
-
ramanujanChoiMedianApproximation
public double ramanujanChoiMedianApproximation()
Compute the Ramanujan-Choi Approximation for the Median- Returns:
- The Ramanujan-Choi Approximation for the Median
-
chenRubinMedianLowerBound
public double chenRubinMedianLowerBound()
Compute the Chen-Rubin Median Lower Bound- Returns:
- The Chen-Rubin Median Lower Bound
-
chenRubinMedianUpperBound
public double chenRubinMedianUpperBound()
Compute the Chen-Rubin Median Upper Bound- Returns:
- The Chen-Rubin Median Upper Bound
-
scale
public R1ShapeScaleDistribution scale(double scaleFactor)
Generate a Scaled Gamma Distribution- Parameters:
scaleFactor
- The Gamma Distribution Scale Factor- Returns:
- Scaled Gamma Distribution
-
naturalParameters
public double[] naturalParameters()
Retrieve the Array of Natural Parameters- Returns:
- Array of Natural Parameters
-
naturalStatistics
public double[] naturalStatistics(double x)
Retrieve the Array of Natural Statistics- Parameters:
x
- X- Returns:
- Array of Natural Statistics
-
exponentialFamilyRepresentation
public ExponentialFamilyRepresentation exponentialFamilyRepresentation(double x)
Generate the Exponential Family Representation- Parameters:
x
- X- Returns:
- Exponential Family Representation
-
laplacian
public double laplacian(double s) throws java.lang.Exception
Compute the Laplacian- Parameters:
s
- S- Returns:
- The Laplacian
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
randomAhrensDieter1982
public double randomAhrensDieter1982() throws java.lang.Exception
Generate a Random Variable using the Ahrens-Dieter (1982) Scheme- Returns:
- Random Variable using the Ahrens-Dieter (1982) Scheme
- Throws:
java.lang.Exception
- Thrown if the Random Instance cannot be estimated
-
randomMarsaglia1977
public double randomMarsaglia1977() throws java.lang.Exception
Generate a Random Variable using the Marsaglia (1977) Scheme- Returns:
- Random Variable using the Marsaglia (1977) Scheme
- Throws:
java.lang.Exception
- Thrown if the Random Instance cannot be estimated
-
-


About
Kimmie is a visual designer and artist based in New York City, NY.
Her father—a South Vietnamese fighter pilot—emigrated to America, and by stroke of luck ran into her mother in a refugee camp. Sometime in the 90s, he taught Kimmie her ABCs on a machine running DOS. Her mother taught Kimmie to draw mermaids to keep her from rearranging the furniture. She was only trying to optimize the flow of the room befor better TV-viewing!
In 2004, Kimmie took a Journalism class and learned how to thumbnail newspaper layouts. It was a match made in Pagemaker.
Her teacher insisted on the following:
"Design! Don't Decorate!"
This has worked out OK—except Fall 2008, when she made her first site-specific art installation.


Expense Category Admin
Current Expense Types
Action
Organization
Expense Category
Used By
Action
Organization
Expense Category
Used By
Organization xyz, inc
Labor
56
Organization xyz, inc
Food
23
Organization xyz, inc
Material
123
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


Library: Foundation
Package: Streams
Header: Poco/UnbufferedStreamBuf.h
Description
This is an implementation of an unbuffered streambuf that greatly simplifies the implementation of custom streambufs of various kinds. Derived classes only have to override the methods readFromDevice() or writeToDevice().
Inheritance
Direct Base Classes: std::basic_streambuf < ch, tr >
All Base Classes: std::basic_streambuf < ch, tr >
Member Summary
Member Functions: charToInt, overflow, pbackfail, uflow, underflow, xsgetn
Types
Base
typedef std::basic_streambuf < ch, tr > Base;
IOS
typedef std::basic_ios < ch, tr > IOS;
char_traits
typedef tr char_traits;
char_type
typedef ch char_type;
int_type
typedef typename Base::int_type int_type;
off_type
typedef typename Base::off_type off_type;
openmode
typedef typename IOS::openmode openmode;
pos_type
typedef typename Base::pos_type pos_type;
Constructors
BasicUnbufferedStreamBuf
Destructor
~BasicUnbufferedStreamBuf
Member Functions
overflow
virtual int_type overflow(
int_type c
);
pbackfail
virtual int_type pbackfail(
int_type c
);
uflow
virtual int_type uflow();
underflow
virtual int_type underflow();
xsgetn
virtual std::streamsize xsgetn(
char_type * p,
std::streamsize count
);
Some platforms (for example, Compaq C++) have buggy implementations of xsgetn that handle null buffers incorrectly. Anyway, it does not hurt to provide an optimized implementation of xsgetn for this streambuf implementation.
charToInt
static int_type charToInt(
char_type c
);


- MAX - us.ihmc.euclid.geometry.tools.EuclidGeometryPolygonTools.Bound
-
Refers to higher values, i.e.
- maxPoint - Variable in class us.ihmc.euclid.geometry.BoundingBox2D
-
The maximum coordinates of this bounding box.
- maxPoint - Variable in class us.ihmc.euclid.geometry.BoundingBox3D
-
The maximum coordinates of this bounding box.
- methodHasAtLeastNFrameArguments(Method, int) - Static method in class us.ihmc.euclid.referenceFrame.tools.EuclidFrameAPITestTools
-
- methodHasAtLeastNFramelessArguments(Method, int) - Static method in class us.ihmc.euclid.referenceFrame.tools.EuclidFrameAPITestTools
-
- midpoint() - Method in interface us.ihmc.euclid.geometry.interfaces.LineSegment2DReadOnly
-
Computes and returns the coordinates of the point located exactly at the middle of this line
segment.
- midpoint() - Method in interface us.ihmc.euclid.geometry.interfaces.LineSegment3DReadOnly
-
Computes and returns the coordinates of the point located exactly at the middle of this line
segment.
- midpoint() - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment2DReadOnly
-
Computes and returns the coordinates of the point located exactly at the middle of this line
segment.
- midpoint() - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment3DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(FixedFramePoint2DBasics) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment2DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(FixedFramePoint3DBasics) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment3DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(FramePoint2DBasics) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment2DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(FramePoint3DBasics) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FrameLineSegment3DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(Point2DBasics) - Method in interface us.ihmc.euclid.geometry.interfaces.LineSegment2DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- midpoint(Point3DBasics) - Method in interface us.ihmc.euclid.geometry.interfaces.LineSegment3DReadOnly
-
Computes the coordinates of the point located exactly at the middle of this line segment.
- MIN - us.ihmc.euclid.geometry.tools.EuclidGeometryPolygonTools.Bound
-
Refers to lower values, i.e.
- MIN_INNER_RADIUS - Static variable in class us.ihmc.euclid.geometry.Torus3D
-
The minimum allowable value for the major radius.
- MIN_TUBE_RADIUS - Static variable in class us.ihmc.euclid.geometry.Torus3D
-
The minimum allowable value for the radius of the tube.
- minAllowableVectorPart - Static variable in class us.ihmc.euclid.geometry.Plane3D
-
- minPoint - Variable in class us.ihmc.euclid.geometry.BoundingBox2D
-
The minimum coordinates of this bounding box.
- minPoint - Variable in class us.ihmc.euclid.geometry.BoundingBox3D
-
The minimum coordinates of this bounding box.
- moveElementToEnd(List<T>, int, int) - Static method in class us.ihmc.euclid.geometry.tools.EuclidGeometryPolygonTools
-
Moves the element located at indexOfElementToShift
to listSize - 1
and shifts
all the elements located in [indexToRemove + 1
; listSize - 1
] by -1
.
- multiply(FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Multiplies this frame quaternion by other
.
- multiply(FrameQuaternionReadOnly, FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Sets this frame quaternion to the multiplication of q1
and q2
.
- multiply(FrameQuaternionReadOnly, QuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Sets this frame quaternion to the multiplication of q1
and q2
.
- multiply(QuaternionReadOnly, FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Sets this frame quaternion to the multiplication of q1
and q2
.
- multiplyConjugateBoth(FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Sets this frame quaternion to the multiplication of the conjugate of this
and the
conjugate of other
.
- multiplyConjugateOther(FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Multiplies this frame quaternion by the conjugate of other
.
- multiplyConjugateThis(FrameQuaternionReadOnly) - Method in interface us.ihmc.euclid.referenceFrame.interfaces.FixedFrameQuaternionBasics
-
Sets this frame quaternion to the multiplication of the conjugate of this
and
other
.
- mutableFrameMutableTypes - Static variable in class us.ihmc.euclid.referenceFrame.tools.EuclidFrameAPITestTools
-


My life has gone up in down like everyone elses, but I will get up and try until I succeeded I won't let you down. I think differently than other regular people... I'm different.
Contact Me
Previous jobs
Lifeguard - Williston Park Pool Summer 2017 - Present
Saved people's life
Garbage man-
I take my neighbor's garbage cans to their back yard
designer-
I designed the 114 room in the mineola high school and i designed a few rooms for my parents friends
Mechanic -
I fixed my Dads car a few years ago
i'm a personal tow truck - i pushed my Dad's car 11 blocks up hill to a autobody shop
Mover-
I help people move from house to house like my parents friends i helped like 3 people move
Carpenter-
In my basement i painted a wall i did the title layer and i put carpet down on the titie
awards/achievements
All academic all conference nassau county
7 grade Lacrosse strive for excellence
7 grade basketball strive for excellence
8 grade basketball strive for excellence
8 grade wrestling strive for excellence
10 grade football strive for excellence
Skills
-Good at being active
-Fun
-Athletic
-Making people smile
-Can make websites
Activities
-Lacrosse
-Golf
-Basketball
-Football
Volunteer work
-Volunteering makes me feel good and they usually have food to give you
-To clean the swamp around the williston park swamp
-Shovel my neighbors driveways and sidewalks
Volunter work
-Volunteering makes me feel good and they usually have food to give you
-To clean the swamp around the williston park swamp
-Shovel my neighbors driveways and sidewalks


Fond of creating web application designs and bringing them to life using code.
Hi again, Emmanuel is a Hard-working student studying Electrical/Electronics Engineering with passion for technology and finance, who wants to make his society a more comfortable and connected place. He thrives in a fast-paced environment that springs up challenges and provides opportunity for growth. He has spent the last year self-learning about Web Development and is eager to put to work the skills learned and as well grow with structure and guidance. Tutors, trades the forex market or plays video games in his spare time.
Emmanuel is result oriented and goal-driven, a team player who loves to share ideas with great like minds.
With experience using HTML, CSS, JavaScript and React; Emmanuel is hoping to be able to contribute to team success and thereby grow as a developer and an all round Individual.
Thanks to HNGI8XI4G for the opportunity to work with and learn from some of the most talented Individuals around.
HTML5
Used HTML5 extensively in structuring and delivering web content with proper understanding of the markup language and an eye for best practices.
CSS3
Used CSS3 extensively in styling and delivering web content with proper understanding of design elements and an eye for best practices.
Bootstrap
Used Bootstrap CSS framework to further create responsive, mobile-first User Interfaces. Makes styling easier and so much faster.
JavaScript
Used JavaScript in interacting with and delivering web content. With an eye for best practices and a nack for clean and efficient code.
React
Dabbled with React in recent months and hope to do more with it in the future. A go to for creating Dynamic and efficient UI.
Git Version Control
Used Git software to keep track of changes files, and coordinate work with fellow programmers collaboratively developing source code.
Recruitment Agency that essentially exists to help companies fill their vacancies – and to help you find a job.
we approach every candidate holistically, with best-in-class expertise in data, creativity, media, technology, search, social and more. we call this alchemy. It has power to build our clients brands and transform their business. And while it may seem like magic, we've got it down to a science.
We know that greatness in a disruptive era requires bold ambition, curious talent and a culture that believes we're smarter together.
We know that greatness in a disruptive era requires bold ambition, curious talent and a culture that believes we're smarter together.
we approach every challenge holistically, with best-in-class expertise in data, creativity, media, technology, search, social and more. we call this alchemy. It has power to build our clients brands and transform their business. And while it may seem like magic, we've got it down to a science.


Tonight's meetup is kindly sponsored by:
“Festival package travel startup. 50+ staff, high pay, ping pong + beer.”
The trusted global platform that inspires and enables people to experience the best of the city. Operating in 107 cities, across 39 countries, it has an average monthly global audience reach of over 111 million across all platforms.
Website: https://djangolondon.com
Github: https://github.com/djangolondon/


{% extends 'base.html' %} {% load crispy_forms_tags %} {% block title %} Password Change{% endblock title %} {% block body %}
Please enter your old password for authentication.
Enter your new password twice to confirm


Semantic segmentation of videos with PixelLib using Ade20k model¶
PixelLib is implemented with Deeplabv3+ framework to perform semantic segmentation. Xception model trained on ade20k dataset is used for semantic segmentation.
Download the xception model from here.
Code to implement semantic segmentation of a video with ade20k model:
import pixellib
from pixellib.semantic import semantic_segmentation
segment_video = semantic_segmentation()
segment_video.load_ade20k_model("deeplabv3_xception65_ade20k.h5")
segment_video.process_video_ade20k("video_path", frames_per_second= 15, output_video_name="path_to_output_video")
We shall take a look into each line of code.
import pixellib
from pixellib.semantic import semantic_segmentation
#created an instance of semantic segmentation class
segment_image = semantic_segmentation()
The class for performing semantic segmentation is imported from pixellib and we created an instance of the class.
segment_video.load_ade20k_model("deeplabv3_xception65_ade20k.h5")
We called the function to load the xception model trained on ade20k.
segment_video.process_video_ade20k("video_path", frames_per_second= 15, output_video_name="path_to_output_video")
This is the line of code that performs segmentation on an image and the segmentation is done in the ade20k’s color format. This function takes in two parameters:
video_path: the path to the video file we want to perform segmentation on.
frames_per_second: this is parameter to set the number of frames per second for the output video file. In this case it is set to 15 i.e the saved video file will have 15 frames per second.
output_video_name: the saved segmented video. The output video will be saved in your current working directory.
sample_video
import pixellib
from pixellib.semantic import semantic_segmentation
segment_video = semantic_segmentation()
segment_video.load_ade20k_model("deeplabv3_xception65_ade20k.h5")
segment_video.process_video_ade20k("sample_video.mp4", overlay = True, frames_per_second= 15, output_video_name="output_video.mp4")
Output video
Segmentation of live camera with Ade20k model¶
We can use the same model to perform semantic segmentation on camera. This can be done by few modifications to the code to process video file.
import pixellib
from pixellib.semantic import semantic_segmentation
import cv2
capture = cv2.VideoCapture(0)
segment_video = semantic_segmentation()
segment_video.load_ade20k_model("deeplabv3_xception65_ade20k.h5")
segment_video.process_camera_ade20k(capture, overlay=True, frames_per_second= 15, output_video_name="output_video.mp4", show_frames= True,
frame_name= "frame")
import cv2
capture = cv2.VideoCapture(0)
We imported cv2 and included the code to capture camera frames.
segment_video.process_camera_ade20k(capture, overlay = True, frames_per_second= 15, output_video_name="output_video.mp4", show_frames= True,frame_name= "frame")
In the code for performing segmentation, we replaced the video filepath to capture i.e we are going to process a stream camera frames instead of a video file.We added extra parameters for the purpose of showing the camera frames:
show_frames: this parameter handles showing of segmented camera frames and press q to exist. frame_name: this is the name given to the shown camera’s frame.
A demo showing the output of pixelLib’s semantic segmentation of camera’s feeds using pascal voc model. Good work! It was able to successfully segment me.


Panel Heading
Panel Content
Panel Heading
Panel Content
Panel Heading
Panel Content
Panel Heading
Panel Content
Second Div
Click Me!


We invited you to celebrate our wedding
Born in Mumbai and Brought up in Amravati. He is a Software Developer, Tech Savvy, a Foodie, Always in hunt for adventure and Wanderlust, Big Boss fan, Hates Cheese Burst but has been eating it since 2013, Loves to solve Mysterious Crime Patrol cases.
Shweta was Born and brought up in Nagpur. She is a Software Engineer by profession. An Ambitious Girl, Passionate Teacher, Loves to Sketch and she always win's competition with me by cheating, Mad about Panipuri, a Dominos Platinum customer(her favorite order is Cheese Burst with chocolate mousse)
We met at work, Time passed, and I fell for her.
I asked, She said NO
I tried harder, her Bauji said NO
I tried again and Bauji said "Ja Shweta.. Jee le apni zindagi!!"
PS : She Lied, her Eyes Could'nt
Vivek and Shweta were just two single twenty somethings following their dreams in Nagpur, Originally crossed paths while working in 2013.
Kids go for Dinner Date, Legends go for Pani Puri Date followed by many such dates. The first liking, we discovered among us.
Finally the most awaited day came..


Join us for the latest Windows Central Video Podcast
Join Daniel Rubino and Zac Bowden for a LIVE recording of the Windows Central Video Podcast!
by Zac BowdenMake sure you join us for the broadcast of this week's Windows Central Video Podcast, LIVE today at 2:30pm ET. For those in different time zones, here's when we'll be live: Convert your time zone here.
Head to our YouTube page to see the podcast or watch the embed above.
We'll be talking about this week's biggest Microsoft news. Make sure you're there! Be sure to be following us on Twitter as we'll be tweeting out when the show begins. Alternatively, bookmark this page and come back later, as the player embedded in this post will be where we stream to.


{% extends 'layout.html' %} {% load static %} {% load compress %} {% block content %} {{ block.super }}
Look not every man on his own things, but every man also on the things of others. Let this mind be in you, which was also in Christ Jesus: Who, being in the form of God, thought it not robbery to be equal with God: But made himself of no reputation, and took upon him the form of a servant, and was made in the likeness of men: And being found in fashion as a man, he humbled himself, and became obedient unto death, even the death of the cross. Wherefore God also hath highly exalted him, and given him a name which is above every name: That at the name of Jesus every knee should bow, of things in heaven, and things in earth, and things under the earth; And that every tongue should confess that Jesus Christ is Lord, to the glory of God the Father. Philippians 2:4-11
For other foundation can no man lay than that is laid, which is Jesus Christ. 1 Corinthians 3:11


PHOTOS: Renderings of brand new retail, housing complex in North Hills 20 Nov 2019, 00:51 Developer rendering of what The Ross will look like after construction Vacant shopping center in Ross Township on Perry Highway Developer rendering of what The Ross will look like after construction Developer rendering of what The Ross will look like after construction


Point Helm at this repo to see the charts.
$ helm repo add reanhub https://reanahub.github.io/reana $ helm repo update $ helm repo search reana


- Click on the left or right hand side of the image to move forward or backwards.
- Type the name of capital in the box and press enter.
- If you are correct, the country is removed from the list and your score goes up by one. Continue until no countries remain or the timer runs out!


Ethnie Groves Treick
Democrat
Co-Owner, Whitewood Limited Partnership
Master of Arts, Journalism, University of Nevada, Reno (2001 – 2003) Business Certificate, University of Colorado at Boulder (2000) Bachelor of Arts, English, University of Colorado at Boulder (1996 – 2000)
80526
I have extensive volunteer experience working with and on behalf of low-income people in Colorado. I also have a passion for women's equality and much of my volunteer work is focused on improving the lives of women. I serve on the City of Fort Collins Community Development Block Grant Commission, which works to improve the physical, economic and social conditions of low-income people in Fort Collins. I also serve on the Board of Directors for the Junior League of Fort Collins, a nonprofit that helps women and children in Northern Colorado through a career clothing boutique, food security program and volunteer hours. Additionally, I’ve spent nearly a decade on the Board of Directors for the Center for Work, Education and Employment in Denver, which serves low-income parents as they prepare for and find a career.
In 2016 and 2020, as in many previous elections, I made Get Out the Vote calls for the Colorado Democratic Party. Since 2015, I have made political donations to Joe Biden, Jeni Arndt, Amy Klobuchar, Cary Kennedy, Faith Winter, Jeanne Nicholson, Hilary Clinton and The Colorado BlueFlower Fund.
Member, City of Fort Collins Community Development Block Grant Commission (2020 – present) Board of Directors, McGraw Elementary School PTSO (2018 – present) Board of Directors, Center for Work, Education and Employment (2012 – present) Board of Directors, Junior League of Fort Collins (2016 – present) Board of Directors, Fort Collins Preschool Association (2016 – 2018) Board of Directors, Colorado BlueFlower Fund (2011 – 2017) Board of Directors, Denver Alumnae of Alpha Omicron Pi (2008 – 2017)
I want to serve on the commission to ensure that Colorado’s districts represent the diversity of our state and that each Colorado citizen has equal representation. My experience working in the public and private sector, as well as my lengthy volunteer experience, ensures that I am uniquely qualified for the role. Voices from all communities, groups of people and walks of life should be represented in each district. I believe strongly in our democracy and the promise it holds for all citizens. Each of us has a voice in selecting who leads us and what policies are put forth. The right to vote and involvement in the political process are central to the success of our democracy and I’ve held both in high regard my entire life. I’m excited about the potential opportunity to work collaboratively with other commissioners to ensure fair elections over the next decade.
I believe the best way to promote consensus is to listen, approach every conversation with respect and have a shared understanding of the end goal. I have extensive experience working in a collaborative environment and building relationships with individuals and stakeholder groups, many with opinions different from my own. I am honest and straightforward in my conversations and value the trust that develops when a relationship is formed through mutual respect. I am empathetic and an excellent listener and in all settings, work to ensure that all voices are heard. When I led the CEO Search Committee for the Center for Work, Education and Employment (CWEE), we made sure that the committee included a staff representative. We also made sure to hold multiple meetings with staff to gather their input and thoughts about the type of person who should lead the organization. Beyond staff involvement, we also reached out to CWEE’s participants, the low-income career seekers who were part of the program at the time, and asked for their opinion about what CWEE needed and what questions we should ask candidates. We ended up incorporating a couple questions from the participants into the interview process, which was made much richer from the involvement of diverse voices.
I have excellent communication skills, both written and verbal. I am able to distill complex information down so that it is easily understood. I am adept at researching and analyzing specific topic areas and presenting my findings. I am a strategic thinker, with the ability to take information gathered through various sources to make a decision. Additionally, I have strong brainstorming and collaborative skills for working within a team toward a common goal.
Female


Writing a code generation tool (Part 2): The Scanner
The Scanner
Before we can generate any code we need to split the script file into a list of tokens. This makes it easier to handle the script. To do so we need to scan the whole file and look for lexemes that correspond with the defined set of Tokens. For my requirements I needed the following types of token:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
typedef enum
{
TOKEN_COLON,
TOKEN_COMMA,
TOKEN_ASTERISK,
TOKEN_ARROW,
TOKEN_LEFT_PAREN,
TOKEN_RIGHT_PAREN,
TOKEN_LEFT_BRACE,
TOKEN_RIGHT_BRACE,
TOKEN_LEFT_BRACKET,
TOKEN_RIGHT_BRACKET,
/* literals */
TOKEN_IDENTIFIER,
TOKEN_STRING,
/* keywords */
TOKEN_ENUM,
TOKEN_DEFINE,
TOKEN_INCLUDE,
TOKEN_GENERATE,
TOKEN_ERROR,
TOKEN_EOF /* end of file */
} TokenType;
Be aware that these types are depended of your requirements and syntax choices. The types ‘TOKEN_ERROR’ and ‘TOKEN_EOF’ are probably useful for every project to identify the end of the file and to help find mistakes in the script file.
To keep track of where we are in the file and what we are currently scanning we define the following struct to help us with that:
1
2
3
4
5
6
typedef struct
{
const char* start;
const char* current;
int line;
} Scanner;
We use ‘start’ to point to the start of the lexeme we are currently scanning and ‘current’ to point to the character we are currently looking at. The ‘line’ keeps track of the line in the script where we are at, to help us with debugging.
We initialize the scanner by letting ‘start’ and ‘current’ point to the beginning of the script file. We should probably use a function to do that for us. We also need to set the line of the scanner to 1.
1
2
3
4
5
6
7
void scanner_init(Scanner* scanner, const char* source)
{
scanner->start = source;
scanner->current = source;
scanner->line = 1;
}
The heart of the scanner lies in the scan function, which takes the scanner as argument and returns a Token. The function steps through the script file and searches for patterns which matches the various token types. Once the scanner found such a token it creates a token which contains the type, a pointer to the start of the token’s lexeme in the script and the length of the lexeme. The token also contains the number of the line where it was found for debugging purposes.
1
2
3
4
5
6
7
8
9
typedef struct
{
TokenType type;
const char* start;
size_t len;
int line;
} Token;
Such tokens are stored in an array and will be used by the generator to decide what code to generate.
The full scan function is rather complex, so we will break it down to more managable pieces. The simplest version of the function would be this:
1
2
3
4
5
6
7
8
9
Token scanner_get_next(Scanner* scanner)
{
char c = scanner->current[0];
if (!c) return create_token(scanner, TOKEN_EOF);
scanner->current++;
return create_token_error(scanner, "Unexpected character.");
}
With this function we check if we have reached the end of the file (by checking if ‘c’ is ‘\0’). If we are indeed at the end, we create a token with the type ‘TOKEN_EOF’ and if not we return an error token with an according error message.
The creation of these tokens (and other simple token) is pretty straightforward.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static Token create_token(const Scanner* scanner, TokenType type)
{
Token token;
token.type = type;
token.start = scanner->start;
token.len = scanner->current - scanner->start;
token.line = scanner->line;
return token;
}
static Token create_token_error(const Scanner* scanner, const char* message)
{
Token token;
token.type = TOKEN_ERROR;
token.start = message;
token.len = strlen(message);
token.line = scanner->line;
return token;
}
The next step on our way to the full scan function is the creation of single and double character tokens. To do so we add a switch statement to check if the current character matches a token. After we added the switch to the function we get something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Token scanner_get_next(Scanner* scanner)
{
char c = scanner->current[0];
if (!c) return create_token(scanner, TOKEN_EOF);
scanner->current++;
switch (c)
{
/* checking for single character token */
case ':': return create_token(scanner, TOKEN_COLON);
case ',': return create_token(scanner, TOKEN_COMMA);
case '*': return create_token(scanner, TOKEN_ASTERISK);
case '(': return create_token(scanner, TOKEN_LEFT_PAREN);
case ')': return create_token(scanner, TOKEN_RIGHT_PAREN);
case '{': return create_token(scanner, TOKEN_LEFT_BRACE);
case '}': return create_token(scanner, TOKEN_RIGHT_BRACE);
case '[': return create_token(scanner, TOKEN_LEFT_BRACKET);
case ']': return create_token(scanner, TOKEN_RIGHT_BRACKET);
/* checking for double character token */
case '-':
if (scanner_match(scanner, '>'))
return create_token(scanner, TOKEN_ARROW);
else
return create_token_error(scanner, "Expected '>' after '-'.");
}
return create_token_error(scanner, "Unexpected character.");
}
To scan double character token we need a small helper function, that checks if the current character matches a specific character and is not ‘\0’. If there is a match we advance the scanner by one character. Since the scripting language does not support arithmetic operators, we return an error token if a hyphen is not followed by a greater-than sign.
1
2
3
4
5
6
7
8
9
static int scanner_match(Scanner* scanner, char c)
{
if (scanner->current[0] && scanner->current[0] == c)
{
scanner->current++;
return 1;
}
return 0;
}
Whitespaces and comments
Currently our scanner is creating a token (more specifically an error token) for every space, tab, and newline. But we do not care for these since they are not part of any token’s lexeme. So at the start of the scan function we should skip every leading whitespace. While we are at it we should possibly skip comments to. A comment starts with an ‘#’ and goes until the end of the line.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
static void scanner_skip_whitespaces(Scanner* scanner)
{
while(1)
{
switch (scanner->current[0])
{
case ' ':
case '\r':
case '\t':
scanner->current++;
break;
case '\n':
scanner->line++;
scanner->current++;
break;
/* Comments */
case '#':
while(scanner->current[0] && scanner->current[0] != '\n')
scanner->current++;
default:
return;
}
}
}
If we now call this function before we set the start of our scanner we will get all the token while avoiding all whitespace and comments.
Strings
With comments and whitespaces out of the way, we can continue with adding more token we can scan. The next type we want to scan is strings. A string starts and ends with ‘”’ everthing in between is part of the string. For simplicity’s sake we will not handle multiline strings. So if we find ‘\0’ or ‘\n’ before we reach the closing quote we want to return an error token indictating an unterminated was found. If we find a valid string we create a token which contains the string including both quotes.
1
2
3
4
5
6
7
8
9
10
11
12
13
static Token create_string(Scanner* scanner)
{
while(scanner->current[0] != '"')
{
if (!scanner->current[0] || scanner->current[0] == '\n')
return create_token_error(scanner, "Unterminated string.");
scanner->current++;
}
scanner->current++; /* closing quote */
return create_token(scanner, TOKEN_STRING);
}
To add this function to our scan function we just need to add another case (for ‘”’) to the switch statement.
Numbers
The only thing we are missing now is the scanning of numbers, identifiers and keywords. We will start with numbers, since they are easier. To look for numbers we first need to define a small helper function to check if a character is a digit.
1
2
3
4
static int is_digit(char c)
{
return c >= '0' && c <= '9';
}
With the help of this function we can scan numbers. To do so we need to advance the scanner while the current character is still a number. If the next character is a dot, we need to scan the fractional part as well, which is basically the same as the first part of this function. Put that all together and the result should look something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
static Token create_number(Scanner* scanner)
{
while (is_digit(scanner->current[0])) scanner++;
/* Look for a fractional part. */
if (scanner->current[0] && scanner->current[0] == '.' && is_digit(scanner->current[1]))
{
scanner++;
while (is_digit(scanner->current[0])) scanner++;
}
return create_token(scanner, TOKEN_NUMBER);
}
To add this to our scan function we just need to check if our current character is a digit before we enter the switch.
Identifiers and keywords
Now to identifiers and keywords. Since Keywords are “just” special, reserved indetifiers we can check for both in one function. First we scan the whole identifier, and since we allow numbers in our identifiers we need to check for both letters (and underscores) and digits. Like for the numbers we should define a helper function to check for letters.
1
2
3
4
static int is_alpha(char c)
{
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_');
}
Additionally we need an another helper function to check if the identifier we scanned is a specific keyword. Basically its just a fancy wrapper for ‘memcmp’.
1
2
3
4
5
6
7
8
9
static TokenType check_keyword(const Scanner* scanner, const char* keyword, TokenType type)
{
size_t len = strlen(keyword);
if ((scanner->current - scanner->start == len) && memcmp(scanner->start, keyword, len) == 0)
return type;
return TOKEN_IDENTIFIER;
}
With the help of these two functions we can now create the ‘create_identifier’ function. Since we don’t want to compare every single identifier with every possible keyword, we will use a switch statement where we will look only at the first character of each identifier. If it matches the first character of a keyword we will check the rest of the identifier. If it doesn’t we just return an identifier token since it can’t be any keyword.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
static Token create_identifier(Scanner* scanner)
{
while (is_alpha(scanner->current[0]) || is_digit(scanner->current[0]))
scanner->current++;
TokenType identifier_type = TOKEN_IDENTIFIER;
switch (scanner->start[0])
{
case 'd': identifier_type = check_keyword(scanner, "define", TOKEN_DEFINE); break;
case 'e': identifier_type = check_keyword(scanner, "enum", TOKEN_ENUM); break;
case 'g': identifier_type = check_keyword(scanner, "generate", TOKEN_GENERATE); break;
case 'i': identifier_type = check_keyword(scanner, "include", TOKEN_INCLUDE); break;
case 's': identifier_type = check_keyword(scanner, "strings", TOKEN_STRINGS); break;
}
return create_token(scanner, identifier_type);
}
Putting it all together
If we now take everything we learned so far and pack it in one function the result should look something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Token scanner_get_next(Scanner* scanner)
{
scanner_skip_whitespaces(scanner);
scanner->start = scanner->current;
char c = scanner->current[0];
if (!c) return create_token(scanner, TOKEN_EOF);
scanner->current++;
if (is_alpha(c)) return create_identifier(scanner);
if (is_digit(c)) return create_number(scanner);
switch (c)
{
/* checking for single character token */
case ':': return create_token(scanner, TOKEN_COLON);
case ',': return create_token(scanner, TOKEN_COMMA);
case '*': return create_token(scanner, TOKEN_ASTERISK);
case '(': return create_token(scanner, TOKEN_LEFT_PAREN);
case ')': return create_token(scanner, TOKEN_RIGHT_PAREN);
case '{': return create_token(scanner, TOKEN_LEFT_BRACE);
case '}': return create_token(scanner, TOKEN_RIGHT_BRACE);
case '[': return create_token(scanner, TOKEN_LEFT_BRACKET);
case ']': return create_token(scanner, TOKEN_RIGHT_BRACKET);
/* checking for double character token */
case '-':
if (scanner_match(scanner, '>'))
return create_token(scanner, TOKEN_ARROW);
else
return create_token_error(scanner, "Expected '>' after '-'.");
case '"': return create_string(scanner);
}
return create_token_error(scanner, "Unexpected character.");
}
The last part we should do is testing if nothing is crashing and the scanner identifies every token correctly. To do so we will scan a simple test script. To scan a file we just keep getting the next token until we get a token which type is ‘TOKEN_EOF’. For now every token we scan will be printed out in a nice, readable way.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
int main(int argc, char** args)
{
FILE* file = fopen("test_script.cx", "rb");
if (!file) return 1;
fseek(file, 0, SEEK_END);
size = ftell(file);
fseek(file, reset, SEEK_SET);
size_t size = tb_file_get_size(file);
char* buffer = calloc(size + 1, 1);
if (!buffer || fread(buffer, 1, size, file) != size)
return 1;
fclose(file);
while (1)
{
Token token = scanner_get_next(scanner);
if (token.type == TOKEN_EOF) break;
printf("%2d: %.*s\n", token.type, token.len, token.start);
}
free(buffer);
return 0;
}
If something was unclear or you have some (constructive) critisim, feel free to leave a comment or write me on twitter.
The complete code can be found here.


|
Here at our uncapping table, the combs are checked to be sure that the uncapping machine removed all of the wax caps from the honey comb. Any areas that the machine missed are uncapped by hand using an uncapping fork. Our choice of a fork over the popular heated knife method is to prevent any overheating of honey on the knife which can add flavors that are not present in the honey to start with. Wax cappings are placed in the food grade bucket. Honey is drained from the cappings at the end of the extracting season. |


Last Christmas' Emilia Clarke considered online dating after failed celeb romances
The star of this year's romantic seasonal blockbuster Last Christmas, is looking for someone who can make her laugh
by Poppy Danby, https://www.mirror.co.uk/authors/poppy-danby/Emilia Clarke is one of the hottest actresses on our screens today – with romantic seasonal blockbuster Last Christmas about to make her star shine even brighter.
So you would expect a queue of suitors lining up to romance the single 33-year-old after eight years as Daenerys Targaryen in TV hit show Game Of Thrones.
Her latest movie character is a troubled singer called Kate who find love thanks to some holiday cheer... and an elf costume.
But when it comes to wooing Emilia, here’s a big tip – make her laugh.
“If you make me giggle, then I’m in pretty much,” she says. “And someone who is considerate and nice. Like when someone takes you out on a date and they’ve thought about kind of an interesting thing to do... that goes a long way. But a sense of humour is 100% it. If you can laugh with someone, it’s just the sexiest thing in the world.”
That may explain why one of her exes is comedian Seth MacFarlane, who she dated between 2012 and 2013. She also split with US director Charlie McDowell earlier this year.
The Emmy-nominated star says fame has made online dating a no-go, although she did consider making a fake profile. “There was a time. I was definitely tempted.” she says.
But she missed online dating “because I was on people’s television right when it all began. So there are all my single friends being like...” She mimes a swiping finger. “I’m like, ‘What are you doing?’ ‘Shopping for a boyfriend.’ ‘OK cool.’
“If I wasn’t in the job I’m in, then I definitely would do it, 100% And I feel like it’s not a taboo anymore.”
Alongside a quest for love, Emilia says she can also empathise with Kate because they both went through medical traumas.
Emilia has spoken about her life-threatening brain aneurysms.
She explains about Kate: “She had a health crisis at pretty much the same age I did. That time in your life is really confusing and leaves you feeling really lost.
Emilia grew up in Oxford with marketing boss mum Jennifer and her sound designer dad Peter. She has said: “When I went with my dad to theatres, I was entranceds.”
She took drama classes and in 2010 her agent called her about a new HBO series called Game Of Thrones.
However, it was during filming Season One that her health began to deteriorate. And, at the age of 24 she suffered the aneurysm.
In 2013, she had an operation to combat another growth on her brain. However, it went wrong and she suffered a “massive bleed”. Emilia says she has “healed” since those health challenges and looking forward to her favourite time of year.
She says: “I still get really excited.
“We’re in our thirties and every single Christmas morning we wake up and get our stockings and then when I started working I got my parents stockings so they didn’t feel left out.
“We all climb into my parents’ bed with the dog and open the stockings and you have your breakfast in bed and everyone comes downstairs in the hat you got over your pyjamas.”
She says George Michael’s song Last Christmas, which features in the film, makes the season even more magical.
She explains: “We’ve not stopped singing it. Anyone who watches this movie will not stop singing it”
Last Christmas is released on November 15