Skip to content

Instantly share code, notes, and snippets.

Looking for cool hardware projects

Shantam Raj armsp

Looking for cool hardware projects
Block or report user

Report or block armsp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Model+Predictive+Control+for+Closed+Loop+Insulin+Delivery-4.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
armsp /
Last active Sep 29, 2019
GraphQL query to get user statistics like total followers, stargazers, watchers, issues, pull requests
query {
  user(login:"<any user name>"){
armsp /
Last active Jan 14, 2019
How to create high quality gifs for Github READMEs


  • Record a asciicast file

    • Use termtosvg record <outputfilename.cast> to record a asciicast file
    • Alternatively use asciinema rec to do the same i.e get an asciicast file
  • Then use asciicast2gif <asciicastfilename.cast> <outputfilename.gif> to convert asciicast to high quality gif

armsp / Dockerfile
Created Dec 12, 2018
Gist containing simple Dockerfile and steps to run GUI from a docker container
View Dockerfile
#FROM python:3.7 ## Works with either of the base images. Size is larger with Python due to there being python2.7 too
FROM ubuntu:18.10
RUN apt-get update && apt-get upgrade -y
RUN apt-get install python3-dev python3-pip -y
RUN apt-get install python3-gi -y && \
apt-get install gir1.2-gtk-3.0 -y && \
apt-get install gir1.2-appindicator3-0.1 -y
armsp / 30-randomize-mac-address.conf
Created Dec 9, 2018 — forked from paulfurley/30-randomize-mac-address.conf
MAC address randomization in Ubuntu 17+ (>= 1.4.1): save to /etc/NetworkManager/conf.d/
View 30-randomize-mac-address.conf
# /etc/NetworkManager/conf.d/30-randomize-mac-address.conf
# REQUIRES NETWORK MANAGER >= 1.4.1 (Ubuntu Zesty and above)
# Thanks to
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*
armsp /
Created Oct 31, 2018
GraphQL notes







What are all those terms you see in the example queries? Read the Github GraphQL API Schema. Schema has the definitions of all the objects, relationships, fields etc


armsp /
Created Aug 29, 2018 — forked from koenbollen/
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
# This is the client.
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
armsp / HTTP status
Created Aug 26, 2018
Proper way to return HTTP status codes with custom messages when a restful API on Flask server fails while processing inputs.
View HTTP status

HTTP Error Codes

  • 1xx : Informational
  • 2xx : Success
  • 3xx : Redirection
  • 4xx : Client Error
  • 5xx : Server Error

HTTP Status Codes from MDN

200 OK

armsp / Dockerfile
Last active Aug 25, 2018
Dockerfile to install python, pandas, sklearn, numpy, scipy on a ubuntu 18.10 container (works under restricted ssl certificate environments too)
View Dockerfile
FROM ubuntu:18.10
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends apt-utils software-properties-common wget \
&& apt-get install -y build-essential python3 python3-distutils \
&& wget --no-check-certificate \
&& python3 --trusted-host --trusted-host
#RUN apt-get install python3.6 python-pip
#RUN python -m pip install pip --upgrade
#RUN python -m pip install wheel
#RUN apt-get install -y python3-numpy
armsp /
Last active May 6, 2019
Steps to run ARM containers on x86
  • Install qemu-arm-static
  • Pull arm32v7/debian:jessie
  • docker run -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static --rm -it arm32v7/debian:jessie --name rpi-test
  • apt-get update
  • apt-get upgrade
  • apt-get install nano
  • apt-get install binutils apt-utils
  • apt-get install build-essential build-essential in turn installs the following- binutils bzip2 cpp cpp-4.9 dpkg-dev fakeroot g++ g++-4.9 gcc gcc-4.9 ifupdown isc-dhcp-client
You can’t perform that action at this time.