Skip to content

Instantly share code, notes, and snippets.

View fgolemo's full-sized avatar
:shipit:

Florian Golemo fgolemo

:shipit:
View GitHub Profile
@stonehippo
stonehippo / wio-terminal-circuitpython.md
Last active June 25, 2024 14:46
Using CircuitPython modules to work with the Seeed Wio Terminal

Seeed Wio Terminal Circuitpython Modules

note: All of these examples have been tested with the latest version of CircuitPython, which as of this writing was 7.2.4. Some of these examples may require tweaks in older or later versions, due to change in the drivers.

The Seeed Wio Terminal is a nifty connected device development kit. Built around a SAMD51 Cortex-M4 microcontroller and a Realtek RTL8720DN for WiFi and Bluetooth, plus an integrated display and a collection of handy sensors, the Wio Terminal is a great platform for IoT and smart device development.

One of the nice things about the Wio Terminal is the number of options available for developement platforms. You can choose the long-time hardware hacking favorite Arudino, MicroPython or Ardupy, an interesting blend of MicroPython and Arduino. And there's support for my

@todbot
todbot / circuitpyton_disable_usb_boot.py
Last active August 27, 2023 10:11
Disable USB devices in CircuitPython in boot.py
# circuitpython_disable_usb_boot.py
# Turn on/off certain USB features based on touching RX & TX pins
# Squeeze TX & RX pins with fingers to enable CIRCUITPY & REPL
# Otherwise, they are turned off
# CircuitPython 7.x only
# Rename this as "boot.py" in your CIRCUITPY drive on a QT PY
# @todbot 17 May 2021
import time
import board
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active October 9, 2024 09:32
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
@duhaime
duhaime / .block
Last active September 10, 2019 20:01
Visualizing Vicon Streams
height: 450
@sbarratt
sbarratt / torch_jacobian.py
Created May 9, 2019 19:40
Get the jacobian of a vector-valued function that takes batch inputs, in pytorch.
def get_jacobian(net, x, noutputs):
x = x.squeeze()
n = x.size()[0]
x = x.repeat(noutputs, 1)
x.requires_grad_(True)
y = net(x)
y.backward(torch.eye(noutputs))
return x.grad.data
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active November 16, 2024 16:01
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
import pybullet as p
import time
usePhysX = True
if usePhysX:
p.connect(p.PhysX)
p.loadPlugin("eglRendererPlugin")
else:
p.connect(p.GUI)
@jeasinema
jeasinema / weight_init.py
Last active July 30, 2024 16:35
A simple script for parameter initialization for PyTorch
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
import torch
import torch.nn as nn
import torch.nn.init as init
def weight_init(m):
'''
@chauhan-utk
chauhan-utk / file.md
Created March 10, 2018 13:53
PyTorch replace pretrained model layers

This code snippet shows how we can change a layer in a pretrained model. In the following code, we change all the ReLU activation functions with SELU in a resnet18 model.

import torch
from torchvision import model

resnet18 = model.resnet18(pretrained=True)

def funct(list_mods):
@cyberang3l
cyberang3l / How to setup VirtualGL and TurboVNC on Ubuntu.md
Last active October 16, 2024 09:30
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding