Skip to content

Instantly share code, notes, and snippets.

Avatar
🥘

Alex Toldaiev xealits

🥘
View GitHub Profile
View iowait.txt
What exactly is "iowait"?
To summarize it in one sentence, 'iowait' is the percentage
of time the CPU is idle AND there is at least one I/O
in progress.
Each CPU can be in one of four states: user, sys, idle, iowait.
Performance tools such as vmstat, iostat, sar, etc. print
out these four states as a percentage. The sar tool can
print out the states on a per CPU basis (-P flag) but most
@xealits
xealits / gler.py
Last active Aug 16, 2017
pyOpenGL example, extended habr_Ti_Fix_shaders.py from https://habrahabr.ru/post/247123/
View gler.py
# -*- coding: utf-8 -*-
# from
# Импортируем все необходимые библиотеки:
from OpenGL.GL import *
from OpenGL.GLU import gluPerspective
from OpenGL.GLUT import *
#import sys
# Из модуля random импортируем одноименную функцию random
from random import random
@xealits
xealits / notes_on_starting_with_opencl-opengl-interoperability.md
Last active Sep 27, 2015
Making enjalot script on OpenCL-OpenGL interoperability
View notes_on_starting_with_opencl-opengl-interoperability.md
View Install Intel-CPU OpenCL on Ubuntu.md

Open Computing Language (OpenCL) is a language and framework for writing computationally intensive kernels that run accross heterogenious platforms, including GPUs, CPUs, and perhaps other more esoteric devices.

Intel provides an OpenCL implementation for Intel CPUs, but there's not a lot of instructions on how to get it set up. Here's what I did.

Installing Intel CPU OpenCL on Ubuntu (12.04)

  1. Download the Intel® SDK for OpenCL* Applications XE 2013 from the Intel website, here http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe. The download is a tarball -- the one I got is called intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz
  2. Unpack the tarball and cd into the new directory
@xealits
xealits / ROOT open, calculate, write out 1
Last active Aug 29, 2015
ROOT opening a tbranch of a ttree from a tfile, doing a calculation, writing a histogram
View ROOT open, calculate, write out 1
#include "TFile.h"
#include "TTree.h"
#include "TH1D.h"
#include <iostream>
void histo2()
{
std::cout << "fetch file\n" ;
@xealits
xealits / eos_commands
Last active Oct 11, 2016 — forked from nsahoo/eos_commands
EOS commands in CMS
View eos_commands
# list the files in EOS
eos ls [-la] /eos/cms/user/t/test/
# copy all inside the directory recursively
eos cp -r /eos/cms/user/t/test/histodirectory/ /afs/cern.ch/user/t/test/histodirectory
# copy a single file
eos cp /eos/cms/user/t/test/histo.root /tmp/
eos cp /eos/cms/store/user/Username/Datadir/Data.root .
@xealits
xealits / reboot the system, run steam, crash, run again, the same error
Created Jan 1, 2015
end of 2014 year, double-upgraded Ubuntu from 13.04 to 14.04, Steam doesn't login. Sometimes it doesn't get even to login page. Sometimes the page does not respond. When it does after clicking login nothing happens. Here is the terminal outputs for various attempts
View reboot the system, run steam, crash, run again, the same error
$ steam
Running Steam on ubuntu 14.04 32-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
@xealits
xealits / installed libnss-mdns-i386, got this message, removed the second monitor cable, got the same
Last active Aug 29, 2015
end of 2014 year, double-upgraded Ubuntu from 13.04 to 14.04, Steam doesn't login. Sometimes it doesn't get even to login page. Sometimes the page does not respond. When it does after clicking login nothing happens. Here is the terminal output after upgrading Intel graphics, installing libnss-mdns-i386 and removing second monitor cable.
View installed libnss-mdns-i386, got this message, removed the second monitor cable, got the same
$ steam
Running Steam on ubuntu 14.04 32-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
View no steam login @ Ubuntu 14.04, 1-1-2015
$ steam
Running Steam on ubuntu 14.04 32-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
View gctags
#!/bin/bash
export GTAGSLABEL=ctags
if [ -r $PWD/.globalrc ]; then
GTAGSCONF=$PWD/.globalrc
elif [ -r $HOME/.globalrc ]; then
GTAGSCONF=$HOME/.globalrc
elif [ -r /usr/local/share/gtags/gtags.conf ]; then
GTAGSCONF=/usr/local/share/gtags/gtags.conf