Real food do not have Ingredients, Real Food is Ingredients -- Ashutosh Kumar
Let's test with egg or chicken !


Previous: Operation and Files
Smudge: Troubleshooting
-
Smudge has only been compiled and tested on a LINUX box running Redhat7.0. However, it is known that there can
be problems using Qt-2.2.0 (the code produces a segmentation fault when run). Successful runs have only
been obtained so far after compiling and linking with Qt-2.3.0.
-
The most likely secondary cause of a "segmentation fault" on running chintz is the definition of a switch
in the smudge.ui file before the name to which it refers has been defined.
-
A complaint on compilation that a variable is not defined is likely to be where a switch is set for
a name which has not been defined at all
-
If tags are increctly speled or capitalized, or contain spaces, or are given an id=name where none is expected, they may be ignored (just as in HTML). This may lead to some
weird effects, especially if a termination tag is missing. Smudge tries to
check for tag errors and hopefully will produce a reasonable error message.
-
Setting the correct geometry is very important :- if two elements are given the same geometry, one will be
hidden behind the other, and will be invisible in chintz. Similarly, if elements are put into a frame which
is too small, they may not appear in the UI.
-
Buttons and CheckBoxes must be defined in the .ChintzDefaults file if their values are to be saved
correctly when they have not been modfied during the current session.
-
You can safely ignore errors of the form
rm: cannot remove `chintz.o': No such file or directory
make: *** [clean] Error 1
when running smudge
Back to Smudge Contents
Last modified: Fri Jan 25 23:53:58 GMT 2002


--- layout: data_model title: X509V3ExtensionsType this_version: 1.1 ---
The X509V3ExtensionsType captures the standard X509 V3 Extensions that may be used in X509 certificates. Based on RFC 3280, "Standard Extensions": http://www.ietf.org/rfc/rfc3280.txt.
| Field Name | Type | Description |
|---|---|---|
| Basic_Constraints0..1 | StringObjectPropertyType |
The Basic_Constraints field captures a multi-valued extension which indicates whether a certificate is a CA certificate. The first (mandatory) name is CA followed by TRUE or FALSE. If CA is TRUE then an optional pathlen name followed by an non-negative value can be included. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Name_Constraints0..1 | StringObjectPropertyType |
The Name_Constraints field captures a name space within which all subject names in subsequent certificates in a certification path MUST be located. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Policy_Constraints0..1 | StringObjectPropertyType |
The Policy_Constraints field captures any constraints on path validation for certificates issued to CAs. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Key_Usage0..1 | StringObjectPropertyType |
The Key_Usage element field captures a multi-valued extension consisting of a list of names of the permitted key usages. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Extended_Key_Usage0..1 | StringObjectPropertyType |
The Extended_Key_Usage field captures a list of usages indicating purposes for which the certificate public key can be used for. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Subject_Key_Identifier0..1 | StringObjectPropertyType |
The Subject_Key_Identifier field captures the identifier that provides a means of identifying certificates that contain a particular public key. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Authority_Key_Identifier0..1 | StringObjectPropertyType |
The Authority_Key_Identifier field captures the identifier that provides a means of identifying the public key corresponding to the private key used to sign a certificate. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Subject_Alternative_Name0..1 | StringObjectPropertyType |
The Subject_Alternative_Name field captures the additional identities to be bound to the subject of the certificate. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Issuer_Alternative_Name0..1 | StringObjectPropertyType |
The Issuer_Alternative_Name field captures the additional identities to be bound to the issuer of the certificate. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Subject_Directory_Attributes0..1 | StringObjectPropertyType |
The Subject_Directory_Attributes field captures the identification attributes (e.g., nationality) of the subject. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| CRL_Distribution_Points0..1 | StringObjectPropertyType |
The CRL_Distribution_Points field captures how CRL information is obtained. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Inhibit_Any_Policy0..1 | NonNegativeIntegerObjectPropertyType |
The Inhibit_Any_Policy field the number of additional certificates that may appear in the path before anyPolicy is no longer permitted. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Private_Key_Usage_Period0..1 | ValidityType |
The Private_Key_Usage_Period field captures the validity period for the private key, if it is different from the validity period of the certificate. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Certificate_Policies0..1 | StringObjectPropertyType |
The Certificate_Policies field captures a sequence of one or more policy information terms, each of which consists of an object identifier (OID) and optional qualifiers. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |
| Policy_Mappings0..1 | StringObjectPropertyType |
The Policy_Mappings field captures one or more pairs of OIDs; each pair includes an issuerDomainPolicy and a subjectDomainPolicy. The pairing indicates whether the issuing CA considers its issuerDomainPolicy equivalent to the subject CA's subjectDomainPolicy. Also equivalent to the object ID (OID) value of <IP_ADDRESS>. |


PyTorch Profiler v1.9 has been released! The goal of this new release (previous PyTorch Profiler release) is to provide you with new state-of-the-art tools to help diagnose and fix machine learning performance issues regardless of whether you are working on one or numerous machines. The objective is to target the execution steps that are the most costly in time and/or memory, and visualize the work load distribution between GPUs and CPUs.
Here is a summary of the five major features being released:
- Distributed Training View: This helps you understand how much time and memory is consumed in your distributed training job. Many issues occur when you take a training model and split the load into worker nodes to be run in parallel as it can be a black box. The overall model goal is to speed up model training. This distributed training view will help you diagnose and debug issues within individual nodes.
- Memory View: This view allows you to understand your memory usage better. This tool will help you avoid the famously pesky Out of Memory error by showing active memory allocations at various points of your program run.
- GPU Utilization Visualization: This tool helps you make sure that your GPU is being fully utilized.
- Cloud Storage Support: Tensorboard plugin can now read profiling data from Azure Blob Storage, Amazon S3, and Google Cloud Platform.
- Jump to Source Code: This feature allows you to visualize stack tracing information and jump directly into the source code. This helps you quickly optimize and iterate on your code based on your profiling results.
Getting Started with PyTorch Profiling Tool
PyTorch includes a profiling functionality called « PyTorch Profiler ». The PyTorch Profiler tutorial can be found here.
To instrument your PyTorch code for profiling, you must:
$ pip install torch-tb-profiler
import torch.profiler as profiler
With profiler.profile(XXXX)
Comments:
• For CUDA and CPU profiling, see below:
with torch.profiler.profile(
activities=[
torch.profiler.ProfilerActivity.CPU,
torch.profiler.ProfilerActivity.CUDA],
• With profiler.record_function(“$NAME”): allows putting a decorator (a tag associated to a name) for a block of function
• Profile_memory=True parameter under profiler.profile allows you to profile CPU and GPU memory footprint
Visualizing PyTorch Model Performance using PyTorch Profiler
Distributed Training
Recent advances in deep learning argue for the value of large datasets and large models, which requires you to scale out model training to more computational resources. Distributed Data Parallel (DDP) and NVIDIA Collective Communications Library (NCCL) are the widely adopted paradigms in PyTorch for accelerating your deep learning training.
In this release of PyTorch Profiler, DDP with NCCL backend is now supported.
Computation/Communication Overview
In the Computation/Communication overview under the Distributed training view, you can observe the computation-to-communication ratio of each worker and [load balancer](https://en.wikipedia.org/wiki/Load_balancing_(computing) nodes between worker as measured by granularity.
Scenario 1:
If the computation and overlapping time of one worker is much larger than the others, this may suggest an issue in the workload balance or worker being a straggler. Computation is the sum of kernel time on GPU minus the overlapping time. The overlapping time is the time saved by interleaving communications during computation. The more overlapping time represents better parallelism between computation and communication. Ideally the computation and communication completely overlap with each other. Communication is the total communication time minus the overlapping time. The example image below displays how this scenario appears on Tensorboard.
Figure: A straggler example
Scenario 2:
If there is a small batch size (i.e. less computation on each worker) or the data to be transferred is large, the computation-to-communication may also be small and be seen in the profiler with low GPU utilization and long waiting times. This computation/communication view will allow you to diagnose your code to reduce communication by adopting gradient accumulation, or to decrease the communication proportion by increasing batch size. DDP communication time depends on model size. Batch size has no relationship with model size. So increasing batch size could make computation time longer and make computation-to-communication ratio bigger.
Synchronizing/Communication Overview
In the Synchronizing/Communication view, you can observe the efficiency of communication. This is done by taking the step time minus computation and communication time. Synchronizing time is part of the total communication time for waiting and synchronizing with other workers. The Synchronizing/Communication view includes initialization, data loader, CPU computation, and so on Insights like what is the ratio of total communication is really used for exchanging data and what is the idle time of waiting for data from other workers can be drawn from this view.
For example, if there is an inefficient workload balance or straggler issue, you’ll be able to identify it in this Synchronizing/Communication view. This view will show several workers’ waiting time being longer than others.
This table view above allows you to see the detailed statistics of all communication ops in each node. This allows you to see what operation types are being called, how many times each op is called, what is the size of the data being transferred by each op, etc.
Memory View:
This memory view tool helps you understand the hardware resource consumption of the operators in your model. Understanding the time and memory consumption on the operator-level allows you to resolve performance bottlenecks and in turn, allow your model to execute faster. Given limited GPU memory size, optimizing the memory usage can:
- Allow bigger model which can potentially generalize better on end level tasks.
- Allow bigger batch size. Bigger batch sizes increase the training speed.
The profiler records all the memory allocation during the profiler interval. Selecting the “Device” will allow you to see each operator’s memory usage on the GPU side or host side. You must enable profile_memory=True
to generate the below memory data as shown here.
With torch.profiler.profile(
Profiler_memory=True # this will take 1 – 2 minutes to complete.
)
Important Definitions:
• “Size Increase” displays the sum of all allocation bytes and minus all the memory release bytes.
• “Allocation Size” shows the sum of all allocation bytes without considering the memory release.
• “Self” means the allocated memory is not from any child operators, instead by the operator itself.
GPU Metric on Timeline:
This feature will help you debug performance issues when one or more GPU are underutilized. Ideally, your program should have high GPU utilization (aiming for 100% GPU utilization), minimal CPU to GPU communication, and no overhead.
Overview: The overview page highlights the results of three important GPU usage metrics at different levels (i.e. GPU Utilization, Est. SM Efficiency, and Est. Achieved Occupancy).  Warps execute a bunch because the amount depends on the GPU. But at a high level, this GPU Metric on Timeline tool allows you can see the whole stack, which is useful.
If the GPU utilization result is low, this suggests a potential bottleneck is present in your model. Common reasons:
•Insufficient parallelism in kernels (i.e., low batch size)
•Small kernels called in a loop. This is to say the launch overheads are not amortized
•CPU or I/O bottlenecks lead to the GPU not receiving enough work to keep busy
Looking of the overview page where the performance recommendation section is where you’ll find potential suggestions on how to increase that GPU utilization. In this example, GPU utilization is low so the performance recommendation was to increase batch size. Increasing batch size 4 to 32, as per the performance recommendation, increased the GPU Utilization by 60.68%.
GPU Utilization: the step interval time in the profiler when a GPU engine was executing a workload. The high the utilization %, the better. The drawback of using GPU utilization solely to diagnose performance bottlenecks is it is too high-level and coarse. It won’t be able to tell you how many Streaming Multiprocessors are in use. Note that while this metric is useful for detecting periods of idleness, a high value does not indicate efficient use of the GPU, only that it is doing anything at all. For instance, a kernel with a single thread running continuously will get a GPU Utilization of 100%
Estimated Stream Multiprocessor Efficiency (Est. SM Efficiency) is a finer grained metric, it indicates what percentage of SMs are in use at any point in the trace This metric reports the percentage of time where there is at least one active warp on a SM and those that are stalled (NVIDIA doc). Est. SM Efficiency also has it’s limitation. For instance, a kernel with only one thread per block can’t fully use each SM. SM Efficiency does not tell us how busy each SM is, only that they are doing anything at all, which can include stalling while waiting on the result of a memory load. To keep an SM busy, it is necessary to have a sufficient number of ready warps that can be run whenever a stall occurs
Estimated Achieved Occupancy (Est. Achieved Occupancy) is a layer deeper than Est. SM Efficiency and GPU Utilization for diagnosing performance issues. Estimated Achieved Occupancy indicates how many warps can be active at once per SMs. Having a sufficient number of active warps is usually key to achieving good throughput. Unlike GPU Utilization and SM Efficiency, it is not a goal to make this value as high as possible. As a rule of thumb, good throughput gains can be had by improving this metric to 15% and above. But at some point you will hit diminishing returns. If the value is already at 30% for example, further gains will be uncertain. This metric reports the average values of all warp schedulers for the kernel execution period (NVIDIA doc). The larger the Est. Achieve Occupancy value is the better.
Overview details: Resnet50_batchsize4
Overview details: Resnet50_batchsize32
Kernel View The kernel has “Blocks per SM” and “Est. Achieved Occupancy” which is a great tool to compare model runs.
Mean Blocks per SM:
Blocks per SM = Blocks of this kernel / SM number of this GPU. If this number is less than 1, it indicates the GPU multiprocessors are not fully utilized. “Mean Blocks per SM” is weighted average of all runs of this kernel name, using each run’s duration as weight.
Mean Est. Achieved Occupancy:
Est. Achieved Occupancy is defined as above in overview. “Mean Est. Achieved Occupancy” is weighted average of all runs of this kernel name, using each run’s duration as weight.
Trace View This trace view displays a timeline that shows the duration of operators in your model and which system executed the operation. This view can help you identify whether the high consumption and long execution is because of input or model training. Currently, this trace view shows GPU Utilization and Est. SM Efficiency on a timeline.
GPU utilization is calculated independently and divided into multiple 10 millisecond buckets. The buckets’ GPU utilization values are drawn alongside the timeline between 0 – 100%. In the above example, the “ProfilerStep5” GPU utilization during thread 28022’s busy time is higher than the following the one during “Optimizer.step”. This is where you can zoom-in to investigate why that is.
From above, we can see the former’s kernels are longer than the later’s kernels. The later’s kernels are too short in execution, which results in lower GPU utilization.
Est. SM Efficiency: Each kernel has a calculated est. SM efficiency between 0 – 100%. For example, the below kernel has only 64 blocks, while the SMs in this GPU is 80. Then its “Est. SM Efficiency” is 64/80, which is 0.8.
Cloud Storage Support
After running pip install tensorboard, to have data be read through these cloud providers, you can now run:
torch-tb-profiler[blob]
torch-tb-profiler[gs]
torch-tb-profiler[s3]
pip install torch-tb-profiler[blob]
, pip install torch-tb-profiler[gs]
, or pip install torch-tb-profiler[S3]
to have data be read through these cloud providers. For more information, please refer to this README.
Jump to Source Code:
One of the great benefits of having both TensorBoard and the PyTorch Profiler being integrated directly in Visual Studio Code (VS Code) is the ability to directly jump to the source code (file and line) from the profiler stack traces. VS Code Python Extension now supports TensorBoard Integration.
Jump to source is ONLY available when Tensorboard is launched within VS Code. Stack tracing will appear on the plugin UI if the profiling with_stack=True. When you click on a stack trace from the PyTorch Profiler, VS Code will automatically open the corresponding file side by side and jump directly to the line of code of interest for you to debug. This allows you to quickly make actionable optimizations and changes to your code based on the profiling results and suggestions.
Gify: Jump to Source using Visual Studio Code Plug In UI
For how to optimize batch size performance, check out the step-by-step tutorial here. PyTorch Profiler is also integrated with PyTorch Lightning and you can simply launch your lightning training jobs with –trainer.profiler=pytorch
flag to generate the traces. Check out an example here.
What’s Next for the PyTorch Profiler?
You just saw how PyTorch Profiler can help optimize a model. You can now try the Profiler by pip install torch-tb-profiler
to optimize your PyTorch model.
Look out for an advanced version of this tutorial in the future. If you want tailored enterprise-grade support for this, check out PyTorch Enterprise on Azure. We are also thrilled to continue to bring state-of-the-art tool to PyTorch users to improve ML performance. We’d love to hear from you. Feel free to open an issue here.
For new and exciting features coming up with PyTorch Profiler, follow @PyTorch on Twitter and check us out on pytorch.org.
Acknowledgements
The author would like to thank the contributions of the following individuals to this piece. From the Facebook side: Geeta Chauhan, Gisle Dankel, Woo Kim, Sam Farahzad, and Mark Saroufim. On the Microsoft side: AI Framework engineers (Teng Gao, Mike Guo, and Yang Gu), Guoliang Hua, and Thuy Nguyen.


When are Ellen and Barney getting married?
At long last.
Alternatively, on Sunday 18th December, 2016.
Where is the wedding venue?
Leez Priory, Hartford End, Great Leighs, Chelmsford, CM3 1JP
Since you asked, it's a 16th-century mansion in the parish of Little Leighs, Chelmsford, Essex.
How do I get there?
We would suggest that walking should be avoided; not only because it puts a strain
on the knees, but also vehicular transportation can be much more comfortable in cold weather.
If you have access to a car, and are able to drive it, there is ample parking at the venue.
However, there are a number of reputable firms which when given the promise of payment at
the end of a journey, will provide you with both a vehicle and someone to drive it for you.
Sadly, you will either have to dismiss the driver after the conclusion of your journey, or pay them to wait patiently
outside, because we are regretfully unable to provide accommodation or refreshment to anyone
who is technically the paid staff of our guests, however temporary.
It is also true that while there is, unfortunately, no heli-pad or landing strip on the grounds, there
are a number of excellent fields nearby, whose bovine inhabitants would only be too delighted
to witness your arrival by helicopter or light aircraft.
Disapparation is strictly forbidden, on the grounds that it doesn't exist, and you
should be old enough by now to realise this.
What time should I arrive?
Depending on how precise you wish to be upon arrival, you could either arrive at the beginning
of the 21st Century and wait a few years, or simply arrive between midday and 12:45 on the 18th December, 2016.
We have exclusive use of the venue from 12, when welcome drinks will be available.
The ceremony is at 1pm sharp; if you are late, you may miss the ceremony, but more
importantly, you will miss the welcome drinks.
What is the itinerary for the day?
That would spoil the surprise.
We can tell you that it includes speeches, food, fizzy wine, a disco and possibly
some white doves, depending on how clean they are.
What time should evening guests arrive?
The evening's festivities begin at 6pm, with disco, an amazing feast of a platter, a bar and the
universe generally going foom.
What time will we get kicked out?
This entirely depends on how long your trousers stay on.
Assuming that you remain fully clothed and don't try and mount any statues,
carriages are either at midnight, or earlier if you drink so much you're sick.
Can I bring my children?
This would be much less weird than bringing someone else's children.
As parents ourselves, we appreciate that it can be difficult to arrange
childcare, so we are able to accomodate children on the day. Please let
us know in advance how many you're bringing, and their ages, as this
information is required by the venue, and the inevitable security firms
we'll need to keep an eye on them.
Can I bring my pets?
No.
How about confetti?
Petals that float on the breeze: yes.
Damp paper that sticks to your shoes: no.
Rice: double no.
Do you have a gift list?
In the four years we've been together, we have accumilated
two cars, four games consoles, innumerable Apple™ devices
a baby, two copies of 'Cards Against Humanity', 24 pairs of shoes,
two cats, three Swiss Army Knives and SO MUCH MORE.
Your company is gift enough.
Are you having a honeymoon?
When we can afford one, and when Oscar starts sleeping through
the night.
Know of any good hotels in Chelmsford?
Well, there are actually a limited number of bedrooms
available at the venue, including a slap-up breakfast
the following morning. Please contact us directly to check
prices and availability.
Alternatively, we also have details for local hotels and B&Bs.


ANOTHER EDIT: I’ve since moved away from using Pelican for this blog, but these instructions should still be useful to some.
EDIT: Updated push commands in Makefile to fix GH_TOKEN
security flaw.
As a graduate student in physics, I wanted to maintain a personal webpage to advertise my current research projects to other researchers in my field and for the purpose of shamelessly self-promoting the few skills I’ve gained in graduate school in case I might one day want a real job.
I had previously built a single-page website that was hosted on my department’s archaic SuSE Enterprise Linux server. This had a few downsides. To add content meant editing the raw HTML which often discouraged me from updating my page. Additionally, once I had made the desired changes on my local copy, I had to push the changes to GitHub and then ssh into the server and pull down the changes manually.
Pelican (and other static-site generators like Jekyll) solves this problem by letting you write all of your posts in Markdown and then auto-generating the HTML. I also found that several other people had looked into writing blog posts with Jupyter notebooks and had even written Pelican plugins to make this process easier! This made Pelican a natural choice for someone already familiar with Python and who wants to write blog posts that may include a mixture of equations, code, figures, and (Markdown) text.
Below I’ve detailed how I setup this blog using Pelican so that I can write posts in both Markdown and Jupyter notebooks and then publish the site on GitHub Pages using Travis CI. I’ve made sure to link to the many blogs/docs that helped me so make sure to check out all of those links as well.
Because we’re going to host the blog on GitHub, we need to set up a GitHub Pages repository. Basically this just involves creating a repository with the name <username>.github.io
(where <username>
is your GitHub username). Once you’ve created the repository, clone it and change into that directory:
$ git clone https://github.com/<username>.github.io.git
$ cd <username>.github.io
For a user site, GitHub will look for content on the master
branch of the repo. Because we want to separate the files we’ll be authoring and the actual content that will get served to the page, we’ll create a new branch, call it sources
, where we’ll do all of our work. Create the branch and switch to it:
$ git branch sources
$ git checkout sources
Pelican is a static site-generator written in Python. Think Jekyll, but in Python instead of Ruby. Because we’ll be working in Python, we can easily leverage the power of virtual environments via conda
. You can also do this with virtualenv
; most of the setup commands are roughly the same. (Note: If you aren’t using Anaconda to manage your Python installation, you’re missing out.)
Let’s setup an environment for our webpage and give it an original name, and activate it,
$ conda create --name webpage python=2.7
$ source activate webpage
Because we’ve isolated ourselves from the rest of our Python installation, we can easily manage all of the dependencies we need to get our blog up and running. First, let’s install Pelican, Markdown and ghp-import
(for force pushing content to master
):
$ pip install pelican markdown ghp-import
Additionally, I found that I needed Jupyter and IPython in order to get the IPython notebooks plugin to work so let’s go ahead and grab that too. (Note: Jupyter comes with a lot of dependencies so this may cause you’re install to be a bit bloated. Some packages can probably be safely removed though I haven’t looked into this):
$ pip install jupyter ipython
This should be all the dependencies we need so let’s go ahead and save all of the required modules:
$ pip freeze > requirements.txt
This will make our Travis CI build much easier to configure.
It’s finally time to build the site. To build the directory structure and create some of the needed files:
$ pelican-quickstart
Answer all of the questions according to how you want to setup your site. There will be a series of questions relating to how you want to publish your webpage. Answer n
to all (FTP
,SSH
,Dropbox
,S3
,Rackspace Cloud Files
) except GitHub pages
. This will auto-generate a Makefile option to make publishing easy. The resulting directory tree should look something like this:
├── Makefile
├── content/ #put your content here
├── develop_server.sh
├── fabfile.py
├── output/ #auto-generated content will go here
├── pelicanconf.py
└── publishconf.py
The pelicanconf.py
file defines all of the configuration for your site and has been pre-populated with the answers you supplied during the quickstart.
Pelican assumes any .md
file inside of content/
is a blog entry and will treat it as such. See here for more info on authoring content. Put any non-blog pages (e.g. “About”, “Contact”, “CV”, etc.) in a subdirectory content/pages/
. Pelican will treat these as non-chronological rather than just listing them in the blogroll.
Time to make some content and see if this worked! Write a test blog post and put it in content/
and a test About-me page and put it in content/pages/
:
content/my_first_blog.md
Title: Blogging with Pelican, Jupyter, GitHub, and Travis CI
Date: 2016-04-02 18:05
Category: Pelican
Tags: pelican, blogging, test
slug:a_test
Authors: Foo Bar
Summary: A test blog entry
This is my first blog entry and it is a test.
content/pages/about.md
---
Title: About
---
This is the about me page. Here are some things about me.
Now that we’ve written some content, we need to generate the raw HTML. The Makefile generated by pelican-quickstart
gives us an option for doing this:
$ make html
If you take a look in output/
, you’ll see all of your content there. However, for testing your site locally, it’d be nice to have these served and updated automatically. Again, the makefile provides us this option:
$ make devserver
If you navigate to localhost:8000
, you should see your page. As you make changes (e.g. add posts and pages, change themes, etc.), you should see these reflected your served HTML. To stop the server:
$ make stopserver
To customize the look of your webpage, Pelican provides the THEME
variable in pelicanconf.py
. There are many different Pelican themes and an official repository is maintained here. This website uses the pelican-bootstrap3 theme. To install a theme, first create a directory to store them (you may want to switch between a few):
$ mkdir themes/
You can either just copy the directory containing the theme you want into here or add the theme repository as a submodule. I’ve opted for the latter so that I can incorporate any updates to the theme:
$ cd themes/
$ git submodule add https://github.com/<theme_user>/<theme_repo>.git
Pelican also includes a tool for installing and managing your themes. Once you have the theme installed, set the THEME
variable in pelicanconf.py
appropriately:
THEME='themes/<my_installed_theme>'
To use Jupyter notebooks as posts, we’ll use plugins, a way to easily extend the functionality of your Pelican webpage. An official repository of plugins is maintained here. We’ll be using the pelican-ipynb which at the time of this writing has not yet been incorporated into the official plugin repository.
Following this approach by Cyrille Rossant, we’re going to have a directory for custom plugins(i.e. not in the official repo), plugins/
, and a directory with all of the official plugins, pelican-plugins
. The latter can be added as a submodule. You can off course pick-and-choose which plugins you want and just copy and paste those into a single directory if you want.
$ mkdir plugins
$ git submodule add https://github.com/getpelican/pelican-plugins.git
We need to tell Pelican where to look for these plugins and which ones we’ll be using. pelican-ipynb depends on Jake Vanderplas’s liquid_tags plugin (included in pelican-plugins
) so we’ll need to point to that one too. In pelicanconf.py
:
PLUGIN_PATHS=['pelican-plugins','plugins']
PLUGINS=['liquid_tags.notebook','ipynb.liquid',]
Follwing the pelican-ipynb installation guide, I’ve opted for “Mode B: Liquid Tags”. This will essentially allow us to inject notebook content straight into a normal .md
file. First, create a directory to store the notebooks,
$ mkdir content/notebooks
and add a notebook to this new directory (e.g. contents/notebooks/my_test_notebook.ipynb
). Then tell Pelican to preserve the path to this directory so that we can pull content from it. In pelicanconf.py
:
STATIC=['notebooks']
Finally, we can add this as a blog entry by injecting into a normal Markdown blog entry, contents/hello_jupyter.md
:
Title: Hello Pelican with Jupyter!
Date: 2016-04-03 0:54
Category: Pelican
Tags: pelican, python, jupyter
slug:hello-jupyter
Authors: Foo Bar
Summary: This blog post was written in a Jupyter notebook. It can be included in a post using a liquid tag.
{% notebook notebooks/my_test_notebook.ipynb %}
This post should now be available on your main blog roll and the content should all be rendered from your Jupyter notebook, figures, LaTeX, Markdown, and all!
Now we want to publish our site with GitHub Pages. By default, any content on the master
branch of your repo will be available at <username>.github.io
. Every time we edit our content on the sources
branch and push it to GitHub, we would like these changes to be reflected on our actual site.
A continuous integration service like Travis CI allows you to leverage GitHub’s web hooks to trigger builds of your website at each commit to sources
.
Login to Travis CI with your GitHub username and enable your <username>.github.io
repository. Then we need to provide a .travis.yml
configuration file to tell Travis what to do at each commit. The .travis.yml
for this blog looks like:
language: python
python:
- '2.7'
sudo: required
branches:
only:
- sources
install:
- pip install -r requirements.txt
script:
- make publish github
env:
global:
secure: xxxxxxxxx
This tells Travis that we’re using Python, version 2.7, that we only want to trigger builds when pushing to the sources
branch, to install every package in our requirements.txt
file, and to run the make
with the publish github
option. This will use ghp-import
to put a copy of everything in output/
on master
and then do a force push to master
This last line contains a key that will allow Travis to do a force push to the master
branch. Generate using the instructions listed here. Finally, in order to give Travis all the permissions it needs for the force push, replace the second line in the github: publish
block of Makefile
with:
@git push -fq<EMAIL_ADDRESS>$(GITHUB_PAGES_BRANCH)
The @
symbol in front of this line in the Makefile and the -q
flag suppress all output related to this step in the build. Not doing so will result in your GH_TOKEN
, which we’ve gone to the trouble of encrypting, being published to your public Travis build logs.
That’s pretty much it. Author some posts, add a theme and push to the sources
branch and Travis and GitHub should take care of the rest. You can see any errors that get thrown by going to your Travis CI homepage. For a complete working example, check out the source for this site on my GitHub page.
Without the plethora of blogs and tutorials on Pelican, GitHub, and Travis that already exist, setting up this blog would have been much more difficult (read impossible). Here are some resources that I found really helpful while putting this all together:


Oliebollen (Dutch Doughnuts)
This deep fried snack is often eaten around New Years Eve. This recipe is with raisins and currants, the more common way to eat it. However, you can also add dried fruit or apple pieces instead. The oliebollen freeze extremely well. To reheat, just warm in the oven for a few minutes.
metadata
Created on 2020-04-13 Last updated on 2020-04-17
Recipe should yield this much: 20 oliebollen.
Estimated time needed: At least 108 minutes. At most 123 minutes.
Ingredients
| 500 | g | flour | ||
| 333 | ml | beer | preferably a tripel or quadrupel, if you don't want to use beer, replace with milk | |
| 200 | g | hot water | ||
| 80 | ml | milk | at room temperature | |
| 70 | g | raisins | ||
| 40 | g | currants | dried zante currants, can be replaced by more raisins | |
| 40 | g | butter | ||
| 20 | g | sugar | ||
| 10 | g | active dry yeast | 10 g active dry yeast can be replaced by 35 g fresh yeast | |
| 7 | g | salt | use a bit less if using salted butter | |
| 2 | l | vegetable oil | make sure that the oil doesn't burn at 180 ℃, we use sunflower oil | |
| 2 | egg | |||
| 1 | tsp | lemon juice |
Scaling
Timeline
Directions
⌛ Active time 2 minutes | Passive time 15 minutes
- 70 g raisins
- 40 g currants | dried zante currants, can be replaced by more raisins
- 200 g hot water
Soak raisins and currants:
Soak the raisins and currants in hot water for 10-15 minutes.
⌛ Active time 1 minutes
- 333 ml beer | preferably a tripel or quadrupel, if you don't want to use beer, replace with milk
- 80 ml milk | at room temperature
- 10 g active dry yeast | 10 g active dry yeast can be replaced by 35 g fresh yeast
Dissolve yeast in liquid:
Mix together the milk and beer. The liquid should be slightly above room temperature before you add yeast. If it's not warm enough yet, warm the liquid slightly in the microwave oven. However, be careful, as you don't want the liquid to be hot. When the right temperature is reached, add the yeast and stir to dissolve it. The mixture should start to form bubbles on the surface when you let it sit for a few minutes (indicating that the yeast is alive).
⌛ Active time 1 minutes
- 40 g butter
- 500 g flour
- 2 egg
- 20 g sugar
Mix ingredients:
Soften (but don't melt) the butter. Add flour, sugar, egg and the softened butter to a kitchen machine or mixer bowl. Mix using the flat beater.
⌛ Active time 1 minutes | Passive time 1 minutes
Add the beer and milk:
Carefully add the beer liquid while mixing on low. Be careful to not overmix the batter.
⌛ Active time 1 minutes
Dry the fruits:
When the raisins and currants have been soaking for 10-15 minutes, remove them from the bowl with water and put on a paper towel to dry. Pat dry with paper towel
⌛ Active time 1 minutes | Passive time 1 minutes
- 7 g salt | use a bit less if using salted butter
- 1 tsp lemon juice
Add the rest of the ingredients:
Carefully add the salt, lemon juice, raisins and currants to the batter. Again, try not to mix too much.
⌛ Active time 1 minutes | Passive time 40 minutes
Proof for 40 minutes:
Cover the bowl and let the batter proof for half an hour at room temperature. The batter will almost double in size, so make sure the bowl is large enough.
⌛ Active time 1 minutes | Passive time 15 minutes
Beat once, proof 15 minutes:
Using a large spoon, beat the dough once. Just go all the way down to the bottom of the bowl, and lift the spoon again, using a circular motion. The batter should shrink a bit. Now cover the bowl again and let it rise for 15 more minutes.
⌛ Active time 1 minutes | Passive time 10 minutes
- 2 l vegetable oil | make sure that the oil doesn't burn at 180 ℃, we use sunflower oil
Heat oil in pan:
Fill a large pan with oil. Heat the oil to 180 ℃. Our target deep frying temperature is 175, but the oil will cool down when batter is added.
⌛ Active time 20 minutes | Passive time 5 minutes
Deepfry the doughnuts:
When your oil is the right temperature and the batter has risen enough, it is time to deep fry. Fill an ice cream spoon (or normal spoon) with batter. Then scrape the batter off, into the oil, using a spoon. If everything is going great, the balls will turn themselves when ready. If not, just use your skimmer to turn them when one side gets golden brown. Try to fry about 4 doughnuts (or less) at a time, and check once it a while that the temperature is around 175 ℃. You can also check whether your temperature and time are good by cutting through one of your first batch doughnuts. If it is too greasy, turn up the heat a little.
⌛ Active time 1 minutes | Passive time 5 minutes
Cool down:
When the doughnuts are done deep frying, lift them out of the oil with the skimmer. Put them on a paper towel to let some oil drip off. After a few minutes, move to a cooling rack, so the oliebollen remain crisp on the outside. Serve with powdered sugar.


Light-Weight, High-Performance & Easily Customizable
LittleCub supports two styles of API, native and jQuery. If you only use Native API, you won't need to include the jQuery library.
LittleCub
is the global namespace of this library. It is the entry API for you to
initialize a form control and render it as HTML markups within a DOM element.
Native API for initializing a new form control based on the input parameters.
All four parameters are optional. However you will need to at least provide one of the data
,
configs
and schema
parameters.
Instead of using LittleCub
, you can also use its short name LC
.
An initialized LittleCub form control.
| Name | Description | Type | Required |
|---|---|---|---|
| data | Initial JSON data that will be bound to the rendered form control. It
will also be used to
decide the control type if the configs and schema don't provide that
information.
|
json | No |
| configs | A JSON document that contains all control related settings such as control type, size of text field etc. | json | No |
| schema | A JSON schema document that describe data structure, format and validation rules. | json | No |
| domElem | A DOM element that will server as the container element for the form control rendition.
If this parameter is provided, LittleCub will render the form control as HTML markups
based on the control's theme and template setting. Otherwise, it will only initialize the
control and you will need to use the control's render method for form rendition.
|
DOM | No |
// Example 1 // Renders a single text control within the DOM element with id text-control-1. // The text field has initial value Sample. var textControl1 = LittleCub("Sample", null, null,document.getElementById('text-control-1')); // Example 2 // Initializes a text control and bind it with data sample. But no form rendition as this point. var textControl2 = LittleCub("Sample"); // Now renders the text control within the DOM element with id text-control-2 textControl2.render(document.getElementById('text-control-2')); // Uses the same control to render a new text control into // a different DOM element with different data. textControl2.render(document.getElementById('text-control-3'), "Sample2"); // Example 3 // Renders an array control with a dynamic list of text controls. var arrayControl1 = LittleCub(["Sample1","Sample2"], null, null, document.getElementById('array-control-1')); // Renders the same array data as a drop-down select control because of the settings in configs. var selectControl1 = LittleCub(["Sample1","Sample2"], { "type" : "select" }, null,document.getElementById('select-control-1')); // Renders an array control with a dynamic list of text controls. // Each text field has length 25 and a validation error will be displayed // is the length of text input is less than 4. var arrayControl2 = LittleCub(["Sample1","Sample2"], { "type" : "array", "items" : { "type" : "text", "size" : 25 } }, { "type" : "array", "items" : { "type" : "string", "minLength" : 4 } },document.getElementById('array-control-2'));
jQuery API that has same behavior as the Native API. Instead of using $.littlecub
, you can also
use its short name $.lc
.
jQuery API that initializes form control(s) and renders the form controls into the DOM element(s) returned from the jQuery selector.
Instead of using $(selector).littlecub
, you can also use its short name
$(slector).lc
.
Single form control if the jQuery selector returns single DOM element. List of form controls if the selector returns multiple DOM elements.
// Renders single text field within the DOM element with id text-control-1. var textControl1 = $('#text-control-1').lc("Sample"); // Renders a text field for each DOM element with class text-control. var textControls = $('.text-control').lc("Sample"); // Renders an array control with a dynamic list of text controls. var arrayControl1 = $('#array-control-1').lc(["Sample1","Sample2"], { "type" : "array", "items" : { "type" : "text", "size" : 25 } }, { "type" : "array", "items" : { "type" : "string", "minLength" : 4 } });
Generate a unique LittleCub id such as lc-12
.
A unique LittleCub id.
LittleCub.id();
Retrieve control class for provided data type or register a default control class to data type mapping if both type and class parameters are provided.
The mapped control class.
| Name | Description | Type | Required |
|---|---|---|---|
| type | Data type defined by JSON schema | string | Yes |
| controlClass | Control class | class | No |
// Registers the text control class to type string mapping. LittleCub.typeControlClass("string", LittleCub.TextControl); // Retrieves the control class mapped to type string. LittleCub.typeControlClass("string");
Retrieve control class for provided format or register a control class to format mapping if both format and class parameters are provided.
The mapped control class.
| Name | Description | Type | Required |
|---|---|---|---|
| format | Data format defined by JSON schema | string | Yes |
| controlClass | Control class | class | No |
// Registers the email control class to format email mapping. LittleCub.formatControlClass("text", LittleCub.EmailControl); // Retrieves the email control class mapped to type text. LittleCub.formatControlClass("email");
Retrieve control class for provided control type or register a control class to control type mapping if both type and class parameters are provided.
The mapped control class.
| Name | Description | Type | Required |
|---|---|---|---|
| controlType | Control type | string | Yes |
| controlClass | Control class | class | No |
// Registers the text control class to type text mapping. LittleCub.typeControlClass("text", LittleCub.TextControl); // Retrieves the text control class mapped to type text. LittleCub.typeControlClass("text");
Log a message with the provided logging level. The logging will happen if the provided logging level is same or
higher than the global logging level which is defined by LittleCub.logger.level
.
None
| Name | Description | Type | Required |
|---|---|---|---|
| log | Logging level. The mapping for logging level looks like {0: 'debug', 1: 'info', 2: 'warn', 3:
'error'} |
integer | Yes |
| msg | Message to be logged. | string | Yes |
// Logs a debug message LittleCub.log(0,"Debugging message");
Makes a deep copy of the provided source JSON document.
A deep copy of the source JSON document.
| Name | Description | Type | Required |
|---|---|---|---|
| json | Source JSON document to be cloned | json | Yes |
var json1 = {"foo" : "bar"}; var json2 = LittleCub.cloneJSON(json1);
Register a theme with the given ID.
None
| Name | Description | Type | Required |
|---|---|---|---|
| theme | Theme definition JSON document. | object | Yes |
| themeId | Unique theme id that the theme will be registered with. | string | Yes |
LittleCub.registerTheme({ "id" : "bootstrap-horizontal", "parent" : "bootstrap", "title" : "Horizontal Twitter Bootstrap Theme", "description" : "Twitter bootstrap theme for rendering basic forms with horizontal styles." });
Locate the theme with the given theme ID and then find the theme configuration with the given config ID.
Theme configuration with the given config ID.
| Name | Description | Type | Required |
|---|---|---|---|
| configId | Theme configuration ID. | string | Yes |
| themeId | Theme ID of the target theme. If not provided, it will pick the default theme. | string | No |
LC.findThemeConfig("injection", that.configs["theme"]);
Locate the theme with the given theme ID and then find the message associated with the theme with the given message ID and locale.
None
| Name | Description | Type | Required |
|---|---|---|---|
| messageId | Message ID. | string | Yes |
| themeId | Theme ID of the target theme. If not provided, it will pick the default theme. | string | No |
| Locale | Language locale. If not provided, it will pick the default locale. | string | Yes |
validation["message"] = LC.findMessage("isDatetime", this.configs["theme"]);
Locate the theme with the given theme ID and then find the template associated with the theme with the given template ID.
A compiled template.
| Name | Description | Type | Required |
|---|---|---|---|
| themeId | Theme ID of the target theme. If not provided, it will pick the default theme. | string | No |
| templateId | ID of the template to be found. | string | Yes |
var template = LC.findTemplate(this.configs["theme"], "control_messages");
Locate the theme with the given theme ID, find the template associated with the theme with the given template ID and render the template with the given data.
String from the rendition.
| Name | Description | Type | Required |
|---|---|---|---|
| themeId | Theme ID of the target theme. If not provided, it will pick the default theme. | string | No |
| templateId | ID of the template to be found. | string | Yes |
| data | Source data for template rendition. | json | Yes |
elem.innerHTML = LC.renderTemplate(child.configs["theme"], "array_item_toolbar", child.configs);
Compile and register the given template with the Handlebars under the give id. It can be either placed in the template namespace or registered as a reusable partial.
None
| Name | Description | Type | Required |
|---|---|---|---|
| id | Template id that template will be registered under. | string | Yes |
| template | Template to be registered. | string | Yes |
| isTemplate | Registered as template if true. | boolean | No |
LittleCub.registerTemplate(id, templateContent.trim(), true);
Load set of themes from HTML files and then call the callback once all themes are loaded.
None
| Name | Description | Type | Required |
|---|---|---|---|
| themes | A list of theme id and theme file path pairs. | object | Yes |
| callback | Callback function that will be executed once all themes are loaded. | function | No |
LittleCub.loadThemes({ "bootstrap" : "../../../themes/bootstrap/bootstrap.html", "bootstrap-horizontal" : "../../../themes/bootstrap/bootstrap-horizontal.html" }, function() { ... });
A deep comparison of two JSON objects.
True if two objects are identical.
| Name | Description | Type | Required |
|---|---|---|---|
| obj1 | Source JSON object to be compared. | json | Yes |
| obj2 | Target JSON object to be compared. | json | Yes |
var isSame = LC.compare([{"foo" : "bar"}], ["foo"]);
Check if the given object is either NULL or undefined.
True if the given object is either NULL or undefined.
| Name | Description | Type | Required |
|---|---|---|---|
| obj | JSON object to be checked. | json | Yes |
// Returns false. var isEmpty = LC.isEmpty("");
Check if the given object has an empty value ( such as "" for string, [] for an array, {} for an object etc.).
True if the given object has empty value.
| Name | Description | Type | Required |
|---|---|---|---|
| obj | JSON object to be checked. | json | Yes |
// Returns true. var isValEmpty = LC.isValEmpty([]);
Once a form control is created by the LittleCub
API, we will have access to the
control's members
and methods
for further operations. BaseControl
class is the common ancestor of all control
classes. Therefore
all controls
should have the members and methods from BaseControl
.
List of members that are available from BaseControl.
| Name | Description | Type |
|---|---|---|
| data | Data bound to the control. | json |
| schema | Schema bound to the control. | json |
| configs | Control configuration. | json |
| container | The outer DOM element that the control's highest ancestor is rendered into. | DOM |
| id | Unique LittleCub ID for the control. | string |
| path |
The path for the root control is /. And the path for its descendant will be calculated based on
its parent's
path and its property key or item index if it is part of an array. For example, for the
following json data
{ "foo" : "bar", "foo1" : { "foo11" : ["bar11", "bar12"] } }The path for the control mapped to foo11 will be /foo1/foo11 and the
path for
bar12 will be /foo1/foo11[1] .
|
string |
| parent | The parent control of the current control. It will be null if this control is the root one. | control |
| children | List of child controls of the current control. | |
| field | HTML field that rendered for this control. | DOM |
| outerEl | The outer most DOM element of the control rendition. | DOM |
| messagesContainer | The container DOM for validation messages. | DOM |
List of members that are provided by BaseControl.
Initialize control data, schema and configs. This method will be invoked when you call LittleCub
API to create the control. So this API should only be used when you try to extend it in your custom control.
None
| Name | Description | Type | Required |
|---|---|---|---|
var control = new controlClass(data, configs, schema); control.init();
Bind data with the control. This method will be invoked when you call LittleCub
API to create the control. So this API should only be used when you try to extend it in your custom control.
None
| Name | Description | Type | Required |
|---|---|---|---|
| data | Data to be bound to the control. | json | Yes |
Validation the control according to its schema.
The control itself.
| Name | Description | Type | Required |
|---|---|---|---|
| validateChildren | Validate children controls. | boolean | No |
var control = control.validate(); var control2 = control2.validate(true);
Check if a control is valid or not. Validation will triggered if skipValidation
is not set as true.
True if the control is valid.
| Name | Description | Type | Required |
|---|---|---|---|
| skipValidation | Skip the actual validation. | boolean | No |
var isValid = control.isValid();
Returns the event that will trigger the validation.
Validation event.
| Name | Description | Type | Required |
|---|---|---|---|
var validationEvent = control.validationEvent();
Bind event listeners and also fire lc-update
event when the control field is updated.
None
| Name | Description | Type | Required |
|---|---|---|---|
Find control based on its path.
Control with the given path.
| Name | Description | Type | Required |
|---|---|---|---|
| path | Path to the control. | string | Yes |
var childControl = control.controlByPath("/foo/bar");
Bind DOM elements to the control such as HTML field, outer element etc.
None
| Name | Description | Type | Required |
|---|---|---|---|
control.bindDOM();
Render the control into the provided container with the given data.
None
| Name | Description | Type | Required |
|---|---|---|---|
| container | The DOM element that the control will be rendered into. | DOM | Yes |
| data | Data to be rendered with. If not provided, it will user the data bound to the control. | json | No |
| mode |
|
string | No |
objectControl.render(document.getElementById('content2'), data); objectControl.render(document.getElementById('content3'), data, 'insertAfter');
Return control value or set control value if obj parameter is provided.
Control value
| Name | Description | Type | Required |
|---|---|---|---|
| obj | Value to be set. | json | No |
var val = control.val(); control.val({"foo" : "bar"});
None
| Name | Description | Type | Required |
|---|---|---|---|
LittleClub provides a set of custom helpers for its theme templates.
Iterate over an object, setting 'key' and 'value' for each property in the object.
{{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}}
{{#key_value table}}
 {{#key_value value}}  {{#each value}} {{#object_with_key ../../../controls key=this}}
{{include 'control'}}
 {{/object_with_key}} {{/each}} 	 {{/key_value}}
 {{/key_value}}
Iterate over an object containing other objects. Each inner object will be used in turn, with an added key ("myKey") set to the value of the inner object's key in the container.
{{#each_with_key container key="myKey"}} ... {{/each_with_key}}
{{#key_value table}}
 {{#each_with_key container key="myKey"}} {{myKey}} {{/each_with_key}}
Iterate over an object, setting 'key' and 'value' for each property in the object.
{{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}}
{{#key_value table}}
 {{#key_value value}}  {{#each value}} {{#object_with_key ../../../controls key=this}}
{{include 'control'}}
 {{/object_with_key}} {{/each}} 	 {{/key_value}}
 {{/key_value}}
Iterate over an object, setting the context for the inner template code with the "key" parameter.
{{#object_with_key obj key=context}} ... {{/object_with_key}}
{{#object_with_key ../../../controls key=this}}
{{include 'control'}}
 {{/object_with_key}}
Render the template specified by the templateId with the context data.
{{include templateId}}
{{#each controls}} {{include 'array_item_toolbar'}} {{include 'control'}} {{/each}}
Render the context which is a control.
{{injectControl}}
{{injectControl}}
Conditional helper for checking if the control is container or not.
{{#isContainer type}} ... {{else}} ... {{/isContainer}}
{{#isContainer type}} {{injectControl}} {{else}}  {{include 'control_label'}}
 {{injectControl}}
 {{include 'control_helper'}}   {{/isContainer}}
Conditional helper for checking if the control belongs to given types. If multiple types are provided, their type names need to be separated by space.
{{#isType type(s)}} ... {{else}} ... {{/isType}}
{{#isType 'radio checkbox'}} {{injectControl}} {{else}} {{include 'control_label'}} {{injectControl}} {{include 'control_helper'}} {{/isType}}


"Bigfoot Watcher Chasing Chemtrails Records a UFO"
by David PescovitzAt Mysterious Universe, Paul Seaburn writes:
In what can be considered an unusual convergence of conspiracy theories, a man who runs a Bigfoot videos YouTube channel was chasing chemtrails when he claimed to have recorded a UFO chasing them as well. If you’re playing Conspiracy Scrabble, ‘Chemtrail’, ‘Bigfoot’ and ‘UFO’ is a triple-word score.
According to his commentary during the video, Marc Abell –the CEO of Colorado Bigfoot, a provider of Bigfoot videos – was recording a plane making a contrail over a snow-covered terrain in Vail, Colorado, and believed the color and shape changes in the contrail were signs that the plane was actually spraying something rather than just trailing the usual water vapor and jet exhaust.
That's when Abell spotted the UFO.


class TrainSVM The class TrainSVM trains SVM using data from class DataLoader and returns the trained data into a XML file
More...
#include <TrainSVM.hpp>
|
|
cv::Ptr< cv::ml::SVM > | svm = cv::ml::SVM::create() |
| | Instance to store parameters needed for SVM of type cv::Ptr<cv::ml::SVM>
|
| |
|
DataLoader | loadData |
| | Instance to take data from class DataLoader.
|
| |
class TrainSVM The class TrainSVM trains SVM using data from class DataLoader and returns the trained data into a XML file
constructor TrainSVM
- Parameters
-
- Returns
- none
initialising SVM model and setting up default values for the parameters
for EPSILON_SVR, epsilon in loss function?
From paper, soft classifier
destructor TrainSVM
- Parameters
-
- Returns
- none
| bool TrainSVM::directoryExist |
( |
const std::string & |
pathname | ) |
|
Function to check existing directory.
- Parameters
-
- Returns
- true or false as bool value The following function checks either the file exist or not and returns 'true' if exist and 'false' if not
| cv::Mat TrainSVM::prepareData |
( |
| ) |
|
Function to change data format into format used by OpenCV's SVM train method.
- Parameters
-
- Returns
- training data of type cv::Mat
temp is used to store data values in the format as required to train the SVM model
| void TrainSVM::saveSVM |
( |
std::string |
filename | ) |
|
Function to save trained SVM.
- Parameters
-
- Returns
- none The following function saves trained SVM in a file and takes the filename
| void TrainSVM::setNegDirectory |
( |
std::string |
dir | ) |
|
Function to set directory for negative images.
- Parameters
-
- Returns
- none The following function saves the negative images in a directory
| void TrainSVM::setPosDirectory |
( |
std::string |
dir | ) |
|
Function to set directory for positive images.
- Parameters
-
- Returns
- none The following function saves the positive images in a directory
| void TrainSVM::startTraining |
( |
| ) |
|
Function to start training.
- Parameters
-
- Returns
- none The following function initiates SVM training
The documentation for this class was generated from the following files:


Java Hamcrest
Matchers that can be combined to create flexible expressions of intent
API Reference Documentation (JavaDoc)
Lastest Version
JavaHamcrest 2.2
Previous Versions
JavaHamcrest 2.1
JavaHamcrest 1.3
JavaHamcrest <IP_ADDRESS>


{% capture panel_body %}
RSVP for the Day of Action
Take action on Tuesday June 23.
Let's Go
{% endcapture %} {% include panels/panel_empty.html form_class='smaller-form no-gutter'%}


Clear Field
Submit Signature
This text cannot be selected when you draw on the above canvas.
Get signature.js
.


Select a company
Event Trace
Change
Select
Popup Hide
Popup Shown
Before Shown
Search
ActionComplete
ActionFailure
ActionSuccess
DataBound
PopupResizeStart
PopupResize
PopupResizeStop


{{#each categories as category}} {{#each category.things as thing}}
{{category.name}}: {{thing.name}}


Guillaume Calmettes
So far, we have seen how to compare whole groups
of individuals (ex: basketball wins with vs without a sell-out crowd, commuting times on steel vs carbon bike frame, performance score improvement with or without sleep deprivation, etc ...).
all of these studies used an independent groups design (no systematic connections relating individuals in one group to individuals in another group)
Today we will learn about a different study design based on pairs of units.
For many situations, such a paired design allow more focused comparisons.
How would you go about collecting your data for each of the following:
Paired samples (also called dependent samples) are samples in which natural or matched couplings occur. This generates a dataset in which each data point in one sample is uniquely paired to a data point in the second sample.
Two data sets are "paired" when the following one-to-one relationship exists between values in the two data sets:
For a paired design, response values (explanatory groups)
come in pairs, with one response value in the pair for each group.
The data pairing can come from:
when a paired design is possible, you typically get more informative results because units within a pair tend to be similar to each other. When pairing is effective, differences within such each pair on the response variable tend to be due mainly to the explanatory variable.
Can you study with music blaring? Does the presence of lyrics hurt students' ability to focus on their work?
Response variable: Memorization game score (ex: number of words students can remember from a sheet).
Explanatory variable: music with or without lyrics
Independent study design
Randomly assign students to two separate groups:
- one group that will listen music with lyrics
- one group that will listen music without lyrics
Paired study design
Paired design using repeated measures.
Each student will play the memorization game twice:
- once listening music with lyrics
- once listening music without lyrics
Paired design using matching.
Another way to create pairs could use a pretest to rank students according to how many words they could memorize and create pairs of students with similar abilities.
Pairing often makes it easier to detect statistical significance.
Can we still have random assignment and make cause-and-effect conclusions in paired design?
In our memorizing with or without lyrics example, if we see significant improvement in performance:
Randomly assign each person to which song they hear first: with lyrics first, or without. This cancels out any “experience” effect
Can we use pairing in observational studies?
Yes!
ex: If you are interested in which test was more difficult in a course, the first or the second, compare the average difference in scores for each individual (this takes away the variability in general learning abilities).
The 2008 Olympics were full of controversy about new swimsuits possibly providing unfair advantages to swimmers, leading to new international rules that came into effect January 1, 2010, regarding swimsuit coverage and material.
Can a wetsuit really make someone swim faster? How much faster?
Twelve competitive swimmers and triathletes swam 1500m at maximum speed twice each, once wearing a wetsuit and once wearing a regular suit
The order of the trials was randomized
Maximum velocity (m/sec) recorded (one of several possible outcomes)
$H_0: \mu_\textrm{Wetsuit}-\mu_\textrm{No Wetsuit}=0$
$H_a: \mu_\textrm{Wetsuit}-\mu_\textrm{No Wetsuit}>0$
($H_a: \mu_\textrm{Wetsuit}-\mu_\textrm{No Wetsuit}\neq0$)
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
NHST of means difference
(pooling the two samples, shuffling and splitting into two groups)
Using this naive method, we do not find any association between wearing a wetsuit and swimming speeds.
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
However, taking a closer look at the data, we see that every single swimmer swam faster wearing the wetsuit!
Surely this must provide conclusive evidence that swimmers are faster wearing a wetsuit.
What went wrong in our analysis?
We failed to take into account the paired structure of the data.
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
Wetsuit study:
Swimmers
Triathletes
Not surprisingly, there is a great deal of variability in the maximum velocities of the swimmers (individual variability among the observational units).
Because of all this variability, it is difficult to tell whether the difference in mean swim speed observed in the sample represents a real difference or is just due to random chance.
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
The key to analyzing paired data is to work with the difference within each pair of data values rather than between the two original samples.
This helps us to eliminate the variability across different units (different swimmers) and instead focus on what we really care about: the difference between the values with and without a wetsuit.
(By looking at this difference, the variability in general swimming ability is taken away).
| Swimmer | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | $\bar{x}$ |
| Wetsuit | 1.57 | 1.47 | 1.42 | 1.35 | 1.22 | 1.75 | 1.64 | 1.57 | 1.56 | 1.53 | 1.49 | 1.51 | 1.507 |
| No Wetsuit | 1.49 | 1.37 | 1.35 | 1.27 | 1.12 | 1.64 | 1.59 | 1.52 | 1.50 | 1.45 | 1.44 | 1.41 | 1.429 |
| Difference | 0.08 | 0.10 | 0.07 | 0.08 | 0.10 | 0.11 | 0.05 | 0.05 | 0.06 | 0.08 | 0.05 | 0.10 | 0.078 |
Note: the mean of the sample of differences is equal to the difference of the sample means: $\bar{x}_\textrm{Difference} = \bar{x}_\textrm{Wetsuit}-\bar{x}_\textrm{No Wetsuit}$
Null hypothesis: If wearing a wetsuit had no effect on swimming speed, then the speeds recorded for each swimmer could have been equally likely observed under either condition (with or without a wetsuit).
the sign (positive/negative) of each observed difference in speed between the two conditions
could have equally likely been the opposite.
| Swimmer | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| Wetsuit | 1.57 | 1.47 | 1.42 | 1.35 | 1.22 | 1.75 | 1.64 | 1.57 | 1.56 | 1.53 | 1.49 | 1.51 |
| No Wetsuit | 1.49 | 1.37 | 1.35 | 1.27 | 1.12 | 1.64 | 1.59 | 1.52 | 1.50 | 1.45 | 1.44 | 1.41 |
| Difference | 0.08 | 0.10 | 0.07 | 0.08 | 0.10 | 0.11 | 0.05 | 0.05 | 0.06 | 0.08 | 0.05 | 0.10 |
| -0.08 | -0.10 | -0.07 | -0.08 | -0.10 | -0.11 | -0.05 | -0.05 | -0.06 | -0.08 | -0.05 | -0.10 |
| Swimmer | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| Wetsuit | 1.57 | 1.47 | 1.42 | 1.35 | 1.22 | 1.75 | 1.64 | 1.57 | 1.56 | 1.53 | 1.49 | 1.51 |
| No Wetsuit | 1.49 | 1.37 | 1.35 | 1.27 | 1.12 | 1.64 | 1.59 | 1.52 | 1.50 | 1.45 | 1.44 | 1.41 |
| Difference | 0.08 | 0.10 | 0.07 | 0.08 | 0.10 | 0.11 | 0.05 | 0.05 | 0.06 | 0.08 | 0.05 | 0.10 |
| -0.08 | -0.10 | -0.07 | -0.08 | -0.10 | -0.11 | -0.05 | -0.05 | -0.06 | -0.08 | -0.05 | -0.10 |
To obtain the sampling distribution of the paired differences (or ratio):
Keeping the structure of the data intact (pairs) allows to filter out the variability accross pairs.
These data provide very convincing evidence that swimmers are faster on average when wearing wetsuits.
Because this was a randomized experiment, we have strong evidence that
wetsuits cause swimmers to swim faster.
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
The same data were analyzed in each case, but the conclusions reached were drastically different. It is very important to think about how the data were collected before proceeding with the analysis!
Studies leading to paired data are often more efficient (better able to detect differences between conditions) because you have controlled for a source of variation (individual variability among the observational units).
| No Wetsuit | Wetsuit | |
| Mean | 1.43 | 1.51 |
| 0.078 |
Conclusions
The differences (or ratios) are a one quantitative sample. We can extract the 95% CI by drawing bootstrap samples, as previously seen.
We are 95% confident that for competitive swimmers and triathletes, wetsuits increase maximum swimming velocity by an average of between 0.066 and 0.089 meters per second.
Similar methodology than for a one quantitative sample (one-sample t-test).
Similar required validity conditions


laaiseng portfolio
tm
Home
Portfolio
About
Documentation
Design Styles
Contact Us
Flex
Switch
Static
Masonry
Essential Stationery
Branding
Pickled Tousled
Art Direction
Waistcoat vegan
Graphic Design
Tumblr hammock
Packaging
Biodiesel etsy
Branding
Gentrify artisan
Graphic Design
Plaid austin
Graphic Design
Trust fund
Packaging
Gentrify pork
Branding
Waistcoat ugh
UI/UX
Deep v kogi
Graphic Design
Venmo trust
Packaging
Venmo trust
Ui/UX


5pc pay rise for NHS staff if Labour wins power
by Sharon Brennan- Five per cent pay rise will be funded by new money
- Law changes to introduce safe staffing limits to the NHS and enshire agenda for change in legislation
- Creation of a National Care Service for England to solve the social care crisis
Labour has promised a 5 per cent pay rise to NHS staff next year in its 2019 election manifesto.
The document said: “Labour will restore public sector pay to at least pre-financial crisis levels (in real terms), by delivering year-on-year above-inflation pay rises, starting with a 5 per cent increase, to reward and retain the people who do so much for us all.”
It has confirmed it will provide new money to deliver on this promise and the NHS will not be expected to fund this through the extra cash already announced by the party.
Labour has said this pay rise would mean a newly qualified nurse’s annual pay will rise by £1,211, and a junior doctor’s starting salary will increase by £1,384.
It is still not clear, however, if all NHS staff will be included in this promise.
The party also committed to enshrining “agenda for change terms and conditions into law alongside safe staffing limits for all”. Wales and Scotland have already introduced safe staffing laws and the Royal College of Nursing has been campaigning for on to be introduced into England.
However, critics of that plan are concerned the NHS workforce does not currently have the capacity to meet such requirements.
It is also unclear what reform Labour intends to bring to agenda for change as the government is already legally bound to deliver on these contracts. It may intend to extend the agenda to cover more staff.
The manifesto also said it would “ensure [NHS] services are delivered in-house and bring subsidiary companies back in-house”.
The manifesto promised to review the current tax and pension changes that are currently causing havoc to NHS consultant staffing levels. It said it wants to ensure that “the workforce is fairly rewarded and that services are not adversely affected” but gave no further details on how it would achieve this.
As expected, Labour wants to “reverse privatisation” in the NHS as well as repeal the Health and Social Care Act. It continues to assert that the integrated care plans are a “cover” to “further entrench the private sector delivery of health care” and promises instead to coordinate care “through public bodies”.
Other promises included:
- Funding increase to the NHS of by an average of 4.3 per cent a year;
- The creation of a National Care Service for England to solve the social care crisis;
- Investing £2bn to modernise mental health hospital facilities and end the use of inappropriate, out-of-area placements;
- An infrastructure plan to return NHS England to the international average level of capital investment, and “halting the fire sale of NHS land and assets”;
- A £1bn investment in public health to recruit 4,500 more health visitors and school nurses;
- Establishing a generic drug company so that if “fair prices” are rejected for patented drugs it can use the Patents Act provisions and other work arounds to secure access to generic versions;
- Expanding GP training places to provide resources for 27 million more appointments each year;
- Ensuring NHS data is not exploited by international technology and pharmaceutical corporations; and
- A carbon neutral NHS by creating an NHS Forest of one million trees and greater reliance on renewable energy including a transition to electric paramedic vehicles, NHS fleet cars and hybrid ambulances


Upload your video(s).
Drag your video files here to upload
Upload here
You should try
uploading here.
Upload here, I'm special!


Run 100k
Reset
Pi =
0.0
Render results after run
Press Start...
(totDarts =
0
, circleDarts =
0
)
No HTML5!


Once you have pccom running on the target machine, invoke
pcs
on the development machine to send your geode's executable to the proper place on the target machine. The pcs tool figures out which files to send (and which directory to send them to) via a number of rules set up in the ROOT_DIR\INCLUDE\PCS.PAT file. Thus it knows to send applications (files that end in .GEO) to the target machine's WORLD directory. (Note that the "/" and "-" characters in the flags below are interchangeable--hyphens are used with the n, S, and t flags by tradition.)
pccom
is presently using (this is a dangerous option).
pccom
is presently using (this is a dangerous option).
pccom
is presently using (this is a dangerous option).When using a token, pcs looks up the token in the INCLUDE\SEND file to determine which files should be sent. Generally all executables associated with an application, library, or mechanism are sent when the appropriate token is passed. Look in the SEND file to find out what the accepted tokens are and what they send. Suppose your send file consisted of the following lines:
PC DRIVER/VIDEO/DUMB/HGC/HGC GEO HGCAT DRIVER/VIDEO/DUMB/HGC/HGC GEO PCB DRIVER/VIDEO/DUMB/HGC/HGC GEO PCB DRIVER/MOUSE/LOGIBUS/LOGIBUS GEO PCS DRIVER/VIDEO/DUMB/HGC/HGC GEO PCS DRIVER/MOUSE/LOGISER/LOGISER GEO
Typing
pcs -t pc
would send the file DRIVER\VIDEO\DUMB\HGC\HGCEC.GEO (HGC.GEO if sending non-EC). Typing "pcs -S pcb" would send that file, and also DRIVER\MOUSE\LOGIBUS\LOGIBUSE.GEO (or LOGIBUS.GEO).


--- layout: list type: customList title: 我的博客 page: 1 total_pages: 2 prev_page_path: none next_page_path: /blog/page2/ ---
同步自segmentfault(https://segmentfault.com/blog/actors315)


Enter New Movie Information
{% if not all_filled %}
Error: all fields must be filled in
{% else %}
{% endif %}
Title:
Director:
Main Actor 1:
Main Actor 2:
Year of Release:
Duration (in minutes):
Rent Price:
Purchase Price:
Enter movie info
Gerne:
{% if gerne_name == "" %}
Error: "Gerne" field must be filled in
{% endif %}
Return to Main Page


First you need to include the jQuery library, since Loupe is a plugin. You can download it from the jQuery website or link it directly from the Google CDN.

Secondly, you need to include the jQuery Loupe javascript and the css file into your page. You can do it by adding the code below to your page.

<link rel="stylesheet" type="text/css" href="css/jquery.loupe.css" />
Next, you implement the actual image(s) that will be magnified/zoomed by the Loupe. The structure is as simple as it can get.

As the last step, you trigger the Loupe function on the element you just created. In this case, we trigger the function on the image with the id loupe1.

Options
shape - the shape of the Loupe. Options can be: circle/rounded/square
glossy - if the Loupe is glossy or not. Options: true/false
drop_shadow - if the Loupe will have a drop-shadow effect. Options: true/false


%- include ../partials/scripts.html %>
<%- include ../partials/navbar.html %>
Add a New Service Post
Post Headline
Service Description
Hourly Wage Range
Estimated Total Amount of Hours
Enter Keywords For Job Category
Submit
Cancel
<%- include ../partials/footer.html %>


Simply put—we have the most competitive prices, the best selection of gear and snowsports brands, and a team whose expertise rivals that of any ski and ride shop in the world.
Can't see the mountains from your window? This is where you can actually see some of the views that we get on a daily basis. Here are some more MOUNTAIN CAMS so you can check on other areas of the mountain.
We offer a dining experience that spans the globe and satisfies the most discriminating culinary adventurer to the pickiest five-year-old.


Observer Pattern
20 May 2015
Observer Pattern has been around Java since version JDK 1.0. One of the nice thing about having it inside the language is you only have to subclass it and just worry about its implementation logic.
Here are the key benefits of the observer pattern.
- Neither
Observer
norObservable
know class type of the other Observable
can communicate with anyObserver
Observer
can register for state change events on anyObservable
- Any object that changes state of
Observable
indirectly broadcasts to all registeredObservers
This is from one of our exercises which is a card game called Tehi. This is not the complete program but what it shows here is how are you going to use the observer pattern. First you will notice CardDeck extends Observable
and the abstract CardViewer implements Observer
. The concrete classes FutureCardsViewer and PastCardViewers then has update method which is the glue that attached them to the Observable
.
Card Deck
package com.tehi;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.NoSuchElementException;
import java.util.Observable;
public final class CardDeck extends Observable {
private LinkedList<PlayingCard> cardStack = new LinkedList<>();
/**
* Initially the cards are ordered by suite and rank.
*/
CardDeck(){
Rank[] rankArray = Rank.values();
Suite[] suiteArray = Suite.values();
for (Suite suite : suiteArray) {
for (Rank rank : rankArray) {
cardStack.add(new PlayingCard(suite, rank));
}
}
}
/**
* Deals 1 card from the top of the deck
*/
PlayingCard deal(){
PlayingCard card;
try {
card = cardStack.pop();
} catch (NoSuchElementException e) {
throw new IllegalStateException("Ran out of cards!");
}
setChanged();
notifyObservers(getRanksDealt());
return card;
}
/**
* Gets the ith card, 0 <= i < 52. The
* card is not removed.
* @param index
* @return
*/
PlayingCard peek(int index){
if(index<0 || index>cardStack.size()-1){
return null;
}
return cardStack.get(index);
}
/**
* Shuffles the stack of cards.
*/
void shuffle(){
Collections.shuffle(cardStack);
}
/**
* Deals n cards from the top of the deck
* @param n
*/
PlayingCard[] deal(int n){
PlayingCard[] result = new PlayingCard[n];
for(int i=0; i<n;i++){
result[i]=deal();
}
return result;
}
/**
* Gets the ranks of the cards left in the deck.
* @return an int[] containing the ranks of the remaining cards
*/
int[] getRanksLeft(){
int[] result = new int[13];
Arrays.fill(result, 0);
for (PlayingCard card : cardStack) {
int rankNUmber = card.getRank().getRankNumber()-1;
result[rankNUmber]++;
}
return result;
}
/**
* Gets the ranks of the cards no longer in the deck.
* @return an int[] containing the ranks of the already dealt cards
*/
int[] getRanksDealt(){
int[] result = new int[13];
int[] dealt = getRanksLeft();
for (int i=0; i<dealt.length;i++) {
result[i]=4-dealt[i];
}
return result;
}
/**
* Accessor to the number of cards left in the deck.
* @return an int, the size of the deck.
*/
public int size(){
return cardStack.size();
}
/**
* Checks if the deck is empty.
* @return true if the deck has no cards, false otherwise.
*/
public boolean isEmpty() {
return (size()==0)?true:false;
}
}
Cards Viewer
package com.tehi;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.util.Observer;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
@SuppressWarnings("serial")
public abstract class CardsViewer extends JPanel implements Observer {
private JPanel centerPanel = new JPanel();
protected JLabel[][] tiles = new JLabel[4][13];
public CardsViewer() {
setBorder(BorderFactory.createLineBorder(Color.BLACK));
setLayout(new BorderLayout());
centerPanel.setLayout(new GridLayout(4, 13));
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
tiles[i][j] = new JLabel("", JLabel.CENTER);
tiles[i][j].setText(Rank.convertIntToRank(j + 1).getName());
centerPanel.add(tiles[i][j]);
}
}
add(centerPanel, BorderLayout.CENTER);
}
/**
* Updates the GUI.
* @param data an int[] with ranks of cards.
*/
protected abstract void updateChart(int[] data);
}
Future Cards Viewer
package com.tehi;
import java.util.Observable;
public class FutureCardsViewer extends CardsViewer {
/**
* Chart that displays cards that have not been dealt.
*/
private static final long serialVersionUID = 1L;
/**
* The Observable is an instance of CardDeck and
* the Object is an int[] with the ranks that
* have already been dealt from the deck.
*/
@Override
public void update(Observable observable, Object arg) {
CardDeck deck = (CardDeck)observable;
int[] ranksNotDealt = deck.getRanksLeft();
updateChart(ranksNotDealt);
}
/**
* {@inheritDoc}
*/
protected void updateChart(int[] ranksNotDealt) {
for (int j = 0; j < ranksNotDealt.length; j++) {
int numberOfcardsDealt = ranksNotDealt[j];
for (int i = 0; i < 4 - numberOfcardsDealt; i++) {
tiles[i][j].setText("");
}
for (int i = 4 - numberOfcardsDealt; i < 4; i++) {
tiles[i][j].setText(Rank.convertIntToRank(j + 1).getName());
}
}
}
}
Past Cards Viewer
package com.tehi;
import java.util.Observable;
public class PastCardsViewer extends CardsViewer {
/**
* Chart that displays cards that have been dealt.
*/
private static final long serialVersionUID = 1L;
/**
* The Observable is an instance of CardDeck and
* the Object is an int[] with the ranks that
* have already been dealt from the deck.
*/
@Override
public void update(Observable o, Object arg) {
int[] ranksDealt = (int[]) arg;
updateChart(ranksDealt);
}
/**
* {@inheritDoc}
*/
protected void updateChart(int[] ranksDealt) {
for (int j = 0; j < ranksDealt.length; j++) {
int numberOfcardsDealt = ranksDealt[j];
for (int i = 0; i < 4 - numberOfcardsDealt; i++) {
tiles[i][j].setText("");
}
for (int i = 4 - numberOfcardsDealt; i < 4; i++) {
tiles[i][j].setText(Rank.convertIntToRank(j + 1).getName());
}
}
}
}


The thing you want is called .
This is what it looks like in context of some other content. and I love it.


Toggle navigation
DataOcean
Home
Products
Mobile
Big Data
IoT
About
Location
Internet Of Things
Mobile
Big Data
Virtual Reality
Augmented Reality


A Possible Mechanism Contributing to the Occurrence of Sterility and Recovery of Fertility in Pol CMS Lines of B. napus. a Multi-omics association analysis of candidate genes using yeast to screen for related genes. b A proposed a pol CMS working model showing the pol CMS mechanism and infertility mechanism of Rfp and orf224


|
Webrtc Unity Plugin
v01
Cross-platform Webrtc support for Unity apps ☁🎲
|
Peer event frontend More...
Classes | |
| class | WebrtcPeerString2Event |
| Represents a peer event composed of two string-literals More... | |
| class | WebrtcPeerStringEvent |
| Represents a peer event composed of a single string-literal More... | |
| class | WebrtcPeerStringIntStringEvent |
| Represents a peer event composed of a string-literal, an int, and another string-literal More... | |
Public Member Functions | |
| void | OnInitialized () |
| Initialization handler More... | |
| void | AddDataChannel () |
| we front the IPeer interface for the underlying peer so that UnityEvents and engine code have something they can bind to to trigger the actual calls More... | |
| void | AddIceCandidate (string candidate, int sdpMlineindex, string sdpMid) |
| Add an ice candidate More... | |
| void | AddStream (bool audioOnly) |
| Add a stream More... | |
| void | ClosePeerConnection () |
| Close the peer connection More... | |
| void | CreateAnswer () |
| Create an sdp answer More... | |
| void | CreateOffer () |
| Create an sdp offer More... | |
| int | GetUniqueId () |
| Get the unique id More... | |
| void | SendDataViaDataChannel (string data) |
| Send data via the created data channel More... | |
| void | SetAudioControl (bool isMute, bool isRecord) |
| Adjust audio controls More... | |
| void | SetRemoteDescription (string type, string sdp) |
| Set the remote stream description More... | |
| void | Log () |
We provide a function Log() that matches the params of all exposed events so that one may easily wire UnityEvents to Log calls using this.Log() as a reference in editor More... | |
| void | Log (string arg1) |
| void | Log (string arg1, string arg2) |
| void | Log (string arg1, int arg2, string arg3) |
Public Attributes | |
| bool | AutoLogErrors = true |
| Flag to log all errors to the Unity console automatically More... | |
| UnityEvent | OnPeerReady = new UnityEvent() |
| Event that occurs when the peer is ready More... | |
| WebrtcPeerStringEvent | OnDataFromDataChannelReady = new WebrtcPeerStringEvent() |
| Event that occurs when data is ready from the data channel More... | |
| WebrtcPeerStringEvent | OnFailure = new WebrtcPeerStringEvent() |
| Event that occurs when a peer-specific failure happens More... | |
| WebrtcPeerStringIntStringEvent | OnIceCandiateReadyToSend = new WebrtcPeerStringIntStringEvent() |
| Event that occurs when an ice candidate is prepared More... | |
| UnityEvent | OnLocalDataChannelReady = new UnityEvent() |
| Event that occurs when the data channel is ready More... | |
| WebrtcPeerString2Event | OnLocalSdpReadyToSend = new WebrtcPeerString2Event() |
| Event that occurs when an sdp message is prepared More... | |
| WebrtcPeerStringEvent | OnSdpOfferReadyToSend = new WebrtcPeerStringEvent() |
| Event that occurs when an sdp offer is prepared More... | |
| WebrtcPeerStringEvent | OnSdpAnswerReadyToSend = new WebrtcPeerStringEvent() |
| Event that occurs when an sdp answer is prepared More... | |
Peer event frontend
| void UnityWebrtc.WebrtcPeerEvents.AddDataChannel | ( | ) |
we front the IPeer interface for the underlying peer so that UnityEvents and engine code have something they can bind to to trigger the actual calls
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.AddIceCandidate | ( | string | candidate, |
| int | sdpMlineindex, | ||
| string | sdpMid | ||
| ) |
Add an ice candidate
| candidate | sdp candidate data |
| sdpMlineindex | sdp mline index |
| sdpMid | sdp mid |
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.AddStream | ( | bool | audioOnly | ) |
Add a stream
| audioOnly | flag indicating if the stream should only contain audio |
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.ClosePeerConnection | ( | ) |
Close the peer connection
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.CreateAnswer | ( | ) |
Create an sdp answer
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.CreateOffer | ( | ) |
Create an sdp offer
Implements UnityWebrtc.IPeerImpl.
| int UnityWebrtc.WebrtcPeerEvents.GetUniqueId | ( | ) |
| void UnityWebrtc.WebrtcPeerEvents.Log | ( | ) |
We provide a function Log() that matches the params of all exposed events so that one may easily wire UnityEvents to Log calls using this.Log()
as a reference in editor
| void UnityWebrtc.WebrtcPeerEvents.OnInitialized | ( | ) |
Initialization handler
TODO(bengreenier): This could be auto-bound with editor script
This is expected to be bound to Webrtc.OnInitialized via the UnityEditor
| void UnityWebrtc.WebrtcPeerEvents.SendDataViaDataChannel | ( | string | data | ) |
Send data via the created data channel
Must call AddDataChannel first
| data | data to send |
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.SetAudioControl | ( | bool | isMute, |
| bool | isRecord | ||
| ) |
Adjust audio controls
| isMute | is the stream muted |
| isRecord | is the stream recording data |
Implements UnityWebrtc.IPeerImpl.
| void UnityWebrtc.WebrtcPeerEvents.SetRemoteDescription | ( | string | type, |
| string | sdp | ||
| ) |
Set the remote stream description
Known valid types are "answer" and "offer"
| type | description type |
| sdp | sdp data |
Implements UnityWebrtc.IPeerImpl.
| bool UnityWebrtc.WebrtcPeerEvents.AutoLogErrors = true |
Flag to log all errors to the Unity console automatically
| WebrtcPeerStringEvent UnityWebrtc.WebrtcPeerEvents.OnDataFromDataChannelReady = new WebrtcPeerStringEvent() |
Event that occurs when data is ready from the data channel
| WebrtcPeerStringEvent UnityWebrtc.WebrtcPeerEvents.OnFailure = new WebrtcPeerStringEvent() |
Event that occurs when a peer-specific failure happens
| WebrtcPeerStringIntStringEvent UnityWebrtc.WebrtcPeerEvents.OnIceCandiateReadyToSend = new WebrtcPeerStringIntStringEvent() |
Event that occurs when an ice candidate is prepared
| UnityEvent UnityWebrtc.WebrtcPeerEvents.OnLocalDataChannelReady = new UnityEvent() |
Event that occurs when the data channel is ready
| WebrtcPeerString2Event UnityWebrtc.WebrtcPeerEvents.OnLocalSdpReadyToSend = new WebrtcPeerString2Event() |
Event that occurs when an sdp message is prepared
| UnityEvent UnityWebrtc.WebrtcPeerEvents.OnPeerReady = new UnityEvent() |
Event that occurs when the peer is ready
This is the same as Webrtc.OnInitialized but is included here for convienience
| WebrtcPeerStringEvent UnityWebrtc.WebrtcPeerEvents.OnSdpAnswerReadyToSend = new WebrtcPeerStringEvent() |
Event that occurs when an sdp answer is prepared
| WebrtcPeerStringEvent UnityWebrtc.WebrtcPeerEvents.OnSdpOfferReadyToSend = new WebrtcPeerStringEvent() |
Event that occurs when an sdp offer is prepared


Nova Rocket Team is structured into several teams.
Simulate and build rocket and recovery systeam
Learn More
Investigate new propulsion engines
Flight electronics and software
Active stabilization of rockets


I'm surprised to hear that you communists overseas are using your own individual sharpeners in classrooms. It's a very Ayn-Randian position to take.  Sharpen your pencil with your bootstrap!”
Pencil-sharpening enlightenment here.


Domain Specific Languages (DSLs) are mini languages designed for a specific problem domain. When used appropriately, DSLs can:
- Simplify the overall application logic by expressing parts of it in a DSL (Rule engines is one example, but there are more)
- Simplify deployment routines by modifying files written in the DSL (without change to application code)
- Speed up development by equipping domain-experts with a simple way to express new behaviour without lengthy developoment cycles.
DSLs are often categorised as either "internal" or "external". An internal DSL is written in the host language, whereas external DSLs are
usually implemented by parsing text, either using regular expressions or a parser generator.
Internal DSLs are commonly used in dynamic languages, but statically typed languages are usually not suitable for internal DSLs.
This presentation will give an introduction DSLs and when you should consider using them, and will show an example of how to
implement one using one of the many parser generators for Java.


{{ block "template" . -}}
| Total: | {{ .Total }} | ||||
|---|---|---|---|---|---|
| of total, Called: | {{ .Called }} | {{ .OfTotalCalled | printf "(%.2f%%)"}} | |||
| of total, Missed: | {{ .Missed }} | {{ .OfTotalMissed | printf "(%.2f%%)"}} | |||
| of total, Scored: | {{ .Scored }} | {{ .OfTotalScored | printf "(%.2f%%)"}} | |||
| of scored, Called: | {{ .Called }} | {{ .OfScoredCalled | printf "(%.2f%%)"}} | |||
| of scored, Missed: | {{ .Missed }} | {{ .OfScoredMissed | printf "(%.2f%%)"}} | |||
| of total, Unscored: | {{ .Unscored }} | {{ .OfTotalUnscored | printf "(%.2f%%)"}} | |||
| of unscored, Ongoing: | {{ .Ongoing }} | {{ .OfUnscoredOngoing | printf "(%.2f%%)"}} | |||
| of unscored, Excluded: | {{ .Excluded }} | {{ .OfUnscoredExcluded | printf "(%.2f%%)"}} | |||
| Brier score: | {{ .BrierScore | printf "%.4f" }} |
Brier scores range from 0 to 1, inclusive. A Brier score of 0 means you’re 100% confident every time and everything you predict happens. A Brier score of 1 means you’re 100% confident every time and you’re wrong every single time. If you estimate that everything has a 50/50 chance of happening, your Brier score will be .25 regardless of whatever happens.


importance: 5
We have an object:
Write the destructuring assignment that reads:
name
property into the variable name
.years
property into the variable age
.isAdmin
property into the variable isAdmin
(false, if no such property)Here’s an example of the values after your assignment:


Actions, resources, and condition keys for AWS IoT RoboRunner
AWS IoT RoboRunner (service prefix:
iotroborunner
) provides the following service-specific resources, actions, and condition context keys for use in IAM permission policies.
References:
-
Learn how to configure this service .
-
View a list of the API operations available for this service .
-
Learn how to secure this service and its resources by using IAM permission policies.
Topics
Actions defined by AWS IoT RoboRunner
You can specify the following actions in the
Action
element of an IAM policy statement. Use policies to grant permissions to perform an operation in AWS. When you use an action in a policy, you usually allow or deny access to the API operation or CLI command with the same name. However, in some cases, a single action controls access to more than one operation. Alternatively, some operations require several different actions.
The
Resource types
column of the Actions table indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") to which the policy applies in the
Resource
element of your policy statement. If the column includes a resource type, then you can specify an ARN of that type in a statement with that action. If the action has one or more required resources, the caller must have permission to use the action with those resources. Required resources are indicated in the table with an asterisk (*). If you limit resource access with the
Resource
element in an IAM policy, you must include an ARN or pattern for each required resource type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one of the optional resource types.
The
Condition keys
column of the Actions table includes keys that you can specify in a policy statement's
Condition
element. For more information on the condition keys that are associated with resources for the service, see the
Condition keys
column of the Resource types table.
For details about the columns in the following table, see Actions table .
| Actions | Description | Access level | Resource types (*required) | Condition keys | Dependent actions |
|---|---|---|---|---|---|
| CreateDestination | Grants permission to create a destination | Write | |||
| CreateSite | Grants permission to create a site | Write |
iam:CreateServiceLinkedRole |
||
| CreateWorker | Grants permission to create a worker | Write | |||
| CreateWorkerFleet | Grants permission to create a worker fleet | Write | |||
| DeleteDestination | Grants permission to delete a destination | Write | |||
| DeleteSite | Grants permission to delete a site | Write | |||
| DeleteWorker | Grants permission to delete a worker | Write | |||
| DeleteWorkerFleet | Grants permission to delete a worker fleet | Write | |||
| GetDestination | Grants permission to get a destination | Read | |||
| GetSite | Grants permission to get a site | Read | |||
| GetWorker | Grants permission to get a worker | Read | |||
| GetWorkerFleet | Grants permission to get a worker fleet | Read | |||
| ListDestinations | Grants permission to list destinations | Read | |||
| ListSites | Grants permission to list sites | Read | |||
| ListWorkerFleets | Grants permission to list worker fleets | Read | |||
| ListWorkers | Grants permission to list workers | Read | |||
| UpdateDestination | Grants permission to update a destination | Write | |||
| UpdateSite | Grants permission to update a site | Write | |||
| UpdateWorker | Grants permission to update a worker | Write | |||
| UpdateWorkerFleet | Grants permission to update a worker fleet | Write |
Resource types defined by AWS IoT RoboRunner
The following resource types are defined by this service and can be used in the
Resource
element of IAM permission policy statements. Each action in the
Actions table
identifies the resource types that can be specified with that action. A resource type can also define which condition keys you can include in a policy. These keys are displayed in the last column of the Resource types table. For details about the columns in the following table, see
Resource types table
.
| Resource types | ARN | Condition keys |
|---|---|---|
| DestinationResource |
arn:$
{
Partition}:iotroborunner:$
{
Region}:$
{
Account}:site/$
{
SiteId}/destination/$
{
DestinationId}
|
|
| SiteResource |
arn:$
{
Partition}:iotroborunner:$
{
Region}:$
{
Account}:site/$
{
SiteId}
|
|
| WorkerFleetResource |
arn:$
{
Partition}:iotroborunner:$
{
Region}:$
{
Account}:site/$
{
SiteId}/worker-fleet/$
{
WorkerFleetId}
|
|
| WorkerResource |
arn:$
{
Partition}:iotroborunner:$
{
Region}:$
{
Account}:site/$
{
SiteId}/worker-fleet/$
{
WorkerFleetId}/worker/$
{
WorkerId}
|
Condition keys for AWS IoT RoboRunner
AWS IoT RoboRunner defines the following condition keys that can be used in the
Condition
element of an IAM policy. You can use these keys to further refine the conditions under which the policy statement applies. For details about the columns in the following table, see
Condition keys table
.
To view the global condition keys that are available to all services, see Available global condition keys .
| Condition keys | Description | Type |
|---|---|---|
| iotroborunner:DestinationResourceId | Filters access by the destination's identifier | String |
| iotroborunner:SiteResourceId | Filters access by the site's identifier | String |
| iotroborunner:WorkerFleetResourceId | Filters access by the worker fleet's identifier | String |
| iotroborunner:WorkerResourceId | Filters access by the workers identifier | String |