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
AUTH_LDAP_START_TLS = True | |
AUTH_LDAP_SERVER_URI = env('AUTH_LDAP_SERVER_URI', cast=str, default=None) | |
AUTH_LDAP_GLOBAL_OPTIONS = { | |
ldap.OPT_X_TLS_REQUIRE_CERT: ldap.OPT_X_TLS_NEVER | |
} | |
AUTH_LDAP_BIND_DN = env('AUTH_LDAP_BIND_DN', cast=str, default=None) | |
AUTH_LDAP_BIND_PASSWORD = env('AUTH_LDAP_BIND_PASSWORD', cast=str, default=None) | |
AUTH_LDAP_USER_SEARCH = LDAPSearchUnion( | |
LDAPSearch( | |
'OU=Company,DC=our,DC=domain,DC=com', |
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 distutils | |
import inspect | |
import os.path | |
import subprocess | |
import types | |
import unittest | |
class PyangBindTestCase(unittest.TestCase): | |
yang_files = None |
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
package main | |
import ( | |
"fmt" | |
"golang.org/x/tour/tree" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
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 python:alpine | |
RUN apk add --update \ | |
build-base \ | |
postgresql-dev | |
WORKDIR /source | |
ADD requirements.txt . | |
RUN pip install -r requirements.txt | |
ADD . /source | |
CMD python manage.py runserver |
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://betterstack.com/community/guides/logging/zerolog/ | |
package logger | |
import ( | |
"io" | |
"os" | |
"runtime/debug" | |
"strconv" | |
"sync" |
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 dataclasses import dataclass | |
from typing import TextIO | |
@dataclass | |
class Solver: | |
center_letter: str | |
all_letters: set[str] | |
dictionary: TextIO |
OlderNewer