Skip to main content

The magic library

Project description

The Magic Library ! - The library that gives you all the functions and class you need !

Why ?

I decided to create this project during a night at 2am after remembering the videos "Why you suck at coding" of Ben Awad, about the algorithms asked during job interviews. He showed how to resolves this algorithm problem in very stupid ways but I was thinking : Can we even do worse ? Of course you can ! It also remembers me some coding exams during college when sometimes you even have to write C or even worse Java code on paper. I also remember a friend when sometimes we discussed about how to do something and when he didn't know exactly how we could it, it just said "... then we called the magic function ..." and here it is ! The library that (will) contain all famous algorithms that you need for job interviews, college exams, or just some common algorithm you need all the time. But to keep the idea of "calling magic function", the functions be named "reverseBinaryTree" or "magicSquare" but just "magicFunction1", "magicFunction2", etc. So that if during a job interview or an exam they ask you how to reverse a binary tree in python then you can write :

from magicLib import magicfunction1263905

reversedTree = magicfunction1263905(theTree)

Todo

  • Everything of course
  • For now, I'm just writing magicFunction1, magicFunction2 etc. but I think having a code to classify the algorithm would be nice, like "the function starting by '420' are sorting algorithm"
  • Create the ultimate function magicfunction that does whatever you want. It should be used like this :
    reversedTree = magicfunction("reverseBinaryTree", tree)
    index = magicfunction("fibonacciSearch", arr, 60)
    ...
    
    The function will just call the right function with the given parameters

Functions implemented

  • Reverse String
  • Fibonacci Search
  • FizzBuzz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

the-magic-lib-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

the_magic_lib-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file the-magic-lib-0.1.0.tar.gz.

File metadata

  • Download URL: the-magic-lib-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for the-magic-lib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69072edd43a2ddf00dd03316f9de11fcedc80fb330446db89a0b83c8135d11a2
MD5 2f4f6ed18c3720093c2b9e7a6f2fc46f
BLAKE2b-256 4fa1a69994bc2cd017e787169f0a9636df89297979a293de34063fd1bf11cf66

See more details on using hashes here.

File details

Details for the file the_magic_lib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: the_magic_lib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for the_magic_lib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24b239c3460fb90f6dceae8dfbe93cc8539d9edcb03842ba3946912a158fa5bf
MD5 108d29b85f824a7023e7bb23db78629a
BLAKE2b-256 e2a54db30e0e894a3b30e4aad2ace7826f35add9984ab6c9b365f2402089da52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page