Skip to content

Instantly share code, notes, and snippets.

View j-thepac's full-sized avatar

Deepak j-thepac

View GitHub Profile

Raspberry Pi Pico

Micro Python:

1. Open Source
2. Modules are cheaper 	

Circuit Python :

1. Fork of Micro Python 
2. Owned by Ada Fruit
3. Compatible with Only Ada Fruit Modules
4. Expensive 
5. No ConCurrency and No State Sharing 

Storages

  docker run -d -p 5672:5672 rabbitmq # message
  docker run -d -p 27017:27017  mongo #result
  docker run -d -p 6379:6379 redis

Note : Use PK ,FK - Star Schema Design ie., StudentID in school

  1. sqlite3 : To Stores Relational Data
  2. Redis
    • Store Cache Data (key-val)
  • Message Bus between application (pubsub)
@j-thepac
j-thepac / MultiThread.py
Created October 21, 2023 09:43
Find sum by using common Aggregator
import concurrent.futures
import threading
a=0
def fn(i):
global a
a=a+i
print(a,threading.get_native_id())
if __name__ == '__main__':
@j-thepac
j-thepac / spark_compression.py
Last active May 19, 2024 05:06
spark_compression
# %% [markdown]
# Test Sample Details
#
# Format : JSON
# Count = 97
# File Size = 2.8 MB
#
# %% [markdown]
# Compression Codec | Time to Compress | Time to Decompress | Benefits | Drawbacks | Compression Size | Common Use Cases
@j-thepac
j-thepac / pysparkCache.py
Last active December 28, 2023 17:13
Spark Optimizations - Cache and Checkpoint
# %%
from pyspark.sql import SparkSession
spark=SparkSession.builder.appName("performance").getOrCreate()
# %%
import string,random
# %%
rdd_student=spark.sparkContext.parallelize(zip(range(1,27),string.ascii_uppercase))

Anbernic folders

Important

System Rom Folder Year of Release
Capcom Play System 3 CPS3 -
Capcom Play System 2 CPS2 -
Capcom Play System 1 CPS1 -
Nintendo Game Boy Advance GBA 2001
from fastapi import FastAPI,Request
from pydantic import BaseModel
import uvicorn
from smslottery import validate_bet
from fastapi.middleware.cors import CORSMiddleware
origins = ["*"]
class Data(BaseModel):
game:str
text:str
@j-thepac
j-thepac / Excel.md
Last active June 25, 2023 04:19
Excel Operations

Excel

  1. Each Function = New Column
  2. Apply to 1 Cell , later extend
  3. All Rows A:A
  4. "this is string"

String

=LEN(C1)

Big O Notation :

  • asymptotic notations to calculate the running time
  • longest amount of time an algorithm can possibly take to complete

DataStructure (Create,access,Search,Insert,Update,Delete)

  • String

  • Array / 2D aray

  • LinkedList (Create ,append , display , ReverseDisplay, remove , Change value, Update By Index

      class LinkedList:
    

def init(self,i):

HTML CSS JAVASCRIPT REACT

  • Node : Engine which executes javaScript

HTML ( templates : index.html,script.js,style.css)

  1. Attributes
    • href="URL"
    • id =""
  2. Important Tags