Skip to content

Instantly share code, notes, and snippets.

View Firemoon777's full-sized avatar
🦖

Vladimir Turov Firemoon777

🦖
View GitHub Profile
import logging
import os
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Application, CommandHandler, CallbackContext, CallbackQueryHandler
TOKEN = os.environ["TOKEN"]
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
#!/usr/bin/env python3
import os
import json
import subprocess
def show_diff(golden, result, section, error):
if result[section] != golden[section]:
print(error)
if len(result[section]) != len(golden[section]):
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
unsigned long long i = 0;
if(argc != 2) {
fprintf(stderr, "Usage: %s name\n", argv[0]);
#include <stdio.h>
int main() {
void *array[] = {NULL, &&state1, &&state2, &&state3, &&state4, &&state5, &&state6, &&state7};
goto *array[1];
char c;
return 1;
state1:
if(getchar() == 'a') {
goto *array[2];
#include <stdio.h>
#include <unistd.h>
#include <sys/poll.h>
#define TIMEOUT 5
int main (void) {
struct pollfd fds[2];
int ret;
@Firemoon777
Firemoon777 / computed_goto.c
Created October 6, 2016 10:12
computed goto, SPL Lab3 question
#include <stdio.h>
int main(int argc, char **argv)
{
void *array[] = { &&state0_0, &&state0_1, &&state1_0, &&state1_1 };
goto *array[0];
int i;
return 1;
state0_0:
if(scanf("%i", &i) == 1)