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 python3 | |
# | |
# Attempts to play Tic Tac Toe following https://imgs.xkcd.com/comics/tic_tac_toe.png | |
# Does so by trying to read off the image. | |
# Requires the file to be located in the same folder. | |
import cv2 | |
import numpy as np | |
DEBUG = False |
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 | |
import pygame | |
pygame.init() | |
disp = pygame.display.set_mode((640, 480), pygame.DOUBLEBUF) | |
color_value = 0 | |
def rainbow_color(value): |
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 perl | |
use 5.026; | |
use warnings; | |
use List::Util qw(uniq); | |
use JSON; | |
# Extracts the likes, passes and matches from the Tinder JSON data, outputting it in CSV instead. | |
# To run it, go to https://tio.run/#perl5, paste in this code in the "Code" box, the content of your JSON file in the "Input" box, and click run. | |
# The output is then a semicolon-separated CSV you can import into Excel, Google Sheets or similar. |
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
unit Unit1; | |
interface | |
uses | |
SysUtils, Classes, HTTPApp, DB, DBTables; | |
type | |
TWebModule1 = class(TWebModule) | |
Query1: TQuery; |
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
Jeg har booket bord på endnu en restaurant | |
Glæd jer til en outstanding Chateaubriand | |
Tung Grand Cru-klasse med kokasse-ouverture | |
Vi ska' en tur til Frankrig, og den bli'r pissedyr | |
'pagne med brus | |
og så i spa/wellness | |
saltscrub og gus | |
cigaren er tændt og | |
limoen venter natten lang |
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
Betragt følgende omskrivningsregler over strenge i alfabetet {I, U} | |
(1) X --> XX | |
(2) YI --> YIU | |
(3) III --> U | |
(4) UU --> | |
hvor reglerne (1) og (2) opererer på hele strengen, og reglerne (3) og (4) kan operere | |
et vilkårligt sted inde i strengen. |
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
Hva’ er astronomi? | |
Hva’ geologi? | |
Og hva’ putter man i - når man bager? | |
Ka’nibaler li’ kød? | |
Og ka’niner li’ brød? | |
Og hva’ flager man for når man flager? | |
Hva’ rytmik? | |
Hva’ batik? |
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
avgSum = fst . avgSum' 0 0 | |
where avgSum' sum n [] = ([], sum `div` n) | |
avgSum' sum n (x:xs) = | |
let (rs, avg) = avgSum' (sum+x) (n+1) xs | |
in ((x-avg) : rs, avg) |
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
local | |
fun avgSum' sum n [] = ([], sum div n) | |
| avgSum' sum n (x::xs) = | |
let val (rs, avg) = avgSum' (sum+x) (n+1) xs | |
in ((x-avg) :: rs, avg) end | |
in | |
val avgSum = #1 o avgSum' 0 0 | |
end |
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 perl | |
use 5.012; | |
use warnings; | |
use File::Spec; | |
=head1 NAME | |
C<perlopen.pl> - Open perl modules quickly and easily | |
=head1 DESCRIPTION |
NewerOlder