Python quick start¶
This section will show a simple example to illustrate various functionalities of the AMPL Python interface. The full example prints the version of the AMPL interpreter used, loads a model from file and the corresponding data file, solves it, gets some of the AMPL entities in Python and uses them to get the results and to assign data programmatically. This section assumes that you are already familiar with the Python language. Full class reference is given in Python API reference.
Complete listing¶
This is the complete listing of the example. Please note that, for clarity of presentation, all the code in the examples below does not include exception handling.
from amplpy import AMPL
# Create an AMPL instance
ampl = AMPL()
"""
# If the AMPL installation directory is not in the system search path:
from amplpy import Environment
ampl = AMPL(
Environment('full path to the AMPL installation directory'))
"""
# Interpret the two files
ampl.read('models/diet.mod')
ampl.readData('models/diet.dat')
# Solve
ampl.solve()
# Get objective entity by AMPL name
totalcost = ampl.getObjective('Total_Cost')
# Print it
print("Objective is:", totalcost.value())
# Reassign data - specific instances
cost = ampl.getParameter('cost')
cost.setValues({'BEEF': 5.01, 'HAM': 4.55})
print("Increased costs of beef and ham.")
# Resolve and display objective
ampl.solve()
print("New objective value:", totalcost.value())
# Reassign data - all instances
cost.setValues([3, 5, 5, 6, 1, 2, 5.01, 4.55])
print("Updated all costs.")
# Resolve and display objective
ampl.solve()
print("New objective value:", totalcost.value())
# Get the values of the variable Buy in a dataframe object
buy = ampl.getVariable('Buy')
df = buy.getValues()
# Print them
print(df)
# Get the values of an expression into a DataFrame object
df2 = ampl.getData('{j in FOOD} 100*Buy[j]/Buy[j].ub')
# Print them
print(df2)
Needed modules and AMPL environment creation¶
For a simple hello world program, first import the needed classes from the amplpy package.
from amplpy import AMPL, DataFrame
Then copy the following statements to have a hello world application which gets the value of the option version as defined in the underlying AMPL executable and prints the result on the console.
ampl = AMPL()
print(ampl.getOption('version'))
The first line creates a new AMPL object with all default settings, incapsulated in a smart pointer to ensure resource deletion. The second, which is the preferred way to access AMPL options, gets the value of the option version from AMPL as a string and prints the result on the active console.
If the AMPL installation directory is not in the system search path, you should create the AMPL object as follows instead:
from amplpy import AMPL, Environment
ampl = AMPL(Environment('full path to the AMPL installation directory'))
Note that you may need to use raw strings (e.g., r’C:\ampl\ampl.mswin64’) or escape the slashes (e.g., ‘C:\\ampl\\ampl.mswin64’) if the path includes backslashes.
Load a model from file¶
The following lines use the method amplpy.AMPL.read()
to load a model and data stored in external (AMPL) files.
If the files are not found, an IOError is thrown.
ampl.read('models/diet/diet.mod')
ampl.readData('models/diet/diet.dat')
Once these commands are executed, the AMPL interpreter will have interpreted the content of the two files. No further communication is made between the AMPL interpreter and the Python object, as every entity is created lazily (as needed).
Solve a problem¶
To solve the currently loaded problem instance, it is sufficient to issue the command:
ampl.solve()
Get an AMPL entity in the programming environment (get objective value)¶
AMPL API provides Python representations of the AMPL entities. Usually, not all the entities are of interest for the programmer. The generic procedure is:
Identify the entities that need interaction (either data read or modification)
For each of these entities, get the entity through the AMPL API using one of the following functions:
amplpy.AMPL.getVariable()
,amplpy.AMPL.getConstraint()
,amplpy.AMPL.getObjective()
,amplpy.AMPL.getParameter()
andamplpy.AMPL.getSet()
.
totalcost = ampl.getObjective('Total_Cost')
print("Objective is:", totalcost.get().value())
It can be noted that we access an Objective to interrogate AMPL API about the objective function.
It is a collections of objectives. To access the single instance, the function get() should be used in
case of the objective, which gets the only instance of the objective.
Since objectives are often single instance, the value() function has been implemented in the class amplpy.Objective
.
So, equivalently to the call above, the following call would return the same value, as it gives direct access
to the objective function value:
totalcost.value()
The output of the snippet above is:
Objective is:<PHONE_NUMBER>3955669
The same is true for all other entities.
Modify model data (assign values to parameters)¶
The input data of an optimization model is stored in its parameters; these can be scalar or vectorial entities.
Two ways are provided to change the value of vectorial parameter: change specific values or change all values at
once. The example shows an example of both ways, reassigning the values of the parameter costs firstly specifically,
then altogether. Each time, it then solves the model and get the objective function. The function used to change the
values is overloaded, and is in both cases amplpy.Parameter.setValues()
.
cost = ampl.getParameter('cost')
cost.setValues({'BEEF': 5.01, 'HAM': 4.55})
print("Increased costs of beef and ham.")
ampl.solve();
print("New objective value:", totalcost.value())
The code above assigns the values 5.01 and 4.55 to the parameter cost for the objects beef and ham respectively. If the order of the indexing of an entity is known (i.e. for multiple reassignment), it is not necessary to specify both the index and the value. A collection of values is assigned to each of the parameter values, in the order they are represented in AMPL.
cost.setValues([3, 5, 5, 6, 1, 2, 5.01, 4.55])
print("Updated all costs.")
ampl.solve()
print("New objective value:", totalcost.value())
The statements above produce the following output:
Objective is:<PHONE_NUMBER>3955669
Increased costs of beef and ham.
New objective value:<PHONE_NUMBER>7510653
Updated all costs
New objective value:<PHONE_NUMBER>0000002
Get numeric values from variables¶
To access all the numeric values contained in a Variable or any other entity, use a amplpy.DataFrame
object. Doing so, the data is detached from
the entity, and there is a considerable performance gain. To do so, we first get the Variable object from AMPL, then we get its data with the function amplpy.Entity.getValues()
.
# Get the values of the variable Buy in a dataframe object
buy = ampl.getVariable('Buy')
df = buy.getValues()
# Print them
print(df)
Get arbitrary values via ampl expressions¶
Often we are interested in very specific values coming out of the optimization session. To make use of the power of AMPL expressions and avoiding
cluttering up the environment by creating entities, fetching data through arbitrary AMPL expressions is possible. For this model, we are interested
in knowing how close each decision variable is to its upper bound, in percentage.
We can obtain this data into a dataframe using the function amplpy.AMPL.getData()
with the code :
# Get the values of an expression into a DataFrame object
df2 = ampl.getData("{j in FOOD} 100*Buy[j]/Buy[j].ub")
# Print them
print(df2)
Delete the AMPL object to free the resources¶
It is good practice to make sure that the AMPL object is closed and all its resources released when it is not needed any more. All the internal resources are automatically deallocated by the destructor of the AMPL object, so it is suggested to keep it stored by value.


Make sure to host this project to a live server otherwise your browser will not pick up the worker file.


|
ovs all
|
Data Fields | |
| struct rconn * | rconn |
| enum lswitch_state | state |
| int | max_idle |
| enum ofputil_protocol | protocol |
| unsigned long long int | datapath_id |
| struct mac_learning * | ml |
| struct flow_wildcards | wc |
| bool | action_normal |
| uint32_t | default_queue |
| struct hmap | queue_numbers |
| struct shash | queue_names |
| struct rconn_packet_counter * | queued |
| bool | mute |
| const struct ofputil_flow_mod * | default_flows |
| size_t | n_default_flows |
| enum ofputil_protocol | usable_protocols |
| bool lswitch::action_normal |
| unsigned long long int lswitch::datapath_id |
| const struct ofputil_flow_mod* lswitch::default_flows |
| uint32_t lswitch::default_queue |
| int lswitch::max_idle |
| struct mac_learning* lswitch::ml |
| bool lswitch::mute |
| size_t lswitch::n_default_flows |
| enum ofputil_protocol lswitch::protocol |
| struct shash lswitch::queue_names |
| struct hmap lswitch::queue_numbers |
| struct rconn_packet_counter* lswitch::queued |
| struct rconn* lswitch::rconn |
| enum lswitch_state lswitch::state |
| enum ofputil_protocol lswitch::usable_protocols |
| struct flow_wildcards lswitch::wc |


Data Scientist with 8+ years of experience in high level data analytics for both exploratory and predictive modelings. Found automation opportunities in business environment to reduce its cost by 30%. Able to mine hidden gems located within large sets of different data.
Machine learning is the science of getting computers to act without being explicitly programmed. In the past decade, machine learning has given us self-driving cars, practical speech recognition, effective web search, and a vastly improved understanding of the human genome. Machine learning is so pervasive today that you probably use it dozens of times a day without knowing it. Many researchers also think it is the best way to make progress towards human-level AI.
My work:
Smart Ticket Routing - A Machine Learning model which predicts correct assignment group for the tickets by using their ticket descriptions.
The usecase is that to predict the correct assignment group using machine learning algorithms. So, it is a classification problem. We used Python Scikit-Learn's LinearSVC algorithm for this prediction.
NLP is a way for computers to analyze, understand, and derive meaning from human language in a smart and useful way. By utilizing NLP, developers can organize and structure knowledge to perform tasks such as automatic summarization, translation, named entity recognition, relationship extraction, sentiment analysis, speech recognition, and topic segmentation.
My work:
Entity identification - Identifying the entities like person name, date, phone numbers and so on from the user's query.
The usecase is that to find the user's context and do actions what user's requested.
Python is a great and friendly language to use and learn. It fun, and can be adapted to both small and large projects. Python will cut your development time greatly and overall, its much faster to write Python than other languages.
My work:
Web Application - Using Python Flask Framework - A web microframework written in python.
The usecase is that to create a web application (chatbot from scratch) using web technologies like HTML, CSS, JS, Jquery, AJAX (Client Interaction) and also with Python Flask (Server Interaction).
A chatbot is a service or tool that you can communicate with via text messages. The chatbot understands what you are trying to say and replies with a coherent, relevant message or directly completes the desired task for you.
My work:
FAQ Bot's - A bot which will help users for their questions learned from pre-built knowledge base.
Self-Heal Bot's - A bot which will help users for updating or checking data in database.Mainly data related actions
All these bots are integrated and tested with ticketing tools like ServiceNow, JIRA and BMC Remedy. It has the capability to create tickets if anything is in out of scope.
Text analysis is about parsing texts in order to extract machine-readable facts from them. The purpose of text analysis is to create sets of structured data out of heaps of unstructured, heterogeneous documents.The process can be thought of as slicing and dicing documents into easy-to-manage and integrate data pieces.
My work:
Did N-gram text analysis for different clients to find any automation opportunities from their ticket descriptions.
Normally generates wordcloud graphs and n-gram words to find any patterns and relations in data.
Tools used - IBM Watson Analytics, Custom build application for generating graphs, N-grams and wordclouds
Beyond the human brain. Humans have long sought ways to expand the capabilities of the human brain. By bringing together a variety of artificial intelligence (AI), robotics process automation, and emerging capabilities, cognitive automation enables organizations to emulate and enhance the strength of the human mind.
My work:
Our system will go through automation assessments for finding any automation opportunities in workflows. If any process to automate, using RPA tools, Machine Learning we will automate and reduce the process costs
Mostly happens using basic python scripts like generating text analysis graph PPT's and also doing Volumetric analysis for huge data.
Tools used - Python and enterprise RPA tools.
OpenALPR is an open source Automatic License Plate Recognition library written in C++ with bindings in C#, Java, Node.js, Go, and Python. The library analyzes images and video streams to identify license plates. The output is the text representation of any license plate characters.
My work:
Developed the customized version of opensource OPENALPR, which will recognize vehicle plate number, vehicle color, vehicle make and model year.
Plate infos added in Beanstalk queue are fetched to mysql db. Physical plate images generated from openalpr are added directly to s3 buckets for showing in UI dashboard developed dedicately for tracking purpose.
Increased plate recognition accuracy by retraining OCR and Detector using huge high resolution plate images.
Tools used - Opensource OPENALPR, Python, Mysql Db, S3 bucket.


Homepage
Progress
card-black
The only class to write inside HTML is "card-black" for this card & you can add as many btn or button you want !
btn-blackThe only class to write inside HTML is "card-black" for this card & you can add as many btn or button you want !
btn-black


Copyright 2017 Coinbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under the License. *
Copyright 2017 Coinbase, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *


Amount as a number: {{ctrl.amount | number}}
Total cost as a currency: {{ctrl.totalCost | currency}}
Total cost in GBP: {{ctrl.totalCost | currency:'GBP '}}
Shout: {{ctrl.name | uppercase}}
Whisper: {{ctrl.name | lowercase}}
Start time: {{ctrl.startTime | date:'medium'}}
as JSON: {{ctrl.struct | json}}


TABLE OF CONTENTS
A. GS1 Related B. GS2 Related Polity 1. Government backs varying ages for girls’ marriage 2. SC likely to hear curative pleas against Sec 377 on September 8 International Relations 1. Modi and Xi flag 'forward looking' ties after the close of the Doklam crisis 2. PM's '10 Noble Commitments' for BRICS members to achieve global transformation 3. PM Modi reaches Myanmar for first bilateral visit, to meet Suu Kyi tomorrow 4. ‘Undersea line from Iran to port cheap gas’ C. GS3 Related Economics 1. Policy soon to develop agri-clusters and boost farm exports: Prabhu 2. RBI includes HDFC Bank in the ‘too big to fail’ list 3. India to flag worry on pace of services talks at RCEP D. GS4 Related E. Prelims Fact F. UPSC Prelims Practice Questions G. UPSC Mains Practice Questions
Nothing here for Today!!!
1. Government backs varying ages for girls’ marriage
In news:
- NGO’s (Independent thought), petition before Supreme Court:
- Challenged Exception 2 to Section 375 (rape) of the Indian Penal Code, which permits “sexual intercourse with a girl child aged between 15 and 18 only on the ground that she is married”.
- The statutory exception to rape was violative of right to life, personal liberty, equality and is discriminatory.
- The Exception is part of the Criminal Law (Amendment) Act of 2013 and is contrary to the anti-child sex abuse law, Protection of Children from Sexual Offences Act of 2012 (POCSO).
- Supreme court’s question to government:
- What is the logic behind keeping different minimum ages for marriage under different laws?
- Basis Information: The age of consent varies from the Indian Penal Code to the Prohibition of Child Marriage Act to the Hindu Marriage Act
- Government response: The legislature may have taken a conscious decision to retain the minimum age range for marriage between 15 and 18 for girls considering the socio-economic conditions of the country.
Basic Information
Section 375 in The Indian Penal Code
375.Rape.—A man is said to commit “rape” who, except in the case hereinafter excepted, has sexual intercourse with a woman under circumstances falling under any of the six following de-scriptions:—
(First) — Against her will.
(Secondly) —Without her consent.
(Thirdly) — With her consent, when her consent has been obtained by putting her or any person in whom she is interested in fear of death or of hurt.

(Fifthly) — With her consent, when, at the time of giving such consent, by reason of unsoundness of mind or intoxication or the administration by him personally or through another of any stupefying or unwholesome substance, she is unable to understand the nature and consequences of that to which she gives consent.
(Sixthly) — With or without her consent, when she is under sixteen years of age. Explanation.—Penetration is sufficient to constitute the sexual intercourse necessary to the offence of rape.
(Exception) —Sexual intercourse by a man with his wife, the wife not being under fifteen years of age, is not rape.]
2. SC likely to hear curative pleas against Sec 377 on September 8
Context:
- Section 377 of the Indian Penal Code: a colonial era provision criminalising consensual sexual acts of Lesbian, Gay, Bisexual and Transgender (LGBT) adults in private.
- The Supreme Court is likely to hear curative petitions against Section 377.
- The fight against Section 377 got a major boost when a nine-judge Bench of the Supreme Court, while upholding the right to privacy as a fundamental right intrinsic to life and liberty, ripped apart a 2014 judgment dismissing the case against Section 377 of the Indian Penal Code, which criminalises consensual sexual acts of adults in private.
What is section 377?
- Section 377. Unnatural offences: Whoever voluntarily has carnal intercourse against the order of nature with any man, woman or animal shall be punished with imprisonment for life, or with imprisonment of either description for term which may extend to ten years, and shall also be liable to fine.
 The verdict resulted in the decriminalization of homosexual acts involving consenting adults, in the jurisdiction of the Delhi High court. This was later challenged in the Supreme Court of India.
- Suresh Kumar Koushal (2013) Case Observations:
- Supreme Court has upheld the validity of Section 377 of Indian Penal Code.
- LGBT “minuscule minority”: no need to challenge Section 377 because the LGBT community constitutes only a minuscule minority.
- National Legal Services Authority (2014) Case observations:
- Transgenders, even though insignificant in numbers, are entitled to human rights.
- Section 377 had been an instrument of harassment and abuse.
- Discrimination based on sexual orientation and gender identity must end. Sexual orientation is not only a freedom flowing from the right to privacy, but also a demanding of non-discriminatory treatment
- Adoption of the Yogyakarta Principles — norms on gender identity and sexual orientation adopted by human rights experts in 2006 in Indonesia.
- Latest: In the Aadhaar case the Supreme Court Observations are as follows:
- It has upheld the right to privacy as a fundamental right and an inherent component of human liberty and dignity.
- The nine-judge Bench has observed that the rationale behind the Koushal judgment is flawed and unsustainable.
- Rights of LGBT persons are real rights founded on sound constitutional doctrine and not “so-called rights” as the earlier Bench had described.
- Sexual orientation is an aspect of the right to privacy and an inalienable part of human dignity, freedom, and personal liberty.
Basic Information
Curative petition:
- The concept of Curative petition was evolved by the Supreme Court of India in the matter of Rupa Ashok Hurra vs. Ashok Hurra and Anr. (2002) where the question was whether an aggrieved person is entitled to any relief against the final judgement/order of the Supreme Court, after dismissal of a review petition.
- The Supreme Court in the said case held that in order to prevent abuse of its process and to cure gross miscarriage of justice, it may reconsider its judgements in exercise of its inherent powers.
- For this purpose the Court has devised what has been termed as a “curative” petition. In the Curative petition, the petitioner is required to aver specifically that the grounds mentioned therein had been taken in the review petition filed earlier and that it was dismissed by circulation. This has to be certified by a senior advocate. The Curative petition is then circulated to the three senior most judges and the judges who delivered the impugned judgement, if available. No time limit is given for filing Curative petition.
Requirements:
To entertain the curative petitions, the court has laid down certain specific condition:
- The petitioner will have to establish that there was a genuine violation of principles of natural justice and fear of the bias of the judge and judgement that adversely affected him.
- The petition shall state specifically that the grounds mentioned had been taken in the review petition and that it was dismissed by circulation.
- The curative petition must accompany certification by a senior lawyer relating to the fulfillment of the above requirements.
- The petition is to be sent to the three senior most judges and judges of the bench who passed the judgement affecting the petition, if available.
- If the majority of the judges on the above bench agree that the matter needs hearing, then it would be sent to the same bench (as far as possible).
- The court could impose “exemplary costs” to the petitioner if his plea lacks merit.
Category: INTERNATIONAL RELATIONS
1. Modi and Xi flag ‘forward looking’ ties after the close of the Doklam crisis
Context:
- 9th BRICS summit
- Venue: Xiamen , China
- India – China bilateral talks.
In news:
Highlights of the discussions held between Indian Prime Minister Narendra Modi and Chinese President Xi Jinping on the sidelines of BRICS summit:
- India and China decided to open a new “forward looking” round of engagement, anchored by fresh mechanisms to ensure calm at the borders.
- Main focus: more on border Confidence Building Measures (CBMs), rather than on fresh ideas to resolve the festering boundary dispute between the two countries.
- Two leaders agreed that efforts should be made to ensure that “defence and security (personnel) must maintain strong contact and cooperation” at the borders.
Basic Information
BRICS:
- BRICS is the acronym for an association of five major emerging national economies: Brazil, Russia, India, China and South Africa.
- Originally the first four were grouped as “BRIC” (or “the BRICs”), before the induction of South Africa in 2010.
- The BRICS members are all leading developing or newly industrialized countries, but they are distinguished by their large, sometimes fast-growing economies and significant influence on regional affairs; all five are G-20 members.
- The term does not include countries such as South Korea, Mexico and Turkey for which other acronyms and group associations were later created.
Financial structure: Currently, there are two components that make up the financial architecture of BRICS, namely, the New Development Bank (NDB) and the Contingent Reserve Arrangement (CRA). Both of these components were signed into treaty in 2014 and became active in 2015.
a) New Development Bank:
- The New Development Bank (NDB) is based in Shanghai.
- The New Development Bank (NDB), formerly referred to as the BRICS Development Bank, is a multilateral development bank operated by the BRICS states.
- The bank’s primary focus of lending will be infrastructure projects with authorized lending of up to $34 billion annually.
- South Africa will be the African Headquarters of the Bank named the “New Development Bank Africa Regional Centre”.
- The bank will have starting capital of $50 billion, with capital increased to $100 billion over time.
- Brazil, Russia, India, China and South Africa will initially contribute $10 billion each to bring the total to $50 billion.
b) BRICS CRA:
- The BRICS Contingent Reserve Arrangement (CRA) is a framework for providing protection against global liquidity pressures.
- This includes currency issues where members’ national currencies are being adversely affected by global financial pressures.
- It is found that emerging economies that experienced rapid economic liberalization went through increased economic volatility, bringing uncertain macroeconomic environment.
- The CRA is generally seen as a competitor to the International Monetary Fund (IMF) and along with the New Development Bank is viewed as an example of increasing South-South cooperation.
- It was established in 2015 by the BRICS countries Brazil, Russia, India, China and South Africa.
- The legal basis is formed by the Treaty for the Establishment of a BRICS Contingent Reserve Arrangement, signed at Fortaleza, Brazil on 15 July 2014.
2. PM’s ’10 Noble Commitments’ for BRICS members to achieve global transformation
In news:
Prime Minister Narendra Modi suggested 10 commitments to be made by the five-member bloc for their role in global transformation. These are as follows:
- Creating a Safer World – By organised and coordinated action on three issues: Counter-terrorism, Cyber-security and Disaster Management
- Creating a Greener World – By taking concerted action on countering climate change through initiatives such as the International Solar Alliance
- Creating an Enabled World – By sharing and deploying suitable technologies to enhance efficiency, economy and effectiveness
- Creating an Inclusive World – By economic mainstreaming of our people including in the banking and financial system
- Creating a Digital World – By bridging the digital divide within and outside our economies
- Creating a Skilled World – By giving future-ready shills to millions of our youth
- Creating a Healthier World – By cooperating in research and development to eradicate diseases, and enabling affordable healthcare for all
- Creating an Equitable World – By providing equaity of opportunity to all, particularly through gender equality
- Creating a Connected World – By enabling free flow of goods, people and services
- Creating a Harmonious World – by promoting ideologies, practices and heritage that are centred on peaceful coexistence and living in harmony with nature
3. PM Modi reaches Myanmar for first bilateral visit, to meet Suu Kyi tomorrow
Context:
- Prime Minister Narendra Modi’s visit to Myanamar.
In news:
- First bilateral visit to Myanmar.
- Aim: to chart out a roadmap for closer cooperation between the two countries in areas like security and counter-terrorism, trade and investment, infrastructure and energy, and culture.
- Key fact:
- Strategic importance: Myanmar shares a 1,640-km-long border with a number of northeastern states.
4. ‘Undersea line from Iran to port cheap gas’
In news:
Iran-India gas pipeline study:
- A 1,300-km undersea pipeline from Iran, avoiding Pakistani waters, can bring natural gas from the Persian Gulf to India at rates less than the price of LNG available in the spot market.
- Cheaper fuel: Natural gas imported through the more than $4-billion pipeline would cost $5-5.50 per million British thermal unit at the Indian coast, cheaper than the rate at which some of the domestic fields supply gas.
- Cheaper than the ones which are shipped: Liquefied natural gas, or LNG, imported through ships costs about $7.50 per million British thermal unit.
- The cost of landed gas through an undersea pipeline will be at least $2 cheaper than importing LNG, saving about $1 billion annually.
- The pipeline is planned to carry 31.5 million standard cubic meters gas per day. The pipeline can first travel to Oman, and then onwards to Porbandar in the state of Gujarat.
- Iran-Pakistan-India pipeline:
- The subsea pipeline is being seen as an alternative to the on-land, Iran-Pakistan-India pipeline
- New Delhi has not been participating in talks on the 1,036-km Iran-Pakistan-India gas pipeline since 2007 citing security and commercial concerns. But, it has never officially pulled out of the $7.6 billion project.
1. Policy soon to develop agri-clusters and boost farm exports: Prabhu
In news:
- New policy on the anvil: The government will soon bring out a policy to develop agricultural clusters and boost farm exports.
Basic Information
ICFA (Indian Council of Food and Agriculture):
- ICFA is a national level platform in India with a mandate for policy research, advocacy and enterprise development in food and agriculture sector.
- Besides, ICFA is engaged in business and trade facilitation, farm services and providing a platform for global partnerships.
- ICFA emerged out of the long felt need for a comprehensive approach to address issues in food and agriculture sector and tapping of emerging global business opportunities overcoming compartmentalized approach and absence of coordination and dialogue among various stake-holders.
- Currently in India, various stakeholders in the food and agriculture sector like the national and state governments, policy makers, research and academic bodies, extension agencies, value addition industry, NGOs, financial bodies, developmental institutions and farmers groups think in silos, often with contradictory approaches for the same ultimate cause.
- ICFA aims to foster convergence and greater communication between different stakeholders and work towards bringing India aggressively into the loop of global trade and commerce.
- Headquartered in New Delhi, India, ICFA has drawn in the vast experience and expertise of a number of professionals cutting across various subsectors in the food and agriculture sector and has constituted a number of working groups and national councils to represent the interests of various stakeholders. It has also incorporated several state specific working groups.
2. RBI includes HDFC Bank in the ‘too big to fail’ list
In news:
- RBI has added HDFC Bank, the second largest private sector lender of the country – in the list of Domestic Systemically Important Banks (D-SIBs).
- State Bank of India and ICICI Bank continue to be in that category.
Basic Information
Domestic Systemically Important Banks (D-SIBs)
- Following the global financial crisis of 2008, it was observed that problems faced by certain large and highly interconnected financial institutions hampered the orderly functioning of the financial system, which in turn, negatively impacted the real economy.
- It was decided to identify such institutions and prescribe them higher capital requirements.
- The RBI has adopted a system by which banks are plotted into four buckets based on a lender’s systemic importance scores in ascending order.
- The banking regulator prescribes higher capital requirements — in terms of additional Common Equity Tier 1 (CET 1) capital — for such entities.
- RBI had started listing D-SIBs from August 2015. SBI and ICICI Bank were identified as D-SIB both in 2015 and 2016.
3. India to flag worry on pace of services talks at RCEP
Regional Comprehensive Economic Partnership (RCEP):
- Proposed Free Trade Agreement (FTA) involving 16 Asia-Pacific nations.
- 10-member ASEAN bloc (Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, Philippines. Singapore, Thailand, Vietnam) and its six FTA partners including India, China, Japan, South Korea, Australia and New Zealand.
- RCEP ‘Guiding Principles and Objectives’: negotiations on trade in goods, trade in services, investment and other areas will be conducted in parallel to ensure a comprehensive and balanced outcome.
- India to raise the following issues at the forth-coming ministerial-level meeting:
- Slow pace of negotiations on services trade liberalization as opposed to ‘higher priority’ being accorded to commitments to open up goods trade in the region.
- No much progress: issues such as Intellectual Property Rights and investment liberalization.
‘RCEP Travel Card’: Idea mooted by India
- India is seeking support for its proposal on an ‘RCEP Travel Card’
- India is relatively strong in services with its vast pool of professionals including from sectors such as Information Technology, as well as in activities such as installation, trouble shooting, training, maintenance, investment management.
- Issues raised by other members: easing norms on temporary movement of people could lead to immigration of professionals from India and in turn loss of jobs for locals.
Basic Information
Free Trade Agreement: A free-trade area is the region encompassing a trade bloc whose member countries have signed a free-trade agreement (FTA). Such agreements involve cooperation between at least two countries to reduce trade barriers – import quotas and tariffs – and to increase trade of goods and services with each other.
The degree of economic integration can be categorized into seven stages:
- Preferential trading area
- Free trade area
- Customs union
- Common market
- Economic union
- Economic and monetary union
- Complete economic integration
Nothing here for Today!!!
Nothing here for Today!!!
F. Practice Questions for UPSC Prelims Exam
Question 1. Shanghai cooperation organization (SCO) is headquartered in which city?
- Shanghai
- Beijing
- Xinxiang
- Kabul
See
Question 2. Identify the correct statement.
- Raja Ampat is known for one of the world’s most biodiverse marine habitats.
- Raja Ampat lies in eastern part of Indonesian group of archipelago.
Choose the correct statement.
- Only 1
- Only 2
- Both 1 and 2
- Neither 1 nor 2
See
Question 3. Identify the correct statement with reference to Latent TB?
- Drug resistant TB is known as Latent TB.
- Latent TB is a bacteria which is there in all of us, but it is our body’s immunity that converts the latent bacteria active.
- Recently announced National Strategic Plan focuses on Latent TB eradication.
- Both b and c
Question 4. Eczema and Callosities diseases associated with _______.
- Skin
- Lung
- Muscle tissues
- Bone
Question 5. ‘Larson C’ ice shelf has been in the news in recent times for which one of
the following reasons?
- A huge iceberg, expected to be one of the largest ever recorded, is poised to break off from this ice shelf that is located in Antarctica.
- It is one of the largest proven oil deposits beneath it in the Arctic.
- It is being subject to a man-made breakup (collapse) by Russia so as to open up the Northern Sea Route all year, making it a commercially viable route.
- None of the above
G. UPSC Mains Practice Questions
GS Paper II
- It is argued that the concept of marital rape is not suitable in the Indian context due to illiteracy, poverty, social customs, values, religious beliefs, and other factors. Do you agree with this view? Comment.
- “Sections 377 reflect prominent way in which the British left their stamp upon India’s criminal law, in a manner that is entirely inconsistent with a democratic, constitutional republic.” Analyze.
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


| title | color | order | courses | #segments | #parents | #children | #dependencies |
|---|---|---|---|---|---|---|---|
| {{concept.title}} | {{concept.order}} | {{concept.courses}} | {{concept.segments.length}} | {{concept.parents.length}} | {{concept.children.length}} | {{concept.dependencies.length}} |
| title | color | order | courses | #segments | #parents | #children | #dependencies |
|---|---|---|---|---|---|---|---|
| {{concept.title}} | {{concept.order}} | {{concept.courses}} | {{concept.segments.length}} | {{concept.parents.length}} | {{concept.children.length}} | {{concept.dependencies.length}} |


Following the introduction of the
Common inspection framework
in September 2015 and a more general shift in Ofsted’s practice away from publishing a large amount of guidance for inspectors, this document has been replaced by an internal use only template.
If you use assistive technology (such as a screen reader) and need a
version of this document in a more accessible format, please email
<EMAIL_ADDRESS>.
Please tell us what format you need. It will help us if you say what assistive technology you use.
Details
This document provides technical guidance for inspectors on how to manipulate the section 5 inspection report template giving details of how to delete unwanted rows, removing highlighting and adding Ofsted house style bullet points.
Before drafting the report the lead inspector must ensure that Part 2 of the
School inspections handbook
has been read and also the Subsidiary guidance. They must also take account of the specific guidance provided in this document and in the
Guide to Ofsted’s house style
.


Contents:
Playing the Game
Hello, World
Awk's Programming Model
Pattern Matching
Records and Fields
Expressions
System Variables
Relational and Boolean Operators
Formatted Printing
Passing Parameters Into a Script
Information Retrieval
As mentioned in the preface, this book describes POSIX awk; that is, the awk language as specified by the POSIX standard. Before diving into the details, we'll provide a bit of history.
The original awk was a nice little language. It first saw the light of day with Version 7 UNIX, around 1978. It caught on, and people used it for significant programming.
In 1985, the original authors, seeing that awk was being used for more serious programming than they had ever intended, decided to beef up the language. (See Chapter 11, A Flock of awks, for a description of the original awk, and all the things it did not have when compared to the new one.) The new version was finally released to the world at large in 1987, and it is this version that is still found on SunOS 4.1.x systems.
In 1989, for System V Release 4, awk was updated in some minor ways.[1] This version became the basis for the awk feature list in the POSIX standard. POSIX clarified a number of things about awk, and added the CONVFMT variable (to be discussed later in this chapter).
[1] The -v option and tolower() and toupper() functions were added, and srand() and printf were cleaned up. The details will be presented in this and the following chapters.
As you read the rest of this book, bear in mind that the term awk refers to POSIX awk, and not to any particular implementation, whether the original one from Bell Labs, or any of the others discussed in Chapter 11. However, in the few cases where different versions have fundamental differences of behavior, that will be pointed out in the main body of the discussion.
To write an awk script, you must become familiar with the rules of the game. The rules can be stated plainly and you will find them described in Appendix B, Quick Reference for awk, rather than in this chapter. The goal of this chapter is not to describe the rules but to show you how to play the game. In this way, you will become acquainted with many of the features of the language and see examples that illustrate how scripts actually work. Some people prefer to begin by reading the rules, which is roughly equivalent to learning to use a program from its manual page or learning to speak a language by scanning its rules of grammar - not an easy task. Having a good grasp of the rules, however, is essential once you begin to use awk regularly. But the more you use awk, the faster the rules of the game become second nature. You learn them through trial and error - spending a long time trying to fix a silly syntax error such as a missing space or brace has a magical effect upon long-term memory. Thus, the best way to learn to write scripts is to begin writing them. As you make progress writing scripts, you will no doubt benefit from reading the rules (and rereading them) in Appendix B or the awk manpage or The AWK Programming Language book. You can do that later - let's get started now.


Improve this Doc
A Range is a control that lets users select from a range of values by moving a slider knob along the slider bar or track.
_For more information, Check out the [API docs](../api/components/range/Range)._
Basic Usage
Demo
Demo Source
```html
```


This handles serving up responsive media for the site.
Allows a browser to register its current resolution/breakpoint with the session. This is then used by view as a default when serving images.
Expected parameters
- :size
-
the current CSS breakpoint being used.
Source: show
# File app/controllers/media_controller.rb, line 12 def ping head :no_content and return # 1. update the session session[:resolution] = params[:size] # 2. send a nocache header response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" response.headers["Pragma"] = "no-cache" response.headers["Expires"] = "Fri, 01 Jan 1970 00:00:00 GMT" # 3. and empty content head :no_content end
Serves up an appropriately-sized version of the requested Media item.
By default, this will attempt to read the last breakpoint sent to ping. If there is no stored breakpoint, it will default to mobile view (or desktop in older IEs). Alternatively, you can specify a specific resolution to return as a GET parameter.
Expected parameters
- :id
-
the ID of the Media item to return
- :resolution
-
the resolution to return, if you wish to override the last stored resolution (optional)
Source: show
# File app/controllers/media_controller.rb, line 37 def view # 1. grab media begin @media = Media.find params[:id] rescue not_found and return end # 2. work out which size to use if params.key?('size') # accessing from parameter size = params[:size] elsif session[:resolution].present? # using size in session from previous ping size = session[:resolution] else # fallback to mobile: we'll let JS flange with it a little ;) # ... unless we're in IE8, in which case... blah! size = request.env['HTTP_USER_AGENT'] =~ /MSIE (6|7|8)/ ? 'desktop' : 'mobile' end # 3. check we have the correct path path = @media.file.path(size.to_sym) logger.debug path unless File.exist?(path) not_found and return end # 4. return send_data(File.open(path, 'rb').read, :type => @media.file.content_type, :disposition => 'inline') end


Xlsxir v1.5.1 Xlsxir.SaxParser
Provides SAX (Simple API for XML) parsing functionality of the .xlsx
file via the Erlsom Erlang library. SAX (Simple API for XML) is an event-driven
parsing algorithm for parsing large XML files in chunks, preventing the need to load the entire DOM into memory. Current chunk size is set to 10,000.
Summary
Functions
Parses xl/worksheets/sheet#{n}.xml
at index n
, xl/styles.xml
and xl/sharedStrings.xml
using SAX parsing. An Erlang Term Storage (ETS) process is started to hold the state of data
parsed. Name of ETS process modules that hold data for the aforementioned XML files are Worksheet
, Style
and SharedString
respectively. The style and sharedstring XML files (if they
exist) must be parsed first in order for the worksheet parser to sucessfully complete
Functions
Parses xl/worksheets/sheet#{n}.xml
at index n
, xl/styles.xml
and xl/sharedStrings.xml
using SAX parsing. An Erlang Term Storage (ETS) process is started to hold the state of data
parsed. Name of ETS process modules that hold data for the aforementioned XML files are Worksheet
, Style
and SharedString
respectively. The style and sharedstring XML files (if they
exist) must be parsed first in order for the worksheet parser to sucessfully complete.
Parameters
path
- path of XML file to be parsed instring
formattype
- file type identifier (:worksheet, :style or :string) of XML file to be parsedmax_rows
- the maximum number of rows in this worksheet that should be parsed
Example
An example file named test.xlsx
located in ./test/test_data
containing the following in worksheet at index 0
:
- cell ‘A1’ -> “string one”
- cell ‘B1’ -> “string two”
- cell ‘C1’ -> integer of 10
- cell ‘D1’ -> formula of
=4*5
cell ‘E1’ -> date of 1/1/2016 or Excel date serial of 42370 The
.xlsx
file contents have been extracted to./test/test_data/test
. For purposes of this example, we utilize theget_at/1
function of each ETS process module to pull a sample of the parsed data. Keep in mind that the worksheet data is stored in the ETS process as a list of row lists, so theXlsxir.Worksheet.get_at/1
function will return a full row of values.iex> Xlsxir.SaxParser.parse(“./test/test_data/test/xl/styles.xml”, :style) :ok iex> Xlsxir.Style.get_at(0) nil iex> Xlsxir.SaxParser.parse(“./test/test_data/test/xl/sharedStrings.xml”, :string) :ok iex> Xlsxir.SharedString.get_at(0) “string one” iex> Xlsxir.SaxParser.parse(“./test/test_data/test/xl/worksheets/sheet1.xml”, :worksheet) :ok iex> Xlsxir.Worksheet.get_at(1) [[“A1”, “string one”], [“B1”, “string two”], [“C1”, 10], [“D1”, 20], [“E1”, {2016, 1, 1}]] iex> Xlsxir.Worksheet.delete true


math::geometry - Geometrical computations
The math::geometry package is a collection of functions for computations and manipulations on two-dimensional geometrical objects, such as points, lines and polygons.
The geometrical objects are implemented as plain lists of coordinates. For instance a line is defined by a list of four numbers, the x- and y-coordinate of a first point and the x- and y-coordinates of a second point on the line.
Note: In version 1.4.0 an inconsistency was repaired - see https://core.tcl-lang.org/tcllib/tktview?name=fb4812f82b. More in COORDINATE SYSTEM
The various types of object are recognised by the number of coordinate pairs and the context in which they are used: a list of four elements can be regarded as an infinite line, a finite line segment but also as a polyline of one segment and a point set of two points.
Currently the following types of objects are distinguished:
point - a list of two coordinates representing the x- and y-coordinates respectively.
line - a list of four coordinates, interpreted as the x- and y-coordinates of two distinct points on the line.
line segment - a list of four coordinates, interpreted as the x- and y-coordinates of the first and the last points on the line segment.
polyline - a list of an even number of coordinates, interpreted as the x- and y-coordinates of an ordered set of points.
polygon - like a polyline, but the implicit assumption is that the polyline is closed (if the first and last points do not coincide, the missing segment is automatically added).
point set - again a list of an even number of coordinates, but the points are regarded without any ordering.
circle - a list of three numbers, the first two are the coordinates of the centre and the third is the radius.
The package defines the following public procedures:
Compute the sum of the two vectors given as points and return it. The result is a vector as well.
Compute the difference (point1 - point2) of the two vectors given as points and return it. The result is a vector as well.
Construct a point from its coordinates and return it as the result of the command.
Compute the distance between the two points and return it as the result of the command. This is in essence the same as
math::geometry::length [math::geomtry::- point1 point2]
Compute the length of the vector and return it as the result of the command.
Scale the vector by the factor and return it as the result of the command. This is a vector as well.
Given the angle in degrees this command computes and returns the unit vector pointing into this direction. The vector for angle == 0 points to the right (east), and for angle == 90 up (north).
Returns a horizontal vector on the X-axis of the specified length. Positive lengths point to the right (east).
Returns a vertical vector on the Y-axis of the specified length. Positive lengths point down (south).
Compute the point which is at relative distance s between the two points and return it as the result of the command. A relative distance of 0 returns point1, the distance 1 returns point2. Distances < 0 or > 1 extrapolate along the line between the two point.
Compute the octant of the circle the point is in and return it as the result of the command. The possible results are
east
northeast
north
northwest
west
southwest
south
southeast
Each octant is the arc of the circle +/- 22.5 degrees from the cardinal direction the octant is named for.
Construct a rectangle from its northwest and southeast corners and return it as the result of the command.
Extract the northwest and southeast corners of the rectangle and return them as the result of the command (a 2-element list containing the points, in the named order).
Calculate the angle from the positive x-axis to a given line (in two dimensions only).
Coordinates of the line
Calculate the angle between two vectors (in degrees)
First vector
Second vector
Calculate the inner product of two vectors
First vector
Second vector
Calculate the area of the parallellogram with the two vectors as its sides
First vector
Second vector
Calculate the distance of point P to the (infinite) line and return the result
List of two numbers, the coordinates of the point
List of four numbers, the coordinates of two points on the line
Calculate the distance of point P to the (finite) line segment and return the result.
List of two numbers, the coordinates of the point
List of four numbers, the coordinates of the first and last points of the line segment
Calculate the distance of point P to the polyline and return the result. Note that a polyline needs not to be closed.
List of two numbers, the coordinates of the point
List of numbers, the coordinates of the vertices of the polyline
Calculate the distance of point P to the polygon and return the result. If the list of coordinates is not closed (first and last points differ), it is automatically closed.
List of two numbers, the coordinates of the point
List of numbers, the coordinates of the vertices of the polygon
Return the point on a line which is closest to a given point.
List of two numbers, the coordinates of the point
List of four numbers, the coordinates of two points on the line
Return the point on a line segment which is closest to a given point.
List of two numbers, the coordinates of the point
List of four numbers, the first and last points on the line segment
Return the point on a polyline which is closest to a given point.
List of two numbers, the coordinates of the point
List of numbers, the vertices of the polyline
Return the length of the polyline (note: it not regarded as a polygon)
List of numbers, the vertices of the polyline
Move a point over a given distance in a given direction and return the new coordinates (in two dimensions only).
Coordinates of the point to be moved
Direction (in degrees; 0 is to the right, 90 upwards)
Distance over which to move the point
Check if two line segments intersect or coincide. Returns 1 if that is the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on the other segment (or is very close to the segment), they are considered to intersect
First line segment
Second line segment
Find the intersection point of two line segments. Return the coordinates or the keywords "coincident" or "none" if the line segments coincide or have no points in common (in two dimensions only).
First line segment
Second line segment
Find the intersection point of two (infinite) lines. Return the coordinates or the keywords "coincident" or "none" if the lines coincide or have no points in common (in two dimensions only).
First line
Second line
See section References for details on the algorithm and math behind it.
Check if two polylines intersect or not (in two dimensions only).
First polyline
Second polyline
Check whether two polylines intersect, but reduce the correctness of the result to the given granularity. Use this for faster, but weaker, intersection checking.
How it works:
Each polyline is split into a number of smaller polylines, consisting of granularity points each. If a pair of those smaller lines' bounding boxes intersect, then this procedure returns 1, otherwise it returns 0.
First polyline
Second polyline
Number of points in each part (<=1 means check every edge)
Check if two intervals overlap.
Begin and end of first interval
Begin and end of second interval
Check for strict or non-strict overlap
Check if two rectangles overlap.
upper-left corner of the first rectangle
lower-right corner of the first rectangle
upper-left corner of the second rectangle
lower-right corner of the second rectangle
choosing strict or non-strict interpretation
Calculate the bounding box of a polyline. Returns a list of four coordinates: the upper-left and the lower-right corner of the box.
The polyline to be examined
Check if the bounding boxes of two polylines overlap or not.
Arguments:
The first polyline
The second polyline
Whether strict overlap is to checked (1) or if the bounding boxes may touch (0, default)
Check if the point is inside or on the bounding box or not. Arguments:
The bounding box given as a list of x/y coordinates
The point to be checked
Return the third point of the rectangular triangle defined by the two given end points of the hypothenusa. The triangle's side from point A (or B, if the location is given as "b") to the third point is the cathetus length. If the cathetus' length is lower than the length of the hypothenusa, an empty list is returned.
Arguments:
The starting point on hypotenuse
The ending point on hypotenuse
The length of the cathetus of the triangle
The location of the given cathetus, "a" means given cathetus shares point pa (default) "b" means given cathetus shares point pb
Return a line parallel to the given line, with a distance "offset". The orientation is determined by the two points defining the line.
Arguments:
The given line
The distance to the given line
Orientation of the new line with respect to the given line (defaults to "right")
Return a unit vector from the given line or direction, if the line argument is a single point (then a line through the origin is assumed) Arguments:
The line in question (or a single point, implying a line through the origin)
Determine if a point is completely inside a polygon. If the point touches the polygon, then the point is not completely inside the polygon.
Coordinates of the point
The polyline to be examined
Determine if a point is completely inside a polygon. If the point touches the polygon, then the point is not completely inside the polygon. Note: this alternative procedure uses the so-called winding number to determine this. It handles self-intersecting polygons in a "natural" way.
Coordinates of the point
The polyline to be examined
Determine if a rectangle is completely inside a polygon. If polygon touches the rectangle, then the rectangle is not complete inside the polygon.
Upper-left corner of the rectangle
Lower-right corner of the rectangle
The polygon in question
Calculate the area of a polygon.
The polygon in question
Translate a polyline over a given vector
Translation vector
The polyline to be translated
Rotate a polyline over a given angle (degrees) around the origin
Angle over which to rotate the polyline (degrees)
The polyline to be rotated
Rotate a polyline around a given point p and return the new polyline.
Arguments:
The point of rotation
The angle over which to rotate the polyline (degrees)
The polyline to be rotated
Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis
Angle of the line of reflection (degrees)
The polyline to be reflected
Convert from degrees to radians
Angle in degrees
Convert from radians to degrees
Angle in radians
Convenience procedure to create a circle from a point and a radius.
Coordinates of the circle centre
Radius of the circle
Convenience procedure to create a circle from two points on its circumference The centre is the point between the two given points, the radius is half the distance between them.
First point
Second point
Determine if the given point is inside the circle or on the circumference (1) or outside (0).
Point to be checked
Circle that may or may not contain the point
Determine if the given line intersects the circle or touches it (1) or does not (0).
Line to be checked
Circle that may or may not be intersected
Determine if the given line segment intersects the circle or touches it (1) or does not (0).
Line segment to be checked
Circle that may or may not be intersected
Determine the points at which the given line intersects the circle. There can be zero, one or two points. (If the line touches the circle or is close to it, then one point is returned. An arbitrary margin of 1.0e-10 times the radius is used to determine this situation.)
Line to be checked
Circle that may or may not be intersected
Determine the points at which the given two circles intersect. There can be zero, one or two points. (If the two circles touch the circle or are very close, then one point is returned. An arbitrary margin of 1.0e-10 times the mean of the radii of the two circles is used to determine this situation.)
First circle
Second circle
Determine the tangent lines from the given point to the circle. There can be zero, one or two lines. (If the point is on the cirucmference or very close to the circle, then one line is returned. An arbitrary margin of 1.0e-10 times the radius of the circle is used to determine this situation.)
Point in question
Circle to which the tangent lines are to be determined
Return the first point or all points where the two polylines intersect. If the number of points in the polylines is large, you can use the granularity to get an approximate answer faster.
Arguments:
The first polyline
The second polyline
Whether to return only the first (default) or to return all intersection points ("all")
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
Return the first point or all points where the polyline intersects the circle. If the number of points in the polyline is large, you can use the granularity to get an approximate answer faster.
Arguments:
The polyline that may intersect the circle
The circle in question
Whether to return only the first (default) or to return all intersection points ("all")
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
Return the part of the first polyline from the origin up to the first intersection with the second. If the number of points in the polyline is large, you can use the granularity to get an approximate answer faster.
Arguments:
The first polyline (from which a part is to be returned)
The second polyline
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
Return the part of the first polyline from the last intersection point with the second to the end. If the number of points in the polyline is large, you can use the granularity to get an approximate answer faster.
Arguments:
The first polyline (from which a part is to be returned)
The second polyline
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
Split the poyline into a set of polylines where each separate polyline holds "numberVertex" vertices between the two end points.
Arguments:
The polyline to be split up
The number of "internal" vertices
Split up each segment of a polyline into a number of smaller segments and return the result.
Arguments:
The polyline to be refined
The number of subsegments to be created
Remove duplicate neighbouring vertices and return the result.
Arguments:
The polyline to be cleaned up
The coordinate system used by the package is the ordinary cartesian system, where the positive x-axis is directed to the right and the positive y-axis is directed upwards. Angles and directions are defined with respect to the positive x-axis in a counter-clockwise direction, so that an angle of 90 degrees is the direction of the positive y-axis. Note that the Tk canvas coordinates differ from this, as there the origin is located in the upper left corner of the window. Up to and including version 1.3, the direction and octant procedures of this package used this convention inconsistently.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: geometry of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
Mathematics
Copyright © 2001 by Ideogramic ApS and other parties
Copyright © 2010 by Andreas Kupries
Copyright © 2010 by Kevin Kenny
Copyright © 2018 by Arjen Markus
Copyright © 2020 by Manfred Rosenberger


iPhone Watch IPhone Mac
Apple recently announced the iPhone 7 and it is causing headlines!You have been randomly selected to review the up and coming iPhone 7 256Gb!
Copyright © Apple - Mobile App


Issue 5042
: Command Line should not prevent tabbing out when empty
Steps to reproduce
Open Firebug
Enable and switch to the
Console
panel
Focus the Command Line
Press
Tab
Expected result
Command Line should not be focused anymore


Converter: Binance Buy Crypto History to Accointing
Since Binance does not expose the
Buy Crypto transactions via API, these
need to be exported and converted manually.
This tool assists in converting Export Buy
History.xlsx to
Accointing_template.xlsx
Instructions
Open https://www.binance.com/en/my/wallet/exchange/buysell-history ,
click Export Buy History and follow the instructions to download Export Buy
History.xlsx .
Open Export Buy History.xlsx in Word, Open Office or the like.
Select and copy the contents to clipboard (Ctrl+C ).
Paste it in the text area below the instruction.
Click the CONVERT Button. The converted table will be appended to the second text area.
Manually verify the conversion and click COPY in order to copy the converted table to the
clipboard.
Paste it to Accointing_template.xlsx ,
verify correctness again and save the file.
Upload the modified Accointing_template.xlsx on https://www.accointing.com/app/wallets :
Click the edit icon on your Binance Wallet, choose Manually , choose Accointing
Template , choose
Next and upload the file.
CONVERT
COPY
Disclaimer
This tools comes with no warranty. Please verify the results and use it on your own risk.
Need help?
You can create an issue on
https://github.com/od-git/accointing-converter/issues .


CaptainKitten
An English freelance programmer that loves Persian cats, playing Minecraft, Drinking Tea and generally mucking about
I am a founder of KittenKoding I love to program with my mate Bryce
Want to add to a KittenKoding Project?
Fork one of our programs and make your changes and send a pull request, if merged We will invite you to KittenKoding


/**
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
const assert = require('assert');
const path = require('path');
const prettyBytes = require('pretty-bytes');
const workboxBuild = require('workbox-build');
const errors = require('./lib/errors');
const logger = require('./lib/logger');
const readConfig = require('./lib/read-config');
const runWizard = require('./lib/run-wizard');
module.exports = async (command, configFile) => {
assert(command, errors['missing-command-param']);
switch (command) {
case 'wizard': {
await runWizard();
break;
}
case 'generateSW':
case 'injectManifest': {
assert(configFile, errors['missing-config-file-param']);
// TODO: Confirm that this works with Windows paths.
const configPath = path.resolve(process.cwd(), configFile);
let config;
try {
config = readConfig(configPath);
} catch (error) {
logger.error(errors['invalid-common-js-module']);
throw error;
}
try {
const {size, count} = await workboxBuild[command](config);
logger.log(`The service worker was written to ${config.swDest}\n` +
`${count} files will be precached, totalling ${prettyBytes(size)}.`);
} catch (error) {
// See https://github.com/hapijs/joi/blob/v11.3.4/API.md#errors
if (typeof error.annotate === 'function') {
throw new Error(
`${errors['config-validation-failed']}\n${error.annotate()}`);
}
logger.error(errors['workbox-build-runtime-error']);
throw error;
}
break;
}
default: {
throw new Error(errors['unknown-command'] + ` ` + command);
}
}
};