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
using System; | |
using System.Collections; | |
using System.Text.RegularExpressions; | |
class Word : IComparable | |
{ | |
public string word; | |
public int count; |
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 collections | |
import re | |
text = """I'm sorry but I don't want to be an Emperor. That's not my business. | |
I don't want to rule or conquer anyone. | |
I should like to help everyone if possible, Jew, gentile, black man, white. | |
We all want to help one another, human beings are like that. | |
We all want to live by each other's happiness, not by each other's misery. We don't want to hate and despise one another. | |
In this world there is room for everyone and the earth is rich and can provide for everyone. |
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 usr, unsigned int cpu, char** hands) | |
{ | |
return printf((0 <= usr && usr <= 2) ? "you: %s\ncpu: %s\n%s\n" : "incorrect input!\n", hands[usr], hands[cpu%3], ((char*[]){"drow :-)", "lose...", "your! win!!!"})[(3+usr-cpu%3)%3], (usr=-1)&&scanf("%d", &usr), printf("jan! ken!! game!!!\nplease your hand(0:%s 1:%s 2:%s):", hands[0]="guu", hands[1]="choki", hands[2]="paa")) == 17; | |
} |
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
(lambda hands : (lambda usr, cpu: print('usr: {0}\ncpu: {1}\n{2}'.format(hands[int(usr)], hands[cpu], ('drow :-)', 'lose...', 'your win!!')[(3+int(usr)-cpu)%3]) if usr.isdigit() and 0 <= int(usr) <= 2 else 'incorrect input!'))(input('jan! ken!! game!!!\nplease your hand(0:{0}, 1:{1}, 2:{2}):'.format(*hands)), __import__('random').randint(0, 2)))(('guu', 'choki', 'paa')) |
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) | |
{ | |
return argc == 2 ? printf("%d\n", main(-atoi(argv[1]), argv))==0 : (argc < -1 ? -argc*main(argc+1, argv) : -argc); | |
} |
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> | |
void showList(char** list, size_t length) | |
{ | |
printf("%d: ", length); | |
for(int i=0; i<length; i++) | |
printf("%s, ", list[i]); | |
printf("\npivot: %s\n\n", list[length/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 <time.h> | |
#include <stdbool.h> | |
#define FUNDS_INITIAL 50000 | |
#define MINIMAL_PREMIUM 100 | |
const char* HANDS[] = {"guu", "choki", "paa"}; |
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 <stdlib.h> | |
typedef struct stMY_CLASS{ | |
char *name; | |
char* (*GetName)(struct stMY_CLASS*); | |
void (*SetName)(struct stMY_CLASS*, char*); | |
}MyClass; |
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> | |
struct stTAMA_CHARS { | |
char t; | |
char a; | |
char m; | |
char A; | |
}; |
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 socket | |
ssock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
ssock.bind(('localhost', 8080)) | |
ssock.listen(1) | |
message = 'hello, world!\n' | |
dat = '''HTTP/1.1 200 OK |
OlderNewer