Code Coverage ¶
At some point you want to review which parts of your application are tested well and which are not. Just for this case the CodeCoverage is used. When you execute your tests to collect coverage report, you will receive statistics of all classes, methods, and lines triggered by these tests. The ratio between all lines in script and all touched lines is a main coverage criterion. In the ideal world you should get 100% code coverage, but in reality 80% is really enough.
*To collect coverage information xdebug
is required**.
Coverage data can be collected manually for both local and remote tests. Remote tests may be executed on different nodes, or locally but running through web server. It may look hard to collect code coverage for Selenium tests or PhpBrowser tests. But Codeception supports remote codecoverage as well as local.
Configuration ¶
To enable code coverage put these lines in the global configuration file codeception.yml
:
coverage:
enabled: true
That's ok for now. But what files should be present in final coverage report?
Pass an array of files or directory to include/exclude sections. The path ending with '*' matches the directory.
Also you can use '*' mask in a file name, i.e. app/models/*Model.php
to match all models.
There is a shortcut if you don't need that complex filters:
coverage:
enabled: true
include:
- app/*
exclude:
- app/cache/*
Include and exclude options can be redefined for each suite in corresponding config files.
By default, if coverage is reported to be < 35% it is marked as low, and >70% is high coverage.
You can also define high and low boundaries with low_limit
and high_limit
config options:
coverage:
enabled: true
low_limit: 30
high_limit: 60
By default, show all whitelisted files in --coverage-text
output not just the ones with coverage information is set to false, config option:
coverage:
enabled: true
show_uncovered: false
By default, show only the coverage report summary in --coverage-text
output is set to false, config option:
coverage:
enabled: true
show_only_summary: false
For further information please refer to the PHPUnit configuration docs
Local CodeCoverage ¶
The basic codecoverage can be collected for functional and unit tests.
If you performed configuration steps from above, you are ready to go.
All you need is to execute codeception with --coverage
option.
To generate a clover xml report or a tasty html report append also --coverage-xml
and --coverage-html
options.
codecept run --coverage --coverage-xml --coverage-html
XML and HTML reports are stored to the _output
directory. The best way to review report is to open index.html
from tests/_output/coverage
in your browser.
XML clover reports are used by IDEs (like PHPStorm) or Continuous Integration servers (like Jenkins).
Remote CodeCoverage ¶
Local Server ¶
If you run your application via Webserver (Apache, Nginx, PHP WebServer) you don't have a direct access to tested code,
so collecting coverage becomes a non-trivial task. The same goes for scripts that are tested on different nodes.
To get access to this code you need xdebug
installed with remote_enable
option turned on.
Codeception also requires a little spy to interact with your application. As your application runs standalone,
without even knowing it is being tested, a small file should be included in order to collect coverage info.
This file is called c3.php
and is available on GitHub.
c3.php
should be downloaded and included in your application at the very first line from controller.
By sending special headers Codeception will command your application when to start codecoverage collection and when to stop it.
After the suite is finished, a report will be stored and Codeception will grab it from your application.
Please, follow installation instructions described in a readme file.
To connect to c3
Codeception uses url config from PhpBrowser or WebDriver module.
But URL of index with c3.php
included can be specified explicitly with c3_url
parameter defined:
coverage:
# url of file which includes c3 router.
c3_url: 'http://<IP_ADDRESS>:8000/index-test.php/'
Note: we can't have multiple
c3_url
on same host difference only by port. Please, use alias of domain (i.e.frontend.dev:8000
,backend.dev:8080
) instead.
After the c3.php
file is included in application you can start gather coverage.
In case you execute your application locally there is nothing to be changed in config.
All codecoverage reports will be collected as usual and merged afterwards.
Think of it: Codeception runs remote coverage in the same way as local.
Remote Server ¶
But if you run tests on different server (or your webserver doesn't use code from current directory) a single option remote
should be added to config.
For example, let's turn on remote coverage for acceptance suite in acceptance.suite.yml
:
coverage:
remote: true
In this case remote Code Coverage results won't be merged with local ones, if this option is enabled. Merging is possible only in case a remote and local files have the same path. But in case of running tests on a remote server we are not sure of it.
CodeCoverage results from remote server will be saved to tests/_output
directory. Please note that remote codecoverage results won't be displayed in console by the reason mentioned above: local and remote results can't be merged, and console displays results for local codecoverage.
Working Directory (Docker/Shared Mounts) ¶
If your remote server is accessed through a shared mount, or a mounted folder (IE: Docker Volumes), you can still get merged coverage details.
Use the work_dir
option to specify the work directory. When CodeCoverage runs, Codeception will update any path that matches the work_dir
option to match the local current project directory.
Given a docker command similar to:
`
bash
docker run -v $(pwd):/workdir -w /workdir...
`
Use the below configuration to allow coverage mergers.
`
yaml
coverage:
remote: false
work_dir: /workdir
### Remote Context Options
HTML report generation can at times take a little more time than the default 30 second timeout. Or maybe you want to alter SSL settings (verify_peer, for example)
To alter the way c3 sends it's service requests to your webserver (be it a local or a remote one), you can use the `remote_context_options` key in `coverage` settings.
``` yaml
coverage:
remote_context_options:
http:
timeout: 60
ssl:
verify_peer: false
Context stream options are well documented at php.net
Conclusion ¶
It's never been easier to setup local and remote code coverage. Just one config and one additional file to include!
With Codeception you can easily generate CodeCoverage reports for your Selenium tests (or other acceptance or api tests). Mixing reports for acceptance
, functional
, and unit
suites provides you with the most complete information on which parts of your applications are tested and which are not.


| DOSE: |
2.5 g |
oral |
Ibogaine |
(powder / crystals) |
I had a window of opportunity and I went through it. I was fortunate enough (good Karma) to be on the receiving end of the 'Gift of Freedom' ....Ibogaine.
I will not mention who gave it to me, as that is not my purpose. My purpose is to share the joy of drug freedom and to take you through my Ibogaine Experience. I am also writing a journal for the Ibogaine Researchers who work for FREE and spend all of their hard earned PhD's on Ibogaine Research and finding a way to mass produce this wonderful drug.
About 3 weeks ago, I was not expecting this Gift. A knock? I answered, and there stood Santa with ONE gift....IBOGAINE. The Ibogaine was in capsule form, marked in 240 mg and the rest in 320 mg. to total of 2.5 grams which was to the T on my body weight.  My husband was on hand to monitor my physical properties. My *guide* was there to offer their mental support, along with taking care of my highly excited emotional well being.
I was able to take notes for the first hour. They are as follows:
8:55 PM
my guide took me to a darkened room, NO lights, and I was told to remain calm, and to lie down. A soft piano concerto was playing.
9:00 PM
320 mg Ibogaine taken. The capsule was emptied and I swallowed some bitter tasting liquid in a glass of water. NOT as bitter as methadone, but what in Ibogaine name IS that bitter? I was given the 320 mg at first to see if I would be sensitive to it. I experienced NO nausea and NO diarrhea which CAN be side effects, so I was told.
9:05 PM
beginning to feel effects of Ibogaine. Reminds me somewhat if my LSD days, when I first came on to the acid. Sound distortions, trails out the kazoo, (meaning MANY MANY MANY MANY trails).
9:10 PM
just went through a series of YAWNS that almost made me pass out. I told my guide I wanted to sleep and to finish the Ibogaine in the morning. What I DIDN'T tell my guide at that time, my reason for wanting to finish in the am was so I could go to the ALL MIGHTY CLINIC to receive my usual 190mg of methadone.
9:30 PM
told my guide goodnight and went to sleep( so I thought) but in actuality I was tripping already....jus didn't know it.
Tuesday morning
I was given the remainder 2.5 grams to complete my Ibogaine Treatment. About all I remember of this day, was coming in and out of a tunnel, filled with LOUD chanting and in one corner of my brain there was someone I called 'The Screecher' who would literally fill my soul with incredible loud SCHREECHING!!!!
Tuesday evening
up to the bathroom.......can't hardly walk.......feet shuffling......trails so incredible I was in the bathroom for hours, fading in and out of consciousness.
Wednesday
still on my trip......I remember observing all that was happening to me internally. I was standing in awe watching these African people take my brain and Chant MY life long addiction clean. My brain, my soul, my literally existence was all given a through cleansing. My brain actually shone with a brillance so bright I literally could not look for more than a few seconds at a time.
Thursday morning
I remember looking at my guide and feeling a bond and kinship with the other 10 or so people in the world who have had this experience. The Ibogaine *workers* were all tall, dark people with an intensity that made their eyes glow with determination.....I never once felt threatened, just remember feeling very, very CLEAN.......I slep through most of Thursday.
Friday morning
I was steady enough on my feet to take a shower without help. I was and am amazed I was NOT drug sick. I looked at my guide and said...'NO withdrawal'!!!!!!!!! Guide smiled........ For the next 6 days I saw trails still........they slowly faded until I only see them occasionally at night..........
I have this to say to all of you. Howard is RIGHT. I am not addicted to methadone. I had NO severe drug withdrawal....after a 10 year methadone abit and a 25 year drug dependecny, this is no less than a miracle. For all of you who go to the different conferences? TALK IBOGAINE....BELIEVE IT......IT WORKS........The only physical problems I am having now is a severe drop in blood sugars which are causing extreme tiredness. Marc Shinderman and my counsler advised me to continue on my anti-depressents. I don't want to take ANY drugs, so we will see how I do...... I give my eternal thanks to the God that IS that HE picked me to receive this gift.
MOST of all, I thank all the researchers who must live across the ocean so they won't be jailed for trying to help US, the addicts......
Linda Kay Scott
EROWID NOTE : It has come to our attention that a month after the author's experience described above, she relapsed and began using opiates again. In late December of 1997, several months after her Ibogaine experience, she committed suicide. Further details are unknown.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


* = Required *Name: *Email: *Age: *Current job status? Select an option Employed Full-time Employed Part-time Unemployed Retired Student Prefer not to Answer *Preferred payment method Cash Check Debit/Credit card How did you hear about us (check all that apply)? Radio Television Internet Other Comments:


Daniela Aguirre-Guerrero, Guillaume Ducoffe, Lluís Fàbrega, Pere Vilà and David Coudert, Low time complexity algorithms for path computation in Cayley Graphs, Discrete Applied Mathematics, pp. 218–225, 2019, DOI: 10.1016/j.dam.2018.12.005.
Daniela Aguirre-Guerrero, Miguel Camelo, Lluís Fàbrega and Pere Vilà, WMGR: A Generic and Compact Routing Scheme for Data Center Networks, IEEE/ACM Transactions on Networking, pp. 356–369, 2018, DOI: 10.1109/TNET.2017.2779866.
Daniela Aguirre-Guerrero, Andreu Mañosa, Lluís Fàbrega and Pere Vilà, Evaluation of Cayley Graphs for Parallel Computer Systems, in Proceedings of the International Conference on Computer, Information and Telecommunication Systems (CITS), Colmar, France, 2018, DOI: 10.1109/CITS.2018.8440157.
Daniela Aguirre-Guerrero, Ricardo Marcelín-Jiménez and Enrique Rodriguez-Colina, WSN Simulation Model with a Complex Systems Approach, in Proceedings of the Summer Computer Simulation Conference, Toronto, Canada, 2015, ISBN: 978-1-62748-276-9.
Daniela Aguirre-Guerrero, Ricardo Marcelín-Jiménez, Enrique Rodriguez-Colina and Michael Pascoe-Chalke, Congestion Control for a Fair Packet Delivery in WSN: From a Complex System Perspective, The Scientific World Journal, pp. 1–12, 2014, DOI: 10.1155/2014/381305.
Projects:
Metacámbrico urbano: Evidencias (artísticas y científicas) de nuevas formas de vida desde la urbe (CDMX y Valle de Toluca).
Project funded by Universidad Autónoma Metropolitana, Sep 2019 - current.
Interdependent Networks under Geographical Constraints (GIROS).
Project funded by the Spanish Ministry of Economy and Competitiveness (MINECO), Mar 2016 - feb 2019.
Elastic Networks (ELASTICNETS). Thematic Network funded by MINECO, Oct 2015 - sep 2017.
Education:
Doctoral Degree in Technology, Universitat de Girona, Catalonia, Spain, 2014 - 2019.
Thesis: Word-processing-based Routing for Cayley Graphs, -
Master’s Degree in Information Technologies, Universidad Autónoma Metropolitana, Mexico, 2011 - 2013.
Thesis: Congestion Control in Wireless Sensor Networks, .
Bachelor’s Degree in Telematics Engineering, Instituto Poltécnico Nacional, Mexico, 2004 - 2009. Thesis: Intelligent Traffic Light Network.
Scholarships and awards:
Doctoral degree with Cum Laude distinction, Universitat de Girona, 2019.
Scholarship for Doctoral studies funded by the Mexican National Council for Science and Technology (CONACyT), 2015 – 2018.
Scholarship for Masters Degree studies funded by CONACyT, 2011 – 2013.
Bachelor’s Thesis distingished with the Engineering Award of Mexico City. Institute for Science and Technology of Mexico City. See the press release.


This is a simple Cinema session guide app. This is built on top of Lavarel5, AngularJS with Material Framework. For futher details about this app check out Readme.md.


An CRUD application needs a place to display and update the Tables
that belong to the application.
They may be considered as the primary page of an application.
The appname-html along with the
appname-js specifies how these pages are constructed.
The Triangular standard design has a small title at the top, a menu on the left and a variable work section that varies based on what section is current. This implemented with extensive use of the templates and macro facilities.
In addition a section for error or informative messages is placed just under the title. This section is easily removed by the user and shows again when the message changes.
Nothing in Triangular restricts the design of the display pages. There is, however, potentially some reliance on the menu system to provide a means of transitioning between tables views, table actions and logged on/logged off states. An equivalent would have to be included.
See also the Form Page Design page for design guidelines on print pages (application secondary pages).
The AppsConfig,js file provides system configuration and should be loaded by the display page as shown in the appname-html section.


Dealing with Conflict
April 25, 2014
Discuss a time you had an emotional conflict with someone. What was it about? What happened?
The first thing that comes to mind is in college when I didn't get along with one of my roommates. There wasn't a specific event or anything that caused it, rather it was a pretty gradual straining of our relationship over time.
What was the source of the conflict?
The source was really just a lot of his habits and behaviors that he had when we were roommates. We were good friends before living together, but of course I didn't know what he was like to live with. He would do things that drove me crazy, like not wash the dishes, play video games really loud late at night, and generally just be loud and distract me when I was trying to study.
How did you handle that conflict?
At first I would talk to him and ask him to stop doing certain things, such as leaving his things everywhere and yelling at the TV at night. I felt like I was making reasonable requests, but he just didn't stop. Again, it's not something he was consciously doing, and I guess he wasn't good about noticing when he was doing those things. After asking him for a long time (probably months), I began just spending a lot more time out of the apartment and basically ignoring him and not interacting with him. In hindsight, that was pretty mean, since he was still friendly towards me, but I felt I had tried what I could.
Did your actions make the conflict better or worse?
My actions probably made things a little better because he definitely got the message about how I was feeling. However, as his behavior didn't really change, it's hard to say things got better.
If you could go back, what would you do differently, if anything?
The sad thing is, I'm not sure I would have done anything differently. I feel like I was pretty patient with him and if the same thing happened now and I was stuck in that situation, I think I would do the same thing. Looking at the Compass of Shame, I think my reaction was some combination of Withdrawal and Avoidance, which is probably how I most often handle those types of situations.
What did you learn from this experience?
This isn't a very satisfying answer, but I think I learned that some people just aren't a good fit together and that some people don't change their behavior. I haven't had a problem with any other roommates or anything, so I think it was just a case of bad fit.


Very Bad Things * * * (out of * * * * )
Directed by Peter Berg. Cast: Jon Favreau, Cameron Diaz, Christian Slater, Jeremy Piven, Leland Orser, Daniel Stern, Jeanne Tripplehorn, Joey Zimmerman, Tyler Malinger, Carla Scott, Russell B. McKenzie. 1998 - 101 minutes. Rated R (for extreme violence, gore, profanity, sex, and nudity). Reviewed November 27, 1998.
By Dustin Putman < Dustin Putman's Film Reviews >
"Very Bad Things," is the most delightfully morbid film of the year, a movie that goes so far over the deep end with its outrageousness and violence that I couldn't help but be won over by the material.
The film starts off with five friends leaving their homes in Los Angeles for a bachelor party in Las Vegas. The groom-to-be is Kyle Fisher (Jon Favreau), who is about to be married to the controlling, wedding-obsessed Laura (Cameron Diaz). The other friends are real estate agent Robert Boyd (Christian Slater), quiet Charles (Leland Orser), and brothers, Michael (Jeremy Piven) and family man Adam (Daniel Stern). After a wild night of gambling, boozing, and drugs, a stripper (Carla Scott) who was paid for by Robert comes into their hotel room, but after a freak accident, to everyone's terror, she is killed. As Robert puts it: "There are two options: go to the police and go to prison, or bury her out in the desert where no one will ever find her." After a security guard enters into the hotel room unexpectantly and sees the body, Robert is forced to kill him as well. "Okay, there is only one option now. You can forget about calling the police," he says. By the time the five friends return home and as the wedding draws nearer, most of them are overcome with guilt, which sets off an even more elaborate series of event, that includes much, much more murder, double-crosses, and the inevitable wedding from hell.
"Very Bad Things," which is actor Peter Berg's feature film directing debut, is the shockingly perverse and wicked comedy that, "There's Something About Mary," wanted to be. It pulls out all the stops to create something fresh, original, and hilarious, even if that requires surprisingly graphic violence, gore, and a slew of truly hateful characters that all get what they deserve by the end.
The screenplay, also written by Berg, is, to put it mildly, very funny and courageous. During the second act of the film, some of the fun was beginning to slightly dwindle due to so much death, which was beginning to undermine the humor, but it eventually recouped itself with a climax that has to be seen to be believed. The dialogue is edgy and inventive, and this film proves that a movie doesn't necessarily require likable character to be extremely enjoyable. There's more fun, I think, in showing ignorable people getting their just desserts.
Cameron Diaz gives her best performance to date here, and has a lot of fun in playing the hateful Laura, who eventually turns out to be more crazy than any of the five male friends. Diaz puts so much overblown energy to her character that I really do think she deserves a supporting actress Oscar nomination come next January.  Jeanne Tripplehorn creates another character original, as Daniel Stern's wife, who late in the picture, we discover, is a tough kick-boxer that should not be messed around with.
It is at this level that, "Very Bad Things," was so entertaining and surprising. Just when you thought you could predict what was going to happen, there would be a little twist involving the characters that would be absolutely wacky. The last sequence was perfect and managed to go even further over-the-top. Although I enjoyed the film immensely, let me make this clear: "Very Bad Things," is not a movie for everyone.  Luckily, these are elements that I would prefer in a comedy, since it clearly shows the filmmakers were set on making a no-holds-barred, politically incorrect comedy. The fact that this film slipped through the cracks of the usually mainstream and "safe" wide-releases coming out lately, still gives me hope for the Hollywood film industry.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Manage Client-Side Packages with Bower¶
By Noel Rice, Scott Addie
Bower is a “package manager for the web.” Bower lets you install and restore client-side packages, including JavaScript and CSS libraries. For example, with Bower you can install CSS files, fonts, client frameworks, and JavaScript libraries from external sources. Bower resolves dependencies and will automatically download and install all the packages you need. For example, if you configure Bower to load the Bootstrap package, the necessary jQuery package will automatically come along for the ride. For server-side libraries like the MVC 6 framework, you will still use NuGet Package Manager.
Note
Visual Studio developers are already familiar with NuGet, so why not use NuGet instead of Bower? Mainly because Bower already has a rich ecosystem with over 33,000 packages in play; and, it integrates well with the Gulp and Grunt task runners.
Getting Started with Bower¶
The ASP.NET 5 Starter Web MVC project pre-constructs the client build process for you. The ubiquitous jQuery and Bootstrap packages are installed, and the plumbing for NPM, Gulp, and Bower is already in place. The following screenshot depicts the initial project in Solution Explorer.
Client-side packages are listed in the bower.json file. The ASP.NET 5 Starter Web project pre-configures bower.json with jQuery, jQuery validation, Bootstrap, and Hammer.js.
Let’s add support for photo albums by installing the Fotorama jQuery plugin.
At the end of the
dependencies
section in bower.json, add a comma and type “fotorama”. Notice as you type that you get IntelliSense with a list of available packages. Select “fotorama” from the list.Add a colon and then select the latest stable version of the package from the drop down list. The double quotes will be added automatically.
Save the bower.json file.
Note
Visual Studio watches the bower.json file for changes. Upon saving, the bower install command is executed. See the Output window’s “Bower/npm” view for the exact command which was executed.
Expand the twisty to the left of bower.json, and locate the .bowerrc file. Open it, and notice that the
directory
property is set to “wwwroot/lib”. This setting indicates the location at which Bower will install the package assets.{ "directory": "wwwroot/lib" }
In Solution Explorer, expand the wwwroot node. The lib directory should now contain all of the packages, including the fotorama package.
Next, let’s add an HTML page to the project. In Solution Explorer, right-click wwwroot node and select Add > New Item > HTML Page. Name the page Index.html. Replace the contents of the file with the following:
<!DOCTYPE html>

<meta charset="utf-8" />
<title>Bower and Fotorama</title>
<link href="lib/fotorama/fotorama.css" rel="stylesheet" />

This example uses images currently available inside wwwroot/images, but you can add any images on hand.
Press Ctrl+Shift+W
to display the page in the browser. The control displays the images and allows navigation by clicking the thumbnail list below the main image. This quick test shows that Bower installed the correct packages and dependencies.
Exploring the Client Build Process¶
The ASP.NET 5 Starter Web project has everything you need for Bower already setup. This next walkthrough starts with the Empty project template and adds each piece manually, so you can get a feel for how Bower is used in a project. See what happens to the project structure and the runtime output as each configuration change is made to the project.
The general steps to use the client-side build process with Bower are:
- Define and download packages used in your project.
- Reference packages from your web pages.
Define Packages¶
The first step is to define the packages your application needs and to download them. This example uses Bower to load jQuery and Bootstrap in the desired location.
In Visual Studio 2015, create a new ASP.NET Web Application.
In the New ASP.NET Project dialog, select the ASP.NET 5 Empty template and click OK.
In Solution Explorer, the src directory includes a project.json file, and wwwroot and Dependencies nodes. The project directory will look like the screenshot below.
In Solution Explorer, right-click the project and add the following item:
- Bower Configuration File – bower.json
Note
The Bower Configuration File item template also adds a .bowerrc file.
Open bower.json, and add jquery and bootstrap to the
dependencies
section. The resulting bower.json file should look like the example here. The versions will change over time, so use the latest stable build version from the drop-down list.{ "name": "ASP.NET", "private": true, "dependencies": { "jquery": "2.1.4", "bootstrap": "3.3.5" } }
Save the bower.json file.
The project should now include bootstrap and jQuery directories in two locations: Dependencies/Bower and wwwroot/lib. It’s the .bowerrc file which instructed Bower to install the assets within wwwroot/lib.
Reference Packages¶
Now that Bower has copied the client support packages needed by the application, you can test that an HTML page can use the deployed jQuery and Bootstrap functionality.
- Right-click wwwroot and select Add > New Item > HTML Page. Name the page Index.html.
- Add the CSS and JavaScript references.
- In Solution Explorer, expand wwwroot/lib/bootstrap and locate bootstrap.css. Drag this file into the
head
element of the HTML page. - Drag jquery.js and bootstrap.js to the end of the
body
element.
- In Solution Explorer, expand wwwroot/lib/bootstrap and locate bootstrap.css. Drag this file into the
Make sure bootstrap.js follows jquery.js, so that jQuery is loaded first.
<!DOCTYPE html>

<meta charset="utf-8" />
<title>Bower Example</title>
<link href="lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />

Use the Installed Packages¶
Add jQuery and Bootstrap components to the page to verify that the web application is configured correctly.
Inside the
body
tag, above thescript
references, add adiv
element with the Bootstrap jumbotron class and an anchor tag.

Using the jumbotron style

 Stateful button

Add the following code after the jQuery and Bootstrap
script
references.
Validate that the
Configure
method of the Startup.cs file contains a call to theUseStaticFiles
extension method. This middleware adds files, found within the web root, to the request pipeline. This line of code will look as follows:app.UseStaticFiles();
Note
Be sure to install the
Microsoft.AspNet.StaticFiles
NuGet package. Without it, theUseStaticFiles
extension method will not resolve.Press
Ctrl+Shift+W
to view the Index.html page in the browser. Verify that the jumbotron styling is applied, the jQuery code responds when the button is clicked, and that the Bootstrap button changes state.


Quinnipiac University Poll: American Voters Feel the Bern
FiveThirtyEight Favorability Ratings
General Election Matchups
HuffPost’s 2016 National Democratic Primary Poll tracker
Time: Bernie Sanders Breaks Fundraising Record
The Atlantic: Bernie Sanders’s Big Money
NYT: Campaign funding
Bernie Sanders is the Most Electable Candidate in Either Party
Why Bernie Sanders is more Electable
Only Bernie Sanders can defeat the GOP
The complete list of Sanders Democrats
Sanders Democrats Facebook Group
2005 Rolling Stone profile
Alternet: Bernie Gets it Done
NYT: Via Legislative Side Doors, Bernie Sanders Won Modest Victories
MSNBC: Bernie Sanders remakes Budget Committee in his image
Legislative Landmarks
berniesanders.com
Policy info from berniesanders.com
The Common Wealth Fund: US Spends more on Health Care than other High-Income Nations But has Lower Life Expectancy, Worse Health
http://www.bbc.com/news/business-28212223
http://www.alternet.org/economy/robert-reich-would-you-rather-2-or-3-big-health-
insurance-companies-or-govt-run-single-payer
http://www.modernhealthcare.com/article/20150203/NEWS/302039967
http://connect.dcat.org/blogs/patricia-van-arnum/2015/08/03/outlook-2018-the-current-and-future-direction-of-the-pharma-industry#.VvyFPZNViko
Info from berniesanders.com
Breaking Up Banks FAQs:
Bernie’s plan
http://rooseveltinstitute.org/sanders-ending-tbtf/
Berniesanders.com
feelthebern.org
Graphs on the minimum wage
2015 National Low Income Housing Coalition Factsheet
The Nation: Bernie Sanders Will Make the Economy Great Again
Seattle’s $15/hr minimum wage
Center for Economic and Policy Research’s 2014 study on the benefits of raising the minimum wage
The Atlantic: A Major Leap for the Minimum Wage
Voting Record Chart
Funding Chart
Political Compass Chart
Ta Nehisi Coates
Veterans
Veterans
170 top economists
Robert Reich
Joseph Stiglitz
Thomas Piketty
Dr. Cornel West
Tulsi Gabbard
Artists for Bernie
Individuals/Organizations


Flamengo lift Copa Libertadores with last-gasp win over River Plate
LIMA, Nov 24 — Brazilian club Flamengo won the Copa Libertadores in the most dramatic fashion yesterday as they came from behind to beat defending champions River Plate 2-1 with two late goals from Gabriel Barbosa.
River took the lead through Rafael Borre after 14 minutes and looked to be cruising to their fifth Libertadores triumph.
However, Barbosa, the striker nicknamed Gabigol, tapped in from close range with a minute left and then rifled home from 15 metres to secure victory in an astonishing finale.
The result gave Flamengo only their second Libertadores triumph and means they will represent the South American confederation in the Club World Cup in Qatar in December.
The Rio de Janeiro clubs came into the match as slight favourites on the back of a spectacular 26-game unbeaten run.
But playing in their first Libertadores final since 1981, they appeared overawed and River Plate seldom looked like relinquishing their lead as they outplayed and outmuscled their less experienced rivals.
However, just when the match looked over, Barbosa popped up a minute from time to sidefoot home a close-range equaliser.
And in a finish reminiscent of Manchester United’s last-gasp victory over Barcelona in the 1999 Champions League final, the striker pounced again in added time to hit the winner and send the Brazilian fans wild with joy.
Barbosa was then sent off seconds before the final whistle, following a red card for River’s Exequiel Palacios.
The final in Lima was the first to be played on a one-off basis at a neutral venue in the tournament’s 60-year history.
The match had originally been scheduled to take place in Santiago but was switched to Lima earlier this month because of political unrest in the Chilean capital.
The change came a year after the second leg of the final between River Plate and Boca Juniors was moved to Madrid after River fans attacked the Boca coach as it approached the stadium. — Reuters


What we offer
Organize
Keep track of all your plants in one place, right from the dashboard.
Forget
We keep track of your watering history and remind you to water, so you don't have to remember when you last watered or when to water next.
Record
Quickly record watering so you can get back to your other tasks.


Description:
This instruction performs a compare between register Rd and a constant. The register is not changed. All conditional branches can be used after this instruction.
Operation:
Rd - K
Syntax: Operands: Program Counter:
CPI Rd,K 16 ≤ d ≤ 31, 0≤ K ≤ 255 PC ← PC + 1
16-bit Opcode:
|
0011 |
KKKK |
dddd |
KKKK |
Status Register (SREG) and Boolean Formula:
|
I |
T |
H |
S |
V |
N |
Z |
C |
|---|---|---|---|---|---|---|---|
|
- |
- |
⇔ |
⇔ |
⇔ |
⇔ |
⇔ |
⇔ |
H:
Set if there was a borrow from bit 3; cleared otherwise
S: N ⊕ V, For signed tests.
V:
Set if two's complement overflow resulted from the operation; cleared otherwise.
N:R7 Set if MSB of the result is set; cleared otherwise.
Z:
Set if the result is $00; cleared otherwise.
C:
Set if the absolute value of K is larger than the absolute value of Rd; cleared otherwise.
R (Result) after the operation.
Example:
cpi r19,3 ; Compare r19 with 3 brne error ; Branch if r19⇔3 ... error: nop ; Branch destination (do nothing)
Words: 1 (2 bytes)
Cycles: 1


Dan Hammer // @econohammer
(require '[incanter.core :as i])
(defn trend-mat
[T]
(i/bind-columns (repeat T 1) (range T)))
(defn pseudoinverse
[x]
(let [xt (i/trans x)]
(i/mmult (i/solve (i/mmult xt x)) xt)))
(defn grab-trend
[pseudo-mat sub-ts]
(second (i/mmult pseudo-mat sub-ts)))
(defn windowed-trend
[block-len full-ts]
(let [pseudo-mat (-> block-len trend-mat pseudoinverse)]
(map (partial grab-trend pseudo-mat)
(partition block-len 1 full-ts))))
(defn short-stat
[block-param ts]
(->> (windowed-trend block-param ts)
(reduce min)))
(facts
(count ndvi) => 199
(short-stat 24 ndvi) => -63.3346)
(defn- ordinal-idx
[sub-ts]
(let [indexed-vector (map-indexed vector sub-ts)]
(map first
(sort-by second indexed-vector))))
(defn permutation-count
[D ts]
(let [subs (partition D 1 ts)]
(frequencies (map ordinal-idx subs))))
(fact
(permutation-count 3 [ 8 7 8 9 9 8 5 7 6 5 ])
=> \{ (1 0 2) 1
(0 1 2) 2
(2 0 1) 1
(2 1 0) 2
(1 2 0) 1
(0 2 1) 1 \})
(defn walk-matrix
[m window]
(mapcat (comp (partial apply map vector)
(partial map (partial partition window 1)))
(partition window 1 m)))
(def mat
[[ 0 0 0 0 0 0 0 1 1 1 ]
[ 0 0 0 1 0 0 0 0 0 1 ]
[ 0 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 0 0 0 0 0 0 ]
[ 0 0 0 0 0 0 0 1 1 0 ]
[ 0 0 0 0 0 0 0 1 1 0 ]
[ 1 0 0 0 0 0 0 1 0 0 ]
[ 0 1 0 0 0 0 0 0 0 0 ]
[ 1 1 0 0 0 0 0 0 0 0 ]])
(defn window-sum
[sub-mat]
(reduce + (flatten sub-mat)))
(fact
(map window-sum
(walk-matrix mat 3))
=> [ 0 1 1 1 0 1 2 4
0 1 1 1 0 0 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 1 2 2
0 0 0 0 0 2 4 4
1 0 0 0 0 3 5 5
2 1 0 0 0 2 3 3
4 2 0 0 0 1 1 1 ])
\[ \mathbb{P}(z_{it} \hspace{2pt} | \hspace{2pt} {\bf v}_{it}; \beta) = \frac{e^{\beta{\bf v}_{it}}}{1 + e^{\beta{\bf v}_{it}}} \]
(use 'cascalog.api)
(defn beta-gen
"query to return the beta vector associated with each ecoregion"
[label-src timeseries-src]
(<- [?eco ?beta]
(label-src ?pixel-id ?label)
(timeseries-src ?pixel-id ?eco ?ndvi)
(create-features ?ndvi :> ?feature-vec)
(estimate-beta ?label ?feature-vec :> ?beta)))
(defn prob-gen
[label-src timeseries-src]
(let [beta-src (beta-gen label-src timeseries-src)]
(<- [?pixel-id ?prob]
(beta-src ?eco ?beta)
(timeseries-src ?pixel-id ?eco ?ndvi)
(create-features ?ndvi :> ?feature-vec)
(apply-beta ?feature-vec ?beta :> ?prob))))
(fact
(prob-gen labels timeseries) => (produces [[10029102 0.56]
[12323943 0.24]]))
(use '[cartodb.playground :only (insert-rows)])
(let [table-name "gfw"
account-name "wri"]
(apply insert-rows account-name creds table-name data))
github.com/danhammer/forma-js


Beyond Human-Computer Interaction: Meta-Design in Support of Human Problem-Domain Interaction
Authors
Carmien, S. & Fischer, G.
Status
Unread
Relevance
Quotations
Notes
References
Concepts
Field of Study
Methodology


Final thoughts on Front-End Development
Posted October 4, 2016 by Matt Kraatz
As I dive headfirst into server-side development with C#, I wanted to take a moment to reflect on what I’ve learned over the past three months, and what I hope to accomplish with the last half of my Nashville Software School career. While I’m sure this is only the beginning of my engagement with front-end development (I mean, I’ve only just dipped my toe into the water here), my experience with Javascript has given me some expectation of what to expect on the server-side.
After a few weeks studying Javascript at NSS, I began to wonder exactly what server-side development would answer. It seemed like I was getting a really full toolbet for developing software. What else was there that Javascript in the browser couldn’t do, but C# on a server could? In retrospect, that was a fairly naive assertion, but one that set my brain in the right direction.
As I was neck-deep in my final front-end project and started dealing with fairly large workloads, I started wishing I could hook up to a back-end to handle some of that processing and provide a more consistent experience. I ran into errors more than once on my capstone that I chocked up to performance hiccups and solved by haphazardly refreshing the page. I wonder if having a persistent backend environment would alleviate any of that unpredictable behavior.
At the very least, having a fully featured backend would help modularize my application and provide better separation of concerns. Front-end code could focus on front-end concerns exclusively, and the back-end could do more than just persist information.
One thing I’ve been told to expect about C# is a far greater rigidity. At first glance that sounds scary, but could also be comforting to have a shorter list of acceptable solutions to a given problem, framing our developing minds a little more consistently. The flexibility of Javascript can be both elegant and exhausting. When faced with a problem in Javascript, there can be as many as twenty different solutions or more. And it’s very easy to choose a solution now that spirals downward dramatically into a much larger problem later on, all because I didn’t fully consider and track all twenty solutions available to me.
I’ve also heard that there’s a longer path to results. It’s not longer as easy as refreshing the browser window to witness the fruits of your labor at any point in time. Maybe more “blind coding” is necessary, writing lines and lines of code before being able to test. That doesn’t worry me too much, I like thinking through problems and can usually write logic I need blindly without having to pause for a console.log every two steps.
More than anything, I am expecting a very different environment, and am looking forward to the challenge.


# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains functions for matching coordinate catalogs.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from ..extern import six
from .representation import UnitSphericalRepresentation
from .. import units as u
__all__ = ['match_coordinates_3d', 'match_coordinates_sky', 'search_around_3d',
'search_around_sky']
[docs]def match_coordinates_3d(matchcoord, catalogcoord, nthneighbor=1, storekdtree='_kdtree_3d'):
"""
Finds the nearest 3-dimensional matches of a coordinate or coordinates in
a set of catalog coordinates.
This finds the 3-dimensional closest neighbor, which is only different
from the on-sky distance if ``distance`` is set in either ``matchcoord``
or ``catalogcoord``.
Parameters
----------
matchcoord : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The coordinate(s) to match to the catalog.
catalogcoord : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The base catalog in which to search for matches. Typically this will
be a coordinate object that is an array (i.e.,
``catalogcoord.isscalar == False``)
nthneighbor : int, optional
Which closest neighbor to search for. Typically ``1`` is desired here,
as that is correct for matching one set of coordinates to another.
The next likely use case is ``2``, for matching a coordinate catalog
against *itself* (``1`` is inappropriate because each point will find
itself as the closest match).
storekdtree : bool or str, optional
If a string, will store the KD-Tree used for the computation
in the ``catalogcoord``, as an attribute in ``catalogcoord`` with the
provided name. This dramatically speeds up subsequent calls with the
same catalog. If False, the KD-Tree is discarded after use.
Returns
-------
idx : integer array
Indices into ``catalogcoord`` to get the matched points for each
``matchcoord``. Shape matches ``matchcoord``.
sep2d : `~astropy.coordinates.Angle`
The on-sky separation between the closest match for each ``matchcoord``
and the ``matchcoord``. Shape matches ``matchcoord``.
dist3d : `~astropy.units.Quantity`
The 3D distance between the closest match for each ``matchcoord`` and
the ``matchcoord``. Shape matches ``matchcoord``.
Notes
-----
This function requires `SciPy <http://www.scipy.org>`_ to be installed
or it will fail.
"""
kdt = _get_cartesian_kdtree(catalogcoord, storekdtree)
#make sure coordinate systems match
matchcoord = matchcoord.transform_to(catalogcoord)
#make sure units match
catunit = catalogcoord.cartesian.x.unit
matchxyz = matchcoord.cartesian.xyz.to(catunit)
matchflatxyz = matchxyz.reshape((3, np.prod(matchxyz.shape) // 3))
dist, idx = kdt.query(matchflatxyz.T, nthneighbor)
if nthneighbor > 1: # query gives 1D arrays if k=1, 2D arrays otherwise
dist = dist[:, -1]
idx = idx[:, -1]
sep2d = catalogcoord[idx].separation(matchcoord)
return idx.reshape(matchxyz.shape[1:]), sep2d, dist.reshape(matchxyz.shape[1:]) * catunit
[docs]def match_coordinates_sky(matchcoord, catalogcoord, nthneighbor=1, storekdtree='_kdtree_sky'):
"""
Finds the nearest on-sky matches of a coordinate or coordinates in
a set of catalog coordinates.
This finds the on-sky closest neighbor, which is only different from the
3-dimensional match if ``distance`` is set in either ``matchcoord``
or ``catalogcoord``.
Parameters
----------
matchcoord : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The coordinate(s) to match to the catalog.
catalogcoord : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The base catalog in which to search for matches. Typically this will
be a coordinate object that is an array (i.e.,
``catalogcoord.isscalar == False``)
nthneighbor : int, optional
Which closest neighbor to search for. Typically ``1`` is desired here,
as that is correct for matching one set of coordinates to another.
The next likely use case is ``2``, for matching a coordinate catalog
against *itself* (``1`` is inappropriate because each point will find
itself as the closest match).
storekdtree : bool or str, optional
If a string, will store the KD-Tree used for the computation
in the ``catalogcoord`` as an attribute in ``catalogcoord`` with the
provided name. This dramatically speeds up subsequent calls with the
same catalog. If False, the KD-Tree is discarded after use.
Returns
-------
idx : integer array
Indices into ``catalogcoord`` to get the matched points for each
``matchcoord``. Shape matches ``matchcoord``.
sep2d : `~astropy.coordinates.Angle`
The on-sky separation between the closest match for each
``matchcoord`` and the ``matchcoord``. Shape matches ``matchcoord``.
dist3d : `~astropy.units.Quantity`
The 3D distance between the closest match for each ``matchcoord`` and
the ``matchcoord``. Shape matches ``matchcoord``. If either
``matchcoord`` or ``catalogcoord`` don't have a distance, this is the 3D
distance on the unit sphere, rather than a true distance.
Notes
-----
This function requires `SciPy <http://www.scipy.org>`_ to be installed
or it will fail.
"""
# send to catalog frame
newmatch = matchcoord.transform_to(catalogcoord)
#strip out distance info
match_urepr = newmatch.data.represent_as(UnitSphericalRepresentation)
newmatch_u = newmatch.realize_frame(match_urepr)
cat_urepr = catalogcoord.data.represent_as(UnitSphericalRepresentation)
newcat_u = catalogcoord.realize_frame(cat_urepr)
if isinstance(storekdtree, six.string_types) and hasattr(catalogcoord, storekdtree):
# Check for a stored KD-tree on the passed-in coordinate. Normally it
# will have a distinct name from the "3D" one, so it's safe to use even
# though it's based on UnitSphericalRepresentation.
storekdtree = getattr(catalogcoord, storekdtree)
idx, sep2d, sep3d = match_coordinates_3d(newmatch_u, newcat_u, nthneighbor, storekdtree)
# sep3d is *wrong* above, because the distance information was removed,
# unless one of the catalogs doesn't have a real distance
if not (isinstance(catalogcoord.data, UnitSphericalRepresentation) or
isinstance(newmatch.data, UnitSphericalRepresentation)):
sep3d = catalogcoord[idx].separation_3d(newmatch)
#update the kdtree on the actual passed-in coordinate
if isinstance(storekdtree, six.string_types):
setattr(catalogcoord, storekdtree, getattr(newcat_u, storekdtree))
return idx, sep2d, sep3d
[docs]def search_around_3d(coords1, coords2, distlimit, storekdtree='_kdtree_3d'):
"""
Searches for pairs of points that are at least as close as a specified
distance in 3D space.
This is intended for use on coordinate objects with arrays of coordinates,
not scalars. For scalar coordinates, it is better to use the
``separation_3d`` methods.
Parameters
----------
coords1 : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The first set of coordinates, which will be searched for matches from
``coords2`` within ``seplimit``. Cannot be a scalar coordinate.
coords2 : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The second set of coordinates, which will be searched for matches from
``coords1`` within ``seplimit``. Cannot be a scalar coordinate.
distlimit : `~astropy.units.Quantity` with distance units
The physical radius to search within.
storekdtree : bool or str, optional
If a string, will store the KD-Tree used in the search as attributes
with the name ``storekdtree`` in ``coords2``. This speeds up subsequent
calls to this function. If False, the KD-Trees are not saved.
Returns
-------
idx1 : integer array
Indices into ``coords1`` that matches to the corresponding element of
``idx2``. Shape matches ``idx2``.
idx2 : integer array
Indices into ``coords2`` that matches to the corresponding element of
``idx1``. Shape matches ``idx1``.
sep2d : `~astropy.coordinates.Angle`
The on-sky separation between the coordinates. Shape matches ``idx1``
and ``idx2``.
dist3d : `~astropy.units.Quantity`
The 3D distance between the coordinates. Shape matches ``idx1`` and
``idx2``.
Notes
-----
This function requires `SciPy <http://www.scipy.org>`_ (>=0.12.0)
to be installed or it will fail.
If you are using this function to search in a catalog for matches around
specific points, the convention is for ``coords2`` to be the catalog, and
``coords1`` are the points to search around. While these operations are
mathematically the same if ``coords1`` and ``coords2`` are flipped, some of
the optimizations may work better if this convention is obeyed.
In the current implementation, the return values are always sorted in the
same order as the ``coords1`` (so ``idx1`` is in ascending order). This is
considered an implementation detail, though, so it could change in a future
release.
"""
if not distlimit.isscalar:
raise ValueError('distlimit must be a scalar in search_around_3d')
if coords1.isscalar or coords2.isscalar:
raise ValueError('One of the inputs to search_around_3d is a scalar. '
'search_around_3d is intended for use with array '
'coordinates, not scalars. Instead, use '
'``coord1.separation_3d(coord2) < distlimit`` to find '
'the coordinates near a scalar coordinate.')
kdt2 = _get_cartesian_kdtree(coords2, storekdtree)
cunit = coords2.cartesian.x.unit
# we convert coord1 to match coord2's frame. We do it this way
# so that if the conversion does happen, the KD tree of coord2 at least gets
# saved. (by convention, coord2 is the "catalog" if that makes sense)
coords1 = coords1.transform_to(coords2)
kdt1 = _get_cartesian_kdtree(coords1, storekdtree, forceunit=cunit)
# this is the *cartesian* 3D distance that corresponds to the given angle
d = distlimit.to(cunit).value
idxs1 = []
idxs2 = []
for i, matches in enumerate(kdt1.query_ball_tree(kdt2, d)):
for match in matches:
idxs1.append(i)
idxs2.append(match)
idxs1 = np.array(idxs1)
idxs2 = np.array(idxs2)
if idxs1.size == 0:
d2ds = u.Quantity([], u.deg)
d3ds = u.Quantity([], u.dimensionless_unscaled)
else:
d2ds = coords1[idxs1].separation(coords2[idxs2])
d3ds = coords1[idxs1].separation_3d(coords2[idxs2])
return idxs1, idxs2, d2ds, d3ds
[docs]def search_around_sky(coords1, coords2, seplimit, storekdtree='_kdtree_sky'):
"""
Searches for pairs of points that have an angular separation at least as
close as a specified angle.
This is intended for use on coordinate objects with arrays of coordinates,
not scalars. For scalar coordinates, it is better to use the ``separation``
methods.
Parameters
----------
coords1 : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The first set of coordinates, which will be searched for matches from
``coords2`` within ``seplimit``. Cannot be a scalar coordinate.
coords2 : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The second set of coordinates, which will be searched for matches from
``coords1`` within ``seplimit``. Cannot be a scalar coordinate.
seplimit : `~astropy.units.Quantity` with angle units
The on-sky separation to search within.
storekdtree : bool or str, optional
If a string, will store the KD-Tree used in the search as attributes
with the name ``storekdtree`` in ``coords2``. This speeds up subsequent
calls to this function. If False, the KD-Trees are not saved.
Returns
-------
idx1 : integer array
Indices into ``coords1`` that matches to the corresponding element of
``idx2``. Shape matches ``idx2``.
idx2 : integer array
Indices into ``coords2`` that matches to the corresponding element of
``idx1``. Shape matches ``idx1``.
sep2d : `~astropy.coordinates.Angle`
The on-sky separation between the coordinates. Shape matches ``idx1``
and ``idx2``.
dist3d : `~astropy.units.Quantity`
The 3D distance between the coordinates. Shape matches ``idx1`` and
``idx2``. If either ``coords1`` or ``coords2`` don't have a distance,
this is the 3D distance on the unit sphere, rather than a physical
distance.
Notes
-----
This function requires `SciPy <http://www.scipy.org>`_ (>=0.12.0)
to be installed or it will fail.
In the current implementation, the return values are always sorted in the
same order as the ``coords1`` (so ``idx1`` is in ascending order). This is
considered an implementation detail, though, so it could change in a future
release.
"""
from . import Angle
if not seplimit.isscalar:
raise ValueError('seplimit must be a scalar in search_around_sky')
if coords1.isscalar or coords2.isscalar:
raise ValueError('One of the inputs to search_around_sky is a scalar. '
'search_around_sky is intended for use with array '
'coordinates, not scalars. Instead, use '
'``coord1.separation(coord2) < seplimit`` to find the '
'coordinates near a scalar coordinate.')
# we convert coord1 to match coord2's frame. We do it this way
# so that if the conversion does happen, the KD tree of coord2 at least gets
# saved. (by convention, coord2 is the "catalog" if that makes sense)
coords1 = coords1.transform_to(coords2)
#strip out distance info
urepr1 = coords1.data.represent_as(UnitSphericalRepresentation)
ucoords1 = coords1.realize_frame(urepr1)
kdt1 = _get_cartesian_kdtree(ucoords1, storekdtree)
if hasattr(coords2, storekdtree):
#just use the stored KD-Tree
kdt2 = getattr(coords2, storekdtree)
else:
#strip out distance info
urepr2 = coords2.data.represent_as(UnitSphericalRepresentation)
ucoords2 = coords2.realize_frame(urepr2)
kdt2 = _get_cartesian_kdtree(ucoords2, storekdtree)
#save the KD-Tree in coords2, *not* ucoords2
setattr(coords2, storekdtree, kdt2)
# this is the *cartesian* 3D distance that corresponds to the given angle
r = (2 * np.sin(Angle(seplimit) / 2.0)).value
idxs1 = []
idxs2 = []
for i, matches in enumerate(kdt1.query_ball_tree(kdt2, r)):
for match in matches:
idxs1.append(i)
idxs2.append(match)
idxs1 = np.array(idxs1)
idxs2 = np.array(idxs2)
if idxs1.size == 0:
d2ds = u.Quantity([], u.deg)
d3ds = u.Quantity([], u.dimensionless_unscaled)
else:
d2ds = coords1[idxs1].separation(coords2[idxs2])
try:
d3ds = coords1[idxs1].separation_3d(coords2[idxs2])
except ValueError:
# they don't have distances, so we just fall back on the cartesian
# distance, computed from d2ds
d3ds = 2 * np.sin(d2ds / 2.0)
return idxs1, idxs2, d2ds, d3ds
def _get_cartesian_kdtree(coord, attrname_or_kdt='_kdtree', forceunit=None):
"""
This is a utility function to retrieve (and build/cache, if necessary)
a 3D cartesian KD-Tree from various sorts of astropy coordinate objects.
Parameters
----------
coord : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`
The coordinates to build the KD-Tree for.
attrname_or_kdt : bool or str or KDTree
If a string, will store the KD-Tree used for the computation
in the ``coord``, as an attribute in ``coord`` with the
provided name. If given as a KD-Tree, it will just be used directly.
forceunit: unit or None
If a unit, the cartesian coordinates will convert to that unit before
being put in the KD-Tree. If None, whatever unit it's already in
will be used
Returns
-------
kdt : `~scipy.spatial.cKDTree` or `~scipy.spatial.KDTree`
The KD-Tree representing the 3D cartesian representation of the input
coordinates.
"""
from warnings import warn
#without scipy this will immediately fail
from scipy import spatial
try:
KDTree = spatial.cKDTree
except:
warn('C-based KD tree not found, falling back on (much slower) '
'python implementation')
KDTree = spatial.KDTree
if attrname_or_kdt is True: # backwards compatibility for pre v0.4
attrname_or_kdt = '_kdtree'
# figure out where any cached KDTree might be
if isinstance(attrname_or_kdt, six.string_types):
kdt = getattr(coord, attrname_or_kdt, None)
if kdt is not None and not isinstance(kdt, KDTree):
raise ValueError('The `attrname_or_kdt` "{0}" is not a scipy KD tree!'.format(attrname_or_kdt))
elif isinstance(attrname_or_kdt, KDTree):
kdt = attrname_or_kdt
attrname_or_kdt = None
elif not attrname_or_kdt:
kdt = None
else:
raise ValueError('Invalid `attrname_or_kdt` argument for KD-Tree:' +
str(attrname_or_kdt))
if kdt is None:
#need to build the cartesian KD-tree for the catalog
if forceunit is None:
cartxyz = coord.cartesian.xyz
else:
cartxyz = coord.cartesian.xyz.to(forceunit)
flatxyz = cartxyz.reshape((3, np.prod(cartxyz.shape) // 3))
kdt = KDTree(flatxyz.value.T)
if attrname_or_kdt:
#cache the kdtree in `coord`
setattr(coord, attrname_or_kdt, kdt)
return kdt


Big Trouble in Little Chinese Language Files
Today was a bit of stange day -
Basically, from GA FEWD and in Frontend, you will want to import custom font files that are either hosted locally or on a CDN like google fonts.
If you want to include a open font type, you will need to include the @font face
within your CSS. Thereafter, you’ll be able to control what elements you want that font style applied into your webpage.
Below is an example of how you’ll go about doing that.
@font-face
{
font-family: myAwesomeFont;
src: url(awesomeFont.ttf), local(awesomeFont);
}
Then in your stylesheet under your specified class, id or element, you’ll need to add this onto your choice of element. (I’ve used body as the example)
body
{
font-family: myAwesomeFont;
}
Caveat: Font face is not supported on ie8 and under.
So what’s the problem?
Well, the problem was as follows - Traditional Chinese was being rendered onto the DOM, along with the Simplified Chinese - so what was the problem?
Whenever I looked at the Mac version of the site, the Simplified Chinese was being rendered with a system font which looked incredibly similar to the desired style that I wanted to render. However, whenever this was rendered on a Windows Machine on Chrome (running the exact same browser), the Windows system font would actually a very different font style?
So what was actually happening?
I had hypothesized that the Traditional Chinese font file was renderering SOME of the Simplified Chinese, but the curious case was why was it rendering only some and not ALL of the characters?
This lead me onto a deep and dark rabbit hole which would inevitably lead me to some very intereresting caveats about using font types.
As Web Developers, we all know that the openness of the web was not created for font foundries in mind. That being said, any font that isn’t openly licensed or legally purchased will be liable to some bad times
Update
Anyways - that Tangent aside, my colleague Ethan had a quick look around at the most popular only font foundaries about why the font files had specific naming.
There was a peculiar naming scheme of “Simplified on Traditional”
Which meant
That for whatever Traditional Chinese character code will be translated into Simplified Chinese via the font file


CompositePlot is an abstract baseclass for plot types that draw render multiple axes. It implements methods to add an overall title to such a plot.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘16pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘title’: ‘15pt’}
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
compute_ranges
( obj , key , ranges ) ¶ -
Given an object, a specific key and the normalization options this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
current_handles
¶ -
Should return a list of plot objects that have changed and should be updated.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
get_data
( element , ranges=None , empty=False ) ¶ -
Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Boolean
-
class
holoviews.plotting.bokeh.plot.
GridPlot
( layout , ranges=None , layout_num=1 , keys=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.plot.CompositePlot
,holoviews.plotting.plot.GenericCompositePlot
Plot a group of elements in a grid layout based on a GridSpace element object.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Integer
plot_size
( allow_None=False, bounds=None, constant=False, default=120, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Defines the width and height of each plot in the grid
-
param Integer
xrotation
( allow_None=False, bounds=(0, 360), constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Integer
axis_offset
( allow_None=False, bounds=None, constant=False, default=50, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Number of pixels to adjust row and column widths and height by to compensate for shared axes.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=True, instantiate=False, objects=[‘left’, ‘right’, None, True, False], pickle_default_value=True, precedence=None, readonly=False ) - Whether and where to display the yaxis, supported options are ‘left’, ‘right’ and None.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param Boolean
shared_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.
-
param Integer
yrotation
( allow_None=False, bounds=(0, 360), constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘16pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘title’: ‘15pt’}
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
shared_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=True, instantiate=False, objects=[‘bottom’, ‘top’, None, True, False], pickle_default_value=True, precedence=None, readonly=False ) - Whether and where to display the xaxis, supported options are ‘bottom’, ‘top’ and None.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
compute_ranges
( obj , key , ranges ) ¶ -
Given an object, a specific key and the normalization options this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
current_handles
¶ -
Should return a list of plot objects that have changed and should be updated.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
get_data
( element , ranges=None , empty=False ) ¶ -
Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Boolean
util
Module
¶
-
holoviews.plotting.bokeh.util.
attach_periodic
( plot ) [source] ¶ -
Attaches plot refresh to all streams on the object.
-
holoviews.plotting.bokeh.util.
categorize_array
( array , dim ) [source] ¶ -
Uses a Dimension instance to convert an array of values to categorical (i.e. string) values and applies escaping for colons, which bokeh treats as a categorical suffix.
-
holoviews.plotting.bokeh.util.
compute_plot_size
( plot ) [source] ¶ -
Computes the size of bokeh models that make up a layout such as figures, rows, columns, widgetboxes and Plot.
-
holoviews.plotting.bokeh.util.
compute_static_patch
( document , models ) [source] ¶ -
Computes a patch to update an existing document without diffing the json first, making it suitable for static updates between arbitrary frames. Note that this only supports changed attributes and will break if new models have been added since the plot was first created.
A static patch consists of two components:
- The events: Contain references to particular model attributes along with the updated value.
- The references: Contain a list of all references required to resolve the update events.
This function cleans up the events and references that are sent to ensure that only the data that is required is sent. It does so by a) filtering the events and references for the models that have been requested to be updated and b) cleaning up the references to ensure that only the references between objects are sent without duplicating any of the data.
-
holoviews.plotting.bokeh.util.
delete_refs
( obj , models=[] , dropped_attributes=[] , ignored_attributes=[] ) [source] ¶ -
Recursively traverses the object and looks for models and model attributes to be deleted.
-
holoviews.plotting.bokeh.util.
empty_plot
( width , height ) [source] ¶ -
Creates an empty and invisible plot of the specified size.
-
holoviews.plotting.bokeh.util.
expand_batched_style
( style , opts , mapping , nvals ) [source] ¶ -
Computes styles applied to a batched plot by iterating over the supplied list of style options and expanding any options found in the supplied style dictionary returning a data and mapping defining the data that should be added to the ColumnDataSource.
-
holoviews.plotting.bokeh.util.
filter_batched_data
( data , mapping ) [source] ¶ -
Iterates over the data and mapping for a ColumnDataSource and replaces columns with repeating values with a scalar. This is purely and optimization for scalar types.
-
holoviews.plotting.bokeh.util.
filter_toolboxes
( plots ) [source] ¶ -
Filters out toolboxes out of a list of plots to be able to compose them into a larger plot.
-
holoviews.plotting.bokeh.util.
font_size_to_pixels
( size ) [source] ¶ -
Convert a fontsize to a pixel value
-
holoviews.plotting.bokeh.util.
get_cmap
( cmap ) [source] ¶ -
Returns matplotlib cmap generated from bokeh palette or directly accessed from matplotlib.
-
holoviews.plotting.bokeh.util.
get_ids
( obj ) [source] ¶ -
Returns a list of all ids in the supplied object. Useful for determining if a json representation contains references to other objects. Since only the references between objects are required this allows determining whether a particular branch of the json representation is required.
-
holoviews.plotting.bokeh.util.
get_tab_title
( key , frame , overlay ) [source] ¶ -
Computes a title for bokeh tabs from the key in the overlay, the element and the containing (Nd)Overlay.
-
holoviews.plotting.bokeh.util.
hsv_to_rgb
( hsv ) [source] ¶ -
Vectorized HSV to RGB conversion, adapted from: http://stackoverflow.com/questions/24852345/hsv-to-rgb-color-conversion
-
holoviews.plotting.bokeh.util.
layout_padding
( plots , renderer ) [source] ¶ -
Pads Nones in a list of lists of plots with empty plots.
-
holoviews.plotting.bokeh.util.
mpl_to_bokeh
( properties ) [source] ¶ -
Utility to process style properties converting any matplotlib specific options to their nearest bokeh equivalent.
-
holoviews.plotting.bokeh.util.
mplcmap_to_palette
( cmap , ncolors=None ) [source] ¶ -
Converts a matplotlib colormap to palette of RGB hex strings.”
-
holoviews.plotting.bokeh.util.
pad_plots
( plots ) [source] ¶ -
Accepts a grid of bokeh plots in form of a list of lists and wraps any DataTable or Tabs in a WidgetBox with appropriate padding. Required to avoid overlap in gridplot.
-
holoviews.plotting.bokeh.util.
pad_width
( model , table_padding=0.85 , tabs_padding=1.2 ) [source] ¶ -
Computes the width of a model and sets up appropriate padding for Tabs and DataTable types.
-
class
holoviews.plotting.bokeh.util.
periodic
( document ) [source] ¶ -
Bases:
object
Mocks the API of periodic Thread in hv.core.util, allowing a smooth API transition on bokeh server.
-
holoviews.plotting.bokeh.util.
py2js_tickformatter
( formatter , msg='' ) [source] ¶ -
Uses flexx.pyscript to compile a python tick formatter to JS code
-
holoviews.plotting.bokeh.util.
references_json
( references ) [source] ¶ -
Generate json for supplied models. Modeled after bokeh’s private Document._references_json but ensures specific attributes are always synced.
-
holoviews.plotting.bokeh.util.
replace_models
( obj ) [source] ¶ -
Recursively processes references, replacing Models with there .ref values and HasProps objects with their property values.
-
holoviews.plotting.bokeh.util.
rgba_tuple
( rgba ) [source] ¶ -
Ensures RGB(A) tuples in the range 0-1 are scaled to 0-255.
-
holoviews.plotting.bokeh.util.
to_references
( doc ) [source] ¶ -
Convert the document to a dictionary of references. Avoids unnecessary JSON serialization/deserialization within Python and the corresponding performance penalty.
-
Context manager to ensures data sources shared between multiple plots are cleared and updated appropriately avoiding warnings and allowing empty frames on subplots. Expects a list of shared_sources and a mapping of the columns expected columns for each source in the plots handles.
widgets
Module
¶
-
class
holoviews.plotting.bokeh.widgets.
BokehServerWidgets
( plot , renderer=None , **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
BokehServerWidgets create bokeh widgets corresponding to all the key dimensions found on a BokehPlot instance. It currently supports to types of widgets sliders (which may be discrete or continuous) and dropdown widgets letting you select non-numeric values.
param ObjectSelector
sizing_mode
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=fixed, instantiate=False, objects=[u’fixed’, u’stretch_both’, u’scale_width’, u’scale_height’, u’scale_both’], pickle_default_value=True, precedence=None, readonly=False )-
param Boolean
editable
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the slider text fields should be editable. Disabled by default for a more compact widget layout.
-
param String
extensionjs
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=-1, readonly=False ) - Optional javascript extension file for a particular backend.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=250, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the widget box in pixels
-
param String
basejs
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=-1, readonly=False ) - Defines the local CSS file to be loaded for this widget.
param ObjectSelector
position
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[u’right’, u’left’, u’above’, u’below’], pickle_default_value=True, precedence=None, readonly=False )-
param String
css
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=-1, readonly=False ) - Defines the local CSS file to be loaded for this widget.
-
classmethod
create_widget
( dim , holomap=None , editable=False ) [source] ¶ -
” Given a Dimension creates bokeh widgets to select along that dimension. For numeric data a slider widget is created which may be either discrete, if a holomap is supplied or the Dimension.values are set, or a continuous widget for DynamicMaps. If the slider is discrete the returned mapping defines a mapping between values and labels making it possible sync the two slider and label widgets. For non-numeric data a simple dropdown selection widget is generated.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
get_widgets
( ) [source] ¶ -
Creates a set of widgets representing the dimensions on the plot object used to instantiate the widgets class.
-
inspect_value
= <functools.partial object> ¶
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Boolean


T5: 27th Jan 2016
What was the problem? For the racer game, I had no clue where to begin with my JavaScript file and didn’t feel like I had enough tools in my mental JS toolbox to start coding the game.
What problem solving techniques did you use? I first tried to nut it out using pen and paper to sketch and write notes about what I wanted to create and what kind of functionality I wanted. I moved onto pseudocode to get a very basic outline of what I thought the big steps were.
Then I googled and did some JS learning exercises and watched/read tutorials to feel more comfortable with the JS environment, syntax, conventions, etc.
I went back through the basic pseudocode multiple times to break it down into smaller and smaller steps and tried to come up with what I thought the correct order and grouping of steps would be best.
How did you feel throughout the process?  But I was also determined to create the game. I felt more comfortable with making a start after I completed some more online courses and had a better idea of what I wanted to create.
What did you learn? It helped to break down something that felt incredibly overwhelming into more manageable bite-sized chunks and typing out and thinking through the steps. Also, it helped starting off with something that I was comfortable with and new how to do (pen and paper scribbling).
What was the problem? In the racer game, the table needed to extend if the user increased the race track. Because my table had images and text in each cell, I needed to duplicate the cells rather than just adding in extra columns.
What problem solving techniques did you use? I googled to see how to duplicate columns and then experimented with clone and append until the table did what I wanted it to do.
How did you feel throughout the process? It’s always a nice feeling when you finally type in the right keywords into google and find what you’re looking for. And, of course, when something finally works it’s euphoric!
What did you learn? I learnt a bit more about the syntax and how to structure the code. Also, to try to think ahead about what potential issues the user might encounter and how to prevent / deal with those issues early.
Pseudocode: I’m confident trying the technique as I find it helps me try to break down the problem but am not so confident about whether I’m breaking down the problem properly.
Trying something: I’m quite confident to try different things through trial and error. I did get a bit wary at times not to do things like infinite loops in case it crashes the computer.
Rubber ducky method: Haven’t tried it yet. I think I’m holding off as I think I’d feel a bit silly - or that I’d enjoy it too much and spend the whole day chatting to the duck…. I often just talk myself through the problem in my head since I’m pretty much as non-tech as it gets.
Reading error messages: I try to read through all errors to try to decipher what has gone wrong. Not always successful in deciphering though.
Console.logging: I have no qualms about using it, I just need to remember to do it more often.
Googling: Google is my go-to resource if my pseudo coding, trying things, and reading error messages have not worked. Finding tutorials or online courses have helped and any resources that dissect things to explain each bit.
Asking your peers for help: I prefer to try to find out on my own first. Only if I’ve really hit a wall do I go to slack. In a classroom environment, I’m more likely to go to peers due to proximity and being in an environment that is more conducive to social interaction.
Asking coaches for help: Similar to the answer above.
Improving your process with reflection: Have tried to do this more often. Not always successful at improving my process but am more aware of what needs to be done better.
.map()
The map method takes a group of items (an array) and performs a set of conditions (function) to each item in the array in the order that they appear, then takes the results that that process generates to form a new array.
.filter()
Similar to the map method, the filter method takes a group of items (an array) and performs a set of conditions (function) to each item in the array in the order that they appear, but then takes only the results that pass/agree with the set of conditions that process generates to form a new array.
.reduce()
The reduce method takes a group of items (an array) and performs a set of conditions (function) to each item in the array in the order that they appear as well as to the result that each previous performance has generated in order to condense into a single value.
Iteration repeatedly (looping) performs a set of conditions (function) until the conditions no longer hold true.
Recursion repeatedly (looping) performs a set of conditions (function) that uses the result that each previous performance has generated as part of the next set of conditions until the conditions no longer hold true.
So more memory is required to process a recursive function because each time the set of conditions is performed, the value of the set of conditions changes and each of these different values must be remembered until the recursion has finished.


This page will generate a .mobileprofile which, when placed on your iOS device, will auto-connect to a VPN. You can exclude SSIDs from the autoconnect VPN rules.
The file generated on this page is done so in your browser - none of this information is sent to this web page. You also have the option of downloading this file and running it locally.


| Services |
| ChartShape |
This service is implemented by the chart presentation shape.
|
| CustomPresentation |
A custom presentation can show the pages of its presentation in a
customized order.
|
| CustomPresentationAccess |
This is a container for custom presentations.
|
| DateTimeShape |
This service is implemented by the date and time presentation shape.
|
| DocumentSettings |
describes properties that apply to the whole presentation document.
|
| DrawPage |
This is the service provided by a ::com::sun::star::drawing::DrawPage inside a
PresentationDocument.
|
| FooterShape |
This service is implemented by the footer presentation shape.
|
| GraphicObjectShape |
This service is implemented by the graphic presentation shape.
|
| HandoutShape |
This service is implemented by the handout presentation shape.
|
| HandoutView |
This componend integrates a view to a handout page inside a presentation
document into the desktop.
|
| HeaderShape |
This service is implemented by the header presentation shape.
|
| NotesShape |
This service is implemented by the notes presentation shape.
|
| NotesView |
This componend integrates a view to a handout page inside a presentation
document into the desktop.
|
| OLE2Shape |
This service is implemented by the OLE2 presentation shape.
|
| OutlineView |
This componend integrates an outline view to a presentation
document into the desktop.
In an outline view, the textual contents of presentation text objects
from all presentation pages are presentet as a continous outline text.
|
| OutlinerShape |
This service is implemented by the outline presentation shape.
|
| PageShape |
This service is implemented by the page presentation shape.
|
| Presentation |
This service is a presentation that is available from a
PresentationDocument via the
XPresentationSupplier interface.
|
| Presentation2 |
enhances the Presentation service to give access to a XPresentation2 interface.
|
| PresentationDocument |
This is the service provided by a presentation document.
|
| PresentationView |
This component integrates a view to a slide show of a presentation
document into the desktop.
|
| PreviewView |
This componend integrates a preview view to a slide show of a presentation
document into the desktop.
|
| Shape |
this service is supported from all shapes inside a PresentationDocument.
This usually enahnces objects of type ::com::sun::star::drawing::Shape with
presentation properties.
|
| SlideNumberShape |
This service is implemented by the slide number presentation shape.
|
| SlideShow |
|
| SlidesView |
This componend integrates a slides view to a presentation
document into the desktop.
In a slides view, the pages of a presentation document are displayed
to the user as thumbnails and can be arranged and cut/copied to/from
the clipboard.
|
| SubtitleShape |
This service is implemented by the subtitle presentation shape.
|
| TitleTextShape |
This service is implemented by the title and subtitle presentation shape.
|
| TransitionFactory |
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Welcome!
 You can safely receive, send and store Bitcoins and reach them wherever you are, on any device.
Currently, Coinvoy is in BETA and its interface is continuously being improved, while core wallet functionality is quite stable.
Thank you for joining our community.


Formula 1: Sainz claims McLaren's first podium since 2014 after 'unbelievable' race
SAO PAULO: Carlos Sainz's patience and determination was repaid in more ways than one on Sunday (Nov 17) when his first podium finish was confirmed by the race stewards, more than two hours after the Brazilian Grand Prix.
The highly-rated young Spaniard came home fourth on the road for McLaren in Sunday's tumultuous race, but was promoted to third when six-time world champion Lewis Hamilton was penalised - and then made to wait while his own race was investigated.
Finally, the stewards said he and McLaren had not contravened any regulations in the use of Drag Reduction System (DRS) under yellow flags during the race - to the delight of the team's long-suffering fans and Sainz's many admirers and supporters.
The result secured McLaren their first podium since both Jenson Button and Kevin Magnussen were classified in the top three at the 2014 Australian Grand Prix, ironically the first race in the current V6 turbo hybrid era.
"Good things come to those who wait... 2,072 days, 118 races, one group of loyal fans," McLaren said on Twitter.
The result secured fourth place in the constructors' championship for McLaren, their best finish since 2012.
It was an extraordinary effort by Sainz who had failed to set a time in qualifying and started from last place on the grid, the team choosing to take a new engine.
He went for a one-stop strategy which worked out in a race of two safety car interventions and many accidents.
"A podium!" said Sainz on Twitter. "A bit weird not being there after the race, but still extremely happy.
"Today's race was just unbelievable - the one-stop strategy was difficult, but it paid off."
Rivals Renault commented on Twitter: "Huge, huge congratulations to McLaren and Carlos Sainz. Both extremely dear to our hearts and both hugely deserving."
His compatriot and former McLaren team-mate Fernando Alonso said: "Fantastic! Well done team."


Warehouse Chief Klump:
Oh yeah? You're very cautious, I see. This game largely depends on luck, so I think it's a good idea to trust your intuition. When you feel like it, come back and challenge me again.


--- layout: null sitemap: false permalink: /add-draft.html ---
github.repo
github.branch
Because of the way this form works (the form data is not sumbitted, as forms usually do), your browser may not ask you to remember the username/password. If you'd like to save them to your password manager, fill them in and click this button. This will not create a new post!
Drag this link to your bookmarks, to post from any webpage: post to GitHub


Enter student ID:
Select transcript to upload:
Hash of student's transcript:
Enter student ID:
Select transcript to verify:
Transcript hash from uploaded file:
Transcript hash from blockchain:
This is an academic credential verification solution implemented on blockchain technology, a technology that made bitcoins possible. This solution reduces the process that takes several days into a few seconds!
Whether you're a student looking to expedite your transcript verification process, or a university waiting for other university to send the transcript of a particular student, this platform is the perfect starting point!


This worker model is enabled
This worker model is disabled
{{workerModel.last_spawn_err}}
{{workerModel.last_spawn_err_log}}