Get pitch name in scientific notation

@param {String|Array} pitch - the pitch string or array
@return {String} the name of the pitch

@example
pitch.str('cb') // => 'Cb'
pitch.str('fx2') // => 'F##2'
352520
function str (pitch) {
  var p = Array.isArray(pitch) ? pitch : asPitch.parse(pitch)
  return p ? asPitch.stringify(p) : null
}
765967
def get_symbols(self, name):
        
        url = "http://autoc.finance.yahoo.com/autoc?query={0}&callback=YAHOO.Finance.SymbolSuggest.ssCallback".format(name)

        response = requests.get(url)

        json_data = re.match("YAHOO\.Finance\.SymbolSuggest.ssCallback\((.*)\)", response.text)
        try:
            json_data = json_data.groups()[0]
        except (Exception,) as e:
            print(e)
            json_data = '{"results": "Webservice seems to be down"}'

        return type('response', (requests.Response,),{
            'text' : json_data,
            'content': json_data.encode(),
            'status_code': response.status_code,
            'reason': response.reason,
            'encoding': response.encoding,
            'apparent_encoding': response.apparent_encoding,
            'cookies': response.cookies,
            'headers': response.headers,
            'json': lambda : json.loads(json_data),
            'url': response.url
        })
592489
function (name) {
  var octave = null;

  name = prepareNoteName(name);

  // Extract octave number if given
  if (/\d$/.test(name)) {
    octave = parseInt(name.slice(-1));
    name = name.slice(0, -1);
  } 

  // Throw an error for an invalid note name
  if (!(/^[A-Ga-g](bb|##|[b#n])?$/).test(name)) {
    throw new Error('Invalid note name:  ' + name);
  }

  return {
    letter: name[0].toUpperCase(),
    acc: name.slice(1) || 'n',
    octave: octave
  };
}
113691
function parseDecorator (fn) {
  return function (pitch) {
    var p = asArray(pitch)
    return p ? fn(p) : null
  }
}
238684
function (chord) {
  var noteRegex = '[A-Ga-g][#b]{0,2}';
  var root = chord.match(new RegExp('^' + noteRegex))[0];
  var bass = null;
  var symbol;

  root = note.create(root);

  // Strip note, strip spaces, strip bass
  symbol = chord.replace(/[\s]/g, '')
                .replace(new RegExp('^' + noteRegex), '')
                .replace(new RegExp('/' + noteRegex + '$'), '');

  bass = chord.match(new RegExp('/' + noteRegex + '$'));
  if (bass) bass = note.create(bass[0].slice(1));

  return { root: root, symbol: symbol, bass: bass };
}
1260182
func ParsePitch(str string) (Pitch, error) {
	matches := pitch.FindStringSubmatch(str)
	if len(matches) < 1 {
		return Pitch{}, fmt.Errorf("no matches found")
	}

	class := matches[1]
	modifier := matches[2]
	octave, err := strconv.Atoi(matches[3])
	if err != nil {
		return Pitch{}, err
	}

	classIndex, err := classNameIndex(class)
	if err != nil {
		return Pitch{}, err
	}

	modifierOffset, err := modifierNameOffset(modifier)
	if err != nil {
		return Pitch{}, err
	}

	return NewPitch(classIndex+1, modifierOffset, octave), nil
}
372997
def _get_name(self):
        """"""
        if self.name is not None:
            return self.name
        if self.scoring_ is None:
            return 'score'
        if isinstance(self.scoring_, str):
            return self.scoring_
        if isinstance(self.scoring_, partial):
            return self.scoring_.func.__name__
        if isinstance(self.scoring_, _BaseScorer):
            return self.scoring_._score_func.__name__
        return self.scoring_.__name__
1011628
def name(self):
    
    base_str = 'd{}{}_'.format(self.derivative_count if
                               self.derivative_count > 1 else '', self.expr)
    for var, count in self.variable_count:
        base_str += 'd{}{}'.format(var,  count if count > 1 else '')
    return base_str
1347927
def result(cls, ab, pa, pitch_list):
        
        atbat = OrderedDict()
        atbat['ball_ct'] = MlbamUtil.get_attribute_stats(ab, 'b', int, None)
        atbat['strike_ct'] = MlbamUtil.get_attribute_stats(ab, 's', int, None)
        atbat['pitch_seq'] = ''.join([pitch['pitch_res'] for pitch in pitch_list])
        atbat['pitch_type_seq'] = '|'.join([pitch['pitch_type'] for pitch in pitch_list])
        atbat['battedball_cd'] = RetroSheet.battedball_cd(pa['event_cd'], pa['event_tx'], pa['ab_des'])
        return atbat
909366
function getName () {
    const pathname = url.parse(parts[parts.length - 1]).pathname;

    return pathname ? pathname.replace('/', '') : pathname;
  }
1114953
public static int pitch_fr3(          /* output: integer part of pitch period        */
	 float exc[],int excs,           /* input : excitation buffer                   */
	 float xn[],int xns,            /* input : target vector                       */
	 float h[], int hs,            /* input : impulse response of filters.        */
	 int l_subfr,           /* input : Length of frame to compute pitch    */
	 int t0_min,            /* input : minimum value in the searched range */
	 int t0_max,            /* input : maximum value in the searched range */
	 int i_subfr,           /* input : indicator for first subframe        */
	 IntegerPointer pit_frac          /* output: chosen fraction                     */
	)
	{
	  int    i, frac;
	  int    lag, t_min, t_max;
	  float  max;
	  float  corr_int;
	  float  corr_v[] = new float[10+2*LD8KConstants.L_INTER4];  /* size: 2*L_INTER4+t0_max-t0_min+1 */
	  int  corr;

	  /* Find interval to compute normalized correlation */

	  t_min = t0_min - LD8KConstants.L_INTER4;
	  t_max = t0_max + LD8KConstants.L_INTER4;

	  corr = -t_min;    /* corr[t_min:t_max] */

	  /* Compute normalized correlation between target and filtered excitation */

	  norm_corr(exc, excs, xn, xns, h, hs, l_subfr, t_min, t_max, corr_v, corr);

	  /* find integer pitch */

	  max = corr_v[corr+t0_min];
	  lag  = t0_min;

	  for(i= t0_min+1; i<=t0_max; i++)
	  {
	    if( corr_v[corr+i] >= max)
	    {
	      max = corr_v[corr+i];
	      lag = i;
	    }
	  }

	  /* If first subframe and lag > 84 do not search fractionnal pitch */

	  if( (i_subfr == 0) && (lag > 84) )
	  {
	    pit_frac.value = 0;
	    return(lag);
	  }

	  /* test the fractions around lag and choose the one which maximizes
	     the interpolated normalized correlation */

	  max  = interpol_3(corr_v, corr+lag, -2);
	  frac = -2;

	  for (i = -1; i <= 2; i++)
	  {
	    corr_int = interpol_3(corr_v, corr+lag, i);
	    if(corr_int > max)
	    {
	      max = corr_int;
	      frac = i;
	    }
	  }

	  /* limit the fraction value in the interval [-1,0,1] */

	  if (frac == -2)
	  {
	    frac = 1;
	    lag -= 1;
	  }
	  if (frac == 2)
	  {
	    frac = -1;
	    lag += 1;
	  }

	  pit_frac.value = frac;

	  return lag;
	}
1251121
function convertFieldName (name) {
  const regex = new RegExp(/\.|\(|\)/g)
  return name.replace(regex, '').replace(/\s/g, '_')
}
121032
public void setPitch (float pitch)
    {
        if (_pitch != pitch) {
            AL10.alSourcef(_id, AL10.AL_PITCH, _pitch = pitch);
        }
    }
822860
public static String getLogicalName(String name, String trailingName) {
        if (isBlank(trailingName)) {
            return name;
        }

        String shortName = getShortName(name);
        if (shortName.indexOf(trailingName) == -1) {
            return name;
        }

        return shortName.substring(0, shortName.length() - trailingName.length());
    }
766
function getNameInitial(name) {
		var namePart = name.split(' ');
		if (namePart.length >= 2) {
			return (namePart[0].charAt(0) + namePart[namePart.length - 1].charAt(0)).toUpperCase();
		} else {
			return name.substr(0, 2);
		}
	}
778353
public void setMusicPitch(float pitch) {
		if (soundWorks) {
			AL10.alSourcef(sources.get(0), AL10.AL_PITCH, pitch);
		}
	}
992018
function getNameFromFileName(filename) {
  var file = basename(filename).replace(/\.(?:pug|jade)$/, '');
  return file.toLowerCase().replace(/[^a-z0-9]+([a-z])/g, function (_, character) {
    return character.toUpperCase();
  }) + 'Template';
}