Skip to content

Instantly share code, notes, and snippets.

View ShivendraAgrawal's full-sized avatar

Shivendra Agrawal ShivendraAgrawal

View GitHub Profile
@ItsMichal
ItsMichal / IKPYGuide.md
Created April 28, 2021 18:55
The ultimate guide to IKPY/Webots

So, IKPY is surprisingly not as robust a library as I would have imagined, and its quite poorly documented. After struggling for a few days trying to get it to work with TIAGO Steel, here are some things that helped.

  • So, IKPY is actually a bit outdated. Optionally, I'd recommend installing a fork of IKPY by user Alters-Mit which fixes some issues with prismatic joints, which the TIAGO Steel contains. More info here. Phylliade/ikpy#96
    • To install this fork of ikpy, run pip install git+https://github.com/alters-mit/ikpy.git#egg=ikpy in your console.
    • I'm not sure if this helped, but it seemed to. If you don't have problems, do this optionally.
    • Finally, put the following at the top of your controller file-
    • from ikpy.chain import Chain
      from ikpy.link import OriginLink, URDFLink
@nadavrot
nadavrot / Matrix.md
Last active May 5, 2024 08:37
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@higarmi
higarmi / Flatten JSON or a nested dictionary
Created September 26, 2013 01:49
This python recursive function flattens a JSON file or a dictionary with nested lists and/or dictionaries. The output is a flattened dictionary that use dot-chained names for keys, based on the dictionary structure. This allows for reconstructing the JSON structure or converting it to other formats without loosing any structural information.
"""
example: The following JSON document:
{"maps":[{"id1":"blabla","iscategorical1":"0", "perro":[{"dog1": "1", "dog2": "2"}]},{"id2":"blabla","iscategorical2":"0"}],
"masks":{"id":"valore"},
"om_points":"value",
"parameters":{"id":"valore"}}
will have the following output:
{'masks.id': 'valore', 'maps.iscategorical2': '0', 'om_points': 'value', 'maps.iscategorical1': '0',
'maps.id1': 'blabla', 'parameters.id': 'valore', 'maps.perro.dog2': '2', 'maps.perro.dog1': '1', 'maps.id2': 'blabla'}