Skip to content

Instantly share code, notes, and snippets.


Roland Szabo rolisz

View GitHub Profile
rolisz / Cargo.toml
Last active Jul 8, 2020
Simple web crawler in Rust
View Cargo.toml
name = "rust_crawler"
version = "0.1.0"
authors = ["Roland Szabo <>"]
edition = "2018"
# See more keys and their definitions at
reqwest = { version = "0.10", features = ["json", "blocking"] }
rolisz /
Created Nov 21, 2018
Script to send GPU monitoring data obtained with nvidia-smi to Stackdriver.
from subprocess import Popen, PIPE
import os
import time
import sys
def compute_stats():
all_gpu = []
all_mem = []
for i in range(10):
p = Popen(["nvidia-smi","--query-gpu=utilization.gpu,utilization.memory", "--format=csv,noheader,nounits"], stdout=PIPE)
import numpy as np
from numpy.random import random as rand
class NeuralNetwork:
activations = {
'tanh': lambda x: np.tanh(x),
'relu': lambda x: np.clip(x, 0, np.max(x))
derivatives = {
rolisz /
Created Jun 19, 2014
AVL tree in python
__author__ = 'Roland'
import copy
class avl:
def __init__(self,value = None,left = None,right = None,parent = None):
self.value = value
self.left = left
self.right = right
self.parent = parent
rolisz / scris.lsp
Created Jan 4, 2014
Pregatire pentru examenul scris la PLF, LISP
View scris.lsp
(defun inserare(el l)
((null l) nil)
(t (mapcar (lambda (x) (cons el x)) l))
(defun permutare(l)
((null l) '(()))
rolisz /
Created Mar 17, 2013
For Catalin with multiprocessing
from multiprocessing import Pool
__author__ = 'Roland'
from PIL import Image
#size of image
imgx = 600
imgy = 400
#make image buffer
image ="RGB", (imgx, imgy))
rolisz / scrape_notebook.ipynb
Created Feb 14, 2013
IPython notebook cu scraping la notele de la BD, PLF, PS ca sa obtinem toate notele bine organizate la un loc.
View scrape_notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
rolisz / Game of Life
Created Dec 8, 2012
Functional Conway's Game of Life
View Game of Life
import copy
def next_state(current_state, nr_neighbors):
if (current_state and (nr_neighbors < 2 or nr_neighbors > 3)) or\
(not current_state and nr_neighbors == 3):
return not current_state
return current_state
def are_neighbors(cell1,cell2):
return abs(cell1[0] - cell2[0]) <= 1 and abs(cell1[1] - cell2[1]) <= 1 \
and cell1 != cell2
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
rolisz / problema2.asm
Created Feb 9, 2012
Rezolvare problema 2 AC grupa 215
View problema2.asm
assume cs:code, ds:data
data segment
original dd 12A63478h
dd 12345678h
dd 1A2B3C4dh
dd 0FEDC9876h
lungime db (lungime-original)/4
ranks db 10 DUP(?)
suma dw 0
contor db 0
You can’t perform that action at this time.