In this section, we will outline the easiest way to integrate Stencil built web components into applications written using various popular frameworks.
Using a Stencil built web component collection within an Angular CLI project is a four-step process. We need to:
app.module.ts
(or some other appropriate place)Including the CUSTOM_ELEMENTS_SCHEMA in the module allows the use of the web components in the HTML markup without the compiler producing errors. Here is an example of adding it to AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import 'test-components/testcomponents';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, FormsModule, SharedModule],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
A component collection built with Stencil includes a main script that is used to load the components in the collection. That script needs to be imported in your application as such (see full file listing above):
...
import 'test-components/testcomponents';
...
During the build, the components need to be copied to the build output directory. The easiest way to do this is to modify include the collection in the assets
array of the .angular-cli.json
file.
"assets": [
"assets",
"favicon.ico",
{ "glob": "**/*", "input": "../node_modules/test-components/testcomponents", "output": "./testcomponents" }
],
With an application built using the create-react-app
script, there are two options available that could be used to integrate Stencil built component collections.
public
folderIn this guide, we opt for the latter of the two options. This is a three-step process:
public/static/js
index.js
public
The React build process will automatically copy anything that is under the public
folder to the build
folder. The easiest way to copy the component collection(s) is to set up the npm postinstall
script to do the copy after the packages are installed for the project.
The default React webpack configuration results in webpack bundles being built in
build/static/js
, so the component collections need to be copied intopublic/static/js
. You may want to pre-create this directory and create a.gitkeep
file in it to make sure the path exists.
The following is a simple example of a postinstall
script in the package.json
file. It copies the components from a single collection that was obtained via NPM. This example only works on Unix-like operating systems such as Linux or MacOS. If you need to support multiple operating systems or do anything more complicated, then you can create a NodeJS script that performs the operations and call that as your postinstall
script.
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"postinstall": "cp -R node_modules/my-components/mycomponents public/static/js"
}
For the above example, you may also want to add a
/public/static/js/mycomponents
line to your.gitignore
file.
A component collection built with Stencil includes a main script that is used to load the components in the collection. That script needs to be loaded in your application by importing it in your index.js
file (or some other appropriate file) as such:
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import 'test-components/testcomponents';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
Working with Stencil components in Ember is really easy thanks to the ember-cli-stencil
addon.  You can just start using the custom elements in your hbs
files with no further work needed. For more information, check out the ember-cli-stencil
documentation.


Xbox 360 with contollers Mint condition Xbox 360 with two controllers and 5 games |
|
PS4 with 2 popular games Comes with destiny and Madden 15 |
|
Alienware Laptop Minimum scratches and some stickers |
|
Note 4 Small Crack in screen; with Verizon |
|
Nexus 7 Comes with case and looks brand new. Only used 1 semester |


High resolution Data Service (HDS)
One of the NWS Family of Services (FOS) data streams, HDS is primarily
comprised of binary products containing centrally generated analysis and
forecast fields in binary formats such as GRIB.
- Currently from the IDD, this stream contains more than just the
HDS products, because it is generated from the binary NOAAPORT
NWSTG products. Thus it also includes profiler data in WMO
BUFR format, and other binary products.


Career Profile
Software engineer with 5 years of experience, I work remotely from Canada. I have worked in multiple specialized industries (Finance, Mathematics and Video games) from developing and enhancing existing solution to bringing cloud hosting and best practices to everyone. Eager to learn new technologies, and new languages. Bilingual French / English
Experiences
Working on a pipeline solution handling from the creation of a backend service until his deployment in AWS ECS, with a fully fledged monitoring and log integration (Grafana, ELS). Maintaining and developing this solution to handle the multiple uses cases of new and old back-end services.
I am also promoting best practices around back-end services projects, such as how to manage efficiently auto-scaling on services, or making sure your design is compatible with micro-services and auto-scaling. I help resolve incidents when needs be, a provide external insight and debugging help on demand.
Writing and planning multiple releases for the team, adapting to newcomers providing help, making sure to close deliverables. I upgraded the whole project documentation by working closely with a technical writer, and I interact daily with technical and non-technical people alike. I made technical presentations to help other team or new members how to get started in AWS, and how we use it in our case.
Creation of a serverless web application, with CI/CD pipeline on AWS solutions. R&D software development in Python 3 with Amazon Web Services (Lambda, S3, API Gateway and Route53).
Creation of CI/CD pipeline, monitoring and alerting (Prometheus, Grafana, LogStash) solutions on AWS cluster. DevOps, Kafka, Docker, Jenkins, Kubernetes, Prometheus, ELK, AWS, Spring Boot, Java 8 & Python 3.
Migration WebSphere6 to Jboss/Wildfly, software maintenance on production application IBM WAS/DB2
Developer on a desktop application (C++) allowing users to create a model of a complex system, and generate a simulator based on that model. C++11 on windows and linux.
Integration of simulators into a Java web application, with parallel processing. Java 8, Java EE, Spring Framework and Apache Spark
Development of tools to help with every day development tasks. Scrum method, Atlassian tools and Git versioning system.
Code optimization: Refactoring a simulator to improve performances, both in execution time and memory usage, and keeping the same behavior. Heavy usage of C++ metaprogramming.
Projects
Involved in multiple local communities, especially musical bands.


Packages will make some detour to the african mainland till that cable to pakistan is ready
Mauritius is better connected and also has nice beaches they say
ComputerGenie 👴👴👴02-Apr-19 06:25 AM
12? that means I gotta work for it
blackjok3r02-Apr-19 06:25 AM
you can always change regions
TonyL02-Apr-19 06:25 AM
Hmm after I've disalbed autosplit and lowered utxos amount my node relatively skyrocketed
2
PHBA206102-Apr-19 06:25 AM
do we know how many of the current NN operators will run for a 2nd node / rerun ?
jorian02-Apr-19 06:25 AM
NA region election candidates
Alien
Chainmakers
Chainstrike
Cracker
SMK762
etszombi
lumberscout
pirate
popcornbag
Strob
computergenie
madmax
TonyL02-Apr-19 06:26 AM
12 candidates and 8 places?
jorian02-Apr-19 06:26 AM
Yes
TonyL02-Apr-19 06:26 AM
Not huge competition tho (edited)
smk762 - dracocanis ominator02-Apr-19 06:28 AM
how many of those are running for a second node?
ComputerGenie 👴👴👴02-Apr-19 06:28 AM
is thinking that maybe putting 3 options was a bad idea
blackjok3r02-Apr-19 06:28 AM
etszombi ? wtf ... that was a dead node for like half of last season in EU
jorian02-Apr-19 06:29 AM
Ptyx got burned for that
Better to be safe and run for 1
blackjok3r02-Apr-19 06:29 AM
Thats why I justwent for 1... cant end up that way
Could probably handle 2 no worries
ComputerGenie 👴👴👴02-Apr-19 06:29 AM
Well, part of my hope is to create a network where it doesn't suck to be in Sydney
smk762 - dracocanis ominator02-Apr-19 06:30 AM
I recn best way to get 2 or 3 nodes, is to run for one each year for 3 years, and finish in top half every year
1
1
2
blackjok3r02-Apr-19 06:30 AM
If nodes spread out more and dont all keep grouping in the same DC's where you are will matter less
ComputerGenie 👴👴👴02-Apr-19 06:31 AM
ping times in syndey were nearly 3x when it came to propagation, it was like orphan city
mrlynch02-Apr-19 06:31 AM
Pirate is going for 1 EU 1 NA
blackjok3r02-Apr-19 06:31 AM
yes... Syndey has a huge number of nodes though the whole top of SH is there...
TonyL02-Apr-19 06:32 AM
If elected I want to setup physical one in some location where no operators have servers yet. But if buy before elections kinda huge risk to end up with piece of non needed hardware(edited)
blackjok3r02-Apr-19 06:33 AM
Yep... I purchased the server used it from home for testnet then when got spot found DC and went and installed it and brought storage drives last year.,
ressonably low risk, but used very old cheap server
smk762 - dracocanis ominator02-Apr-19 06:34 AM
I was gonna run in SH, but provider wnated 12 months paid up front. So I went NA, which is monthly. If I dont get a spot, I might hang on it it, or get rid of it. Not sure... but I have like 4 vultr VPS that I could shut down instead....
NutellaLicka02-Apr-19 06:41 AM
Are people running VPS on the test net? Or are you required to run the actual server you will use until the elections?
blackjok3r02-Apr-19 06:42 AM
you can use VPS for either really...
Im using a 4GB VPS in syndey but my stats are terrible
NutellaLicka02-Apr-19 06:42 AM
Can you get VPS with good enough specs though, arent there minimum requirements?
ComputerGenie 👴👴👴02-Apr-19 06:43 AM
I have to do VPS, my 10MB will not cut it
blackjok3r02-Apr-19 06:43 AM
yes, people used them this year... AWS has VPS that scales to insane numbers, but its too expensive
NutellaLicka02-Apr-19 06:43 AM
Surely renting dedicated hardware would be much better.
smk762 - dracocanis ominator02-Apr-19 06:43 AM
less coins on testnet so reasonable VPS can handle it. I'm using fullspec to testdrive it. you can do either.
blackjok3r02-Apr-19 06:43 AM
buying dedicated hardware is the best
NutellaLicka02-Apr-19 06:43 AM
Or that :P
ComputerGenie 👴👴👴02-Apr-19 06:44 AM
Surely renting dedicated hardware would be much better.
at about 19x the overhead cost
NutellaLicka02-Apr-19 06:45 AM
Yeah I looked into it. Its about $300 aud per month here in aus for the required specs
For a dedicated machine.
blackjok3r02-Apr-19 06:46 AM
Im paying $450 a month for rack space and power for my own hardware lol
AUD $
NutellaLicka02-Apr-19 06:46 AM
Geez that is exy
blackjok3r02-Apr-19 06:47 AM
power was the killer here.... QUAD CPU server draws silly power... but the unlimited bandwidth is nice... Most DC had a cap on bandwidth this one is unlimited
ComputerGenie 👴👴👴02-Apr-19 06:47 AM
is afraid to add up what he's spending
1
mrlynch02-Apr-19 06:48 AM
so for the post electiom testnet you don't need to run the server that will go on mainnet?
and use a vps instead?
 I delayed installing server until last minute to save $$$ but I had all teh software ready to go on it months in advance
mrlynch02-Apr-19 06:50 AM
if it was confusing last year maybe it doesn't have to be this year
1
@kolo
blackjok3r02-Apr-19 06:50 AM
Last year the hardfork was moved forward too... otherwise it was 3 months server rent for no reason waiting for hardfork... doubt thats happening this year
mrlynch02-Apr-19 06:50 AM
if i can do the testnet with a $40 vps i'd rather not spend the $350 for the full server
blackjok3r02-Apr-19 06:51 AM
exactly
mrlynch02-Apr-19 06:51 AM
and if pirate wins in both regions that would be $700 (edited)
blackjok3r02-Apr-19 06:51 AM
testnet is to learn not just waste money
1
1
mrlynch02-Apr-19 06:52 AM
i've already picked up quite a lot.. stumbled with setting up your iguana yesterday, losing aprox 2 hrs of notas but pushing hard now
that 80 mb usage is
ComputerGenie 👴👴👴02-Apr-19 06:53 AM
testnet is to learn not just waste money
but what if I want to do both?
1
2
smk762 - dracocanis ominator02-Apr-19 06:54 AM
testnet is cheaper than uni fees.
mrlynch02-Apr-19 06:54 AM
that is true
and a lot more valuable
ComputerGenie 👴👴👴02-Apr-19 06:55 AM
I have 4 uni degrees, you want one?
mrlynch02-Apr-19 06:56 AM
don't have any room left above the toilet.. have mine there, break glass in case of emergency
1
ComputerGenie 👴👴👴02-Apr-19 06:56 AM
well, I had a plan....
and then one random day I woke up and said to myself, "maybe this crypto thing isn't as feked up as I thought it was"(edited)
smk762 - dracocanis ominator02-Apr-19 06:56 AM
has no proof of homework
2
ComputerGenie 👴👴👴02-Apr-19 06:57 AM
PoH chains, I like it
smk762 - dracocanis ominator02-Apr-19 07:02 AM
do a pop quizz, get a token. write an essay, get a token. do a presentation, get a token. Protest opinions you dont like, get a token.
maybe we can gamify "*" studies?
ComputerGenie 👴👴👴02-Apr-19 07:04 AM
Protest opinions you dont like, get a token.
My chain rejects s
smk762 - dracocanis ominator02-Apr-19 07:09 AM
is that Vertiblock PoP thing just Proof of Protest?
1
NutellaLicka02-Apr-19 07:31 AM
What are the storage requirements for the testnet NN's?
ComputerGenie 👴👴👴02-Apr-19 07:32 AM
20G just in chains alone
NutellaLicka02-Apr-19 07:33 AM
Thanks, thats not too bad
mrlynch02-Apr-19 07:52 AM
reclaimed no 10
ComputerGenie 👴👴👴02-Apr-19 07:53 AM
is #4 in last 6hrs and #6 in last 24
mrlynch02-Apr-19 08:14 AM
is #2 in last 6hrs and #7 in last 24hrs due to fumbling with iguana
smk762 - dracocanis ominator02-Apr-19 08:14 AM
the 48hr stat is best stat
blackjok3r02-Apr-19 08:15 AM
is basically last .... but oit is expected using a $20 VPS (in the worst location) vs. $400-500 servers.
smk762 - dracocanis ominator02-Apr-19 08:16 AM
my server was 10x price of yours (assuming AUD?), and I'm almost 10 blocks ahead (edited)
blackjok3r02-Apr-19 08:18 AM
well we add 1 mor coin and my server is 0
I only set it up to get the testnet started... I guess I can updrade it later on.
Dont think I need to prove I can run a notary though lol
smk762 - dracocanis ominator02-Apr-19 08:21 AM
tbh, I wouldnt be doing as well if not for paying attention in LABs, so probably more to your credit than the hardware(edited)
2
CHMEX02-Apr-19 08:22 AM
not sure if it matters but looking at my own stats during off office hours it does better than during office hours. I can imagine the Internet runs faster during non office hours.
1
TonyL02-Apr-19 08:22 AM
I've spent 100 usd on testnet node hmm and have shittons old threads and ddr3 memory
1
blackjok3r02-Apr-19 08:22 AM
My main net node is that
TonyL02-Apr-19 08:23 AM
Just was interesting is ddr3 and old xeons can compete or not (in spot of aiming on real hardware purchasing mostly)
ComputerGenie 👴👴👴02-Apr-19 08:24 AM
the 48hr stat is best stat
not if you had autosplitter issues for the 1st 19
blackjok3r02-Apr-19 08:27 AM
It can just fine @TonyL You just need to make sure the I/O is good and the location is reasonable. The CPU use is liek 0, the biggest diffrence I see with much newer and more expensive hardware is that the I/O is directly connected to the CPU rather than SATA.... The actual CPU speed is moot 99.99% of the time its not even being 1% used.
TonyL02-Apr-19 08:35 AM
I just wondering that more threads is better in case of 50+ daemons usage (not in spot of tasks heaviness on these threads but in spot of multitasking in general)(edited)
blackjok3r02-Apr-19 08:40 AM
More threads is better yes. 48 on my server. But only assigned 24 to notary VM in the end 48 was just crazy overkill... The more coins we get the mor important thread counts will be over single thread preformance.
Slow single threads only draw back is waiting for daemon to sync and load.(edited)
KMD takes 10-15mins to start on my server after sapling upgrade.... Forced me to invent cleanwalelttransactions
1
TonyL02-Apr-19 10:26 AM
@Lumbi your node seems to not notarise atm and maybe TXCS daemon is not up


{{.Title}}
{{.Description}}
Interface
The DBI package defines generic methods that work almost identically across databases. This is checked by DBItest, which also provides a human-readable specification.
Backends
The RSQLite, MariaDB, and RPostgres packages implement methods defined by DBI that connect to specific databases. There are more packages that connect to other databases.
Boilerplate
The RKazam package makes it easy for package developers to create a new package to a new DBMS.


I am a researcher in outbreak response analytics, with a background in biostatistics, population genetics, and R programming. My research focusses on developing new methodologies and tools for understanding how infectious diseases spread, and how we can control them.
I wear several hats, including:
- Associate Professor in Outbreak Analytics at the London School of Hygiene and Tropical Medicine
- Senior Lecturer in Genetic Analysis at Imperial College London
- WHO consultant and member of the WHO COVID-19 analytics team
- A member of the UK Public Health Rapid Support Team
- Founder and current President of the R Epidemics Consortium (RECON), an NGO for the development of free data analytics resources for health emergencies
- Extreme metal vocalist (currently innactive).
You can find my CV here, and my PhD thesis (in French) there.
Outbreak response analytics
I am interested in developing a holistic approach to outbreak data analysis, with a strong focus on emergency outbreak response context, in which analytics directly inform public health decision making. Beyond infectious disease modelling techniques used in academia, I focus on the development of operational analysis tools, including reproducible and auditable data cleaning, interactive data visualisation tools, and automated report generation systems. On a more theoretical side, I am also interested in the estimation of key delay distributions (e.g. incubation period, serial interval distribution), and in robust estimations of transmissibility and the use of branching processes for short term incidence forecasting.
I regularly deploy to outbreak responses in the field, or close to it. In 2019, I will have spent a total of 6 months in North Kivu, DRC, for the response to the Ebola outbreak. I set up the analytics pipelines used first in Béni, then in Goma for informing the leadership of the response on various aspects of the outbreak in real time. Since February 2020, I have been working full-time on COVID-19, setting up data pipelines for the CMMID group at LSHTM, and developing statistical approaches for informing the response in the UK alongside many other members of SPI-M.
Evidence synthesis approaches for epidemics analysis
Part of my research focusses on integrating epidemiological and genomic data for analysing epidemics. I have pioneered the field of statistical outbreak reconstruction by publishing outbreaker in 2014, the first tool integrating epidemiological and genomic data for inferring who infects whom during an epidemic. I am supervising a PhD student on this topic, who carries further the integration of multiple data sources for outbreak reconstruction through the development of outbreaker2. I am also developing fast, scalable algorithms for outbreak detection by combining various type of data including spatial, temporal, and genetic information on reported cases.
RECON: the R Epidemics Consortium
In September 2016, I have create the R Epidemics Consortium (https://www.repidemicsconsortium.org), an international network of experts in infectious disease modelling, public health, and software developers interested in creating the next generation of tools for disease outbreak analysis using the R software.
RECON learn
In December 2017, I have created RECON learn a platform for sharing free, open training material for epidemics analysis. This includes a collection of lectures, practicals and case studies, most of which are distributed under CC-BY license.
Statistical genetics
My earlier research was mostly dedicated to developing multivariate approaches (factorial methods, clustering algorithms), for exploring genetic data. I am still involved in some of these aspects. I am the author of adegenet, a popular R package for genetic/genomic data analysis. With Zhian Kamvar, I am also running a course on data science for population genetic with PR statistics.


3 Thurs Jan 14: Getting started
Assignment 1: to be handed in on BrightSpace by Tues Jan 19 at 2pm.
When deriving a mathematical model, there are a few key principles to keep in mind.
- Modifying an existing model to suit your purposes is often a good approach.
- The units in the terms of your model need to be consistent.
- Different mathematical formulations imply different assumptions about the process you are modelling.
We would like to derive a mathematical model for the following:
Cooling beer in the freezer Room temperature beer can be cooled down by putting it in the freezer. If left too long, the beer will freeze and burst the glass making it undrinkable. How long can the beer be left in the freezer?
Read Box 2.1 on p30-31 of A biologists guide to mathematical modelling.
Step 1. of the modelling process has been completed, because in this example, the question has been provided in this instance. Next, we will skip to Step 4, be the cooling cup of coffee problem is a classic and we can borrow this model for the cooling beer problem.
3.1 The cooling cup of coffee (from Barnes & Fulford, section 9.1-9.2 starting of p218)
We would like to know how long it will take a 60\(^\circ\)C cup of coffee to drop to 40\(^\circ\)C. To develop the model, we assume the cup of coffee is a uniform temperature throughout. The cup of coffee will cool as heat energy from the coffee is lost to its surroundings which are at a lower temperature. Note that temperature is measured in degrees Celsius, while heat is measured in Joules or Watts (Joules per second).
From physics, the equation for the change in the heat content of coffee, \(Q_{hc}\) (in Watts) is, % \[\begin{equation} Q_{hc} = cm \frac{dU}{dt}, \end{equation}\]% where \(c\) is the heat specific constant (measured in Joules per degree Celcius per kilogram), \(m\) is the mass of the material being heated or cooled (in kilograms), and \(U\) is the temperature in Celcius.
Also, from physics the rate of heat exchange of an object which is hotter than its surroundings, \(Q_{cs}\), (in Watts) is, % \[\begin{equation} Q_{cs} = hS(U-u_s), \end{equation}\]% where \(h\) is the constant of convective heat transfer (in Watts per \(m^2\) per degree Celcuis), \(S\) is the surface area from which heat is lost, \(U\) is the temperature of the object and \(u_s<U\) is the temperature of the surroundings (in Celcius).
Owing to the conservation of heat energy, the change in the heat content of coffee, \(Q_{hc}\), should be equal to the rate of heat exchange from the coffee to its surroundings, \(Q_{cs}\). As such, the equation for the cooling of the cup of coffee is, % \[\begin{equation}\label{eq:LL} cm \frac{dU}{dt}=-hS(U-u_s). \end{equation}\]% The negative sign on the righthand side of equation LL is to make sure both sides of the equation are consistent because \(\frac{dU}{dt}\) is negative while all other terms are positive. This is a linear ordinary differential equation (ODE). It is possible to integrate this ODE to solve for \(U(t)\). If we assume that \(U(0) = 60^\circ C\) we can then solve \(t_40\) such that \(U(t_40) = 40^\circ C\).
3.2 Step 4. of the Cooling beer model
- Complete Step 4. from Box 2.1 on p30-31 of A biologists guide to mathematical modelling for the cooling beer problem. Write down the equation for the model, define all the parameters and variables, also giving their units, contraints, and values. Calculate the units for each term in your equation. Note the difference between parameters and variables.
For dynamical system models the dependent variables are the quantities that change over time. Time is the independent variable. Parameters are constants whose values are estimated. The dependent variables need to be assigned an initial value.
You will need to do some research to estiamte the values of the parameter and variables. Provide the evidence to support you parameter estimates.
- Complete Steps 5.-7 from Box 2.1 on p30-31 of A biologists guide to mathematical modelling for the cooling beer problem.


{% extends "base.html" %} {% load url from future %} {% load i18n %} {% block content %}
{% blocktrans %}Thank you. Your account is now activated.{% endblocktrans %}
{% url 'profile' as profile_url %} {% blocktrans %}You might want to adjust your profile now.{% endblocktrans %}
{% endblock %}


selection_to_attribute module¶
This scripts initiate the SELECTA workflow. Given selection in process_selection table with start date null and selection error null, it populate process_stages , process_attributes process_report with appropriate runs metadata
-
selection_to_attribute.
already_ran_runs
(conn, selection_id, processing_type)[source]¶ already_ran_runs: Get previously ran runs accession from the Process_report table. :param conn: PostGreSQL connection :param selection_id: selection_id :param processing_type: processing type (datahub, study, run) :return: ran run accessions.
-
selection_to_attribute.
check_started
(conn, selection_id)[source]¶ check_started: Fetch entries from process_selection with null start date. :param conn: PostGreSQL connection :param selection_id: selection_id :return: Boolean (True/False)
-
selection_to_attribute.
download_datahub_metadatafile
(account, workdir)[source]¶ Fetch datahub metadata from the Pathogen portal given datahub credentials :param account: datahub name :param workdir: working directory :return: datahub Metadata file
-
selection_to_attribute.
exclude_processed_run
(select, attributes_all, already_ran_run_accs)[source]¶ exclude_processed_run: exclude those runs that have been processed. This is actionable when the continuity is set to Yes in process_selection table :param select: an object from the attr list of objects :param attributes_all: a list of attribute objects :param already_ran_run_accs: already processed runs :return: list of runs to exclude from the analysis
-
selection_to_attribute.
fetch_datahub_metadatafile
(account, workdir, lsf)[source]¶ Fetch datahub metadata file via pathogen portal curl -o output.txt -X GET –header ‘Accept: application/json’ -u dcc_beethoven:xxxx ‘https://www.ebi.ac.uk/ena/portal/api/search? result=read_run&dataPortal=pathogen&dccDataOnly=true&fields=tax_id, scientific_name,sample_accession,secondary_sample_accession,experiment_accession, study_accession,secondary_study_accession,run_accession,center_name,fastq_ftp, fastq_md5&sortFields=scientific_name,sample_accession&limit=0’ :param account: datahub account :param workdir: working directory :param lsf: bo0lean :return: Metadata file
-
selection_to_attribute.
get_args
()[source]¶ Process property file and return various attribute :return: various attribute of runs
-
selection_to_attribute.
get_connection
(db_user, db_password, db_host, db_database, db_port)[source]¶ Connect to PostGreSQL database :param db_user: user name :param db_password: passwd :param db_host: PostGreSQL host server :param db_database: DB name :param db_port: connection port on remote server :return: connection handle
-
selection_to_attribute.
get_datahub_accounts
(conn)[source]¶ Extract the datahub name from SELECTADB_PRODUCTION :param conn: PostGreSQL connection :param process_id: process_id :return: datahub names
-
selection_to_attribute.
get_default_attributes
(tsv_file)[source]¶ get_default_attributes: parse datahub metadata file for runs details Read the header line of the tsv for purpose of labelling columns :param tsv_file: metadata file :return: A default_attribute object
-
selection_to_attribute.
get_list_of_study
(selections)[source]¶ get_list_of_study: list of studies per metadata files :param selections: default_attributes object :return: list of studies
-
selection_to_attribute.
get_process_id
(id)[source]¶ get_process_id: generate a string of dmYHMS :param id: process_id :return: unique name of string and dateyeartime
-
selection_to_attribute.
get_selection_info
(conn, datahub)[source]¶ get_selection_info: Fetch from process_selection those selection_id without start date and not public :param conn: PostGreSQL connection :param datahub: Datahub :return: all selection ids satisfying the description above
-
selection_to_attribute.
get_selection_info_old
(conn, datahub)[source]¶ Obselete….. :param conn: connection :param datahub: datahub :return: selection_ids
-
selection_to_attribute.
get_selection_to_attributes_account
(conn)[source]¶ Get_selection_to_attribute_account: Get those selection_id from process_selection where start_date is null :param conn: :return: selection_ids
-
selection_to_attribute.
insert_default_stages
(conn, process_id, selection_id)[source]¶ insert_default_stages: Populate process_stages with various pipeline stages: data_provider, core_executor, analysis_reporter process_archival with start, end time and errors :param conn: PostGreSQL connection :param process_id: process id :param selection_id: selection id :return: None
-
selection_to_attribute.
is_processing_type
(conn, selection_id)[source]¶ is_processing_type: what is type of processing will be carried out. datahub -> study -> runs :param conn: PostGreSQL connection :param selection_id: selection_id :return: datahub or study or runs
-
selection_to_attribute.
log_error
(message, message_type, log_file)[source]¶ log_error: log any encounter error into fil :param message: Error found :param message_type: message type (ERROR, WARNING, INFO) :param log_file: log file :return: None
-
selection_to_attribute.
process_arguments
(args)[source]¶ process_arguments : this process the arguments passed on the command line :param args: list of arguments :return: return the configuration file
-
selection_to_attribute.
process_report_set_finished
(conn, process_report_id)[source]¶ process_report_set_finished: Populate process_report table with finish time this is called by process_archival script. :param con: PostGreSQL connection :param process_report_id: process_report id :return: None
-
selection_to_attribute.
process_report_set_started
(conn, info)[source]¶ process_report_set_started: Populate process_report table with various attributes: study_accession,datahub,run_accession,process_id, selection_id,process_report_start_time :param conn: PostGreSQL connection :param info: info is a dict with the following:
study_id, datahub, run_id,process_id, selection_id, start_time
- Returns
None
-
selection_to_attribute.
set_error
(conn, selection_id, error)[source]¶ set_error: Upate process_selection table with any error that occur while populating process_stage, process_attributes, process_report table with information from the datahub metadata file :param conn: PostGreSQL connection :param selection_id: selection_id (process_selection table native) :param error: Any error encounter during selection_to_attributes runs … :return: None


graphology-gram
From an AST:
parsed AST should appear here
To prettified gram:
stringified gram should appear here


Setting up a RabbitMQ Cluster on Docker
19 April 2017 on docker, rabbitmq, and cluster. 10 minutes
This tutorial will walk you through the steps of setting up a RabbitMQ cluster on Docker.
For this tutorial I’m assuming that:
- You are familiar with both Docker and RabbitMQ.
- The nodes will be running on UNIX systems.
- For the sake of learning our cluster will have just two nodes, so you need to servers.
- Your servers responds to a FQDN. (I will be using node-1.rabbit and node-2.rabbit)
Preparing the environment
When you are working with Docker and you have data that needs to be persistent, it is a good practice to keep it out of your container.
RabbitMQ will save all the data to /var/lib/rabbitmq
inside your container, so it’s a good idea to map this folder to a local folder on your host. Among various reasons,
I would say that one of the most important is: If your container goes into an inconsistent state you can just re-create the container and map the same data folder to it. Or
if you need to backup the data or move somewhere else, just zip that folder.
At this point all you have to do is create a folder that will soon be mapped to the RabbitMQ containers. For production deployments I usually create a data
folder on the system root directory tree.
You can pick whatever you want, but if you are on a macOS you will have some Restrictions.
So go ahead and create your data folder on both servers (like: mkdir /data
)
Starting RabbitMQ docker containers
Now it’s time for some Docker!
- At the first line, we define the container hostname, which will be used to identify the node.
- At the second line, we define the container name.
- From lines 3 to 7 we map the container ports to the host. That way we can access the container services through
node-1.rabbit:PORT
. For details about RabbitMQ ports please See this. - After that we define some environment variables that will be used for RabbitMQ configuration. In this case we are setting just two, you can check what else is available and useful for you Here.
We are setting
RABBITMQ_USE_LONGNAME=true
so each node will communicate with each other using their FQDN. We also setRABBITMQ_LOGS
so all the output goes to a log file instead of STDOUT (which may be a problem in production). - At the 10th and 11th lines, we map the host directory we created for node-1 to the rabbit container.
- Finally we specify which docker image we will be using. In this case RabbitMQ with the management plugin.
That’s it! We have RabbitMQ running, easy eh? If you ever had to install RabbitMQ before you probably know that it can be really trick to deal with a lot of dependencies, Erlang/OTP and so on. You can have an idea by checking RabbitMQ Dockerfile.
Want to see it live? Just give it a try. Open your browser and go to http://node-1.rabbit:15672
. You should see something like this:
If check the data folder we created before you will see that RabbitMQ has created a log folder for you, and you also should have some data on it.
Now do the same thing on the second server.  This file contains a secret (some sort of random hash),
that will be automatically created if it doesn’t exist.
This file is used to determine if a node can communicate with another node. The communication will be allowed if both nodes share the same
secret on .erlang.cookie
file.
Just copy the secret on .erlang.cookie
from the first node and copy it to the second node. Then restart the Docker container for the second node.
RabbitMQ Browser UI
rabbitmq-management plugin provides a browser-based UI to monitor and configure a lot of RabbitMQ features.
You can access it at: http://node-1.rabbit:15672
Unfortunately you can’t configure 100% of your cluster through the browser interface, for that reason we are going to use only the command line tool rabbitmqctl
.
Disabling guest user
This step is not mandatory, but you definitely want to do it in production for security reasons. RabbitMQ will by default create a guest user (password: guest).
From now on we are going to send rabbitmqctl
commands through the command line to the docker RabbitMQ containers.
Let’s get rid of this security branch:
docker exec rabbit rabbitmqctl delete_user guest
You just need to do this on the first node. Once we create the cluster and connect the second RabbitMQ node to it all the configurations will be copied.
RabbitMQ virtual host
For learning purposes, let’s assume that we have just one virtual host /
. All configuration will belong to that host. Once again, you just need to
do this on the first node.
Create a virtual host:
docker exec rabbit rabbitmqctl add_vhost /
Create Users
We are going to create two users. One is an administrator user, which can have access to the browser UI and make changes to the cluster configurations.
The second is an application level user, which will have permissions to interact with RabbitMQ at the application level. It will have read/write permissions to the /
virtual host.
You can customize it to your needs.
# Admin user
docker exec rabbit rabbitmqctl add_user josuelima MyPassword999
docker exec rabbit rabbitmqctl set_user_tags josuelima administrator
# Application user
docker exec rabbit rabbitmqctl add_user ruby_app SuperPassword000
docker exec rabbit rabbitmqctl set_permissions -p / ruby_app ".*" ".*" ".*"
Once again, you just need to do this on the first node.
Creating our cluster
Now that our first node is setup, we are going to make our second node join the first and start clustering. All we have to this is stop the second node RabbitMQ (not the docker container) and then connect it to the first node.
Let’s move to the second node and do it:
docker exec rabbit rabbitmqctl stop_app
docker exec rabbit rabbitmqctl join_cluster<EMAIL_ADDRESS>docker exec rabbit rabbitmqctl start_app
Great! Now the second node will copy all the settings from the first node and we should have our cluster running. You can check it in the browser UI or using the command line.
If you access the browser UI at http://node-1.rabbit:15672
or http://node-2.rabbit:15672
and login with the administrator user we just created before,
you should see something like this:
On the command line you can do: docker exec rabbit rabbitmqctl cluster_status
That’s it! Now you have a RabbitMQ Cluster running with Docker. If you want to add more nodes to it just create a new RabbitMQ Docker container and connect it to the cluster.
Queues behaviour
Now that we have our cluster running it’s time to think about how we want it to behave. By default, queues within a RabbitMQ cluster are located on a single node (the node on which they were first declared). It is really important to understand this.
What it means is that your queues will be distributed among your cluster nodes. Is this the kind of scneario you want? When is it a good idea?
Distributed Queues
A good use for distributed Queues is when you have really high I/O rates for your queues and want to distribute the load across all the nodes. Have in mind that a queue will live in one only node, and if one node goes down all the queues living on that node will be unavailable until it’s back up.
If this is the scenario you want, you are good to go. Distributed Queues are default.
I would also recommend you having a look at HAProxy Load Balancer, or if you are on AWS AWS Elastic Load Balancing. It becomes really useful on a distributed queues scenario, where you have a lot of nodes.
Mirrored Queues
You can also have Mirrored Queues, which is a kind of replica-set. In this situation all the nodes will just be a copy of each other. All the messages published to a queue are replicated to all the cluster nodes.
This is very useful when you need high availability for your queues. That way, if a node goes down you still have all your queues available in the other nodes.
To setup mirrored queues you just need to set a policy to your queues to make them high available.
docker exec rabbit rabbitmqctl set_policy ha "." '{"ha-mode":"all"}'
In this example we set the policy named ha
so all queues .
will be high available in all nodes {"ha-mode":"all"}
.
You can have various configurations for High Available queues, check the Documentation.
Conclusion
Here you got the concepts of setting up a RabbitMQ Cluster on Docker. There’s way more that you can do to improve your cluster implementation, like RAM Nodes, Firewall Nodes, Partition, Synchronization and so on. I’ve listed below two important links:


| cli-config {cli} | R Documentation |
cli environment variables and options
These are env vars and options that usrs may set, to modify the behavior of cli.
NO_COLOR
Set to a nonempty value to turn off ANSI colors.
See num_ansi_colors()
.
R_CLI_DYNAMIC
Set to true
, TRUE
or True
to assume a dynamic terminal, that supports \r
.
Set to anything else to assume a non-dynamic terminal.
See is_dynamic_tty()
.
R_CLI_NUM_COLORS
Set to a positive integer to assume a given number of colors.
See num_ansi_colors()
.
cli.ansi
Set to true
, TRUE
or True
to assume a terminal that supports ANSI
control sequences.
Set to anything else to assume a non-ANSI terminal.
See is_ansi_tty()
.
cli.default_handler
General handler function for all cli conditions. See https://cli.r-lib.org/articles/semantic-cli.html#cli-messages-1
cli.dynamic
Set to TRUE
to assume a dynamic terminal, that supports \r
.
Set to anything else to assume a non-dynamic terminal.
See is_dynamic_tty()
.
cli.hide_cursor
Whether the cli status bar should try to hide the cursor on termianals.
Set the FALSE
if the hidden cursor causes issues.
cli.hyperlink
Set to true
, TRUE
or True
to tell cli that the terminal supports
ANSI hyperlinks.
Set to anything else to assume no hyperlink support.
See style_hyperlink()
.
cli.num_colors
Number of ANSI colors. See num_ansi_colors()
.
cli.message_class
Character vector of classes to add to cli's conditions.
cli.progress_bar_style
Progress bar style.
See cli_progress_styles()
.
cli.progress_bar_style_ascii
Progress bar style on ASCII consoles.
See cli_progress_styles()
.
cli.progress_bar_style_unicode
Progress bar style on Unicode (UTF-8) consoles;
See cli_progress_styles()
.
cli.progress_clear
Whether to clear terminated progress bar from the screen on dynamic terminals.
See cli_progress_bar()
.
cli.progress_demo_live
Whether cli_progress_demo()
should show a live demo, or just record the
progress bar frames.
cli.progress_format_download
Default format string for download
progress bars.
cli.progress_format_download_nototal
Default format string for download
progress bars with unknown totals.
cli.progress_format_iterator
Default format string for iterator
progress bars.
cli.progress_format_iterator_nototal
Default format string for iterator
progress bars with unknown total number
of progress units.
cli.progress_format_tasks
Default format string for tasks
progress bars.
cli.progress_format_tasks_nototal
Default format string for tasks
progress bars with unknown totals.
cli.progress_handlers
Progress handlers to try.
See cli_progress_builtin_handlers()
.
cli.progress_handlers_force
Progress handlers that will always be used, even if another handler
was already selected.
See cli_progress_builtin_handlers()
.
cli.progress_handlers_only
Progress handlers to force, ignoring handlers set in
cli.progress_handlers
and cli.progress_handlers_force
.
See cli_progress_builtin_handlers()
.
cli.progress_say_args
Command line arguments for the say
progress handlers.
See cli_progress_builtin_handlers()
.
cli.progress_say_command
External command to use in the say
progress handler.
See cli_progress_builtin_handlers()
.
cli.progress_say_frequency
Minimum delay between say
calls in the say
progress handler.
say
ignores very frequent updates, to keep the speech comprehensible.
See cli_progress_builtin_handlers()
.
cli.progress_show_after
Delay before showing a progress bar, in seconds. Progress bars that finish before this delay are not shown at all.
cli.spinner
Default spinner to use, see get_spinner()
.
cli.spinner_ascii
Default spinner to use on ASCII terminals, see get_spinner()
.
cli.spinner_unicode
Default spinner to use on Unicode terminals, see get_spinner()
.
cli.theme
Default cli theme, in addition to the built-in theme.
This option in intended for the package developers.
See themes and start_app()
.
cli_theme_dark
Whether cli should assume a dark theme for the builtin theme.
See builtin_theme()
.
cli.unicode
Whether to assume a Unicode terminal.
If not set, then it is auto-detected.
See is_utf8_output()
.
cli.user_theme
cli user theme. This option is intended for end users. See themes.
cli.width
Terminal width to assume.
If not set, then it is auto-detected.
See console_width()
.
rlib_interactive
Whether to assume an interactive R session. If not set, then it is auto-detected.
width
Terminal width.
This is used on some platforms, if cli.width
is not set.
These are env vars and options are for cli developers, users should not rely of them as they may change between cli releases.
ASCIICAST
Used to detect an asciicast subprocess in RStudio.
ANSICON
Used to detect ANSICON when detecting the number of ANSI colors.
CI
Used to detect if the code is running on a CI. If yes, we avoid ANSI hyperlinks.
CLI_DEBUG_BAD_END
Whether to warn about cli_end()
calls when there is no container to close.
CLI_NO_BUILTIN_THEME
Set it to true
to omit the builtin theme.
CLI_SPEED_TIME
Can be used to speed up cli's timer. It is a factor, e.g. setting it to 2 makes cli's time go twice as fast.
CLI_TICK_TIME
How often the cli timer should alert, in milliseconds.
CMDER_ROOT
Used to detect cmder when detecting the number of ANSI colors.
COLORTERM
Used when detecting ANSI color support.
ConEmuANSI
Used to detect ConEmu when detecting the number of ANSI colors.
EMACS
Used to detect Emacs.
INSIDE_EMACS
Used to detect Emacs.
NOT_CRAN
Set to true
to run tests / examples / checks, that do not run on CRAN.
_R_CHECK_PACKAGE_NAME_
Used to detect R CMD check
.
R_BROWSER
Used to detect the RStudio build pane.
R_GUI_APP_VERSION
Used to detect R.app on macOS, to decide if the console has ANSI control sequences.
R_PACKAGE_DIR
Used to detect if the code is running under R CMD INSTALL
.
R_PDFVIEWER
Used to detect the RStudio build pane.
R_PROGRESS_NO_EXAMPLES
Set to true
to avoid running examples, outside of R CMD check
.
RSTUDIO
Used to detect RStudio, in various functions.
RSTUDIO_CONSOLE_COLOR
Used to detect the number of colors in RStudio.
See num_ansi_colors()
.
RSTUDIO_CONSOLE_WIDTH
Used to auto-detect console width in RStudio.
RSTUDIO_TERM
Used to detect the RStudio build pane.
TEAMCITY_VERSION
Used to detect the TeamCity CI, to turn off ANSI hyperlinks.
TERM
Used to detect if the console has ANSI control sequences, in a terminal.
TERM_PROGRAM
Used to detect iTerm for the dark theme detection and the ANSI hyperlink support detection.
TERM_PROGRAM_VERSION
Used to detect a suitable iTerm version for ANSI hyperlink support.
TESTTHAT
Used to detect running in testthat tests.
VTE_VERSION
Used to detect a suitable VTE version for ANSI hyperlinks.
cli__pb
This option is set to the progress bar that is being updated, when interpolatinf the format string.
cli.record
Internal option to mark the state that cli is recording messages.
crayon.colors
Deprecated option for the number of ANSI colors, that is still supported
by cli, when the new options are not set.
See num_ansi_colors()
.
crayon.enabled
Deprecated option to turn ANSI colors on/off.
This is still supported by cli when the new options are not set.
See num_ansi_colors()
.
crayon.hyperlink
Whether to assume ANSI hyperlink support.
See ansi_has_hyperlink_support()
.
knitr.in.progress
Used to detect knitr when detecting interactive sessions and ANSI color support.
rstudio.notebook.executing
Used to detect knitr when detecting interactive sessions.


EXCLUSIVE: TK Kirkland Breaks Down Why He Thinks VladTV is Successful
by Jessica ToddTK Kirkland shared his thoughts on the former head of Death Row security, Reggie Wright Jr., being sentenced to 1.5 years in prison for selling marijuana. TK pointed out that 1.5 years is a lot of time when you're in your 50's, but TK agreed with DJ Vlad about hoping that Reggie makes the most of his time in prison for personal betterment. TK also spoke about plans to drop his new comedy special next year, which he hopes to release the same day as Eddie Murphy's stand-up special for some "friendly competition." To hear more, including TK big up DJ Vlad for the success story of VladTV, hit the above clip.


Great Writing Examples Great Paragraph Below This is my great paragraph. You love it. Div 1 Div 2 Div 3 Div 4


<juicy-ace-editor>
Even more embeddable code editor. Custom Element - just one tag, and no JS needed to provide Ace - The High Performance Code Editor
Here you have:
<juicy-ace-editor theme="ace/theme/monokai" mode="ace/mode/html"> <juicy-ace-editor>element.
You can switch modes and themes as regular HTML attributes to whatever is supported by Ace
Ok, in fact you have seen
<juicy-ace-editor theme="ace/theme/monokai" mode="ace/mode/html"><p>Here you have:..


LABOURS OF (AN)OTHER SOLIPSIST
- Web Design
- |
- Illustration
The independent film Labours of (An)Other Solipsist is a labour of love for the director Nihaarika Negi and an unusual film in both its narrative structure and visuals. The brief was to translate the films personality into a convincing web presence. The challenge was to do that without simply repeating the films visuals. I wanted the website to contribute to the story of the film, not simply to repeat it. This was done through a punchy illustration that distilled the film's essence and weaving hidden dialogues through the website that encourage a non-linear reading of the film.
After several conversations and concept sketches, I illustrated a iconic scene from the film. This helped anchor the mood of the website and develop the personality of the film presence on the internet.The film's strong surreal sensibilties were an inspiration for the illsutration. A colour palette for the website was then developed from the illustration's digital neon sensibilites.
All the content featured on the website is written by the director and writer of the film, Nihaarika Negi.


Storyboard StudyRight with assignments class generation
StudyRight with assignments class generation
1. generate class University
ClassModel model = new ClassModel("org.sdmlib.test.examples.studyrightWithAssignments.model"); Clazz universityClass = model.createClazz("University") .withAttribute("name", DataType.STRING);
2. generate class Student
Clazz studentClass = model.createClazz("Student") .withAttribute("name", DataType.STRING) .withAttribute("id", DataType.STRING) .withAttribute("assignmentPoints", DataType.INT) .withAttribute("motivation", DataType.INT) .withAttribute("credits", DataType.INT);
3. add University --> Student association
universityClass.withAssoc(studentClass, "students", Card.MANY, "university", Card.ONE);
4. add University --> Room association
Clazz roomClass = model.createClazz("Room") .withAttribute("name", DataType.STRING) .withAttribute("topic", DataType.STRING) .withAttribute("credits", DataType.INT); roomClass.createMethod("findPath").withParameter("String", DataType.INT); //Association universityToRoom = universityClass.withAssoc(roomClass, "rooms", Card.MANY, "university", Card.ONE); // Association doors = roomClass.withAssoc(roomClass, "doors", Card.MANY, "doors", Card.MANY); // Association studentsInRoom = studentClass.withAssoc(roomClass, "in", Card.ONE, "students", Card.MANY);
5. add assignments:
Clazz assignmentClass = model.createClazz("Assignment") .withAttribute("content", DataType.STRING) .withAttribute("points", DataType.INT) .withAssoc(roomClass, "room", Card.ONE, "assignments", Card.MANY); studentClass.withAssoc(assignmentClass, "done", Card.MANY, "students", Card.MANY);
6. generate class source files.
model.generate("src/test/java"); // usually don't specify anything here, then it goes into src


touch-action: none
Click
Delay was
...
milliseconds.
touch-action: manipulation
Click
Delay was
...
milliseconds.


blackjack
.
Checking if an unfinished game exists on the server. Please grab a coffee
dealer :
~
you :
~
deal the cards
hit
stand


{% extends "boh/engagement/base_engagements.html" %} {% load humanize %} {% load markdown_render %} {% block title %}{{ application.name }} | {{ engagement.start_date }} - {{ engagement.end_date }}{% endblock %} {% block engagement_breadcrumb %}
Requested by {{ engagement.requestor.first_name }} {{ engagement.requestor.last_name }}.
{% endif %}Activities are units of work performed over the engagement duration.
Leave comments about this engagement.
{% for comment in engagement.engagementcomment_set.all %}


A graphic element that contains at least three sides. All sides are connected straight lines, and the shape is "closed" (all the lines connected).
Shortcut Keys
When hovering on the Shape's outline:
- Alt-Click: Deletes a shape handle
- Ctrl-Click: Inserts a new shape handle


Black
This hand-tailored suit is now on sale for $99.99 originally $149.99! GET IT NOW!!
Our more casual suit is soon to be available.


Lagos trains 300 driving instructors - The Nation Newspaper
Oziegbe Okoeki
LAGOS State government has trained over 300 driving school instructors in order to enhance their operations and help scale down traffic infractions.
The drivers were trained during a seminar organised by the Lagos State Drivers’ Institute (LASDRI).
Declaring the seminar open, Permanent Secretary, Ministry of Transportation, Mr Sewedo Oluseyi Whenu said training, retraining and recertification of drivers is germane towards ensuring a road safety culture in Lagos state and elsewhere.
Read Also: Two ‘kidnappers’ lynched in Lagos
“The seminar is designed to equip you all as the first line drivers’ instructors with necessary skills that will have cross effects on safe driving in the state; you are saddled with the responsibility of building confidence that will match the driving challenges of the state”.
He told them that they are expected to teach road designs and automobile apparatus in their schools and that the seminar is organised to review the curriculum/templates they use in their various driving schools with the aim of adopting a uniform template towards Y2019/2020 training year.


--- layout: post title: "The Business of Ed-Tech: June 2018 Funding Data" date: 2018-06-30 14:00:00 +0000 tags: image: https://s3.amazonaws.com/hackedu/2017-03-01-money.jpg imagecredits: https://www.flickr.com/photos/chrisdlugosz/3403776466 ---
Here is the latest data on “the business of education” for June 2018:
We’re halfway through 2018, which means it’s time to start thinking about what the trends are looking like for the year. Certainly those trends are quite obvious when you look at which companies have received the largest investments so far this year. (See below.)
It may be that 2018 is on track to see more ed-tech investment than in the previous three years (and 2015 was a record-breaking year). But just looking at the total amount of investment is a little deceiving, and this month’s funding is a good example of this. More dollars went into ed-tech companies this past month than in any month so far this year. But of that $584.4 million, $500 million went to one company, VIPKID. The number of deals in June was actually the lowest it’s been all year, and the number of deals total is down from the previous few years too.
That means that fewer companies are seeing larger investments, obviously. Consolidation in the market is also evident in the number of acquisitions – the highest in June than it’s been all year.
One other interesting trend from June – and I don’t want to read too much into this: of the 13 companies that raised venture funding, just 4 were from the US.
The companies that have raised the most money in 2018 (not including the venture capital firms that have raised new funds):
As part of this project, you can review information from the last few years who’s received funding, who’s been acquired, who’s IPO’d, which startups have closed, and who’s investing in the stories that Edsurge tells you about the shape of the education technology industry.
I have created separate GitHub repositories for all areas of funding that I monitor:
These sites include human- and machine-readable versions of this funding data. For more ed-tech data sets, visit Hack Education Data on GitHub.
If you see an error or omission, please file a GitHub issue. You’re welcome to fork or download the repositories too, of course.


soil species diversity plant rates carbon plots storage root – cm biomass depth sequestration Soil Supplementary greater {border-style Table abandoned period px;} restoration #ffffff;} agricultural bulk succession (Fig. density annual lands cm Fig. grasses grassland higher years late-successional planted (±.), Ecol. different high (Supplementary Tilman aboveground degraded functional perennial rate second species, best experiment natural organic profile roots used Sci. mass time times upper year -species core data grass high-diversity increase increased matter monoculture nitrogen observed plot px; years) {font-family − y (±.) Mg-C ha Nature Science analysis average concentration ecological experiment, font-size legume mean native number productivity sampling soils suggest traits (– cm ./j.-...x Change Ecology abandonment accumulation climate diversity, double; ecosystem field global indicate land levels linear means mixed multiple potential present showed use versus Environ. However, Plant P = .), atmospheric b). below-ground bioenergy border-color border-width changes diversity. effect effects highly legumes lower model production provide respectively, results sampled solid; species. standard stocks that, using {font-style {font-weight "e" (R:S = .; .%, Biol. Cedar Commons Creative Creek Glob. Mean Minnesota, P < .), absent abundance analyses associated biodiversity biomass, bold contrast, contributed courier; decomposition dominant dried em; fields gas given highest included influence interaction lands. level plots, pt;} randomly regression samples site, site. soil, succession, time, total treatment


Storm comes with a Clojure DSL for defining spouts, bolts, and topologies. The Clojure DSL has access to everything the Java API exposes, so if you’re a Clojure user you can code Storm topologies without touching Java at all. The Clojure DSL is defined in the source in the backtype.storm.clojure namespace.
This page outlines all the pieces of the Clojure DSL, including:
- Defining topologies
defbolt
defspout
- Running topologies in local mode or on a cluster
- Testing topologies
Defining topologies
To define a topology, use the topology
function. topology
takes in two arguments: a map of “spout specs” and a map of “bolt specs”. Each spout and bolt spec wires the code for the component into the topology by specifying things like inputs and parallelism.
Let’s take a look at an example topology definition from the storm-starter project:
clojure
(topology
{"1" (spout-spec sentence-spout)
"2" (spout-spec (sentence-spout-parameterized
["the cat jumped over the door"
"greetings from a faraway land"])
:p 2)}
{"3" (bolt-spec {"1" :shuffle "2" :shuffle}
split-sentence
:p 5)
"4" (bolt-spec {"3" ["word"]}
word-count
:p 6)})
The maps of spout and bolt specs are maps from the component id to the corresponding spec. The component ids must be unique across the maps. Just like defining topologies in Java, component ids are used when declaring inputs for bolts in the topology.
spout-spec
spout-spec
takes as arguments the spout implementation (an object that implements IRichSpout) and optional keyword arguments. The only option that exists currently is the :p
option, which specifies the parallelism for the spout. If you omit :p
, the spout will execute as a single task.
bolt-spec
bolt-spec
takes as arguments the input declaration for the bolt, the bolt implementation (an object that implements IRichBolt), and optional keyword arguments.
The input declaration is a map from stream ids to stream groupings. A stream id can have one of two forms:
[==component id== ==stream id==]
: Subscribes to a specific stream on a component==component id==
: Subscribes to the default stream on a component
A stream grouping can be one of the following:
:shuffle
: subscribes with a shuffle grouping- Vector of field names, like
["id" "name"]
: subscribes with a fields grouping on the specified fields :global
: subscribes with a global grouping:all
: subscribes with an all grouping:direct
: subscribes with a direct grouping
See Concepts for more info on stream groupings. Here’s an example input declaration showcasing the various ways to declare inputs:
clojure
{["2" "1"] :shuffle
"3" ["field1" "field2"]
["4" "2"] :global}
This input declaration subscribes to three streams total. It subscribes to stream “1” on component “2” with a shuffle grouping, subscribes to the default stream on component “3” with a fields grouping on the fields “field1” and “field2”, and subscribes to stream “2” on component “4” with a global grouping.
Like spout-spec
, the only current supported keyword argument for bolt-spec
is :p
which specifies the parallelism for the bolt.
shell-bolt-spec
shell-bolt-spec
is used for defining bolts that are implemented in a non-JVM language. It takes as arguments the input declaration, the command line program to run, the name of the file implementing the bolt, an output specification, and then the same keyword arguments that bolt-spec
accepts.
Here’s an example shell-bolt-spec
:
clojure
(shell-bolt-spec {"1" :shuffle "2" ["id"]}
"python"
"mybolt.py"
["outfield1" "outfield2"]
:p 25)
The syntax of output declarations is described in more detail in the defbolt
section below. See Using non JVM languages with Storm for more details on how multilang works within Storm.
defbolt
defbolt
is used for defining bolts in Clojure. Bolts have the constraint that they must be serializable, and this is why you can’t just reify IRichBolt
to implement a bolt (closures aren’t serializable). defbolt
works around this restriction and provides a nicer syntax for defining bolts than just implementing a Java interface.
At its fullest expressiveness, defbolt
supports parameterized bolts and maintaining state in a closure around the bolt implementation. It also provides shortcuts for defining bolts that don’t need this extra functionality. The signature for defbolt
looks like the following:
(defbolt name output-declaration *option-map & impl)
Omitting the option map is equivalent to having an option map of {:prepare false}
.
Simple bolts
Let’s start with the simplest form of defbolt
. Here’s an example bolt that splits a tuple containing a sentence into a tuple for each word:
clojure
(defbolt split-sentence ["word"] [tuple collector]
(let [words (.split (.getString tuple 0) " ")]
(doseq [w words]
(emit-bolt! collector [w] :anchor tuple))
(ack! collector tuple)
))
Since the option map is omitted, this is a non-prepared bolt. The DSL simply expects an implementation for the execute
method of IRichBolt
. The implementation takes two parameters, the tuple and the OutputCollector
, and is followed by the body of the execute
function. The DSL automatically type-hints the parameters for you so you don’t need to worry about reflection if you use Java interop.
This implementation binds split-sentence
to an actual IRichBolt
object that you can use in topologies, like so:
clojure
(bolt-spec {"1" :shuffle}
split-sentence
:p 5)
Parameterized bolts
Many times you want to parameterize your bolts with other arguments. For example, let’s say you wanted to have a bolt that appends a suffix to every input string it receives, and you want that suffix to be set at runtime. You do this with defbolt
by including a :params
option in the option map, like so:
clojure
(defbolt suffix-appender ["word"] {:params [suffix]}
[tuple collector]
(emit-bolt! collector [(str (.getString tuple 0) suffix)] :anchor tuple)
)
Unlike the previous example, suffix-appender
will be bound to a function that returns an IRichBolt
rather than be an IRichBolt
object directly. This is caused by specifying :params
in its option map. So to use suffix-appender
in a topology, you would do something like:
clojure
(bolt-spec {"1" :shuffle}
(suffix-appender "-suffix")
:p 10)
Prepared bolts
To do more complex bolts, such as ones that do joins and streaming aggregations, the bolt needs to store state. You can do this by creating a prepared bolt which is specified by including {:prepare true}
in the option map. Consider, for example, this bolt that implements word counting:
clojure
(defbolt word-count ["word" "count"] {:prepare true}
[conf context collector]
(let [counts (atom {})]
(bolt
(execute [tuple]
(let [word (.getString tuple 0)]
(swap! counts (partial merge-with +) {word 1})
(emit-bolt! collector [word (@counts word)] :anchor tuple)
(ack! collector tuple)
)))))
The implementation for a prepared bolt is a function that takes as input the topology config, TopologyContext
, and OutputCollector
, and returns an implementation of the IBolt
interface. This design allows you to have a closure around the implementation of execute
and cleanup
.
In this example, the word counts are stored in the closure in a map called counts
. The bolt
macro is used to create the IBolt
implementation. The bolt
macro is a more concise way to implement the interface than reifying, and it automatically type-hints all of the method parameters. This bolt implements the execute method which updates the count in the map and emits the new word count.
Note that the execute
method in prepared bolts only takes as input the tuple since the OutputCollector
is already in the closure of the function (for simple bolts the collector is a second parameter to the execute
function).
Prepared bolts can be parameterized just like simple bolts.
Output declarations
The Clojure DSL has a concise syntax for declaring the outputs of a bolt. The most general way to declare the outputs is as a map from stream id a stream spec. For example:
clojure
{"1" ["field1" "field2"]
"2" (direct-stream ["f1" "f2" "f3"])
"3" ["f1"]}
The stream id is a string, while the stream spec is either a vector of fields or a vector of fields wrapped by direct-stream
. direct stream
marks the stream as a direct stream (See Concepts and Direct groupings for more details on direct streams).
If the bolt only has one output stream, you can define the default stream of the bolt by using a vector instead of a map for the output declaration. For example:
clojure
["word" "count"]
This declares the output of the bolt as the fields [“word” “count”] on the default stream id.
Emitting, acking, and failing
Rather than use the Java methods on OutputCollector
directly, the DSL provides a nicer set of functions for using OutputCollector
: emit-bolt!
, emit-direct-bolt!
, ack!
, and fail!
.
emit-bolt!
: takes as parameters theOutputCollector
, the values to emit (a Clojure sequence), and keyword arguments for:anchor
and:stream
.:anchor
can be a single tuple or a list of tuples, and:stream
is the id of the stream to emit to. Omitting the keyword arguments emits an unanchored tuple to the default stream.emit-direct-bolt!
: takes as parameters theOutputCollector
, the task id to send the tuple to, the values to emit, and keyword arguments for:anchor
and:stream
. This function can only emit to streams declared as direct streams.ack!
: takes as parameters theOutputCollector
and the tuple to ack.fail!
: takes as parameters theOutputCollector
and the tuple to fail.
See Guaranteeing message processing for more info on acking and anchoring.
defspout
defspout
is used for defining spouts in Clojure. Like bolts, spouts must be serializable so you can’t just reify IRichSpout
to do spout implementations in Clojure. defspout
works around this restriction and provides a nicer syntax for defining spouts than just implementing a Java interface.
The signature for defspout
looks like the following:
(defspout name output-declaration *option-map & impl)
If you leave out the option map, it defaults to {:prepare true}. The output declaration for defspout
has the same syntax as defbolt
.
Here’s an example defspout
implementation from storm-starter:
clojure
(defspout sentence-spout ["sentence"]
[conf context collector]
(let [sentences ["a little brown dog"
"the man petted the dog"
"four score and seven years ago"
"an apple a day keeps the doctor away"]]
(spout
(nextTuple []
(Thread/sleep 100)
(emit-spout! collector [(rand-nth sentences)])
)
(ack [id]
;; You only need to define this method for reliable spouts
;; (such as one that reads off of a queue like Kestrel)
;; This is an unreliable spout, so it does nothing here
))))
The implementation takes in as input the topology config, TopologyContext
, and SpoutOutputCollector
. The implementation returns an ISpout
object. Here, the nextTuple
function emits a random sentence from sentences
.
This spout isn’t reliable, so the ack
and fail
methods will never be called. A reliable spout will add a message id when emitting tuples, and then ack
or fail
will be called when the tuple is completed or failed respectively. See Guaranteeing message processing for more info on how reliability works within Storm.
emit-spout!
takes in as parameters the SpoutOutputCollector
and the new tuple to be emitted, and accepts as keyword arguments :stream
and :id
. :stream
specifies the stream to emit to, and :id
specifies a message id for the tuple (used in the ack
and fail
callbacks). Omitting these arguments emits an unanchored tuple to the default output stream.
There is also a emit-direct-spout!
function that emits a tuple to a direct stream and takes an additional argument as the second parameter of the task id to send the tuple to.
Spouts can be parameterized just like bolts, in which case the symbol is bound to a function returning IRichSpout
instead of the IRichSpout
itself. You can also declare an unprepared spout which only defines the nextTuple
method. Here is an example of an unprepared spout that emits random sentences parameterized at runtime:
clojure
(defspout sentence-spout-parameterized ["word"] {:params [sentences] :prepare false}
[collector]
(Thread/sleep 500)
(emit-spout! collector [(rand-nth sentences)]))
The following example illustrates how to use this spout in a spout-spec
:
clojure
(spout-spec (sentence-spout-parameterized
["the cat jumped over the door"
"greetings from a faraway land"])
:p 2)
Running topologies in local mode or on a cluster
That’s all there is to the Clojure DSL. To submit topologies in remote mode or local mode, just use the StormSubmitter
or LocalCluster
classes just like you would from Java.
To create topology configs, it’s easiest to use the backtype.storm.config
namespace which defines constants for all of the possible configs. The constants are the same as the static constants in the Config
class, except with dashes instead of underscores. For example, here’s a topology config that sets the number of workers to 15 and configures the topology in debug mode:
clojure
{TOPOLOGY-DEBUG true
TOPOLOGY-WORKERS 15}
Testing topologies
This blog post and its follow-up give a good overview of Storm’s powerful built-in facilities for testing topologies in Clojure.


This investigation scenario is done on a plain Windows machine, where the file Explorer is always available. The goal is to grab as much information as possible about the internal behaviour of a well-known executable. The image are taken from the static SVG output, as it is more stable to copy/paste. This is a simple experiment on a process whose side effects and interactions with other resources are more or less known in advance, and quite simple. Please note that, no command has to be entered, and no specific knowledge in IT is necessary.
The first step is to find the process using the "Process tree" script (enumerate_CIM_Process.py). In the graph of processes and subprocesses, because it is a SVG document, one can use the Browser "find" usual command to find one or several processes running "explorer.exe", but it is also possible to scroll in the graph. This object is of the CIM class CIM_Process. To be exact, this is a subclass of this class.
Several scripts are available to run on this process. Only the scripts which can run on a Windows machine are displayed.
Of course, the scripts related to Java processes are not worth being called, as Explorer is written only in C. Still, a C process could call Java libraries, therefore in some tituations these scripts are usable.
The scripts in the folder "Regex matching in heap" scan the memory process to detect some specific strings, using regular expressions. Let's have a look to some of the HTTP urls this process contains. It is not entirely clear why this and that URL appears in the process memory.
URLs do not have a class name in the CIM terminology. This is not a difficulty for Survol which very easily adds its own classes to CIM ones: Each Survol class is a Python module, with very few requirements.
The script displaying sockets does not return anything. On the other hand, the list of memory mapped-files is really huge; It would be nice to display them in a list instead of a graph. Several of them related to TortoiseSVN and TortoiseGIT, for example this library.
We will see why we think it is dynamically loaded. Memory-mapped files are a different entity than plain files, because they convey more information such as the amount of memory mapped, the addresses etc... Still, there is a one-to-one correspondance with their data file names, which is why they have the same name.
It is not uninteresting to see that this DLL is also opened by several processes. But why does Snipping Tool accesses this DLL ? This can only be an indirect load because it is not part of the static dependency of this executable. It is of course possible to click on each process or any other resource to have a better idea of possible interactions.
One can see the associated CIM_DataFile object associated to the mapped file. It has a standard CIM class.
Back to Windows Explorer. Which file does it open ? Unsurprisingly, cache files containing icons, if we believe the hint given by their names. At the moment, there is no script to decode these (They are no SQLLite database files despite the extensions).
Without too much surprise, we can see the file names contained in the memory process. We can find the files which are currently being displayed in the user interface and, of course, their names appear in the heap.
What is more interesting is that they apparently are not stored in a process cache, but simply resides in the operating system memory. A possible explanation is that Explorer would use the Operating System cache.
By default, the script selects only the filenames whose file actually exist. So it is possible to click on each filename and investigate further, or simply display it if it has a MIME type. But it is possible to toggle this flag, and in this case non-existent filenames will be displayed.
The logic of searching the process memory for specific patterns is very easy to extend to new expressions. At the moment, this can detect SQL queries, HTTP URLs, ODBC connections strings, file names and COM classes, once a specific characters patterns is defined.
Now, let's have a look at the executable file itself, and the possibilities offered by Survol:
Of course, the scripts related to Java processes are not worth being called, as Explorer is written only in C. Still, a C process could call Java libraries, therefore in some tituations these scripts are usable.
Explorer.exe contains several icons ... This is not a very useful information in itself, but the methodology can be extended to extract any type of information from a CIM_Datafile object.
There is also a script which displays the complete graph of DLLs (Dynamic Link Library) and imported symbols from a PE (Portable Executable format) file. This is quite heavy but is exhaustive, and for example shows that the Tortoise library can only have been loaded dynamically, as it cannot be found here.
Each DLL listed in this diagram can be further browsed by clicking on it. Also, each symbol of each DLL can also be explored, because it is an object type with its properties and scripts.
A future plan is to disassemble the code of each entry point, to extract the call graph (Internal jumps and calls to external functions), but this is not available yet.


Kenneth K. Inglis' Research Portfolio
Home
|
Profile
|
Research
|
Publications
|
Hobbies
|
Contact
|
Links
{{content}}


{% extends 'base.html' %} {% import 'macros.html' as macro %} {%block content%}
These are basically short pitches that will assist help you in aceing your interview in just 60 seconds.
ViewThese are short pitches that will help you create your product presentation in just 60 sec.
ViewThese are short pitches that will help you ace your promotion presentation in just a few minutes.
View


Infobip OneAPI is an API implementation inspired by OneApi specification which is issued by the Global System for Mobile Communications Association. We felt the need to enrich the specification by adding a few fields in some requests and responses to make the API more comfortable for the developer.
Infobip OneAPI exposes the following mobile network functionalities:
Other mobile network-related functionalities are due to be implemented. In order to use Infobip OneAPI and gain access to Infobip mobile networks aggregator system you must register at the Infobip website. In other words, by using Infobip OneAPI PHP library you can send SMS messages to any cell phone around the globe.
In every example two different architectural approaches are shown. In the first scenario the mobile-originated (see example 3 for term explanation) information is returned to the (web) application that requested the operation.
In the second scenario the mobile-terminated information is still being sent by your (web) application, but the mobile-originated information is returned to an URL predefined by you via HTTP POST request. In other words, Infobip pushes the receiving inbound notifications (be it Number Context or delivery data, or messages) to your web application.
The first thing that needs to be done is to initialize the client with username and password in plaintext. You are basically logging in to Infobip, so an exception will be thrown if the username and/or password are incorrect. The next step is to prepare the message:
Sender address may be any string composed of printable characters but will it be delivered as such depends on the settings of the destination network operator. Therefore, our recommendation (but not a guarantee) is to use the English alphanumeric character subset.
When you execute the send method it will return an object which is used to query the message delivery status. These are possible states of the message once you have sent it:
Now you are ready to send the message.
<?php
require_once(PATH_TO_LIBRARY);
$smsClient = new SmsClient(USERNAME, PASSWORD);
$smsMessage = new SMSRequest();
$smsMessage->senderAddress = SENDER_ADDRESS;
$smsMessage->address = DESTINATION_ADDRESS;
$smsMessage->message = 'Hello world';
$smsMessageSendResult = $smsClient->sendSMS($smsMessage);
// The client correlator is a unique identifier of this api call:
$clientCorrelator = $smsMessageSendResult->clientCorrelator;
// You can use $clientCorrelator or $smsMessageSendResult as an method call argument here:
$smsMessageStatus = $smsClient->queryDeliveryStatus($smsMessageSendResult);
$deliveryStatus = $smsMessageStatus->deliveryInfo[0]->deliveryStatus;
echo 'Success:', $smsMessageStatus->isSuccess(), "\n";
echo 'Status:', $deliveryStatus, "\n";
if( ! $smsMessageStatus->isSuccess()) {
echo 'Message id:', $smsMessageStatus->exception->messageId, "\n";
echo 'Text:', $smsMessageStatus->exception->text, "\n";
echo 'Variables:', $smsMessageStatus->exception->variables, "\n";
}
?>
Set the notify URL when sending message:
<?php
require_once(PATH_TO_LIBRARY);
$smsClient = new SmsClient(USERNAME, PASSWORD);
$smsMessage = new SMSRequest();
$smsMessage->senderAddress = SENDER_ADDRESS;
$smsMessage->address = DESTINATION_ADDRESS;
$smsMessage->message = 'Hello world';
$smsMessage->notifyURL = NOTIFY_URL;
$smsMessageSendResult = $smsClient->sendSMS($smsMessage);
?>
Infobip will send a HTTP POST request to this URL, and your web application must process it like this:
<?php
require_once(PATH_TO_LIBRARY);
$result = SmsClient::unserializeDeliveryStatus();
// Process $result here, e.g. just save it to a file:
$f = fopen(FILE_NAME, 'w');
fwrite($f, "\n-------------------------------------\n");
fwrite($f, 'status: ' . $result->deliveryInfo->deliveryStatus . "\n") ;
fwrite($f, 'address: ' . $result->deliveryInfo->address . "\n");
fwrite($f, 'messageId: ' . $result->deliveryInfo->messageId . "\n");
fwrite($f, 'clientCorrelator: '. $result->deliveryInfo->clientCorrelator . "\n");
fwrite($f, 'callback data: ' . $result->callbackData . "\n");
fwrite($f, "\n-------------------------------------\n");
fclose($f);
?>
Note that there is nothing stopping you from running both code snippets on the same host or within the same web application, but it is not necessary.
When the cell phone is connected to a network other than his home operator network it is said to be roaming. This is just a part of the information about a cell phone that can be obtained via a Number Context query like in the example below.
<?php
require_once(PATH_TO_LIBRARY);
$client = new DataConnectionProfileClient(USERNAME, PASSWORD);
$response = $client->retrieveRoamingStatus(DESTINATION_ADDRESS);
echo 'Number context result: \n
';
echo 'servingMccMnc: ', $response->servingMccMnc,'\n
';
echo 'address: ', $response->address,'\n
';
echo 'currentRoaming: ', $response->currentRoaming,'\n
';
echo 'resourceURL: ', $response->resourceURL,'\n
';
echo 'retrievalStatus: ', $response->retrievalStatus,'\n
';
echo 'callbackData: ', $response->callbackData,'\n
';
echo 'extendedData: ', $response->extendedData,'\n
';
echo 'IMSI: ', $response->extendedData->imsi,'\n
';
echo 'destinationAddres: ', $response->extendedData->destinationAddress,'\n
';
echo 'originalNetworkPrefix: ', $response->extendedData->originalNetworkPrefix,'\n
';
echo 'portedNetworkPrefix: ', $response->extendedData->portedNetworkPrefix,'\n
';
?>
Set the notify URL when sending message:
<?php
require_once(PATH_TO_LIBRARY);
$client = new DataConnectionProfileClient(USERNAME, PASSWORD);
$response = $client->retrieveRoamingStatus(DESTINATION_ADDRESS, NOTIFY_URL);
// if there is no error the query has been succesfully executed
if(!$response->isSuccess()) {
echo 'Error:', $response->exception, "\n";
Logs::printLogs();
}
?>
Infobip will send a HTTP POST request to this URL, and your web application must process it like this:
<?php
require_once(PATH_TO_LIBRARY);
$result = DataConnectionProfileClient::unserializeRoamingStatus();
// Process $result here, e.g. just save it to a file:
$f = fopen(FILE_NAME, 'w');
fwrite($f, "\n-------------------------------------\n");
fwrite($f, 'callbackData: ' . $result->callbackData . "\n") ;
fwrite($f, 'servingMccMnc: '. $result->terminalRoamingStatus->servingMccMnc . "\n") ;
fwrite($f, 'address: '. $result->terminalRoamingStatus->address . "\n") ;
fwrite($f, 'currentRoaming: ' . $result->terminalRoamingStatus->currentRoaming . "\n") ;
fwrite($f, 'resourceURL: ' . $result->terminalRoamingStatus->resourceURL . "\n") ;
fwrite($f, 'retrievalStatus: ' . $result->terminalRoamingStatus->retrievalStatus . "\n") ;
fwrite($f, 'terminalRoamingStatus callbackData: ' . $result->terminalRoamingStatus->callbackData . "\n") ;
fwrite($f, 'extendedData: ' . $result->terminalRoamingStatus->extendedData . "\n") ;
fwrite($f, 'IMSI: ', $response->extendedData->imsi,'\n');
fwrite($f, 'destinationAddres: ', $response->extendedData->destinationAddress,'\n');
fwrite($f, 'originalNetworkPrefix: ', $response->extendedData->originalNetworkPrefix,'\n');
fwrite($f, 'portedNetworkPrefix: ', $response->extendedData->portedNetworkPrefix,'\n');
fwrite($f, "\n-------------------------------------\n");
fclose($f);
?>
Note that there is nothing stopping you from running both code snippets on the same host or within the same web application, but it is not necessary.
Two way communication with cell phone is also possible via Infobip. The messages your application sends to cell phones are outbound or mobile-terminated messages. It is a scenario much like in the first example. The messages which your application receives from cell phones are inbound or mobile-originated messages.
In order to be able to receive inbound messages programmatically you must have a valid GSM subscription number. For demo purposes, a valid 30-day trial GSM subscription number is tied to your Infobip account. Our paid services include (info coming soon, mail to info@infobip.com):
In order for the below example to work make sure that you have a subscription with no notify URL set at your Infobip account.
<?php
require_once(PATH_TO_LIBRARY);
$smsClient = new SmsClient(USERNAME, PASSWORD);
$inboundMessages = $smsClient->retrieveInboundMessages();
foreach($inboundMessages->inboundSMSMessage as $message) {
echo $message->dateTime;
echo $message->destinationAddress;
echo $message->messageId;
echo $message->message;
echo $message->resourceURL;
echo $message->senderAddress;
}
?>
In order for the below example to work make sure that you have a subscription with a notify URL set at your Infobip account. Of course, the notify URL must be mapped to your web application.
<?php
require_once(PATH_TO_LIBRARY);
// returns a single message not array of messages
$inboundMessages = SmsClient::unserializeInboundMessages();
// Process $inboundMessages here, e.g. just save it to a file:
$f = fopen(FILE_NAME, 'w');
fwrite($f, "\n-------------------------------------\n");
fwrite($f, 'dateTime: ' . $inboundMessages->dateTime . "\n");
fwrite($f, 'destinationAddress: ' . $inboundMessages->destinationAddress . "\n");
fwrite($f, 'messageId: ' . $inboundMessages->messageId . "\n");
fwrite($f, 'message: ' . $inboundMessages->message . "\n");
fwrite($f, 'resourceURL: ' . $inboundMessages->resourceURL . "\n");
fwrite($f, 'senderAddress: ' . $inboundMessages->senderAddress . "\n");
?>


In these lessons, a focus is placed on using keyboard shortcuts. These lessons are meant to review or enhance your current curriculum. An answer key is provided for the teacher. These lessons are best used with a computer running Windows 10 and JAWS. Use the training materials provided by Freedom Scientific to learn JAWS to a greater extent.
in-context


The pane to the left is a 2D space where selected function will be minimized. |
The dot points to the solution given by the Cuckoo search at each iteration. |
The link represents the evolution path of the solution. |
The function's graph: (graphs are from this page). |


WebLogo is a web based application designed to make the generation of sequence logos as easy and painless as possible.
A sequence logo is a graphical representation of an amino acid or nucleic acid multiple sequence alignment. Each logo consists of stacks of symbols, one stack for each position in the sequence. The overall height of the stack indicates the sequence conservation at that position, while the height of symbols within the stack indicates the relative frequency of each amino or nucleic acid at that position. The width of the stack is proportional to the fraction of valid symbols in that position. (Positions with many gaps have thin stacks.)In general, a sequence logo provides a richer and more precise description of, for example,a binding site, than would a consensus sequence.
Crooks GE, Hon G, Chandonia JM, Brenner SE WebLogo: A sequence logo generator, Genome Research, 14:1188-1190, (2004) [ Full Text ]
Schneider TD, Stephens RM. 1990. Sequence Logos: A New Way to Display Consensus Sequences. Nucleic Acids Res. 18:6097-6100
| PNG: | (600 DPI) Print resolution bitmap |
| PNG: | (low res, 96 DPI) Screen resolution bitmap |
| JPEG: | Screen resolution bitmap |
| EPS: | Encapsulated postscript |
| PDF: | Portable Document Format |
| SVG: | Scalable Vector Graphics |
| small: | 5.4 points wide (same as 9pt Courier), aspect ratio 5:1 |
| medium: | Double the width and height of small. |
| large: | Triple the width and height of small. |
| auto: Automatically guess sequence type from the data |
| protein |
| dna |
| rna |
| probability: | Show residue probabilities, rather than information content. If compositional adjustment is disabled, then these are the raw residue frequencies. |
| bits: | Information content in bits |
| nats: | Natural units, 1 bit = ln 2 (0.69) nats |
| kT: | Thermal energy units in natural units (numerically the same as nats) |
| kJ/mol: | Thermal energy (assuming T = 300 K) |
| kcal/mol: | Thermal energy (assuming T = 300 K) |
The background composition of the genome or proteome from which the sequences have been drawn. The default, automatic option is to use equiprobable background for nucleic acids and a typical amino acid usage pattern for proteins. However, you may also explicitly set the expected CG content for nucleic acid sequences, insist on equiprobable background distributions, or turn off composition adjustment altogether.
Compositional adjustment has two effects. First, the information content of a site is defined as the relative entropy of the monomers at that site to the background distribution. Consequentially, rare monomers have higher information content (when they occur) than relatively common monomers.
Secondly, the background composition is used in the small sample correction of information content. Briefly, if only a few sequences are available in the multiple sequence alignment, then sites typically appear more conserved than they really are. Small samples bias the relative entropy upwards. To compensate, we add pseudocounts to the actual counts, proportional to the expected background composition. These pseudocounts smooth the data for small samples, but become irrelevant for large samples. The proportionality constant is set to 4 for nucleic acid sequences, and 20 for proteins (these numbers have been found to give reasonable results in practice).
Behind the scenes, things are more complex. We do a full Bayesian calculation, starting with explicit Dirichlet priors based on the background composition, to which we add the data and then calculate both the posterior mean relative entropy (the stack height) and Bayesian 95% confidence intervals for error bars. These interesting details will be explained elsewhere.
| 2 Watson-Crick hydrogen bonds | TAU | dark orange |
| 3 Watson-Crick hydrogen bonds | GC | blue |
| G | orange |
| TU | red |
| C | blue |
| A | green |
| Hydrophilic | RKDENQ | blue |
| Neutral | SGHTAP | green |
| Hydrophobic | YVMCLFIW | black |
| Polar | G,S,T,Y,C | green |
| Neutral | Q,N | purple |
| Basic | K,R,H | blue |
| Acidic | D,E | red |
| Hydrophobic | A,V,L,I,P,W,F,M | black |
| Positive | KRH | blue |
| Negative | DE | red |
weblogo
, provides many more options and greater control over the final logo appearance.
setuptools
has been installed, then WebLogo and its dependencies can be downloaded and installed with a single command:
sudo easy_install weblogoAlternatively, weblogo and its dependencies can be installed manually. The WebLogo source code can be downloaded from Weblogo's Github repository. This code is distributed under various open source licenses. Please consult the
LICENSE.txt
file in the source distribution for details.
After unpacking the WebLogo tarfile, it should be possible to immediately create logos using the command line client (provided that python, numpy and ghostscript have already been installed).
./weblogo --format PNG < cap.fa > cap.png
Please consult the file build_examples.sh
for more examples.
To run WebLogo as a stand alone web service, run the logo server command :
./weblogo --serve
It should now be possible to access WebLogo at http://localhost:8080/.
The command line client and WebLogo libraries can be permanently installed using the supplied setup.py
script.
sudo python setup.py install
Run python setup.py help
for more installation options. For example, to specifically install the weblogo script to /usr/local/bin
sudo python setup.py install_scripts --install-dir /usr/local/bin
weblogolib/htdocs
directory somewhere within the document root of your webserver. The webserver must be able to execute the CGI script create.cgi
. For Apache, you may have to add an ExecCGI
option and add a cgi handler in the httpd.conf
configuration file. Something like this:
<Directory "/home/httpd/htdocs/weblogo/"> Options FollowSymLinks MultiViews ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> ... # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .cgiIt may also be necessary to set the
PATH
and PYTHONPATH
environment variables.
SetEnv PYTHONPATH /path/to/weblogo/librariesThe cgi script also has to be able to find the '
gs
' ghostscript executable. If ghostscript is installed in a non-standard location add the following environment variable.
SetEnv COREBIOPATH /path/to/gsThe maximum bytes of uploaded sequence data can be controlled with the
WEBLOGO_MAX_FILE_SIZE
environment variable.
SetEnv WEBLOGO_MAX_FILE_SIZE 1000000
weblogo
, The WebLogo Command Line Interface (CLI)build_examples.sh
script for inspiration.
Usage: weblogo [options] < sequence_data.fa > sequence_logo.eps Create sequence logos from biological sequence alignments. Options: --version show program's version number and exit -h --help show this help message and exit Input/Output Options: -f --fin FILENAME Sequence input file (default: stdin) -D --datatype FORMAT Type of multiple sequence alignment or position weight matrix file: (clustal, fasta, plain, msf, genbank, nbrf, nexus, phylip, stockholm, intelligenetics, table, array, transfac) -o --fout FILENAME Output file (default: stdout) -F --format FORMAT Format of output: eps (default), png, png_print, pdf, jpeg, svg, logodata Logo Data Options: -A --sequence-type TYPE The type of sequence data: 'protein', 'rna' or 'dna'. -a --alphabet ALPHABET The set of symbols to count, e.g. 'AGTC'. All characters not in the alphabet are ignored. If neither the alphabet nor sequence-type are specified then weblogo will examine the input data and make an educated guess. See also --sequence-type, --ignore-lower-case -U --units NUMBER A unit of entropy ('bits' (default), 'nats', 'digits'), or a unit of free energy ('kT', 'kJ/mol', 'kcal/mol'), or 'probability' for probabilities --composition COMP. The expected composition of the sequences: 'auto' (default), 'equiprobable', 'none' (do not perform any compositional adjustment), a CG percentage, a species name (e.g. 'E. coli', 'H. sapiens'), or an explicit distribution (e.g. "{'A':10, 'C':40, 'G':40, 'T':10}"). The automatic option uses a typical distribution for proteins and equiprobable distribution for everything else. --weight NUMBER The weight of prior data. Default depends on alphabet length -i --first-index INDEX Index of first position in sequence data (default: 1) -l --lower INDEX Lower bound of sequence to display -u --upper INDEX Upper bound of sequence to display Transformations: Optional transformations of the sequence data. --ignore-lower-case Disregard lower case letters and only count upper case letters in sequences. --reverse reverse sequences --complement complement nucleic sequences --revcomp reverse complement nucleic sequences Logo Format Options: These options control the format and display of the logo. -s --size LOGOSIZE Specify a standard logo size (small, medium (default), large) -n --stacks-per-line COUNT Maximum number of logo stacks per logo line. (default: 40) -t --title TEXT Logo title text. --label TEXT A figure label, e.g. '2a' -X --show-xaxis YES/NO Display sequence numbers along x-axis? (default: True) -x --xlabel TEXT X-axis label --annotate TEXT A comma separated list of custom stack annotations, e.g. '1,3,4,5,6,7'. Annotation list must be same length as sequences. -S --yaxis UNIT Height of yaxis in units. (Default: Maximum value with uninformative prior.) -Y --show-yaxis YES/NO Display entropy scale along y-axis? (default: True) -y --ylabel TEXT Y-axis label (default depends on plot type and units) -E --show-ends YES/NO Label the ends of the sequence? (default: False) -P --fineprint TEXT The fine print (default: weblogo version) --ticmarks NUMBER Distance between ticmarks (default: 1.0) --errorbars YES/NO Display error bars? (default: True) --reverse-stacks YES/NO Draw stacks with largest letters on top? (default: True) Color Options: Colors can be specified using CSS2 syntax. e.g. 'red', '#FF0000', etc. -c --color-scheme SCHEME Specify a standard color scheme (auto, base pairing, charge, chemistry, classic, hydrophobicity, monochrome) -C --color COLOR SYMBOLS DESCRIPTION Specify symbol colors, e.g. --color black AG 'Purine' --color red TC 'Pyrimidine' --default-color COLOR Symbol color if not otherwise specified. Advanced Format Options: These options provide fine control over the display of the logo. -W --stack-width POINTS Width of a logo stack (default: 10.8) --aspect-ratio POINTS Ratio of stack height to width (default: 5) --box YES/NO Draw boxes around symbols? (default: no) --resolution DPI Bitmap resolution in dots per inch (DPI). (Default: 96 DPI, except png_print, 600 DPI) Low resolution bitmaps (DPI<300) are antialiased. --scale-width YES/NO Scale the visible stack width by the fraction of symbols in the column? (I.e. columns with many gaps of unknowns are narrow.) (Default: yes) --debug YES/NO Output additional diagnostic information. (Default: False) WebLogo Server: Run a standalone webserver on a local port. --serve Start a standalone WebLogo server for creating sequence logos. --port PORT Listen to this local port. (Default: 8080)
The development project is hosted at https://github.com/WebLogo/weblogo. If you wish to extend WebLogo or to contribute code, then you should download the full source code development package directly from the Github repository.
> git clone https://github.com/WebLogo/weblogo > cd weblogo
Please consult the developer notes, DEVELOPERS.txt
and software license LICENSE.txt
Outstanding bugs and feature requests are listed on the WebLogo issue tracker.
WebLogo was created by Gavin E. Crooks, Liana Lareau, Gary Hon, John-Marc Chandonia and Steven E. Brenner. Many others have provided suggestions, bug fixes and moral support.
WebLogo was originally based upon the programs alpro and makelogo, both of which are part of Tom Schneider's delila package. Many thanks are due to him for making this software freely available and for encouraging its use.
While no permanent records are kept of submitted sequences, we cannot undertake to guarantee that data sent to WebLogo remains secure. Moreover, no guarantees whatsoever are provided about data generated by WebLogo.
Suggestions on how to improve WebLogo are heartily welcomed! Please direct questions to the WebLogo's comment board or WebLogo's issue tracker page.