Simple generator of Jupyter Notebook interactive documents from marked up Python programming code

Author(s):  
Valeryi Kopei

Jupyter Notebook is widely used for interactive computing in various fields of science and technology. As a rule, Jupyter Notebook documents are created directly in the browser, but it is possible to generate them by software, for example, from Python code that contains Python string literals with Markdown code. Generation from Python code allows you to save documents in an easy-to-edit text format. In addition, in some cases, this Python code can be executed by a standard Python interpreter without having a Jupyter Notebook installed. This provides format flexibility. Currently, there are several tools for converting Python code to a Jupyter Notebook (.ipynb) document. Their disadvantage is either support for old formats or an inconvenient way to mark up cells in a Jupyter Notebook document. The principles of function are described and the Python program is developed for generating interactive Jupyter Notebook documents (.ipynb v4) from the simple marked Python code. The program has the ability to further convert .ipynb to HTML and docx formats. The program can be used to facilitate the creation and editing of documents based on Jupyter Notebook. In comparison with analogues, the program has a simple and clear algorithm based on regular expressions, which allows its simple modification for other tasks. An additional advantage is the simple way of marking Python code on cells, which consists in placing Markdown text blocks in multiline Python literals in quotes and separating code blocks by using ## symbols. An example of creating Python code is provided, which contains a Markdown block with such features as formatting with various fonts, hyperlinks, pictures, program code blocks, LaTeX formulas and tables; a block of code for building interactive graphics using Python libraries Matplotlib and ipywidgets; a block of code that outputs unformatted text and interpretation results of HTML, Markdown, SVG code by the display function from the IPython.display module. An example of converting this code to Jupyter Notebook (including interactive), Markdown, HTML and docx formats is shown.

Author(s):  
DMITRIY TRAYTEL ◽  
TOBIAS NIPKOW

AbstractMonadic second-order logic on finite words is a decidable yet expressive logic into which many decision problems can be encoded. Since MSO formulas correspond to regular languages, equivalence of MSO formulas can be reduced to the equivalence of some regular structures (e.g., automata). This paper presents a verified functional decision procedure for MSO formulas that is not based on automata but on regular expressions. Functional languages are ideally suited for this task: regular expressions are data types and functions on them are defined by pattern matching and recursion and are verified by structural induction. Decision procedures for regular expression equivalence have been formalized before, usually based on Brzozowski derivatives. Yet, for a straightforward embedding of MSO formulas into regular expressions, an extension of regular expressions with a projection operation is required. We prove total correctness and completeness of an equivalence checker for regular expressions extended in that way. We also define a language-preserving translation of formulas into regular expressions with respect to two different semantics of MSO. Our results have been formalized and verified in the theorem prover Isabelle. Using Isabelle's code generation facility, this yields purely functional, formally verified programs that decide equivalence of MSO formulas.


2018 ◽  
Vol 226 ◽  
pp. 04021
Author(s):  
Mikhail V. Poskonin ◽  
Andrey O. Kalinin ◽  
Igor V. Kovalev ◽  
Mikhail V. Saramud

The article considers the issue of storage, cataloging and transfer of documentation within the electronic document management system (EDMS). Modern document management solutions can be considered as the intersection of traditional and digital technologies, in particular, the storage of software code on paper. The very storage of program code in paper version implies a large archive for data storage, which includes modifications when versions of the program code are updated. Graphical ways of storing large amounts of data have been known for a long time, but they usually use a long procedure for restoring the original information and exclude recovery from paper or are significantly limited in the amount of stored data. As one of the elements of the composite electronic document management system it is proposed to use the method of graphical encoding of information (QR-code generation technology), which will increase the resistance to unauthorized modification of the program code, simplify the procedure for storing, identifying and verifying information. As an elementary block of information, it is intended to use a separate software module responsible for one of the subprograms in the RTOS environment. The proposed algorithm for storing and transferring information implies its compression by software, encryption and transmission. The article compares various compression algorithms and their efficiency. The presence of a cataloguer in each graphic element allows for quick search, comparison and verification of blocks.


2015 ◽  
Vol 22 (1) ◽  
pp. 154
Author(s):  
Thiago Teixeira Santos

In research and development (R&D), interactive computing environments are a frequently employed alternative for data exploration, algorithm development and prototyping. In the last twelve years, a popular scientific computing environment flourished around the Python programming language. Most of this environment is part of (or built over) a software stack named SciPy Stack. Combined with OpenCV’s Python interface, this environment becomes an alternative for current computer vision R&D. This tutorial introduces such an environment and shows how it can address different steps of computer vision research, from initial data exploration to parallel computing implementations. Several code examples are presented. They deal with problems from simple image processing to inference by machine learning. All examples are also available as IPython notebooks.


Author(s):  
Fauziah Fauziah ◽  
Andez Apriansyah ◽  
Tri Ichsan Saputra ◽  
Yunan Fauzi Wijaya

In compilation techniques, the processes and stages carried out relate to translating source languages into target languages (object programs). Source languages are high-level programming languages that are easy to understand and easy to learn by humans, while target languages are low-level languages that are only understood by machines. In this study a compiler machine called Automatic LESSIMIC Analyzer is used which can be used to analyze, including lexical, syntactic, and semantic analysis. Compiler machines that are designed can also synthesize intermediate code, using assembler codes. The compiler engine will produce an analysis of the program code that the user enters in the form of an error message, if the program code is not in accordance with the grammar that applies generally in programming languages. In this research, the simple program code that is inputted is C ++ programming language, and successfully analyzes the lexical, semantic, syntactic, intermediate code generation and successfully detects errors from the program code entered with a success rate of 99%.


2019 ◽  
Vol 14 (3) ◽  
Author(s):  
Surtika Ayumida, Muhamad Tabrani, Fransisca Natalia, Kurnia Abdurrahman Hariri

The process of archiving mails at the Cihambulu Village office the writing is still conventional. there are some deficiency including the process of writing that is not neat, archiving still using the ledger. Therefore required a program that can solving the problem, so the problems that occur at this Cihambulu Village office can be resolved. The concept of designing this system refers to the activities of data processing incoming mail, data processing outgoing mail, disposition making, to the manufacture of incoming mail reports and outgoing mail. some stages in the development or design of this program are software requirements analysis, program design, program code generation, program testing. The making this program using JAVA programming language, MySQL as database and windows 7 as operating system. Research methods used in the design of this system is the method of interviewing, observation, and literature study. While the purpose of designing this system is to produce a mail archiving program so that it can assist employees in data processing incoming mail, data processing outgoing mail, disposition making, making reports incoming mails and outgoing mail. Keywords: Program Design, Mail archiving Program


2021 ◽  
Vol 5 (2) ◽  
pp. 304-313
Author(s):  
Tigor Nirman Simanjuntak ◽  
Setia Pramana

This study aims to conduct analysis to determine the trend of sentiment on tweets about Covid-19 in Indonesia from the Twitter accounts overseas on big data perspective. The data was obtained from Twitter in the period of April 2020, with the word query "Indonesian Corona Virus" from foreign user accounts in English. The process of retrieving data comes from Twitter tweets by crawling the text using Twitter's API (Application Programming Interface) by employing Python programming language. Twitter was chosen because it is very fast and easy to spread through status updates from and among the user accounts. The number of tweets obtained was 8,740 in text format, with a total engagement of 217,316. The data was sorted from the tweets with the largest to smallest engagement, then cleaned from unnecessary fonts and symbols as well as typo words and abbreviations. The sentiment classification was carried out by analytical tools, extracting information with text mining, into positive, negative, and neutral polarity. To sharpen the analysis, the cleaned data was selected only with the largest engagement until those with 100 engagements; then was grouped into 30 sub-topics to be analyzed. The interesting facts are found that most tweets and sub-topics were dominated by the negative sentiment; and some unthinkable sub-topics were talked by many users.


2017 ◽  
Vol 27 (01) ◽  
pp. 1740002 ◽  
Author(s):  
Thibaut Tachon ◽  
Chong Li ◽  
Gaétan Hains ◽  
Frédéric Loulergue

Bulk-Synchronous Parallel (BSP) is a bridging model between abstract execution and concrete parallel architectures that retains enough information to model performance scalability. In order to model BSP program executions, Hains adapted the theory of finite automata to the BSP paradigm by introducing BSP automata [12]. In the initial description of the theory, BSP automata had to be explicitly defined as structured sets of states and transitions. The lack of a clean and efficient algorithm for generating them from regular expressions would have prevented this theory from being used in practice. To alleviate this problem we introduce in this paper an algorithm that generates a BSP automaton recognizing a BSP language defined by a BSP regular expression. The main practical use of BSP automata developed in this paper is the parallelization of finite state automata with an explicit distribution and a performance model, that enable parallel matching of regular expressions. Secondarily, BSP regular expressions provide a convenient structure for automatic code generation of imperative BSP programs that is also developed in this paper.


Sign in / Sign up

Export Citation Format

Share Document