Server is run on a be polite policy - it's not a right but a privilege :)
There are two main considerations for users.
# %% | |
import torch | |
import torch.nn.functional as F | |
# compute rotation vector to get from a to b | |
def angleBetweenRT(a, b): | |
# find rotation axis | |
rotvec = torch.cross(a, b) |
#!/bin/bash | |
# Make executable with chmod +x <<filename.sh>> | |
# based on: | |
# https://www.freecodecamp.org/news/automate-project-github-setup-mac/ | |
# | |
# but using a github personal access token: | |
# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token | |
"""Fit a 2d line to data using auto differentiation to learn w, b.""" | |
# %% | |
import torch | |
import matplotlib.pyplot as plt | |
# size of data - more data wil give a more accurate result | |
N = 500 | |
# we can add noise to data to make it more realistic | |
noise = torch.randn(N) |
*PPD-Adobe: "4.3" | |
*% | |
*% PPD file for Dell 1320 netork color printer | |
*% | |
*% Based on orginal file: | |
*% | |
*% FX DocuPrint C525 A-AP PPD file for CUPS. | |
*% | |
*% Copyright 2005 by Fuji Xerox Co.,Ltd. | |
*% |
from plotly.offline import init_notebook_mode, iplot | |
import plotly.graph_objs as go | |
init_notebook_mode() | |
# x, y is point data, image is a PIL image. | |
trace0 = go.Scatter( | |
x=x, y=y, mode='markers', | |
hovertext=[str(i) for i in range(len(x))], | |
hoverinfo="text",) |
How to get the proper OpenGL projection matrix from the OpenCV camera calibration values? | |
For the simple common case where the OpenCV camera matrix has the form: | |
|fx 0 cx| | |
|0 fy cy| | |
|0 0 1| | |
The corresponding OpenGL projection matrix can be computed like this: |
{ | |
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
# %% reorder the vertices | |
import numpy as np | |
# %% | |
with open("oldorder.obj") as fid: | |
lines = fid.readlines() | |
print(lines) | |
# %% |