This file contains 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
server { | |
listen [::]:{{ .NGINX_PORT }}; | |
listen {{ .NGINX_PORT }}; | |
server_name {{ .NOSSL_SERVER_NAME }}; | |
access_log /var/log/nginx/{{ .APP }}-access.log; | |
error_log /var/log/nginx/{{ .APP }}-error.log; | |
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf; |
This file contains 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 timeit import default_timer as timer | |
from random import randrange, choice | |
from itertools import combinations | |
from dataclasses import dataclass | |
from operator import attrgetter | |
from io import StringIO | |
from typing import List, Optional, Sequence, Tuple | |
@dataclass |
This file contains 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 __future__ import annotations | |
from copy import deepcopy | |
from enum import Enum | |
from functools import reduce | |
from heapq import nsmallest | |
from itertools import tee | |
from math import radians, sqrt, sin, cos, atan2 | |
from random import choices, random, shuffle, randrange | |
from statistics import mean | |
from operator import add |
This file contains 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 itertools import combinations | |
from random import choice | |
players = ['Cristina', 'Rodrigo', 'Moises', 'Wagner', 'Arthur'] | |
league = list(combinations(players, 2)) | |
print(league) | |
def victory_host(ranking, host, away): | |
ranking[host] = ranking.get(host, 0) + 3 |
This file contains 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 python:3.8-buster | |
WORKDIR /root | |
ADD https://github.com/official-stockfish/Stockfish/archive/sf_13.tar.gz /root | |
RUN tar xvzf *.tar.gz && cd Stockfish-sf_13/src \ | |
&& make net && make build ARCH=x86-64-modern | |
FROM python:3.8-slim-buster |
This file contains 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 itertools import islice | |
class Node: | |
def __init__(self, data, previous=None, next=None): | |
self.data = data | |
self.previous = None | |
self.next = None | |
def __eq__(self, other): | |
if isinstance(other, self.data.__class__): |
This file contains 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
// Copyright (c) 2020 Cristina Silva (crissilvaeng) <[email protected]> | |
// License: X11 License (X11) <https://spdx.org/licenses/X11.html> | |
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" |
This file contains 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 | |
import argparse | |
import itertools | |
import statistics | |
COORDINATE_INDEX = 1 | |
SPEED_INDEX = 3 | |
parser = argparse.ArgumentParser(description='Nautical Tracker') | |
parser.add_argument('-f', '--filename', required=True, type=str, help='path to file') |
This file contains 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
package main | |
import ( | |
"io" | |
"os" | |
"log" | |
"fmt" | |
"flag" | |
"crypto/sha256" | |
"encoding/hex" |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<-SCRIPT | |
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb | |
dpkg -i puppetlabs-release-pc1-xenial.deb | |
apt-get update | |
SCRIPT | |
$server = <<-SCRIPT |