Skip to content

Instantly share code, notes, and snippets.

View mithi's full-sized avatar

Mithi Sevilla mithi

View GitHub Profile
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import numpy as np
class Point:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import numpy as np
FRONT_LENGTH = 20
SIDE_LENGTH= 30
MID_LENGTH = 40
HIP_LENGTH =10
KNEE_LENGTH = 40
# https://stackoverflow.com/questions/2049582/how-to-determine-if-a-point-is-in-a-2d-triangle
# How to determine if a point is in a 2D triangle?
float sign (fPoint p1, fPoint p2, fPoint p3)
{
return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);
}
bool PointInTriangle (fPoint pt, fPoint v1, fPoint v2, fPoint v3)
{
@mithi
mithi / michal.py
Last active February 2, 2020 17:04
# https://discourse.arcbotics.com/t/software-modifications-and-upgrades-of-hexy/233/4
# https://olinhexapodcreu.wordpress.com/
class virtualRobot:
def __init__(self, frame, con, Dict):
self.con = con
self.frame = frame
self.canvas = Canvas(self.frame, width = 745, height = 550, bg = 'white')
self.canvas.bind("<B1-Motion>", self.LeftClickMove)
self.canvas.bind("<B3-Motion>", self.RightClickMove)
self.canvas.bind("<Button-1>", self.MouseClick)
# -------------------------
# WALK ALGORITHM CONSTANTS FOR CALIBRATION
# -------------------------
DELAY = 1.0
KNEE_ANGLE_BENTUP = 70
ANKLE_ANGLE_BENTUP = -40
HIP_ANGLE_SIDESTEP = -50
KNEE_ANGLE_SIDESTEP = 38.58
from ..comm.pwm import PWM
from time import sleep
driver = PWM(0x40)
driver.setPWMFreq(50)
def map(z, x, y, a, b):
# x to y is the old range
# a to b is the new range
# z is somewhere in between x and y
from ..comm.pwm import PWM
from time import sleep
# CALIBRATION
CHANNEL = 0 # Channel of the servo joint
VALUE = 0 # Value to accomplish the pose
DELAY = 0.5
driver = PWM(0x40)
driver.setPWMFreq(60)
@mithi
mithi / hello.md
Last active November 8, 2019 08:22
$ gem install rails --no-document
Successfully installed rails-6.0.1
13 gems installed

$ rails new blog
# Write a method that takes an integer `n` in; it should return
# n*(n-1)*(n-2)*...*2*1. Assume n >= 0.
# As a special case, `factorial(0) == 1`.
# Difficulty: easy
def factorial n
if n <= 1
puts "hello"
return 1

ANYWAY, For your LinkedIn, meet the specifications for the following:

GENERAL

Overall, profile is professional, has no errors, and is easy to read and digest

  • Educational institutions and company pages are correctly linked (Institutions must have logos)
  • A custom URL has been created
  • Language is correct and consistent: present tense for current duties, past tense for prior duties and accomplishments
  • Spelling and grammar are correct
  • Does not include negative language
  • Acronyms or language are likely to be known to recruiters or includes explanation