Skip to content

Instantly share code, notes, and snippets.

View j-thepac's full-sized avatar

Deepak j-thepac

View GitHub Profile
@j-thepac
j-thepac / multiprocess.py
Created July 3, 2022 13:30
multiprocess
import concurrent.futures
import time ,datetime
start = datetime.datetime.now()
def do_something(seconds):
print(f'Sleeping {seconds}')
time.sleep(seconds)
return f'Done Sleeping...{seconds}'
with concurrent.futures.ProcessPoolExecutor() as executor:
results = executor.map(do_something, [1,1])
@j-thepac
j-thepac / multithread.py
Created July 3, 2022 13:20
multithread
import concurrent.futures
import time ,datetime
start = datetime.datetime.now()
def do_something(seconds):
print(f'Sleeping {seconds}')
time.sleep(seconds)
return f'Done Sleeping...{seconds}'
with concurrent.futures.ThreadPoolExecutor() as executor:
results = executor.map(do_something, [1,1])

Dataset : IMDB Movies dataset

  1. Ranking of movies for each Decade based on Gross
@j-thepac
j-thepac / docker.md
Last active August 4, 2024 11:44
Docker

DOCKER

Env : https://labs.play-with-docker.com/

  • Docker = Container and Images
  • Docker Can be executed as
    • command line
    • dockerfile
    • docker-compose.yml

Image

Snapshot of the application containing all the libraries , supporting files etc.,

@j-thepac
j-thepac / Synapse.md
Last active February 4, 2025 11:59
Azure Synapse

Synapse

Note :

  • For JSON file make sure all new lines , blank spaces are removed.
  • Dataflow , Notebooks etc - names has to start with String.
  • blob = flat namespace , Gen2 = directories
  • Azure Active Directory (Entra ID) : Used to Create 1 Functional ID (secret ) called Serive Principle across all applications to communicate with each other
  • SP ( serivce Principle) : Managed by User ie., renew etc.,-
  • Managed identity (service principal) : managed by Azure

Kubernetes

Problem with VM:

  • Virtual machines comes with unwanted apps and services Eg: Browser
  • All process / Threads were not is user control .
  • Memory allocation was not in user control.
  • Syncing Virtual machines is not easy
  • Lot of configuration was needed
  • To delete and reconfigure was a nightmare.

Kubernetes

  • configure, automate, and manage applications using containers Image
@j-thepac
j-thepac / BUILD
Last active May 16, 2022 09:47
bazel build file to add multiple class files in jar file
#---------------------------
#Bazel build parent.jar
#This would add Parent.scala , Child1.scala , Child2.scala in the jar file creatd
#---------------------------
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_binary","scala_library")
package(default_visibility = ["//visibility:public"])
@j-thepac
j-thepac / notebook.ipynb
Last active May 6, 2022 11:24
Azure Synapse Receiving and Passing Values from Notepad
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j-thepac
j-thepac / DP-900.md
Last active May 2, 2025 14:54
Material for Dp-900 Exam

DP 900

Azure Data Fundamentals: Explore core data concepts

  • Type: structured, semi-structured, or unstructured.
  • Data stores : File stores ,Databases
  • file Formats :
    • Delimited text files
    • JavaScript Object Notation (JSON)
    • Extensible Markup Language (XML)
  • Optimized File Format
@j-thepac
j-thepac / indexing.md
Last active April 27, 2022 12:18
Indexes in SQL
  • Indexes to query data faster, speed up sort operation, and enforce unique constraints.
  • A DB table each row has rowid and sequence number to identify row
  • Eg :table = list of pairs (rowid, row) )
  • Index is created on a seperate table which has opposite relationship: (row, rowid)
  • SQLite uses B-tree ie., balanced-tree ie., Actual table rows = Index table rows

Mac: