Posts

Showing posts from June, 2019

Data Structure Algorithm concepts

Ajith_cheet_Sheet Data Structure algorithm  ### Array ####Definition: Stores data elements based on an sequential, most commonly 0 based, index. Based on tuples from set theory. They are one of the oldest, most commonly used data structures. ####What you need to know: Optimal for indexing; bad at searching, inserting, and deleting (except at the end). Linear arrays , or one dimensional arrays, are the most basic. Are static in size, meaning that they are declared with a fixed size. Dynamic arrays are like one dimensional arrays, but have reserved space for additional elements. If a dynamic array is full, it copies it's contents to a larger array. Two dimensional arrays have x and y indices like a grid or nested arrays. ####Big O efficiency: Indexing: Linear array: O(1), Dynamic array: O(1) Search: Linear array: O(n), Dynamic array: O(n) Optimized Search: Linear array: O(log n), Dynamic array: O(log n) Insertion: ...

django Documentation

https://docs.djangoproject.com/en/2.2/

Create a Django API

Image
Django is by far the most popular Python framework, designed to provide Rails-like ease of use. Let’s see how quickly we can set up a simple API using Django and a library called TastyPie. For those of you who read the Node API tutorial , we’re now going to attempt to do the same thing with Django. We’ll also very quickly see how Django makes some things harder, and some things much much easier. Who This Tutorial Is For : You should have a basic understanding of REST APIs and CRUD operations. Python knowledge is a plus but not necessary. You’ll pick it up. We’ll be building an API for a Google Keep-esque note-taking web app. We want to build a REST-ful API with the CRUD endpoints, to create, read, update, and delete notes. The good news is that rather than approach these endpoints individually, Django lets us more or less create them all in one fell swoop. Setting Up Our Project Django divides your work into projects and apps. Projects contain apps, but ...