Benzinga data is a linked data source. This means that the data is automatically tied to the
underlying equity whenever possible. To add the correct data to your algorithm, you should use
the equity asset Symbol in AddData
.
To add Benzinga data to your algorithm use the AddData()
system to request the data. As with all datasets, you should
save a reference to your symbol for easy use later in your algorithm. For detailed documentation on using custom data
see Importing Custom Data.
// Request underlying equity data. var aapl = AddEquity("AAPL", Resolution.Daily).Symbol; // AAPL news var aaplNews = AddData<BenzingaNews>(aapl).Symbol;
# Request underlying equity data. aapl = self.AddEquity("AAPL", Resolution.Daily).Symbol # AAPL news aaplNews = self.AddData(BenzingaNews, aapl).Symbol
Data can be accessed via Slice events. Slice delivers unique events to your algorithm as they happen.
We recommend saving the symbol object when you add the data for easy access to slice later.
Data is available in daily resolution.
Since this is a linked data source, it is also available on the underlying
security via the Securities[symbol].Data.GetAll<BenzingaNews>()
self.Securities[symbol].Data.GetAll(BenzingaNews)
helper method. When you
request data via the data cache, it will always return the last article stored.
You can see an example of both of these accessors in the code below.
using QuantConnect.Data.Custom.Benzinga; namespace QuantConnect.Algorithm.CSharp { public class BenzingaAlgorithm : QCAlgorithm { public override void Initialize() { SetStartDate(2019, 1, 1); var aapl = AddEquity("AAPL").Symbol; // AAPL news AddData<BenzingaNews>(aapl); } public override void OnData(Slice data) { // Accessing a linked source from securities collection: //var aaplNews = Securities["AAPL"].Data.GetAll<BenzingaNews>(); // Accessing via Slice event var aaplNews = data.Get<BenzingaNews>(); foreach (var news in aaplNews.Values) { Log($"Unique ID assigned to the article by Benzinga: {news.Id}, Author of the article: {news.Author}, Date the article was published: {news.CreatedAt}, Date that the article was revised on: {news.UpdatedAt}, Title of the article published: {news.Title}"); } } } }
from QuantConnect.Data.Custom.Benzinga import * class BenzingaAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2019, 1, 1) aapl = self.AddEquity("AAPL").Symbol # AAPL news self.AddData(BenzingaNews, aapl) def OnData(self, data): # Accessing a linked source from securities collection: #aaplNews = self.Securities["AAPL"].Data.GetAll(BenzingaNews) # Accessing via Slice event aaplNews = data.Get(BenzingaNews) for news in aaplNews.Values: self.Log(f"Unique ID assigned to the article by Benzinga: {news.Id}, Author of the article: {news.Author}, Date the article was published: {news.CreatedAt}, Date that the article was revised on: {news.UpdatedAt}, Title of the article published: {news.Title}")
All custom data has the properties Time
, Symbol
, and Value
.


A normal Carbon Atom has:
This carbon atom is NEUTRAL
However when the charges are not neutral it is called an
An Ion has two types:
12C- would be called a Carbon Anion 12C+ would be called a Carbon Cation
When a Potassium Cation + Chlorine Anion (K+Cl-) bonds, it's called:
IMPORTANT: You add -ide for ALL the anions (You don't add anything for Potassium since we know it exchanges bonds)
Formed when two atoms share electron.
--> Forms a Molecule and can be represented by:
C2H4O2
A molecule of Acetic acid:
However it could also be written as: CH3COOH
Gives a sense of structure
NH3:
Arrangement known as trigonal pyramidal
Atoms ---> Ions | Gains or Lose Charge
In an Ionic Bond they don't share electrons:
Results in a strong attraction
The : around Cl means the electrons However, Ionic Bonds do not exist in molecules, this is what they look like:
Ionic Bonds exist in formula units


Before Change
:param agent_info: protobuf object.
:return: BehaviorSpec object.
observation_shape = [tuple(obs.shape) for obs in agent_info.observations]
dim_props = [
tuple(DimensionProperty(dim) for dim in obs.dimension_properties)
for obs in agent_info.observations
]
sensor_types = [SensorType(obs.sensor_type) for obs in agent_info.observations]
sensor_specs = [
SensorSpec(obs_shape, dim_p, sensor_type)
for obs_shape, dim_p, sensor_type in zip(
observation_shape, dim_props, sensor_types
)
]
// proto from communicator < v1.3 does not set action spec, use deprecated fields instead
if (
brain_param_proto.action_spec.num_continuous_actions == 0
and brain_param_proto.action_spec.num_discrete_actions == 0
After Change
:return: BehaviorSpec object.
sensor_specs = []
for obs in agent_info.observations:
sensor_specs.append(
SensorSpec(
tuple(obs.shape),
tuple(DimensionProperty(dim) for dim in obs.dimension_properties),
SensorType(obs.sensor_type),
)
)
// proto from communicator < v1.3 does not set action spec, use deprecated fields instead
if (
brain_param_proto.action_spec.num_continuous_actions == 0
and brain_param_proto.action_spec.num_discrete_actions == 0
):


WITNESS LIST Appropriations Committee March 15, 2001-7:00A Budget On: Elder, Mary (Interagency Council on Early Childhood Intervention) Green, Don (Health and Human Services Commission) Hine, Jim (Department of Protective and Regulatory Services) Mosbacher, Catherine Clark (Department of Protective and Regulatory Services) Saitas, Jeff (Texas Natural Resource Conservation Commission) Thigpen, Drew (Department of Protective and Regulatory Services) Weatherford, Kim (Department of Protective and Regulatory Services)


CREATE TABLE
Beam SQL’s CREATE TABLE
statement registers a virtual table that maps to an
external storage system.
For some storage systems, CREATE TABLE
does not create a physical table until
a write occurs. After the physical table exists, you can access the table with
the SELECT
, JOIN
, and INSERT INTO
statements.
The CREATE TABLE
statement includes a schema and extended clauses.
Syntax
CREATE TABLE [ IF NOT EXISTS ] tableName (tableElement [, tableElement ]*)
TYPE type
[LOCATION location]
[TBLPROPERTIES tblProperties]
simpleType: TINYINT | SMALLINT | INTEGER | BIGINT | FLOAT | DOUBLE | DECIMAL | BOOLEAN | DATE | TIME | TIMESTAMP | CHAR | VARCHAR
fieldType: simpleType | MAP<simpleType, fieldType> | ARRAY<fieldType> | ROW<tableElement [, tableElement ]*>
tableElement: columnName fieldType [ NOT NULL ]
IF NOT EXISTS
: Optional. If the table is already registered, Beam SQL ignores the statement instead of returning an error.tableName
: The case sensitive name of the table to create and register, specified as an Identifier. The table name does not need to match the name in the underlying data storage system.tableElement
:columnName
fieldType
[ NOT NULL ]
columnName
: The case sensitive name of the column, specified as a backtick_quoted_expression.fieldType
: The field’s type, specified as one of the following types:simpleType
:TINYINT
,SMALLINT
,INTEGER
,BIGINT
,FLOAT
,DOUBLE
,DECIMAL
,BOOLEAN
,DATE
,TIME
,TIMESTAMP
,CHAR
,VARCHAR
MAP<simpleType, fieldType>
ARRAY<fieldType>
ROW<tableElement [, tableElement ]*>
NOT NULL
: Optional. Indicates that the column is not nullable.
type
: The I/O transform that backs the virtual table, specified as an Identifier with one of the following values:bigquery
pubsub
kafka
text
location
: The I/O specific location of the underlying table, specified as a String Literal. See the I/O specific sections forlocation
format requirements.tblProperties
: The I/O specific quoted key value JSON object with extra configuration, specified as a String Literal. See the I/O specific sections fortblProperties
format requirements.
BigQuery
Syntax
CREATE TABLE [ IF NOT EXISTS ] tableName (tableElement [, tableElement ]*)
TYPE bigquery
LOCATION '[PROJECT_ID]:[DATASET].[TABLE]'
LOCATION:
Location of the table in the BigQuery CLI format.PROJECT_ID
: ID of the Google Cloud ProjectDATASET
: BigQuery Dataset IDTABLE
: BigQuery Table ID within the Dataset
Read Mode
Beam SQL supports reading columns with simple types (simpleType
) and arrays of simple
types (ARRAY<simpleType>
).
Write Mode
if the table does not exist, Beam creates the table specified in location when the first record is written. If the table does exist, the specified columns must match the existing table.
Schema
Schema-related errors will cause the pipeline to crash. The Map type is not supported. Beam SQL types map to BigQuery Standard SQL types as follows:
| Beam SQL Type | BigQuery Standard SQL Type |
| TINYINT, SMALLINT, INTEGER, BIGINT | INT64 |
| FLOAT, DOUBLE, DECIMAL | FLOAT64 |
| BOOLEAN | BOOL |
| DATE | DATE |
| TIME | TIME |
| TIMESTAMP | TIMESTAMP |
| CHAR, VARCHAR | STRING |
| MAP | (not supported) |
| ARRAY | ARRAY |
| ROW | STRUCT |
Example
CREATE TABLE users (id INTEGER, username VARCHAR)
TYPE bigquery
LOCATION 'testing-integration:apache.users'
Pub/Sub
Syntax
CREATE TABLE [ IF NOT EXISTS ] tableName
(
event_timestamp TIMESTAMP,
attributes MAP<VARCHAR, VARCHAR>,
payload ROW<tableElement [, tableElement ]*>
)
TYPE pubsub
LOCATION 'projects/[PROJECT]/topics/[TOPIC]'
TBLPROPERTIES '{"timestampAttributeKey": "key", "deadLetterQueue": "projects/[PROJECT]/topics/[TOPIC]"}'
event_timestamp
: The event timestamp associated with the Pub/Sub message by PubsubIO. It can be one of the following:- Message publish time, which is provided by Pub/Sub. This is the default value if no extra configuration is provided.
- A timestamp specified in one of the user-provided message attributes.
The attribute key is configured by the
timestampAttributeKey
field of thetblProperties
blob. The value of the attribute should conform to the requirements of PubsubIO, which is either millis since Unix epoch or RFC 339 date string.
attributes
: The user-provided attributes map from the Pub/Sub message;payload
: The schema of the JSON payload of the Pub/Sub message. No other payload formats are currently supported by Beam SQL. If a record can’t be unmarshalled, the record is written to the topic specified in thedeadLeaderQueue
field of thetblProperties
blob. If no dead-letter queue is specified in this case, an exception is thrown and the pipeline will crash.LOCATION
:PROJECT
: ID of the Google Cloud ProjectTOPIC
: The Pub/Sub topic name. A subscription will be created automatically, but the subscription is not cleaned up automatically. Specifying an existing subscription is not supported.
TBLPROPERTIES
:timestampAttributeKey
: Optional. The key which contains the event timestamp associated with the Pub/Sub message. If not specified, the message publish timestamp is used as an event timestamp for windowing/watermarking.deadLetterQueue
: The topic into which messages are written if the payload was not parsed. If not specified, an exception is thrown for parsing failures.
Read Mode
PubsubIO is currently limited to read access only.
Write Mode
Not supported. PubSubIO is currently limited to read access only in Beam SQL.
Schema
Pub/Sub messages have metadata associated with them, and you can reference this metadata in your queries. For each message, Pub/Sub exposes its publish time and a map of user-provided attributes in addition to the payload (unstructured in the general case). This information must be preserved and accessible from the SQL statements. Currently, this means that PubsubIO tables require you to declare a special set of columns, as shown below.
Supported Payload
- JSON Objects
- Beam only supports querying messages with payload containing JSON
objects. Beam attempts to parse JSON to match the schema of the
payload
field.
- Beam only supports querying messages with payload containing JSON
objects. Beam attempts to parse JSON to match the schema of the
Example
CREATE TABLE locations (event_timestamp TIMESTAMP, attributes MAP<VARCHAR, VARCHAR>, payload ROW<id INTEGER, location VARCHAR>)
TYPE pubsub
LOCATION 'projects/testing-integration/topics/user-location'
Kafka
KafkaIO is experimental in Beam SQL.
Syntax
CREATE TABLE [ IF NOT EXISTS ] tableName (tableElement [, tableElement ]*)
TYPE kafka
LOCATION 'kafka://localhost:2181/brokers'
TBLPROPERTIES '{"bootstrap.servers":"localhost:9092", "topics": ["topic1", "topic2"]}'
LOCATION
: The Kafka topic URL.TBLPROPERTIES
:bootstrap.servers
: Optional. Allows you to specify the bootstrap server.topics
: Optional. Allows you to specify specific topics.
Read Mode
Read Mode supports reading from a topic.
Write Mode
Write Mode supports writing to a topic.
Supported Payload
- CSV
- Beam parses the messages, attempting to parse fields according to the types specified in the schema.
Schema
Only simple types are supported.
Text
TextIO is experimental in Beam SQL. Read Mode and Write Mode do not currently access the same underlying data.
Syntax
CREATE TABLE [ IF NOT EXISTS ] tableName (tableElement [, tableElement ]*)
TYPE text
LOCATION '/home/admin/orders'
TBLPROPERTIES '{"format: "Excel"}'
LOCATION
: The path to the file for Read Mode. The prefix for Write Mode.TBLPROPERTIES
:format
: Optional. Allows you to specify the CSVFormat.
Read Mode
Read Mode supports reading from a file.
Write Mode
Write Mode supports writing to a set of files. TextIO creates file on writes.
Supported Payload
- CSV
- Beam parses the messages, attempting to parse fields according to the types specified in the schema using org.apache.commons.csv.
Schema
Only simple types are supported.
Example
CREATE TABLE orders (id INTEGER, price INTEGER)
TYPE text
LOCATION '/home/admin/orders'


I can clearly remember when I was around 9 years old, my mother would let me borrow her iPod, and I would mostly listen to songs that I knew from the radio, and that was a pretty normal thing to do, but one day, when my mom got new music, I opened the door into my long journy into metal music. My mother got Metallica's S&M album, and the first song I heard from it was Battery, and it was the heaviest thing I could imagine. I listend to it nonstop, and fixated on Metallica for about 4 years. But as I got older, I started to want something new, I journied into Power Metal with Man'O'War and Dragonforce. But after a phase of power metal, I wanted something heavier, so I moved into melodic death metal with Amon Amarth. When you start listening to death metal, and you like it, you start to crave heavier and HEAVIER metal. That is the phase I would say I am in right now, I have not lost love for any of the lighter metal, but I have gained a interest in finding nastier and heavier metal.
Over the years of listening to metal, one of my favorite things to do, involving metal, is going to concerts. I can't even begin to think of how many concerts I have gone to, some of them blur together, but I have so many great memories from concerts. I get to enjoy the music I love, be with friends, have a good time, and mosh and headbang till I know I will be sore the next few days. By going to concerts I have also been able to see musicians that I idolize. I have been fortunate enough to see such legends as Iron Maidan, Slayer, Megadeth, and not only Ozzy on his own, TWICE, but I even was lucky enough to go to Black Sabbath's final tour! Being able to see the band that was resposible for creating the genre 50 YEARS AGO still blows my mind.
| Sabaton | 4 | Abysmal Dawn | 2 | Vader | 1 | Krisiun | 1 |
|---|---|---|---|---|---|---|---|
| Behemoth | 4 | Stone Sour | 2 | Revocation | 1 | Devil Driver | 1 |
| Amon Amarth | 4 | Black Sabbath | 1 | Septicflesh | 1 | Kalmah | 1 |
| Trivium | 3 | Meagdeth | 1 | Cannible Corpse | 1 | Visceral Disgorge | 1 |
| Lamb of God | 3 | Iron Maiden | 1 | Suicidal Tendencies | 1 | Whitechaple | 1 |
| Avatar | 3 | System of a Down | 1 | Nekrogoblicon | 1 | Spite | 1 |
| Ensiferum | 3 | Gojira | 1 | Carnifex | 1 | Overkill | 1 |
| Ozzy | 2 | Anthrax | 1 | At the Gates | 1 | Black Tusk | 1 |
| Slayer | 2 | Kreator | 1 | Brand of Sacrifice | 1 | Holy Grail | 1 |
| Cattle Decapitation | 2 | Suffocation | 1 | Meshuggah | 1 | Faceless | 1 |
| Slipknot | 2 | Dying Fetus | 1 | Death Angle | 1 | Entombed A.D. |


Comments
-
Greg Hurrell
Marking as ASSIGNED. If enough people vote for this feature I'll implement it. What the question mark is intended to indicate is, "You have your preferences set to display album art but none is available; if I find some on the Internet later on I will show it.", and it's intended to be visually different from the other preference option which is to show no art at all.
-
Jon
I agree with this. Perhaps implementing it as a third display option (Album cover when available) or making it clear in the tool tip what's going on would be the best solution. But the question mark really does look out of place.
-
Greg Hurrell
Changing assignment to reflect my new email address.
https://wincent.com/a/news/archives/2006/05/change_of_email.php
Add a comment
Comments are now closed for this issue.


Before Change
_, parent_actor_info = actor_info.popitem()
assert parent_actor_info["numObjectRefsInScope"] == 13
assert parent_actor_info["numLocalObjects"] == 10
children = parent_actor_info["children"]
assert len(children) == 2
break
except AssertionError:
if time.time() > start_time + 30:
raise Exception("Timed out while waiting for actor info \
or object store info update.")
except requests.exceptions.ConnectionError:
if time.time() > start_time + 30:
raise Exception(
"Timed out while waiting for dashboard to start.")
def cpu_resources(actor_info):
cpu_resources = 0
for slot in actor_info["usedResources"]["CPU"]["resourceSlots"]:
cpu_resources += slot["allocation"]
return cpu_resources
assert cpu_resources(parent_actor_info) == 2
assert parent_actor_info["numExecutedTasks"] == 4
for _, child_actor_info in children.items():
if child_actor_info["state"] == -1:
assert child_actor_info["requiredResources"]["CustomResource"] == 1
else:
assert child_actor_info[
"state"] == ray.gcs_utils.ActorTableData.ALIVE
assert len(child_actor_info["children"]) == 0
assert cpu_resources(child_actor_info) == 1
profiling_id = requests.get(
webui_url + "/api/launch_profiling",
params={
"node_id": ray.nodes()[0]["NodeID"],
After Change
actors_info = raylet_info["result"]["actors"]
try:
assert len(actors_info) == 3
c_actor_info = [
actor for actor in actors_info.values()
if "ActorC" in actor["actorTitle"]
][0]
assert c_actor_info["numObjectRefsInScope"] == 13
assert c_actor_info["numLocalObjects"] == 10
break
except AssertionError:


Midwest Fire Fest
Jul 29, 2018
9:00am
Come to the most unique festival in the Midwest
Cambridge Senior Meals
Jul 31, 2018
12:00pm
Cambridge Senior Meals are served at Noon every Tuesday and Friday
Begin to Knit Classes
Jul 31, 2018
5:00pm
Learn to knit at Kaleidoscope Fibers - Cambridge's speciality yarn,...
Cambridge Historic School Museum Tour
Aug 1, 2018
12:30pm
Built in 1906, the Cambridge Historic School - listed on the...
Begin to Knit Classes
Aug 1, 2018
1:00pm
Learn to knit at Kaleidoscope Fibers - Cambridge's speciality yarn,...


The Learning Space
This is the Github repo that I use for learning and progressing my HTML skills
What's your name?
Random Number!
Submit!
Search...
My Phonebook
One
Two
Three
Four
Five
Six
Seven
Dropdown
Home
About
Contact


|
|
{{program}} {{team_number}} |
| Upload Video File |
| Produce Dataset |
| % | |
| % |
| Download Dataset |
| Start Training |
|
Each team is allowed minutes of training
time. Your team has minutes of training time remaining. |
|
| Minutes | |
| Train More |
|
Each team is allowed minutes of training
time. Your team has minutes of training time remaining. |
|
| Minutes | |


TABLE OF CONTENTS
A. GS1 Related B. GS2 Related POLITY 1. Five-judge statute Bench to decide on Aadhaar validity 2. Centre gets SC to freeze hearing on Article 35A 3. Law panel moots life term for torture 4. Of bureaucracy and emotions INTERNATIONAL AFFAIRS/BILATERAL RELATIONS 1. India, Italy vow to fight terror 2. China to block UN ban on Masood Azhar, yet again HEALTH ISSUES 1. Fewer TB deaths in India: WHO C. GS3 Related ENVIRONMENT AND ECOLOGY 1. Climate change taking a toll on global health: Lancet D. GS4 Related E. Prelims Fact F. UPSC Prelims Practice Questions G. UPSC Mains Practice Questions
Nothing here for Today!!!
1. Five-judge statute Bench to decide on Aadhaar validity
Context:
- Validity of the Aadhaar scheme.
In news:
- The Supreme Court decided to constitute a five-judge Constitution Bench to hear petitions from November against the validity of the Aadhaar scheme.
- The decision to set up a five-judge Bench comes despite Justice Rohinton Nariman’s separate judgment in the nine-judge Bench declaring privacy as a fundamental right.
Historic judgment
- The nine-judge Bench of the Supreme Court came out with the historic judgment in favour of the common man’s fundamental right to privacy against state intrusions.
- The nine-judge Bench verdict has a crucial bearing in the Aadhaar petitions, which have argued that Aadhaar’s use of biometric details like fingerprints and iris scans violate bodily and informational privacy.
Petitioner’s contentions:
- The petitioners argue that mandatory requirement of Aadhaar for these schemes “constrict rights and freedoms which a citizen has long been enjoying unless and until they part with their personal biometric information to the government”.
- The petitions have termed the Aadhaar Act of 2016 as unconstitutional and contrary to concept of limited and accountable governance.
Basic Information:
Justice K. S. Puttaswamy vs Union Of India case:
- A landmark case by the Supreme Court of India which holds that the right to privacy is protected under Article 21 and Part 3 of the Constitution. It also mentioned that it won’t be an Absolute right and will have some reasonable restrictions in matters of national security and mutual interest of the citizens and the state.
- India is the only country with Right to Privacy as a Fundamental right under its Constitution
P. Shah panel- Nine point code:
- The group led by former Delhi High Court chief justice A P Shah was set up by the Planning Commission to identify privacy issues and prepare a document to facilitate the proposed Privacy Act.
- The group was set after concerns were raised about the impact on privacy of individuals with the emergence of several national programmes such as Aadhar, NATGRID, DNA profiling, Reproductive Rights of Women, privileged communications and brain mapping, most of which will be implemented through information and communication technology (ICT) platforms.
Nine National Privacy Principles:
- A data controller should give prior notice of collection and information to all individuals before taking consent.
- Individuals should be given choice to opt in/out with regard to providing personal information.
- Data collectors should only collect personal information necessary for the purpose identified.
- If there is change of purpose, it must be notified to the individual. After use in identified purpose, data should be destroyed.
- Individuals should have access to personal information for seeking correction, changes, deletion, etc.
- Personal information to third parties should only be disclosed or made public after giving notice and seeking informed consent.
- Data collectors should ensure security safeguards against loss, unauthorized access, destruction, use, etc.
- For openness, information should be made in an intelligible form, using clear and plain language, available to all individuals.
- Data controller should be accountable for complying with privacy measures such as external, internal audits and extending necessary support to privacy commissioners.
2. Centre gets SC to freeze hearing on Article 35A
Context:
- The Supreme Court hearing on the petitions against Article 35A of the Constitution.
- A writ petition filed by NGO, We the Citizens, which challenged the validity of both Article 35A and Article 370.
In News:’
- The Centre convinced the Supreme Court to defer hearing on petitions challenging the special status granted to Jammu and Kashmir.
- Centre’s response: it has appointed an interlocutor to commence talks with stakeholders in the State. . The interlocutor has started talks with stakeholders. If the court hears this case, it will affect dialogue process
- The government has appointed Dineshwar Sharma, a former Intelligence Bureau director, as interlocutor.
Article 35A:
- Article 35A is a provision incorporated in the Indian Constitution giving the Jammu and Kashmir State Legislature unlimited discretionary power to decide who are the ‘permanent residents’ of the State and grant them special right and privileges in State public sector jobs, acquisition of property within the State, scholarships and other public aid and welfare programmes.
- The provision mandates that no act of the State legislature coming under the ambit of Article 35A can be challenged for violating the Constitution or any other law of the land.
- Article 35A was incorporated into the Constitution in 1954 by an order of President Rajendra Prasad on the advice of the Jawaharlal Nehru Cabinet.
- The Presidential Order was issued under Article 370 (1) (d) of the Constitution. This provision allows the President to make certain “exceptions and modifications” to the Constitution for the benefit of ‘State subjects’ of Jammu and Kashmir.
- So Article 35A was added to the Constitution as a testimony of the special consideration the Indian government accorded the ‘permanent residents’ of Jammu and Kashmir.
Contention:
- Parliament was not consulted when the President incorporated Article 35A into the Constitution through a Presidential Order issued under Article 370.
- Article 368 (i) of the Constitution mandates that only Parliament can amend the Constitution by introducing a new Article.
Basic Information:
Article 368. Power of Parliament to amend the Constitution and procedure therefor:
(1) Notwithstanding anything in this Constitution, Parliament may in exercise of its constituent power amend by way of addition, variation or repeal any provision of this Constitution in accordance with the procedure laid down in this article
(2) An amendment of this Constitution may be initiated only by the introduction of a Bill for the purpose in either House of Parliament, and when the Bill is passed in each House by a majority of the total membership of that House present and voting, it shall be presented to the President who shall give his assent to the Bill and thereupon the Constitution shall stand amended in accordance with the terms of the Bill: Provided that if such amendment seeks to make any change in
(a) Article 54, Article 55, Article 73, Article 162 or Article 241, or
(b) Chapter IV of Part V, Chapter V of Part VI, or Chapter I of Part XI, or
(c) any of the Lists in the Seventh Schedule, or
(d) the representation of States in Parliament, or
(e) the provisions of this article, the amendment shall also require to be ratified by the Legislature of not less than one half of the States by resolution to that effect passed by those Legislatures before the Bill making provision for such amendment is presented to the President for assent
(3) Nothing in Article 13 shall apply to any amendment made under this article
(4) No amendment of this Constitution (including the provisions of Part III) made or purporting to have been made under this article whether before or after the commencement of Section 55 of the Constitution (Forty second Amendment) Act, 1976 shall be called in question in any court on any ground
(5) For the removal of doubts, it is hereby declared that there shall be no limitation whatever on the constituent power of Parliament to amend by way of addition, variation or repeal the provisions of this Constitution under this article.
3. Law panel moots life term for torture
IN news:
- Law Commission of India in it’s 273rd Report recommended the implementation of ‘United Nations Convention against Torture and other Cruel, Inhuman and Degrading Treatment or Punishment’ through Legislation.
- The Commission also submitted a draft Prevention of Torture Bill for the consideration of the Government.
- The Commission submitted that there has to be some effective mechanism to protect the interests of the victims of torture, the complainants and the witnesses against ill-treatment, threats or physical and mental violence.
- Highlight: “Torture has been a contentious issue having a direct bearing on the right to life and liberty of an individual. The Commission is of the opinion that such heinous acts must be curbed through strong legislation providing stringent punishment, will act as a deterrent”.
- Based on the analysis of various aspects of torture, the Commission has prepared a draft Bill titled “The Prevention of Torture Bill, 2017″.
- The Commission made the following recommendations to the Government;
While deciding on as to what amounts to torture by a public servant, the
Commission has suggested definition of ‘torture’ wide enough to include inflicting injury, either intentionally or involuntarily, or even an attempt to cause such an injury, which will include physical, mental or psychological injury.
(i) Ratification of Convention against Torture
In order to tide over the difficulties faced by the Country in getting criminals
extradited, in the absence of an anti-torture law; and to secure an individual’s right to life and liberty, the Commission recommends consideration of the Convention Against Torture for ratification and in the event, the Central Government decides to ratify the Convention, then the Prevention Of Torture Bill 2017 may be considered.
(ii) Amendment to Existing Statutes
The commission has come to the conclusion that the Criminal Procedure Code, 1973 and the Indian Evidence Act, 1872 require amendments to accommodate provisions regarding compensation and burden of proof, respectively.
Criminal Procedure Code, 1973
The Commission recommends amendment to section 357B to incorporate payment of compensation, in addition to payment or fine, as provided under section 326A or section 376D of the Indian Penal Code,1860.
Indian Evidence Act, 1872
Requires insertion of section 114B : this will ensure that in case a person in police custody sustains injuries, it is presumed that those injuries have been inflicted by the police, and the burden of proof shall lie on the authority concerned to explain such injury.
(iii). Punishment for acts of torture: In order to curb the menace of torture and to have a deterrent effects on acts of torture , the Commission recommends stringent punishment to the perpetrators of such acts. The draft Bills provides for punishment extending up to life imprisonment and fine.
(iv) Compensation to victims
The Courts will decide upon a justiciable compensation after taking into
account various facets of an individual case, such as nature, purpose, extent and manner of injury, including mental agony caused to the victim. The Courts will bear in mind the socio-economic background of the victim and will ensure that the compensation so decided will suffice the victim to bear the expenses on medical treatment and rehabilitation.
(v) Protection of Victims, Complainants and witnesses
The Commission recommends that an effective mechanism must be put in place in order to protect the victims of torture, the complainants and the witnesses against possible threats, violence or ill treatment.
4. Of bureaucracy and emotions
Context:
- Recently, a woman died of starvation in Jharkhand’s Simdega district
- Her ration card was not Aadhaar card-linked, preventing her from receiving any food ration from the Public Distribution System (PDS) for several weeks
Main Reason behind the issue: Insensitive bureaucracy.
Evolution of bureaucracy: Our society runs on paperwork. Bureaucracy came into being after the birth of scripts in ancient civilization. When a large amount of administrative data was created, a system was needed to retrieve the stored knowledge. And this gave rise to archiving, cataloguing and classifying. More than writing, it was this method of retrieval that led to efficiency
People’s connection with bureaucracy: Bureaucracy is new in developing countries.
And we must realise that institutionally, people are not “bureaucracy-receptive”
Bureaucracy and India:
- The Indian villager accesses the state through a local leader.Everyone knows everyone else and independent bureaucracy cannot be executed in the web of interdependent informal relationships among the stakeholders
- When the state creates a new bureaucratic framework that trumps local networks (on which informal societies such as India are built), citizens become confused and find themselves at a loss to negotiate their space
Customs and norms in India:
- Societies carry a historical burden of norms and customs
- Mostly informal in nature, these institutions cannot be changed overnight
- New laws and regulations introduced in any society must recognise the informal social norms society is predicated upon
- In societies such as India, citizen-state interaction is historically built on patronage and personal relations; bureaucratic forms of engagement are recent
- Western societies that are individualised, are prepared to function bureaucratically, and can successfully build independent regulatory bodies
- But collectivist societies like India cannot, and may be should not, try this
The way forward
- In diverse societies, bureaucracies have to be contextual, and therefore emotional
- They must be designed for everyone, and not just for the urban elites
- Regulations force people to change their behaviour and dynamics instantly
- If the bureaucracy is not empathetic to those who are slow in responding, it will be hugely damaging to society as a whole
- It will leave so many of us distressed, some of us dead, and even worse, most of us devoid of compassion
Category: INTERNATIONAL AFFAIRS/BILATERAL RELATIONS
1. India, Italy vow to fight terror
Context:
Italian Prime Minister Paolo Gentiloni visit to India.
Major highlights of the talks:
- India and Italy agreed to coordinate efforts at the multilateral level to counter global terrorism.
- Italian Prime Minister described India as an “Asian superpower” and said Italy was in favour of an EU-India free trade agreement.
- Six agreements between Italy and India, covering energy cooperation, diplomatic training and railways.
- Italy supported India’s quest to bring Pakistan-based terror masterminds Masood Azhar, Dawood Ibrahim and others to justice.
- The leaders agreed to strengthen cooperation to take decisive and concerted actions against Al Qaeda, ISIS (Da’esh) and their affiliates and all other UN-designated globally proscribed terrorists and terror entities
2. China to block UN ban on Masood Azhar, yet againChina to block UN ban on Masood Azhar, yet agaiN
In news:
- Citing a lack of “consensus,” China has said that it is once again not designating Masood Azhar, head of Pakistan-based militant group Jaish-e-Mohammad, as an international terrorist.
- The Chinese position, expressed by its Foreign Ministry spokesperson, Hua Chunying, came ahead of Thursday’s meeting of the 1267 committee of the United Nations Security Council, where Azhar’s status would be discussed.
Background Information:
- China had repeatedly imposed a “technical hold” on India’s application for banning Azhar, who has been accused of masterminding last year’s attack on an Indian Air Force base.
- In January, the United States filed a fresh application, backed by Britain and France after India’s filing on Azhar’s listing had lapsed last year.
1. Fewer TB deaths in India: WHO
In news:
- Death from tuberculosis in India saw a 12% decline from last year.
- The number of new cases saw a 5% increase.
- With 1.7 million new cases in 2016, India continued to be the largest contributor to the global burden with up to a quarter of the 6.3 million new cases of TB (up from 6.1 million in 2015).
- In spite of this year’s dip, India accounts for about 32% of the number of people worldwide who succumbed to the disease.
- Key fact:
- Rise in cases was due to greater surveillance and the dip in mortality from 480,000 to 423,000 in 2016, due to improved drug management.
- Globally, the TB mortality rate is falling at about 3% per year.
- TB incidence is falling at about 2% per year and 16% of TB cases die from the disease.
Key Inference: “Overall, the latest picture is one of a still high burden of disease, and progress that is not fast enough to reach targets or to make major headway in closing persistent gaps,”.
Category: ENVIRONMENT AND ECOLOGY
1. Climate change taking a toll on global health: Lancet
Key highlights of the New research paper-
- “The Lancet Countdown: Tracking Progress on Health and Climate Change” published by The Lancet:
- The Lancet report talks of the various ways climate change has started affecting the health of people across the planet.
- On an average there has been a 5.3% fall in productivity for rural labour estimated globally since 2000, as a result of rising temperatures around the world.
- In 2016, this took more than 9,20,000 people globally out of the workforce, with 4,18,000 of them in India alone.
- China, Bangladesh, India and Indonesia are the countries that have registered the highest number of deaths linked to air pollution.
Anthropogenic effect
- The research builds on the work of the 2015 Lancet Commission on Health and Climate Change, which concluded that anthropogenic climate change threatens to undermine the last 50 years of gains in public health.
- The report said that over one billion people globally will be faced with a need to migrate within 90 years, due to a rise in sea level caused by ice shelf collapse, unless action is taken.
- The research found that 87% of a random sample of global cities are in breach of WHO air pollution guidelines.
- The world has seen a 46% global increase in weather related disasters since 2000, the reported pointed out. The total value of economic losses resulting from climate-related extreme weather events was estimated at $129 billion in 2016.
Key Findings: “The findings show that climate change is affecting the health of all populations, today. These impacts are disproportionately felt by communities least responsible for climate change and those who are the most vulnerable in society.”
Nothing here for Today!!!
|
Nothing here for Today!!! |
F. Practice Questions for UPSC Prelims Exam
Question 1. Consider the following statement with reference to the recently promulgated ordinance by the Rajasthan government, The Criminal Laws (Rajasthan Amendment) Ordinance, 2017.
- Provide immunity to serving and retired public servants, judges and magistrates from probe and prosecution on complaints about their alleged offences without prior sanction.
- It also bars the media from reporting on such accusations till sanction is given.
Choose the correct answer from the options given below
- 1 only
- 2 only
- Both 1 and
- Neither 1 nor 2
See
Question 2. Consider the following statements.
- India is the only country with Right to Privacy as a Fundamental right under its Constitution
- In the Justice K. S. Puttaswamy vs Union Of India case, Supreme Court of India upheld right to privacy as a fundamental right protected under Article 21 and Part 3 of the Constitution
Choose the correct answer from the options given below
- 1 only
- 2 only
- Both 1 and 2
- Neither 1 nor 2
See
Question 3. The objective of Monetary policy in India is to
- Control inflation
- Increase foreign exchange reserves
- Reduce the fiscal deficit
- Generate surplus factors of production
Select the correct answer using the codes below
- 1 and 2 only
- 2, 3 and 4 only
- 1 only
- 1 and 4 only
Question 4. The United Nations Programme on Reducing Emissions from Deforestation and Forest Degradation (or UN-REDD Programme) is a collaborative programme of the
- Food and Agriculture Organization of the United Nations (FAO)
- United Nations Educational, Scientific and Cultural Organization (UNESCO)
- United Nations Framework Convention on Climate Change (UNFCCC)
- United Nations Development Programme (UNDP)
Select the correct answer using the codes below
- 1 and 2 only
- 3 and 4 only
- 1 and 4 only
- 1, 3 and 4 only
Question 5. Consider the following statements with reference to “FAME India scheme”
- It is a part of the National Electric Mobility Mission Plan
- It intends to promote electric and hybrid vehicles
- It is being administered by the Department of Science and Technology3.
Select the correct answer using the codes below
- 1 and 2 only
- 2 and 3 only
- 1 only
- 1, 2 and 3
G. UPSC Mains Practice Questions
GS Paper I
- How does the cryosphere affect global climate?
GS Paper IV
- Examine the scope of Fundamental Rights in the light of the latest judgment of the Supreme Court on Right to Privacy.
Also, check previous Daily News Analysis
“Proper Current Affairs preparation is the key to success in the UPSC- Civil Services Examination. We have now launched a comprehensive ‘Current Affairs Webinar’. Limited seats available. Click here to Know More.”
Enroll for India’s Largest All-India Test Series


Difficult words in sentences with meaning
1.During the past few months, independent rebels have formed a united cabal in order to displace the dictator.
meaning:-cabal:कंपू :clique, faction, coterie
2.True cabalistic study is taught amongst a select few, making it secretive and cliquish.
meaning:-cabalistic:अध्यात्मिक : sibylline, cabalistic, cryptic, cryptica
3.Did the troops ever find the cache of nuclear weapons?
meaning:-cache:कॅशे: hoard, store, stockpile, stock
4.After winning the Academy Award, the director had a lot of cachet in the movie industry.
meaning:-cachet:कंसेट:prestige, prestigiousness, distinction
5.The class clown strived to get even those most morose of students to cachinnate at his jokes.
meaning:-cachinnate :कॅचिनेट:roar, scream


,ad8888ba, ad88888ba ad888888b, ,a8888a,
,d d8"' `"8b d8" "8b d8" "88 ,8P"' `"Y8,
88 d8' `8b Y8, a8P ,8P Y8,
,adPPYba, MM88MMM 88 88 `Y8aaaaa, ,d8P" 88 88
a8" "" 88 88 88 `"""""8b, a8P" 88 88
8b 88 Y8, ,8P `8b a8P' `8b d8'
"8a, ,aa 88, Y8a. .a8P Y8a a8P d8" 888 `8ba, ,ad8'
`"Ybbd8"' "Y888 `"Y8888Y"' "Y88888P"<PHONE_NUMBER>8 888 "Y8888P"
Please login.
Welcome user h4t3r
Forbiden action detected!
Start connection scaning
Intruder's firewall bypassed
Start scaning hostile system
open brb_window
ssh<EMAIL_ADDRESS>--detach
login:
h4t3r
password:
************************
upload rootkit wipe.sh
ssh disconnect
disconecting fail
sudo shutdown –r
System is rebooting NOW
|/-\\ Loading: 18.5 %
▓█▒░«»»»»»»»»~~~~~~~~~~
Incomming scan blocked.
System error.
Firewall is gone.


A hole is classified by its par, the number of strokes a skilled golfer should require to complete play of the hole. For example, a skilled golfer expects to reach the green on a par-four hole in two strokes (This would be considered a Green in Regulation or GIR): one from the tee (the "drive") and another, second, stroke to the green (the "approach"); and then roll the ball into the hole in two putts for par. Traditionally, a golf hole is either a par-three, -four or -five.
Primarily, but not exclusively, the par of a hole is determined by the tee-to-green distance. A typical length for a par-three hole ranges between 91 and 224 meters (100 - 250 yd), for a par-four hole, between 225 and 434 meters (251 - 475 yd). Typically, par-five holes are at between 435 and 630 meters (476 - 690 yd). These distances are not absolute rules; for example, it is possible that a 450 meter (492 yd) hole could be classed as a par-four hole, since the par for a hole is determined by its 'effective playing length'. If the tee-to-green distance on a hole is predominantly downhill, it will play shorter than its physical length and may be given a lower par rating. Par ratings are also affected by factors affecting difficulty; the placement of hazards or the shape of the hole for example can sometimes affect the play of a hole such that it requires an extra stroke to avoid playing into the hazard or out-of-bounds.
Eighteen hole courses may have four par-three, ten par-four, and four par-five holes, though other combinations exist and are not less worthy than courses of par 72. Many major championships are contested on courses playing to a par of 70, 71, or 72. In some countries, courses are classified, in addition to the course's par, with a course classification describing the play difficulty of a course and may be used to calculate a golfer's playing handicap for that given course.


Current and Developing Collections
Electronic books- Women in Scotland c.1100-c.1750 (Scottish Studies Program)
- Critical Geographies: a collection of readings (Department of Geography)
- Electronic theses
- Ontario vegetable crop research (Ridgetown Campus)
- NSERC Chair for Women in Science and Engineering (College of Physical and Engineering Science)
- Research: Knowledge Mobilization/Transfer Initiatives (College of Social and Applied Human Sciences)
- Research posters (Kemptville Campus)
- Numeracy and Quantitative Reasoning Initiative
- Educational Communication (Capacity Development and Extension)
- ENGG*3100 Engineering and Design III proceedings (School of Engineering)
Scholarly communication — the way it is published and accessed — is rapidly changing. The University of Guelph Library is also changing to better suit your needs as a researcher, academic, student and published author.
The mission of the Atrium, University of Guelph's institutional repository, is to promote scholarly communication by collecting and preserving the University of Guelph's intellectual output and ensuring that it has high visibility and accessibility.
If you want your research widely accessible to the academic community in a format that retains your rights as an author, ensures preservation and copyright protection and is safe and easy to use, The Atrium will meet your needs.
View the contents of The Atrium
What goes into The Atrium?
We accept scholarly resources, in virtually all formats and media, that are created by, published by, or sponsored by the University of Guelph, its faculty, its staff, its students and selected other affiliated scholars. Priority will be given to fully open access collections that have value to researchers and those that are digitally ready to implement.
How does it work?
Easy electronic submission process — simple online forms for submission of materials. Simply fill in the registration form and attach all necessary files.
Can I submit both published and unpublished works?
Yes.
For unpublished works, the Creative Commons License is applied allowing you to select the rights you wish to retain and those you wish to grant to others.
For published works, many major publishing firms now allow copies to be deposited in the home repository of the original author. We can advise authors on their rights and available options.
How do others find my work?
Items in repositories like The Atrium are retrievable by web search engines like Google. Similarly, disciplinary or other academic "harvesters" gather information from repository collections to provide a single source for searching multiple sites simultaneously. This significantly increases the visibility of an author's work. Also, permanent URLs are assigned to each item in the repository allowing for persistent access and identification of resources.
The open access nature of the repository contributes to increased access to valuable resources for individuals or institutions unable to afford subscriptions to expensive journals.


MIMIC A film review by Steve Rhodes Copyright 1997 Steve Rhodes
RATING (0 TO ****): ***
Like its closest ancestor, the ALIEN series, the new film MIMIC by writer and director Guillermo Del Toro is as stunning visually as it is frightening. The film even has a heroine, Dr. Susan Tyler who, like Ripley, comes face-to-face with the lead monster in the end, but this time the key to the survival of the monster species is a male.
In her first major non-comedic role, Academy Award winning actress Mira Sorvino, last seen in the delightful comedy ROMY AND MICHELE'S HIGH SCHOOL REUNION, plays Dr. Susan Tyler, "the bug lady." Sorvino, who seemed incapable of playing anyone with an IQ above 80, proves that her talent is much broader than expected. Her Susan, while not near as tough as Sigourney Weaver's Ripley, is quite strong even though she is vulnerable and scared. Susan is also embarrassed because it is her scientific miscalculation that unleashed a plague of giant cockroach mutants on the world. (This is one of those good shows -- SLING BLADE was another -- which will immediately be written off by many people as soon as the plot is described. Afterall, not many moviegoers go to the entertainment section looking for a good cockroach film.)
Cinematographer Dan Laustsen is a master at the art of the shadow. The shadowy mood combined with the script's proper sense of timing -- the best monster movies delay our first complete view of the monster as long as possible -- yields a film that builds its terror properly. Just as some of the sexiest films are those in which the people stay fully dressed but seem always on the verge of taking off their clothes, so it is with monster movies, the tease is the key. In the entire first hour of MIMIC, the monster, in the form of a shadowy figure of a man in a cloak, is seen only in glimpses. Marco Beltrami's eerie and foreboding music adds to the ever-present feeling that death is right around the corner.
"Strickland's Disease came to our town like a thief in the night, threatening a generation of our children," Dr. Peter Mann (Jeremy Northam) tells a large assembly of reporters. Peter, a C.D.C. (Center for Disease Control) researcher and Susan's live-in lover, gives this speech praising Susan. Two years earlier a disease, transmitted by cockroaches was killing kids even more than polio did in the 1950s.  Since the kids stopped perishing, the program was thus declared a huge and complete success.
 Of course, at first we don't know that for sure. But, when the C.D.C. researchers find excrement stuck to the ceiling where people died and when they break the mess open to find large buttons in it, this is a definite hint that all is not right in The Big Apple.
 Even when fearsome creatures may be lurking, they work in darkened rooms lit by only a single bulb. In fact the light of flickering bad florescent lights and low-wattage incandescent bulbs adds dramatically to the horrific ambiance. Figures in the background are seen, but escape just before being noticed as the audience whispers a collective "look out!" under their breath.
F. Murray Abraham appears in an inconsequential role as an expert named Dr. Gates. He reflects, rather philosophically, on an insect's inner motivation. "Can I eat it or will it eat me?" it turns out is what those little critters are always thinking. And do our big bugs ever eat: children, pets, big beefy men, you name it. The fright, however, does not come from visual gore since most meals are savored off-screen. The fear comes in knowing what happens.
Charles Dutton appears as the street-wise -- actually subway-wise since most of the film happens in and below the New York City subway -- cop named Leonard. He is great as the tough and disbelieving officer who wants to play everything by the book. There is even a boy with a heightened sense of hearing who calls the big bug, "Mr. Funny Shoes" for the sounds he makes.
While the picture is certainly frightening, it is even more fascinating. MIMIC has just enough scientific underpinnings to make the story interesting and not seem too ridiculous. The ending, although predictable in its outcome, has several surprises that use almost plausible scientific theories. MIMIC is an ALIENS set in our time and with a terrific look that begs to be seen even though the potential for fright is ever-present. One thing is certain. After seeing it, you will look at street grates in a totally different way.
MIMIC runs 1:44. It is rated R for terror and a little profanity. The show would be fine for teenagers who can handle horror flicks. I recommend the picture to you and give it ***.
**** = A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show. Don't waste your money. 0 = Totally and painfully unbearable picture.
REVIEW WRITTEN ON: September 8, 1997
Opinions expressed are mine and not meant to reflect my employer's.
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


Create a pie like plot to visualise if the aim or several aims of a project is achieved or close to be achieved i.e the aim is achieved when the point is at the center of the pie plot. Imagine it's like a dartboard and the center means 100% completeness/achievement. Achievement can also be understood as 100% coverage. The standard distribution of completeness allocated in the pie plot is 50%, 80% and 100% completeness.
| Version: | 1.0.0 |
| Depends: | R (≥ 3.2.0), utils |
| Imports: | ggplot2 (≥ 2.1.0) |
| Suggests: | grid, gridExtra |
| Published: | 2016-04-22 |
| Author: | Yusman Kamaleri [aut, cre] |
| Maintainer: | Yusman Kamaleri <ybkamaleri at gmail.com> |
| License: | GPL-2 |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | aimPlot results |
| Reference manual: | aimPlot.pdf |
| Package source: | aimPlot_1.0.0.tar.gz |
| Windows binaries: | r-devel: aimPlot_1.0.0.zip, r-release: aimPlot_1.0.0.zip, r-oldrel: aimPlot_1.0.0.zip |
| OS X binaries: | r-release: aimPlot_1.0.0.tgz, r-oldrel: aimPlot_1.0.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=aimPlot to link to this page.


{% comment %} To use this card: {% include featured-card.html featured_class=featured_class featured_image=featured_image featured_title=featured_title featured_text=featured_text featured_url=featured_url %} {% endcomment %}
{{include.featured_text}}


---
layout: post
title: Existential Star Wars
date: '2013-08-03T12:10:00.001-04:00'
author: Bob Sica
tags:
- pain
- Sartre
- StarWars
- Camus
- suffering
- anguish
- existentialism
modified_time: '2013-08-03T12:12:06.777-04:00'
blogger_id: tag:blogger.com,1999:blog-4599947215754335931.post-3474956992764737218
blogger_orig_url: http://blog.bobsica.com/2013/08/existential-star-wars-in-french.html
---
and I care not if you view this, as my torment is not released by your engagement.


Tensorflow Inspection for FWM Curves 180602
| Date: | Jul 6, 2018 |
|---|---|
| Last Updated: | Jul 20, 2018 |
| Categories: | |
| Tags: |
Contents
Introduction
In this project, we combine a deep-learning architecture with a traditional electromagnetic (EM) forward model which is differentiable. Since the model is differentiable, we could enable the gradient back propagated from the model to the deep-learning network. The following figure could be used to describe this design.
| The whole architecture of the project |
|---|
Suppose we have gotten a group of response samples (i.e. $\mathbf{y}$). In a traditional method, since we only have a formulated forward model $\mathcal{F}$, we need to use such an optimization to simulate the input of the model (i.e. $\mathbf{x}$). We call this process “inversion”.
where we define $\mathbf{y} := \mathcal{F}(\mathbf{x})$, thus $\hat{\mathbf{y}} := \mathcal{F}(\hat{\mathbf{x}})$.
Note that here the $\mathbf{x}$ is actually unknown, and we only know the response of it, thus there must be a misfit between the simulated input $\hat{\mathbf{x}}$ and the real input $\mathbf{x}$. The optimization could be essentially defined as a process to minimize the misfit. This method has such shortcomings.
- Take a long period to get a converged result.
- Easy to converge on a local minimum due to the highly non-linearity of the model.
- Could not make use of the priori information, because the model is independent for each sample.
To solve these problems, different methods are proposed. Some of them are aimed to improve the accuracy and some of them are aimed to accelerate the process. Our method is essentially using a forward deep learning network to replace the high-cost inversion algorithm. To make a comparison, we would also discuss about some baseline methods including the primal inversion, a look-up table method, a data-driven learning method and so on.
Baseline methods
Here we would discuss about some baseline methods some of which have been used in practice. We would perform the test scope on a laptop to examine their efficiency and accuracy. The configuration of the test machine is as below:
- Processor: Intel® Core™ i5-5200U CPU @ 2.20GHz, 2.19GHz
- RAM: 4.00GB
- OS: Windows 10 x64
Look-up table method
Theory
The idea of a look-up table could work because the forward EM model function is time-consuming. We generate a lot of samples that could exhaust the whole parameter space. Here we show an example in the figure below:
| The structure of a look-up table | The search method for simulating the forward model |
|---|---|
In this example, we have 3 parameters (A, B and C), each parameter is in the range of [0, 20). Hence we generate 20 points for each parameter and we could get 8000 ($20^3$) samples. If we place the samples in an increasing order, the index of the sample would vary from 0x0000
to 0x1F3F
(suppose the data length of each sample to be 1).
Then we would have 2 tables. The first table (table X) stores the samples that we generate in the parameter space, the second table (table Y) stores the returned responses of the forward model. Therefore, we know that if we want to generate these tables, we need to perform the forward model for 8000 times. However, once the look-up tables are prepared, it would be no need for us to run the forward model function, because we could search one table to get the index, and use the same index to get the sample in the other table.
The right figure above shows that we even do not need to search table X if we want to simulate the forward model. Suppose that we have already know the parameters of a sample, and we want to get the response of this sample from table Y. We could use the value of the parameter to calculate the offset of this sample for each parameter and take the sum of these offsets. Then we could get the index of the sample. This is a trick of making advantage of the order of the stored samples. However, if we want to get the parameters when we have known the response, i.e. search table Y to get the sample in table X, we have to search the whole table Y by checking the sample with the smallest misfit as shown in $\eqref{fml:intro:misfit}$.
Whether we search the table or not, we do not need to run the forward model after the table generated. Thus the look-up table could help us guess the result fast. Denote $M$ as the sample number of each parameter, and $N$ as the number of parameters. If we search the table, the complexity is $O(M^N)$; If not, the complexity would be only $O(N)$.
Results
Generate the table
First, we generate two groups of tables. The first group has 10000 (10K) samples, the sum size of stored data is 74MB. The second one has 2359296 (2M) samples, the sum size of stored data is 1.70GB. To generating data by yourself, use this command:
python dumpfile.py
This script commit the core process to the C++ code, thus it could reach a higher efficiency. Both of these two scripts need us to modify parameters in the script. To learn the details about how to use the API, check this document:
Note that we also have a script which is written by purely python (except the part of forward model). This script is low-efficient, only could be used to produce a 3-layer model and used for a comparison. If you want to test it, call dumpfile_3layers.py
. It is used totally the same as the highly efficient script.
To accelerate the generating process, we make use of a more powerful computer with 8 cores. The consumed time of the whole generation for the 2M table is:
| Python Code | C++ code |
|---|---|
| 20.95h | 4.18h |
Read the table
Similarly, we also have 2 scripts for reading the table. Use a code like this to do that:
python readfile.py -m i -ap model.npz -dp s_table -l 0
Here are the usages for each option:
| Option | Description | Default |
|---|---|---|
| -h | Check the help of the script. | |
| -m | The running mode of the script. (1) f : simulating the forward model. (2) i : simulating the inverse model. |
f |
| -ap | The path of the ground truth, it should contains two values named modelReal and measData . |
model.npz |
| -bp | The path of the database, it composes of 2 files with the postfix .fwdp and .fwdr respectively. |
s_table |
| -l | The dumpLevel of the C++ script. Note that when >0 the script would be slowed down. (1) 0: silent mode. (2) 1: show progress (3) 2: show detail loss. | 0 |
We also have a lowly efficient version of the script readfile_3layers.py
with the same options. It is used to read the table produced by dumpfile_3layers.py
. And this script is used for comparison, too.
The results of the look-up table are shown as below:
| The forward simulation by 10K table | The forward simulation by 2M table |
|---|---|
We use the row to represent the simulated signal of 92 sensors, and the column to represent the 80 samples. Each row in these figures represent a response curve over a period. To see the results clearly, we would like to show results of some sensors, i.e. some curves. The results are as below:
| The forward simulation by 10K table | The forward simulation by 2M table |
|---|---|
The results of the simulation for the inversion by the look-up table are shown in these figures:
| Ground truth | The inverse simulation by 10K table | The inverse simulation by 2M table |
|---|---|---|
We could find that it seems that the 2M table improves the precision, but it returns a worse prediction when it comes to resistivity. That is because the 10K table has a resistivity of 48 (which is very close to the real value, i.e. 50), however in the 2M table we only have resistivity like 39 or 63.
The consumed time of reading tables are recorded here. First, we compare the efficiency of different codes by testing with 10K table and 80 input samples:
| Test code efficiency with 10K table | ||
|---|---|---|
| C++ code | Python Code | |
| Inversion | 1.8048s | 6.7010s |
| Forward model | 0.0020s | 0.6655s |
Then we perform tests with different tables. The consumed time is shown as below:
| Test with different tables | ||
|---|---|---|
| 10K table | 2M table | |
| Inversion | 1.8048s | 68.73418s |
| Forward model | 0.0020s | 0.01560s |
Pure inversion by tensorflow
Theory
In this part, we use tensorflow to simulate the whole process of purely deterministic gradient descent inversion. In another word, our target could be formulated as $\eqref{fml:intro:misfit}$ where the only variable is the input (geophysical parameters) of the physical forward model. The architecture could be shown in the following figure.
| The whole architecture of the pure inversion |
|---|
Check here to see Levenberg–Marquardt algorithm in Wikipedia.
In general, we use a Hessian optimization method (like the Gauss–Newton algorithm) to deal with a complex and highly non-linear model. If we do not use Hessian matrix, we would prefer an algorithm like Levenberg–Marquardt algorithm (LMA). It only use Jacobian matrix and could solve the ill-posed problem somehow. However, here we need to use a machine learning frame, i.e. tensorflow to make the pure inversion, which makes us could not find available methods, because in a typical machine learning optimization, these methods requires high computational cost and could not give a stable solution. Thus we only have some simple and one-order methods like gradient-descent, adagrad, adelta and adam. An algorithm like above methods has been realized as an available optimizer offered by tensorflow. We could call and make use of it easily.
To realize this architecture in tensorflow, the key is converting a numerical computing model (i.e. a numpy-API function) to a symbol computing operator (i.e. a tensor-API op). To define an op, we need to define its forward operation and back-propagating operation. Here two figures show how we wrap the original model so that tensorflow could pass tensors to it and get tensors from it.
| Forward operator | Back-propagating operator |
|---|---|
If we only define the forward op, we could use the forward model in tensorflow but we could not train it. Because in tensorflow, the gradients are computed totally analytically. To make our model trainable, we need to tell tensorflow how to back-propagate the gradient in this op. Since this model accept a multi-dimensional input and give a multi-dimensional output, the only thing we need to do is just calculating the Jacobian matrix $\mathbf{J}$. Assuming that the gradient $\frac{\partial f}{\partial \mathbf{y}}$ from the upper layer is known (actually it is known during the back-propagation). Then the back-propagated gradient in this op is:
The computation of Jacobian matrix has been defined as a C++ API with the support of openMP. You could check the project here:
To improve the efficiency, in this project we use the batch computing version of the code.
Results
The result is shown in the following graph. The selected algorithm here is adam. We perform the inversion on my computer, it could be estimated that when we optimizing 80 samples, it takes about 11 seconds per step, thus the whole process requires 2.69 hours. We use the curve to show the MSE loss and give several snapshots of model during the whole optimization. The ground truth is shown in the northwest of the figure.
| The result of the pure inversion |
|---|
We could find that the process of convergence is very slow. To explain that, we would like to show the same data optimized by LMA. It only takes less than 300 steps and could converge to such a result.
| Ground truth | Result from LMA | Result from tensorflow |
|---|---|---|
From these results, we could know that the adam algorithm could not converge as well as what LMA does, because the gradient is not balanced in this case. If we check the Jacobian matrices produced by forward model, we would know the the gradient from the resistivity is far stronger than that from the boundary position (ZBed). Since adam could not adjust the learning rate according to the parameters, here we would find that the resistivity would converge before the boundary. Actually in the real case the resistivity converge in 100 steps but it takes 900 steps for the boundary to converge.
Here we would check the consumed time by comparing different methods.
| LMA | adam |
|---|---|
| 7.20m | 2.69h |
The reason why LMA could reach a better result with far higher efficiency is that the LMA could adjust the learning rate according to the current gradients for each parameter. For example, if we have a function $f(x_1, x_2)$ with $\frac{\partial f}{\partial x_1} \gg \frac{\partial f}{\partial x_2}$, then the learning rate of $x_2$ would be amplified so that the gradients for each parameter could be balanced. This technique could improve the efficiency of the convergence. In fact, if we let the adam optimize for another 1000 steps, it would reach a better result which is similar to that of the LMA.
Data-driven neural networks
Another method is using a neural network to replace the model. Thus we have 3 ideas to make this replacement.
- Replace the primal forward model by a deep learning architecture, which means we still need to use this replaced model to make the inversion.
- Replace the inversion directly, i.e. training a network that plays a role as the inverse function of the primal forward model. Thus, we could replace the high computational cost inversion by a forward deep model.
- Use a GAN architecture. This technique could be used in the case of semi-supervised learning. We suppose that most of our samples have no ground truth, but we may still find a way to map the unlabeled data to the labeled space.
Simulate the inversion
Here we show the basic structure of this idea:
| Simulating the inverted model |
|---|
We use the look-up table which is generated before as our train set. Although this set has a lot of samples, it is still very sparse compared to the distribution of the real data. The test set is a generated continuous model where most samples do not appear in the train set. The model here we use is just a deep learning one. It accepts the response as the input and predict the geophysical parameters. We try to make the model regressed to the real geophysical parameters in the train set.
Network arrangement
Note that the deep learning network that we use could be an arbitrary network. In the simplest case, this network could be a 3-layer one:
| 3-layer network only composing of fully connected layers |
|---|
This model could accept N samples with a length of 92, then the input sample would be mapped to a hidden layer with 256 nodes. Finally, the hidden layer would be mapped to an output layer with 5 nodes. To balance the gradients, i.e. the scale between the resistivities (the first 3 parameters) and the boundary positions (the last 2 parameters), we use a re-biased layer and a scaling layer. This post-processing trick would be applied in the following other models. A re-biased layer could be formulated as:
where $\gamma$ and $\beta$ are trainable. And the scaling layer is just used for amplifying the values of resistivities, so that their gradients could match with those of the boundary positions.
A more complex model is a convolutional one. This model is adapted from the VGG16 network. We use 9 convolutional layers and 1 fully connected layer. In practice we find that too many fully connected layers may cause the performance downgraded.
| Convolutional network adapted from VGG16 |
|---|
To get a further step, we also try a residual model which is adapted from ResNet-50. The basic unit in this model is a residual block which contains 3 serial convolutional layers as a “bottleneck” structure. Since we have 20 residual blocks and 1 convolutional layer, it actually has 61 convolutional layers. This network is very deep compared the above two models.
| Residual network adapted from ResNet-50 |
|---|
For the convolutional networks, we could add an l2-regularization to each convolutional kernel so reduce the overfitting effect. Hence in the following part we would show the results in both the “with l2” case and the “without l2” case.
Train
We use adam optimizer with a learning rate of 1e-3 to train the networks for 80000 steps. Every step we select 64 samples randomly to build a batch and use this batch to update the network parameters. The training loss is shown as below:
| Training loss | |
|---|---|
| train | |
| valid |
We use our test set for validation, however, the “validation” is only a inspection, i.e. we do not influence the training process according to the situation of the validation. Thus we know the validation loss reflects the current performance on our test set during the training process. From the results, we could learn that:
- The network could get converged about 30000 steps, which is reasonable because the total number of samples in the train set is 2M. Considering every step we choose 64 steps, we would know that the network would be saturate before we iterate all samples.
- The valid loss is lower than the train loss, this may be caused by the continuity of the test samples. When we train the network, the network could interpolate the missing part in the train set, which could take effect on continuous data rather than random samples.
- The deep networks could reach an apparently better performance than the 3-layer model. But the very deep model (residual one) do not have an obvious advantaged when compared to the shallower model (convolutional one).
- Neither could Adding L2 regularization help the network get converged faster, nor it does not contribute an apparently better performance. In another words, adding L2 regularization may be not a good choice.
Test
The performance of the networks are shown in the following figures:
| Without Noise | $\sigma=0.1$ | $\sigma=0.5$ | |
|---|---|---|---|
| Ground truth | |||
| Plain | |||
| Conv | |||
| Conv (withl2) | |||
| Residual | |||
| Residual (withl2) |
The costs of these network are
| Plain | Conv | Residual | |
|---|---|---|---|
| Time | 0.01562s | 0.28253s | 1.64054s |
| Memory | 295KB | 20.8MB | 92.0MB |
It shows that the residual network need a much heavier cost compared to the other 2 networks, but it could not give an obviously better performance compared to convolutional network. Maybe the 17-layer model has been capable to describe the inversion, which means a more complex model could not improve the efficiency.
Simulate the forward model
Simulating the forward model is similar to what we have done just before. It only needs us exchange the input and output each other compared to the simulation for inversion:
| Simulating the forward model |
|---|
We use the generated look-up table to train the forward simulating network, too. What we do here is exactly the same as simulating the inversion when considering the basic idea. An MSE loss is designed for the regression.
Network arrangement
The network that we use here is almost the same as the network for simulating the inversion, thus we would like to skip this part and talk about the results.
Train
We use the totally same configuration to train the networks and we also train for 80000 steps. The training loss is shown as below:
| Training loss | |
|---|---|
| train | |
| valid |
The validation loss is produced by feeding the test set. From these results, we could find that:
- The performances between the convolutional network and residual network are almost the same.
- Adding L2 loss would reduce the performance of the model.
Test
The performance of the networks are shown in the following figures. We would show the predicted response for all curves. And we would also only inspect some curves to give a clearer view.
| All curves | Selected curves | |
|---|---|---|
| Ground truth | ||
| Plain | ||
| Conv | ||
| Conv (withl2) | ||
| Residual | ||
| Residual (withl2) |
The costs of these network are
| Plain | Conv | Residual | |
|---|---|---|---|
| Time | 0.03126s | 0.35526s | 1.75713s |
| Memory | 298KB | 21.4MB | 92.6MB |
By comparing the performance and the cost, we could find that the same problem occurs here. If we only check the MSE loss, we would find that the more complex model does not reach a better performance. Thus we think the convolutional network is a capable model for this application. However, in practice, it seems that a deeper network could reach a better result. This conclusion may be not reliable since the deviation during the training is could definitely not be omitted.


const boardsRepo = require('./board.memory.repository');
const tasksRepo = require('../tasks/task.memory.repository');
/**
* @import {BoardModel} from './board.model'
* @import {ColumnsModel} from './board.model'
*/
/**
* Returns information about all boards from the database using the controller function.
* @returns {Promise<Array.<BoardModel>>} resolved promise with boards and their information.
*/
const getAll = () => boardsRepo.getAll();
/**
* Returns information about selected board from the database using the controller function.
* @param {string} id id of selected board.
* @returns {Promise<BoardModel>} resolved promise with selected board and its information.
*/
const getBoardById = (id) => boardsRepo.getBoardById(id);
/**
* Create new board and its information in the database using the controller function.
* @param {string} title title of new board.
* @param {Array.<ColumnsModel>} columns columns of new board.
* @returns {Promise<BoardModel>} resolved promise with new board and its information.
*/
const createBoard = (title, columns) => boardsRepo.createBoard(title, columns);
/**
* Update board's information in the database using the controller function.
* @param {string} id id of board, which information will be update.
* @param {string} title new title of selected board.
* @param {Array.<ColumnsModel>} columns new columns of selected board.
* @returns {Promise<BoardModel>} resolved promise with board and its new information or an error if board is not found.
*/
const updateBoard = (id, title, columns) => boardsRepo.updateBoard(id, title, columns);
/**
* Delete board and its information from the database and all tasks that were in it using the controller functions.
* @param {string} id id of deleted board.
* @returns {void} return an error or nothing.
*/
const deleteBoard = (id) => {
boardsRepo.deleteBoard(id);
tasksRepo.deleteTasksFromBoard(id);
}
module.exports = { getAll, getBoardById, createBoard, updateBoard, deleteBoard };


Web Developer
Bachelor of Engineering, Computer Engineering, Universitas Indonesia
GPA = 3.38
Graduated in 2014
Web Developer Staff, PT. Agranet Multicitra Siberkom (Detik.com), Jakarta
Sept 2014 - present
Web Developer (Internship), PT. Darmanusa Maharani Ukirama, Jakarta
Jan 2014 - Feb 2014
| Language | PHP, Python, JavaScript |
|---|---|
| MVC Frameworks | Laravel, CodeIgniter, Panada Framework, Flask, Django |
| Front End | HTML, React (JavaScript library), jQuery, CSS, Bootstrap, Google Analytics |
| Version Control | Git, Gitflow |
| Webserver and OS | NGINX, Apache2, CentOS, Ubuntu |
| Database Engines | PostgreSQL, MySQL, MongoDB |
| Additional Tools | Redis, Fabric (Python), Phinx |
Developer Team, Detikcom Solusi UKM (solusiukm.detik.com)
This project is dedicated to provide a native ads platform for advertisers to advertise around the family of detik.com.
Operational and Maintenance Team, Detik Payment (payment.detik.com)
Designed as a single point of payment solution for detik.com products. Methods of payment were credit cards (visa/mastercard), bca klikpay, mandiri clickpay, and wire transfer.
Operational and Maintenance Team, myTrans (mytrans.com)
myTrans provides Video on Demand (VOD) and Live Streaming of TransTV and Trans7.
Marketing
Board Games
Playing Musical Instruments (Piano)
Sports (Swimming & Jogging)


Home
About
Blog
Projects
Resume
Blog
Blog Reflection
Ruby on Rails!
Ruby Hashes vs JavaScript Objects
Ruby Classes
sort_by Enumerable Method!
Diversity in Tech
Ruby Arrays and Hashes
Margin, Border & Padding
Version Control, Git & Github


Everpix
Ready to take the chore of photo management off your list?
Everpix does the hard work for you. Snap and share all the photos you want and spend more time enjoying them.
Try For Free
Download
Download
Copy to Everpix
Previous
Next
Close
Download


Current page
Hidden layer
Hidden layers sometimes contain solutions. Some pages have a transparent hidden layer, when this is the case, there will be no visual change.
Whole document
Convert PDF
Progress
Status here
-
This settings looks if any hidden layer is active in the document and includes it in the generated PDF.
Enable the Tesseract library to recognize text in the pages (each page is an image), this is handy if you wish to use Ctrl+F to search for terms. Warning: this takes a long time (~15 minutes for 150 pages) and puts a lot of stress on your pc.


Early in the morning…
…Joanna gets up and begins her day with a cup of nice Rooibos tea. Then she loads her current project and writes code, solves issues and fixes bugs. One sip of tea – one bug down! Sometimes she wonders if Rooibos preparation can be automated with a proper script…
Wrapping up the code in art
Joanna’s work involves making graphic assets. She has her graphic processing software always running, so she can quickly prepare UX elements, add another set of ears on a friend’s picture, prepare mockups, icons, etc. Joanna seeks inspiration in various websites and projects, surrounding world, and the scent of her dirty chai latte.
Through the lens of a developer
Stock photography can be useful, but the world can’t function with the same pictures of people laughing at their salads. Joanna knows that and incorporates her own photos in the projects she works on. Her eyes detect ideal lighting, best frames, mint tea and bright colors. This might explain why people greet her with “Why are you taking a picture of me?” instead of “Hello”.
Is the customer always right?
Perhaps not, especially when he prints out a GIF and expects it to move. But that’s ok - with a background in account management, Joanna sees world through eyes of web users and clients. Even if the customer doesn’t know what he wants, Joanna is there to assist. Sometimes with a little bit of chamomile tea.


We'll help you reset it and get back on track.
Start by entering the email address associated with your Dashport account.


pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
import "../../math/SafeMath.sol";
import "../Crowdsale.sol";
/**
* @title TimedCrowdsale
* @dev Crowdsale accepting contributions only within a time frame.
*/
contract TimedCrowdsale is Initializable, Crowdsale {
using SafeMath for uint256;
uint256 private _openingTime;
uint256 private _closingTime;
/**
* @dev Reverts if not in crowdsale time range.
*/
modifier onlyWhileOpen {
require(isOpen());
_;
}
/**
* @dev Constructor, takes crowdsale opening and closing times.
* @param openingTime Crowdsale opening time
* @param closingTime Crowdsale closing time
*/
function initialize(uint256 openingTime, uint256 closingTime) public initializer {
assert(Crowdsale._hasBeenInitialized());
// solium-disable-next-line security/no-block-members
require(openingTime >= block.timestamp);
require(closingTime >= openingTime);
_openingTime = openingTime;
_closingTime = closingTime;
}
/**
* @return the crowdsale opening time.
*/
function openingTime() public view returns(uint256) {
return _openingTime;
}
/**
* @return the crowdsale closing time.
*/
function closingTime() public view returns(uint256) {
return _closingTime;
}
/**
* @return true if the crowdsale is open, false otherwise.
*/
function isOpen() public view returns (bool) {
// solium-disable-next-line security/no-block-members
return block.timestamp >= _openingTime && block.timestamp <= _closingTime;
}
/**
* @dev Checks whether the period in which the crowdsale is open has already elapsed.
* @return Whether crowdsale period has elapsed
*/
function hasClosed() public view returns (bool) {
// solium-disable-next-line security/no-block-members
return block.timestamp > _closingTime;
}
function _hasBeenInitialized() internal view returns (bool) {
return ((_openingTime > 0) && (_closingTime > 0));
}
/**
* @dev Extend parent behavior requiring to be within contributing period
* @param beneficiary Token purchaser
* @param weiAmount Amount of wei contributed
*/
function _preValidatePurchase(
address beneficiary,
uint256 weiAmount
)
internal
onlyWhileOpen
{
super._preValidatePurchase(beneficiary, weiAmount);
}
uint256[50] private ______gap;
}
|


Class: ActionDispatch::Session::CookieStore
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
AbstractSecureStore ,
Rack::Session::Abstract::PersistedSecure
|
|
|
Instance Chain:
self,
AbstractSecureStore ,
SessionObject ,
StaleSessionCheck ,
Compatibility ,
Rack::Session::Abstract::PersistedSecure
|
|
| Inherits: |
ActionDispatch::Session::AbstractSecureStore
|
| Defined in: | actionpack/lib/action_dispatch/middleware/session/cookie_store.rb |
Overview
This cookie-based session store is the Rails default. It is dramatically faster than the alternatives.
Sessions typically contain at most a user ID and flash message; both fit within the 4096 bytes cookie size limit. A CookieOverflow
exception is raised if you attempt to store more than 4096 bytes of data.
The cookie jar used for storage is automatically configured to be the best possible option given your application’s configuration.
Your cookies will be encrypted using your application’s secret_key_base
. This goes a step further than signed cookies in that encrypted cookies cannot be altered or read by users. This is the default starting in Rails 4.
Configure your session store in an initializer:
Rails.application.config.session_store :, key: '_your_app_session'
In the development and test environments your application’s secret_key_base
is generated by Rails and stored in a temporary file in tmp/local_secret.txt
. In all other environments, it is stored encrypted in the config/credentials.yml.enc
file.
If your application was not updated to Rails 5.2 defaults, the secret_key_base
will be found in the old config/secrets.yml
file.
Note that changing your secret_key_base
will invalidate all existing session. Additionally, you should take care to make sure you are not relying on the ability to decode signed cookies generated by your app in external applications or JavaScript before changing it.
Because CookieStore extends Rack::Session::Abstract::Persisted
, many of the options described there can be used to customize the session cookie that is generated. For example:
Rails.application.config.session_store :, expire_after: 14.days
would set the session cookie to expire automatically 14 days after creation. Other useful options include :key
, :secure
, :httponly
, and :same_site
.
Constant Summary
-
DEFAULT_SAME_SITE =
Internal use only
# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 61proc { |request| request. }
Class Method Summary
- .new(app, options = {}) ⇒ CookieStore constructor
Instance Method Summary
- #delete_session(req, session_id, options)
- #load_session(req)
- #cookie_jar(request) private
- #extract_session_id(req) private
- #get_cookie(req) private
- #persistent_session_id!(data, sid = nil) private
- #set_cookie(request, session_id, cookie) private
- #unpacked_cookie_data(req) private
- #write_session(req, sid, session_data, options) private
AbstractSecureStore
- Inherited
SessionObject
- Included
StaleSessionCheck
- Included
Compatibility
- Included
Constructor Details
.new(app, options = {}) ⇒ CookieStore
# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 63
def initialize(app, = {}) [: ] = true [:same_site] = DEFAULT_SAME_SITE if ! .key?(:same_site) super end
Instance Method Details
#cookie_jar(request) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 123
def (request) request. .signed_or_encrypted end
#delete_session(req, session_id, options)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 69
def delete_session(req, session_id, ) new_sid = generate_sid unless [:drop] # Reset hash and Assign the new session id req.set_header("action_dispatch.request.unsigned_session_cookie", new_sid ? { "session_id" => new_sid.public_id } : {}) new_sid end
#extract_session_id(req) (private)
[ GitHub ]#get_cookie(req) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 119
def (req) (req)[@key] end
#load_session(req)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 76
def load_session(req) stale_session_check! do data = (req) data = persistent_session_id!(data) [Rack::Session::SessionId.new(data["session_id"]), data] end end
#persistent_session_id!(data, sid = nil) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 104
def persistent_session_id!(data, sid = nil) data ||= {} data["session_id"] ||= sid || generate_sid.public_id data end
#set_cookie(request, session_id, cookie) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 115
def (request, session_id, ) (request)[@key] = end
#unpacked_cookie_data(req) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/session/cookie_store.rb', line 92
def (req) req.fetch_header("action_dispatch.request.unsigned_session_cookie") do |k| v = stale_session_check! do if data = (req) data.stringify_keys! end data || {} end req.set_header k, v end end


Homicide (1991) * * * 1/2 A movie review by Serdar Yegulalp Copyright 1998 by Serdar Yegulalp
CAPSULE: One of David Mamet's most underrated and unseen movies; a blunt-nosed and memorable story about a man waking up to the sound of his own soul.
The criminally underrated HOMICIDE is one of David Mamet's best movies. It is not as clever or devious as HOUSE OF GAMES or THE SPANISH PRISONER, but it strikes markedly different notes than either of those films. Among many other things, it's also one of the few recent movies that deals intelligently with the notion of ethnic identity and the subordination of same -- and the consequences of that subordination.
HOMICIDE features a cop, Bobby Gold (Joe Mantegna), who has tried to keep a great deal about himself on the back burner. He is a Jew, but he has developed a whole arsenal of reasons for closeting that part of himself away. Case in point: when another officer calls him a "kike", he flinches and cocks his fist, but we get the feeling that he's doing it more out of a sense of obligation. Someone calls you fighting words, you fight. HOMICIDE is not about the fight per se, but about the motives.
The plot centers around a candy-store murder. An old woman, the proprietrix, was shot dead in a robbery, and her son, a doctor, more or less drafts Gold into investigating the killing.  Or, more accurately, he tries not to, and has it blow up in his face. This is interwoven with another case that Gold is trying to work on -- a drug dealer on the run -- and, like Gold, we don't realize that he can't resolve either case without getting a few issues about himself straightened out.
The dialogue is vintage Mamet: fast, sharp, spattered with invectives and expletives, but always at the service of the story and the characters. There's one scene that perfectly dramatizes how ugly dialogue can be made to serve the larger purposes of a movie: Gold is on the phone, ranting about the fact that he's been yanked off the drug bust and put on this pathetic candy-store shooting. Out of his mouth emerge words that he would consider vile coming from anyone else, and it isn't until he's shown up later on that he realizes what he has done.
Mamet fills the production with a gallery of actors he's familiar with and lets them do their stuff, like jazz musicians who are in a tight ensemble together: William H. Macy, long one of my favorite actors; Mantegna; J.J. Barry, Ving Rhames. They all work, and they all convince us that there's a lot more going on here than is only hinted at on the surface. Especially in the case of Bobby Gold, who is a classic case of a man trying very hard not to know who he is. Then one fine day, he catches up with himself.
<EMAIL_ADDRESS>EFNet IRC: GinRei / ICQ: 934998
http://cablehouse.dyn.ml.org/serdar another worldly device...
you can crush me as I speak/write on rocks what you feel/now feel this truth
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