This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
import mmap | |
import argparse | |
def portals(dbfile): | |
with open(dbfile, 'rb') as db: | |
mm = mmap.mmap(db.fileno(), 0, access= mmap.ACCESS_READ) | |
i, l = 0, set() | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- mode: python -*- | |
# -*- coding: utf-8 -*- | |
# | |
# made 85% by copilot. | |
# copilot-mk-pip-package.py | |
# --- | |
# a python script which accepts command line arguments for package name to create folders and files for empty pip installable python package with that name. | |
# | |
# 1. creates the directory structure for a python package | |
# 2. creates the setup.py file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# | |
# Copyright (c) 2022 xaedes | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Trajectory: | |
def __init__(self, capacity): | |
self._capacity = capacity | |
self._size = 0 | |
self.position = np.empty(shape=(self._capacity, 2), dtype=np.float64) | |
self.yaw = np.empty(shape=(self._capacity, 1), dtype=np.float64) | |
self.yawrate = np.empty(shape=(self._capacity, 1), dtype=np.float64) | |
def size(self): | |
return self._size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
/* Configuration ____________________________________________ | |
*/ | |
// enable context menu | |
"context_menu": true, | |
// Auto Highlight for a log file, build window | |
"auto_highlight" : true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <sstream> | |
#include <iomanip> | |
using namespace std; | |
char computeChecksum(const std::string& str) | |
{ | |
char checksum = 0; | |
for (int i=0; i<str.size(); ++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
#include <type_traits> | |
// https://gist.github.com/ntessore/dc17769676fb3c6daa1f | |
namespace std14 | |
{ | |
template<typename T, T... Ints> | |
struct integer_sequence | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let a = setInterval(() => { | |
// retrieve values from simulation | |
let roll = fixedRotationZ; | |
let pitch = fixedRotationX; | |
let yaw = fixedRotationY; | |
let rpy = new THREE.Vector3(roll, pitch, yaw); | |
let rollRate = -rateRotationZ/10.0; | |
let pitchRate = -rateRotationX/10.0; | |
let yawRate = -rateRotationY/10.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# demo video at https://www.youtube.com/watch?v=EjXU5WVjGU0 | |
import ipywidgets as widgets | |
import numpy as np | |
import vispy | |
import vispy.gloo as gloo | |
from vispy import app | |
from vispy.util.transforms import perspective, translate, rotate | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0eNrdWlFvqzYU/isWT9tEqtiQkES7k6btdX25e6g0VZFLnMYqGGabdl2V/75jkiaUALEpTe/dSxvAfDbfd87hfMCLd5cULJdcaG/x4q2YiiXPNc+Et/C+MrFS6AZxzVKFdIaS7IlJJPn9RqN4w5RGTxsmENUoYRS2MsHKwYhKyR+Zgh2oyPPaOT9I9ncBP368Qn/QBxilCsmQ3jAUZ1KyWCOaZoUAuPV+ag5jGOx44nqDKFIpTRKkNNUMpTTecMGukFksF/cwBo6JTJvjUiPA4Qky43dQFKbKJcvh/+rK8z0eZ0J5i79ePMXvBU0MC/o5Z3D55gQYIWhqtqiEyVOmeTyKs/SOC6oz6W0BQazYP94Cb/2zGCsW8xWTzQBke+t7cJVcc7ZbUbnxvBRFesckzHDAMWvWVOgqkO/lmeI75V48wBuF5Grie8/eIoiuJjDPihtyywFT32BomSXLO7ahjxwA4Kw1TzSTLXQ8cqkL2HNYxW7E6MZcQ2wEA9xxhY/bcr8Qu0mVgcLmz71kTFQvkK/g6uHMmMu44LrcLumsHif147fbbWXMK0nEkaRgfhGSxhWScJUj+K2WZrY1TRRzYSyyIyQ4LsWkzSihad4ZLPOSh6Yrf50Ojq0OJ6+5VHrpSsROGm9hVM9SyMZSnoX3i7d14WDylgPSwkF4Josb6MA7MmaWQXHEPbKjetBDDD2KGQz7k6Csxg/mxAxKLd0X71+vf4eBWaHzwk0eJwGmdQFqWTs7Fcj3iH1M1+DmdjE/6a33fBi9jwGO3eXEdSlHFxAychMqqCmD21Jv2nXzayrHbnm3B31f0l1316QvPeg/pGSc5c/LsvAv1zJLl1wAzmu1dxEowG4KhXapEvXTZ35JfcZ9iiLesV/R8eceOuK+GkJ7eT7F/JZeqJZcYXeRba+x5xeBWxcxsYufmWP8RJ8QP1Q8azAJ9+daj88ND/zemyO2U2x+uAgtqVB5JvXojiW6Sa3wtSk8qcekARmPHaAnbtC4D7SJsiawo0lYg20 |
NewerOlder