It is impossible for a photographic print to duplicate the range of brightnesses (luminances) of most subjects, and thus photographs are to some degree interpretations of the original subject values. Much of the creativity of photography lies in the infinite range of choices open to the photographer between attempting a nearly literal representation of the subject and freely interpreting it in highly subjective "departures from reality." My work, for example, is frequently regarded as "realistic," while in fact the value relationships within most of my photographs are far from a literal transcription of actuality. I employ numerous photographic controls to create >an image that represents "the equivalent of what I saw and felt" (to paraphrase
  
    
      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
    
  
  
    
  | """The code contained here is meant to find possible combinations of CP values, | |
| given a list of species and their base stats. This is useful when participating | |
| in, e.g., a "CP counting game" wherein people post screenshots of their Pokemon | |
| always posting a Pokmeon exactly 1 CP higher than the previous poster. If | |
| certain CP values are impossible to obtain, or very rare, then this is of | |
| interest to those people.""" | |
| from collections import defaultdict | |
| from itertools import product | |
| from math import sqrt | 
  
    
      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 cffi import FFI | |
| ffi = FFI() | |
| ffi.cdef('int classify(float x, float y, int num_class, float* class_x, float* class_y);') | |
| libcls = ffi.dlopen('libclassify.A') | |
| xmeans = ffi.new("float[2]", (5.0, 2.0)) | |
| ymeans = ffi.new("float[2]", (5.0, 2.0)) | |
| print '(3.0, 3.0): %d' % libcls.classify(3.0, 3.0, 2, xmeans, ymeans) # (3.0, 3.0): 1 | 
  
    
      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
    
  
  
    
  | % A demonstration - expanding cell matrices as a list of input arguments, | |
| % and returning a list of output arguments to a single cell matrix. | |
| % Set up some vectors representing axis grid spacings. | |
| d1 = 2:3; | |
| d2 = 2:5; | |
| d3 = 1:3; | |
| % Make a cell array to hold them. | |
| din = {d1, d2, d3}; | 
  
    
      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
    
  
  
    
  | % Open image; convert to grayscale. | |
| img = imread('PB110010.JPG'); | |
| im = double(rgb2gray(img)); | |
| % Normalize image to [0, 1]. | |
| im = im/max(im(:)); | |
| % Threshold the image using Otsu's method. | |
| threshold = graythresh(im); | |
| im_bw = im2bw(im, threshold); | 
  
    
      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
    
  
  
    
  | s = tf('s'); | |
| h = 1/((s/5)^2 + 1); | |
| [mag, phase, w] = bode(h); | |
| phase = phase(:); | |
| semilogx(w, phase) | |
| ylim([-190 10]) | |
| xlabel('\omega') | |
| ylabel('Phase (degrees)') | |
| title('Phase plot for complex conjuage pair (\zeta=0, \omega_n = 5)') | 
  
    
      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
    
  
  
    
  | # A woman has two children (perhaps they are twins). | |
| # There is a 50% chance that each child will be male, and a 50% chance it will be female. | |
| # The genders of the two children are independent. | |
| # Given that at least one of the children is female, what is the likelihood that both are female? | |
| from random import choice | |
| genders = ["male", "female"] | |
| num_runs = 10000 | |
| num_females = [0 for i in xrange(num_runs)] | 
  
    
      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
    
  
  
    
  | <!DOCTYPE HTML> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <title>Subreddit Graph</title> | |
| <script src="{{ url_for('static', filename='raphael-min.js') }}" | |
| type="text/javascript" charset="utf-8"></script> | |
| <script type="text/javascript" charset="utf-8"> | |
| window.onload = function() { | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env python | |
| """Prevent iTunes from opening if another media player is already running. | |
| Usage: rename iTunes binary to iTunesX; place this script in same folder | |
| and make it executable. | |
| Thanks to "andrew pz" and "dmonner" from this discussion thread: | |
| http://discussions.apple.com/thread.jspa?threadID=2122639&start=30&tstart=0""" | |
| import sys, os, subprocess | 
  
    
      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
    
  
  
    
  | def remdup(l, dup=None): | |
| # If has zero or one elements, there are no duplicates. | |
| if len(l) < 2: | |
| return l | |
| # If there's a duplicate to remove, remove it and recurse until ValueError | |
| # is raised, which means there are none left to remove. Since lists are | |
| # mutable, we don't have to capture this. | |
| if dup is not None: | |
| try: | 
NewerOlder