Rules for Posting - Read me!
Some rules and guidelines to keep in mind as you share your great work on our boards: 1 - Be kind and courteous to others 2 - Make sure that any feedback you provide is constructive. 3 - Outside links are allowed, but you must provide the source. Ideally, things that you post will have been created on 4 - Avoid posting overly promotional material - the focus is, and always will be, a programming, learning, and collaborative community. :) 5 - Don't spam / keep things SFW (Safe For Work). We may revoke your access to these boards if you are found to be in violation of any of these rules. Feel free to ask clarifying questions. Last updated 7/10/18 12:09 PST
posted to Share by timmy_i_chen (541) 8 months ago
Artificial Intelligence Competition Results
# Artificial Intelligence Competition Results ![AI Bot]( The [Artificial Intelligence Competition]( has officially come to an end! For this competition, we asked users to build a bot using machine learning to perform various tasks. They could choose themselves what they wanted to build, as long as the program was able to do something on its own, or demonstrate any level of intelligence. Artificial Intelligence has always been a very popular subject among users, which is why we decided to dedicate an entire competition to it! The results exceeded our expectations: we've received an enormous amount (400+ in total!) repls from both existing and new users from all levels! Their submitted bots could perform all sorts of tasks, whether it was chess, a chatbot, or even a "doctor" to recognize your symptoms: the bots could help us with many things! It was exciting to see what the possibilities with AI are and how creative you can get with machine learning, no matter which language. Although we've received many extremely impressive bots, there can only be 3 winners! The winners were chosen based on the amount of votes by our users and the staff. --- ## Winners **First Place**: Congratulations @PixelBitez, you're the winner of this months's competition and receive a $100 Amazon Giftcard! @PixelBitez's [Dragon Eye RPG]( is a game that generates a story and determines enemy moves based on the decisions the user has made. Make sure to check it out! **Second Place**: Amazing work @ArpanDhatt! You definitely deserve to come in second place with your [Wikigoogler AI]( and receive a $50 Amazon Giftcard! Ask this bot any question you like, and it tries to find which answer it thinks is the most correct out of the choices you give it! If only this worked for figuring out where to eat.. **Third Place** : Well done @LucHutton, you receive the $25 Amazon Giftcard! His impressive [Connect 4 AI]( was built using HTML, CSS and JavaScript! It's definitely not easy to win from this AI, so try it out and see if you can beat it! --- Some impressive bots unfortunately didn't make the top 3, however they definitely deserve some attention: - [Ultimate AI]( by @PCL learns how to answer questions based on your previous answers! - [Bob]( by @Casidar is an interactive AI that can perform many tasks. Whether you want to play a game, want to hear a joke, or need to calculate something: Bob can help you out! - The [Sketch Identifier]( bot by @ArpanDhatt is basically the teammate everyone wants while playing Pictionary. It uses Tensorflow to guess what you've drawn and shows the different possibilities in a chart! Show your creative side and see if this AI can guess what you've drawn! - [Student Bot]( by @derulan can write stories using a predictive text algorithm after you've given it some text to train! - [Poe]( by @joshwood is a true poet! Train Poe, and it can generate sonnets or haikus on any subject you like. - [Scavenger Hunt]( by @jajoosam is the perfect way for programmers to finally leave their computers and start running through the house! You have to fetch the objects it tells you to get, and uses ml5 to recognize whether you've gotten the correct object. --- If you weren't one of the lucky winners, don't worry! There will be many more competitions in the future on various subjects, and hopefully everyone can learn from the feedback you get on your repl. We really hope to see your submission on our next competition! --- ## Feedback Did you enjoy this competition? Do you have feedback for us on how to make it better next time? We would really appreciate your feedback, and would love to see what you think of our competitions [here]( Thank you so much!
posted to Challenge by lydiahallie (20) 8 days ago
this is a test
posted to Ask by amasad (779) 2 hours ago
Link extendus
Extendus link
posted to Share by mrsprinkletoes (4) 7 hours ago
Javascript assistance please....
Hi, I am studying to be a Software Developer. Working on a work project which i need assistance with Javascript. I am trying to Develop Software program for testing Air Pressure. I need to be able to Enter a pressure reading eg. 0.5bar... into a <table> <td> and create a 'var' or 'function' to tell me that this is correct and enter the correct statement into another <td>. There will be a tolerance for these pressures. reading will have to be between 0.4bar-1.0bar. So result should state 'true' or 'false'. Hope this makes sense... If anyone could help it would be absolutely great... Thank you very much, Mark
posted to Ask by MarcoKirwan (0) 4 hours ago
int() function broken?
I have an input that I turn into an integer for some math stuff, but when I put in a decimal, it comes out with an error: ValueError: Invalid literal for int() with base 10: '1.75'
posted to Ask by johnj (31) 2 hours ago
Hosting bots with
# Hosting []( bots on []( *This tutorial shows you how you can host your **** bots on [](* *Before you start, you should already have a working bot. Also, this really doesn't matter if you're using [ async]( or [ rewrite]( Works like a charm for both!* *Just to ease things, we'll be using the end product of [this tutorial](* ------ ### What we'll be doing? 1. *Creating a web server.* 2. *Using [uptimerobot]( to ping our bot every 30 minutes.* *We do this because our repl goes offline after 1 hour of inactivity. So we keep pinging the repl every 30 minutes, to avoid it being idle for one hour.* # Step 1: The requirements.txt file. Once you have your bot ready for hosting create a new file named `requirements.txt` in the root directory of your [python repl]( Open it up, the `requirements.txt` file holds all your project dependencies. Make sure to add the appropriate package names for the packages you're already using. A sample file for basic bots are given below: - ------ ``` git+[email protected][voice] ``` `requirements.txt` for a rewrite bot. ------ ``` ``` `requirements.txt` for a async bot. ------ Now that you have the basic requirements ready, add one more requirement i.e. `flask`. Making your `requirements.txt` something like: - ``` git+[email protected][voice] flask ``` **Note :** *I am sticking to rewrite bot, but it really doesn't matter again.* ------ [flask]( is a python module for handling [http requests]( ------ # Step 2: Setting up a server Setting up a server using Flask is very easy. But to keep things simple and your bot's file clean, we'll make a server in a new file and name it `` since that is what most people like to call the file that helps keep their bot alive. Open up the `` file and import `Flask` also import `Thread` you can learn more about Threads [here]( ```python from flask import Flask from threading import Thread ``` We didn't have to add threading to our requirements since it comes with python. Next, create the actual server. ```python app = Flask('') ``` Easy, isn't it? But it's not over just yet. Next, we add a route. A route is basically what handles http requests. Without a route the existence of our server does nothing. So add the following code ```python @app.route('/') def main(): return "Your bot is alive!" ``` `@app.route()` is a decorator which defines a route. `'/'` is the default route or the homepage of our server. The `main` function is called whenever a user makes a request to the `'/'` route which basically returns whatever has to displayed on the webpage, here we simply send the string `Your bot is alive` to keep things simple. Now that our server is ready, we need to make sure that it runs and http requests can be made to it. ```python def run():"", port=8080) ``` You can basically put any 4 digit number in port which is not already in use. The defaults for python is `8080` and that's what we'll stick to. Finally, we make a function that we can call to prepare our server and allow it to be pinged. ```python def keep_alive(): server = Thread(target=run) server.start() ``` And we're basically done with our `` file. ------ # Step 3: Combining the server and bot. Now that we're done making both the bot and the server, we need to combine the two. That is easy too, open up the `` file ( or whatever file has the `` function in it ) and add the following line at the top: - ```python import keep_alive ``` This will import the keep_alive file in your bot's main file. Now just before starting the bot, at the bottom of the same file write the following code: - ```python keep_alive.keep_alive() ``` This will run the `keep_alive()` function that we defined in the `` file earlier. And now your server is ready too! Run the bot, you should see something like this: - ![Keep Alive]( Notice that small window saying `Your bot is alive!` if you see it, you successfully created the server! Only the last step remains! Before you go into the last step, make sure to copy the `` link you see in that small window's address bar. (`` in the picture, it will be referred to as the `server link` in the rest of the tutorial) And in case you don't see it, go through this tutorial again and make sure you didn't miss something, also if it retains, don't hesitate to comment and tell me. ------ # Step 4: Setting up [uptimerobot]( First of all visit and register an account just like any other website. (It is free of course) Next, Once, you're logged in, 1. Click on the `New Monitor` button. ![Imgur]( 2. Next, choose the `HTTP(S)` Monitor Type. Give it a friendly name of your choice ( naming it after your bot is recommended ) Paste your `server link` in the `URL/IP` field. Set the Monitoring Interval to anything between 5 minutes to 45 minutes. ( 30 minutes is recommended) Optionally, Select yourself as one of the `"Alert Contacts To Notify"` so you are notified via e-mail whenever your bot goes offline. Finally making it look something like this: - ![Uptimerobot final monitor]( 3. Click on `Create Monitor` and you're good to go! ------ Now you're bot will stay online for as long as it can. *( Repl it being just another host, won't be able to host it 24/7 so it **will** have a downtime of a few minutes within every 24 hours.)* And you're done! > Please upvote if you found this useful! > > Also, comment down below if there's something you would like to share or ask. And finally, thanks for reading it!
posted to Learn by TheDrone7 (29) 10 hours ago
This Hangman WORKS!
A fun game with Ascii art!
posted to Share by goodthoughts (25) 1 day ago
Native Browser Javascript
I can't create a native browser javascript repl. When I create a repl by selecting JS it creates repl by node.js where I can't use like a browser console. But I have seen someone can create repl by native browser javascript. So how can i enable that?
posted to Ask by rrifat (0) 4 hours ago
Ascii Typer
An ascii typer. (Version [1.0] [letters, numbers, and symbols work and there is letter spacing])
posted to Share by AZRIELGIESWEIN (7) 1 day ago
Don't ever lose your data again with [ JS Edition ]
Inspired from @leon332157 's library for in python, here is one for JavaScript. This library was built to allow people to easily make transactions with []( in node.js ## Installation Use `npm i async-jsonstore-io` in your preferred terminal / command prompt or just install it from the []( packages tab. Include it in your app using ```javascript const JsonStoreClient = require('async-jsonstore-io') ``` ------ Here's a link to the [github repository]( ( It will be greatly appreciated if you star it too. ) [Official page]( ( also contains the docs for more help ) [Here's an example repl that shows how it all works!]( Also make sure to check out []( to see what it is if you don't already know. ------
posted to Share by TheDrone7 (29) 15 hours ago
posted to Share by SeungWhoiKim (1) 6 hours ago
Omni - A Virtual Assistant
# Omni - Voice Assistant Omni is an online virtual assistant that uses speech recognition and speech synthesis. It can answer questions, using over 100 sources (Wikipedia, IMBd, The Free Dictionary, etc). Features include: - Getting the weather - Image Searching - Playing Music For people who would rather type, the user's chatbox is editable (pressing enter would cause Omni to start processing). *** ### Below is a full list of commands: | Command | Example | | ------ | ------ | | *Answering Questions| "What is DuckDuckGo", "Who is Larry Page" "What are the Simpsons Characters| | SoundCloud| "Play Rock on SoundCloud", "Play Alone by Marshmello on SoundCloud" | | YouTube| "Play Despacito", "Play Ice Bucket Challenge Videos" | | Current Weather| "Is it snowing", "What is the Temperature" | | Location-Based Weather| "What is the weather in London", "Weather of China" | |Image Searching (Flickr)| "Show me an image of a cat", "Picture of a Mountain Range" | | Small Talk | "How are you", "What's your name" | | Timer | "Set a timer for one hour and twenty minutes", "Make a timer for one minute and two seconds" | | Time | "What's the time"| | Date | "What day is it today", "What's the date"| *~~CORS (Cross-Origin Resource Sharing) blocks javascript from getting a few answers. The solution is to use server-side languages like PHP, but it requires owning a server.~~ **Found a [workaround](!** *** ### Settings | Setting | Description | | ------ | ------ | | Hey Omni| Voice-Activation (like Hey Siri). **Work in Progress**| | User Language and Dialect| Changes the Speech Recognition language/dialect. **Only English is supported so far**| | Omni Voice| Changes Omni's voice. **It only speaks in English so far**, so changing the language would make it have an accent (which is fun).| | Omni Volume| Changes the Omni's volume (max is the default)| | Omni Rate| Changes the Omni's rate of speech | | Omni Pitch| Changes the Omni's pitch (middle is the default)| *** ### How does Omni find its answers? Results that don't fit into any function are split into 4 categories: - A (article), - C (categories) - D (disambiguation) - E (exclusive) **Article answers** give an abstract/summary of the answer, using sources such as Wikipedia and IMBd. **Disambiguation answers** mean that the result is not specific enough (more than one possible answer). For example, the word "Apple" could mean the company or the fruit. For this reason, the reply is a bullet list of more specific answers. **Category answers** are from results such as "Simpsons Characters", where the answer is a list of characters in The Simpsons. **Exclusive answers** mean it is something with a definite answer, rather than defining something. For example, 2*2 or the size of Earth. ### Example (GIF) ![]( #### Important: **You have to open the repl in a new tab** This is because the functions (keyboard & microphone) won't work.
posted to Challenge by cloud9c (69) 11 days ago
String - mIxEd cAsE
Ok, so I found another issue with my code. I was testing it with different words and this happened: eNvIrONMeNt It's supposed to look like this: eNvIrOnMeNt Any ideas as to how I can fix this?
posted to Ask by 20rduncan (1) 7 hours ago
🔴[NEW]🔴 Python Lib for DON'T LOSE YOUR DATA AGAIN WITH JSON STORE 🔴[NEW]🔴 This is a client to interact with , an online json storage platform. GitHub repo: 🔴STAR IT NOW 🔴 :star: :star: :star: ## Installation Add 'json-store-client' to your requirement.txt ## Usage ```python import json_store_client jsonStoreToken = "..." # Insert your token here. client = json_store_client.Client(jsonStoreToken) # Save data to the "foo" key."foo", {"alfa": "bravo", "charlie": "delta"}) # Get the data from the "foo" key. data = client.retrieve("foo") print(data["alfa"]) # => "bravo" # Deletes the data after printing parts of it. client.delete("foo") ``` ## json-store-client API ### json_store_client.Client(token) Returns the client to use for data operations. ###### token (str): The API token from []( ###, data[, timeout]) Storing data in jsonstore with a key ###### key (str): The key to be stored on jsonstore ###### data (any): The data to be stored under the key. It can be any Python objects. Will be processed with [jsonpickle]( ###### timeout (int): The timeout for the http request. Default 5 seconds ### client.retrieve(key[, timeout]) Retrieve data in jsonstore with a key ###### key (str): The key to get on jsonstore ###### timeout (int): The timeout for the http request. Default 5 seconds ### client.delete(key[, timeout]) Delete data in jsonstore with a key ###### key (str): The key to get on jsonstore ###### timeout (int): The timeout for the http request. Default 5 seconds
posted to Share by leon332157 (28) 2 days ago
Wikigoogler (Question Answering Bot)
# Wikigoogler: It's trying its best ! This is Wikigoogler, an AI which uses the power of Google and Wikipedia to find which answer it thinks is the most correct out of the choices you give it! Wikigoogler was formerly part of an HQ Trivia Bot(I never won any money, but it was a lot of fun making it). Here are a couple of questions I asked it and the answers I got: What is the best operating system? Linux, Windows, MacOS Wikigoogler thinks its Linux. Looks like it knows its stuff! ;) What is the most popular programming language? Python, Javascript, C++, Java, Rust, Ruby Wikigoogler thinks it is Javascript! I hope you guys have fun playing with this! Sometimes it comes up with really funny stuff! Do you want to know what the best programming language is? Ask Wikigoogler and give it some answer choices! I hope you all have fun playing with it! If you think it's cool, click that upvote button! If you have any questions, I'd love to answer them(or maybe you can just ask Wikigoogler! :D).
posted to Challenge by ArpanDhatt (114) 21 days ago
🤖Ultimate A.I.🤖
This is Ultimate A.I. He learns how to answer questions and chat the more you speak to him.This was made using a basic neural network I invented. ![Capture](
posted to Challenge by PCL (121) 25 days ago
Unbeatable Tic Tac Toe
To play, use the numpad to select your square and try to get 3 X's in a row. You will not win a game of tic tac toe against this AI. But if you do, please leave a comment with the moves you used so I can fix it. Here is a layout of the board if you don't have a num pad or are confused how that works: 7 | 8 | 9 ---------- 4 | 5 | 6 ---------- 1 | 2 | 3 ----------
posted to Challenge by TrentBultsma (42) 15 days ago
👊 Live PewDiePie sub count 👊
# Subscribe To PewDiePie PewDiePie, the most subscribed to YouTube channel is in danger. A large bad corporation by the name of T-Series is threatening to surpass PewDiePie but us 9 year olds cannot allow this. Subscribe to PewDiePie today and do your part. Here's the link to automatically subscribe to PewDiePie: Here's a live PewDiePie vs T-Series sub count (made by me),, now ***GO DO YOUR PART AND SUBSCRIBE TO PEWDIEPIE TODAY*** Leave a comment if you subscribed or are already subscribed to PewDiePie ;)
posted to Share by mat1 (747) 13 days ago
Dragon Eye RPG
This is an RPG made for the AI competition. The game is intelligent by generating a story and determining enemy moves. # About Dragon Eye is a terminal based RPG. It may not be a AAA game, but it does have one special thing about it. Since there is no story, the game is generated by an AI based on decisions you have made. ![image]( # Enemies You can fight a variety of enemy's in the game. Before combat the game generates your enemy to be close to your level and damage, that way every fight is fair, and a decent challenge. ``` class Enemy{ public int Level; public int Health; public string Race; public int Damage; public int Defense; } ``` # Items Items are essential to playing Dragon Eye, without them you would most likely be on a death loop. ``` class Item{ public string ItemType; public string ItemName; public int ItemLevel; public int Damage; public int Value; } ``` # Strategy The gameplay is based on strategically making decisions. You always have 3 options in combat, attack, defend, and use item. Using an item will heal you with an item, defend will use your defense to counter the enemies next attack, and attacking will use your attack and subtract that from the enemies health. ``` class Player{ public string Name; public int Level; public int Health; public string Race; public int Damage; public int GP; public int Defense; public int xp; public List<Item> Inventory = new List<Item>(); } ```
posted to Challenge by PixelBitez (122) 29 days ago
📃 Poe - The Autonomous Poet (Major UI Update/Can now write Haikus)
## How to use ![image]( After starting the program you will be greeted with the main menu. You will want to choose "Train Poe" to train Poe a text. You can then choose which text you would like to train Poe. There are a couple texts to choose from by default, but if you would like to train him using something else, simply just upload a .txt file of it into the texts folder. It will automatically show up in the list of available texts. You may also train it using multiple texts. Just train Poe one, then the next. He will remember both. After you are finished training Poe, you will want to return to the main menu. Then choose to either generate a sonnet or haiku. After that, you will be prompted to enter the poem's topic. This can be anything as long as it is only one word. It works better to select a topic that relates to texts Poe wrote about. Poe will then attempt to create a sonnet about the topic you chose. It usually will take him 10-20 seconds to do this, but it can sometimes take longer. The poem will be displayed on your screen as well as saved to poems.txt. Poe will remember what you trained him after you generate a poem, so you can generate more poems without retraining him. If you want to train Poe using a different text, just choose the reset option and retrain him. I recommend trying to train Poe using a variety of texts. You can get some pretty funny poems by doing that. ## Example Poems **Sonnet about love: (Trained by a collection of Edgar Allen Poe's writing)** ![image]( **Sonnet about religion: (trained by The Bible):** ![image]( **Haiku about love (trained by the Timecube)** ![image]( ## How it works Poe creates sonnets by reading a large text and learning what words are commonly used alongside other words. The text that Poe is trained off of is "input.txt". He also uses the Datamuse API to find the syllables of a word as well as find which words rhyme with each other. Each time the Datamuse API is called, he parses and saves the response. This helps reduce the required API calls to create a sonnet which makes him faster as time goes on. ## Planned Updates (in no particular order) - Train Poe from a web domain - Limerick creation - Improved stats - Improved code documentation - Bug fixes (primarily the line skip bug) ## Update Log - Monday, February 4th - Poe first released - Wednesday, February 6th - Major UI overhaul, added support for training of multiple text files - Thursday, February 7th - Added support for Haikus ## Known Issues Sometimes Poe will fail to generate a single line and omit it from the sonnet. This will result in a blank line being printed where the line of poetry would've been. I'm working on finding the cause/solution. ##### This is one of my first large programming projects and I worked really hard on it. I appreciate any suggestion's/upvotes. :)
posted to Challenge by joshwood (43) 17 days ago
🥇 homepage contest 💻
We're about to release []( to the public and we want something cool to exist at the [root]( Right now we have Star Wars ASCII animation. Which is kind of lame (Star Trek FTW!) so I'd like to run a mini contest where the winner program would get featured at the root and you also get a $50 Amazon Gift Card to sweeten the deal. I think it should be something fantastic. Go crazy. Make it weird. The only requirement is that it has some explanation of what is for new users. Here's a sample copy for what the intro could say: - title: - tagline: publish your terminal apps as websites - description: up until now there was no way to publish terminal applications on the web. Although terminal apps is what most programmer start their career building (e.g. Hello World) most programs live and die on the coders' machine. changes this by making it possible to publish an app written in any language that supports on the web. Deadline: Friday the 22th
posted to Announcements by amasad (779) 8 days ago
Waiting Simulator v1.4
posted to Share by Unfortunately (9) 2 days ago
What's your favorite YouTube programming Channel?
I follow Clever Programmer, what about you?
posted to Ask by hayaodeh (82) 7 days ago
This is a joint project, that my brother (bluemarlin1134) and I worked on together. My bro. named this project after his best friend which the code’s dialogue is modeled after. It runs best on full screen and, the weather auto-location function works only when it runs on your computer as a program but, the manual input works like a charm. :) if you haven't seen in the post down below, we updated the calculator and the thermometer so now the thermometer doesn't print out a bunch of decimal places, and the calculator accepts integers.
posted to Challenge by goodthoughts (25) 11 days ago
15 Stability Update
Some of you might have noticed some features on might have not been working quite as expected over the last few days. To be more specific, we've had a few bugs with servers not waking up and packages not installing. We've been actively working to get these bugs fixed, but you might want to know what caused them. Behind the scenes, we've been migrating to use a brand new protocol when talking to your container. Our new protocol has all sorts of fun stuff like channels to do multiple things at the same time and collaboration as a first class primitive. We've been using the same protocol since the beginning of our containerized repls (about 4 years ago) and it has long since started to show its age. It was designed for a simpler time when was just sending an `eval` and get a `result`. Pretty much every feature after that was hacked on top of this simple protocol. Very soon we'll start rolling out features previously not possible in our old protocol. At this point, all the bugs (we know about) related to the new protocol have been ironed out. If you run into anything unexpected please post them over at Or, if you are on our discord, let us know in the #bugs channel (you can @turbio). Remember to include a link to your repl, that helps us out a lot.
posted to Announcements by turbio (21) 9 days ago
I want to use clear screen function in my c++ code on repl
As repl provides ubuntu compiler for c++, I don't know how to use clear screen function and which header file will be used for that function. kindly guide me.
posted to Ask by RishuMishra (0) 14 hours ago
🧠 Connect 4 AI
Just a simple but fast connect four AI made using HTML, CSS, JS. **How To Play:** The aim of the game is to get four of your counters (red) in row, this can be diagonally, horizontally or vertically. Each move click on one of the seven columns to drop your counter into that column. **How It Works:** 1) Each potential place the AI can place a counter is scored based on the amount of counters around that place and the length of the segments around it also. 2) The move above is also checked to make sure that by moving to that position that the AI doesn't cause the player to win, or for the AI to sacrifice a potentially good move, if this is true then the score of that move becomes 0. 3) If there is one distinct highest score, that one is chosen, else the AI just picks a random move from the highest scoring moves. **REMEMBER TO UPVOTE!** PLAY HERE:
posted to Challenge by LucHutton (116) 1 month ago
First to 21 loses.
In this game you will be playing against an AI. You can raise the counter by 1, 2, or 3. Then the AI will go. If the other person reaches 20, you basically lose.
posted to Challenge by gantr833 (93) 16 days ago
Sixels in Julia
I have now made it so you can use sixels in the Julia programming language. This repl graphs 3 different equations using magic. test it out **[here](** btw the equations are: y = (2/3)x y = (5x)/(.5x^2 - 5) y = (3/2)x - 3
posted to Share by theangryepicbanana (263) 1 day ago
Load more