Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/n/i/Nimdok-HEAD/Modules/lastfm.py   Nimdok(Download)
            if album != '':
                bot.msg(channel, stylize.Bold(user) + ' ' + state + ' ' + \
                                 stylize.Bold(stylize.Trunicate(artist, 45)) + ' - ' + \
                                 stylize.Bold(stylize.Trunicate(track, 65)) + ' (Album: ' + \
                                 album + ')')
            else:
                bot.msg(channel, stylize.Bold(user) + ' ' + state + ' ' + \
                                 stylize.Bold(stylize.Trunicate(artist, 45)) + ' - ' + \
                                 stylize.Bold(stylize.Trunicate(track, 65)))

src/n/i/Nimdok-HEAD/Modules/chan.py   Nimdok(Download)
                    )
                    if 'sub' in jo[0]:
                        info += " | %s" % stylize.Trunicate(unescape(jo[0]["sub"]))
                    if 'com' in jo[0]:
                        comment = BeautifulSoup(unescape(jo[0]["com"]).replace("<br>","\n")).text
                        comment = ' '.join([l if l[0] != '>' else stylize.SetColor(l, stylize.Color.Green) for l in comment.split('\n') if len(l) > 0])
                        info += " | " + stylize.Trunicate(comment, 40)

src/n/i/Nimdok-HEAD/Modules/youtube.py   Nimdok(Download)
                fmt = u"%s %s %s %s | %s views"
                info = fmt % (
                        stylize.Bold(stylize.Trunicate(data["title"], 60)),
                        '| '+data["author"],
                        stylize.SetColor(u"↑" + humanize.intcomma(data["likes"]), stylize.Color.Green),

src/n/i/Nimdok-HEAD/Modules/wolfram.py   Nimdok(Download)
    result = tree.find('pod').find('subpod').find('plaintext').text
    result = result.encode('UTF-8', 'ignore') #fucking unicode
    bot.msg(channel, "%s: %s" % (user, stylize.Trunicate(result.split('\n')[0] ,300)))
  elif len(tree.findall('tips')) > 0:
      bot.msg(channel, "%s: %s" % (user, tree.find('tips').find('tip').get('text')))

src/n/i/Nimdok-HEAD/Modules/urbandictionary.py   Nimdok(Download)
            bot.msg(channel, user + ': That word is not defined.')
        else:
            definition = stylize.Trunicate(data['list'][0]['definition'].encode('utf-8'), 250)
            bot.msg(channel, user + ': ' + definition)
 

src/n/i/Nimdok-HEAD/Modules/execpython.py   Nimdok(Download)
        bot.msg(channel, "%s: %s" % (user, paste))
    elif len(resp) > 300:
        bot.msg(channel, stylize.Trunicate(resp ,300))
        paste = urllib2.urlopen("https://nnmm.nl/", urllib2.quote(resp)).read()
        bot.msg(channel, "%s: %s" % (user, paste))

src/n/i/Nimdok-HEAD/Modules/execgo.py   Nimdok(Download)
        bot.msg(channel, "%s: %s" % (user, paste))
    elif len(result) > 300:
        bot.msg(channel, stylize.Trunicate(result ,300))
        paste = urllib2.urlopen("https://nnmm.nl/", urllib2.quote(prog+"\n\n"+result)).read()
        bot.msg(channel, "%s: %s" % (user, paste))

src/n/i/Nimdok-HEAD/Modules/urlinfo.py   Nimdok(Download)
                    bot.msg(channel, e)
                else:
                    bot.msg(channel, stylize.Trunicate(source))
            else:
                try: # urllib2
                elif "text" in mimetype.lower():
                    txt = urllib2.urlopen(m).read().replace("\n", " ").replace("\r", "")
                    bot.msg(channel, stylize.Trunicate(txt))
                else:
                    try: # urllib2