hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62c3016071535dcdded7063a163ccb4d7ecc3f35 | 1,211 | py | Python | toontown/classicchars/DistributedPoliceChip.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/classicchars/DistributedPoliceChip.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/classicchars/DistributedPoliceChip.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.showbase.ShowBaseGlobal import *
from toontown.classicchars import DistributedCCharBase
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM
from direct.fsm import State
from toontown.classicchars import CharStateDatas
from toontown.toonbase import ToontownGlobals
from toonto... | 46.576923 | 270 | 0.752271 |
62c310b2d0dc79ada79f60c5f0c5cf9e1b99be9b | 1,837 | py | Python | tests/test_autosynth_apiary_provider.py | jskeet/synthtool | d73e8dea90af1b463a7f9d4a33244cf4612ada7c | [
"Apache-2.0"
] | 3 | 2020-12-31T05:26:56.000Z | 2021-03-01T07:28:06.000Z | tests/test_autosynth_apiary_provider.py | jskeet/synthtool | d73e8dea90af1b463a7f9d4a33244cf4612ada7c | [
"Apache-2.0"
] | null | null | null | tests/test_autosynth_apiary_provider.py | jskeet/synthtool | d73e8dea90af1b463a7f9d4a33244cf4612ada7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.22807 | 74 | 0.690256 |
62c314e3173404a8f5e4bebf8bfb9d429eb0c455 | 2,000 | py | Python | kinto/plugins/accounts/scripts.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 4,618 | 2015-08-06T18:17:02.000Z | 2022-03-31T10:03:07.000Z | kinto/plugins/accounts/scripts.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 1,578 | 2015-07-30T09:47:41.000Z | 2022-03-31T13:12:50.000Z | kinto/plugins/accounts/scripts.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 546 | 2015-07-30T10:31:35.000Z | 2022-03-31T12:44:32.000Z | import getpass
import logging
import transaction as current_transaction
from pyramid.settings import asbool
from .utils import hash_password
from .views import AccountIdGenerator
logger = logging.getLogger(__name__)
def create_user(env, username=None, password=None):
"""Administrative command to create a new u... | 32.786885 | 87 | 0.6465 |
62c3554bc9b6e3a5d3a631a21430e1099f99241c | 2,444 | py | Python | tests/test_examples.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | tests/test_examples.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | tests/test_examples.py | jloveric/functional-layers | 5ca4efbf842f290b62ad4cc2c0045438402f71b8 | [
"MIT"
] | null | null | null | from examples.invariant_mnist import invariant_mnist
from examples.cifar100 import cifar100
from examples.xor import plot_approximation, model_set_d
from examples.mnist import mnist
from examples.function_example import plot_results
from examples.cifar10 import run_cifar10
from omegaconf import DictConfig, OmegaConf
im... | 27.155556 | 88 | 0.569967 |
62c3f2aa67b19f64f4b27e3ee4a84205a70ce89a | 3,251 | py | Python | tools/submiy.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | 6 | 2019-08-07T14:36:23.000Z | 2022-03-11T01:53:05.000Z | tools/submiy.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | null | null | null | tools/submiy.py | forAragaki/mmdection_forjinnan | 4b278596b613f47d5fc2a4651d77ac2ed89a648c | [
"Apache-2.0"
] | null | null | null | import mmcv
from mmcv.runner import load_checkpoint
from mmdet.models import build_detector
from tqdm import tqdm
from mmdet.apis import inference_detector, show_result
import numpy as np
import pycocotools.mask as maskUtils
cfg = mmcv.Config.fromfile('configs/cascade_mask_rcnn_x101_32x4d_fpn_1x.py')
cfg.model.pretrain... | 33.173469 | 151 | 0.665949 |
62c3f69b117167cdebc522346d1837d857cfcf6c | 3,704 | py | Python | tests/distributed/test_dist_graph_store.py | m30m/dgl | 2190c39d674f76c65db9ee8da7b43d3021f19c29 | [
"Apache-2.0"
] | 2 | 2021-12-09T12:36:13.000Z | 2022-03-01T21:22:36.000Z | tests/distributed/test_dist_graph_store.py | m30m/dgl | 2190c39d674f76c65db9ee8da7b43d3021f19c29 | [
"Apache-2.0"
] | null | null | null | tests/distributed/test_dist_graph_store.py | m30m/dgl | 2190c39d674f76c65db9ee8da7b43d3021f19c29 | [
"Apache-2.0"
] | 2 | 2020-12-07T09:34:01.000Z | 2020-12-13T06:18:58.000Z | import os
os.environ['OMP_NUM_THREADS'] = '1'
import dgl
import sys
import numpy as np
import time
from scipy import sparse as spsp
from numpy.testing import assert_array_equal
from multiprocessing import Process, Manager, Condition, Value
import multiprocessing as mp
from dgl.graph_index import create_graph_index
from... | 32.208696 | 86 | 0.658477 |
62c401bf8d5456ea9e1cf60c63397221a6956978 | 786 | py | Python | test_bot.py | gadirotenberg/ukraine_bus_bot | cbfbef38008e221b1a7526aee3cf3aa3fe613e8f | [
"BSD-2-Clause"
] | null | null | null | test_bot.py | gadirotenberg/ukraine_bus_bot | cbfbef38008e221b1a7526aee3cf3aa3fe613e8f | [
"BSD-2-Clause"
] | null | null | null | test_bot.py | gadirotenberg/ukraine_bus_bot | cbfbef38008e221b1a7526aee3cf3aa3fe613e8f | [
"BSD-2-Clause"
] | null | null | null | # pylint: disable=too-many-lines
import re
import json
import urllib
import datetime
import logging
from typing import Dict, Any, List, Optional
from flask.testing import FlaskClient # type: ignore
import db
import conftest
import texts
from texts import Inputs
import utils
from messaging import Message, MockMess... | 18.27907 | 71 | 0.707379 |
62c426a460b2ff68c2a40325b24c1199f57e5e12 | 3,292 | py | Python | oscar/lib/python2.7/site-packages/django_extensions/templatetags/syntax_color.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/templatetags/syntax_color.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/templatetags/syntax_color.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Template filter for rendering a string with syntax highlighting.
It relies on Pygments to accomplish this.
Some standard usage examples (from within Django templates).
Coloring a string with the Python lexer:
{% load syntax_color %}
{{ code_string|colorize:"python" }}
... | 31.056604 | 98 | 0.707169 |
62c43c592f39b9b34cabcb2887ca0d4dcc207d39 | 6,705 | py | Python | src/python/pants/java/nailgun_client.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/java/nailgun_client.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/java/nailgun_client.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
impor... | 40.884146 | 100 | 0.688889 |
62c468a7caba9316ff3615c6c2e4e4e8b958849d | 40,363 | py | Python | tools/ext4.py | FabriSC/Alioth-SC | bbe9723401b351c2a34b09a30978373d456d20a2 | [
"MIT"
] | 3 | 2022-03-16T12:31:10.000Z | 2022-03-23T04:20:20.000Z | pyscripts/ext4.py | affggh/NH4RomTool | 84b06f9cc5f268c14c7af25e91c8b242188c70f7 | [
"Apache-2.0"
] | null | null | null | pyscripts/ext4.py | affggh/NH4RomTool | 84b06f9cc5f268c14c7af25e91c8b242188c70f7 | [
"Apache-2.0"
] | 1 | 2022-03-30T04:47:35.000Z | 2022-03-30T04:47:35.000Z | import ctypes
import functools
import io
import math
import queue
def wcscmp(str_a, str_b):
for a, b in zip(str_a, str_b):
tmp = ord(a) - ord(b)
if tmp != 0: return -1 if tmp < 0 else 1
tmp = len(str_a) - len(str_b)
return -1 if tmp < 0 else 1 if tmp > 0 else 0
class Ext4Error(Exception)... | 41.870332 | 179 | 0.607438 |
62c479add5a39389aec95f51a7f46546dbbc31db | 3,734 | py | Python | oscar/lib/python2.7/site-packages/django_extensions/db/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/db/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/db/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Django Extensions abstract base model classes.
"""
from django.db import models
from django.utils.timezone import now
from django.utils.translation import ugettext_lazy as _
from django_extensions.db.fields import (
AutoSlugField, CreationDateTimeField, ModificationDateTimeFiel... | 34.574074 | 119 | 0.67354 |
62c4842621d48ef3f9e3859b61416379fa12af08 | 18,248 | py | Python | dapy/utils/pou.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 11 | 2020-07-29T07:46:39.000Z | 2022-03-17T01:28:07.000Z | dapy/utils/pou.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 1 | 2020-07-14T11:49:17.000Z | 2020-07-29T07:43:22.000Z | dapy/utils/pou.py | hassaniqbal209/data-assimilation | ec52d655395dbed547edf4b4f3df29f017633f1b | [
"MIT"
] | 10 | 2020-07-14T11:34:24.000Z | 2022-03-07T09:08:12.000Z | """Partition of unity bases functions for scalable localisation."""
import abc
from typing import Tuple, Callable
import numpy as np
import numpy.fft as fft
import numba as nb
from dapy.models.base import AbstractModel
import dapy.utils.localisation as localisation
@nb.njit(
nb.float64[:, :, :](nb.float64[:, :, ... | 39.243011 | 88 | 0.52877 |
62c4c13dd2b9d7d90deee5244249222764ab77ee | 4,156 | py | Python | tests/unit/template_test.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | tests/unit/template_test.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | tests/unit/template_test.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email: `Mike Place <mp@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import NO_MOCK, NO_MOCK_REASO... | 37.781818 | 106 | 0.640279 |
62c4d88333e4f030715c9d0624ac81e0a244a597 | 4,050 | py | Python | hwtGraph/elk/containers/lEdge.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | 6 | 2018-06-20T21:28:51.000Z | 2022-03-16T18:06:39.000Z | hwtGraph/elk/containers/lEdge.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | 2 | 2021-01-05T09:13:52.000Z | 2021-03-15T22:17:07.000Z | hwtGraph/elk/containers/lEdge.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | null | null | null | from typing import List
from hwt.synthesizer.componentPath import ComponentPath
from hwtGraph.elk.containers.constants import PortType
class LEdge():
"""
Edge in layout graph
:ivar ~.parentNode: parent node instance
:ivar ~.name: name of this edge (label)
:ivar ~.originObj: optional object which... | 34.033613 | 85 | 0.574321 |
62c4f4e6e3c4ce5533b23f7f6cc15fccffc28d81 | 1,874 | py | Python | scandeval/benchmarks/mim_gold_ner.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 10 | 2021-07-21T10:47:42.000Z | 2022-03-03T13:45:25.000Z | scandeval/benchmarks/mim_gold_ner.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 28 | 2021-07-29T12:21:15.000Z | 2022-03-09T12:46:49.000Z | scandeval/benchmarks/mim_gold_ner.py | NbAiLab/ScandEval | 59eb1902a1880d7483d48a4ee213bbec0e2eb71a | [
"MIT"
] | 4 | 2022-01-17T12:11:58.000Z | 2022-03-14T18:42:01.000Z | '''NER evaluation of a language model on the MIM-GOLD-NER dataset'''
import logging
from .abstract import NerBenchmark
logger = logging.getLogger(__name__)
class MimGoldNerBenchmark(NerBenchmark):
'''Benchmark of language models on the MIM-GOLD-NER dataset.
Args:
cache_dir (str, optional):
... | 39.87234 | 78 | 0.636606 |
62c51b3d6a7f32a9a3dd3dcbf8bf6d1ce24494a0 | 1,664 | py | Python | examples/THCHS30.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | examples/THCHS30.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | examples/THCHS30.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=wrong-import-position
# pylint: disable=wrong-import-order
# pylint: disable=not-callable
# pylint: disable=ungrouped-imports
# pylint: disable=import-error
# pylint: disable=pointless-string-statement
# pylint: disable=... | 22.486486 | 81 | 0.723558 |
62c5442f0ed36277c8e7f512d08adda10bf819d2 | 13,766 | py | Python | BFS/run_new.py | iesl/KISP | 2c8ffacc36abcefc86b6d19dcdd49213241c6ff8 | [
"MIT"
] | null | null | null | BFS/run_new.py | iesl/KISP | 2c8ffacc36abcefc86b6d19dcdd49213241c6ff8 | [
"MIT"
] | null | null | null | BFS/run_new.py | iesl/KISP | 2c8ffacc36abcefc86b6d19dcdd49213241c6ff8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#-*-coding=utf-8-*-
import sys
import os
import json
from nltk.tokenize import WordPunctTokenizer
import numpy as np
import pickle
import numpy
import random
from tqdm import tqdm
import BFS.agent as agent
import random
import BFS.parser as Parser
import threading
import multipro... | 41.463855 | 119 | 0.533052 |
62c560e36c9b9d97130d0420591f4ec4662d1e96 | 1,207 | py | Python | codes/projects/poisson_2d/utils_project/integrals_pwl_prestiffness.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/poisson_2d/utils_project/integrals_pwl_prestiffness.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/poisson_2d/utils_project/integrals_pwl_prestiffness.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | import numpy as np
import pdb #Equivalent of keyboard in MATLAB, just add "pdb.set_trace()"
def integrals_pwl_prestiffness(vertices_coords):
"""
integrals_pwl_prestuffness computes the integrals of the mass matrix, without
consideration of the parameter, for the nodes corresponding to the jth
element... | 37.71875 | 87 | 0.690969 |
62c57daf19d72753f1c9b061464da570e88011e0 | 6,729 | py | Python | homeassistant/components/envisalink/alarm_control_panel.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/envisalink/alarm_control_panel.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/envisalink/alarm_control_panel.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for Envisalink-based alarm control panels (Honeywell/DSC)."""
import logging
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanel,
)
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPO... | 30.866972 | 88 | 0.645713 |
62c5ada3a470a3f456be07144cd403495b4582b4 | 4,737 | py | Python | apysc/_display/path.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_display/path.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_display/path.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """Implementations of the Path class.
"""
from typing import List
from apysc._display import graphics
from apysc._display.line_base import LineBase
from apysc._geom.path_data_base import PathDataBase
class Path(LineBase):
"""
The path vector graphics class.
Examples
--------
>>>... | 37.007813 | 73 | 0.557104 |
62c5be343955513df0c71719818c86adb3ec96d3 | 2,349 | py | Python | applications/gotochurch/controllers/area.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gotochurch/controllers/area.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gotochurch/controllers/area.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | def novaArea():
if request.vars:
setor = request.vars.setor
idCoordenador = request.vars.idCoordenador
if idCoordenador != '' and setor != '':
try:
Area.insert(coordenador=idCoordenador, setor=setor)
except Exception as e:
db.rollback()... | 34.544118 | 288 | 0.529161 |
62c5bf70ed411b6840e39bfc5c98fb4b7001de88 | 980 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/cursorcontrol_custom_cursor.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/cursorcontrol_custom_cursor.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/cursorcontrol_custom_cursor.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
import displayio
from adafruit_cursorcontrol.cursorcontrol import Cursor
from adafruit_cursorcontrol.cursorcontrol_cursormanager import CursorManager
# Create the display
display = board.DISPLAY
# C... | 23.902439 | 76 | 0.721429 |
62c5cde5e39e3fec0caafd44fa76123f1c0ad9b6 | 3,464 | py | Python | scripts/open_cv_test.py | mmenietti/python_code | 74df6acf8f950b72f65e27b2ac98854483084b6f | [
"MIT"
] | null | null | null | scripts/open_cv_test.py | mmenietti/python_code | 74df6acf8f950b72f65e27b2ac98854483084b6f | [
"MIT"
] | null | null | null | scripts/open_cv_test.py | mmenietti/python_code | 74df6acf8f950b72f65e27b2ac98854483084b6f | [
"MIT"
] | null | null | null | #------------------------------------------------------------
# Dependencies
#------------------------------------------------------------
import collections
import pathlib
import numpy
import cv2
import struct
import matplotlib.pyplot
import mm.text_utilities
import mm.misc_utilities
#--------------------------------... | 40.752941 | 167 | 0.582275 |
62c5d7f2ff757272d24d95a0b617d162d45fe93e | 20,332 | py | Python | solutionreporttools/dataprep.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 19 | 2015-03-04T21:30:15.000Z | 2021-04-28T10:50:18.000Z | solutionreporttools/dataprep.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 11 | 2015-03-27T20:30:55.000Z | 2017-06-28T15:04:06.000Z | solutionreporttools/dataprep.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 17 | 2015-03-13T20:02:07.000Z | 2020-03-21T12:01:41.000Z | """
@author: ArcGIS for Utilities
@contact: ArcGISTeamUtilities@esri.com
@company: Esri
@version: 1.0
@description: Used to prep data for reporting and other geoprocessing task by copying datasets from enterprise to
local geodatabases.
@requirements: Python 2.7.x, ArcGIS 10.2
... | 50.703242 | 174 | 0.453226 |
62c5ddb0221a3c74f44fd39c8633939d6f1db70e | 1,717 | py | Python | yggdrasil/drivers/FunctionModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/FunctionModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/drivers/FunctionModelDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | from yggdrasil.drivers.InterpretedModelDriver import InterpretedModelDriver
class FunctionModelDriver(InterpretedModelDriver):
r"""Class that acts as a functional interface to input/output channels
that are not connected.
Args:
Attributes:
"""
executable_type = 'other'
language = 'funct... | 25.25 | 79 | 0.609202 |
62c5fb86e6045e0323c3fce8869a458ac4447d53 | 1,127 | py | Python | examples/wait_for_interrupt/test_wait_for_interrupt_visual.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 19 | 2020-04-18T14:47:37.000Z | 2022-03-26T14:18:21.000Z | examples/wait_for_interrupt/test_wait_for_interrupt_visual.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 4 | 2020-03-17T21:01:58.000Z | 2021-09-24T21:07:25.000Z | examples/wait_for_interrupt/test_wait_for_interrupt_visual.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 4 | 2020-05-09T16:31:57.000Z | 2022-01-23T09:11:19.000Z | import os
from tkinter import *
from casymda.visualization.canvas.tk_canvas import ScaledCanvasTk
from casymda.visualization.process_visualizer import ProcessVisualizer
from examples.wait_for_interrupt.model import Model
from simpy import Environment
FLOW_SPEED = 2 ** 20
def test_visualized_run():
if os.name !=... | 27.487805 | 88 | 0.715173 |
62c61b601339183d675d1f4951edeed41a19261a | 3,984 | py | Python | alipay/aop/api/request/AlipayCommerceAbntaskBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayCommerceAbntaskBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayCommerceAbntaskBatchqueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceAbntaskBatchqueryModel import AlipayCommerceAbntaskBatchqueryModel
class AlipayCommerceAbntaskBatchqueryRequest(object... | 27.475862 | 148 | 0.646084 |
62c63f5687a15d2712cb57e2372b18e5ecf1d3cd | 64,430 | py | Python | salt/daemons/masterapi.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/daemons/masterapi.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/daemons/masterapi.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
This module contains all of the routines needed to set up a master server, this
involves preparing the three listeners and the workers needed by the master.
'''
from __future__ import absolute_import
# Import python libs
import fnmatch
import logging
import os
import re
import time
import s... | 39.334554 | 173 | 0.504454 |
62c65aec7a6847d5582295d3d3aa53f38507d092 | 1,860 | py | Python | fabric_cf/actor/core/apis/abc_kernel_broker_reservation_mixin.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/actor/core/apis/abc_kernel_broker_reservation_mixin.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/core/apis/abc_kernel_broker_reservation_mixin.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 37.2 | 99 | 0.755376 |
62c6a7ae1476fec4f18d3691dbc2f23cc4801492 | 1,923 | py | Python | src/decisionengine_modules/tests/test_GCEFigureOfMerit_publisher.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T15:51:19.000Z | 2022-02-23T15:45:37.000Z | src/decisionengine_modules/tests/test_GCEFigureOfMerit_publisher.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 358 | 2020-03-02T20:06:38.000Z | 2022-03-28T20:39:01.000Z | src/decisionengine_modules/tests/test_GCEFigureOfMerit_publisher.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 34 | 2020-02-24T17:17:11.000Z | 2022-01-13T21:50:11.000Z | import pandas
from decisionengine_modules.GCE.publishers import GCEFigureOfMerit_publisher
config_fom_pub = {
"channel_name": "test",
"publish_to_graphite": True,
"graphite_host": "lsdataitb.fnal.gov",
"graphite_port": 2004,
"graphite_context": "hepcloud.de.gce",
"output_file": "/etc/decisione... | 39.244898 | 98 | 0.726469 |
62c70511f8e4fe0d9764a7c8f7d38b0ab3a3bb34 | 54,471 | py | Python | erp/schema.py | maxtastu/acceslibre | daba86a34ed619914780efbefaf4af5cb2f3a936 | [
"MIT"
] | null | null | null | erp/schema.py | maxtastu/acceslibre | daba86a34ed619914780efbefaf4af5cb2f3a936 | [
"MIT"
] | null | null | null | erp/schema.py | maxtastu/acceslibre | daba86a34ed619914780efbefaf4af5cb2f3a936 | [
"MIT"
] | null | null | null | from django.apps import apps
from django.utils.safestring import mark_safe
from core.lib import text
# This module describes and handles accessibility fields data
UNKNOWN = "Inconnu"
UNKNOWN_OR_NA = "Inconnu ou sans objet"
NULLABLE_BOOLEAN_CHOICES = (
(True, "Oui"),
(False, "Non"),
(None, UNKNOWN),
)
N... | 38.99141 | 400 | 0.621689 |
62c70fbd4dd1990a1151426895ed667c88dc7b19 | 1,020 | py | Python | AlgorithmsPractice/python/20_simple_Valid Parenthese.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | AlgorithmsPractice/python/20_simple_Valid Parenthese.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | AlgorithmsPractice/python/20_simple_Valid Parenthese.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | '''
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Note that an empty string is also considered valid.
Exa... | 18.888889 | 118 | 0.540196 |
62c7149792dad7cdbdc88c19b12b8ebfc03ba7d0 | 10,019 | py | Python | app_speciesobs/forms.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | app_speciesobs/forms.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | app_speciesobs/forms.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
from django import forms
import app_speciesobs.models as models
import urllib.parse
class Speci... | 60.355422 | 135 | 0.562332 |
62c714bbadbea8910bd5a597f5d13ac0a2f4965b | 8,616 | py | Python | tests/node_test.py | yyejun/Tron | a48995b925a04169d658fceada19c12fcc693270 | [
"Apache-2.0"
] | null | null | null | tests/node_test.py | yyejun/Tron | a48995b925a04169d658fceada19c12fcc693270 | [
"Apache-2.0"
] | null | null | null | tests/node_test.py | yyejun/Tron | a48995b925a04169d658fceada19c12fcc693270 | [
"Apache-2.0"
] | null | null | null | import mock
from testify import setup, TestCase, assert_equal, run
from testify import assert_in, assert_raises
from testify.assertions import assert_not_in, assert_not_equal
from testify import teardown, setup_teardown
from tests.testingutils import autospec_method
from tron import node, ssh, actioncommand
from tron.... | 35.751037 | 90 | 0.690808 |
62c72c2fd552cb50f07f2f970f01b2104c3d6a9b | 7,186 | py | Python | pytorch_widedeep/models/deep_dense_resnet.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/models/deep_dense_resnet.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/models/deep_dense_resnet.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | from collections import OrderedDict
import numpy as np
import torch
from torch import nn
from torch.nn import Module
from ..wdtypes import *
class BasicBlock(nn.Module):
def __init__(self, inp: int, out: int, dropout: float = 0.0, resize: Module = None):
super(BasicBlock, self).__init__()
self.... | 36.663265 | 104 | 0.591984 |
62c74e2e239e89f5e6a97db102bcd17840350647 | 357 | py | Python | Build/site_scons/site_tools/python_2.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Build/site_scons/site_tools/python_2.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Build/site_scons/site_tools/python_2.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | import python_common
_generate, _exists = python_common.DefinePythonToolFunctions(
range( 0x02040000, 0x03000000 ), __name__ )
# Define new functions so that we remain in any stack traces involving these functions
def generate( *args, **kwargs ): return _generate( *args, **kwargs )
def exists( *args, **kwargs )... | 44.625 | 86 | 0.742297 |
62c7a2f5625c1958b6b65f6e0135cf00a48904b8 | 1,012 | py | Python | dabl/tests/test_utils.py | ianozsvald/dabl | f558a8af204185e77e28f5c9a549574bb0cf1694 | [
"BSD-3-Clause"
] | 2 | 2020-08-02T06:08:54.000Z | 2021-03-02T19:59:28.000Z | dabl/tests/test_utils.py | ianozsvald/dabl | f558a8af204185e77e28f5c9a549574bb0cf1694 | [
"BSD-3-Clause"
] | null | null | null | dabl/tests/test_utils.py | ianozsvald/dabl | f558a8af204185e77e28f5c9a549574bb0cf1694 | [
"BSD-3-Clause"
] | null | null | null | import seaborn as sns
import pandas as pd
from sklearn.datasets import fetch_openml
from dabl.utils import data_df_from_bunch
from dabl.plot.utils import add_counts_to_yticklabels
def test_data_df_from_bunch():
data_bunch = fetch_openml('MiceProtein')
data = data_df_from_bunch(data_bunch)
assert len(data... | 34.896552 | 75 | 0.641304 |
62c7b2876fc54920aab4ba05e5aa028e51ce509c | 7,419 | py | Python | xskillscore/core/utils.py | aaronspring/xskillscore | a3fe8230ecaf83e2a8c7fa3cf2c2b448600d5331 | [
"Apache-2.0"
] | 81 | 2018-07-03T06:58:28.000Z | 2021-12-15T17:24:45.000Z | xskillscore/core/utils.py | aaronspring/xskillscore | a3fe8230ecaf83e2a8c7fa3cf2c2b448600d5331 | [
"Apache-2.0"
] | 200 | 2020-09-28T16:00:43.000Z | 2022-03-28T18:41:01.000Z | xskillscore/core/utils.py | aaronspring/xskillscore | a3fe8230ecaf83e2a8c7fa3cf2c2b448600d5331 | [
"Apache-2.0"
] | 36 | 2020-10-07T22:46:20.000Z | 2021-11-25T11:34:56.000Z | import contextlib
import warnings
import numpy as np
import xarray as xr
from xhistogram.xarray import histogram as xhist
__all__ = ["histogram"]
@contextlib.contextmanager
def suppress_warnings(msg=None):
"""Catch warnings with message msg. From
https://github.com/TheClimateCorporation/properscoring/blob/m... | 34.668224 | 103 | 0.615447 |
62c7be9107d1dee26d95679882b18e6db40235dd | 4,393 | py | Python | ml-agents/mlagents/trainers/tests/test_trainer_util.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 2 | 2021-08-10T21:39:09.000Z | 2021-08-11T09:46:03.000Z | ml-agents/mlagents/trainers/tests/test_trainer_util.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 1 | 2021-01-31T09:16:16.000Z | 2021-01-31T18:24:34.000Z | ml-agents/mlagents/trainers/tests/test_trainer_util.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 1 | 2021-01-31T09:02:17.000Z | 2021-01-31T09:02:17.000Z | import pytest
import io
import os
from unittest.mock import patch
from mlagents.trainers.trainer import TrainerFactory
from mlagents.trainers.cli_utils import load_config, _load_config
from mlagents.trainers.ppo.trainer import PPOTrainer
from mlagents.trainers.exception import TrainerConfigError, UnityTrainerException... | 31.833333 | 87 | 0.715912 |
62c7bee417e5157cb32a454b8db3d2dc03e56640 | 16,065 | py | Python | PyPoE/ui/shared/proxy_filter_model.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | 15 | 2017-09-19T05:40:42.000Z | 2021-04-23T00:59:24.000Z | PyPoE/ui/shared/proxy_filter_model.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | null | null | null | PyPoE/ui/shared/proxy_filter_model.py | Openarl/PyPoE | ab5377e3b16f1920d4d9ada443e1e9059715f0fb | [
"MIT"
] | 3 | 2018-02-14T00:02:09.000Z | 2020-07-26T15:18:55.000Z | """
Proxy Filter Model
Overview
===============================================================================
+----------+------------------------------------------------------------------+
| Path | PyPoE/ui/shared/proxy_filter_model.py |
+----------+----------------------------------... | 30.197368 | 103 | 0.549518 |
62c7ff7e06ab8f908ab63921203996ea486a909d | 8,863 | py | Python | admin_tests/spam/test_views.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | admin_tests/spam/test_views.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | admin_tests/spam/test_views.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | from django.db import transaction
from django.test import RequestFactory
from django.http import Http404
from django.utils import timezone
from nose import tools as nt
from datetime import timedelta
from website.project.model import Comment
from osf.models.admin_log_entry import AdminLogEntry
from admin.spam.forms im... | 39.566964 | 80 | 0.631163 |
62c80af7145c5aab44af8c915a4014af1b84da0f | 196 | py | Python | appcli/templates/__init__.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 2 | 2019-12-06T00:17:07.000Z | 2021-07-23T10:52:34.000Z | appcli/templates/__init__.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 172 | 2019-10-10T04:04:31.000Z | 2022-03-28T03:37:52.000Z | appcli/templates/__init__.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 6 | 2019-10-04T02:56:35.000Z | 2021-05-07T02:10:27.000Z | # This __init__.py is required because `importlib.resources` can only fetch resource files from within a regular package
# See https://realpython.com/python-import/#introducing-importlibresources
| 65.333333 | 120 | 0.821429 |
62c82ba181ff08e31222f473fe70279e11a5dcd5 | 242 | py | Python | robotpy_ext/misc/annotations.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-20T02:56:17.000Z | 2020-03-17T04:44:12.000Z | robotpy_ext/misc/annotations.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 107 | 2015-01-26T23:47:10.000Z | 2022-03-16T13:57:36.000Z | robotpy_ext/misc/annotations.py | M-Shadow/robotpy-wpilib-utilities | ba95d45041e00842afadaedd2f3cbf2a3ac9cdf7 | [
"MIT",
"BSD-3-Clause"
] | 21 | 2016-01-01T01:44:40.000Z | 2022-03-15T18:00:35.000Z | def get_class_annotations(cls):
"""Get variable annotations in a class, inheriting from superclasses."""
result = {}
for base in reversed(cls.__mro__):
result.update(getattr(base, "__annotations__", {}))
return result
| 34.571429 | 76 | 0.68595 |
62c8a2089f21c93ec727f625a14c2f6e4156aa40 | 2,643 | py | Python | penne.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | null | null | null | penne.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | null | null | null | penne.py | tgillet1/PASTA | 454d7b4595d9ed28ae40c8629d33d7403c579020 | [
"MIT"
] | 1 | 2021-09-28T12:11:30.000Z | 2021-09-28T12:11:30.000Z | '''
Performs multiple sequence alignment (MSA) given a list of
user-provided input sequences as a FASTA file.
'''
from parameter import MultipleAlignmentArgumentValidator, MultipleAlignmentCommandParser, InputWrapperState
from pairwise import PairwiseDriver
from msa import MultipleSequenceDriver, ConsensusFilterFacto... | 38.867647 | 108 | 0.667045 |
62c8bab2a95a266543782026b8bbdcc82e636ca6 | 3,321 | py | Python | code/part_b/db5_ninapro/vgg19db5_test_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 3 | 2019-08-22T11:24:09.000Z | 2020-06-09T07:16:45.000Z | code/part_b/db5_ninapro/vgg19db5_test_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 1 | 2019-08-24T06:25:24.000Z | 2019-08-24T06:25:24.000Z | code/part_b/db5_ninapro/vgg19db5_test_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 1 | 2020-05-25T02:21:35.000Z | 2020-05-25T02:21:35.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
"""Make prediction and compute confusion matrix for modified input data"""
"""PART B1 : Zero electrode column of emg data"""
import numpy as np
import tensorflow as tf
import random
import os
os.environ['PYTHONHASHSEED'] = '0'
# The below is necessa... | 27.675 | 93 | 0.718759 |
62c8bbe91d45cdd2204b636e8875fc36d5465649 | 4,219 | py | Python | rbac/common/user/confirm_manager.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/user/confirm_manager.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/user/confirm_manager.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 37.336283 | 87 | 0.659398 |
62c8d8e168391082f767a5e9f24e2140516635f2 | 4,723 | py | Python | syft/generic/tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/tensor.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | from typing import List
import weakref
import syft as sy
from syft.generic.frameworks.types import FrameworkTensorType
from syft.generic.object import AbstractObject
class AbstractTensor(AbstractObject):
def __init__(
self,
id: int = None,
owner: "sy.workers.AbstractWorker" = None,
... | 31.912162 | 91 | 0.616981 |
62c8ed8eb09c36a7d801a92411b6d6b5731091bc | 3,873 | py | Python | backend/volontulo_org/settings/base.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | backend/volontulo_org/settings/base.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | backend/volontulo_org/settings/base.py | ponycalypsenow/volontulo | 8f7886aa3c8ea5ec0ca84711a089bea60fb69598 | [
"MIT"
] | null | null | null | """
Django settings for volontulo_org project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build ... | 25.993289 | 71 | 0.703073 |
62c8f4c231808aebbed7f6a6c662b71a059b0f44 | 2,242 | py | Python | mlapp/integrations/aml/scripts/publish_multisteps_pipeline.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 33 | 2021-02-26T10:41:09.000Z | 2021-11-07T12:35:32.000Z | mlapp/integrations/aml/scripts/publish_multisteps_pipeline.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 17 | 2021-03-04T15:37:21.000Z | 2021-04-06T12:00:13.000Z | mlapp/integrations/aml/scripts/publish_multisteps_pipeline.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 9 | 2021-03-03T20:02:41.000Z | 2021-10-05T13:03:56.000Z | from azureml.data.data_reference import DataReference
from azureml.pipeline.core import PipelineData
from mlapp.integrations.aml.utils.compute import get_or_create_compute_target
from mlapp.integrations.aml.utils.constants import OUTPUT_PATH_ON_COMPUTE, DATA_REFERENCE_NAME
from mlapp.integrations.aml.utils.pipeline im... | 35.03125 | 103 | 0.654326 |
62c8f82293b0b5505ed1c2db060ea0783286a9d9 | 2,222 | py | Python | tools/reval.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | tools/reval.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | tools/reval.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
# Reval = re-eval. Re-evaluate saved detections.... | 30.438356 | 76 | 0.619712 |
62c92960758bf96be9b89951082ee41b4e49221e | 1,574 | py | Python | tests/sats/test_semantic_tableau.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | tests/sats/test_semantic_tableau.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | tests/sats/test_semantic_tableau.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | import unittest
from allocation.sats.semantic_tableau import SemanticTableauSAT
from allocation.entities.formula import Atom, Not, And, Or, Implies
class SemanticTableauTestCase(unittest.TestCase):
def setUp(self) -> None:
self.sat = SemanticTableauSAT
def test_for_premises_that_contain_complementar... | 33.489362 | 98 | 0.538755 |
62c9a62cd56a85fa21ba814c6684a8dfbff9219c | 6,219 | py | Python | src/python/zensols/garmdown/domain.py | garmin-data/garmdown | 5f466ebb0b9450890d5fc75336ccafa3654a9464 | [
"MIT"
] | 14 | 2020-01-13T10:39:35.000Z | 2021-12-19T13:17:46.000Z | src/python/zensols/garmdown/domain.py | garmin-data/garmdown | 5f466ebb0b9450890d5fc75336ccafa3654a9464 | [
"MIT"
] | 4 | 2020-02-28T08:39:17.000Z | 2021-02-28T19:05:06.000Z | src/python/zensols/garmdown/domain.py | garmin-data/garmdown | 5f466ebb0b9450890d5fc75336ccafa3654a9464 | [
"MIT"
] | 6 | 2020-04-22T06:12:07.000Z | 2022-01-02T13:25:24.000Z | import sys
import itertools as it
from datetime import datetime
class Activity(object):
def __init__(self, raw, type_char):
self.id = str(raw['activityId'])
self.raw = raw
self.type_char = type_char
@staticmethod
def type_from_raw(raw):
return raw['activityType']['typeKey'... | 26.240506 | 79 | 0.626789 |
62c9ca9c58b2eb5b58aa4bbb4ce946527dced301 | 5,073 | py | Python | oslo_reports/tests/test_base_report.py | openstack/oslo.reports | 6da73410506972830d7d24ab405cb8a1a9740116 | [
"Apache-2.0"
] | 21 | 2015-06-23T08:06:36.000Z | 2021-04-24T19:16:46.000Z | oslo_reports/tests/test_base_report.py | openstack/oslo.reports | 6da73410506972830d7d24ab405cb8a1a9740116 | [
"Apache-2.0"
] | null | null | null | oslo_reports/tests/test_base_report.py | openstack/oslo.reports | 6da73410506972830d7d24ab405cb8a1a9740116 | [
"Apache-2.0"
] | 7 | 2015-07-02T13:48:34.000Z | 2020-02-04T15:51:39.000Z | # Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 34.277027 | 78 | 0.610093 |
62c9dbf1ffc52e8249a920d14639f22f1f2a6841 | 2,800 | py | Python | NetIntrusionDectectionLib/setup.py | felixmol/IDS-IPS | b2cec2090c60f6f12892d7c089327c1fbb78978b | [
"MIT"
] | 4 | 2019-10-24T09:39:26.000Z | 2020-10-18T08:45:52.000Z | NetIntrusionDectectionLib/setup.py | felixmol/IDS-IPS | b2cec2090c60f6f12892d7c089327c1fbb78978b | [
"MIT"
] | null | null | null | NetIntrusionDectectionLib/setup.py | felixmol/IDS-IPS | b2cec2090c60f6f12892d7c089327c1fbb78978b | [
"MIT"
] | 3 | 2019-07-28T02:32:35.000Z | 2020-09-30T20:13:13.000Z | # -*- coding: utf-8 -*-
#
# !/usr/bin/env python3
#
# setup Copyright(c) 2018-2019 Félix Molina.
#
# Many thanks to Télécom SudParis (http://www.telecom-sudparis.eu)
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | 52.830189 | 120 | 0.723929 |
62c9df36a14057df389b44a7c0cd7c79300b59bf | 374 | py | Python | Exercicios do curso em video/pythonProject/pythonexercicios/ex007.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex007.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex007.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | print('--------------------------------------------------')
aluno = str(input('Nome do aluno: '))
nota = float(input('Insira a primeira nota: '))
nota2 = float(input('Insira a segunda nota: '))
print('---------------------------------------------------')
print('A média de', aluno, 'é {}'.format((nota+nota2)/2))
print('... | 46.75 | 60 | 0.374332 |
62c9e7936eba9a60b2848b98807fb8222c02b052 | 63 | py | Python | test_sample.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 3 | 2016-01-19T17:54:51.000Z | 2019-10-21T12:09:03.000Z | test_sample.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | null | null | null | test_sample.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 5 | 2015-02-19T02:53:24.000Z | 2019-03-05T20:29:12.000Z | def f():
return 3
def test_function():
assert f() == 4 | 12.6 | 20 | 0.555556 |
62c9ef28504e02e8904022c79314f4c47da39a41 | 793 | py | Python | dbgr/environment.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 8 | 2019-05-23T19:45:46.000Z | 2021-02-08T17:21:21.000Z | dbgr/environment.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 86 | 2019-05-13T14:20:20.000Z | 2019-06-19T11:48:59.000Z | dbgr/environment.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 1 | 2021-02-08T17:21:22.000Z | 2021-02-08T17:21:22.000Z | import os
import glob
from configparser import ConfigParser, ExtendedInterpolation
_ENVIRONMENT = None
DEFAULT_ENVIRONMENT = 'default'
def get_environments():
environments = []
for env_file in glob.glob(f'{os.getcwd()}/*.ini'):
environments.append(os.path.splitext(os.path.basename(env_file))[0])
r... | 25.580645 | 76 | 0.7314 |
62c9f5d5c534e9283acc1db4657190dc4b0adfa0 | 2,114 | py | Python | ngsutils/ngs/repeat2fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/ngs/repeat2fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/ngs/repeat2fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
## category Conversion
## desc Converts Repeatmasker.org formatted regions to FASTA
'''
Takes a repeat-masker formated output file and converts it to FASTA format.
It will optionally only output specific classes of repeats (rRNA, tRNA,
simple repeats, etc...)
'''
import sys
import os
import gzip
... | 25.166667 | 98 | 0.567171 |
62ca040010227c5dfd65401ca736f2552505e431 | 5,928 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/rest/header/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/rest/header/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/rest/header/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 58.693069 | 94 | 0.803138 |
62ca05e9348ea73550b41f39931e5769dac25506 | 1,108 | py | Python | attitude/__dustbin/statistical_distances.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 8 | 2015-03-24T09:08:32.000Z | 2021-05-17T03:32:01.000Z | attitude/__dustbin/statistical_distances.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 3 | 2018-03-16T07:38:26.000Z | 2022-02-15T06:07:54.000Z | attitude/__dustbin/statistical_distances.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | null | null | null | """
Functions to test implementations of the statistical distance between two
orientation measurements. This will lead us to a quantification of the distance
between two uncertain orientation measurements.
"""
from __future__ import division
import numpy as N
import pytest
from .test_pca import random_pca
from ..geom.... | 27.7 | 85 | 0.706679 |
62ca2ceb135348fc8c2e220097c61fc3128442fd | 1,033 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/sole_tenancy/hosts/describe.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/sole_tenancy/hosts/describe.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/sole_tenancy/hosts/describe.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 32.28125 | 74 | 0.757986 |
62ca67c03efd56db7533e88f1a44bfde9354e017 | 5,909 | py | Python | city_scrapers/spiders/chi_school_actions.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | city_scrapers/spiders/chi_school_actions.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | city_scrapers/spiders/chi_school_actions.py | noahkconley/city-scrapers | 37420ce3a9295c2aac68c0fb4a957ad41394a801 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import itertools
from datetime import datetime
from city_scrapers.spider import Spider
class ChiSchoolActionsSpider(Spider):
name = 'chi_school_actions'
agency_id = 'Chicago Public Schools'
long_name = 'Chicago Public Schools: School Actions'
timezone = 'America/Chicago'
a... | 35.812121 | 114 | 0.544255 |
62cacde30366872787ff68f66a74001afd802f03 | 7,167 | py | Python | clients/client/python/ory_client/model/admin_create_self_service_recovery_link_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/admin_create_self_service_recovery_link_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/admin_create_self_service_recovery_link_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.17
Contact: support@ory.sh
Generated by: htt... | 40.039106 | 211 | 0.587694 |
62cace0024e9907dfe4b482b5cea269f717c2d4e | 18,019 | py | Python | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/view3d.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/view3d.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/view3d.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def background_image_add(name="Image",
filepath="",
filter_blender=False,
filter_backup=False,
filter_image=True,
filter_movie=True,
filter_python=False,
... | 25.166201 | 298 | 0.642988 |
62cacf0566ffcd25fa4f8f3ea9e118e328e7e48e | 2,535 | py | Python | uicomponents/upsidedown.py | homecoder/pythonista_snippets | abfa43d1ef99aab41e1fcfbb0e60083b07c911a6 | [
"MIT"
] | null | null | null | uicomponents/upsidedown.py | homecoder/pythonista_snippets | abfa43d1ef99aab41e1fcfbb0e60083b07c911a6 | [
"MIT"
] | null | null | null | uicomponents/upsidedown.py | homecoder/pythonista_snippets | abfa43d1ef99aab41e1fcfbb0e60083b07c911a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# https://gist.github.com/omz/f3886441053d0ea79f39
# Updated to work on python2/3
import ui
import sys
# Mapping based on http://www.upsidedowntext.com/unicode
CHARMAP = {
'!': b'\xc2\xa1',
'"': b',,',
"'": b',',
'&': b'\xe2\x85\x8b',
')': b'(',
'(': b')',
',': b"'... | 20.28 | 82 | 0.446943 |
62cad47ddc03be79490e87b2245c98fa91bd87df | 13,087 | py | Python | publication_backbone/views/mixins.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/views/mixins.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/views/mixins.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
import json
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateResponseMixin
from django.views.generic.edit import FormMix... | 39.065672 | 117 | 0.597157 |
62cae1a7db516d3837d5fb31e16e580113ac1cf1 | 587 | py | Python | libweasyl/libweasyl/alembic/versions/571762845c10_index_critique_requests.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 111 | 2016-05-18T04:18:18.000Z | 2021-11-03T02:05:19.000Z | libweasyl/libweasyl/alembic/versions/571762845c10_index_critique_requests.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 1,103 | 2016-05-29T05:17:53.000Z | 2022-03-31T18:12:40.000Z | libweasyl/libweasyl/alembic/versions/571762845c10_index_critique_requests.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 47 | 2016-05-29T20:48:37.000Z | 2021-11-12T09:40:40.000Z | """Index critique requests
Revision ID: 571762845c10
Revises: e2bedd00b085
Create Date: 2021-08-09 05:05:25.910797
"""
# revision identifiers, used by Alembic.
revision = '571762845c10'
down_revision = 'e2bedd00b085'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_index('ind_submission... | 25.521739 | 150 | 0.771721 |
62cae81a05ba89d4ab1eb3afcd2a90db82ba5a60 | 2,521 | py | Python | superset/db_engines/hive.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2017-11-01T06:00:12.000Z | 2019-01-05T13:31:48.000Z | superset/db_engines/hive.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 19 | 2020-03-24T17:17:37.000Z | 2022-03-29T22:28:09.000Z | superset/db_engines/hive.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 3 | 2020-04-15T16:34:09.000Z | 2020-06-22T17:26:45.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 42.016667 | 80 | 0.684252 |
62cb0477a7fabf237149a22650f98ca0699216aa | 14,665 | py | Python | Python/find_polygonal.py | robertson809/thesis | 6070fbdef8e91ab82dbd89dfa796ad718c2447e0 | [
"MIT"
] | 1 | 2021-10-04T23:54:48.000Z | 2021-10-04T23:54:48.000Z | Python/find_polygonal.py | robertson809/thesis | 6070fbdef8e91ab82dbd89dfa796ad718c2447e0 | [
"MIT"
] | null | null | null | Python/find_polygonal.py | robertson809/thesis | 6070fbdef8e91ab82dbd89dfa796ad718c2447e0 | [
"MIT"
] | null | null | null | # Polygonal Graphs
#
# This module finds graphs with polygonal numerical range
#
# Author: Michael D. Robertson and Thomas R. Cameron
# Date: 3/16/2020
import numpy as np
import networkx as nx
import warnings
import time
from math import pi as pi
from matplotlib import pyplot as plt
import sys
warnings.filterwarnings... | 35.59466 | 123 | 0.602318 |
62cb138ab8434546f4c4505b4dd23e160c735931 | 9,491 | py | Python | doc/conf.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | 7 | 2019-11-08T00:31:05.000Z | 2021-06-14T13:44:22.000Z | doc/conf.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | 16 | 2019-09-16T21:38:43.000Z | 2021-06-04T16:09:31.000Z | doc/conf.py | ratan-lab/sumo | 61fd9513ed486f255906ee800d2825a8d89ddfac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# sumo documentation build configuration file.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are comment... | 32.954861 | 79 | 0.707512 |
62cb1d76e003f14d308faa519141702e43351813 | 12,791 | py | Python | azure/multiapi/storage/v2017_04_17/common/_deserialization.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | azure/multiapi/storage/v2017_04_17/common/_deserialization.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | azure/multiapi/storage/v2017_04_17/common/_deserialization.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apa... | 36.030986 | 133 | 0.66023 |
62cb2b0951a200a40c56c2db4d650b8566f191d9 | 126,958 | py | Python | mrcnn/model.py | Tauffer-Consulting/Mask_RCNN | a421160f5a337a72548b78a5064095c71791e0a1 | [
"MIT"
] | 23,299 | 2017-11-01T23:43:28.000Z | 2022-03-31T07:09:31.000Z | mrcnn/model.py | Tauffer-Consulting/Mask_RCNN | a421160f5a337a72548b78a5064095c71791e0a1 | [
"MIT"
] | 2,642 | 2017-11-01T23:55:06.000Z | 2022-03-31T06:06:30.000Z | mrcnn/model.py | Tauffer-Consulting/Mask_RCNN | a421160f5a337a72548b78a5064095c71791e0a1 | [
"MIT"
] | 11,244 | 2017-11-02T00:04:58.000Z | 2022-03-31T02:36:09.000Z | """
Mask R-CNN
The main Mask R-CNN model implementation.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import random
import datetime
import re
import math
import logging
from collections import OrderedDict
import multiprocessing
im... | 44.251656 | 115 | 0.612069 |
62cb412d6e410d95fc21313d37f7f83534aafe2a | 47,304 | py | Python | nova/tests/api/openstack/compute/plugins/v3/test_server_actions.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/plugins/v3/test_server_actions.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/plugins/v3/test_server_actions.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 38.364964 | 79 | 0.58179 |
62cb6301420ffbaa819a9718d0b00fcb1d93736f | 1,727 | py | Python | libs/libdata_ci/tests/test_use_data.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | 3 | 2021-12-04T09:03:06.000Z | 2022-01-10T07:30:15.000Z | libs/libdata_ci/tests/test_use_data.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | 1 | 2021-12-04T08:59:00.000Z | 2021-12-07T11:20:18.000Z | libs/libdata_ci/tests/test_use_data.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | null | null | null | from libdata_ci.api import (
use_data,
use_json_data,
)
data_simple_2_kwargs = (
{
'input_obj': 'hello',
'expect': 'world',
},
{
'input_obj': 'hello',
'expect': 666,
},
)
def test_basic_func():
got = []
@use_data(data_simple_2_kwargs)
def merge(in... | 18.178947 | 78 | 0.543717 |
62cba64ea9b47f6aefba9efe25a1d60afb28dc79 | 33,534 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/operations/_file_shares_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/operations/_file_shares_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/operations/_file_shares_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.181818 | 222 | 0.673078 |
62cbc5409ce3a51eb9251218e3f9564b80bab571 | 7,909 | py | Python | bookr/reviews/views.py | paxcodes/bookr | 185e2ec71da53ef8816edd90a76cc71e40b41e24 | [
"MIT"
] | null | null | null | bookr/reviews/views.py | paxcodes/bookr | 185e2ec71da53ef8816edd90a76cc71e40b41e24 | [
"MIT"
] | null | null | null | bookr/reviews/views.py | paxcodes/bookr | 185e2ec71da53ef8816edd90a76cc71e40b41e24 | [
"MIT"
] | null | null | null | from io import BytesIO
from django.core.exceptions import PermissionDenied
from django.core.files.images import ImageFile
from django.shortcuts import get_object_or_404, render, redirect
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test, login_required
from django.utils im... | 36.957944 | 90 | 0.632697 |
62cbe87353024aef482988fe267da4573bc2caa3 | 1,775 | py | Python | Exceptions.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | null | null | null | Exceptions.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | 7 | 2020-03-24T15:56:02.000Z | 2021-10-12T22:14:28.000Z | Exceptions.py | Hammer-Inc/csit_student_signup | 826bc7e49bdb20497f52628250fbcf8ec01ce969 | [
"MIT"
] | null | null | null | import json
# from Types import TextField
class BadBoundingException(Exception):
STR_MESSAGE = "One or more bounding boxes returned by third party client contained errors"
def __init__(self, invalid_field: json):
super().__init__(json.dumps({
"message": self.STR_MESSAGE,
"er... | 28.174603 | 94 | 0.651268 |
62cc2228d9462bfbd5e97f98847060731bb5fdce | 123 | py | Python | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex01.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex01.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/python/learnpythonthehardway/ex01.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | # -*- coding: utf-8 -*-
# first program
print 'anything and everything'
print 'nothing and something'
print 1,2,3,4,5,6,7
| 17.571429 | 31 | 0.682927 |
62cc22e46de56b99cb0d5fd7b4d05b08143f1cd9 | 5,430 | py | Python | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/base.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# htt... | 36.938776 | 79 | 0.667956 |
62cc4dd39859169ddb6ef59cfdf2c845b21f7549 | 626 | py | Python | tests/mixins.py | limedaniel/django-dynamic-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 11 | 2016-05-18T18:02:25.000Z | 2019-08-21T09:10:34.000Z | tests/mixins.py | limedaniel/django-dynamic-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 16 | 2016-05-18T06:31:56.000Z | 2020-12-30T16:38:10.000Z | tests/mixins.py | Peter-Slump/django-factory-boy-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 7 | 2017-04-22T18:30:37.000Z | 2021-12-22T11:14:38.000Z | from unittest import mock
class MockTestCaseMixin(object):
def __init__(self, *args, **kwargs):
self._mocks = {}
super(MockTestCaseMixin, self).__init__(*args, **kwargs)
def setup_mock(self, target, autospec=True, **kwargs):
if target in self._mocks:
raise Exception("Targ... | 27.217391 | 77 | 0.640575 |
62cc75602772d6ca98d05e0bb48d24b60ed3a31b | 40,485 | py | Python | mesonbuild/backend/backends.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/backend/backends.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | mesonbuild/backend/backends.py | felipeborges/meson | 74ae71903370da0f7cd0049af8dd83f0afd68bf8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2016 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | 47.629412 | 124 | 0.605805 |
62cc8b142ad814356fd06e66c77f8ef39be50479 | 296 | py | Python | tests/test_deep/__init__.py | mehulrastogi/genrl | 589a3619497b38eaa376168c78b9f84d4ff434e5 | [
"MIT"
] | 1 | 2020-06-13T15:21:57.000Z | 2020-06-13T15:21:57.000Z | tests/test_deep/__init__.py | mehulrastogi/genrl | 589a3619497b38eaa376168c78b9f84d4ff434e5 | [
"MIT"
] | 3 | 2020-08-21T08:58:44.000Z | 2020-09-01T11:22:38.000Z | tests/test_deep/__init__.py | mehulrastogi/genrl | 589a3619497b38eaa376168c78b9f84d4ff434e5 | [
"MIT"
] | 2 | 2020-06-13T15:29:06.000Z | 2021-08-20T15:48:53.000Z | from tests.test_deep.test_agents import (
test_a2c,
test_ddpg,
test_dqn,
test_dqn_cnn,
test_ppo1,
test_sac,
test_td3,
test_vpg,
)
from tests.test_deep.test_common import (
TestUtils,
test_loggers,
test_off_policy_trainer,
test_on_policy_trainer,
)
| 17.411765 | 41 | 0.695946 |
62ccab247da89bcc07e734852657cc17aab9da0f | 1,356 | py | Python | main/c2g/routers.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | main/c2g/routers.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | main/c2g/routers.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | class CeleryDBRouter(object):
"""
A router to control all database operations on models in the
djcelery application.
"""
def db_for_read(self, model, **hints):
"""
Attempts to read djcelery models go to celery.
"""
if model._meta.app_label == 'djcelery':
... | 33.073171 | 87 | 0.550147 |
62ccb722587f504fae5c77de58a048081bfa845e | 17,644 | py | Python | applications/tensorflow/cnns/training/inception_v1/inception_v1_ipu_input.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/inception_v1/inception_v1_ipu_input.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/inception_v1/inception_v1_ipu_input.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 48.472527 | 142 | 0.640841 |
62ccd4de37773c875478fe1b041a4f2ca28b9a73 | 2,371 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/27_ext_russ4/predict_4fold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/27_ext_russ4/predict_4fold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/27_ext_russ4/predict_4fold.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
#os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
from tqdm import tqdm
import numpy as np
import pandas as pd
eps = 0.004
desired = {
0: 0.36239782,
1: 0.043841336,
2: 0.075268817,
3: 0.059322034,
4: 0... | 25.223404 | 86 | 0.660903 |
62ccd6f18c9ba90763afd79443482fef6b9f29b8 | 16,631 | py | Python | test/ops/test_subset.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | test/ops/test_subset.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | null | null | null | test/ops/test_subset.py | TomBlock/cate | 3924300a9d85f09fd40bc67b9f8a220230788d1c | [
"MIT"
] | 1 | 2019-02-14T13:49:37.000Z | 2019-02-14T13:49:37.000Z | """
Tests for subsetting operations
"""
from datetime import datetime
from unittest import TestCase
import numpy as np
import xarray as xr
from cate.core.op import OP_REGISTRY
from cate.ops import subset
from cate.util.misc import object_to_qualified_name
def assert_dataset_equal(expected, actual):
# this meth... | 46.585434 | 108 | 0.522759 |
62cce00048922f3ea650a0c8807355d29becbaa3 | 3,243 | py | Python | src/forecastga/models/__init__.py | richardfergie/ForecastGA | ce4ddc778d0be68f504e1bfc300be6b2fe870cb7 | [
"MIT"
] | null | null | null | src/forecastga/models/__init__.py | richardfergie/ForecastGA | ce4ddc778d0be68f504e1bfc300be6b2fe870cb7 | [
"MIT"
] | null | null | null | src/forecastga/models/__init__.py | richardfergie/ForecastGA | ce4ddc778d0be68f504e1bfc300be6b2fe870cb7 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding: utf-8
#
""" ForecastGA: Models """
MODELS = {
"ARIMA": {
"name": "ARIMA",
"description": "Automated ARIMA Modelling",
"loc": "forecastga.models.arima",
"class": "ARIMA_Model",
"status": "active",
},
"Prophet": {
"name": "Proph... | 30.59434 | 98 | 0.53284 |
62ccf6f86b7a427823f31774547c8a814fbfd747 | 1,144 | py | Python | src/Chap11_Problem.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | src/Chap11_Problem.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | src/Chap11_Problem.py | falconlee236/CodingTheMatrix-Answer | 4fab8087bde352913da71c8d86b802a93231b1b5 | [
"MIT"
] | null | null | null | from mat import Mat
from vec import Vec
from math import sqrt
print("# Problem 11.11.1")
# Problem 11.11.1
def orthogonal_vec2rep(Q, b):
return Q * b
Q = Mat((set(range(3)), set(range(3))), {(0, 0): 1/sqrt(2), (0, 1): 1/sqrt(2),
(1, 0): 1/sqrt(3), (1, 1): -1/sqrt(3), (... | 19.724138 | 99 | 0.497378 |
62cd12c2599cd55fc3c4fd087f3a3650c6ce3e36 | 13,273 | py | Python | contracts/tests/test_contract.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | contracts/tests/test_contract.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | 1 | 2021-06-10T23:13:04.000Z | 2021-06-10T23:13:04.000Z | contracts/tests/test_contract.py | connectthefuture/calc | 7f0dc01d9265f26a36c2b9b5ee779fe876e4a494 | [
"CC0-1.0"
] | null | null | null | import datetime
from decimal import Decimal
from itertools import cycle
from django.test import TestCase
from contracts.mommy_recipes import get_contract_recipe
from ..models import Contract, convert_to_tsquery
class ContractTestCase(TestCase):
def make_contract_with_rates(self, **kwargs):
final_kwargs ... | 40.099698 | 78 | 0.656069 |
62cd696d25c0af49f2d3e6d84c0d5e3cd8f1bee5 | 9,000 | py | Python | aea/helpers/exec_timeout.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | aea/helpers/exec_timeout.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | aea/helpers/exec_timeout.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 32.490975 | 98 | 0.643667 |
62cd6a3d43270ce5f0ffa9164c2684ff0a40cce6 | 4,631 | py | Python | autotest/gdrivers/bsb.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/bsb.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/bsb.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: BSB Testing.
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
##############################################################################... | 29.685897 | 91 | 0.578709 |
62cd6fbdccc144995a157603643c68222c7a46ce | 2,003 | py | Python | tensorbay/opendataset/__init__.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | tensorbay/opendataset/__init__.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | tensorbay/opendataset/__init__.py | YiweiLi4/tensorbay-python-sdk | 20fc8b37bad01c2d201a87b1436f1d4ff77d76df | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
"""OpenDataset dataloader collections."""
from .AnimalPose import AnimalPose5, AnimalPose7
from .AnimalsWithAttributes2 import AnimalsWithAttributes2
from .BioIDFace import BioIDFace
from .BSTLD import BSTLD
from .CADC import CADC
from .... | 25.35443 | 68 | 0.751373 |
62cd9f095d2957e02179fcb1e7ca5988431fe205 | 548 | py | Python | cinema_environment/server_monolith/server_app/migrations/0016_ticket_timeline_id.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/server_monolith/server_app/migrations/0016_ticket_timeline_id.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/server_monolith/server_app/migrations/0016_ticket_timeline_id.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.2 on 2020-02-27 19:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('server_app', '0015_timeline_price'),
]
operations = [
migrations.AddField(
model_name='ticket',... | 26.095238 | 141 | 0.64781 |
62cdae45e913be5f0d48125aafdf389533726b23 | 918 | py | Python | commands.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 8 | 2016-05-31T09:54:15.000Z | 2021-08-13T13:25:01.000Z | commands.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | null | null | null | commands.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 10 | 2015-01-07T06:45:44.000Z | 2021-06-21T08:41:57.000Z | from os import getpid, kill, wait
from signal import SIGINT
from djcelery.management.commands import celeryd_detach
from settings import CELERY_PID_FILENAME, CELERY_LOG_FILENAME
from django.core.management import call_command
from StringIO import StringIO
def restart_django():
pid = getpid()
kill(pid, SIGINT)
... | 27.818182 | 79 | 0.696078 |
62cdcd9835df886d5544ae58b4bfb697f23d9b38 | 2,561 | py | Python | glue/core/data_factories/pandas.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | glue/core/data_factories/pandas.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | glue/core/data_factories/pandas.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import numpy as np
from ..data import Data, Component, CategoricalComponent
from .helpers import has_extension, __factories__
__all__ = ['pandas_read_table']
def panda_process(indf):
"""
Build a data set from a table using pandas. This attem... | 30.129412 | 81 | 0.625537 |
62cddefee9b50eca5ca7cff95040af2beb1c24f3 | 1,135 | py | Python | superset/migrations/versions/46ba6aaaac97_.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/46ba6aaaac97_.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/46ba6aaaac97_.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 29.102564 | 62 | 0.757709 |
62ce3edb3c32057b301e38522f79381c76c20a2d | 1,691 | py | Python | examples/mnist_cnn_fgsm.py | yalechang/adversarial-robustness-toolbox | df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57 | [
"MIT"
] | 1 | 2022-03-02T19:05:12.000Z | 2022-03-02T19:05:12.000Z | examples/mnist_cnn_fgsm.py | yalechang/adversarial-robustness-toolbox | df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57 | [
"MIT"
] | null | null | null | examples/mnist_cnn_fgsm.py | yalechang/adversarial-robustness-toolbox | df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Trains a convolutional neural network on the MNIST dataset, then attacks it with the FGSM attack.
With 5 epochs of training, gets to 98.89% accuracy on the test data and 65.40% on the adversarial examples.
"""
from __future__ import absolute_import, division, print_function
from os.path imp... | 35.229167 | 107 | 0.745713 |
62ce449065b56f26755cd976c84d226e754319fd | 46,373 | py | Python | src/cell_mrcnn/utils.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | src/cell_mrcnn/utils.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | src/cell_mrcnn/utils.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | """
Mask R-CNN
Common utility functions and classes.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import sys
import os
from glob import glob
from os.path import split, join, expanduser
import logging
import math
import random
import numpy a... | 36.803968 | 99 | 0.605115 |
62ce4b3cc3cfd202ed21860eb34b280caa97a752 | 24,256 | py | Python | src/main_vis.py | BrandonGower-Winter/PredEgyptABM | 2ed57db0525fea6f3e5eca8c63c4bf632116b724 | [
"MIT"
] | null | null | null | src/main_vis.py | BrandonGower-Winter/PredEgyptABM | 2ed57db0525fea6f3e5eca8c63c4bf632116b724 | [
"MIT"
] | null | null | null | src/main_vis.py | BrandonGower-Winter/PredEgyptABM | 2ed57db0525fea6f3e5eca8c63c4bf632116b724 | [
"MIT"
] | null | null | null | # Note! This script will only work if the agents have the same attributes
import math
import Animate
import json
import numpy as np
import os
import pandas
import statistics
import matplotlib.pyplot as plt
from ECAgent.Environments import discreteGridPosToID
from CythonFunctions import CAgentUtilityFunctions
def ge... | 38.501587 | 136 | 0.579032 |
62ce5532704e832768811705ad1280d14c2d6d99 | 814 | py | Python | ir_test2.py | s-light/photobooth_flash_and_trigger | 6cbe17ce6cda7a705fd6a36d8f47815cf8440118 | [
"MIT"
] | 1 | 2021-03-31T04:52:14.000Z | 2021-03-31T04:52:14.000Z | ir_test2.py | s-light/photobooth_flash_and_trigger | 6cbe17ce6cda7a705fd6a36d8f47815cf8440118 | [
"MIT"
] | null | null | null | ir_test2.py | s-light/photobooth_flash_and_trigger | 6cbe17ce6cda7a705fd6a36d8f47815cf8440118 | [
"MIT"
] | null | null | null | # Circuit Playground Express Demo Code
# Adjust the pulseio 'board.PIN' if using something else
import pulseio
import board
import adafruit_irremote
pulsein = pulseio.PulseIn(board.D7, maxlen=120, idle_state=True)
decoder = adafruit_irremote.GenericDecode()
# size must match what you are decoding! for NEC use 4
receiv... | 33.916667 | 75 | 0.690418 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.