Skip to content

Instantly share code, notes, and snippets.

Avatar
🐁
Expanding digital frontier

Kirill Kovalevskiy Kif11

🐁
Expanding digital frontier
View GitHub Profile
@Kif11
Kif11 / obj_in_frust.py
Created Jun 7, 2017
Maya script to find if object located within camera frustum
View obj_in_frust.py
import maya.cmds as cmds
import maya.OpenMaya as OpenMaya
import math
# Find if object located within camera frustum
# Usage:
# from obj_in_frust import in_frustum
# in_frustum('camera1', 'pCube1')
class Plane(object):
@Kif11
Kif11 / maya-dockable_window.py
Last active Jul 26, 2022
PyQt scaffold for creating dockable Maya window
View maya-dockable_window.py
from PySide import QtCore
from PySide import QtGui
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
class MainWindow(MayaQWidgetDockableMixin, QtGui.QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent=parent)\
@Kif11
Kif11 / basic_logging.py
Last active Jan 15, 2022
Python basic logging boilerplate for console log
View basic_logging.py
import logging
log = logging.getLogger()
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s'))
log.addHandler(handler)
log.setLevel(logging.INFO)
log.info('Hello World!')
@Kif11
Kif11 / pose.py
Created Oct 6, 2021
Extract human 3D poses from videos using Google BlazePose model
View pose.py
#!/usr/bin/env python3
import cv2
import mediapipe as mp
from pathlib import Path
import argparse
parser = argparse.ArgumentParser(
description='Extract human 3D poses from videos using BlazePose model.')
@Kif11
Kif11 / wsl2bridge.ps1
Created Apr 29, 2021
WSL2 Port Forwarding
View wsl2bridge.ps1
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@Kif11
Kif11 / Houdini SVG Export
Last active Jul 15, 2020
Export Houdini poly lines to SVG
View Houdini SVG Export
# Python script to export Houdini poly lines to SVG
# Paste content to Python node
# Replace EXPORT_PATH_HERE with desired output file location
node = hou.pwd()
geo = node.geometry()
filename = "EXPORT_PATH_HERE"
padding = 50
@Kif11
Kif11 / reclaimWindows10.ps1
Created Jun 14, 2020 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@Kif11
Kif11 / syncdb.sh
Created Jan 11, 2020
Backup and sync two mongo databases
View syncdb.sh
#!/usr/bin/env bash
# Syncronize remote DB to local instance
remote_db="myremote-mongo.com"
local_db="localhost"
db_name="my_db_name"
# Get current date and store it in $date
printf -v date '%(%Y-%m-%d)T\n' -1
@Kif11
Kif11 / align_to_normal.vex
Last active Jun 21, 2019
Rotate flat geometry to X/Z plane. Houdini VEX.
View align_to_normal.vex
// Align object to target vector base on selected normal
// Useful when object has some weird orientation baked
// in the mesh and you wan to straighten it up.
// Point with normal from second wrangler input to align
vector from = point(1, 'N', 0);
// Allign "from" normal to the following vector
vector to = {0,1,0};
@Kif11
Kif11 / create-public-bucket.sh
Created Nov 30, 2018
Created S3 public bucket for hosting a static website
View create-public-bucket.sh
if [ -z "$1" ]
then
echo "Usage: `basename "$0"` <bucket_name>"
fi
bucket_name=$1
bucket_policy=`echo '{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadGetObject",