Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

lucasea777

🏠
Working from home
View GitHub Profile
@lucasea777
lucasea777 / Dockerfile
Created May 4, 2019 — forked from dsuess/Dockerfile
xeus-cling C++ Jupyter kernel inside a docker container
View Dockerfile
FROM frolvlad/alpine-miniconda3
RUN conda install -y -c conda-forge bash jupyter jupyter_contrib_nbextensions
RUN conda install -y -c conda-forge xeus-cling xtensor
RUN mkdir /notebooks
@lucasea777
lucasea777 / build.sh
Created May 19, 2018 — forked from Artanis/build.sh
Python C Extension Hello World
View build.sh
gcc -fpic --shared $(python3-config --includes) greetmodule.c -o greet.abi3.so
# can also use $(pkg-config --cflags python-3.5)
# or
# python3 setup.py install --record files.txt --user
View auto-remove-sublime-license-popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@lucasea777
lucasea777 / httpget.js
Created Oct 7, 2016 — forked from duncansmart/httpget.js
Download a file with Windows Script Host
View httpget.js
// httpget.js: download a file (Windows Script Host)
// usage: cscript httpget.js <url> <file>
(function() {
if (WScript.Arguments.Length != 2) {
WScript.Echo("Usage: httpget.js <url> <file>")
WScript.Quit(1)
}
var url = WScript.Arguments(0)
View SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""