Skip to content

Instantly share code, notes, and snippets.

View Xevion's full-sized avatar
⚜️
Chaos Order

Xevion Xevion

⚜️
Chaos Order
View GitHub Profile
// Hello world! Cplayground is an online sandbox that makes it easy to try out
// code.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
union magic {
uint8_t buf[4];
uint32_t magic2;
@Xevion
Xevion / common_timezones.txt
Created June 19, 2022 00:51
Common Timezones provided by Pytz
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
@Xevion
Xevion / all_timezones.txt
Created June 19, 2022 00:51
All timezones provided by Pytz
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
library(beakr)
# Create a new beakr server
newBeakr() %>%
# Respond to GET requests at the "/hi" route
httpGET(path = "/hi", function(req, res, err) {
print("Hello, World!")
}) %>%
<SpeakerMappings>
<Mapping count="11686">
<Source>Michael</Source>
<Destination>Michael</Destination>
</Mapping>
<Mapping count="7335">
<Source>Dwight</Source>
<Destination>Dwight</Destination>
</Mapping>
<Mapping count="6632">
{
"subaru": [
{
"id": "yyTJTUNgsVU",
"title": "The Subaru Sambar Is a Cute, Surprisingly Practical Tiny Van"
},
{
"id": "vCOYkYwEXPE",
"title": "The 2023 Subaru Solterra Is an Electric Crossover for Adventures"
},
>>> def max_penalized(n: float, penalty: float = 0.4) -> float:
return n + (100 - n) * (1 - penalty)
>>> max_penalized(85.56)
94.224
2022-03-30T07:14:44.969115+00:00 heroku[web.1]: State changed from crashed to starting
2022-03-30T07:14:53.852467+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2022-03-30T07:14:56.063853+00:00 heroku[web.1]: State changed from starting to up
2022-03-30T07:14:55.684562+00:00 app[web.1]: [2022-03-30 07:14:55 +0000] [4] [INFO] Starting gunicorn 20.1.0
2022-03-30T07:14:55.685249+00:00 app[web.1]: [2022-03-30 07:14:55 +0000] [4] [INFO] Listening at: http://0.0.0.0:32157 (4)
2022-03-30T07:14:55.685322+00:00 app[web.1]: [2022-03-30 07:14:55 +0000] [4] [INFO] Using worker: sync
2022-03-30T07:14:55.704518+00:00 app[web.1]: [2022-03-30 07:14:55 +0000] [10] [INFO] Booting worker with pid: 10
2022-03-30T07:14:55.788814+00:00 app[web.1]: [2022-03-30 07:14:55 +0000] [11] [INFO] Booting worker with pid: 11
2022-03-30T07:15:04.154942+00:00 app[web.1]: Collecting en_core_web_sm==2.3.1
2022-03-30T07:15:04.319253+00:00 app[web.1]: Collecting en_core_web_sm==2.3.1
import math
import shutil
from typing import List
import imageio
import os
from PIL import Image, ImageDraw
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
IMG_OUT_DIRECTORY = os.path.join(SCRIPT_DIR, 'gif')
IMG_TEMP_OUT_DIR = os.path.join(IMG_OUT_DIRECTORY, 'temp')
import shutil
from typing import List
import imageio
import os
from PIL import Image, ImageDraw
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
IMG_OUT_DIRECTORY = os.path.join(SCRIPT_DIR, 'gif')
IMG_TEMP_OUT_DIR = os.path.join(IMG_OUT_DIRECTORY, 'temp')
IMG_TEMP_GLOB = os.path.join(IMG_TEMP_OUT_DIR, '*.png')