notebooks
directory has all the notebooks for exploratory data analysis, visualization, modelling and model interpretation.Data source: kaggle The first column is the name of the page and rest 550 columns are visited date.
Original data: train_1.csv
-----------------------------
rows = 145,063
columns = 551
first column = Page
date columns = 2015-07-01, 2015-07-02, ..., 2016-12-31 (550 columns)
file size: 284.6 MB
Date columns:
------------------
Jul/2015 - 31 days
Aug/2015 - 31 days
Sep/2015 - 30 days
Oct/2015 - 31 days
Nov/2015 - 30 days
Dec/2015 - 31 days
Total : 184 days
Year 2016 : 366 days (leap year)
Total : 550 days
NOTE:
For this dataset, missing data is represented by 0.
Time series selected for modelling:
ARIMA: most visited page ==> Special:Search_en.wikipedia.org_desktop_all-agents
visited = 675606021
VAR: VAR needs correlated times series like opening and closing of stock.
But, here I took top page per language to see the workings of VAR models
on wikipedia dataset.
Scikit-learn: For usual regressors like linear, lasso, ridge and for also
ensemble method xgbregressor, I used most visited page.
fbprophet: For facebook prophet time series modelling module, I used a random
time series. The page is Now You See me in Spanish Language.
deep-learning: For deep learning algorithms like LSTM and GRU, I used the same
time series as I used in fbprophet.
The best smape for given timeseries was given by xgboost using features from tsfresh.
| Model | Description | MAPE | SMAPE | RMSE | ME | MAE | MPE | CORR | MINMAX | ACF1 |
|---|---|---|---|---|---|---|---|---|---|---|
| xgb | tsfresh | 1 | 0.6356 | 337 | 43 | 115 | 0 | 0.9991 | 0.0063 | -0.2886 |
| xgb | default | 1 | 1.4308 | 453 | 9 | 224 | 0 | 0.9978 | 0.0141 | -0.3971 |
| XGBRegressor | default | 18 | 18.2580 | 4,513 | 687 | 2,331 | 0 | 0.6643 | 0.1565 | 0.1207 |
| LassoCV | ts_split=3 | 266 | 110.8415 | 25,829 | -25,336 | 25,537 | -3 | 0.5769 | 0.7062 | -0.4231 |
| RidgeCV | ts_split=3 | 261 | 118.8720 | 31,289 | -15,694 | 25,228 | -2 | -0.0255 | 0.8816 | 0.6251 |
| LinearRegression | default | 365 | 135.3122 | 43,579 | -17,255 | 35,357 | -2 | -0.1236 | 1.2735 | 0.6457 |
| LinearRegression | scaled | 33,841,890 | 199.9984 | 4,378,715,364 | -3,640,663,624 | 3,640,663,624 | -338,419 | 0.5725 | 1.0000 | 0.0784 |
| lstm | lags=2,minmax-scaler | 25 | 24.6649 | 6,524 | 353 | 3,482 | -0 | 0.6507 | 0.2056 | 0.6702 |
| gru | lags=2 | 40 | 53.1378 | 8,700 | 5,739 | 5,739 | 0 | nan | 0.4031 | 0.6727 |
| gru | lags=2,minmax-scaling | 58 | 83.9143 | 8,932 | 7,146 | 7,192 | 1 | 0.5818 | 0.5815 | 0.0733 |
| lstm | lags=2 | 99 | 197.2470 | 13,684 | 12,021 | 12,021 | 1 | 0.0502 | 0.9931 | 0.6727 |
| fbprophet | seasonality_after_cap_floor | 65 | 100.4473 | 9,009 | 3,603 | 7,426 | 0 | 0.2990 | 0.5764 | 0.4837 |
| fbprophet | seasonality_before_cap_floor | 423 | 139.6339 | 54,487 | -3,904 | 44,547 | -0 | 0.1662 | 2.3876 | 0.5637 |
| fbprophet | after_cap_floor | 82 | 147.0780 | 12,655 | 7,658 | 10,089 | 1 | -0.0811 | 0.7741 | 0.4794 |
| fbprophet | default | 437 | 171.8289 | 54,429 | 25,011 | 48,699 | 2 | -0.2529 | 3.3718 | 0.4491 |
| fbprophet | before_cap_floor | 437 | 171.8289 | 54,429 | 25,011 | 48,699 | 2 | -0.2529 | 3.3718 | 0.4491 |
The data set is super clean, I did not have to do anything. One thing to note is that the nans are represented by 0. This means if some website has 0 visits, it may mean either the acutally 0 persons visited the website or simply the data is not available for that day. The first column is Page and rest 550 columns are dates. For the time series we can create date time for visualization and also for the linear regression modellings.
df['year'] = df['date'].dt.year # yyyy
df['month'] = df['date'].dt.month # 1 to 12
df['day'] = df['date'].dt.day # 1 to 31
df['quarter'] = df['date'].dt.quarter # 1 to 4
df['dayofweek'] = df['date'].dt.dayofweek # 0 to 6
df['dayofyear'] = df['date'].dt.dayofyear # 1 to 366 (leap year)
df['weekend'] = ((df['date'].dt.dayofweek) // 5 == 1)
df['weekday'] = ((df['date'].dt.dayofweek) // 5 != 1)
df['day_name'] = df['date'].dt.day_name() # Monday
df['month_name'] = df['date'].dt.month_name() # January
For time series visualization, plotly is better tool to visualize the data. For visualization purpose, I looked at only the data of 2016.
# of unique pages visited in 2016: 14,506
Top visited page: Special:Search_en.wikipedia.org_desktop_all-agents (675,606,021 visits)
To fit a linear regression to a given dataset we need the dataset follow some of the assumptions. They are called assumptions of linear regression. Since ARIMA tries to fit the linear regression taking account with autocorrelation with past of itself, still this is a linear regression. We can do some of the linear regression assumptions.
Test of normality: Using Shapiro-Wilk normality test, I found time series is NOT normally distributed.
Test of stationarity: I used Augmented Dickey Fuller test to know whether the given time series is stationary or not. In this particular page, I found the time series is stationary.
For time series, probably ARIMA (or, SARIMAX) is the most popular algorithm to try on. I used both the usual arima model from statsmodels
and also a dedicated library pmdarima
to fit the arima model. The details are explained in the notebook.
After doing ARIMA modelling, I was curious what will VAR model do with this wikipedia time series. For VAR method to be used the columns of dataset must be related to each other like opening and closing of the stock. However, just for the purpose of the algorithm implentation and fiddling with the model, I looked at the top 5 pages per language and fitted the model.
Then, I went back in time and wanted to see how will the usual sklearn models like linear regression, lasso and ridge will do with the time series data. I also did some ensemble learning models like xgbregressor. XGBRegressor did pretty good and gave me the SMAPE value of 6.65 for the training data. For a random page (Now You See Me Spanish page), I got the smape of 21.68 on the training data.
For time series forecasting, one of the popular model is prophet open sourced by facebook. This pretty powerful and useful library for the time series modelling.
Then, I wanted to see the usage of deep learning in time series modelling. Particularly, I looked at the models like LSTM and GRU which can remember the past data. I can not use usual CNN since they do not remember the past data points. LSTM did pretty well and gave me smape of 20.34 for the test dataset.
One of the most popular metric to determine the performance of time series model is SMAPE (Symmetric Mean Absolute Percentage Error).
The formula for SMAPE (Symmetric Mean Absolute Percentage Error) is given below:
SMAPE = 200 * mean abs(A-F)
-----------------
abs(A) + abs(F)
SMAPE lies between 0 and 200, 0 is best and 200 is worst.
$$
S M A P E=\frac{100 \%}{n} \sum_{t=1}^{n} \frac{\left|F_{t}-A_{t}\right|}{\left(\left|F_{t}\right|+\left|A_{t}\right|\right) / 2}
$$
Where, F is forecast and A is the actual value of time series at given time t.
Python implementation:
def smape(A, F):
F = A[:len(A)]
return ( 200.0/len(A) * np.sum( np.abs(F - A) /
(np.abs(A) + np.abs(F) + np.finfo(float).eps))
)
Despite the name Symmetric, the smape is not actually symmetric. Take this example from wikipedia for an example:
The SMAPE is not symmetric since over- and under-forecasts are not treated equally. This is illustrated by the following example by applying the SMAPE formula:
Over-forecasting : At = 100 and Ft = 110 gives SMAPE = 4.76%
Under-forecasting: At = 100 and Ft = 90 gives SMAPE = 5.26%.


 Never letting a smile down, always full of energy, passionate about code, and simply if I were to define hard work, it’s none other than Krish Bavana!
Krish is one of the most determined, charismatic, and ambitious people that I’ve ever had the pleasure of meeting. He is a paragon of humility and creativity, making him an amazing writer and storyteller. Whether it be coding, mathematics, or writing, he pours his heart and soul into everything he does, and his work is better for it.
When I first met Krish, I was amazed by his driven work ethic and the sheer passion he puts into every task he does and by his caring nature and the amicable way he makes others feel comfortable instantly. He truly deserves appreciation for his creative projects and his lively personality.


Content 1.1
Note: This will only appear in the speaker notes window.
Content 1.2
Content 2.1
Content 3.1
Content 3.2


404 Page Not Found
The page you were looking for could not be found.
Sorry, this URL doesn't exist. Or it has existed but is not available anymore (which is highly probable). Or in your dreams, maybe ? Anyway, please head back home to find what you are looking for!
NB: I recently moved to github.io early 2019, so there might be some links that broke during this. If you feel that it is the reason you are reading this right now, feel free to drop a mail.


Though we are a Startup , we have strong foundation of vast and enriched experience in this field.
Our vision is to provide engineering solutions to our customers with World class Quality and on time delivery.
Director
B.Tech Mechanical
Industrial Engineer
BE Mechanical
Industrial Consultant
MSC Environmental Science
Industrial Engineer
B.Tech Computer Science
Industrial Engineer
B.Tech Computer Science
“STELLA” Flat No. C2 305 Gat No. 216/2
New Moshi Alandi Road, Moshi, Tal.:- Haveli, Dist.:- Pune, 412105
Mon-Sat (8.30-18.30)
Sun (Closed)


Hint: word is click here to edit related.
Also, _ can be a space!
Start learning!
I made this game using 3 coding languages: HTML, CSS, JS, and a new one, PHP.
Those are 4 of the 5 main languages used in created websites.
Each language is makes this site what is is. Very similarly to humans, how each part of you makes you you.
Each of those 4 languages help to make the game work.
So, if you took away one language, the game wouldn't work.
See how everything had a part?
Now, let's learn about each language: HTML, CSS, JS, and PHP.
That was pretty cool, right?


Today, we’ll be building our very own Twitter Bot with Node.js. Our bot will fetch a random quote using the Forismatic API and then, of course, tweet it in an attempt to look smart!
First off, make sure you have Node.js and npm installed. Then, create a new folder for your application and cd
into it from the command line. Then, run npm init
and go through the process to initialize a new node application.
Now, the twitter API module we’ll be using is twit. The module we’ll be using to make requests is request
Run npm install --save twit request
to install it.
Once we have everything ready to go, create a index.js
file where we’ll be coding our application.
Let’s get started by requiring our modules in our index.js
file.
var Twit = require('twit');
var request = require('request');
Oh, wait. There’s one more step before we actually start writing more code. Since we’re building a twitter bot, we need to register a twitter application!
You’ll need to either create a new Twitter account or use your own to create a new Twitter application. Create your app and then navigate to the “Keys & Access Tokens” Page. From there, copy your “top secret” keys and tokens into your index.js
file using the following template:
var Twit = require('twit');
var request = require('request');
var T = new Twit({
consumer_key: 'TOP SECRET CODE',
consumer_secret: 'TOP SECRET CODE',
access_token: 'TOP SECRET CODE',
access_token_secret: 'TOP SECRET CODE'
})
Here, we’re defining the variable T
and setting it to initialize the Twit library with our application that we registered so we can post, search, favorite, retweet, and basically do whatever we want on Twitter.
To build what we want, we need to fetch a random quote. Luckily, Forismatic’s API is very easy to use as we just need a url. You can set the url below as a const
as unlike variables, it will not be changed.
https://api.forismatic.com/api/1.0/?method=getQuote&key=123456&format=text&lang=en
One problem that we may run to when building these kind of applications is that since we have to make a request, we want to:
This may look simple - except for the sending data to another function part. To do this in JavaScript, we use something called callbacks. Callbacks allow us to write asynchronous code. This means that to make this program as efficient as it can be, we have to use callbacks.
Let’s start by creating a getQuote
function with a paramenter that’s named callback
. Then, using request, we can make a request to the url and set the data of the request to the callback.
function getQuote (callback) {
request(url, function (error, response, body) {
console.log('error:', error); // Print the error if one occurred
console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
console.log('body:', body);
callback(body);
});
}
Now, we have our data, in this case body
ready to be used in another function. The next function we’ll be creating is a postTweet
function with the tweet
parameter. Using T.post, we are able to post with the status (data of tweet) to be tweet
.
function postTweet(tweet) {
console.log(tweet);
T.post('statuses/update', { status: tweet }, function(err, data, response) {
console.log(data);
})
}
We’ve written the two functions. What next? Well, now we need to connect them together! We want getQuote
to run first, so we’ll need to run it first with the parameter of postTweet
which is our callback.
getQuote(postTweet)
If you take a look at your code, it’s actually just calling the getQuote
function, setting the callback to the data that was requested, and then it calls the postTweet
function which has the tweet
parameter. However, the tweet
parameter is equal to the body of the request all because of the callback.
You did it! Save your file and then run node index.js
in your terminal. You should see everything being logged and the tweet posted! I encourage you to continue making the bot more advanced using the twit library! If you have any questions, feel free to leave them below :)


Photos
Albums
By Author
Sign Up
Latest Uploads
Saturn
by Author (
link
)
2014/08/24
Jupiter
by Author (
link
)
2014/08/24
Mars
by Author (
link
)
2014/08/24
Earth
by Author (
link
)
2014/08/24
Venus
by Author (
link
)
2014/08/24
Mercury
by Author (
link
)
2014/08/24
Sun
by Author (
link
)
2014/08/24
by Author (
link
)
2014/08/24
«
1
2
3
4
5
6
7
8
9
10
»


Main - music
A man is what he is doing. I compose music. Therefore the best way to know me - listen to my music.
If you liked style of my music - lets cooperate. How to do this read at the section "my suggestions".
Main task of these compositions is to disclose my creative potential. So welcome to the world of my music...
 Let's dream…
Listen to the composition just now:
(22Khz, 24kbit/sec, Mono)
Orient
This composition is for a movie
Listen to the composition just now:
(22Khz, 24kbit/sec, Mono)
Music Box
This music fantasy waits singer. Though… maybe it needs to listen composition so as it is.
Listen to the composition just now:
(22Khz, 24kbit/sec, Mono)


Test Index
This file is part of a test to see if the file serving portions of the HTTP server work correctly.


A Guide to CSS Animation 📽
-
Intro
-
Our first animation
-
Square path keyframes
-
Adjusting animation-iteration-count
-
animation-timing-function effects
-
linear spinning square
-
Toggling animation-play-state
-
Staggered spins with animation-delay
-
Shrinking element with animation-fill-mode
-
Staggered fade in with animation-fill-mode
-
Walk sign with animation-fill-mode
-
Clapper board with animation-direction
-
Basic chaining with shorthand
-
Dynamic animations with CSS variables
-
Changing animations with CSS variables
-
Animating curved motion path
-
Spin counter with animationiteration
-
Dynamic delays with animationend
-
Worm Loader with curved path
-
animation-delay demo
-
Sibling squares
-
Animation with no curved path
-
Animation without animation-fill-mode set
-
Animation without persistent end state


Rafael moved to Seattle from Puerto Rico. He joined the U.S Army where he traveled Europe and the Middle East while workin in a fast paced, team oriented environment. Passionate about the outdoors, the move to the Pacific Northwest was the natural choice. With encouragement from friens, Rafael started persuing a career in technology.
In his free time, Rafael loves to go hiking through the Pacific Northwest with his friends and taking photographs of his adventures.
Outgoing Software Developer with +3 years of experience in frontend web development. Seeking to leverage my technical and professional expertise to grow in the new role of Web Developer at your company.


I spent an entire day getting the flags right, mostly because I didn't know about some of them. This is here as a reference to others just starting out and wanting to play with the MySQL Connector/C++ wrapper with the client included and statically linked.
This was done on Debian 7 64-bit and 32-bit.
I ended up installing the dev packages from the repo and statically linking them.
Debian has aptitude, and your installation only needed to be: $ sudo aptitude install libmysqlcppconn-dev
It probably would have installed boost-dev as well.
POSIX operating systems typically have an executable named pkg-config, you may have gotten away with linking your program with: $ g++ -static main.cpp `pkg-config --libs mysqlcppconn`
And note that those are backticks, not single quotes.
It is actually somewhat likely that pkg-config will not find mysqlccppconn because packages often name the pkg-config command different than the library name.
Chances are however, that the following command would make a list of possible names, and I imagine you are capable at finding the package you just installed in that list: $ pkg-config --list-all | grep sql
For me, pkg-config has suspiciously few packages in its list; the only *sql* is sqlite3.
In fact, searching my filesystem for *.pc turns up not a whole lot.


Leo Cullen Confirms Tadhg Furlong Suffering From Back Issue
by Sean McMahonThere were a few notable omissions when Leinster announced their matchday 23 for Saturday’s Heineken Champions Cup clash with Benetton at the RDS (KO 3.15 pm).
Ireland internationals Robbie Henshaw, Tadhg Furlong and Rob Kearney have all been left out for the visit of Kieran Crowley’s side.
Henshaw’s absence is not that surprising considering the powerful centre suffered from some illness last weekend which ruled him out of the PRO14 victory over Connacht at the Sportsground.
However, it was expected that Furlong was to come back into the team but Cullen confirmed today that the Wexford man is suffering from a back problem.
“In terms of Tadhg, he’s just had a slight issue with his back since he’s come back from Japan,” Cullen said on Friday afternoon.
“So it’s nothing major now but again I thought Ports [Andrew Porter] did very well last week coming back in. Benty [Michael Bent] has been brilliant for us during that whole first block, so we have a lot of confidence in those guys as well, so, again, Tadhg is not a million miles away but we’re in a good position where we’re able to give him that extra bit of time.
“In terms of a case by case basis for guys, he’s probably in the bracket where we’re just being a little bit patient in terms of his return.”
Another surprise was that Kearney was left out of the matchday 23, especially considering the experienced fullback saw some game time from the bench in the bonus-point win in Galway.
Cullen didn’t confirm an injury for Kearney, so it seems that it’s down to form but the head coach was keen to outline that last season, he swapped between the Louth man and Jordan Larmour regularly.
“So Rob came off the bench last week. With him and Jordan, we would have chopped and changed a little bit last year as well, so, we look at sometimes the challenge that we’re playing against, the team that we’re playing against – Jordan gets the nod this week. Rob is not a million miles away.”


Largest producers by natural gas production (million m3)
766,200United States
635,500Russia
184,800Iran
165,000Qatar
149,90Canada
Example 2 Use list with value
38.4Coal
23.2Natural Gas
16.3Hydro
10.4Nuclear fission
3.7Oil
8Non hydro renew
2016 World [civil] power generation by source [IEA, 2018]
Example 3 Loading JSON
Car exports by country (2017)
Click on the list item
Example 4 Several drawing options
Simple
50.2
25.6
28.2
25.2
Fade animation
18.2
25.6
34.2
15.2
Round animation
10.2
35.6
28.2
18.2
Example 5 Use as menu and rotate animation
Click on the sector
4 Oct 1957The world's first artificial satellite
28 May 1959First creatures to return alive from space
12 Apr 1961The first man in space
16 June 1963The first woman in space
18 March 1965First-ever spacewalk
20 July 1969First man on the Moon
19 Apr 1971The first space station is launched
7 Feb 1984'Free-flying' in space
20 Nov 1998Assembly of ISS begins
28 Apr 2001First space tourist
10 key moments in space exploration
The Sputnik 1 satellite was launched by the USSR on 4 October 1957. It was the first man-made object to leave the Earth's atmosphere. It weighed 180lb (83.5kg), and was described at the time as a "remarkable achievement."
Two monkeys, Able and Baker, became the first living creatures to survive a space flight. Able, a female rhesus monkey, and Baker, a female squirrel monkey, were launched into space by the US on a Jupiter missile. The monkeys were not the first living creatures to be sent on a mission. In November 1957, the USSR launched Sputnik 2, carrying a dog named Laika on board - she died a few hours into the mission from overheating and panic.
The USSR sent Yuri Gagarin into space from Baikonur Cosmodrome, Kazakhstan, in a Vostok spacecraft. He made a single orbit of Earth in 108 minutes, travelling at more than 17,000 miles per hour. The achievement was reported at the time as a blow to the Americans who had reportedly hoped to be the first to launch a man beyond Earth's atmosphere. The US launched American citizen Alan Shepard into space less than a month later on 5 May 1961.
Valentina Tereshkova, a former textile worker, became the first woman to be launched into space by the Soviet Union. She circled the Earth 49 times during three days in space, and was reportedly injured during the landing.
Russian cosmonaut Alexei Leonov carried out the first-ever spacewalk from the two-man Voskhod spacecraft. Leonov's suit expanded minutes after stepping into space due to the zero-pressure conditions. When he tried to get back into his spaceship, he could not fit through the hatch and had to release a valve to partially depressurise his suit and squeeze back inside.
American Neil Armstrong became the first man to set foot on the Moon. Armstrong and Edwin "Buzz" Aldrin spent two hours on the lunar surface setting up observation equipment and collecting rock samples. As Armstrong put his left foot down, he famously declared: "That's one small step for man, one giant leap for mankind." He described the surface as being like powdered charcoal and the landing craft left a crater about one foot deep. The mission lasted eight days, three hours, 18 minutes and 35 seconds
Russia launched Salyut, the first space station. The first crew to dock with the orbiting outpost later die during re-entry when the air leaks out of their Soyuz capsule.
Bruce McCandless became the first person to do a spacewalk without being attached to the spacecraft. He tested a manned manoeuvring unit, which allowed him to travel away from the orbiter, during a 90-minute spacewalk.
Assembly of the ISS began with the launch of its first module, Zarya, on a Proton rocket from Baikonur. The ISS is the largest artificial body in space. The station has been continuously occupied since November 2000. In that time, more than 200 people from 15 countries have visited.
Dennis Tito, a billionaire businessman from California, became the first paying passenger to go to outer space.
Mr Tito set off from Kazakhstan for an eight-day holiday aboard the International Space Station, and paid $20m (£14m) for his trip.


Antarctic Bill 2012-13
Progress of the Bill
Bill started in the House of Commons
- House of Commons
- House of Lords
- Royal Assent
Last event
- 1st reading: House of Commons 20 June, 2012 | 20.06.2012
Latest Bill
| House | Bill | Date |
|---|---|---|
| Bill 14 2012-2013 as introduced | PDF version, 157KB | 18.07.2012 |
Latest news on the Bill
This Bill is expected to have its second reading debate on 2 November 2012.
The Bill was presented to Parliament through the ballot procedure on 20 June 2012. This is known as the first reading and there was no debate on the Bill at this stage.
This Bill is a Private Member’s Bill. These are often not printed until close to the second reading debate. If the text is not yet available here and you wish to know more about this bill please contact its sponsor, Neil Carmichael.
Summary of the Bill
A Bill to make provision consequential on Annex VI to the Protocol on Environmental Protection to the Antarctic Treaty; to amend the Antarctic Act 1994; and for connected purposes.Stay up to date
Keep up to date with the progress of Bills going through Parliament. Sign up for email alerts or use our RSS feeds.
Related information
Guide to the passage of a Bill
Find out what happens at each stage of a Public Bill’s journey through Parliament with the Passage of a Bill guide.
When does a Bill become law?
Explanation of what happens after Bills have been passed, and when laws may change.


The coolest hackathon you ever did see
Coming September 2018
Hillsdale's Girls Who Code Club, Hack Club, and Engineering Club are organizing a hackathon. Come to our hackathon and learn to code! We'll have a hacker space, mentors, and cool swag for the perfect hacking environment.
Get Started!HillsdaleHacks is a high school hackathon—a 24-hour programming event where students work in teams to make hardware and software projects, and is Hillsdale's first ever computer science event open to ANY AND ALL high school students.
Make connections with people who have interests similar to yours, and interact with sponsors at their booths. There will be a session at the beginning of the hackathon for you to meet others and form teams. Each team may have a maximum of four people. This event is free.
Bring a valid student ID, laptop, chargers, and water bottle. Bring your waivers if you haven't signed them online. Remember that all people are expected to follow the code of conduct.
Surround yourself with a welcoming environment and passion for programming. If you don't know how to code, don't worry! We'll have workshops and events for you to get your first start with computer science.


READY TO GET SERIOUS ABOUT YOUR PHYSIQUE GOALS?
I was fed up and frustrated. Everywhere I looked online I could see the same supplement marketing scams and training gimmickry. No one was telling the truth – there was too much money to be made. The principles from the evidence-based fitness world are quite clear. You don’t need supplements, your diet and training don’t have to be complicated. A focused effort in the right places at the right times will get you the results you are after. I mean real food, big meals, and heavy barbell lifting. I knew this from experience coaching clients to physique greatness, and I’m going to teach you how you can do that also.
More


http://www.speakers-podium.com/susangranger.
Susan Granger's review of "REINDEER GAMES" (Dimension Films/Miramax)
Ehren Kruger's screenplay must have read better on paper because the film, directed by John Frankenheimer, lies like a bleak lump of coal in a Christmas stocking. Ben Affleck plays a convicted car thief whose cellmate (James Frain) in a cold Michigan prison has a gorgeous penpal girlfriend, Charlize Theron, whom he met through a lonely hearts magazine. When the cellmate dies in a food fight, Affleck assumes his identity, getting the sexy girlfriend but also her psychotic older brother (Gary Sinese), a small time crook who wants his help in taking down the Tomahawk Casino on Christmas Eve. His bizarre scheme includes having his grungy gang dressing up like Santa Claus with the "ho, ho, ho" becoming a heist. From the beginning, wholesome Ben Affleck, who always seems to look like an aging frat boy, is miscast in this cartoonish saga of betrayal, particularly as when openly yearns for a cup of cocoa and slice of pecan pie. Beautiful Charlize Theron has enough charisma for both of them, along with an ability to convince men to believe anything she says, particularly when she flashes her bare breasts. And no one can do a buffed, tattooed, over-the-top nutcake like Gary Sinese. But the dim-witted plot consists of a fast-paced series of intricate double-crosses that stretch from the barely plausible to the patently ridiculous. And the absurd ending, literally, had people laughing in disbelief. Fortunately, Ehren Kruger has Arlington Road and Scream 3 under his belt and John Frankenheimer will be best remembered for Seven Days in May and The Manchurian Candidate. On the Granger Movie Gauge of 1 to 10, Reindeer Games is an icy, idiotic, illogical 3. My advice: don't play. Christmas has come and gone - just as this movie will.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "my_admin/base.html" %} {% block content %} {% if object_list %}
| No | Title | Author | Status | Created At | Last Updated On | {% for post in object_list %}|
|---|---|---|---|---|---|---|
| {{forloop.counter}} | {{post.title}} | {{post.author}} | {{post.status|yesno:"Active, Not Published" }} | {{post.created_at}} | {{post.updated_at}} | Edit | Delete |
No Posts to display
{% endif %} Create New Post {% endblock %}


BJP making India's best organisations hollow, selling them: Priyanka
Her attack comes days after Sitharaman reportedly said the government was looking to wrap up the sale of state-run Air India and oil refiner and marketer BPCL by March 2020
by Press Trust of IndiaCongress leader Priyanka Gandhi Vadra on Wednesday hit out at the government over Finance Minister Nirmala Sitharaman's reported remarks that Air India and Bharat Petroleum Corporation could be sold by March, alleging the BJP is making India's best organisations hollow and then selling them.
Her attack comes days after Sitharaman reportedly said the government was looking to wrap up the sale of state-run Air India and oil refiner and marketer BPCL by March 2020.
"Our organisations are our pride. These are our 'golden birds'," Priyanka Gandhi said in a tweet in Hindi.
"The BJP had promised to build the country, but they are working to make India's best organisations hollow and sell them. Sad," the Congress general secretary said.


{% extends "base.html" %} {% load staticfiles %} {% block content %}
The archive contains all files to run this appication locally. In the top directory are the commandline programs that are also used by the web app. To run the web app, be sure to install the dependencies mentioned in the README.
| MyFLq paper: | http://dx.doi.org/10.1016/j.fsigen.2013.10.012 |
| Pre-MyFLq STR paper: | http://dx.doi.org/10.1016/j.fsigen.2012.03.004 |
| Primers | This file contains the primers for 16 commonly used loci. If you require the same set you can use it without altering, otherwise it can serve as an example of how the file should look. |
| Alleles | This file contains the alleles that were present in the individuals of the samples used for the MyFLq paper. It can serve as an example to build your own allele databank file for use with MyFLq. |


Creates an instance of Helper.
The JSON-formatted API Documentation.
Access or Subscribe default DocKindMaps
, CLHeaders
, and GNParams
Access or Subscribe default DocKindMaps
, CLHeaders
, and GNParams
Formats an JSON object for Error Messages
The erroring Property
The erroring Object
The error message object
Accesses a Help Document for responses
The namespace the Route belongs to
The name of the Route
Initializes the creation of a Route Documentation
The namespace the Route belongs to
Formats and subscribes a Route Documentation
The namespace the Route belongs to
The parent-Routes of this Route
The name of this Route
The Method of the Route being documented
The Route to be documented
Finalizes the Documentation by adding the API-Doc route.
The name of the documentation route.
Splits a path pattern to an Array
of separate paths
The RegexP
path to parse
Generates an Array
of path-parameter Arrays
, based on the provider schemes
An Array
of path schemes
Formats a Param-Reference Key based on the Specfied name
& ref
The Name of the Param
The Param
Reference
A formatted Reference Key; or false
, if invalid
Checks if a Reference-Key
matches any defined Param-References
The Param-Reference
Key
An option Param-Reference
collection (for speed)
Get an aliased Reference-Key
The Param-Reference
Key
The real Param-Reference
Key
Get a Reference-Key
The Param-Reference
Key
An option Param-Reference
collection (for speed)
The real Param-Reference
Key
Returns an appropriate Object
of in
-values, given the specified method
.
A value specifiying a Request Method
Generates an appropriate Function
to designate parameters, given the specified method
.
A value specifiying a Request Method
A param retrieval function
Converts API configurations into a JSON Documentation


My name is Wei wenchao. I Study in XAUT in 2019-2021, my research direction is the exploration of Graph Structure Information..
My academic research interests include:
Others interests include:
Most of my computational work involves Python and Matlab. Below you can find links to some of my projects.


Loading...
Want to have a look at the code? Here's the GitHub repo: math2001/css-js-insertr
Feel free to contribute! ;)
Please let me know about it, by raising an issue on the GitHub issue tracker, sending me an email, or a tweet!
Hopefully you're enjoying this extension!


On this page I am trying to get a simple custom vanilla javascript activation function working
for a sequential model without having to create an entire layer.
To customize an entire layer try
https://codepen.io/caisq/pen/jdBgwB just need to change tf.loadModel to tf.loadLayersModel
unless that has already been updated.
The Original xOr by Matt Cameron was written for NodeJS, his code is at
Code
The expected output for xOr input is
[0,0] = ~ 0
[1,0] = ~ 1
[0,1] = ~ 1
[1,1] = ~ 0
Reminder: The black textarea is updateable. Make changes and click the "Update and Run" button.
...


Quiz on JavaScript
This is a multiple choice quiz to test your knowledge on JavaScript
Instructions
You have 3 minutes to answer 10 questions
Choose the most correct answer
Click the "Start Quiz" button to begin the quiz. Good luck!!
Start Quiz


Long time ago i added favored threads to the battlelog forums, to be able to find the threads you are participated in. Now battlelog has it's own, better, activity feature that list all of your threads in descend time order where you participated in. This way is pretty much better than the BBLog favorite feature.
So my question is, can i remove it?
I think it's pretty much useless now.
ORFK
Global Moderator
yes, i think yes.
juress
Theme Developer
I guess, but I don't like where this "latest activity" is at all...
Amkhatar
Theme Developer
I think you don't need to remove it
this feature can be useful if i want to follow a discussion without writing a post ?!
Maybe it could be renamed
xXJumpyXx
Helping Hand
I agree with Amkhatar.
ORFK
Global Moderator
i didn't tought about this point.
that would be a reason to leave it like it is...


Installation¶
Python¶
Depending on your platform you can install python from http://www.python.org and version 2.5.2 is the version that we are using here.
Django¶
Try to get the latest subversion trunk version of django from http://www.djangoproject.com
GoFlow¶
Latest Release:
- All releases are available here: http://code.google.com/p/goflow/downloads/list
Subversion trunk code:
svn checkout http://goflow.googlecode.com/svn/trunk/ goflow-src
Optional (but useful) Modules¶
- Graphviz
- PIL
- Pyyaml
- Pygraphviz


This sublibrary contains models and functions providing pressure loss correlations. All models in this library have the property that no mass and no energy is stored in the component. Therefore, none of the models have a state.
All functions are continuous and have a finite, non-zero, smooth, first derivative. The functions are all guaranteed to be strict monotonically increasing. The mentioned properties guarantee that a unique inverse of every function exists. Note, the usual quadratic pressure loss correlation
The two mentioned problems are solved in this package by approximating the characteristics around zero mass flow rates with appropriate polynomials. The monotonicity is guaranteed using results from:
| Name | Description |
|---|---|
| Bends | Flow models for bends |
| Orifices | Flow models for orifices |
| GenericResistances | Flow models for generic resistances |
| SimpleGenericOrifice | Simple generic orifice defined by pressure loss coefficient and diameter (only for flow from port_a to port_b) |
| SharpEdgedOrifice | Pressure drop due to sharp edged orifice (for both flow directions) |
| AbruptAdaptor | Pressure drop in pipe due to suddenly expanding or reducing area (for both flow directions) |
| MultiPort | Multiply a port; useful if multiple connections shall be made to a port exposing a state |
| TeeJunctionIdeal | Splitting/joining component with static balances for an infinitesimal control volume |
| TeeJunctionVolume | Splitting/joining component with static balances for a dynamic control volume |
| BaseClasses | Base classes used in the Fittings package (only of interest to build new component models) |


Paying failed
Go back to cart to try again.
{% extends "webshop/base_template.html" %} {% block title %}Nintendo Game & Watch Shop - Password Reset - Password Reset Complete{% endblock %} {% block extra-scripts %}{% endblock %} {% block page-title %}Password Reset{% endblock %} {% block sort-bar %}{% endblock %} {% block content %}
Go back to cart to try again.


I fundamentally believe that if you are not learning new things, you stop doing great and useful things. With that said, I'm a newly minted (self-taught) front-end developer and designer with a strong marketing background. Previously, I worked for a startup incubator and a mobile ad startup. I concurrently work at General Assembly in the intersection of technology and education, where my focus is on fostering and developing learning opportunities for women and minorities to learn how to code. My work was recently featured in aUSC Alumni Profile.Some of my writings aboutdigital marketingandL.A. techare featured on theGeneral Assembly blog.
======= >>>>>>> 1f8d62c38a5f12c6d3db520ee1d3514085e59149


The XML code at the bottom, when place into a geronimo-web.xml file that was then added to the jenkins.war as WEB-INF/geronimo-web.xml, allowed me to deploy the jenkins.war file within Apache Geronimo 3.0 using the native deployer application. Once you have created the file, you need to create a directory called WEB-INF and put the geronimo-web.xml into that subdirectory. Then, assuming the jenkins.war file is in the same directory that you are in, execute the following (Linux):
zip -u jenkins.war WEB-INF/geronimo-web.xml
The updated jenkins.war file may then be deployed within Apache Geronimo. You may wish to make the modification to the Java start up options which follow before you attempt to deploy it.
The deployment did cause an out-of-memory error in Geronimo that forced me to use a "kill -9" to stop it. I had to increase the values of Java options in the <geronimo install directory>/bin/geronimo file as shown below.
JAVA_OPTS="-Xmx512m -XX:MaxPermSize=512m"
Geronimo then restarted successfully.
Finally, the Jenkins web application needs to be started using the "Web Apps (WAR)" application.
geronimo-web.xml File Contents
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:environment>
<dep:moduleId>
<dep:groupId>dev.java.net</dep:groupId>
<dep:artifactId>jenkins</dep:artifactId>
<dep:version>1.499</dep:version>
<dep:type>war</dep:type>
</dep:moduleId>
<dep:inverse-classloading />
</dep:environment>
<context-root>jenkins</context-root>
<security-realm-name>geronimo-admin</security-realm-name>
<security>
<role-mappings>
<role role-name="admin">
<realm realm-name="geronimo-admin">
<principal name="admin" />
</realm>
</role>
</role-mappings>
</security>
</web-app>


Enter an expression consisting of variables, parentheses, the operators
+
, -
, *
, /
, ^
,
and the functions sin
, cos
, sqrt
, and abs
.
When you press the Parse button, the expression is converted to pretty math format.


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
W
X
P
parameters
- Variable in class pl.mbdev.openstage.push.
HttpRequest
Parameters parameters of this request.
parameters
- Variable in class pl.mbdev.openstage.push.
RequestParameters
Mapping of the parameters.
parametersToStringBuffer()
- Method in class pl.mbdev.openstage.push.
RequestParameters
Converts all parameters to a string buffer.
parameterToStringBuffer(String, Object, boolean)
- Method in class pl.mbdev.openstage.push.
RequestParameters
Converts parameter data to key-value pair that is usable as a part of request string.
parent
- Variable in class pl.mbdev.openstage.
Xml
Parent of this node.
PHONE_PORT
- Static variable in class pl.mbdev.openstage.push.
Push
Default port at which the OpenStage phone listens for push requests.
PHONE_PUSH_SCRIPT
- Static variable in class pl.mbdev.openstage.push.
Push
Default location at which the push-response application can be found in the OpenStage device.
pl.mbdev.openstage
- package pl.mbdev.openstage
This package contains definitions of UI (user interface) objects recognised by OpenStage VoIP phones.
pl.mbdev.openstage.push
- package pl.mbdev.openstage.push
Push requests can be easily sent to OpenStage phone directly from Java servlets, with use of
Push
class.
pl.mbdev.openstage.test
- package pl.mbdev.openstage.test
Set of examples to learn how to use OpenStage SDK.
PostRequest
- Class in
pl.mbdev.openstage.push
Defines a HTTP POST request that is a parent of the push request formed for OpenStage device.
PostRequest(RequestParameters)
- Constructor for class pl.mbdev.openstage.push.
PostRequest
Creates new HTTP POST request.
priority
- Variable in class pl.mbdev.openstage.
IppCommand
Nonnegative integer indicating position of this IppCommand on the list of commands.
proportion
- Variable in class pl.mbdev.openstage.
IppForm
Value from
IppForm.Proportion
, defines proportion between width of left and right column.
Push
- Class in
pl.mbdev.openstage.push
Push capability of the OpenStage phone can be utilised with use of this class.
Push(String, int, String, Push.RequestType, String, String, String, String)
- Constructor for class pl.mbdev.openstage.push.
Push
Constructs new definition of push, in which all parameters are set directly.
Push(String, String, Push.RequestType, String, String)
- Constructor for class pl.mbdev.openstage.push.
Push
Creates a new push request, with quite convenient way of passing the arguments.
Push(URL, String, Push.RequestType, String, String)
- Constructor for class pl.mbdev.openstage.push.
Push
Creates a new push request, with the most convenient way of passing the arguments.
Push.RequestType
- Enum in
pl.mbdev.openstage.push
Type of the push request that will be sent to the OpenStage phone.
Push.RequestType()
- Constructor for enum pl.mbdev.openstage.push.
Push.RequestType
PushTest
- Class in
pl.mbdev.openstage.test
Tests push capabilities of a OpenStage phone.
PushTest()
- Constructor for class pl.mbdev.openstage.test.
PushTest
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
W
X


A web application that takes a user's birthday and calculates the day of the week they were born and then depending on their gender outputs their Akan Name.
Akan names are derived from Ghanaian culture. Frequently in Ghana, children are given their first name as a 'day name' which corresponds to the day in the week they were born.
We are a meta-ethnicity living in the southern regions of present-day Ghana, formerly known as the Gold Coast..
Here are some Ghanaian-names:


| Full Statistics for December 2001 |
|---|
| Monthly Summary | ||
|---|---|---|
|
Total hits Total files sent Total Code 304's (Not Modified) Other responses (see below) |
15541 4067 1158 10316 | |
|
Total pageviews Remaining responses |
2181 13360 | |
| Total KB requested
Total KB transferred Total KB saved by cache |
|
68836 60798 8038 |
| Total unique URLs | 1345 | |
| Total unique sites | 626 | |
| Total user sessions per 24 hours | 1461 | |
| Total number of logfile entries | 15571 | |
| Empty Requests | 30 | |
| Maximum/Average hits | ||
| Max hits per day | 727 | |
| Average hits per day | 501 | |
| Max hits per hour | 146 | |
| Average hits per hour | 20 | |
| Other Response Codes | ||
| Code 206 Partial Content | 67 | |
| Code 301 Moved Permanently | 404 | |
| Code 400 Bad Request | 104 | |
| Code 403 Forbidden | 1 | |
| Code 404 Not Found | 725 | |
| Request Methods other than GET/POST | ||
| HEAD | 9015 | |
| Hits: | by Day / by Weekday & Hour / by Country / 3D model |
| Items/URLs: | Top Ten / Overview / Not Found / List |
| Client Domain: | Top Ten / Overview / Reverse Domain / List |
| Summary for 2001 | |
|


Description
The Texas Department of Insurance (TDI) is a state agency that regulates the insurance industry, administers the Texas workers’ compensation system, and works to educate and protect consumers. Among other responsibilities, our agency is charged to protect and ensure the fair treatment of consumers, as well as ensure fair competition in the insurance industry to foster a competitive market.
Data Analyst Intern (2 positions):
The internship would involve conducting detailed statistical analysis of the insurance market, particularly related to the behavior of insurance companies and insurance agents. The goal of this effort would be to determine which factors are the greatest predictors of fraud or other negative behavior in the marketplace. This would involve conducting analysis in the field of predictive analytics, to be determined by TDI staff and the interns, but potentially involving Monte Carlo Simulation, Sensitivity Analysis, Linear Regression or other statistical techniques deemed feasible and appropriate. Datasets include application and registration data as well as consumer complaints and potentially social media activity. Staff with related and relevant job duties will provide direct and regular supervision and feedback within the co-working space.
We are looking for candidates with:
- Knowledge of quantitative research methods, advanced statistical principles
-
Statistics knowledge (p-values, linear model assumptions, logistical regression)
-
Experience with software applications, such as SQL, Oracle Database, R, SAS, Python, Microsoft Office
-
Experience with Machine learning (regression, classification, tree-based methods)
-
Skill in identifying and formatting applicable datasets
-
Skill in performing advanced data analysis
-
Skill in problem solving, decision making, planning
-
Ability to organize and prioritize multiple competing projects
-
Effective written and oral communication
-
Successful candidates will be enthusiastic, self-motivated, flexible, and have good written and verbal communication skills
Qualifications
Minimum qualifications:
- Currently enrolled in an accredited college or university pursuing a degree in mathematics, statistics, analytics/data science, computer science, business administration, economics, finance, insurance, or public administration.
-
Completed at least 60 college hours.
- Experience with data structures or algorithms gathered from: completing a data structures or algorithms class, coursework, course projects, research, individual projects, internships, or other practical experience inside or outside of school or work.
Required material:
- Resume.
-
College or university transcript.
-
Letter of interest.
-
1 letter of recommendation.
What you can expect:
- Pay Rate Estimate: $1,300/mo ($25/hour)
-
Hours: 12 hours per week, flexible work schedule
-
Spring Internship (January 2020 thru April 2020)
-
Length of Internship: 12 weeks
-
Paid holidays: MLK Day, Presidents’ Day, Texas Independence Day
-
Real world work experiences!
Interested?
All applications should be submitted online through CAPPS Career Center at https://capps.taleo.net/careersection/ex/jobsearch.ftl?lang=en. Candidates may submit applications through Work In Texas (WIT), however candidates must complete the supplemental questions in CAPPS Career Center to be considered for the position.
Military Occupational Specialty Codes can be found at http://www.hr.sao.texas.gov/Compensation/MilitaryCrosswalk/MOSC_PlanningResearchandStatistics.pdf


| Item | Details |
|---|---|
| Cmd Line Options | fbuild.exe -cache -fastcancel -summary -report |
| Target(s) | all |
| Result | FAILED |
| Time | 0.007s |
| CPU Time | 0.000s (0.0:1) |
| Version | v0.94o x64 |
| Report Generated | 0.001s - Thu 14-Dec-2017 - 18:48:11 |
| Type | Time | Processed | Built | Cache Hits |
|---|---|---|---|---|
| Directory | 0.000s | 3 | 3 | - |
| Alias | 0.000s | 1 | 0 | - |
| Compiler | 0.000s | 1 | 0 | - |
| ObjectList | 0.000s | 3 | 0 | - |
| Time | Type | Name |
|---|


Bill Belichick Takes a Shot at Lane Johnson During Postgame Press Conference (VIDEO)
by Darrelle LincolnIt was sometime in 2018 when Eagles right tackle Lane Johnson suggested that it was more fun to play for the Philadelphia Eagles than it is to play for the New England Patriots.
As you know, the Patriots don’t forget anything, but who knew it would be Bill Belichick to respond.
Following Sunday’s victory over the Eagles — Belichick used a word he almost never uses to describe an NFL game.
He said it was fun.
“They just did a good job,” Belichick said of his players.
That definitely seems like a response to Lane Johnson.
Johnson would go on “Pardon My Take” to try to clarify his message when he said the following: “If that stuff ends up getting on their bulletin board, I just don’t know what I’m going to do. We’re going to get a spell put on us, and we’re going to lose.”
After the Patriots lost to Baltimore two weeks ago, Johnson took to Twitter and stated, “Gonna have some fun at the Linc in 2 weeks!”
The Eagles did not have fun.


TagCloud1
people
president
don
years
jobs
make
lehrer
america
tax
percent
plan
government
number
cut
work
taxes
economy
question
put
country


microtime
(PHP 4, PHP 5, PHP 7)
microtime — 返回当前 Unix 时间戳和微秒数
说明
mixed microtime ([ bool $get_as_float ] )
microtime() 当前 Unix 时间戳以及微秒数。本函数仅在支持 gettimeofday() 系统调用
的操作系统下可用。
如果调用时不带可选参数，本函数以 "msec sec" 的格式返回一个字符串，其中 sec 是自
Unix 纪元（0:00:00 January 1, 1970 GMT）起到现在的秒数，msec 是微秒部分。字符串
的两部分都是以秒为单位返回的。
如果给出了 get_as_float 参数并且其值等价于 TRUE，microtime() 将返回一个浮点数。
Note: get_as_float 参数是 PHP 5.0.0 新加的。
Example #1 用 microtime() 对脚本的运行计时
参见 time()。
User Contributed Notes 28 notes
===============================================================================
You can use one variable to check execution $time as follow:
===============================================================================
A lot of the comments here suggest adding in the following way: (float)$usec +
(float)$sec
Make sure you have the float precision high enough as with the default
precision of 12, you are only precise to the 0.01 seconds.
Set this in you php.ini file.
precision = 16
===============================================================================
Note that the timestamp returned is "with microseconds", not "in microseconds".
This is especially good to know if you pass 'true' as the parameter and then
calculate the difference between two float values -- the result is already in
seconds; it doesn't need to be divided by a million.
===============================================================================
All these timing scripts rely on microtime which relies on gettimebyday(2)
This can be inaccurate on servers that run ntp to syncronise the servers
time.
For timing, you should really use clock_gettime(2) with the
CLOCK_MONOTONIC flag set.
This returns REAL WORLD time, not affected by intentional clock drift.
This may seem a bit picky, but I recently saw a server that's clock was an
hour out, and they'd set it to 'drift' to the correct time (clock is speeded
up until it reaches the correct time)
Those sorts of things can make a real impact.
Any solutions, seeing as php doesn't have a hook into clock_gettime?
More info here: http://tinyurl.com/28vxja9
http://blog.habets.pp.se/2010/09/
gettimeofday-should-never-be-used-to-measure-time
===============================================================================
Check Program runtime:
timestart = explode (' ', microtime());
$this->digits = $digits;
}
function totaltime()
{
$timefinish = explode (' ', microtime());
if($this->digits == ""){
$runtime_float = $timefinish[0] - $this->timestart[0];
}else{
$runtime_float = round(($timefinish[0] - $this->timestart[0]),
$this->digits);
}
$runtime = ($timefinish[1] - $this->timestart[1]) + $runtime_float;
return $runtime;
}
}
?>
===============================================================================
Need a mini benchmark ?
Use microtime with this (very smart) benchmark function :
mixed mini_bench_to(array timelist[, return_array=false])
return a mini bench result
-the timelist first key must be 'start'
-default return a resume string, or array if return_array= true :
'total_time' (ms) in first row
details (purcent) in next row
example :
$value)
{
$fact=$fact*$value;
}
$t['loop_fact'] = microtime(true);
echo "fact = ".$fact."\n";
//-- END zone to bench
echo "---- string result----\n";
$str_result_bench=mini_bench_to($t);
echo $str_result_bench; // string return
echo "---- tab result----\n";
$tab_result_bench=mini_bench_to($t,true);
echo var_export($tab_result_bench,true);
?>
this example return:
---- string result----
total time : 0.0141 ms
start -> init_values : 51.1 %
init_values -> loop_fact : 48.9 %
---- tab result----
array (
'total_time' => 0.0141,
'start -> init_values' => 51.1,
'init_values -> loop_fact' => 48.9,
)
The function to include :
$val)
{
if($cle!='start')
{
$prcnt_t=round(((round(($val-$prv_val)*1000,4)/$tttime)*100),1);
if ($arg_ra) $ar_aff[$prv_cle.' -> '.$cle]=$prcnt_t;
$aff.=$prv_cle.' -> '.$cle.' : '.$prcnt_t." %\n";
$prv_val=$val;
$prv_cle=$cle;
}
}
if ($arg_ra) return $ar_aff;
return $aff;
}
?>
===============================================================================
Of the methods I've seen here, and thought up myself, to convert microtime()
output into a numerical value, the microtime_float() one shown in the
documentation proper(using explode,list,float,+) is the slowest in terms of
runtime.
I implemented the various methods, ran each in a tight loop 1,000,000 times,
and compared runtimes (and output). I did this 10 times to make sure there
wasn't a problem of other things putting a load spike on the server. I'll admit
I didn't take into account martijn at vanderlee dot com's comments on testing
accuracy, but as I figured the looping code etc would be the same, and this was
only meant as a relative comparison, it should not be necessary.
The above method took on average 5.7151877 seconds, while a method using substr
and simply adding strings with . took on average 3.0144226 seconds. rsalazar at
innox dot com dot mx's method using preg_replace used on average 4.1819633
seconds. This shows that there are indeed differences, but for normal use noone
is going to notice it.
Note that the substr method mentioned isn't quite the one given anonymously
below, but one I made based on it:
Also worth noting is that the microtime_float() method gets faster, and no less
accurate, if the (float) conversions are taken out and the variables are simply
added together.
Any of the methods that used + or array_sum ended up rounding the result to 2
digits after the decimal point, while (most of) the ones using preg_replace or
substr and . kept all the digits.
For accurate timing, since floating-point arithmetic would lose precision, I
stored microtime results as-is and calculated time difference with this
function:
For further information, the script itself, etc, see http://edorfaus.xepher.net
/div/convert-method-test.php
===============================================================================
Rather than using the list() function, etc. I have found the following code to
be a bit cleaner and simpler:
===============================================================================
Get date time with milliseconds
$micro_date = microtime();
$date_array = explode(" ",$micro_date);
$date = date("Y-m-d H:i:s",$date_array[1]);
echo "Date: $date:" . $date_array[0];
Test accuracy by running it in a loop.
===============================================================================
While doing some experiments on using microtime()'s output for an entropy
generator I found that its microsecond value was always quantified to the
nearest hundreds (i.e. the number ends with 00), which affected the randomness
of the entropy generator. This output pattern was consistent on three separate
machines, running OpenBSD, Mac OS X and Windows.
The solution was to instead use gettimeofday()'s output, as its usec value
followed no quantifiable pattern on any of the three test platforms.
===============================================================================
I like to use bcmath for it
===============================================================================
I have been getting negative values substracting a later microtime(true) call
from an earlier microtime(true) call on Windows with PHP 5.3.8
Produces negative values
------------------------------
for($i = 0; $i<100; $i++) {
$x = microtime(true);
//short calculation
$y = microtime(true);
echo ($y-$x) . "\n"; // <--- mostly negatives
}
Calling usleep(1) seems to work
---------------------------------------
for($i = 0; $i<100; $i++) {
$x = microtime(true);
//short calculation
usleep(1);
$y = microtime(true);
echo ($y-$x) . "\n"; // <--- fixed now
}
===============================================================================
I use this for measure duration of script execution. This function should be
defined (and of couse first call made) as soon as possible.
However it is true that result depends of gettimeofday() call. ([jamie at
bishopston dot net] wrote this & I can confirm)
If system time change, result of this function can be unpredictable (much
greater or less than zero).
===============================================================================
Microtime as float in a functional way
===============================================================================
To know how much time a code need to execute, I use my own class which I
defined like this :
start = null;
$this->end = null;
}
public function start(){
$this->start = microtime(true);
$this->end = null;
}
public function end(){
$this->end = microtime(true);
}
/**
* This function return the time the code use to process
* @param $precision the precision wanted, with const. second,
millisecond and microsecond available (default PRECISION_SECOND)
* @param $floatingPrecision the number of numbers after the floating
point (default 0)
* @param $showUnit precise if the unit should be returned (default
true)
* @return the render time in the precision asked. Note that the
precision is ±0.5 the precision (eq. 5s is at least 4.5s and at most 5.5s)
* The code have an error about 2 or 3µs (time to execute the end
function)
*/
public function getRenderTime($precision = self::PRECISION_SECOND,
$floatingPrecision = 0, $showUnit = true){
$test = is_int($precision) && $precision >= self::PRECISION_SECOND
&& $precision <= self::PRECISION_MICROSECOND &&
is_float($this->start) && is_float($this->end) && $this->start
<= $this->end &&
is_int($floatingPrecision) && $floatingPrecision >= 0 &&
is_bool($showUnit);
if($test){
$duration = round(($this->end - $this->start) * 10 ** (
$precision * 3), $floatingPrecision);
if($showUnit)
return $duration.' '.self::getUnit($precision);
else
return $duration;
}else{
return 'Can\'t return the render time';
}
}
private static function getUnit($precision){
switch($precision){
case self::PRECISION_SECOND :
return 's';
case self::PRECISION_MILLISECOND :
return 'ms';
case self::PRECISION_MICROSECOND :
return 'µs';
default :
return '(no unit)';
}
}
}
?>
If you want to use it, it's quiet simple:
start();
for($i = 0; $i < 2 ** 24; $i++){}
$render_time->end();
echo 'Time to render: '.$render_time->getRenderTime(RenderTime::
PRECISION_MILLISECOND);
?>
It should output somthing like this : 'Time to render: 3029 ms'
Very useful for quick optimisation
===============================================================================
Following are tested under PHP 5.6.2:
microtime() returns a string in the form "msec.sec" not "msec sec".
So in Example #1, this line should be
list ($usec, $sec) = explode(".", $e);
===============================================================================
I wrote a class which allows to time execution of php scripts very easily. You
can even time multiple separate blocks and then get the total time at the end.
The class is pretty long so I won't post it here, but here's the link:
http://codeaid.net/php/calculate-script-execution-time-(php-class)
An quick usage example:
===============================================================================
Want to make sure your script doesn't time out on large updates? Say you're
doing a poor mans cron job or working with large amounts of data in loop and
the user begins to hang too long. Instead of them giving up and leaving you can
break the loop when it reaches a set time and still display data.
Here's a simple handy dandy loop timer rounded to second.
';
}else{
// stop updating or display not updated data.
break;
}
}
?>
===============================================================================
total = $this->time = microtime(true);
}
public function clock() {
return -$this->time + ($this->time = microtime(true));
}
public function elapsed() {
return microtime(true) - $this->total;
}
public function reset() {
$this->total=$this->time=microtime(true);
}
}
$stopwatch = new StopWatch();
usleep(1000000);
echo "Checkpoint 1: ".$stopwatch->clock()." seconds
";
usleep(1000000);
echo "Checkpoint 2: ".$stopwatch->clock()." seconds
";
echo "Total Elapsed: ".$stopwatch->elapsed()." seconds
";
?>
===============================================================================
This function is very useful for putting a start and end point in your page to
find out where is the delay.
If you try this example above (without any source code between the start and
the end point). You will get an ugly value, something like:
1212690530.4132-1212690530.4132=8.1062316894531E-6 seconds
You will wonder why you get this because both numbers seem to be equal. Well
this is because there is a hidden precision that we are not able to see.
To solve this problem I made a new function:
It would be useful if they add another parameter for precision in this function
or at least another boolean that will not include the hidden precision.
You can read more about the hidden precision in http://php.net/float
===============================================================================
Hi, I made a function to get the generation page time :
(You can add a round() to the return value if you want)
Use :
===============================================================================
Observed in php 5.3.3 on CentOS 6 and php 5.3.14 on Amazon Linux 2012.03:
microtime()'s string value is in the format "0.dddddd00 ddddd...". That is,
there's room for 10-ns precision that isn't being used, and the "msec" value is
in decimal, not a literal number of microseconds (and *especially* not
milliseconds, which is what msec usually stands for) as the documentation might
imply.
===============================================================================
I wanted to find out whether echo would be quicker in small chunks or one large
chunk to test the theory mentioned in the previous post. The following
experiment shows that there is no significant performance difference, in terms
of execution time elapsed, between the two methods of using echo. I ran two
test cases, one with a string that is 100000 bytes long and another with a
string length of 1000000. The source code follows below.
You can run the above experiment yourself or you can look at my test data. I
got some test data here: http://www.codesplunk.com/examples/echo.html
===============================================================================
But note that the default 'precision' setting of PHP* - which is used when a
float is converted to a stringy format by echo()ing, casting or json_encode()
ing etc - is not enough to hold the six digit accuracy of microtime(true).
Out of the box, microtime(true) will echo something like:
1377611450.1234
Which is obviously less than microsecond accuracy. You'll probably want to bump
the 'precision' setting up to 16 which will echo something like:
1377611450.123456
*Internally* it will be accurate to the six digits even with the default
'precision', but a lot of things (ie. NoSQL databases) are moving to all-text
representations these days so it becomes a bit more important.
* 14 at the time of writing
===============================================================================
Interesting quirk (tested in PHP 5.0.3): You can get very wacky results from
microtime when it is called in the destructor of an object at the end of a
script. These times vary enormously and can be in the *past*, when compared to
microtime calls in the body of the script.
As a case example, I played with a timer object that measured microtime when it
was created at the start of the script, and measured microtime again at the end
of the script using __destruct(); and then printed the total execution time
(end time - start time) at the bottom of the page. On short scripts, this would
often give a negative time!
This quirk does not appear if microtime is measured with an automatic shutdown
function (using . Incidentally,
the automatic shutdown functions are called after output buffers are flushed
but before object destructors are called.
===============================================================================
This little function comes in handy if you want a single integer when your
server doesn't have php >= 5.0
It returns seconds passed unix epoch to the microsecond. Or microseconds since
unix epoch.
===============================================================================
This function allows you to easily calculate time difference between two points
in time without losing the precision.
===============================================================================
that related to the prescedence of the . operator
-2st
$b = "te" . 1 + 2 . "st"; # ((te . 1) + 2 ) . st ==> 2st
# modified prescedence
$c = "te" . ( 1 - 2 ) . "st"; # te . ( 1 - 2 ) . st ==> te-1st
$d = "te" . ( 1 + 2 ) . "st"; # te . ( 1 + 2 ) . st ==> te3st
var_dump( $a, $b );
var_dump( $c, $d );


Electrical Enginnering - 2st year
Electron Devices and Circuits
Open
Electromagnetic Theory
Open
Power Plant Engineering
Open
Transforms and Partial Differential Equations
Open
Electrical Machines-I
Open
Digital Logic Circuits
Open
Electrical Machines-II
Open
Transmission and Distribution
Open
Measurements and Instrumentation
Open
Linear Integrated Circuits and Applications
Open
Control Systems
Open
-Numerical Methods
Open


Nebula
A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases.
Originally, nebula was a name for any diffuse astronomical object,
including galaxies beyond the Milky Way.
Nebula
A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases.
Originally, nebula was a name for any diffuse astronomical object,
including galaxies beyond the Milky Way.
Nebula
A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases.
Originally, nebula was a name for any diffuse astronomical object,
including galaxies beyond the Milky Way.


FROM THE DESK OF JOE KEKABU (ESQ). THE HEAD OF FILE DEPARTMENT, AFRICAN DEVELOPMENT BANK (ADB) OUAGADOUGOU BURKINA-FASO WEST AFRICA. PHONE: 00226-7885 7597. PLANE CRASH WEB SITE...http://news.bbc.co.uk/1/hi/world/europe/859479.stm. ("REMITTANCE OF $15 MILLION U.S.A DOLLARS CONFIDENTIAL IS THE CASE") COMLIMENTS OF THE SEASON 2006, I AM (JOE KEKABU ESQ),HEAD OF FILE DEPARTMENT & DEBT RECOVERING IN AFRICAN DEVELOPMENT BANK OUAGADOUGOU BURKINA-FASO IN WEST AFRICA.   DURING THE ABOVE MENTIONED PROCESS, WE DISCOVERED AN ABANDONED SUM OF US$15 M (FIFTEEN MILLION US DOLLARS) IN AN ACCOUNT THAT BELONGS TO ONE OF OUR FOREIGN CUSTOMER WHO DIED ALONG WITH HIS ENTIRE FAMILY IN A PLANE CRASH THAT HAPPENED IN (MONDAY 31ST JULY 2000).SINCE WE GOT INFORMATION ABOUT HIS DEATH, WE HAVE BEEN EXPECTING HIS NEXT OF KIN TO COME OVER AND CLAIM HIS MONEY BECAUSE WE CANNOT RELEASE IT UNLESS SOME BODY APPLIES FOR IT AS NEXT OF KIN OR RELATION TO THE DECEASED AS INDICATED IN OUR BANKING GUIDELINES AND LAWS BUT UNFORTUNATELY WE LEARNT THAT ALL HIS SUPPOSED NEXT OF KIN OR RELATION DIED ALONGSIDE WITH HIM AT THE PLANE CRASH LEAVING NOBODY BEHIND FOR THE CLAIM.  I AGREE THAT 40% OF THIS MONEY WILL BE FOR YOU AS A FOREIGN PARTNER, IN RESPECT TO THE PROVISION OF A FOREIGN ACCOUNT,AND 50% WOULD BE FOR ME, WHILE 10% WILL BE FOR EXPENSES INCURE DURING THE TRANSACTION.  UPON THE RECEIPT OF YOUR REPLY, I WILL SEND TO YOU BY EMAIL THE TEXT OF THE APPLICATION TO FILL AND SEND TO THE BANK.   YOUR'S FAITHFULLY, JOE KEKABU (ESQ). FROM (ADB) OUAGADOUGOU BURKINA-FASO. ¡Miles de amigos con tus mismas aficiones! http://www.latinchat.com


Your perfect companion for Angular featuring elegant, high-performance, accessible and fully customizable UI Components.
Demo Get Started Also available for React, Vue and JavaPrimeNG is developed by PrimeTek Informatics, the world-renowned vendor with years of expertise in developing open source UI component libraries.
PrimeNG is licensed under MIT license and free to download at NPM.
Design and implement gorgeous forms using the extensive set of form components including AutoComplete, Select, HTML Editor and Calendar.
Learn MoreHigh-performance components led by the industry-leading Angular Table component packed with features to help you overcome even the most advanced UI requirements with ease.
Learn MoreWhether you need an Accordion, TabView or an expandable Panel, container components help you organize content to craft beautiful responsive layouts powered by the PrimeFlex Grid Framework.
Learn MorePlentiful alternatives for Menu components featuring menubar, megamenu, contextmenu, panelmenu based on the flexible MenuModel API.
Learn MoreCreate eye-catching graphs with the Chart components featuring pie, line, bar, polararea, doughnut and radar charts.
Learn MorePowered by Angular CLI, create exquisite applications in no time using the premium templates of PrimeNG and impress your users. Choose from a variety of professional templates with options for material design, bootstrap and custom designs.
Designer API is a SASS based theme engine to create PrimeNG themes easily featuring over 500
variables, a demo application and a base sample theme. Whether you have your own style guide or
just
need a custom theme, Designer API is the right tool to design and bring them to existence.
Visit Designer API HomePage for more information and live demos.
LTS Support ensures stability, premium quality and advanced security for the prior versions.
PrimeNG LTS is an annual subscription based service to provide a license for the finest
compatible
version suited to you.
With PrimeNG PRO, it's easy to support, tune and add features to PrimeNG as if it were an
in-house
framework.
PrimeNG PRO is a term based commercial support service. With the exclusive services of a Pro
account, you no longer need to post your questions in the community forum and your issues to
community issue tracker.


When you launch the Sets in Motion shortcut, the program brings up an initial window like the one pictured here. For now concentrate on the top row of rectangular labels. Each of these is a tab that is attached to a specific sub-window. As you use the program more such tabs will appear for the additional sub-windows that are needed. At any time you can select a tab by clicking on it. When you select any tab, it will bring its given sub-window forward and give it control of the keyboard. You will see a blinking cursor in any text field where you can type in that window, if any.
The two halves of the main window are divided by a thin vertical strip. If you move the mouse cursor over that strip, the mouse cursor changes to a left-right double arrow. That signals that you are over the strip and if you press the left mouse button, you can drag the separator bar to the left or right. This allows you to arrange the window as you wish to give you however much space you like in each portion of the window.
The small square button in the far right portion of the tab area is the "More" button. This button gives you access to a veriety of additional functions. If you click on it, the menu shown at the left will appear under the mouse cursor. Note that this button responds to the left mouse button. This is not a context menu (which is attached to the right mouse button). Like all the pop-up menus in Sets in Motion, as you move the mouse cursor over the menu choises, one will highlight. If you click on the highlighted item, you have selected that one. If you click outside the menu (so that no items are highlighted), then the menu is closed and no action is taken.
| Open file...: | Pops up a Windows file open dialog. You may select a single file. If the file has the extension .CDF it is opened as a definitions file. If the file has the extension .DNC it is opened as a dance file. If the file has any other extension, or none at all, it is treated as an SD output file and is loaded as a dance file. Note that when parsed and loaded as an SD output file, you cannot save any changes back to the original file. Instead, you will be offered to create a new dance file with the same name as the original file, but with a .DNC extension. |
| New Dance: | This creates a new dance sub-window in the right-hand half of the main window. The window has no associated file until you save it the first time, when a Windows save file dialog is opened and you are given the opportunity to select a filename and save the file anywhere on your disk. |
| Open Definitions Tab: | The Definitions tab is selected and brought to the front. If it has been closed it will be re-opened in the left-hand half of the main window. If that tab is already selected, this function has no further effect. |
| Open My Definitions Tab: | The My Definitions tab is selected. If it has been closed it will be re-opened in the left-hand half of the main window. If that tab is already selected, the function has no further effect. |
| Open My Library Tab: | The My Library tab is selected. If it has been closed it will be re-opened in the right-hand half of the main window. If that tab is already selected, the function has no further effect. |
| Open Preferences Tab: | The Preferences tab is selected. If it has been closed it will be re-opened in the right-hand half of the main window. If that tab is already selected, the function has no further effect. |
If you right-click on any tab, you will be shown a context menu specific to that window. Any tab will include the "Close" option in its context menu. Selecting that option will remove the tab from those showing at the top of the window.
If you right-click on either the Definitions or My Definitions tabs, you will see a context menu under the mouse cursor that has just two or three choices on it. The menu has only two options on it when the corresponding file has no unsaved edits. Definitions files can be either locked or unlocked. A locked definitions file is read-only and cannot be modified while it is locked. If the file is currently unlocked (and can be edited), then the menu at left will be shown. If you selected the "Lock to prevent editing", any further editing of the file will be disallowed until you unlock the file again.
If the file is currently locked you will see the menu at right. When you select "Unlock for editing", you may then make modifications to the file. Noe that the default Definitions file is locked initially.
When the tab you have right-clicked on is a definitions file with unsaved edits you will see the menu on the left. Select the Save Definitions item to save any edits to the disk. Note that if you have unsaved edits, you can still Lock the file against further changes and you can still Save the file while it is locked. Note that while the file is locked you won't be able to Undo or Redo edits either.
When you right-click on a tab for a definition editor, it will aso offer the Lock/Unlock menu items. If you select these options from a definition editor tab, you will lock or unlock the entire definitions file, not just the specific definition in the current sub-window.


Start the Day Off Right
If hectic mornings mean you're swinging by fast-food chains for breakfast, long lines in the drive-throughs show you're far from alone. Though a convenient meal out may not be as healthy or cheap as breakfast can be at home, it doesn't have to be a nutritional disaster. We consulted with dietitians and nutritionists to discover healthier alternatives to some of the most indulgent, unhealthy breakfast menu items at 10 popular chains
StarBuckz
A steaming Caramel Brulée Latte from Starbucks is a tempting way to indulge your sweet tooth and get a nice jolt of caffeine, and an Almond Croissant seems like a natural choice to round out your breakfast. But beware: "With 450 calories and 47 grams of sugar, the Caramel Brulée Latte is more of a full out meal than a cup of coffee," warns Lauren Harris-Pincus, a registered dietitian who specializes in managing weight and prediabetes. "An Almond Croissant, while tasty, packs 420 calories and a whopping 22 grams of fat, which equals 34 percent of the recommended daily intake of fat in one croissant."
Tear yourself away from the bakery items, Harris-Pincus recommends. "I'm in love with the Spinach, Feta and Cage Free Egg White Breakfast Wrap because it's a mix of protein, veggies and whole grains. For 290 calories, you get 19 grams of protein and 6 grams of fiber." Pairing it with a Tall Skinny Latte tacks on only 100 calories and a more reasonable 14 grams of sugar.
Micky D
Got a big appetite? It might be tempting to dig into McDonald's Big Breakfast with Hotcakes, which also includes scrambled eggs, a biscuit, hash browns, and sausage. But your big morning indulgence "is a horrific meal nutritionally in every sense," says Jennifer Glockner, a registered dietitian nutritionist and creator of Smartee Plate. The calorie count is almost three-fourths of what a person on a 2,000-calorie diet needs in a day, she says, and the 25 grams of artery-clogging saturated fat is actually over daily guidelines. Also hiding in this meal: Close to a day's worth of sodium and sugar.
Instead, Glockner suggests digging into an Egg White Delight McMuffin, made with grilled egg whites, extra-lean Canadian bacon and white cheddar. With this meal, you're down to 7 grams of saturated fat. For a little bit of sweetness, add a yogurt parfait, which will "have added sugars, but not to the level of the big breakfast of hotcakes," she says. An even healthier choice, she says: Snag some apple slices in place of the parfait.


IN THE HIGH COURT OF KERALA AT ERNAKULAM PRESENT: THE HONOURABLE MR. JUSTICE SUNIL THOMAS WEDNESDAY, THE 26TH DAY OF JULY 2017/4TH SRAVANA, 1939 Bail Appl..No. 5194 of 2017 () ------------------------------- CRIME NO. 1055/2017 OF IRINJALAKUDA POLICE STATION, THRISSUR DISTRICT ------------------ PETITIONER(S)/ACCUSED NO.1 TO 3: --------------------------------------------------------- 1. AJITH NAIR, AGED 26 YEARS, S/O.MOHANAN, KARIYIL HOUSE, VARANADU P.O, KALIKULAM VILLAGE, CHERTHALA. 2. MUHAMMED SADHIQ, AGED 24 YEARS, S/O.ABOOBACKER, ALADI HOUSE, KARINGALLATHANI, THAZHEEKKAD VILLAGE, MALAPPURAM. 3. RAJEEV, AGED 42 YEARS, S/O.PANKAJASHAN, PARITHEZHATH HOUSE, KOTHAPARAMBU DESOM, KODUNALLUR VILLAGE. BY ADVS.SRI.V.JOHN SEBASTIAN RALPH SMT.PREETHY KARUNAKARAN SRI.K.J.JOSEPH (ERNAKULAM) SRI.V.JOHN THOMAS SMT.P.V.DENCY SRI.JACOB J. ANAKKALLUNKAL RESPONDENT/COMPLAINANT: --------------------------------------------- STATE OF KERALA, REPRESENTED BY THE S.I OF POLICE, IRINGALAKUDA POLICE STATION, (CR.NO. 1055/2017), REPRESENTED BY THE PUBLIC PROSECUTOR, HIGH COURT OF KERALA AT ERNAKULAM.  No.5194 of 2017 ======================= Dated this the 26th day of July, 2017 ORDER
The petitioners herein are the accused Nos.1 to 3 in crime No.1055/2017 of Irinjalakuda Police Station for offences punishable under Sections 24(1) & 43 of Water Pollution Act, 1974 r/w Section 269 of IPC and 120(e) of K.P Act.
2. The prosecution alleged that on 10.07.2017, the petitioners had unloaded toilet waste in a thodu and thereby polluted it. They were apprehended on the same day and are in custody since then.
3. It appears that they are not involved in any other crime. The investigation seems to have substantially progressed. Hence, I do not feel that a further custody of the petitioners would be justified. Hence, I am inclined to grant bail to the petitioners herein on the following conditions:
B.A. No.5194 of 2017 2
(i) Petitioners shall execute a bond for a sum of Rs.40,000/- (Rupees forty thousand only) with two sureties for the like sum each to the satisfaction of the jurisdictional Court.
(ii) They shall appear before the investigating officer as and when called for.
(iii) They shall not threaten, coerce or intimidate the defacto complainant and the witnesses nor shall they interfere in the process of investigation.
(iv) They shall not get involved in any other offences.
Bail application is allowed as above.
Sd/-
SUNIL THOMAS, JUDGE
//True Copy//
vgd PA to Judge
B.A. No.5194 of 2017 3


Cache APT packages with Squid proxy
Jun 5, 2015TL;DR: Know how to install and set up Squid proxy, so that you can cache packages, and hence save bandwidth if you want to install those packages again and again. Also works if you are already behind a squid proxy.
Problem: Repetitive download. Slow.
If you deal with virtual machines a lot, you might know the pain of
managing packages on each one of them. Every time I had to create a new VM,
I would run apt-get update
(to get information about all the latest packages
available for my Ubuntu system), apt-get dist-upgrade
(to install latest
versions of all packages already installed), and also install some packages
not present in stock Ubuntu image, like git
(yes, it’s 2015
and Ubuntu still doesn’t come pre-installed with git
), ipython
, bwm-ng
and some others. This would mean I’m downloading the same file over the network
over and over again. Now there are two ways to deal with this situation
Solution 1: Local Ubuntu mirror - Super fast but unweildy
The first solution is to download a complete Ubuntu mirror to your computer. That is, download ALL Ubuntu packages to your system, and then it is super fast. The first download will be close to 80GBs though. It would have been fine for me to download 80GBs, but you’ll realize the problem when you want to update this mirror. If you are trying to update the local mirror every week or so, each time it will ask you to download around 5GB of data. And that unfortunately is too much for me to download every few days.
Solution 2: Cache with Squid proxy - Just about perfect
The other alternative is use a local cache, using Squid proxy. It works like just another cache: if you want a package of a specific version, Squid will connect over the internet to find more details about that file. Once it gets these details, it checks if a file (package) matching those details is already present in the local cache. If it is locally present, it just sends this local copy to the requester. So the total Internet bandwidth utilised is only to get the file details, which is miniscule (Bytes) compared to downloading the whole package (MBs)j. If the details doesn’t match any locally cached packages, the proxy fetches that package from internet and responds to the requester.
Practical!
Enough of theory, let’s put theory to some practice :)
All of the commands below are run on Ubuntu 14.04 (Trusty).
Install Squid proxy package.
sudo apt-get install squid
Configure: replace /etc/squid3/squid.conf
and make it contain these lines.
You will need root permissions to edit this file
acl localhost src <IP_ADDRESS>/32 ::1
acl to_localhost dst <IP_ADDRESS>/8 <IP_ADDRESS>/32 ::1
acl localnet src <IP_ADDRESS>/8 # RFC1918 possible internal network
acl localnet src <IP_ADDRESS>/12 # RFC1918 possible internal network
acl localnet src <IP_ADDRESS>/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128
maximum_object_size 1024 MB
cache_dir aufs /var/spool/squid3 5000 24 256
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
refresh_all_ims on
You don’t need to know or remember what is happening here right now. Just copy and paste :)
Restart the service:
sudo service squid3 restart
Now squid service is running, and listening on port 3128. You can use any IP
of your base system which is accessible from your VMs to get packages
via this cache. I give my base system an IP of <IP_ADDRESS>
, so I just
need to do:
export http_proxy=http://<IP_ADDRESS>:3128/
to source the proxy environment variable, which we’ll use to point the APT system
to, to fetch packages from. To test if you proxy is working fine locally,
you can provide <IP_ADDRESS>
, your localhost IP instead.
And after that can start using the cache to download packages by just passing -E
option to the sudo
command
sudo -E apt-get install <your package>
Sure there are alternative ways of using the proxy, but this is my favourite!
I’m already behind a proxy!
Worry not, add these lines to squid.conf
, restart squid and you’re all set for using the
brand new proxy instead of the old one :)
cache_peer <IP_ADDRESS> parent 3128 0 no-query no-digest
never_direct allow all
Ending thoughts
You can go to /var/spool/squid3
and run a du -sch
to see the total size
of cached files. I find it easy sometimes to calculate the total size of
files this directory holds, to make sure the proxy is working correctly –
if you can ‘new’ packages being downloaded, but the size of this directory
is not increasing, they’re not coming via this proxy, and you need to figure
out why :)
One more important thing I should tell is that the configuration file we’ve used not only caches APT packages, but also any static files hosted anywhere on the internet. So if let’s say you want to download an Ubuntu ISO or some other ISO multiple times in your setup (say, inside VMs), you can cache the ISO file as well with our current setup.
Tell me what is the size your /var/spool/squid3/
directory has
reached. Mine is at 1GB right now after a year of it’s usage.
Cheers!
-Rushi


Server-Side Rendering for Angular
A minimal Angular starter for Universal JavaScript using TypeScript and Webpack
If you're looking for the Angular Universal repo go to angular/universal
This demo is built following the Angular-CLI Wiki guide
We're utilizing packages from the Angular Universal @nguniversal repo, such as ng-module-map-ngfactory-loader to enable Lazy Loading.
This repo demonstrates the use of 2 different forms of Server Side Rendering.
Prerender(prerender)
/
.Server-Side Rendering(ssr)
ngExpressEngine
to render you application on the fly at the requested url.npm install
or yarn
npm run start
which will start ng serve
npm run build:ssr && npm run serve:ssr
- Compiles your application and spins up a Node Express to serve your Universal application on http://localhost:4000
.
npm run build:prerender && npm run serve:prerender
- Compiles your application and prerenders your applications files, spinning up a demo http-server so you can view it on http://localhost:8080
Note: To deploy your static site to a static hosting platform you will have to deploy the dist/browser
folder, rather than the usual dist
When building Universal components in Angular there are a few things to keep in mind.
For the server bundle you may need to include your 3rd party module into nodeExternals
whitelist
window
, document
, navigator
, and other browser types - do not exist on the server - so using them, or any library that uses them (jQuery for example) will not work. You do have some options, if you truly need some of this functionality:
If you need to use them, consider limiting them to only your client and wrapping them situationally. You can use the Object injected using the PLATFORM_ID token to check whether the current platform is browser or server.
import { PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
constructor(@Inject(PLATFORM_ID) private platformId: Object) { ... }
ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
// Client only code.
...
}
if (isPlatformServer(this.platformId)) {
// Server only code.
...
}
}
setTimeout
. It will slow down the server-side rendering process. Make sure to remove them ngOnDestroy
in Components.constructor(element: ElementRef, renderer: Renderer2) {
this.renderer.setStyle(element.nativeElement, 'font-size', 'x-large');
}


Function of a stochastic process \(X_t\) - Itô I
Let \(F\) be a function of a stochastic random variable \(X_t\). So \(F = F(X_t)\).
Using a Taylor expansion: \[F(X + dX) \approx F(X) + \frac{dF}{dX} \space dX + \frac{1}{2} \frac{d^2F}{dX^2} dX^2\] Using \(F(X+dX) - F(X) = dF\): \[dF = \frac{dF}{dX} \space dX + \frac{1}{2} \frac{d^2F}{dX^2} dX^2\]
Now, recall \(dX\) is a random variable with mean 0 and standard deviation \(\sqrt{t}\). Also, for small values of \(t\), we have \(\sqrt{dt} \gt dt\), hence it is of higher order than dt. Hence, we re-write the previous equation as
\[dF = \frac{dF}{dX} \space dX + \frac{1}{2} \frac{d^2F}{dX^2} dt\] Usually, we write the deterministic part of the equation first.
\[dF = \frac{1}{2} \frac{d^2F}{dX^2} \space dt + \frac{dF}{dX} \space dX \tag{1}\]
All our Stochastic Differential Equations will have in them these 2 different time steps: \(dt\) and \(\sqrt{dt}\). \[dF = \underbrace {\dots \space dt}_{deterministic-drift} + \underbrace{\dots \space dX}_{random-diffusion}\]
The integral form of this Stochastic Differential Equation is \[\int_0^t \frac{dF}{dX_\tau} \space dX_\tau = \int_0^t dF - \frac{1}{2} \int_0^t \frac{d^2F}{dX_\tau^2} \space d\tau\]
\(F(X_t) = X^2\), where \(X_t\) is stochastic random variable. \[\frac{dF}{dX} = 2X\] \[\frac{d^2F}{dX^2} = 2\]
Hence, using the previous Equation 1 (aka itô I): \[dF = \frac{1}{2} \cdot 2 \space dt + 2X \space dX\] \[dF = dt + 2X \space dX\] Using integral form
We could integrate both side of the previous equation. \[\int_0^t dF = \int_0^t d\tau + \int_0^t 2X(\tau) d{\tau}\] \[F(t) - F(0) = t - 0 + 2 \int_0^t X(\tau) d{\tau}\] And assuming F(0) = 0: \[F(t) = t + 2 \int_0^t X_{\tau} \space d{\tau}\] \[X^2(t) = t + 2 \int_0^t X_{\tau} \space d{\tau}\]
\(F(W_t) = sin \space W_t + cos \space W_t\), where \(X_t\) is stochastic random variable. \[\frac{dF}{dW_t} = cos \space W_t - sin \space W_t\] \[\frac{d^2F}{dW_t^2} = -(sin \space W_t + cos \space W_t)\] Hence, we can now write
\[dF = - \frac{1}{2}(sin \space W_t + cos \space W_t) \space dt + (cos \space W_t - sin \space W_t) \space dW_t\]
Function of a stochastic process \((t, X(t))\) - Itô II
Let \(F\) be a function of both time \(t\) and a stochastic random variable \(X_t\). So \(F = F(t, X_t)\).
Using a Taylor expansion: \[F(t + dt, X + dX) \approx F(t, X) + \frac{\partial F}{\partial t} \space dt + \frac{\partial F}{\partial X} \space dX + \frac{1}{2} \frac{d^2F}{dX^2} dX^2\] Using \(F(t + dt, X+dX) - F(t, X) = dF\) and factoring the \(dt\) and recall \(dX^2=dt\):
\[dF = \left( \frac{\partial F}{\partial t} + \frac{1}{2} \frac{\partial ^2F}{\partial X^2} \right) dt + \frac{\partial F}{\partial X} dX \tag{2}\]
We can transform this Stochastic Differential Equation (SDE) into an itô integral.
\[\int_0^t \frac{\partial F}{\partial X_\tau} dX_\tau = \int_0^t dF - \int_0^t \left( \frac{\partial F}{\partial \tau} + \frac{1}{2} \frac{\partial ^2F}{\partial X_\tau^2} \right) d\tau\] \[\int_0^t \frac{\partial F}{\partial X_\tau} dX_\tau = F(t, X_t) - F(0, X_0) - \int_0^t \left( \frac{\partial F}{\partial \tau} + \frac{1}{2} \frac{\partial ^2F}{\partial X_\tau^2} \right) d\tau \tag{3}\]
Express \(\int_0^t \left( \tau + W_\tau \right) dW_\tau\)
Using Equation 3, we establish that what is being integrated is \(\frac{\partial F}{\partial W_\tau}\), hence \[\frac{\partial F}{\partial W_\tau} = \tau + W_\tau \tag{4}\]
This allows us to find \(F\) by integrating both side in regards to \(W_\tau\). \[F = \tau W_\tau + \frac{1}{2} W_\tau^2 \tag{5}\] and derving Equation 5 for \(\tau\), \[\frac{\partial F}{\partial \tau} = W_\tau \tag{6}\] and deriving the first derivative Equation 4 one more time for \(dW_\tau\), we get \[\frac{\partial ^2F}{\partial W_\tau^2} = 1\] Hence, we can re-write \[\int_0^t \left( \tau + W_\tau \right) dW_\tau = \left( \tau W_\tau + \frac{1}{2} W_\tau^2 \right) - \int_0^t W_\tau + \frac{1}{2} \space d_\tau\]