This file contains hidden or 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 <pulse/pulseaudio.h> | |
#include <err.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
uint8_t flag = 0; | |
uint8_t volume = 0; |
This file contains hidden or 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 <sys/param.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct node { | |
uint32_t data; | |
struct node *left, *right; | |
}; |
This file contains hidden or 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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct node { | |
uint8_t a; | |
struct node *next; | |
}; |
This file contains hidden or 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
/* | |
* MD5 - The MD5 Message-Digest Algorithm | |
* https://www.ietf.org/rfc/rfc1321.txt | |
* | |
*/ | |
#include <err.h> | |
#include <stdint.h> | |
#include <stdio.h> |
This file contains hidden or 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 <stdint.h> | |
#define ntohs(n) htons(n) | |
#define ntohl(n) htonl(n) | |
#define x86_ntohs(n) x86_htons(n) | |
#define x86_ntohl(n) x86_htonl(n) | |
uint16_t | |
htons(uint16_t n) |
This file contains hidden or 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 <sys/mman.h> | |
#include <err.h> | |
#include <fcntl.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void b64encode(void *, size_t, void *); |
This file contains hidden or 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 <stdint.h> | |
#define SIGN(X) ((X >> 0x0000001f) & 0x00000001) | |
#define ABS(X) ((X^(X >> 0x0000001f)) - (X >> 0x0000001f)) | |
#define SWAP(X, Y) (((X) ^= (Y)), ((Y) ^= (X)), ((X) ^= (Y))) | |
uint32_t umul(uint32_t, uint32_t); | |
int32_t smul(int32_t, int32_t); |
This file contains hidden or 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 python | |
x = 0x000EAFFA | |
# bin() | |
c = bin(x).count('1') | |
print(c) | |
This file contains hidden or 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 math | |
numbers = ('صفر', 'یک', 'دو', 'سه', 'چهار', 'پنج', 'شش', 'هفت', 'هشت', 'نه', | |
'ده', 'یازده', 'دوازده', 'سیزده', 'چهارده', 'پانزده', 'شانزده', 'هفده', 'هجده', 'نوزده') | |
excep_scales = ('بیست', 'سی', 'چهل', 'پنجاه', 'شصت', 'هفتاد', 'هشتاد', 'نود', | |
'صد', 'دویست', 'سیصد', 'چهارصد', 'پانصد', 'ششصد', 'هفتصد', 'هشتصد', 'نهصد') | |
short_scales = ('هزار', 'میلیون', 'بیلیون', 'تریلیون', | |
'کوآدریلیون', 'کوینتیلیون', 'سکستیلیون', 'سپتیلیون', |
This file contains hidden or 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 random | |
n = 100 | |
snakes = {17: 7, 52: 32, 62: 19, 64: 60, 87: 24, 93: 72, 95: 75, 99: 78} | |
ladders = {4: 14, 9: 31, 20: 38, 28: 84, 40: 59, 51: 67, 63: 81, 71: 91} | |
position = [0, 0] | |
player = 0 |