GithubHelp home page GithubHelp logo

cmonoptus's Introduction

CmonOptus

CmonOptus is a python3 script which runs speed tests every now and again, to see whether the speeds that you're currently getting; are similar to that of what you pay for.

Credit

These users helped me improve this script.

Dependencies

Installation

Part A - Downloading the files

Installing Dependencies

All four dependencies can be installed with Python's package manager, pip.

Option 1 - Installing dependances globally

Once you have pip installed, you can install the four dependencies with:

pip install pyspeedtest tweepy pyyaml

Option 2 - Installing VirtualENV for contained environment

Instead of installing the dependancies globally and potentially breaking other apps, you can install the dependancies in a contained environment. First install virtualenv with:

pip install virtualenv

then set up the virtual environment inside the root repo folder:

virtualenv venv

venv is the name of the folder where all the dependancies will be stored. Now activate venv using the method for your operating system.

Linux/Mac: source venv/bin/activate

Windows: ./venv/Scripts/activate

A requirements file has been created to make installation easier, just type the following to finish installing the dependancies.

pip install -r requirements.txt

You will need to have virtualenv activated whenever you are working, running, or developing on the project. Follow the above instructions again to activate. When finished, you can deactivate by typing deactivate.

Installing CmonOptus

Option 1 - Downloading here

Simply press the download button on this page, then proceed to press 'Download as ZIP'.

Option 2 - Downloading through Git

  1. Firstly, you will need to download Git.
  2. To do this you need to navigate to the following page: git-scm.com.
  3. You should then hit the download button which can be found on that page.
  4. After downloading, install the software as you would any other (just hit next...)
  5. Navigate to your desired directory in Terminal or Command Prompt and execute the following command -
    git clone https://github.com/slavkobojanic/CmonOptus
  6. If you check the folder that you designated to put it in; you should see a folder called 'CmonOptus'.

Part B - Creating a Twitter App

  1. Head to the Twitter App Site.
  2. Hit 'Create New App'.
  3. Fill in the form displayed (only name, description, and website are needed), and agree to the developer agreement.
  4. Hit 'Create App'.
  5. You are now on your app management page, here you can find your app's details.
  6. Hit the 'Keys and Access Tokens' tab near the top of the page.
  7. It will display your consumer key and consumer secret.
  8. To get your access key and access secret, scroll down and hit 'Create my access token'. The page will refresh and display your access codes.
  9. Keep these close-by because they are important for the next part (consumer key, consumer secret, access key, access secret).

Part C - Setting up the config.yaml file

  1. In that /CmonOptus/ folder there is a file named 'config.yaml', open up this file in your favorite text editor and alter the values as needed.
  2. consumer_key, consumer_secret, access_token, and access_token_secret are on the Twitter App Keys and Tokens page
  3. check_interval value should be how often you want the software to run the speed test in seconds (the software randomly generates a time between check_interval0.75 and check_interval1.25, to look more legitimate).
  4. timeout_interval value will set a hard limit on how often CmonOptus can tweet. For example, it has a default of no more than once every hour (3600 seconds).
  5. paid_upload_speed and paid_download_speed should be the internet speed promised in your contract, in Mb/s.
  6. service_provider is the twitter handle of your ISP, keep the twitter handle wrapped in quotes.
  7. location is the state or province you are testing/located in.

Part D - Running the app.

Option A - Simple

  1. Simply run the command (this may be different if you choose to rename the file) - python3 CmonOptus.py
  2. Monitor the software to make sure it's working properly.
  3. Voila.

Option B - Advanced

  1. You can make as many '.yaml' files as you like with different app details, if you have multiple apps.
  2. Run the command - python3 CmonOptus.py (filename).yaml
  3. Monitor the software to make sure it's working properly.
  4. Voila.

cmonoptus's People

Contributors

jantaylor avatar slavkobojanic avatar sp0 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.