Skip to content

Instantly share code, notes, and snippets.

@portnov
portnov / NodeTree
Created September 25, 2024 18:04
Sverchok.v1.3.0 | Blender.4.2.1LTS | NodeTree | 2024.09.25 | 23:04 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Plane": {
"attributes": {
"location": [
-1201.572021484375,
15.27674388885498
],
@portnov
portnov / NodeTree
Created September 25, 2024 18:04
Sverchok.v1.3.0 | Blender.4.2.1LTS | NodeTree | 2024.09.25 | 23:04 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Plane": {
"attributes": {
"location": [
-1201.572021484375,
15.27674388885498
],
from mathutils import Matrix
import numpy as np
def random_matrix():
m = np.random.uniform(-3, 3, (3,3))
m = Matrix(m)
return m.to_4x4()
def shear_xy(f1, f2):
m = np.eye(3)
#!/usr/bin/python3
import numpy as np
from math import pi
def shear_xy(f1, f2):
m = np.eye(3)
m[0][2] = f1
m[1][2] = f2
return m
Дверь отворилась. В комнату вошел высокий, худой, сутулый офицер. Было в нем
что-то такое - трудно было сказать, что именно, - от чего он производил
впечатление штатского, переодетого в мундир.
В руках у него были очки, которыми он быстро вертел, стоя в шаге от меня.
- Вы ко мне?
- Я к господину Прандтлю из Отдела Шифрования, - ответил я, слегка
приподнимаясь с места.
@portnov
portnov / decompose_shear.py
Created August 2, 2024 15:02
Decompose shear matrix
#!/usr/bin/python3
import numpy as np
def shear_xy(f1, f2):
m = np.eye(3)
m[0][2] = f1
m[1][2] = f2
return m
@portnov
portnov / query.sql
Created May 27, 2024 12:51
postgres_exporter stat_statements query
explain (analyze, buffers)
SELECT
pg_get_userbyid(userid) as user,
pg_database.datname,
pg_stat_statements.queryid,
pg_stat_statements.calls as calls_total,
pg_stat_statements.total_exec_time / 1000.0 as seconds_total,
pg_stat_statements.rows as rows_total,
pg_stat_statements.blk_read_time / 1000.0 as block_read_seconds_total,
pg_stat_statements.blk_write_time / 1000.0 as block_write_seconds_total
@portnov
portnov / NodeTree
Created April 12, 2024 17:46
Sverchok.v1.3.0-alpha | Blender.3.4.1 | NodeTree | 2024.04.12 | 22:46 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Marching Cubes": {
"attributes": {
"location": [
98.79039001464844,
172.26422119140625
]
@portnov
portnov / NodeTree
Created April 12, 2024 17:46
Sverchok.v1.3.0-alpha | Blender.3.4.1 | NodeTree | 2024.04.12 | 22:46 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Marching Cubes": {
"attributes": {
"location": [
98.79039001464844,
172.26422119140625
]
@portnov
portnov / NodeTree
Created April 12, 2024 17:02
Sverchok.v1.3.0-alpha | Blender.3.4.1 | NodeTree | 2024.04.12 | 22:02 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"A Number": {
"attributes": {
"location": [
155.0430908203125,
146.80162048339844
],