Skip to content

Instantly share code, notes, and snippets.

View garretraziel's full-sized avatar

Jan Sedlák garretraziel

  • Brno, Czech Republic
View GitHub Profile
#! /usr/bin/gst -f
Object subclass: Automat [
oddelejMezery: soubor uloz: soubor2[
|vstup vystup retezec|
vystup:=FileStream open: soubor2 mode: FileStream write.
vstup:=FileStream open: soubor mode: FileStream read.
[ vstup atEnd ] whileFalse: [
retezec := vstup upTo: Character space.
vystup nextPutAll: retezec.
#! /usr/bin/gst -f
Object subclass: Zamestnanci[
|seznam|
init [
seznam := OrderedCollection new.
]
pridej: zamestnanec [
seznam add: zamestnanec.
Transcript cr;cr.
#! /usr/bin/env python
import sys, string
def analyze_log(path):
logfile = open(path,"r")
cont = logfile.readlines()
logfile.close()
cont = parse_log(cont)
toinstall = {}
@garretraziel
garretraziel / nohus.py
Created October 26, 2010 16:58
Program na odstraňování české diakritiky z utf8 souborů./Program for converting czech accent characters from utf8 files.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys, codecs
dictableSmall = list(u"ěščřžýáíéúůóťďň")
nedictableSmall = list("escrzyaieuuotdn")
dictableBig = list(u"ĚŠČŘŽÝÁÍÉÚŮŤĎŇ")
nedictableBig = list("ESCRZYAIEUUTDN")
@garretraziel
garretraziel / bmview.c
Created October 16, 2011 16:27
Jednoduchý prohlížeč bmp. Upload kvůli hledání bugu.
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
#define WIDTH 800
#define HEIGHT 600
#define RED 0xff0000ff
#define BMP_TYPE 19778
@garretraziel
garretraziel / mousectrl.py
Created December 25, 2013 23:01
Simple program for mouse control using Leap Motion controller
import Leap
import pyatspi
debounce = False
WIDTH = 1366
HEIGHT = 768
class MouseListener(Leap.Listener):
def on_frame(self, controller):
global debounce
@garretraziel
garretraziel / .emacs
Last active January 13, 2020 15:37
Emacs dotfile
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t))
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.