Skip to content

Instantly share code, notes, and snippets.

drop table PartTest1;
drop table PartTest2;
create table PartTest1 (
id bigint not null primary key,
value1 text
) partition by range (id);
create table PartTest2 (
id bigint not null primary key,
create table tst_complex_index (
id1 int not null,
id2 int not null,
value text,
primary key (id1, id2)
);
insert into tst_complex_index (id1, id2, value)
select (9*g.i + 177) % 100, (191*g.i + 197) % 10001, g.i || ' text ' || (g.i + 7) % 19
from generate_series(1, 1000*1000) g (i);
@portnov
portnov / NodeTree
Created January 21, 2023 20:05
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.22 | 01:05 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Line": {
"attributes": {
"location": [
-369.0294189453125,
12.2808837890625
]
@portnov
portnov / NodeTree
Created January 21, 2023 19:45
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.22 | 00:45 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Line": {
"attributes": {
"location": [
-369.0294189453125,
12.2808837890625
]
@portnov
portnov / NodeTree
Created January 21, 2023 19:35
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.22 | 00:35 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Line": {
"attributes": {
"location": [
-369.0294189453125,
12.2808837890625
]
@portnov
portnov / NodeTree
Created January 18, 2023 19:18
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.19 | 00:18 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Plane": {
"attributes": {
"location": [
-388.2676086425781,
53.424434661865234
]
@portnov
portnov / NodeTree
Created January 18, 2023 19:10
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.19 | 00:10 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Plane": {
"attributes": {
"location": [
-388.2676086425781,
53.424434661865234
]
@portnov
portnov / NodeTree
Created January 13, 2023 16:09
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.13 | 21:09 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"A Number": {
"attributes": {
"location": [
-113.16841125488281,
215.54180908203125
],
@portnov
portnov / NodeTree
Created January 13, 2023 07:36
Sverchok.v1.2.0-alpha | Blender.3.4.0 | NodeTree | 2023.01.13 | 12:36 | license: CC BY-SA
{
"export_version": "1.0",
"main_tree": {
"nodes": {
"Frame": {
"attributes": {
"location": [
0.0,
0.0
],
>>> p1s = np.array([[1,2,3], [4,5,6]])
>>> p2s = np.array([[1,2,4], [2,5,6]])
>>> abs(p1s - p2s)
array([[0, 0, 1],
[2, 0, 0]])
>>> abs(p1s - p2s).max()
2
>>> abs(p1s - p2s).max(axis=1)
array([1, 2])