Skip to content

Instantly share code, notes, and snippets.

View davo's full-sized avatar
🦮
Golden

Davo Galavotti davo

🦮
Golden
View GitHub Profile
@davo
davo / visit-sequences.csv
Created February 10, 2025 21:01
Sunburst
We can't make this file beautiful and searchable because it's too large.
account-account-account-account-account-account,22781
account-account-account-account-account-end,3311
account-account-account-account-account-home,906
account-account-account-account-account-other,1156
account-account-account-account-account-product,5969
account-account-account-account-account-search,692
account-account-account-account-end,7059
account-account-account-account-home-account,396
account-account-account-account-home-end,316
account-account-account-account-home-home,226
@davo
davo / index.html
Last active January 9, 2025 23:17 — forked from ilyabo/index.html
D3 Dorling cartogram with rectangular states
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Dorling Cartogram</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.1.10/d3.js"></script>
<style>
#chart {
width: 960px;
height: 470px;
@davo
davo / analyze-image.py
Created December 9, 2024 21:21 — forked from vicradon/analyze-image.py
Image analysis lab
from dotenv import load_dotenv
import os
from array import array
from PIL import Image, ImageDraw
import sys
import time
from matplotlib import pyplot as plt
import numpy as np
# import namespaces
@davo
davo / Border.tsx
Created September 22, 2024 13:09 — forked from seantai/Border.tsx
border for View
import { Plane } from '@react-three/drei';
import { useMemo } from 'react';
export const Border = () => {
const uniforms = useMemo(
() => ({
u_color: {
value: [0.129, 0.129, 0.129] //same color as my background
},
u_outline_color: {
@davo
davo / optix_check.py
Created January 19, 2024 14:34
Check if NVIDIA Optix is available from Blender
import bpy
# Function to check if OptiX is available
def is_optix_available():
prefs = bpy.context.preferences
cprefs = prefs.addons['cycles'].preferences
cprefs.get_devices()
for device in cprefs.devices:
if 'OPTIX' in device.type:
return True
@davo
davo / doyle.js
Last active December 27, 2023 01:21 — forked from robinhouston/index.html
Stumbling blocks
/* Numerics for Doyle spirals.
* Robin Houston, 2013
*/
(function() {
var pow = Math.pow,
sin = Math.sin,
cos = Math.cos,
pi = Math.PI;
@davo
davo / doyle.js
Last active December 27, 2023 01:11 — forked from robinhouston/index.html
Spiral triangles
/* Numerics for Doyle spirals.
* Robin Houston, 2013
*/
(function() {
var pow = Math.pow,
sin = Math.sin,
cos = Math.cos,
pi = Math.PI;
@davo
davo / doyle.js
Last active December 27, 2023 01:18 — forked from robinhouston/doyle.js
Doyle spiral circle packing
/* Numerics for Doyle spirals.
* Robin Houston, 2013
*/
(function() {
var pow = Math.pow,
sin = Math.sin,
cos = Math.cos,
pi = Math.PI;
@davo
davo / grid.jsx
Last active January 24, 2023 15:31
Maxime's Grid
import { OrbitControls, useFBO } from "@react-three/drei";
import { Canvas, useFrame } from "@react-three/fiber";
import { useMemo, useRef } from "react";
import * as THREE from "three";
import { v4 as uuidv4 } from "uuid";
import "./scene.css";
import vertexShader from "./vertexShader";
import fragmentShader from "./fragmentShader";
@davo
davo / sync.js
Created January 21, 2023 05:26 — forked from seanriceaz/sync.js
Sync figma layer images up to a firebase bucket
// NOTE: This expects a few things to be stored in a .env file:
// FBKEY=xxxxxxxxx
// FIGMAPERSONALTOKEN=xxxxxxxxxxx
// GOOGLE_APPLICATION_CREDENTIALS=/users/your.name/googlekeys/firebase-storage.json
const axios = require('axios');
const dotenv = require('dotenv');
const Storage = require('@google-cloud/storage');