Git Product home page Git Product logo

ihutilities's Introduction

ihutilities - miscellaneous useful things

Ian Hopkinson 2021-06-18

This module is installed with:

pip install -e .

Functions

Database utilities

  • configure_db
  • write_to_db
  • update_to_db
  • drop_db_tables,
  • read_db
  • finalise_db,
  • db_config_template

Git utilities

  • git_uncommitted_changes
  • git_sha

I/O utilities

  • write_dictionary
  • pretty_print_dict
  • sort_dict_by_value

Issues

  • report_input_length in ETL_framework can be really slow for a large file

TODO

  • Allow ihutilities to install if MySQL is not present

  • Use PyMySQL as the connector to allow for updates in Python, currently most recent mysql connector is for 3.4: http://stackoverflow.com/questions/35684400/how-to-use-python-3-5-1-with-a-mysql-database

  • I suspect that ETL for large files is slow if a primary key is specified up front because the index is built continuously

  • Use setup and teardown on a per test basis for test_db_utils

  • NROSH snapshot ETL using do_ETL shows that line count is misleading where we are dropping rows

  • At the moment the _id in elasticsearch is autoincrementing, we should be able to explicitly set it (think there is a setting for this)

  • read_es could do with returning search metadata

  • Build_cache should allow you to easily calculate total run time

  • read_db should take templated queries (using the appropriate placeholder and data supplied separately)

  • read_db should only allow select statements

  • Extend testing to io_utils

  • Add in some ngram functionality

  • Currently using scripts for survey_csv, could use console scripts: http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html

ihutilities's People

Contributors

ianhopkinson avatar

Watchers

 avatar  avatar

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.