This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import sys | |
cmd = 'C:/cg/fake_renderer.exe' | |
class TasksPool(QObject): | |
startNextTaskSignal = Signal() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TasksPool(QObject): | |
# сигнал для старта следующей задачи или просто за запуска процесса просчета | |
startNextTaskSignal = Signal() | |
# сигнал окончания всех задач | |
allTasksCompleteSignal = Signal() | |
def __init__(self): | |
super() | |
# список задач | |
self.tasks_pool = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, json | |
class SettingsClass(object): | |
_path = os.path.expanduser('~/user_setings.json') | |
def __init__(self): | |
if not os.path.exists(self._path): | |
jsob.dump({}, open(self._path, 'w')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide.QtGui import * | |
from PySide.QtCore import * | |
class MainWindow(QWidget): | |
def __init__(self): | |
super(MainWindow, self).__init__() | |
self.ly = QVBoxLayout(self) | |
self.setLayout(self.ly) | |
self.list = ListClass() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import os, sys, re | |
# QPROCESS EXAMPLE | |
class RnderMonitor(QWidget): | |
def __init__(self): | |
super(RnderMonitor, self).__init__() | |
self.ly = QVBoxLayout() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide.QtCore import * | |
from PySide.QtGui import * | |
class Window(QWidget): | |
def __init__(self): | |
super(Window, self).__init__() | |
self.resize(411, 79) | |
self.ly = QHBoxLayout(self) | |
self.slider = QSlider(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# resize vmware wondow to 2 monitors | |
import pywintypes | |
import win32gui | |
def enumHandler(hwnd, lParam): | |
if win32gui.IsWindowVisible(hwnd): | |
if 'VMware' in win32gui.GetWindowText(hwnd): | |
win32gui.MoveWindow(hwnd, -8, -30, 4486, 1087+30,True) | |
win32gui.EnumWindows(enumHandler, None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Backup database" | |
./manage.py dbt -qs | |
echo "Remove database" | |
# IF SQLITE | |
#rm ./db.sqlite3 | |
# IF POSTGRES | |
psql -U paul dbmane -t -c "select 'drop table \"' || tablename || '\" cascade;' from pg_tables where schemaname = 'public'" | psql -U paul dbmane | |
echo "Remove migrations" | |
rm -fR ./*/migrations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymel.core import * | |
attr_map = dict( | |
# old shader attr = new shader attr | |
color='color', | |
ambientColor='ambientColor', | |
#... | |
) | |
mi = ls(type='blinn') |