The Ashesi Education
Ashesi’s core curriculum consists of courses that help students develop the ethics, innovativeness, critical thinking and communication skills necessary for a lifetime career of leadership. By teaching students to explore the connections between different information, separate the relevant from the irrelevant, question assumptions and analyse alternatives, the liberal core serves as a foundation for success and influencing the world.
Small class sizes
Class sizes at Ashesi are kept small, because we believe the best learning takes place when students are able to have deep conversations with their classmates and professors in and out of the classroom. Our classes are full of energy, and students are encouraged to speak up, share ideas and ask critical questions.
Our professors care deeply about the success of the students in their classrooms. As leading voices in their areas of expertise, students will find that professors bring strong inspiration to Ashesi’s classes.
Bachelor of Science Engineering
Africa needs better-designed infrastructure and new, efficient products tailored for local needs. Ashesi’s Engineering majors – Mechanical, Electrical & Electronic and Computer Engineering - with a focus on design, entrepreneurship and problem solving, aims to empower students to drive the important innovations that Africa needs. The industry-responsive curriculum adapts from the models of some of the world’s best engineering schools to foster systems thinking, real-world learning and design.
Bachelor of Science Computer Science
Ashesi’s Computer Science programme focuses not only on software design and programming, but also on empowering young people to be at the forefront of African growth by harnessing the power of technology. Students in the Computer Science programme are taken through robust foundational courses that prepare them to engage new technologies, and create software tools for African needs.
Bachelor of Science Management Information Systems
The Management Information Systems programme at Ashesi empowers students to improve business efficiency by effectively leveraging the connections between Information Technology and the functions of business and organizational strategy. This interdisciplinary programme trains students to be managers who are uniquely prepared to lead businesses in the new knowledge economy.
Bachelor of Science Business Administration
Ashesi’s business programme depends on the foundation set by the core liberal curriculum, and prepares students to be leaders who can recognise opportunities in the needs of society and build businesses to help solve them. The business programme takes students through global business practices, with a focus on Africa’s dynamic economy. Class projects are done in partnership with local businesses in order to help students learn practical skills through solving real-world problems.


Hello, my name is Lucas Gatsas, I'm a Front End Engineer
and Web Developer from Switzerland. This is my Personal Notice and Archive Work Experience Work Blog. My Official Website will be Up soon! follow me.
I have an old email in appstore and i can’t change it in the user Interface App from Apple the (AppStore). Because i have resolved my Host last year in July 2014. - Now, i need some Xcode Tools for dev my Web Application. I’ve been trying for Hours to Hack my Apple ID. ;)
The OS X package installer automatically installs MacPorts, sets the shell environment, and runs a
selfupdate operation to update the ports tree and MacPorts base with the latest release.
(1.) Download the latest MacPorts-2.3.1-….pkg installer from the MacPorts download directory . Here are direct links for the latest versions of OS X:
(2.) Double-click the downloaded package installer to perform the default “easy” install.
(3.) After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using the port command in a new terminal window.
$ port version
Version: 2.3.1
In case of problems such as “command not found”, make sure that you opened a new terminal window or consult Section 2.5, “MacPorts and the Shell” . Otherwise, please skip the remainder of this chapter and continue with Chapter 3, Using MacPorts in this guide.
2.2.2. Source Install
Install Macports via Terminal
If you installed MacPorts using the package installer, skip this section. To install MacPorts from the source code, follow the steps below.
(1.) Download and extract the MacPorts 2.3.1 tarball. Either do so using your browser and the Finder, or use the given commands in a terminal window.
(2.) Afterwards, perform the commands shown in the terminal window. If you wish to use a path other than /opt/local, follow the instructions for installing multiple copies of MacPorts instead.
"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
to install Emacs 24. The MacPorts installer updates your PATH environment variable, so the MacPorts build of Emacs should be found by your shell before the (outdated) build that comes with Mac OS when you type ‘emacs’. If you prefer the Emacs.app build, that’s available by executing:
$ sudo port install emacs-app
My Screenshot
Update Post soon!
"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
git add -A -> add all unstaged files to the stagin area
git commit -m “Short description of your commit” -> Commit
the files from the staging area to the head of your local branch
git checkout {Branch Name}
to check where you are ->
git status
if you want to push ->
git push origin {Branch Name}
"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."


"""ML-ENSEMBLE
:author: Sebastian Flennerhag
:copyright: 2017
:license: MIT
Collection of dummy estimator classes, Mixins to build transparent layers for
unit testing.
Also contains pre-made Layer, LayerContainers and data generation functions
for unit testing.
"""
from __future__ import division, print_function
import numpy as np
from .exceptions import NotFittedError
from ..externals.sklearn.base import BaseEstimator, TransformerMixin, clone
from ..externals.sklearn.validation import check_X_y, check_array
[docs]class OLS(BaseEstimator):
"""No frills vanilla OLS estimator implemented through the normal equation.
MWE of a Scikit-learn estimator.
OLS is a simple estimator designed to allow for total control over
predictions in unit testing. It implements OLS through the Normal
Equation, no learning takes place. The ``offset`` option allows
the user to offset weights by a scalar value, if different instances
should be differentiated in their predictions.
Parameters
----------
offset : float (default = 0)
scalar value to add to the coefficient vector after fitting.
Examples
--------
Asserting the OLS passes the Scikit-learn estimator test
>>> from sklearn.utils.estimator_checks import check_estimator
>>> from mlens.utils.dummy import OLS
>>> check_estimator(OLS)
OLS comparison with Scikit-learn's LinearRegression
>>> from numpy.testing import assert_array_equal
>>> from mlens.utils.dummy import OLS
>>> from sklearn.linear_model import LinearRegression
>>> from sklearn.datasets import load_boston
>>> X, y = load_boston(True)
>>>
>>> lr = LinearRegression(False)
>>> lr.fit(X, y)
>>>
>>> ols = OLS()
>>> ols.fit(X, y)
>>>
>>> assert_array_equal(lr.coef_, ols.coef_)
"""
def __init__(self, offset=0):
self.offset = offset
[docs] def fit(self, X, y):
"""Fit coefficient vector."""
X, y = check_X_y(X, y, accept_sparse=False)
O = np.linalg.lstsq(X, y)
self.coef_ = O[0] + self.offset
self.resid_ = O[1]
return self
[docs] def predict(self, X):
"""Predict with fitted weights."""
if not hasattr(self, 'coef_'):
raise NotFittedError("Estimator not fitted. Call 'fit' first.")
X = check_array(X, accept_sparse=False)
return np.dot(X, self.coef_.T)
[docs]class LogisticRegression(OLS):
"""No frill Logistic Regressor w. one-vs-rest estimation of P(label).
MWE of a Scikit-learn classifier.
LogisticRegression is a simple classifier estimator designed for
transparency in unit testing. It implements a Logistic
Regression with one-vs-rest strategy of classification.
The estimator is a wrapper around the :class:`OLS`. The OLS
prediction is squashed using the Sigmoid function, and classification
is done by picking the label with the highest probability.
The ``offset`` option allows the user to offset weights in the OLS by a
scalar value, if different instances should be differentiated in their
predictions.
Examples
--------
Asserting the LogisticRegression passes the Scikit-learn estimator test
>>> from sklearn.utils.estimator_checks import check_estimator
>>> from mlens.utils.dummy import LogisticRegression
>>> check_estimator(LogisticRegression)
Comparison with Scikit-learn's LogisticRegression
>>> from mlens.utils.dummy import LogisticRegression as mlensL
>>> from sklearn.linear_model import LogisticRegression as sklearnL
>>> from sklearn.datasets import make_classification
>>> X, y = make_classification()
>>>
>>> slr = sklearnL()
>>> slr.fit(X, y)
>>>
>>> mlr = mlensL()
>>> mlr.fit(X, y)
>>>
>>> (mlr.predict(X) == slr.predict(X)).sum() / y.shape
array([ 0.98])
"""
[docs] def fit(self, X, y):
"""Fit one model per label."""
X, y = check_X_y(X, y, accept_sparse=False)
self.labels_ = np.unique(y)
models = []
for label in self.labels_:
labels = y == label
models.append(OLS().fit(X, labels))
self._models_ = models
self.coef_ = np.vstack([l.coef_ for l in self._models_])
return self
[docs] def predict_proba(self, X):
"""Get probability predictions."""
if not hasattr(self, '_models_'):
raise NotFittedError("Estimator not fitted. Call 'fit' first.")
X = check_array(X, accept_sparse=False)
preds = []
for m in self._models_:
p = 1 / (1 + np.exp(- m.predict(X)))
preds.append(p)
return np.vstack(preds).T
[docs] def predict(self, X):
"""Get label predictions."""
if not hasattr(self, '_models_'):
raise NotFittedError("Estimator not fitted. Call 'fit' first.")
X = check_array(X, accept_sparse=False)
preds = self.predict_proba(X)
labels = np.zeros(X.shape[0])
for i in range(X.shape[0]):
labels[i] = self.labels_[preds[i].argmax()]
return labels
[docs]class Scale(BaseEstimator, TransformerMixin):
"""Removes the a learnt mean in a column-wise manner in an array.
MWE of a Scikit-learn transformer, to be used for unit-tests of ensemble
classes.
Parameters
----------
copy : bool (default = True)
Whether to copy X before transforming.
Examples
--------
Asserting :class:`Scale` passes the Scikit-learn estimator test
>>> from sklearn.utils.estimator_checks import check_estimator
>>> from mlens.utils.dummy import Scale
>>> check_estimator(Scale)
Scaling elements
>>> from numpy import arange
>>> from mlens.utils.dummy import Scale
>>> X = arange(6).reshape(3, 2)
>>> X[:, 1] *= 2
>>> print('X:')
>>> print('%r' % X)
>>> print('Scaled:')
>>> S = Scale().fit_transform(X)
>>> print('%r' % S)
X:
array([[ 0, 2],
[ 2, 6],
[ 4, 10]])
Scaled:
array([[-2., -4.],
[ 0., 0.],
[ 2., 4.]])
"""
def __init__(self, copy=True):
self.copy = copy
self.__is_fitted__ = False
[docs] def fit(self, X, y=None):
"""Estimate mean.
Parameters
----------
X : array-like
training data to fit transformer on.
y : array-like or None
pass through for pipeline.
"""
X = check_array(X, accept_sparse=False)
self.__is_fitted__ = True
self.mean_ = X.mean(axis=0)
return self


Writing Motives
July 19, 2018 | Nick Mazuk
In the last article, we discussed the basic structure of a melody and how a melody is broken up into four motives.
We also learned that you can construct a melody from combining four motives together. So now the question becomes, how do we write a motive?
It’s actually a lot easier than you might think. Essentially, anything can be a motive.
This means that no matter what you write could work as a motive for a strong melody.
“But wait?” you may be thinking. “If anything can be a motive, then why am I having so much trouble writing a melody? Isn’t there such thing as a bad motive or melody?”
And well, yes. You can have a bad motive or melody. However, it’s not about getting quality at the very beginning but rather starting with an idea and then molding it into something great. Composition is a process.
Getting Started
The first step to writing a good motive is to simply write the first thing that comes to your mind. Don’t hesitate. Write it down.
It may not sound like it says anything or has meaning, but that’s okay.
For instance, here’s a motive I first wrote about a year ago:
I wrote it during a brainstorming exercise. I literally had about 25 seconds to come up with the motive. That’s what I mean by not hesitation.
Here’s another motive:
What's the number one rule of brainstorming motives?
Okay, I did cherry pick these motives because they ended up working for me. But I can assure you, I wrote many, many bad motives before coming up with either of these two. That’s okay. It’s part of the process.
Putting Them Together
The essense of building a melody up from here is to simply put the building blocks together. If you brainstormed 10, 20, 30, or even 100 motives, you have more than enough material to work off. Then it’s simply a matter of litterally putting them together.
Now there is more than randomly combining motives. Because afterall, we want clear, coherent, and memorable melodies.
Until next time, you should get some practice writing motives without thinking by getting the free accompanying worksheet below. If you are already a subscriber, the worksheet is in your inbox.


We coordinate with a network of dedicated partners.
Our engagement strategies are vetted by experienced strategists.
Strategic planning anticipates future political trends.
Run by progressives, for progressives.


resolved by https://github.com/pulibrary/princeton_ansible/pull/4147
labeled
by Christina Chortaria at 2023-08-17 15:11:28.closed
by Christina Chortaria at 2023-08-17 15:11:50.referenced
by Jane Sandberg at 2023-08-17 15:08:26.merged
by Jane Sandberg at 2023-08-17 15:08:26.closed
by Jane Sandberg at 2023-08-17 15:08:26.head_ref_deleted
by Jane Sandberg at 2023-08-17 15:08:27.closed
by Jane Sandberg at 2023-08-17 15:08:27.referenced
by None at 2023-08-17 14:59:25.merged
by None at 2023-08-17 14:59:25.closed
by None at 2023-08-17 14:59:25.head_ref_deleted
by None at 2023-08-17 15:00:20.figgy-db-staging1:
table_schema | table_name | rows_n
--------------+----------------------------------------+--------
public | orm_resources | 176540
public | browse_everything_upload_files | 104640
public | upload_files | 8626
public | searches | 5324
public | browse_everything_session_models | 641
public | browse_everything_authorization_models | 332
public | browse_everything_upload_models | 173
public | users | 61
public | roles_users | 41
public | schema_migrations | 35
public | session_models | 32
public | authorization_models | 22
public | auth_tokens | 20
public | upload_models | 12
public | ocr_requests | 8
public | bookmarks | 7
public | roles | 2
public | ar_internal_metadata | 1
public | delayed_jobs | 0
public | active_storage_blobs | 0
public | active_storage_variant_records | 0
public | active_storage_attachments | 0
figgy-db-staging2:
table_schema | table_name | rows_n
--------------+----------------------------------------+--------
public | orm_resources | 176540
public | browse_everything_upload_files | 104640
public | upload_files | 8626
public | searches | 5324
public | browse_everything_session_models | 641
public | browse_everything_authorization_models | 332
public | browse_everything_upload_models | 173
public | users | 61
public | roles_users | 41
public | schema_migrations | 35
public | session_models | 32
public | authorization_models | 22
public | auth_tokens | 20
public | upload_models | 12
public | ocr_requests | 8
public | bookmarks | 7
public | roles | 2
public | ar_internal_metadata | 1
public | delayed_jobs | 0
public | active_storage_blobs | 0
public | active_storage_variant_records | 0
public | active_storage_attachments | 0
lib-postgres3
table_schema | table_name | rows_n
--------------+----------------------------------------+--------
public | orm_resources | 176540
public | browse_everything_upload_files | 104640
public | upload_files | 8626
public | searches | 5324
public | browse_everything_session_models | 641
public | browse_everything_authorization_models | 332
public | browse_everything_upload_models | 173
public | users | 61
public | roles_users | 41
public | schema_migrations | 35
public | session_models | 32
public | authorization_models | 22
public | auth_tokens | 20
public | upload_models | 12
public | ocr_requests | 8
public | bookmarks | 7
public | roles | 2
public | ar_internal_metadata | 1
public | delayed_jobs | 0
public | active_storage_variant_records | 0
public | active_storage_blobs | 0
public | active_storage_attachments | 0
assigned
by Trey Pendragon at 2023-08-17 18:01:34.referenced
by Jane Sandberg at 2023-08-17 21:39:18.merged
by Jane Sandberg at 2023-08-17 21:39:18.closed
by Jane Sandberg at 2023-08-17 21:39:18.head_ref_deleted
by Jane Sandberg at 2023-08-17 21:39:19.closed
by Kevin Reiss at 2023-08-16 22:01:36.Thanks @rladdusaw !
referenced
by Kevin Reiss at 2023-08-16 22:01:35.merged
by Kevin Reiss at 2023-08-16 22:01:35.closed
by Kevin Reiss at 2023-08-16 22:01:35.head_ref_deleted
by Kevin Reiss at 2023-08-16 22:01:36.mentioned
by None at 2023-08-17 00:04:22.subscribed
by None at 2023-08-17 00:04:22.closed
by None at 2023-08-17 00:06:23.closed
by Kevin Reiss at 2023-08-17 15:19:24.referenced
by Jane Sandberg at 2023-08-17 17:24:04.merged
by Jane Sandberg at 2023-08-17 17:24:04.closed
by Jane Sandberg at 2023-08-17 17:24:04.head_ref_deleted
by Jane Sandberg at 2023-08-17 17:24:05.referenced
by Jane Sandberg at 2023-08-17 22:46:44.merged
by Jane Sandberg at 2023-08-17 22:46:44.closed
by Jane Sandberg at 2023-08-17 22:46:44.head_ref_deleted
by Jane Sandberg at 2023-08-17 22:46:44.labeled
by Christina Chortaria at 2023-08-17 12:35:04.assigned
by Christina Chortaria at 2023-08-17 17:47:21.closed
by Jane Sandberg at 2023-08-17 22:46:45.coverage: 95.426% (+0.008%) from 95.418% when pulling cfc5c35d39051d72add30c49787575083f66b42d on i3645-numismatics-builtin-advanced-2 into e606122910ee1914cca41fb624cd7d66c6c6d9e5 on main.
deployed
by None at 2023-08-17 00:05:51.head_ref_force_pushed
by Jane Sandberg at 2023-08-17 00:19:38.ready_for_review
by Jane Sandberg at 2023-08-17 00:20:17.deployed
by None at 2023-08-17 11:45:20.assigned
by None at 2023-08-17 13:46:02.theses are indexed https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=id%3Adsp*
labeled
by Christina Chortaria at 2023-08-17 15:34:27.assigned
by Christina Chortaria at 2023-08-17 15:34:28.mentioned
by None at 2023-08-17 15:34:28.subscribed
by None at 2023-08-17 15:34:28.closed
by Christina Chortaria at 2023-08-17 16:06:11.assigned
by Max Kadel at 2023-08-17 17:55:22.coverage: 95.436% (+0.02%) from 95.418% when pulling a62421f69baa34f1209174f38718f9fdbe378e9a on i3268bannermessage into e606122910ee1914cca41fb624cd7d66c6c6d9e5 on main.
referenced
by Max Kadel at 2023-08-17 19:29:34.merged
by Max Kadel at 2023-08-17 19:29:34.closed
by Max Kadel at 2023-08-17 19:29:34.head_ref_deleted
by Max Kadel at 2023-08-17 19:29:35.referenced
by Max Kadel at 2023-08-17 17:44:13.closed
by Max Kadel at 2023-08-17 19:29:35.referenced
by Max Kadel at 2023-08-17 19:29:37.head_ref_force_pushed
by Kevin Reiss at 2023-08-17 20:45:08.deployed
by None at 2023-08-17 20:46:34.referenced
by None at 2023-08-17 11:35:18.merged
by None at 2023-08-17 11:35:18.closed
by None at 2023-08-17 11:35:18.head_ref_deleted
by None at 2023-08-17 11:35:19.closed
by None at 2023-08-17 11:35:19.referenced
by James R. Griffin III at 2023-08-17 13:44:28.merged
by James R. Griffin III at 2023-08-17 13:44:28.closed
by James R. Griffin III at 2023-08-17 13:44:28.head_ref_deleted
by James R. Griffin III at 2023-08-17 13:44:29.reopened
by James R. Griffin III at 2023-08-17 14:07:36.referenced
by James R. Griffin III at 2023-08-17 15:56:32.merged
by James R. Griffin III at 2023-08-17 15:56:32.closed
by James R. Griffin III at 2023-08-17 15:56:32.head_ref_deleted
by James R. Griffin III at 2023-08-17 15:56:33.head_ref_force_pushed
by None at 2023-08-17 15:58:53.head_ref_force_pushed
by None at 2023-08-17 16:10:05.referenced
by Bess Sadler at 2023-08-17 16:21:22.merged
by Bess Sadler at 2023-08-17 16:21:22.closed
by Bess Sadler at 2023-08-17 16:21:22.head_ref_deleted
by Bess Sadler at 2023-08-17 16:21:23.labeled
by Bess Sadler at 2023-08-17 14:09:31.referenced
by None at 2023-08-17 15:35:21.referenced
by None at 2023-08-17 15:58:52.referenced
by None at 2023-08-17 16:10:04.referenced
by Bess Sadler at 2023-08-17 16:21:24.closed
by Hector Correa at 2023-08-17 17:04:06.head_ref_force_pushed
by None at 2023-08-17 16:55:43.deployed
by None at 2023-08-17 17:02:35.referenced
by Hector Correa at 2023-08-17 17:04:05.merged
by Hector Correa at 2023-08-17 17:04:05.closed
by Hector Correa at 2023-08-17 17:04:05.head_ref_deleted
by Hector Correa at 2023-08-17 17:04:06.renamed
by None at 2023-08-17 14:10:48.With PR #1453 the publisher defaults correctly: * for records migrated via the "Migrate PPPL Dataset" button and * for new submissions created by users with only access to the PPPL group
New submissions for users with access to more than one group will still have "Princeton University" as the default publisher.
assigned
by Hector Correa at 2023-08-17 13:22:46.unassigned
by Hector Correa at 2023-08-17 17:49:10.assigned
by None at 2023-08-17 18:35:15.referenced
by None at 2023-08-17 19:12:13.@jrgriffiniii Heads up... the tests need to be updated...
mentioned
by James R. Griffin III at 2023-08-17 17:42:40.subscribed
by James R. Griffin III at 2023-08-17 17:42:40.review_dismissed
by James R. Griffin III at 2023-08-17 17:54:52.head_ref_force_pushed
by James R. Griffin III at 2023-08-17 17:54:52.head_ref_force_pushed
by James R. Griffin III at 2023-08-17 19:00:50.review_dismissed
by Hector Correa at 2023-08-17 21:17:46.head_ref_force_pushed
by None at 2023-08-17 12:09:18.head_ref_force_pushed
by None at 2023-08-17 12:13:29.head_ref_force_pushed
by None at 2023-08-17 12:27:48.head_ref_force_pushed
by None at 2023-08-17 12:53:29.head_ref_force_pushed
by None at 2023-08-17 13:27:31.head_ref_force_pushed
by None at 2023-08-17 13:30:46.head_ref_force_pushed
by None at 2023-08-17 13:37:39.head_ref_force_pushed
by None at 2023-08-17 13:45:48.ready_for_review
by None at 2023-08-17 14:12:24.referenced
by James R. Griffin III at 2023-08-17 14:21:30.merged
by James R. Griffin III at 2023-08-17 14:21:30.closed
by James R. Griffin III at 2023-08-17 14:21:30.head_ref_deleted
by James R. Griffin III at 2023-08-17 14:21:31.closed
by Hector Correa at 2023-08-17 14:45:35.Even with a git rebase
this still seems to be failing, I will need to attempt to diagnose this with some additional commits. I apologize:
@jrgriffiniii I think that if we merge @carolyncole PR with the new Selenium and then rebase yours then it will work.
mentioned
by James R. Griffin III at 2023-08-17 14:21:41.subscribed
by James R. Griffin III at 2023-08-17 14:21:41.mentioned
by None at 2023-08-17 14:21:41.subscribed
by None at 2023-08-17 14:21:41.head_ref_force_pushed
by James R. Griffin III at 2023-08-17 14:21:57.head_ref_force_pushed
by James R. Griffin III at 2023-08-17 14:35:28.referenced
by Hector Correa at 2023-08-17 14:45:34.merged
by Hector Correa at 2023-08-17 14:45:34.closed
by Hector Correa at 2023-08-17 14:45:34.head_ref_deleted
by Hector Correa at 2023-08-17 14:45:35.head_ref_restored
by James R. Griffin III at 2023-08-17 15:22:09.referenced
by Bess Sadler at 2023-08-17 18:09:16.merged
by Bess Sadler at 2023-08-17 18:09:16.closed
by Bess Sadler at 2023-08-17 18:09:16.head_ref_deleted
by Bess Sadler at 2023-08-17 18:09:16.referenced
by Bess Sadler at 2023-08-17 18:17:47.merged
by Bess Sadler at 2023-08-17 18:17:47.closed
by Bess Sadler at 2023-08-17 18:17:48.head_ref_deleted
by Bess Sadler at 2023-08-17 18:17:48.closed
by Bess Sadler at 2023-08-17 18:17:49.referenced
by Hector Correa at 2023-08-17 18:33:10.merged
by Hector Correa at 2023-08-17 18:33:10.closed
by Hector Correa at 2023-08-17 18:33:10.head_ref_deleted
by Hector Correa at 2023-08-17 18:33:11.This is done!
closed
by Bess Sadler at 2023-08-17 18:49:54.referenced
by Hector Correa at 2023-08-17 20:39:49.merged
by Hector Correa at 2023-08-17 20:39:49.closed
by Hector Correa at 2023-08-17 20:39:49.head_ref_deleted
by Hector Correa at 2023-08-17 20:39:50.I reindexed locally using production as the source data from DataSpace and PDC Describe and got all 17 PDC Describe records. I tried several combinations (clear the Solr and reindex, don't clear Solr and reindex) and in every case I got all 17 PDC Describe records.
I re-ran the reindex in production and all 17 records came through, but I did see 15 before I reindex!
$ cd /opt/pdc_discovery/current
$ bundle exec rake index:research_data
¯_(ツ)_/¯
@hectorcorrea I don't know why this would be the case, but indeed when I run rake index:research_data
I get all of the PDC Describe records, but when I only run rake index:pdc_describe_research_data
I don't.
I'm going to update the reindex accordingly so we'll see new PDC records faster.
@bess we might be running into the same problem we had before in which one of the replicas was getting the data but not the other. The fast reindex rake index:pdc_describe_research_data
does not blow away the Solr collection but the slow one rake index:research_data
does.
So maybe my "great" idea of using the fast one on the every 30 minutes cronjob is not that great after all 🙃
labeled
by Bess Sadler at 2023-08-17 18:53:43.assigned
by Hector Correa at 2023-08-17 19:01:26.unassigned
by Hector Correa at 2023-08-17 19:21:24.mentioned
by Hector Correa at 2023-08-17 19:54:39.subscribed
by Hector Correa at 2023-08-17 19:54:39.mentioned
by Bess Sadler at 2023-08-17 20:01:05.subscribed
by Bess Sadler at 2023-08-17 20:01:05.assigned
by Bess Sadler at 2023-08-17 20:09:50.closed
by Hector Correa at 2023-08-17 20:39:51.renamed
by None at 2023-08-17 14:10:05.labeled
by Kevin Reiss at 2023-08-17 16:57:46.labeled
by Kevin Reiss at 2023-08-17 20:18:12.CI's failing but just because the dust
package is upset about people downloading it too much.
head_ref_force_pushed
by Trey Pendragon at 2023-08-17 17:14:32.referenced
by Jane Sandberg at 2023-08-17 22:36:04.merged
by Jane Sandberg at 2023-08-17 22:36:05.closed
by Jane Sandberg at 2023-08-17 22:36:05.head_ref_deleted
by Jane Sandberg at 2023-08-17 22:36:05.referenced
by Christina Chortaria at 2023-08-17 22:22:23.closed
by Jane Sandberg at 2023-08-17 22:36:06.referenced
by Jane Sandberg at 2023-08-17 22:36:07.head_ref_force_pushed
by Christina Chortaria at 2023-08-17 17:27:53.


Typeface /
First Release /
June 2014
by Wei Huang
Latest Release /
June 2016
by Wei Huang
60pt/72pt
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
Char Sets
Languages supported directly by this charset:
Languages supported by inheritance:
Charsets included by this charset:
Paragraph
45pt / 48pt
As I went on, still gaining velocity, the
palpitation of night and day merged
into one continuous greyness;
the sky took on a wonderful deepness of blue,
a splendid luminous color like that of
early twilight;
the jerking sun became
a streak of fire, a brilliant arch, in
space; the moon a fainter fluctuating band;
24pt / 32pt
As I went on, still gaining velocity, the
palpitation of night and day merged
into one continuous greyness;
the sky took on a wonderful deepness of blue,
a splendid luminous color like that of
early twilight;
the jerking sun became
a streak of fire, a brilliant arch, in
space; the moon a fainter fluctuating band;
, 14pt / 24pt
As I went on, still gaining velocity, the
palpitation of night and day merged
into one continuous greyness; the sky
took on a wonderful deepness of blue,
a splendid luminous color like that of
early twilight; the jerking sun became
a streak of fire, a brilliant arch, in
space; the moon a fainter fluctuating band;


{{ partial "metaprice.html" . }} {{ partial "payment/paymentstyles.html" }} {{ partial "common/favicon.html" }}


Blazers sign Anthony to non-guaranteed deal
Carmelo Anthony, the 19th-leading scorer in NBA history, is set for another shot at increasing his point total.
The 35-year-old forward agreed to a non-guaranteed contract with the slumping Portland Trail Blazers, ESPN’s Adrian Wojnarowski reported Thursday night.
Anthony has been out of the NBA since playing 10 games for the Houston Rockets early in the 2018-19 season. He last played on Nov. 8, 2018, when he shot 1-for-11 from the floor and scored two points in Houston’s 98-80 loss at Oklahoma City.
The Rockets then kept him inactive until trading him to the Chicago Bulls on Jan. 22 in a deal that involved cash and the swap of two European players. The Bulls waived Anthony on Feb. 1.
A 10-time All-Star, Anthony was the NBA’s scoring champion in 2012-13 when he averaged 28.7 points for the New York Knicks.
Made the third overall pick in the 2003 draft by the Nuggets, Anthony spent 7 1/2 seasons in Denver. He was deal to the Knicks in a February 2011 three-team trade that also involved the Minnesota Timberwolves.
After 6 1/2 seasons in New York, Anthony played with the Oklahoma City Thunder in 2017-18 before his brief stint with the Rockets.
All of his 1,056 career games before last season were starts, but Houston brought him off the bench in eight of his 10 appearances.
Anthony has 25,551 career points, a figure that trails only LeBron James’ 32,806 among active players. His career average of 24.01 points per game also sits 19th in NBA history. Only James (27.13), Kevin Durant (27.02) and James Harden (24.55) have better career scoring averages among active players.
The Trail Blazers (4-8) are coming off a 114-106 home loss to the Toronto Raptors on Wednesday, their sixth defeat in seven games.
Portland is averaging 112.2 points per game, which ranked 12th in the NBA through Wednesday. However, the Blazers’ field-goal percentage, .441, rated just 23rd in the league.
The Blazers’ next game is Saturday at San Antonio, the start of a six-game road trip.
Anthony played one season of college ball, leading Syracuse to the 2003 national title, and he was part of three gold-medal-winning squads with the United States team.
—Field Level Media


The Halloween Store
For the little Goblin in all of us!
Home
Product List
Personal
Decorating Ideas
Join Email
Some of my favorite decorating ideas
Decked Out Fireplace


Pat's Famous Salmon Cookies
About Salmon Cookies
Salmon cookies combine two signature Seattle icons: Salmon and Coffee-time Confections.
Not only are these cookies shaped like the fish, but salmon is also a main ingredient. Don't worry - these cookies don't taste fishy. In fact, they are an ideal match for a steaming cup of coffee on a gray Seattle morning. Or gray Seattle afternoon... whatever.
Our salmon cookies are for tourists and locals alike! Try them at one of our five locations today!


BlowfishInternal Members
The BlowfishInternal type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| BlowfishInternal(String) |
Constructor for hex key
|
|
| BlowfishInternal(array<Byte>[]()[][]) |
Constructor for byte key
|
Methods
| Name | Description | |
|---|---|---|
| BlockDecrypt |
Decrypts a 64 bit block
|
|
| BlockEncrypt |
Encrypts a 64 bit block
|
|
| ByteToHex | ||
| Crypt_CBC |
Encrypts or decrypts data in CBC mode
|
|
| Crypt_CTR | ||
| Crypt_ECB |
Encrypts or decrypts data in ECB mode
|
|
| decipher |
Runs the blowfish algorithm in reverse (standard 16 rounds)
|
|
| Decrypt_CBC(String) |
Decrypts a string in CBC mode
|
|
| Decrypt_CBC(array<Byte>[]()[][]) |
Decrypts a byte array in CBC mode.
IV must be created and saved manually.
|
|
| Decrypt_CTR |
Decrypt a string (CTR)
|
|
| Decrypt_ECB(String) |
Decrypts a string (ECB)
|
|
| Decrypt_ECB(array<Byte>[]()[][]) |
Decrypts a byte array (ECB)
|
|
| encipher |
Runs the blowfish algorithm (standard 16 rounds)
|
|
| Encrypt_CBC(String) |
Encrypts a string in CBC mode
|
|
| Encrypt_CBC(array<Byte>[]()[][]) |
Encrypts a byte array in CBC mode.
IV must be created and saved manually.
|
|
| Encrypt_CTR |
Encrypts a string (CTR)
|
|
| Encrypt_ECB(String) |
Encrypt a string in ECB mode
|
|
| Encrypt_ECB(array<Byte>[]()[][]) |
Encrypts a byte array in ECB mode
|
|
| Equals(System.Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object.) |
|
| Finalize |
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
| GetBlock |
Converts the two uint values into a 64 bit block
|
|
| GetHashCode |
Serves as the default hash function. (Inherited from Object.) |
|
| GetHex | ||
| GetType |
Gets the Type of the current instance. (Inherited from Object.) |
|
| HexToByte | ||
| MemberwiseClone |
Creates a shallow copy of the current Object. (Inherited from Object.) |
|
| round |
one round of the blowfish algorithm
|
|
| SetBlock |
Splits the block into the two uint values
|
|
| SetRandomIV |
Creates and sets a random initialization vector.
|
|
| SetupKey |
Sets up the S-blocks and the key
|
|
| SetupP | ||
| SetupS0 | ||
| SetupS1 | ||
| SetupS2 | ||
| SetupS3 | ||
| ToString |
Returns a string that represents the current object. (Inherited from Object.) |
|
| TransformBlock | ||
| TransformFinalBlock | ||
| wordByte0 | ||
| wordByte1 | ||
| wordByte2 | ||
| wordByte3 | ||
| XorBlock |
XoR encrypts two 8 bit blocks
|
Fields
| Name | Description | |
|---|---|---|
| bf_P | ||
| bf_s0 | ||
| bf_s1 | ||
| bf_s2 | ||
| bf_s3 | ||
| InitVector | ||
| IVSet | ||
| key | ||
| nonStandardMethod | ||
| randomSource | ||
| ROUNDS | ||
| xl_par | ||
| xr_par |
Properties
| Name | Description | |
|---|---|---|
| CanReuseTransform | ||
| CanTransformMultipleBlocks | ||
| InputBlockSize | ||
| IV |
Initialization vector for CBC mode.
|
|
| NonStandard | ||
| OutputBlockSize |


Projects
Currently the only project I have to show off is my basic Ruby application. It's a multiple choice quiz where answering questions can help (or hinder) you take down a monster!
Currently the only project I have to show off is my basic Ruby application. It's a multiple choice quiz where answering questions can help (or hinder) you take down a monster!


Step this way, please! Your job is to manage the
Rift Post
.
I hope you're up to the it! It won't be easy!


{% extends "base.html" %} {% block title %}All Projects{% endblock %} {% block content %}
No Projects found in database. Create your first Project now.


Environments¶
The list of available environments is the following:
Env. name |
Location |
IDF file |
Weather type (*) |
Action space |
Simulation period |
|---|---|---|---|---|---|
Eplus-demo-v1 |
Pittsburgh, USA |
5ZoneAutoDXVAV.idf |
- |
Discrete(10) |
01/01 - 31/03 |
Eplus-discrete-hot-v1 |
Arizona, USA |
5ZoneAutoDXVAV.idf |
Hot dry (2B) |
Discrete(10) |
01/01 - 31/12 |
Eplus-discrete-mixed-v1 |
New York, USA |
5ZoneAutoDXVAV.idf |
Mixed humid (4A) |
Discrete(10) |
01/01 - 31/12 |
Eplus-discrete-cool-v1 |
Washington, USA |
5ZoneAutoDXVAV.idf |
Cool marine (5C) |
Discrete(10) |
01/01 - 31/12 |
Eplus-continuous-hot-v1 |
Arizona, USA |
5ZoneAutoDXVAV.idf |
Hot dry (2B) |
Box(2) |
01/01 - 31/12 |
Eplus-continuous-mixed-v1 |
New York, USA |
5ZoneAutoDXVAV.idf |
Mixed humid (4A) |
Box(2) |
01/01 - 31/12 |
Eplus-continuous-cool-v1 |
Washington, USA |
5ZoneAutoDXVAV.idf |
Cool marine (5C) |
Box(2) |
01/01 - 31/12 |
Eplus-discrete-stochastic-cool-v1 |
Washington, USA |
5ZoneAutoDXVAV.idf |
Cool marine (5C) (**) |
Discrete(10) |
01/01 - 31/12 |
Eplus-continuous-stochastic-hot-v1 |
Arizona, USA |
5ZoneAutoDXVAV.idf |
Hot dry (2B) (**) |
Box(2) |
01/01 - 31/12 |
(*) Weather types according to DOE’s classification.
(**) In these environments, weather series change from episode to episode. Gaussian noise with 0 mean and 2.5 std is added to the original values in order to add stochasticity.


A solid circular shaft of
25 mm
diameter transmits
15 kilowatt
at
3000 rpm
.
What is the maximum shear stress in the shaft?
[ mechSolverCommon.globalSolutionBoxes ]
var answer = mechSolverCommon.checkAnswer();
if (!guess[0] && !answer) {
return ""; // User did not click, and correct answer is not
// initial array state
} else {
return answer;
}


Below is an amp-iframe with a responsive layout. It has an amp-image that also uses a responsive layout and should maintain its aspect ratio.


Ketchup is a slim jQuery Plugin that validates your forms. It aims to be very flexible and extendable for its appearance and functionality.
Don't like the default styling? Change it! Need another mark up? Edit it! No validation fits your needs? Write your own! Make your own ketchup with ease.
Although Ketchup is designed to be styled and extended by you it already looks tasty and gives you the most common validations by default. Lets check that out.
First we need to set everything up to use Ketchup. Nothing easier than that. Include jQuery and the Ketchup stylesheet and scripts in your header:
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery.ketchup.css" />

If you do plan to only use basic validations and the default messages you also can include the one package file instead of the three Ketchup script files:
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery.ketchup.css" />

Next we obviously need a form to validate. This is our first basic example form:
<form action="index.html" id="example1">

Username
<input type="text" id="ex1_username" />

Password
<input type="password" id="ex1_password" />

Password Confirmation
<input type="password" id="ex1_password_conf" />

Speciality

<input type="checkbox" name="role" value="jquery" /> jQuery

<input type="checkbox" name="role" value="js" /> JavaScript

<input type="checkbox" name="role" value="rails" /> Rails

<input type="checkbox" name="role" value="php" /> PHP

<input type="checkbox" name="role" value="wp" /> Wordpress

<input type="checkbox" name="role" value="other" /> Other

About you
<textarea id="ex1_about" rows="1"></textarea>

<input type="submit" value="(Try to) Submit" />

</form>
By default Ketchup is looking in the class
attribute of input
, textarea
and select
for validate()
functions.  We need to activate the Ketchup Plugin with the default settings on the form:
$(document).ready(function() {
$('#example1').ketchup();
});
Ketchup comes with these pre-written basic validations (See them in the file jquery.ketchup.validations.basic.js
and the corresponding messages in jquery.ketchup.messages.js
):
Makes the field required.
The value must have a minimal length of min
.
The value must have a maximal length of max
.
The value must have a length between min
and max
.
The number must be at least min
.
The number must be not greater than max
.
The number must be between min
and max
.
The value must be a number.
The value must be digits.
The value must be a valid e-mail address.
The value must be a valid URL.
The value must be a valid username (a-z0-9_-).
The value must match the value of the field that can be found via the selector
.
The value must be a valid date.
There must be at least min
checkboxes selected with the same name
. Apply this validation only to one checkbox in the group.
No more than max
selected checkboxes allowed with the same name
. Apply this validation only to one checkbox in the group.
Allow between min
and max
selected checkboxes. Apply this validation only to one checkbox in the group.
You can combine validations by comma like this:
<input type="text" class="validate(required, username, rangelength(3,20))" />


VEHICLE TRACKING AND FLEET MANAGMENT SYSTEM
Customer Logo
Live
Vehicle Information
Vehicle View
Vehicle Map View
Vehicle information
Vehicle I/O List
Reports
Settings
Driver Scheduling
Vehicle Service
Geofency
Fuel
Location Entry
Route
Route Scheduling
Configuration
Vehicle Master
Driver Details
Vehicle Groups
Alert
User
No Movement
School
Student Entry
Welcome to Test
Log out
Fuel
Select By Vehicle no :
Bill No :
Date of felling
Search
Vehicle No
Driver Name
Date
Time
Location
Station Name
Fuel/Litres
Amount
Bill No
Copyright
Neha Software Technologies © 2016


Copyright (c) 2018 Jonathan Bryan Schmalhofer This project is licensed under the MIT License. See the license file for details. The source code is available on GitHub.


HOME
ABOUT US
FOOD MENU
CONTACT US
FAQ
FREQUENTLY ASKED QUESTION
FAQ
Question No 01:
Answer;
Question No 2:
Answer;
Question No 03:
Answer;


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 113488general/54421Doesanapplicativedependonpure.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/113488-general/topic/Does.20an.20applicative.20depend.20on.20pure.3F.html


Example Form
Inline Form
Unboxed Form
Example Form
Horizontal Form
Inline Form
Inline Forms Under The Heading
Title Page Here
Example content
Title Page Here
Example alert.
Example content
General Elements Form
Form controls
Sizing
Readonly
Help text
Your password must be 8-20 characters.


System Architect Symbol details for "Access Type"
Access Group For Information (Class)
- Description:
Access allowed for a particular "Access Group" to a "Subject".
- Comment:
The "Subject" to which access is allowed is normally one holding information. Others are not
prohibited but would be meaningless in this context.
Access Group For Object (Class)
- Description:
Describes the access an "Agent Access Group" has to an "Object".
- Examples:
For example, if a patient says to a GP, "Don't tell anyone about this but another doctor in the
practice".
Access Type (Class)
- Description:
"Level" specifying the extents to which access to information may be granted.
- Examples:
-
Examples which may be considered include:
Read only
Copy
Forward to others
Absolute.
Each level would be deemed to include all lower levels.
Certainty Level (Class)
- Description:
"Level" being an extent to which confidence can be ascribed to the value or existence of a "Subject
Property" or a qualifier.
Desirability Level (Class)
- Description:
"Level" providing a value for an "Evaluated Desirability".
Level (Class)
- Description:
"Descriptive Category" used to describe the level to which something obtains.
Level/Direction (Generalization Node)
- Base Class:
Level
- Definitions Used:
-
Level (Class)
maximum access (Association)
- From Class:
"Access Type"
- To Class:
"Access Group For Object"
- From Class:
"Access Type"
- To Class:
"Access Group For Object"
maximum access (Association)
- From Class:
"Access Type"
- To Class:
"Access Group For Information"
- From Class:
"Access Type"
- To Class:
"Access Group For Information"
Normality Level (Class)
- Description:
"Level" providing a value for a "Normality of Property".
Significance Level (Class)
- Description:
"Level" providing a value for a "Significance Of Property".
Urgency (Class)
- Description:
"Level" capable of specifying a perceived requirement for speed.


Data Modeling
Linear Regression
Lasso Regression
“All models are wrong, but some are useful. Now it would be very remarkable if any system existing in the real world could be exactly represented by any simple model. However, cunningly chosen parsimonious models often do provide remarkably useful approximations (…). For such a model there is no need to ask the question”Is the model true?“. If”truth" is to be the “whole truth” the answer must be “No”. The only question of interest is “Is the model illuminating and useful?” – George E.P. Box, 1976
The goal of a model is to provide a simple low-dimensional summary of a dataset.
Models can be used to partition data into patterns of interest and residuals (other sources of variation and random noise).
Usually models are used for inference or confirmation of a pre-specified hypothesis.
Doing inference correctly is hard. The key idea you must understand is that: Each observation can either be used for exploration or confirmation, NOT both.
Observation can be used many times for exploration, but only once for confirmation.
There is nothing wrong with exploration, but you should never sell an exploratory analysis as a confirmatory analysis because it is fundamentally misleading.
If you plan to do confirmatory analysis at some point after EDA, one approach is to split your data into three pieces before you begin the analysis:
Training set – the bulk (e.g. 60%) of the dataset which can be used to do anything: visualizing, fitting multiple models.
Validation set – a smaller set (e.g. 20%) used for manually comparing models and visualizations.
Test set – a set (e.g. 20%) held back used only ONCE to test and asses your final model.
Partitioning the dataset allows you to explore the training data, generate a number of candidate hypotheses and models.
You can select a final model based on its performance on the validation set.
Finally, when you are confident with the chosen model you can check how good it is using the test data.
Note that even when doing confirmatory modeling, you will still need to do EDA. If you don’t do any EDA you might remain blind to some quality problems with your data.
There are two parts to data modeling:
A fitted model is just the best model from a chosen family of models, i.e. the “best” according to some set criteria.
This does not necessarily imply that the model is a good and certainly does NOT imply that the model is true.
modelr
packageThe modelr
package, provides a few useful functions that are wrappers around base R’s modeling functions.
These functions facilitate the data analysis process as they are nicely integrated with the tidyverse
pipeline.
modelr
is not automatically loaded when you load in tidyverse
package, you need to do it separately:
library(modelr)
We will work with a simulated dataset sim1
from modelr
:
sim1
## # A tibble: 30 x 2
## x y
## <int> <dbl>
## 1 1 4.20
## 2 1 7.51
## 3 1 2.13
## 4 2 8.99
## 5 2 10.2
## 6 2 11.3
## 7 3 7.36
## 8 3 10.5
## 9 3 10.5
## 10 4 12.4
## # ... with 20 more rows
ggplot(sim1, aes(x, y)) + geom_point()
The relationship between \(x\) and \(y\) for the points in sim1
look linear. So, will look for models which belong to a family of models of the following form:
\[y= \beta_0 + \beta_1 \cdot x\]
The models that can be expressed by the above formula, can adequately capture a linear trend.
We generate a few examples of the models from this family on the right.
models <- tibble(
b0 = runif(250, -20, 40),
b1 = runif(250, -5, 5))
ggplot(sim1, aes(x, y)) +
geom_abline(
data = models,
aes(intercept = b0, slope = b1),
alpha = 1/4) +
geom_point()
From all the lines in the linear family of models, we need to find the best one, i.e. the one that is the closest to the data.
This means that we need to find parameters \(\hat a_0\) and \(\hat a_1\) that identify such a fitted line.
The closest to the data can be defined as the one with the minimum distance to the data points in the \(y\) direction (the minimum residuals):
\[\begin{align*} \|\hat e\|^2_2 &= \|\vec y - \hat y\|_2^2\\ &= \|\vec y - (\hat \beta_0 + \hat \beta_1 x)\|_2^2\\ &= \sum_{i = 1}^n (y_i - (\hat \beta_0 + \hat \beta_1 x_i))^2 \end{align*}\]Linear regression seeks a solution \(\hat y = \hat \beta \cdot \vec x\) that minimizes the difference between the true outcome \(y\) and the prediction \(\hat y\), in terms of the residual sum of squares (RSS).
\[ arg \min\limits_{\hat \beta} \sum_i \left(y_i - \boldsymbol{\hat \beta}^T \boldsymbol{x}_i\right)^2 \]
Predict the mileage per gallon using the weight of the car.
In R the linear models can be fit with a lm()
function.
# convert 'data.frame' to 'tibble':
mtcars <- tbl_df(mtcars)
# Separate the data into train and test:
set.seed(123)
n <- nrow(mtcars)
idx <- sample(1:n, size = floor(n/2))
mtcars_train <- mtcars[idx, ]
mtcars_test <- mtcars[-idx, ]
# Fit a simple linear model:
mtcars_fit <- lm(mpg ~ wt, mtcars_train)
# Extract the fitted model coefficients:
coef(mtcars_fit)
## (Intercept) wt
## 36.469815 -5.406813
# check the details on the fitted model:
summary(mtcars_fit)
##
## Call:
## lm(formula = mpg ~ wt, data = mtcars_train)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5302 -1.9952 0.0179 1.3017 3.5194
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 36.470 2.108 17.299 7.61e-11 ***
## wt -5.407 0.621 -8.707 5.04e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.2 on 14 degrees of freedom
## Multiple R-squared: 0.8441, Adjusted R-squared: 0.833
## F-statistic: 75.81 on 1 and 14 DF, p-value: 5.043e-07
We can compute the fitted values \(\hat y\), a.k.a. the predicted mpg
values for existing observations using modelr::add_predictions()
function.
mtcars_train <- mtcars_train %>% add_predictions(mtcars_fit)
mtcars_train
## # A tibble: 16 x 12
## mpg cyl disp hp drat wt qsec vs am gear carb pred
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 17.9
## 2 19.2 8 400 175 3.08 3.84 17.0 0 0 3 2 15.7
## 3 17.3 8 276. 180 3.07 3.73 17.6 0 0 3 3 16.3
## 4 27.3 4 79 66 4.08 1.94 18.9 1 1 4 1 26.0
## 5 26 4 120. 91 4.43 2.14 16.7 0 1 5 2 24.9
## 6 21 6 160 110 3.9 2.88 17.0 0 1 4 4 20.9
## 7 15.2 8 276. 180 3.07 3.78 18 0 0 3 3 16.0
## 8 15.2 8 304 150 3.15 3.44 17.3 0 0 3 2 17.9
## 9 15.8 8 351 264 4.22 3.17 14.5 0 1 5 4 19.3
## 10 17.8 6 168. 123 3.92 3.44 18.9 1 0 4 4 17.9
## 11 15.5 8 318 150 2.76 3.52 16.9 0 0 3 2 17.4
## 12 21.4 4 121 109 4.11 2.78 18.6 1 1 4 2 21.4
## 13 13.3 8 350 245 3.73 3.84 15.4 0 0 3 4 15.7
## 14 15 8 301 335 3.54 3.57 14.6 0 1 5 8 17.2
## 15 30.4 4 95.1 113 3.77 1.51 16.9 1 1 5 2 28.3
## 16 10.4 8 460 215 3 5.42 17.8 0 0 3 4 7.14
To predict the mpg
for new observations, e.g. cars not in the dataset, we first need to generate a data table with predictors \(x\), in this case the car weights:
newcars <- tibble(wt = c(2, 2.1, 3.14, 4.1, 4.3))
newcars <- newcars %>% add_predictions(mtcars_fit)
newcars
## # A tibble: 5 x 2
## wt pred
## <dbl> <dbl>
## 1 2 25.7
## 2 2.1 25.1
## 3 3.14 19.5
## 4 4.1 14.3
## 5 4.3 13.2
Remember that we already set aside a test set check our model:
mtcars_test <- mtcars_test %>% add_predictions(mtcars_fit)
head(mtcars_test, 3)
## # A tibble: 3 x 12
## mpg cyl disp hp drat wt qsec vs am gear carb pred
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 22.3
## 2 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 23.9
## 3 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 19.1
Compute the root mean square error:
\[ RMSE = \frac{1}{\sqrt{n}}\|\vec{y} - \vec{\hat y}\| = \sqrt{\frac{1}{n}\sum_{i = 1}^n(y_i - \hat y_i)^2} \]
sqrt(mean((mtcars_test$mpg - mtcars_test$pred)^2))
## [1] 3.902534
Now we can compare our predictions (grey) to the observed (black) values.
ggplot(mtcars_train, aes(wt)) + geom_point(aes(y = mpg)) +
geom_line(aes(y = pred), color = "red", size = 1) +
geom_point(aes(y = pred), fill = "grey", color = "black", shape = 21, size = 2)
The residuals tell you what the model has missed. We can compute and add residuals to data with add_residuals()
from modelr
package:
Plotting residuals is a good practice – you want the residuals to look like random noise.
mtcars_train <- mtcars_train %>%
add_residuals(mtcars_fit)
mtcars_train %>%
select(mpg, mpg, resid, pred)
## # A tibble: 16 x 3
## mpg resid pred
## <dbl> <dbl> <dbl>
## 1 19.2 1.33 17.9
## 2 19.2 3.52 15.7
## 3 17.3 0.998 16.3
## 4 27.3 1.29 26.0
## 5 26 1.10 24.9
## 6 21 0.0748 20.9
## 7 15.2 -0.832 16.0
## 8 15.2 -2.70 17.9
## 9 15.8 -3.53 19.3
## 10 17.8 -0.0704 17.9
## 11 15.5 -1.94 17.4
## 12 21.4 -0.0389 21.4
## 13 13.3 -2.41 15.7
## 14 15 -2.17 17.2
## 15 30.4 2.11 28.3
## 16 10.4 3.26 7.14
ggplot(mtcars_train, aes(wt, resid)) +
geom_ref_line(h = 0, colour = "grey") +
geom_point()
You have seen that lm()
takes in a formula relation y ~ x
as an argument.
You can take a look at what R actually does, you can use the model_matrix()
.
sim1
## # A tibble: 30 x 3
## x y pred
## <int> <dbl> <dbl>
## 1 1 4.20 6.27
## 2 1 7.51 6.27
## 3 1 2.13 6.27
## 4 2 8.99 8.32
## 5 2 10.2 8.32
## 6 2 11.3 8.32
## 7 3 7.36 10.4
## 8 3 10.5 10.4
## 9 3 10.5 10.4
## 10 4 12.4 12.4
## # ... with 20 more rows
model_matrix(sim1, y ~ x)
## # A tibble: 30 x 2
## `(Intercept)` x
## <dbl> <dbl>
## 1 1 1
## 2 1 1
## 3 1 1
## 4 1 2
## 5 1 2
## 6 1 2
## 7 1 3
## 8 1 3
## 9 1 3
## 10 1 4
## # ... with 20 more rows
It doesn’t make sense to parametrize the model with categorical variables, as we did before.
trans
variable is not a number, so R creates an indicator column that is 1 if “male”, and 0 if “female”.
(df <- tibble(
sex = c("male", "female", "female",
"female", "male", "male"),
response = c(2, 5, 1, 3, 6, 8)
))
## # A tibble: 6 x 2
## sex response
## <chr> <dbl>
## 1 male 2
## 2 female 5
## 3 female 1
## 4 female 3
## 5 male 6
## 6 male 8
model_matrix(df, response ~ sex)
## # A tibble: 6 x 2
## `(Intercept)` sexmale
## <dbl> <dbl>
## 1 1 1
## 2 1 0
## 3 1 0
## 4 1 0
## 5 1 1
## 6 1 1
(df <- tibble(
rating = c("good", "bad", "average", "bad",
"average", "good", "bad", "good"),
score = c(2, 5, 1, 3, 6, 8, 10, 6)
))
## # A tibble: 8 x 2
## rating score
## <chr> <dbl>
## 1 good 2
## 2 bad 5
## 3 average 1
## 4 bad 3
## 5 average 6
## 6 good 8
## 7 bad 10
## 8 good 6
model_matrix(df, score ~ rating)
## # A tibble: 8 x 3
## `(Intercept)` ratingbad ratinggood
## <dbl> <dbl> <dbl>
## 1 1 0 1
## 2 1 1 0
## 3 1 0 0
## 4 1 1 0
## 5 1 0 0
## 6 1 0 1
## 7 1 1 0
## 8 1 0 1
But you don’t need to worry about the parametrization to make predictions.
Models often include multiple predictors, e.g. we might like to predict mpg
using three variables: wt
, disp
and cyl
.
ggplot(mtcars, aes(x=wt, y=mpg, col=cyl, size=disp)) +
geom_point() +
scale_color_viridis_c()
mtcars_mult_fit <- lm(mpg ~ wt + disp + cyl, data = mtcars_train)
# Summarize the results
summary(mtcars_mult_fit)
##
## Call:
## lm(formula = mpg ~ wt + disp + cyl, data = mtcars_train)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4016 -0.9539 0.0017 0.6243 3.4510
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 40.259994 2.692593 14.952 4.03e-09 ***
## wt -3.986230 0.984659 -4.048 0.00162 **
## disp 0.009933 0.010756 0.924 0.37394
## cyl -1.644638 0.629635 -2.612 0.02272 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.818 on 12 degrees of freedom
## Multiple R-squared: 0.9088, Adjusted R-squared: 0.886
## F-statistic: 39.88 on 3 and 12 DF, p-value: 1.616e-06
To predict mpg
for new cars, you must first create a data frame describing the attributes of the new cars, before computing predicted mpg
values.
newcars <- expand.grid(
wt = c(2.1, 3.6, 5.1),
disp = c(150, 250),
cyl = c(4, 6)
)
newcars
## wt disp cyl
## 1 2.1 150 4
## 2 3.6 150 4
## 3 5.1 150 4
## 4 2.1 250 4
## 5 3.6 250 4
## 6 5.1 250 4
## 7 2.1 150 6
## 8 3.6 150 6
## 9 5.1 150 6
## 10 2.1 250 6
## 11 3.6 250 6
## 12 5.1 250 6
newcars <- newcars %>%
add_predictions(mtcars_mult_fit)
newcars
## wt disp cyl pred
## 1 2.1 150 4 26.80031
## 2 3.6 150 4 20.82097
## 3 5.1 150 4 14.84162
## 4 2.1 250 4 27.79361
## 5 3.6 250 4 21.81427
## 6 5.1 250 4 15.83492
## 7 2.1 150 6 23.51104
## 8 3.6 150 6 17.53169
## 9 5.1 150 6 11.55235
## 10 2.1 250 6 24.50434
## 11 3.6 250 6 18.52499
## 12 5.1 250 6 12.54565
mtcars_test_mult <- mtcars_test %>% add_predictions(mtcars_mult_fit)
head(mtcars_test_mult, 3)
## # A tibble: 3 x 12
## mpg cyl disp hp drat wt qsec vs am gear carb pred
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 21.5
## 2 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 25.5
## 3 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 20.1
Compute the root mean square error:
\[ RMSE = \frac{1}{\sqrt{n}}\|\vec{y} - \vec{\hat y}\| = \sqrt{\frac{1}{n}\sum_{i = 1}^n(y_i - \hat y_i)^2} \]
sqrt(mean((mtcars_test_mult$mpg - mtcars_test_mult$pred)^2))
## [1] 3.172103
An interaction occurs when an independent variable has a different effect on the outcome depending on the values of another independent. variable.
For example, one variable, \(x_1\) might have a different effect on \(y\) within different categories or groups, given by variable \(x_2\).
If you are not familiar with the concept of the interaction terms, read this.
In the sim3
dataset, there is a categorical, x2
, and a continuous, x1
, predictor.
ggplot(sim3, aes(x=x1, y=y)) + geom_point(aes(color = x2))
We could fit two different models, one without and one with (mod2
) different slopes and intercepts for each line (for each x2
category).
# Model without interactions:
mod1 <- lm(y ~ x1 + x2, data = sim3)
# Model with interactions:
mod2 <- lm(y ~ x1 * x2, data = sim3)
# Generate a data grid for two variables
# and compute predictions from both models
grid <- sim3 %>% data_grid(x1, x2) %>%
gather_predictions(mod1, mod2)
head(grid, 3)
## # A tibble: 3 x 4
## model x1 x2 pred
## <chr> <int> <fct> <dbl>
## 1 mod1 1 a 1.67
## 2 mod1 1 b 4.56
## 3 mod1 1 c 6.48
tail(grid, 3)
## # A tibble: 3 x 4
## model x1 x2 pred
## <chr> <int> <fct> <dbl>
## 1 mod2 10 b -0.162
## 2 mod2 10 c 5.48
## 3 mod2 10 d 3.98
ggplot(sim3, aes(x=x1, y=y, color=x2)) +
geom_point() +
geom_line(data=grid, aes(y=pred)) +
facet_wrap(~ model)
Now, we fit interaction effects for the mtcars
dataset. Note the ‘:
’-notation for the interaction term.
mfit_inter <- lm(mpg ~ am * wt, mtcars_train)
names(coefficients(mfit_inter))
## [1] "(Intercept)" "am" "wt" "am:wt"
summary(mfit_inter)
##
## Call:
## lm(formula = mpg ~ am * wt, data = mtcars_train)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.5603 -1.0064 0.0679 0.7265 3.3565
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.7955 3.7796 7.619 6.18e-06 ***
## am 13.7636 4.5621 3.017 0.01072 *
## wt -3.3685 0.9759 -3.452 0.00479 **
## am:wt -4.4730 1.3701 -3.265 0.00677 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.721 on 12 degrees of freedom
## Multiple R-squared: 0.9183, Adjusted R-squared: 0.8978
## F-statistic: 44.94 on 3 and 12 DF, p-value: 8.43e-07
Go to the “Lec6_Exercises.Rmd” file, which can be downloaded from the class website under the Lecture tab.
Complete Exercise 1.
the number of available covariates is extremely large, but only a handful of them are relevant for the prediction of the outcome.
\[\boldsymbol{\hat \beta} = arg \min\limits_{\boldsymbol{\beta}} \sum_i \left(y^{(i)} - \boldsymbol{\beta}^T \boldsymbol{x}^{(i)}\right)^2 + \lambda \|\boldsymbol{\beta}\|_1\]
It turns out that the \(L_1\) norm \(\|\vec \beta\|_1 = \sum_i |beta_i|\) promotes sparsity, i.e. only a handful of \(\hat\beta_i\) will actually be non-zero.
The number of non-zero coefficients depends on the choice of the tuning parameter, \(\lambda\). The higher the \(\lambda\) the fewer non-zero coefficients.
glmnet
glmnet
.# install.packages("glmnet")
library(glmnet)
mtcars
datasets and use Lasso regression to predict the mpg
using all variables.mpg
.mtcars <- as.data.frame(mtcars)
class(mtcars)
## [1] "data.frame"
head(mtcars)
## mpg cyl disp hp drat wt qsec vs am gear carb
## Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
## Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
## Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
## Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
## Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
## Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
# Convert to 'glmnet' required input format:
y <- mtcars[, 1] # response vector, 'mpg'
X <- mtcars[, -1] # all other variables treated as predictors
X <- data.matrix(X, "matrix") # converts to NUMERIC matrix
# Choose a training set
set.seed(123)
idx <- sample(1:nrow(mtcars), floor(0.7 * nrow(mtcars)))
X_train <- X[idx, ]; y_train <- y[idx]
X_test <- X[-idx, ]; y_test <- y[-idx]
# Fit a sparse model
fit <- glmnet(X_train, y_train)
names(fit)
## [1] "a0" "beta" "df" "dim" "lambda"
## [6] "dev.ratio" "nulldev" "npasses" "jerr" "offset"
## [11] "call" "nobs"
glmnet()
compute the Lasso regression for a sequence of different tuning parameters, \(\lambda\).print(fit)
corresponds to a particular \(\lambda\) in the sequence.Df
denotes the number of non-zero coefficients (degrees of freedom),%Dev
is the percentage variance explained,Lambda
is the value of the currently chosen tuning parameter.print(fit)
##
## Call: glmnet(x = X_train, y = y_train)
##
## Df %Dev Lambda
## [1,] 0 0.0000 4.679000
## [2,] 1 0.1383 4.264000
## [3,] 2 0.2626 3.885000
## [4,] 2 0.3700 3.540000
## [5,] 2 0.4593 3.225000
## [6,] 2 0.5333 2.939000
## [7,] 2 0.5948 2.678000
## [8,] 2 0.6459 2.440000
## [9,] 2 0.6883 2.223000
## [10,] 2 0.7235 2.026000
## [11,] 2 0.7527 1.846000
## [12,] 2 0.7770 1.682000
## [13,] 3 0.7993 1.532000
## [14,] 3 0.8179 1.396000
## [15,] 3 0.8335 1.272000
## [16,] 3 0.8463 1.159000
## [17,] 3 0.8570 1.056000
## [18,] 3 0.8659 0.962300
## [19,] 3 0.8733 0.876800
## [20,] 4 0.8797 0.798900
## [21,] 4 0.8862 0.727900
## [22,] 4 0.8915 0.663300
## [23,] 4 0.8960 0.604300
## [24,] 4 0.8997 0.550700
## [25,] 4 0.9028 0.501700
## [26,] 4 0.9054 0.457200
## [27,] 4 0.9075 0.416600
## [28,] 4 0.9093 0.379500
## [29,] 5 0.9108 0.345800
## [30,] 6 0.9124 0.315100
## [31,] 5 0.9139 0.287100
## [32,] 5 0.9152 0.261600
## [33,] 5 0.9162 0.238400
## [34,] 5 0.9171 0.217200
## [35,] 5 0.9178 0.197900
## [36,] 5 0.9184 0.180300
## [37,] 5 0.9189 0.164300
## [38,] 5 0.9193 0.149700
## [39,] 4 0.9197 0.136400
## [40,] 4 0.9199 0.124300
## [41,] 4 0.9201 0.113200
## [42,] 4 0.9203 0.103200
## [43,] 5 0.9215 0.094020
## [44,] 7 0.9263 0.085660
## [45,] 7 0.9313 0.078050
## [46,] 6 0.9350 0.071120
## [47,] 6 0.9361 0.064800
## [48,] 6 0.9371 0.059050
## [49,] 7 0.9379 0.053800
## [50,] 7 0.9387 0.049020
## [51,] 8 0.9396 0.044670
## [52,] 9 0.9414 0.040700
## [53,] 10 0.9443 0.037080
## [54,] 10 0.9473 0.033790
## [55,] 10 0.9499 0.030790
## [56,] 10 0.9520 0.028050
## [57,] 10 0.9538 0.025560
## [58,] 10 0.9553 0.023290
## [59,] 10 0.9565 0.021220
## [60,] 10 0.9575 0.019330
## [61,] 10 0.9584 0.017620
## [62,] 10 0.9591 0.016050
## [63,] 10 0.9597 0.014630
## [64,] 10 0.9602 0.013330
## [65,] 10 0.9606 0.012140
## [66,] 10 0.9609 0.011060
## [67,] 10 0.9612 0.010080
## [68,] 10 0.9614 0.009186
## [69,] 10 0.9616 0.008369
## [70,] 10 0.9618 0.007626
## [71,] 10 0.9619 0.006949
## [72,] 10 0.9620 0.006331
## [73,] 10 0.9621 0.005769
## [74,] 10 0.9622 0.005256
## [75,] 10 0.9623 0.004789
## [76,] 10 0.9623 0.004364
## [77,] 10 0.9624 0.003976
## [78,] 10 0.9624 0.003623
## [79,] 10 0.9625 0.003301
## [80,] 10 0.9625 0.003008
## [81,] 10 0.9625 0.002741
## [82,] 10 0.9625 0.002497
## [83,] 10 0.9626 0.002275
## [84,] 10 0.9626 0.002073
## [85,] 10 0.9626 0.001889
## [86,] 10 0.9626 0.001721
## [87,] 10 0.9626 0.001568
# label = TRUE makes the plot annotate the curves with the corresponding coeffients labels.
plot(fit, label = TRUE, xvar = "lambda")
The computed Lasso coefficient for a particular choice of \(\lambda\) can be printed using:
# Lambda = 1
coef(fit, s = 1)
## 11 x 1 sparse Matrix of class "dgCMatrix"
## 1
## (Intercept) 34.877093111
## cyl -0.867649618
## disp .
## hp -0.005778702
## drat .
## wt -2.757808266
## qsec .
## vs .
## am .
## gear .
## carb .
lm()
, we can use a function predict()
to predict the mpg
for the training or the test data.s
.# Predict for the test set:
predict(fit, newx = X_test, s = c(0.5, 1.5, 2))
## 1 2 3
## Datsun 710 25.36098 23.87240 23.22262
## Valiant 19.82245 19.42427 19.41920
## Duster 360 16.19324 17.27111 17.74858
## Merc 230 22.62471 21.86937 21.50396
## Merc 450SE 15.20595 16.16123 16.71324
## Cadillac Fleetwood 11.25687 13.28117 14.26985
## Chrysler Imperial 10.81730 13.01570 14.07314
## Fiat 128 25.88928 24.20103 23.47110
## Toyota Corolla 27.01880 25.08206 24.22690
## Toyota Corona 24.89106 23.51713 22.92237
Each of the columns corresponds to a choice of \(\lambda\).
cv.glmnet()
function to perform a k-fold cross validation.In k-fold cross-validation, the original sample is randomly partitioned into k equal sized subsamples. Of the k subsamples, a single subsample is retained as the validation data for testing the model, and the remaining k − 1 subsamples are used as training data. 1
set.seed(1)
# `nfolds` argument sets the number of folds (k).
cvfit <- cv.glmnet(X_train, y_train, nfolds = 5)
plot(cvfit)
\(\lambda\) with minimum mean squared error, MSE:
cvfit$lambda.min
## [1] 0.2171905
The “best” \(\lambda\) in a practical sense is usually chosen to be the biggest \(\lambda\) whose MSE is within one standard error of the minimum MSE.
cvfit$lambda.1se
## [1] 0.6632685
Predictions using the “best” \(\lambda\):
final_pred <- predict(cvfit, newx=X_test, s="lambda.1se")
final_pred
## 1
## Datsun 710 25.01062
## Valiant 19.68422
## Duster 360 16.32664
## Merc 230 22.44375
## Merc 450SE 15.35370
## Cadillac Fleetwood 11.58909
## Chrysler Imperial 11.13782
## Fiat 128 25.54984
## Toyota Corolla 26.64431
## Toyota Corona 24.55160
Building models is an important part of EDA.
It takes practice to gain an intuition for which patterns to look for and what predictors to select that are likely to have an important effect.
You should go over examples in http://r4ds.had.co.nz/model-building.html to see concrete examples of how a model is built for diamonds
and nycflights2013
datasets we have seen before.
This chapter has focused exclusively on the class of linear models \[ y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_p x_p + \epsilon = \vec \beta \vec x + \epsilon \]
and penalized linear models.

Extensions of linear models:
stats::glm()
, binary or count data.mgcv::gam()
, extend generalized linear models to incorporate arbitrary smooth functions.MASS:rlm()
, less sensitive to outliers.Completely different models:
rpart::rpart()
, fit a piece-wise constant model splitting the data into progressively smaller and smaller pieces.randomForest::randomForest()
, aggregate many different trees.xgboost::xgboost()
, aggregate trees.“An introduction to Statistical Learning” [ISL] by James, Witten, Hastie and Tibshirani
“Elements of statistical learning” [ESL] by Hastie, Tibshirani and Friedman
“Introduction to Linear Regression Analysis” by Montgomery, Peck, Vinning


--- layout: default lang: en pageId: misc-table-square-ratio-helpers title: CSS table/square-ratio helpers description: CSS table/square-ratio helpers classes keywords: helpers, float, margin, table-layout, padding, inline-block section: fe-guidelines ---
/* table-design in CSS */
.row {
display: table;
table-layout: fixed;
}
.inline-row {
display: inline-table;
table-layout: fixed;
}
.line {
display: table-row;
}
.col {
display: table-cell;
vertical-align: top;
}
.col-noalign {
display: table-cell;
}
.aligntop {
vertical-align: top;
}
.alignbottom {
vertical-align: bottom;
}
.alignmiddle {
vertical-align: middle;
}
These vertical alignment also work for simple texts (alignsub
and alignbaseline
are also available).
For some components/special cases (responsive iframe
, making a responsive square shape, responsive typography with SVG, etc.), we have to use the “padding-hack” technique, which is basically:

Some content in a square box with ratio-container-square class.

ratio-container-square
class.
ratio-container-5-1
class.
ratio-container-16-9
class.
This is a bit hacky, better not using it often.


User details
{{userdetails.name}}
{{userdetails.email}}
{{userdetails.bio}}
no bio provided
Public repos: {{userdetails.public_repos}}
Public gists: {{userdetails.public_gists}}
Company: {{userdetails.company}}
Followers: {{userdetails.followers}}
Following: {{userdetails.following}}
{{userdetails.location}}
no location specified
{{userdetails.blog}}
{{userdetails.created_at | moment:'LL'}}


DocGen Project User Guide¶
Table of Contents:
Background Information¶
The DocGen project is meant as a way to simplify the installation and usage of FOSS plain text document layouting systems. The main advantages of using a plain text format to write and maintain your documentation files are:
Avoiding cross-vendor incompatibilities: converting documents from one format to another is a tedious task. This is even more the case when the file format of your documentation is a proprietary format.
Versionable documentation: plain text files allow you to make use of most CVS systems. This allows you to choose whatever CVS suits you best, and allows you to use your favorite versioning tooling.
No special tooling needed: while writing plain-text document syntax is significantly simplified by using a text-editor with syntax support for layouting languages, they are not required. A simple editor such as
nano
,vi
ornotepad
is sufficient.
Project Structure¶
Most of the DocGen Project is a simple aggregation of various Free and Open Source Software projects. The main issue when relying on an eclectic stack to generate documents is that you need to install and configure all components on every machine you wish to use it.
DocGen aims to solve this by providing users with an easier way to do this set-up. Installation and usage of this repository (stand-alone or as a supporting stack for your other repositories) should be limited to three distinct installation operations:
Install the container framework (Docker)
Clone the repository
Run the conversion scripts
The diagram below shows how the DocGen stack operates on your personal machine or server infrastructure.
System Requirements¶
Docker version 19+
Sufficient RAM (4 GB and higher)
Sufficient free memory space ( recommended 10 GB or more for docker images )
Getting Started with SDD DocGen¶
Before attempting to use the project for yourself, try to build the samples included in this repository first. This will give you a good idea of how the project is intended to be used, and how you can extend or adapt it to your own needs.
Run conversion¶
Start the docker-compose containers and execute the commands showed below. You can edit the scripts in ops/scripts/, or add your own.
docker-compose -f ./ops/docker-compose.yml up -d --remove-orphans
docker-compose -f ./ops/docker-compose.yml exec linux sh /root/docGen/scripts/doc_runner.sh documents/document_sample.md document sdd-base
Alternativly, you can use the convert_documents.sh
script included in this repository’s root
to run all the examples. The result of these can be found in your local ./output directory.
Specific Tasks and Goals¶
INFO: This section is a STUB and will be expanded in the future


While you see this page, obviously this is not a product page. This is for you, our developers.
The purpose of this small preparation project is to example the logic between modules using simple node.js express code. Of course, it is not what the real product will use or looks like.
In order to save time, I make everything quick and dirty... well, very dirty I know... The purpose is a better way to explain the biz logic, better than pre markdown documents, because you can try it in your machine and modify code to see the result immedaitely.
Everyone may modify the code and commit without update this document. If you find some link does't work as expected, please go to check the code directly. And if you find this doc is out of date, please just update it. Sometime I update the code without update the doc. It is BAD behavior, I am sorry about it. thank you for your tolerance working with such a bad developer. if you do not, well , send me some eggs


Henry Lieberman and Christopher Fry
Media Laboratory
Massachusetts Institute of Technology
Cambridge, Mass. USA
<EMAIL_ADDRESS>Harlequin, Ltd.
1 Cambridge Center
Cambridge, Mass. USA
<EMAIL_ADDRESS>FIGURE 1 Opening frame of a QuickTime video demonstrating ZStep 94 prototype.
DYNAMIC FIGURE 1 (Complete QuickTime Movie, 2.8 mb).
Donald Norman [12] refers to the Gulf of Evaluation and the Gulf of Execution as the gaps that often occur between the user's intent, the actual effect of a command given to the computer, and the result. In programming, this manifests itself as the difficulty of understanding the dynamic behavior of a program from the static source code of the program. The primary cognitive task in debugging is forming a mental model of the correspondence between code and behavior.
Programming is the art of constructing a static description, the program code, of a dynamic process, the behavior which results from running the program. In that sense, it is analogous to composing music. The program code is like a musical score, whose purpose it is to cause the performer [in the programming case, a computer] to perform a set of actions over a period of time.
What makes programming cognitively difficult is that the programmer must imagine the dynamic process of execution while he or she is constructing the static description, just as a composer must "hear the piece" in his or her head, while composing. This puts a great burden on the programmer's short term memory. What makes programming even more difficult than composing is that a musical composition usually specifies a single performance, whereas a program may be executed in a wide variety of conditions, with different resulting behavior.
Many, if not most, routine program bugs result from a discrepancy between the programmer's imagining of the desired behavior in a given situation, and the actual behavior of the program code in that situation. [This would not be true only in the case of deep conceptual misunderstandings, where the program may actually perform as originally intended, but the programmer realizes that the original intention does not solve the problem.]
For the programmer, the problem of translating intent into program code corresponds to what Norman calls the Gulf of Execution. Interactive tools such as on-line context-sensitive help systems and syntax-directed editors can provide intelligent assistance in bridging that gap by relieving reliance on the programmer's memory of programming language details.
Once program code is written, the problem remains of verifying that the code written actually expresses the programmer's intent under all circumstances of interest. This is the Gulf of Evaluation. Interactive tools such as debuggers and program visualization systems can be invaluable in bridging that gap. Instead of trying to imagine how the events in a program unfold over time, why not have the machine show them to you?
We have designed a program debugging environment to explicitly support the problem solving methodology of matching the expectations of a programmer concerning the behavior of code to the actual behavior of the code. This environment is called ZStep 94, a descendent of the stepper described in [8].
Two principal activities in debugging that can be assisted by tools in the programming environment are instrumentation and localization. Instrumentation is the process of finding out what the behavior of a given piece of code is, the software analog of attaching oscilloscope probes to a hardware component. Traditional tools that assist instrumentation are trace, breakpoints, and manually inserted print statements: trace instruments all calls to a function, a breakpoint or print statement instruments a specific function call. The problem with using trace and breakpoints in debugging is that they require some plausible hypothesis as to where the bug might be, so you know where to place the instrumentation. They are not of much help when you have no idea where a bug might be, or there are too many possibilities to check individually.
Localization is the process of isolating which piece of code is "responsible" for some given undesirable behavior of a buggy program, without any prior knowledge of where it might be. Among traditional tools, a stepper is potentially the most effective localization tool, since it interactively imitates the action of the interpreter, and the program can in theory be stepped until the error is found.
However, traditional steppers have a fatal interface flaw: they have poor control over the level of detail shown. Since the programmer's time is too valuable to make looking at every step of an evaluation feasible, only those details potentially relevant to locating the bug should be examined. Typical steppers stop before evaluation of each expression and let the user choose whether or not to see the internal details of the evaluation of the current expression. But how can the user make the decision about whether to see the details of an expression if he or she doesn't know whether this expression contributes to the bug or not? This leaves the user in the same dilemma as the instrumentation tools -- they must have a reasonable hypothesis about where the bug might be before they can effectively use the debugging tools!
The solution adopted by ZStep 94 is to provide a reversible control structure. It keeps a complete, incrementally generated history of the execution of the program and its output. The user can confidently choose to temporarily ignore the details of a particular expression, secure in the knowledge that if the expression later proves to be relevant, the stepper can be backed up to look at the details. Thus, ZStep 94 provides a true localization tool.
There has been a considerable amount of past work on reversible program execution [1,3,8,9,11,15], but this work has concentrated on the details of minimizing the space requirements of the history and tracking side effects to data structures, both of which are important, but secondary to the user interface aspects which are the emphasis of this paper. It is important not only to "back up" variables to their previous values, but also to "back up" a consistent view of the user interface, including static code, dynamic data, and graphical output so that the user "backs up" their mental image of the program execution.
The reversible control structure aspects of ZStep 94 are discussed in more detail in [9]. We will address the issue of the computational expense of the history-keeping mechanism later.
ZStep 94's main menu uses a bi-directional "video recorder" metaphor. The single-arrow "play" and "reverse" correspond to single-step in a traditional stepper, and the "fast-forward" and "rewind" operation go from an expression to its value and vice versa, without displaying details.
FIGURE 3. ZStep 94's "control menu"
It is important to note that ZStep 94's expression-by-expression stepping is not the same as statement-by-statement or line-by-line stepping found in many steppers for procedural languages. Individual lines or statements may still contain complex computations, and it is a severe limitation on the debugger if the granularity cannot be brought down finer than a statement or line.
The two "graphic step" operations G> and G< are an innovation that lets the user step the graphic output of the program back and forth, rather than control the stepper in terms of the expressions of the code. This will be discussed below.
ZStep 94 also has a "cruise control" mode, in which the stepper can run continuously, in either direction, without user intervention. The distance of the cursor from the center of the panel controls the speed. The user can stop it at any point when an interesting event appears, and run the stepper in either direction at that point.
FIGURE 4. ZStep 94's "cruise control"
A crucial problem in designing an interface for program debugging is maintaining the visual context. Because programming is an activity in which many items of interest have complex temporal and spatial relationships to other items, it is important to present each item with its context clearly identified.
Items such as the expression currently being evaluated, the value of a variable, or graphics drawn by the code may have almost no meaning outside their proper context. The programmer wants to know where in the code that expression was evaluated, which instance of the code was it, when did the variable have that value, how did that graphic appear on the screen?
If the item and its visual context are spatially or temporally separated, a new cognitive task is created for the user -- matching up the item with its context. This new cognitive task creates an obstacle for debugging and puts additional burden on the user's short term memory. Linear steppers or tracers that simply print out the next expression to be evaluated create the task of matching up the expression printed to the place in the code where that expression appears. "Follow the bouncing ball" interfaces that point to an expression and print out a value in another window lead to "ping-ponging" the user's attention between the code display and the value display.
Because most programmers input their code as text in a text editor, the primary mental image of the program becomes the text editor's display of the code. Thus, to preserve the WYSIWYG property, ZStep 94 always use the text editor's display to present code during debugging. To maintain visual continuity, it is important that the exact form of the user's input be preserved, including comments and formatting details, even if they are not semantically significant. As the interpreter's focus moves, the source code of the expression that is about to be evaluated, or has just returned a value, is highlighted.
FIGURE 5. The value window moves through the code
Steppers always have the problem of how to show code expressions and their values simultaneously. In ZStep 94, as the editor's focus moves from expression to expression, we use a floating window to display the value. The display of the value is always exactly aligned with the expression to which it corresponds, so that the visual association between an expression and its value is apparent. The floating value window is colored light green to indicate if the expression is about to be evaluated, light blue to indicate a return value, or yellow if it has caused an error.
Earlier versions had used the idea of substituting the value for the code in place. This keeps the user's attention focused on the point of execution, but loses the original expression. Another version maintained two windows, one with the original code, the other with the substituted values, but this was affected by the "ping-pong" problem. All these are valid approaches, but we prefer the floating value window as the best compromise between visibility and maintaining visual continuity. We might also explore making the values window translucent, to reduce the effect of obscuring the code underneath.
Our approach is to integrate instrumentation tools directly into the stepper. We provide two facilities for pointing at a piece of code and inquiring about the behavior of the code. Rather than inserting breakpoints or print statements into the actual code and resubmitting the code to the interpreter or compiler, we let the user simply point at the desired expression, then run the stepper until that expression is reached. This is called Step to Mouse Position. This is like a breakpoint, but an advantage is that the stepper is runnable both forward and backward from the point where the program stops, and all information about the computation remains available.
FIGURE 6. ZStep 94's pull-down menu
Even more dynamic is Show Value Under Mouse, which is like a continuously updated Step to Mouse Position. The user simply waves the mouse around the code, without clicking, and the expression currently underneath the cursor displays its value window. Unlike Step to Mouse Position, this works only for values that have been previously computed and are quickly retrievable, and does not run the stepper past the current execution point.
We also provide a facility to track the behavior of a given expression over different execution histories. The operation Current Form History allows the user to point at an expression and bring up a menu of the past values of that expression.
FIGURE 7 The history of values of an expression
Another history facility is the Values Filter, which brings up a menu of all returned values up to that point satisfying a condition. Clicking on one of the values returns the stepper to the corresponding event. We could also provide a filter on the expression executed, which would correspond to a traditional trace.
One of the most essential, but also most difficult, tasks in debugging is being able to reason backward from the manifestation of some buggy behavior to the underlying cause. This is especially problematic when the program in question itself has a graphical user interface. The programmer must work backwards from an incorrect user interface display to the code responsible. Traditional tools do not make any special provision for debugging programs with graphic output; worse, the user interface of the debugger often interferes with the user interface of the target program itself, making it impossible to debug!
ZStep 94 maintains a correspondence between events in the execution history and graphical output produced by the current expression. Considerable care is taken to assure that the graphic output always appears consistent with the state of execution. When the stepper is run forward or backward to a certain point in the execution, the graphic display is also moved to that point.
Furthermore, individual graphical objects on the display also are associated with the events that gave rise to them. We allow the user to click on a graphical object, such as a tree node in our example, and the stepper is automatically positioned at the event which drew that node. Just as in our other operations like Step to Mouse Position, the stepper is active at that point, and the program can be run forward and backward from that point.
FIGURE 8.
FIGURE 9.
Clicking on a graphical object backs up the stepper to the event which drew it
In reasoning from the behavior of the program to the code, it is useful to be able to step the behavior rather than step the code. The user conceptualizes the behavior of the program as a set of graphic states that unfold over time, as the frames of an animation. The increments of execution should be measured in terms of the animation frames rather than execution of code, since events that happen in the code may or may not give rise to graphic output.
ZStep 94 provides two operations, Graphic Step Forward and Graphic Step Backward, that run the stepper forward or backward, respectively, until the next event happens that results in significant graphic output. Below, each graphic step results in an exploration of the next branch of the tree.
FIGURE 10.
FIGURE 11.
FIGURE 12.
FIGURE 13. Four successive "graphic steps"
Each graphic step runs the stepper forward or backward until it is pointing at the event which was responsible for the graphic output, and the stepper remains live at all times. While stepping non-graphic code, the effects of previous graphic operations remain visible, just as they do in a normally-running program.
We could also provide graphic step operations analogous to "graphic fast forward" and "graphic rewind". Because the stepper can be run from either the code or the graphics at any point in time, the user can easily move back and forth between the different points of view.
ZStep 94 has a unique approach to dealing with execution errors. Traditionally, errors during program execution are disruptive. They either print an error message and halt execution, or put the user into a breakpoint loop, from which special commands can examine the error, and the stack can be inspected. In either case, errors disrupt execution and often lose information about partial computations which may have finished correctly.
FIGURE 14. ZStep 94 displays an error message
In ZStep 94, an expression which results in an error simply displays the error message in place of the value of the subexpression most relevant to the error. The value window is colored yellow to indicate the error condition. The stepper remains active, all intermediate values are preserved, and the program can be run backward to examine the history that led up to the error.
The current version of ZStep 94 has no independent display of the stack, though the user can flip through events representing containing computations manually, whether or not an error has occurred. Previous ZStep versions had a stack display that was updated continuously with each event, animated in tandem with the source code animation. Each stack frame was itself a menu item, and clicking it would return you to that frame.
What happens once an error is found? ZStep 94 facilitates the repair phase, since it leaves you in the text editor with the cursor pointing to exactly the code in need of repair. Further, you are then just one click away from restarting the entire computation after the edit. However, we cannot support restarting the computation from any point in ZStep's history after the edit, because editing a running program cannot guarantee consistency of the event data structures. However, we could imagine techniques that would allow conservative restart of the code, or at least warn you of potential difficulties.


Many young entrepreneurs and students have successful business models that they wish to start. However, they lack the financial means to start over or they are simply in need for a partnership with some other skill set. It has always been a challenge to find a platform dedicated to the needs of young entrepreneurs and future leaders. This problem space forms the basis of our platform - eBusiness.
The idea is to create a community platform that connects business enthusiasts, investors and a diverse set of skilled people together on one platform. Users are able to create searchable profiles, identify their interests using unique hashtags and search potential partners using the skill matchmaking.
eBusiness aims to fill in the gap between Indeed and BusinessPartners, that are primarily focused on employment and crowdfunding respectively. Thus, we are different from Indeed as we are not focused on employment but rather the initial startup phase of a business which includes forming partnerships, sharing and discussing confidential ideas under strict confidentiality.
Our concept also differs from BusinessPartners as we do not rely on crowdfunding and employment but rather sharing idea by mutual agreement between two or more parties. We will harness the power of social and mobile computing to achieve its aims. An online website will be established that provides its users with a directory search of user profiles, discussion forums, messenger, partnership formation.
1. Users first need to create an account by filling in their personal information, also users need to identify themselves into several categories (Business owner, Contributor, Investor etc.) and select industries they interested. In final step users have to upload copy of their identification to be verified.
2. Click 'About page' will let users know what does our website's do.
3. In 'Partner Search' section, users can search their ideal partners by selecting key words. For example, IT Business owners will select 'IT', 'Contributor' or 'Investor' to find some employees with skills or receive his start-up capital from investor.
4. If they want to know more about such user, they can click 'More information' to view user profile or 'Chat' to have a directly message with each other.
5. In 'Discussion forum' section, users can click any topic they feel interested, and leave their comments or click the 'like' button if they love that blog. Also. every user is allowed to post out their content to share their knowledge and experience.
6. Last but not the least, user can modify their user profile at any time they want.


Original images resized to 96px height |
Standard square resize with no plugin |
With plugin: placeholder + 96x96 resize/crop + centerPlaceholder shows first then resized+cropped image replaces it.
Note: 4th image is invalid (returns error message) and shows the placeholder |
With plugin: no placeholder + 96x96 resize/crop + centerWhen no
realsrc attribute is present, images are first displayed with standard HTML resize, then are resized and cropped. |
With plugin: placeholder + 96x96 resize/crop + no center |
4x3 ratio (horizontal) |
4x3 ratio (vertical) |
preserveSize
parameter is set to true
.forceResize
to true
.crop
to false
). A placeholder is displayed while the real images load in the background.


In order to compare global analysis results stored in our database coming from MD simulations with experimental values, we have built a complex pipeline to obtain such values.
Starting from all the PDB files classified as Nucleic acid, we built a complete dataset of duplex structures following these steps:
Next step in the pipeline consists in applying a list of filters to the set of duplex nucleic acid structures obtained. These filters work as a pre-process to the analyses we are interested in, and include, for example, checking for different strand lenghts, possible sequence mismatches, presence of essential atoms needed for subsequent analyses, etc. The final step consists in running Curves+ program to extract helical parameters information from the generated PDB files.
As an example of what we obtained, the following table shows the average results for the base-pair steps helical parameters computed for the complete list of experimental structures, together with values extracted from a similar previous work in the group (P. Dans et. al, NAR 2012 40, 10668-10678).
Units:
Translational Inter-BP Step Helical Parameters Shift/Slide/Rise in Å, Rotational Inter-BP Helical Parameters Tilt/Roll/Twist in degrees
These computed experimental values are used as a comparison in global analyses plots (see analyses section). In the following example, vertical red line is showing the experimental average value found for the Rise helical parameter together with the histogram of Rise average values stored in the database for a particular base-pair step (in this case CG). Blue vertical line is showing the average value of the histogram data (MD simulations data).


1. What are the file formats supported by Vim?
2. True or False. The :guide command is used to open the Vim help tool.
3. The command mode is also known as what mode?
4. What command do you use to save all your open files?
5. You have just opened a file with the following block of code. Which command would allow you to move to the end of the word "string"?
string catBreed
boolean mixed
6. Which command do you use to get to normal mode from ANY other mode [except Ex]?
7. How do you quit Vim?
8. Which of the following would allow you to jump 10 pages up your Vim screen?
9 Jumping to the beginning of a file is accomplished by what command?
10. What command returns the cursor to its exact original position before the last jump?


This file is part of amfPHP
LICENSE
This source file is subject to the license that is bundled with this package in the file license.txt.
include this to include amfphp note: this list could be generated. In the meantime maintain it manually.
It would be nice to do this alphabetically, It seems however that an interface must be loaded before a class, so do as possible
Documentation generated on Tue, 29 May 2012 23:42:02 +0200 by phpDocumentor 1.4.3


---
layout: default
title: "About Me"
---
About Me:
Madicken Munk
This is a weekly meeting for sharing skills and best practices for scientific computation. Based on The Hacker Within Scientific Computing Group from the University of Wisconsin Madison, a small group of nuclear engineers at UC Berkeley had a couple such meetings in Fall 2013. In spring semester of 2014, this grew into a more structured set of skill sharing sessions for scientific software development (testing, data management, version control, literate programming etc. ) The goal is to learn cool skills and incorporate these practices into our workflows. This meeting would be a great venue for introducing new libraries, showing off useful features of a neutronics code you're using, or bringing up a computational problem you're having.
What I do for work:
Room 190, Doe Library, The University of California - Berkeley
What I do for fun:
Anyone interested in software development best practices is welcome to come to our meetings. Note that the first hour has a particular emphasis on computational nuclear engineering and neutronics analysis best practices. The second hour of the meeting, however, will be domain-inspecific!
Contact Me
Wednesdays at 3:30pm. The meeting should last about two hours. See the blog or the calendar for the topic for this week. To keep up with meetings, you may want to sign up for the listhost.
How:
Participating is really easy.
Why:
The tenets of scientiﬁc endeavor (e.g., data control, reproducibility, comprehensive documentation, and peer review) suffer in projects that fail to make use of current development tools such as unit testing, version control, automated documentation, and others.
To avoid these pitfalls, this weekly meeting exists for sharing skills and best practices for computational scientific applications. This group is modeled after The Hacker Within, which began as a student organization at the University of Wisconsin-Madison and is now reborn as a collection of such chapters around the world. Each of the chapters convenes a community of scientists, at all levels of their education and training, to share their knowledge and best practices in using computing to accomplish their work.


Test Form 1: General testing with recaptcha and formname
https://localhost:3001/submit/
Name:
E-mail:
Message:
Choose an option
Option 1.1
Option 2.1
Option 2.2
Option 3.1
Option 3.2
Option 3.3
Subscribe to newsletter?
Send your message
Test Form 2: HTTPS Testing form targets with reCAPTCHA V2, _formname and _formurl
https://localhost:3001/submit/sales/
Name:
Test Form 3: AJAX
Your name:
Send request