sudo yum -y install epel-release
sudo yum -y update
Download repository
import pygame | |
import time | |
import random | |
pygame.init() | |
white = (255, 255, 255) | |
yellow = (255, 255, 102) | |
black = (0, 0, 0) | |
red = (213, 50, 80) |
""" | |
class BaseWorker: | |
def __int__(self): | |
self.counter = 0 | |
def work(self): | |
self.counter += 1 | |
def get_counter(self): |
import asyncio | |
import time | |
import traceback | |
class Awaitable: | |
def __init__(self, block_fns): | |
self.fns: list = block_fns | |
def __await__(self, *args, **kwargs): |
import deque | |
graph2 = { | |
'Dov Aharon': ['Debbie Ben Zaken', 'Yaron Baberman'], | |
'Debbie Ben Zaken': [], | |
'Yaron Baberman': ['Dan Cohen'], | |
'Dan Cohen': ['David Dukovsky', 'Didi Eshkol'], | |
'David Dukovsky': [], 'Didi Eshkol': [] | |
} |
class ChessBoard: | |
size: int = 7 | |
class ChessPiece: | |
def __init__(self): | |
self.dead = False |
from contextlib import ExitStack | |
from dataclasses import dataclass | |
import json | |
@dataclass | |
class Node: | |
n_id: int | |
n_type: str | |
n_text: str |
import numpy as np | |
def is_solved(board): | |
grid = np.array(board) | |
row0 = grid[0] | |
row1 = grid[1] | |
row2 = grid[2] | |
col0 = grid[:, 0] | |
col1 = grid[:, 1] |
class MyClassQuerySet(models.query.QuerySet): | |
def get(self, **kwargs): | |
print('hello world') | |
try: | |
return super().get(**kwargs) | |
except: | |
return None | |
class MyClassManager(models.Manager.from_queryset(MyClassQuerySet)): |
# uncommited file to HEAD | |
git diff <path> | |
# uncommited file to before last commit | |
git diff HEAD^ -- <path> | |
#last commit to before last commit | |
git diff HEAD^ HEAD -- <path> | |
#difference between HEAD and n-th grandparent |