Skip to content

Instantly share code, notes, and snippets.

5, 19, 20, -3, -7, 4, 20, -17, -1, -15, -19, -15, -8, 6, 16, -5
13, 19, -4, -7, -5, 7, 7, 10, -4, -20, 20, 6, 13, -4, 17, 2
18, -17, 9, 7, 12, 13, 16, 6, 0, -19, -16, -9, 1, 15, 1, -19
19, 1, -14, 18, 10, -4, 19, 19, 1, 12, -15, -10, -18, -12, 7, -18
10, 19, -3, -10, 6, 7, 18, 4, 17, -15, -18, -2, -9, -4, 3, 9
gamma = args.gamma
max_delta = args.max_delta
v = {s: 0 for s in game.states}
policy = {s: choice(game.actions)
for s in game.states if not game.is_final(s)}
done = False
while not done:
import functools
import random
def gcd(a, b):
while b:
a, b = b, a % b
return a
import functools
def gcd(a, b):
while b:
a, b = b, a % b
return a
@razvanch
razvanch / id_rsa.pub
Created January 1, 2018 11:29
Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDh7x3mRoGDeceCe0KLtEi94u7/IuGgqylceWvm5ius4NNculB9ZzByP96F4tLHhWAVQRtu/B6SelolSo6jC/X8J6mMhLPjyMEmHjG5IXNUs3N5s1FmqypFeYJHr1kUfCKCBuVMSsPmh79rdQf293bq3qM9EHiBh4rV+imVpE95off1J5wyDzQ4C1Vvt2YQ18rHErbCpQ+a90Ql86kuTgT/MwGID8WoxgObDVIhjmsJN0bMY1iD40RTWGbe+k/mxoUJGUTOTQZ0kkkfDymdPmHh17RZtrg8eTOdGKc080LhCCY4ohQ8qOt5iY+U0FY5+WwCeqxZ2aSVDntHe0N1BPAp Razvan Chitu
/* Write all your code here! */
class XMLVisitor implements BaseObject.Visitor {
/* Use this value when printing tabs for indentation. */
private static String TAB = " ";
private int tabs;
private void printLineIndented(String line) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < tabs; i++) {
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
public class Algorithms {
private static class Student implements Comparable<Student> {
private float grade;
private String name;
import java.util.Iterator;
import java.util.LinkedList;
public class Queue<T> implements Iterable<T> {
private LinkedList<T> list;
public Queue() {
this.list = new LinkedList<>();
}
debug probleme: #debugging
code review probleme: #code-review
probleme clasificate pe companii: http://www.learn4master.com/interview-questions/leetcode/leetcode-problems-classified-by-company
warm-up:
https://leetcode.com/problems/valid-parentheses/description/
https://leetcode.com/problems/two-sum/description/
https://leetcode.com/problems/majority-element/description/
https://leetcode.com/problems/min-stack/description/
@razvanch
razvanch / gnome-autoar.diff
Created August 22, 2016 22:35
Patches to gnome-autoar as part of GSoC
From 21c309afd601c8433ccc56f9519b82be2406480b Mon Sep 17 00:00:00 2001
From: Razvan Chitu <razvan.ch95@gmail.com>
Date: Fri, 19 Aug 2016 21:08:09 +0300
Subject: [PATCH 01/22] AutoarExtract: fix return value of getter function
autoar_extract_get_output_is_dest returned source_is_mem instead.
https://bugzilla.gnome.org/show_bug.cgi?id=768645
---
gnome-autoar/autoar-extract.c | 2 +-