• Stars
    star
    2
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python Pandas script to search for Arduino libraries matching some keywords and to output to Excel file

arduino_libraries_search

This is a script to search into Arduino library.

Install

This is just a work in progress.

No setup.py as it's just a script and you're supposed to know how to use it by watching code.

Requirements

Install latest development version

$ git clone https://github.com/scls19fr/arduino_libraries_search/
$ cd arduino_libraries_search

Usage

Command line interface

See

$ python arduino_libraries_search.py --help
$ python arduino_libraries_show_license.py --help

Interactive usage

Run IPython

$ ipython

try the following commands

In [1]: import pandas as pd

In [2]: from utils import *

In [3]: pd.set_option('max_rows', MAX_ROWS_DEFAULT)

In [4]: df = download_index()

In [5]: df
Out[5]: 
     architectures             archiveFileName  \
2960            []             A4963-0.2.0.zip   
2959            []             A4963-0.1.0.zip   
2608           [*]  A4990MotorShield-2.0.0.zip   
3163           [*]            ACE128-1.7.0.zip   
3162           [*]            ACE128-1.6.2.zip   
...            ...                         ...   
3718           [*]      wiring_timer-2.4.0.zip   
2310           [*]   xxtea_iot_crypt-1.2.1.zip   
2309           [*]   xxtea_iot_crypt-1.2.0.zip   
2308           [*]   xxtea_iot_crypt-1.1.0.zip   
2307           [*]   xxtea_iot_crypt-1.0.0.zip
...

In [6]: name = "ArduinoJSON"

In [7]: find_nearest_names(name, df)  # passing df is optional
Out[7]: 
                 name     score
1         ArduinoJson  1.000000
2        ArduinoSound  0.666667
3          ArduinoIHC  0.631579
4          ArduinoIRC  0.631579
5          ArduinoSTL  0.631579
...               ...       ...
1532             Luni  0.000000
1533           M10ADC  0.000000
1534         M10CODEC  0.000000
1535          M10DTMF  0.000000
1536  xxtea-iot-crypt  0.000000

[1536 rows x 2 columns]

In [8]: name = find_nearest_name(name, df)

In [9]: name
Out[9]: 'ArduinoJson'

In [10]: get_versions(name, df)  # passing df is optional
Out[11]: 
45    5.9.0
44    5.8.4
43    5.8.3
42    5.8.2
41    5.8.1
      ...  
5     5.0.3
4     5.0.2
3     5.0.1
2     5.0.0
1     4.0.0
Name: version, Length: 45, dtype: object

In [11]: version = get_latest_version(name, df)  # passing df is optional

In [12]: version
Out[12]: '5.9.0'

In [13]: url = get_archive_url(name, version, df)  # passing df is optional

In [14]: url
Out[14]: 'http://downloads.arduino.cc/libraries/github.com/bblanchon/ArduinoJson-5.9.0.zip'

In [15]: show_licence(url)

ArduinoJson-5.9.0/LICENSE.md

The MIT License (MIT)
---------------------

Copyright © 2014-2017 Benoit BLANCHON

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (theSoftware”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDEDAS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

In [16]: show_versions(name)
Out[16]: 
45    5.9.0
44    5.8.4
43    5.8.3
42    5.8.2
41    5.8.1
      ...  
5     5.0.3
4     5.0.2
3     5.0.1
2     5.0.0
1     4.0.0
Name: version, Length: 45, dtype: object

In [17]: show_licence(name)  # to show license of latest version

In [18]: show_licence(name, "5.8.0")  # to show license of a given version

In [19]: search("json")  # several keywords must be separated with a white space (use at your own risk)
                              architectures  \
name                                          
AJSP                                    [*]   
ArduinoJson                             [*]   
Bifrost library for HC-SR04             [*]   
CTBot                                   [*]   
Constellation                           [*]   
IFTTTMaker                              [*]   
InstagramStats                          [*]   
Json Streaming Parser                   [*]   
Marceau                      [avr, esp8266]

Have a look at code to see more commands!

Reading "Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython" may help.

Alternatives

More Repositories

1

pyade

Unofficial Python library to use ADE Web API for ADE Planning from Adesoft
Python
14
star
2

pandas_degreedays

A Python package to calculate degree days (DD or in french DJU - degré jour unifié) from measured outdoor temperatures and to make it possible to quantify drift of energy consumption for heating (or cooling)
Python
12
star
3

pandas-helper-calc

Helper methods for Pandas Series and DataFrames to calculate numerically derivative and integral
Python
9
star
4

ExtensibleScheduler.jl

An advanced and extensible Julia events scheduler. https://scls19fr.github.io/ExtensibleScheduler.jl/dev/
Julia
8
star
5

numpy-buffer

A Python NumPy implementation of ring buffer (aka circular buffer)
Python
7
star
6

python-lms-tools

Python library to manage quiz format(s) used by differents Learning management system (LMS) especially Moodle (currently only Aiken format is supported)
Python
6
star
7

openweathermap_requests

Python package to fetch data from OpenWeatherMap.org with requests and requests-cache
Python
5
star
8

pycondor

Python script to manage Condor Soaring files such as tasks (flight plans)
Python
5
star
9

GPX.jl

A Julia GPX parser (ie reader) and creator (ie writer). GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Julia
5
star
10

Pushover.jl

A simple Pushover client for Julia https://scls19fr.github.io/Pushover.jl/dev
Julia
4
star
11

Sched.jl

A Julia event scheduler inspired by Python sched. https://scls19fr.github.io/Sched.jl/dev/
Julia
4
star
12

pandas-anonymizer

Some functions to anonymize data with Python Pandas
Python
4
star
13

wnb

Weight and balance progressive web application for light aircrafts (SEP, gliders...)
TypeScript
2
star
14

morse-listen

[WIP] Decoding morse code using Python, Machine Learning...
Python
2
star
15

KMLTracks.jl

A Julia library to parse KML files or strings (ie read them) with gx:Track extension
Julia
2
star
16

simulator_keypad

C++
1
star
17

CakeLocale

Project containing a translation effort for the CakePHP core
1
star
18

python-airac

Python library to deal with AIRAC cycle dates
Python
1
star
19

AIRAC.jl

Julia library to deal with AIRAC cycle dates
Julia
1
star
20

openphysic

PHP
1
star
21

polaires_excel

Fichier Excel polaire des vitesses (planeur)
1
star
22

email-verif

A Python email validator. Verify if an email address is valid and really exists.
Python
1
star
23

tkinter_matplotlib_sample

A Python Tkinter example with Matplotlib integration
Python
1
star
24

JuliaVagrant

A Vagrant environment for Julia development (Linux Ubuntu host)
1
star
25

BulkSMS.jl

A Julia package to send SMS (Short Message Service) using BulkSMS API https://scls19fr.github.io/BulkSMS.jl/dev
Julia
1
star
26

web_scraping_sia_python

Unofficial Python library to scrape SIA (Service de l'information aéronautique) website
Python
1
star
27

sia_lua

Unofficial Lua library to download VAC from SIA (Service de l'information aéronautique) website
Lua
1
star
28

Nextion.jl

An unofficial Julia library to communicate with Itead Nextion display
Julia
1
star