This file contains 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
(defvar upgoer-five-keywords (split-string "a able about above accept across | |
act actually add admit afraid after afternoon again against age | |
ago agree ah ahead air all allow almost alone along already | |
alright also although always am amaze an and anger angry animal | |
annoy another answer any anymore anyone anything anyway apartment | |
apparently appear approach are area aren't arm around arrive as | |
ask asleep ass at attack attempt attention aunt avoid away baby | |
back bad bag ball band bar barely bathroom be beat beautiful | |
became because become bed bedroom been before began begin behind |
This file contains 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 fipy.tools.numerix as np | |
from fipy.terms import VanLeerConvectionTerm | |
import fipy as fp | |
import pylab as plt | |
# monkey patch VanLeerConvectionTerm so we can override | |
# __getGradient in the derived class | |
VanLeerConvectionTerm._getGradient = VanLeerConvectionTerm._VanLeerConvectionTerm__getGradient | |
VanLeerConvectionTerm._VanLeerConvectionTerm__getGradient = \ | |
lambda self, a, b: self._getGradient(a, b) |
This file contains 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
; call trello2org interactively | |
; or pragmatically like this: (trello2org "c:/Users/jfurtney/blo-up-2-7.json") | |
(require 'json) | |
(defun convert-trello-json-file-to-org (trello-json-file) | |
(let* ((board (json-read-file trello-json-file)) | |
(board-name (cdr (assoc 'name (cdr board)))) | |
(lists (cdr (assoc 'lists (cdr board)))) |
This file contains 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 numpy as np | |
import pylab as plt | |
from skfmm import travel_time, distance | |
from scipy.interpolate import RectBivariateSpline | |
from scipy.optimize import fminbound | |
from math import sin | |
# Brachistochrone curve | |
# see: http://mathworld.wolfram.com/BrachistochroneProblem.html | |
b=1/np.pi |
This file contains 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 numpy as np | |
import pylab as plt | |
from sys import float_info | |
from math import sqrt | |
from skfmm import distance | |
N=11 | |
phi = np.ones((N,N)) | |
phi[5,5] = -1 |
This file contains 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 numpy as np | |
import pandas as pd | |
import matplotlib; matplotlib.rcParams["savefig.directory"] = "." | |
from matplotlib import pyplot as plt | |
from scipy.spatial import cKDTree | |
from numpy.linalg import lstsq | |
data0 = np.loadtxt("S1-1_0m.log") | |
data1 = np.loadtxt("S1-1_3000m.log") | |
assert (data0[:,0] == data1[:,0]).all() |
This file contains 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 itasca as it | |
from itasca import gpa | |
import numpy as np | |
from scipy.constants import foot | |
from collections import defaultdict | |
import os | |
from scipy.spatial import cKDTree | |
import scipy | |
if os.path.exists("data.npy"): |
This file contains 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
# This file was written by Jason Furtney and Wei Fu | |
# This file is an example of how to generate a surface mesh from lines | |
# in a DXF file. A vtk file is created of the mesh. | |
# you may have to install some Python packages to get this to work | |
import numpy as np | |
import ezdxf | |
import time |
This file contains 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 itasca as it | |
it.command("python-reset-state false") | |
import numpy as np | |
from itasca import zonearray as za | |
zid = za.ids() | |
zz_faces = set() | |
for i, neighbors in enumerate(za.neighbors()): | |
this_zone_id = zid[i] |
This file contains 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 numpy as np | |
import scipy.spatial | |
import networkx as nx | |
import itasca as it | |
from itasca import ballarray as ba | |
from collections import defaultdict | |
import itertools | |
def draw_fragment(points,faces,i): | |
gname = "tmp{}.geom".format(i) |
OlderNewer