This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/poll.h> | |
#define TIMEOUT 5 | |
int main (void) { | |
struct pollfd fds[2]; | |
int ret; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |