Skip to content

Instantly share code, notes, and snippets.

View jirkapenzes's full-sized avatar

jirkapenzes jirkapenzes

View GitHub Profile
@jirkapenzes
jirkapenzes / Main.cpp
Created March 15, 2013 13:44
INPG3 - vykreslení objektu v OpenGL
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" ) // skryje okno konzole
//---------------------------------------------------------------------
// Program otevre jedno hlavni okno a vykresli do nej 3D elipsoid pomocí bodù
// Klavesami x, z, y se nastavuje poloha kamery, klavesou r rotace elipsoidu
// Klavesami p a q se nastavuje poloha elipsoidu
// Program lze ukoncit stiskem klavesy ESC.
//---------------------------------------------------------------------
#include <glut.h> // hlavickovy soubor funkci GLUTu
//#include <stdlib.h>
@jirkapenzes
jirkapenzes / BaseFile.cs
Created May 4, 2013 22:09
FileIndex - RTree - přímý přístup do souboru
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace GraphAnalyzer.RTree.FileIndex
{
public class BaseFile<T>
{
@jirkapenzes
jirkapenzes / GeneticAlgorithm.java
Created March 17, 2014 18:38
Genetic algorithm
package core;
import java.util.ArrayList;
import java.util.Random;
public class GeneticAlgorithm {
private Random random;
public GeneticAlgorithm() {
@jirkapenzes
jirkapenzes / RoumenBackup.py
Last active August 29, 2015 13:57
Backup tool for Roumen.cz (backups all liked images from user profile)
import http.cookiejar
import os
import urllib.parse
import urllib.request
import time
from htmldom import htmldom
from enum import Enum
__author__ = 'jpenzes'
package com.jpenzes.smawing;
import com.jpenzes.smawing.utils.IFrameFactory;
import com.jpenzes.smawing.utils.IObjectContainer;
import com.jpenzes.smawing.utils.ObjectContainer;
import com.jpenzes.smawing.utils.SDefaultFrameFactory;
import javax.swing.*;
public abstract class SFrame {
@jirkapenzes
jirkapenzes / Dojo.cs
Last active August 29, 2015 14:00
Dojo
using System;
using System.Linq;
using System.Text.RegularExpressions;
using Xunit;
using Xunit.Extensions;
namespace Dojo
{
public struct Input
{
@jirkapenzes
jirkapenzes / delete-objects.sql
Created May 5, 2014 11:56
Delete all tables, views, packages, procedures, functions and sequences in your Oracle schema.
BEGIN
FOR cur_rec IN (SELECT object_name, object_type
FROM user_objects
WHERE object_type IN
('TABLE',
'VIEW',
'PACKAGE',
'PROCEDURE',
'FUNCTION',
'SEQUENCE'
@jirkapenzes
jirkapenzes / coding-dojo.java
Created May 9, 2014 06:00
Prague Coding Dojo #9
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(JUnitParamsRunner.class)
public class CodingDojo {
final int ALL_PINS = 10;
@jirkapenzes
jirkapenzes / Bowling.java
Created May 29, 2014 18:45
CodingDojo #12
import java.util.ArrayList;
import java.util.List;
public class Bowling {
private List<Round> rounds;
public Bowling() {
rounds = new ArrayList<>();
}
@jirkapenzes
jirkapenzes / dojo.js
Created June 5, 2014 22:37
Coding Dojo #13
function World(width, height)
{
var world = this;
this.width = width;
this.height = height;
this.cells = new Array(width, height);
this.addPersonTo = function(coordinates, personColor){
this.cells[coordinates.x, coordinates.y] = personColor;