Writing kernels for Jupyter

There are two ways of writing kernels for Jupyter. One way is to write native kernel from the scratch or making python wrapper kernels. I have compiled all the videos that would be helpful for anyone trying to write kernels for Jupyter in their favorite programming language. For official documentation, see here. 1 2 3: […]

Read More Writing kernels for Jupyter

CPython Internals Series

These are the nine lectures walking through the internals of CPython, the canonical Python interpreter implemented in C. These are from a dynamic programming languages course that Philip Guo taught in Fall 2014 at the University of Rochester. To see overview of CPython, see here. Here are the lectures: Lecture 1: CPython internals – Interpreter […]

Read More CPython Internals Series

ØMQ API

ØMQ API This is the documentation of ØMQ API with the explanation of each function. And the R code to generate it. This documents the ØMQ/4.2.3 API. library(rvest) ## Loading required package: xml2 library(stringr) library(knitr) library(kableExtra) data2 <- read_html(“http://api.zeromq.org/master:_start&#8221;) %>% html_nodes(“ul li”) %>% html_text() moddata2 <- data2 %>% str_detect(“^zmq”) %>% data2[.] %>% str_split_fixed(“-“, n=2) zmqtable […]

Read More ØMQ API

How to run Perl 6 notebook

As I am more familiar with Docker, I am explaining the docker way of running Perl 6 notebook. Of course there are other ways to achieve the same. Step 1: Docker installation To run Perl 6 notebook, first install Docker in your respective operating system. As I am running Windows, I install Docker from here. […]

Read More How to run Perl 6 notebook

Python tips

1. collections.Counter lets you find the most common elements in an iterable: >>> import collections >>> c = collections.Counter(‘helloworld’) >>> c Counter({‘l’: 3, ‘o’: 2, ‘e’: 1, ‘d’: 1, ‘h’: 1, ‘r’: 1, ‘w’: 1}) >>> c.most_common(3) [(‘l’, 3), (‘o’, 2), (‘e’, 1)] 2. >>> import antigravity in python console will take you to XKCD […]

Read More Python tips

Regexes in Perl 6

Perl 6 Cheatsheet Perl 6 Cheatsheet Suman suman81765@gmail.com Kathmandu, Nepal July 20, 2017 1 Regular Expressions ~~ Smart match operator. $/ Variable that contains the matched part of string. ~$/ Stringify the $/ variable. .match Method invocation syntax. / / Pattern is kept between a pair of slash delimiters. m/ / or m{ } Can […]

Read More Regexes in Perl 6

ggmap in R

It is a package interfacing ggplot2 and RGoogleMaps. For details read this article and here is the cheatsheet. There are two steps in making a map. download raster data for the map with get_map() plot with the ggmap() and overlay with layers Raster data is downloaded with: location of center zoom factor: 3=continent, 10=city, 21=building […]

Read More ggmap in R

Handling text in Perl 6

This is replication of what is in this tutorial in Perl 6. These things are relevant in text mining. Split sentence on space. my $string = “Pokhara is Is beautiful City city of Nepal”; .say for $string.split(” “); say $string.split(” “); ## Pokhara ## is ## Is ## beautiful ## City ## city ## of […]

Read More Handling text in Perl 6