Code Monkey home page Code Monkey logo

onomancer's Introduction

onomancer

Distill the ultimate Blaseball name: https://onomancer.sibr.dev

Onomancer lets people submit blaseball names and rate these combinations to distill the ultimate blaseball name. Names are fed through a proprietary* algorithm to generate a full Blaseball player, and can be used to create your own teams to share with friends.

*it's just a seeded RNG

Development

All commands run at project root

Installation

python3 -m venv env
. env/bin/activate
pip install -r requirements.txt

Database setup

ensure virtualenv has been activated

mkdir data
python -m onomancer.database clean bootstrap load

Database CLI commands

  • clean - drops all tables
  • bootstrap - recreates tables
  • load - loads in a hardcoded list of egg names to seed the DB
  • purge "$name" - removes all records containing this name
  • migrate - performs hardcoded DB migration

Generate Secrets

mkdir data
python -m onomancer.scripts generate_csrf_key generate_mod_key generate_appsecret

Run

ensure virtualenv has been activated

python -m onomancer test

Server will start up at 0.0.0.0:5001

Icons

API

Onomancer has a public API if you want to use these voted names in your own project.

Get Name

/api/getName

Gets a single name. Same algorithm that serves up names for rating, which is a chance to be a newly formed name or an existing name that's been upvoted.

Rate limit: 25/s

Parameters:

  • with_stats - generate FK stats for this name

Get Names

/api/getNames

Gets n fully formed names in alphabetical order.

Rate limit: 10/s

Parameters:

  • threshold - filter names with votes at or above this threshold, default 0
  • limit - page size, default 100
  • offset - page offset, default 0
  • random - returns in random order if set to true, default 0
  • with_stats - generate FK stats for each name

Get Eggs

/api/getEggs

Gets n individual eggs in alphabetical order.

Rate limit: 10/s

Parameters:

  • threshold - filter names with votes at or above this threshold, default 0
  • limit - page size, default 100
  • offset - page offset, default 0
  • random - returns in random order if set to true, default 0
  • first - filter names annotated as first at or above this threshold, default empty
  • second - filter names annotated as second at or above this threshold, default empty
  • affinity - value between -1.0 and 1.0. Negative prefers first annotations, positive for second annotations. Default 0.

Crawl Names - experimental

/api/crawlNames/<name>

Given a name, find like names

Rate limit: 1/s

Parameters:

  • threshold - filter names with votes at or above this threshold, default 0
  • limit - page size, default 100
  • fanout - how many iterations to crawl out, default 2, min 1, max 10

Crawl Eggs - experimental

/api/crawlEggs/

Given a comma separated list of eggs, find names that are related to the vibe

Rate limit: 1/s

Parameters:

  • q - comma separated list of eggs
  • threshold - filter names with votes at or above this threshold, default 0
  • fanout - how many iterations to crawl out, default 3
  • limit - page size, default 10
  • egg_threshold - minimum votes an egg must have to be considered for the next iteration of fanout

Generate Stats

/api/generateStats/<name>

Rate limit: 50/s

Given any name, use the letters to seed an RNG to generate FK stats.

/api/generateStats2

Rate limit: 50/s

This version properly handles slashes

Parameters:

  • name - Required

Get or Generate Stats

/api/getOrGenerateStats

Rate limit: 10/s

Given a name, use the letters to seed an RNG to generate FK stats. If the name exists in Blaseball, returns that player info instead. makes external calls to check for existence, treat with respect

Parameters:

  • name - Required

Get Stats

/api/getStats/

Rate limit: 5/s

Given a comma separated lst of guids, returns FK stats for all those names.

Parameters:

  • ids (required) - comma separated list of guids

Get Collection

/api/getCollection

Given the entire share URL or just share code of a Collection, return a JSON blob representing the team with full player stats.

Rate limit: 5/s

Parameters:

  • token - Required. Either the full share URL or just the token (ie everything that comes after shareCollection/ in the share URL). Must be URL encoded.

onomancer's People

Contributors

jmaliksi avatar kore-signet avatar

Stargazers

Venera avatar antonia avatar Joe Deleeuw avatar

Watchers

 avatar

onomancer's Issues

Feature request: Hotkeys

For speed rating. Just the number row 1-4 for Adjudicate and 1-5 for Annotate would work dandily.

Unclear what anything does.

Instructions on how to use website missing or hard to find. The "what" page, while flavorful, is not very helpful.

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.