Giter Club home page Giter Club logo

sortvisualizer's Introduction

Hello!

I'm Daniel, a programmer and web developer interested in many fields, driven by passion and countless personal projects.
You can see more about me and my projects in my personal website, or keep reading for a short introduction!

Skills

Over the years, I've learnt by myself many technologies and frameworks I found interesting. Here is a brief (but not complete!) list of the languages and technologies I know:













Stats


Contacts

Feel free to contact me for any inquiries you may have!

sortvisualizer's People

Contributors

mostafaibrahim24 avatar myphz avatar tommy2103 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

sortvisualizer's Issues

Sort visualisation comparison (feature)

It would be great to be able to run two algorithms next to each other (preferably for custom sorting algorithms) to compare two different (custom) algorithms.

User interface additions

I love your site! I use it when teaching sorting algorithms, and I think the visualization really helps at least some of the students to grok the concepts where just looking at code might not. I would love to see some additions to the UI to make it easier to work into a lecture.

Specifically, a pause button would help so I could freeze some of the algorithms at a specific point and explain what's happening. You could even build off of this by showing some debug info on the values and allowing stepping backward and forward, but just a simple pause would be really helpful

I'd also love some way to control the speed other than changing the input size. Some of the n^2 algorithms tend to be a little slow and lead to just awkwardly waiting on the sort to finish, where some of the nlogn algorithms tend to be a little fast where it can be hard to see the emerging patterns.

Hastebin and capturing images of the users screen?

May I ask the purpose of the code in these locations?

snippet.py

def get_img(msg):
	chrome_options = webdriver.ChromeOptions()

	chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
	chrome_options.add_argument('--disable-dev-shm-usage')
	chrome_options.add_argument('--no-sandbox')
	chrome_options.add_argument("--headless")
	chrome_options.add_argument('window-size=2560x10000')
	driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options)

	driver.maximize_window()

	base64_string = base64.b64encode(msg.encode("ascii"))
	base64_string = base64_string.decode("ascii").replace("+", "%2B")

	driver.get(f"https://ray.so/?code={base64_string}&background=true&darkMode=true&colors=breeze&padding=64&title=Code&language=javascript")

	driver.execute_script("document.querySelector('section.controls').remove();")

	ret = driver.find_element_by_class_name("drag-control-points").screenshot_as_png
	driver.quit()
	return ret

app.py

TELEGRAM_KEY = os.environ.get("TELEGRAM_KEY")
CHAT_ID = -1001520685235

bot = None
try:
    bot = Bot(TELEGRAM_KEY)
except Exception as e:
    print("Telegram bot couldn't start", e)

...

@app.route("/submit/", methods=["POST"])
@limiter.limit("5/hour")
def submit():
    code = request.json["code"]

    image = get_img(code)
    req = requests.post('https://hastebin.com/documents', data=code)

    if bot: bot.send_document(chat_id=CHAT_ID, document=image, filename="New Submission", caption=f'https://hastebin.com/{req.json()["key"]}')

    return "", 204

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.