This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import timeit | |
print(hashlib.algorithms_available) | |
print(hashlib.algorithms_guaranteed) | |
# hashing functions ------- | |
def sha256fun(binp): | |
h = hashlib.sha256(binp) | |
return h.hexdigest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
About Rails :: | |
1. Rails is a web framework which tries to do the heavy lifting for us (like django in py), you just need to insert code-snippets/files at pre-defined places and you are done most of the times. | |
2. Everything revolves around a resource, A resource is anything that can be created, updated, viewed, listed, deleted etc via http apis. For ex: For a blogging application an article can be a resource. | |
3. It is MVC arch : Model-View-Controller | |
Model: | |
1. Contains the blueprint/skleton of the resource (for ex. Article => Title, Body, Date-of-creation) | |
2. Tightly in association with DB, Typically a db table is created for every model and you can modify the record in the table by calling methods on your model object | |
Controller: |