[VARIABLE my_singer_id]
331766
public void write(long singerId) {
    // [START write]
    Mutation mutation =
        Mutation.newInsertBuilder("Singer")
            .set("SingerId")
            .to(singerId)
            .set("FirstName")
            .to("Billy")
            .set("LastName")
            .to("Joel")
            .build();
    dbClient.write(Collections.singletonList(mutation));
    // [END write]
  }
1104410
function parseVariableIdentifier() {
        var token, startToken;

        startToken = lookahead;
        token = lex();

        if (token.type !== Token.Identifier) {
            throwUnexpected(token);
        }

        return delegate.markEnd(delegate.createIdentifier(token.value), startToken);
    }
459683
def _variable(lexer):
    """"""
    names = _names(lexer)

    tok = next(lexer)
    # NAMES '[' ... ']'
    if isinstance(tok, LBRACK):
        indices = _indices(lexer)
        _expect_token(lexer, {RBRACK})
    # NAMES
    else:
        lexer.unpop_token(tok)
        indices = tuple()

    return ('var', names, indices)
373855
def artist(netease, name, id):
    """"""
    if name:
        netease.download_artist_by_search(name)

    if id:
        netease.download_artist_by_id(id, 'artist'+str(id))
1200986
private CustomVariable getCustomVariable(String parameter, int index){        
        CustomVariableList cvl = (CustomVariableList)parameters.get(parameter);
        if (cvl == null){
            return null;
        }
        
        return cvl.get(index);
    }
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
1342386
def song(self, song_id):
		

		if song_id.startswith('T'):
			song_info = self._call(
				mc_calls.FetchTrack,
				song_id
			).body
		else:
			song_info = next(
				(
					song
					for song in self.songs()
					if song['id'] == song_id
				),
				None
			)

		return song_info
1289977
def str2midi(note_string):
  
  if note_string == "?":
    return nan
  data = note_string.strip().lower()
  name2delta = {"c": -9, "d": -7, "e": -5, "f": -4, "g": -2, "a": 0, "b": 2}
  accident2delta = {"b": -1, "#": 1, "x": 2}
  accidents = list(it.takewhile(lambda el: el in accident2delta, data[1:]))
  octave_delta = int(data[len(accidents) + 1:]) - 4
  return (MIDI_A4 +
          name2delta[data[0]] + # Name
          sum(accident2delta[ac] for ac in accidents) + # Accident
          12 * octave_delta # Octave
         )
1192176
function(id) {
      var self = this;

      // Loop through all sounds and find the one with this ID.
      for (var i=0; i<self._sounds.length; i++) {
        if (id === self._sounds[i]._id) {
          return self._sounds[i];
        }
      }

      return null;
    }
24334
def _get_variable_name_or_register(var, variables, names, params, prefix):
    '''
    
    '''
    if var not in variables.values():
        vname = prefix
        if var.data in params:
            vname = params[var.data]
        elif var in names:
            vname = names[var]
        vname = _get_unique_variable_name(vname, variables)
        variables[vname] = var
    else:
        vname = list(variables.keys())[list(variables.values()).index(var)]

    return vname
1240895
public String getVariableAsString(String name) {
        TraceState ts = traceState.get();

        if (ts != null) {
            Object variable = ts.getVariables().get(name);
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Get variable '" + name + "' = " + variable);
            }
            return variable == null ? null : variable.toString();
        }

        if (log.isLoggable(Level.FINEST)) {
            log.finest("Get variable '" + name + "' requested, but no trace state");
        }
        return null;
    }
668789
def name(self, value):
        
        if not isinstance(value, six.string_types):
            raise ValueError("Pass a string")
        self._properties["id"] = value
552677
def MakeID3v1(id3):
    """"""

    v1 = {}

    for v2id, name in {"TIT2": "title", "TPE1": "artist",
                       "TALB": "album"}.items():
        if v2id in id3:
            text = id3[v2id].text[0].encode('latin1', 'replace')[:30]
        else:
            text = b""
        v1[name] = text + (b"\x00" * (30 - len(text)))

    if "COMM" in id3:
        cmnt = id3["COMM"].text[0].encode('latin1', 'replace')[:28]
    else:
        cmnt = b""
    v1["comment"] = cmnt + (b"\x00" * (29 - len(cmnt)))

    if "TRCK" in id3:
        try:
            v1["track"] = chr_(+id3["TRCK"])
        except ValueError:
            v1["track"] = b"\x00"
    else:
        v1["track"] = b"\x00"

    if "TCON" in id3:
        try:
            genre = id3["TCON"].genres[0]
        except IndexError:
            pass
        else:
            if genre in TCON.GENRES:
                v1["genre"] = chr_(TCON.GENRES.index(genre))
    if "genre" not in v1:
        v1["genre"] = b"\xff"

    if "TDRC" in id3:
        year = text_type(id3["TDRC"]).encode('ascii')
    elif "TYER" in id3:
        year = text_type(id3["TYER"]).encode('ascii')
    else:
        year = b""
    v1["year"] = (year + b"\x00\x00\x00\x00")[:4]

    return (
        b"TAG" +
        v1["title"] +
        v1["artist"] +
        v1["album"] +
        v1["year"] +
        v1["comment"] +
        v1["track"] +
        v1["genre"]
    )
758639
def download_artist_by_id(self, artist_id, artist_name):
        

        try:
            # use old api
            songs = self.crawler.get_artists_hot_songs(artist_id)
        except RequestException as exception:
            click.echo(exception)
        else:
            folder = os.path.join(self.folder, artist_name)
            for song in songs:
                self.download_song_by_id(song.song_id, song.song_name, folder)
296626
def get_variable_str(self):
        
        if self.var_name is None:
            prefix = ''
        else:
            prefix = self.var_name

        suffix = str(self.var_value)
        if len(suffix) == 0:
            suffix = "''"
        elif len(suffix) > self.__max_str_length_displayed__:
            suffix = ''

        if len(prefix) > 0 and len(suffix) > 0:
            return prefix + '=' + suffix
        else:
            return prefix + suffix
1077626
def printed_out(self, name):
        
        out = ''
        out += '|\n'
        if self._id_variable:
            subs = '[{}]'.format(self._id_variable)
        else:
            subs = ''
        out += '|---{}{}\n'.format(name, subs)
        if self._description:
            out += '|   |   {}\n'.format(self._description)
        for name, action in self._actions.items():
            out += action.printed_out(name)
        return out
218729
def format(self, pattern):
        
        pattern = pattern.replace('%a', self.artist.name)
        pattern = pattern.replace('%s', self.name)
        pattern = pattern.replace('%A', self.album.name)
        return pattern.replace('/', '') \
                      .replace('\\', '') \
                      .replace(":", "") \
                      .replace("*", "") \
                      .replace("?", "") \
                      .replace('"', "") \
                      .replace("|", "") \
                      .replace("<", "") \
                      .replace(">", "")