Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grub

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grub

A ridiculously simple search engine factory

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

grub

A ridiculously simple search engine

Example: Search code

from grub import SearchStore
import sklearn  # instead of talking any file, let's search the files of sklearn itself!

path_format = os.path.dirname(sklearn.__file__) + '{}.py'
search = SearchStore(path_format)

Let's search for ANN. That stands for Artificial Neural Networks. Did you know? Well search figures it out, pretty early, that I was talking about neural networks.

search('ANN')  
array(['sklearn/tree/_export.py', 'sklearn/linear_model/_least_angle.py',
       'sklearn/feature_selection/_base.py',
       'sklearn/feature_selection/tests/test_variance_threshold.py',
       'sklearn/neural_network/tests/test_stochastic_optimizers.py',
       'sklearn/neural_network/__init__.py',
       'sklearn/neural_network/_stochastic_optimizers.py',
       'sklearn/neural_network/_multilayer_perceptron.py',
       'sklearn/neural_network/rbm.py',
       'sklearn/neural_network/tests/test_rbm.py'], dtype='<U75')

Let's search for something more complicated. Like a sentence. The results show promise promises: It's about calibration, but related are robustness, feature selection and validation...

search('how to calibrate the estimates of my classifier')  
array(['sklearn/covariance/_robust_covariance.py',
       'sklearn/svm/_classes.py',
       'sklearn/covariance/_elliptic_envelope.py',
       'sklearn/neighbors/_lof.py', 'sklearn/ensemble/_iforest.py',
       'sklearn/feature_selection/_rfe.py', 'sklearn/calibration.py',
       'sklearn/model_selection/_validation.py',
       'sklearn/ensemble/_forest.py', 'sklearn/ensemble/_gb.py'],
      dtype='<U75')

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc