— layout: post title: "From Statistics to Lack of Fit Test (1)" permalink: :title category: Machine Learning tags: [Machine Learning, Statistical Learning, Feature Engineering] — <script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['\(','\)'], ["\\(","\\)"] ], displayMath: [ ['\[','\]'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { fonts: ["TeX"] } }); </script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"> </script> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> </head>
According to Alan Turing, a system, which probably looks pretty complicate, can be described with simple mathmatical equation. In machine learning domain, the models can be usually interpreted with equations, and the parameters of "equations" is what we want to learn. Usually, the parameter we finally get is an estimator of the real value. But how do we describe how good the estimator is?
Let's start with the Estimator.
The parameter is a quantity of a real model e.g. the mean or the variance of random variable, the parameter of a probability distribution, etc. An estimator, according to Wikipedia is a rule for calculating an estimate of parameter based on observed data. Because the estimator is calculated by a function of observed data, so the estimator is itself also random variable. (This concept is also the main idea of Bayesian Model in machine learning).
Suppose we want to know a paramter \(\theta\), which can be estimated by a sample set \(D_{S}\) drawn from \(X\). \(\hat{\theta}_S(X)\) is denoted as the estimator of \(\theta\) based on observed data of random variable \(X\). Let's denote \(x\) as a particular obseved data \(X=x\). Sampling is an approximation of the real world. So it could happen that for some reasons the sample set doesn't represent the real issuse very well. There are some important quantified properties which are helpful before we dive deeper.
For a given sample \(X=x\), the sampling deviation is denoted as:
\begin{equation} d(x) = \hat{\theta}_S(x)-E(\hat{\theta}_S(X)) = \hat{\theta}_S(x) - E(\hat{\theta}) \end{equation}where \(E(\hat{\theta})\) is the expected value of the estimator. As mentioned, the estimator is itself a random variable.
We randomly itteratively sample several times. Each time we give an estimate of θ. The bias then can be denoted as:
\begin{equation} Bias(\hat{\theta}) = E(\hat{\theta})-\theta = E(\hat(\theta)-\theta) =E(error) \end{equation}The distance btw. expected value of θ and the real theta being estimated. Bias can describe how far the average of estimates be off-target. We hope the estimator has a lower bias.
The expected value of the squared sampling deviation:
\begin{equation} Var(\hat{\theta}) = E[(\hat{\theta} - E[\hat{\theta}])^2] \end{equation}It describes how the estimator varies. SE is the square root of variance. We also hope the estimator has a lower variance.
The expected value of the squared error:
\begin{equation} MSE(\hat{\theta}) = E[(\hat{\theta}(X)-\theta)^2] \end{equation}The relationship mean squared error = variance + square of bias, namely \(MSE(\hat(\theta))=(Bias(\hat(\theta)))^2 + Var(\hat(\theta))\) can be proven easily. Just do remember the θ is also a random variable!
Proof:
\begin{align*} MSE(\hat(\theta)) &= E[(\hat{\theta}-\theta)^2] = E[\hat{\theta}^2] - 2E[\hat{\theta}]\theta +\theta^2 \\ Bias^2 &= (E[\hat{\theta}]-\theta)^2 = E^2[\hat{\theta}] +\theta^2 - 2E[\hat{\theta}]\theta \\ Var &= E[(\hat{\theta} - E[\hat{\theta}])^2] = E[\hat{\theta}^2] -2E^2[\hat{\theta}] + E^2[\hat{\theta}] = E[\hat{\theta}^2] -E^2[\hat{\theta}]\\ MSE &= Bias^2 +Var \end{align*}We can see that, for an unbiased estimator, the variance equals the mean square error.
Suppose there is a distribution with μ as the mean and σ as the variance. We will rarely know the true variance and mean. The best we can do is estimate them! In chapter 5 of Deep Learning, the author proves the unbiased estimators of mean and variance of Gaussian distribution \(X~N(\mu,\sigma^2)\).
There is another way to explain why the denominator divides the sum by N-1 rather than N. The following is what I quote from here, but edited to suit our case.
What we would really like is for the numerator to add up, in squared units, how far each observed value is from the unknown realization mean μ. But, we don't know the real mean μ, so we estimate it with the average value. Doing so costs us one degree of freedom. That is, we have to divide by N-1, and not N, because we estimated the unknown real mean μ.
What's the variance of the unbiased sample mean \(var(\hat{\mu})\). It turns out that:
\begin{equation} var(\hat{\mu}) =\frac{\sigma}{N} \end{equation}If N goes large enough, variance tends to be zero.
Notice that the square root of unbiased sample variance is however biased from the real standard error σ. As long as N is large enough, it will still approximate real σ very well.
With SE and central limit theorem we can find that the average value as mean estimator will tend to obey Gaussian distribution. So we can use SE to find the confidential interval. If we have two machine learning algorithm, we can find the upper bounds of \(95%\) confidential intervals, of course the algorithm with lower upper bound wins(the interval is more narrow)!!
Since I already mention the degree of freedom DF, see more about DF in the following chapter.
What hint can we get from bias and variance of estimator when doing model fitting? Suppose we have a model \(f(x)\) in the real world, due to the noise we get caught into the delimma that we never observe the real \(f(x)\) given an \(x\), but the noisy data \(y=f(x)+\epsilon\). Following the workflow of regression we should first of all find a function family to fit the model. suppose we come up with polynomial \(p_N(x)=a_0+a_1x+ a_2x^2+...+a_Nx^N\). Training, testing… How good performance will we finally get?
To find out the real model precisely is difficult, two main probelems exist as the following figure shows.
How do we assess the prediction performance? So suppose we finally choose \(p(x)\) as the prediction function. Noted that the prediction function is based on the data, so the prediction function is random variable. If we repeatedly and independently sample data several times, we get different \(g(x)\). The expected value of \(p(x)\) is \(E[p(x)]\). There are some parameters to be introduced:
Fed with these concepts, we can actually compare them with the former chapter on estimator bias and variance and MSE. Try to replace θ with y, \(\hat{\theta}\) with \(p(x)\), and \(E[\hat{\theta}]\) with \(E[p(x)]\), then you can find the relationship.
Let's explore the underlying relationship. A given observed \((x^*,y^*)\) pair is drawn due to \(y^*=f(x^*) + \epsilon\). For a given set of pbserved data pairs, the expected prediction error is \(E[(p(x^*)-y^*)^2]\). We expand it as:
\begin{align*} E[(p(x^*)-y^*)^2] &= E[p^2(x^*)] - 2E[p(x^*)y^*] + E[{y^*}^2] \\ &= E[p^2(x^*)] - 2E[p(x^*)]f(x^*) + E[{y^*}^2] \end{align*}Since:
\begin{align*} E[p^2(x^*)] &= E[(p(x^*) - E[(p(x^*)])^2] +E^2[p(x^*)] \\ E[{y^*}^2] &= E[(y*-E[y^*])^2] +E^2[y^*] = E[(y*-f(x^*))^2] +f^2(x^*) \end{align*}So finally we can form the expected prediction error as:
\begin{align*} E[(p(x^*)-y^*)^2] &= E[(p(x^*) - E[(p(x^*)])^2] +E^2[p(x^*] - 2E[p(x^*)]f(x^*) + E[(y^*-f(x^*))^2] +f^2(x^*)\\ &= E[(p(x^*) - E[(p(x^*)])^2] + E[(y^*-f(x^*))^2] + E^2[p(x^*] -2E[p(x^*)]f(x^*)+f^2(x^*)\\ &= E[(p(x^*) - E[(p(x^*)])^2] + E[(y^*-f(x^*))^2] + (E[p(x^*)]-f(x^*))^2 \end{align*}expected prediction error = variance of the estimator + noise + square of bias of the estimator
Notice that whatever effort we make, we can't eliminate the noise term of the error.
You may heard of the term "lack-of-fit sum of squares". There exists a relationship that the residual sum of squares can be decomposed into two components: lack-of-fit sum of squares and sum of squares of the differences between each observed $y$-value and the average of all y-values corresponding to the same $x$-value.
If you compare it carefully with the relationship mentioned above, you can find that the lack-of-fit dependens on the bias estimator and the noise. As said before, the noise is our delimma, however we do can improve our learning algorithm to minimize the bias estimator. Also I quote some figures to intuitively explain the variance estimator and bias estimator.
The following figures are cited from Model Selection: Underfitting, Overfitting, and the Bias-Variance Tradeoff
The real model is \(f(x)=sin(\pi x)\) The real world with noise is \(y= f(x)+ N(0,\sigma^2)\) Using the polynomials with \(N=1\), \(N=3\), and \(N=10\) seperately fit the observed data. The data are independently sampled 50 times and for each \(N\) there are 50 prediction functions. The first figure shows us that the model can't capture the real features of the data. It is sensible neither to the real model nor to the noise. So we can see that the variance of those 50 lines is low. But the bias is high. So this is a typical case of underfitting. The third figure in the contrast, capture the real features and and also the noise we don't want. It is sensible not only to the real model but also to the noise. This time, however, we can see that the variance of those 50 lines is low. That's because it regards the noise as a feature, this is a typical case of overfitting. The best is the second figure. As we can see, it has relative lower bias and lower variance. The noise doesn't misguide our model.
So the trade-off is actually very parently. If we use a complex model with too much parameters, the model works well on the training data to lower the residules down. However, it may work very bad on test data, cause the model we get represents not only the real model but also the noise. It's not generalized. The bias may be very low but the variance goes too high. If the model is too simple, with not enough parameters, it probably doesn't capture the real features of the real model. So the bias may be very high in spite of lower variance.
Well, suppose the real model is \(f(x) = b_0+b_1x\), and the prediction function we get based on the data points drawn from \(y=f(x)+\mathbb{N}(0,\sigma^2)\) is \(\hat{y}=\beta_0+\beta_1x=\). Suppose the noise is normally distributed and at each single value of \(x\) we have the same σ without drift. There are 3 concepts.
Now we can estimate \(\sigma^2\) in two ways.
So far, you might find the relationship btw. the two items and SSTO, SSE. There are actually another thing should be mentioned.
It turns out that:
\begin{align*} E[MSR] &= \sigma^2 +b_1^2\sum_{i=1}^{N} (X_i-X_{ave})^2 \\ E[MSE] &=\sigma^2 \end{align*}the reference Test if the feature is correlated to the respond y There are two alternative methods for testing whether a linear association exists between the predictor x and the response y in a simple linear regression model, y=b0+b1x +ε
\begin{equation} H_0: b_1=0 vs. H_1: b_1 \neq 0 \end{equation}\(r^2\) is alsp called coefficient of determination or r-squared value.
\begin{equation} r^2 = \frac{SSR}{SSTO} = 1-\frac{SSE}{SSTO} \, \in[0,1] \end{equation}Interpretation:
According to the expected value of MSE and MSR, we can test \(H_0\) versus \(H_1\)
If \(b_1\), then we'd expect the ratio MSR/MSE to equal 1. If \(b_1 \neq 0\), then we'd expect the ratio MSR/MSE to be greater than 1.
According to the WorkFlow, we can write down the test statistics as \(F^*=\frac{MSR}{MSE}\).
At last using P-value, significant level, and F-distribution to test if we should reject \(H_0\)
Firstly, specify the null \(H_0\) and alternative hypotheses \(H_1\) or \(H_A\).
Secondly, calculate the value of the test statistic according to the methode you use.
At last, use the resulting test statistic to calculate the P-value.
The p-value is a measure of the strength of the evidence and even extremer eveidence against the null hypothesis. It means that, if \(H_0\) is true, how likely will the observed value and even greater value appear.
By the way, the test statistic could be t-statistic, representing t-test, and F-statistic, representing F-test. These two methode are common used.
Once again, I list these concepts together.
Given a set of pairs \((x_i,y_i)\) (N pairs), figure out if there is linear association btw. \(y\) and \(x\) (if \(\beta_1 = 0\)). \(y_ave\) is the average of all \(y_i\), represents a line with no slope in \(x-y\) plane, it supports \(H_0\). \(\hat{y_i}\) is the predicted value, it supports \(H_1\). We have SSTO = SSE+SSR.
If SSR is large, it suggests that a linear association btw. \(x\) and \(y\)
For every single \(x\), we have: expected prediction error = variance of the estimator + square of bias of the estimator + noise
\begin{align*} E[(p(x^*)-y^*)^2] =& E[(p(x^*) - E[p(x^*)])^2] + \\ & E[(y^*-f(x^*))^2] + (E[p(x^*)]-f(x^*))^2 \end{align*}We can write it with similar notation as SSTO, SSE, SSR.
\begin{align*} E[(\hat{u_i}-y_i)^2] =& E[(\hat{y_i} - E[\hat{y_i}])^2] + \\ & E[(y_i-f(x_i))^2] + (E[\hat{y_i}]-f(x_i))^2 \end{align*}, where \(f(x_i)\) is the response according to the real underlying model \(f\)


Time: {{rows}}
Location: {{rows1}}
Time taken for first result to execute: {{tot}}
Time taken for {{loop}} queries to execute: {{total}}


Posts
- 27 May 2012 » Your first node.js module
- 26 Apr 2012 » Move More Than 1 Unit with Square’s Cubism.js
- 23 Jan 2012 » [link] HTML5…plz?
- 09 Jan 2012 » How to link to external posts in octopress
- 03 Jan 2012 » [link] Play all rdio songs on mobile… kind of.
- 02 Jan 2012 » [link] Sync all Rdio songs to mobile
- 01 Jan 2012 » Keyboard shortcuts on Rdio
- 30 Nov 2011 » [link] Move the Web Forward
- 09 Aug 2011 » [link] Published on nettuts!


From:Geaccone To:Bryant; Barnes Sent:2017-01-11T04:39:09.0000000Z Subject:FW: 2002 IM Structure
Approved. Please roll over November 1. Please let me know if there is a problem.
-----Original Message-----
From: Barnes, Caroline
Sent: Thursday, October 25, 2001 1:42 PM
To: Geaccone, Tracy
Cc: Hayslett, Rod; Bryant, Marian; Saunders, James; Nightingale, Ron; Bayles, Timothy
Subject: 2002 IM Structure
Tracy, as the ETS overall planner, the Property Accounting Users Group requests that you instruct the ISC to roll over the current IM structure for 2002 for both ETS Consolidated and ETS Un-Consolidated. This will allow for the setting up of 2002 projects (to be saved they must be attached to a 2002 Budget code) and when the 2002 capital budget is approved, allow for the inputting of the 2002 budget. No transfer of dollars is involved in the roll over. This is strictly a structure roll over.
Please email Marian Bryant with the ISC the approval for the roll over and the date you would like for this to happen. The Users group is recommending for this to be done November 1st. If you have specific questions or concerns, please contact Marian directly, x55944.
Caroline Barnes
on behalf of the Property Accounting Users Group
***********
EDRM Enron Email Data Set has been produced in EML, PST and NSF format by ZL Technologies, Inc. This Data Set is licensed under a Creative Commons Attribution 3.0 United States License <http://creativecommons.org/licenses/by/3.0/us/> . To provide attribution, please cite to "ZL Technologies, Inc. (http://www.zlti.com)."
***********
California


User stories:
1) I can get the IP address, language and operating system for my browser.
/whoami
{"ipaddress":"<IP_ADDRESS>8","language":"en-US","software":"Macintosh; Intel Mac OS X 10_11_2"}


STIMS SUITE
Account
Settings
Help
Mr.Admin
Profile
Logout
Home
Registration
Student
Employee
Department
Profile Information
Attendance
Academic
Examination
Exam
Exam Schedule
Grade
Exam Attendance
Hostel
StudentRegsitration
Attendence
complaint register
Food Details
warden
Transport
Transport registration
Transport
Library
Payroll
Mail/SMS
Settings
General Settings
Admission Form
Student Details
Parent/Guardian Details
Emergency Contact & Siblings Details
School Details
Other Details
Uploads & Declaration
1. Student Details
1.1 Basic Details
Applied For Class
PreKG
LKG
UKG
1
2
3
4
5
6
7
8
9
11
Current Class
PreKG
LKG
UKG
1
2
3
4
5
6
7
8
9
11
Gender
Male
Female
Choose Photo
1.2 Ethnic Details
Religion
Hinduism
Islam
Christianity
Sikhism
Buddhism
Jainism
Other religions
Community
SC/ST
MBC
BC
OC
Blood Group
A-
O+
A-
A+
B-
B+
AB-
AB+
1.3 Address Details
Check this box if Present Address and Permanent Address are same
--Next--


| DOSE: T+ 0:00 |
20 mg |
oral |
2C-I |
(powder / crystals) |
| T+ 1:00 |
5.0 mg |
insufflated |
2C-I |
(powder / crystals) |
LSD was always my favorite drug and I have not had connections for it for a long time. I read about 2C-I and decided to give it a try. It was described as similar to LSD and 2CB. I'm very experienced in hallucinogens.
I purchased 100mg from a reliable seller. I eyeballed 5 piles of 20mg each. I took one pile and made it into 4 piles of 5mg. I put 20mg in a small shot of water and downed it. My friend put 5mg in his beer.
[Erowid Note: A volume amount of one powder doesn't necessarily weigh the same as the same volume of another powder. For substances active at such a small dose, eyeballing is particularly unwise. See related article]
I started to feel it in about a half hour. My head started feeling very pleasantly cloudy. Colors intensified. After 45 minutes, I could see the carpets and walls making shimmery waves. This breathing movement was very much like a moderate dose of LSD. It would usually take me at least 4 hits of LSD to get the visuals I was getting at this point, and this is only an hour into the trip.
So exactly one hour into the trip, my friend who had drank 5mg decided to snort 5mgs. I snorted 5mg as well making my total 25mg and his total 10mg. We immediately felt a rush coming to our brains from the insufflation. The visuals are now getting very intense. I am seeing beautiful geometric patterns everywhere. They are similar to LSD visuals, especially with the melting movements. It usually takes me 6 hits of LSD to achieve these kinds of visuals.
I played Viewtiful Joe, an extremely visually trippy video game, and we watched Fear and Loathing in Las Vegas, which was the perfect choice. I really enjoyed 2C-I.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


|
lwIP
2.1.3
Lightweight IP stack
|
Typedefs | |
| typedef enum raw_input_state | raw_input_state_t |
Enumerations | |
| enum | raw_input_state |
Functions | |
| raw_input_state_t | raw_input (struct pbuf *p, struct netif *inp) |
| void | raw_netif_ip_addr_changed (const ip_addr_t *old_addr, const ip_addr_t *new_addr) |
raw API internal implementations (do not use in application code)
| typedef enum raw_input_state raw_input_state_t |
return codes for raw_input
| enum raw_input_state |
return codes for raw_input
| raw_input_state_t raw_input | ( | struct pbuf * | p, |
| struct netif * | inp | ||
| ) |
Determine if in incoming IP packet is covered by a RAW PCB and if so, pass it to a user-provided receive callback function.
Given an incoming IP datagram (as a chain of pbufs) this function finds a corresponding RAW PCB and calls the corresponding receive callback function.
| p | pbuf to be demultiplexed to a RAW PCB. |
| inp | network interface on which the datagram was received. |


I wish to control a relay through emoncms.org from a web page located on my Android mobile phone.
To do this, I had thought of creating a feed. So, I can update the value of the feed through the website or web page located in my phone or in a PC. In my house, an Arduino with Ethernet module must be able to read the feed and depending on the values received, switch on or off the relay.
I have created the input and the corresponding feed. From a browser I can give values to the feed. But the problem is that I don't know how Arduino can read the last value of that feed.
I know that sentence is like: http://emoncms.org/feed/value.json?id=32427&apikey=xxxxxxxxxxx
But how to transfer this into the arduino with the GET method?
I've tried this (Arduino web client sample modification):
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
char server[] = "www.emoncms.org"; // name address for Google (using DNS)
char apikey[] = "myapikey";
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192,168,0,177);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip);
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
Serial.println("connected");
// Make a HTTP request:
client.print("GET /feed/value.json?apikey=");
client.print(apikey);
client.print("?id=32427");
client.println(" HTTP/1.1");
client.println("Host:emoncms.org");
client.println("User-Agent: Arduino-ethernet");
client.println("Connection: close");
client.println();
}
}
else {
// kf you didn't get a connection to the server:
Serial.println("connection failed");
}
}
void loop()
{
// if there are incoming bytes available
// from the server, read them and print them:
if (client.available()) {
char c = client.read();
Serial.print(c);
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
// do nothing forevermore:
while(true);
}
}
But the response is:
connecting...
connected
HTTP/1.1 200 OK
Date: Tue, 04 Mar 2014 21:37:29 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.9
Vary: Accept-Encoding
Content-Length: 49
Connection: close
Content-Type: text/html
{"success":false,"message":"Feed does not exist"}
disconnecting.
I´ve tried with another id feed and is the same return...
Can anyone help me ?
Thanks.
Re: Remote Control Relay with emoncms.org and Arduino
To make life easier for yourself, you can just do the request to emonCMS manually in the browser until it works :)
I think your problem is likely to be this:
client.print("GET /feed/value.json?apikey=");
client.print(apikey);
client.print("?id=32427");
separate URL parameters with "&" ...
Re: Remote Control Relay with emoncms.org and Arduino
Aaaaaargh !
Thank you very much ! Problem solved !
before:
client.print("?id=32427");
after:
client.print("&id=32427");
Re: Remote Control Relay with emoncms.org and Arduino
Hi, I also want to do something like this. I tried another approach: From a webpage I send an update to a specific input according the Input API helper via e.g.
http://emoncms/emoncms/input/post.json?node=30&json={setStatus:1,setpoint1:1000,setpoint2:550,setpoint3:400}
to modify setpoint inputs in my local emoncms installation. These inputs are processed into feeds as usual.
Then I did a little hacking in the paketgen_module.php so that I can define variables there to grap a diven feed value and broadcast it to all nodes that are interested in. This sounds a little bit cumbersome but it gives a bit more flexibility by getting different ways to modify setpoints: 1) via API call as above 2) from a room thermostat like node that has up and down buttons to modify setpoint inputs and feeds via the RFM12 payload.
Another node, receiving the setpoint values from emoncms, than controls the heater. With that way you don't need network capabilities on your arduino, only a simple emontx node with RFM12.
I hope my description is understandable.
A.


# Decode streams into strings The Right Way(tm)
```javascript var fs = require(‘fs’) var zlib = require(‘zlib’) var strs = require(‘stringstream’)
- var utf8Stream = fs.createReadStream(‘massiveLogFile.gz’)
- .pipe(zlib.createGunzip()) .pipe(strs(‘utf8’))
No need to deal with setEncoding() weirdness, just compose streams like they were supposed to be!
Handles input and output encoding:
```javascript // Stream from utf8 to hex to base64... Why not, ay. var hex64Stream = fs.createReadStream(‘myFile’)
.pipe(strs(‘utf8’, ‘hex’)) .pipe(strs(‘hex’, ‘base64’))
Also deals with base64 output correctly by aligning each emitted data chunk so that there are no dangling = characters:
```javascript var stream = fs.createReadStream(‘myFile’).pipe(strs(‘base64’))
var base64Str = ‘’
stream.on(‘data’, function(data) { base64Str += data }) stream.on(‘end’, function() {
console.log(‘My base64 encoded file is: ‘ + base64Str) // Wouldn’t work with setEncoding() console.log(‘Original file is: ‘ + new Buffer(base64Str, ‘base64’))


checkgrad(self,
verbose=0,
step=1e-06,
tolerance=0.001,
df_tolerance=1e-12)
| source code
|
Check the gradient of this parameter with respect to the highest
parent's objective function. This is a three point estimate of the
gradient, wiggling at the parameters with a stepsize step. The check
passes if either the ratio or the difference between numerical and
analytical gradient is smaller then tolerance.
:param bool verbose: whether each parameter shall be checked
individually. :param float step: the stepsize for the numerical three
point gradient estimate. :param float tolerance: the tolerance for the
gradient ratio or difference. :param float df_tolerance: the tolerance
for df_tolerance
.. note:
The *dF_ratio* indicates the limit of accuracy of numerical gradients.
If it is too small, e.g., smaller than 1e-12, the numerical gradients
are usually not accurate enough for the tests (shown with blue).
|


Salary Calculator
Add New Employee
Submit
All Employees
First Name
Last Name
ID
Title
Annual Salary
Total Monthly Cost: $0.00


Usable UIs for Semantic Text Composition
Seed
Kaiserslautern
Kaiserslautern
is a beautiful city.
City
Kaiserslautern is a city in southwest Germany, located in the Bundesland (State) of Rhineland-Palatinate ...


--- layout: demo title: Demo docs: popovers ---
This is a popover!
This is a popover! Unfortunately we don't have exact positioning yet.


Amazing city life, unbelieavable nature, sandy beaches - you will never get enough of this place.
Book your flight!Such unbelievable sites, and a culture that you will fall in love with. No go on, have the trip of a lifetime!
Book your flight!By the sounds of it you'd have a great time hanging for a week, it's seriously majestic.
 Hit the slopes and then do some bar hopping through the village.
Book a place!


--- layout: post status: publish published: true title: The Moth Whisperer author: display_name: Andy login: Andy email<EMAIL_ADDRESS>url: '' author_login: Andy author_email<EMAIL_ADDRESS>wordpress_id: 732 wordpress_url: http://ivyenvy.com/?p=732 date: '2009-04-29 17:48:05 +0000' date_gmt: '2009-04-29 23:48:05 +0000' categories: - Starting Pitching tags: - Ted Lilly - TLFC comments: [] ---
Artemis, Aslan, Gandalf, and Ted Lilly. All of them can commune with wild animals, but only one has the ability to throw a cliff-hanging curve ball and plow hapless catchers trying to guard the plate. In last night's game against the Diamondbacks, Ted Lilly caught a moth and surreptitiously placed it on Gerald Perry's hat. So add talking to animals to the prodigious list of skills that Ted possesses--check the TLFC for more info on all things TL.
I'm so glad I missed most of today's game due to work. As my grandpa would say, "Nelly, bar the door!"


SCROLL DOWN TO LAUNCH
Made By Joshua Franklin
For The Moonwalk Quarantine Competition
At CU Boulder
The End
Start Over


{% extends "base.html" %} {% load static %} {% load crispy_forms_tags %} {% block content %} Your email sent to {{ submittersemail }}. A saved copy in the Send Email admin. Return to admin panel {% endblock content %}
Your email sent to {{ submittersemail }}. A saved copy in the Send Email admin.


{% load demo_tags wagtailcore_tags %} {% get_site_root as site_root %} {# Implementation of bootstrap theme dropdown menu - shows top level links and their children #}


sprint three - technical: JavaScript, the DOM, and DevTools
30 April 2020
This blog should strengthen your understanding of:
- JavaScript and its relationship to HTML and CSS
- Control flow and loops, arrays and objects
- Functions and why they are useful
- The DOM and DevTools
An analogy to describe the differences between HTML and CSS
The more I read, observe others code, and play around with HTML, CSS, and JavaScript, the more I begin to truly see the amazing power that lies in these three technologies. HTML (Hyper Text Mark-up Language), CSS (Cascading Style Sheets), and JavaScript (also known as ECMAScript) are the 3 key, foundational tools one needs to understand to create amazing websites.
When thinking of a way to describe HTML and CSS, I think of a trip to the Whitsunday's in Central Queensland. On this trip I went scuba diving at the great barrier reef. And when I think of the great barrier reef I think of 'Finding Nemo'. I see this large structure and framework of living coral, strong, sturdy, but adaptable. Then I see the various fishes, and sea creatures and plants that beautify the vast structure of the coral. Two separate things, but together they become one big living thriving organism. With structure, beauty and function.
Like the coral and sea creatures of the Great Barrier Reef, HTML and CSS are both very much separate technologies, but go hand-in-hand to create a truly marvelous collaboration of structure, functionality, and style.
HTML provides the Semantic structure and meaning to the content of our website/web-app. This is done through the form of < tags>, these < tags> to inform other web technologies, frameworks, and languages the meaning of our information.
CSS builds upon the structure of HTML to bring color and style to our HTML. This is done through the use of CSS Syntax.
You have a selector ie a < h1> HTML tag followed by open a closed curly braces '{}', inside these curly braces we have a declaration which is made up of a property ie color, followed by a colon, followed by a value ie a color 'blue'. This selector and declaration is then interpreted by the browser to provide the color and style to our content.
Explain control flow and loops
In programming languages like Javascript, when we run the code, it is read from left-to-right top-to-bottom. In these languages we are able to use commands to manipulate the flow of how our lines of our code are utilized. In JavaScript and many other languages these are called loops.
A loop allows us to re-use the same code time and time again to work through a problem. A typical loop is setup around a true-false conditional expression. If said conditional is true then run this line of code.
We can think of this as driving our vehicle to work. We start off at home with a set distance to work say 20km, we can drive our car to the end of the drive way to the road and we have a conditional expression, is the distance to work to the left less than the the distance to work from the right. If this is true, then we turn left, if false then we turn right, we then have a counter set to the current distance to work. At each subsequent intersection we run the conditional expression. We will continue to run this series of conditional expressions until the distance to work is equal to 0.
Describe what the DOM is and an example of how you might interact with it
The DOM (Document Object Model) is the browsers way of structuring the HTML mark-up, CSS, and JS in a away that the Browser understands, and then represents these values as a visual representation in the browser window, this is what you see when you enter 'www.google.com'.
In the Browsers DevTools we are able to access and view the DOM within the browser window. In this we are able to select the specific CSS selectors and change them to represent a different value ie from 'blue' to 'green'. We can also use the DevTools and scripting files (ie JavaScript) to change how the content interacts through the use of 'DOM elements'.
You could use these interactions in a away where you are adding an item to a list, JavaScript can manipulate the DOM to add an additional < div> with specific styling, and text content. JavaScript can also be used to delete an item in the same list. All of this is done without the webpage needing to be refreshed or reloaded.
Explain the difference between accessing data from arrays and objects
An Array is a collection of data types, for example: - Strings: 'hello world' - Boolean: true false - numbers: 256 let beautiful = ['blood', 'sweat', 'tears'];
You can access a value inside the array through referencing it's index. Arrays use an index of 0 ie array[0] See example: console.log(beautiful[2]) // returns 'tears' An Object is accessed by calling it's property using two different syntaxes. Dot notation, and using [] square brackets. let object { property: 'value' } Dot notation as follows: let propertyValue = object.property // returns 'value' or with square brackets: let propertyValue = object['property'] // returns 'value'
- sprint one - technical: The Story of Te Houtaewa
- sprint one - core: identity, values and strengths
- sprint two - technical: classes vs. ids
- sprint two - core: learning reflections
- sprint three - core: emotional intelligence
- sprint three - technical: JavaScript, the DOM, and DevTools
- sprint four - core: neuroplasticity and growth mindset
- sprint four - technical: problem solving


Public Member Functions | |
Constructors | |
| MemBufInputSource (const XMLByte *const srcDocBytes, const XMLSize_t byteCount, const XMLCh *const bufId, const bool adoptBuffer=false, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) | |
| A memory buffer input source is constructed from a buffer of byte data, and the count of bytes in that buffer. | |
| MemBufInputSource (const XMLByte *const srcDocBytes, const XMLSize_t byteCount, const char *const bufId, const bool adoptBuffer=false, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) | |
| This constructor is identical to the previous one, except that it takes the fake system id in local code page form and transcodes it internally. | |
Destructor | |
| ~MemBufInputSource () | |
| If the buffer was adopted, the copy made during construction is deleted at this point. | |
Virtual methods | |
| BinInputStream * | makeStream () const |
| This method will return a binary input stream derivative that will parse from the memory buffer. | |
Setter methods | |
| void | setCopyBufToStream (const bool newState) |
| By default, for safety's sake, each newly created stream from this input source will make its own copy of the buffer to stream from. | |
| void | resetMemBufInputSource (const XMLByte *const srcDocBytes, const XMLSize_t byteCount) |
| This methods allows the MemBufInputSource to be used for more than one input source, instead of destructing/constructing another MemBufInputSource. |
It provides for the parser access to data stored in a memory buffer. The type of buffer and its host specific attributes are of little concern here. The only real requirement is that the memory be readable by the current process.
Note that the memory buffer size is expressed in bytes, not in characters. If you pass it text data, you must account for the bytes per character when indicating the buffer size.
As with all InputSource derivatives. The primary objective of an input source is to create an input stream via which the parser can spool in data from the referenced source. In this case, there are two options available.
The passed buffer can be adopted or merely referenced. If it is adopted, then it must be dynamically allocated and will be destroyed when the input source is destroyed (no reference counting!.) If not adopted, the caller must insure that it remains valid until the input source object is destroyed.
The other option indicates whether each stream created for this input source should get its own copy of the data, or whether it should just stream the data directly from this object's copy of the data. The same rules apply here, in that the buffer must either be copied by the stream or it must remain valid until the stream is destroyed.
| MemBufInputSource::MemBufInputSource | ( | const XMLByte *const | srcDocBytes, | |
| const XMLSize_t | byteCount, | |||
| const XMLCh *const | bufId, | |||
| const bool | adoptBuffer = false , |
|||
| MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
| ) |
A memory buffer input source is constructed from a buffer of byte data, and the count of bytes in that buffer.
The parser will parse from this memory buffer until it has eaten the indicated number of bytes.
Note that the system id provided serves two purposes. Firstly it is going to be displayed in error messages as the source of the error. And secondly, any entities which are referred to from this entity via relative paths/URLs will be relative to this fake system id.
| srcDocBytes | The actual data buffer to be parsed from. | |
| byteCount | The count of bytes (not characters, bytes!) in the buffer. | |
| bufId | A fake system id for the buffer. | |
| adoptBuffer | Indicates whether this object should adopt the buffer (i.e. become responsible for deletion) or just use it in place. | |
| manager | Pointer to the memory manager to be used to allocate objects. |
| MemBufInputSource::MemBufInputSource | ( | const XMLByte *const | srcDocBytes, | |
| const XMLSize_t | byteCount, | |||
| const char *const | bufId, | |||
| const bool | adoptBuffer = false , |
|||
| MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
| ) |
This constructor is identical to the previous one, except that it takes the fake system id in local code page form and transcodes it internally.
| MemBufInputSource::~MemBufInputSource | ( | ) |
If the buffer was adopted, the copy made during construction is deleted at this point.
| BinInputStream* MemBufInputSource::makeStream | ( | ) | const [virtual] |
This method will return a binary input stream derivative that will parse from the memory buffer.
If setCopyBufToStream() has been set, then the stream will make its own copy. Otherwise, it will use the buffer as is (in which case it must remain valid until the stream is no longer in use, i.e. the parse completes.)
Implements InputSource.
| void MemBufInputSource::setCopyBufToStream | ( | const bool | newState | ) |
By default, for safety's sake, each newly created stream from this input source will make its own copy of the buffer to stream from.
This avoids having to deal with aliasing of the buffer for simple work. But, for higher performance applications or for large buffers, this is obviously not optimal.
In such cases, you can call this method to turn off that default action. Once turned off, the streams will just get a pointer to the buffer and parse directly from that. In this case, you must insure that the buffer remains valid for as long as any parse events are still using it.
| newState | The new boolean flag state to set. |
| void MemBufInputSource::resetMemBufInputSource | ( | const XMLByte *const | srcDocBytes, | |
| const XMLSize_t | byteCount | |||
| ) |
This methods allows the MemBufInputSource to be used for more than one input source, instead of destructing/constructing another MemBufInputSource.
| srcDocBytes | The actual data buffer to be parsed from. | |
| byteCount | The count of bytes (not characters, bytes!) in the buffer. |


How to serve content encrypted with SSE-KMS from S3 using CloudFront
This HTML was served from an S3 bucket with SSE-KMS encryption enabled.


NEW COLLECTION
Aloha Apparel Co. sells only the finest ready-to-travel clothing. Browse our current selection of products of sign-up for updates below.
Stay updated on our latest product releases, be first to find out about upcoming sales, and get free style tips from our blog. Unsubscribe at any time.


Deep Dive Code-A-Thon is a hackathon style competition. Competitors will form teams and build an app in 40 hours. The winning teams will walk away with prizes, including a first place prize $500 per person, a second place prize of $250 per person, and a third place prize of $125 sponsored by Deep Dive Coding.
How
Teams formed, mix of seniors, mids, and junior developers
Select a tech stack
40 hours to create new app
Projects will be judged by panel of senior developers
For a full list of rules and technical documentation visit the repo.
Price
$25 - Early bird tickets before September 15th
$45 - Regular price, at-the-door pricing.
All proceeds go to the Deep Dive Alumni Associaction for future events.
WHEN & WHERE
Friday
4pm to 5:30 pm - Opening Night Orientation at Free Range off central.
5:30 to 7:30pm - BlockFiesta after party at Rio Bravo Brewing Downtown.
Saturday
All Day - Code! FreeRange will be open from 8am to 5pm.
Sunday
Noon - All coding stops.
Noon to 4pm - Eat, watch presentations, judging and winners announcement, networking.


Methods
Public Class methods
[ show source ]
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 96 96: def initialize(harness, metric) 97: @harness, @metric = harness, metric 98: end
Public Instance methods
[ show source ]
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 100 100: def report 101: rate = @total / profile_options[:runs] 102: '%20s: %s' %<EMAIL_ADDRESS>@metric.format(rate)] 103: end
Protected Instance methods
[ show source ]
# File vendor/rails/activesupport/lib/active_support/testing/performance.rb, line 106 106: def output_filename 107<EMAIL_ADDRESS>108: end


Workflow¶
Overview¶
This section of the documentation discusses the steps required to run offline tracer simulations. In short, the following tasks must be accomplished :
Create impulse fields and passive tracer initial conditions for the parent model
Run the parent model to produce impulse response functions
Diagnose transport operators from the impulse and impulse response functions
Use the transport operators to run offline tracer simulations
For offline tracer simulations, FEOTS has the capability to run in either a global or regional configuration. In the regional configuration, FEOTS provides tools to extract regional transport operators from global operators.
Below, we provide the details for all of the steps in this process while describing how FEOTS global, regional, and simulation databases are created.
Create Transport Operators¶
When we discuss “transport operator diagnosis”, we specifically mean that we are diagnosing the rows and columns of a sparse matrix that is equivalent to the application of a discrete advection-diffusion operator as implemented in an ocean general circulation model (the parent model). In every time-step of the parent model, we pass a set of impulse fields through passive-tracer forward stepping. The difference in the forward-stepped field and the impulse field, divided by the parent model time step size, provides us with the columns of the transport operator matrix.
We have provided tools in FEOTS to aid in the process of impulse field generation and operator diagnosis based on these ideas. This allows you to create your own transport operator databases from an online POP model simulation.
Create a Global Database¶
If you are planning to use FEOTS to create a transport operator database, your first step is to create the global operator database scaffolding. The global operator database scaffolding refers to the directory structure that is used for storing impulse fields, the transport operator connectivity graph, the parent model global mesh, impulse response functions, transport operators, and a metadata file that describes the database.
To create a global database, you can use the provided mkdb.sh
script.
git clone https://github.com/fluidnumerics/feots.git
cd feots/scripts
export FEOTS_DBROOT=/path/to/db/root
bash ./mkdb.sh $FEOTS_DBROOT
After creating the database, we recommend that you open /path/to/db/root/metadata.json
and fill out as much of the details as you can about your operator database at this stage.
Mesh Extraction from a Parent Model¶
Almost all of the utilities in FEOTS require a NetCDF file that contains the POP Mesh information. While you can simply store the standard POP output in the global database, the standard NetCDF output contains more information than needed to support impulse field generation, operator diagnosis, and output remapping for offline simulations.
To create impulse functions and corresponding tracer fields to insert into POP for IRF diagnosis, you first need to run the parent model to create at least one output file. Then, you can use the feots popmesh
to extract the necessary POP mesh information from standard POP NetCDF output.
feots popmesh --pop-file /path/to/pop/output.nc --dbroot $FEOTS_DBROOT
Running this FEOTS command will read /path/to/pop/output.nc
, extract the necessary mesh information, and save the POP mesh file under $FEOTS_DBROOT/mesh/mesh.nc
.
Impulse Field Generation¶
An impulse field is a discrete field of 1’s and 0’s used to diagnose the sparse matrices that capture the advection-diffusion operators in the parent model. Non-zero impulse value placement depends on the domain-of-influence of the discrete advection-diffusion operators and the shape of the discrete ocean boundaries. Together, the mesh information, the parent model advection scheme, and the desire to not have impulse response fields from each grid cell overlap results in a graph coloring problem that FEOTS solves using the Greedy Algorithm.
The advection scheme is specified in the FEOTS namelist file (runtime.params). In future versions of FEOTS, the advection scheme will be read from the $FEOTS_DBROOT/metadata.json
file.
Currently, operator diagnosis is only supported for the 27-point Lax-Wendroff advection scheme on a global tripole grid.
feots impulse --dbroot $FEOTS_DBROOT --param-file /path/to/runtime.params
Parent Model Execution¶
Mask Generation¶
The first step in running a regional simulation is to create a mask file that


---
layout: post
title: 4/10, 4/11 prog
date: '2014-04-11T22:14:00.001-06:00'
author: Jacob .
tags:
- progress-reports
modified_time: '2014-05-11T11:24:23.583-06:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-7479300899581726597
blogger_orig_url: http://www.svlark.com/2014/04/410-411-prog.html
---
April's getting the photos ready to ship out for scanning (probably at Mike's). I went through our old files and have a very small file of stuff to keep; a larger one of stuff to scan (at 8 days); a big one to shred (at OfficeMax) and a big one to toss (at the dumpster).
Here is our 15 box plan:
- 4 for clothes (1 each)
- 2 for toys
- 2 for keepsakes
- 1 for games
- 1 for homeschool
- 1 for books
- 1 for kitchen stuff
- 1 for tools
- 1 for crafts
- 1 more
We are officially Mahina clients.
67 days


We almost touched on this in our post about unix time - but in this post we look at how to take an arbritary date in string format and converted it into a meaningful date in the format we want. This uses two important functions, Parse and Format, within the time package. The parse function is interesting because unlike some programming languages, to parse a date you don’t specify the date using letters (Y-m-d for example) but use a real time, this time in fact: 2006-01-02T15:04:05+07:00.
Within Go, like other languages, we have the ability to call external binaries. These allow us to do all sorts of things, but in our example we’re just going to print out our go version by calling our copy (located in /usr/local/go/bin on my computer). The Command function within the os/exec package will allow us to do this. It accepts at least one string - the name of the command/binary you’re trying to run - followed by any number of strings for it’s parameters.
This is an issue in programming when numbers are stored as strings - because as strings, when sorted alphabetically they will go by each digit, from first to last. You might encounter this problem when dealing with numbered file names, for example, which will be treated as strings but we might need to process them in order. In our example below we use both the sort and strconv packages to sort the array and convert the strings to numbers within our comparison function.
We programmers often use temporary files and this example shows how we can create and write to one. We used the ioutil package which has functions for just this. The TempFile() accepts a folder and a prefix. As the folder we get the os’ temp directory (which would be /tmp on unix systems) and for the prefix we use a string, but if we don’t want one, we just pass an empty string.
The example below shows to how to encode and then subsequently decode a string using base 64. Doing this has many uses, one of which to safely encode byte data in structures like JSON. We use the encoding/base64 package to do this, which takes in and returns a byte array into it’s EncodeToString and DecodeString methods. package main import ( "encoding/base64" "fmt" ) func main() { myString := "This is golangcode.
We’ve already covered how to download a file, but this post covers it a little further by specifying the maximum time attempted on the request. Adding timeouts are often important to stop your program coming to a halt. To do this we make our own http client, giving it our custom timeout value. We can then use this client to make our requests. If a timeout is reached, the Get() function will return with an error.
When working with any form of http communication in Go you’re going to come across scenarios where you need to know a request’s method - whether it’s a GET, POST, etc. If you’re writing an API with Go you’ll most likely have the incoming request in the form of a http.Request object. This request has Method property which allows you to get the http method in the form of a string.
This is an example of how to convert HTML code into a PDF using AWS’ Lambda service and S3 Triggers. So that once a HTML file is upload to S3 it will automatically be converted into a PDF which should appear in the same bucket shortly after - all using a serverless function. To do this, other than the standard library, we’re using a Go wkhtmltopdf library and the Go AWS sdk.
In the example below we are looking at how to take the first x number of characters from the start of a string. If we know a character we want to separate on, like a space, we can use strings.Split() instead. But for this we’re looking to get the first 6 characters as a new string. To do this we first convert it into a rune, allowing for better support in different languages and allowing us to use it like an array.
Middleware is a term used in many different ways within software development, but we’re referring to it as a way to wrap requests and responses in simple abstracted functions which can be applied to some routes easily. In our example below we’re using an AuthMiddleware to check incoming requests for the correct api key and rejecting them if they don’t. Another good example for this technique is applying headers to responses, if you know the content type of the response, we can set it in middleware.


WITNESS LIST
Public Health Committee
October 15, 2012 - 9:00 AM
Medicaid 1115 Waiver
For:
Campbell, Mike (Texas asssociation of community health centers)
Castle, Danette (Texas council of community centers)
Shaw, Walter (Dallas County Hospital District Parkland)
On:
Alaniz, Angie (Texas A&M Health Science Center)
Calhoun, Kirk (UT Health Science Center Tyler)
Deslatte, Daniel (University of Texas Health Science Center Tyler)
Dunkelberg, Anne (Center for Public Policy Priorities)
Hawkins, John (Texas Hospital Association)
Kirsch, Lisa (HHSC)
Lambrecht, Katrina (UTMB)
Long, Cynthia (Williamson County)
Olivarez, Eduardo (Hidalgo County Health and Human Services)
Pearson, David (Texas Organization of Rural & Community Hospitals)
Sperry, Bryan (Children's Hospital Association of Texas)
Traylor, Chris (HHSC)
Walton, James (Texas Medical Association & Dallas County Medical Society)
Williams, Cheryl (Collin County)
Wohlgemuth, Arlene (Texas Public Policy Foundation)
Young Brown, Patricia (Central Health, Travis County Healthcare District)
Zucker, Michael (Baptist Health System, San Antonio)
Registering, but not testifying:
For:
Almeida, Dr M Connie (Self; Fort bend county)
Garnett, Susan (Mhm r of tarrant coun56)
Young, Wayne (JPS Health Network)
On:
Cook, Sarah (Cental Health)
Knodel, Jeff (Central health)
Talbot, Sheri (Texana center)
Delivery of dental services in Medicaid
For:
Anderson, DDS, Monica (Dentaquest)
On:
Black, Rick (Self; Tx Dental Association)
Blank, Mary Jo (Dentaquest)
Cazares, Dr. Jose (Self; Texas Academy of General Dentistry)
Earle, Diane (Kool Smiles)
Hildebrand, Julie (State Board of Dental Examiners)
1
WITNESS LIST
On:
Hunke, Philip (Mcna dental insurance co)
Jones, Lisa (State Board of Dental Examiners)
Lacasa, Carlos (MCNA Insurance Company)
Rogers, Elizabeth (Texas coalition of dental support organizations)
Scott, John (Office of Attorney General)
Stick, Jack (HHSC OIG)
Traylor, Chris (HHSC)
Wilson, Douglas (HHSC)
Registering, but not testifying:
For:
Howley, Lori (DentaQuest USA Insurance Co.)
On:
Kirsch, Lisa (HHSC)
2


{% block head %}
Cavalry Fence Builder
{% endblock %}
{{ company }}
Dashboard
Customers
Projects
Accounting
Settings
View/Update Prices
View/Update Estimations
Edit Company
Change Password
Edit
New
Project
Customer
Logout
{% block content %}{% endblock %}
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.
{% block content2 %}{% endblock %}


We will predict Employee Attrition using Artificial Neural Networks.
Table of Contents
- Data Preprocessing
- Create ANN
- Make predictions
- Evaluate - Improve - Tune ANN
Part 1: Data Preprocessing
# Get data from Github and copy that in the cache
!wget https://raw.githubusercontent.com/dhruvpratapsingh/Deep-Learning/master/SupervisedDL/ANN/employee_attrition/Employee-Attrition.csv ./
If you click on “Files” tab in the left panel, you should see the .csv file.
Intuition for Cleaning the data
1. Remove a column with same value for all the rows
StandardHours
Over18
2. Remove the columns with PII(Personally identifiable information)
EmployeeID
3. Move y to start or the end column, to make things easier to slice (Optional)
Remember that in python index slicing we include the start index and exclude the end index.
Use first index i.e. 0 as y (dependent variable) and 1-32 as X (independent variables)
SOME TRICKS
- ‘print(y)’ or to see the y vector.
- ‘X.shape’ to see the shape of the matrix.
- We use Uppercase X as it is a matrix and lowercase y as it is a vector
Encoding categorical data
As the algorithms work best with numbers.
Set the display max columns to see all columns.
Columns that need to encoded:
- Attrition y[0]
- BusinessTravel X[1]
- Department X[3]
- EducationField X[6]
- Gender X[9]
- JobRole X[13]
- MaritalStatus X[15]
- OverTime X[19]
First 5 rows look something like this… rest of the columns not in the image.
Create a directory structure like below or of your preference.
2. Open Google Colaboratory.
Colaboratory is Jupyter notebook in the form of Software As A Service provided by Google.
You can select it from the options or click on “Connect more apps” if you don’t already have it as an option.
3. Mount Google Drive to Colab Notebook.
You can run linux commands by prefixing the commands with an ‘!’ exclamation.
# List the contents of the directory.
!ls -la /content/gdrive/My\ Drive/Deep\ Learning/Supervised\ Deep\ Learning/ANN/
4. Train and Test simple convnet on the MNIST dataset.
Install Keras


Dr Mahathir: We are still negotiating with Goldman
by The Edge Financial DailyKUALA LUMPUR: Malaysia is still engaging with Goldman Sachs on the amount of compensation over the 1Malaysia Development Bhd (1MDB) scandal it expects to get from the US investment bank, Tun Dr Mahathir Mohamad said yesterday.
The prime minister pointed out that Malaysia had rejected an offer from Goldman that was deemed too low, compared with its publicly stated demand of US$7.5 billion.
He did not disclose the actual sum offered by Goldman but had told the Financial Times last Friday that the US bank had proposed “something like less than US$2 billion”.
“They’ve caused us to lose about US$7 billion. They may not want to pay us that amount. Their [compensation] offer is too low, because of that we have not accepted their offer,” Bernama quoted Dr Mahathir as telling the Malaysian media yesterday in Bangkok, where he is attending the Asean Summit.
Noting that the matter is of “great public interest”, he said Malaysia will go to court if it fails to obtain a higher amount.
“How much we’re willing to accept, of course, it’s based on the negotiation, out of court negotiation. But if we cannot reach an agreement, we’ve to go to court,” he said.
In the interview with the Financial Times, Dr Mahathir said: “We are not satisfied with that amount so we are still talking to [Goldman] … If they respond reasonably we might not insist on getting that US$7.5 billion.”
Goldman raised US$6.5 billion in bonds for 1MDB in 2012 and 2013. The US bank allegedly earned RM600 million in fees from the bond issues.
Malaysia has charged Goldman and 17 current and former directors of its units under the Capital Markets and Services Act 2007 for allegedly misleading investors over the bond sales.
US authorities have said that about US$4.5 billion was siphoned from 1MDB.


{% extends "django_nova/images/base.html" %} {% block title %} - Cloud Computing{% endblock %} {% block headerjs %} {% endblock %} {% block content %}
From this page you can edit the name and description of an image that belongs to you.


HW4 Part1_A
HW4 Part1_B
HW4 Part2
HW4 Extra
Social Change Projects
CNIT 133 HOMEWORK 4 - Looping Staements EXTRA
Star Square Creator
How big side of square do you want?:


| I l@ve RuBoard |
10.1 "Tune in, Log on, and Drop out"In the last few years, the Internet has virtually exploded onto the mainstream stage. It has rapidly grown from a simple communication device used primarily by academics and researchers into a medium that is now nearly as pervasive as the television and telephone. Social observers have likened the Internet's cultural impact to that of the printing press, and technical observers have suggested that all new software development of interest occurs only on the Internet. Naturally, time will be the final arbiter for such claims, but there is little doubt that the Internet is a major force in society, and one of the main application contexts for modern software systems. The Internet also happens to be one of the primary application domains for the Python programming language. Given Python and a computer with a socket-based Internet connection, we can write Python scripts to read and send email around the world, fetch web pages from remote sites, transfer files by FTP, program interactive web sites, parse HTML and XML files, and much more, simply by using the Internet modules that ship with Python as standard tools. In fact, companies all over the world do: Yahoo, Infoseek, Hewlett-Packard, and many others rely on Python's standard tools to power their commercial web sites. Many also build and manage their sites with the Zope web application server, which is itself written and customizable in Python. Others use Python to script Java web applications with JPython (a.k.a. "Jython") -- a system that compiles Python programs to Java bytecode, and exports Java libraries for use in Python scripts. As the Internet has grown, so too has Python's role as an Internet tool. Python has proven to be well-suited to Internet scripting for some of the very same reasons that make it ideal in other domains. Its modular design and rapid turnaround mix well with the intense demands of Internet development. In this part of the book, we'll find that Python does more than simply support Internet scripts; it also fosters qualities such as productivity and maintainability that are essential to Internet projects of all shapes and sizes. 10.1.1 Internet Scripting TopicsInternet programming entails many topics, so to make the presentation easier to digest, I've split this subject over the next six chapters of this book. This chapter introduces Internet fundamentals and explores sockets, the underlying communications mechanism of the Internet. From there, later chapters move on to discuss the client, the server, web site construction, and more advanced topics. Each chapter assumes you've read the previous one, but you can generally skip around, especially if you have any experience in the Internet domain. Since these chapters represent a big portion (about a third) of this book at large, the following sections go into a few more details about what we'll be studying. <IP_ADDRESS> What we will coverIn conceptual terms, the Internet can roughly be thought of as being composed of multiple functional layers:
In this chapter and Chapter 11, our main focus is on programming the second and third layers: sockets and higher-level protocols. We'll start this chapter at the bottom, learning about the socket model of network programming. Sockets aren't strictly tied to Internet scripting, but they are presented here because this is their primary role. As we'll see, most of what happens on the Internet happens through sockets, whether you notice or not. After introducing sockets, the next chapter makes its way up to Python's client-side interfaces to higher-level protocols -- things like email and FTP transfers, which run on top of sockets. It turns out that a lot can be done with Python on the client alone, and Chapter 11 will sample the flavor of Python client-side scripting. The next three chapters then go on to present server-side scripting (programs that run on a server computer and are usually invoked by a web browser). Finally, the last chapter in this part, Chapter 15, briefly introduces even higher-level tools such as JPython and Zope. Along the way, we will also put to work some of the operating-system and GUI interfaces we've studied earlier (e.g., processes, threads, signals, and Tkinter), and investigate some of the design choices and challenges that the Internet presents. That last statement merits a few more words. Internet scripting, like GUIs, is one of the sexier application domains for Python. As in GUI work, there is an intangible but instant gratification in seeing a Python Internet program ship information all over the world. On the other hand, by its very nature, network programming imposes speed overheads and user interface limitations. Though it may not be a fashionable stance these days, some applications are still better off not being deployed on the Net. In this part of the book, we will take an honest look at the Net's trade-offs as they arise. The Internet is also considered by many to be something of an ultimate proof of concept for open source tools. Indeed, much of the Net runs on top of a large number of tools, such as Python, Perl, the Apache web server, the sendmail program, and Linux. Moreover, new tools and technologies for programming the Web sometimes seem to appear faster than developers can absorb. The good news is that Python's integration focus makes it a natural in such a heterogeneous world. Today, Python programs can be installed as client-side and server-side tools, embedded within HTML code, used as applets and servlets in Java applications, mixed into distributed object systems like CORBA and DCOM, integrated with XML-coded objects, and more. In more general terms, the rationale for using Python in the Internet domain is exactly the same as in any other: Python's emphasis on productivity, portability, and integration make it ideal for writing Internet programs that are open, maintainable, and delivered according to the ever-shrinking schedules in this field. <IP_ADDRESS> What we won't coverNow that I've told you what we will cover in this book, I should also mention what we won't cover. Like Tkinter, the Internet is a large domain, and this part of the book is mostly an introduction to core concepts and representative tasks, not an exhaustive reference. There are simply too many Python Internet modules to include each in this text, but the examples here should help you understand the library manual entries for modules we don't have time to cover. I also want to point out that higher-level tools like JPython and Zope are large systems in their own right, and they are best dealt with in more dedicated documents. Because books on both topics are likely to appear soon, we'll merely scratch their surfaces here. Moreover, this book says almost nothing about lower-level networking layers such as TCP/IP. If you're curious about what happens on the Internet at the bit-and-wire level, consult a good networking text for more details. <IP_ADDRESS> Running examples in this part of the bookInternet scripts generally imply execution contexts that earlier examples in this book have not. That is, it usually takes a bit more to run programs that talk over networks. Here are a few pragmatic notes about this part's examples up front:
When a Python script opens an Internet connection (with the socket or protocol modules), Python will happily use whatever Internet link exists on your machine, be that a dedicated T1 line, a DSL line, or a simple modem. For instance, opening a socket on a Windows PC automatically initiates processing to create a dial-up connection to your Internet Service Provider if needed (on my laptop, a Windows modem connection dialog automatically pops up). In other words, if you have a way to connect to the Net, you likely can run programs in this chapter. Moreover, as long as your machine supports sockets, you probably can run many of the examples here even if you have no Internet connection at all. As we'll see, a machine name "localhost" or "" usually means the local computer itself. This allows you to test both the client and server sides of a dialog on the same computer without connecting to the Net. For example, you can run both socket-based clients and servers locally on a Windows PC without ever going out to the Net. Some later examples assume that a particular kind of server is running on a server machine (e.g., FTP, POP, SMTP), but client-side scripts work on any Internet-aware machine with Python installed. Server-side examples in Chapter 12, Chapter 13, and Chapter 14 require more: you'll need a web server account to code CGI scripts, and you must download advanced third-party systems like JPython and Zope separately (or find them by viewing http://examples.oreilly.com/python2).
|
| I l@ve RuBoard |


A program cannot necessarily imbue a new locale on a stream or stream buffer at any particular time. Problems are likely if a new locale is imbued on a stream buffer with a state-dependent code conversion, since the buffer might very well be in the middle of a state-dependent conversion. In such a situation, the code conversion facet contained in the new locale would likely be at loose ends indeed. To avoid problems, follow these guidelines for imbuing locales:
A new locale can always be imbued immediately after construction of a stream or stream buffer, in other words, before any other operation is attempted.
A new locale can always be imbued after an operation that flushes the stream buffer.


David Fang
Frontend developer
My email and contact information is at
<EMAIL_ADDRESS>. My github page is at
https://github.com/dafang3
.
I am a student of San Francisco State University studying for my degree in Computer Science.


#include <md5.h>
Definition at line 46 of file md5.h.
Definition at line 48 of file md5.h.
Definition at line 45 of file md5.h.
Definition at line 47 of file md5.h.


Academics
As my mother was raised in a small Nova Scotian village, the decision was made to send my sister and I through the french first language school board. I graduated in June 2015 from l'École Secondaire Catholique Monseigneur Bruyère in London, Ontario and am currently studying Systems Design Engineering at the University of Waterloo. As I am bilingual, I consider myself Francophone and am proud of both my French and Dutch heritage. As for schooling, I have always excelled in math and design. Thus the reasoning behind entering engineering.
Systems Design fit my needs perfectly as it incorporates both the Mechanical practices as well as the Software implementation of what would normally be two seperate degrees. As of now, I am unsure which field I wish to enter, but I am willing and looking forward to giving my all towards any project thrown my way.


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use SuperCSVException | |
|---|---|
| org.supercsv.cellprocessor | This package is placeholder for the CellProcessor classes confined to pure processing/conversion/parsing. |
| org.supercsv.cellprocessor.constraint | This package is placeholder for the CellProcessor classes confined to those who set up constraints. |
| org.supercsv.exception | This package defines the SuperCSV specific exceptions that may be thrown. |
| org.supercsv.io | The IO package contains various reader/writers for reading/writing strings, maps or objects (POJO beans). |
| org.supercsv.util | The util package contains various utility methods used by BestCSV |
| Uses of SuperCSVException in org.supercsv.cellprocessor |
|---|
| Methods in org.supercsv.cellprocessor that throw SuperCSVException | |
|---|---|
Object |
FmtBool.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
FmtDate.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
FmtNumber.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
HashMapper.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseBigDecimal.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseBool.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseDate.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseDouble.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseInt.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ParseLong.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
StrReplace.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
| Uses of SuperCSVException in org.supercsv.cellprocessor.constraint |
|---|
| Methods in org.supercsv.cellprocessor.constraint that throw SuperCSVException | |
|---|---|
protected void |
Required.addValues(int... requiredHashcodes)
Deprecated. |
protected void |
Strlen.addValues(int... requiredLengths)
Ensure we only memorize valid lengths |
Object |
DMinMax.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
ForbidSubStr.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
IsIncludedIn.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
LMinMax.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
RequireSubStr.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
Required.execute(Object value,
CSVContext context)
Deprecated. This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
Strlen.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
Unique.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
Object |
UniqueHashCode.execute(Object value,
CSVContext context)
This method is invoked by the framework when the processor needs to process data or check constraints. |
| Uses of SuperCSVException in org.supercsv.exception |
|---|
| Subclasses of SuperCSVException in org.supercsv.exception | |
|---|---|
class |
ClassCastInputCSVException
This exception is raised by processors when receiving a value with a type different than the one expected |
class |
NullInputException
Wraps the NullPouinterException to ensure only SuperCSVException's are thrown from cell processors. |
class |
SuperCSVReflectionException
Wraps the following reflection related checked exceptions: ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException |
| Uses of SuperCSVException in org.supercsv.io |
|---|
| Methods in org.supercsv.io that throw SuperCSVException | ||
|---|---|---|
|
ICsvBeanReader.read(Class<T> clazz,
String[] nameMapping,
CellProcessor... processors)
Read a line of a csv file and populate a bean with the data. |
|
|
CsvBeanReader.read(Class<T> clazz,
String[] nameMapping,
CellProcessor[] processors)
Read a line of a csv file and populate a bean with the data. |
|
Map<String,? super Object> |
ICsvMapReader.read(String[] nameMapping,
CellProcessor[] processors)
Read a line into a map of any type converting the strings to types |
|
boolean |
ITokenizer.readStringList(List<String> result)
Read a csv line into the list result (can span multiple lines in the file) The result list is cleared as the first thing in the method |
|
void |
CsvMapWriter.write(Map<String,? extends Object> source,
String[] nameMapping,
CellProcessor[] processor)
Write a line from a map converting processing the values before writing |
|
void |
ICsvListWriter.write(Object... content)
Plain writing a list of Objects. |
|
void |
ICsvListWriter.write(String... content)
Plain writing a list of strings If the array is empty, an exception will be thrown to signal a possible error in the user code |
|
void |
AbstractCsvWriter.writeHeader(String... header)
Write a string array as a header. |
| Uses of SuperCSVException in org.supercsv.util |
|---|
| Methods in org.supercsv.util that throw SuperCSVException | |
|---|---|
static void |
Util.processStringList(List<? super Object> destination,
List<? extends Object> source,
CellProcessor[] processors,
int lineNo)
A function which given a list of strings, process each cell using its corresponding processor-chain from the processor array and return the result as an arary Can be extended so the safety check is cached in case the same two arrays are used on several requests |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


A mountain is a large landform that rises above the surrounding land in a limited area, usually in the form of a peak. A mountain is generally steeper than a hill. Mountains are formed through tectonic forces or volcanism. These forces can locally raise the surface of the earth.
High elevations on mountains produce colder climates than at sea level. These colder climates strongly affect the ecosystems of mountains: different elevations have different plants and animals. Because of the less hospitable terrain and climate, mountains tend to be used less for agriculture and more for resource extraction and recreation, such as mountain climbing.
The highest mountain on Earth is Mount Everest in the Himalayas of Asia, whose summit is 8,850 m (29,035 ft) above mean sea level. The highest known mountain on any planet in the Solar System is Olympus Mons on Mars at 21,171 m (69,459 ft).


A building’s climate impact results from the fuels used to power, heat, and cool it.
See how this building’s climate impact compares to buildings of the same primary use:
<% } else { %>See the breakdown of different fuel types contributing to citywide GHG emissions:
<% } %>We don't have enough data to show fuel use for this building.
<% } else { %><%= totals.emissions %> MT CO2E is the equivalent of <%= cars %> passenger vehicles driven for one year.
Of these passenger vehicles <% _.each(fuels, function(fuel, i) { %> <%= fuel.emissions.cars %> are attributable to <%= fuel.label.toLowerCase() %><% if (i <= fuels.length - 2) { %>, <% } else if (i === fuels.length - 1) { %>. <% } %> <% if (i === fuels.length - 2) { %> and <% } %> <% }); %>
<% } %>


Work Experience
IT Assistant at ETH Zurich
• Creating cli tools for digital long term archiving
• Usage of python frameworks such as pandas
• Independent project design and co-determination of the tools to be integrated
• Work with large data and a lot of data formats
• Working with Git and using bash as a main shell
Project Assistant in Property & Casualty
During my time in the Product Development Team I've supported the PO
as a ‘right hand’ for the new DRIVE product:
• Participating in meetings and supplying the PO with information
• Working in a packed schedule
• Agile working with other branches
• Fast gathering of information and compiling it in presentations
Summer Intern at Client Services
In the Swiss headquater, I manage payments with other students on
cases of damaged wehicles:
• Evaluating cases and authorize payments
• Offering support for customers on the phone


Call our Intake Coordinator, Junie Ryan, at<PHONE_NUMBER>
Or connect via e-mail at thebestresort@resorts.yes


An output describes part of the compositor geometry.
More...
|
| enum | wl_output_subpixel {
WL_OUTPUT_SUBPIXEL_UNKNOWN = 0,
WL_OUTPUT_SUBPIXEL_NONE = 1,
WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2,
WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3,
WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4,
WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5
} |
| | subpixel geometry information More...
|
| |
| enum | wl_output_transform {
WL_OUTPUT_TRANSFORM_NORMAL = 0,
WL_OUTPUT_TRANSFORM_90 = 1,
WL_OUTPUT_TRANSFORM_180 = 2,
WL_OUTPUT_TRANSFORM_270 = 3,
WL_OUTPUT_TRANSFORM_FLIPPED = 4,
WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5,
WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6,
WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7
} |
| | transform from framebuffer to output More...
|
| |
| enum | wl_output_mode { WL_OUTPUT_MODE_CURRENT = 0x1,
WL_OUTPUT_MODE_PREFERRED = 0x2
} |
| | mode information More...
|
| |
|
| static void | wl_output_send_geometry (struct wl_resource *resource_, int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, int32_t subpixel, const char *make, const char *model, int32_t transform) |
| | Sends an geometry event to the client owning the resource. More...
|
| |
| static void | wl_output_send_mode (struct wl_resource *resource_, uint32_t flags, int32_t width, int32_t height, int32_t refresh) |
| | Sends an mode event to the client owning the resource. More...
|
| |
| static void | wl_output_send_done (struct wl_resource *resource_) |
| | Sends an done event to the client owning the resource. More...
|
| |
| static void | wl_output_send_scale (struct wl_resource *resource_, int32_t factor) |
| | Sends an scale event to the client owning the resource. More...
|
| |
An output describes part of the compositor geometry.
The compositor works in the 'compositor coordinate system' and an output corresponds to a rectangular area in that space that is actually visible. This typically corresponds to a monitor that displays part of the compositor space. This object is published as global during start up, or when a monitor is hotplugged.
◆ WL_OUTPUT_DONE_SINCE_VERSION
| #define WL_OUTPUT_DONE_SINCE_VERSION 2 |
◆ WL_OUTPUT_GEOMETRY_SINCE_VERSION
| #define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 |
◆ WL_OUTPUT_MODE_SINCE_VERSION
| #define WL_OUTPUT_MODE_SINCE_VERSION 1 |
◆ WL_OUTPUT_RELEASE_SINCE_VERSION
| #define WL_OUTPUT_RELEASE_SINCE_VERSION 3 |
◆ WL_OUTPUT_SCALE_SINCE_VERSION
| #define WL_OUTPUT_SCALE_SINCE_VERSION 2 |
◆ wl_output_mode
mode information
These flags describe properties of an output mode. They are used in the flags bitfield of the mode event.
| Enumerator |
|---|
| WL_OUTPUT_MODE_CURRENT | indicates this is the current mode
|
| WL_OUTPUT_MODE_PREFERRED | indicates this is the preferred mode
|
◆ wl_output_subpixel
subpixel geometry information
This enumeration describes how the physical pixels on an output are laid out.
| Enumerator |
|---|
| WL_OUTPUT_SUBPIXEL_UNKNOWN | unknown geometry
|
| WL_OUTPUT_SUBPIXEL_NONE | no geometry
|
| WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB | horizontal RGB
|
| WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR | horizontal BGR
|
| WL_OUTPUT_SUBPIXEL_VERTICAL_RGB | vertical RGB
|
| WL_OUTPUT_SUBPIXEL_VERTICAL_BGR | vertical BGR
|
◆ wl_output_transform
transform from framebuffer to output
This describes the transform that a compositor will apply to a surface to compensate for the rotation or mirroring of an output device.
The flipped values correspond to an initial flip around a vertical axis followed by rotation.
The purpose is mainly to allow clients to render accordingly and tell the compositor, so that for fullscreen surfaces, the compositor will still be able to scan out directly from client surfaces.
| Enumerator |
|---|
| WL_OUTPUT_TRANSFORM_NORMAL | no transform
|
| WL_OUTPUT_TRANSFORM_90 | 90 degrees counter-clockwise
|
| WL_OUTPUT_TRANSFORM_180 | 180 degrees counter-clockwise
|
| WL_OUTPUT_TRANSFORM_270 | 270 degrees counter-clockwise
|
| WL_OUTPUT_TRANSFORM_FLIPPED | 180 degree flip around a vertical axis
|
| WL_OUTPUT_TRANSFORM_FLIPPED_90 | flip and rotate 90 degrees counter-clockwise
|
| WL_OUTPUT_TRANSFORM_FLIPPED_180 | flip and rotate 180 degrees counter-clockwise
|
| WL_OUTPUT_TRANSFORM_FLIPPED_270 | flip and rotate 270 degrees counter-clockwise
|
◆ wl_output_send_done()
| static void wl_output_send_done |
( |
struct wl_resource * |
resource_ | ) |
|
|
inlinestatic |
Sends an done event to the client owning the resource.
- Parameters
-
| resource_ | The client's resource |
◆ wl_output_send_geometry()
| static void wl_output_send_geometry |
( |
struct wl_resource * |
resource_, |
|
|
int32_t |
x, |
|
|
int32_t |
y, |
|
|
int32_t |
physical_width, |
|
|
int32_t |
physical_height, |
|
|
int32_t |
subpixel, |
|
|
const char * |
make, |
|
|
const char * |
model, |
|
|
int32_t |
transform |
|
) |
| |
|
inlinestatic |
Sends an geometry event to the client owning the resource.
- Parameters
-
| resource_ | The client's resource |
| x | x position within the global compositor space |
| y | y position within the global compositor space |
| physical_width | width in millimeters of the output |
| physical_height | height in millimeters of the output |
| subpixel | subpixel orientation of the output |
| make | textual description of the manufacturer |
| model | textual description of the model |
| transform | transform that maps framebuffer to output |
◆ wl_output_send_mode()
| static void wl_output_send_mode |
( |
struct wl_resource * |
resource_, |
|
|
uint32_t |
flags, |
|
|
int32_t |
width, |
|
|
int32_t |
height, |
|
|
int32_t |
refresh |
|
) |
| |
|
inlinestatic |
Sends an mode event to the client owning the resource.
- Parameters
-
| resource_ | The client's resource |
| flags | bitfield of mode flags |
| width | width of the mode in hardware units |
| height | height of the mode in hardware units |
| refresh | vertical refresh rate in mHz |
◆ wl_output_send_scale()
| static void wl_output_send_scale |
( |
struct wl_resource * |
resource_, |
|
|
int32_t |
factor |
|
) |
| |
|
inlinestatic |
Sends an scale event to the client owning the resource.
- Parameters
-
| resource_ | The client's resource |
| factor | scaling factor of output |


{% extends '_base.html' %} {% load crispy_forms_tags %} {% block title %}Password Reset Done{% endblock %} {% block content %}
We have sent you an e-mail. Please contact us if you do not receive it in a few minutes.


| Path: | vendor/plugins/schema_validations/README |
| Last Update: | Fri Aug 10 12:00:05 CEST 2007 |
Schema Validations is a plugin that reads various constraints defined against columns in your database and applies the closest matching rails validation. (Ala Dave Thomas’ Keynote.)
Over and above installing the plugin, no further action is required for the validations to take effect; the database schema constraints will be read and applied as validations when your ActiveRecord model classes are loaded; just like magic.
The plugin supports the following constraints:
For multi-column unique indexes the column validated for uniqueness is either the last column not ending in ‘_id’ or simply the last column. This follows the typical composite unique index column ordering where the scoping is specified first but will attempt to find the last non-foreign-key column just-in-case.
For example, either of the following two statements in a schema migration script:
add_index :states, [:country_id, :name], :unique => true add_index :states, [:name, :country_id], :unique => true
would result in:
validates_uniqueness_of :name, :scope => [:country_id]
Validation may be limited to specific columns by calling schema_validations from within your model class, passing either a single column:
class Country < ActiveRecord::Base schema_validations :only => :name end
or an array of columns:
class Country < ActiveRecord::Base schema_validations :except => [:isocode, :iddcode] end
This plugin is copyright 2006 by RedHill Consulting, Pty. Ltd. and is released under the MIT license.


Startup Weekend is a global network of passionate leaders and entrepreneurs on a mission to inspire, educate, and empower individuals, teams and communities. Come share ideas, form teams, and launch startups.
We're excited to bring you the second Startup
Weekend uOttawa! This exclusive edition of Startup Weekend is for current uOttawa students,
and recent graduates. Our goal is to connect students across all faculties to encourage and
promote entrepreneurship regardless of discipline of study. We look forward to seeing the different
types of innovative ideas that can come to life when students branch out and connect with those
around them with different skill sets and areas of expertise.
In an effort to make the event more accessible to students and alumni, Telfer School of Management
has subsidized the tickets.In terms of format and timelines, the event will be very similar to the
events in the past that we have put on. We hope to see you out there and welcome you to send any and
all questions to ottawa@startupweekend.org.


OpenAI,
Reinforcement
Learning,
Policy
Optimization,
Notebook
]
Introduction Paper: Proximal Policy Optimization Algorithms
Authors: John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, Oleg Klimov
Introduction Paper: Emergence of Locomotion Behaviours in Rich Environments
Authors: Nicolas Heess, Dhruva TB, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, S. M. Ali Eslami, Martin Riedmiller, David Silver
In July 2017, DeepMind and OpenAI post articles on PPO (Proximal Policy Optimization) on arXiv respectively, i.e., OpenAI’s “Proximal Policy Optimization Algorithms” and DeepMind’s “Emergence of Locomotion Behaviours in Rich Environments”. PPO is usually considered to be the approximate algorithm of TRPO (Trust Region Policy Optimization), which is more adaptable to large-scale operations. DeepMind’s article also proposed Distributed PPO for distributed training. In this post, I will start with TRPO.
TRPO was proposed due to the idea that we should avoid parameter updates that change the policy too much at one step so as to improve training stability. Hence, TRPO takes this into consideration by enforcing a KL divergence constraint on the size of policy update at each iteration. In previous literature, suppose the strategy is controlled by the parameter, and the goal of each optimization is to find the divergence within a certain range:
Removing some complicated procedure, TRPO uses the following approximates:
Hence, the objective function becomes the following form from TRPO algorithm. In particular, we can still separate the algorithm procedure into off-policy and on-policy:
As introduced above, TRPO aims to maximize the objective function subject to, trust region constraint which enforces the distance between old and new policies measured by KL-divergence to be small enough, within a parameter:
PPO can be viewed as an approximation of TRPO, but unlike TRPO, which uses a second-order Taylor expansion, PPO uses only a first-order approximation, which makes PPO very effective in RNN networks and in a wide distribution space.
The first half of Estimate Advantage is obtained through the rollout strategy, and the second half of V is obtained from a value network. (Value network can be trained by the data obtained by rollout, where the mean square error is used).
Here, a > 1, when KL divergence is greater than expected, it will increase the weight of KL divergence in J(PPO) to reduce KL divergence. In this way the control training is maintained within a certain KL divergence change.
When updating Actors, there are actually two ways, one is to update with the KL penalty as we discussed earlier.
There is also a clipped surrogate objective, mentioned from OpenAI’s PPO paper.
import torch
import torch.nn as nn
from torch.distributions import Categorical
import gym, os
from itertools import count
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
import numpy as np
import pdb
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
class Model(nn.Module):
def __init__(self, state_dim, action_dim, n_latent_var):
super(Model, self).__init__()
self.affine = nn.Linear(state_dim, n_latent_var)
# actor
self.action_layer = nn.Sequential(
nn.Linear(state_dim, n_latent_var),
nn.Tanh(),
nn.Linear(n_latent_var, n_latent_var),
nn.Tanh(),
nn.Linear(n_latent_var, action_dim),
nn.Softmax(dim = -1)
)
# critic
self.value_layer = nn.Sequential(
nn.Linear(state_dim, n_latent_var),
nn.Tanh(),
nn.Linear(n_latent_var, n_latent_var),
nn.Tanh(),
nn.Linear(n_latent_var, 1)
)
# Memory:
self.actions = []
self.states = []
self.logprobs = []
self.state_values = []
self.rewards = []
def forward(self, state, action=None, evaluate=False):
# if evaluate is True then we also need to pass an action for evaluation
# else we return a new action from distribution
if not evaluate:
state = torch.from_numpy(state).float().to(device)
state_value = self.value_layer(state)
action_probs = self.action_layer(state)
action_distribution = Categorical(action_probs)
if not evaluate:
action = action_distribution.sample()
self.actions.append(action)
self.logprobs.append(action_distribution.log_prob(action))
self.state_values.append(state_value)
if evaluate:
return action_distribution.entropy().mean()
if not evaluate:
return action.item()
def clearMemory(self):
del self.actions[:]
del self.states[:]
del self.logprobs[:]
del self.state_values[:]
del self.rewards[:]
class PPO:
def __init__(self, state_dim, action_dim, n_latent_var, lr, betas, gamma, K_epochs, eps_clip):
self.lr = lr
self.betas = betas
self.gamma = gamma
self.eps_clip = eps_clip
self.K_epochs = K_epochs
self.policy = Model(state_dim, action_dim, n_latent_var).to(device)
self.optimizer = torch.optim.Adam(self.policy.parameters(),
lr=lr, betas=betas)
self.policy_old = Model(state_dim, action_dim, n_latent_var).to(device)
self.MseLoss = nn.MSELoss()
def update(self):
# Monte Carlo estimate of state rewards:
rewards = []
discounted_reward = 0
for reward in reversed(self.policy_old.rewards):
discounted_reward = reward + (self.gamma * discounted_reward)
rewards.insert(0, discounted_reward)
# Normalizing the rewards:
rewards = torch.tensor(rewards).to(device)
rewards = (rewards - rewards.mean()) / (rewards.std() + 1e-5)
# convert list in tensor
old_states = torch.tensor(self.policy_old.states).to(device).detach()
old_actions = torch.tensor(self.policy_old.actions).to(device).detach()
old_logprobs = torch.tensor(self.policy_old.logprobs).to(device).detach()
# Optimize policy for K epochs:
for _ in range(self.K_epochs):
# Evaluating old actions and values :
dist_entropy = self.policy(old_states, old_actions, evaluate=True)
# Finding the ratio (pi_theta / pi_theta__old):
logprobs = self.policy.logprobs[0].to(device)
ratios = torch.exp(logprobs - old_logprobs.detach())
# Finding Surrogate Loss:
state_values = self.policy.state_values[0].to(device)
advantages = rewards - state_values.squeeze().detach()
surr1 = ratios * advantages
surr2 = torch.clamp(ratios, 1-self.eps_clip, 1+self.eps_clip) * advantages
loss = -torch.min(surr1, surr2) + 0.5*self.MseLoss(state_values, rewards) - 0.01*dist_entropy
# take gradient step
self.optimizer.zero_grad()
loss.mean().backward()
self.optimizer.step()
self.policy.clearMemory()
self.policy_old.clearMemory()
# Copy new weights into old policy:
self.policy_old.load_state_dict(self.policy.state_dict())
############## Hyperparameters ##############
env_name = "LunarLander-v2"
#env_name = "CartPole-v1"
# creating environment
env = gym.make(env_name)
state_dim = env.observation_space.shape[0]
action_dim = 4
render = False
log_interval = 10
n_latent_var = 64 # number of variables in hidden layer
n_update = 2 # update policy every n episodes
lr = 0.0007
betas = (0.9, 0.999)
gamma = 0.99 # discount factor
K_epochs = 5 # update policy for K epochs
eps_clip = 0.2 # clip parameter for PPO
random_seed = None
#############################################
if random_seed:
torch.manual_seed(random_seed)
env.seed(random_seed)
ppo = PPO(state_dim, action_dim, n_latent_var, lr, betas, gamma, K_epochs, eps_clip)
print(lr,betas)
# Plot duration curve:
# From http://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html
episode_durations = []
def plot_durations():
plt.figure(2)
plt.clf()
durations_t = torch.FloatTensor(episode_durations)
plt.title('Training...')
plt.xlabel('Episode')
plt.ylabel('Duration')
plt.plot(durations_t.numpy())
# Take 100 episode averages and plot them too
if len(durations_t) >= 100:
means = durations_t.unfold(0, 100, 1).mean(1).view(-1)
means = torch.cat((torch.zeros(99), means))
plt.plot(means.numpy())
plt.pause(0.001) # pause a bit so that plots are updated
running_reward = 0
avg_length = 0
for i_episode in range(1, 11):
state = env.reset()
for t in range(100): #10000
# Running policy_old:
action = ppo.policy_old(state)
state_n, reward, done, _ = env.step(action)
# Saving state and reward:
ppo.policy_old.states.append(state)
ppo.policy_old.rewards.append(reward)
state = state_n
running_reward += reward
if render:
env.render()
if done:
#print(i_episode, t)
episode_durations.append(t + 1)
plot_durations()
break
avg_length += t
# update after n episodes
if i_episode % n_update == 0:
ppo.update()
# log
if running_reward > (log_interval*200):
print("########## Solved! ##########")
torch.save(ppo.policy.state_dict(),
'./LunarLander_{}_{}_{}.pth'.format(
lr, betas[0], betas[1]))
break
if i_episode % log_interval == 0:
avg_length = int(avg_length/log_interval)
running_reward = int((running_reward/log_interval))
print('Episode {} \t avg length: {} \t reward: {}'.format(
i_episode, avg_length, running_reward))
running_reward = 0
avg_length = 0


Loading Weather
Loading
Rain
Loading...
UV Index
Loading...
Todays Summary
Loading...
Weekly Summary
Loading...
Another cool website from
darcy lf
View the code on
Github
Powered by
darksky


Loading...
DM
TIBURON
Home
The Team
Achievements
Gallery
Technical Events
Sponsors
Robosub 2021
Contact Us
Gallery
Glimpses from the memory lane.
Team Tiburon
Winning Moments
Down the lane
Memories
Our Bot
Videos


My name is Yin Nam Wong, but I go for Steven.
I am 16. I was born in Hong Kong, and I'm going to Saint Mary's College High School now.
11th grath.
I live in Berkeley with my mun and younger brother. My dad stayed in HK.
My hobbies is reading Chinese books, I read tons of Chinese
and I playing computer games with my friends
I like playing table tennis, is fun. ☺
My favourite sport is table tennis, I play it the most.
And I play a little bit of basketball too ☺
I play League of Legend
I main support ☺ and I like to troll, troll is fun
I like eating eggs


| Fig 4 |
Annually averaged global air surface temperature anomalies f ... |
| Fig 7 |
Annually averaged global air surface temperature anomalies f ... |
| Fig 15 |
Annually averaged outgoing surface energy flux anomalies ove ... |
| Fig 12 |
Annually averaged global precipitation minus evapotranspirat ... |
| Fig 13 |
Annually averaged global CO 2 concentration anomalies for hi ... |
| Fig 10 |
Annually averaged global air surface temperature anomalies f ... |
| Fig 3 |
Annually averaged latitudinal forest coverage for high (top) ... |
| Fig 6 |
Annually averaged global precipitation minus evapotranspirat ... |
| Fig 11 |
Annually averaged global soil temperature anomalies for low ... |
| Fig 9 |
Annually averaged global precipitation minus evapotranspirat ... |
| Fig 16 |
Annually averaged outgoing surface energy flux anomalies ove ... |
| Fig 2 |
Grid cells eligible for deforestation in the high (top row), ... |
| Fig 8 |
Annually averaged global soil temperature anomalies for mid ... |
| Fig 14 |
Temporal evolution of annually averaged carbon stock anomali ... |
| Fig 17 |
Annually averaged outgoing surface energy flux anomalies ove ... |
| Fig 1 |
2010 Forest Coverage. Coverage is represented as fractional ... |
| Fig 5 |
Annually averaged global soil temperature anomalies for high ... |


Are you a student interested in joining? Or a sponsor interested in learning more about our team and what it's like to work with us? Feel free to contact us through the social media below, and watch out for our next recruiting season and info session.
Fall recruiting is now closed! Thank you every who applied! We will be sorting through applications Friday and Saturday. Look out for our recruiting sessions next semester!