This is what I tried at first:
#include <stdio.h>
void printArray(int array[], int length) {
for (int i = 0; i < length; i++)
printf("%d", *(array + i));| """Provide the EMOJI class.""" | |
| from ...const import API_PATH | |
| from .base import RedditBase | |
| class Emoji(RedditBase): | |
| """An individual Emoji object.""" | |
| __hash__ = RedditBase.__hash__ | |
| STR_FIELD = 'name' |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int * merge(int* array, int length) { | |
| if (length < 2) | |
| return array; | |
| int midpoint = length / 2; | |
| int* front = merge(array, midpoint); | |
| int* back = merge(array + midpoint, length - midpoint); |
| #include <stdio.h> | |
| void printArray(int array[], int length) { | |
| printf("{"); | |
| for (int i = 0; i < length; i++) | |
| printf("%d, ", *(array + i)); | |
| printf("\b\b}\n"); | |
| } | |
| int main() {return 0;) |
| """Use regex to parse HTML and make a Bandcamp embed.""" | |
| import re | |
| import requests | |
| TEMPLATE = """ | |
| <iframe style="border: 0; width: 276px; height: 390px;" | |
| src="https://bandcamp.com/EmbeddedPlayer/track={track_number}/size=large/bgcol=ffffff/linkcol=17a2b8/tracklist=false/" | |
| seamless> |
| from random import random | |
| def contains_point(polygon, point): | |
| """Determine whether point is contained within polygon. | |
| :param polygon: An ordered sequence of length-2 tuples that represent the (x, y) coordinates of points that, | |
| when connected, form a polygon that does not intersect itself. The last point will connect with the first | |
| one. | |
| :param point: A length-2 tuple that represents the (x, y) coordinates of a point. |
| #include <stdio.h> | |
| int main(int argc, char* argv[]) { | |
| for (int i = 0; i < argc; i++) | |
| printf("%s\n", argv[i]); | |
| return 0; | |
| } |
| #include <stdio.h> | |
| #define DIGITS "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
| void my_itoa(int num, char* str, int base) { | |
| if (num < 0) { | |
| num *= -1; | |
| str[0] = '-'; | |
| str++; | |
| } |
| import praw | |
| from json import dumps, JSONEncoder | |
| reddit = praw.Reddit(username='', | |
| password='', | |
| client_id='', | |
| client_secret='', | |
| user_agent='') | |
| comment = reddit.comment('em3rygg') |
| """Get Kishi Bashi's shows and build a nice markdown table.""" | |
| from datetime import datetime | |
| from urllib.parse import urlparse | |
| import requests | |
| def main(): | |
| shows = requests.get('https://rest.bandsintown.com/artists/Kishi Bashi/events', |