Skip to content

Instantly share code, notes, and snippets.

View pronitdas's full-sized avatar
🎯
Focusing

Pronit Das pronitdas

🎯
Focusing
View GitHub Profile
@pronitdas
pronitdas / test.js
Created January 23, 2024 19:50
test mvt using node
// api in question is a mapbox vector tiles
// Path: test.js
const SphericalMercator = require("@mapbox/sphericalmercator");
const merc = new SphericalMercator({ size: 256 });
const axios = require("axios");
const fs = require("fs").promises;
const { Console } = require("console");
const http = require('http');
@pronitdas
pronitdas / index.py
Created January 4, 2022 16:31
convert to cog
from rio_cogeo.cogeo import cog_translate
from rio_cogeo.profiles import cog_profiles
def translate(src_path, dst_path, profile="deflate", profile_options={}, **options):
"""Convert image to COG."""
output_profile = cog_profiles.get(profile)
output_profile.update(dict(BIGTIFF="IF_SAFER"))
output_profile.update(profile_options)
config = dict(
@pronitdas
pronitdas / contact-to-vcf
Created October 7, 2021 19:19
remove duplicates vcf
const csv = require('csv-parser')
const fs = require('fs')
var vCardJS = require('vcards-js');
let outputStream = fs.createWriteStream('new_contacts.vcf', 'utf8');
let inputStream = fs.createReadStream('new_contacts.csv', 'utf8');
let allContacts = []
inputStream
.pipe(csv())
#!/bin/bash
while true
do
cd ~/<REPO_FOLDER>
git fetch
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse @{u})
if [ $LOCAL != $REMOTE ]; then
git pull origin <TARGET_BRANCH>
docker-compose up --build -d
Some thoughts on how you could evaluate the state of the systems your team owns.
One way to use this:
Put some of these criteria on the Y axis
Put the name of the components you own on the X.
Give everything a score from 1 to 0.
Either average the scores or sum them to figure out which components need the most love.
If all of these are the same for everything you own, it might make sense to skip that section. For example, if you own 10 services, but they all use a common build pipeline that you don’t maintain, it might make sense to skip that criteria.
@pronitdas
pronitdas / The Technical Interview Cheat Sheet.md
Created April 9, 2021 08:52 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
{
"editor.tabSize": 2,
"editor.fontSize": 15,
"terminal.integrated.fontFamily": "Dank Mono, Monaco, 'Courier New', monospace",
"editor.fontFamily": "Dank Mono, Monaco, 'Courier New', monospace",
"editor.lineHeight": 26,
"editor.fontLigatures": true,
"explorer.decorations.badges": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
@pronitdas
pronitdas / modern-geospatial-python.md
Created February 5, 2020 15:41 — forked from jqtrde/modern-geospatial-python.md
Modern remote sensing image processing with Python