Skip to content

Instantly share code, notes, and snippets.

View shubhamwagh's full-sized avatar
🎯
Focusing

Shubham Wagh shubhamwagh

🎯
Focusing
View GitHub Profile
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active April 24, 2024 14:26
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
@shubhamwagh
shubhamwagh / Dataset.md
Last active February 26, 2024 21:54
FloorPlan datasets
  • CVC-FP: Database for structural floor plan analysis
  • Mathieu Delandre - SESYD Floorplans
  • Kaggle Floorplan dataset
@shubhamwagh
shubhamwagh / Build.md
Last active December 1, 2023 22:23
Blender-Python-module-build
@shubhamwagh
shubhamwagh / Link.md
Created September 11, 2019 15:34
Smooth contours in Opencv
@shubhamwagh
shubhamwagh / delete_and_upload.py
Created September 17, 2019 17:46
AWS s3 bucket delete and upload
import boto3
session = boto3.Session(
aws_access_key_id='AWS_ACCESS_KEY_ID',
aws_secret_access_key='AWS_SECRET_KEY',
)
s3 = session.resource('s3')
bucket = s3.Bucket('bucket-name')
bucket.objects.all().delete()
s3.meta.client.upload_file(Filename='filename-with-path', Bucket='qbot.co.robot.software.deployment.mk7', Key='only-filename-in-the-bucket')
@shubhamwagh
shubhamwagh / aws-s3-size.sh
Created September 4, 2020 11:55
AWS gets size of the contents in your S3 bucket
#!/usr/bin/env bash
## If no bucket name is passed, prompt user to enter one from their account.
## Else, assign $1 to bucket_name.
get_bucket_name () {
if [[ $# -eq 0 ]]; then
echo
echo "$buckets"
echo
@shubhamwagh
shubhamwagh / spiral.py
Created October 6, 2020 11:10 — forked from cablehead/spiral.py
Iterate a 2d matrix using a spiral pattern
import unittest
import copy
from itertools import cycle
def row(matrix, n):
# returns row n of a 2d matrix
return matrix.pop(n)
@shubhamwagh
shubhamwagh / rospc2_numpy.py
Created November 13, 2020 12:34
ROS PointClou2 to numpy conversion (this will avoid bit flip)
colours = np.array([
bytearray(msg.data[rgb_field.offset + 2::msg.point_step]),
bytearray(msg.data[rgb_field.offset + 1::msg.point_step]),
bytearray(msg.data[rgb_field.offset + 0::msg.point_step])
]).transpose().astype(np.float32)/255.0
@shubhamwagh
shubhamwagh / bitcoin_mining.md
Last active May 6, 2021 12:32
BitcoinMining-SimplifiedSketch

BitcoinMining explaination

Data

  • Assume this is the hash of the lastest block (shortened to 30 characters): 00000000000001adf44c7d69767585
  • Following are the hashes of a few valid transactions waiting for inclusion (shortened).
5572eca4dd4
db7d0c0b845
  • And this the hash of one special transaction that you just crafted, which gives 10BTC (the current reward) to yourself:
@shubhamwagh
shubhamwagh / ssh_display_forward.md
Last active December 7, 2021 11:33
SSH Display forward
  • Make sure you have xauth installed. (See: xauth info or xauth list)
  • On the server your /etc/ssh/sshd_config file should have these lines:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
  • Make sure on client side you have X server installed.
  • On the client side your ~/.ssh/config file should have these lines if not create new config file and add: