--- title: Days Of Code keywords: fastai sidebar: home_sidebar summary: "A '100 days of code' style learning project" description: "A '100 days of code' style learning project" nb_path: "notebooks/index.ipynb" ---
The goal here is to write small bits of code every weekday. I'm going to try and keep everything in Jupyter notebooks so that I can use NBDev to manage documenting it all and sharing code between days in case I want to build more complex things using building blocks from previous days. It should also make everything into a nice website at https://johnowhitaker.github.io/days_of_code/.
I set this up (configuring nbdev etc) one weekend so that I could dive straight in on the Monday and start coding. You can use the sidebar on the left to view the notebook for each day, but here I will try to summarise what was keeping me busy as this project unfolded. I am also releasing summary videos on my DataScienceCastnet channel. The first few are out:
Day 1 was getting used to cairo and doing some basic widget tests to get animation working to my satisfaction. Day 2 this cairo knowledge came in handy doing some visualizations for the AIcrowd Multi-Agent BEhaviour Challenge {% include image.html style="width: 250px;" file="/days_of_code/outputs/mabe_movement_viz.png" %}
For day 2 and 3 I was pretty sidetracked with this competition, spending much more than an hour a day working on it. The resulting code is scattered across a bunch of notebooks in my Google Drive, but I will be documenting this process in a separate project to be released once that competition ends.
On Friday (day 5) I decided I couldn't just use my competition playing as my 'days of code' requirement, so I switched things up and decided to try something I'd been meaning to look into for a while: Perlin noise. This is a topic that comes up a lot in generative art and graphics. It turns out the Wikipedia page was all I needed to get some cool images happening - by using perlin noise to steer particles and leave trails you can get some trippy images:
| {% include image.html alt="Drawing" max-width="250px" file="/days_of_code/outputs/perlin_turtles.png" %} | {% include image.html alt="Drawing2" max-width="250px" file="/days_of_code/outputs/perlin_turtles2.png" %} |
On day 6 I moved to ipycanvas hoping to make some interactive graphics stuff. It was good fun, and seeing thousands of circles move and shift and react to mouse clicks was satisfying. Sadly it doesn't leave an artefact that I can embed into these html docs, so you'll have to take my word for it or wait for my recap video(s) and make do with this static image for now:
Day 7 was a documentation day - I wrote the summary so far and tidied notebooks 1-6, making them easier to read and removing some duplicated cells and other cruft that was left over from the initial experimentation. I did write some code as I re-factored things, but it was mostly admin. I think this is important, and I will do 'documentation days' every week or two to keep things organised.
You'll notice day 8 is missing - I did some playing with a separate project (TODO link birdio).
Days 9 and 10 I was playing with my entry into the Hackaday Data Loggin' Contest. The data is a record of how many times a certain kind of event happened every day for the past few years.
Day 9 was EDA and using cairo to try and make some pretty visualizations:
| {% include image.html alt="Drawing" max-width="350px" file="/days_of_code/outputs/day_counts_left_to_right.png" %} | {% include image.html alt="Drawing2" max-width="350px" file="/days_of_code/outputs/day_counts_spiral.png" %} |
And day 10 took things 3D, using SolidPython (a python equivalent of OpenSCAD) to make some 3D shapes which I could then 3D print:
| {% include image.html alt="Drawing" max-width="350px" file="/days_of_code/images/drawing_spheres.png" %} | {% include image.html alt="Drawing2" max-width="350px" file="/days_of_code/images/3d_print.jpeg" %} |
display(HTML("""

"""))
I also generated some Irish Music using a generative language model trained on a bunch of traditional songs.
{% include image.html alt="Whistle music" max-width="350px" file="/days_of_code/images/whistlegen.png" %}
More info in the video.
I got really into shaders, and did some pretty cool things with them. My favourite exploration was the idea of slime-mould inspired simulations, with thousands (or millions - thanks to webgl) of agents move about leaving trails which can in turn affect their movement. This gives rise to all sorts of emergent behaviour - explore it in the full observable notebook or watch my video for some pretty demos.
It was cool to make something that other people got interested in, and I was very pleasantly suprised when kind folks from the community chimed in with improvements and comments :)
display(HTML("""

"""))
Webgl is very powerful but it also requires quite a bit of extra work to get up and running. Now that I have figured out at least some of the quirks, I anticipate returning to this for more experimentation in the future. I also put some of these on a low-footprint NFT marketplace - you can collect them for cheap from https://www.hicetnunc.xyz/tz/tz1RMthfMEDJsXiMqz4Gy4DDx7utzYVNP14c
{% include image.html alt="My Hic et Nuc Gallery" max-width="350px" file="/days_of_code/images/hen.png" %}
We were travelling for a week or two, which meant a complete break from technology. I have resumed coding, but the daily experiments haven't suited the nbdev environment so I am going to link to them from here rather than coercing them into notebooks within this days_of_code project. The highlights:
Starting next week I'm hoping to move back to projects that suit this notebook format (although I may still play with observable and webgl on the side).
from IPython.display import Video
Video('images/map_series.mp4', width=700, height=400)
At some point on this journey I was back to enjoying coding and wanting to do more, so I've let go of this specific project - it has fulfilled its purpose :) I highly recommend this to anyone looking for a way back into coding for the joy of it - aiming for a small atomic project each day helps keep things from growing to large and scary. Good luck, J


SQL Injection
Because Some People Enjoy Being Terrible
Tuesday, July 14, 2015
"I just learned all this cool stuff about relational databases and SQL and can't wait to integrate it into my site!" Said...well, I'm sure at least one person in history. Rightfully so, I suppose, as from what we have touched on so far, these appear to be very powerful tools for handling and accessing vast quantities of data. With all this power though (oh yeah, I'm going there), comes great responsibility. SQL might be a superhero when it comes to accessing data in relational databases, but it comes with it's own potential kryptonite, SQL Injection.
SQL Injection is most often an intentional attack on a website or database by a malicious user. It can come in a number of different forms, but the idea behind them all is the same. An application asks for some user input, and that input is inserted into an SQL statement. Pretty standard procedure, until Ms./Mr. Code Injector comes along. Assume you ask a user for their username and then stick their input into an SQL statement like this:
statement = "SELECT * FROM users WHERE name = '" + userName +"';"
Any expected input such as jbomotti
would pull up information for the specified user, so no big deal, right? Wrong. If the aforementioned code injector decided to input something like ' OR '1'='1
they would get much more than just information on one user. This would change the statement into:
SELECT * FROM users WHERE name = '' OR '1'='1';
Since '1'='1'
will always evaluate to true
, this statement now turns into a massive data dump of all the data in the users
table. Not exactly what you'd call great, but certainly not unheard of even among some big name companies. What's the main cause for this vulnerability? Lazy programmers (and not in the good DRY way of lazy).
There are actually some pretty simple ways to remove all SQL Injection vulnerabilities from your web application. The easiest, and arguably (or just outright) most effective way using PHP is hexadecimal conversion. There are two functions, DECHEX()
which converts any integer value, and BIN2HEX()
which converts any other type of variable. Used together with a call to UNHEX()
in the statement, the value isn't applied until after the statement is interpreted. Voila, SQL injection denied.
Conclusion/TL;DR So we learned a bit about SQL this week. Super useful and awesome, but also highly vulnerable to malicious malcontents. Luckily, this vulnerability is also easily avoided by the conscientious coder. So now, go forth, make wonderful web apps and protect your SQL statements!!


Dashboard
Critical question 1: Is there a correlation between X and Y for students?
X:
   Mark
Y:   Total amount of
  or
      in period

| User | Amount of events | Mark |
|---|


Britain Still Has A Colony In Africa, Refuses To Return Its Control To Mauritius
by Peace FM OnlineThe UK has been called an illegal colonial occupier by Mauritius after it ignored a deadline to return control of an overseas territory to the island nation.
The UN had given the UK six months to give up control of the Chagos Islands - but that period has now passed.
Mauritius says it was forced to trade the small archipelago in the Indian Ocean in 1965 for independence.
The UK says it does not recognise Mauritius' claim to sovereignty.
Featured Video


Zend\ServiceManager can use delegator factories to generate “lazy” references to your services.
Lazy services are proxies that get lazily instantiated, and keep a reference to the real instance of the proxied service.
You may want to lazily initialize a service when it is instantiated very often, but not always used.
A typical example is a database connection: it is a dependency to many other elements in your application, but that doesn’t mean that every request will execute queries through it.
Additionally, instantiating a connection to the database may require some time and eat up resources.
Proxying the database connection would allow to delay that overhead until the object is really needed.
`Zend\ServiceManager\Proxy\LazyServiceFactory is a delegator factory capable of generating lazy loading proxies for your services.
The LazyServiceFactory depends on ProxyManager, so be sure to install it before going through the following steps:
1 | php composer.phar require ocramius/proxy-manager:0.3.*
|
To demonstrate how a lazy service works, you may use the following Buzzer example class, which is designed to be slow at instantiation time for demonstration purposes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | namespace MyApp;
class Buzzer
{
public function __construct()
{
// deliberately halting the application for 5 seconds
sleep(5);
}
public function buzz()
{
return 'Buzz!';
}
}
|
You can then proceed and configure the service manager to generate proxies instead of real services:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $serviceManager = new \Zend\ServiceManager\ServiceManager();
$config = array(
'lazy_services' => array(
// mapping services to their class names is required
// since the ServiceManager is not a declarative DIC
'class_map' => array(
'buzzer' => 'MyApp\Buzzer',
),
),
);
$serviceManager->setService('Config', $config);
$serviceManager->setInvokableClass('buzzer', 'MyApp\Buzzer');
$serviceManager->setFactory('LazyServiceFactory', 'Zend\ServiceManager\Proxy\LazyServiceFactoryFactory');
$serviceManager->addDelegator('buzzer', 'LazyServiceFactory');
|
This will tell the service manager to use the LazyServiceFactory delegator factory to instantiate the buzzer service.
As you may have noticed, the standard setup for the LazyServiceFactory requires you to define a Config service. That’s because the functionality was thought to be easily integrated into Zend\Mvc.
You can now simply retrieve the buzzer:
1 2 3 | $buzzer = $serviceManager->get('buzzer');
echo $buzzer->buzz();
|
To verify that the proxying occurred correctly, you can simply run the following code, which should delay the 5 seconds wait time hardcoded in Buzzer::__construct until Buzzer::buzz is invoked:
1 2 3 4 5 6 7 | for ($i = 0; $i < 100; $i += 1) {
$buzzer = $serviceManager->create('buzzer');
echo "created buzzer $i\n";
}
echo $buzzer->buzz();
|
The setup above can also be represented via configuration in an MVC application’s context:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | return array(
'service_manager' => array(
'invokables' => array(
'buzzer' => 'MyApp\Buzzer',
),
'delegators' => array(
'buzzer' => array(
'LazyServiceFactory'
),
),
'factories' => array(
'LazyServiceFactory' => 'Zend\ServiceManager\Proxy\LazyServiceFactoryFactory',
),
),
'lazy_services' => array(
'class_map' => array(
'buzzer' => 'MyApp\Buzzer',
),
),
);
|
This is the config structure expected by Zend\ServiceManager\Proxy\LazyServiceFactoryFactory:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | return array(
'lazy_services' => array(
// map of service names and their relative class names - this
// is required since the service manager cannot know the
// class name of defined services upfront
'class_map' => array(
// 'foo' => 'MyApplication\Foo',
),
// directory where proxy classes will be written - default to system_get_tmp_dir()
'proxies_target_dir' => null,
// boolean flag to indicate whether to generate proxies
// proxies are auto-generated by default
'auto_generate_proxies' => null,
// namespace of the generated proxies, default to "ProxyManagerGeneratedProxy"
'proxies_namespace' => null,
// whether the generated proxy classes should be written to disk
'write_proxy_files' => false,
),
);
|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


Back
Add LCO Details
Employee ID:
Employee Name:
Employee Email:
LCO Name:
LCO Code:
Contact Name:
Phone:
Address:
State:
City:
JV/Distributer Name:
JV/Distributer Code:


Before Change
def get_twits(ticker):
url = "https://api.stocktwits.com/api/2/streams/symbol/{0}.json".format(ticker)
connection = urllib.request.urlopen(url)
data = connection.read()
connection.close()
return json.loads(data)
// loops through to get data for each ticker in the tickers list
def get_twits_list(tickers):
After Change
// get the data using StockTwits API
def get_twits(ticker):
url = "https://api.stocktwits.com/api/2/streams/symbol/{0}.json".format(ticker)
response = requests.get(url).json()
return response
// loops through to get data for each ticker in the tickers list
def get_twits_list(tickers):


When you walk into our shop to start your day, we are dedicated to providing you with friendly service, a welcoming atmosphere, and above all else, excellent products made with the highest quality ingredients. If you are not satisfied, please let us know and we will do whatever we can to make things right!
Founded in 1987 by the Hernandez brothers, our establishment has been serving up rich coffee sourced from artisan farmers in various regions of South and Central America. We are dedicated to travelling the world, finding the best coffee, and bringing back to you here in our cafe.
 Join us for your daily routine, an outing with friends, or simply just to enjoy some alone time.


A 3-by-3 matrix. Stored in column-major order. More...
#include <b2Math.h>
Public Member Functions | |
| b2Mat33 () | |
| The default constructor does nothing (for performance). | |
| b2Mat33 (const b2Vec3 &c1, const b2Vec3 &c2, const b2Vec3 &c3) | |
| Construct this matrix using columns. | |
| void | SetZero () |
| Set this matrix to all zeros. | |
| b2Vec3 | Solve33 (const b2Vec3 &b) const |
| b2Vec2 | Solve22 (const b2Vec2 &b) const |
Public Attributes | |
| b2Vec3 | col1 |
| b2Vec3 | col2 |
| b2Vec3 | col3 |
A 3-by-3 matrix. Stored in column-major order.
| b2Mat33::b2Mat33 | ( | ) | [inline] |
The default constructor does nothing (for performance).
Construct this matrix using columns.
| void b2Mat33::SetZero | ( | ) | [inline] |
Set this matrix to all zeros.
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases. Solve only the upper 2-by-2 matrix equation.
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.


Quark-gluon plasma and jet in
relativistic heavy-ion collisions
Akita International University
Y. Tachibana, A. Kumar, A. Majumder et al. (JETSCAPE)
"Hard Jet Substructure in a Multi-stage Approach,"
[arXiv:2301.02485 [nucl-th]].
Y. Tachibana, C. Shen, A. Majumder,
"Bulk medium evolution has considerable effects on jet observables,"
Phys. Rev. C 106, L021902 (2022)
Editors' Suggestion,
[arXiv:2001.08321 [nucl-th]].
Y. Tachibana, N.-B. Chang, G.-Y. Qin
"Full jet in quark-gluon plasma with hydrodynamic medium response,"
Phys. Rev. C 95, 044909 (2017)
Editors' Suggestion,
[arXiv:1701.07951 [nucl-th]].
"Jet: back reaction on the medium,"
Hard Probes 2020, The University of Texas at Austin [Switched to Online], June 3rd, 2020.
[ Keynote ]
[ PDF (w/o GIF Movie) ]
"Medium response to jet-induced excitation: theory overview,"
Quark Matter 2018, Venice, May 18th 2018.
[ PDF ]
"Effect of hydrodynamic response in QGP on full jet,"
Quark Matter 2017, Chicago, February 8th 2017.
[ PDF ]
Jet shower partons are traveling through a 3+1D brick of QGP fluid.
Red(#ff0000) -> Green(#00ff00)
$ convert -fuzz 50% -fill '#00ff00' -opaque '#ff0000' original.png copy.png
White -> Transparent
$ convert original.png -fuzz 10% -transparent white transparent.png


Confused? Check out the video below!
Sign up today!
The API Superstore provides a catalog of third-party APIs that you can use to enhance your business.
From ecommerce to maps, API Superstore lists all of the services that customers expect and saves you the headache
of sorting it out yourself!
The longer you wait, the longer you’re not making more money and happier users!


Apple
Software Development Engineer
January 2018 - January 2019
http://www.apple.com
Develop technologies for the 1st trillion dollar company
Buddybuild
Engineer
June 2017 - January 2018
http://www.buddybuild.com
Developed and maintained CI/CD solution for both the iOS and Android Platforms
- Buddybuild SDK support for the Android Platform
- Android CI/CD development and integration from start to deployment of Android projects
- technical support with engineers
- Develop and maintain existing technologies of the buddybuild ecosystem
Eventbase Technology
Senior Software Developer
September 2016 - May 2017
http://www.eventbase.com
Helped assist in Android and iOS Development, while I enjoyed automating things using Python to service over 100+ Event Apps
- iOS and Android development on the core product that facilitates more than 100+ apps/year
- Made tools that could be used to help speed-up QA processes
- Created a private Python Module for aiding in developer/tester and automation
- Setup a Continuous Integration Environment to deploy builds and get configuration running faster
Vonigo
Senior Full-stack Developer
November 2015 - August 2016
http://www.vonigo.com
When they needed help, I switched to being a .NET Developer. I started to understand the whole paradigm
- Switched to a MSSQL/.NET developer working on back-end features for the company
- Developed the Vonigo API (api.vonigo.com)
- Developed a test harness for automated API testing
- Setup the Continuous Integration and Deployment Environment
- Optimizations of current systems, store procedures and the web application which service more than 1000 work orders a day
Senior Android Developer
March 2014 - November 2015
http://www.vonigo.com
Understood the whole approach to development, initially the front
- Developed the Vonigo application on Android
- Assisted in designing the iOS platform
- XSLT/XML to HTML development
- Cross-platform hybrid architecture implementing JavaScript/CSS/HTML and native functionality
QuickMobile
Senior Mobile Developer, Lead
March 2010 - November 2013
http://www.quickmobile.com
Became a lead developer in the apps industry that serviced many Fortune 500 companies
- Lead Developer for Android/BlackBerry in start-up environment
- Worked on over 100+ iPhone, Android and BlackBerry Applications
- Worked extensively on iPhone and Android Framework
- Created Automation and test scripts for iPhone/Android/BlackBerry
- Developed BlackBerry Framework
- Travelled internationally to interface with and support key clients (McDonald's, Intel, Google)
- Helped grow the company from 7 to over 200 Employees
Redback Networks (Ericcson)
Software Developer
January 2008 - January 2009
http://www.ericsson.com
I was able to build confidence here as a developer to kickstart my career
- Data driven development by creating analytics of all calls to the SmartEdge Routers
- Automation and test scripts using perl and shell
- Implemented cross-communication using SOAP, XML/XSD/XSLT and Java
BlackBerry
Security Software Developer
May 2006 - September 2006
http://www.blackberry.com
Helped fix bugs and understand the inner workings of security at BlackBerry, early on
- Mainly bug fixing and was mentored in Java Development
- Device-Side PGP/SSP implementations
- Worked Extensively on Security-Code Optimization
Retail Applications Developer
September 2005 - January 2006
http://www.blackberry.com
My first taste of working on mobile applications
- An introduction to the workforce
- First understandings of big company architecture and the importance of bug tracking and documentation
- Designing using SVG and Java to the customer


Welcome to this Pizza center where you can create your order and we deliver on yor footsteps
We have amaizing delicious Pizza where we cook with outstanding chief with world class experience
The website is in a comfortable that has a strong need for additional pizza options. Bolstered by the need for more choices in family-oriented dining experiences, combined with the option for home-delivery, the application is positioned to take advantage of the market need and serve the families in wide area.
PIZZA TYPE
CRUST TYPE
TOPPING TYPE
Thank you for showing intrest in our site we will give you the best experience.
Make sure you pay without hesitation when you order for a delivery or create an order in our site for future claim.
Incase of any comment or complain feel free to reach unto us.
By, Management
| Name | Size | Crust | Topping | Total |
|---|---|---|---|---|
Delivery will cost sh. 150


| Name | Author(s) | Description |
|---|---|---|
| aroma.affymetrix | Henrik Bengtsson James Bullard Kasper Hansen Pierre Neuvial Elizabeth Purdom Mark D Robinson Ken Simpson |
An open-source R framework for microarray analysis |
| BANDITS | Simone Tiberi Mark D Robinson |
A Bayesian hierarchical model for differential splicing, via differential transcript usage, accounting for sample-to-sample variability and mapping uncertainty |
| CATALYST | Helena L Crowell Mark D Robinson Vito RT Zanotelli Stéphane Chevrier Bernd Bodenmiller |
Pipeline for preprocessing of cytometry data & visualization tools for differential analysis |
| CellMixS | Almut Lütge Mark D Robinson |
Toolbox to evaluate Cellspecific Mixing Scores (CMS) for different batches in scRNA-seq data |
| censcyt | Reto Gerber | censored covariates in differential abundance analysis in cytometry |
| countsimQC | Charlotte Soneson | Comparison of characteristic features of count data sets |
| CrispRVariants | Helen Lindsay | Tools for counting and visualising mutations in a target location |
| cytofWorkflow | Malgorzata Nowicka | CyTOF workflow: differential discovery in high-throughput high-dimensional cytometry datasets |
| DAMEfinder | Stephany Orjuela Dania Machlab Mark D Robinson |
Method to detect differential allele-specific methylation |
| diffcyt | Lukas M Weber | Statistical methods for differential discovery in high-dimensional cytometry data |
| diffUTR | Stefan Gerber Pierre-Luc Germain |
Streamlining differential exon and UTR usage analysis |
| distinct | Simone Tiberi Mark D Robinson |
A statistical method to perform differential analyses between groups of distributions, ideal for applications to high-throughput single-cell data. By comparing full distributions, distinct identifies both, differential patterns involving changes in the mean, as well as more subtle variations that do not involve the mean. |
| DRIMSeq | Malgorzata Nowicka | Differential transcript usage and tuQTL analyses with Dirichlet-multinomial model in RNA-seq Supplementary Page |
| edgeR | Yunshun Chen Aaron Lun Davis McCarthy Xiaobei Zhou Mark D Robinson Gordon Smyth |
Empirical Analysis of Digital Gene Expression Data in R |
| FIRMAGene | Mark D Robinson | Analysis of differential splicing with Affymetrix Gene ST array data |
| flagme | Mark D Robinson Riccardo Romoli |
Analysis of Metabolomics GC/MS Data |
| iCOBRA | Charlotte Soneson | Comparison and Visualization of Ranking and Assignment Methods |
| iSEE | Charlotte Soneson Aaron Lun Federico Marini Kevin Rue-Albrecht |
Interactive SummarizedExperiment Explorer |
| muscat | Helena L Crowell Charlotte Soneson Pierre-Luc Germain Mark D Robinson |
Multi-sample multi-group scRNA-seq data analysis tools |
| pipeComp | Pierre-Luc Germain Anthony Sonrel Mark D Robinson |
Pipeline benchmarking framework |
| regsplice | Lukas M Weber | L1-regularization based methods for detection of differential splicing |
| Repitools | Mark D Robinson Dario Strbenac Aaron Statham Andrea Riebler |
Epigenomic tools (BayMeth) |
| scDblFinder | Pierre-Luc Germain | Identifies doublets in single-cell sequencing data |
| SpatialExperiment | Helena L Crowell | SpatialExperiment package provides an S4 class for Spatial Omics data handling. |
| treeclimbR | Ruizhu Huang | Search for the optimal level of a tree to interpret signal by combining with edgeR or DESeq2 |
| TreeHeatmap | Ruizhu Huang | Visualize heatmaps at arbitrary levels of a tree. |
| TreeSummarizedExperiment | Ruizhu Huang | SummarizedExperiment-based object to store data with hierarchical structure |
| Name | Author(s) | Description |
|---|---|---|
| Benchmark collection | Robinson group | Collection of high-throughput computational biology benchmarking data sets |
| conquer | Charlotte Soneson | Repository providing consistently processed public single-cell RNA-seq data sets |
| DuoClustering2018 | Angelo Duò Charlotte Soneson |
Data package with processed data and clustering results from Duò et al. (2018) |
| FlowRepository FR-FCM-ZZPH | Lukas M Weber | Data files for benchmark data sets used in “Comparison of clustering methods for high-dimensional single-cell flow and mass cytometry data” (Weber and Robinson, 2016) |
| FlowRepository FR-FCM-ZYL8 | Lukas M Weber | Data files for benchmark data sets used in our paper introducing the ‘diffcyt’ framework (Weber et al., 2018) |
| HDCytoData | Lukas M Weber Charlotte Soneson |
Data package of high-dimensional cytometry data sets
in SummarizedExperiment and flowSet formats |
| TabulaMurisData | Charlotte Soneson | Bioconductor package providing access to scRNA-seq data from the Tabula Muris Consortium |
| Name | Author(s) | Description |
|---|---|---|
| CATALYST | Helena L Crowell | Tools for preprocessing of cytometry data
including normalization, debarcoding, and compensation |
| CrispantCal | Lukas M Weber | R/Shiny web app to calculate injection mix volumes
for CRISPR-Cas9 experiments |
| CrispRVariantsLite | Helen Lindsay | Graphical user interface to the R/Bioconductor CrispRVariants package |
| iCOBRA | Charlotte Soneson | Graphical User interface to the R/Bioconductor iCOBRA package |
| pubassistant | Reto Gerber Mark D Robinson |
Interactive explorer of publications and open access |
| scrnaseq_de_evaluation | Charlotte Soneson | Interactive browsing and exploration of the scRNA-seq differential expression results from Soneson and Robinson, 2018 |
| Name | Author(s) | Description |
|---|---|---|
| ARMOR | Stephany Orjuela Ruizhu Huang Katharina Hembach Mark D Robinson Charlotte Soneson |
Snakemake workflow to perform an end-to-end RNA-seq analysis. |
| ARPEGGIO | Stefan Milosavljevic Tony Kuo Samuele Decarli Lucas Mohn Jun Sese Kentaro K. Shimizu Rie Shimizu-Inatsugi Mark D Robinson |
SnakeMake workflow to analyse whole genome bisulfite sequencing data from allopolyploids. |
| gapless | Stephan Schmeing | Combined scaffolding, gap-closing and assembly correction with long reads. |
| ReSeq | Stephan Schmeing | More realistic simulator for genomic DNA sequences from Illumina machines that achieves a similar k-mer spectrum as the original sequences. |
| Name | Author(s) | Description |
|---|---|---|
| ABCD-DNA Supplementary Page | Mark D Robinson | Supplementary Page with Supplementary Data (semi-processed), R Code for all Figures and analyses (Robinson et al., 2012). |
| conquer (build scripts) | Charlotte Soneson Mark D Robinson |
Repository containing the code used to prepare the conquer (consistent quantification of external RNA-seq data sets) repository (Soneson and Robinson, 2018). |
| conquer (differential expression evaluation) | Charlotte Soneson | Repository containing the code used to perform the evalutaion of differential expression analysis methods in single-cell RNA-seq data (Soneson and Robinson, 2018) Supplementary Page |
| CrispRVariants (shiny app code) | Helen Lindsay | Repository containing the code underlying the CrispRVariantsLite Shiny-based web app (Lindsay et al, 2016). |
| cyTOF compensation | Vito RT Zanotelli Helena L Crowell Mark D Robinson |
Repository containing scripts to reproduce a majority of the figures from “Compensation of Signal Spillover in Suspension and Imaging Mass Cytometry” (Chevrier et al., 2018). |
| cytometry-clustering-comparison | Lukas M Weber | Repository of scripts to reproduce and extend analyses and figures in “Comparison of clustering methods for high-dimensional single-cell flow and mass cytometry data” (Weber and Robinson, 2016) |
| diffcyt-evaluations | Lukas M Weber | Repository of scripts to reproduce evaluations and figures in our paper introducing the ‘diffcyt’ framework (Weber et al., 2018) |
| muscat-comparison | Helena L Crowell | Repository of scripts to reproduce comparisons and figures for ‘muscat’ framework (Crowell et al., 2019) |
| Differential splicing comparison | Charlotte Soneson Katharina Matthes |
Repository containing the code for the comparison of various methods for differential isoform usage (differential splicing) detection (Soneson, Matthes et al., 2016) Supplementary Page. |
| edgeR robust | Xiaobei Zhou | Supplementary Page with Supplementary Data, R Code for simulations and analyses (Zhou et al., 2014). |


--- layout: post title: Edel & Her Brother Came to Atlanta With Me date: 2009-09-14 03:28:00.000000000 -07:00 type: post published: true status: publish categories: [] tags: [] meta: {} author: ---
Edel and her brother, Mark, came back with me to Atlanta. Glad Edel could make it -- she's healing really quick! Here are some pics...


Death Penalty
by BRIEFAUSTIN, Texas – The Texas Court of Criminal Appeals on Wednesday changed the death sentence of a convicted murderer to life in prison based on the finding that he is intellectual disabled.
Copyright © 2019 courthousenews.com
AUSTIN, Texas – The Texas Court of Criminal Appeals on Wednesday changed the death sentence of a convicted murderer to life in prison based on the finding that he is intellectual disabled.
Copyright © 2019 courthousenews.com


---
layout: post
title: Erector - ruby CRUD views
date: '2009-05-10T20:54:00.000-07:00'
author: Rx
tags:
modified_time: '2009-06-17T10:41:19.664-07:00'
blogger_id: tag:blogger.com,1999:blog-3950436325253663978.post-2968863888281617912
blogger_orig_url: http://railsindirection.blogspot.com/2009/05/erector-ruby-crud-views.html
---
In my last post I created a simple Erector view with a layout and talked about the pro's and
con's of using a ruby class based view. Before we go any further I want to re-establish that I'm not a fan of
markup. So if you are a markup jockey ... then you might want to move on. This Object Oriented view business is
probably not your cup of tea. After all who would want clean, testable code in their views? Besides me that is.
OK you decided that you care enough about your views to read on. Stick with it, its worth the
ride.
Let's get started by using the default scaffolding to generate a customer model.


|
OpenGL Application Template
|
Class for creating a cube map, a textured cube that contains 6 individual 2D textures that each form one side of a cube. More...
#include <CubeMap.hpp>
Public Member Functions | |
| CubeMap (const char *cubeFront, const char *cubeLeft, const char *cubeBack, const char *cubeBottom, const char *cubeRight, const char *cubeTop, Shader *shader) | |
| Constructor. | |
| ~CubeMap ()=default | |
| Destructor. | |
| void | render () |
| Renders the sphere to the screen/window. | |
| std::vector< GLfloat > | getVertices () const |
| Returns the data (vertices) of the cube map. More... | |
Class for creating a cube map, a textured cube that contains 6 individual 2D textures that each form one side of a cube.
|
inline |
Returns the data (vertices) of the cube map.


 Please confirm your operation." %}
{% endblock %}


Home
(current)
About
Why SST
Who We Are
Objectives
Our Patron
Services
Spritual
Social
Projects
Sai Jyothi
Sai Priti
Sai Kriti
Blog
Spritual
Social
Gallery
Photos
Videos
Audio
Join Us
As a Volunteer
As a Member
Contact Us
Donate Now
Where To Find Us
Reach Us At
phone
+91-9392465307,<PHONE_NUMBER>
email
<EMAIL_ADDRESS>place
H.NO:1-15-39, Surya Residency, Flat No:6 Venkatapuram, Lothukunta, Alwal, Sec-bad-15.
Map
We Value Your Feedback
Name:
Email:
Phone:
Your Feedback:
Submit
First published on
18th October
, 2018 and last modified on
13th February, 2019


Guidance
High needs funding allocations for the academic year 2013 to 2014 and 2012 to 2013
This guidance
was withdrawn on
31 August 2016
This page contains information related to the 2012 to 2013 and 2013 to 2014 academic year. Please visit our
high needs funding arrangements page
for the most up to date information.
Information on high needs funding allocations for the academic year 2013 to 2014 and 2012 to 2013.
High needs funding allocations the academic year 2013 to 2014
Information on the funding and contracting principles for post-16 high needs students in the academic year 2013 to 2014.
Additional information
on high needs funding arrangements for the academic year 2013 to 2014 and preparation for 2014 to 2015.
Post-16 allocated high needs place numbers
Final
post-16 allocated high needs place numbers
for the 2013 to 2014 academic year at institution level broken down by the local authorities that commissioned those places.
Academic year 2012 to 2013
Information on the funding and contracting principles for post-16 high needs students in the academic year 2012 to 2013.
Post-16 allocated high needs place numbers
Post-16
allocated high needs place numbers
at an institutional level for the academic year 2012 to 2013 are available on GOV.UK.


This is the partial for view 3.
Name :{{book.name}}
Author : {{book.author}}
Price : {{book.price}}
Publication :{{book.publication}}
Pages: {{book.totalPages}}


Demo Instructions
During the limited time that we had during the hackathon, we managed to make 4 completely different interfaces that the user can use. One is Facebook Messenger, an e-shop, an SMS service, and a Delivery Portal.
Even though we didn't show everything in the video, everything mentioned above is implemented and fully functional. The only limitation that we are aware of is the fact that :
- We do not wish to share our phone numbers in public, but the SMS gateway we are using is using our own mobile phone numbers. Therefore, we can not demo the SMS service as SMS.
In order to solve this, we implemented the following:
- We made a different frontend for the SMS that is web-based. However, this is exactly the same as the original SMS service in terms of functionality. You can send a message from any "phone number" you want and see how the bot would respond. The backend used is exactly the same, but a JS-based frontend is used instead of a Java-based Android app acting as an SMS gateway
We would recommend that you try out the different demos in the following order:
- Messenger chatbot: Here is the link to the chatbot: http://m.me/107990727539664
- SMS chatbot: As mentioned above, for demonstration purposes this is shown as a web-app: https://sms.communityhero.live
- e-shop: https://communityhero.me (this is not fully implemented, you may experience some issues)
- Delivery portal: https://delivery.communityhero.live (even though a log in screen is presented, logging in is not implemented yet. You can just press log in without filling the username/password fields)
Please also note that our database is only made for testing and does not contain real data, we only have 65 products. Some of them have a product name in Greek, but they can still be found by searching because they have tags in English. Therefore, if it doesn't return any results for the query given, try with something else :)
Since our database currently only has a limited number of stores in the same city in Cyprus, we would recommend that whenever prompted, enter an address within the region below:
Lastly, we as a team would like to thank you for the organisation of this event where we had lots of fun, learnt a lot and made something that can be useful to society, even though we are just a bunch of teenagers. If you find any bugs or have any ideas for future development please don't hesitate to contact us at: feedback@mail.communityhero.live


CSUB
Home
(current)
Create Course
View Courses
Add Administrator
Add Student
Logout
Create Syllabus
Contact phone number
Contact e-mail address
Office hours-date
Monday
Tuesday
Wednesday
Thursday
Friday
Office hours-time start
Office hours-time end
Add More Office Hours
Assignment Title
Due Date
New Assignment Form
Submit Syllabus


plants Traditional snake Indian medicinal used Knowledge venom Ethnopharmacology India Bangladesh plant study ./j.jep... {border-style species px;} traditional treatment #ffffff;} survey Ethnobotanical snakebite district, bite district Ethnomedicinal Medicinal Research knowledge article local people Medicine Snake activities reported snakes studies venoms Kumar Toxicon antivenom cause extract medicine px; {font-family Bothrops National Plants Pradesh Singh different effects envenoming font-size number snakebites use Medical Pakistan acid common double; having healers high major mode tribe venomous victims viper (%) ./S-()- Biological Ethnopharmacological However, Jain Leaflets Mia Snakebite Table Tamil Tropical active activity antidote areas border-color border-width carried cited conducted ethnobotanical followed herbal including indigenous investigations name, novel parts phospholipase phytochemical poisoning potential rural solid; toxicity uses {font-style {font-weight (%), (.%) ./j.toxicon... Aristolochia Bangladesh, Botany Das Dhaka, Ethiopia Figure Fitoterapia Food Hemidesmus Ignacimuthu International Kadir Proceedings Science Sharma Snakes Tamilnadu, approximately area bites bold cases caused cell characterization contains courier; effect em; family global health hemorrhagic identified information inhibit inhibits like management medicines natural oral order plants. possible practices practitioners present properties pt;} regarding related remedies root seed snakebite. toxic toxins tribal tropical used, venom. wild


Downloading {{ page.download_filename }}...
Your download will start shortly...
Problems with the download? Please use this direct link.
--- layout: default sitemap: exclude: yes --- {% include header.html %}
Your download will start shortly...
Problems with the download? Please use this direct link.


Web is collection of HTML pages
Hyperlinks is what connects the the HTML pages
Major pieces of the web = you, your computer&Browser, the internet, HTTP, servers
Hyper Text Markup Language is made up of tags - opening tag and closing tag
b is for making the contents between the tag bold
em makes contents italicized
failing to add a closing tag makes everything after the opening tag bold or italic or
HTML attributes
Anchors are for making links
class
images do not have closing tag
whitespace turns into single space
break (void)
paragraph
content
inline element b,em,img, span
block elemen div
Paragraph p can manage hoight and width
container elements: elements that do nothing but contain stuff inside themselves.
span is inline and
div is a block element


- Tab - Like other widgets, the jqxTree widget receives focus by tabbing into it. Once focus is received, users will be able to use the keyboard to change the selection. A second tab will take the user out of the widget.
- Shift+Tab - reverses the direction of the tab order. Once in the widget, a Shift+Tab will take the user to the previous focusable element in the tab order.
- Up and Down arrow keys - move between visible items.
- Left Arrow key - on an expanded item, collapses the item.
- Left Arrow key - on a collapsed or end item moves focus to the item's parent item.
- Right Arrow key - on a collapsed item expands the item.
- Right Arrow key - on an expanded item, moves to the first child item, or does nothing on an end item.
- Home key - moves to the top item in the tree view.
- End key - moves to the last item in the tree view.


Testing¶
For pytests, run all tests inside shopyo/shopyo
directory
# tests with compact output
python -m pytest .
# test with verbose output
python -m pytest -v
Alternatively, you can run your tests via tox.
run all tests, for all supported Python interpreters
tox
run all tests, on Python 3.8 only
tox -e py38
run all only the test_home_page test, on Python 3.9 only
tox -e py39 -- -k test_shop_home_page


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 | * contributor license agreements. See the NOTICE file distributed with | |
| 4 | * this work for additional information regarding copyright ownership. | |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 | * (the "License"); you may not use this file except in compliance with | |
| 7 | * the License. You may obtain a copy of the License at | |
| 8 | * | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | * | |
| 11 | * Unless required by applicable law or agreed to in writing, software | |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | * See the License for the specific language governing permissions and | |
| 15 | * limitations under the License. | |
| 16 | */ | |
| 17 | package org.apache.commons.math3.analysis.differentiation; | |
| 18 | ||
| 19 | import org.apache.commons.math3.analysis.MultivariateVectorFunction; | |
| 20 | ||
| 21 | /** Class representing the gradient of a multivariate function. | |
| 22 | * <p> | |
| 23 | * The vectorial components of the function represent the derivatives | |
| 24 | * with respect to each function parameters. | |
| 25 | * </p> | |
| 26 | * @version $Id$ | |
| 27 | * @since 3.1 | |
| 28 | */ | |
| 29 | public class GradientFunction implements MultivariateVectorFunction { | |
| 30 | ||
| 31 | /** Underlying real-valued function. */ | |
| 32 | private final MultivariateDifferentiableFunction f; | |
| 33 | ||
| 34 | /** Simple constructor. | |
| 35 | * @param f underlying real-valued function | |
| 36 | */ | |
| 37 | public GradientFunction(final MultivariateDifferentiableFunction f) { | |
| 38 | this.f = f; | |
| 39 | } | |
| 40 | ||
| 41 | /** {@inheritDoc} */ | |
| 42 | public double[] value(double[] point) { | |
| 43 | ||
| 44 | // set up parameters | |
| 45 | final DerivativeStructure[] dsX = new DerivativeStructure[point.length]; | |
| 46 |
2
1. value : changed conditional boundary → KILLED 2. value : negated conditional → KILLED |
for (int i = 0; i < point.length; ++i) { |
| 47 | dsX[i] = new DerivativeStructure(point.length, 1, i, point[i]); | |
| 48 | } | |
| 49 | ||
| 50 | // compute the derivatives | |
| 51 | final DerivativeStructure dsY = f.value(dsX); | |
| 52 | ||
| 53 | // extract the gradient | |
| 54 | final double[] y = new double[point.length]; | |
| 55 | final int[] orders = new int[point.length]; | |
| 56 |
2
1. value : changed conditional boundary → KILLED 2. value : negated conditional → KILLED |
for (int i = 0; i < point.length; ++i) { |
| 57 | orders[i] = 1; | |
| 58 | y[i] = dsY.getPartialDerivative(orders); | |
| 59 | orders[i] = 0; | |
| 60 | } | |
| 61 | ||
| 62 |
1
1. value : mutated return of Object value for org/apache/commons/math3/analysis/differentiation/GradientFunction::value to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return y; |
| 63 | ||
| 64 | } | |
| 65 | ||
| 66 | } | |
Mutations | ||
| 46 |
1.1 2.2 |
|
| 56 |
1.1 2.2 |
|
| 62 |
1.1 |


Modern Java
- What’s happening (in java 8, 9, 10,..)
- Passing code with Behaviour Parameterization
- Lambda Expressions
What’s happening (in java 8, 9, 10,..)
Some Quotes
Put simply, lambdas and their friends, method references, provide the ability to concisely pass code or methods as arguments to be executed in the middle of doing something else.
Java 8 streams support this concise database-queries style of programming—but with Java syntax and none of the need to know about databases! Second, streams are designed so that not all their data needs to be in memory (or even computed) at once.
Optional, Optionals. No more NULLs.
Brand new time and date API from Java 8!
Passing code with Behaviour Parameterization
Behavior parameterization is a software development pattern that lets you handle frequent requirement changes. In a nutshell, it means taking a block of code and making it available without executing it. This block of code can be called later by other parts of your programs, which means that you can defer the execution of that block of code. For instance, you could pass the block of code as an argument to another method that will execute it later. As a result, the method’s behavior is parameterized based on that block of code. For example, if you process a collection, you may want to write a method that
- Can do “something” for every element of a list
- Can do “something else” when you finish processing the list
- Can do “yet something else” if you encounter an error
This is what Behaviour Parameterization refers to.
Coping with requirement changes
Imagine there is a HR application which wants to get a list of female employees from a list of all the employees.
First attempt
enum Gender {
MALE,
FEMALE
}
class Employee {
int age;
String name;
String position;
Gender gender;
public Employee(int age, String name, String position, Gender gender) {
super();
this.age = age;
this.name = name;
this.position = position;
this.gender = gender;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public Gender getGender() {
return gender;
}
public void setGender(Gender gender) {
this.gender = gender;
}
}
Code for getting only female employees would be like
public static List<Employee> getOnlyFemaleEmployees(List<Employee> employees) {
List<Employee> femaleEmployees = new ArrayList<>();
for (Employee employee : employees) {
if(Gender.FEMALE.equals(employee.getGender())) {
femaleEmployees.add(employee);
}
}
return femaleEmployees;
}
Second attempt: parameterizing the gender
Now HR changes her mind and asks for Male and Female employees separately. In the new code, gender is passed as parameter
public static List<Employee> filterEmployees(List<Employee> employees, Gender gender) {
List<Employee> result = new ArrayList<>();
for (Employee employee : employees) {
if(gender.equals(employee.getGender())) {
result.add(employee);
}
}
return result;
}
Calling this method by
List<Employee> femaleEmployees = filterEmployees(employees,Gender.FEMALE);
List<Employee> maleEmployees = filterEmployees(employees,Gender.FEMALE);
Now HR wants all the employees who are aged above 40 years. In this is becoming irritating. Still the code is….
public static List<Employee> filterEmployees(List<Employee> employees, int age) {
List<Employee> result = new ArrayList<>();
for (Employee employee : employees) {
if(age == employee.getAge()) {
result.add(employee);
}
}
return result;
}
Third attempt - filtering with every attribute
Now HR asks, all female employees or all the employees age greater than 40.. This makes code ugly.. We are doing flag programming here.
public static List<Employee> filterEmployees(List<Employee> employees, Gender gender, int age, boolean flag) {
List<Employee> result = new ArrayList<>();
for (Employee employee : employees) {
if ((flag && employee.getGender().equals(gender)) || (!flag && age > employee.getAge())) {
result.add(employee);
}
}
return result;
}
Behaviour Parameterization
We need a better way to implement filtering of the employees. If we step back and see, all the filtering criteria is like a function which checks for some attribute of the Employee and employee is added to the result if the result is true. We can abstract it into an interface which has a method taking an Employee and returning a boolean. And concrete classes to implement this interface so that we can pass around that concrete class into filter method which uses that instance and checks for the filter criteria.
interface EmployeeChecker {
boolean check(Employee employee);
}
class EmployeeFemaleChecker implements EmployeeChecker{
@Override
public boolean check(Employee employee) {
return Gender.FEMALE.equals(employee);
}
}
class EmployeeAgeChecker implements EmployeeChecker {
@Override
public boolean check(Employee employee) {
return employee.getAge() > 40;
}
}
Fourth attempt - filtering by abstract criteria
our modified filter with EmployeeChecker looks lik this
public static List<Employee> filterEmployees(List<Employee> employees, EmployeeChecker checker) {
List<Employee> result = new ArrayList<>();
for (Employee employee : employees) {
if (checker.check(employee)) {
result.add(employee);
}
}
return result;
}
we can call this filter as below..
List<Employee> femaleEmployees = filterEmployees(employees,new EmployeeFemaleChecker());
List<Employee> agedEmployees = filterEmployees(employees,new EmployeeAgeChecker());
Now we have abstracted the behaviour in a way that you can write any filter condition just by implementing EmployeeChecker interface. For example you can write
- EmployeeFemaleOrAgedAboveForty class
- EmployeeMaleAndNameStartingWithLetterA class
There is a pattern for what we did just now. It’s called Strategy pattern. THIS WHOLE STUFF IS PASSING THE BEHAVIOUR TO A METHOD Now we have to tackle the problem of verbocity. Just to filter the collection we have to write so many classes. There should be an easier way to deal with it. Let’s see :).
Tackling Verbocity
The unnecessary overhead of creating too many classes somewhat is solved by Anonymous Classes.
Anonymous Classes
Anonymous classes are like the local classes (a class defined in a block) that you’re already familiar with in Java. But anonymous classes don’t have a name. They allow you to declare and instantiate a class at the same time. In short, they allow you to create ad hoc implementations.
Fifth attempt - using an anonymous class
Following code shows how to implement EmployeeChecker as anonymous class and use it for filtering
List<Employee> femaleEmployees = filterEmployees(employees, new EmployeeChecker() {
@Override
public boolean check(Employee employee) {
return Gender.FEMALE.equals(employee.getGender());
}
});
List<Employee> femaleAgedEmployees = filterEmployees(employees, new EmployeeChecker() {
@Override
public boolean check(Employee employee) {
return employee.getGender().equals(Gender.FEMALE) && employee.getAge() > 40;
}
});
Sixth attempt - using lambda expressions
Using lambda expressions
List<Employee> maleEmployees = filterEmployees(employees,
(Employee employee) -> employee.getGender().equals(Gender.MALE));
List<Employee> femaleEmployeesBelow30 = filterEmployees(employees,
(Employee employee) -> employee.getGender().equals(Gender.FEMALE) && employee.age < 30);
Seventh attempt - abstracting over List type
Now imagine you want to generalize this whole thing. You can use Generics along with the interface.
interface Predicate<T> {
boolean test(T t);
}
public static <T> List<T> filter(List<T> list, Predicate<T> p) {
List<T> result = new ArrayList<>();
for(T e: list) {
if(p.test(e)) {
result.add(e);
}
}
return result;
}
Now this can filter anything. like Integers, Apples, Employees etc,.
List<Employee> someEmployees = filter(employees, (Employee e) -> e.getAge() > 40);
List<Integer> someIntegers = filter(Arrays.asList(new Integer(1), new Integer(2), new Integer(3)),
(Integer i) -> i.intValue() > 2);
Summary
Behavior parameterization is the ability for a method to take multiple different behaviors as parameters and use them internally to accomplish different behaviors.
Behavior parameterization lets you make your code more adaptive to changing requirements and saves on engineering efforts in the future.
Passing code is a way to give new behaviors as arguments to a method. But it’s verbose prior to Java 8. Anonymous classes helped a bit before Java 8 to get rid of the verbosity associated with declaring multiple concrete classes for an interface that are needed only once.
The Java API contains many methods that can be parameterized with different behaviors, which include sorting, threads, and GUI handling.
Lambda Expressions
After realizing that Anonymous Classes are too verbose for throwing around behavioural code. Because of the verbocity, developers do not like to use it. We know that Lamda Expressions are provided for this very reason, let’s learn them in step-by-step manner as usual.
Lambdas in a Nutshell
A Lambda Expression can be understood as a consise representation of Anonymous function that can be passed around. No name, has parameters, body and return type. Exceptions too can be thrown.
- Anonymous - No name, less to code :).
- Function - Because it’s not associated with any class and has parameters, body and return type and alos exceptions.
- Passed Around - Can be passed around into a method or stored in a variable.
- Consise - No need of too much boilerplate code like Anonymous classes.
| Lambda Parameters | Arrow | Lambda Body |
|---|---|---|
| (Employee e1, Employee e2) | -> | e1.getSalary().compareTo(e2.getSalary()); |
Following are valid lambda expressions
(String a) -> a.length();
(Employee e) -> e.getSalary() > 5000;
(int x, int y) -> {
System.out.println("Value of x is "+x);
System.out.println("Value of y is "+y);
return x+y;
}
() -> 42;
e1.getSalary().compareTo(e2.getSalary());
Examples of lambdas with their use cases
| Use case | Examples |
|---|---|
| A boolean expression | (Employee e) -> e.isExecutive(); |
| Creating Objects | () -> new Employee(31, “Ramesh”, “Manager”); |
| Consuming an Object | (Employee e) -> { System.out.println(e.getName()); } |
| Select or Extract from an object | (String s) -> s.length(); |
| Combine two values | (int a, int b) -> a*b; |
| Compare two objects | (Employee e1, Employee e2) -> e1.getSalary().compareTo(e2.getSalary()); |
Where and How to use Lambdas
You can use Lambdas in the place where a Functional Interface is expected.
Functional Interface
In a nutshell, a *functional interface* is an interface that specifies exactly one abstract method. You already know several other functional interfaces in the Java API such as Comparator and Runnable,.
Functional Interfaces already existed
public interface Comparator<T> {
int compare(T o1, T o2);
}
public interface Runnable {
void run();
}
public interface ActionListener extends EventListener {
void actionPerformed(ActionEvent e);
}
public interface Callable<V> {
V call() throws Exception;
}
public interface PrivilegedAction<T> {
T run();
}
What can you do with functional interfaces? Lambda expressions let you provide the implementation of the abstract method of a functional interface directly inline and treat the whole expression as an instance of a functional interface (more technically speaking, an instance of a concrete implementation of the functional interface). You can achieve the same thing with an anonymous inner class, although it’s clumsier: you provide an implementation and instantiate it directly inline.
Function Descriptor
The signature of the abstract method of the functional interface describes the signature of the lambda expression. We call this abstract method a function descriptor. For example, the Runnable interface can be viewed as the signature of a function that accepts nothing and returns nothing (void) because it has only one abstract method called run, which accepts nothing and returns nothing (void).
Putting lambdas into practice: the execute-around pattern
- Previous
- Next


Home
0
My Network
0
Messaging
ETH Mainnet
Connect Wallet
Free
10
Individual KYC /
User ID Documentation
Step 1
Individual Profile
Step 2
Linking Wallet
Step 3
User ID Documentation
Step 4
KYC Validation
Required Documents
Provide Minimum Two Photo ID Documents
ID Card
Passport
Driving license
Selfie
Proof of Address
SELECT
Upload Documents
We require both sides of your documents
Drag your file to upload or Browse
Required Documents
ID Proof 1
ID Proof 2
Selfie
Proof of Address


f you’re lucky enough to have the Expect language installed just a few lines of code will get you a good enough TTY to run useful tools such as “ssh”, “su” and “login”.
$ cat sh.exp
#!/usr/bin/expect
# Spawn a shell, then allow the user to interact with it.
# The new shell will have a good enough TTY to run tools like ssh, su and login
spawn sh
interact


|
s2n-doxygen-full
|
#include <ssl_locl.h>
Definition at line 599 of file ssl_locl.h.
| CERT_PKEY* key |
Definition at line 606 of file ssl_locl.h.
| int valid |
Definition at line 612 of file ssl_locl.h.
| unsigned long mask_k |
Definition at line 613 of file ssl_locl.h.
| unsigned long mask_a |
Definition at line 614 of file ssl_locl.h.
| unsigned long export_mask_k |
Definition at line 615 of file ssl_locl.h.
| unsigned long export_mask_a |
Definition at line 616 of file ssl_locl.h.
| unsigned long mask_ssl |
Definition at line 618 of file ssl_locl.h.
| RSA* rsa_tmp |
Definition at line 620 of file ssl_locl.h.
Definition at line 621 of file ssl_locl.h.
| DH* dh_tmp |
Definition at line 624 of file ssl_locl.h.
Definition at line 625 of file ssl_locl.h.
| EC_KEY* ecdh_tmp |
Definition at line 628 of file ssl_locl.h.
Definition at line 630 of file ssl_locl.h.
| int ecdh_tmp_auto |
Definition at line 632 of file ssl_locl.h.
| unsigned int cert_flags |
Definition at line 635 of file ssl_locl.h.
| CERT_PKEY pkeys[SSL_PKEY_NUM] |
Definition at line 636 of file ssl_locl.h.
| unsigned char* ctypes |
Definition at line 642 of file ssl_locl.h.
| size_t ctype_num |
Definition at line 643 of file ssl_locl.h.
| unsigned char* peer_sigalgs |
Definition at line 648 of file ssl_locl.h.
| size_t peer_sigalgslen |
Definition at line 650 of file ssl_locl.h.
| unsigned char* conf_sigalgs |
Definition at line 656 of file ssl_locl.h.
| size_t conf_sigalgslen |
Definition at line 658 of file ssl_locl.h.
| unsigned char* client_sigalgs |
Definition at line 666 of file ssl_locl.h.
| size_t client_sigalgslen |
Definition at line 668 of file ssl_locl.h.
| TLS_SIGALGS* shared_sigalgs |
Definition at line 673 of file ssl_locl.h.
| size_t shared_sigalgslen |
Definition at line 674 of file ssl_locl.h.
Definition at line 682 of file ssl_locl.h.
| void* cert_cb_arg |
Definition at line 683 of file ssl_locl.h.
| X509_STORE* chain_store |
Definition at line 688 of file ssl_locl.h.
| X509_STORE* verify_store |
Definition at line 689 of file ssl_locl.h.
| unsigned char* ciphers_raw |
Definition at line 691 of file ssl_locl.h.
| size_t ciphers_rawlen |
Definition at line 692 of file ssl_locl.h.
| custom_ext_methods cli_ext |
Definition at line 694 of file ssl_locl.h.
| custom_ext_methods srv_ext |
Definition at line 695 of file ssl_locl.h.
| int references |
Definition at line 696 of file ssl_locl.h.
| unsigned char* alpn_proposed |
Definition at line 698 of file ssl_locl.h.
| unsigned int alpn_proposed_len |
Definition at line 699 of file ssl_locl.h.
| int alpn_sent |
Definition at line 700 of file ssl_locl.h.


The Haunting (PG-13) ** 1/2 Starring Lili Taylor, Catherine Zeta-Jones Directed by Jan de Bont A Review by Frankie Paiva
The 1963 thriller The Haunting (based on the book by Shirley Jackson) was a psychological thriller that creeped deep within the crevices of the human brain, exploring mental terror and ghostly happenings, seeing the film remade is frightening. No, it's not because of the movie, but the fact that all of that is lost.
Doctor David Marrow (Liam Neeson) has gathered three insomniacs in the creepy Hill House, where no one lives closer than town. So no one will be able to help them, at night, in the dark (or so tells Mrs. Dudley, the housekeeper.) What he tells them is a study to help them is actually his own five year study into fear. For what reason he does this, it's uncertain, but it's a pretty flimsy premise that doesn't work very well.
Theo, (Zeta-Jones) Eleanor, (Taylor) and Luke (Owen Wilson) are the lucky patients.  At first the group believes that she is in this for the attention, but they soon find that it is something completely different.
The film is sort of an anti-Blair Witch, the first three fourths of the film don't show what is after the people in the house, and it's a great effect. Almost as great as the special effects which could have dominated the film, but remain suprisingly restrained until the end. Of course, the good old computer animators had to spoil everything and show us who the villain is, what he looks like, his hair color, hobbies, etc. It is kind of fun to see the plot unfold, but it becomes predictable very quickly.
While the film has some good moments (including an excellent performance from Taylor, who was a good choice, even if most of the audience has probably never heard of her) the film still remains incredibly flawed. Flashy special effects and a good cast can't really help The Haunting (especially for those that saw the original) and for that I give it ** 1/2 stars.
A Review by Frankie Paiva The 12 Year-Old Movie Reviewer E-Mail me at<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


solos::Tec
Home
(current)
Configuration
System
Devices
Gateway
Meter
LoRa
Upload
Download
Status
Sessions
Targets
Connections
Monitoring
System
Messages
Time Series
LoRa Uplink
Tasks
CSV
connection state
Upload Configuration Files
Restore or enlarge the system configuration
Devices
Select a device configuration file
Insert as new data
Update existing data
Version 3.2
Version 4.0
Version 5.0
⇪ Upload
Gateways
Select a gateway configuration file
Insert as new data
Update existing data
⇪ Upload
Meters
Select a meter configuration file
Insert as new data
Update existing data
⇪ Upload
LoRa
Select a LoRa configuration file
Insert as new data
Update existing data
Actility
Swisscom
SigFox
⇧ Upload


Flexbox Playground is an interactive, visual learning tool. To dig deeper and for detailed property descriptions please visit Mozilla's documentation by clicking here.
BOX 1
BOX 2
BOX 3
display:
*Must be selected first
flex-direction:
justify-content:
align-items:
BOX 1
BOX 2
BOX 3
flex-basis:
*Property applied to each box
flex-grow:
*Default value is 0, resize window after selection
flex-shrink:
*Default value is 1, resize window after selection


Writes out triangular cell sets as binary STL files.
module write_stl< build_dir="xp_comm_proj/writestl", src_file="writestl.cxx", out_hdr_file="gen.hxx", out_src_file="gen.cxx", libdeps="FLD", cxx_hdr_files="fld/Xfld.h"> { cxxmethod+req update( filename+read+req, trigger+read+req+notify, in+read, .err+write, .err_str+write); string filename ; int trigger ; Mesh &in ; int err = 0; string err_str = ""; };
The write_stl module writes binary STL(Stereo Lithography) files based upon the data contained in triangular cell sets. The input to the module is a standard Mesh object which should contain one or more cell sets of type "Tri". If the Mesh contains more than one cell set then only the last cell set will be written to the STL file. The triangular cell set is written to file according to the binary STL format. Facet normal vectors are calculated and written to file. The attribute block is not used and null data is written to it.
It is intended that the write_stl module should be used to write the output of a visualization module to a STL file. Many visualization modules, such as isosurface, output field data containing a single triangular cell set. By using this module these results can be conviently output as an STL file for further manipulation. As most of these visualization modules output only a single cell set the way that the write_stl module treats multiple cell sets should not be a problem. Naturally, this module can be used with any Meshes that contain suitable triangular cell sets. However it is most easily used when combined with visualization modules, such as isosurface. An example of this is shown in WriteSTLEg.
&in
Reference to the Mesh that contains the triangular cell set that is to be written to the STL file. If no triangular cell sets are present then an error message will be given. If multiple triangular cell sets are present then the last cell set only will be written to the STL file.
filename
The name of the file that should be written to. This parameter is of type string. Note that if an existing file is specified the module will not warn that the original file is being overwritten. If error-checking of this type is required then it should be provided at a higher level.
trigger
This parameter is used to notify the module that the output file should be written. The parameter is of type int. Whenever the value of this parameter is set the write_stl module is notified. This causes the module to read the current input mesh and create the corresponding STL file. If this parameter can be connected to a UIButton component to create a simple user interface.
err
err_str
These two parameters control the output of error messages. The err parameter is an int value that is set to 1 whenever an error occurs. This parameter can therefore be used to control the display of error messages in the user interface. The err_str parameter is a string value that is used to return error messages from the write_stl module. The writeSTL user macro shows now it is possible to use the state of the err parameter to control the display of the text in the err_str parameter.
The low-level write_stl module is used in the User Macro writeSTL. This can be used as is in applications. An example of how it can be used is shown in WriteSTLEg.
An example application WriteSTLEg is provided, which calculates an isosurface of the hydrogen volume data. The resulting mesh can be written to a user specified STL file. This file can subsequently be read by either the IAC ReadSLPSTL project or other programs that use the binary STL file format.
xp_comm_proj/writestl/wrstmods.v contains the write_stl module V definition.
The low-level WriteSTLMods library containing the module write_stl does not specify a process. By default the express process will be used.
Ian Curington
Andrew Dodd
write_stl, writeSTL, WriteSTLEg


README .TXT END. PROGRAM
Hello User. This is a reproduction of the graphics in the boardroom scene in Tron: Legacy. If you have not seen that movie, check out this background material on the making of that scene before proceeding.
To make this a bit more fun, the boardroom is configured to visualize live updates from Github and Wikipedia, with more streams to come. Click on a stream in the window to the right to continue.
The boardroom visualization requires the use of WebGL and Event Source. The test below indicates the availability of these features on your system.
This was created by @arscan as a learning exercise. It is not affiliated with Disney, Tron: Legacy, Encom, Wikipedia or Github in any way. The source is available on Github.


Data Source Reading
|
|
| Number Lines Read: |
0 |
| Number Lines Read (since restart): |
0 |
| Current Rainfall (mm): |
0 |
System Stats
|
|
| Used Memory: |
0 |
| Free Memory: |
0 |
| Total Memory: |
0 |
| Max Memory: |
0 |
Email Alerts
|
Historical Data Collection
|
|
| Size Of Holding Buffer: |
0 |
| Number of route definition non matches: |
0 |
| Database Insert Transactions Requested: |
0 |
| Database Insert Transactions Executed: |
0 |
| Database Insert Transactions Outstanding: |
0 |
| Database Transactions Dropped Due to Overflow: |
0 |
| Database Record Pulls Requested: |
0 |
| Database Record Pulls Executed: |
0 |
Point-To-Point Clean Up
|
|
| Number Point To Point records checked: |
0 |
| Number Point To Point records deleted: |
0 |
|
Live Streaming
|
|
| Number of live actors: |
0 |
| Number of live children: |
0 |
| Number of user connections: |
0 |
|
Update Route Definitions
|
|
| % complete: |
0 |
| Number inserted into DB: |
0 |
| Number updated in DB: |
0 |
Update Stop Definitions
|
|
| % complete: |
0 |
| Number inserted into DB: |
0 |
| Number updated in DB: |
0 |
Add polylines
|
|
| Number lines read |
0 |
| Number added from web: |
0 |
| Number added from cache: |
0 |
|


Based on the well known semantic.gs by Tyler Tate, Flawless Semantics shares many of the same goals that semantic.gs such as allowing:
As is evident from the examples provided, unlike semantic.gs this grid uses a column-gutter-column approach, I have provided as many examples as I can on this page and there a more examples via the links found at the bottom of the page. There is no need for a omega classes as each row is created exactly one gutter width larger to accommodate and hide the extra gutter.
When Semantic isn't great... well in developing this framework from what arguably is the most semantic grid system (semantic.gs). I started realising the areas where it could be optimised and errors corrected are due in a large part to the nature of semantic naming and the limits of current pre-processors. My biggest gripe is that you either ended up with long trailing comma-delimited selectors that make editing harder than it should be or you have properties repeated over and over leading to css bloat when they only really need to be declared once (for an example just have a look at the version 1.1.3 and the css it produces). Further, it is arguable that any name which describes the purpose of a html element is semantic and as Harry Roberts of XXXXXXXX explains the grid merely acts as a shelf for real content to fit into. To this end Flawless Semantics as ironic as it is, attempts to find a compromise between being semantic and being sensible.
To find out more about Flawless please see the readme located here


A good algorithm to sort lists is the merging algorithm that relies en merging sublists that are already sorted. The structure of this algorithm can be summarized by the following two equations (in both cases one supposes that a is smaller than b):
merge (a :: l) (b :: l') = a :: merge l (b :: l') merge (b :: l) (a :: l') = a :: merge (b :: l) l'
This function is not structural recursive with respect to the the first list (because of the second equation) or with respect to the second list (because of the first equation), but the sum of length of lists decreases at each recursive call. Use this remark to build an algorithm that sorts lists of elements of type A, working in a functor taking a module with the following type as argument.
Module Type Comparable_data. Parameter A : Set. Parameter Ale : A -> A -> Prop. Parameter Ale_dec : forall x y:A, {Ale x y}+{Ale y x} End Comparable_data.
Look at this file.


Hsin Chien Marine Co., Ltd.
HCM Co.
Home
(current)
About
Organization
Fleet
Vessels
Contact Us
Careers
Volume Of
Our Fleet


"x" "1" "KAWAMURA,Y, SAITO,Y, IMAMURA,M AND MODDERMAN,JP, MUTAGENICITY STUDIESON ERYTHRITOL IN BACTERIAL REVERSION ASSAY SYSTEMS AND IN CHINESE HAMSTERFIBROBLAST CELLS, REGUL. TOXICOL. PHARMACOL. 24(2, PT. 2): __ S261-S263,1996"


Sunmi to make a cameo appearance in Hani's web drama 'XX' + to sing drama's OST
by beansssAccording to reports on November 22, Sunmi will be making a cameo appearance in upcoming web drama 'XX' starring EXID's Hani.
'XX' is a web drama series co-produced by MBC and 'Playlist', telling the story of a special speakeasy bar named 'XX'. Sunmi will be participating in filming for her cameo appearance some time next week. Meanwhile, Sunmi has appeared as a cameo on dramas such as 'Persevere, Goo Hae Ra' and 'Producer' in the past, playing herself as her role.
The star will also be singing an OST for the web drama, set to air some time in January of 2020. Look forward to MBC x 'Playlist's 'XX', as well as Sunmi's OST, coming early next year!


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object yeti.YetiType
public class YetiType
Class that represents types in Yeti.
| Field Summary | |
|---|---|
java.util.HashMap<java.lang.String,YetiType> |
allSubtypes
A HashMap that stores all instantiated subtypes. |
static java.util.HashMap<java.lang.String,YetiType> |
allTypes
A HashMap that stores all instantiated types. |
java.util.Vector<YetiRoutine> |
creationRoutines
Structure that stores all routines that return this type |
static int |
DEFAULT_MAXIMUM_NUMBER_OF_INSTANCES
The default maximum to the number of instances. |
java.util.Vector<YetiVariable> |
directInstances
Structure that stores all direct instances of this type (this type is their defining type) |
java.util.HashMap<java.lang.String,YetiType> |
directSuperTypes
A HashMap that stores direct super types. |
boolean |
hasSpecificMaximumNumberOfDirectInstances
True if there is a maximum to the number of instances specific to this type. |
java.util.Vector<YetiVariable> |
instances
Structure that stores all instances of this type |
int |
specificMaximumNumberOfDirectInstances
The maximum to the number of instances of this type. |
static boolean |
TYPES_HAVEMAXIMUM_NUMBER_OF_INSTANCES
True if there is a maximum to the number of instances by default. |
| Constructor Summary | |
|---|---|
YetiType(java.lang.String name)
Constructor of YetiTypes. |
| Method Summary | |
|---|---|
void |
addCreationRoutine(YetiRoutine v)
adds a routine to the type in question and all supertypes |
void |
addInstance(YetiVariable v)
Adds an instance to the type in question and all supertypes |
void |
addInterestingValues(java.lang.Object interestingValue)
Adds an interesting value on this type. |
void |
addSubtype(YetiType yt)
Adds a subtype that was instantiated |
java.util.Vector<YetiRoutine> |
getCreationRoutines()
Return the creation routines of this type. |
java.util.Vector<YetiVariable> |
getInstances()
Returns all instances of this type |
java.util.Vector<java.lang.Object> |
getInterestingValues()
Simple getter for interesting values. |
java.lang.String |
getName()
Returns the name of the YetiType. |
YetiRoutine |
getRandomCreationRoutine()
Returns a routine of this type at random. |
YetiVariable |
getRandomDirectInstance()
Returns an instance of this type at random. |
YetiVariable |
getRandomInstance()
Returns an instance of this type at random. |
java.lang.Object |
getRandomInterestingValue()
Returns an interesting value and does not remove it from the list of interesting values. |
YetiVariable |
getRandomInterestingVariable()
Returns an interesting value in a variable and does not remove it from the list of interesting values. |
boolean |
hasInterestingValues()
Defines whether this type has interesting values. |
boolean |
isSubtype(YetiType yt)
Returns true if the present type is a subtype of the argument. |
static void |
printCreationProcedureList()
Prints all creation routines listed for all types. |
void |
removeInstance(YetiVariable v)
Removes an instance to the type in question and all supertypes |
java.lang.Object |
removeInterestingValue()
Returns an interesting value and removes it from the list of interesting values. |
void |
resetInterestingValues()
Resets interesting values on this type. |
void |
setHasInterestingValues(boolean hasInterestingValues)
A simple setter to say that a type has interesting values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean TYPES_HAVEMAXIMUM_NUMBER_OF_INSTANCES
public static int DEFAULT_MAXIMUM_NUMBER_OF_INSTANCES
public boolean hasSpecificMaximumNumberOfDirectInstances
public int specificMaximumNumberOfDirectInstances
public java.util.Vector<YetiRoutine> creationRoutines
public java.util.Vector<YetiVariable> instances
public java.util.Vector<YetiVariable> directInstances
public java.util.HashMap<java.lang.String,YetiType> directSuperTypes
public java.util.HashMap<java.lang.String,YetiType> allSubtypes
public static java.util.HashMap<java.lang.String,YetiType> allTypes
| Constructor Detail |
|---|
public YetiType(java.lang.String name)
name
- The name of the YetiType| Method Detail |
|---|
public void addCreationRoutine(YetiRoutine v)
v
- the creation routine to add to this type.public java.util.Vector<YetiRoutine> getCreationRoutines()
public YetiRoutine getRandomCreationRoutine() throws NoCreationRoutineInType
NoCreationRoutineInType
- Just in case we don't know how to create the type.public void addInstance(YetiVariable v)
v
- the instance to add.public void removeInstance(YetiVariable v)
v
- the instance to add.public java.util.Vector<YetiVariable> getInstances()
public YetiVariable getRandomInstance()
public YetiVariable getRandomDirectInstance()
public void addSubtype(YetiType yt)
yt
- type to addpublic java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Vector<java.lang.Object> getInterestingValues()
public void addInterestingValues(java.lang.Object interestingValue)
interestingValue
- the value to add.public void resetInterestingValues()
interestingValue
- the value to add.public java.lang.Object removeInterestingValue()
interestingValue
- the interesting value.public java.lang.Object getRandomInterestingValue()
public YetiVariable getRandomInterestingVariable()
interestingValue
- the interesting value.public void setHasInterestingValues(boolean hasInterestingValues)
hasInterestingValues
- true if it has interesting values, false otherwise.public boolean hasInterestingValues()
public boolean isSubtype(YetiType yt)
yt
- the type to compare to.public static void printCreationProcedureList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Big O Complexity and Notation
Computer Memory
Dynamic vs. Static-typed Languages
How computers work
How the Internet Works
Recursion
Regular Expressions
Sorting (merge sort, quick sort, bubble sort)
Test-Driven Development
What is Rails?
Web Security
SQL Injection (see Little Bobby Tables (Links to an external site.))
NoSQL databases
SQL query optimization
Functional Programming


AWS Build to Scale
Roy Canseco
2020-10-30
Context
AWS is special in how flexible it is compared to most cloud providers. However, we, the clients are paying for this flexibility.
Other cloud providers actually provide cheaper products with as much functionality but with less flexibility. It is therefore up to us, the clients, to leverage this flexibility by configuring AWS workloads to our advantage. The corollary to this, if we fail to configure properly, we will be paying more, or getting less.
Big Idea
We look to AWS as to how to iteratively build a generic web application that will make the most of the AWS flexibility and give us the most bang for our buck.
It turns out that AWS has a 4-step process.
- Deploy a simple your web application code in an EC2 instance, your database in a block storage, and your static files into an S3 bucket.
- Replace your block storage with RDS
- Put in cloud watch, a load balancer, and an auto scaling group of EC2 instances
- Add cloud formation to be able to convert your infrastructure layout to code.
This is taken from
AWS Public Sector Summit Online / Breakout Sessions / ...
Building in the cloud
Patrick Do, Technical Trainer, AWS
If we are able to fix the storage issue through S3 or EFS, then we will be completing step 2.
Benefits
Each step delivers unique advantages 1. Cheap storage that scales as your files grow 2. A database that can be managed and secured separately from the web application 3. A fleet of CPU instances that balances load between them and increases/ decreases their number as needed 4. A way to export and store all the infrastructure configuration for quick and easy redeployment
This will bring us to an Optimized Lift and Shift status as described as the halfway point to total cost optimization, which was also described in AWS Summit 2020, as mentioned in my Oct 29 report.
There was a report of an institution in India, EdTech Impartus, that launched online education in AWS for 90 schools, equivalent to 530,000 students and 32,000 teachers during the recent pandemic months. It is possible to setup AWS for all PSHS campuses well.
Details
Situationer
Right now our moodledata are inside the Instance Store (ephemeral storage). This is fast, but expanding this is very costly. Also this hinders us from doing EC2 autoscaling since the compute node has the user data as well. Ideally the static data will be in the S3 bucket, which is also something we are not using at this point.
On the other hand, our database is already well placed and is separate from the webserver instance.
### Step 1 of 4
This diagram is how most web applications in AWS will start. We haven't fully reached this stage yet since we haven't separated our static content from our compute instance.
This implies that we can manage our static content apart from the compute instance. For our particular case, this can mean that we put our moodledata folder inside a block storage. We can also use a moodle plugin to get static content from within moodledata block storage and store them in the object bucket.
Once we fully achieve this, we should be able to scale our storage as needed.
Step 2 of 4
This is stage 2, where we configure the database in a way that it can be managed apart from our compute instance.
With regards to the database, our current setup fully satisfies this best practice.
Step 3 of 4
This is stage 3, where we have slimmed down our compute instance to do just computing functions. Both data files and databases are already separated from it. We can now create a fleet of compute instances that we can scale up or scale down based on our present need.
We are not doing this at all as of now. This part is where AWS excels. Not being able to do this takes out a lot of the advantages that AWS has over cheaper cloud platforms.
This will need that have the following to work: 1. a load balancer 2. a fleet of compute instances 3. a monitor to signal increasing or decreasing of compute instances
The following picture shows the AWS load-balancer.
The following picture shows a fleet of compute instances that only runs 2 instances during low usage times and up to 10 instances during peak usage times.
The following picture describes the monitor AWS uses to trigger alarms and autoscaling (increase or decrease) of compute instances. It was mentioned in the AWS Summit 2020 that they recommend increasing compute capacity once 60% is already reached. They also recommend decreasing capacity once utilization falls to 20%.
Step 4 of 4
This is stage 4, where we describe our AWS configuration in a script and save it. This means that if we want to set everything up again, we can do so easily just be running our script. This makes sure that our configuration is correct every time.
This uses AWS Cloud Formation templates.
Next Steps
There are various things that can go wrong in putting together server infrastructure in the cloud. That is why it is recommended to iterate from simple to a complex architecture. Through every stage, the reliability, ease of management and total cost becomes better and better.
It would be good to be proactive in this regard. At this point, PSHS needs KHub to fully reach stage 2. The key component to this is being able to separate static content from the compute node. This is very much doable.
As soon stage 2 is reached, it would be advisable to explore and prototype a solution to reach Stage 3 so as to be future ready.
It seems that OED/ Nephila is poising to integrate all KHubs in the future. This is evidenced by the current setup where there is only 1 database for all campuses. This means that in case we want to separate the campuses, we will not find it that easy to do because campuses are sharing database tables. Also, from today's meeting, their plan is to have 1 object bucket for the static content of all campuses. All these point to integrating all campus KHubs together. When that happens, reaching the stage 3 architecture is a must to be feasible. Stage 4 will be necessary to maintain such a configuration in the long run.


{% extends "base/base.html"%} {% load staticfiles %} {% block content %}
Welcome
Welcome to the official site of Kalikot Survey Office. This website lets you surf through introduction, different activities, staff, products and services delivered from the office etc. Please be informed that any activities, notices, important news and information regarding office budgets, monthly progress reports and chars are visualized via the site being abide by different Nepal governement Laws and Rules. |
Message from the Officer
Welcome to the official site of Kalikot Survey Office. This website lets you surf through introduction, different activities, staff, products and services delivered from the office etc. Please be informed that any activities, notices, important news and information regarding office budgets, monthly progress reports and chars are visualized via the site being abide by different Nepal governement Laws and Rules.Please be informed that any activities, notices, important news and information regarding office budgets, monthly progress reports and chars are visualized via the site being abide by different Nepal governement Laws and Rules.Please be informed that any activities, notices, important news and information regarding office budgets, monthly progress reports and chars are visualized via the site being abide by different Nepal governement Laws and Rules. |


version 1.9 changes¶
Rolling update of features / bug fixes
1. Vector polar plots¶
Vector polar plots introduced. Use the pts option to vect when doing a stereographic polar vector plot to interpolate the grid to be uniformly spaced when viewed.
Done
2. Change documentation web page location¶
Done
3. Add orography / bathymetry colour scales¶
Done
4. Change cfplot to cf-plot¶
Package renamed to cf-plot to fit in with cf-python and cf-view.
Done
5. Change web docs to github¶
Web documents location changed to http://ajheaps.github.io/cf-plot. setup.py etc references changed accordingly.
Done
6. Add plot spacing options to gopen¶
Add hspace and wspace plot spacing options to gopen.
Done
7. lineplot - -assing non-CF data¶
Add options so that passing of non-CF data to lineplot works.
Done
8. vect - turn off vector key¶
Add show_key option to vect to allow turning off of vector key.
Done
9. cscale - colour maps not referenced correctly when doing a local install¶
pip install --user cf-plot
Doesn't allow changing of colour maps.
Done
10. lineplot - add axis labelling that overrides any CF information¶
Add axis labelling that overrides any CF information in lineplot.
Done
11. gclose - plots not closed properly¶
Add plot.close() to gclose routine to properly close each plot when it is finished.
Done
12. levs - change in floating point levels calculation¶
Floating point levels were calculated using numpy.arange and this can sometimes give stange contour levels. For example,
Using np.linspace(-0.2,0.2,11) gives a much neater set of levels and the floating point calculation of levels was changed to adopt this method.
Done
13. levs - cfp.levs() fails to reset colorbar extensions¶
cfp.levs() failed to reset colorbar extensions.
Done
14. Change of name for some colour scales¶
Colour scales with plus and minus in them cause issues in cfview. These colour scales have been renamed with the plus and minus changed to an underscore.
Done
15. con - negative_linestyle and zero_thick issues¶
Recent changes in the 1.5.x version of Matplotlib causes issues with the con routine negative_linestyle and zero_thick options. con was changed to the new Matplotlib way of doing these.
Done
16. con - xlog / log specification¶
Amended the xlog and ylog specification so that it now accpets True as well as 1 to give a log plot.
Done
17. con, vect added axis labelling commands¶
Added xticks, xticklabels, yticks, yticklabels, xlabel, ylabel to con and vect to control axis labelling. Also added axis, axis, yaxis to control whether axes are plotted.
Done
18. con - bug in color scheme¶
When turning off a colorbar with colorbar=None in the con routine the extension colors were then out of alignment.
Fixed
19. vect - added vertical log scale¶
Added optional vertical log scale to the vect routine.
Done
20. con - added time vs height plots¶
Added time vs height plots.
Done
21. colour scales - adjust name¶
One of the colour scales had an incorrect extension and this caused an issue in cf-view.
Done
22. Plot blocking resolved¶
If the display command from ImageMagick is available this is now used in conjunction with subprocess in preference to build-in Matplotlib viewer. This gets around the problem of a plot blocking the command prompt preventing further plots from being made. Using cfp.setvars(viewer='matplotlib') will revert to using the built-in matplotlib picture viewer.
Done
23. timeaxis routine introduced¶
The timeaxis routine takes a time axis and returns a sensible set of tick positions and labels. This is an internal routine that is used in Hovmuller and graph plots.
Done
24. Multiple hovmuller plot calls produce incorrect pictures¶
Subsequent plots after the first hovmuller plot call produce incorrect pictures.
Fixed
25. Added time axis options to setvars¶
Added time axis tick marks and labelling options to setvars. Once set these plot options are used for all subsequent time axes.
Done
26. Time axes bugfix¶
Bugfix for an issue in time axes.
Done
27. Add axis label and alignment options to setvars¶
Add axis label and alignment options to setvars:
Done
28. Bugfix in gset¶
Bugfix in gset for recent time axis changes.
Fixed
29. Bug in lineplot¶
Lineplot is now more logical and takes a CF-field (f) as the base use. The other use is not to pass f but to have x=x and y=y. This allows x vs y plots and y vs x plots.
Fixed
30. con - filled contours and irregular contour levels¶
Selecting irregular contour levels with cfp.levs(manual=manual) and filled contours gives a slight colour scale mismatch. This was resolved by calculating a normalization array: plotvars.norm=matplotlib.colors.BoundaryNorm(boundaries=plotvars.levels, ncolors=ncolors)
Fixed
31. con - blockfill plots¶
Slight bug in blockfill colours at the top end of the drawn colours.
Fixed
32. setvars / lineplot - legend text size and weight¶
Two new options were added to cfp.setvars to change the font size and weight for the legend in lineplot:
legend_text_size=None - legend text size legend_text_weight=None - legend text weight
Added
33. levs - changed level generation scheme¶
The level generation scheme in levs when the user passes min, max, step has been changed. It is now using Neil Massey's scheme:
If min, max, step are integers: levs = ((((np.arange(min, max+step*1e-10, step, dtype=np.float64)*1e10)).astype(np.int64)).astype(np.float64)/1e10).astype(np.int)
else: levs = (((np.arange(min, max+step*1e-10, step, dtype=np.float64)*1e10)).astype(np.int64)).astype(np.float64)/1e10
Changed
34. gvals - changed scheme for step >= 1¶
gvals changed to use more sensible steps when step >= 1.
steps are now 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 25000, 50000, 100000, 200000, 250000, 500000, 1000000.
If the number of steps from the above in (data max - data min) is greater than 12 then this step is used.
Changed


AMAs: The 12 Most Memorable Red Carpet Looks
Selena Gomez, Taylor Swift, Ciara, Lizzo and Billie Eilish make the list.
by Lindsay Weinberg FACEBOOK TWITTER EMAIL METaylor Swift and Selena Gomez shut down the American Music Awards red carpet on Sunday, stunning in two green gowns ahead of their performances on stage. See which musicians join Swift and Gomez on The Hollywood Reporter's list of the 12 most memorable fashion looks at the 2019 AMAs (hint: three of them were named this week as some of the most influential stars in fashion).
Taylor Swift
Swift broke away from her pastel-hued Lover era and threw it back to her Reputation days with an asymmetrical, custom Julien Macdonald dress and thigh-high boots. The olive green gown brought to mind the sparkly, snake-y style from her last album, which was all about managing her public image. It was fitting that Swift, named Artist of the Decade, rocked a darker glam aesthetic for the AMAs, which took place just days after she settled a public feud with her former record label, Big Machine.
Selena Gomez
Look at her now — Gomez wowed in a strapless, lime Versace minidress with plenty of bling, thanks to that Roberto Coin Cento diamond necklace. "The most brilliant star on the red carpet tonight," the jeweler wrote on Instagram. Last month when Gomez debuted her two new singles and a "strong sexy" sense of style, her stylist, Kate Young, told THR, "We're just beginning!"
Lizzo
Proving Barbie comes in any size, Lizzo carried the micro-bag to end all micro-bags at the AMAs. Her doll-sized purse upped the attitude of her custom one-shouldered, ruffled Valentino dress. "Iconic orange," stylist Marko Monroe wrote on Instagram. "So proud of this angel for always being ready to put the *wink* back into the red carpet." In addition to the Valentino bag, Monroe added Stuart Weitzman's white patent Aleena mules, Lorraine Schwartz jewelry and Ofira jewels. "Bag big enough for my fucks to give," Lizzo wrote.
Ciara
Stylist Maeve Reilly, who also dresses Hailey Bieber, kicked off host Ciara's night of fashion with a blue, flared Balmain suit with turquoise jewelry. Reilly accessorized with Giuseppe Zanotti shoes and Jacquie Aiche's turquoise drop earrings.
Billie Eilish
A new Grammy record-setter, Eilish took to the AMAs red carpet in an authentic Burberry ensemble (unlike the Louis Vuitton knock-off she wore to Coachella). The "Bad Guy" singer sported a Burberry Vintage oversized tee featuring crystal mesh sleeves, along with wide-leg trousers and a matching crystal mesh bonnet with a veil that was almost Handmaid's Tale meets beekeeper.
Shawn Mendes
Mendes dared to experiment beyond a black tux for the ceremony, wearing a deep purple Paul Smith suit with teal lapels. His V-neck showed off his layered boho necklaces.
Camila Cabello
The "Senorita" singer went with a nude color palette in an Oscar de la Renta dress that the fashion house describes as "ethereal eveningwear," featuring tulle embroidered with raffia.
Billy Porter
"I’m giddy about this one," wrote stylist Sam Ratelle on Instagram. Always one to embrace bold fashion choices, Pose star Porter wore a Thom Browne outfit with a Stephen Jones Millinery statement hat and Oscar Heyman ring on Sunday.
Christina Aguilera
Aguilera turned heads with her strong-shouldered regal gown from Jean Paul Gaultier. The fall/winter 2017 couture outfit included an embellished hood, oversized shoulders and white buckled belt.
Alyson Stoner
The dancer and actor dazzled in one of the night's most expensive ensembles — a $2.4 million suit by Malan Breton decked out in Swarovski crystals (it took six months to stitch each gemstone into the silk). Under the spring/summer 2020 suit, which was inspired by the ballet Giselle, Stoner wore a metallic top by stylist Graham Cruz.
Post Malone
Post paired his cowboy hat with a checked suit for an eye-catching look, styled by Catherine Hahn.
Kesha
Kesha was all-out in Versace at the AMAs ahead of the launch of her Kesha Rose Beauty in December.
Dick Clark Productions, which produces the American Music Awards, is a division of Valence Media, which owns The Hollywood Reporter.


Interface Router
Direct known implementers
FileRouter\Router\AbstractImpl
Namespace: FileRouter
License: See LICENSE file for more information
Author: Pierre Klink<EMAIL_ADDRESS>Located at FileRouter/Router.php
License: See LICENSE file for more information
Author: Pierre Klink<EMAIL_ADDRESS>Located at FileRouter/Router.php
public
string
|
|
public
|
|
public
|
|
public
|
#
setFileExtension( string $extension = 'php' )
Set the file extension. Only files with this extension are relevant for routing |
public
|
#
setSourcePath(
Set the source path. Only files in this path are relevant for routing |