Coder Social home page Coder Social logo

opengenus / falcon Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 5.0 470 KB

Falcon: A library to use Cosmos conveniently

Home Page: https://discourse.opengenus.org

License: The Unlicense

Python 29.42% OpenEdge ABL 70.58%
opengenus openfalcon algorithms data-structures cosmos

falcon's Introduction

Falcon

Falcon is a library which allows you to use the Cosmos library in a convenient way. Currently it has features like Search, Recommendation, etc

This repository is based out in python scripts and is currently ported to python 3.x, Now lets begin with the features.

Installation

Install openfalcon from PyPI using the command:

pip3 install openfalcon --user

Usage

openfalcon

You can make use of the openfalcon interface for easily using all the services available in the repo. Start by launching a terminal window. Now, for usage just look up the help or refer the below sections to understand what each of the service can offer.

Clone the Repository

To start first we need to clone the cosmos repository using the index.py file by writing openfalcon --clone command.

Search For Files

A simple search for files in the cosmos repo can be done using the command openfalcon --search="greedy algorithms" --results=3 here we have two options

  • search(Required) : We enter the search term here.
  • results(Optional) : The integer value shows the top number of results, like above shows top 3 results and not specifying any values for it will result in showing ALL results for search.
  • Results of above command :
code greedy algorithms
greedy algorithms
greedy algorithms kruskal minimum spanning tree

If you want to have output in json format, then you need to use openfalcon --search="greedy algorithms" --results=3 --output=json command.

  • output(Optional) : Format of output should be entered here. If "json" will be entered then json format output will be printed on the console.

A json output will include the search term, number of results, search results and time taken for searching the results. Results of above command :

{
    'searchTearm': 'greedy algorithms',
    'numResults': 3, 
    'results': ['code greedy algorithms', 'greedy algorithms', 'greedy algorithms kruskal minimum spanning tree'],
    'timeTaken': 0.0015103816986083984
}
Recommendations

User can seek recommendation for search terms using the command openfalcon --recommend artificial --type parent --top 3 , here we have two options

  • recommend(Required) : We enter the recommendation term here.
  • type(Optional) : By default this value is all which will search for the term in complete directory tree, if parent is entered then only parent directories are recommended and if child is entered then only child directories can be recommended.
  • top(Optional) : Missing the parameters results in showing of all results and we can enter integers to restrict the number of returned results.
Edit/Delete Code

The file code.py can be used to search the code in a given language in the complete cosmos directory and can be used to edit/ delete code, can be used using the command openfalcon --code --term linear --language cpp , this will open the top file matching with term linear in cpp

  • term(Required) : We enter the search term here.
  • language(Required) : We enter the language in which we want the final results, the value of the parameter is the extension of language in which code is required.
  • Results of above command
search linear search
search linear search
artificial intelligence Linear Regression
[{'category': 'linear search', 'description': 'search linear search', 'location': '/code/search/src/linear_search'}, {'category': 'Linear Regression', 'description': 'artificial intelligence Linear Regression', 'location': '/code/artificial_intelligence/src/Linear_Regression'}]

Generate List of Implemented Algorithms

What's the stats script?

The stats script deals with generating a progress list of the cosmos repo, by taking into account all algorithms currently existing in the repo and categorizing them based on the languages used to implement them.

How to run?

make sure that you're in the falcon project root directory

for generating the output in txt file :-

openfalcon --stats -f txt > ./STATS.txt

for generating the output in md file :-

openfalcon --stats -f md > ./STATS.md

For Contributors

You can find all of the code here. All features code is present in the services directory. After making any changes, run all the commands starting with the command pip3 install --user pipenv to test locally.

Please feel free to report any issues or request new features.

falcon's People

Contributors

adichat avatar nisarg1499 avatar pratiksinghchauhan avatar r0uxt1 avatar yedhink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

falcon's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.