Skip to content

Instantly share code, notes, and snippets.

View AlexKucera's full-sized avatar

Alexander Kucera AlexKucera

View GitHub Profile
import logger
def main():
log = logger.get_terminal_logger(__file__, __name__)
log.info("Test")
log.error("Test Error")
log.debug("Test Debug")
@AlexKucera
AlexKucera / py
Created March 8, 2018 13:41
count_win_GPUs
def count_win_GPUs():
p = subprocess.run(
"wmic PATH Win32_VideoController GET Name /Value",
stdout=subprocess.PIPE
).stdout.decode('utf-8').split("\r\r\n")
p = filter(lambda x: not re.match(r'^\s*$', x), p)
return len(list(p))
import os
import subprocess
def modo_cad_convert(modo_process=None, items=None):
modo_cl = "/Volumes/ProjectsRaid/x_Pipeline/x_AppPlugins/modo/modo_10.2v1.app/Contents/MacOS/modo_cl"
modo_proc = subprocess.Popen(modo_cl,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
import os
import subprocess
def modo_start():
modo_cl = "/Volumes/ProjectsRaid/x_Pipeline/x_AppPlugins/modo/modo_10.2v1.app/Contents/MacOS/modo_cl"
modo_proc = subprocess.Popen(modo_cl,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@AlexKucera
AlexKucera / threading.py
Created March 26, 2017 12:10
Replaced it with a functional example that shows the same behavior
import threading
import traceback
import time
class myThread(threading.Thread):
def __init__(self, args):
threading.Thread.__init__(self)
@AlexKucera
AlexKucera / threading.py
Created March 26, 2017 12:00
thread not ending
class myThread(threading.Thread):
def __init__(self, *args):
threading.Thread.__init__(self)
self.args = args
def run(self):
batch_processor_model(self.args)
print "Done"
Here are a few questions that will tee us up for a good conversation:
- Can you tell me about your project in a few sentences?
- What’s the timeframe? Does a certain event depend on this project launching?
- What are you looking for from us? Do you want us to design, build, and launch the whole site? Or do you have developers or other partners lined up and only need us for design?
- Have you already started on any part of the project? Do you have existing work? A new logo? Some rough designs or ideas for the site?
- How large is your team? What are the roles you envision on your end?
- How did you hear about our work? What specifically interests you about it? Any projects that you’re keen on?
- How much money have you set aside for this project?
- Are you talking to others about this project? Might we ask how many? What do you like about their work?
| /Volumes/ProjectsRaid/x_Pipeline/x_AppPlugins/Nuke/plugins/afx_nuke_plugins @ Happy (alex)
| 19:02:42 => cmake -DCMAKE_INSTALL_PREFIX="/Volumes/ProjectsRaid/x_Pipeline/x_AppPlugins/Nuke/plugins/afx_nuke_plugins"
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "7.5")
-- Configuring done
CMake Warning (dev):
=> php -f adnstream.php
<?xml version="1.0"?>
<items><item uid="unifiedstream6000098" arg="6000098" valid="yes" autocomplete="Alfredapp"><title>I'm not looking forward to the day that my daughter discovers Dora's not on Netflix anymore. Adios, Dora: Netflix is starting to take Viacom shows offlin [gigaom.feedsportal.com]e</title><subtitle>Created 2013-05-24 - 1:31pm with Felix</subtitle><icon>icon.png</icon></item><item uid="unifiedstream6000086" arg="6000086" valid="yes" autocomplete="Alfredapp"><title>@adrianus For settings, yeah that would only work on Mac-to-Mac, for data, however, it works from Windows-to-Mac, too. But upgrading from Mac-to-Mac like that is painless. Start the process when you go to bed, wake up to a newly configured computer.</title><subtitle>Created 2013-05-24 - 1:30pm with Netbot for iOS</subtitle><icon>icon.png</icon></item><item uid="unifiedstream6000029" arg="6000029" valid="yes" autocomplete="Alfredapp"><title>@mina wanna help me debug a little thing I like to call adnstream.php?
<?php
require('workflows.php');
$w = new Workflows();
date_default_timezone_set("Europe/Helsinki");
$token = $w->get( 'token', 'settings.plist' );
$url='https://alpha-api.app.net/stream/0/posts/stream/unified';
$headers=array(
'Authorization: Bearer '.$token,
);