Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to search GitHub Resources efficiently by python Advanced search

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains the "python advanced search how to achieve efficient search GitHub resources", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "python advanced search how to achieve efficient search GitHub resources" bar!

Search resources search by in keyword

The keyword in can search out the resource name name on GitHub, the description description and the contents of the readme file

# Syntax

Keyword in:

# exampl

Python in:name,description,readme # comma split means or

Search by the number of stars and fork

One of the criteria to judge whether the project is excellent or not by the number of star and fork when searching GitHub

Query by greater than less than

# Syntax

Keyword stars: > = quantity forks: > = quantity

# exampl

Python in:name stars: > 94000 forks: > 2400

Query by scope

The number of star and the number of fork can also be searched by a range.

# Syntax

Keyword stars: range 1. Range 2

# exampl

Python in:name stars:90000..95000

Search by creation and update time

Search by creation and update time to filter out old versions of resources.

# Syntax

# creation time

Keyword created: > = YYYY-MM-DD

# Update time

Keyword pushed: > = YYYY-MM-DD

# exampl

Python in:name created: > = 2020-01-01 pushed: > = 2020-01-01

Search code

There are some restrictions on searching for code in files on GitHub

When you need to search fork resources, you can only search for fork resources with more star than parent resources, and you need to add fork:true query.

Only files less than 384 KB can be searched

Only warehouses with less than 500000 files can be searched

In addition to filename search, search for source code must always include at least one keyword

Search results can show up to two segments of the same file, but there may be more results in the file

Wildcards cannot be used

Search by file content and path

# Syntax

# File content

Keyword in:file

# File path

Keyword in:path

# exampl

Python in:file,path

Search under a resource

# Syntax

Keyword repo: resource

# exampl

Python repo:JustDoPython/python-100-day

Search by language

# Syntax keyword language:LANGUAGE# example python language:javascript # search for python in javascript

Search by file name, size, and extension

# Syntax # File name keyword filename:FILENAME # File size keyword size: > = size # extension keyword extension:EXTENSION # example python filename:aaa size: > 10 extension:py

Thank you for your reading, the above is "python advanced search how to achieve efficient search GitHub resources" content, after the study of this article, I believe you on python advanced search how to achieve efficient search GitHub resources this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report