Skip to content

Instantly share code, notes, and snippets.

Roman Alexeev roman-alexeev

Block or report user

Report or block roman-alexeev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rps.py
import statistics
import random
[(x > 0.5 and print("You won!"), x<0.5 and print("You lost!"), x==0.5 and print ("Draw!")) for x in [statistics.mean([0.5] + [x for x in (({0: None,1:1,2:0}[((int(input("1 for Rock, 2 for Paper, 3 for Scissors: "))-1) - (print("Computer chooses {}!".format({0:'Rock',1:'Paper',2:'Scissors'}[c])) or c)) % 3]) for c in (random.randint(0,2) for _ in range(int(input("How many turns? "))))) if x is not None])]]
View VeryBig.pm
package VeryBig;
use strict;
#!/usr/bin/env perl
#
# This file, ack, is generated code.
# Please DO NOT EDIT or send patches for it.
#
# Please take a look at the source from
# http://github.com/petdance/ack2
View gist:2a97ab6a756e040abe51ace53e52d597
#include <Windows.h>
#include <stdio.h>
int __stdcall WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char MsgCaption[] = "Исправление Petz5";
char MsgNotInstalled [] = "Игра Petz5 не установлена!";
View gist:4fdd2fcb92e6a83a9ca7b686a46cd6f1
33> (617.83 * 100) - (556.05 * 100)
$res[21] = "6178.00000000001"
34> (617.83 * 100)
$res[22] = 61783
35> (556.05 * 100)
$res[23] = 55605
36> 61783 - 55605
$res[24] = 6178
37> 61783.0 - 55605.0
$res[25] = 6178
View backref_bug
# -*- coding: utf-8 -*-
from sqlalchemy import create_engine, Integer, Column, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
engine = create_engine('sqlite://')
Base = declarative_base()
You can’t perform that action at this time.