Skip to content

Instantly share code, notes, and snippets.

View singh-gur's full-sized avatar

Gurbakhshish Singh singh-gur

  • Macquarie Group
  • Philadelphia
View GitHub Profile
@singh-gur
singh-gur / a.py
Created November 18, 2024 05:04
a.py
def plan_delivery(self, debug=False):
moves = []
current_position = self.dropzone
picked_up_box = ""
for box in self.todo:
box_position = self.box_locations[box]
if self.is_adjacent(current_position, box_position):
moves.append(f'lift {box}')
picked_up_box = box
@singh-gur
singh-gur / starship.toml
Created January 12, 2024 06:42
starship.toml
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "🪫"
[[battery.display]]
threshold = 30
style = "bold yellow"
@singh-gur
singh-gur / Dockerfile
Created January 3, 2024 18:55
Docker poetry biuld
FROM python:3.12-slim as base
RUN apt update -y && \
apt upgrade -y
RUN apt install -y gcc libffi-dev g++
RUN pip install -U pip
WORKDIR /app
FROM base as builder
@singh-gur
singh-gur / nordvpn_check
Last active December 3, 2022 05:32
Starship prompt configs
#!/bin/bash
/usr/bin/nordvpn status | grep Status | awk -F": " '{print $2}'
@singh-gur
singh-gur / python_vsc_tasks.json
Last active August 10, 2022 18:07
Python vscode tasks
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "autoflake.removeUnusedImports",
"command": "${command:python.interpreterPath} -m autoflake -i --remove-unused-variables --remove-all-unused-imports -r ${workspaceFolder}",
"presentation": {
"echo": true,
"reveal": "silent",
version: '3'
services:
concourse-db:
image: postgres
restart: always
environment:
POSTGRES_DB: concourse
POSTGRES_PASSWORD: build_dbpass
POSTGRES_USER: build_dbuser
#!/bin/bash
VERSION="dev"
TAG_LIST=$(git tag --points-at HEAD)
COMMIT_TAG=$(echo $TAG_LIST | cut -d ' ' -f 1)
COMMIT_HASH=$(git rev-parse --short HEAD)
if [ -n "$COMMIT_TAG" ]; then
VERSION=$COMMIT_TAG
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <path>"
exit 1
fi
V_DIR=$1
if [ ! -d $V_DIR ]; then
import csv
if __name__ == '__main__':
data = []
input_file = csv.DictReader(open("file_name.csv"))
for row in input_file:
data.append(row)
@singh-gur
singh-gur / cura_prusa_mini_bmg_start.gcode
Created January 30, 2021 03:48
Prusa MINI+ BMG Start GCode
M201 X1250 Y1250 Z400 E5000 ; sets maximum accelerations
M203 X180 Y180 Z12 E80 ; sets maximum feedrates
M205 X8.00 Y8.00 Z2.00 E10.00 ; sets the jerk limits
M221 S100 ; reset flow
G90 ; use absolute positioning
M82 ; absolute extrusion mode
M104 S170 ; set extruder temp for bed leveling
M140 S{material_bed_temperature_layer_0} ; set bed temp
M109 R170 ; wait for extruder temp
M190 S{material_bed_temperature_layer_0} ; wait for bed temp