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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d54785d13ef6a7ecb0401dfbc2831b0333a7f0ba | 3,334 | py | Python | dragons/core/cmdinfo.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | dragons/core/cmdinfo.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | dragons/core/cmdinfo.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | from typing import Dict, List, Union
from ..helpers.utils.extdl import install_pip
try:
from urlextract import URLExtract
except ModuleNotFoundError:
install_pip("urlextract")
from urlextract import URLExtract
from ..Config import Config
extractor = URLExtract()
def get_data(about, type):
data = a... | 35.094737 | 81 | 0.517097 |
d5478782fd8a1cc4eb6a917c93b976ad0dfdaa32 | 3,212 | py | Python | vyperlogix/boto/s3.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/boto/s3.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/boto/s3.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | __copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for details
THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRA... | 39.654321 | 139 | 0.749066 |
d547bcc93b30954cb019dcb26b9c32c0a6812d25 | 2,373 | py | Python | pyram/misc/vispy_examples/points.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | pyram/misc/vispy_examples/points.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | pyram/misc/vispy_examples/points.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | from vispy import gloo
from vispy import app
import numpy as np
VERT_SHADER = """
attribute vec2 a_position;
attribute vec3 a_color;
attribute float a_size;
varying vec4 v_fg_color;
varying vec4 v_bg_color;
varying float v_radius;
varying float v_linewidth;
varying float v_antialias;
void main (void) {
v_radiu... | 26.366667 | 74 | 0.638011 |
d54813d16a39908a056de4ad06a6380eeb3b84ed | 2,100 | py | Python | day04/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | day04/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | day04/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | import re
class BingoBoard:
def __init__(self, values):
self.rows = []
self.height = len(values)
self.width = len(values[0])
self.history = []
for y, row in enumerate(values):
self.rows.append([BingoCell(v) for v in row])
@property
def columns(self):
... | 22.826087 | 64 | 0.560476 |
d5482ac285f45b4b9c46871d7ed7df6d7d3b5da5 | 441 | py | Python | finetuned_model/learning_curves.py | rtoengi/transfer-learning-for-sign-language-recognition | e0627115e6b68d6b85244d484011bb3895ccf4ee | [
"MIT"
] | 1 | 2021-09-25T14:11:22.000Z | 2021-09-25T14:11:22.000Z | finetuned_model/learning_curves.py | rtoengi/transfer-learning-for-sign-language-recognition | e0627115e6b68d6b85244d484011bb3895ccf4ee | [
"MIT"
] | null | null | null | finetuned_model/learning_curves.py | rtoengi/transfer-learning-for-sign-language-recognition | e0627115e6b68d6b85244d484011bb3895ccf4ee | [
"MIT"
] | 4 | 2021-04-10T01:33:03.000Z | 2021-11-11T06:58:59.000Z | from pathlib import Path
from core.utils import load_dataframe
from finetuned_model.constants import TRAINING_RUNS
from plotting.plot import loss_accuracy_plot
from training.utils import history_path
def plot_learning_curves():
for training_run in TRAINING_RUNS:
path = history_path(Path(), training_run)
... | 24.5 | 51 | 0.768707 |
d5483c2420511fd12130410b7f62d3c1fe4aa507 | 4,935 | py | Python | src/local/butler/appengine.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-04-09T06:40:55.000Z | 2019-04-09T06:40:55.000Z | src/local/butler/appengine.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/local/butler/appengine.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.467105 | 80 | 0.731104 |
d54841aa647cabbb8f514559bb9427f034d89bb8 | 1,806 | py | Python | otp/speedchat/SpeedChatGMHandler.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | otp/speedchat/SpeedChatGMHandler.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | otp/speedchat/SpeedChatGMHandler.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 pandac.PandaModules import *
from direct.showbase import DirectObject
from otp.otpbase import OTPLocalizer
class SpeedChatGMHandler(DirectObject.DirectObject):
scStructure = None
scList = {}
def __init__(self):
if SpeedChatGMHandler.scStructure is None:
self.generateSCStructure()
... | 39.26087 | 87 | 0.601883 |
d5484d73e9b9278719c5c593dc8e53aa49a51f8f | 13,414 | py | Python | tests/testing_harness.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 1 | 2020-11-19T14:46:10.000Z | 2020-11-19T14:46:10.000Z | tests/testing_harness.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 2 | 2020-02-24T15:13:15.000Z | 2020-03-17T18:59:22.000Z | tests/testing_harness.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | null | null | null | from difflib import unified_diff
import filecmp
import glob
import hashlib
from optparse import OptionParser
import os
import shutil
import sys
import numpy as np
import openmc
from openmc.examples import pwr_core
from colorama import Fore, init
from tests.regression_tests import config
init()
def colorize(diff):
... | 35.86631 | 79 | 0.572462 |
d5485d173193b80f37de2d80321feb6508a6d5de | 7,468 | py | Python | nova/api/openstack/compute/networks.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/networks.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/networks.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Grid Dynamics
# 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... | 38.102041 | 78 | 0.635913 |
d54865da96292438574142a53d79247052385bcb | 2,243 | py | Python | gpkit/tests/t_keydict.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 1 | 2015-01-20T16:02:38.000Z | 2015-01-20T16:02:38.000Z | gpkit/tests/t_keydict.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 2 | 2015-01-19T21:29:44.000Z | 2015-01-20T15:26:26.000Z | gpkit/tests/t_keydict.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | null | null | null | """Test KeyDict class"""
import unittest
import numpy as np
from gpkit import Variable, VectorVariable
import gpkit
from gpkit.keydict import KeyDict
from gpkit.tests.helpers import run_tests
class TestKeyDict(unittest.TestCase):
"""TestCase for the KeyDict class"""
def test_nonnumeric(self):
x = Vec... | 29.906667 | 76 | 0.553277 |
d5487bbe29f2b0cb9905b2992d1c9ecf20988bd9 | 22,605 | py | Python | homeassistant/components/mqtt/cover.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/mqtt/cover.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/mqtt/cover.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for MQTT cover devices."""
import logging
import voluptuous as vol
from homeassistant.components import cover, mqtt
from homeassistant.components.cover import (
ATTR_POSITION,
ATTR_TILT_POSITION,
DEVICE_CLASSES_SCHEMA,
SUPPORT_CLOSE,
SUPPORT_CLOSE_TILT,
SUPPORT_OPEN,
SUPPORT_OPE... | 35.486656 | 89 | 0.6499 |
d548ad6598da1f127280d53447cefb8e0c721242 | 3,488 | py | Python | test/unit/pipelines/test_node.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | test/unit/pipelines/test_node.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | test/unit/pipelines/test_node.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | import numpy as np
import pytest
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score, classification_report
from fedot.core.data.data import InputData
from fedot.core.data.data_split import train_test_data_setup
from fedot.core.operation... | 32.296296 | 81 | 0.740252 |
d548b06bf1cf08859bc31edb3a4cbb9be973e700 | 50,354 | py | Python | ExtentionPackages/pysmi/parser/smi.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysmi/parser/smi.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysmi/parser/smi.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | #
# This file is part of pysmi software.
#
# Copyright (c) 2015-2016, Ilya Etingof <ilya@glas.net>
# License: http://pysmi.sf.net/license.html
#
import inspect
import os
import sys
import ply.yacc as yacc
from pysmi.lexer.smi import lexerFactory
from pysmi.parser.base import AbstractParser
from pysmi import error
from ... | 35.286615 | 238 | 0.462287 |
d548b27978043fe43640e2a1d2afaefc11ad1985 | 1,408 | py | Python | schedule/forms.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 1,065 | 2015-01-09T22:34:45.000Z | 2022-03-27T07:06:16.000Z | schedule/forms.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 411 | 2015-01-01T10:42:37.000Z | 2022-03-27T13:25:10.000Z | schedule/forms.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 402 | 2015-01-01T10:40:42.000Z | 2022-03-24T03:55:22.000Z | from django import forms
from django.utils.translation import gettext_lazy as _
from schedule.models import Event, Occurrence
from schedule.widgets import ColorInput
class SpanForm(forms.ModelForm):
start = forms.SplitDateTimeField(label=_("start"))
end = forms.SplitDateTimeField(
label=_("end"), hel... | 28.734694 | 82 | 0.639205 |
d5490fbe36fcb912d5a26a709218b395de684195 | 37,304 | py | Python | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/v2020_10_31/operations/_digital_twins_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 43.276102 | 204 | 0.679552 |
d54919715af9c411c172e3126ddafb4f67b2d650 | 1,257 | py | Python | .eggs/boto-2.48.0-py2.7.egg/boto/file/__init__.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/boto-2.48.0-py2.7.egg/boto/file/__init__.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/boto-2.48.0-py2.7.egg/boto/file/__init__.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Google Inc.
#
# 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, dis-
# trib... | 43.344828 | 74 | 0.774065 |
d549205bd6cc88cb04afe22213240811b6508e67 | 808 | py | Python | manage.py | nihn/map-points | 52ae8b34700435c82fb03dc30cb86d7d185cebf5 | [
"MIT"
] | null | null | null | manage.py | nihn/map-points | 52ae8b34700435c82fb03dc30cb86d7d185cebf5 | [
"MIT"
] | null | null | null | manage.py | nihn/map-points | 52ae8b34700435c82fb03dc30cb86d7d185cebf5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "map_points.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that t... | 35.130435 | 77 | 0.643564 |
d5492f4ef96fe46587e0fb7f104c344b4a7a88fa | 54,548 | py | Python | google-cloud-sdk/platform/gsutil/gslib/tests/test_naming.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/platform/gsutil/gslib/tests/test_naming.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/platform/gsutil/gslib/tests/test_naming.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # -*- coding: utf-8 -*-
# Copyright 2010 Google Inc. All Rights Reserved.
#
# 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 u... | 47.975374 | 80 | 0.657989 |
d54954240e25f7520d6178eb318e005fc51292a3 | 6,722 | py | Python | bamboo/integration_tests/test_integration_alexnet.py | stevenmz/lbann | fd10cc7936a14e0ac240a1b43207a47759885877 | [
"Apache-2.0"
] | null | null | null | bamboo/integration_tests/test_integration_alexnet.py | stevenmz/lbann | fd10cc7936a14e0ac240a1b43207a47759885877 | [
"Apache-2.0"
] | null | null | null | bamboo/integration_tests/test_integration_alexnet.py | stevenmz/lbann | fd10cc7936a14e0ac240a1b43207a47759885877 | [
"Apache-2.0"
] | null | null | null | import functools
import operator
import os
import os.path
import re
import sys
import numpy as np
import google.protobuf.text_format
import pytest
# Local files
current_file = os.path.realpath(__file__)
current_dir = os.path.dirname(current_file)
sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_py... | 35.010417 | 109 | 0.626897 |
d5499147fa7ecfbab06f7a90706a7e737b51ee84 | 287 | py | Python | sleuth/__init__.py | emrob/sleuth | 85354c1243c84f8e909079953c18a5ec1e5e7f04 | [
"MIT"
] | 1 | 2015-04-21T12:22:43.000Z | 2015-04-21T12:22:43.000Z | sleuth/__init__.py | emrob/sleuth | 85354c1243c84f8e909079953c18a5ec1e5e7f04 | [
"MIT"
] | null | null | null | sleuth/__init__.py | emrob/sleuth | 85354c1243c84f8e909079953c18a5ec1e5e7f04 | [
"MIT"
] | null | null | null | """
Sleuth: A debugging and diagnostic tool for Python.
------
"""
import sys
if sys.version_info[:2] < (3, 0):
raise ImportError("Sleuth requires Python 3.")
del sys
__version__ = '0.2.0d'
from .__main__ import main
from .error import *
from .inject import *
from .wrap import *
| 16.882353 | 51 | 0.682927 |
d549b073708c0e4c7859a365546bee499d72fb59 | 3,421 | py | Python | tests/tf/blocks/test_mlp.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 45 | 2022-02-01T20:27:18.000Z | 2022-03-29T10:06:53.000Z | tests/tf/blocks/test_mlp.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 142 | 2022-02-01T22:19:04.000Z | 2022-03-31T23:13:08.000Z | tests/tf/blocks/test_mlp.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 12 | 2022-02-01T19:54:28.000Z | 2022-03-23T17:53:29.000Z | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 agreed ... | 34.555556 | 97 | 0.722888 |
d549b507453d28d1f5c69554850cf8dc8e47c479 | 6,003 | py | Python | use_the_brute_force.py | alters-mit/tdw_bcs_demo | 86ea25ef1fef6cbce3a7aaf45a477bba88b4b8c2 | [
"MIT"
] | null | null | null | use_the_brute_force.py | alters-mit/tdw_bcs_demo | 86ea25ef1fef6cbce3a7aaf45a477bba88b4b8c2 | [
"MIT"
] | null | null | null | use_the_brute_force.py | alters-mit/tdw_bcs_demo | 86ea25ef1fef6cbce3a7aaf45a477bba88b4b8c2 | [
"MIT"
] | null | null | null | from typing import Dict
import numpy as np
from tdw.controller import Controller
from tdw.add_ons.third_person_camera import ThirdPersonCamera
from tdw.add_ons.collision_manager import CollisionManager
from tdw.add_ons.object_manager import ObjectManager
class UseTheBruteForce(Controller):
"""
GOAL: Use an au... | 53.598214 | 112 | 0.479927 |
d549dfab6cbe5cd7a3b350cfa9692be8f03b4fed | 34,494 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/meta/old_connectedgraph.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/torch/src/python/aimet_torch/meta/old_connectedgraph.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/torch/src/python/aimet_torch/meta/old_connectedgraph.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | #!/usr/bin/env python3.5
# pylint: skip-file
# =============================================================================
#
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 44.223077 | 119 | 0.665681 |
d549fe2511946cbb75522643edcaa1af5b7723b2 | 4,254 | py | Python | invokust/loadtest.py | theFong/invokust | 55fc9568f24d2c7f26350c1dfebd6a7af1e877d2 | [
"MIT"
] | null | null | null | invokust/loadtest.py | theFong/invokust | 55fc9568f24d2c7f26350c1dfebd6a7af1e877d2 | [
"MIT"
] | null | null | null | invokust/loadtest.py | theFong/invokust | 55fc9568f24d2c7f26350c1dfebd6a7af1e877d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import gevent
import json
import signal
import logging
import time
from locust import runners, events
from locust.util.timespan import parse_timespan
logger = logging.getLogger(__name__)
class LocustLoadTest(object):
'''
Runs a Locust load test and returns statistics
'... | 37.315789 | 79 | 0.578984 |
d54a03c4ac6d13e1f80afe4f3cc1bbca1af9ccd4 | 590,207 | py | Python | grammars/gen/Legal_refLexer.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | 5 | 2019-11-28T17:02:59.000Z | 2021-02-05T17:39:49.000Z | grammars/gen/Legal_refLexer.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | null | null | null | grammars/gen/Legal_refLexer.py | OpenLawsGR/judgments2AKN | 0c6217349cde36058d5599800e289fdf0d3eaf23 | [
"MIT"
] | null | null | null | # Generated from /home/plessas/EDBM34/grammars/Legal_ref.g4 by ANTLR 4.7.2
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2")
... | 74.889862 | 117 | 0.638952 |
d54a3bbb735146db7e82ff246e49842571fcd2d1 | 35,295 | py | Python | klasa.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 3 | 2015-01-06T22:00:22.000Z | 2016-08-14T08:07:32.000Z | klasa.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 56 | 2015-07-12T10:21:38.000Z | 2020-02-23T18:51:01.000Z | klasa.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 2 | 2015-01-06T21:25:06.000Z | 2018-01-17T12:03:17.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pywikibot
import re
import codecs
import collections
import locale
import time
import datetime
import os
#import config
from pywikibot import xmlreader
import bz2
import sys
from pywikibot.data.api import Request
from os import environ
#import mwparserfromhell
from copy... | 36.424149 | 326 | 0.532767 |
d54a45b9509be84cd8dad59d8958ff6e2108845c | 1,952 | py | Python | ads/type_discovery/phone_number_detector.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | 20 | 2022-02-22T19:07:09.000Z | 2022-03-16T17:21:42.000Z | ads/type_discovery/phone_number_detector.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | ads/type_discovery/phone_number_detector.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8; -*-
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
from __future__ import print_function, absolute_import, division
import re
import pandas as pd
from pandas... | 30.5 | 104 | 0.673668 |
d54a6011698c47c76b131f88834ac57610c28714 | 969 | py | Python | damast/postgres_rest_api/uri/uri_namespace.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 2 | 2021-12-22T17:01:02.000Z | 2022-01-18T17:05:48.000Z | damast/postgres_rest_api/uri/uri_namespace.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 94 | 2021-12-22T11:21:57.000Z | 2022-03-31T22:40:56.000Z | damast/postgres_rest_api/uri/uri_namespace.py | UniStuttgart-VISUS/damast | 05ceb150e86227d81f0f4bb441af6d4f8bce65ee | [
"MIT"
] | 1 | 2022-01-04T09:04:47.000Z | 2022-01-04T09:04:47.000Z | import flask
import psycopg2
import json
from ...authenticated_blueprint_preparator import AuthenticatedBlueprintPreparator
import werkzeug.exceptions
from ..decorators import rest_endpoint
name = 'uri-namespace'
app = AuthenticatedBlueprintPreparator(name, __name__, template_folder=None)
@app.route('/uri-namespac... | 24.225 | 82 | 0.642931 |
d54a6c27b965c8bd993060d49cd391f9b47f4528 | 6,765 | py | Python | Allura/allura/tests/decorators.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | Allura/allura/tests/decorators.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/tests/decorators.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # 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 (t... | 33.656716 | 110 | 0.617886 |
d54a6e76abe296bac7373e332765c682f01bf61c | 811 | py | Python | augmentation/drop_channel.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | null | null | null | augmentation/drop_channel.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | null | null | null | augmentation/drop_channel.py | tranduytrung/rgbd-classification | 156d829200c4592867af5ade85e8642afbe8580e | [
"Apache-2.0"
] | 1 | 2021-09-28T02:36:17.000Z | 2021-09-28T02:36:17.000Z | import torch
class DropChannel(object):
""" randomly drop channels of tensor
"""
def __init__(self, channels=None, fill_value=0):
self.channels = channels
self.fill_value = fill_value
def __call__(self, tensor: torch.Tensor):
channels = self.channels
if channels is Non... | 28.964286 | 71 | 0.604192 |
d54a7ae74ba6f4e800022d7ec5e973ba5b64e6aa | 7,152 | py | Python | tests/unit/utils/warnings_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2020-06-16T05:47:58.000Z | 2020-06-16T05:47:58.000Z | tests/unit/utils/warnings_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/warnings_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:copyright: © 2013 by the SaltStack Team, see AUTHORS for more details
:license: Apache 2.0, see LICENSE for more details.
tests.unit.utils.warnings_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test ``salt.utils.warn_... | 41.103448 | 87 | 0.583893 |
d54a83d0734970f206ebc6bdc30d62674ec3af32 | 315 | py | Python | 03/pythonic/client.py | asmodehn/caerbannog | 47bb1138190748041a4c0d02e522c0924a9af962 | [
"MIT"
] | 1 | 2019-01-22T20:57:45.000Z | 2019-01-22T20:57:45.000Z | 03/pythonic/client.py | asmodehn/functional-python | 47bb1138190748041a4c0d02e522c0924a9af962 | [
"MIT"
] | 3 | 2019-03-14T17:33:39.000Z | 2019-03-14T18:09:42.000Z | 03/pythonic/client.py | asmodehn/caerbannog | 47bb1138190748041a4c0d02e522c0924a9af962 | [
"MIT"
] | null | null | null | import time
import functle
def triangle():
state = functle.Functle()
dist = 200
# fluent pythonic function composition in python
state.move(dist).left(120).move(dist).left(120).move(dist)
if __name__ == '__main__':
triangle()
time.sleep(5) # hack to have the time to see something...
| 18.529412 | 62 | 0.669841 |
d54aa8af0db89b3a8e2b59b86e4b1989fc9d5776 | 3,822 | py | Python | extensions/extensions.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | extensions/extensions.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | extensions/extensions.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | import itertools
import json
import os
import re
from pathlib import Path
from random import randint
from django.contrib.humanize.templatetags.humanize import intcomma
BASE_DIR = Path(__file__).resolve().parent.parent
# JSON-based secrets module
with open(os.path.join(BASE_DIR, "secrets.json")) as f:
secrets = j... | 30.094488 | 113 | 0.654893 |
d54add59d4ba8052fb61e3fa51dd24fcfa1a462d | 384 | py | Python | fantasy-football-api/fantasy-football-api/fantasy_football_api/__init__.py | mcappleman/fantasy-football-api | b9673bcde4bfc1159175d2d55a71a0437909cab4 | [
"MIT"
] | null | null | null | fantasy-football-api/fantasy-football-api/fantasy_football_api/__init__.py | mcappleman/fantasy-football-api | b9673bcde4bfc1159175d2d55a71a0437909cab4 | [
"MIT"
] | null | null | null | fantasy-football-api/fantasy-football-api/fantasy_football_api/__init__.py | mcappleman/fantasy-football-api | b9673bcde4bfc1159175d2d55a71a0437909cab4 | [
"MIT"
] | null | null | null | """
The flask application package.
"""
from os import environ
from flask import Flask, Blueprint
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config.from_object(environ.get('APP_SETTINGS'))
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
import fantasy_football_api.vie... | 21.333333 | 59 | 0.815104 |
d54af0547a184810691cbca9e44aaa317b16f054 | 5,878 | py | Python | src/unit_parse/classification.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | 1 | 2022-01-29T17:14:40.000Z | 2022-01-29T17:14:40.000Z | src/unit_parse/classification.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | src/unit_parse/classification.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | from typing import Union, Any
from enum import Enum
import math
import dataclasses
from unit_parse.config import Quantity, Unit
from unit_parse.utils import quantity_approx_equal, get_list_depth
from unit_parse.logger import log_debug
class QuantClass(Enum):
""" Classifications for data. """
NUMBER = 0
S... | 31.945652 | 112 | 0.630827 |
d54af404748b7e5eabe46926324a6a91a4d921ae | 3,378 | py | Python | hindi_inverse_text_normalization/hindi_inverse_normalize.py | Open-Speech-EkStep/punctuation-ITN | d4b8340786a836d44b510ff981667a37cac4b65e | [
"MIT"
] | 2 | 2022-01-17T09:13:42.000Z | 2022-01-18T23:33:42.000Z | hindi_inverse_text_normalization/hindi_inverse_normalize.py | Open-Speech-EkStep/punctuation-ITN | d4b8340786a836d44b510ff981667a37cac4b65e | [
"MIT"
] | null | null | null | hindi_inverse_text_normalization/hindi_inverse_normalize.py | Open-Speech-EkStep/punctuation-ITN | d4b8340786a836d44b510ff981667a37cac4b65e | [
"MIT"
] | 2 | 2022-02-07T14:10:30.000Z | 2022-02-09T07:28:19.000Z | import pynini
from pynini.lib import pynutil, utf8
from graph_utils import delete_space
def remove_starting_zeros(word, hindi_digits_with_zero):
if word[0] in hindi_digits_with_zero and len(word) > 1:
first_non_zero_num = min([pos for pos, word in enumerate(list(word)) if word != "०"])
word = wor... | 35.557895 | 138 | 0.665779 |
d54afcdedfdd6ec09bdbadaaa8ee73ca2b514795 | 4,758 | py | Python | asposeimagingcloud/models/error_details.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | asposeimagingcloud/models/error_details.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | asposeimagingcloud/models/error_details.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="error_details.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaini... | 31.098039 | 79 | 0.578604 |
d54b0facc3a0cfac21a9b52430552548ad6d94a2 | 8,387 | py | Python | libcloudforensics/providers/gcp/internal/project.py | zkck/cloud-forensics-utils | ac1cdf74b595cf57629c23a52e46da98283e552f | [
"Apache-2.0"
] | 241 | 2020-02-08T20:05:54.000Z | 2022-03-31T23:51:30.000Z | libcloudforensics/providers/gcp/internal/project.py | Fryyyyy/cloud-forensics-utils | d7fb845bd7df1498d67230520e2c7169c9a929df | [
"Apache-2.0"
] | 376 | 2020-02-05T10:22:54.000Z | 2022-03-30T00:09:18.000Z | libcloudforensics/providers/gcp/internal/project.py | Fryyyyy/cloud-forensics-utils | d7fb845bd7df1498d67230520e2c7169c9a929df | [
"Apache-2.0"
] | 72 | 2020-02-06T07:34:30.000Z | 2022-03-05T18:02:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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 ... | 33.955466 | 111 | 0.732801 |
d54b11f0b1da438c59d8362a85799c6db1230d13 | 1,180 | py | Python | test/lmp/infer/conftest.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/infer/conftest.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/infer/conftest.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Setup fixtures for testing :py:mod:`lmp.infer.`."""
import pytest
import torch
from lmp.model import BaseModel, ElmanNet
from lmp.tknzr import CharTknzr
from lmp.tknzr._base import BOS_TK, EOS_TK, PAD_TK, UNK_TK, BaseTknzr
@pytest.fixture
def tknzr() -> BaseTknzr:
"""Max non special token is ``c``."""
tknzr ... | 31.891892 | 88 | 0.730508 |
d54b21e867574aaf676577bdfe7b8c3e00a89e85 | 251 | py | Python | tql/_data/__init__.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/_data/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/_data/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : __init__.py
# @Time : 2019-06-23 19:21
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
| 20.916667 | 36 | 0.521912 |
d54b42b21dc32660f4065034700278d27fe2fb82 | 4,062 | py | Python | tests/openassetio/test/manager/test_main.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/test/manager/test_main.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/test/manager/test_main.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013-2022 The Foundry Visionmongers Ltd
#
# 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 app... | 37.611111 | 95 | 0.733383 |
d54b50c8520ccf78ee22d11aa65982c2e5d5e6bf | 4,527 | py | Python | nova/api/openstack/compute/rescue.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/rescue.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/rescue.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright 2011 OpenStack Foundation
#
# 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 a... | 38.042017 | 79 | 0.652087 |
d54b5a1ab42e8b157b843ddac03954b66112af2d | 6,051 | py | Python | core/tests/test_config.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | 1 | 2019-03-18T13:31:11.000Z | 2019-03-18T13:31:11.000Z | core/tests/test_config.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | core/tests/test_config.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# 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 agreed to in wri... | 33.430939 | 80 | 0.599075 |
d54b5ca420bac4d4d91c12117fd8b6a00c0e4cf8 | 1,568 | py | Python | sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/tests/perfstress_tests/perf_detect_language.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
from azure_devtools.perfstress_tests import PerfStressTest
from azure.core.credentials import AzureKeyCredential
from azure.ai.textanalytics import TextAnalyti... | 36.465116 | 86 | 0.665179 |
d54b5f1db2ba957cc97f3439d318dfc2fdcfd77b | 7,880 | py | Python | data_steward/tools/generate_ext_tables.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/tools/generate_ext_tables.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | data_steward/tools/generate_ext_tables.py | amcgrenera-vumc/curation | f30aa8cb3b8de4e5dfdc3c95a0d98ca21de7df08 | [
"MIT"
] | null | null | null | import random
import bq_utils
import resources
import constants.bq_utils as bq_consts
import constants.cdr_cleaner.clean_cdr as cdr_consts
EXT_FIELD_TEMPLATE = [
{
"type": "integer",
"name": "{table}_id",
"mode": "nullable",
"description": "The {table}_id used in the {table} table.... | 36.995305 | 113 | 0.663071 |
d54bbfb5b0b6d2071ebf60b6e5574f857f2507ce | 196 | py | Python | abc/062/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/062/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/062/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | A = [1, 3, 5, 7, 8, 10, 12]
B = [4, 6, 9, 11]
C = [2]
x, y = map(int, input().split())
if (x in A and y in A) or (x in B and y in B) or (x in C and y in C):
print("Yes")
else:
print("No") | 21.777778 | 69 | 0.479592 |
d54bc2387646892615f646ad1b0ca5eb4df916b0 | 627 | py | Python | djangosite/snippets/migrations/0001_initial.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | djangosite/snippets/migrations/0001_initial.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | djangosite/snippets/migrations/0001_initial.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-09 06:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contam... | 25.08 | 114 | 0.593301 |
d54bc945666f0dbd3241371e25f5bdb4e912c6d5 | 1,578 | py | Python | djangosaml2idp/models.py | askvortsov1/djangosaml2idp | cff4723d021d1479268554ad1e48817c8aabb0fc | [
"Apache-2.0"
] | 3 | 2019-03-16T19:24:04.000Z | 2019-03-21T20:19:56.000Z | djangosaml2idp/models.py | askvortsov1/djangosaml2idp | cff4723d021d1479268554ad1e48817c8aabb0fc | [
"Apache-2.0"
] | 6 | 2019-03-17T00:38:16.000Z | 2020-02-05T15:04:57.000Z | djangosaml2idp/models.py | askvortsov1/djangosaml2idp | cff4723d021d1479268554ad1e48817c8aabb0fc | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
from django.db import models
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import timezone
sp_config_dict = getattr(settings, "SAML_IDP_SPCONFIG", None)
if sp_config_dict is None:
raise ImproperlyConfigured("Settings must ... | 35.066667 | 123 | 0.700887 |
d54bca2efe89f857aca1d62e73ec35c06b93b676 | 6,932 | py | Python | netbox_prometheus_sd/tests/test_mapper.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | netbox_prometheus_sd/tests/test_mapper.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | netbox_prometheus_sd/tests/test_mapper.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.test.utils import tag
from dcim.models.devices import DeviceType
from dcim.models.sites import Site
from netbox_prometheus_sd.api.models import Target, TargetType
from ..api import mapper
from ipam.models import IPAddress
from dcim.models import Device, DeviceRole, Platfor... | 38.511111 | 88 | 0.650606 |
d54be844b1dbd7a11d612a381f173a8986a42ebc | 3,856 | py | Python | tc_database.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | tc_database.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | tc_database.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Au Yeong Wing Yau
#
# 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 agreed to in writing... | 29.435115 | 138 | 0.70332 |
d54bf2264db29e51bccf3d4401d6b8d020f9853c | 999 | py | Python | hashicorp_vault_client/setup.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/setup.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/setup.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from setuptools import setup, find_packages # noqa: H301... | 24.975 | 114 | 0.673674 |
d54bfcc0b5b08b73f4750993934809c639d9aceb | 5,180 | py | Python | Tools/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 35.724138 | 100 | 0.664479 |
d54c164c7b8ead82ceb9ec3b0087310a567d95df | 2,614 | py | Python | etc/ci_scripts/dump_artifacts/cli.py | grapl-security/grapl | 24caa7fb4424645495d99fb338e2231fc4f66712 | [
"Apache-2.0"
] | 291 | 2020-04-24T03:40:06.000Z | 2022-03-29T02:47:16.000Z | etc/ci_scripts/dump_artifacts/cli.py | silocityit/grapl | 3ec918cc4c0ce18fafff0a2917c726fa0fd0f1d0 | [
"Apache-2.0"
] | 848 | 2020-04-26T19:23:37.000Z | 2022-03-31T16:57:39.000Z | etc/ci_scripts/dump_artifacts/cli.py | silocityit/grapl | 3ec918cc4c0ce18fafff0a2917c726fa0fd0f1d0 | [
"Apache-2.0"
] | 43 | 2020-04-27T20:59:18.000Z | 2022-03-29T21:56:09.000Z | #!/usr/bin/env python3
import argparse
import logging
import os
import sys
from datetime import datetime
from pathlib import Path
from typing import Optional
# Odd path is due to the `/etc` root pattern in pants.toml, fyi
from ci_scripts.dump_artifacts import docker_artifacts, nomad_artifacts
# need minimum 3.7 for ... | 31.878049 | 120 | 0.676358 |
d54c59c89b982b51b5b11422742d2a7e23819777 | 36,842 | py | Python | jina/helper.py | winstonww/jina | 326d7e6d76d0b9cef5b7042356605c4f0a567860 | [
"Apache-2.0"
] | null | null | null | jina/helper.py | winstonww/jina | 326d7e6d76d0b9cef5b7042356605c4f0a567860 | [
"Apache-2.0"
] | null | null | null | jina/helper.py | winstonww/jina | 326d7e6d76d0b9cef5b7042356605c4f0a567860 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import asyncio
import functools
import json
import math
import os
import random
import re
import sys
import threading
import time
import uuid
import warnings
from argparse import ArgumentParser, Namespace
from context... | 28.253067 | 142 | 0.554422 |
d54c5a6f755ac4f3e24731102c07d0fc80199d33 | 5,045 | py | Python | SCRAPE/Lib/site-packages/twisted/runner/inetdconf.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/runner/inetdconf.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/runner/inetdconf.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.runner.test.test_inetdconf -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Parser for inetd.conf files
"""
from typing import Optional
# Various exceptions
class InvalidConfError(Exception):
"""
Invalid configuration file
"""
class InvalidI... | 24.730392 | 87 | 0.566501 |
d54c60c49916bf2fb46feedf3fca5e81942dba50 | 359 | py | Python | cursoemvideoPy/Mundo1/ex004.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo1/ex004.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo1/ex004.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | print('============ TIPO PRIMITIVO & INFOS ============')
check_types = input('Digite algo: ')
print(f'O tipo primitivo desse valor é {type(check_types)}')
print(f'È alfanumérico ? {check_types.isalnum()}')
print(f'È um número ? {check_types.isnumeric()}')
print(f'È alfabético ? {check_types.isalpha()}')
print(f'Só t... | 35.9 | 60 | 0.662953 |
d54c6a7a767c691283ec7825485da4ef1c00358a | 574 | py | Python | Easy/1403 Minimum Subsequence in Non-Increasing Order.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1403 Minimum Subsequence in Non-Increasing Order.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1403 Minimum Subsequence in Non-Increasing Order.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order/
class Solution:
def minSubsequence(self, nums: List[int]) -> List[int]:
if len(nums) == 1:
return nums
nums = sorted(nums)
left = sum(nums)
right = 0
... | 22.076923 | 76 | 0.423345 |
d54c7766b0fe9dc3a7730f65a4a4d860efa29f71 | 3,587 | py | Python | irsdb/metadata/management/commands/load_metadata.py | mjalkio/990-xml-database | 2b7dabda666306cc776070755e1396cf8e30cec8 | [
"BSD-2-Clause"
] | null | null | null | irsdb/metadata/management/commands/load_metadata.py | mjalkio/990-xml-database | 2b7dabda666306cc776070755e1396cf8e30cec8 | [
"BSD-2-Clause"
] | null | null | null | irsdb/metadata/management/commands/load_metadata.py | mjalkio/990-xml-database | 2b7dabda666306cc776070755e1396cf8e30cec8 | [
"BSD-2-Clause"
] | null | null | null | import os
import csv
from django.core.management.base import BaseCommand
from metadata.models import *
from django.conf import settings
METADATA_DIRECTORY = settings.METADATA_DIRECTORY
REPORT_COUNT = 100
CANONICAL_VERSION = '2016v3.0'
class Command(BaseCommand):
help = """
Erase and reload the me... | 35.87 | 71 | 0.571229 |
d54c7dfc6df67cd5aba8adf68cfdcab587560597 | 1,962 | py | Python | metadata-ingestion/src/datahub/ingestion/api/ingestion_job_reporting_provider_base.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,603 | 2016-03-03T17:21:03.000Z | 2020-01-22T22:12:02.000Z | metadata-ingestion/src/datahub/ingestion/api/ingestion_job_reporting_provider_base.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,157 | 2016-03-03T19:29:22.000Z | 2020-01-20T14:41:59.000Z | metadata-ingestion/src/datahub/ingestion/api/ingestion_job_reporting_provider_base.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 570 | 2016-03-03T17:21:05.000Z | 2020-01-21T06:54:10.000Z | from dataclasses import dataclass
from typing import Any, Dict, List, Optional
from datahub.ingestion.api.committable import CommitPolicy
from datahub.ingestion.api.common import PipelineContext
from datahub.ingestion.api.ingestion_job_state_provider import (
IngestionJobStateProvider,
IngestionJobStateProvide... | 32.163934 | 95 | 0.764526 |
d54c929fc45f5e0bfed6203a75cc7cf95c4c98d7 | 2,050 | py | Python | tests/getl/common/test_hive_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 8 | 2020-06-10T09:00:17.000Z | 2021-06-07T18:02:19.000Z | tests/getl/common/test_hive_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 5 | 2020-07-03T10:39:25.000Z | 2021-08-30T14:52:47.000Z | tests/getl/common/test_hive_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 1 | 2020-05-28T07:53:48.000Z | 2020-05-28T07:53:48.000Z | """Testing module hive table."""
from unittest.mock import Mock, call
import pytest
from getl.common.hive_table import HiveTable
@pytest.mark.parametrize(
"params, num_calls, schema",
[
({"location": "s3://bucket/prefix"}, 3, ""),
(
{"location": "s3://bucket/prefix", "db_schema":... | 25.949367 | 101 | 0.580488 |
d54ca091b78642b191bd7dc9999dbef173debe19 | 3,686 | py | Python | examples/multithreading_two_way.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2022-03-01T19:38:06.000Z | 2022-03-01T19:38:06.000Z | examples/multithreading_two_way.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 17 | 2020-06-11T21:02:03.000Z | 2021-02-02T19:10:19.000Z | examples/multithreading_two_way.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | import time
from qtpy.QtWidgets import (
QGridLayout,
QLabel,
QProgressBar,
QPushButton,
QWidget,
)
import napari
import numpy as np
from napari.qt.threading import thread_worker
@thread_worker
def two_way_communication_with_args(start, end):
"""Both sends and receives values to & from the m... | 30.97479 | 79 | 0.669832 |
d54ca1f1dfd32ca57e948d4134d1ec5164984459 | 6,673 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_epd/ssd1675.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/lib/adafruit_epd/ssd1675.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/lib/adafruit_epd/ssd1675.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2018 Dean Miller for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_epd.ssd1675` - Adafruit SSD1675 - ePaper display driver
====================================================================================
CircuitPython driver for Adafruit SSD1675 display breakouts
* Au... | 37.488764 | 313 | 0.659973 |
d54ca9aae074e2e7cd8a6964d7686c57eed42b9f | 5,105 | py | Python | jupytext/metadata_filter.py | fool65c/jupytext | 4b55d2e6ccc995c04679de0863234c60c3741a69 | [
"MIT"
] | 1 | 2019-05-06T07:39:15.000Z | 2019-05-06T07:39:15.000Z | jupytext/metadata_filter.py | royalosyin/jupytext | 72aa6c4968da714323fbd7a7c548ee4b1274c946 | [
"MIT"
] | null | null | null | jupytext/metadata_filter.py | royalosyin/jupytext | 72aa6c4968da714323fbd7a7c548ee4b1274c946 | [
"MIT"
] | null | null | null | """Notebook and cell metadata filtering"""
from .cell_metadata import _JUPYTEXT_CELL_METADATA
def metadata_filter_as_dict(metadata_config):
"""Return the metadata filter represented as either None (no filter),
or a dictionary with at most two keys: 'additional' and 'excluded',
which contain either a list... | 38.674242 | 114 | 0.666014 |
d54cd7660455658e1393d48e26369a9097750bf4 | 7,064 | py | Python | osgar/drivers/test_logsocket.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | osgar/drivers/test_logsocket.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | osgar/drivers/test_logsocket.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | import unittest
from unittest.mock import patch, MagicMock, call
from osgar.drivers.logsocket import LogTCPStaticIP as LogTCP, LogTCPDynamicIP, LogTCPServer, LogUDP, LogHTTP
from osgar.bus import Bus
import osgar.node
class LogSocketTest(unittest.TestCase):
def test_tcp_send(self):
with patch('osgar.driv... | 35.857868 | 108 | 0.548556 |
d54ced3dde295402c637954f48cb4996c53decae | 1,941 | py | Python | greg_amato/gamato_02.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | greg_amato/gamato_02.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | greg_amato/gamato_02.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division, unicode_literals
"""
--- Day 2: Password Philosophy ---
Your flight departs in a few days from the coastal airport;
the easiest way down to the coast from here is via toboggan.
The shopkeeper at the North Pole Toboggan... | 30.809524 | 108 | 0.668727 |
d54cf915b46f4852bf6bf3129c354a25336ec52a | 1,253 | py | Python | cms/plugins/text/models.py | christianbertschy/django-cms-2.0 | a98d035b47346b7f6924a807338be3af6566537f | [
"BSD-3-Clause"
] | 1 | 2015-09-24T00:36:34.000Z | 2015-09-24T00:36:34.000Z | cms/plugins/text/models.py | christianbertschy/django-cms-2.0 | a98d035b47346b7f6924a807338be3af6566537f | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/text/models.py | christianbertschy/django-cms-2.0 | a98d035b47346b7f6924a807338be3af6566537f | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin
from django.conf import settings
from django.utils.html import strip_tags
from django.utils.text import truncate_words
from cms.plugins.text.utils import plugin_admin_html_to_tags,\
plugin_tags_to_a... | 32.973684 | 76 | 0.648045 |
d54d0e23ce98a1fdd3b9d2a5db281c9e37095d38 | 30,453 | py | Python | msticpy/sectools/geoip.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/sectools/geoip.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/sectools/geoip.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Geoip ... | 35.165127 | 109 | 0.597018 |
d54d289e5d44b6047644428ff5859d5ab1618024 | 20,003 | py | Python | python/swagger_client/api/customers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api/customers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/api/customers_api.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | # coding: utf-8
"""
Easy!Appointments API
These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: info@easyappointments.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute... | 37.670433 | 134 | 0.605209 |
d54d2ce78965d29d65f9e139a1b2c0f22f332bcd | 1,562 | py | Python | Lib/site-packages/py2exe/samples/singlefile/comserver/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | Lib/site-packages/py2exe/samples/singlefile/comserver/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | Lib/site-packages/py2exe/samples/singlefile/comserver/setup.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | # This setup script builds a single-file Python inprocess COM server.
#
from distutils.core import setup
import py2exe
import sys
# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
sys.argv.append("py2exe")
sys.argv.append("-q")
class Target:
def __init__(self, **kw):
... | 30.038462 | 75 | 0.601152 |
d54d3ddc13c2e2a517d1d6c7ec753dac3d9c8da8 | 2,708 | py | Python | plugins/maya/inventory/action_switch_standin_to_model.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/inventory/action_switch_standin_to_model.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/inventory/action_switch_standin_to_model.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import avalon.api
import avalon.io
import avalon.maya
from maya import cmds
from reveries.maya.capsule import maintained_selection
class SwitchStandInToModel(avalon.api.InventoryAction):
label = "Stand-In To Model"
icon = "cubes"
color = "#7BCD2E"
@staticmethod
def is_compatible(container):
... | 33.02439 | 77 | 0.526957 |
d54d4b126ac37bcb6c3481cda42f09bc0f04c8b0 | 13,538 | py | Python | conftest.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | conftest.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | conftest.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | # This is in the root PANDIR directory so that pytest will recognize the
# options added below without having to also specify pocs/test, or a
# one of the tests in that directory, on the command line; i.e. pytest
# doesn't load pocs/tests/conftest.py until after it has searched for
# tests.
# In addition, there are fix... | 31.265589 | 99 | 0.672773 |
d54d5313a8995d244f07510a566455844fa263da | 12,623 | py | Python | examples/pytorch/graphsage/train_cv.py | jinghuix/dgl | fae26dd15caac92458a08ad34889086e1e333ddd | [
"Apache-2.0"
] | null | null | null | examples/pytorch/graphsage/train_cv.py | jinghuix/dgl | fae26dd15caac92458a08ad34889086e1e333ddd | [
"Apache-2.0"
] | null | null | null | examples/pytorch/graphsage/train_cv.py | jinghuix/dgl | fae26dd15caac92458a08ad34889086e1e333ddd | [
"Apache-2.0"
] | null | null | null | import dgl
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.multiprocessing as mp
import dgl.function as fn
import dgl.nn.pytorch as dglnn
import time
import argparse
import tqdm
from _thread import start_new_thread
from functools impor... | 38.484756 | 120 | 0.609205 |
d54d5b7a38b010e5cf26ebd476254cc8c3d804a0 | 8,016 | py | Python | jsonargparse_tests/typing_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | jsonargparse_tests/typing_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | jsonargparse_tests/typing_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import pathlib
import pickle
import jsonargparse.typing
from typing import Callable
from jsonargparse.typing import RegisteredType
from jsonargparse_tests.base import *
class RestrictedNumberTests(unittest.TestCase):
def test_PositiveInt(self):
self.assertEqual(1, Positi... | 43.096774 | 128 | 0.669411 |
d54d72c8164d2be83b70ea370ca51d63001d273a | 1,348 | py | Python | tests/tf/models/test_benchmark.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 45 | 2022-02-01T20:27:18.000Z | 2022-03-29T10:06:53.000Z | tests/tf/models/test_benchmark.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 142 | 2022-02-01T22:19:04.000Z | 2022-03-31T23:13:08.000Z | tests/tf/models/test_benchmark.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | 12 | 2022-02-01T19:54:28.000Z | 2022-03-23T17:53:29.000Z | # #
# # Copyright (c) 2021, NVIDIA CORPORATION.
# #
# # 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 appli... | 36.432432 | 94 | 0.735163 |
d54d8fd0d665e8bab84dc365b9d0bb062a601e6a | 2,029 | py | Python | tests/test_subscription_schedule.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 937 | 2017-06-04T18:44:20.000Z | 2022-03-27T07:28:32.000Z | tests/test_subscription_schedule.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 969 | 2017-06-05T01:57:20.000Z | 2022-03-31T23:42:54.000Z | tests/test_subscription_schedule.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 309 | 2017-06-12T03:18:10.000Z | 2022-03-29T17:05:18.000Z | """
dj-stripe SubscriptionSchedule model tests.
"""
from copy import deepcopy
from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.test import TestCase
from djstripe.enums import SubscriptionScheduleStatus
from djstripe.models import SubscriptionSchedule
from . import (
FAKE... | 33.262295 | 85 | 0.729916 |
d54d94cbb40fec9f8ca21bb2c268492d3a861575 | 5,166 | py | Python | tests/python/pants_test/base/test_payload_field.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/base/test_payload_field.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/base/test_payload_field.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"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, print_function, unicode_literals
from hashlib import sha1
from pants.backend.python.python_requirement import PythonRequi... | 33.115385 | 98 | 0.675958 |
d54d9ff6f24a5ceb52bee7b25c852de0138ba824 | 265 | py | Python | master/tutorials/linkedin-placements/linkedin-practice-bitwise-and/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | master/tutorials/linkedin-placements/linkedin-practice-bitwise-and/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | master/tutorials/linkedin-placements/linkedin-practice-bitwise-and/solution.py | bitnot/hackerrank-solutions | cb54af3e80f9aa188a7aadf357c5d9bcc0715249 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
t = int(input().strip())
for t0 in range(t):
n, k = [int(tmp) for tmp in input().strip().split(' ')]
a = k-1
b = ~a & -~a #least significant 0 bit to set
if a | b > n:
print(a - 1)
else:
print(a)
| 16.5625 | 59 | 0.490566 |
d54dae2bfa535e59f5cf1f80e8e7bc6dee11aac7 | 1,069 | py | Python | gdfc/cli.py | TanguyLe/gdrive-folder-copy | 051701cdec8b2917c3bd7fd3b694e1a764a939f7 | [
"MIT"
] | null | null | null | gdfc/cli.py | TanguyLe/gdrive-folder-copy | 051701cdec8b2917c3bd7fd3b694e1a764a939f7 | [
"MIT"
] | null | null | null | gdfc/cli.py | TanguyLe/gdrive-folder-copy | 051701cdec8b2917c3bd7fd3b694e1a764a939f7 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import Optional
import typer
from gdfc.copy_folder import copy_folder
from gdfc.log_utils import log_setup
app = typer.Typer()
@app.command()
@log_setup
def copy(
source_folder_name: str,
target_folder_parent_name: str = typer.Argument("root"),
target_folder_name: O... | 25.452381 | 111 | 0.695042 |
d54db337fde3705adbb13ccaede5088e82bf5ae5 | 37,484 | py | Python | functions/observatory/http-observatory/httpobs/scanner/analyzer/headers.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | null | null | null | functions/observatory/http-observatory/httpobs/scanner/analyzer/headers.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 4 | 2021-02-12T09:50:38.000Z | 2021-06-17T10:33:09.000Z | functions/observatory/http-observatory/httpobs/scanner/analyzer/headers.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 2 | 2021-02-22T09:29:28.000Z | 2021-06-12T13:54:18.000Z | from urllib.parse import urlparse
from httpobs.scanner.analyzer.decorators import scored_test
from httpobs.scanner.analyzer.utils import is_hpkp_preloaded, is_hsts_preloaded, only_if_worse
# Ignore the CloudFlare __cfduid tracking cookies. They *are* actually bad, but it is out of a site's
# control. See https://gi... | 44.465006 | 119 | 0.616983 |
d54dbe277768f02264df678b42102468a22f61ed | 7,560 | py | Python | gslib/tests/test_stet_util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/tests/test_stet_util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/tests/test_stet_util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 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 require... | 40.427807 | 80 | 0.691931 |
d54dc6498b3e2c6f5d21fcc488ffa7ab9f161a13 | 6,848 | py | Python | tools/scripts/update-bumpenvs-yaml.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | 1 | 2021-03-29T04:25:27.000Z | 2021-03-29T04:25:27.000Z | tools/scripts/update-bumpenvs-yaml.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | null | null | null | tools/scripts/update-bumpenvs-yaml.py | hexieshenghuo/determined | 1e0948d89373ac26e3134c94591114c0951090d6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
Read the artifacts generated by a particular commit of the environments repo,
parse out the various image tags, and update a yaml file with the appropriate
values (probably bumpenvs.yaml).
So if before running this script, the yaml file looked like this:
some_image:
old: a123
... | 30.435556 | 94 | 0.626898 |
d54ea23901884b5834cef7a129944fbcfc8e8314 | 22,301 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/winnow/module_reducer.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/torch/src/python/aimet_torch/winnow/module_reducer.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/torch/src/python/aimet_torch/winnow/module_reducer.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
#
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modificati... | 44.512974 | 144 | 0.6897 |
d54ec7af11a506dc4885b10cd78e361360fcd3be | 1,144 | py | Python | Plug-and-play module/attention/scSE/cSE.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | Plug-and-play module/attention/scSE/cSE.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | Plug-and-play module/attention/scSE/cSE.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | import torch
import torch.nn as nn
class cSE(nn.Module):
def __init__(self, in_channels):
super().__init__()
self.avgpool = nn.AdaptiveAvgPool2d(1)
self.Conv_Squeeze = nn.Conv2d(in_channels,
in_channels // 2,
kerne... | 32.685714 | 68 | 0.472902 |
d54ed5646950655f514e618ba38a08eee95f88ae | 12,435 | py | Python | criscas/model.py | zxChouSean/crispr | 44ee95df403a9822f97ba18cbe4449e5cb116eac | [
"MIT"
] | 5 | 2021-11-15T06:46:55.000Z | 2022-03-04T06:47:57.000Z | criscas/model.py | zxChouSean/crispr | 44ee95df403a9822f97ba18cbe4449e5cb116eac | [
"MIT"
] | null | null | null | criscas/model.py | zxChouSean/crispr | 44ee95df403a9822f97ba18cbe4449e5cb116eac | [
"MIT"
] | 3 | 2021-09-02T02:18:41.000Z | 2021-09-18T13:32:09.000Z | import numpy as np
import torch
from torch import nn
class SH_SelfAttention(nn.Module):
""" single head self-attention module
"""
def __init__(self, input_size):
super().__init__()
# define query, key and value transformation matrices
# usually input_size is equal to embed_... | 37.796353 | 120 | 0.604503 |
d54ee77da98012002a6bc66285e1b95bbf699d47 | 2,165 | py | Python | GUI/WifiMonitor/plot (copy).py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | 1 | 2019-10-15T20:31:39.000Z | 2019-10-15T20:31:39.000Z | GUI/WifiMonitor/plot (copy).py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | GUI/WifiMonitor/plot (copy).py | gchinellato/XD | f6c0134030c5e229a7b9c2621311c5204aed77af | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import time
import queue
import logging
import matplotlib.pyplot as plt
import numpy as np
import threading
from PyQt5 import QtGui, QtCore, QtWidgets
import random
class Plot(QtCore.QThread):
def __init__(self, parent = None):
QtCore.QThread.__init__(self, parent)
self.parent =... | 31.376812 | 71 | 0.569977 |
d54f19dc2e0a706143fd698258e1d3da799ae8ce | 5,564 | py | Python | archive/nexus-api-v2/API/ASGI/HTTP.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/API/ASGI/HTTP.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/API/ASGI/HTTP.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | """
HTTP Methods
DELETE, GET, HEAD, POST, PUT, CONNECT, OPTIONS, TRACE, COPY,
LOCK, MKCOL, MOVE, PROPFIND, PROPPATCH, SEARCH, UNLOCK, BIND,
REBIND, UNBIND, ACL, REPORT, MKACTIVITY, CHECKOUT, MERGE,
MSEARCH, NOTIFY, SUBSCRIBE, UNSUBSCRIBE, PATCH, PURGE, MKCALENDAR,
LINK, UNLINK
URL Schem... | 38.372414 | 95 | 0.639648 |
d54f26b32d0eb5bcade7ef8de27dc1f3c194fa0b | 1,341 | py | Python | setup.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | setup.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | setup.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | """
binder
~~~~~~
binder is a learning social network. It helps you find and learn with
other students. Give it a whirl. Sign up today!
binder is also open source software and available under the MIT license.
:copyright: (c) 2015 by Ananth Bhaskararaman
:license: MIT, see LICENSE for more... | 23.12069 | 76 | 0.618195 |
d54f4168f2b2220d10a2412061f2159b869ceed8 | 476 | py | Python | project/lint/tests/test_analyzers_result.py | yumike/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 4 | 2015-06-22T13:30:00.000Z | 2020-03-19T07:17:12.000Z | project/lint/tests/test_analyzers_result.py | netoxico/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 3 | 2020-02-12T01:17:37.000Z | 2021-06-10T20:37:44.000Z | project/lint/tests/test_analyzers_result.py | netoxico/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 1 | 2015-09-18T10:45:45.000Z | 2015-09-18T10:45:45.000Z | from django.test import TestCase
from ..analyzers.base import Result, CodeSnippet
class ResultTests(TestCase):
def test_init(self):
result = Result('simple result', 'app/models.py', 2)
self.assertEqual(result.description, 'simple result')
self.assertEqual(result.path, 'app/models.py')
... | 34 | 61 | 0.710084 |
d54f43d4503663a3715feed356235cac5132b955 | 24 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/PowersSelect/powers_select.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/PowersSelect/powers_select.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/PowersSelect/powers_select.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class PowersSelect: pass | 24 | 24 | 0.875 |
d54f91f86eaaf4c353a29b34ad21884f9741a0bd | 393 | py | Python | modules/onode/storage.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 4 | 2015-05-21T20:21:26.000Z | 2020-12-18T06:50:06.000Z | modules/onode/storage.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | null | null | null | modules/onode/storage.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 1 | 2016-02-08T00:43:44.000Z | 2016-02-08T00:43:44.000Z | from __future__ import absolute_import
from func.minion.modules import func_module
import func.minion.modules.onode
from func.minion.modules.onode.common import delegate_methods
class Storage(func_module.FuncModule):
version = "0.0.1"
api_version = "0.0.1"
description = "opennode storage module"
from o... | 24.5625 | 61 | 0.788804 |
d54f9276a7255babeb66654e2cda2328e1d76883 | 1,886 | py | Python | python/math/0840_magic_squares_in_grid.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/math/0840_magic_squares_in_grid.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/math/0840_magic_squares_in_grid.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def numMagicSquaresInside(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
res = 0
m, n = len(grid), len(grid[0])
for i in range(1, m - 1):
for j in range(1, n - 1):
if grid[i][j] != 5:
... | 34.925926 | 71 | 0.299576 |
d54f9c1f060aae51ce2ed61f2e12dae1e153907e | 2,558 | py | Python | dopamine/thesis/scratch/dqmax_agent_run.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | dopamine/thesis/scratch/dqmax_agent_run.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | dopamine/thesis/scratch/dqmax_agent_run.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | import time
import gym
from aim import Run
from dopamine.jax import losses
from jax import numpy as jnp
from thesis import experiment_data as ed
from thesis.jax import networks, optimizers
from thesis.jax.agents.dqv_family import dqv_max_agent
from thesis.tests import simple_runner as sr
# from functools import parti... | 24.132075 | 71 | 0.615324 |
d54fff31094ff409cc0e956bbffc50bafa17b6b2 | 1,815 | py | Python | gwlfe/MultiUse_Fxns/Discharge/Flow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/MultiUse_Fxns/Discharge/Flow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/MultiUse_Fxns/Discharge/Flow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import zeros
from gwlfe.Input.WaterBudget.GrFlow import GrFlow
from gwlfe.Input.WaterBudget.GrFlow import GrFlow_f
# from Timer import time_function
from gwlfe.MultiUse_Fxns.Discharge.QTotal import QTotal
from gwlfe.MultiUse_Fxns.Discharge.QTotal import QTotal_f
# @memoize
def Flow(NYrs, DaysMonth, Temp, ... | 53.382353 | 119 | 0.663912 |
d5501006cee718b2539a384bc655d85bd3edc16a | 17,332 | py | Python | openDAM/dataio/GME_xml_importer.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 15 | 2018-09-18T23:28:41.000Z | 2022-01-11T12:44:10.000Z | openDAM/dataio/GME_xml_importer.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 2 | 2018-07-06T13:18:59.000Z | 2018-07-11T08:53:29.000Z | openDAM/dataio/GME_xml_importer.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 3 | 2020-06-02T04:16:54.000Z | 2021-02-22T10:52:06.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sqlite3
from argparse import ArgumentParser
from lxml import etree
import zipfile
import os
import pandas as pd
from openDAM.dataio.create_dam_db_from_csv import create_tables, insert_in_table
PUN_ZONES = ("NORD", "CNOR", "CSUD", "SUD", "SICI", "SARD")
COUPLING_ZO... | 38.176211 | 116 | 0.558505 |
d55035767ef298b0700c8d33b5c9bb69f4454ba7 | 1,976 | py | Python | sunpy/map/sources/iris.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/map/sources/iris.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/map/sources/iris.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
import numpy as np
from sunpy.map import GenericMap
__all__ = ['SJIMap']
class SJIMap(GenericMap):
"""
A 2D IRIS Slit Jaw Imager Map.
The Interface Region Imaging Spectrograph (IRIS) small explorer spacecraft
provides simultaneous spectra and images of the ph... | 35.927273 | 79 | 0.681174 |
d5508309541679e0d0eae5885ef2bbc2026f9122 | 20,011 | py | Python | saas/api/transactions.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | null | null | null | saas/api/transactions.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | 4 | 2021-04-08T21:56:58.000Z | 2022-02-10T13:26:56.000Z | saas/api/transactions.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2020, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 34.09029 | 80 | 0.605817 |
d550886e2792898a47ae57f69924c069cc009358 | 1,173 | py | Python | src/appengine/handlers/report_csp_failure.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-12-30T07:00:55.000Z | 2021-03-16T10:55:05.000Z | src/appengine/handlers/report_csp_failure.py | M31MOTH/clusterfuzz | a614d2e09238f11ae578337e10dfeaba38dcae76 | [
"Apache-2.0"
] | 34 | 2020-08-18T18:47:00.000Z | 2021-07-14T07:47:35.000Z | src/appengine/handlers/report_csp_failure.py | gaybro8777/clusterfuzz | fb053896ee5b5f1468479e75223c07b4281a72d3 | [
"Apache-2.0"
] | 1 | 2020-04-25T16:37:10.000Z | 2020-04-25T16:37:10.000Z | # Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.5 | 74 | 0.748508 |
d5508a815540f8d2c6bb9dcccc932f6bc35363f8 | 1,160 | py | Python | docs/build/html/xas/xas_ft-3.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | 8 | 2021-07-11T22:54:21.000Z | 2022-02-16T20:22:25.000Z | docs/build/html/xas/xas_ft-3.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | null | null | null | docs/build/html/xas/xas_ft-3.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | null | null | null | from araucaria.testdata import get_testpath
from araucaria import Group
from araucaria.io import read_dnd
from araucaria.xas import pre_edge, autobk, xftf, xftr
from araucaria.utils import check_objattrs
kw = 2
k_range = [2,10]
r_range = [0.5, 2]
fpath = get_testpath('dnd_testfile1.dat')
group = read_dnd(fpath... | 37.419355 | 70 | 0.721552 |
d5509c572ce03cb4f2eaf31bc4735041304a8251 | 789 | py | Python | eland/tests/dataframe/test_shape_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | eland/tests/dataframe/test_shape_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:34:25.000Z | 2020-05-06T01:34:25.000Z | eland/tests/dataframe/test_shape_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:31:18.000Z | 2020-05-06T01:31:18.000Z | # Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
# File called _pytest for PyCharm compatability
from eland.tests.common import TestData
class TestDataFrameShape(T... | 28.178571 | 75 | 0.709759 |
d5509dfb142eddd6de864d020af72891984df88d | 33,212 | py | Python | ote_sdk/ote_sdk/usecases/evaluation/f_measure.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 775 | 2019-03-01T02:13:33.000Z | 2020-09-07T22:49:15.000Z | ote_sdk/ote_sdk/usecases/evaluation/f_measure.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 229 | 2019-02-28T21:37:08.000Z | 2020-09-07T15:11:49.000Z | ote_sdk/ote_sdk/usecases/evaluation/f_measure.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 290 | 2019-02-28T20:32:11.000Z | 2020-09-07T05:51:41.000Z | """ This module contains the f-measure performance provider class. """
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import logging
from typing import Dict, List, Optional, Sequence, Tuple, Union
import numpy as np
from ote_sdk.entities.annotation import Annotation
from ote_sd... | 39.165094 | 120 | 0.633566 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.