Giter Site home page Giter Site logo

ghsp2ofer's Introduction

Python Support Codacy Badge

What's This

On the way to build a fully-automated coding bot.

For Now

It's a functional prototype bot which can replicate code files randomly from designated source. The replicated code is then committed to local git repo and pushed to Github repo.

How2Start

First, be sure you have Python 3.6+ installed. (Python 3.6.5rc1+ recommended)

Optionally create a virtual environment for this bot, and dive into this virtual environment.

python36 -m venv py36_venv\ghsp2ofer py36_venv\ghsp2ofer\Scripts\activate (on Windows)

Download ghsp2ofer and extract to a specific folder, such as ghsp2ofer_bot. change your working directory to ghsp2ofer_bot.

Install required packages.

(ghsp2ofer) pip install -r requirements

Create two necessary directories: ghsp2ofer_bot\cloned_repos, ghsp2ofer_bot\source_repos.

Create an empty repository on Github (wihtout .gitignore). For example, new repository Spoofer.

Rename ghsp2ofer_bot\settings_example.py as ghsp2ofer_bot\settings.py, put necessary information in to ghsp2ofer_bot\settings.py.

  • Set settings.DEFAULT_REPO as Spoofer ( or whatever repository name you created earlier)
  • Set settings.WAIT_STRATEGY, currently two strategies are available:
    1. RandomWaitStrategy: delays next commit by random(settings.RANDOM_MIN_MINUTES, settings.RANDOM_MAX_MINUTES) minutes.
    2. RandomWorkHourStrategy: delays next commit by random(settings.RANDOM_MIN_MINUTES, settings.RANDOM_MAX_MINUTES) minutes if and only if the next commit time lays in settings.WORK_HOURS
  • Set settings.RANDOM_MIN_MINUTES, settings.RANDOM_MAX_MINUTES. The bot will be triggered and sleep for random(settings.RANDOM_MIN_MINUTES, settings.RANDOM_MAX_MINUTES) minutes.
  • Set settings.WORK_HOURS which specifies working hours of this bot.

Create directory ghsp2ofer_bot\source_repos\Spoofer, and put in code files to be replicated.

Final step,

(ghsp2ofer) python bot.py

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.