Ask the stage name
345655
def ask_stage
      question = I18n.t :ask_stage_name, scope: :negroku
      stage_name = Ask.input question
      raise "Stage name required" if stage_name.empty?
      stage_name
    end
952616
def playlist(self, playlist_id, *, include_songs=False):
		

		playlist_info = next(
			(
				playlist
				for playlist in self.playlists(include_songs=include_songs)
				if playlist['id'] == playlist_id
			),
			None
		)

		return playlist_info
1010037
def search(self, s, stype=1, offset=0, total='true', limit=60):
        """"""
        action = uri + '/search/get'
        data = {
            's': s,
            'type': stype,
            'offset': offset,
            'total': total,
            'limit': 60
        }
        resp = self.request('POST', action, data)
        if resp['code'] == 200:
            return resp['result']['songs']
        return []
1263546
def get_artists(self, search, start=0, max_items=100):
        
        return self.get_music_service_information('artists', search, start,
                                                  max_items)
1273274
def getDisplayName( self ):
        "  "
        displayName = self.name
        if self.base:
            displayName += "( " + ", ".join( self.base ) + " )"
        return displayName
397647
def select_one_playlist(playlists):
        

        if len(playlists) == 1:
            select_i = 0
        else:
            table = PrettyTable(['Sequence', 'Name'])
            for i, playlist in enumerate(playlists, 1):
                table.add_row([i, playlist['name']])
            click.echo(table)

            select_i = click.prompt('Select one playlist', type=int, default=1)
            while select_i < 1 or select_i > len(playlists):
                select_i = click.prompt('Error Select! Select Again', type=int)

        playlist_id = playlists[select_i-1]['id']
        playlist_name = playlists[select_i-1]['name']
        playlist = Playlist(playlist_id, playlist_name)
        return playlist
858940
function play(name) {
        if (name === 'list') {
            return Object.keys(audio);
        }
        if (!(name in audio)) {
            d.error("Invalid audio name:", name);
            return;
        }

        audio[name].play();
    }
35847
function askQuestions() {
    return request.get('https://app.rung.com.br/api/categories')
        .then(prop('body') & map(({ name, alias: value }) => ({ name, value })))
        .catch(~[{ name: 'Miscellaneous', value: 'miscellaneous' }])
        .then(categories => [
            { name: 'name', message: 'Project name', default: getDefaultName(process.cwd()) },
            { name: 'version', message: 'Version', default: '1.0.0', validate: semver.valid & Boolean },
            { name: 'title', message: 'Title', default: 'Untitled' },
            { name: 'description', message: 'Description' },
            { name: 'category', type: 'list', message: 'Category', default: 'miscellaneous', choices: categories },
            { name: 'license', message: 'license', default: 'MIT' }
        ])
        .then(inquirer.createPromptModule());
}
434279
def get_name(self):
        
        if self.name_idx_value == None:
            self.name_idx_value = self.CM.get_string(self.name_idx)

        return self.name_idx_value
538912
def on_enter_fit_name(self, event):
        
        if self.current_fit == None:
            self.on_btn_add_fit(event)
        value = self.fit_box.GetValue()
        if ':' in value:
            name, color = value.split(':')
        else:
            name, color = value, None
        if name in [x.name for x in self.pmag_results_data['specimens'][self.s]]:
            print('bad name')
            return
        self.current_fit.name = name
        if color in list(self.color_dict.keys()):
            self.current_fit.color = self.color_dict[color]
        self.update_fit_boxes()
        self.plot_high_levels_data()
916107
def get_details(self):
        
        title = str(self.get_title()).strip()
        artist = str(self.get_artist()).strip()
        album = str(self.get_album()).strip()
        year = str(self.get_year()).strip()

        return {
            "title": title,
            "artist": artist,
            "album": album,
            "year": year
        }
325578
def query_names(self, pat):
        """"""

        for item in self.chnames.items():
            if fnmatch.fnmatchcase(item[1], pat):
                print item
153239
function ask(question, cbk, skip) {
      if (skip) {
        cbk(skip);
        return;
      }
      self.prompt(question, function(answ) {
        if (String(answ.answer).trim() === "") {
          return ask(question, cbk);
        } else {
          cbk(answ.answer);
        }
      });
    }
432923
def various?
      joined_names = "#{name} #{appears_as}".downcase

      various_variations = ["vario", "v???????????????rio", "v.a", "vaious", "varios" "vaious", "varoius", "variuos", \
                            "soundtrack", "karaoke", "original cast", "diverse artist"]
      various_variations.each{|various_variation| return true if joined_names.include?(various_variation)}
      return false
    end
508400
def get_artist(self, id_):
        """"""
        endpoint = "artists/{id}".format(id=id_)
        return self._make_request(endpoint)
22427
def matching_details(song_name, song_title, artist):
    '''
    
    '''

    match_name = difflib.SequenceMatcher(None, song_name, song_title).ratio()
    match_title = difflib.SequenceMatcher(None, song_name, artist + song_title).ratio()

    if max(match_name,match_title) >= 0.55:
        return True, max(match_name,match_title)

    else:
        return False, (match_name + match_title) / 2
718781
async function apiDemo () {
    try {
        // Grab the volume
        const volume = await api.volume ();
        console.log ("Current volume: " + volume);

        // Skip to next track
        await api.next ();
        console.log ("Skipped to next track.");

        // View current track
        const track = await api.currentTrack ();
        console.log (`Playing: ${track.artist} - ${track.name}`);

        // Jump to the middle
        const midTime = track.duration / 2;
        await api.position (midTime);
        console.log ("Jumped to the middle of the track");

        // Where are we at now?
        const position = await api.position ();
        console.log ("We're now at " + position + " seconds");

        // Lets play some Calvin Harris
        await api.play ("spotify:track:5bcTCxgc7xVfSaMV3RuVke");
        console.log ("Played Calvin Harris");

        // Pause da tunes
        await api.pause ();
        console.log ("Pausing the playback...");

        // Continue playing
        await api.play ();
        console.log ("Aand resuming. The music is important!");

        // Mute
        await api.mute ();
        console.log ("Muted the client");

        // And unmute
        await api.unmute ();
        console.log ("But we want to hear the music!");

        // Now open the window, we might want to do a search
        await api.focusWindow ();
        console.log ("Gotta open this window right here");

        // Or, enable shuffling
        await api.setShuffling (true);
        // or setRepeat (true)

        // Are we repeating?
        const repeatState = await api.repeating ();
        console.log ("We are " + ((repeatState) ? "" : "not ") + "repeating!");
    } catch (err) {
        console.log (err.stack);
    }
}