hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbe9a1720b8af76b0bda0a31d14b5c3804ae9d47 | 735 | py | Python | approvaltests/reporters/introduction_reporter.py | SwamyDev/ApprovalTests.Python | f857f18420e8d8a6859e17d128f47c143bc4e588 | [
"Apache-2.0"
] | null | null | null | approvaltests/reporters/introduction_reporter.py | SwamyDev/ApprovalTests.Python | f857f18420e8d8a6859e17d128f47c143bc4e588 | [
"Apache-2.0"
] | null | null | null | approvaltests/reporters/introduction_reporter.py | SwamyDev/ApprovalTests.Python | f857f18420e8d8a6859e17d128f47c143bc4e588 | [
"Apache-2.0"
] | null | null | null | from approvaltests.core.reporter import Reporter
from approvaltests.reporters.python_native_reporter import PythonNativeReporter
class IntroductionReporter(Reporter):
def report(self, received_path: str, approved_path: str) -> bool:
print(self.get_text())
return PythonNativeReporter().report(rece... | 36.75 | 153 | 0.727891 |
992a2416ddd5a2f449853822e6934429d3296283 | 554 | py | Python | saw/parsers/paragraphs.py | diNard/Saw | 7ed8cbfa243e638eac77cf83e72907be3d19fa1e | [
"MIT"
] | 3 | 2015-01-13T14:33:02.000Z | 2015-06-18T04:53:16.000Z | saw/parsers/paragraphs.py | diNard/Saw | 7ed8cbfa243e638eac77cf83e72907be3d19fa1e | [
"MIT"
] | null | null | null | saw/parsers/paragraphs.py | diNard/Saw | 7ed8cbfa243e638eac77cf83e72907be3d19fa1e | [
"MIT"
] | null | null | null | from saw.parsers.sentences import Parser, Sentences
class Paragraphs(Parser):
_child_class = Sentences
@classmethod
def parse(cls, text):
items = text.split("\n")
result, tmp = [], []
for item in items:
_item = item.strip()
if _item != '':
r... | 25.181818 | 57 | 0.512635 |
4d81509866fa11c4d5af7348f4ae12bdd4e0c80c | 18,697 | py | Python | parser/fase2/team28/models/instructions/DML/dml_instr.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 3 | 2020-12-19T03:48:51.000Z | 2021-10-06T03:42:30.000Z | parser/fase2/team28/models/instructions/DML/dml_instr.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | null | null | null | parser/fase2/team28/models/instructions/DML/dml_instr.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 1 | 2022-02-16T04:25:00.000Z | 2022-02-16T04:25:00.000Z | import pandas as pd
from models.instructions.shared import Instruction
from models.instructions.DDL.table_inst import CreateTB
from models.instructions.DML.special_functions import loop_list
from controllers.type_checker import TypeChecker
from controllers.symbol_table import SymbolTable
from controllers.error_control... | 39.696391 | 163 | 0.537573 |
a7381f35bbe93e3d5685bb64e2ea719b02b36076 | 18,153 | py | Python | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/13-sender_receiver_17.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/13-sender_receiver_17.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/13-sender_receiver_17.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 38.459746 | 89 | 0.574561 |
ffd053c02fb40ec61406ed8e2034edbbe04500b7 | 48,017 | py | Python | tensorflow/python/keras/engine/topology_test.py | ranbir/tensorflow | 46924b2f7bc4262b2c4b36841d393741113594ca | [
"Apache-2.0"
] | 5 | 2019-06-24T14:16:08.000Z | 2022-03-17T04:35:40.000Z | tensorflow/python/keras/engine/topology_test.py | ranbir/tensorflow | 46924b2f7bc4262b2c4b36841d393741113594ca | [
"Apache-2.0"
] | 1 | 2019-09-14T04:40:07.000Z | 2020-11-18T18:16:17.000Z | tensorflow/python/keras/engine/topology_test.py | ranbir/tensorflow | 46924b2f7bc4262b2c4b36841d393741113594ca | [
"Apache-2.0"
] | 1 | 2021-12-21T04:46:40.000Z | 2021-12-21T04:46:40.000Z | # 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 applica... | 36.851113 | 80 | 0.661141 |
6311a5dd14eccfd038b2d5948f26adab0101cb9b | 14,590 | py | Python | src/jinja2/sandbox.py | Alramiro4/jinja | d73a10bafd7d50f0dd96090dcd1ddd9012ef7139 | [
"BSD-3-Clause"
] | 1 | 2021-11-25T07:01:35.000Z | 2021-11-25T07:01:35.000Z | src/jinja2/sandbox.py | Alramiro4/jinja | d73a10bafd7d50f0dd96090dcd1ddd9012ef7139 | [
"BSD-3-Clause"
] | null | null | null | src/jinja2/sandbox.py | Alramiro4/jinja | d73a10bafd7d50f0dd96090dcd1ddd9012ef7139 | [
"BSD-3-Clause"
] | null | null | null | """A sandbox layer that ensures unsafe operations cannot be performed.
Useful when the template itself comes from an untrusted source.
"""
import operator
import types
from _string import formatter_field_name_split # type: ignore
from collections import abc
from collections import deque
from string import Formatter
fr... | 34.57346 | 88 | 0.628033 |
d6dce68e689e1505f1c0922aa730a0a8a9966b64 | 4,319 | py | Python | src/tasks/advent_of_code_21/day4.py | JNMaree/solvdoku | d7cbce8618b5a94db8781d88cf3db102e728f4f6 | [
"Unlicense"
] | null | null | null | src/tasks/advent_of_code_21/day4.py | JNMaree/solvdoku | d7cbce8618b5a94db8781d88cf3db102e728f4f6 | [
"Unlicense"
] | 2 | 2021-07-04T21:01:17.000Z | 2021-11-29T21:12:23.000Z | src/tasks/advent_of_code_21/day4.py | JNMaree/solvdoku | d7cbce8618b5a94db8781d88cf3db102e728f4f6 | [
"Unlicense"
] | null | null | null | import numpy as np
class BingoBoard:
array = []
size = 5
check = True
def __init__(self, boardtext) -> None:
self.array = np.zeros((self.size,self.size,2))
board = boardtext.split()
bct = 0
#print(f"board:{board}")
for i in range(self.size):
for j... | 31.297101 | 89 | 0.477194 |
bce24c505fc5823b2f508f52ed4e846fd64494ab | 2,229 | py | Python | setup.py | dotsdl/test_package_a | 33e50168e95b80f2d5de16be6787bff43e287493 | [
"MIT"
] | null | null | null | setup.py | dotsdl/test_package_a | 33e50168e95b80f2d5de16be6787bff43e287493 | [
"MIT"
] | null | null | null | setup.py | dotsdl/test_package_a | 33e50168e95b80f2d5de16be6787bff43e287493 | [
"MIT"
] | null | null | null | """
test_package_a
The first of two pages to test implicit namespaces
"""
import sys
from setuptools import setup, find_namespace_packages
import versioneer
short_description = __doc__.split("\n")
# from https://github.com/pytest-dev/pytest-runner#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.inter... | 37.15 | 118 | 0.703454 |
04a03a0b3ecb32dfdd4945dbba17fc813c0fe83d | 14,157 | py | Python | envs/flatland/observations/custom_graph_obs.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | 4 | 2021-01-15T10:49:33.000Z | 2021-12-31T08:11:35.000Z | envs/flatland/observations/custom_graph_obs.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | null | null | null | envs/flatland/observations/custom_graph_obs.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | null | null | null | import numpy as np
import gym
from flatland.core.env_observation_builder import ObservationBuilder
from flatland.core.env_prediction_builder import PredictionBuilder
from flatland.core.grid.grid_utils import coordinate_to_position
from flatland.envs.agent_utils import RailAgentStatus
from flatland.envs.rail_env import ... | 55.517647 | 138 | 0.579431 |
9d716c5c32c36f4e7761f0cb188e9fc1268396fa | 26,905 | py | Python | test/functional/wallet_bumpfee.py | chrisandrewca/namecoin-core | 2f2bfb323e7e19512697039753c0675dacbb6dec | [
"MIT"
] | null | null | null | test/functional/wallet_bumpfee.py | chrisandrewca/namecoin-core | 2f2bfb323e7e19512697039753c0675dacbb6dec | [
"MIT"
] | null | null | null | test/functional/wallet_bumpfee.py | chrisandrewca/namecoin-core | 2f2bfb323e7e19512697039753c0675dacbb6dec | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC.
Verifies that the bumpfee RPC creates replacement transactions successfully when... | 48.477477 | 247 | 0.722579 |
b267f6f733e4a1a46004840f5fcd6fa5d0bf17b0 | 697 | py | Python | academic/schools/models.py | sebastiansalazar123/final | 85e9b822919d946b250070ac63504b2270e59ad1 | [
"MIT"
] | null | null | null | academic/schools/models.py | sebastiansalazar123/final | 85e9b822919d946b250070ac63504b2270e59ad1 | [
"MIT"
] | null | null | null | academic/schools/models.py | sebastiansalazar123/final | 85e9b822919d946b250070ac63504b2270e59ad1 | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models.base import Model
class student(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
code = models.CharField(max_length=10)
created_at = models.DateTimeField()
class subject(models.Model) :
n... | 33.190476 | 69 | 0.748924 |
c097e6e512d909a5e03ed522563a214aab76d920 | 2,130 | py | Python | jazzpos/forms.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | 5 | 2015-12-05T15:39:51.000Z | 2020-09-16T20:14:29.000Z | jazzpos/forms.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | null | null | null | jazzpos/forms.py | AhmadManzoor/jazzpos | 7b771095b8df52d036657f33f36a97efb575d36c | [
"MIT"
] | 2 | 2019-11-23T17:47:46.000Z | 2022-01-14T11:05:21.000Z | from django import forms
from xpos.forms import RequestModelForm
from jazzpos.models import Customer, Patient, Treatment, StoreSettings
DATE_FORMAT = (
"%d-%m-%Y",
)
class CustomerForm(RequestModelForm):
refferer = forms.IntegerField(required=False)
def __init__(self, *args, **kwargs):
super(Cu... | 32.769231 | 81 | 0.582629 |
0d63ac227ea8ad83d3318947c7f8856cf24089d4 | 8,211 | py | Python | atomicswap/ecdsa.py | y-chan/atomicswap-qt | 5bab6d301177aaf7487236597f75efb1172e6450 | [
"MIT"
] | 14 | 2020-01-12T07:43:31.000Z | 2020-09-10T23:50:53.000Z | atomicswap/ecdsa.py | atomicswap-network/atomicswap-qt | 4379deda0840ca305d8cc20b0337a7d3517eb6a3 | [
"MIT"
] | 12 | 2020-01-12T10:33:58.000Z | 2020-02-06T04:35:27.000Z | atomicswap/ecdsa.py | atomicswap-network/atomicswap-qt | 4379deda0840ca305d8cc20b0337a7d3517eb6a3 | [
"MIT"
] | 4 | 2020-01-28T03:17:32.000Z | 2021-08-09T22:14:40.000Z | # Copyright (c) 2010-2020 The Go Authors
# Copyright (c) 2014-2020 The btcsuite developers
# Copyright (c) 2019-2020 The atomicswap-qt developers
#
# 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 Soft... | 26.659091 | 95 | 0.564974 |
9476586f3c52229ac088f68a10578e5bf129d58f | 296 | py | Python | build/repo/root_dir/finder.py | fifoforlifo/nstd | 68f5b370e10b2d1e078027ecbc040b7eaa9e08aa | [
"BSL-1.0"
] | null | null | null | build/repo/root_dir/finder.py | fifoforlifo/nstd | 68f5b370e10b2d1e078027ecbc040b7eaa9e08aa | [
"BSL-1.0"
] | null | null | null | build/repo/root_dir/finder.py | fifoforlifo/nstd | 68f5b370e10b2d1e078027ecbc040b7eaa9e08aa | [
"BSL-1.0"
] | null | null | null | # This file is intentionally in a directory that is not located in sys.path.
# That causes the python runtime to return an absolute path for __file__.
import os
def get_root_dir():
absDir = os.path.dirname(__file__)
rootDir = os.path.normpath(absDir + "../../../..")
return rootDir
| 29.6 | 76 | 0.706081 |
49b712cd9d0438fa641c910d7378efd29aea5763 | 3,409 | py | Python | nameko/nameko/cli/commands.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | 2 | 2017-07-11T18:56:27.000Z | 2017-07-28T14:01:12.000Z | nameko/cli/commands.py | appetito/nameko | 960f2864c476d40469cbc0412927000517f739d4 | [
"Apache-2.0"
] | 1 | 2017-07-28T13:53:41.000Z | 2017-07-31T15:30:40.000Z | nameko/nameko/cli/commands.py | Alecto3-D/testable-greeter | 09e8e488edfb7e46cf5867b2b5a6ebe0b1929f78 | [
"MIT"
] | null | null | null | """Commands are defined in here, with imports inline, to avoid triggering
imports from other subcommands (e.g. `run` will cause an eventlet monkey-patch
which we don't want for `shell`)
"""
from .actions import FlagAction
class Command(object):
name = None
@staticmethod
def init_parser(parser):
... | 28.173554 | 78 | 0.624523 |
a1b1a75f67a498a33198e4b92ee3bd1c492497f9 | 1,136 | py | Python | vigil/migrations/0014_auto_20180228_1321.py | inuitwallet/vigil | 0367237edf96587c4101b909a7d748ba215b309a | [
"MIT"
] | null | null | null | vigil/migrations/0014_auto_20180228_1321.py | inuitwallet/vigil | 0367237edf96587c4101b909a7d748ba215b309a | [
"MIT"
] | 8 | 2020-06-06T06:34:55.000Z | 2021-09-22T19:43:55.000Z | vigil/migrations/0014_auto_20180228_1321.py | inuitwallet/vigil | 0367237edf96587c4101b909a7d748ba215b309a | [
"MIT"
] | null | null | null | # Generated by Django 2.0.2 on 2018-02-28 13:21
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('vigil', '0013_auto_20180227_1700'),
]
operations = [
migrations.RenameField(
model_name='alertchannel',
... | 29.128205 | 190 | 0.558099 |
7d1eb34d3b91b3e75466c80eb0b4e969e82302be | 34,176 | py | Python | test/functional/rpc_fundrawtransaction.py | kadirada/wtf | 00a6d423ec2b9776f51eb8dddeaf6a96050564f3 | [
"MIT"
] | null | null | null | test/functional/rpc_fundrawtransaction.py | kadirada/wtf | 00a6d423ec2b9776f51eb8dddeaf6a96050564f3 | [
"MIT"
] | null | null | null | test/functional/rpc_fundrawtransaction.py | kadirada/wtf | 00a6d423ec2b9776f51eb8dddeaf6a96050564f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from decimal import Decimal
from test_framework.test_framework imp... | 45.146631 | 223 | 0.574731 |
bd7072639522561c0c07baea58ef7bc83e0ae898 | 6,944 | py | Python | h/db/types.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | h/db/types.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | h/db/types.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | """Custom SQLAlchemy types for use with the Annotations API database."""
import base64
import binascii
import uuid
from sqlalchemy import types
from sqlalchemy.dialects import postgresql
from sqlalchemy.exc import DontWrapMixin
# A magic byte (expressed as two hexadecimal nibbles) which we use to expand a
# 15-byte E... | 31.139013 | 88 | 0.673963 |
ad5fabd716cf1bd5b20b452d4b6db525438fa08d | 405 | py | Python | 1684-count-the-number-of-consistent-strings/1684-count-the-number-of-consistent-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1684-count-the-number-of-consistent-strings/1684-count-the-number-of-consistent-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1684-count-the-number-of-consistent-strings/1684-count-the-number-of-consistent-strings.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def countConsistentStrings(self, allowed: str, words: List[str]) -> int:
result=0
for word in words:
cur = set(c for c in word)
checked=False
for each in cur:
if each not in allowed:
checked=True
... | 31.153846 | 76 | 0.479012 |
20dccc838b334bc2334df71150e45565e259a599 | 1,978 | py | Python | sdk/ml/azure-ai-ml/azure/ai/ml/entities/_endpoint/_endpoint_helpers.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/ml/azure-ai-ml/azure/ai/ml/entities/_endpoint/_endpoint_helpers.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/ml/azure-ai-ml/azure/ai/ml/entities/_endpoint/_endpoint_helpers.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import re
from azure.ai.ml.constants import OnlineEndpointConfigurations
from azure.ai.ml._ml_exceptions import ErrorCategory, ErrorTarget... | 47.095238 | 140 | 0.674924 |
54ccff3afe407e5e6e80c7081881656ee6a08585 | 14,294 | py | Python | translate/train_bead_cv.py | shenghh2015/segmentation_models | 473c528c724f62ff38ac127747dd8babb7de6b85 | [
"MIT"
] | null | null | null | translate/train_bead_cv.py | shenghh2015/segmentation_models | 473c528c724f62ff38ac127747dd8babb7de6b85 | [
"MIT"
] | null | null | null | translate/train_bead_cv.py | shenghh2015/segmentation_models | 473c528c724f62ff38ac127747dd8babb7de6b85 | [
"MIT"
] | null | null | null | import os
import cv2
from skimage import io
import sys
# import keras
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import argparse
from natsort import natsorted
# sys.path.append('../')
import segmentation_models_v1 as sm
from segmentation_models_v1 import Unet, Linknet, PSPNet, FPN, AtUne... | 34.52657 | 230 | 0.660697 |
5cee99c9c34a27ca9fba6f099499e7f8c6a1f639 | 2,066 | py | Python | drs4Calibration/drs4Calibration_version_1/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | drs4Calibration/drs4Calibration_version_1/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | drs4Calibration/drs4Calibration_version_1/config.py | fact-project/DrsTemperatureCalibration | 3702ee390c16cf2c5930d4a0f24c1354d036d645 | [
"MIT"
] | null | null | null | from drs4Calibration.drs4Calibration_version_1.constants import NRCHID, NRCELL, ROI, NRTEMPSENSOR
# data_collection .h5 stuff
class data_collection_config:
column_names = ['TimeBaseline', 'TempBaseline', 'Baseline',
'TimeGain', 'TempGain', 'Gain', 'GainStd']
column_dtype = {'TimeBaseline... | 33.868852 | 97 | 0.556631 |
34009cae6ff47c5b706b22ff6f0f01f7d7be62af | 10,085 | py | Python | python/helpers/pydev/_pydev_runfiles/pydev_runfiles_parallel.py | tgodzik/intellij-community | f5ef4191fc30b69db945633951fb160c1cfb7b6f | [
"Apache-2.0"
] | 349 | 2019-05-07T00:15:12.000Z | 2022-03-10T15:05:08.000Z | python/helpers/pydev/_pydev_runfiles/pydev_runfiles_parallel.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 1,095 | 2018-03-01T00:50:11.000Z | 2019-05-06T17:44:15.000Z | python/helpers/pydev/_pydev_runfiles/pydev_runfiles_parallel.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 53 | 2018-03-01T00:33:57.000Z | 2019-05-05T00:50:23.000Z | import unittest
from _pydev_imps._pydev_saved_modules import thread
try:
import Queue
except:
import queue as Queue #@UnresolvedImport
from _pydev_runfiles import pydev_runfiles_xml_rpc
import time
import os
import threading
import sys
#==========================================================================... | 33.956229 | 122 | 0.564799 |
a215be314677815d71f66745f772820b9b5c373e | 1,741 | py | Python | arrays/lonely_number.py | kandarpck/leetcode | d2ffcccede5d1543aea48f18a39cdbd3d83e3ed8 | [
"MIT"
] | null | null | null | arrays/lonely_number.py | kandarpck/leetcode | d2ffcccede5d1543aea48f18a39cdbd3d83e3ed8 | [
"MIT"
] | null | null | null | arrays/lonely_number.py | kandarpck/leetcode | d2ffcccede5d1543aea48f18a39cdbd3d83e3ed8 | [
"MIT"
] | null | null | null | from collections import Counter
class Solution(object):
def singleNumber(self, nums):
"""
Time N^2
Space 1
:type nums: List[int]
:rtype: int
"""
for i in range(len(nums)):
duplicate = False
for j in range(len(nums)):
... | 22.61039 | 54 | 0.482481 |
54cb3723404f368024fe7de356bad316c11edad3 | 5,729 | py | Python | SRcode/AttentionLayers.py | robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network | e151216ca029dc72ab93e03d6bcacd69161d1c25 | [
"MIT"
] | 1 | 2021-12-10T12:50:39.000Z | 2021-12-10T12:50:39.000Z | SRcode/AttentionLayers.py | robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network | e151216ca029dc72ab93e03d6bcacd69161d1c25 | [
"MIT"
] | null | null | null | SRcode/AttentionLayers.py | robotic-vision-lab/Attention-With-Varying-Receptive-Fields-Network | e151216ca029dc72ab93e03d6bcacd69161d1c25 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import tensorflow.keras as keras
from tensorflow.keras import datasets, layers, models, regularizers
from pdb import set_trace as trace
class Channel_Attention(layers.Layer):
"""
Channel Attention Layer
"""
def __init__(self, filters, reduction=... | 45.110236 | 90 | 0.500611 |
b37715b618acd59cac49d7aa38dc281b6724c602 | 1,159 | py | Python | cogs/anime.py | kach17/discord-bot | 6a77748332802e4bfb84f57713363b59d97aa679 | [
"MIT"
] | 3 | 2021-05-21T13:48:13.000Z | 2022-02-01T05:43:51.000Z | cogs/anime.py | kach17/Discord-bot-python | 6a77748332802e4bfb84f57713363b59d97aa679 | [
"MIT"
] | null | null | null | cogs/anime.py | kach17/Discord-bot-python | 6a77748332802e4bfb84f57713363b59d97aa679 | [
"MIT"
] | 3 | 2021-05-22T18:49:39.000Z | 2022-02-23T08:30:34.000Z | import discord
from discord.ext import commands
import requests
class AnimeCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="anime")
async def anime(self, ctx, *, arg):
argument = str(arg)
results = requests.get(f"https://api.jikan.moe/v3/search/anime?q={argument}&li... | 38.633333 | 176 | 0.639344 |
3012ff58e280c08bf101b9eb5d6c1947877e1086 | 225 | py | Python | terrascript/influxdb/r.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/influxdb/r.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/influxdb/r.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/influxdb/r.py
import terrascript
class influxdb_database(terrascript.Resource):
pass
class influxdb_user(terrascript.Resource):
pass
class influxdb_continuous_query(terrascript.Resource):
pass
| 15 | 54 | 0.791111 |
ff97518e0b1c2659201fe2e7ace80ae37b872cb2 | 1,260 | py | Python | bridges/icon/bridge/tests/test_merkle_parts.py | vutting4221/bandchain | 47d6cbb2923d9e8651a3ff03ae1d979458067c5d | [
"Apache-2.0"
] | 251 | 2018-08-03T04:07:16.000Z | 2022-03-27T09:12:38.000Z | bridges/icon/bridge/tests/test_merkle_parts.py | vutting4221/bandchain | 47d6cbb2923d9e8651a3ff03ae1d979458067c5d | [
"Apache-2.0"
] | 2,935 | 2018-08-03T08:59:20.000Z | 2022-03-25T23:44:55.000Z | bridges/icon/bridge/tests/test_merkle_parts.py | vutting4221/bandchain | 47d6cbb2923d9e8651a3ff03ae1d979458067c5d | [
"Apache-2.0"
] | 57 | 2018-08-16T08:10:04.000Z | 2022-03-30T06:16:11.000Z | from ..utils import merkle_part
from tbears.libs.scoretest.score_test_case import ScoreTestCase
class TestBlockHeaderMerkleParts(ScoreTestCase):
def setUp(self):
super().setUp()
def test_get_block_header(self):
data = b''
data += bytes.fromhex(
"32fa694879095840619f5e4938... | 37.058824 | 88 | 0.680159 |
cc0a3e06c921a720839160700fa1cfda7495a8d4 | 61,838 | py | Python | tests/pmap_test.py | joschkabraun/jax | 4f3011f3204dc9b36ed4d9de883ea31c1a6bad40 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-04-06T11:42:04.000Z | 2021-04-06T11:42:04.000Z | tests/pmap_test.py | jg8610/jax | 2a9c2d22cfbaae1c6255e47be0afa7c370910ea3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/pmap_test.py | jg8610/jax | 2a9c2d22cfbaae1c6255e47be0afa7c370910ea3 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2018 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, ... | 36.353909 | 92 | 0.615867 |
00ae96317bc3cb28b1bad4cae154b83219576d0f | 30,589 | py | Python | ufedmm/cvlib.py | craabreu/ufedmm | 0c3cb7730d7fbc7dcaddcd2f9c86324ad6457be5 | [
"MIT"
] | 5 | 2020-04-22T14:51:39.000Z | 2021-11-26T23:28:46.000Z | ufedmm/cvlib.py | craabreu/ufedmm | 0c3cb7730d7fbc7dcaddcd2f9c86324ad6457be5 | [
"MIT"
] | 9 | 2020-04-23T16:40:56.000Z | 2021-09-17T18:20:51.000Z | ufedmm/cvlib.py | craabreu/ufedmm | 0c3cb7730d7fbc7dcaddcd2f9c86324ad6457be5 | [
"MIT"
] | 4 | 2020-04-20T19:06:31.000Z | 2022-03-06T20:05:48.000Z | """
.. module:: cvlib
:platform: Unix, Windows
:synopsis: A collection of custom collective variables
.. moduleauthor:: Charlles Abreu <abreu@eq.ufrj.br>
.. _Context: http://docs.openmm.org/latest/api-python/generated/simtk.openmm.openmm.Context.html
.. _CustomCVForce: http://docs.openmm.org/latest/api-python/g... | 42.781818 | 114 | 0.61836 |
79e141a42699ecad6802794e90e705086ca94a8a | 442 | py | Python | configs/mmedit/super-resolution/super-resolution_tensorrt_static-256x256.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | 746 | 2021-12-27T10:50:28.000Z | 2022-03-31T13:34:14.000Z | configs/mmedit/super-resolution/super-resolution_tensorrt_static-256x256.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | 253 | 2021-12-28T05:59:13.000Z | 2022-03-31T18:22:25.000Z | configs/mmedit/super-resolution/super-resolution_tensorrt_static-256x256.py | zhiqwang/mmdeploy | 997d111a6f4ca9624ab3b36717748e6ce002037d | [
"Apache-2.0"
] | 147 | 2021-12-27T10:50:33.000Z | 2022-03-30T10:44:20.000Z | _base_ = ['./super-resolution_static.py', '../../_base_/backends/tensorrt.py']
onnx_config = dict(input_shape=[256, 256])
backend_config = dict(
common_config=dict(max_workspace_size=1 << 30),
model_inputs=[
dict(
input_shapes=dict(
input=dict(
min_shape=[... | 34 | 78 | 0.529412 |
684b2c14f8780372c2bfad5bb49cf62b13c3352a | 251 | py | Python | app/__init__.py | configuresystems/restful-api-with-flask | b6e4da905446fac8f899653a6f7a5408d6419fc4 | [
"MIT"
] | 2 | 2015-05-07T18:39:12.000Z | 2016-07-01T20:06:06.000Z | app/__init__.py | configuresystems/restful-api-with-flask | b6e4da905446fac8f899653a6f7a5408d6419fc4 | [
"MIT"
] | null | null | null | app/__init__.py | configuresystems/restful-api-with-flask | b6e4da905446fac8f899653a6f7a5408d6419fc4 | [
"MIT"
] | 2 | 2016-03-02T05:33:51.000Z | 2021-02-24T02:28:26.000Z | from flask import Flask
# instantiate Flask so that we may use it!
app = Flask(__name__)
# Set our application constants via a config.py object
app.config.from_object('config.DevConfiguration')
# Import our master views file
from app import views
| 20.916667 | 54 | 0.780876 |
7ff45e31459b990dafb43dac35cf539aaf965455 | 8,033 | py | Python | solver.py | chenbys/MPRM | 26ae0797c15c095a7712823c899fbeef1df99274 | [
"MIT"
] | null | null | null | solver.py | chenbys/MPRM | 26ae0797c15c095a7712823c899fbeef1df99274 | [
"MIT"
] | null | null | null | solver.py | chenbys/MPRM | 26ae0797c15c095a7712823c899fbeef1df99274 | [
"MIT"
] | null | null | null | from losses import multilabel_soft_margin_loss
from model import fc_resnet50, finetune
from prm.prm import peak_response_mapping, prm_visualize
from optims import sgd_optimizer
import shutil
import time, os
import torch
import numpy as np
from typing import Tuple, List, Union, Dict, Iterable
from torch.autograd import ... | 38.620192 | 111 | 0.574505 |
d74d14ec4f303f9d49b91305627c790201c98a50 | 6,439 | py | Python | test/import_config_test.py | PalmerBSocrata/socrata-py | 794a41bcbe50c7556c670681f5e38cb2366f8dcc | [
"Apache-2.0"
] | null | null | null | test/import_config_test.py | PalmerBSocrata/socrata-py | 794a41bcbe50c7556c670681f5e38cb2366f8dcc | [
"Apache-2.0"
] | null | null | null | test/import_config_test.py | PalmerBSocrata/socrata-py | 794a41bcbe50c7556c670681f5e38cb2366f8dcc | [
"Apache-2.0"
] | null | null | null | import unittest
from socrata import Socrata
from socrata.authorization import Authorization
from test.auth import auth, TestCase
import uuid
from socrata.operations.utils import SocrataException
class ImportConfigTest(TestCase):
def test_create_config(self):
name = "some_config %s" % str(uuid.uuid4())
... | 32.034826 | 75 | 0.533623 |
fb133bf124cfc37f7f2cd720533dc81ca0feb91f | 6,207 | py | Python | cqw2_calibrate/algae_rates_constants.py | rmlz/cqw2calibratio | 23605b40c1b093351fc131e36b1cb941c98530cf | [
"MIT"
] | null | null | null | cqw2_calibrate/algae_rates_constants.py | rmlz/cqw2calibratio | 23605b40c1b093351fc131e36b1cb941c98530cf | [
"MIT"
] | null | null | null | cqw2_calibrate/algae_rates_constants.py | rmlz/cqw2calibratio | 23605b40c1b093351fc131e36b1cb941c98530cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 5 16:30:52 2019
@author: Ramon Barros
CE-QUAL-W2 Calibration Tool v0.0.1
MODEL ALGAE GROUPS RATES & CONSTANTS
paramcontrol(name, calibrate, value, low, high, guess)
name = Parameter or setting name,
calibrate = boolean, True if the parameter must be calibrated (value w... | 55.419643 | 120 | 0.571613 |
6487f18e83c29a9b8ecac6b2faf2328ee130c1ef | 4,585 | py | Python | app/core/models.py | Akshay-ch-dj/RESTapi-app-series | 0a7ca3384e3d8d6b2d1c746b23f95426988a9bf9 | [
"MIT"
] | null | null | null | app/core/models.py | Akshay-ch-dj/RESTapi-app-series | 0a7ca3384e3d8d6b2d1c746b23f95426988a9bf9 | [
"MIT"
] | null | null | null | app/core/models.py | Akshay-ch-dj/RESTapi-app-series | 0a7ca3384e3d8d6b2d1c746b23f95426988a9bf9 | [
"MIT"
] | null | null | null | import uuid
import os
from django.db import models
# The base classes need to use when customizing or overriding Django User model
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
# To add timezone base... | 33.467153 | 79 | 0.686369 |
880648aa5963abbca3e9c5a3040fa310340c7305 | 5,222 | py | Python | docs/source/conf.py | Coldog2333/Financial-NLP | 237d10d0984e8d27ff30ccca9f4be141d585c727 | [
"Apache-2.0"
] | 114 | 2018-08-13T07:11:43.000Z | 2022-03-16T03:53:51.000Z | docs/source/conf.py | Coldog2333/Financial-NLP | 237d10d0984e8d27ff30ccca9f4be141d585c727 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | Coldog2333/Financial-NLP | 237d10d0984e8d27ff30ccca9f4be141d585c727 | [
"Apache-2.0"
] | 26 | 2018-10-14T07:12:20.000Z | 2021-01-30T16:23:20.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Financial-NLP documentation build configuration file, created by
# sphinx-quickstart on Thu Aug 30 23:34:21 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in thi... | 30.360465 | 79 | 0.682114 |
019203c382d57dabd5def1bb2269ab916296e6f2 | 397 | py | Python | microservices/landing/gcd/app/app.py | Rishab2707/Cloud-Computing-Hack3 | 0528b08b205c1b93035f915e05cd09b56ae08cf6 | [
"MIT"
] | null | null | null | microservices/landing/gcd/app/app.py | Rishab2707/Cloud-Computing-Hack3 | 0528b08b205c1b93035f915e05cd09b56ae08cf6 | [
"MIT"
] | null | null | null | microservices/landing/gcd/app/app.py | Rishab2707/Cloud-Computing-Hack3 | 0528b08b205c1b93035f915e05cd09b56ae08cf6 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_restful import Resource,Api
import math
app = Flask(__name__)
app.secret_key = 'thisisjustarandomstring'
api=Api(app)
class Gcd(Resource):
def get(self,n1,n2):
return math.gcd(int(n1),int(n2))
api.add_resource(Gcd, '/<n1>/<n2>')
if __name__ == '__main__':
... | 18.045455 | 42 | 0.627204 |
4c26e9ef152e4600ea37aade504dc1c01d75183b | 9,706 | py | Python | docassemble_webapp/setup.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | docassemble_webapp/setup.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | docassemble_webapp/setup.py | Partnervine/docassemble | 05a154d4788ada27ad220a0d95456b0b0a26c46b | [
"MIT"
] | null | null | null | import os
import sys
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'docassemble==1.2.96',
'docassemble.base==1.2.96',
'docassemble.demo==1.2.96',
"3to2==1.1.1",
"airtable-python-wrapper==0.15... | 36.904943 | 3,071 | 0.54523 |
525d57859c92defcef78f0c6daf1b2b7eb40e5b4 | 4,841 | py | Python | examples/CooperativeSearch/psaltlib/LMCP/py/afrl/cmasi/VehicleAction.py | GaloisInc/salty | f410659b3399ad7c527513e67b06dff0332d823e | [
"BSD-3-Clause"
] | 13 | 2017-02-15T21:56:46.000Z | 2022-03-23T12:59:26.000Z | examples/VIP-Escort/lmcp/py/afrl/cmasi/VehicleAction.py | GaloisInc/salty | f410659b3399ad7c527513e67b06dff0332d823e | [
"BSD-3-Clause"
] | 17 | 2016-07-21T10:47:23.000Z | 2020-08-07T13:26:21.000Z | examples/CooperativeSearch/psaltlib/LMCP/py/afrl/cmasi/VehicleAction.py | GaloisInc/salty | f410659b3399ad7c527513e67b06dff0332d823e | [
"BSD-3-Clause"
] | 2 | 2019-06-11T11:59:40.000Z | 2022-02-09T12:48:39.000Z | #! /usr/bin/python
import sys, struct
import xml.dom.minidom
from lmcp import LMCPObject
## ===============================================================================
## Authors: AFRL/RQQA
## Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division
##
## Copyright (... | 32.489933 | 105 | 0.578393 |
84c77df6b0eef5ca7363577167147b232bbabb98 | 50,801 | py | Python | lib/spack/spack/environment.py | williamfgc/spack | c8c795e7dbde22dc47c9ae285a4dd59004b115b1 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/environment.py | williamfgc/spack | c8c795e7dbde22dc47c9ae285a4dd59004b115b1 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/environment.py | williamfgc/spack | c8c795e7dbde22dc47c9ae285a4dd59004b115b1 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import re
import sys
import shutil
import copy
import socket
import ruamel.yaml
import six
from ordereddict_ba... | 36.521208 | 79 | 0.610145 |
24161eb3d69e56d34b2689adc4338e451594cc35 | 1,852 | py | Python | deepdrive_zero/experiments/intersection_2_agents_fine_tune_add_left_yield_from_scratch_resume2.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | deepdrive_zero/experiments/intersection_2_agents_fine_tune_add_left_yield_from_scratch_resume2.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | deepdrive_zero/experiments/intersection_2_agents_fine_tune_add_left_yield_from_scratch_resume2.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | import os
import sys
from deepdrive_zero.experiments import utils
from spinup.utils.run_utils import ExperimentGrid
from spinup import ppo_pytorch
import torch
experiment_name = os.path.basename(__file__)[:-3]
notes = """Attempting to speed up reduction in g-force, jerk, and lane
violations"""
env_config = dict(
... | 32.491228 | 204 | 0.7473 |
1f6f1a4aa9eaf55ac2c96539fd3d835fe67d6c8b | 3,496 | py | Python | nlp/text_classification/cnn_multiclass/model.py | zhangyong2/tensorflow_nlp | 4cc3cc4abec27526336897f1c62cf904b48f2676 | [
"Apache-2.0"
] | 1 | 2019-01-30T08:39:24.000Z | 2019-01-30T08:39:24.000Z | nlp/text_classification/cnn_multiclass/model.py | zhangyong2/tensorflow_nlp | 4cc3cc4abec27526336897f1c62cf904b48f2676 | [
"Apache-2.0"
] | null | null | null | nlp/text_classification/cnn_multiclass/model.py | zhangyong2/tensorflow_nlp | 4cc3cc4abec27526336897f1c62cf904b48f2676 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
class CNNModel(object):
def __init__(self, config):
self.config = config
self.x_in = tf.placeholder(tf.int64, shape=[None, config.sentence_length])
self.y_in = tf.placeholder(tf.int64, shape=[None])
self.keep_prob ... | 44.820513 | 112 | 0.62214 |
08119bee3121fbcd34e9d0bd1b13a5d9e6024168 | 170 | py | Python | Completed/python3/1486.py | zainkai/LeetCodeChallenges | 60645b895437bc1b56b88c48cdf22c38027285ec | [
"MIT"
] | 1 | 2020-07-01T05:33:30.000Z | 2020-07-01T05:33:30.000Z | Completed/python3/1486.py | zainkai/LeetCodeChallenges | 60645b895437bc1b56b88c48cdf22c38027285ec | [
"MIT"
] | null | null | null | Completed/python3/1486.py | zainkai/LeetCodeChallenges | 60645b895437bc1b56b88c48cdf22c38027285ec | [
"MIT"
] | null | null | null | class Solution:
def xorOperation(self, n: int, start: int) -> int:
res = start
for i in range(1,n):
res ^= start + 2*i
return res
| 24.285714 | 54 | 0.511765 |
2aa7b3c27a8949eb64dd63f70c39e944100ffa5c | 2,658 | py | Python | tests/test_TRADE_RulePolicy_TemplateNLG.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 339 | 2020-03-04T09:43:22.000Z | 2022-03-26T17:27:38.000Z | tests/test_TRADE_RulePolicy_TemplateNLG.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 122 | 2020-04-12T04:19:06.000Z | 2022-03-23T14:20:57.000Z | tests/test_TRADE_RulePolicy_TemplateNLG.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 138 | 2020-02-18T16:48:04.000Z | 2022-03-26T17:27:43.000Z | # available NLU models
# from convlab2.nlu.svm.multiwoz import SVMNLU
from convlab2.nlu.jointBERT.multiwoz import BERTNLU
# from convlab2.nlu.milu.multiwoz import MILU
# available DST models
# from convlab2.dst.rule.multiwoz import RuleDST
# from convlab2.dst.mdbt.multiwoz import MDBT
# from convlab2.dst.sumbt.multiwo... | 35.44 | 117 | 0.77088 |
ae6d4e3ed428fa7bda1fcfc2bf3037940a6de9d0 | 1,485 | py | Python | t_9_classes/t_9_6_private_variables/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | t_9_classes/t_9_6_private_variables/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | t_9_classes/t_9_6_private_variables/main.py | naokiur/Python-tutorial | 7b03dc8fd2e5992859fde00bfe2873b4fb7ca5e5 | [
"Apache-2.0"
] | null | null | null | class Mapping:
def __init__(self, iterable):
self.items_list = []
self.__update(iterable)
def update(self, iterable):
for item in iterable:
self.items_list.append(item)
__update = update
class MappingSubclass(Mapping):
# noinspection PyMethodOverriding
def up... | 26.517857 | 109 | 0.705051 |
9041b7c69ba0ab4e477e98fd9331ad258678c1f3 | 8,498 | py | Python | src/order_neighbors_3Angle.py | lyjspx/A-Novel-Protein-Structural-Structure | bd167ef7200e25657ddb58cb141ba5fa6a3351f1 | [
"MIT"
] | null | null | null | src/order_neighbors_3Angle.py | lyjspx/A-Novel-Protein-Structural-Structure | bd167ef7200e25657ddb58cb141ba5fa6a3351f1 | [
"MIT"
] | null | null | null | src/order_neighbors_3Angle.py | lyjspx/A-Novel-Protein-Structural-Structure | bd167ef7200e25657ddb58cb141ba5fa6a3351f1 | [
"MIT"
] | null | null | null | #import external modules
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn.cluster import KMeans
from multiprocessing import Pool
#import internal modules
from src.utils import workingRoot
class NeighborProcessing:
def __init__(self,fileName,workingRoot=workingRoot):
se... | 53.78481 | 112 | 0.534361 |
ace980b445b470e6e67bda670f40cf5354d7a0ce | 33,841 | py | Python | modeling/model_net_search.py | HankKung/Dynamic-AutoDeepLab | 4150a19d632269f7ebcb63e92906a7f40e6a283b | [
"Apache-2.0"
] | 9 | 2020-02-12T07:20:42.000Z | 2021-10-16T06:36:19.000Z | modeling/model_net_search.py | HankKung/Distributed-AutoDeepLab | 4150a19d632269f7ebcb63e92906a7f40e6a283b | [
"Apache-2.0"
] | 2 | 2020-04-02T06:39:53.000Z | 2021-01-19T10:36:07.000Z | modeling/model_net_search.py | HankKung/Distributed-AutoDeepLab | 4150a19d632269f7ebcb63e92906a7f40e6a283b | [
"Apache-2.0"
] | 3 | 2020-02-28T22:15:34.000Z | 2021-08-05T07:26:03.000Z | import torch
import torch.nn as nn
import numpy as np
from modeling.genotypes import PRIMITIVES
import torch.nn.functional as F
from modeling.operations import *
from modeling.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d
class Cell_fixed(nn.Module):
def __init__(self,
B,
... | 47.865629 | 171 | 0.467924 |
0d0b5e9c731802f81299326146512c4c71bf40db | 874 | py | Python | tests/test_dynamic_links.py | heykarimoff/firebase_dynamic_links | bed465e7d1706095af2f60948f3efdd0a9051875 | [
"MIT"
] | 12 | 2018-07-14T16:31:47.000Z | 2021-11-21T18:58:44.000Z | tests/test_dynamic_links.py | heykarimoff/firebase_dynamic_links | bed465e7d1706095af2f60948f3efdd0a9051875 | [
"MIT"
] | 2 | 2018-07-08T08:17:00.000Z | 2018-11-11T17:14:56.000Z | tests/test_dynamic_links.py | heykarimoff/firebase_dynamic_links | bed465e7d1706095af2f60948f3efdd0a9051875 | [
"MIT"
] | 2 | 2019-02-05T12:49:38.000Z | 2020-06-04T13:30:05.000Z | from firebase_dynamic_links import generate_long_link, generate_short_link
class MockFirebaseClient:
'''
For testing purposes only.
'''
def __init__(self, api_key):
self.api_key = api_key
def shorten_link(self, long_link=None):
return long_link
def test_generate_short_link():
... | 24.971429 | 91 | 0.695652 |
43ecda716c460f7ede5b08fd1e16f8580e68e9c2 | 476 | py | Python | tests/conftest.py | glumia/pylaprof | d43a0e78453badef9b5620daa96c344a53cc4631 | [
"MIT"
] | 14 | 2021-11-14T17:36:54.000Z | 2022-03-20T00:03:07.000Z | tests/conftest.py | glumia/pylaprof | d43a0e78453badef9b5620daa96c344a53cc4631 | [
"MIT"
] | null | null | null | tests/conftest.py | glumia/pylaprof | d43a0e78453badef9b5620daa96c344a53cc4631 | [
"MIT"
] | null | null | null | import os
import tempfile
from unittest.mock import Mock
import pytest
@pytest.fixture
def tmpcwd():
"""Run test in a temporary directory."""
cwd = os.getcwd()
with tempfile.TemporaryDirectory(prefix="pylaprof-test") as tmpdir:
os.chdir(tmpdir)
yield
os.chdir(cwd)
@pytest.fixture
de... | 19.833333 | 71 | 0.684874 |
931a5915617125882fe7eb85000f8eaab4ad94d7 | 8,170 | py | Python | src/run.py | deligentfool/SIDE | 561fc6c5312906fd2073af043c2c17ec4ea3758d | [
"Apache-2.0"
] | 3 | 2021-12-22T10:28:28.000Z | 2022-03-16T10:55:51.000Z | src/run.py | deligentfool/SIDE | 561fc6c5312906fd2073af043c2c17ec4ea3758d | [
"Apache-2.0"
] | null | null | null | src/run.py | deligentfool/SIDE | 561fc6c5312906fd2073af043c2c17ec4ea3758d | [
"Apache-2.0"
] | null | null | null | import datetime
import os
import pprint
import time
import threading
import torch as th
from types import SimpleNamespace as SN
from utils.logging import Logger
from utils.timehelper import time_left, time_str
from os.path import dirname, abspath
from learners import REGISTRY as le_REGISTRY
from runners import REGISTR... | 35.064378 | 116 | 0.645043 |
380d4049e22cb3bf8a58ff951fe43ff85b5cc8ba | 1,888 | py | Python | contrib/devtools/check-doc.py | sarielsaz/LiteCoin | 4b827d08a0a45f7ed78f596c0fed78e059d35cf6 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | sarielsaz/LiteCoin | 4b827d08a0a45f7ed78f596c0fed78e059d35cf6 | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | sarielsaz/LiteCoin | 4b827d08a0a45f7ed78f596c0fed78e059d35cf6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015-2016 The Sarielsaz Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author... | 40.170213 | 259 | 0.68697 |
70443025976381f9ebfeba00ecb60062e533af9c | 671 | py | Python | tests/test_exponential.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 64 | 2020-03-18T12:11:22.000Z | 2022-03-31T08:19:18.000Z | tests/test_exponential.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 148 | 2020-05-14T06:14:11.000Z | 2022-03-26T15:02:31.000Z | tests/test_exponential.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 16 | 2020-05-31T00:53:44.000Z | 2022-03-23T13:20:57.000Z | import pyclesperanto_prototype as cle
import numpy as np
def test_exponential():
test = cle.push(np.asarray([
[0, 0, 0, 0, 0],
[0, 1, 1, 2, 0],
[0, 2, 2, 3, 0],
[0, 3, 3, 4, 0],
[0, 0, 0, 0, 0]
]))
reference = cle.push(np.asarray([
[1, 1, 1, 1, 1],
... | 21.645161 | 47 | 0.499255 |
126ed19284e4c1eb7ed070885d368e881b418c92 | 97 | py | Python | surround/run_modes.py | ScottyB/surround | f9a86f5b5677de7bd5763d26de4a6f18c36f2a4d | [
"BSD-3-Clause"
] | 11 | 2019-04-11T22:53:00.000Z | 2021-02-12T07:42:39.000Z | surround/run_modes.py | ScottyB/surround | f9a86f5b5677de7bd5763d26de4a6f18c36f2a4d | [
"BSD-3-Clause"
] | 162 | 2019-04-08T22:49:36.000Z | 2021-09-08T03:28:28.000Z | surround/run_modes.py | ScottyB/surround | f9a86f5b5677de7bd5763d26de4a6f18c36f2a4d | [
"BSD-3-Clause"
] | 22 | 2019-04-11T01:16:39.000Z | 2022-01-03T11:45:36.000Z | from enum import Enum
class RunMode(Enum):
BATCH_PREDICT = 1
PREDICT = 2
TRAIN = 3
| 12.125 | 21 | 0.639175 |
1b43a34fc49cb48c5bc28183a1848205ebbabac9 | 531 | py | Python | pip_service_data_python/data/EntityV1Schema.py | pip-templates-services/pip-service-data-python | 74149496a4e02c6e7c14d5f4c9453bf196577a3c | [
"MIT"
] | null | null | null | pip_service_data_python/data/EntityV1Schema.py | pip-templates-services/pip-service-data-python | 74149496a4e02c6e7c14d5f4c9453bf196577a3c | [
"MIT"
] | null | null | null | pip_service_data_python/data/EntityV1Schema.py | pip-templates-services/pip-service-data-python | 74149496a4e02c6e7c14d5f4c9453bf196577a3c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pip_services3_commons.convert import TypeCode
from pip_services3_commons.validate import ObjectSchema
class EntityV1Schema(ObjectSchema):
def __init__(self):
super().__init__()
self.with_optional_property('id', TypeCode.String)
self.with_required_property('si... | 33.1875 | 63 | 0.734463 |
db8a6216ec942089d36c5ebe903ad813556945e3 | 1,961 | py | Python | tests/test_2.py | rmcgibbo/covar | b4ce247f8a622f6cebf1156b3e392eadf2de1533 | [
"BSD-2-Clause"
] | 16 | 2015-10-01T03:50:30.000Z | 2022-02-02T15:03:41.000Z | tests/test_2.py | rmcgibbo/covar | b4ce247f8a622f6cebf1156b3e392eadf2de1533 | [
"BSD-2-Clause"
] | null | null | null | tests/test_2.py | rmcgibbo/covar | b4ce247f8a622f6cebf1156b3e392eadf2de1533 | [
"BSD-2-Clause"
] | 4 | 2019-07-02T04:54:41.000Z | 2021-08-08T11:41:21.000Z | from __future__ import division
import os.path
import numpy as np
import scipy.stats
import matplotlib
matplotlib.use('Agg')
matplotlib.rc('font',family='serif')
import matplotlib.pyplot as plt
from covar import cov_shrink_ss, cov_shrink_rblw
DIRNAME = os.path.dirname(os.path.realpath(__file__))
def test_1():
ra... | 33.237288 | 112 | 0.653748 |
57df08faa4fd45f0fe4a681459fbe6e2beff2821 | 2,817 | py | Python | pyhpecw7/features/sflow_intf.py | HPENetworking/hpe-cw7-ansible | a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16 | [
"Apache-2.0"
] | 4 | 2022-01-10T21:02:00.000Z | 2022-03-09T03:05:22.000Z | pyhpecw7/features/sflow_intf.py | flycoolman/hpe-cw7-ansible | a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16 | [
"Apache-2.0"
] | null | null | null | pyhpecw7/features/sflow_intf.py | flycoolman/hpe-cw7-ansible | a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16 | [
"Apache-2.0"
] | 2 | 2022-01-10T21:03:07.000Z | 2022-01-20T09:11:44.000Z | """Manage sflow interface on HPCOM7 devices.
"""
from pyhpecw7.utils.xml.lib import *
from pyhpecw7.features.interface import Interface
import base64
import binascii
class Sflow(object):
def __init__(self, device, intf_name, collector, rate):
self.device = device
self.intf_name = intf_name
... | 27.617647 | 80 | 0.552716 |
84df14d35f6c234ff01604ae80bf30f444da952b | 20,518 | py | Python | gui/qt/installwizard.py | stashpayio/electrum-stash | a04e1fde408196e547cf80f8ce9d9391133bd865 | [
"MIT"
] | null | null | null | gui/qt/installwizard.py | stashpayio/electrum-stash | a04e1fde408196e547cf80f8ce9d9391133bd865 | [
"MIT"
] | null | null | null | gui/qt/installwizard.py | stashpayio/electrum-stash | a04e1fde408196e547cf80f8ce9d9391133bd865 | [
"MIT"
] | null | null | null | import sys
import os
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore
import electrum_dash
from electrum_dash import Wallet, WalletStorage
from electrum_dash.util import UserCancelled, InvalidPassword
from electrum_dash.base_wizard import BaseWizard
from electrum_dash.i18n import _
... | 37.856089 | 140 | 0.600253 |
5ffa03cd41b1cef2643f8771adc924fac26b5aa6 | 10,837 | py | Python | openstack_dashboard/dashboards/project/network_topology/views.py | Tehsmash/horizon | 8ffade099a3a437509dcdcf25d5b054e5c188b61 | [
"Apache-2.0"
] | 60 | 2015-03-09T14:31:46.000Z | 2021-12-12T19:22:31.000Z | openstack_dashboard/dashboards/project/network_topology/views.py | 2733284198/avos | becf7dd313fb8569581f985118c8367921c731ab | [
"Apache-2.0"
] | 7 | 2015-04-13T13:21:10.000Z | 2016-02-24T18:38:28.000Z | openstack_dashboard/dashboards/project/network_topology/views.py | 2733284198/avos | becf7dd313fb8569581f985118c8367921c731ab | [
"Apache-2.0"
] | 13 | 2015-03-09T17:26:26.000Z | 2020-02-22T19:19:14.000Z | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2013 NTT MCL Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | 38.429078 | 78 | 0.627295 |
b03f7608c2d5335a7663e44d0505ebe80f641106 | 8,063 | py | Python | wordle.py | CyanideCN/TaxolLib | 6d27c81c88a8f2c173a1c6f289e62f53b196290b | [
"MIT"
] | 1 | 2022-01-30T02:10:13.000Z | 2022-01-30T02:10:13.000Z | wordle.py | CyanideCN/TaxolLib | 6d27c81c88a8f2c173a1c6f289e62f53b196290b | [
"MIT"
] | null | null | null | wordle.py | CyanideCN/TaxolLib | 6d27c81c88a8f2c173a1c6f289e62f53b196290b | [
"MIT"
] | null | null | null | import random
import asyncio
import sqlite3
import datetime
import time
import uuid
from collections import defaultdict
from nonebot.typing import T_State
from nonebot.adapters import Bot, Event
from nonebot.adapters.cqhttp.message import MessageSegment, Message
import pandas as pd
with open('data/wordle_cet4.txt', '... | 35.835556 | 132 | 0.590599 |
0d851b9969a0eb090acbaf43f1bca3f829f1d840 | 4,970 | pyt | Python | example/Example_toolbox.pyt | alessioarena/xGIS | 7e80c0c183681db02f499679ab484db34271c2e8 | [
"MIT",
"Unlicense"
] | 2 | 2019-10-14T04:44:46.000Z | 2020-04-21T03:06:48.000Z | example/Example_toolbox.pyt | alessioarena/xGIS | 7e80c0c183681db02f499679ab484db34271c2e8 | [
"MIT",
"Unlicense"
] | null | null | null | example/Example_toolbox.pyt | alessioarena/xGIS | 7e80c0c183681db02f499679ab484db34271c2e8 | [
"MIT",
"Unlicense"
] | null | null | null | import os
import arcpy
import xgis
class Toolbox(object):
def __init__(self):
self.label = "Example Toolbox"
self.alias = "exampleToolbox"
# List of tool classes associated with this toolbox
self.tools = [AwesomeTool]
class AwesomeTool(object):
def __init__(self):
self... | 38.828125 | 149 | 0.626559 |
1601aec910856e449b6d0a1c5f5646f83fd75294 | 2,001 | py | Python | manoward/endorsementmgmt.py | chalbersma/manowar | 023a696f7ea0458e1c2ae9a18e40a9d09e824cc4 | [
"BSD-2-Clause"
] | 3 | 2019-02-16T03:14:11.000Z | 2020-05-28T23:14:23.000Z | manoward/endorsementmgmt.py | chalbersma/manowar | 023a696f7ea0458e1c2ae9a18e40a9d09e824cc4 | [
"BSD-2-Clause"
] | 4 | 2018-08-09T22:39:59.000Z | 2020-02-12T00:36:47.000Z | manoward/endorsementmgmt.py | chalbersma/manowar | 023a696f7ea0458e1c2ae9a18e40a9d09e824cc4 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
'''
Copyright 2018, VDMS
Licensed under the terms of the BSD 2-clause license. See LICENSE file for terms.
'''
# Validate Endorsements
import logging
from flask import abort
def process_endorsements(endorsements=[], restrictions=[], session_endorsements=[], session_restrictions=[], ignore_ab... | 33.35 | 139 | 0.693153 |
a4fba08b43fad703555d5894107cb541f053faa4 | 2,107 | py | Python | test/functional/test_framework/siphash.py | minerscore/Ritocoin | cf4e1570b2bab487b9a70f2e8cf6f98fb42fd4b7 | [
"MIT"
] | 18 | 2018-11-30T19:07:06.000Z | 2021-05-17T11:06:12.000Z | test/functional/test_framework/siphash.py | minerscore/Ritocoin | cf4e1570b2bab487b9a70f2e8cf6f98fb42fd4b7 | [
"MIT"
] | 1 | 2018-12-08T19:41:43.000Z | 2018-12-08T19:41:43.000Z | test/functional/test_framework/siphash.py | minerscore/Ritocoin | cf4e1570b2bab487b9a70f2e8cf6f98fb42fd4b7 | [
"MIT"
] | 17 | 2018-11-30T17:16:21.000Z | 2021-10-30T17:33:14.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The Rito Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Specialize... | 31.924242 | 69 | 0.543427 |
9baa0dc65ffb6b0a5536c7d9cde733626e64dee5 | 81,857 | py | Python | pytype/pyi/parser_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | pytype/pyi/parser_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | pytype/pyi/parser_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | import hashlib
import sys
import textwrap
from pytype.pyi import parser
from pytype.pyi import parser_test_base
from pytype.pytd import pytd
from pytype.tests import test_base
import unittest
class ParseErrorTest(unittest.TestCase):
def check(self, expected, *args, **kwargs):
e = parser.ParseError(*args, **k... | 27.033355 | 99 | 0.531085 |
0eae9e630e125c6e03d64bb588ef7ebfdb5bf1a5 | 18,575 | py | Python | lpot/adaptor/tf_utils/quantize_graph/quantize_graph_conv.py | deb-intel/LPOTtest | f7b7524c733e581668d15192b69f9d9a7ca5222d | [
"Apache-2.0"
] | null | null | null | lpot/adaptor/tf_utils/quantize_graph/quantize_graph_conv.py | deb-intel/LPOTtest | f7b7524c733e581668d15192b69f9d9a7ca5222d | [
"Apache-2.0"
] | null | null | null | lpot/adaptor/tf_utils/quantize_graph/quantize_graph_conv.py | deb-intel/LPOTtest | f7b7524c733e581668d15192b69f9d9a7ca5222d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 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
#
# Unl... | 50.613079 | 97 | 0.612167 |
ee63bc96f7318941c3e4638fdf0fe076edf90f7d | 5,366 | py | Python | official/legacy/bert/run_squad.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2022-03-19T18:05:56.000Z | 2022-03-19T18:05:56.000Z | official/legacy/bert/run_squad.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 8 | 2020-05-19T00:52:30.000Z | 2020-06-04T23:57:20.000Z | official/legacy/bert/run_squad.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 2 | 2021-10-07T04:47:04.000Z | 2021-12-18T04:18:19.000Z | # Copyright 2022 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 applica... | 36.013423 | 80 | 0.745434 |
f3c7df145a1168ff3cce3a3d1f03a55cde28ce0e | 659 | py | Python | incompressible/__init__.py | mojiastonybrook/pyro2 | 050eacac7fcf4d5fc28e9fa356c445777fa7585c | [
"BSD-3-Clause"
] | null | null | null | incompressible/__init__.py | mojiastonybrook/pyro2 | 050eacac7fcf4d5fc28e9fa356c445777fa7585c | [
"BSD-3-Clause"
] | null | null | null | incompressible/__init__.py | mojiastonybrook/pyro2 | 050eacac7fcf4d5fc28e9fa356c445777fa7585c | [
"BSD-3-Clause"
] | null | null | null | """
The pyro solver for incompressible flow. This implements as second-order
approximate projection method. The general flow is:
* create the limited slopes of u and v (in both directions)
* get the advective velocities through a piecewise linear Godunov
method
* enforce the divergence constraint on the velociti... | 26.36 | 73 | 0.783005 |
7ce8cafbaaba3efb2f0ea9ca9513e3936655d9fa | 9,768 | py | Python | train_b7_ns_aa_original_large_crop_100k.py | HyeRyeongSong/SWmaestro11_TrustNet_EfficientNet-B7_Ensemble | ddd89c4c022eafad215d0858fc2bcc17a8dca8a7 | [
"MIT"
] | 98 | 2020-06-08T20:00:49.000Z | 2022-03-30T10:16:25.000Z | train_b7_ns_aa_original_large_crop_100k.py | HyeRyeongSong/SWmaestro11_TrustNet_EfficientNet-B7_Ensemble | ddd89c4c022eafad215d0858fc2bcc17a8dca8a7 | [
"MIT"
] | 5 | 2020-06-22T12:41:00.000Z | 2022-03-15T14:44:22.000Z | train_b7_ns_aa_original_large_crop_100k.py | HyeRyeongSong/SWmaestro11_TrustNet_EfficientNet-B7_Ensemble | ddd89c4c022eafad215d0858fc2bcc17a8dca8a7 | [
"MIT"
] | 23 | 2020-06-12T19:07:56.000Z | 2021-11-19T02:44:29.000Z | import yaml
import os
import random
import tqdm
import numpy as np
from PIL import Image
import torch
from torch import distributions
from torch.nn import functional as F
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import ffmpeg
from albumentations import ImageOnlyTran... | 37.860465 | 120 | 0.629709 |
7d6c79a0923031a9c5c48b30f33fcb364cfb28fa | 4,228 | py | Python | cvat/apps/annotation/pascal_voc.py | godlikejay/cvat | 50c40ba70dd8f890478068f29ce3de1057ec848c | [
"MIT"
] | 2 | 2020-01-10T08:50:50.000Z | 2020-01-23T06:11:11.000Z | cvat/apps/annotation/pascal_voc.py | godlikejay/cvat | 50c40ba70dd8f890478068f29ce3de1057ec848c | [
"MIT"
] | 29 | 2020-01-28T23:08:18.000Z | 2022-03-12T00:05:33.000Z | cvat/apps/annotation/pascal_voc.py | maitreyamaity/CVAT-SIM-TEST | 6b97145c8f4584d9ad40a4b6541424955e272e42 | [
"MIT"
] | 1 | 2020-03-04T15:43:35.000Z | 2020-03-04T15:43:35.000Z | # Copyright (C) 2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
format_spec = {
"name": "PASCAL VOC",
"dumpers": [
{
"display_name": "{name} {format} {version}",
"format": "ZIP",
"version": "1.0",
"handler": "dump"
},
],
"loaders":... | 36.136752 | 100 | 0.519631 |
35a074381429779418976b7a989eb96fdcb90160 | 15,482 | py | Python | tests/test_m2m.py | arjones6/elixir | b9c185dc03f087f9299a0f030e94eeafa1edd655 | [
"MIT"
] | null | null | null | tests/test_m2m.py | arjones6/elixir | b9c185dc03f087f9299a0f030e94eeafa1edd655 | [
"MIT"
] | null | null | null | tests/test_m2m.py | arjones6/elixir | b9c185dc03f087f9299a0f030e94eeafa1edd655 | [
"MIT"
] | null | null | null | """
test many to many relationships
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import six
from sqlalchemy.orm import configure_mappers
from elixir import *
import elixir
#-----------
class TestManyToMany(obj... | 28.776952 | 79 | 0.556323 |
276e172d04846263afd6f01bdd05ebb4c74d8916 | 12,086 | py | Python | edgelm/fairseq/file_utils.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | 1 | 2021-11-07T00:30:05.000Z | 2021-11-07T00:30:05.000Z | edgelm/fairseq/file_utils.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | edgelm/fairseq/file_utils.py | guotao0628/DeepNet | 1ae74d8b44d715bf67c7d64a8efafff4b7c7937a | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Utilities for working with the local dataset cache.
This file is adapted from `AllenNLP <https://github.com/allenai/allennlp>`_.
a... | 32.664865 | 93 | 0.622621 |
1e63fc6e158164c55b43074d59af49c3d9a77371 | 2,663 | py | Python | tests/test_library_matching.py | iomega/spec2vec_gnps_data_analysis | 2695727edd25ed2a1760adbd48a11307b473faa2 | [
"Apache-2.0"
] | 16 | 2020-06-26T16:42:29.000Z | 2021-11-13T14:12:32.000Z | tests/test_library_matching.py | iomega/spec2vec_gnps_data_analysis | 2695727edd25ed2a1760adbd48a11307b473faa2 | [
"Apache-2.0"
] | 8 | 2020-06-17T11:58:48.000Z | 2021-10-07T13:26:48.000Z | tests/test_library_matching.py | iomega/spec2vec_gnps_data_analysis | 2695727edd25ed2a1760adbd48a11307b473faa2 | [
"Apache-2.0"
] | 7 | 2020-06-26T16:40:49.000Z | 2022-02-08T16:34:16.000Z | import os
import sys
import numpy as np
import pytest
from matchms import Spectrum
from spec2vec import Spec2Vec
from spec2vec import SpectrumDocument
#path_root = os.path.dirname(os.path.__file__)
path_root = os.path.dirname(os.getcwd())
sys.path.insert(0, os.path.join(path_root, "custom_functions"))
from custom_funct... | 52.215686 | 93 | 0.580173 |
f69ff551a4c2c8d053d8942ca2baf3f6b630b8c7 | 4,582 | py | Python | seqData.py | KristinHenry/BioInformatics | 5bfa495e07a7021f90d684d998a84456e1d95df6 | [
"MIT"
] | 1 | 2015-06-26T16:44:42.000Z | 2015-06-26T16:44:42.000Z | seqData.py | KristinHenry/BioInformatics | 5bfa495e07a7021f90d684d998a84456e1d95df6 | [
"MIT"
] | null | null | null | seqData.py | KristinHenry/BioInformatics | 5bfa495e07a7021f90d684d998a84456e1d95df6 | [
"MIT"
] | null | null | null | #
# Takes in a genetic sequence and outputs the amino acid sequence encoded
# Converts a genetic sequence into amino acid sequences (6 frames).
#
# ToDo: enable setting DNA or RNA input.
#
class seqData() :
def __init__ (self, infile=None) :
print "file: ", infile
if infile :
... | 27.437126 | 73 | 0.380183 |
fa0f89f3aa2d0f2bea379482c9b1e755d13d80bf | 36,021 | py | Python | tensorflow/python/training/supervisor_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 57 | 2017-09-03T07:08:31.000Z | 2022-02-28T04:33:42.000Z | tensorflow/python/training/supervisor_test.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 203 | 2019-06-14T23:53:10.000Z | 2022-02-10T02:27:23.000Z | tensorflow/python/training/supervisor_test.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 66 | 2020-05-15T10:05:12.000Z | 2022-02-14T07:28:18.000Z | # 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 applica... | 38.857605 | 80 | 0.676078 |
0a19d4e48bc8935029949a5fe80e43618c906a07 | 1,200 | py | Python | scraper/storage_spiders/muagiagocvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/muagiagocvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/muagiagocvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@id='content']/div[@id='content_top']/div[@class='overview']/h1[@class='name']",
'price' : "//div[@id='content_top']/div[@class=... | 44.444444 | 177 | 0.634167 |
070632fc219854c929ad790a9f41ae16cffacc54 | 3,713 | py | Python | cride/circles/views/memberships.py | diegoalejo14/advanced_django_platzi | 3a281749d05776b8d856d1ec3f9c47537a5490a0 | [
"MIT"
] | null | null | null | cride/circles/views/memberships.py | diegoalejo14/advanced_django_platzi | 3a281749d05776b8d856d1ec3f9c47537a5490a0 | [
"MIT"
] | null | null | null | cride/circles/views/memberships.py | diegoalejo14/advanced_django_platzi | 3a281749d05776b8d856d1ec3f9c47537a5490a0 | [
"MIT"
] | null | null | null | """Circle membership views"""
# Django REST Framework
from cride.circles.models import invitations
from cride.circles.models.invitations import Invitation
from rest_framework import viewsets, mixins, status
from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework.ge... | 34.700935 | 96 | 0.643954 |
3fd0b891f708207189e36a8174bb46b4b973e828 | 8,066 | py | Python | athena/data/datasets/speech_set_kaldiio.py | Huang17/athena | 9077f57f5b7aa64a28487d8b30f1781783d45a42 | [
"Apache-2.0"
] | 1 | 2020-08-26T08:56:49.000Z | 2020-08-26T08:56:49.000Z | athena/data/datasets/speech_set_kaldiio.py | shuaijiang/athena-2 | 5d4d6d13075b8ee9fd824ce6258cb8f55dd157eb | [
"Apache-2.0"
] | null | null | null | athena/data/datasets/speech_set_kaldiio.py | shuaijiang/athena-2 | 5d4d6d13075b8ee9fd824ce6258cb8f55dd157eb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Shuaijiang Zhao; Ne Luo
#
# 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
#
#... | 37.516279 | 104 | 0.61753 |
39be4e9428461363aaa3d59c7aa45bca0f6a2c44 | 3,530 | py | Python | WebChat/settings.py | VincentHeredia/WebChat | c0f29e9d30080f528c74daa1567839169d5094dc | [
"MIT"
] | 1 | 2016-05-24T02:15:11.000Z | 2016-05-24T02:15:11.000Z | WebChat/settings.py | VincentHeredia/WebChat | c0f29e9d30080f528c74daa1567839169d5094dc | [
"MIT"
] | null | null | null | WebChat/settings.py | VincentHeredia/WebChat | c0f29e9d30080f528c74daa1567839169d5094dc | [
"MIT"
] | null | null | null | """
Django settings for WebChat project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
#... | 25.955882 | 92 | 0.696317 |
447899bd231e25715c693055bbf9efce2d01dd3b | 628 | py | Python | gluoncv/model_zoo/__init__.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 36 | 2019-12-25T04:59:49.000Z | 2022-03-17T07:24:49.000Z | gluoncv/model_zoo/__init__.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 1 | 2018-09-20T19:31:37.000Z | 2018-09-20T19:31:37.000Z | gluoncv/model_zoo/__init__.py | PistonY/gluon-cv | aff5c36c0a1985350d32b766df5644e5648f4d13 | [
"Apache-2.0"
] | 9 | 2019-12-25T05:00:33.000Z | 2021-10-01T14:23:51.000Z | """GluonCV Model Zoo"""
# pylint: disable=wildcard-import
from .model_zoo import get_model, get_model_list
from .model_store import pretrained_model_list
from .faster_rcnn import *
from .mask_rcnn import *
from .ssd import *
from .yolo import *
from .cifarresnet import *
from .cifarwideresnet import *
from .fcn import ... | 24.153846 | 48 | 0.764331 |
6f75aef9e97a07965d3f1ab93a8e2edbe8b14bf9 | 111,607 | py | Python | vendor/github.com/avinetworks/sdk/python/avi/migrationtools/f5_converter/conversion_util.py | avinetworks/servicemesh | 4b4864e1327f09fa0bc047770af7e477a32f9d94 | [
"Apache-2.0"
] | 4 | 2017-06-16T18:51:52.000Z | 2020-02-11T15:22:42.000Z | vendor/github.com/avinetworks/sdk/python/avi/migrationtools/f5_converter/conversion_util.py | sudswasavi/servicemesh | 4f07c228e9b62c9b621cb0bfc464c75e85351f7f | [
"Apache-2.0"
] | 17 | 2019-01-11T05:57:35.000Z | 2019-08-29T05:33:38.000Z | vendor/github.com/avinetworks/sdk/python/avi/migrationtools/f5_converter/conversion_util.py | sudswasavi/servicemesh | 4f07c228e9b62c9b621cb0bfc464c75e85351f7f | [
"Apache-2.0"
] | 8 | 2017-06-26T18:15:58.000Z | 2021-04-12T08:09:03.000Z | import copy
import logging
import os
import pandas
import ast
import re
import random
import avi.migrationtools.f5_converter.converter_constants as conv_const
from xlsxwriter import Workbook
from openpyxl import load_workbook
from pkg_resources import parse_version
from avi.migrationtools.avi_migration_utils import Mi... | 46.69749 | 84 | 0.540244 |
ed1df660fe1b2ad3346f4c19f5135f22d93d871f | 1,668 | py | Python | tests/integration/states/match.py | kstaken/salt | 3321d57cf4d085bc6cbe269dbd01afd04fc6ff2a | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:56.000Z | 2021-03-08T18:59:46.000Z | tests/integration/states/match.py | ageron/salt | 72a0a89011e55ce7c875e948b5f0e97e70328153 | [
"Apache-2.0"
] | null | null | null | tests/integration/states/match.py | ageron/salt | 72a0a89011e55ce7c875e948b5f0e97e70328153 | [
"Apache-2.0"
] | 1 | 2020-03-07T07:04:55.000Z | 2020-03-07T07:04:55.000Z | # -*- coding: utf-8 -*-
'''
tests.integration.states.match
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:copyright: © 2012 by the SaltStack Team, see AUTHORS for more details.
:license: Apache 2.0, see LICENSE for more details.
'''
# Import python libs
im... | 29.785714 | 76 | 0.576739 |
c9ff02a9208987676d3f803f52eab06594a6c8f2 | 1,888 | py | Python | junction/proposals/permissions.py | josejibin/junction | faf9607e24b109d53be7e6b28787f52100fffad3 | [
"MIT"
] | 1 | 2019-04-15T10:35:46.000Z | 2019-04-15T10:35:46.000Z | junction/proposals/permissions.py | josejibin/junction | faf9607e24b109d53be7e6b28787f52100fffad3 | [
"MIT"
] | null | null | null | junction/proposals/permissions.py | josejibin/junction | faf9607e24b109d53be7e6b28787f52100fffad3 | [
"MIT"
] | 1 | 2017-06-01T06:03:14.000Z | 2017-06-01T06:03:14.000Z | # -*- coding: utf-8 -*-
# Third Party Stuff
from django.core.exceptions import PermissionDenied
# Junction Stuff
from junction.conferences.models import ConferenceProposalReviewer
from junction.base.constants import ConferenceStatus
from .models import ProposalSectionReviewer
def is_proposal_voting_allowed(proposa... | 31.466667 | 78 | 0.760593 |
a13aea79de122303268056287fc3c2530a5fdd19 | 4,304 | py | Python | tests/test_KoalaBot.py | JayDwee/KoalaBot | b2bc4052115531db81d6f777c08e271d6b9d408c | [
"MIT"
] | null | null | null | tests/test_KoalaBot.py | JayDwee/KoalaBot | b2bc4052115531db81d6f777c08e271d6b9d408c | [
"MIT"
] | null | null | null | tests/test_KoalaBot.py | JayDwee/KoalaBot | b2bc4052115531db81d6f777c08e271d6b9d408c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Testing KoalaBot Base Code
Commented using reStructuredText (reST)
"""
# Futures
# Built-in/Generic Imports
import argparse
# Libs
import discord
import discord.ext.test as dpytest
import mock
import pytest
from discord.ext import commands
# Own modules
import KoalaBot... | 28.315789 | 91 | 0.730251 |
4815b2128da76ed5f0226a3caddc30ba26a5f4df | 1,680 | py | Python | adafruit-circuitpython-bundle-py-20201107/examples/ili9341_shield_simpletest.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | adafruit-circuitpython-bundle-py-20201107/examples/ili9341_shield_simpletest.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | adafruit-circuitpython-bundle-py-20201107/examples/ili9341_shield_simpletest.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | """
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text.
Pinouts are for the 2.8" TFT Shield
"""
import board
import terminalio
import displayio
from adafruit_display_text import label
import adafruit_ili9341
# Release a... | 28.965517 | 88 | 0.753571 |
6c1a6ad313be651a645d5fe8a8ee0ab3a9e90173 | 14,476 | py | Python | Lib/site-packages/pdsspect/roi_plot.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/pdsspect/roi_plot.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/pdsspect/roi_plot.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """Parent classes for any widget that plots data"""
from qtpy import QT_VERSION
from qtpy import QtWidgets, QtCore
from matplotlib.figure import Figure
from .pdsspect_image_set import PDSSpectImageSetViewBase
qt_ver = int(QT_VERSION[0])
if qt_ver == 4:
from matplotlib.backends.backend_qt4agg import FigureCanvasQT... | 30.348008 | 79 | 0.62234 |
45080ce10975d30d158892f39ac31e7630d2397d | 3,358 | py | Python | wtm_envs/mujoco/keybot_env.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 15 | 2020-07-01T16:16:09.000Z | 2021-12-20T21:56:33.000Z | wtm_envs/mujoco/keybot_env.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 14 | 2020-09-25T22:41:20.000Z | 2022-03-12T00:38:44.000Z | wtm_envs/mujoco/keybot_env.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 2 | 2020-07-01T16:19:08.000Z | 2020-11-28T10:45:59.000Z | import numpy as np
from wtm_envs.mujoco import blocks_env, utils
class KeybotEnv(blocks_env.BlocksEnv):
"""Superclass for all Keybot environments.
"""
def __init__(
self, model_path, n_substeps, gripper_extra_height, block_gripper,
target_in_the_air, target_offset, obj_range, target_ra... | 46.638889 | 117 | 0.667659 |
7eeb6afeb1fa9ce73dc093909372ffb8d490a831 | 681 | py | Python | postprocess.py | heyyyjude/microbiome | d5e042913ea5c88ac6c064363cc555647f24701b | [
"Beerware"
] | 7 | 2016-12-22T07:06:53.000Z | 2019-02-10T07:16:36.000Z | postprocess.py | heyyyjude/microbiome | d5e042913ea5c88ac6c064363cc555647f24701b | [
"Beerware"
] | null | null | null | postprocess.py | heyyyjude/microbiome | d5e042913ea5c88ac6c064363cc555647f24701b | [
"Beerware"
] | null | null | null | import click
from qiime.automation.diversity_analysis.diversity_analysis import \
DiversityAnalysis
__author__ = "jkkim"
@click.command()
@click.option('-s', help="sample type is either bac or its.")
@click.option('-t', type=int, help="threads.")
@click.option("-e", type=int,
help="sampling depth.... | 28.375 | 97 | 0.688693 |
7f95661496f1d886520ec9b5fa15a6a682b4dd8c | 8,291 | py | Python | pysnmp/RUCKUS-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/RUCKUS-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/RUCKUS-SYSTEM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module RUCKUS-SYSTEM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RUCKUS-SYSTEM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:50:47 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 121.926471 | 1,493 | 0.760222 |
e518dcdc8cf0652c37a421e7f01a2bc682bd0192 | 850 | py | Python | scripts/populate_chunk_file_size.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T16:25:50.000Z | 2022-03-12T16:25:50.000Z | scripts/populate_chunk_file_size.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | null | null | null | scripts/populate_chunk_file_size.py | ORC-RIS/beiwe-backend | af2c43f79350bf0fc1ce8efafab1ac9c40008c40 | [
"BSD-3-Clause"
] | null | null | null | from database.data_access_models import ChunkRegistry
from libs.s3 import conn, S3_BUCKET
from django.utils import timezone
from django.db.models import Q
# print("start:", timezone.now())
basic_query = Q(file_size__isnull=True) | Q(file_size=0)
filters = {}
# stick study object ids here to process particular studie... | 31.481481 | 92 | 0.738824 |
0c9c51468ae5c9f06766b8776578c8e340ebc167 | 148 | py | Python | Models/ResidenceType.py | pedromneto97/crossbar-heroku | 7bedb40aeb4c7db483113a8579637b1007bba595 | [
"MIT"
] | null | null | null | Models/ResidenceType.py | pedromneto97/crossbar-heroku | 7bedb40aeb4c7db483113a8579637b1007bba595 | [
"MIT"
] | null | null | null | Models/ResidenceType.py | pedromneto97/crossbar-heroku | 7bedb40aeb4c7db483113a8579637b1007bba595 | [
"MIT"
] | null | null | null | from mongoengine import *
class ResidenceType(Document):
type = StringField(required=True, unique=True)
icon = StringField(required=True)
| 21.142857 | 50 | 0.75 |
f77cc0ac3a7be04889cebd874b86a9c913795af6 | 10,695 | py | Python | heat/tests/test_swift.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_swift.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_swift.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | #
# 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, software
# ... | 36.626712 | 78 | 0.625432 |
1f86430987d9891697473ef7847702ffee95dacc | 5,087 | py | Python | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IMAGE_MIB.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IMAGE_MIB.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | cisco-ios-xe/ydk/models/cisco_ios_xe/CISCO_IMAGE_MIB.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ CISCO_IMAGE_MIB
Router image MIB which identify the capabilities
and characteristics of the image
"""
from collections import OrderedDict
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.filters import YFilter
from ydk.errors... | 33.248366 | 147 | 0.603696 |
8668ddb0fb827e6237167c00a6f418dd9ae88a9e | 43,487 | py | Python | lldb/packages/Python/lldbsuite/test/dotest.py | tiwaria1/llvm | 616a396db0610ae0c1992361af005a869ef81897 | [
"Apache-2.0"
] | 1 | 2020-09-10T01:00:18.000Z | 2020-09-10T01:00:18.000Z | lldb/packages/Python/lldbsuite/test/dotest.py | coolstar/llvm-project | e21ccdd5b5667de50de65ee8903a89a21020e89a | [
"Apache-2.0"
] | null | null | null | lldb/packages/Python/lldbsuite/test/dotest.py | coolstar/llvm-project | e21ccdd5b5667de50de65ee8903a89a21020e89a | [
"Apache-2.0"
] | null | null | null | """
A simple testing framework for lldb using python's unit testing framework.
Tests for lldb are written as python scripts which take advantage of the script
bridging provided by LLDB.framework to interact with lldb core.
A specific naming pattern is followed by the .py script to be recognized as
a module which impl... | 37.979913 | 139 | 0.65369 |
4784394a2a3ad200865a41359c49b51443ebc08f | 12,735 | py | Python | photutils/segmentation/tests/test_core.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | photutils/segmentation/tests/test_core.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | photutils/segmentation/tests/test_core.py | Onoddil/photutils | 433f3e54d3f53282ae04eadde9e1ddf657944590 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the core module.
"""
import numpy as np
from numpy.testing import assert_allclose
import pytest
from ..core import Segment, SegmentationImage
try:
import matplotlib # noqa
HAS_MATPLOTLIB = True
except ImportError:
HAS_MATPLOTL... | 37.346041 | 73 | 0.529643 |
a7c0d21cad36acc10da2753e5d9383bc15620a24 | 771 | py | Python | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 2 | 2020-04-07T03:43:33.000Z | 2021-03-23T13:17:42.000Z | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:56:13.000Z | 2020-07-22T10:26:06.000Z | PlanheatMappingModule/PlanHeatDMM/model/refurbishment_level.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:40:15.000Z | 2020-07-20T09:40:15.000Z | # -*- coding: utf-8 -*-
"""
Model Map refurbishment_level table
:author: Sergio Aparicio Vegas
:version: 0.2
:date: 29 Nov 2017
"""
__docformat__ = "restructuredtext"
class RefurbishmentLevel():
""" Refurbishment level options """
def __init__(self):
self.__id = 0
self._... | 19.275 | 68 | 0.50454 |
fde1ce18fe94e07bb562b03a53d68a804461587d | 937 | py | Python | aioredis_models/redis_key.py | musabhusaini/aioredis-models | 8f868f4bf65e1068f8e8412fcc322ccfb65c1ea3 | [
"MIT"
] | null | null | null | aioredis_models/redis_key.py | musabhusaini/aioredis-models | 8f868f4bf65e1068f8e8412fcc322ccfb65c1ea3 | [
"MIT"
] | null | null | null | aioredis_models/redis_key.py | musabhusaini/aioredis-models | 8f868f4bf65e1068f8e8412fcc322ccfb65c1ea3 | [
"MIT"
] | null | null | null | """
This module contains the following classes:
- RedisKey: represents a generic Redis key.
"""
from aioredis import Redis
class RedisKey:
"""
Represents a Redis key of any type. Acts as the class for all data structures.
"""
def __init__(self, redis: Redis, key: str):
"""
Creates an... | 22.309524 | 82 | 0.577375 |
949588edb14b73a2d0cb7afc9d141ed5fc0fe58f | 270 | py | Python | dataent/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | null | null | null | dataent/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | 6 | 2020-03-24T17:15:56.000Z | 2022-02-10T18:41:31.000Z | dataent/data_migration/doctype/data_migration_mapping_detail/data_migration_mapping_detail.py | dataent/dataent | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Dataent Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from dataent.model.document import Document
class DataMigrationMappingDetail(Document):
pass
| 27 | 59 | 0.796296 |
0d49c77dfb9c8be4a51337883b193d99a9bf0bf9 | 990 | py | Python | {{cookiecutter.project_module}}/{{cookiecutter.project_module}}/animation.py | jgerrish/cookiecutter-pygame | a0e2522b629e2aa3803e89d85907880e8f4b4aa4 | [
"MIT"
] | null | null | null | {{cookiecutter.project_module}}/{{cookiecutter.project_module}}/animation.py | jgerrish/cookiecutter-pygame | a0e2522b629e2aa3803e89d85907880e8f4b4aa4 | [
"MIT"
] | null | null | null | {{cookiecutter.project_module}}/{{cookiecutter.project_module}}/animation.py | jgerrish/cookiecutter-pygame | a0e2522b629e2aa3803e89d85907880e8f4b4aa4 | [
"MIT"
] | null | null | null | import pygame
# define colors
BLACK = (0, 0, 0)
GREEN = (0, 255, 0)
class Rectangle(pygame.sprite.Sprite):
"""
Rectangle is a simple sprite
"""
def __init__(self, screen, width, height):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.Surface((50, 50))
self.image.fill(G... | 24.146341 | 57 | 0.6 |
d6a446dfa28e11cd51b5469162e1246fa4c5a299 | 4,907 | py | Python | data/partnet_process/blender_render/generate_partnet_point_cloud.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 75 | 2020-07-04T22:26:29.000Z | 2022-03-28T06:07:50.000Z | data/partnet_process/blender_render/generate_partnet_point_cloud.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 7 | 2020-08-13T16:06:00.000Z | 2021-07-30T02:07:44.000Z | data/partnet_process/blender_render/generate_partnet_point_cloud.py | StuSe/Multimodal-Shape-Completion | f053d0babdd223a7511911b8682afb80fbf42823 | [
"MIT"
] | 11 | 2020-07-05T02:35:22.000Z | 2022-01-18T10:52:21.000Z | # A simple script that uses blender to render views of a single object by rotation the camera around it.
# Also produces depth map at the same time.
#
# Example:
# /home/song/wurundi/blender-2.79-linux-glibc219-x86_64/blender --background --python generate_partnet_point_cloud.py -- /mnt/data/partnet_data/shape_mesh/377... | 44.207207 | 232 | 0.737314 |
275381b972d9970c6d0bbedfcfebe55361f902c8 | 935 | py | Python | database_engine/database_engine.py | orxg/helper | 6cbad158213028e64407c8ef0fd4e66a9aff9917 | [
"Apache-2.0"
] | null | null | null | database_engine/database_engine.py | orxg/helper | 6cbad158213028e64407c8ef0fd4e66a9aff9917 | [
"Apache-2.0"
] | null | null | null | database_engine/database_engine.py | orxg/helper | 6cbad158213028e64407c8ef0fd4e66a9aff9917 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 03 15:18:17 2017
@author: ldh
提供数据库接口,数据库配置在etc.yaml中按照
相应的格式进行配置即可。创建引擎参数type_
为对应的服务器配置名。
"""
# database_engine.py
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import yaml
from consts import DB_STATE
with open('etc.yaml','r') as f:
... | 21.25 | 57 | 0.594652 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.