This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdio.h" // includes definiton of printf | |
| #include "stdlib.h" // includes definiton of malloc | |
| void copy_string(char *dest, char *src) { | |
| // Copy bytes from src into dest | |
| while ((*(dest++) = *(src++))) {}; | |
| } | |
| int main(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| def plot_correspondence(points1, points2, fraction_of_lines): | |
| fig,(ax1,ax2) = subplots(1,2,sharex=True,sharey=True,figsize=(10,8)) | |
| # Set plot boundaries | |
| ax1.set_ylim(31,43) | |
| ax1.set_xlim(-126,-112) | |
| # Draw first points | |
| ax1.scatter(points1[:,0],points1[:,1],s=0.5,color='b') | |
| # Draw second points | |
| ax2.scatter(points2[:,0],points2[:,1],s=0.5,color='r') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| np.select(np.array([[1, 1, 0, 0], | |
| [0, 0, 1, 1]]), | |
| np.array([[1, 2, 3, 4], | |
| [5, 6, 7, 8]])) | |
| Truncated Traceback (Use C-c C-x to view full TB): | |
| /usr/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in choose(a, choices, out, mode) | |
| 296 except AttributeError: | |
| 297 return _wrapit(a, 'choose', choices, out=out, mode=mode) | |
| --> 298 return choose(choices, out=out, mode=mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "How many CONSISTENT triplets are there?" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { "metadata": { "name": "Untitled4" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "from skimage.io import Image\n", "\n", "picture = np.zeros((512,512))\n", "for y in xrange(512):\n", " for x in xrange(512):\n", " picture[y, x] += 2*np.clip(np.exp(- np.sqrt(((150.-x)**2+((150.-y)/4)**2)/50.)),\n", " 0, 0.5)\n", " picture[y, x] += 2*np.clip(np.exp(- np.sqrt(((350.-x)**2+((150.-y)/4)**2)/50.)),\n", " 0, 0.5) \n", " if 96<np.sqrt((y-270)**2+(x-256)**2)<160 and y>290:\n", " picture[y, x] += 0.4+0.4*np.cos(np.sqrt((y-270)**2+(x-256)**2)*0.1)\n", "Image(picture)" ], "language": "python", "outputs": [ { "jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAIAAgABAREA/8QAHwAAAQUBAQEB\nAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1Fh\nByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZ\nWmNkZWZnaGlqc3R1dnd4eXq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "RANSAC similarity transform" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.cs.cornell.edu/phd/requirements | |
| Cornell requires these courses: | |
| * Competency requirement | |
| - [ ] Artificial Intelligence: CS 4700 | |
| - [ ] Programming Languages: One of | |
| CS 4110 (PL) | |
| CS 4120 (Compilers) |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from distutils.core import setup | |
| from distutils.extension import Extension | |
| from Cython.Distutils import build_ext | |
| import numpy | |
| setup(name='libmr', | |
| ext_modules = [Extension('libmr', ['libmr.pyx', | |
| #"../libMR/MetaRecognition.cpp", | |
| #"../libMR/weibull.c" | |
| ], |