Riya and Sarayu terms: - sarayu-pr11/team-narks GitHub Wiki
Binary: number system consisting of 1s and 0s; the primary language used by computers in order to comprehend human logic
Hexadecimal: an alphanumeric system consisting of number 0-9 and letters a-f; another language used mainly for pictures and RGB.
- Ex: Color Codes in HTML and CSS. One hexadecimal digit is equivalent to four binary digits.
.button:hover { background-color: #f9ece7; color: #44312b; }
Bit: one unit in a binary sequence; EX. 01 = 2 bits A bit is a binary digit, the smallest increment of data on a computer.
Computer Network: interconnected computing devices that can exchange data and share resources with each other
- ex: instant message, or check the weather on your phone, you're using an API
- In our code we use data from other sources (API) which interact with each other:
Parallel/Distributed computing: parallel computing on a single computer uses multiple processors to process tasks in parallel; distributed parallel computing uses multiple computing devices to process those tasks
Ex. Functions in code that can run simultaneously; functions that depend on another before they can run
- (ex: higher layer (TCP) disassembles message content into small "data packets". Then these packets are transmitted across the internet to be re-assembled by the receiving computer's TCP back to messages original content)
- client-server protocol,
- requests are initiated by the recipient - usually the web browser
GET: While connected to another computer using an FTP, get is a command line command used to download a file or files from that computer
- usually used in cases when the data does not contain sensitive things
@app.route('/reminders/', methods=['POST']) def storeNotes(): #kdf = open('/tmp/KammyDebug.txt', 'wt+')
POST: When power is turned on, POST (Power-On Self-Test) is the diagnostic testing sequence that a computer's basic input/output system (or "starting program") runs to determine if the computer keyboard, random access memory, disk drives, and other hardware are working correctly
- Basically is used to send data to update a resource
- Usually the data contains sensitive information
@app.route('/reminders/', methods=['POST']) def storeNotes(): #kdf = open('/tmp/KammyDebug.txt', 'wt+')
RUNTIME EXAMPLE:
-
https://github.com/sarayu-pr11/team-narks/blob/main/main.py#L85
-
https://github.com/sarayu-pr11/team-narks/blob/main/main.py#L113
https://github.com/sarayu-pr11/team-narks/blob/main/__init__.py#L2
Import: an import is when one module gains access to the code in another module by the process of importing it
import random number = random.randint(1,100)
RUNTIME EXAMPLE: https://github.com/sarayu-pr11/team-narks/blob/7041446bbed0866fac753cc67fe6fbac7f0f1ce7/main.py#L5 Ex. APIs, import modules in python, any python file
https://github.com/sarayu-pr11/team-narks/tree/main/templates/crud
let array = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20,24,25,28,29,30,39,400000,5000000]
function binary_search(arr,value){
let high = arr.length -1;
let low = 0;
let mid = 0;
while (low <= high){
mid = Math.floor ((high + low)/2)
//middle == value being searched
if(arr[mid]==value) {
//return value
return arr [mid];
}else if(value>arr[mid]) {
//move the low up one
low = mid + 1;
}else{
//move the high down one
high = mid -1;
}
}
return -1;
}
let sorted = array.sort(function(a,b) {return a-b}) console.log(sorted); let wasItFound = binary_search(sorted, 83); console.log(wasItFound);
ex:
<img style="text-align: center" src="/static/assets/flamingo.gif" height="300" width="300">
<img style="text-align: center" src="/static/assets/speech.png" height="275" width="290">
Fetch: retrieval of data by a software program, script, or hardware device. After being retrieved, the data is moved to an alternate location or displayed on a screen
function get_random_dog_image(){
url = "https://dog.ceo/api/breeds/image/random";
fetch(url)
Blueprints: high-level plan or outline used in the development of software. Redirects main.py files, used in better organization for project
app_crud = Blueprint('crud', name, url_prefix='/crud', template_folder='templates/crud/', static_folder='static', static_url_path='static')
Data: Any information that is processed/ stored in a computer. Examples: text documents, images, audio clips, software programs, etc.
ex: images/assets from data folder
"/static/assets/note.png" id="img1" onclick="play1()" height="270" width="480">
function play1() { var audio = document.getElementById("audio"); audio.play(); }
Lossless: class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. Lossless compression methods are reversible.
Lossy: method of data compression in which the size of the file is reduced by eliminating data in the file.
function play1() { var audio = document.getElementById("audio"); audio.play(); }
function play2() {
var audio = document.getElementById("audi");
audio.play();
}
function play3() {
var audio = document.getElementById("aud");
audio.play();
}
function play4() {
var audio = document.getElementById("au");
audio.play();
}
Response: the first computer sends a request for some data and the second responds to the request/ how long it takes for computer to respond to whatever you asked it do:
url = "https://dog.ceo/api/breeds/image/random";
fetch(url)
.then(function(response){
return response.json();
Class - A class is a blueprint that defines the variables and the methods common to all objects of a certain kind.
Ex: Vehicles
Attribute - changeable property or characteristic of some component of a program that can be set to different values.
Ex: Model of Car, Year it was made, color
##Request: a message sent between objects.
payload = "{ \"key1\": \"value\",\"key2\": \"value\"}"
headers = {
'content-type': "application/json",
'x-rapidapi-host': "motivational-quotes1.p.rapidapi.com",
'x-rapidapi-key': "066e279e11mshd6855dd2ac40d0dp19761ajsn088d1e5fbc92"
}
response = requests.request("POST", url, data=payload, headers=headers)
Object- instance of a class Ex: Cars
Methods in OOP: are like drive and brake function