Skip to content

Instantly share code, notes, and snippets.

@cc7768
cc7768 / Bisection.py
Last active August 29, 2015 14:04
Testing numba for optimization.
import numpy as np
from scipy.optimize import bisect
from numba import f8, jit, njit
def min_me(x):
return x**4 - 2*x**2 - x - 3.
num_min_me = jit(min_me)
@cc7768
cc7768 / NelderMeadNB
Last active August 29, 2015 14:05
An Ipython Notebook about the Nelder Mead minimization algorithm.
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:fee0863747d7685991108f84eaecd97166e8946b885c72b24a3040180a0142ae"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@cc7768
cc7768 / test.py
Created August 21, 2014 17:43
Example of numba loops
import numpy as np
from numba import jit
def f_original(x, y):
n = x.size
m = y.size
z = np.empty((n, m))
@cc7768
cc7768 / HW3Notebook
Created November 3, 2014 17:16
Homework 3 Notebook for Tim Cogley's course
{
"metadata": {
"celltoolbar": "Slideshow",
"language": "Julia",
"name": "",
"signature": "sha256:48c93e55dd13e85a8b1e797778a71d47dfe8f59cbe53a02778db64f6eacaad7a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
n = 10
srand(42)
ad = randn(n, n)
bd = randn(n, n)
ac = randn(n, n) + randn(n, n)im
bc = randn(n, n) + randn(n, n)im
# This is the "not sorted" schur
@cc7768
cc7768 / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We begin by importing some packages called by the code that we will be using in this notebook."
]
},
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Command for clearing notifications
atom.commands.add 'atom-workspace', 'custom-commands:dismiss-notifications', ->
atom.notifications.getNotifications().forEach (notification) ->
notification.dismiss()
atom.notifications.clear()