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 os | |
import fnmatch | |
import sys | |
'''The following script searches for NEF files that do not have | |
a JPG copy and deletes them. This is intended to be used after | |
a manual selection of the best JPGfiles that the photographer has | |
selected. | |
It only runs on Python 3.x so yo need to have it installed it. |
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
# coding: utf-8 | |
'''The following code reproduces an example of the paper: | |
'The Complex-Step Derivative Approximation' | |
by Joaquim R. R. A. MARTINS, Peter STURDZA and Juan J. Alonso published in 2003. | |
License: MIT | |
Author: FJ Navarro Brull | |
''' |
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 IPython.core.magic import register_line_magic | |
from itertools import islice | |
@register_line_magic | |
def head(parameter_s=''): | |
'''Prints the first -n lines of a text file defined within the string. | |
Examples: | |
%head -n 5 file.txt | |
%head -5 file.txt |
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
''' | |
================================= | |
3D heart shape in matplotlib | |
================================= | |
Demonstrates how to plot a 3D function in cartesian coordinates. | |
Uses the marching cubes algorithm in scikit-image to obtain a isosurface. | |
Example contributed by CAChemE.org | |
Adapted from: http://www.walkingrandomly.com/?p=2326 | |
''' |
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 numpy as np | |
from skimage.morphology import disk | |
from skimage.filters.rank import mean | |
from skimage.filters import gaussian | |
import matplotlib.pyplot as plt | |
n = 20 | |
l = 256 |
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 numpy as np | |
from skimage.morphology import diamond, disk, square | |
from skimage.filters.rank import mean | |
import matplotlib.pyplot as plt | |
n = 20 | |
l = 256 | |
im = np.zeros((l, l)) |
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
conda create --name nikolaenv python=3 | |
activate nikolaenv | |
conda install pillow lxml | |
pip install Nikola[extras] |
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
# coding: utf-8 | |
""" | |
Plug flow reactor figure created with Python | |
This example displays a simple representation of a plug flow reactor (PFR) | |
by means of matplotlib API. A full list of artists and the documentation is | |
available at http://matplotlib.org/api/artist_api.html. | |
Copyright (c) 2015, Francisco J. Navarro-Brull | |
http://CAChemE.org |
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
# coding: utf-8 | |
""" 3D cluster projection by means of matplotlib. | |
Author: Fran Navarro-Brull <http://CAChemE.org> | |
This code is an snippet from the original Spanish article: | |
OriginLab vs Python | |
https://github.com/franktoffel/origin/ | |
LICENSE: MIT |
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
# coding: utf-8 | |
""" | |
Draw a minimalist Christmas tree with Python and their awesome libraries. | |
Code inspired by a StackEchange post and the Christmas spirit. | |
http://codegolf.stackexchange.com/questions/15860/make-a-scalable-christmas-tree/16358#16358 | |
Author: Franz Navarro - CAChemE.org | |
License: MIT | |
Dependencies: Python, NumPy, matplotlib | |
""" |