Skip to content

Instantly share code, notes, and snippets.

View GerardMaggiolino's full-sized avatar

Gerard Maggiolino GerardMaggiolino

  • Cupertino, California
View GitHub Profile
@GerardMaggiolino
GerardMaggiolino / dataset_converter.py
Last active February 8, 2024 12:36
Yamaha-CMU Off-Road Dataset Converter to ADE20K Format
import glob
import pdb
import os
import shutil
from collections import OrderedDict
import cv2
import numpy as np
@GerardMaggiolino
GerardMaggiolino / scramble_test.py
Created May 22, 2019 23:05
Experiments for UCSD Cogs 181 course
import numpy as np
import torch
import torch.nn as nn
import matplotlib.pyplot as plt
def load_data(num_images=2000):
'''
Reads in images and labels from MNIST files.
'''
# Reads in images
@GerardMaggiolino
GerardMaggiolino / complexity_example.py
Created May 17, 2019 08:42
Code for a ridiculously over explained Piazza post.
import torch
import torch.nn as nn
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_iris
def test(net, data, target):
'''
Returns number correct.
'''
@GerardMaggiolino
GerardMaggiolino / simpleplane.urdf
Created May 16, 2019 02:29
A basic plane specified by URDF.
<?xml version="1.0"?>
<robot name="simpleplane">
<!-- Colors -->
<material name="grey">
<color rgba="0.91 0.925 0.945 1"/>
</material>
<!-- Plane -->
<link name="base_link">
<visual>
@GerardMaggiolino
GerardMaggiolino / simplecar.urdf
Created May 16, 2019 02:24
Completed URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<!-- Colors -->
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="blue">
<color rgba="0.6 0.7 0.8 1"/>
</material>
@GerardMaggiolino
GerardMaggiolino / wheel_snippet.urdf
Created May 16, 2019 02:20
Snippet of completed URDF specified toy car.
<!-- Left Front Wheel -->
<link name="left_front_wheel">
<visual>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="1.57075 1.57075 0"/>
<material name="black"/>
</visual>
<collision>
@GerardMaggiolino
GerardMaggiolino / simplecar.urdf
Last active April 7, 2021 04:17
Intermediate steps of URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="blue">
<color rgba="0.6 0.7 0.8 0.7"/>
</material>
<!-- Base Frame of Car -->
@GerardMaggiolino
GerardMaggiolino / simplecar.urdf
Last active April 7, 2021 04:01
Intermediate steps of URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="blue">
<color rgba="0.6 0.7 0.8 0.7"/>
</material>
<!-- Base Frame of Car -->
@GerardMaggiolino
GerardMaggiolino / simplecar.urdf
Last active April 7, 2021 03:57
Beginning of URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<!-- Base Frame of Car -->
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
</visual>
</link>
@GerardMaggiolino
GerardMaggiolino / simplecar.urdf
Created May 16, 2019 00:41
Beginning of URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<!-- Base Frame of Car -->
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
</visual>
</link>