Git Product home page Git Product logo

engineer-man / emkc Goto Github PK

View Code? Open in Web Editor NEW
138.0 138.0 34.0 7.17 MB

Engineer Man Knowledge Center

Home Page: https://emkc.org

License: MIT License

JavaScript 72.04% CSS 0.74% Shell 0.76% HTML 0.17% Dockerfile 0.10% C 0.05% C++ 0.04% C# 0.04% Go 0.04% Java 0.04% PHP 0.02% Python 0.02% Ruby 0.01% Swift 0.01% Rust 0.05% Julia 0.01% Less 6.95% Twig 18.84% Haskell 0.03% Kotlin 0.03%
bootstrap4 elasticsearch mysql nodejs redis

emkc's People

Contributors

akanate avatar avelizmu avatar brikaa avatar chriscn avatar dbragz avatar derekwilling avatar hexf avatar jonxslays avatar kalix123 avatar monlih avatar nathan-hacker avatar niki4tap avatar nova-ardent avatar realtux avatar sggts04 avatar sirdagen avatar soruh avatar titouant avatar vrganj avatar zackoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emkc's Issues

Allow users to edit/delete their own snippets

Since snippets can be attached to a user's account, it would be nice if they were able to edit their own snippets, or even delete them. I'm thinking this would look like having an 'Edit' button above the snippet that validates you are indeed the snippet owner, and a 'Save' button that comes up afterwards.

If this were to be implemented, having a version history would also be a good idea so that people can refer to a previous version if need be.

create 10 easy challenges

official list for this iteration

  • reverse a string
  • in a string of numbers, determine which has the highest frequency
  • sum a comma separated list of numbers
  • given a fibonacci sequence number, calculate the next n digits
  • given two comma separated lists of numbers, determine the overlapping numbers

how to create a challenge:

  1. create a new record in challenges table
  2. create a new folder in platform/resources/challenges in the format of [pk of new record in db]_[simple name you select]. ex. 1_reverse_string or 2_number_frequency.
  3. in that folder create an abstract.html to describe the challenge
  4. also in that folder, create a tests.json to describe the test cases

see the two that are already made for an example.

Make more challenges

So we need more challenges for emkc.
It's not that difficult to make a challenge.
You can clone the repo and look at the other challenges or follow the steps below.

how to create a challenge:

  1. create a new record in challenges table
  2. create a new folder in platform/resources/challenges in the format of [pk of new record in db]_[simple name you select]. ex. 1_reverse_string or 2_number_frequency.
  3. in that folder create an abstract.html to describe the challenge
  4. also in that folder, create a tests.json to describe the test cases

Add pop-up notification on challenge solve

I think a notification, once you solve a challenge would be nice.

The way it is now only the little status indicators on the top left and in the "console" change
which can be easily missed and just doesn't feel as rewarding as a proper notification.

The popup would probably have to be triggered somewhere around here, but I don't feel sufficiently confident with react and how it is utilized here to write this myself.

emkc challenges format

Format:

{challenge name}
Challenge : {id}

Difficulty: {dif}/5



{description}



{example input}

{example output}

Example:

Ascending values

Challenge: 1

Difficulty: 1/5



Given an CSV of numbers, write a program that can determine if all of these values are in ascending order. That is they’re ordered from lowest to highest values. Return a boolean stating whether or not the numbers are in order. You may assume that the input will always be valid, but may not assume that there will be a fixed set of numbers.

For: 1, 2, 2, 4, 9

output: true



for: 1, 3, 2, 7, 12

output: false

Install procedures need to be configured for MySQL 8

Trying to run the website on WSL 2 with Ubuntu gives the following errors in the emkc_mysql container:

2020-09-25 09:00:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
2020-09-25 09:00:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-09-25 09:00:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
mysqld: [Warning] World-writable config file '/etc/mysql/conf.d/mysqld.cnf' is ignored.
2020-09-25T09:00:09.903225Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 1
2020-09-25T09:00:09.912759Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-09-25T09:00:10.007207Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-09-25T09:00:11.933656Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2020-09-25T09:00:12.116161Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2020-09-25T09:00:12.189724Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-09-25T09:00:12.365800Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-09-25T09:00:12.420193Z 0 [Warning] [MY-000054] [Server] World-writable config file './auto.cnf' is ignored.
2020-09-25T09:00:12.421932Z 0 [Warning] [MY-010107] [Server] World-writable config file './auto.cnf' has been removed.
2020-09-25T09:00:12.423117Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 854c0400-ff0d-11ea-86ec-0242ac120004.
2020-09-25T09:00:12.929649Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-09-25T09:00:13.051888Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2020-09-25T09:00:13.052096Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-09-25T09:00:13.059219Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-09-25T09:00:13.062517Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-09-25T09:00:13.320438Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-09-25T09:00:13.321178Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2020-09-25T09:00:13.321641Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2020-09-25T09:00:13.321866Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2020-09-25T09:00:13.322688Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-09-25T09:00:13.323003Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-09-25T09:00:13.323556Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-09-25T09:00:14.956223Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21)  MySQL Community Server - GPL.

create sandboxed operating environments

create an api accessible separate server which contains docker images for each operating environment to execute untrusted code.

current operating environments are:

  • js via node.js 10
  • python via python3
  • go via go 1.8
  • ruby via ruby 2.x
  • c via gcc
  • php via php7

view my snippets

place a button here:
https://shottr.com/i/gfSa

which goes to a page (/snippets/list) that lists all their snippets in a big table. include a view button, language, 3-4 lines of the snippet, and the date it was created. no need to use react here, a simple twig for loop will be fine. if this page is accessed without a user logged in, redirect to /snippets.

Mistake in pig latin challenge solution

The expected text capitalizes the I, while the supplied one doesn't:

Supplied: isthay isyay osay andomray atwhay amyay iyay oingday
Expected: this is so random what am I doing
Actual: this is so random what am i doing

Changing capitalisation does not seem to be a part of pig latin.

Can’t access challenges

Trying to access the challenges locally gives this:

(node:77) UnhandledPromiseRejectionWarning: SequelizeDatabaseError: Expression #7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'emkc.solution.user_challenge_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
    at Query.formatError (/opt/emkc/platform/node_modules/sequelize/lib/dialects/mysql/query.js:239:16)
    at Query.run (/opt/emkc/platform/node_modules/sequelize/lib/dialects/mysql/query.js:54:18)
    at async /opt/emkc/platform/node_modules/sequelize/lib/sequelize.js:619:16
(node:77) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

fix emkc init race condition

on init, rmig runs sometimes before mysql inits for the first time. a second run does fix this but would be confusing to a typical user.

absorb resources from discord into emkc

update the list of language resources to reflect the content that is present in discord as well as languages that are popular but have no resources at the moment. take all the content from discord resources channel and place it into emkc resources section.

moderation features

  • the ability for staff to remove questions and answers
  • the ability for you to delete your own questions.
    I will finish this tomorrow.

create content for team section

the team section should list each core developer of the site (a person who routinely commits code) and then make an api call to github (or analyze the repo if not possible) to retrieve a list of every contributor who had at least one commit merged into the master branch of the repo and list their pictures in a long line

emkc suggestion: collaborative projects

This is a little out of the box, but I think it is a good idea.

We can start a project every two weeks or every month, a Github repo will be made for the project and details about the project will be posted on emkc. Emkc members will then start collaborating on the project, and after the period ends, the finished result can be showcased on the website.

I think this is a good idea because, unlike contests, members will collaborate together to solve real-world problems and that would help them become better programmers.

EMKC challenge solved with incorrect code

The challenges can be marked as solved even if the solution doesn't work for all test cases. This seems to be because the solution is only run against a subset of tests, and if it passes those then the tests are passed.

Example:
https://emkc.org/challenges/13/python

print(max(value1, key=lambda x: value1.count(x)))

This solution works for cases where there is only a single letter that occurs most often, but fails for cases with multiple equally occuring letters. However if this is run against test cases that only test with a single max occuring letter, the challenge is solved, despite the solution being flawed and failing other cases.

EM history page

Shows all updates to emkc and the history behind it like so. (I'm obviously missing a few dates, like emkc was born etc..)
May 13, 2017
Engineer man posted his first video

June 10, 2017
Engineer man had his first being channel explosion

July 29, 2018
Engineer man posted his first 1 million viewed video.

August 3, 2018
The discord was created

August 28th, 2018
Armageddon happened

August 28th, 2018
Security was increased to prevent armageddon 2

September 20th, 2018
Felix run was born, and coding was allowed to be done as a function of the discord server.

sggt - notify completed

Notify user that they have completed a language on the language selection screen in addition to the programming screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.