当前位置: 首页>>代码示例>>Python>>正文


Python Search.search方法代码示例

本文整理汇总了Python中Search.search方法的典型用法代码示例。如果您正苦于以下问题:Python Search.search方法的具体用法?Python Search.search怎么用?Python Search.search使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Search的用法示例。


在下文中一共展示了Search.search方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: highQuality

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
    def highQuality(self):
        global COUNTER
        
        #Search scraper  
        Search.search()

        #Displaying a window massage, telling the user to select their background image
        displayBackgroundMessage()
        imagePath = getImagePath()
        tileFolder = "ImageTiles"
        image = Image.open(imagePath)
        width = image.size[0]
        size = getMuilt(width)

        build_mosaic(
            input_path = imagePath,
            output_path="mosaicImage"+str(COUNTER)+".png",
            collection_path= tileFolder,
            #Enlarge image
            zoom = size,
            #Tile size
            thumb_size = 20,
            fuzz=10,
            new_colormap=False
        )

        COUNTER +=1
        displayFinishMessage()
开发者ID:ThaliaVillalobos,项目名称:Project2Team60,代码行数:30,代码来源:FinalMosaic.py

示例2: default

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
 def default(self, line):
     if len(line) == 0:
         return
         
     if line[-1] == '?':
         print Search.search(self.CE, Parser._parse_pred(line[:-1]))
         return
         
     try:
         self.CE.update(Parser._parse(line))
         print 'Accepted'
     except:
         print traceback.format_exc()
开发者ID:c00w,项目名称:PrologPlus,代码行数:15,代码来源:Interpreter.py

示例3: menu

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
def menu(host, T, t_host):
	while True:
		print ("Scegli azione PEER:\nlogin\t - Login\nquit\t - Quit\n\n")
		choice = input()

		if (choice == "login" or choice == "l"):
			t_host, sessionID = logi.login(host, t_host)
			if sessionID != bytes(const.ERROR_LOG, "ascii"):
				tfunc.success("Session ID: " + str(sessionID, "ascii"))

				listPartOwned = {}

				daemonThreadP = daemon.PeerDaemon(host, listPartOwned)
				daemonThreadP.setName("DAEMON PEER")
				daemonThreadP.setDaemon(True)
				daemonThreadP.start()

				waitingDownload = []

				while True:
					if len(waitingDownload) == 0:
						print ("\n\nScegli azione PEER LOGGATO:\nadd\t - Add File\nsearch\t - Search and Download\nlogout\t - Logout\n\n")
						choice_after_log = input()

						if (choice_after_log == "add" or choice_after_log == "a"):
							add.add(host, sessionID, t_host, listPartOwned)

						elif (choice_after_log == "search" or choice_after_log == "s"):
							src.search(sessionID, host, t_host, listPartOwned, waitingDownload)

						elif (choice_after_log == "logout" or choice_after_log == "l"):
							if (logo.logout(host, t_host, sessionID) > 0):

								break

						else:
							tfunc.error("Wrong Choice!")
					else:
						time.sleep(1)

			else:
				tfunc.error("Errore Login")	

		elif (choice == "quit" or choice == "q"):
			if T:
				logo.quit(host)
			break

		else:
			tfunc.error("Wrong Choice")
开发者ID:tommasoberlose,项目名称:p2p_bittorrent,代码行数:52,代码来源:Menu.py

示例4: get_new_posts

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
 def get_new_posts(query, collection):
     loops = 0
     repeat = False
     to_be_inserted = []
     while (not repeat):
         lst = Search.search(query, loops * MAX_QUERY, modifier="create_ts desc")[1]
         for post in lst:
             if posts_collection.find_one({"item.id":post['item']['id']}):
                 repeat = True
                 break
             else:
                 to_be_inserted.append(post)
         loops += 1
     return to_be_inserted
开发者ID:InsipidPoint,项目名称:showhn,代码行数:16,代码来源:update.py

示例5: mediumQuality

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
    def mediumQuality(self):
        global COUNTER
        Search.search()
        displayBackgroundMessage()    
        imagePath = getImagePath()
        tileFolder = "ImageTiles"
        image = Image.open(imagePath)
        width = image.size[0]
        size = getMuilt(width)

        build_mosaic(
            input_path = imagePath,
            output_path="mosaicImage"+str(COUNTER)+".png",
            collection_path= tileFolder,
            #Enlarge image
            zoom = size,
            #Tile size
            thumb_size = 40,
            fuzz=10,
            new_colormap=False
        )
        
        COUNTER +=1
        displayFinishMessage()
开发者ID:ThaliaVillalobos,项目名称:Project2Team60,代码行数:26,代码来源:FinalMosaic.py

示例6: search

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
 def search(self):
     clear = self.clearText.get(1.0, Tkinter.END)
     rst = Search.search(clear)
     self.encodedText.delete(1.0, Tkinter.END)
     content = Search.jsonParser(rst)
     display = ""
     
     if (len(content) == 0):
         display = "Nothing" 
     else:
         for tweet in content:
             key = tweet.keys()[0]
             display +=  key + " said: \n" + "\t" + tweet.get(key) + "\n\n"
             
         checkReport = False
         for tweet in content:
             if(Search.insertMySQL(tweet)):
                 checkReport = True
         if(checkReport):
             tkMessageBox.showinfo("Insert to database", "Insert successfully" )
     
     self.encodedText.insert(1.0, display)
开发者ID:hugo53,项目名称:HUtweetutils,代码行数:24,代码来源:GUI.py

示例7: search

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
def search(**kwargs):
    return Search.search(**kwargs)
开发者ID:loek17,项目名称:PlexSpotnet.bundle,代码行数:4,代码来源:BaseSpotnet.py

示例8: int

# 需要导入模块: import Search [as 别名]
# 或者: from Search import search [as 别名]
#coding=utf-8
import login
import Search
import json
import analysis
if __name__ == '__main__':
	client = login.APILogin()
	login.browserLogin()
	print "========================="
	print "1.Run the Search Model"
	print "2.Run the Analysis Model"
	choice = int(raw_input("Your choice:"))
	if choice == 1:
		Search.search(client)
	elif choice == 2:
		analysis.analysis(client)
	else:
		print "Invalid choice!"
	
开发者ID:dreamingo,项目名称:Beauty-mining,代码行数:20,代码来源:main.py


注:本文中的Search.search方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。