๐
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
Direct solution weights: [0.79, 0.85, 0.84] | |
Forward output: [111, 117, 116] | |
Loss: 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
#include <TFT_eSPI.h> | |
#include <SPI.h> | |
TFT_eSPI tft = TFT_eSPI(); | |
// 3D coordinates for cube vertices | |
const float vertices[8][3] = { | |
{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}, | |
{-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1} | |
}; |
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
import pygame | |
import win32gui | |
import win32con | |
import win32api | |
pygame.init() | |
# Set up the display (fullscreen for this example) | |
screen_info = pygame.display.Info() | |
width, height = screen_info.current_w, screen_info.current_h |
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
;(defun shellfm () | |
;(interactive) | |
; (shell-command-on-region | |
; (point-min) (point-max) "cat $@")) | |
(defun shell-command-on-buffer () | |
"Asks for a command and executes it in inferior shell with current buffer | |
as input." | |
(interactive) | |
(shell-command-on-region |
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
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Define a synthetic multi-linear function f(x, y, z, t) = x * y + z * t | |
def true_function(x, y, z, t): | |
return x * y + z * t |
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
import argparse | |
import collections | |
import math | |
import statistics as stat | |
import sys | |
__version__ = "2022.08.27" | |
PI = 3.14159265358979323846 | |
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
import cv2 | |
import numpy as np | |
import mediapipe as mp | |
# Initialize mediapipe Face Mesh and Hands solutions | |
mp_face_mesh = mp.solutions.face_mesh | |
mp_hands = mp.solutions.hands | |
mp_drawing = mp.solutions.drawing_utils | |
mp_drawing_styles = mp.solutions.drawing_styles |
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
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
import argparse | |
import json | |
import shutil | |
CONFIG_FILE = os.path.expanduser('~/.github_account_manager.json') | |
SSH_CONFIG_FILE = os.path.expanduser('~/.ssh/config') |
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
from direct.showbase.ShowBase import ShowBase | |
from panda3d.core import * | |
import math | |
from direct.task import Task | |
from panda3d.core import ClockObject | |
globalClock = ClockObject.getGlobalClock() | |
class MyApp(ShowBase): | |
def __init__(self): |
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
from direct.showbase.ShowBase import ShowBase | |
from panda3d.core import * | |
import math | |
class MyApp(ShowBase): | |
def __init__(self): | |
ShowBase.__init__(self) | |
# Load the environment model. | |
self.scene = self.loader.loadModel("models/environment") |