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 typing as t | |
from goodtables import Error, check | |
from tableschema.exceptions import TableSchemaException | |
from .schema_field import ConstraintsError, ExtensibleField | |
# primaryKey and unique constraints are unaccounted for here | |
# TODO look into optimizing unique constraint checks |
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
""" | |
In dataflows, the API for operating on an entire package goes as follows: | |
* we define a Higher order function to take in config and context | |
* in that function, we define and return a function that will operate on various resources. | |
In this instance, that function operates on the entire datapackage. To do so it yields, in order: | |
* the package definition, with changes (adds the new resource) | |
* a generator for each resource, in the order they are defined | |
""" | |
import typing as t |
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 typing as t | |
from math import inf | |
from goodtables import Inspector, cells | |
from goodtables.error import Error | |
from goodtables.inspector import _filter_checks | |
from goodtables.registry import registry | |
from tableschema import Schema | |
from .rules.full_schema_constraint import ( |
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 flask import Blueprint, redirect | |
from flask_login import current_user, logout_user | |
from flask_appbuilder.security.manager import AUTH_OAUTH, AUTH_REMOTE_USER | |
my_blueprint = Blueprint("My Blueprint", __name__) | |
@my_blueprint.before_app_request | |
def ensure_logout_correctness(): | |
"""Ensure users are logged out when the proxy logs out |
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
$XONSH_SHOW_TRACEBACK = True | |
import typing as t | |
import xonsh.jobs | |
from time import strftime | |
from prompt_toolkit.key_binding import vi_state | |
from xonsh.prompt.vc import dirty_working_directory | |
xontrib load bashisms coreutils distributed docker_tabcomplete readable-traceback |
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
const { OAuth2Client } = require('google-auth-library'); | |
function decodedTokenToUser({ | |
// protocole concerns | |
iss, | |
azp, | |
aud, | |
at_hash, | |
iat, | |
exp, |
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
/* | |
original contained the following, has since been modified | |
Copyright (c) 2015 Paul Jolly <paul@myitcv.org.uk) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
// base type | |
class Foo { | |
String _foo; | |
int _bar; | |
} | |
//fragment exposing foo | |
class FooFragment extends Foo { | |
String get foo => _foo; | |
set foo(String value) => _foo = value; |
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
List<HSLColor> hslTetrad(Color color) { | |
final hsl = HSLColor.fromColor(color); | |
final baseHue = hsl.hue; | |
return [ | |
hsl, | |
hsl.withHue((baseHue + 90) % 360), | |
hsl.withHue((baseHue + 180) % 360), | |
hsl.withHue((baseHue + 270) % 360), | |
]; | |
} |