Skip to content

Instantly share code, notes, and snippets.

View yani-'s full-sized avatar
🏠
Working from home

Yani Iliev yani-

🏠
Working from home
View GitHub Profile
@yani-
yani- / blender.sh
Created October 9, 2021 03:24
vast.ai
#!/bin/bash
apt-get install -y vim netcat curl libglu1-mesa-dev libxi6 libxrender1 libfontconfig1 libxxf86vm-dev libxfixes-dev libgl1-mesa-glx
curl -OL https://ftp.halifax.rwth-aachen.de/blender/release/Blender2.93/blender-2.93.4-linux-x64.tar.xz && unxz blender-2.93.4-linux-x64.tar.xz && tar -xvf blender-2.93.4-linux-x64.tar
cd blender-2.93.4-linux-x64 && mkdir media output
cat << EOF > gpu.py
import bpy

Keybase proof

I hereby claim:

  • I am yani- on github.
  • I am yani (https://keybase.io/yani) on keybase.
  • I have a public key whose fingerprint is DC12 1794 D3A9 40D9 B997 23C7 A7D3 420F BC77 5155

To claim this, I am signing this object:

#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
extern char **environ;

Keybase proof

I hereby claim:

  • I am yani- on github.
  • I am yani (https://keybase.io/yani) on keybase.
  • I have a public key whose fingerprint is 87E2 2F86 C907 C43D 7F49 FD1D 645D 1C0F 7008 CCD5

To claim this, I am signing this object:

d3
.selectAll('.mouse-per-line')
.attr('transform', (d, i) => {
const xDate = x.invert(mouse[0]);
const bisect = d3.bisector(d => d.date).right;
const idx = bisect(d.values, xDate);
let start = 0;
let finish = lines[i].getTotalLength();
let target = null;
mouseOver
.append('svg:rect')
.attr('width', width)
.attr('height', height)
.attr('fill', 'none')
.attr('pointer-events', 'all')
.on('mouseout', function() {
d3.select('.mouse-line')
.style('opacity', '0');
d3.selectAll('.mouse-per-line circle')
const lines = document.getElementsByClassName('line');
const mousePerLine = mouseOver
.selectAll('.mouse-per-line')
.data(metrics)
.enter()
.append('g')
.attr('class', 'mouse-per-line');
mousePerLine
const mouseOver = chartContainer
.append('g')
.attr('class', 'mouse-over-effects');
mouseOver
.append('path')
.attr('class', 'mouse-line')
.style('stroke', 'black')
.style('stroke-width', '1px')
.style('opacity', '0');
const metric = chartContainer
.selectAll('.metric')
.data(metrics)
.enter()
.append('g')
.attr('class', 'metric');
metric
.append('path')
.attr('class', 'line')
chartContainer
.append('g')
.attr('class', 'x axis')
.attr('transform', 'translate(0,' + height + ')')
.style('storke', '#000')
.call(d3.axisBottom(x));
chartContainer
.append('g')
.attr('class', 'y axis')