Code Monkey home page Code Monkey logo

21-playground's Introduction

21 Playground

This repo contains sample applications built on the 21 platform.

Music Recommendation

This app lets you send a name of a music artist and receive a list of related artists via the Spotify API.

Example:

$ python client.py "duke ellington"
You sent duke ellington
{
  "related_artists": [
    {
      "name": "Count Basie",
      "url": "https://open.spotify.com/artist/2jFZlvIea42ZvcCw4OeEdA"
    },
    {
      "name": "Benny Goodman",
      "url": "https://open.spotify.com/artist/1pBuKaLHJlIlqYxQQaflve"
    },
    {
      "name": "Charlie Parker",
      "url": "https://open.spotify.com/artist/4Ww5mwS7BWYjoZTUIrMHfC"
    },
    {
      "name": "John Coltrane",
      "url": "https://open.spotify.com/artist/2hGh5VOeeqimQFxqXvfCUf"
    },
    {
      "name": "Dizzy Gillespie",
      "url": "https://open.spotify.com/artist/5RzjqfPS0Bu4bUMkyNNDpn"
    },
    {
      "name": "Thelonious Monk",
      "url": "https://open.spotify.com/artist/4PDpGtF16XpqvXxsrFwQnN"
    },
    ...
  ]
}

Because of the Spotify API terms of service, the payment required decorator has been disabled.

21-Tor

This app lets you establish a 21 API endpoint behind a Tor hidden service. It requires the stem library.

pip install stem or (in the 21-tor directory) pip install -r requirements.txt

Example:

$ torsocks curl -I http://hpy73zd5fekkduf2.onion/hello
HTTP/1.0 402 PAYMENT REQUIRED
Price: 1000
Username: bitstein
Bitcoin-Address: 13J8mwKK1KT7sEtCCSFnukL1Cu2hX5kXNo
Bitcoin-Micropayment-Server: http://hpy73zd5fekkduf2.onion/payment
Content-Type: text/plain; charset=utf-8
Content-Length: 16
Server: Werkzeug/0.11.2 Python/3.5.0
Date: Tue, 24 Nov 2015 22:52:40 GMT

You may need to change the port number to 9050 or 9051, depending on your Tor proxy.

Note: this is only for demonstrable purposes. Do not use for secure applications as it has not been thoroughly tested.

TODO: Write a client that connects via the socks proxy.

21-playground's People

Contributors

bitstein avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

erikvold

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.