Giter VIP home page Giter VIP logo

mltype's Introduction

mltype

Command line tool for improving typing speed and accuracy. The main goal is to help programmers practise programming languages.

Demo

Installation

pip install --upgrade mltype

Main features

Text generation

  • Using neural networks to generate text. One can use pretrained networks (see below) or train new ones from scratch.
  • Alternatively, one can read text from a file or provide it manually

Typing interface

  • Dead simple (implemented in curses)
  • Basic statistics - WPM and accuracy
  • Setting target speed
  • Playing against past performances

Documentation and usage

The entrypoint is mlt. To get information on how to use the subcommands use the --help flag (e.g. mlt file --help).

$ mlt
Usage: mlt [OPTIONS] COMMAND [ARGS]...

  Tool for improving typing speed and accuracy

Options:
  --help  Show this message and exit.

Commands:
  file    Type text from a file
  ls      List all language models
  random  Sample characters randomly from a vocabulary
  raw     Provide text manually
  replay  Compete against a past performance
  sample  Sample text from a language
  train   Train a language

Pretrained models

See below for a list of pretrained models. They are stored on a google drive and one needs to download the entire archive.

Name Info Link
C++ Trained on https://github.com/TheAlgorithms/C-Plus-Plus link
CPython Trained on https://github.com/python/cpython/tree/master/Python link
Crime and Punishment Trained on http://www.gutenberg.org/ebooks/2554 link
Dracula Trained on http://www.gutenberg.org/ebooks/345 link
Go Trained on https://github.com/TheAlgorithms/Go link
Haskell Trained on https://github.com/jgm/pandoc link
Java Trained on https://github.com/TheAlgorithms/Java link
JavaScript Trained on https://github.com/trekhleb/javascript-algorithms link
Python Trained on https://github.com/TheAlgorithms/Python link
R Trained on https://github.com/tidyverse/ggplot2 link
Rust Trained on https://github.com/rust-lang/rust/tree/master/compiler link
Scikit-learn Trained on https://github.com/scikit-learn/scikit-learn link

Once you download the file, you will need to place it in ~/.mltype/languages. Note that if the folder does not exist you will have to create it. The file name can be changed to whatever you like. This name will then be used to refer to the model.

To verify that the model was downloaded succesfully, try to sample from it. Note that this might take 20+ seconds the first time around.

mlt sample my_new_model

Feel free to create an issue if you want me to train a model for you. Note that you can also do it yourself easily by reading the documentation (mlt train) and getting a GPU on Google Colab (or elsewhere).

Credits

This project is very much motivated by the The Unreasonable Effectiveness of Recurrent Neural Networks by Andrej Karpathy.

mltype's People

Contributors

jankrepl avatar rushankhan1 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.