In this project, you'll build your first neural network and use it to predict daily bike rental ridership. We've provided some of the code, but left the implementation of the neural network up to you (for the most part). After you've submitted this project, feel free to explore the data and the model more.
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
A critical step in working with neural networks is preparing the data correctly. Variables on different scales make it difficult for the network to efficiently learn the correct weights. Below, we've written the code to load and prepare the data. You'll learn more about this soon!
data_path = 'Bike-Sharing-Dataset/hour.csv'
rides = pd.read_csv(data_path)
rides.head()
This dataset has the number of riders for each hour of each day from January 1 2011 to December 31 2012. The number of riders is split between casual and registered, summed up in the cnt
column. You can see the first few rows of the data above.
Below is a plot showing the number of bike riders over the first 10 days in the data set. You can see the hourly rentals here. This data is pretty complicated! The weekends have lower over all ridership and there are spikes when people are biking to and from work during the week. Looking at the data above, we also have information about temperature, humidity, and windspeed, all of these likely affecting the number of riders. You'll be trying to capture all this with your model.
rides[:24*10].plot(x='dteday', y='cnt')
Here we have some categorical variables like season, weather, month. To include these in our model, we'll need to make binary dummy variables. This is simple to do with Pandas thanks to get_dummies()
.
dummy_fields = ['season', 'weathersit', 'mnth', 'hr', 'weekday']
for each in dummy_fields:
dummies = pd.get_dummies(rides[each], prefix=each, drop_first=False)
rides = pd.concat([rides, dummies], axis=1)
fields_to_drop = ['instant', 'dteday', 'season', 'weathersit',
'weekday', 'atemp', 'mnth', 'workingday', 'hr']
data = rides.drop(fields_to_drop, axis=1)
data.head()
To make training the network easier, we'll standardize each of the continuous variables. That is, we'll shift and scale the variables such that they have zero mean and a standard deviation of 1.
The scaling factors are saved so we can go backwards when we use the network for predictions.
quant_features = ['casual', 'registered', 'cnt', 'temp', 'hum', 'windspeed']
# Store scalings in a dictionary so we can convert back later
scaled_features = {}
for each in quant_features:
mean, std = data[each].mean(), data[each].std()
scaled_features[each] = [mean, std]
data.loc[:, each] = (data[each] - mean)/std
We'll save the last 21 days of the data to use as a test set after we've trained the network. We'll use this set to make predictions and compare them with the actual number of riders.
# Save the last 21 days
test_data = data[-21*24:]
data = data[:-21*24]
# Separate the data into features and targets
target_fields = ['cnt', 'casual', 'registered']
features, targets = data.drop(target_fields, axis=1), data[target_fields]
test_features, test_targets = test_data.drop(target_fields, axis=1), test_data[target_fields]
We'll split the data into two sets, one for training and one for validating as the network is being trained. Since this is time series data, we'll train on historical data, then try to predict on future data (the validation set).
# Hold out the last 60 days of the remaining data as a validation set
train_features, train_targets = features[:-60*24], targets[:-60*24]
val_features, val_targets = features[-60*24:], targets[-60*24:]
train_targets.head()
Below you'll build your network. We've built out the structure and the backwards pass. You'll implement the forward pass through the network. You'll also set the hyperparameters: the learning rate, the number of hidden units, and the number of training passes.
The network has two layers, a hidden layer and an output layer. The hidden layer will use the sigmoid function for activations. The output layer has only one node and is used for the regression, the output of the node is the same as the input of the node. That is, the activation function is $f(x)=x$. A function that takes the input signal and generates an output signal, but takes into account the threshold, is called an activation function. We work through each layer of our network calculating the outputs for each neuron. All of the outputs from one layer become inputs to the neurons on the next layer. This process is called forward propagation.
We use the weights to propagate signals forward from the input to the output layers in a neural network. We use the weights to also propagate error backwards from the output back into the network to update our weights. This is called backpropagation.
Hint: You'll need the derivative of the output activation function ($f(x) = x$) for the backpropagation implementation. If you aren't familiar with calculus, this function is equivalent to the equation $y = x$. What is the slope of that equation? That is the derivative of $f(x)$.
Below, you have these tasks:
self.activation_function
in __init__
to your sigmoid function.train
method.train
method, including calculating the output error.run
method.class NeuralNetwork(object):
def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):
# Set number of nodes in input, hidden and output layers.
self.input_nodes = input_nodes
self.hidden_nodes = hidden_nodes
self.output_nodes = output_nodes
# Initialize weights
self.weights_input_to_hidden = np.random.normal(0.0, self.hidden_nodes**-0.5,
(self.hidden_nodes, self.input_nodes))
self.weights_hidden_to_output = np.random.normal(0.0, self.output_nodes**-0.5,
(self.output_nodes, self.hidden_nodes))
self.lr = learning_rate
#### Set this to your implemented sigmoid function ####
# Activation function is the sigmoid function
self.activation_function = self.sigmoid #check if right
def sigmoid(self, x):
return 1 / (1 + np.exp((-x)))
def train(self, inputs_list, targets_list):
# Convert inputs list to 2d array
inputs = np.array(inputs_list, ndmin=2).T
targets = np.array(targets_list, ndmin=2).T
#### Implement the forward pass here ####
### Forward pass ###
# TODO: Hidden layer
hidden_inputs = np.dot(self.weights_input_to_hidden,inputs) # signals into hidden layer
hidden_outputs = self.activation_function(hidden_inputs) # signals from hidden layer
# TODO: Output layer
final_inputs = np.dot(self.weights_hidden_to_output,hidden_outputs)# signals into final output layer
final_outputs = final_inputs# signals from final output layer
#### Implement the backward pass here ####
### Backward pass ###
# TODO: Output error
output_errors = targets - final_outputs # Output layer error is the difference between desired target and actual output.
# TODO: Backpropagated error
hidden_errors = output_errors*self.weights_hidden_to_output# errors propagated to the hidden layer
#hidden_grad = np.dot(hidden_errors,hidden_outputs)*(1-hidden_outputs)# hidden layer gradients
hidden_grad = hidden_outputs*(1-hidden_outputs)# hidden layer gradients
# TODO: Update the weights
self.weights_hidden_to_output += np.dot(output_errors,hidden_outputs.T)*self.lr# update hidden-to-output weights with gradient descent step
self.weights_input_to_hidden += hidden_errors.T*hidden_grad*inputs.T*self.lr# update input-to-hidden weights with gradient descent step
def run(self, inputs_list):
# Run a forward pass through the network
inputs = np.array(inputs_list, ndmin=2).T
#### Implement the forward pass here ####
# TODO: Hidden layer
hidden_inputs = np.dot(self.weights_input_to_hidden,inputs)# signals into hidden layer
hidden_outputs = self.activation_function(hidden_inputs)# signals from hidden layer
# TODO: Output layer
final_inputs = np.dot(self.weights_hidden_to_output,hidden_outputs)# signals into final output layer
final_outputs = final_inputs# signals from final output layer
return final_outputs
def MSE(y, Y):
return np.mean((y-Y)**2)
Here you'll set the hyperparameters for the network. The strategy here is to find hyperparameters such that the error on the training set is low, but you're not overfitting to the data. If you train the network too long or have too many hidden nodes, it can become overly specific to the training set and will fail to generalize to the validation set. That is, the loss on the validation set will start increasing as the training set loss drops.
You'll also be using a method know as Stochastic Gradient Descent (SGD) to train the network. The idea is that for each training pass, you grab a random sample of the data instead of using the whole data set. You use many more training passes than with normal gradient descent, but each pass is much faster. This ends up training the network more efficiently. You'll learn more about SGD later.
This is the number of times the dataset will pass through the network, each time updating the weights. As the number of epochs increases, the network becomes better and better at predicting the targets in the training set. You'll need to choose enough epochs to train the network well but not too many or you'll be overfitting.
This scales the size of weight updates. If this is too big, the weights tend to explode and the network fails to fit the data. A good choice to start at is 0.1. If the network has problems fitting the data, try reducing the learning rate. Note that the lower the learning rate, the smaller the steps are in the weight updates and the longer it takes for the neural network to converge.
The more hidden nodes you have, the more accurate predictions the model will make. Try a few different numbers and see how it affects the performance. You can look at the losses dictionary for a metric of the network performance. If the number of hidden units is too low, then the model won't have enough space to learn and if it is too high there are too many options for the direction that the learning can take. The trick here is to find the right balance in number of hidden units you choose.
import sys
### Set the hyperparameters here ###
epochs = 2000
learning_rate = 0.03 # best uptill no .03 & 7 nodes, .01 and 7 nodes,.008
hidden_nodes = 7
output_nodes = 1
N_i = train_features.shape[1]
network = NeuralNetwork(N_i, hidden_nodes, output_nodes, learning_rate)
losses = {'train':[], 'validation':[]}
for e in range(epochs):
# Go through a random batch of 128 records from the training data set
batch = np.random.choice(train_features.index, size=128)
for record, target in zip(train_features.ix[batch].values,
train_targets.ix[batch]['cnt']):
network.train(record, target)
# Printing out the training progress
#print(network.run(train_features))
#print(train_targets['cnt'].values)
train_loss = MSE(network.run(train_features), train_targets['cnt'].values)
val_loss = MSE(network.run(val_features), val_targets['cnt'].values)
sys.stdout.write("\rProgress: " + str(100 * e/float(epochs))[:4] \
+ "% ... Training loss: " + str(train_loss)[:5] \
+ " ... Validation loss: " + str(val_loss)[:5])
losses['train'].append(train_loss)
losses['validation'].append(val_loss)
plt.plot(losses['train'], label='Training loss')
plt.plot(losses['validation'], label='Validation loss')
plt.legend()
plt.ylim(ymax=0.5)
Here, use the test data to view how well your network is modeling the data. If something is completely wrong here, make sure each step in your network is implemented correctly.
fig, ax = plt.subplots(figsize=(8,4))
mean, std = scaled_features['cnt']
predictions = network.run(test_features)*std + mean
ax.plot(predictions[0], label='Prediction')
ax.plot((test_targets['cnt']*std + mean).values, label='Data')
ax.set_xlim(right=len(predictions))
ax.legend()
dates = pd.to_datetime(rides.ix[test_data.index]['dteday'])
dates = dates.apply(lambda d: d.strftime('%b %d'))
ax.set_xticks(np.arange(len(dates))[12::24])
_ = ax.set_xticklabels(dates[12::24], rotation=45)
Answer these questions about your results. How well does the model predict the data? Where does it fail? Why does it fail where it does?
Note: You can edit the text in this cell by double clicking on it. When you want to render the text, press control + enter
Model predicts the data very well on training set with error of 7% but on validation set error is over double that of training set at 14%. This shows some over fitting during training. Further, the data vs prediction chart shows, our model has over-predicted from Dec 22nd onwards
Run these unit tests to check the correctness of your network implementation. These tests must all be successful to pass the project.
import unittest
inputs = [0.5, -0.2, 0.1]
targets = [0.4]
test_w_i_h = np.array([[0.1, 0.4, -0.3],
[-0.2, 0.5, 0.2]])
test_w_h_o = np.array([[0.3, -0.1]])
class TestMethods(unittest.TestCase):
##########
# Unit tests for data loading
##########
def test_data_path(self):
# Test that file path to dataset has been unaltered
self.assertTrue(data_path.lower() == 'bike-sharing-dataset/hour.csv')
def test_data_loaded(self):
# Test that data frame loaded
self.assertTrue(isinstance(rides, pd.DataFrame))
##########
# Unit tests for network functionality
##########
def test_activation(self):
network = NeuralNetwork(3, 2, 1, 0.5)
# Test that the activation function is a sigmoid
self.assertTrue(np.all(network.activation_function(0.5) == 1/(1+np.exp(-0.5))))
def test_train(self):
# Test that weights are updated correctly on training
network = NeuralNetwork(3, 2, 1, 0.5)
network.weights_input_to_hidden = test_w_i_h.copy()
network.weights_hidden_to_output = test_w_h_o.copy()
network.train(inputs, targets)
self.assertTrue(np.allclose(network.weights_hidden_to_output,
np.array([[ 0.37275328, -0.03172939]])))
self.assertTrue(np.allclose(network.weights_input_to_hidden,
np.array([[ 0.10562014, 0.39775194, -0.29887597],
[-0.20185996, 0.50074398, 0.19962801]])))
def test_run(self):
# Test correctness of run method
network = NeuralNetwork(3, 2, 1, 0.5)
network.weights_input_to_hidden = test_w_i_h.copy()
network.weights_hidden_to_output = test_w_h_o.copy()
self.assertTrue(np.allclose(network.run(inputs), 0.09998924))
suite = unittest.TestLoader().loadTestsFromModule(TestMethods())
unittest.TextTestRunner().run(suite)


协议
Legal Stuff
本网站的内容（除了文章中的源代码）如没有特殊说明以知识共享 BY-NC-ND 4.0协议
分享。
本网站中的源代码部分，如没有特殊说明，以 APACHE 协议
开源。
转载本站文章请注明作者及原文链接。
本站离不开以下开源/商业授权的项目：
-> Highlight.js
BSD 3-clause 协议
Copyright (c) 2006, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
 IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-> Portus 网站引擎
闭源个人授权
-> Bootstrap
MIT 协议
The MIT License (MIT)
Copyright (c) 2011-2016 Twitter, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-> jQuery
LICENSE.txt
Copyright JS Foundation and other contributors, https://js.foundation/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
Comments


Ruby Arrays & HashesOct 24th
Photo credit: r2hox / Foter / CC BY-SA
Imagine yourself a baseball card collector. You've accumulated a sizable collection and now wish to employ some sort of organizational system. You seek a reliable method to store, organize, and retrieve them when you need. Two of your friends, Jim and Steve, have always boasted that they can organize your collection for you, and that their system is the best.
Jim is a little special. As long as you've known him, he's been able to memorize numbers. Lots of them. One day, he shows you his binder of cards that he's kept and says to you, "I've put every single card in my collection in order, and if you tell me to find nth card, I can flip to it and find it in no time! Okay, let's put it to the test. Skeptically, you ask for the 257th card in his collection. Without looking, he flips open the sleeves and pulls out a Barry Bonds. Wow, okay this is great! Now, "find me a Sammy Sosa!". Jim is stumped, and has no words. "What's the matter, Jim?" You ask. Jim, abashed, looks down and admits, "I can't, because I'm an array...
Steve, without a moment to respond, busts through the door with his binder and shouts, "Hell, it's about time for hashes! You quickly turn around and fire four more player names in quick succession. He takes a little more time, but the cards are produced.
What we've discovered here is a nuance between Arrays and Hashes in Ruby. Don't worry, they sound more complicated than they are. Arrays care about order. Sure, you can change, sort, and do much more, but at the end of the day, Array only knows how to communicate via some nth item. In Ruby, they look like this:
>> jim_array = ['barry bonds', 'sammy sosa', 'babe ruth'] >> number_array = [25, 21, 3]
Arrays and Hashes can both store different types of data. Here we have two Arrays, one with names, and the other with numbers. If I want to ask Jim's array to tell me "what is the 3rd item in your collection?", it would look like this:
>> jim_array[2] => "babe ruth"
Why doesn't it point to 'sammy sosa'? After all, he is the second in the list. Like I said, Jim is a little special, he starts all his counting with 0.
Let's say you want to find out the player number. There is no connection to any meaningful player name in the number_array, so we can't use that and player number isn't stored in Jim's array at all. How do we connect the two? The key here is to use a hash.
>> steve_hash = { >> 'barry bonds' => 25, >> 'sammy sosa' => 21, >> 'babe ruth' => 3 >> }
Steve's hash looks different because now we can assign a player's name with their number. We use '=>' to do just that. To ask for Babe Ruth's number, we say:
>> steve_hash['babe ruth'] => 3
And there you have it, Arrays that can store your data in order and quickly retrieve them, and Hashes that can store sets of keys and values. In our example above, 'babe ruth' is a key that points to a certain value, 3. "Why not always use hashes since they're more flexible?", you might ask. True, they are flexible, but sometimes an array will do the trick, and faster. When we get into huge collections of data, speed can be an important factor in this decision. Also, you can even have an Arrays inside of a Hashs, or a Hashes with Arrays. Things can get crazy!


JavaScript is disabled on your browser.
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
F
G
I
N
O
R
S
T
U
F
finalize()
- Method in class io.flic.lib.
FlicManager
FlicAppNotInstalledException
- Exception in
io.flic.lib
Exception thrown when the Flic App was not installed
FlicBroadcastReceiver
- Class in
io.flic.lib
Broadcast receiver for events from the Flic App.
FlicBroadcastReceiver()
- Constructor for class io.flic.lib.
FlicBroadcastReceiver
FlicBroadcastReceiverFlags
- Class in
io.flic.lib
Used in
FlicButton.registerListenForBroadcast(int)
to tell which events you want to listen for.
FlicBroadcastReceiverFlags()
- Constructor for class io.flic.lib.
FlicBroadcastReceiverFlags
FlicButton
- Class in
io.flic.lib
FlicButton.
FlicButtonCallback
- Class in
io.flic.lib
FlicButtonCallback Callbacks for button updates.
FlicButtonCallback()
- Constructor for class io.flic.lib.
FlicButtonCallback
FlicButtonCallbackFlags
- Class in
io.flic.lib
Used in
FlicButton.setFlicButtonCallbackFlags(int)
to tell which events you want to listen for.
FlicButtonCallbackFlags()
- Constructor for class io.flic.lib.
FlicButtonCallbackFlags
FlicManager
- Class in
io.flic.lib
Flic Manager.
FlicManagerInitializedCallback
- Interface in
io.flic.lib
FlicManagerInitializedCallback.
FlicManagerUninitializedCallback
- Class in
io.flic.lib
FlicManagerUninitializedCallback
FlicManagerUninitializedCallback()
- Constructor for class io.flic.lib.
FlicManagerUninitializedCallback
forgetButton(FlicButton)
- Method in class io.flic.lib.
FlicManager
Forget button.
A
B
C
D
F
G
I
N
O
R
S
T
U
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


{% extends "layout.html" %} {% block page_title %} 2FA - GOV.UK prototype {% endblock %} {% block service_name %} Bob Thomas Arctor (AEDM) Home Your profile Sign out {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} HomeNotifications Notifications Inbox (1) Archive Title Date received User GRIB1234 is locked out. Temporary login expired. 13 Mar 2018 Back to start page {% endblock %}
Back to start page


Oklahoma judge reduces penalty against Johnson & Johnson in opioid crisis lawsuit
by Morgan PhillipsAn Oklahoma judge reduced the amount Johnson & Johnson must pay to help alleviate the state’s opioid crisis by $107 million due to a miscalculation.
The consumer products company was originally ordered to pay the state $572 million to clean up the crisis it allegedly helped cause, but District Court Judge Thad Balkman changed that number to $465 million. He acknowledged that in his original award he miscalculated how much it would cost to develop a program to treat babies born dependent on opioids.
The cost should have been $107,000, not $107 million.
OKLAHOMA JOHNSON & JOHNSON VERDICT FIGURES TO IMPACT OTHER OPIOID LAWSUITS
Following a seven-week trial this summer, Balkman ruled Johnson & Johnson and its subsidiaries helped fuel the opioid crisis by misleading consumers with an aggressive marketing campaign which oversold the effectiveness of the drugs to treat pain and undersold their addictive qualities.
Oklahoma Attorney General Mike Hunter said that opioid overdoses killed 4,653 people in the state from 2007 to 2017. Hunter called Johnson & Johnson a “kingpin” company motivated by greed and said two of the company’s subsidiaries produced much of the raw opium used by other manufacturers to produce the drugs.
SAN FRANCISCO SAW 150 PERCENT SPIKE IN FENTANYL-RELATED DEATHS LAST YEAR, REPORT SAYS
Oklahoma’s case is pivotal: It is the first state opioid case to make it to trial and could set precedent for negotiations in the more than 2,000 similar lawsuits filed by state, local and tribal governments that consolidated before a federal judge in Ohio.
Earlier, Oklahoma reached a $270 million deal with Perdue Pharma, the maker of OxyContin, and an $85 million settlement with Teva Pharmaceuticals.
The judge declined a request by defendants to further reduce the amount by taking into account pretrial settlements with the other two conglomerates.
CLICK HERE TO GET THE FOX NEWS APP
Attorneys for Johnson & Johnson said the company plans to appeal Balkman’s ruling to the Oklahoma Supreme Court.
Johnson & Johnson “did not cause the opioid crisis in Oklahoma, and neither the facts nor the law support this outcome,” company lawyer Michael Ullman said after the original verdict was announced.
The Associated Press contributed to this report.


--- title: Lossless Optimizers layout: post tags: [compression] uuid: 644ecd27-0f43-358b-e405-9553f79ae7e1 ---
I've been using lossless optimizers for awhile now for PNGs, but more recently I have found some for other formats. Here's the ones I know about. These are all intended to be lossless, so running them should result in no information loss (well, except the SVG one).
For PNG, there are a number of choices, but my favorite is OptiPNG. It adjust the PNG parameters and recompresses to find the optimal parameters. I run it on almost all my images around here, and I tend to get around 10% to 30% reduction for images fresh off Gimp, Kolourpaint, and ImageMagick.
For JPEG, I use jpegoptim. It works by optimizing the Huffman tables (the lossless part of JPEG compression). I only found this one recently, but I will be using it all the time, like on our new thousands of wedding reception photos.
For PDF, I found something called QPDF. It's designed more for other PDF transformations, but without any other parameters it will simply losslessly optimize a PDF. From what I've seen so far it cuts PDFs down by about a third.
For SVG, Scour is a young project, only a few months old. I've been looking for an SVG optimizer for some time, so this was exciting to find. Due to the type of file it's working with, it's not quite entirely lossless. Visually, it is lossless, but it will toss all metadata (comments, etc.), which may be important. If you hand-crafted your SVG, you won't want to use this tool. It's good for removing Inkscape and Illustrator cruft, though.
I have yet to find a good (Free) GIF optimizer. Animated GIFs, with lots of redundancy between frames, have a lot of potential for optimization too. A video optimizer (for, say, Theora) would be interesting; I imagine it might work similarly to jpegoptim. Audio files (like Vorbis, FLAC, or MP3) probably don't have any room for optimization. I could be wrong. For XHTML there is tidy if you want to count that. All the other XML formats (ODF, RSS, etc.) could have their own too. Or optimizers for archives, like zip and tar. For tar it might rearrange things to better suit gzip, bzip2, or lzma. Executable optimizers? Postscript optimizers? It goes on and on.
If you know about any more, especially for other file formats, let me know.


Most browsers allow to go fullscreen with some key press (such as F11). Try it!
Increase x and y steps to get something more "foggy" or decrease them to a more "liquid" thing.
Increase or decrease t steps to respectively slow down or speed up the noise fluctuations.


{% extends "index.html" %} {% block title %}{{ section.title }}{% endblock title %} {% block content %}
These are the lost lambdacats. They would like to be found. Please help!


~ The polar bear is an endangered species.
~ Polar bears need to eat around 12,325 calories per day according to a recent study, 60% more than what scientists had previously thought.
~ Sea ice is shrinking 14% per decade due to climate change, causing major changes in the Arctic and affecting the eating patterns of polar bears.
~ There has been a decrease of 770,000 square miles of sea ice since the median measurement in data from 1981-2010.
~ It is predicted that by 2050, the population of bears will be reduced to 10,000, two-thirds less than now. At the current rate, they are expected to go extinct in approximately 2100.
~ There has been a 40% decrease in polar bear population in the last 10 years in the Beaufort Sea region.
~ The population in the Beaufort Sea region deminished from 1,500 to 900 bears. "This is a clear warning sign of the impact a warming Arctic has on ice-dependent species like the polar bear," stated Dr. Pete Ewins, WWF Senior Species Officer in Canada.


Breeze Prototype
0min
Menu
Add
- Data Loading
=
Debug Panel
Official use only!
General
- Current Time
- Activities Presented
- Large Chunck
- Medium Chunck
- Small Chunck
Registered Events
- Event IdExpected Time
Playlist Timers
- Playlist IdElapsed Time


Vial
~ a micro micro-framework ~
Vial is a small web framework for making small web “sites” in Rust. It includes just a handful of basic features for delivering old school, server-side rendered HTML: request routing, form data parsing, response building, and serving static file assets.
The goal is a small, lean core that compiles quickly and has as few dependencies as possible. Use it for HTML stuff: prototyping ideas, testing out concepts, or, perhaps, even writing tiny personal apps. Nothing serious though, got it?
This manual is an overview of Vial’s built-in features, as well as the few optional features you can enable. It also includes suggestions for some “common tasks”, like using a database to store information.
Hello World
Here’s the bare minimum:
That should tell you a lot, in that there isn’t a lot to Vial.
Now here’s a bigger bear, showing off more of Vial’s features:
use vial::prelude::*;
routes! {
GET "/" => hello_world;
POST "/" => redirect_to_greeting;
GET "/:name" => hello_name;
GET "/*path" => |req|
Response::from(404).with_body(
format!("
404 Not Found: {}
",
req.arg("path").unwrap_or("")));
}
fn hello_world(_req: Request) -> &'static str {
"
Hello, world!

What's your name?

<form method='POST' action='/'>

<input name='name' type='text'/>

<input type='submit'/>

</form>"
}
fn redirect_to_greeting(req: Request) -> Option<impl Responder> {
let name = req.form("name")?;
Some(Response::redirect_to(format!("/{}", name)))
}
fn hello_name(req: Request) -> String {
format!(
"
Why hello there, {}!
",
req.arg("name").unwrap()
)
}
fn main() {
run!().unwrap();
}
You can run the above example from the root of this repository:
$ cargo run --example manual
Vial comes with a handful of examples in the examples/
directory, so be sure to peruse them skeptically - either alongside or after digesting this manual.
Overview
Like most web library thingy-jingies that only focus on server-side rendering, there are three main parts to a Vial application:
Routing: You write actions that take a Request and return either a Response or a Responder, then map them to URLs and URL patterns using the vial::routes! macro.
Requests: The Request object provides information about each client’s humble request.
Responses: Your actions return either a Response struct, which can be easily built, or a type that implements the Responder trait, like
String
orOption<Response>
.
Getting Started
Vial should work on any recent, stable version of Rust on Linux or macOS.
To begin, add Vial to your project’s Cargo.toml
:
Now all you have to do is call vial::routes!
to define your routes and vial::run!
to start the server in src/main.rs
:
This should start a server at http://<IP_ADDRESS>:7667 and tell you that it did. Congratulations! You’re on your way.
Routing
Routing is the real gravy and potatoes of any web framework, if you think about it. In Vial, routes are defined with the vial::routes! macro in this format:
HTTP_METHOD ROUTE_PATTERN => ACTION;
The order in which routes are written matters - routes written first will be checked for matches first, meaning you can declare many routes that point to "/"
, but only the first one defined will ever match.
HTTP Methods
HTTP_METHOD
can be one of:
GET
HEAD
POST
PUT
DELETE
PATCH
Route Patterns
ROUTE_PATTERN
can be an exact match, such as "/user"
or "/v2/search.php3"
, or it can include a named parameter:
"/:name"
— This will match anything except paths with/
or.
in them."/:name.md"
— Use this format to match on a specific file extension."/*name"
— This will match everything, including/
and.
In the three examples above, calling request.arg("name")
in an Action will return Some(&str)
.
Note that you can have multiple parameters in the same route, as long as the “match all” pattern occurs last:
vial::routes! {
GET "/:category/:id/*name" => |req| format!(
"
Category: {}

ID: {}

Name: {}
",
req.arg("category").unwrap_or("None"),
req.arg("id").unwrap_or("None"),
req.arg("name").unwrap_or("None"),
);
}
fn main() {
vial::run!();
}
Actions
Actions are what routes actually route to. They are functions or closures take a Request and return either a Response or something that implements the Responder trait:
use vial::prelude::*;
routes! {
GET "/info" => |req| format!(
"
Name: {}
", req.query("name").unwrap_or("None")
);
GET "/" => index;
}
fn index(req: Request) -> &'static str {
"<form method='GET'>

Enter your name: <input type='text' name='name'/>

<input type='submit'/>
</form>"
}
fn main() {
run!();
}
Returning impl Responder
is easy - Responder is a Vial trait that defines a single conversion method that returns a Response:
These types implement Responder
by default:
&str
String
usize
- Empty response with this number as the status code.Option<impl Responder>
- 404 onNone
Result<impl Responder, Error>
- 500 on Error
Filters
Filters are functions that are run before actions. They can either modify the existing request before it’s sent to your action, or they can return a Response
that will be delivered to the client without any actions being called:
Like Rust’s attributes, they can either apply to all routes defined in the same vial::routes!
macro call or just a specific route:
use std::sync::atomic::{AtomicUsize, Ordering};
use vial::prelude::*;
routes! {
// `count` will run before all routes in this block
#![filter(count)]
GET "/" => |_| "Hey there!";
GET "/hits" => hits;
// `count` will run again when /double is visited
#[filter(count)]
GET "/double" => double;
// `echo` will be called when /echo is visited
#[filter(echo)]
GET "/echo" => |_| "Is there an echo in here?";
}
fn hits(req: Request) -> impl Responder {
format!("Hits: {}", req.counter().count())
}
fn double(req: Request) -> impl Responder {
"Double trouble."
}
fn echo(req: &mut Request) -> Option<Response> {
println!("{:#?}", req);
None
}
fn count(req: &mut Request) -> Option<Response> {
req.counter().incr();
None
}
#[derive(Debug, Default)]
struct Counter(AtomicUsize);
impl Counter {
fn count(&self) -> String {
self.0.load(Ordering::Relaxed).to_string()
}
fn incr(&self) {
self.0.fetch_add(1, Ordering::Relaxed);
}
}
trait WithCounter {
fn counter(&self) -> &Counter;
}
impl WithCounter for Request {
fn counter(&self) -> &Counter {
self.state::<Counter>()
}
}
fn main() {
use_state!(Counter::default());
run!().unwrap();
}
Route Modules
Routes can be defined in different modules and combined together with vial::run!
:
mod blog;
mod wiki {
vial::routes! {
GET "/wiki" => |_| "This is the wiki.";
}
}
vial::routes! {
GET "/" => |_| "Index page.";
}
fn main() {
vial::run!(self, blog, wiki);
}
Requests
When a route matches and an Action is called, it’s passed a Request object. Request
contains information about the request itself, as well as a number of helper methods.
Route Parameters
As mentioned in the Routing section above, you can define parameters in a route and access their value for a given request using request.arg()
:
vial::routes! {
GET "/:animal" => |req| format!(
"Animal: {}", req.arg("animal").unwrap_or("None")
);
}
Query Parameters
In addition to route parameters, Vial will also parse good ol’ fashioned query string parameters for you:
vial::routes! {
GET "/info" => |req| format!(
"Version: v{}",
req.query("version").unwrap_or("?")
);
}
fn main() {
vial::run!();
}
Running this and visiting /info
will show:
Version: v?
But visiting /info?version=1.0
will show:
Version: v1.0
Like arg()
, query()
returns Option<&str>
.
Form Data
What’s the web without open ended <textarea>s
? Perish the thought.
POSTed form data follows the same pattern as query and route parameters: use request.form()
to access a form parameter:
use vial::prelude::*;
use db;
routes! {
GET "/show/:id" => show;
GET "/new" => new;
POST "/new" => create;
}
fn new(_req: Request) -> impl Responder {
"<form method='POST'>

Name: <input type='text' name='name'/>

Location: <input type='text' name='location'/>

<input type='submit'/>

</form>"
}
fn create(req: Request) -> Result<impl Responder, io::Error> {
let id = db::insert!(
"name" => req.form("name").unwrap(),
"location" => req.form("location").unwrap()
)?;
Ok(Response::redirect_to(format!("/show/{}", id)))
}
fn show(req: Request) -> Option<impl Responder> {
let record = db::query!("id" => id).ok()?;
format!(
"
Name: {}

Location: {}
",
record.get("name").unwrap_or("None"),
record.get("location").unwrap_or("None"),
)
}
fn main() {
run!();
}
Request Headers
Headers are available without any of the peksy conveniences of type safety. Just give request.header()
a string and hope you get one back!
use vial::prelude::*;
use std::{fs, path::Path};
routes! {
GET "/:file" => show;
}
fn show(req: Request) -> Option<impl Responder> {
let path = format!("./{}", req.arg("file")?);
if Path::new(&path).exists() {
if req.header("Accept").unwrap_or("?").starts_with("text/plain") {
Some(Response::from_header("Content-Type", "text/plain")
.with_file(&path))
} else {
let file = fs::read_to_string(&path).unwrap();
Some(Response::from_body(format!(
"

{}

", file)))
}
} else {
None
}
}
fn main() {
run!();
}
Header names are case insensitive, though, so at least you don’t have to worry about that.
Other Info
Beyond the headers, Request
also surfaces a few more basic bits of information such as the request.method()
and request.path()
:
impl Request {
// "GET", "POST", etc. Always uppercase.
fn method(&self) -> &str;
// Always starts with "/"
fn path(&self) -> &str;
}
Responses
Every Action returns either a Response or a type that implements the Responder trait’s single method:
Common types like &str
and Option<String>
already implement this, so you are free to be lazy and return simple types in your Actions. If, however, you want to set headers and do other fancy jazz, you’ll need to build and return a Response directly.
Rather than use the “Builder” pattern like more mature and better designed libraries, Vial’s Response lets you set properties either directly or using Builder-style methods:
Each Response
defaults to a Content-Type
of text/html; charset=utf8
, so you can build HTML with your bare hands:
To produce plain text, set the header using with_header()
or set_header()
, or use with_text()
instead of with_body()
or from_body()
:
fn readme(_req: Request) -> Response {
// This will be rendered as plain text.
Response::from_file("README.md")
.with_header("Content-Type", "text/plain")
}
Building Responses
The Response documentation contains more information on all the methods available, but here are some of the properties you can set on a Response in your actions:
fn from_text<S: AsRef<str>>(text: S) -> Response;
fn with_code(mut self, code: usize) -> Response;
fn with_body<S: AsRef<str>>(mut self, body: S) -> Response;
fn with_text<S: AsRef<str>>(self, text: S) -> Response;
fn with_json<T: serde::Serialize>(self, value: T) -> Response;
(requires thejson_serde
feature)fn with_reader(mut self, reader: Box<dyn io::Read>) -> Response;
fn with_asset(mut self, path: &str) -> Response;
fn with_file(mut self, path: &str) -> Response;
fn with_error<E: error::Error>(self, err: E) -> Response;
fn with_header(mut self, key: &str, value: &str) -> Response;
Redirect
To issue a 302 redirect, use the redirect_to
static method:
fn search(req: Request) -> Option<impl Responder> {
let url = format!(
"https://en.wikipedia.org/wiki/Special:Search?search={}",
req.arg("search")?
)
Some(Response::redirect_to(url))
}
Status Codes
Empty responses with status codes can be created from usize
:
fn fourohno(_req: Request) -> impl Responder {
Response::from(404)
}
fn pay_me(_req: Request) -> impl Responder {
402
}
Headers
Headers can be set Builder-style using with_header
or imperative-style using set_header
:
fn not_found(_req: Request) -> Response {
Response::from(404)
.with_header("Content-Type", "text/plain")
.with_body("404 Not Found")
}
fn download(req: Request) -> Option<impl Responder> {
Response::from_file(req.arg("file")?)
.with_header("Content-Type", "application/octet-stream")
}
fn perm_redirect(url: &str) -> Response {
Response::from(301).with_header("Location", url)
}
Serving Static Files
Vial can automatically serve static files out of an asset directory, complete with proper ETag handling, if you tell it which directory to use with the vial::asset_dir!
macro. It can also optionally bundle those assets them into your application in --release
mode, producing a single binary that was developed as if it used separate CSS and JS files.
vial::asset_dir!
To get started, put all your .js
and .css
and other static assets into a directory in the root of your project, such as assets/
. In your HTML, include those files as if the “assets” directory were the root of your application. So if you have “assets/app.js”, in your


I am passionate about new technologies, I look every day to obtain knowledge that allow me to establish myself in the area of software development, to keep up solutions Information Technology. My goal is to apply my knowledge, skills and abilities in an organization, to contribute to the achievement of its objectives in order to contribute to its development.
My experience in software development is related with several sectors or kind of business such as: Automotive, Financial, Banking, Administrative, Electric, among others.
Download PDF Resumematerial design, rest ws, offline behavior
zk, primefaces, spring, hibernate, jpa, junit
developing SOAP & REST ws in java, nodejs & php
with apache cordova & ionic 2
objective-c, swift, core data, offline behavior
MySQL, PostgreSQL, MS SQL Server, SQLite
Some of my activities are:
* Assign, coordinate and manage the implementation of activities to build several projects.
* Design both project architectures: Web and mobile.
* Design of the database, package diagram, use cases, classes and actors model.
* Provide training to coworkers in some technologies such as android, java, zk, spring, hibernate, jpa, databases, html, jasper reports & uml.
I have an speciality on Software Engineering, in this time I make some researchers and publications about rich internet applications:
I have an speciality on Databases
some platforms where i have taken some courses teamtreehouse & platzi
* Developing Advanced Mobile Applications with Android
* Developing java ws with jax-rs
* Developing Mobile Applications with Android
* iOS Development with Swift
* iOS Development with Objetive-C
* Developing enterprise web applications with java, zk & spring
* Programming for iOS (iPhone & iPad)
* Introduction to Android Programming
* Analysis and Design Applications using RUP-UML
* Oracle certification like JAVA Programmer SCJP
* Application Development using WEB Services


@*
* Copyright 2023 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import models.payments.ChargeType
@import models.viewModels.PaymentsHistoryModel
@import views.templates.payments.PaymentMessageHelper
@this()
@(transaction: PaymentsHistoryModel)(implicit messages: Messages, user: User)
@chargeType = @{
PaymentMessageHelper.getChargeType(transaction.chargeType.value)
}
@transaction.chargeType match {
case charge if ChargeType.LPP1ChargeTypes.contains(charge) => {@messages("chargeType.latePaymentPenalty")}
case charge if ChargeType.LPP2ChargeTypes.contains(charge) => {@messages("chargeType.secondLatePaymentPenalty")}
case _ => {@messages(s"${chargeType.title}")}
}
@PaymentMessageHelper.getCorrectDescription( chargeType.principalUserDescription.getOrElse(""), chargeType.agentDescription.getOrElse(""), transaction.taxPeriodFrom, transaction.taxPeriodTo, user.isAgent )


Non-powered Dams in the United States
Select state(s), zoom in, then click on one or more dams to see details. Click anywhere to clear dam comparison.
State
Include
| State | Include |
|---|


(Q,R,p) = Matrices.QR(A);
This function returns the QR decomposition of a rectangular matrix A (the number of columns of A must be less than or equal to the number of rows):
Q*R = A[:,p]
where Q is a rectangular matrix that has orthonormal columns and has the same size as A (QTQ=I), R is a square, upper triangular matrix and p is a permutation vector. Matrix R has the following important properties:
This means that if abs(R[i,i]) ≤ ε then abs(R[j,k]) ≤ ε for j ≥ i, i.e., the i-th row up to the last row of R have small elements and can be treated as being zero. This allows to, e.g., estimate the row-rank of R (which is the same row-rank as A). Furthermore, R can be partitioned in two parts
A[:,p] = Q * [R1, R2; 0, 0]
where R1 is a regular, upper triangular matrix.
Note, the solution is computed with the LAPACK functions
"dgeqpf" and "dorgqr", i.e., by Householder transformations with
column pivoting. If Q is not needed, the function
may be called as: (,R,p) = QR(A)
.
Real A[3,3] = [1,2,3; 3,4,5; 2,1,4]; Real R[3,3]; algorithm (,R) := Matrices.QR(A); // R = [-7.07.., -4.24.., -3.67..; 0 , -1.73.., -0.23..; 0 , 0 , 0.65..];
function QR extends Modelica.Icons.Function; input Real A[:, :] "Rectangular matrix with size(A,1) >= size(A,2)"; input Boolean pivoting = true "True if column pivoting is performed. True is default"; output Real Q[size(A, 1), size(A, 2)] "Rectangular matrix with orthonormal columns such that Q*R=A[:,p]"; output Real R[size(A, 2), size(A, 2)] "Square upper triangular matrix"; output Integer p[size(A, 2)] "Column permutation vector"; end QR;


importance: 5
Write a function sumTo(n)
that calculates the sum of numbers 1 + 2 + ... + n
.
For instance:
js no-beautify sumTo(1) = 1 sumTo(2) = 2 + 1 = 3 sumTo(3) = 3 + 2 + 1 = 6 sumTo(4) = 4 + 3 + 2 + 1 = 10 ... sumTo(100) = 100 + 99 + ... + 2 + 1 = 5050
Make 3 solution variants:
sumTo(n) = n + sumTo(n-1)
for n > 1
.An example of the result:
P.S. Which solution variant is the fastest? The slowest? Why?
P.P.S. Can we use recursion to count sumTo(100000)
?


|
SideCar
|
Utility class for DownConverter that manages data from one input channel. More...
#include </Users/howes/src/sidecar/Algorithms/DownConverter/Channel.h>
Public Member Functions | |
| Channel (DownConverter &master, size_t maxBufferSize) | |
| Constructor for a DownConverter data channel. More... | |
| size_t | getBufferSize () const |
| void | setMaxBufferSize (size_t maxBufferSize) |
| Change the max buffer size. More... | |
| void | reset () |
| Reset to a know state. | |
| bool | isEmpty () const |
| Determine if there are any messages in the internal buffer. More... | |
| uint32_t | getNextSequence () const |
| Obtain the sequence counter of the oldest message in the buffer. More... | |
| bool | addData (const Messages::Video::Ref &msg) |
| Add a new message to the channel's buffer. More... | |
| bool | prune (uint32_t sequenceCounter) |
| Remove entries that have VME sequence counter 'older' than a given one. More... | |
| void | getSlice (int offset, int span, VsipComplexVector &slice) |
| Messages::Video::Ref | getData () const |
| Messages::Video::Ref | popData () |
| Public Member Functions inherited from SideCar::Algorithms::TProcessor< Channel, Messages::Video > | |
| TProcessor (Channel *obj, Proc proc) | |
| Constructor. More... | |
| bool | process (const Messages::Header::Ref &msg) |
| Implementation of the Processor base class method. More... | |
| Public Member Functions inherited from SideCar::Algorithms::Processor | |
| virtual | ~Processor () |
| Destructor. More... | |
Static Public Member Functions | |
| static Logger::Log & | Log () |
Additional Inherited Members | |
| Public Types inherited from SideCar::Algorithms::TProcessor< Channel, Messages::Video > | |
| using | Proc = boost::function< bool(Channel *, typename Messages::Video::Ref)> |
| Type definition for a method of class P that can process messages of class M. | |
Utility class for DownConverter that manages data from one input channel.
Contains an internal deque (FIFO) that allows the channel to synchronize with other Channel objects based on VME sequence counter value.
| Channel::Channel | ( | DownConverter & | master, |
| size_t | maxBufferSize | ||
| ) |
Constructor for a DownConverter data channel.
| master | |
| maxBufferSize | |
| auxIndex |
Definition at line 17 of file Channel.cc.
| bool Channel::addData | ( | const Messages::Video::Ref & | msg | ) |
Add a new message to the channel's buffer.
| msg | message to add |
Definition at line 39 of file Channel.cc.
References LOGDEBUG, LOGERROR, LOGINFO, and SideCar::Algorithms::DownConverter::process().
Referenced by getNextSequence().
|
inline |
Obtain the sequence counter of the oldest message in the buffer.
NOTE: not safe to call when buffer is empty.
Definition at line 60 of file Channel.h.
References addData(), and prune().
Referenced by SideCar::Algorithms::DownConverter::process().
|
inline |
Determine if there are any messages in the internal buffer.
Definition at line 53 of file Channel.h.
Referenced by SideCar::Algorithms::DownConverter::process().
| bool Channel::prune | ( | uint32_t | sequenceCounter | ) |
Remove entries that have VME sequence counter 'older' than a given one.
Since sequence counter values should be monotonically increasing, except when wrapping around to zero, 'older' means a value that is less than the given value, or if the given value is zero, greater than the value + maxBufferSize.
| sequenceCounter | the VME sequence counter to use for testing |
Definition at line 96 of file Channel.cc.
References LOGDEBUG, and LOGINFO.
Referenced by getNextSequence(), and SideCar::Algorithms::DownConverter::process().
| void Channel::setMaxBufferSize | ( | size_t | maxBufferSize | ) |
Change the max buffer size.
| maxBufferSize | new max buffer size |
Definition at line 25 of file Channel.cc.
References LOGDEBUG, and LOGINFO.
Referenced by SideCar::Algorithms::DownConverter::process().


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
W.P.(MD) No.23754 of 2018 BEFORE THE MADURAI BENCH OF MADRAS HIGH COURT Date of Reserving the Order Date of Pronouncing the Order 21.10.2019 07.11.2019 CORAM: THE HONOURABLE MR.JUSTICE T.S.SIVAGNANAM and THE HONOURABLE MRS.JUSTICE R.THARANI W.P.(MD) No.23754 of 2018 and W.M.P.(MD) Nos.21515, 21516, 21517, 21518 & 21849 of 2018 P.Rengasamy ... Petitioner -vs- 1.The District Collector cum The Chairman of the District Environment Impact Assessment Authority Trichy Trichy District 2.The Assistant Director Mines and Minerals Geology and Mining Department Trichy Trichy District 1/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 3.The District Environment Engineer Tamil Nadu Pollution Control Board Trichy Trichy District 4.A.Malliga ... Respondents PRAYER: Petition filed under Article 226 of the Constitution of India, to issue a writ of certiorarified mandamus to call for records pertaining to the impugned order passed by the 1st respondent in Rc.No.385/2017/Mines on 14.08.2018 by permitting the 4th respondent for quarrying of land in Survey No.63 in Karatampatti Village, Musiri Taluk, Thiruchirapalli District and quash the same as illegal and consequentially direct the respondents to preserve the water body, check dam, water supply system, in Survey No.63 of Karatampatti Village, Musri Taluk, Thiruchirapalli Distict. For Petitioner : Mr.R.Rajaraman For Respondents : Mr.A.K.Baskarapandian Special Government Pleader for R1 & R2 Mr.V.Vasanthakumar for R3 Mr.R.Singaravelan, Senior Counsel assisted by Ms.J.Anandhavalli for R4 2/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 ORDER
[Order of the Court was made by T.S.SIVAGNANAM, J.] This writ petition filed as a public interest litigation by a resident of Karattampatti Village, Musiri Taluk, Tiruchirappalli District, seeks for issuance of a writ of certiorarified mandamus to quash the proceedings of first respondent, dated 14.08.2018, granting permission to the fourth respondent for quarrying stone in Survey No.63 of Karatampatti Village, Musiri Taluk, Tiruchirappalli District and for a consequential direction to the official respondents to preserve the water body, check dam, water supply system in the said survey number.
2. The petitioner would state that the land comprised in Survey No. 63 of Karatampatti Village, measures a total extent of 6.13.0 Hectares and it is a water body, but has been wrongly shown in the revenue records as a rocky terrain. It is stated that in the said land, there is a Kasivu Neer Kuttai (frpt[ ePh; Fl;il) and a check dam constructed by the Public Works Department during the year 1985 – 1986 with a bund (fz;kha; fiu), measuring a breadth of 20 Feet and height of 15 Feet. A borewell was installed inside the water body utilizing the funds allotted to the Member of Legislative Assembly incurring a 3/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 cost of Rs.3,00,000/-, which is the main drinking water source for the said Village.
3. Further, it is stated that there is a graveyard situated near the water body and several trees are planted on the bund margin. An electricity transformer is located within the radius of 100 Meters, Pulivalam forest is at a distance of about 500 Meters and there are houses also nearby the water body. It is further stated that periodically, the villagers undertake cleaning and deepening work of the water body and roughly 4000 men are deployed, who are all villagers in and around the said area. This is done because the said water body is the main source for irrigating the crops. It is submitted that the official respondents, without conducting any spot inspection and without ascertaining the physical and geographical condition of the land and without undertaking environmental impact assessment, mechanically passed the impugned order, dated 14.08.2018, granting stone quarry lease to an extent of 2.71.0 Hectares in favour of the fourth respondent. On coming to know about the grant of stone quarry lease in favour of the fourth respondent, which will have a great impact on the water body as well as the flora and fauna in the area, the villagers submitted a representation requesting the Authority concerned to make a spot inspection and cancel the lease granted in 4/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 favour of the fourth respondent. According to the petitioner, the representation did not evoke any response from the Authority concerned and therefore, he, on behalf of himself as well as the villagers, has approached this Court by filing this writ petition.
4. Mr.R.Rajaraman, learned counsel appearing for the petitioner, after reiterating the above factual contentions, submitted that the grant of lease in favour of the fourth respondent is wholly illegal as it has been done without any inspection and the Authorities have failed to appreciate the efforts put in by nearly 4000 villagers in deepening and cleaning the water body and ignoring the plight of the villagers, in a mechanical manner, have granted the stone quarry lease to the fourth respondent. It is submitted that if the fourth respondent commences quarry operation, it will not only damage the water body, but the check dam, trees, tank bund, graveyard and also affect the drinking water supply, which is made through the borewell installed inside the water body utilising the funds of the Member of Legislative Assembly.
5. The learned counsel appearing for the petitioner has drawn our attention to the photographs placed in the typed set of papers to show the physical features of the land in Survey No.63. It is submitted that the Public 5/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 Works Department having constructed a check dam, it goes without saying that the Government has recognized the same as a water body and when all the villagers have jointly given a representation, the Authorities failed to take note of the same and have arbitrarily granted lease.
6. The learned counsel for the petitioner has also referred to the newspaper reports, which have extensively covered the agitation done by the people of the area objecting to the grant of quarry lease, wherein there is a reference to the assurance given by the District Collector that he will look into the complaint and redress the grievance.
7. The learned counsel for the petitioner has referred to the information obtained by one Mr.M.Baskar, under the Right to Information Act, to show that the Authorities have admitted the existence of the water body, borewell, kalungu, trees etc. The learned counsel has also referred to the copies of the reports submitted by the officials, which have been filed in the typed set of papers by the learned Special Government Pleader and submitted that the report of the Village Administrative Officer, Karatampatti Village, clearly shows the existence of the water body. Further, it is submitted that the Assistant Director, Public Works Department, Ground Water Division, 6/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 Trichirappalli, who is one of the Members of DECA Committee, in his remarks has stated that if mining depth intersects the water table or continuous seepage occurred in the pit, then the applicant should inform to the concerned Department. Thus, it is submitted that the Authorities were fully aware of the physical features of the area and despite that, the Committee has recommended for grant of stone quarry lease. Therefore, it is submitted that this Court should interfere in the matter and quash the impugned proceedings of the first respondent granting stone quarry lease in favour of the fourth respondent.
8. When the writ petition was heard, the Division Bench, by interim order dated 30.11.2018, stayed the operation of the impugned order dated 14.08.2018 until further orders and also granted injunction restraining the fourth respondent and her agents and men from conducting quarry operations pursuant to the order dated 14.08.2018 until further orders.
9. The first respondent filed counter affidavit inter alia stating that in terms of Rule 8(1)(a) of Tamil Nadu Minor Mineral Concession Rules, 1959 (in short “the Rules”), a notification was issued in the District Gazette, dated 02.06.2017, inviting applications for grant of lease for quarrying rough stone 7/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 in the Government poromboke lands, after completing the process for grant of such leases to special categories. It is stated that 20 stone quarries were listed in the District Gazette and the subject stone quarry is found place in Serial No.12, measuring an extent of 2.71.0 Hectares out of the total extent of 6.13.0 Hectares in the Government poromboke land, comprised in S.F.No.63 (Part). The fourth respondent being the highest bidder having offered the bid amount of Rs.17,00,000/- was confirmed as a successful bidder and lease was granted for a period of ten years under Rule 8(8) of the Rules.
10. It is submitted that the first respondent had earlier directed the Tahsildars to verify the suitability of the area, where stone quarry leases were proposed to be granted and after taking into consideration the reports, notification was issued. It is submitted that insofar as the subject stone quarry, the Tahsildar, Musiri Taluk, after inspection identified a fresh stone quarry in the Government poromboke land comprised in S.F.No.63 and after inspection and adhering to the conditions prescribed under Rule 36 of the Rules, the subject stone quarry was included as one among the quarries to be allotted by following the tender-cum-auction process. After completion of the said process, the fourth respondent was informed about precise area of the quarry in terms of Rule 42(5) of the Rules and directed to submit a draft 8/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 mining plan and thereafter, obtain environment clearance from the District Level Environmental Impact Assessment Authority in terms of Rule 42 of the Rules.
11. In terms of the above direction, the fourth respondent submitted a draft mining plan to the second respondent, who, by proceedings dated 24.10.2017, approved the same. The said approved mining plan was placed before the District Level Environmental Impact Assessment Authority (DLEIAA for clearance. The said Authority, after making a full inspection, cleared the mining plan from the environmental aspect vide proceedings dated 23.05.2018. Likewise, the Tamil Nadu Pollution Control Board issued orders of consent under the Air & Water (Prevention and Control of Pollution) Act, 1981, by proceedings dated 24.06.2018. Thus, it is submitted that inspection was conducted on multiple occasions and it is incorrect for the petitioner to state that approval was granted without verifying the physical and geographical conditions of the land in question.
12. It is submitted that as per the revenue records, the land in question is an unassessed waste dry land, measuring a total extent of 6.13.0 Hectares and in the village records, it has been classified as ghiw (Stone) 9/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 poromboke land. It is further submitted that one Mr.M.Kannan, who was a quarry worker, was permitted to quarry stone in the said land during the year 1986 to 1989 with a condition that he should adopt only manual process. However, when he started using explosives, he was prevented from doing any quarry work. It is, therefore, submitted that the pits, in which water are stagnated, were formed on account of the earlier quarrying activities and by efflux of time, they have formed into percolation ponds.
13. It is further submitted that even as per the information provided under the Right to Information Act, vide reply dated 14.11.2018, all the structures, namely, graveyard, electricity transformer, Pulivalam forest are well away from the stipulated safety distance of 50 Meters prescribed in Rule 36 of the Rules. The other structures, such as, check dam, deep borewell, trees are far away from the leased out portion and after assessing all these factors, the District Level Environment Impact Assessment Authority has granted clearance vide proceedings, dated 23.05.2018. Thus, the first respondent seeks to sustain his order, dated 14.08.2018, stating that it is in accordance with the Rules, more particularly, Rules 8, 41 and 42 of the Rules. 10/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018
14. It is further submitted that the check dam, bund and borewell are all existing in the non-leased out area of S.F.No.63 (Part). Further, the order passed in favour of the fourth respondent has imposed special conditions restricting the quarry operation to be done 50 Meters away from the electric high tension line passing across the site and maintaining a minimum safety distance of 10 Meters to the adjacent portion of Government poromboke land in S.F.No.63 (Part) and a safety distance of 7.5 Meters to the patta land. Thus, the first respondent would contend that the grant of lease in favour of the fourth respondent has been done in accordance with the Rules and the quarry should be permitted to function in the interest of mineral development and public interest.
15. The counter affidavit filed by the first respondent, dated 26.12.2018, was placed before the Division Bench, when the matter was heard on 09.07.2019. Noting the averments in Paragraph No.9 of the counter affidavit filed by the first respondent, the Division Bench observed that the counter affidavit is not clear as to the distance between the stone quarry, for which lease has been granted to the fourth respondent, and the check dam, bunds and borewells. When this was pointed out, the learned Special Government Pleader sought time to file additional counter affidavit and 11/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 accordingly, the matter was adjourned to 16.07.2019. Accordingly, the first respondent has filed additional counter affidavit, dated 16.07.2019.
16. In Paragraph No.5 of the additional counter affidavit, it is submitted that the land in question is classified as “Government Unassessed Waste” “Parai” in the Village “A” Register and out of the total extent of 6.13.0 Hectares (15.14 Acres), an extent of 2.17.0 Hectares (6.69 Acres) alone is proposed to be leased for conducting stone quarry operation. It is further submitted that on the eastern side of the proposed quarry site, there exist pits, which may be formed due to the manual quarrying operation in the earlier years and during rainy season, water may be stored in the pits. It is further submitted that a sluice has been constructed in order to regulate the overflowing water from the pits. The distance between the bund and the eastern boundary of the proposed quarry site is 5 Meters. It is further stated that the fourth respondent may be instructed to maintain 10 Meters safety distance from the eastern boundary of the lease land. Further, the pits are only temporary formation, because of illegal quarrying by manual operation done by the public. It is further submitted that since the Panchayat has constructed a sluice, the petitioner would contend that it is a water body, but the land in S.F.No.63 (Part) is not a water body. It is further stated that a 12/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 deep borewell has been formed on the eastern side of S.F.No.63 (Part) by the local administration department during the year 2017 – 2018 and the distance between the eastern boundary of the proposed quarry site of the borewell is 170 Meters. It is further stated that trees are available then and there in the eastern portion of the land nearer to the borewell, which is also a part of S.F.No.63 (Part) and therefore, the fourth respondent may be instructed to maintain 10 Meters safety distance from the border of the land earmarked for quarry operation.
17. Mr.A.K.Baskarapandian, learned Special Government Pleader, appearing for the respondents 1 and 2, after referring to the averments set out in the counter affidavit and the additional counter affidavit filed by the first respondent, referred to the inspection report of the Tahsildar, dated 27.03.2017, report of DECA Committee dated 12.10.2017, report of DEIAA Committee dated 09.05.2018, order dated 23.05.2018 granting environmental clearance and the order dated 24.06.2018 passed by the Tamil Nadu Pollution Control Board granting clearance.
18. It is submitted that the above reports will clearly show that the 13/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 procedures contemplated under the Rules have been strictly adhered to and there is no error in the order passed by the first respondent granting lease in favour of the fourth respondent.
19. Mr.R.Singaravelan, learned Senior Counsel assisted by Ms.J.Anandhavalli, learned counsel appearing for the fourth respondent supported the stand taken by the learned Special Government Pleader and submitted that when the procedures contemplated under the Rules have been strictly adhered to and orders have been passed, the attempt of the petitioner is only to prevent the lawful quarrying operation and this is with an intention to sustain the illegal quarrying operation, which were being carried on in the said area for quite some years.
20. The learned Senior Counsel appearing for the fourth respondent further submitted that it is a common knowledge that the entire area is a rocky terrain and this clearly visible to the naked eye to any person travelling by road in the said area. Therefore, the plea raised by the petitioner that the land in question is a water body is frivolous and the writ petition is liable to be dismissed.
14/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018
21. We have elaborately heard the learned counsels and perused the materials placed on record.
22. The Ministry of Environment and Forests, Government of India, issued a notification, dated 14.09.2006, in exercise of the powers conferred by Sub-Section (1) and Clause (v) of Sub-Section (2) of Section 3 of the Environment (Protection) Act, 1986 read with Clause (d) of Sub-Rule (3) of Rule 5 of the Envionment (Protection) Rules, 1986 and in supersession of the earlier notification, dated 27.01.1994, directed that on and from the date of publication of the notification, the required construction of new projects or activities or the expansion or modernization of existing projects or activities listed in the Schedule to the notification entailing capacity addition with change in process and or technology shall be undertaken in any part of India only after the prior environmental clearance from the Central Government or as the case may be, by the State Level Environment Impact Assessment Authority, duly constituted by the Central Government under Sub-Section (3) of Section 3 of the said Act, in accordance with the procedure specified in the notification.
23. In terms of Clause-3 of the notification, a direction was issued 15/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 for constitution of State Level Environment Impact Assessment Authority, under Sub-Clause (3) of Clause-3 of the notification, comprising of three members to be nominated by the State Government; Clause-4 of the notification deals with categorization of projects and activities; Clause-5 deals with screening, scoping and appraisal committees; Clause-6 deals with application for prior environmental clearance; Clause-7 deals with stages in the prior environmental clearance process for new projects; Clause-8 deals with grant or rejection of prior environmental clearance; Clause-9 deals with validity of environmental clearance; Clause-10 deals with post environmental clearance monitoring; Clause-11 deals with transferability of environmental clearance and Clause-12 deals with operation of EIA notification, 1994, till disposal of pending cases.
24. A reading of the notification, dated 14.09.2006, reveals the sensitivity behind such projects and environmental impact that would occur if the projects listed therein are undertaken. Thus, the notification seeks to achieve the object of the provisions of the Environment (Protection) Act, 1986, thereby placing environmental protection on a higher pedestal than commercial activities, such as, exploitation of mines and minerals. 16/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018
25. The Honourable Supreme Court in the case of Subhash Kumar vs. State of Bihar, reported in AIR 1991 SC 420, held that the right to live, a fundamental right under Article 21 of the Constitution of India, includes the right of enjoyment of pollution free water and air for full enjoyment of life; if anything endangers or impairs their quality of life in derogation of laws, citizens have the right to invoke Article 32 of the Constitution of India.
26. In M.C.Mehta vs. Union of India, reported in AIR 2004 SC 4016, it was pointed out that the development and the protection of environments are not enemies. If without degrading the environment or minimising adverse effects thereupon by applying stringent safeguards, it is possible to carry on development activity applying the principles of sustainable development, in that eventuality, the development has to go on because one cannot lose sight of the need for development of industries, irrigation resources and power projects, etc., including the need to improve employment opportunities and the generation of revenue. A balance has to be struck. In such matters, many a times, the option to be adopted is not very easy or in a strait-jacket. If an activity is allowed to go ahead, there may be irreparable damage to the environment and if it is stopped, there may be irreparable 17/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 damage to economic interest. In case of doubt, however, protection of environment would have precedence over the economic interest. Precautionary principle requires anticipatory action to be taken to prevent harm. The harm can be prevented even on a reasonable suspicion. It is not always necessary that there should be direct evidence of harm to the environment.
27. In the above cited decision, the Honourable Supreme Court has held that protection of environment would have precedence over economic interest. It is further held that it is not necessary to act after the harm has occurred, precautionary principle requires anticipatory action to be taken to prevent harm. Further harm can be prevented even on a reasonable suspicion and it is not always necessary that there should be direct evidence of harm to the environment.
28. Bearing the above legal principle in mind, we need to test the challenge before us in this writ petition.
29. The petitioner's contention is that the land in question has 18/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 been erroneously classified as a rocky terrain (ghiw g[wk;Bghf;F) and unassessed Government waste dry land, when the fact remains that there is sufficient evidence to show that it is a water body. Three aspects are brought before this Court to state that the proposed quarry site lies within the water body. The first is a sluice, which has been constructed by the Public Works Department. Secondly, tank bund showing clear evidence of existence of a water body and thirdly, existence of a deep borewell inside the water body, which caters to the drinking water needs of the villagers. The petitioner has further stated that the villagers have got together and conducted mega cleaning and deepening drives to maintain the storage area of the water body. Apart from that, it has been stated that the sluice has been constructed by utilizing the funds allotted to the Member of Legislative Assembly.
30. The counter affidavit filed by the first respondent, dated 26.12.2018, does not dispute the existence of sluice, deep borewell. It has been stated that there is no water body, but water get collected in the pits, which were formed on account of the earlier manual stone quarrying in the said land. This counter affidavit, dated 26.12.2018, was found to be vague as the distance between the stone quarry and the sluice, bunds and borewell were not mentioned. Additional counter affidavit, dated 16.07.2019, was filed 19/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 by the first respondent and the averments set out in Paragraph Nos.6 to 8 would be relevant, which read as under:
“6) I further submitted that, on the eastern side of the proposed lease land, pits are there which may be formed due to the manual quarrying operation in the early years. During the rainy season water may be stored in the pits. A sluice has been constructed in order to regulate the over floowing water from the pits. A distance of 5 meters are there between the bund and the eastern boundary of the land earmarked for lease. The leasee may be instructed to maintain 10 meter safety distance from the eastern border of the lease land. The subject matter of the land viz S.F.No.63(p) is a rock Poromoboke (ghiw). The pits are only temporaryt formation because of the illegal quarrying by manual operation done by the public. Since the Panchayat has constructed a sluice, the petitioner contends that it is a water body. The land in S.F.No.63(p) is not a water body.
7) I humbly submit that, a deep borewell has been formed on the eastern side of S.F.No.63(p) by the local 20/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 administration department during the year 2017-2018. The distance between the eastern border of the land earmarked for quarrying operation and the borewell is 170 meters.
8) I further humbly submit that, trees are available then and there in the eastern part of the land nearer to the borewell which is also a part of S.F.No.
63(p). The leasee may be instructed to maintain 10 meter safety distance from the border of the land earmarked for quarrying operations.”
31. On a reading of Paragraph No.6 of the additional counter affidavit, it is clear that the first respondent has not categorically stated that the pits were formed due to manual quarrying in the earlier years, but, has stated that it may have been formed due to manual quarrying. This averment has to be definitely rejected as vague and has to be taken to be a clear admission of existence of pits, equally the averment regrading storage of water as the first respondent states that due to rain, water may be stored in the pits. There is a candid admission of construction of a sluice for the purpose of 21/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 regulating the flow of water, which according to the first respondent is the overflow of water from the pits. The existence of the bund on the eastern side of the proposed quarry site is admitted and the distance between the bund and the proposed quarry site is 5 Meters. Having said so, the first respondent states that the fourth respondent should be instructed to maintain 10 Meters safety distance from the eastern border of the proposed quarry site. Thus, it is clear that there is a bund within the prohibited distance. A bund is a natural formation and the corollary is that there is an existence of a water body and the bund protects the water body and helps for retention of water. The statement made in the counter affidavit that the fourth respondent should be directed to maintain 10 Meters safety distance clearly shows that the proposed quarry site is within the prohibited distance, as the distance is only 5 Meters.
32. The construction of sluice, though has been admitted by the first respondent, it is stated that merely because the same has been constructed, it cannot be stated that the land in question is a water body. We are unable to appreciate such a stand taken by the first respondent. The Public Works Department or any other Department of the Government, which deals with water resources, will not mechanically permit construction of sluice unless and until it is established that there is a water body and there will be 22/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 flow or overflow of water. The purpose of constructing sluice is to regulate the flow of water to help agriculturists and villagers of the area. Therefore, the first respondent is not justified in discrediting the officials, who with due application of mind, had permitted construction of sluice.
33. We have come across cases, where demand is made by the riparian land owners for the construction of sluice at appropriate places in rivers, canals, channels etc., with a view to obtain uninterrupted supply of water for their agricultural operation. This request is invariably opposed by the lower riparian land owners stating that if a sluice is constructed at a higher level, their entitlement to the water will be affected. Thus, a lot of thought process goes into before a decision is taken to construct a sluice. Therefore, unless and until there is flow of water, no official decision would be taken for construction of sluice. The money spent for construction of sluice is public funds, which further would legitimise the plea of the petitioner to substantiate the existence of a water body. Similarly, the existence of bund, which in most cases is a natural formation, is a strong evidence to come to the conclusion that there is a water body. Merely because there is no water in the tank or in the pond, it will not change the classification of the land. In the instant case, the first respondent would state that the land is classified as 23/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 Parai poromboke. There is nothing on record to show that a rocky terrain cannot be a percolation pond or a tank or any other form of water body.
34. The classic example, which is known to all, is the tank within the campus of the Madurai Bench of Madras High Court. During summer season, after the water recedes, the bed of the tank is fully exposed and it is a rocky terrain. The Public Works Department, Madurai, while sinking deep borewells in the campus, have found that upto a depth of about 20 Feet, it is rock and only thereafter, the water table can be accessed by further drilling upto a minimum of about another 200 Feet. Therefore, the stand taken by the first respondent in the counter affidavit can in no manner advance the case of the Department. In other words, even if the entire area is a rocky terrain, still it can be a water body.
35. We are fully convinced that there is sufficient evidence to show that there is a water body in the land in question. To justify the action in granting permission for stone quarry, a vague averment has been made that pits may have been formed due to manual quarrying, which according to the first counter affidavit, was for a period of three years from 1986 to 1989. Even assuming the said averment is right, it would have been a case of illegal 24/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 quarrying in a water body, which is a rocky terrain. Unless and until earth moving equipments and heavy machineries are deployed, quarrying to great depth cannot be done. Therefore, if manual quarrying was permitted or done illegally for three years, it could have resulted in small pits and not deep pits, where there would be a necessity to construct a sluice to regulate the overflow of water. Thus, the averments set out in the counter affidavit and the additional counter affidavit can in no manner substantiate the stand taken by the first respondent to justify the grant of permission to quarry stones in the land in question.
36. As pointed by the Honourable Supreme Court, we need not wait till harm occurs and we need not wait till the people suffer without water for irrigation and drinking purposes. Courts are empowered to take anticipatory action to prevent such illegality and the harm that may be caused to the public. Protection of environment is of paramount importance and economic interest will have to take a back seat when pitted against environmental interest and public interest.
37. Further, the report of the Tahsildar, Musiri, dated 27.03.2017, 25/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 shows the existence of a Kuttai (Fl;il) to an extent of 2.50 Acres, but it is dry. The existence of low tension electric cable has also been noted. The Tahsildar would state that apart from the area, which is Kuttai (Fl;il), the remaining area measuring 5.13.0 Ares is suitable for stone quarry. The report of the Tahsildar, Musiri, dated 27.03.2017, shows the existence of Kuttai (Fl;il) to an extent of 2.50 Acres. The DECA Committee, which is stated to have conducted inspections on 12.10.2017, 05.12.2017 and 06.12.2017, has recommended the proposal to grant permission for stone quarry for a period of five years. Interestingly, the Assistant Director, Public Works Department, Ground Water Division, Tiruchirappalli, who is one of the Members of DECA Committee, has qualified his recommendation by stating that if mining depth intersects the water table or continuous seepage occurs in the pit, then the applicant should inform the concerned Department. This qualification made by the Public Works Department, Member of the Committee, is very relevant, because it indicates that there is a water table underneath the proposed site. The recommendations made by the other Authorities are not speaking orders, but, a mere recommendation with their signature.
38. It is further relevant to note that the DECA Committee, which 26/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 recommended the grant of permission for rough stone quarry, has recommended the period of grant for five years only, whereas the first respondent, in the impugned order, has granted permission for ten years.
39. Thus, in the light of the findings rendered by us, imposition of any condition while granting clearance or granting lease is of little avail as the selection of the site itself is illegal. We cannot accept the submissions made on behalf of the fourth respondent that it is a common knowledge that the entire area is a rocky terrain and therefore, there is no error in granting permission. Admittedly, the subject land has been selected for grant of permission to quarry stone for the first time and as per the averments made in the counter affidavit of the first respondent, for a brief period of three years, manual stone quarrying was permitted, but, because of violation of condition, the same was stopped. If illegal quarrying has been done in any area, then it is the officials, who have to be first blamed for not enforcing the law and they cannot be permitted to take advantage of their own wrong.
40. For the all the above reasons, we are of the clear view that the 27/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 impugned order is wholly unsustainable, illegal, arbitrary and in absolute denigration of the Environmental Laws.
41. In the result, the writ petition is allowed as prayed for. The impugned order dated 14.08.2018, passed by the first respondent is quashed and all other proceedings, which preceded the issuance of the impugned order, are also quashed. The respondents are permanently restrained from granting any permission for quarrying stone operation or light material in the land comprised Survey No.63 of Karattampatti Village, Musiri Taluk, Tiruchirappalli District. No costs. Consequently, connected miscellaneous petitions are closed.
[T.S.S.,J.] [R.T.,J.] 07.11.2019 Index : Yes / No Internet : Yes / No krk To: 1.The District Collector cum 28/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 The Chairman of the District Environment, Impact Assessment Authority, Trichy, Trichy District. 2.The Assistant Director, Mines and Minerals, Geology and Mining Department, Trichy, Trichy District. T.S.SIVAGNANAM, J. and R.THARANI, J. 29/30 http://www.judis.nic.in W.P.(MD) No.23754 of 2018 krk ORDER IN W.P.(MD) No.23754 of 2018 and W.M.P.(MD) Nos.21515, 21516, 21517, 21518 & 21849 of 2018 07.11.2019 30/30 http://www.judis.nic.in


openschemas.main.validate package¶
Submodules¶
openschemas.main.validate.helpers module¶
-
openschemas.main.validate.helpers.
load_criteria
(self, criteria=None)[source]¶ load a criteria.yml file. If not specified, load (or reload) default provided by package.
- criteria: a yml specification for criteria. If not provided, use
- default at criteria/specification.yml. If you need help creating
a new criteria (that might be added to defaults) please open an issue
Module contents¶
-
class
openschemas.main.validate.
BasicValidator
(infile)[source]¶ Bases:
object
the basic validator doesn’t care about the input file extensions, and gives the user more freedom to write custom validators using it. We only validate that the file exists.
-
default_criteria
= '/home/vanessa/Documents/Dropbox/Code/openschemas/openschemas-python/openschemas/main/validate/criteria/dummy.yml'¶
-
load
(infile)[source]¶ load an input file, meaning checking for the file’s existence. It’s up to the user (if desired) to load the file in their validation functions, or write a custom _load() function.
infile: the input file to load
-
load_criteria
(criteria=None)¶ load a criteria.yml file. If not specified, load (or reload) default provided by package.
- criteria: a yml specification for criteria. If not provided, use
- default at criteria/specification.yml. If you need help creating
a new criteria (that might be added to defaults) please open an issue
-
validate_criteria
(criteria, infile=None)¶ validate an infile (or already loaded one) against criteria.
infile: an input specification file criteria: a loaded (json/dict) or criteria, or html/yml file
-
-
class
openschemas.main.validate.
SpecValidator
(infile)[source]¶ Bases:
object
the spec validator can “sniff” a file based on extension, and validate the file based on the extension, or have one of the specific type validators (html, yaml) called directly. There are two steps.
Step 0. validates the file itself. Does it exist? Load without error? Step 1. validates the file against a criteria.yml, default is provided
-
default_criteria
= '/home/vanessa/Documents/Dropbox/Code/openschemas/openschemas-python/openschemas/main/validate/criteria/specification.yml'¶
-
load
(infile)[source]¶ load an input file, meaning checking for the file’s existence, that it has a default extension, and loading it into the “spec” via the YamlManager (that can handle frontmatter in a html or standard yml/yaml
infile: the input file to load
-
load_criteria
(criteria=None)¶ load a criteria.yml file. If not specified, load (or reload) default provided by package.
- criteria: a yml specification for criteria. If not provided, use
- default at criteria/specification.yml. If you need help creating
a new criteria (that might be added to defaults) please open an issue
-
validate_criteria
(criteria, infile=None)¶ validate an infile (or already loaded one) against criteria.
infile: an input specification file criteria: a loaded (json/dict) or criteria, or html/yml file
-
validate_exists
(infile, extensions=None)[source]¶ determine filename of infile based on Specification Name (and extension). If the extension doesn’t end in yml/yaml or html, it’s not valid (and note we will need to add support for reading json). If valid, return the filename. If not, return None.
infile: the name of the specification / yaml file extensions: a list of valid extensions
-


You can add equirectangular images to the AFrame 360 degree scene. The equirectangular image look distorred but the images are created with a special projection and this equirectangular projection is designed for viewing in the AFrame environment as sky. You can drag the scene and look around. You can add normal camera images with this tool but the tools have not the correct equirectangular projection for viewing as a 360 degree image.
The Generate ZIP button creates a ZIP file and will be saved in your download folder. If you try to start the index.html directly from the compressed ZIP file, the AFrame 360 degree images will not work due to unresolved path names to the libraries and CSS file in a compressed ZIP. Unzip/uncompress the ZIP file first and start the index.html with your browser (Firefox, Chrome Safari) from the uncompressed folder of the ZIP file.
if you want to create 360 degree images yourself you can use e.g. a special 360 degree double fish eye camera with a single snapshot or use Hugin


TA: Chad McKell<EMAIL_ADDRESS>Office hours: By appointment
UCSD, Fall 2020
|
Lecture 1: Introductions and Ableton Live Basics
Wednesday, October 7, 2020
|
|
Lecture 2: Fourier Theory and Ableton Live Basics
Wednesday, October 14, 2020
|
|
Lecture 3: Music Intervals and Ableton Live Basics
Wednesday, October 21, 2020
|
|
Lecture 4: Audio Filters and Automation
Wednesday, October 28, 2020
|
|
Lecture 5: Effects, Scales, and Return Tracks
Wednesday, November 4, 2020
|
|
Lecture 6: Arpeggiators and Synthesizers
Wednesday, November 18, 2020
|
|
Lecture 7: Drum Racks and Compression
Wednesday, November 25, 2020
|
|
Lecture 8: Wavetable and Audio Effect Rack
Wednesday, December 2, 2020
|
|
Lecture 9: EQ, Grooves, and Vocoder
Wednesday, December 9, 2020
|


This class defines service for remote calls. It has methods for adding rpc methods, getting methods, validating if method exists.
More...
#include <RpcService.h>
|
| | RpcService (Service *service) |
| | This is constructor function that scans service description, gets request prototype & response prototype,loops over numbers of available methods and calls addMethod function for each methods defined. More...
|
| |
|
void | addMethod (const RpcMethod &method, const string &methodName) |
| | This function is setter function that adds methodName to _method array of type map<string, RpcMethod>
|
| |
|
const RpcMethod * | getMethod (const string &methodName) const |
| | This is getter function that gets the methods if they exist in _method array.
|
| |
|
bool | isExistMethod (const string &methodName) const |
| | This function is for validating if the method name exists or not.
|
| |
This class defines service for remote calls. It has methods for adding rpc methods, getting methods, validating if method exists.
◆ RpcService()
| coappbrpc::RpcService::RpcService |
( |
Service * |
service | ) |
|
|
inline |
This is constructor function that scans service description, gets request prototype & response prototype,loops over numbers of available methods and calls addMethod function for each methods defined.
- Parameters
-
| service | service is of type Service defined in google's protobuf service |
◆ _methods
| map<string, RpcMethod> coappbrpc::RpcService::_methods |
◆ _service
| Service* coappbrpc::RpcService::_service |
Instance pointer of Service
The documentation for this class was generated from the following file:


[video] "Lair of the White Worm" A Postview, copyright 1997 p-m agapow
In this adaptation of the Bram Stoker novel, a group of proper English types with room-temperature IQs are mystified by a local outbreak of vampirism, in between dream sequences that indulge the director's fetishes.
Alexei Sayle once listed the basic mysteries of the universe, concluding with "And why do people keep giving Ken Russell money to make films?" After this, you'll be wondering why too. His previous "Gothic" covered similar territory with at least some skill. In comparison, "Lair" takes a deep breath and dive-bombs straight into Bad Movie Hell.
Gathering together everyone on the books with a regional accent, we are introduced to the picturesque English countryside and a village, seemingly with a population of about six. Our four leads gambol and frolic in a manner not unlike Enid Blyton's "Famous Five". Julian Sands having passed on this film, we instead have Hugh Grant as dashing RAF pilot Lord James D'Ampton (really), looking as if he was sedated. (I envy him.) The neglected Peter Capaldi as a geek archaeologist gets to muse over a giant snake skull he has dug up, his acres of curly hair threatening to dominate every scene he is in. Catherine Oxenburg and Sammi Davis, their romantic interests, flit about until such a point as they can be captured by the bad guys. Just over on the next set, the slinky Lady Sylvia Marsh (Amanda Donohoe, she of the Acting Career That Would Not Die) chews scenery, stopping only to slaughter the occasional anorak-wearing nerd.
But this is a Ken Russell film, it's been 20 minutes and there haven't been any naked nuns yet! Wheel them on! Before you can say "a clear need for Freudian analysis" there's a dream sequence in which naked nuns are being raped by brutal centurions as a gloomy Christ looks on, restrained by a large latex worm.
Why?
Tiring of jaunting about in sports cars, sipping apertifs and competitive under-acting, Grant and Capaldi decide that something is amiss. (Although they wrongly conclude that it is Lady Sylvia and not the director.) Grant misses the obvious plan (invite the Lady Sylvia into his car down on the main road, get arrested and soon everyone will know what's going on) and basically wanders about in Lady Sylvia's gothic mansion for the rest of the picture. Capaldi is attacked by a snake-policeman and defends himself by charming the snake with music. (Or maybe it's an intense dislike of bagpipes. Capaldi in a kilt with bagpipes is a frightening thing.) Soon Donohoe sheds her clothes, paints herself blue and is threatening the girls with a massive strap-on (and a role in the sequel).
There are some more naked nuns in there somewhere, but it's all become a blur to me.
Appalling. [*/misfire] and "Cannibal Apocalypse" on the Sid and Nancy scale.
"Lair of the White Worm" Directed by Ken Russell. Starring Amanda Donohoe, Hugh Grant, Catherine Oxenberg, Peter Capaldi, Sammi Davis. Released 1988.
------ paul-michael agapow (agapow@latcs1.oz.au), La Trobe Uni, Infocalypse "There is no adventure, there is no romance, there is only trouble and desire."
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