Artificial intelligence in pharmacy

Artificial intelligence in pharmacy

Artificial intelligence in pharmacy refers to the application of artificial intelligence (AI) techniques across pharmaceutical research and practice, including drug discovery, drug delivery, safety monitoring, clinical decision support, and pharmacy operations. Machine learning, deep learning, and natural language processing have been applied to tasks ranging from molecular design to patient adherence monitoring, with the aim of reducing development costs, improving accuracy, and personalizing treatment. Adoption has been uneven. Barriers include limited AI training among pharmacists, high infrastructure costs, and the risk of harm from models trained on unrepresentative data. Regulatory frameworks for AI-based pharmaceutical tools remain in active development across most jurisdictions. == Applications == === Drug discovery and development === Drug development is resource-intensive: bringing a single drug to market typically costs around $2.6 billion and takes 12–14 years. Machine learning algorithms have been applied to analyze molecular datasets to identify potential drug candidates, predict drug–target interactions, and optimize formulations. Artificial neural networks and generative adversarial networks have been used in drug discovery tasks including virtual screening, structure-activity relationship modeling, and de novo molecule generation. Peptides designed using AI methods have shown activity against multidrug-resistant bacteria, and transcriptomic data from human cell lines has been used to train deep learning models to classify drugs by therapeutic properties. Results in drug discovery have been mixed. AI models depend on the quality and diversity of their training data; those trained on narrow chemical libraries can fail to generalize to novel molecular scaffolds. The gap between high virtual screening hit rates and success in preclinical or clinical testing remains a persistent challenge, and the translation of computationally predicted candidates into approved drugs has been slower than early projections suggested. === Drug delivery systems === AI methods including neural networks, principal component analysis, and neuro-fuzzy logic have been applied to identifying biological targets for pharmaceuticals and analyzing genetic information relevant to drug design. Computational models can predict how a formulation will behave in biological systems, helping narrow the field before laboratory synthesis begins. Systems have been proposed that monitor patient response and adjust doses in real time based on individual physiology, with potential applications in chronic disease management. Research has also explored AI applications in targeted cancer treatments and oral vaccine delivery, areas where precise control over drug release kinetics is a design priority. === Drug safety === AI has been applied to predicting and detecting adverse drug reactions using techniques including knowledge graphs, logistic regression classifiers, and neural networks. A 2023 study developed a machine learning algorithm using knowledge graph analysis to classify known causes of adverse reactions. Natural language processing and deep learning models including long short-term memory (LSTM) networks have shown better performance than conventional methods for detecting opioid misuse, drawing on both structured data from electronic health records and unstructured sources such as clinical notes. AI-based pharmacovigilance systems can scan large volumes of electronic health records and social media for drug safety signals at a scale not feasible with manual review. Limitations include difficulty distinguishing drug-related adverse events from unrelated conditions in free-text data, and the need for validated benchmarks to measure model performance against existing safety monitoring standards. === Clinical decision support and personalized medicine === Machine learning systems trained on patient datasets can predict individual risk profiles, including potential allergies and drug–drug interactions, reducing the risk of harm in complex polypharmacy cases where the number of possible interactions exceeds what a clinician can readily assess. Personalized dosing models have been developed for drugs with narrow therapeutic windows — including anticoagulants and immunosuppressants — using patient-specific variables such as weight, renal function, and relevant genetic markers. Prospective clinical validation of these systems has lagged behind their technical development. Most published evaluations report performance on retrospective datasets, and the regulatory pathway for AI-based clinical decision support tools in pharmacy varies by jurisdiction. === Pharmacy operations and automation === Robotic and AI-driven systems have been applied to dispensing accuracy and pharmacy logistics. At the UCSF Medical Center, robotic technology produced 350,000 medication doses with no dispensing errors recorded. Robots such as TUG assist with preparing and transporting medications and laboratory samples within hospital settings. AI has also been applied to inventory management, with demand-forecasting systems predicting medicine requirements to reduce shortages and minimize waste from expired stock. In community pharmacy settings, AI tools have been used to flag potential prescription errors and alert pharmacists to drug–drug interactions before dispensing. === Medication adherence === Confirming that patients take prescribed medications as directed is a persistent challenge in healthcare. AI-enabled tools including smart pillboxes, RFID tags, ingestible sensors, and video check-ins have been applied to this problem. Smart pillboxes record when they are opened, providing real-time adherence data that can be reviewed remotely by care teams. Ingestible sensors transmit a signal after dissolution, offering direct confirmation of ingestion rather than proxy measures such as pill count or self-report. == Adoption challenges == === Barriers === Several barriers limit AI adoption in pharmacy practice. Many published evaluations report model performance on retrospective datasets rather than prospective clinical outcomes, making it difficult to assess real-world benefit. Pharmacists have reported limited AI training and knowledge, and research facilities often lack the computational infrastructure required for model development and validation. Models trained on biased or unrepresentative datasets can produce misleading results with direct patient safety consequences. === Regulatory frameworks === Regulatory frameworks for AI-based pharmaceutical tools are in active development. In the United States, the Food and Drug Administration (FDA) has issued guidance on AI and machine learning-based software as a medical device, addressing requirements for pre-market review and post-market performance monitoring. The European Medicines Agency has published discussion papers on the use of AI across the medicines development lifecycle, with particular attention to transparency in model training and validation. The absence of harmonized international standards creates compliance complexity for developers operating across multiple jurisdictions. === Ethical challenges === AI adoption raises data privacy and security concerns, including the risk of exposing sensitive patient information through data breaches. Algorithmic bias presents a related hazard: a model trained on an unrepresentative patient population may generate unsuitable treatment recommendations for patients not reflected in its training data, with potential for disparate outcomes across demographic groups. The opacity of some machine learning models, particularly deep neural networks, limits clinicians' ability to interpret or contest a recommendation, raising questions of accountability when a model-assisted decision results in patient harm. === Proposed solutions === Responses proposed in the literature include AI-focused education programs for pharmacists, increased public funding for healthcare AI research, encryption and governance frameworks for patient data, and regulatory requirements to prevent the use of biased training datasets. Greater transparency about training data provenance, model architecture, and validation methodology has also been recommended, including disclosure requirements in regulatory submissions. === Future directions === Research groups have called for tighter integration between AI systems and electronic health records to reduce healthcare costs and improve continuity of care across settings. International collaboration through shared AI frameworks and federated learning approaches has been proposed to address data scarcity in underrepresented patient populations and accelerate validation across institutions.

National Cyber Security Policy 2013

National Cyber Security Policy is a policy framework by Department of Electronics and Information Technology (DeitY) It aims at protecting the public and private infrastructure from cyber attacks. The policy also intends to safeguard "information, such as personal information (of web users), financial and banking information and sovereign data". This was particularly relevant in the wake of US National Security Agency (NSA) leaks that suggested the US government agencies are spying on Indian users, who have no legal or technical safeguards against it. Ministry of Communications and Information Technology (India) defines Cyberspace as a complex environment consisting of interactions between people, software services supported by worldwide distribution of information and communication technology. == Reason for Cyber Security policies == India had no Cyber security policy before 2013. In 2013, The Hindu newspaper, citing documents leaked by NSA whistle-blower Edward Snowden, has alleged that much of the NSA surveillance was focused on India's domestic politics and its strategic and commercial interests. This sparked a furore among people. Under pressure, the government unveiled a National Cyber Security Policy 2013 on 2 July 2013. == Vision == To build a secure and resilient cyberspace for citizens, business, and government and also to protect anyone from intervening in user's privacy.It mentioned a five year target of training five lakh cyber security personnel by 2018. == Mission == To protect information and information infrastructure in cyberspace, build capabilities to prevent and respond to cyber threat, reduce vulnerabilities and minimize damage from cyber incidents through a combination of institutional structures, people, processes, technology, and cooperation. == Objective == Ministry of Communications and Information Technology (India) define objectives as follows: To create a secure cyber ecosystem in the country, generate adequate trust and confidence in IT system and transactions in cyberspace and thereby enhance adoption of IT in all sectors of the economy. To create an assurance framework for the design of security policies and promotion and enabling actions for compliance to global security standards and best practices by way of conformity assessment (Product, process, technology & people). To strengthen the Regulatory Framework for ensuring a SECURE CYBERSPACE ECOSYSTEM. To enhance and create National and Sectoral level 24x7 mechanism for obtaining strategic information regarding threats to ICT infrastructure, creating scenarios for response, resolution and crisis management through effective predictive, preventive, protective response and recovery actions. -To improve visibility of integrity of ICT products and services by establishing infrastructure for testing & validation of security of such product. To create workforce for 500,000 professionals skilled in next 5 years through capacity building skill development and training. To provide fiscal benefit to businesses for adoption of standard security practices and processes. To enable Protection of information while in process, handling, storage & transit so as to safeguard privacy of citizen's data and reducing economic losses due to cyber crime or data theft. To enable effective prevention, investigation and prosecution of cybercrime and enhancement of law enforcement capabilities through appropriate legislative intervention. == Strategies == Creating a secured Ecosystem. Creating an assurance framework. Encouraging Open Standards. Strengthening The regulatory Framework. Creating a mechanism for Security Threats Early Warning, Vulnerability management, and response to security threats. Securing E-Governance services. Protection and resilience of Critical Information Infrastructure. Promotion of Research and Development in cyber security. Reducing supply chain risks Human Resource Development (fostering education and training programs both in formal and informal sectors to Support the Nation's cyber security needs and build capacity. Creating cyber security awareness. Developing effective Public-Private partnerships. To develop bilateral and multilateral relationships in the area of cyber security with another country. (Information sharing and cooperation) a Prioritized approach for implementation.

Ziad Obermeyer

Ziad Obermeyer (Arabic: زياد أوبرماير) is a Lebanese American physician and researcher whose work focuses on machine learning, health policy, and clinical decision-making in medicine. He is the Blue Cross of California Distinguished Associate Professor at the UC Berkeley School of Public Health, a Chan Zuckerberg Biohub investigator, and a research associate at the National Bureau of Economic Research. He is known for his research on racial bias in health care algorithms and the use of artificial intelligence in health care. == Early life and education == Obermeyer was born in Beirut, Lebanon, and raised in Cambridge, Massachusetts. He earned a Bachelor of Arts degree from Harvard College and a Master of Philosophy (M.Phil.) in History and Science from the University of Cambridge. He received his Doctor of Medicine (M.D.) from Harvard Medical School in 2008. Before pursuing medicine, Obermeyer worked as a consultant at McKinsey & Company, advising pharmaceutical and global health clients in New Jersey, Geneva, and Tokyo. After completing his medical degree, he trained as an emergency physician at Mass General Brigham (MGB) in Boston, Massachusetts. He later continued practicing emergency medicine at the Fort Defiance Indian Hospital on the Navajo Nation in Arizona. == Academic career == Obermeyer served as an Assistant Professor at Harvard Medical School from 2014 to 2020. In 2020, he joined the University of California, Berkeley as an Associate Professor and the Blue Cross of California Distinguished Professor at the School of Public Health. == Research focus == === Algorithmic racial bias in healthcare === In 2019, Obermeyer and economist Sendhil Mullainathan examined a commercial healthcare algorithm by UnitedHealth Group, used in hospitals and by insurers to identify patients with complex health needs. The study found that the algorithm underestimated the health needs of Black patients compared to white patients with similar conditions and that reformulating it would reduce racial bias. In 2020, Obermeyer analyzed an algorithm used to allocate CARE Act relief funding to hospitals. The study identified allocation patterns that favored hospitals with higher revenues over hospitals serving larger numbers of COVID-19 patients who are predominantly Black. === Clinical decision-making === In 2021, Obermeyer and colleagues examined physician decision-making in cardiac care using machine learning models. The study found that physicians misdiagnose cases when they rely on symptoms representative of a heart attack, such as chest pain, over other symptoms. === Pain assessment === Obermeyer developed a deep learning approach to investigate the severity of osteoarthritis in underserved communities. == Policy and regulatory work == Following the publication of the 2019 algorithmic racial bias study, the New York Department of Financial Services and Department of Health launched an investigation into UnitedHealth Group's algorithm, requesting that the company cease using it, citing discriminatory business practices. Also related to this study, in December 2019, Democratic Senators Cory Booker and Ron Wyden released letters to the Federal Trade Commission and Centers for Medicare and Medicaid Services asking to investigate potential discrimination in decision-making algorithms against marginalized communities in healthcare. The senators also wrote to major healthcare companies, including Aetna and Blue Cross Blue Shield, about their internal safeguards against racial bias in their technology. In 2021, Obermeyer and colleagues at the University of Chicago Booth School of Business released the Algorithmic Bias Playbook, a resource for policymakers and technical teams working in healthcare on how to measure and mitigate algorithmic racial bias. Obermeyer testified before the U.S. Senate Financial Committee in February 2024 on artificial intelligence in healthcare, recommending transparency requirements for AI developers and independent algorithm evaluations. In December 2025, he testified before the United States House Committee on Oversight and Government Reform on the role of AI in affordable healthcare and the impact of its integration on the workforce. == Organizations == In 2021, Obermeyer cofounded Nightingale Open Science, a non-profit that creates new medical imaging datasets available for research, and Dandelion Health, a health data analytics company. In June 2023, the company launched a program to audit and evaluate the performance of algorithms to identify potential racial, ethnic, and geographic bias, funded by the Gordon and Betty Moore Foundation and the SCAN Foundation. Dandelion Health partnered with the American Heart Association in 2025 to power an AI assessment lab for cardiovascular algorithms. Obermeyer is a founding faculty member of the University of California, Berkeley–University of California, San Francisco joint program in computational precision health. == Recognition == TIME magazine named Obermeyer one of the 100 most influential people in artificial intelligence in 2023. He has served as a Chan Zuckerberg Biohub Investigator since 2022, and as a Research Associate at the National Bureau of Economic Research since 2023. He was designated an Emerging Leader by the National Academy of Medicine in 2020. Obermeyer's racial bias study received the Willard G. Manning Memorial Award for the Best Research in Health Econometrics from the American Society of Health Economists (ASHEcon) in 2021 and the Responsible Business Education Award from the Financial Times in 2022.

Magnetic ink character recognition

Magnetic ink character recognition code, known in short as MICR code, is a character recognition technology used mainly by the banking industry to streamline the processing and clearance of cheques and other documents. MICR encoding, called the MICR line, is at the bottom of cheques and other vouchers and typically includes the document-type indicator, bank code, bank account number, cheque number, cheque amount (usually added after a cheque is presented for payment), and a control indicator. The format for the bank code and bank account number is country-specific. The technology allows MICR readers to scan and read the information directly into a data-collection device. Unlike barcode and similar technologies, MICR characters can be read easily by humans. MICR encoded documents can be processed much faster and more accurately than conventional OCR encoded documents. == Pre-Unicode standard representation == The ISO standard ISO 2033:1983, and the corresponding Japanese Industrial Standard JIS X 9010:1984 (originally JIS C 6229–1984), define character encodings for OCR-A, OCR-B and E-13B. == International spread == There are two major MICR fonts in use: E-13B and CMC-7. There is no particular international agreement on which countries use which font. In practice, this does not create particular problems as cheques and other vouchers do not usually flow out of a particular jurisdiction. The E-13B font has been adopted as an international standard in ISO 1004-1:2013, and is the standard in Australia, Canada, the United Kingdom, the United States, as well as Central America and much of Asia, besides other countries. The CMC-7 font has been adopted as an international standard in ISO 1004-2:2013, and is widely used in Europe, including France and Italy, Mexico, and South America, including Argentina, Brazil, Chile, besides other countries. Israel is the only country that can use both fonts simultaneously, though the practice makes the system significantly less efficient. This situation is the product of the Israelis adopting CMC-7, while the Palestinians opted for E-13B. == Fonts == === E-13B === E-13B is a 14-character set, comprising the 10 decimal digits, and the following symbols: ⑆ (transit: used to delimit a bank code); ⑈ (on-us: used to delimit a customer account number); ⑇ (amount: used to delimit a transaction amount); ⑉ (dash: used to delimit parts of numbers—e.g., routing numbers or account numbers). In the check printing and banking industries the E-13B MICR line is also commonly referred to as the TOAD line. This reference comes from the 4 characters: Transit, On-us, Amount, and Dash. Compared to CMC-7, some pairs of E-13B characters (notably 2 and 5) can produce relatively similar results when magnetically scanned; however, as a fallback if magnetic reading fails, E-13B also performs well under optical character recognition. The E-13B repertoire can be represented in Unicode (see below). The official Unicode names contain misnomers. For example, the ⑈ on-us symbol is official titled "OCR Dash". Prior to Unicode, it could be encoded according to ISO 2033:1983, which encodes digits in their usual ASCII locations, transit as 0x3A, on-us as 0x3C, amount as 0x3B, and dash as 0x3D. For EBCDIC, IBM code page 1001 encodes digits in their usual EBCDIC locations, transit as 0xDB, on-us as 0xEB, amount as 0xCB, and dash as 0xFB. IBM code page 1032 extends code page 1001 by adding alternative encodings for transit at 0x5C, 0x7A and 0xC1, on-us at 0x4C, 0x61 and 0xC3, amount at 0x5B, 0x5E and 0xC2 and dash at 0x60, 0x7E and 0xC4, in addition to a zero-width space at 0x5A. These alternative representations were added for interoperability with Siemens and Océ printers. === CMC-7 === CMC-7 includes 10 numeric digits, 26 capital letters, and 5 control characters: S I (internal), S II (terminator), S III (amount), S IV (an unused character), and S V (routing). CMC-7 has a barcode format, with every character having two distinct large gaps in different places, as well as distinct patterns in between, to minimize any chance for character confusion while reading magnetically; however, these bars are too close and narrow to be reliably recognised at a typical scan resolution if falling back to optical scanning. CMC-7 can also produce superficially successful, but incorrect, scans of upside-down MICR lines. Unicode does not include support for the CMC-7 control symbols. IBM code page 1033 encodes: Digits and capitals in their usual EBCDIC locations S I (internal) as 0x5E, 0x61 or 0xCB; S II (terminator) as 0x4C, 0x5B or 0xEB; S III (amount) as 0x60, 0x7E or 0xFB; S IV as 0x50, 0x7A or 0xDB; S V (routing) as 0x5C, 0x6E or 0xBB. == MICR reader == MICR characters are printed on documents in one of the two MICR fonts, using magnetizable (commonly known as magnetic) ink or toner, usually containing iron oxide. In scanning, the document is passed through a MICR reader, which performs two functions: magnetization of the ink, and detection of the characters. The characters are read by a MICR reader head, a device similar to the playback head of a tape recorder. As each character passes over the head, it produces a unique waveform that can be easily identified by the system. MICR readers are the primary tool for cheque sorting and are used across the cheque distribution network at multiple stages. For example, a merchant will use a MICR reader to sort cheques by bank and send the sorted cheques to a clearing house for redistribution to those banks. Upon receipt, the banks perform another MICR sort to determine which customer's account is charged and to which branch the cheque should be sent on its way back to the customer. However, many banks no longer offer this last step of returning the cheque to the customer. Instead, cheques are scanned and stored digitally. Sorting of cheques is done as per the geographical coverage of banks in a nation. == Unicode == OCR and MICR characters have been included in the Unicode Standard since at least version 1.1 (June 1993). Since the Unicode Character Database only tracks characters starting with version 1.1, they may also have been present in Unicode 1.0 or 1.0.1. The Unicode block that includes OCR and MICR characters is called Optical Character Recognition and covers U+2440–U+245F. Of the characters in this block, four are from the MICR E-13B font: U+2446 ⑆ OCR BRANCH BANK IDENTIFICATION U+2447 ⑇ OCR AMOUNT OF CHECK U+2448 ⑈ OCR DASH (corrected alias MICR ON US SYMBOL) U+2449 ⑉ OCR CUSTOMER ACCOUNT NUMBER (corrected alias MICR DASH SYMBOL) The names of the latter two characters were inadvertently switched when they were named in ISO/IEC 10646:1993, and they have been assigned accurate names as formal aliases. Per the Unicode Stability Policy, the existing names remain, allowing their use as stable identifiers. Additionally, all four characters have informative (non-formal) aliases in the Unicode charts: "transit", "amount", "on-us", and "dash" respectively. Prior to Unicode, these symbols had been encoded by the ISO-IR-98 encoding defined by ISO 2033:1983, in which they were simply named SYMBOL ONE through SYMBOL FOUR. They were encoded immediately following the digits, which were encoded at their ASCII locations. Although ISO 2033 also specifies encoding for OCR-A and OCR-B, its encoding for E-13B is known simply as ISO_2033-1983 by the IANA. == History == Before the mid-1940s, cheques were processed manually using the Sort-A-Matic or Top Tab Key method. The processing and cheque clearing was very time-consuming and was a significant cost in cheque clearance and bank operations. As the number of cheques increased, ways were sought for automating the process. Standards were developed to ensure uniformity in financial institutions. By the mid-1950s, the Stanford Research Institute and General Electric Computer Laboratory had developed the first automated system to process cheques using MICR. The same team also developed the E-13B MICR font. "E" refers to the font being the fifth considered, and "B" to the fact that it was the second version. The "13" refers to the 0.013-inch character grid. The trial of MICR E-13B font was shown to the American Bankers Association (ABA) in July 1956, which adopted it in 1958 as the MICR standard for negotiable documents in the United States. ABA adopted MICR as its standard because machines could read MICR accurately, and MICR could be printed using existing technology. In addition, MICR remained machine readable, even through overstamping, marking, mutilation and more. The first cheques using MICR were printed by the end of 1959. Although compliance with MICR standards was voluntary in the United States, it had been almost universally adopted in the United States by 1963. In 1963, ANSI adopted the ABA's E-13B font as the American standard for MICR printing, and E-13B was also standardized as ISO 1004:1995. Other countries set their own standards, though the MICR readers and m

Alberto Broggi

Alberto Broggi is General Manager at VisLab srl (spinoff of the University of Parma acquired by Silicon-Valley company Ambarella Inc. in June 2015) and a professor of Computer Engineering at the University of Parma in Italy. == Research in computer vision, hardware, and AV == Broggi's research activities started in 1991–1994. His group together with the Dipartimento di Elettronica, Politecnico di Torino, Italy, built their own hardware architecture (named PAPRICA, for PArallel PRocessor for Image Checking and Analysis, based on 256 single-bit processing elements working in SIMD fashion) and installed it on board of a mobile laboratory (Mob-Lab) to develop and test some initial concepts in the field of intelligent vehicles. In 1996, Broggi's group worked to develop a real vehicle prototype (named ARGO, a Lancia Thema passenger car which was equipped with vision sensors, processing systems, and vehicle actuators) and developed the necessary software and hardware that made it able to drive autonomously on standard roads. Broggi's research group (called VisLab from then on) gathered all their findings in a book, which was then also translated in Chinese. When Broggi was with the University of Pavia, his research was extended and applied to extreme conditions (automatic driving on snow and ice): in 2001, VisLab led the research effort of providing a vehicle (RAS, Robot Antartico di Superficie) with sensing capabilities so that it was able to automatically follow the vehicle in front. In 2010 Broggi's group embarked on driving 4 vehicles autonomously from Italy to China with no human intervention. This challenge is called VIAC, for VisLab Intercontinental Autonomous Challenge . Soon after this, Broggi was awarded a second ERC grant (Proof of concept) to industrialize some of the results obtained and successfully tested on the VIAC vehicles. On July 12, 2013, VisLab tested the BRAiVE vehicle in downtown Parma, negotiating two-way narrow rural roads, pedestrian crossings, traffic lights, artificial bumps, pedestrian areas, and tight roundabouts. The vehicle traveled from Parma University Campus up to Piazza della Pilotta (downtown Parma): a 20 minutes run in a real environment, together with real traffic at 11am on a working day, that required absolutely no human intervention. Part of this test was driven with nobody in the driver seat, for the first time ever on public roads.

Outline of the Python programming language

The following outline is provided as an overview of and topical guide to Python: Python is a general-purpose, interpreted, object-oriented, functional, multi-paradigm, and dynamically typed programming language known for its emphasis on code readability and broad standard library. Python was created by Guido van Rossum and first released in 1991. It emphasizes code readability and developer productivity. == What type of language is Python? == Programming language — artificial language designed to communicate instructions to a machine. Object-oriented programming — built primarily around objects and classes. Functional programming — supports functions as first-class objects. Scripting language — often used for automation and small programs. General-purpose programming language — designed for a wide variety of application domains. Dynamically typed — type checking occurs at runtime. Interpreted language — code is executed by an interpreter. Multi-paradigm — supports procedural, object-oriented, and functional programming. == History of Python == ABC (programming language) – precursor to Python Python was started by Guido van Rossum in 1989 and first released in 1991. Python 2 — major version released in 2000, officially retired in 2020. Python 3 — released in 2008 == General Python concepts == == Issues and limitations == Performance — generally slower than many compiled languages such as C or Java can be mitigated by C extensions or JIT compilers (PyPy). Global interpreter lock — limits parallel CPU-bound threads in CPython Memory consumption — high memory use compared to some lower-level languages Version compatibility — Python 2 vs Python 3 differences caused migration issues == Python implementations == CPython — reference implementation in C IronPython — Python for .NET Jython — Python for the JVM MicroPython — Python for microcontrollers and embedded systems Nuitka — compiler that packages user code with CPython into a static binary PyPy — JIT-compiled Python interpreter for speed PythonAnywhere — freemium hosted Python installation that runs in the browser Stackless Python — Python with lightweight concurrency features == Python toolchain == List of Python software Comparison of Python IDEs Comparison of server-side web frameworks for Python List of Python frameworks List of Python libraries List of unit testing frameworks for Python Python Package Index == Notable projects using Python == YouTube (backend) Instagram (backend) Dropbox Reddit OpenStack Blender (scripting and plugins) SageMath NumPy Pandas TensorFlow == Python development communities == ActiveState — commercial Python distributions and support Anaconda, Inc. — Python data science ecosystem GitHub Python Software Foundation Python Package Index (PyPI) — third-party software repository for Python == Example source code == Articles with example Python code == Python publications == === Books about Python === Automate the Boring Stuff with Python – Creative Commons Python book Alex Martelli — Python in a Nutshell and Python Cookbook Mark Pilgrim – Dive into Python Naomi Ceder — The Quick Python Book Wes McKinney — Python for Data Analysis Zed Shaw – Learn Python the Hard Way === Textbooks === Core Python Programming == Python programmers == == Python conferences == EuroPython – annual Python conference in Europe PyCon – the largest annual convention for the Python community PyData – conference series focused on data analysis, machine learning, and scientific computing with Python SciPy Conferences – focused on the use of Python in scientific computing and research DjangoCon – a conference dedicated to the Django web framework PyOhio – a free regional Python conference held in Ohio == Python learning resources == Codecademy – interactive Python programming lessons GeeksforGeeks – tutorials, coding examples, and interactive programming for Python concepts and data structures. Kaggle – free Python courses focused on data science and machine learning. Python.org Tutorial – the official Python tutorial from the Python Software Foundation. Real Python – articles, tutorials, and courses for Python developers. W3Schools – beginner-friendly Python tutorials. Wikibooks Python Programming – free open-content textbook on Python. === Competitive programming === Codeforces – an online platform for programming contests that supports Python submissions Codewars – gamified coding challenges supporting Python HackerRank – competitive programming and interview preparation site with Python challenges Kaggle – while focused on data science competitions, it also includes Python-based problem solving. LeetCode – online judge and problem-solving platform where Python is widely used

Law and Corpus Linguistics

Law and corpus linguistics (LCL) is an academic sub-discipline that uses large databases of examples of language usage equipped with tools designed by linguists called corpora to better get at the meaning of words and phrases in legal texts (statutes, constitutions, contracts, etc.). Thus, LCL is the application of corpus linguistic tools, theories, and methodologies to issues of legal interpretation in much the same way law and economics is the application of economic tools, theories, and methodologies to various legal issues. == History == A 2005 law review article by Lawrence Solan noted in passing that corpus linguistics had potential for its application to interpreting legal texts. But the first systematic exploration and advocacy of applying the tools and methodologies of corpus linguistics to legal interpretive questions of law and corpus linguistics came in the fall of 2010, when the BYU Law Review published a note by Stephen Mouritsen, entitled The Dictionary is Not a Fortress: Definitional Fallacies and a Corpus-Based Approach to Plain Meaning. The note argued that dictionaries are the primary linguistic tool used by judges to determine the plain or ordinary meaning of words and phrases, and highlighted the deficiencies of such an approach. In its stead, the note proposed using corpus linguistics. And the note would be later cited by Adam Liptak in a New York Times article on statutory construction. Law and corpus linguistics (LCL) gained greater legitimacy in July 2011 with the first judicial opinion in American history utilizing corpus linguistics to determine the meaning of a legal text: In re the Adoption of Baby E.Z. In a concurrence in part and in the judgment, Justice Thomas Lee wrote to put forth an alternative ground for the majority's holding—interpreting the phrase "custody determination" by using corpus linguistics. Justice Lee looked at 500 randomized sample sentences from the Corpus of Contemporary American English (COCA) and found that the most common sense of "custody" was in the context of divorce rather than adoption. Further, he found that "custody" is ten times more likely to co-occur (or collocate) with "divorce" than with "adoption". From that evidence Justice Lee concluded that he "would find that the custody proceedings covered by the Act are limited to proceedings resulting in the modifiable custody orders of a divorce", rather than the broader range of custody proceedings. Other jurisprudence and scholarship would follow. In a 2015 concurrence in State v. Rasabout, Justice Lee used a COCA search to determine that "discharge" when used with a firearm (or one of its synonyms) overwhelmingly referred to a single shot rather than emptying the entire magazine of the weapon. And in 2016, four of the five justices joined a footnote in a majority opinion by Justice Lee commending a party for using corpus linguistics in its briefing even though the Court found it unnecessary to resolve the related question. Finally, in 2016 the Michigan Supreme Court became the first court to use a linguist-designed corpus in a majority opinion (COCA), with both the majority and the dissent turning to COCA to determine the meaning of the word "information". In 2020, courts desiring to bolster the legal theory of original intent have sought the opportunity to undertake analyses of statutes utilizing corpus linguistics. In a Ninth Circuit Court of Appeals case, Jones v. Becerra (No. 20-56174), a case involving the Second Amendment and the constitutionality of a California statute which bans the sale of firearms to individuals under the age of 21, a Ninth Circuit panel requested that the parties address three questions: 1) “What is the original public meaning of the Second Amendment phrases: ‘A well regulated Militia’; ‘the right of the people’; and ‘shall not be infringed’? 2) How does the tool of corpus linguistics help inform the determination of the original public meaning of those Second Amendment phrases?” 3) How do the data yielded from corpus linguistics assist in the interpretation of the constitutionality of age-based restrictions under the Second Amendment? As to scholarship, in 2012, Mouritsen followed up his original work with an article in the Columbia Science and Technology Law Review, where he further refined and promoted the use of corpus-based methods for determining questions of legal ambiguity. Additionally, in 2016 two essays and an article on law and corpus linguistics were published. The Yale Law Journal Forum published Corpus Linguistics & Original Public Meaning: A New Tool to Make Originalism More Empirical. Written by Justice Lee and two co-authors, the essay urged originalists to turn to corpus linguistics to improve the rigor and accuracy of originalist scholarship. And in response, the Forum published an essay by Lawrence Solan (a Brooklyn Law professor with a PhD in linguistics), Can Corpus Linguistics Help Make Originalism Scientific? The Boston University Public Interest Law Journal published The Merciful Corpus: The Rule of Lenity, Ambiguity and Corpus Linguistics by Daniel Ortner. In the article Ortner applied corpus linguistics to determining whether sufficient ambiguity exists to trigger the rule of lenity in five Supreme Court cases. Looking forward, in 2017 two more articles are slated for publication. Lee Strang focuses on corpus linguistics and originalism in the U.C. Davis Law Review, and Lawrence Solan and Tammy Gales explore corpus linguistics in the context of finding ordinary meaning in statutory interpretation in the International Journal of Legal Discourse. Lawyers and journalists have also taken notice of corpus linguistics at it relates to the law. In 2010, Neal Goldfarb filed the first known brief in the Supreme Court using corpus linguistics (COCA) to determine whether the ordinary meaning of "personal" referred to corporations in the case FCC v. AT&T. The amicus brief looked at the top collocates (words that co-occur) of "personal" in COHA as well as BYU's Time Magazine Corpus. And writing for The Atlantic, Ben Zimmer took note of this new trend, referring to corpus linguistics in the courts as "Like Lexis on Steroids". On the academic front, in 2013 BYU Law School started the first class on law and corpus linguistics, co-taught by Mouritsen, Lee, and (now Dean) Gordon Smith. The class is currently in its fourth year. And in February 2016, BYU Law School hosted the inaugural conference on LCL, with over two dozen legal and linguistic scholars from around the country discussing and debating the next steps forward for the growing academic movement. The conference has been held regularly in subsequent years. At the 2016 conference BYU Law School announced its plans and progress on the Corpus of Founding Era American English (COFEA), a corpus that covers 1760–1799 and contains more than 120 million words have been collected from founding era letters, diaries, newspapers, non-fiction books, fiction, sermons, speeches, debates, legal cases, and other legal materials.