Skip to content

Instantly share code, notes, and snippets.

View BrianChevalier's full-sized avatar

Brian Chevalier BrianChevalier

View GitHub Profile
@BrianChevalier
BrianChevalier / Install SymPy.py
Created March 13, 2017 05:02
Install SymPy.py
# Install SymPy
import urllib.request, urllib.parse, urllib.error
import tarfile
import shutil
import console
import os
print('Downloading SymPy...')
url = 'https://github.com/sympy/sympy/releases/download/sympy-1.0/sympy-1.0.tar.gz'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BrianChevalier
BrianChevalier / Untitled1.ipynb
Last active March 24, 2017 21:55
Slide test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  • Instantiate UIHosting Controller
  • pass a reference to self which is of type UIDocumentBrowserViewController
//This is somewhere in the present method of my UIDBVC subclass
let documentViewController = UIHostingController(rootView: SomeView(rootVC: self))

* In the UIDBVC subclass I created this method
```swift
"""
A super simple Jupyter cell magic that writes the cell to `main.cpp` or
specified file, compiles the file using g++ and executes the code using
`./a.out`
Limitations: the cell must be a complete C++ program.
"""
from IPython.core.magic import (register_line_magic,
register_cell_magic)
import subprocess