Skip to content

Instantly share code, notes, and snippets.

Lev E. Givon lebedov

Block or report user

Report or block lebedov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lebedov
lebedov / ipy_profile_pycuda.py
Created Apr 1, 2011
IPython profile to automatically initialize PyCUDA on a specified device
View ipy_profile_pycuda.py
#!/usr/bin/env python
"""
IPython 0.10 profile to automatically initialize PyCUDA on a specified
device.
"""
import sys
import atexit
import IPython.ipapi
@lebedov
lebedov / cula.spec
Created Jan 3, 2012
RPM SPEC file for packaging CULA Dense
View cula.spec
# RPM SPEC file for packaging CULA Dense for Mandriva Linux.
%bcond_with full
%if %{with full}
%define name cula_dense
%else
%define name cula_dense_free
%endif
@lebedov
lebedov / .tmux.conf
Last active Sep 29, 2015
A nice configuration for tmux 1.5 and later.
View .tmux.conf
# Use backtick as control character:
set -g prefix `
unbind C-b
bind ` send-prefix
# Config reload key:
bind r source-file ~/.tmux.conf
set -g history-limit 7500
set -g default-terminal "screen-256color"
@lebedov
lebedov / pyzmq_client_server_demo.py
Created Apr 11, 2012
Demo of how to extend multiprocessing.Process to communicate with pyzmq
View pyzmq_client_server_demo.py
#!/usr/bin/env python
"""
Demo of how to extend multiprocessing.Process to communicate with
pyzmq.
"""
import zmq
from multiprocessing import Process
import time
@lebedov
lebedov / multi_pyzmq_interactive_demo.py
Created Apr 11, 2012
Pass interactively entered data to a server process using pyzmq
View multi_pyzmq_interactive_demo.py
#!/usr/bin/env python
"""
Pass interactively entered data to a server process using pyzmq.
"""
import zmq
import multiprocessing as mp
def server_func():
@lebedov
lebedov / pycuda_req_rep_demo.py
Created Apr 16, 2012
Interprocess communication with pyzmq and multiprocessing
View pycuda_req_rep_demo.py
#!/usr/bin/env python
"""
Pass data between processes started through the multiprocessing module
using pyzmq and process them with PyCUDA
"""
import numpy as np
import zmq
import multiprocessing as mp
@lebedov
lebedov / multi_bidi_pyzmq_demo.py
Created Apr 17, 2012
Bidirectional communication between two processes with pyzmq
View multi_bidi_pyzmq_demo.py
#!/usr/bin/env python
"""
Bidirectional communication between two processes.
"""
import numpy as np
import zmq
import multiprocessing as mp
@lebedov
lebedov / logging_demo.py
Created Jun 1, 2012
Demo of how to use the logging module with pyzmq
View logging_demo.py
#!/usr/bin/env python
"""
Demo of how to use the logging module with pyzmq.
"""
import logging
import zmq
import multiprocessing as mp
@lebedov
lebedov / eventloop_demo.py
Created Jun 11, 2012
Use eventloops to send and receive data
View eventloop_demo.py
#!/usr/bin/env python
"""
Use eventloops to send and receive data.
"""
import logging
import zmq
from zmq.eventloop.ioloop import IOLoop, PeriodicCallback
from zmq.eventloop.zmqstream import ZMQStream
@lebedov
lebedov / p2p_mem_copy.py
Last active Nov 17, 2015
Compare speed of several methods of copying data between two GPU devices
View p2p_mem_copy.py
#!/usr/bin/env python
"""
Compare speed of several methods of copying data between two GPU devices.
"""
import atexit, re, time
import numpy as np
import pycuda.driver as drv
import pycuda.gpuarray as gpuarray
You can’t perform that action at this time.