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
def column_winner?(_, _, _, 4) do | |
true | |
end | |
def column_winner?(_, 1, _, _) do | |
false | |
end | |
def column_winner?(player, row, col, count) do |
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 urllib.request | |
import urllib.parse | |
import html | |
import re | |
import sys | |
def main(): | |
if len(sys.argv) < 2: | |
print_usage() | |
sys.exit(1) |
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
defmodule Factorial do | |
def of(number) do | |
of(number, 1) | |
end | |
defp of(n, product) when n<= 1 do | |
product | |
end | |
defp of(number, product) do | |
of(number-1, product * number) | |
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
#execute as: python3 anki_importer_generator.py < input.txt | |
#where input.txt is a list of minimal pairs words separated by space: | |
#it eat | |
#bit beat | |
import fileinput | |
import urllib.request | |
import re | |
def makeline(word1, word2, ipaword1, ipaword2, file1, file2): |
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
#Based on: https://medium.com/@tatemz/using-wp-cli-with-docker-21b0ab9fab79 | |
# run in detached mode as: | |
# docker-compose up -d | |
# stop as: | |
# docker-compose down | |
# Run wp-cli commands as: | |
# docker exec my-wp wp post list | |
# | |
# Navigate to http://localhost:8080 or http://localhost/wp-admin | |
version: '3.1' |
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
FROM tatemz/wp-cli | |
RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \ | |
&& sudo apt-get install nodejs \ | |
&& npx ---version \ | |
&& npm install --global gulp-cli \ | |
&& rm -rf /var/lib/apt/lists/* |
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
defmodule PrimeNumber do | |
def is_prime(2), do: true | |
def is_prime(number) do | |
not Enum.any?(2..number-1, fn x -> rem(number, x) == 0 end) | |
end | |
def prime(n) do | |
Stream.interval(1) | |
|> Stream.filter(&is_prime/1) | |
|> Enum.take(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
@mixin generator($prefix, $properties) { | |
// List of sizes to generate for each variant | |
$sizes: [.25, .5, 1, 1.5, 3]; | |
// Loop through all of the sizes | |
// use @for to access the current index | |
@for $i from 1 through length($sizes) { | |
$size: nth($sizes, $i); | |
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
@mixin generator($prefix, $properties) { | |
// List of sizes to generate for each variant | |
//$sizes: [.25, .5, 1, 1.5, 3]; | |
$sizes: [ 1, 3]; | |
// Loop through all of the sizes | |
// use @for to access the current index | |
@for $i from 1 through length($sizes) { | |
$size: nth($sizes, $i); |
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
{ | |
"TotalCount": 432, | |
"TotalPages": 1, | |
"PageNumber": 0, | |
"Result": [ | |
{ | |
"ID": "532bfc12-9491-419d-8f12-e7d7a02bcf86", | |
"StartTime": "2021-11-08T05:00:00-04:00", | |
"EndTime": "2021-11-08T23:30:00-04:00", | |
"Subject": "Fitness Scanning Access", |