Skip to main content

Org to IPYNB

Preamble

It should be remembered that the use of the operating system known as "Emacs" is prohibited by the Geneva Conventions and makes any user liable to a crime against humanity.

Indeed, this ignominy, whose violence and horror remain indescribable to us, is still far too widely used within the Linux community. There are many other tools available, such as ed, vim, nano... How can its use be justified, especially if it is shameless?

We are appalled and dumbfounded by this aberration. It is this service to humanity that has motivated us in this project. It's to save those who suffer from this evil. It is for you. You, who have desperately sought a solution. You, who have been desperate to get out of this trap. You, who represent that flickering glimmer of hope for a better future.

Résiste ! Prouve que tu existes ! Cherche ton bonheur partout, va, refuse ce monde égoïste ! Résiste. Suis ton cœur qui insiste ! Ce monde n'est pas le tien, viens, bats-toi, signe et persiste ! Résiste !

image

Requirements

  • pandoc
  • jupyter notebook
pip3 install jupyter jupyter-c-kernel jupyterlab notebook

then

install_c_kernel --user
  • gcc
    • OpenMP

You can test whether everything works using this command and this :

gcc -fopenmp code_block.c -o codeblock
./code_block
// OpenMP header
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char* argv[])
{
    int nthreads, tid;
 
    // Begin of parallel region
    #pragma omp parallel private(nthreads, tid)
    {
        // Getting thread number
        tid = omp_get_thread_num();
        printf("Welcome to GFG from thread = %d\n",
               tid);
 
        if (tid == 0) {
 
            // Only master thread does this
            nthreads = omp_get_num_threads();
            printf("Number of threads = %d\n",
                   nthreads);
        }
    }
}

Principle

We take a .org file and convert it to html and a json using pandoc <filename>.org -o out.html and pandoc <filename>.org -o out.json. Then we parse those intermediate renderings to extract the bits of code and generate a usable json IPYNB.

Usage

Usage: jupytorg src=input_file_path (optional type=code_block_language dest=output_file_path)
    input_file_path : the path to input the file
    output_file_path : the path to output the file (default is output_file.ipynb)

Example with a newcourse.org file:

jupytorg src=~/Documents/2A/OpenMP/newcourse.org dest=~/Documents/2A/OpenMP/newcourse.ipynb

It reads the .org file in the specified folder and drops the coonverted jupyter notebook into the same folder. All that remains is to open it with VSCode.

Metadata

Release files for jupytorg 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupytorg 0.2.5
File Size Uploaded Provenance
jupytorg-0.2.5.tar.gz 546.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jupytorg 0.2.5
File Interpreter ABI Platform
jupytorg-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / jupytorg-0.2.5.tar.gz

Download URL jupytorg-0.2.5.tar.gz
Size 546.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97fa1845e94d8375da62e8ec44b78f2fa67c23bbe3be9d44de5148dc61fb2c5d
BLAKE2b-256 checksum
How to use checksums
c8893c233b0bcf704cae74685278c4396f1b250a21ce5e393d7a6f16aa99a197
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.1 Linux/6.6.13-200.fc39.x86_64

Release files / jupytorg-0.2.5-py3-none-any.whl

Download URL jupytorg-0.2.5-py3-none-any.whl
Size 548.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e05b3c857cbef8fd38c13b1d7f1af25be601a15364f3bf03d9c4c8570c55a83
BLAKE2b-256 checksum
How to use checksums
b0e3b29219b9281f900be67b669d94108f7681b8f30da1bc2c97f94cbd941060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.1 Linux/6.6.13-200.fc39.x86_64

Security for jupytorg 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page