Online Music Hackathon

First Prize: $5000

Ends on Jul 22:
00
Days
00
Hours
00
Mins
00
Secs
Posts
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 Repl.it. 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
63
posted to Share by timmy_i_chen (934) 1 year ago
🚨THE THEME IS MUSIC🚨: WIN $5,000! We're having another competition!
### Friends, foes, loyal Replers, Boy do I have some news for y'all! On July 1st, we're kicking off another competition and the stakes are higher than ever. ![richrichrich](https://storage.googleapis.com/replit/images/1561408399112_514da1dfbb25d3bc66b26fb7e7430790.gif) **Types of programs accepted:** *Any.* **Theme:** MUSIC! **Rules:** As always, *must* be original content & MUST be created *and* hosted on Repl.it **Prizes:** $5,000, $2,500, and $1,000 **Dates:** July 1 @ 00:00 PST to July 21 @ 00:00 PST **Judge:** Tom Lehman, the CEO of Genius ## To submit, all you have to do is share your repl on [Challenge](https://repl.it/talk/challenge)! Check out [our FAQ](https://repl.it/talk/announcements/MUSIC-HACKATHON-FAQ/16359) if anything is unclear or you have any questions. And feel free to ask anything you need there, too!
149
posted to Challenge by katyadee (829) 25 days ago
🐶Introduce yourself! 🐶
Hi everyone! ![waving](https://storage.googleapis.com/replit/images/1561489787610_61c528ae0267ed2696f0c625ff66db6c.gif) Use this space to share anything you want to share with our community - your name, where you're from, what you program in, what brought you here... whatever you're comfortable with! Can't wait to get to know y'all. 💖 Katya
57
posted to Announcements by katyadee (829) 24 days ago
7
Minecraft
all you have to do is play it go to how to play and read the instructions
86
posted to Share by duck132912 (13) 4 days ago
16
Customising repl.it syntax highlighting with repl.it-color
*Note: repl.it-color is made by myself, not repl.it. Also, it doesn't work on phones and possibly tablets because repl.it uses the Ace editor on phones rather than Monaco.* # Greetings! Currently, the only options that `repl.it` gives for personalising your syntax highlighting is a switch between default light and dark themes. I decided to write a very basic Chrome extension that allows customisation of the `repl.it` syntax highlighting. The result is `repl.it-color`. ![image](https://storage.googleapis.com/replit/images/1563185080182_94ef635bc494a19a8b7a5ddf61b1115a.png) repl.it-color allows you to change the syntax highlighting completely on `repl.it`. ## Installation In order to put a Chrome extension on the Chrome Web Store, you need to pay. Therefore, this extension is not available on the web store. This means a couple of extra steps need to be taken. * 1 - Go to the [github repository](https://github.com/ArchieMaclean/repl.it-color). * 2 - Click on `Clone or Download` then `Download ZIP`. * 3 - Extract the ZIP file you downloaded into a folder (try right clicking and clicking `Extract` - if that doesn't work, look it up on Google for your Operating System) * 4 - Go to `chrome://extensions` in Chrome, and enable `Developer Mode` in the top right hand corner. * 5 - Click `Load Unpacked` and select the folder you unzipped in step 3. * 6 - The extension is now ready to use! **Make sure you enable Dark Theme in your repl.it editor - if you like light theme, you can change the settings via **`repl.it-color`** later. However, dark theme needs to be enabled in order for the syntax highlight customisation to work.** ## Usage Once you have installed `repl.it-color`, you should see that the editor has turned into a rather vile color. ![image](https://storage.googleapis.com/replit/images/1563185702887_65ff08d44e3a2fcbf2f5cdb3f86dea28.png) To change what colors you want everything to be, you can click on the small `repl.it-color` icon in the top right hand corner in Chrome, next to your extensions, and select `Options`. This should open a new tab with which you can edit your color scheme. ![image](https://storage.googleapis.com/replit/images/1563185790392_ddd37eeb2a434e89d848040a628e0ca8.png) Now you can fiddle around with the colors to get `repl.it` looking exactly how you would like. ## Thank you Thank you for checking out `repl.it-color` - please let me know if you like it or if there are any things you would like me to change. Please upvote to let me know if you like it, and help other people find it. If I do make any changes, I will post them here. You will need to re-download the repository to update (if you want to update). Thanks :)
9
posted to Announcements by ArchieMaclean (523) 4 days ago
8
Repl.it CodeJam Event #7
Welcome to the 7th Repl.it Code Jam! Join our two day coding challenge to code about a topic that will be announced. From beginners to advanced coders, our CodeJam fits every experience level. If you need help, ideas, or anything else you can request it on the Discord server or on Repl.it Talk. Have you ever wanted to be famous on Repl.it? The lucky winners will get a special role & emoji on the Discord server and might be featured on the newsletter. In honor of our first CodeJam, we will hold the CodeJam on the same days the competition was last year. Sign up on the forum and enter the Discord server to join this phenomenal opportunity that you will never want to miss. Good Luck! EVENT DETAILS: Date: Friday August 2nd, 6:00pm EDT to Sunday August 4th, 6:00pm EDT Length: 48 hours Sign Up Form: https://forms.gle/oksDz5RbBEKytPRK6 Rules: https://docs.google.com/document/d/1zZ_LMmgAsm9slnkrVB5kdebwFUURR9GrpvTaA9tUW5k/edit?usp=sharing Discord Server: https://repl.it/discord
3
posted to Announcements by Mosrod (260) 2 days ago
10
💡 UI Repl
> #### The real problem with the interface is that it is an interface. **– Don Norman** I've been thinking about how to improve on the UX of traditional forms. For users, they can be confusing and overwhelming to use. For engineers, they can become tedious to build and maintain. Plus, it's hard to get the design just right in the first place. I ended up with a UX that feels a lot like being in a terminal session but more visual and less intimidating. I'm calling the pattern "UI Repl" (in my head). I think this approach has potential in a number of ways... - gradually building the UI as info is being entered makes the UI less overwhelming than seeing it all at once - you can still scroll back and edit previous fields so the UX isn't too different one some data is entered - it's flexible. more complex UI elements can be used when needed - scales down well for small screens - easy to prototype new ideas with - potential for console-based power-user features - are easy to group and split apart when they are too small/big I think a good use for a "UI Repl" is a discrete task that has multiple steps. I like the spacial metaphor of progressing downward with the UI as you work through the steps. Also, creating this timeline of edits clearly communicates to the user the effects of their interactions. This seems like a well-explored UX pattern but most of what I could find is either too much like a terminal or to too much like a digital assistant (where you are mainly in the chat UI). I think there could be a good middle ground that is friendlier than a terminal but also avoids the uncanny valley of digital assistants. I'm curious what others think (try it on your 📱phone!).
4
posted to Share by moudy (74) 3 days ago
13
🧘‍♂️ Hover Cards!🧘‍♀️
You can now hover over a username to display a card that shows more info about the user. It's a summary of their profile so you can see things like name, bio, etc. How useful is this? Is there any other information you'd like to see surfaced on the cards? ![hcs](https://storage.googleapis.com/replit/images/1563206414065_f77a74bb5d4b406d2d96d0a8cc1253b5.gif)
3
posted to Announcements by moudy (74) 4 days ago
46
🎵 📦 Music Box Editor 📦 🎵
Simple editor for creating music box melodies with an animated music box that "plays" them for you. Very basic: Just click on the diamonds to generate a note and press play. There are some featured melodies included. * As a bonus I have added a database - it's a separated repl because I don't want the player to load longer. My official submission is the Music_Box_Editor, the DB is just a storage for notes that I can't finds space for in the actual application. To find more melodies or if you wan't to submit one to the database - click the button "MUSIC BOX DB". Fill the form to submit or press the magnify glass and copy the note data. Load it in the player - it will figure out the number of blocks and the type of the melody - but the delay is up to you (either use the optimal one suggested by the creator in the database post or the one you feel plays best). * The note sounds are from freesound.org. Animations are created by me in After Effects and exported as SVG animation which is then played in the browser with the lottie player. Make sure you tune-up the box when first loading to cache the sounds for better first preview. Features: -edit notes -play speeds -save notes and load notes -generate random notes -tuning up the music box -copy notes from sheet and auto-paste on next sheet -add new block "+" and delete block "-" or press "++" to generate N blocks from input and "clear" to delete all. -move notes with arrows -switch between two sizes of boxes - mini(9 notes) and grand(15 notes) from the cowbells button switch -toggle hold notes -two preview modes - show one block at a time or all blocks being visible while playing -mixing notes - combines two or more pieces together of any type. -build-in tunes: Ode of Joy, Twinkle Twinkle Little Star, Star Wars Theme, Jurassic Park Theme, Elf Song. note mixing feature user guide - paste notes on load input field and press +add -then put another one and another one and so on. Every time +add is pressed, load input field will be erased and the piece will be added in memory. When all needed peaces are collected - press mix'm button - this will merge all pieces together and the final type will be the one of the last piece. However don't mix mini with grand type (doesn't sound very good) - mix same types of pieces together ( mini + mini , grand + grand). Then all you have to do is press play - no load necessary. Bonus features: --save notes to a database https://musicboxdb-2--anthony-tonev.repl.co/ My idea was to write an app that is simple enough to be beginner friendly so anyone can learn to write simple music peaces without knowing complex note notations and also have an open source note sharing system where users build melodies on top off or inspired by other users melodies. Works best on desktop with chrome in full screen repl view. ![image](https://storage.googleapis.com/replit/images/1563100885459_aa7a1d93fd679e08e575b1f426b8e218.png) ![image](https://storage.googleapis.com/replit/images/1563099650447_9b7bffd9b0c6995d7978a616603b5cf7.png)
87
posted to Challenge by Anthony_Tonev (48) 17 days ago
8
DEV SPOTLIGHT #09: Application is more important than just knowing facts.
From Hilton Head, South Carolina, I bid you all good morning and/or good evening, wherever you are in this great land of ours—from the Tahitian and Hawaiian Islands in the west, nestled in the warm trade winds of the Pacific, eastward to Caribbean and the U.S. Virgin Islands, with her own soft winds, south into South America, north all the way to the Pole, and of course hello to all our friends in the Antarctic, at McMurdough. 👋 Today we have a first time caller, long time listener, resident Javascript expert and intern, @eankeen. ![Edwin](https://storage.googleapis.com/replit/images/1563204459905_27993d27fab513b585581fb2e78f4d79.png) **@katyadee:** Hey friend, happy to have you on the line. Let's start with an introduction. **@eankeen:** I’m Edwin and I really like doing programming. I started maybe one and a half years ago—junior year of high school. That was sort of the time where I found Repl.it. I had found it before, but it was really junior year when I started seriously using it. **@katyadee:** How’d you find Repl.it? **@eankeen:** It was actually in my bookmarks, and it was bookmarked maybe three years ago because I had been doing a computer science club with my high school, and when I was researching how to start that club I found Repl.it because it was good for online coding. The club never materialized, but then I looked at my bookmarks a few years later and I realized, hey, I kind of remember this, and then I started using it. I really like Repl.it because I can use it to experiment, usually things that are only 20 or 30 lines of code. **@katyadee:** Do you find you’re testing things on a lot on Repl.it? **@eankeen:** Yeah—and I categorize them into what I’m testing. If I keep them in my archive and if need it again or forget how I did something, I go back and look for it. **@katyadee:** So what kind of things will you test? **@eankeen:** Javascript APIs and node.js, mostly. **@katyadee:** It seems like you’re definitely a front end guy taking a look at your repls. Any plans to branch out? **@eankeen:** I really love front end, I really like creating user interfaces, I think that’s really fun—I leverage Javascript to do that. I realize if I want to become better at programming, I definitely need to branch out… I’m slowly starting to add other languages. **@katyadee:** Do you have an interest in design at all? **@eankeen:** I would say I do, but it’s hard, because I haven’t done enough of it. I don’t have the same knowledge of it. But I love thinking about UX… I love transitions. It’s kind of a fun challenge. I only actually do design outside of that when I absolutely need to right now. ## On Teaching & Learning ![Screen Shot 2019-07-15 at 8.28.10 AM](https://storage.googleapis.com/replit/images/1563204545607_0f17632fd1df4b7b7da8c522d27f10ef.png) **@katyadee:** Let’s pivot a little bit. I’ve noticed when it comes to the things you share with our community, you post a lot more tutorials than you do projects. What motivates you to teach other people? **@eankeen:** Yeah so, I think it’s really cool to teach people. Sometimes I’ll check Twitter and noticed someone’s benefitted from my tutorial. Otherwise, a lot of the projects I’m building aren’t cool enough to share. But I really get hyped about being able to help people learn something new. **@katyadee:** How do you decide what you’re going to write your tutorials about? **@eankeen:** It’s usually just things I’m excited to learn about myself. **@katyadee:** Oh—wait—that’s really neat. Are you learning these concepts as you’re writing them? **@eankeen:** It depends. For Babylon.js, for example, I knew how to do it—but I learned how to use Intersection Observers while writing the tutorial. **@katyadee:** So, you’re like, “Okay, I want to learn this, I’m going to write about it”? That’s amazing, especially having seen the quality and how much mileage people get out of it. **@eankeen:** It’s kind of cool once you learn something like that, too. **@katyadee:** Would you say that’s the main way you learn new skills? By writing about them? **@eankeen:** That’s definitely one way—it’s either writing a tutorial or building a project. **@katyadee:** Do you learn other skills the same way? Like, if you’re learning something new at school? **@eankeen:** It’s a bit easier with programming… well, I guess I do it for school. I’ll do problems then explain them to myself later while studying. **@katyadee:** That’s really cool. I remember being taught a similar method in AP American History, which is why I asked. I also wanted to ask—I feel like the writing in your tutorials is just good writing. Is that something you think about when you’re creating these? **@eankeen:** I don’t think I’m a naturally good writer, no, haha. I kind of observed that other people who write blogs and tutorials first. I picked out the parts I liked and then I tried to copy structures that I understood. I actually don’t think I’m very good with English, like I don’t know what a prepositional phrase is… I’m not good at that kind of thing. But I tried to pick up patterns with what I thought was working. I try to be casual but succinct, I think that goes a long way. **@katyadee:** It’s so funny to me you say that you’re not good at English, because you’re doing a really good job with these tutorials. I wouldn’t say you’re bad at English, either—like, individual grammatical concepts, who cares if you’re producing stuff that’s legible, enjoyable to read, and also informational. Your communication is very clear—at least to me, a newbie. **@eankeen:** That’s really good to hear. **@katyadee:** What do you think the relationship between teaching and learning is? **@eankeen:** I think that when you teach, you’re forced to learn something more thoroughly. **@katyadee:** I’ve heard that, but I feel like it’s underexplored. Do you think that attitude is unique in the dev community, at least as far as you know? **@eankeen:** I don’t think it’s uncommon, but a lot of people are just learning and learning and learning, and they don’t use the skills enough, so they can’t really apply them. Application is more important than just knowing facts. The thing is, teaching and applying are pretty similar. Just memorizing isn’t going to make you a better programmer. **@katyadee:** Are there any tutorials you’ve abandoned? Or are there any concepts you’ve found you’ve struggled to explain? **@eankeen:** Yes! I was trying to do this thing where you open up a repl on two computers, and then create a clipboard between computers… but it didn’t quite work out because the library I was using was too buggy, I must have been doing it wrong but I couldn’t figure it out. So I just abandoned it. **@katyadee:** Did you ever figure it out? **@eankeen:** I never went back to it, haha. ## Babylon.js ![babylon](https://storage.googleapis.com/replit/images/1563204593377_d164803549b1d0a3f37feb0ecf1c38fe.gif) **@katyadee:** I like your [two Babylon tutorials a lot](https://repl.it/talk/learn/Making-3D-Babylon-Scenes-more-Dynamic-with-Actions/16132)—I’ve actually featured them in the newsletter. Can you explain what Babylon.js is for people who might not be familiar? **@eankeen:** Babylon.js is a 3D JS library. If you’re thinking about something that’s 3D, like any object, and you want to make it…or animate it…or make it dynamic, you’d use Babylon. **@katyadee:** Have you made any projects with it? **@eankeen:** Yeah, so one of the game jams, I made [a small game](https://Repl.it/talk/share/Silly-Game/13366/33047) with it. That was when I was first learning Babylon. **@katyadee:** What kinds of projects would you say lend themselves best to Babylon vs. another library, like three.js? **@eankeen:** I think if you want to work on a project more long term, you might want to go with Babylon, because Babylon has a Semantic versioning system… but with three.js, you can go between versions and there will be a bunch of changes, so Babylon is more friendly in that regard, because less stuff is going to break from update to update. But another thing to think about is…if you want something more lean, three.js feels more lean. ## React ![react](https://storage.googleapis.com/replit/images/1563204688683_acd8e1eb433c4022f2a20968f1f35f25.png) **@katyadee:** So, I’m not even going to ask why you’re interested in [React](https://repl.it/talk/learn/Learn-ReactJS-on-Replit/15980) because I think it goes without saying—haha. But I do want to ask.. What are some common mistakes you’ve noticed people make when they’re starting off learning it? What are some things you personally found challenging about it? **@eankeen:** I think one mistake a lot of beginners make is not knowing what’s React versus what’s just JavaScript…It’s also kind of hard to work out what’s the big picture. It took me a while to get that big picture and really figure out what’s going on. One thing with Repl.it is it doesn’t really show you all the build tools, which is good for beginners—you shouldn’t have to worry about that at first. **@katyadee:** You had noted somewhere that tutorials kind of gloss over the “obvious” parts of React. What did you mean by that? **@eankeen:** A lot of basic stuff. For example, building your webpack integration file. Or common structures—you need a good foundation or it’ll be a little more difficult. I encountered these problems while learning Vue.js too, which is similar to React. **@katyadee:** I’ve been wondering, despite your great React tutorial, you mention Vue.js quite a bit—do you prefer it? **@eankeen:** I’m just more familiar with it. I also like the aspect of your CSS coming in actual CSS files. When you’re a beginner or less experienced, it’s easier to recognize the different elements. But if you’re using React, it’s less intuitive. **@katyadee:** What was your timeline like, learning Vue.js and React? **@eankeen:** I started learning Vue.js when I started learning Javascript… and React a little bit after. ## Empty ![Screen Shot 2019-07-15 at 8.32.06 AM](https://storage.googleapis.com/replit/images/1563204749091_14a05824bdee2c936562752cd61b2f29.png) **@katyadee:** What is [Empty](https://repl.it/talk/share/full-blockfull-block-Empty-2-warningwarning-this-one-is-super-cool-full-blockfull-block/13572)? **@eankeen:** Oh my god. So @mat1 made an Empty game however long ago. It’s minimalistic. It’s in Python. I thought hey, I want to do something fun. So I wanted to create a sequel. So instead of Python, it’s Javascript. And I talked about how much better it was than @mat1’s Python repl, even though it’s blank. I spent a few hours writing something up, where I was just criticizing the most minute details. I tried to make it sort of funny and sarcastic. **@katyadee:** That’s great satire—I wanted to give it some love here. ## Closing **@katyadee:** What advice would you give to people who want to write their own tutorials? And what would you say to people who would never write their own tutorials? **@eankeen:** For people who want to write a tutorial, look at material you found really useful, and try to copy their patterns. Simplicity goes a long way. For people who would never write a tutorial, I’d say: writing turoials helps you learn things faster!
12
posted to Announcements by katyadee (829) 4 days ago
5
youtube
search in the search bar and enjoy the videos watch all you want
10
posted to Share by duck132912 (13) 3 days ago
7
📸APP OF THE WEEK: imag.cf 📸
This week's [App of the Week](https://imag.cf), by @mat1, is a handy—and anonymous!—image uploader written in Python. Poke around the full repl [here](https://repl.it/@mat1/image-upload). ![AppoftheWeek](https://storage.googleapis.com/replit/images/1563202903666_0244515e75690156651144295e2e80d6.png) Goodbye imgur, hello [imag.cf](https://imag.cf)! ![app-of-the-week](https://storage.googleapis.com/replit/images/1563202967513_6b3f2b4e821add59e73c331dd8d54481.gif) *Nominate our next App of the Week [here](https://katyafromreplit.typeform.com/to/o3gnJI).*
12
posted to Announcements by katyadee (829) 4 days ago
9
Weekly Repls #40
Bonjour les amis! (That's hello friends in french). We're on our 40th weekly repl, and slightly early aswell. I must say, after so many weekly repls, It's hard to find new ways to say hello. If you have any ideas on how I should introduce my next post, I'd love to hear them! Now we may be a little early, but that doesn't mean we have less repls. We've had a ton of super awesome submissions, so let's check them out! @SolarBoom [Creates their own version of the popular hackertyper.com website!](https://repl.it/talk/share/Clone-of-hackertypercom/16635) @numcomx [Speaking on versions of popular apps, checkout this fruit ninja clone! (Can you beat my score of 16200?)](https://repl.it/talk/share/Fruit-ninja-clone-game-made-with-PhaserJS/16585) @phobos [Demonstrates 3 different ways to use async/await in JS!](https://repl.it/talk/share/Parallel-async-in-JS/16564) @ebest [You type into a console, you read your console, but how often do you click it? This game puts your clicking to the test!](https://repl.it/talk/share/Click/16500) @MarcusWeinberger [Using some crazy magic, watch this program unzip a zip file, indefinitely.](https://repl.it/talk/share/A-zip-file-that-contains-itself-forever-Infinitely-unzip-able/16490) @mwilki7 [A silly, but incredibly fun, basketball simulator, I highly recommend you give this a try!](https://repl.it/talk/share/Canvas-Basketball/16479) @MarcusWeinberger [SQL injections are still a prominent attack on the web, and this tutorial explains what they are, so you can avoid them!](https://repl.it/talk/learn/How-basic-SQL-injection-works-with-a-demo/16519)
10
posted to Announcements by 21natzil (684) 5 days ago
2
JS (+HTML) - how to save (leaderboard) data - for music jam!
Hi everyone, I'm making a game for the repl.it music jam, called [Name That Tune](https://Name-that-tune--thomass1.repl.co). The code is [here](https://repl.it/@ThomasS1/Name-that-tune). I've made the game itself (although I need to add lots more tunes!), but I'm now looking for a way to have a leaderboard. I've made the leaderboard HTML itself (`index.html` lines 67-121) and the JS functions to put the data into the table (`script.js` lines 190-254), but I need a way to save the data itself. I've tried various different approaches: ##### Using jsonstore.io Jsonstore is a brilliant online data storage website, but as far as I can tell you need node.js to be able to interact with it. See [TheDrone7's post about his node.js jsonstore extension](https://repl.it/talk/share/Dont-ever-lose-your-data-again-with-jsonstoreio-JS-Edition/10999). I don't know how to/if you can use node.js with an HTML/CSS/JS repl. I even tried using python, but calling the functions from JS proved an absolute pain. As I expected. ##### Other ways? Are there ways to save data which can be changed in JS without using external things like jsonstore? I looked into json files and other stuff, but as you can probably tell, I'm a bit out of my depth. I'm a beginner with JS and thought the music jam would be a fun way to learn some more! Thanks in advance for any help!
8
posted to Ask by ThomasS1 (35) 1 day ago
7
Play chess and listen to music
Listen to the extremely relaxing and very quiet "ode to joy" while playing chess. Try playing chess while the chorus starts screaming. # Note UCI notation works like this: square the piece came from to square it went. For example: * Pond from e2 to e4 is e2e4 * Promotion from e7 to e8 (promoting to queen) is e7e8Q
8
posted to Challenge by rediar (64) 4 days ago
12
Visually Pleasing Music Writer (With Turtle Graphics)
Hello! This project was done independently. The programming language used was Python, with Turtle graphics utilized. My project draws a very simple measure of music for you. I will be sanding down some fine points of this project until the deadline if that's okay. If not, then I'm perfectly content with submitting this is my final submission! Please give me feedback for this project! This is my first time posting on repl.it :D
24
posted to Challenge by AbirHaque (12) 9 days ago
5
Using MongoDB with python (using PyMongo)
# How to use a MongoDB database with your python repl! (PyMongo) ## Why though? One of the most common uses of repl.it is to create discord bots and the most common way to store information like "user warnings" is to store it in files (JSON or even txt). But due to some reasons, repl.it does not save the changes made to these files programmatically, so one great alternative would be to use an external DB and as it stands, MongoDB is one of the easiest to learn and most efficient database services out there and `PyMongo` is an amazing library that allows you to store and retrieve and perform other functions with your MongoDB database in a really friendly way. So, that's why. ## Installation Although, if you were doing it locally, you'd need to open up a command line utility and use the following command: - ```shell $ python -m pip install pymongo ``` But repl.it makes it even easier allowing you to simply add packages using the package manager or by creating a requirements.txt file! We'll be using `requirements.txt` file for this tutorial. Feel free to check out the package manager as well. If you don't already know about it, all you need to know about the `requirements.txt` file is that it tells the interpreter which packages to install before running the program. And all the packages are named on different lines. For example, if we needed to use `discord.py` and `pymongo` and `flask` in a project, the requirements.txt would look something like this: - ``` discord.py pymongo flask ``` For now, we only need `pymongo` *(in this tutorial)* so get rid of the other two unless you need them *( for your own app )*. And we're done installing! ------ ### Setting up the Database Goto the [MongoDB website](https://mongodb.com) and sign-in (or register). Once signed-in, you should see a page as shown below: - ![MongoDB home](https://www.imag.cf/XP4RG) Click on the `Build a Cluster` button which will eventually show you a page as shown below: - ![Create a cluster](https://www.imag.cf/C4RE0) Choose your provider, region, plan and other stuff you might wanna have. If you don't know what something means, search on Google (or DDG) or leave it be. *Be sure to give it a name of your choice, nobody wants their DB to be named* `Cluster0`. Finally, click the `Create Cluster` button. And now you'll need to wait for around 5 - 10 minutes. After the long wait, you'll see the dashboard ![MongoDB Dashboard](https://www.imag.cf/WRB10) Click on the `Network Access` tab under the `Security` group in the sidebar. And then click the `ADD IP ADDRESS` button. Click on the button saying `Allow access from anywhere` and then click on `Confirm` which will essentially finish this section. Which means - we finally have everything setup and now we can get started with actually using the database in our program!!! ------ ### Setup (inside the code) Head back to the MongoDB Dashboard's `Clusters` tab under the `Atlas` group. And now click on the `CONNECT` button. It will ask you to choose a connection method, for which, you need to choose `Connect Your Application`. In the next, page you'll see two dropdowns: - 1. Driver - `Python` 2. Version - *<Whichever version of python you're using> (repl.it uses latest anyways)* It will now show you your **connection string**. This is a very important thing so be sure to keep it safe. It is usually of the format - ``` mongodb+srv://<username>:<password>@<cluster>.mongodb.net/test?retryWrites=true&w=majority ``` Now come back to repl.it. In the python file where you want to perform DB operations, type the following code ```py import pymongo # Define a new client. client = pymongo.MongoClient("<connection string here>") # Get the database (database name by default is "test") db = client.db_name # OR db = client.test ``` Now that we have our DB, next thing we need to get is a collection. A **collection of documents** in mongodb can be thought of as a *list of dictionaries* in python. By default, a DB doesn't have any collections. To see a list of collections that the database has, the following line of code can be written: - ```py print(db.list_collection_names()) ``` This will print a list of names (as strings) of all the existing collections in the DB. Since, there was no collection by default, we'll create one for us! Creating a new collection is very easy itself. All you need to do is ```py db.create_collection("collection_name") ``` > **NOTE**: *Try to avoid having spaces in collection names, use underscores( _ ) instead.* And now we have a collection where we can store documents which hold our data! *You can also delete an entire collection by using* `drop_collection` *instead of* `create_collection`. ------ ### Inserting data into a collection Now, we get to the serious part i.e. inserting data into a collection. For which we have a few choices. 1. Insert One Here, we just insert a single document in the collection. > **NOTE**: *Python dictionaries are also treated as documents by pymongo.* Example: - ```py # Getting the collection my_collection = db.collection_name # Inserting a sample document. my_collection.insert_one({"test": "document", "hello": "world"}) ``` And that's it! We've successfully inserted a document to our DB! Now let's have a look at the second possibility. 2. Insert Many This is to insert multiple documents to the collection ( Basically a list of dictionaries instead of a single dictionary ). Example: - ```py # Get the collection my_collection = db.collection_name # Define a list to insert documents = [ {"test": "document", "n": 1}, {"hello": "world", "n": 2} ] # Insert multiple documents my_collection.insert_many(documents) ``` And that's how you insert multiple documents at once. It will not create 1 new document and insert the list as it's value, instead, it will create new documents for each of the dicts inside that list! And those were the two ways of inserting data. ------ ### Searching for documents in a collection Now that we've inserted some stuff to a collection, we can fetch and view it whenever we want. This can also be done in two ways: - 1. Find One In this method, pymongo will return the first element it finds satisfying the *query*. The general syntax for this is: - ```py db.collection_name.find_one(query) ``` Example: - ```py # Get the collection my_collection = db.collection_name # Find the document x = my_collection.find_one({"field": "value"}) ``` This example will search for a document in the collection `collection_name` whose `field` field's value is `value`. 2. Find In this method, pymongo will return **all** the elements it finds satisfying the *query*. The general syntax for this is: - ```py db.collection_name.find(query) ``` Example: - ```py # Get the collection my_collection = db.collection_name # Find the document x = my_collection.find({"field": "value"}) ``` This example will search for **all** documents in the collection `collection_name` whose `field` field's value is `value` and return a object of the `Cursor` class which can be treated as a list of the resulting documents. And these were the two ways to search for documents that are there in a collection. ------ ### Deleting documents And now, we have some documents that we can get rid of (delete them of course). Deleting can also be done in two ways: - 1. Delete One For deleting just one document. Pretty similar to the `find_one` function, we need to provide a query object and then it will delete the very first item it finds that satisfies the query. Example: - ```python # Get the collection my_collection = db.collection_name # Delete the document my_collection.delete_one({"field": "value"}) ``` This will delete the **first** document it finds which has a field named `field` whose value is set to `value`. 2. Delete Many For deleting all similar documents. Pretty similar to the `find` function, we need to provide a query object and then it will delete the very first item it finds that satisfies the query. Example: - ```python # Get the collection my_collection = db.collection_name # Delete the document my_collection.delete_many({"field": "value"}) ``` This will delete **all** the documents it finds which has a field named `field` whose value is set to `value`. ------ ### Replacing existing documents Since we have some documents in our DB, sometimes we might need to delete one and add another document simultaneously. Instead of first deleting and then inserting a new document, we can simply use the `replace` function. This can be achieved by using the `replace_one` method of the collections which takes two parameters - the `query` which will allow it to find the existing document to be replaced **and** the `replacement` which will be inserted. Example: - ```python # Get the collection my_collection = db.collection_name # Replace a document my_collection.replace_one( {"some_field": "some_value"}, {"field_one": "value_one", "field_two": "value_two"} ) ``` This will first search for a document that has a field named `some_field` whose value is set to `some_value` and then replace it with the new document we provided. If it is unable to find the document to be replaced, it will throw an error. The error can be prevented if we pass the optional `upsert` parameter and set it's value to `True` as given below: - `my_collection.replace_one(query, new_document, upsert=True)` This will simply insert the `new_document` if the query did not return any results instead of throwing an error. ------ ### Some resources to learn more - [MongoDB documentation](https://docs.mongodb.com/) - [PyMongo Official Tutorial](https://api.mongodb.com/python/current/tutorial.html) - [PyMongo Examples](https://api.mongodb.com/python/current/examples/index.html) - [PyMongo API Documentation](https://api.mongodb.com/python/current/api/index.html) ------ # The End If you have any questions, let me know via the comments. If you found this tutorial to be helpful, please upvote. Thanks for reading it to the end!
4
posted to Learn by TheDrone7 (515) 2 days ago
22
BeatKeeper - Make a rhythm game out of literally any song
# BeatKeeper Although I did all the coding on this game, I have to give a huge thank you to the [p5.js](https://p5js.org) and [JsMediaTags](https://github.com/aadsm/jsmediatags) libraries for making my life easier in both the frontend and the backend. Also, thanks to [Vexento](https://www.youtube.com/user/Vexento) for the home screen music. BeatKeeper is a game that allows you to upload any song you like and it will create a rhythm game in real time. ![image](https://storage.googleapis.com/replit/images/1562552931497_b1bb44cd3d2a96064ba73d46869bc32b.png) I put a lot of work into the game, adding features such as: * Real-time audio analysis and beat detection * Music visualization using the Fast Fourier Transform * Upload any mp3, wav, or ogg file to the server * Auto-delete files older than one hour * Song title and artist auto-recognition * Adaptive treble threshold * and more! The awesome thing about BeatKeeper (I think) is that this has never been done before. A rhythm game maker, as far as I know, has not existed before this in Javascript and with any song. Previously, the Javascript versions have needed special .bms files which contain a preprocessed audio analysis. This does it in real time. I'm going to keep updating BeatKeeper until the deadline. I would really appreciate if you could play the game and let me know what you think. Keep in mind that not all songs will work well with this. The best possible songs (as proven in the demo) are loud, with a well-defined beat. ## PLEASE OPEN IN FULLSCREEN AND USE HEADPHONES!!
2
posted to Challenge by rshetty (63) 12 days ago
22
MUSIC HACKATHON: FAQ
Hey folks! A lot of you have been asking me the same kinds of questions, so I figured i'd make a handy FAQ: **1. What's the theme?** The theme is *music!* **2. Does this mean my repl has to play audio?** No - it doesn't. You're free to interpret "music" however you'd like! One of my favorite music-related repls we've received on the site is @jajoosam and @thesephist's [lyrics.rip](https://lyrics.rip), which didn't play audio but did generate fake lyrics. It's all about what you want to create. Not sure if your repl fits the theme? Hit me up on Discord or post here - I'm happy to talk you through anything. **3. So... what's the deal with copyrights?** This one is kind of nebulous. My best advice here is not to use any copyrighted songs, because you never know how you'll want to share your repl or where. **4. How much of my work can be from libraries or previously made?** "Original content" means this: *don't steal other people's work!* Things that are open source, libraries, are free to use with attribution, etc. are fair game. **5. How will my work be judged?** We're looking for creativity and execution here. This doesn't mean it has to be super complex though. If an idea is good, an idea is good! **6. What language should I create my repl in?!** The cool thing about a flexible theme? If you can find a way, you can do it. Web projects have so far proven to be popular though. **7. Can I create my entry elsewhere then c/p it into a repl?** No :-( The idea here is to use Repl.it! **8. Can I have (a) partner(s)?** Sure can! We encourage folks to use Multiplayer for group projects.
11
posted to Challenge by katyadee (829) 14 days ago
2
Freestyle Rhyming Rap Lyrics Generator
If you're on mobile, view the repl [here](https://rap-lyrics-generator.adrianhall.repl.run/) for a less cluttered experience. Because modern rap is pretty much random at this point anyway :), I thought I'd save artists the trouble of thinking up lyrics. This program uses a generic mad libs algorithm (I bet there's a computer science name for that but I don't care) to generate random rhyming lyrics. The program will endlessly freestyle in a mildly amusing imitation of modern rap. Play [this video](https://www.youtube.com/watch?v=tOnTPW1MTZ4) for background beats as my code transforms you into the next big shaq.
0
posted to Challenge by AdrianHall (43) 4 hours ago
12
Canvas Basketball
Time your jump and shot to make it into the hoop. Press Space to jump, S to shoot F for solitaire mode W for walls C to clear screen of all balls D for debug info Smartphone controls: Touch down to jump release touch to shoot New "Clear balls" button added (I should have added this long ago) - Thanks democat for the feedback Also added hotkey for it, along with a scoreboard - Thanks ebest for the feedback
10
posted to Share by mwilki7 (111) 10 days ago
40
👀 Domain Hack Finder 👀
# Domain Hack Finder Ever want to make a website, but you haven't been sure what you should name it? According to Wikipedia, a domain hack is a domain name that suggests a word, phrase, or name when concatenating two or more adjacent levels of that domain. For example, "bir.ds" and "examp.le", using the fictitious country-code domains .ds and .le, suggest the words birds and example respectively. In this context, the word hack denotes a clever trick (as in programming), not an exploit or break-in (as in security). Learn more about [domain hacks on my blog](https://www.matdoes.dev/blog/post/what-are-domain-hacks) ![Domain Hack Finder](https://storage.googleapis.com/replit/images/1560713948448_70de33f52af24ebcae9e109e2fd5828f.pn) [Try it out now! 😎](https://domain-hack-finder.mat1.repl.run) (Upvote this post for free Robux or MineCoins or whatever!)
45
posted to Share by mat1 (2250) 1 month ago
14
DEV SPOTLIGHT #08: “That’s the amazing thing about the dev community, everyone wants to help.”
## Welcome back to another **Developer Spotlight**! [BEST TALK SHOW VOICE] @katavie and I are back today with resident Repl celebrity, [@Kognise](http://repl.it/@kognise). You might know @Kognise from his Repl.it [mobile app](https://repl.it/talk/announcements/Replit-Mobile-App-MVP/14496)... or maybe you’ve just seen him around our Twitter, Discord, or right here, on Repl Talk. ![Screen Shot 2019-07-08 at 1.37.44 PM](https://storage.googleapis.com/replit/images/1562611107135_b179caa99691035d1be1f7836391209d.png) *@Kognise's Game Jam submission, Dom Boom* **@katyadee:** Hey Kogs! It’s great to be talking to you. Would you might be starting with a short intro? **@Kognise:** I'm Felix. I go by Kognise on the Internet. I live in New York. Hm, what else? I’m 13 years old. And I have a cute dog. **@katyadee:** When did you start learning to code? **@Kognise:** Maybe two years ago, but I only really got into more serious things about a year ago. **@katyadee:** It's so funny because when I'm talking to young people it's usually that kind of timeline but they're pretty advanced. How much time you throw at it? **@Kognise:** Probably too much. **@katyadee:** What does that mean? **@Kognise:** Recently I've started homeschooling and that gave me a lot more time to work on my own stuff and in that case that means more time to practice programming so when I'm not doing other types of schoolwork or reading books or eating, I'm coding. **@katyadee:** Is it one of these things that so seamlessly fits into your schedule that it’s kind of happening all the time? **@Kognise:** It’s more like that. ![learning](https://storage.googleapis.com/replit/images/1562596835136_ef6afbbaf2420ba0f7e5205f9e2f86d3.gif) **@katavie:** What does your typical day look like? **@Kognise:**Maybe I'll have a lesson or I'll travel away. I also play cello so I might go to a cello lesson. But a lot of time is spent at home or walking my dog. **@katyadee:** It’s interesting because that’s how they recommend you learn a human language. It’s not necessarily setting aside time to learn it, but you should have it seamlessly throughout your day. How did you start learning? Did you have any mentor figures, or were you just interested and jumped in? **@Kognise:** I think part of it was just wondering, “How do these fabled computers work?” I originally started by using this weird thing called [Code Monster](http://www.crunchzilla.com/code-monster), which just takes you through tutorials on drawing canvas objects with JavaScript. I got through the very beginning but I didn't really understand most of it. I was able to do the exercises but I felt now I feel like most of it was just copy pasting so I didn't really learn a lot from that but I that's what got me interested least in the beginning. I moved to some Mac app that my mom found and I don't remember what it was but it was some modified version of Ruby with like a user interface library so through that I learned more logic and that kind of thing and syntax. After that I don't really know what happened. Now I'm here. ![Screen Shot 2019-07-08 at 9.19.42 AM](https://storage.googleapis.com/replit/images/1562596850986_9ffd9b8b0028eecdc0bc1629cd93a2d4.png) **@katyadee:** Was there anyone inspirational to you, or are you mostly self taught? **@Kognise:** I’m mostly self taught. I remember [W3schools](https://www.w3schools.com) was a great resource for learning web stuff. **@katyadee:** How did you end up on Repl.it? **@Kognise:** I was originally trying to just find like an online HTML editor. I was using Code Sandbox but it kept like glitching out and breaking so I was searching for more things and I found Repl.it through that. # FontKey.design ![fontkeyo](https://storage.googleapis.com/replit/images/1562596883165_2df9ec174b645528607690629640da7d.gif) **@katyadee:** You won the Space Contest, which is cool. In your description of [FontKey](https://fontkey.design), I sensed a touch of annoyance. Do you think repeating fonts is actually an issue? **@Kognise:** I think it's not as bad as I made it out to be but I do find it kind of annoying for a lot of websites to have the same fonts in the same style. It's kind of like using the default bootstrap theme for everything. **@katyadee:** Oh that annoys me too! It kind of makes me miss Angelfire days. I think that might be 20 years before your time. **@katavie:** That’s before *my* time. ![angelfire](https://storage.googleapis.com/replit/images/1562596900957_5c9ce3914b06603498bf32d2bfe948c9.jpeg) **@katyadee:** Angelfire was like a free host for a personal webpage. Before social media was really big everyone had their own home page. You could have Angelfire or Geocities or freewebsites.com..or whatever. There were lots of options out there. It's kind of funny because some of the websites people make on Repl.it kind of remind me of those early days Speaking of websites. I’ve been using FontKey for real, it’s pretty smart. What's your design interest, if any? **@Kognise:** What's funny is I actually had the idea the night before the Space Contest was introduced and I feel like the idea of pressing the space key to choose fonts kind of like made that more of a thing and made it more useful that way I originally just had the idea of like previewing fonts on pages. **@katyadee:** Where are the fonts being pulled from? **@Kognise:** Google Fonts. Basically just pulling a list of all of the fonts from Google fonts and then converting it to my own format and then loading up the page. # The Mobile App ![mobileapp](https://storage.googleapis.com/replit/images/1562596930164_3675e7514d3ef4c35bd5da45cff18b87.png) **@katyadee:** Can you walk us through why you decided to make a [mobile app](https://repl.it/talk/announcements/Replit-Mobile-App-MVP/14496) for Repl.it? **@Kognise:** On my 13th birthday, I actually got my first phone like that to my own and the first thing I did was like I installed some apps and one of those was I went to the Google Play Store and I searched for Repl.it and there wasn't one, so that was my original inspiration for that. **@katavie:** Why do you want to code from your phone? **@Kognise:** I feel like there's always the need to tweak something while I'm away maybe I'm travelling maybe I'm just on subway and there's some typos or more to fix or even a small little bug and I feel like it's always would be it would be really useful to be able to edit that on the go. **@katavie:** How does the app interact with the Repl.it website? **@Kognise:** Basically just through the API that I figured out by looking at the Chrome network tab. I also got a lot of help from @mat1. I'm also working on documenting all of them **@katyadee:** What was the process like assembling a team and collaborating with people on this project? **@Kognise:** I initially wrote a post on Repl.it talk saying that I was interested in starting this project asking if anyone would be interested in providing a link to a discord server and a bunch of people joined. I've mainly been working on this myself but everybody was really helpful in helping me test it out and trying out new features I was adding and telling me if it's broken for everybody except me. **@katyadee:** How long did this take? Is it still going on? **@Kognise:** I released an [MVP](https://repl.it/talk/announcements/Replit-Mobile-App-MVP/14496) maybe in the first two weeks. I still need a few things before actually like releasing the 1.0 version. **@katavie:** What’s the layout, since there’s not as much space on a phone screen? **@Kognise:** I loved Repl.it’s approach of like only showing things when you need them so like if you start a web server the web server little box thing opens up. I tried to keep that, except with tabs so I have like a code tab and a console tab and if you run it and there's a web server it'll pop up with like a webview tab. **@katavie:** What language did you use to build the app? **@Kognise:** I used React Native. **@katyadee:** In an ideal world, what would the final product look like? Do you think you have the skills and time to make that happen? **@Kognise:** Right now, I've just been using a material design library and been focusing on all the business logic code. In an ideal world, the end result would have its own like design similar to Repl.it and not just be run-of-the-mill material design. I think that even if I might not have the skills -- because I only recently learned React Native for the first time to do this app -- I'll probably be able to learn them on the fly I know so far that styling in React Native is really weird. **@katyadee:** What do you think is needed from Repl.it to support more people building apps like this? **@Kognise:** I think I mean maybe just better documented APIs. # Node API Client **@katyadee:** When I was looking through your repls, I saw your Node API Client. You’d mentioned that you’d reverse engineered Repl.it’s API? What gave you the idea to do it, how did you do it, and how long did it take? **@Kognise:** This node API helps me lot speed up the process of the mobile API so I was able to even copy over some bits which was really useful and add some new things. I think my original idea was to create a load balancer that's created by automatically duplicating a repl and then creating a repl that load balances. How did I reverse engineer the APIs? basically just looking into Chrome network tab and seeing what requests are like what's requested when I click a button. **@katyadee:** It seems like you get a lot of mileage out of the Chrome network tab. **@katavie:** when did you first see that and how did you figure out what was going on in the network tab? **@Kognise:** They made it really well laid out so it's pretty easy to figure out what's going on. like how I learned a lot of things I just kind of fooled around until I figured out how to use it. **@katyadee:** Did anything surprise you about the process? did you notice any vulnerabilities with Repl.it or did anything stand out as special, or interesting? *Katya pauses. Kogs is smiling widely.* You're smiling when I say vulnerabilities, oh no… **@Kognise:** Well, I'm smiling because somebody recently uncovered a few vulnerabilities. I still have all of his automatically created XSS repls in my account. But no I'm not a pen tester and I did not find any vulnerabilities...Your API is kind of weird. Like half of it is GraphQL and half of it is REST, and you split between underscores and camelcase, and it's kind of like across a bunch of endpoints. # Learning to Code **@katyadee:** Do you have any advice for anyone just learning to code? **@Kognise:** Don't get discouraged if you feel like you have no idea what you're doing or nothing's working because that happens all the time to everyone. **@katyadee:** What's a situation where you were challenged by something and you weren't sure how to proceed? Did you get help or how did you help yourself? **@Kognise:** This is kind of a Repl.it Mobile thing. One of the big bugs I was coming up against is console logging for web rebels because I had I have no clue how to like intercept console log messages and send them outside of the webview. I had no clue what to do I tried everything nothing was working and I kind of just procrastinated it and put out a message asking for help. Recently kakashi (on the mobile Discord) submitted a pull request and that apparently adds all of this. **@katyadee:** It’s always nice to hear about how collaborative the community is. **@Kognise:** I think that's an amazing thing about the coding and developer community in general, how like if something's open-source -- or even if it is an open source, like in the case of Repl.it -- people will write code or help other people much more than in other things
4
posted to Announcements by katyadee (829) 11 days ago
20
REPL BeatZ
I made animated headphones that model the ones I wear in real life. For the REPL Music Challenge, I decided to give my project a little twist with a recent update - when opening up the website, music will begin to play! This project was done entirely by myself, @EchoCoding. Please up-vote if you liked it - it'd be greatly appreciated!
9
posted to Challenge by EchoCoding (243) 17 days ago
8
Fruit ninja clone game made with PhaserJS
I started to use Repl.it to developt my html5 games :) ![Screen Shot 2019-07-12 at 10.02.30 AM](https://storage.googleapis.com/replit/images/1562950978834_497e61d2be0e876b6dbb68908fea8122.png)
6
posted to Share by numcomx (101) 7 days ago
13
Smartify - A Spotify-Powered thematic album queue
![smartify](https://storage.googleapis.com/replit/images/1563415108147_a4e4cac8961ddd3aa1e4a5f5092d9b0a.svg) ![introduction](https://storage.googleapis.com/replit/images/1563415136018_fcae7b95066de01a735042bde4ce50d8.svg) We all know how it feels to be listening to an energetic song and suddenly getting pumped up, only to find that the next song in our shuffled queue is sad and depressing. That not only ruins the mood of the album, but also the general consistency. Luckily, Spotify provided me enough breadcrumbs along the way through their various APIs to be able to build the solution to this very problem - a thematically consistent album generated, deemed "Smartify." Smartify takes factors like "danceability," "valence," "key," "energy," and "speechiness" (as described in the FAQ in the website below) - all major thematic defining factors of songs that we commonly know - and computes the standard deviation between the "scores" for each of these factors for every song in the playlist. Then, Smartify will find the song with the smallest "standard deviation" and add it to the queue. The previous song is then appended to a "played" list, thereby ensuring that the song does not get replayed and that Smartify doesn't fall into a loop - after all, it's supposed to be smart. After that, it'll generate a Spotify playlist for you (after you sign in and give it permissions) that follows a thematically consistent ordering. You can then add/remove songs at your leisure. If you're only using Smartify to find similar songs within playlists/albums, you can also preview the songs through Spotify's inbuilt player (although the preview is only 30 seconds). You can also view the lyrics for songs that are not instrumentals :) *Edit: Not true since my API website is **really** slow... will have to find another way* **TL;DR: What's so special about Smartify?** Fact is, if you have a playlist, it's very likely you don't want recommendations outside that playlist (or far off of the theme). Because of this, things like YouTube autoplay seem rather deprecated. On the other hand, our playlists are often shuffled into jumbled and inconsistent queue's in terms of how they sound - Smartify offers a two-fold solution by ensuring that the content of your albums/playlists stays the same, but that the order is optimized to be the very best by grouping similar songs together. So, without further ado, here it is: [https://smartify--shadowcypher.repl.co](https://smartify--shadowcypher.repl.co/) And its nemesis: [https://evilify--shadowcypher.repl.co](https://evilify--shadowcypher.repl.co/) *You can now search for your favorite albums/playlists, so you do not need the IDs below* ![albumID](https://storage.googleapis.com/replit/images/1563415136012_5a54fd1aba132e177cbfe1ee3b3bfec0.svg) Here are some ID's to try, unless you want to test your own: Drake's *Scorpion*: **37i9dQZF1DX1YF6nTEHymi** Post Malone's *Beerbongs and Bentleys*: **6trNtQUgC8cgbWcqoMYkOR** Elton John's *Diamonds*: **1uzIyRT1QxDx4fMIX0UiAE** ![helpguide](https://storage.googleapis.com/replit/images/1563415136045_0fd6548eb9dd9991af1d3cd12ff7b7e7.svg) **Getting an Album ID** For any album sharing link, it will be in the format: [https://open.spotify.com/album/**ID**](https://open.spotify.com/album/ID) Just paste the **ID** into the homepage's text box and it should work. **Forbidden/CSRF Token Trouble** For some reason, repl.it's embedded applications cannot implement CSRF form tokens, so you'll need to open the site in a new window. **Overlapping Albums** Yep, unfortunately this is the biggest issue right now. Since the views reference one class, overlapping users may experience overlapping album. As such, I recommend that you create a playlist to ensure that your "progress" will not be deleted if another user logs on. **Refactoring** Since up to this point I've just been adding new features, the code looks somewhat dirty and is often repetitive - I have to fix this once I get the general sense that Smartify satisfies all features anyone would ever want. ![suggestions](https://storage.googleapis.com/replit/images/1563415136207_65583633f2dca7c7a64a756792424ae0.svg) Please let me know if you have any suggestions. I literally created this a week ago, and I'm quite proud of it but there's a chance I'm overlooking something. If you want me to let the site play the full songs, don't worry, that's exactly what I did (but you may need Spotify Premium - something I'll fix soon enough). **Future Plans** - Add domain & Cloudflare - Share playlists? - Lyrics comparison --> Really slow right now - Entropy --> Will allow external albums as entropy increases and conform to the current album as entropy is close to 0 - Use of advanced data structures (actually taking a course on this haha) -> use priority queues - General refactoring
4
posted to Challenge by ShadowCypher (13) 10 days ago
242
The Fishing Game
# The Fishing Game *Explore your way through the different regions by catching the rarest fish you can. Catch em all to fill up your fishedex!* Hi!! This my fishing game. Here's a bit of an explanation that you also get ingame: Welcome to my fishing game! The aim of the game is to reach level 100 as quickly as possible. Catch the rarest fish you can and level up! You can sell your fish in the shop. Rarer fish bring in more gold. You can use this gold to purchase bait, which is needed to catch fish, and rods, which make catching rarer fish easier. Careful, bait gets more expensive as you level up. New types of fish are unlocked as you level up, and at higher levels, it's easier to catch fish. You can also see information about all the fish you've come across in the 'fishedex' in the shop. Catch them all! You might also find some treasure when you're fishing! The game saves your progress at the end of each day, so you can just log in again and pick up where you left off. Good luck! Press enter to continue. Not gonna lie, it's pretty fun. *** ## Backstory I made this game last July. The reason I choose fishing was mainly because it makes plurals easier - the plural of most types of fish is the same as the singular ;) (This doesn't work for anchovies though... or mythical creatures. Oh well). To make it I did have to learn a little about using classes and objects - I find them really useful now though. My coding's definitely developed a bit since I made this (it's a mess), but I can't really be bothered to make the code any neater (I did a tiny bit). I have edited it a bit since I originally made it to make it ready for the game jam. Here are some of the additions (spoiler for past level 100!!) : * There are new "mythicals" which are extremely rare fantasy creatures, like mermaids. They can only be encountered after level 100. You can't sell them, though the game remembers which ones and how many you've seen. You need the special new moonstone rod. * The game's harder now, in that the XP needed to level up increases exponentially as you go up the levels. I really should have had that from the beginning, because levelling up was way too quick. * Some new types of fish! * Highscore board for how many days it takes to reach level 100. I'm not sure if this was in the original fishing game that I posted in July, but I don't think it was. It's empty currently because the new XP-level scale has made all the previous highscores made by me and my family during testing unfair. Let's see who get's the lowest! * Rarest fish stat. Within the rarity boundaries like common, uncommon, rare ect, there are varying rarities based on a number. If you catch a fish with the same rarity number as your rarest fish stat, it counts as rarer if it's unlocked at a higher level. Basically, higher level is used to decide rarity in a couple of cases. The point is, I wanted to add something that made the game more orientated to getting the rarest fish - kinda like pokemon. Anyone got the blue whale? * Changed the rod names from "default, alright, decent, good, great" ect. to "wooden, bamboo, copper, iron, steel" ect, just for added character. The only one that stayed the same was the awesome golden rod ;) *** ## In the Future... I've got a few ideas for what I want to add to the fishing game... * A little addition of telling you the current highscore when you sign up, or when you log in, or at the top each day in game. I just don't really know which one would be best. Let me know what you want! * More fish of course! I just don't want to bombard you with them. Maybe if some of you guys really like the game I'll put a personalised fish in for you ;) * More ideas post level 100. Maybe some cool non-mythical fish. * Having the option to change rods using ones you've already bought, because at the moment if you want to change your rod you have to repurchase any you've already bought and that's just dumb. * New rods with cool properties, like extra attempts per day, or unlocking specific types of fish, unlocked at certain levels. * Maybe, but probably not, lengths of fish - they'd be a mean length for each type, and the fish you caught would be around this. The price could depend on length. There could be a new stat with longest fish caught? I feel like this is just too complicated for my simple little fishing game though. * Music! I feel like it would really benefit from some tunes but I don't know how to implement that. I'd have to look in to it. * Your suggestion here. Seriously, I would really love it if you guys could tell me what you want to see, if you like the game of course. PLANS FOR THE FINAL DAY * *Quests/achievements?* * *Rainforest and/or ~~fire biome?~~* DONE fire, I think rainforest would be cool but too much * ~~*Settings page with options to reset account, see highscores, see game info/help, see current number of accounts on the game?*~~ DONE * ~~*Work on fish rarity colours and fishedex/treasuredex colouring.*~~ DONE * ~~*End biome highscores page?*~~ DONE and in settings * ~~*Mythicals for the other biomes !!!*~~ DONE * ~~*Better names than "normal biome" "ice biome" "desert biome"*~~ DONE but they were stolen from game of thrones... oops * ~~*Weathers with different fish for different weathers*~~ DONE *** Well that's it. I really hope you guys like it. If there's any bugs let me know, and if you want any improvements, let me know too! Thanks so much for trying it out! (also sorry that it doesn't fit the cash theme. I edited it to make it more appropriate to the cash theme, but it kinda sucked. I prefer the cutesy fishing element) On a final note, let me know if you encounter all the mythicals! That would be seriously cool! Edit: don't really care if you don't like that it's in all lower case. I think it looks nicer. *** ## Change Log since posting * Input validation for a, b, c at the start of the day, to avoid the "press enter and run up your days" error * Input validation for logging in or signing up * More input validation for selling some fish, plus added capability for selling multiple fish at a time (not all fish) and fixing a bug that would've prevented fish with spaces in their name - eg electric eel - to be sold. * Fixed the printing of high scores so that it's in actually in the correct order, plus accounting for ties. * Disallowed "-" characters in the username, which would've messed up the accounts file, had it been working anyway. * Lowered the power of the rods and raised the prices for a more difficult game ... sorry if the highscores are now unfair but I can't let it be the same game forever :( * More input validation in the shop... it never ends * Weirdly, more input validation in the shop, I thought I caught it all, but nope. thanks for catching that, TechGamer * Added the "fishedex"!! It's amazing! It's literally just a pokedex. Go to the shop to see it. If you do manage to catch em all then tell me if my code works and you get a congratulations. Hope you all like the fishedex, thanks to Hamloid for the idea! * Accounts and highscores saving error fixed! * You don't get as much info about a fish each time you catch one now, only the first time you do. I think it looks a lot nicer. * The code now has the grammar knowledge of a 6 year old and can appropriately use "a" or "an" now. * If you put in "log in" but you should've put in "sign up", you no longer need to refresh, the code will sort it out for you. * Fixed password security thanks to ebest! * Added treasures and treasuredex! * Fish are now coloured based on rarity, inspired by Runescape! * Different biomes with different fish, different treasures, harder xp gradients, and dangers [dangers are so cool]! Level resets to 1 in these biomes. You can travel between biomes by ships (your old levels stay the same, don't worry). Biomes are only unlocked past level 100. I only have the ice biome now, but more are coming (unlocked at ice level 100, ect.) * Biome specific rods! [only 1 per biome, but they're both great at getting rare fish, and allow mythicals (at the moment mythicals can only be caught in normal, but I'm going to add ice and desert mythicals) * Desert biome added!! I know, the names suck. I'm working on it. * Bait price increases as you level up. It's also more expensive as you go through the biomes. * Dangers added for normal. * "One use" items! These are pretty cool and last for 1-2 weeks, increasing your chance at either: catching a fish, catching a treasure or catching rarer fish, or keeping you safer. There's 2 "levels" of item for each, with the better being rarer. They can't be bought in the shop and are instead found when fishing. * Added weathers, which are specific to biomes. Most fish can only be caught in certain type(s) of weather. * Added settings page with options to reset account, see highscores, see total number of accounts signed up, see game info and see game help. Going to settings doesn't use up your day, unlike the shop. * Improved fish rarity colours suggested by Mavrick and each line in the fishedex is coloured according the what biome the fish is found in. * Fire biome, which is the last one! Highscores page for when you complete it. * Mythicals for different biomes. * Biomes are no longer called biomes and are now named after locations in game of thrones. * Massive bug exodus just before deadlines oops * Inputs except user and password are now not case sensitive * Slight edits to reaching level 100 & ship functions * cats_ur_cool77's awesome fishing game tribute can be found in settings! * credits when you reach endgame! *** ### New: Competition! Anyone who can reach level 100 in under 300 days can have a personalised mythical! Screenshot the highscore board once you reach 300 and tell about what you want your mythical to be. Maybe they'll have even more XP than normal mythicals. Good luck!! *** **Account bug FIXED! Finally! Thanks so much to leon332157 for their json store module - https://repl.it/talk/share/jsonstoreio/10956. Your account information and highscores should always be saved now! (let me know if you find a bug though)** **Issue with account security is definitely improved now. Don't try too hard to hack it though aha Edit: account security is much better now!! thanks to ebest! ** **Don't forget to upvote if you enjoyed the game! Thanks so much to everyone who has done so, or commented, already!** *** ### Notes to judges * *Sorry that there are no screenshots of game play. I was planning to take some today but I have definitely ran out of time :(* * *Please don't mark me down because it's all in lowercase. It's inspired by a dark room, and it's super easy to change at the end of the day.* * *PLEASE play until you reach at least ~~the ice biome~~ Beyond the Wall because I worked so hard on the biomes!! And don't you want to log a highscore?* * *Sometimes, I worked on the file by forking it and editing the fork. I then copied and pasted it back into the original. I deleted some forks to make more room in my repl. I swear I used repl.it!* * *I used this file a lot to change the data that is held for the accounts. It was necessary when the new developments in the game required more data to be stored. https://repl.it/@AmeliaBlackwell/Fishing-Game-Account-Handler* * *Of course I really hope you enjoy my game :)* * *I had to restore the latest backup because the storage got full and had to delete itself. I'm really sorry anyone lost their data. I should've written an exception for this but I didn't think about that before the deadline. Everything should be working now though. *I recommend playing in a new tab*
612
posted to Share by AmeliaBlackwell (910) 4 months ago
9
Environ - The Bridge Between Music and Code
# Environ ### The Bridge between Music and Code Environ is a new coding IDE that sets up the perfect environment for coding. It has an editor workspace and a console to power your programs. In addition, Environ helps set up a proper background music so the coder can get in the right mood to code. ## Music Scientists have proven that the appropriate music can make workers more productive in their tasks. This is exactly what Environ does. Environ senses your mood through your keyboard actions, and then, using AI Machine Learning, it shows up different music options. For people who are going to slow, Environ will provide fast and adventurous music to get them back in the productive mood. On, the other hand, coders who code too fast will be given slow, uplifting music. This will calm them down, and it will also prevent them from making too many mistakes. ## Future Updates Right now, Environ is still in 1.0.0, but is under development to make new progress. In the future, we have the following plans: * Expand to having more languages, with a priority on Java. + Create a file system to organize multiple documents. - Allow users to create GUIs. * Allow users to create Servers. - Much more! Be on the look out for many of these cool features! ## From the Developer > When I though of this idea, I did not realize that it might have been a little too ambitious for a middle schooler to create an IDE for a music competition. However, as it turned out, despite having multiple difficulties, it was easier for me than I would have initially thought! Clearly, if I had just though of this as too complicated for a music competition, I would never have been able to embark on this exciting enterprise. > This project has taught me a lot. Despite the fact that I am already very experienced in JavaScript, I still got to learn a lot of new ways to write and execute code. Doing this project was a very valuable experience. > All in all, I know this will not be like other projects that you and I have done. Usually, after the competition, we forget about our projects. This leads to lack of updates and unintended glitches. However, I know that this project will stay with me for the rest of my life. I hope to continue and make this product grow, so the world can see the power that Environ has. -Ved Pradhan, Developer of Environ, @vedprad1 Note: This was my own project, not a group one.
19
posted to Challenge by vedprad1 (443) 13 days ago
18
RICKROLLING ALL DAY LONG
Hey, you said music. This was the first thing that came to mind. It's ironic the button to submit this says "Let's rock and roll." But yeah, hope you enjoyed this :) https://rickroll--canteventhink.repl.co/
7
posted to Challenge by canteventhink (19) 18 days ago
33
What should we code?
I've seen a couple of posts around here where people are asking what they should work on next. Let's use this space to brainstorm some cool projects.
112
posted to Ask by katyadee (829) 2 months ago