hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2f59f39c0d409f389961cf1d7651c68a90c8d9
7,092
py
Python
src/ObjectDetection.py
mzur/unknot
07cc75d1fc94b1767e12bd9d55c1eac13be1fbfe
[ "MIT" ]
null
null
null
src/ObjectDetection.py
mzur/unknot
07cc75d1fc94b1767e12bd9d55c1eac13be1fbfe
[ "MIT" ]
null
null
null
src/ObjectDetection.py
mzur/unknot
07cc75d1fc94b1767e12bd9d55c1eac13be1fbfe
[ "MIT" ]
1
2022-01-26T08:13:09.000Z
2022-01-26T08:13:09.000Z
import numpy as np import os.path import imgaug.augmenters as iaa import json from pyvips import Image as VipsImage from . import PatchesCollection from . import Dataset as ImageDataset from . import utils from .mrcnn import config as mrcnn_config from .mrcnn import utils as mrcnn_utils from .mrcnn import model as mr...
34.764706
98
0.654822
import numpy as np import os.path import imgaug.augmenters as iaa import json from pyvips import Image as VipsImage from . import PatchesCollection from . import Dataset as ImageDataset from . import utils from .mrcnn import config as mrcnn_config from .mrcnn import utils as mrcnn_utils from .mrcnn import model as mr...
true
true
1c2f5c3293a33761af41af44889aab4c1a8debe8
8,223
py
Python
test/IECoreScene/SmoothSkinningDataTest.py
aitorvfx/cortex
c0c27794fc67ccfce68b064e284747165c49ef1c
[ "BSD-3-Clause" ]
5
2015-09-13T14:49:30.000Z
2017-02-04T21:04:59.000Z
test/IECoreScene/SmoothSkinningDataTest.py
aitorvfx/cortex
c0c27794fc67ccfce68b064e284747165c49ef1c
[ "BSD-3-Clause" ]
1
2018-11-07T19:40:15.000Z
2018-11-07T19:40:15.000Z
test/IECoreScene/SmoothSkinningDataTest.py
aitorvfx/cortex
c0c27794fc67ccfce68b064e284747165c49ef1c
[ "BSD-3-Clause" ]
3
2015-02-03T17:13:40.000Z
2022-01-07T15:55:00.000Z
########################################################################## # # Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved. # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Redistribution and use in source and binary ...
47.531792
126
0.661802
on, IECoreScene.SmoothSkinningData(ok_jn, ok_ip, ok_pio, iv_pic3, ok_pii, ok_piw).validate ) def tearDown( self ) : if os.path.isfile("test/IECore/ssd.fio"): os.remove("test/IECore/ssd.fio") if __name__ == "__main__": unittest.main()
true
true
1c2f5c3e47e8669740635666bf04fe5e71169c9e
512
py
Python
displ/pwscf/extractQEBands_test.py
tflovorn/displ
094c194c54f02d463353075c6ca82f457f1247fa
[ "MIT" ]
4
2018-04-09T20:39:24.000Z
2021-06-19T12:21:52.000Z
displ/pwscf/extractQEBands_test.py
tflovorn/displ
094c194c54f02d463353075c6ca82f457f1247fa
[ "MIT" ]
null
null
null
displ/pwscf/extractQEBands_test.py
tflovorn/displ
094c194c54f02d463353075c6ca82f457f1247fa
[ "MIT" ]
4
2018-04-09T20:39:41.000Z
2021-06-19T12:21:53.000Z
import unittest from displ.pwscf.extractQEBands import extractQEBands class TestExtractQEBands(unittest.TestCase): def test_ExtractQEBandsTa(self): nbnd, nks, evlist = extractQEBands("test_data/Ta110_bands_test.dat") self.assertEqual(nbnd, 112) self.assertEqual(nks, 181) self.assert...
34.133333
76
0.681641
import unittest from displ.pwscf.extractQEBands import extractQEBands class TestExtractQEBands(unittest.TestCase): def test_ExtractQEBandsTa(self): nbnd, nks, evlist = extractQEBands("test_data/Ta110_bands_test.dat") self.assertEqual(nbnd, 112) self.assertEqual(nks, 181) self.assert...
true
true
1c2f5c6a7204ca7918540349bdc9cb4d1d0fa24b
1,075
py
Python
data/migrations/versions/d42c175b439a_backfill_state_id_and_make_it_unique.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
data/migrations/versions/d42c175b439a_backfill_state_id_and_make_it_unique.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
data/migrations/versions/d42c175b439a_backfill_state_id_and_make_it_unique.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
""" Backfill state_id and make it unique. Revision ID: d42c175b439a Revises: 3e8cc74a1e7b Create Date: 2017-01-18 15:11:01.635632 """ # revision identifiers, used by Alembic. revision = "d42c175b439a" down_revision = "3e8cc74a1e7b" import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(op, table...
31.617647
96
0.712558
revision = "d42c175b439a" down_revision = "3e8cc74a1e7b" import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(op, tables, tester): # empty. conn = op.get_bind() conn.execute("update queueitem set state_id = id where state_id = ''") # ### commands auto generated by Alembic...
true
true
1c2f5c71d6e86238f8d4f38b52e27d16894fa8e5
14,253
py
Python
ami/flowchart/FlowchartGraphicsView.py
chuckie82/ami
7adb72c709afe4c1af53ef7f0d2b0e3639c63bf3
[ "BSD-3-Clause-LBNL" ]
6
2018-05-31T21:37:15.000Z
2022-01-24T15:22:46.000Z
ami/flowchart/FlowchartGraphicsView.py
chuckie82/ami
7adb72c709afe4c1af53ef7f0d2b0e3639c63bf3
[ "BSD-3-Clause-LBNL" ]
68
2019-06-06T21:00:49.000Z
2022-03-14T22:35:29.000Z
ami/flowchart/FlowchartGraphicsView.py
chuckie82/ami
7adb72c709afe4c1af53ef7f0d2b0e3639c63bf3
[ "BSD-3-Clause-LBNL" ]
2
2020-12-13T01:53:05.000Z
2021-07-19T04:56:51.000Z
from pyqtgraph.Qt import QtGui, QtCore, QtWidgets from pyqtgraph.widgets.GraphicsView import GraphicsView from pyqtgraph.graphicsItems.ViewBox import ViewBox from pyqtgraph import GridItem, GraphicsWidget from ami.flowchart.Node import NodeGraphicsItem, find_nearest from ami.flowchart.library.common import SourceNode ...
34.59466
102
0.601207
from pyqtgraph.Qt import QtGui, QtCore, QtWidgets from pyqtgraph.widgets.GraphicsView import GraphicsView from pyqtgraph.graphicsItems.ViewBox import ViewBox from pyqtgraph import GridItem, GraphicsWidget from ami.flowchart.Node import NodeGraphicsItem, find_nearest from ami.flowchart.library.common import SourceNode ...
true
true
1c2f5c7f8953b6491c7c1611f124d3706f3c0b55
1,727
py
Python
SoftLayer/CLI/block/snapshot/list.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
126
2015-01-05T05:09:22.000Z
2021-07-02T00:16:35.000Z
SoftLayer/CLI/block/snapshot/list.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
969
2015-01-05T15:55:31.000Z
2022-03-31T19:55:20.000Z
SoftLayer/CLI/block/snapshot/list.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
176
2015-01-22T11:23:40.000Z
2022-02-11T13:16:58.000Z
"""List block storage snapshots.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import columns as column_helper from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers COLUMNS = [ column_helper.Column('id', (...
30.839286
87
0.65663
import click import SoftLayer from SoftLayer.CLI import columns as column_helper from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers COLUMNS = [ column_helper.Column('id', ('id',), mask='id'), column_helper.Column('name', ('notes',), mask='notes'), ...
true
true
1c2f5df2b341f8429bcdc733f4d4efc8edbf36a8
5,513
py
Python
contrib/seeds/makeseeds.py
ctscoin/cts-core-original
73eaf46e6cf5a1fb26099bb1ab8ae5d1e846780a
[ "MIT" ]
1
2018-09-23T14:58:24.000Z
2018-09-23T14:58:24.000Z
contrib/seeds/makeseeds.py
ctscoin/cts-core-original
73eaf46e6cf5a1fb26099bb1ab8ae5d1e846780a
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
ctscoin/cts-core-original
73eaf46e6cf5a1fb26099bb1ab8ae5d1e846780a
[ "MIT" ]
1
2018-09-04T02:36:33.000Z
2018-09-04T02:36:33.000Z
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
32.052326
186
0.566842
# NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = { "" } import re import sys import dns.resolver import collections PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})...
true
true
1c2f5fdb8b40a19e7373e6298e3f6b6169e9e8b4
6,354
py
Python
ppcls/utils/config.py
PaddlePaddle/PaddleImgClass
f5265a1f2ab7aa113ae5245223f0528e3239a5e7
[ "Apache-2.0" ]
7
2020-03-30T04:32:01.000Z
2020-03-30T07:51:00.000Z
ppcls/utils/config.py
PaddlePaddle/PaddleClassification
51c1bdb27af15441995bf9840f7020cca9b7d9a8
[ "Apache-2.0" ]
null
null
null
ppcls/utils/config.py
PaddlePaddle/PaddleClassification
51c1bdb27af15441995bf9840f7020cca9b7d9a8
[ "Apache-2.0" ]
1
2020-04-07T17:03:24.000Z
2020-04-07T17:03:24.000Z
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applic...
29.691589
105
0.581523
import os import copy import argparse import yaml from ppcls.utils import logger from ppcls.utils import check __all__ = ['get_config'] class AttrDict(dict): def __getattr__(self, key): return self[key] def __setattr__(self, key, value): if key in self.__dict__: self...
true
true
1c2f60243d397014305e83077634402f45c35613
7,252
py
Python
calico_node/tests/st/libnetwork/test_labeling.py
ketkulka/calico
c5f432f127e0ccd00fa2ec90c2ee72378d2deef3
[ "Apache-2.0" ]
2
2015-03-06T14:26:51.000Z
2019-09-04T15:00:43.000Z
calico_node/tests/st/libnetwork/test_labeling.py
ketkulka/calico
c5f432f127e0ccd00fa2ec90c2ee72378d2deef3
[ "Apache-2.0" ]
null
null
null
calico_node/tests/st/libnetwork/test_labeling.py
ketkulka/calico
c5f432f127e0ccd00fa2ec90c2ee72378d2deef3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Tigera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
39.846154
86
0.579288
import json import yaml from nose_parameterized import parameterized from unittest import skip from tests.st.test_base import TestBase from tests.st.utils.docker_host import DockerHost from tests.st.utils.network import NETWORKING_LIBNETWORK from tests.st.utils.utils import ETCD_CA, ETCD_CERT, \ ETCD...
true
true
1c2f60784233e4fd75c444a1734a897e8f6f2993
1,457
py
Python
utils.py
pgiraud/bheka
dca033e9061633c0780907c8be6630a429f232f1
[ "MIT" ]
null
null
null
utils.py
pgiraud/bheka
dca033e9061633c0780907c8be6630a429f232f1
[ "MIT" ]
null
null
null
utils.py
pgiraud/bheka
dca033e9061633c0780907c8be6630a429f232f1
[ "MIT" ]
null
null
null
import os import ConfigParser import geojson import shapely from shapely.geometry import Polygon from shapely.prepared import prep from math import floor, ceil # Maximum resolution MAXRESOLUTION = 156543.0339 # X/Y axis limit max = MAXRESOLUTION * 256 / 2 class TileBuilder(object): def __init__(self, paramete...
26.017857
77
0.597804
import os import ConfigParser import geojson import shapely from shapely.geometry import Polygon from shapely.prepared import prep from math import floor, ceil MAXRESOLUTION = 156543.0339 max = MAXRESOLUTION * 256 / 2 class TileBuilder(object): def __init__(self, parameter): self.a = parameter ...
true
true
1c2f632c34820217849c7161d89ddc6085cbe221
3,010
py
Python
spark_auto_mapper_fhir/backbone_elements/test_report_teardown.py
imranq2/SparkAutoMapper.FHIR
dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2
[ "Apache-2.0" ]
1
2020-10-31T23:25:07.000Z
2020-10-31T23:25:07.000Z
spark_auto_mapper_fhir/backbone_elements/test_report_teardown.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
spark_auto_mapper_fhir/backbone_elements/test_report_teardown.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from typing import Optional, TYPE_CHECKING from spark_auto_mapper_fhir.fhir_types.list import FhirList from spark_auto_mapper_fhir.fhir_types.string import FhirString from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase from spark_auto_mapper_fhir.base_types.fh...
43
115
0.718272
from __future__ import annotations from typing import Optional, TYPE_CHECKING from spark_auto_mapper_fhir.fhir_types.list import FhirList from spark_auto_mapper_fhir.fhir_types.string import FhirString from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase from spark_auto_mapper_fhir.base_types.fh...
true
true
1c2f64085dc9bb8ab8b33047eb5099bbb908243d
1,168
py
Python
tests/python/test_native_functions.py
winnerineast/taichi
57ae0abc374e0df8f0b54bde4bcb92d9d97ed269
[ "MIT" ]
null
null
null
tests/python/test_native_functions.py
winnerineast/taichi
57ae0abc374e0df8f0b54bde4bcb92d9d97ed269
[ "MIT" ]
null
null
null
tests/python/test_native_functions.py
winnerineast/taichi
57ae0abc374e0df8f0b54bde4bcb92d9d97ed269
[ "MIT" ]
null
null
null
import taichi as ti @ti.all_archs def test_abs(): x = ti.var(ti.f32) N = 16 @ti.layout def place(): ti.root.dense(ti.i, N).place(x) @ti.kernel def func(): for i in range(N): x[i] = abs(-i) print(x[i]) ti.static_print(x[i]) func() for i in range(N): assert x[i] == i @...
14.78481
56
0.516267
import taichi as ti @ti.all_archs def test_abs(): x = ti.var(ti.f32) N = 16 @ti.layout def place(): ti.root.dense(ti.i, N).place(x) @ti.kernel def func(): for i in range(N): x[i] = abs(-i) print(x[i]) ti.static_print(x[i]) func() for i in range(N): assert x[i] == i @...
true
true
1c2f664fdcc5106e6c749e61b4c37cde48aa3eab
7,195
py
Python
lib/dataset/COCOKeypoints.py
ducongju/HigherHRNet-Human-Pose-Estimation
6986494e992fd58bced00543645fe8c49ec94c35
[ "MIT" ]
null
null
null
lib/dataset/COCOKeypoints.py
ducongju/HigherHRNet-Human-Pose-Estimation
6986494e992fd58bced00543645fe8c49ec94c35
[ "MIT" ]
null
null
null
lib/dataset/COCOKeypoints.py
ducongju/HigherHRNet-Human-Pose-Estimation
6986494e992fd58bced00543645fe8c49ec94c35
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (leoxiaobin@gmail.com) # Modified by Bowen Cheng (bcheng9@illinois.edu) # ------------------------------------------------------------------------------ fro...
39.751381
108
0.54663
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import numpy as np import pycocotools from .COCODataset import CocoDataset from .target_generators import HeatmapGenerator logger = logging.getLogger(__name__) class CocoKeypoints(Co...
true
true
1c2f67eaa12319964a62ea23974494926d2481ac
3,046
py
Python
scripts/print_handlers_md.py
mvalik/freshmaker
5d0642348b2605b951e1df1b1d0f887ea2d9d1fe
[ "MIT" ]
null
null
null
scripts/print_handlers_md.py
mvalik/freshmaker
5d0642348b2605b951e1df1b1d0f887ea2d9d1fe
[ "MIT" ]
null
null
null
scripts/print_handlers_md.py
mvalik/freshmaker
5d0642348b2605b951e1df1b1d0f887ea2d9d1fe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017 Red Hat, 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, modi...
35.011494
79
0.684504
from __future__ import print_function import os import sys sys.path.append(os.getcwd()) os.environ["FRESHMAKER_DEVELOPER_ENV"] = "1" def load_module(mod_name): __import__(mod_name) try: return sys.modules[mod_name] except AttributeError: raise ImportError("%r...
true
true
1c2f6a4b4184922a65c21a503ba64ca6d19a0edf
106,877
py
Python
yarGen.py
p-g-krish/yarGen
70cb03fd91b877982b9f1bff414cb98dd54e7cf5
[ "BSD-3-Clause" ]
null
null
null
yarGen.py
p-g-krish/yarGen
70cb03fd91b877982b9f1bff414cb98dd54e7cf5
[ "BSD-3-Clause" ]
null
null
null
yarGen.py
p-g-krish/yarGen
70cb03fd91b877982b9f1bff414cb98dd54e7cf5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # -*- coding: utf-8 -*- # # yarGen # A Rule Generator for YARA Rules # # Florian Roth __version__ = "0.22.0" import os import sys if sys.version_info[0] > 2: raise Exception("Some modules require Python 2, so please use that version instead of Python 3") import...
43.182626
135
0.532781
__version__ = "0.22.0" import os import sys if sys.version_info[0] > 2: raise Exception("Some modules require Python 2, so please use that version instead of Python 3") import argparse import re import traceback import operator import datetime import time import scandir import pefile import cPickle as p...
true
true
1c2f6afbc8e9ef22187334b1035854ca8b2f15e1
392
py
Python
tests/abilities/test_health.py
vishwatejharer/warriorpy
57a8dccfe23796ef213288972b20a7e883e79b24
[ "MIT" ]
46
2015-02-02T19:32:05.000Z
2022-03-16T16:24:14.000Z
tests/abilities/test_health.py
vishwatejharer/warriorpy
57a8dccfe23796ef213288972b20a7e883e79b24
[ "MIT" ]
5
2015-07-06T15:26:43.000Z
2020-04-21T08:12:04.000Z
tests/abilities/test_health.py
vishwatejharer/warriorpy
57a8dccfe23796ef213288972b20a7e883e79b24
[ "MIT" ]
10
2015-02-10T02:56:22.000Z
2021-05-15T22:37:38.000Z
import unittest from pythonwarrior.units.warrior import Warrior from pythonwarrior.abilities.health import Health class TestHealth(unittest.TestCase): def setUp(self): self.warrior = Warrior() self.health = Health(self.warrior) def test_should_return_the_amount_of_health(self): self....
26.133333
54
0.732143
import unittest from pythonwarrior.units.warrior import Warrior from pythonwarrior.abilities.health import Health class TestHealth(unittest.TestCase): def setUp(self): self.warrior = Warrior() self.health = Health(self.warrior) def test_should_return_the_amount_of_health(self): self....
true
true
1c2f6b8f8a0f1859eee2807fbf87a4134a1b435c
1,886
py
Python
reflex_behaviors/src/turn_detector.py
ehwa009/social_mind
0507f47b29371ef167b30b60bdd446fde118b626
[ "Apache-2.0" ]
7
2018-08-09T02:40:58.000Z
2022-02-07T03:32:23.000Z
reflex_behaviors/src/turn_detector.py
ehwa009/social_mind
0507f47b29371ef167b30b60bdd446fde118b626
[ "Apache-2.0" ]
null
null
null
reflex_behaviors/src/turn_detector.py
ehwa009/social_mind
0507f47b29371ef167b30b60bdd446fde118b626
[ "Apache-2.0" ]
2
2018-08-09T02:41:06.000Z
2018-08-27T03:54:10.000Z
#!/usr/bin/python #-*- encoding: utf8 -*- import rospy from std_msgs.msg import Bool, String, Empty from mind_msgs.msg import RaisingEvents, SetIdleMotion class TurnDetectorNode: def __init__(self): rospy.Subscriber('raising_events', RaisingEvents, self.handle_raising_events) rospy.Subscriber('rob...
34.290909
111
0.660657
import rospy from std_msgs.msg import Bool, String, Empty from mind_msgs.msg import RaisingEvents, SetIdleMotion class TurnDetectorNode: def __init__(self): rospy.Subscriber('raising_events', RaisingEvents, self.handle_raising_events) rospy.Subscriber('robot_is_saying', Bool, self.handle_robot_i...
true
true
1c2f6caf6f6e11179416b9ab70168e3b0a53bc9c
9,281
py
Python
dsl_parser/tests/test_deployment_update.py
mistio/cloudify-common
3b706ba31a3371052fbdd12486d4a0befbcf491b
[ "Apache-2.0" ]
6
2018-10-13T20:36:40.000Z
2021-07-04T17:19:13.000Z
dsl_parser/tests/test_deployment_update.py
mistio/cloudify-common
3b706ba31a3371052fbdd12486d4a0befbcf491b
[ "Apache-2.0" ]
97
2018-05-25T12:10:19.000Z
2022-03-30T10:16:40.000Z
dsl_parser/tests/test_deployment_update.py
mistio/cloudify-common
3b706ba31a3371052fbdd12486d4a0befbcf491b
[ "Apache-2.0" ]
15
2018-10-13T20:36:42.000Z
2021-09-06T15:19:11.000Z
######## # Copyright (c) 2018 Cloudify Platform Ltd. 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 requi...
40.352174
79
0.620623
from dsl_parser import constants from dsl_parser.multi_instance import modify_deployment from dsl_parser.tests.abstract_test_parser import AbstractTestParser class BaseDeploymentUpdateTest(AbstractTestParser): @staticmethod def modify_multi(plan, modified_nodes): return modify_deployment( ...
true
true
1c2f6d30e79eec7063eef49c70ac7be3368730fc
16,385
py
Python
Fairness_attack/defenses.py
Ninarehm/attack
0d5a6b842d4e81484540151d879036e9fe2184f1
[ "MIT" ]
8
2021-03-08T17:13:42.000Z
2022-03-31T00:57:53.000Z
Fairness_attack/defenses.py
lutai14/attack
773024c7b86be112521a2243f2f809a54891c81f
[ "MIT" ]
null
null
null
Fairness_attack/defenses.py
lutai14/attack
773024c7b86be112521a2243f2f809a54891c81f
[ "MIT" ]
1
2022-02-10T22:36:11.000Z
2022-02-10T22:36:11.000Z
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import copy import sys import numpy as np from sklearn import metrics, model_selection, neighbors import scipy.linalg as slin import scipy.sparse as sparse import uppe...
34.936034
131
0.603967
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import copy import sys import numpy as np from sklearn import metrics, model_selection, neighbors import scipy.linalg as slin import scipy.sparse as sparse import uppe...
true
true
1c2f6d943cfc6ffe509c5db07d44559569799c6f
71
py
Python
PycharmProjects/PythonExercicios/ex001.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
PycharmProjects/PythonExercicios/ex001.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
PycharmProjects/PythonExercicios/ex001.py
RodrigoMASRamos/Projects.py
ed15981b320914c9667305dcd5fb5b7906fd9b00
[ "MIT" ]
null
null
null
#Crie um programa que escreva "Olá,Mundo!" na tela. print('Olá,mundo!')
35.5
51
0.71831
print('Olá,mundo!')
true
true
1c2f6ed35f058502d9614cd6295c3e6bd26ed8f5
399
py
Python
coursegroup/asgi.py
Samyak-jain09/CourseRoom
2ba951bea983e1bd60b873a0b07db9bac9e30531
[ "MIT" ]
null
null
null
coursegroup/asgi.py
Samyak-jain09/CourseRoom
2ba951bea983e1bd60b873a0b07db9bac9e30531
[ "MIT" ]
null
null
null
coursegroup/asgi.py
Samyak-jain09/CourseRoom
2ba951bea983e1bd60b873a0b07db9bac9e30531
[ "MIT" ]
null
null
null
""" ASGI config for coursegroup project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_S...
23.470588
78
0.789474
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'coursegroup.settings') application = get_asgi_application()
true
true
1c2f6ed365f1583d7cb3505faa954aa708e16799
3,114
py
Python
tests/releases/test_cancel_release.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
3
2019-05-04T02:07:28.000Z
2020-10-16T17:47:44.000Z
tests/releases/test_cancel_release.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
604
2019-02-21T18:14:51.000Z
2022-02-10T08:13:54.000Z
tests/releases/test_cancel_release.py
kids-first/kf-api-study-creator
93a79b108b6474f9b4135ace06c89ddcf63dd257
[ "Apache-2.0" ]
null
null
null
import pytest from graphql_relay import to_global_id from creator.releases.models import Release from creator.releases.factories import ReleaseFactory CANCEL_RELEASE = """ mutation ($release: ID!) { cancelRelease(release: $release) { release { id state } } } """ @pyt...
25.112903
78
0.569685
import pytest from graphql_relay import to_global_id from creator.releases.models import Release from creator.releases.factories import ReleaseFactory CANCEL_RELEASE = """ mutation ($release: ID!) { cancelRelease(release: $release) { release { id state } } } """ @pyt...
true
true
1c2f7158c00e6dd0245bf303c5fa068571a21cd0
7,507
py
Python
hummingbot/wallet/ethereum/watcher/websocket_watcher.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
37
2020-07-08T03:44:26.000Z
2022-01-16T12:35:26.000Z
hummingbot/wallet/ethereum/watcher/websocket_watcher.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
13
2021-02-16T01:57:23.000Z
2021-02-16T03:50:03.000Z
hummingbot/wallet/ethereum/watcher/websocket_watcher.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
17
2021-04-07T21:29:46.000Z
2022-02-03T02:01:04.000Z
import websockets from web3 import Web3 from web3.exceptions import BlockNotFound from websockets.exceptions import ConnectionClosed import logging import ujson import asyncio from hexbytes import HexBytes from web3.datastructures import AttributeDict from cachetools import TTLCache from typing import Optional, Dict,...
41.705556
114
0.582257
import websockets from web3 import Web3 from web3.exceptions import BlockNotFound from websockets.exceptions import ConnectionClosed import logging import ujson import asyncio from hexbytes import HexBytes from web3.datastructures import AttributeDict from cachetools import TTLCache from typing import Optional, Dict,...
true
true
1c2f7270fe582a03985d45be13dfa2f5b03ec50e
3,445
py
Python
utils/measure/light_controller/hue.py
KrzysztofHajdamowicz/homeassistant-powercalc
374312e21d1c21b28984990442ec56fc52177f4e
[ "MIT" ]
219
2021-06-12T20:55:57.000Z
2022-03-30T07:56:43.000Z
utils/measure/light_controller/hue.py
KrzysztofHajdamowicz/homeassistant-powercalc
374312e21d1c21b28984990442ec56fc52177f4e
[ "MIT" ]
420
2021-06-09T20:22:03.000Z
2022-03-31T15:35:45.000Z
utils/measure/light_controller/hue.py
KrzysztofHajdamowicz/homeassistant-powercalc
374312e21d1c21b28984990442ec56fc52177f4e
[ "MIT" ]
84
2021-06-09T18:18:03.000Z
2022-03-29T09:28:06.000Z
from __future__ import annotations import os from phue import Bridge, PhueRegistrationException from PyInquirer import Separator from .controller import LightController, LightInfo from .errors import LightControllerError, ModelNotDiscoveredError NAME = "hue" TYPE_LIGHT = "light" TYPE_GROUP = "group" class HueLight...
33.77451
113
0.593033
from __future__ import annotations import os from phue import Bridge, PhueRegistrationException from PyInquirer import Separator from .controller import LightController, LightInfo from .errors import LightControllerError, ModelNotDiscoveredError NAME = "hue" TYPE_LIGHT = "light" TYPE_GROUP = "group" class HueLight...
true
true
1c2f73592f4593515d1f7796a421c2402e8aaa17
176
py
Python
src/setup.py
mountain/self
189e00e810d4d719fa6b37b400eef17d2521a64c
[ "MIT" ]
5
2019-12-30T16:18:06.000Z
2022-03-22T17:36:09.000Z
src/setup.py
mountain/self
189e00e810d4d719fa6b37b400eef17d2521a64c
[ "MIT" ]
2
2019-12-30T10:09:15.000Z
2020-01-03T02:48:18.000Z
src/setup.py
mountain/self
189e00e810d4d719fa6b37b400eef17d2521a64c
[ "MIT" ]
3
2019-12-30T06:10:04.000Z
2021-04-23T09:37:48.000Z
# -*- coding: utf-8 -*- from setuptools import setup setup(name='gym_selfx', version='0.0.1', install_requires=['gym'] # And any other dependencies foo needs )
17.6
70
0.642045
from setuptools import setup setup(name='gym_selfx', version='0.0.1', install_requires=['gym'] )
true
true
1c2f736dee638ce5325945c68f2abacc6aa6182c
2,036
py
Python
haystack/utils/geo.py
cbows/django-haystack
80c154b7b11fdcf99dd2ef0e82342ed13e26053a
[ "BSD-3-Clause" ]
2,021
2015-02-06T07:45:08.000Z
2022-03-30T12:26:39.000Z
haystack/utils/geo.py
cbows/django-haystack
80c154b7b11fdcf99dd2ef0e82342ed13e26053a
[ "BSD-3-Clause" ]
787
2015-02-03T20:06:04.000Z
2022-03-30T09:00:38.000Z
haystack/utils/geo.py
cbows/django-haystack
80c154b7b11fdcf99dd2ef0e82342ed13e26053a
[ "BSD-3-Clause" ]
878
2015-02-04T15:29:50.000Z
2022-03-28T16:51:44.000Z
from haystack.constants import WGS_84_SRID from haystack.exceptions import SpatialError def ensure_geometry(geom): """ Makes sure the parameter passed in looks like a GEOS ``GEOSGeometry``. """ if not hasattr(geom, "geom_type"): raise SpatialError("Point '%s' doesn't appear to be a GEOS geomet...
28.277778
85
0.655697
from haystack.constants import WGS_84_SRID from haystack.exceptions import SpatialError def ensure_geometry(geom): if not hasattr(geom, "geom_type"): raise SpatialError("Point '%s' doesn't appear to be a GEOS geometry." % geom) return geom def ensure_point(geom): ensure_geometry(geom) if g...
true
true
1c2f75d353f6511ae9439906228dcaac9f661c2c
316
py
Python
catkin_ws/src/ominibot_car/setup.py
CIRCUSPi/ROSKY
d0328e19cb65416b9353a1faabc725c1ac01c9f6
[ "MIT" ]
3
2021-08-03T07:08:24.000Z
2021-09-12T14:33:41.000Z
catkin_ws/src/ominibot_car/setup.py
kjoelovelife/ROSKY
d0328e19cb65416b9353a1faabc725c1ac01c9f6
[ "MIT" ]
1
2021-09-03T13:27:33.000Z
2021-09-06T03:28:16.000Z
catkin_ws/src/ominibot_car/setup.py
kjoelovelife/ROSKY
d0328e19cb65416b9353a1faabc725c1ac01c9f6
[ "MIT" ]
4
2020-12-28T08:20:07.000Z
2021-08-10T06:55:30.000Z
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['ominibot_car'], package_dir={'': 'include'}, ) setup(**setup_args)
24.307692
61
0.765823
tup import generate_distutils_setup setup_args = generate_distutils_setup( packages=['ominibot_car'], package_dir={'': 'include'}, ) setup(**setup_args)
true
true
1c2f760f7cf4ccd458cfcf6a6dae6d4d18c5a94f
24,454
py
Python
pysph/tools/geometry.py
suhasjains/pysph
df4e882ac790b2790ccd23fb1aaa66a049c2f7b1
[ "BSD-3-Clause" ]
3
2021-01-06T03:01:18.000Z
2022-03-21T03:02:55.000Z
docker/water/sph/tags/pysph/pysph/tools/geometry.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
1
2018-11-17T15:39:11.000Z
2018-11-17T15:39:11.000Z
docker/water/sph/tags/pysph/pysph/tools/geometry.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
1
2020-06-21T08:42:07.000Z
2020-06-21T08:42:07.000Z
from __future__ import division import numpy as np import copy from pysph.base.nnps import LinkedListNNPS from pysph.base.utils import get_particle_array, get_particle_array_wcsph from pyzoltan.core.carray import UIntArray from numpy.linalg import norm def distance(point1, point2=np.array([0.0, 0.0, 0.0])): retur...
32.692513
79
0.567637
from __future__ import division import numpy as np import copy from pysph.base.nnps import LinkedListNNPS from pysph.base.utils import get_particle_array, get_particle_array_wcsph from pyzoltan.core.carray import UIntArray from numpy.linalg import norm def distance(point1, point2=np.array([0.0, 0.0, 0.0])): retur...
true
true
1c2f763199c907a4bd8ad18f5c4993d0bb39d63b
367
py
Python
lib/config_helper.py
ebeuerle/server_count
de701e8868ce7374a52ba6a5bd9bdcd5b1d1aa69
[ "Unlicense" ]
null
null
null
lib/config_helper.py
ebeuerle/server_count
de701e8868ce7374a52ba6a5bd9bdcd5b1d1aa69
[ "Unlicense" ]
null
null
null
lib/config_helper.py
ebeuerle/server_count
de701e8868ce7374a52ba6a5bd9bdcd5b1d1aa69
[ "Unlicense" ]
null
null
null
import os import yaml PORTAL_CONFIG = os.path.join(os.path.dirname(__file__), '../configs/configs.yml') CONFIG = yaml.load(file(PORTAL_CONFIG, 'r')) class ConfigHelper(object): def __init__(self): self.halo_key = CONFIG["halo"]["api_key"] self.halo_secret = CONFIG["halo"]["api_secret_key"] ...
30.583333
81
0.659401
import os import yaml PORTAL_CONFIG = os.path.join(os.path.dirname(__file__), '../configs/configs.yml') CONFIG = yaml.load(file(PORTAL_CONFIG, 'r')) class ConfigHelper(object): def __init__(self): self.halo_key = CONFIG["halo"]["api_key"] self.halo_secret = CONFIG["halo"]["api_secret_key"] ...
true
true
1c2f76a2e472d9aec97545d33462dff9f8433f07
7,401
py
Python
imcls/datasets/ssdg_pacs.py
KaiyangZhou/mixstyle-release
2a6bfe8016ab0f33d751f585b810bc27310096aa
[ "MIT" ]
160
2021-01-13T07:17:27.000Z
2022-03-30T14:43:54.000Z
DomainGeneralization/imcls/datasets/ssdg_pacs.py
YBZh/EFDM
0baf35e26d22d0ab7d68a5f6cd7ed2541bdf8e4a
[ "MIT" ]
15
2021-03-23T22:30:20.000Z
2022-03-29T03:04:33.000Z
imcls/datasets/ssdg_pacs.py
KaiyangZhou/mixstyle-release
2a6bfe8016ab0f33d751f585b810bc27310096aa
[ "MIT" ]
22
2021-01-18T06:37:45.000Z
2022-03-16T07:37:15.000Z
import os.path as osp import random from collections import defaultdict from dassl.data.datasets import DATASET_REGISTRY, Datum, DatasetBase from dassl.utils import mkdir_if_missing, read_json, write_json @DATASET_REGISTRY.register() class SSDGPACS(DatasetBase): """PACS. Statistics: - 4 domains: Pho...
37.005
106
0.576409
import os.path as osp import random from collections import defaultdict from dassl.data.datasets import DATASET_REGISTRY, Datum, DatasetBase from dassl.utils import mkdir_if_missing, read_json, write_json @DATASET_REGISTRY.register() class SSDGPACS(DatasetBase): dataset_dir = 'pacs' domains = ['art_painting'...
true
true
1c2f77808aaa6541d49b4da9726f01bf5798e7fe
2,874
py
Python
EventFilter/SiPixelRawToDigi/test/runRawToDigi_cfg.py
Hemida93/cmssw
75a37059fc69b625a5e985f4f2e684cdebeeb8b5
[ "Apache-2.0" ]
1
2020-05-27T10:52:33.000Z
2020-05-27T10:52:33.000Z
EventFilter/SiPixelRawToDigi/test/runRawToDigi_cfg.py
Hemida93/cmssw
75a37059fc69b625a5e985f4f2e684cdebeeb8b5
[ "Apache-2.0" ]
28
2019-08-15T15:21:11.000Z
2021-12-29T14:13:18.000Z
EventFilter/SiPixelRawToDigi/test/runRawToDigi_cfg.py
Hemida93/cmssw
75a37059fc69b625a5e985f4f2e684cdebeeb8b5
[ "Apache-2.0" ]
1
2020-08-18T10:29:49.000Z
2020-08-18T10:29:49.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("MyRawToDigi") process.load("FWCore.MessageLogger.MessageLogger_cfi") process.load('Configuration.StandardSequences.GeometryRecoDB_cff') #process.load("Configuration.StandardSequences.MagneticField_38T_cff") process.load('Configuration.StandardSequences.M...
42.264706
123
0.787404
import FWCore.ParameterSet.Config as cms process = cms.Process("MyRawToDigi") process.load("FWCore.MessageLogger.MessageLogger_cfi") process.load('Configuration.StandardSequences.GeometryRecoDB_cff') process.load('Configuration.StandardSequences.MagneticField_cff') process.load("Configuration.StandardSequences.Front...
true
true
1c2f77956e5fa37d1365479ad014e939c953bc44
376
py
Python
app-flask/app-flask/app.py
benfab/mesos-demo-apps
e8da8cca8a1f916ea482ce21a6a3155d0ce56243
[ "Apache-2.0" ]
null
null
null
app-flask/app-flask/app.py
benfab/mesos-demo-apps
e8da8cca8a1f916ea482ce21a6a3155d0ce56243
[ "Apache-2.0" ]
null
null
null
app-flask/app-flask/app.py
benfab/mesos-demo-apps
e8da8cca8a1f916ea482ce21a6a3155d0ce56243
[ "Apache-2.0" ]
null
null
null
from flask import Flask, render_template import socket app = Flask(__name__) ip_address = socket.gethostbyname(socket.gethostname()) docker_hostname = socket.gethostname() @app.route('/') def hello_world(): return render_template('index.html', hostname=docker_hostname,myip=ip_address) if __name__ == "__main__": ...
26.857143
82
0.75
from flask import Flask, render_template import socket app = Flask(__name__) ip_address = socket.gethostbyname(socket.gethostname()) docker_hostname = socket.gethostname() @app.route('/') def hello_world(): return render_template('index.html', hostname=docker_hostname,myip=ip_address) if __name__ == "__main__": ...
true
true
1c2f77e32e620dacd00397ce78b7c62f84f3f36d
6,947
py
Python
build/scripts-3.7/startproject.py
lixiaopi1985/agrimet_scraper
eb566d2bbb6f1882656a1bc5319e9f35ad7dc5df
[ "MIT" ]
null
null
null
build/scripts-3.7/startproject.py
lixiaopi1985/agrimet_scraper
eb566d2bbb6f1882656a1bc5319e9f35ad7dc5df
[ "MIT" ]
null
null
null
build/scripts-3.7/startproject.py
lixiaopi1985/agrimet_scraper
eb566d2bbb6f1882656a1bc5319e9f35ad7dc5df
[ "MIT" ]
null
null
null
#!python """This module is used to run at command line to initialize project myproject | | | |_ db | | |___ config | |_____ log |_______ station info """ import argparse import os import sys import sqlite3 from configparser import RawConfigParser import shutil from agrimetscraper.utils.configurations import basic_c...
35.085859
182
0.690226
import argparse import os import sys import sqlite3 from configparser import RawConfigParser import shutil from agrimetscraper.utils.configurations import basic_configs from agrimetscraper.utils.configreader import Configtuner from agrimetscraper.utils.stationinfo import Stationinfo from agrimetscraper.utils.mylogge...
true
true
1c2f7840f420a76ee14e7ae813ac5048f0aeb1fa
11,631
py
Python
gym_trading/envs/Testing_Env.py
Deion14/mlp3
cab1a18b36114f49622e3a5fc8650efda5205e01
[ "MIT" ]
null
null
null
gym_trading/envs/Testing_Env.py
Deion14/mlp3
cab1a18b36114f49622e3a5fc8650efda5205e01
[ "MIT" ]
1
2018-03-04T13:43:10.000Z
2018-03-04T13:43:10.000Z
gym_trading/envs/Testing_Env.py
Deion14/mlp3
cab1a18b36114f49622e3a5fc8650efda5205e01
[ "MIT" ]
null
null
null
import gym from gym import error, spaces, utils from gym.utils import seeding from collections import Counter import quandl import numpy as np from numpy import random import pandas as pd import logging import pdb from sklearn import preprocessing import tempfile log = logging.getLogger(__name__) log.info('%s logger...
33.326648
182
0.590491
import gym from gym import error, spaces, utils from gym.utils import seeding from collections import Counter import quandl import numpy as np from numpy import random import pandas as pd import logging import pdb from sklearn import preprocessing import tempfile log = logging.getLogger(__name__) log.info('%s logger...
true
true
1c2f787ce2eac863bb77dd9a5d921cb975743311
428
py
Python
array/0283_move_zeroes/0283_move_zeroes.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
6
2019-09-16T01:50:44.000Z
2020-09-17T08:52:25.000Z
array/0283_move_zeroes/0283_move_zeroes.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
null
null
null
array/0283_move_zeroes/0283_move_zeroes.py
zdyxry/LeetCode
33371285d0f3302158230f46e8b1b63b9f4639c4
[ "Xnet", "X11" ]
4
2020-02-07T12:43:16.000Z
2021-04-11T06:38:55.000Z
# -*- coding: utf-8 -*- class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: None Do not return anything, modify nums in-place instead. """ pos = 0 for i in range(len(nums)): if nums[i]: nums[i], nums[pos]...
22.526316
74
0.502336
class Solution(object): def moveZeroes(self, nums): pos = 0 for i in range(len(nums)): if nums[i]: nums[i], nums[pos] = nums[pos], nums[i] pos += 1 nums = [0,1,0,3,12] Solution().moveZeroes(nums) print(nums)
true
true
1c2f7a621aca507291ac0ddb3de1ae98acabf9a0
4,878
py
Python
tests/integration/states/test_nsxt_manager.py
jain-prerna/salt-ext-modules-vmware-old
89ea6dd77c6d5a35dc55c23adbdc361949a63057
[ "Apache-2.0" ]
1
2021-11-02T20:24:19.000Z
2021-11-02T20:24:19.000Z
tests/integration/states/test_nsxt_manager.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
null
null
null
tests/integration/states/test_nsxt_manager.py
cmcmarrow/salt-ext-modules-vmware
c546a9f9ae121b7399dabae82f714117d0ab558d
[ "Apache-2.0" ]
1
2021-12-15T02:46:59.000Z
2021-12-15T02:46:59.000Z
""" Integration Tests for nsxt_manager state module """ import logging import pytest import requests from requests.auth import HTTPBasicAuth log = logging.getLogger(__name__) BASE_URL = "https://{}/api/v1/configs/management" def _get_manager_config_from_nsxt(nsxt_config): hostname = nsxt_config["hostname"]...
35.093525
91
0.708282
import logging import pytest import requests from requests.auth import HTTPBasicAuth log = logging.getLogger(__name__) BASE_URL = "https://{}/api/v1/configs/management" def _get_manager_config_from_nsxt(nsxt_config): hostname = nsxt_config["hostname"] username = nsxt_config["username"] password = nsxt_...
true
true
1c2f7a87173d99f850ebdd8cc9bb86dfe639a434
130,630
py
Python
cvat/apps/engine/tests/test_rest_api.py
eegml/cvat
e7808cfb0322c1adcf61e7955b8b4a8c2badd0d2
[ "MIT" ]
null
null
null
cvat/apps/engine/tests/test_rest_api.py
eegml/cvat
e7808cfb0322c1adcf61e7955b8b4a8c2badd0d2
[ "MIT" ]
null
null
null
cvat/apps/engine/tests/test_rest_api.py
eegml/cvat
e7808cfb0322c1adcf61e7955b8b4a8c2badd0d2
[ "MIT" ]
null
null
null
# Copyright (C) 2018 Intel Corporation # # SPDX-License-Identifier: MIT import os import shutil from PIL import Image from io import BytesIO from enum import Enum import random from rest_framework.test import APITestCase, APIClient from rest_framework import status from django.conf import settings from django.contrib....
38.443202
157
0.544194
import os import shutil from PIL import Image from io import BytesIO from enum import Enum import random from rest_framework.test import APITestCase, APIClient from rest_framework import status from django.conf import settings from django.contrib.auth.models import User, Group from cvat.apps.engine.models import (T...
true
true
1c2f7ce2cbbf216deda2ff16d6295d70fd720a2c
1,589
py
Python
nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py
mfalkiewicz/nipype
775e21b78fb1ffa2ff9cb12e6f052868bd44d052
[ "Apache-2.0" ]
1
2015-01-19T13:12:27.000Z
2015-01-19T13:12:27.000Z
nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py
bpinsard/nipype
373bdddba9f675ef153951afa368729e2d8950d2
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/semtools/brains/tests/test_auto_BRAINSPosteriorToContinuousClass.py
bpinsard/nipype
373bdddba9f675ef153951afa368729e2d8950d2
[ "Apache-2.0" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..classify import BRAINSPosteriorToContinuousClass def test_BRAINSPosteriorToContinuousClass_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ign...
30.557692
67
0.684078
from __future__ import unicode_literals from ..classify import BRAINSPosteriorToContinuousClass def test_BRAINSPosteriorToContinuousClass_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(deprecated='1.0.0', nohash=Tru...
true
true
1c2f7e3777a18d0dc93765a0705a860de8b9f484
2,818
py
Python
tests/unit/test_checker_manager.py
AnarchyCrew/flake9
ee2920d775df18481d638c2da084d229d56f95b9
[ "MIT" ]
null
null
null
tests/unit/test_checker_manager.py
AnarchyCrew/flake9
ee2920d775df18481d638c2da084d229d56f95b9
[ "MIT" ]
null
null
null
tests/unit/test_checker_manager.py
AnarchyCrew/flake9
ee2920d775df18481d638c2da084d229d56f95b9
[ "MIT" ]
null
null
null
"""Tests for the Manager object for FileCheckers.""" import errno import mock import pytest from flake8 import checker def style_guide_mock(**kwargs): """Create a mock StyleGuide object.""" kwargs.setdefault('diff', False) kwargs.setdefault('jobs', '4') style_guide = mock.Mock() style_guide.opti...
35.670886
76
0.689496
import errno import mock import pytest from flake8 import checker def style_guide_mock(**kwargs): kwargs.setdefault('diff', False) kwargs.setdefault('jobs', '4') style_guide = mock.Mock() style_guide.options = mock.Mock(**kwargs) return style_guide def _parallel_checker_manager(): style_gu...
true
true
1c2f7e74de4507242df96dc94fae80731d17c36f
996
py
Python
segs/deeplabv3_detection_common.py
Mooonside/SEGS
93bb66d9979d9beefab9cfd1a146d6e7369f5d86
[ "MIT" ]
5
2018-10-22T06:56:22.000Z
2018-10-29T13:03:39.000Z
segs/deeplabv3_detection_common.py
Mooonside/SEGS
93bb66d9979d9beefab9cfd1a146d6e7369f5d86
[ "MIT" ]
null
null
null
segs/deeplabv3_detection_common.py
Mooonside/SEGS
93bb66d9979d9beefab9cfd1a146d6e7369f5d86
[ "MIT" ]
2
2018-03-17T06:55:35.000Z
2018-04-13T12:12:44.000Z
""" IN YOLOV3, uses 3 layers, respectively downsample 32, downsample 16 and downsample 8 IN DEEOLABV3+, the nwetwork output layers if stride 16, so need to add more layer to generate downsample 32! """ import numpy as np detection_feature_layers = [ # downsample 8 'xception_65/entry_flow/block2/unit_1/xception...
25.538462
112
0.653614
import numpy as np detection_feature_layers = [ 'xception_65/entry_flow/block2/unit_1/xception_module/add:0', 'xception_65/middle_flow/block1/unit_16/xception_module/add:0', 'xception_65/detection_branch/exit_flow/block3/unit_1/xception_module/separable_conv3/pointwise_conv/Relu:0' ] detect...
true
true
1c2f800b44d6020a3330de2d51454b6d74ce0244
13,786
py
Python
birdy/client/base.py
generic-ci-org/birdy
63c2d0aacad67569d8d8fc25c9a702d80c69fcd0
[ "Apache-2.0" ]
null
null
null
birdy/client/base.py
generic-ci-org/birdy
63c2d0aacad67569d8d8fc25c9a702d80c69fcd0
[ "Apache-2.0" ]
null
null
null
birdy/client/base.py
generic-ci-org/birdy
63c2d0aacad67569d8d8fc25c9a702d80c69fcd0
[ "Apache-2.0" ]
null
null
null
import types from collections import OrderedDict from textwrap import dedent from boltons.funcutils import FunctionBuilder import requests import requests.auth import owslib from owslib.util import ServiceException from owslib.wps import WPS_DEFAULT_VERSION, WebProcessingService, SYNC, ASYNC, ComplexData from birdy.e...
35.07888
111
0.592268
import types from collections import OrderedDict from textwrap import dedent from boltons.funcutils import FunctionBuilder import requests import requests.auth import owslib from owslib.util import ServiceException from owslib.wps import WPS_DEFAULT_VERSION, WebProcessingService, SYNC, ASYNC, ComplexData from birdy.e...
true
true
1c2f8026b9f6d2175d9d4b63b9ddda989b227350
1,070
py
Python
bff/__init__.py
rudolfhohn/bff
0d5a8da62f2250bef78dffe0aee8bab2475014c2
[ "MIT" ]
null
null
null
bff/__init__.py
rudolfhohn/bff
0d5a8da62f2250bef78dffe0aee8bab2475014c2
[ "MIT" ]
null
null
null
bff/__init__.py
rudolfhohn/bff
0d5a8da62f2250bef78dffe0aee8bab2475014c2
[ "MIT" ]
null
null
null
"""All of bff' functions.""" import logging from ._version import get_versions # Import submodules. from . import plot from .fancy import ( avg_dicts, cast_to_category_pd, concat_with_categories, get_peaks, idict, kwargs_2_list, log_df, mem_usage_pd, normalization_pd, parse_da...
18.77193
62
0.680374
import logging from ._version import get_versions from . import plot from .fancy import ( avg_dicts, cast_to_category_pd, concat_with_categories, get_peaks, idict, kwargs_2_list, log_df, mem_usage_pd, normalization_pd, parse_date, pipe_multiprocessing_pd, read_sql_by_...
true
true
1c2f80cffbc9bb996fcf769dd532a8c769b4d15f
1,837
py
Python
ImageProcessing/make_makefile.py
Datamuseum-DK/R1000.HwDoc
cb0841540a4ac184a08957daac1a470b6916a663
[ "BSD-2-Clause" ]
null
null
null
ImageProcessing/make_makefile.py
Datamuseum-DK/R1000.HwDoc
cb0841540a4ac184a08957daac1a470b6916a663
[ "BSD-2-Clause" ]
null
null
null
ImageProcessing/make_makefile.py
Datamuseum-DK/R1000.HwDoc
cb0841540a4ac184a08957daac1a470b6916a663
[ "BSD-2-Clause" ]
null
null
null
import glob import os def gen_makefile(): fo = open("Makefile", "w") fo.write("default: all\n") for img in sorted(glob.glob("../[A-Z]*/rawimg/*.pgm")): fo.write("\n") brd = img.split('/')[1] try: os.mkdir(brd) except FileExistsError: pass ...
30.114754
84
0.408819
import glob import os def gen_makefile(): fo = open("Makefile", "w") fo.write("default: all\n") for img in sorted(glob.glob("../[A-Z]*/rawimg/*.pgm")): fo.write("\n") brd = img.split('/')[1] try: os.mkdir(brd) except FileExistsError: pass ...
true
true
1c2f816ad4038bf454b58b4c571eeeb66838c133
6,999
py
Python
homeassistant/components/discovery/__init__.py
SAABoholic/core
25b093e69e9939c131f4dc83566a9571929803df
[ "Apache-2.0" ]
4
2020-07-29T17:47:10.000Z
2020-09-16T13:39:13.000Z
homeassistant/components/discovery/__init__.py
SAABoholic/core
25b093e69e9939c131f4dc83566a9571929803df
[ "Apache-2.0" ]
6
2020-11-08T19:40:10.000Z
2022-03-01T11:11:07.000Z
homeassistant/components/discovery/__init__.py
SAABoholic/core
25b093e69e9939c131f4dc83566a9571929803df
[ "Apache-2.0" ]
3
2016-10-03T20:14:06.000Z
2019-04-19T15:56:56.000Z
""" Starts a service to scan in intervals for new devices. Will emit EVENT_PLATFORM_DISCOVERED whenever a new service has been discovered. Knows which components handle certain types, will make sure they are loaded before the EVENT_PLATFORM_DISCOVERED is fired. """ from datetime import timedelta import json import lo...
30.298701
84
0.667667
from datetime import timedelta import json import logging from netdisco.discovery import NetworkDiscovery import voluptuous as vol from homeassistant import config_entries from homeassistant.const import EVENT_HOMEASSISTANT_START from homeassistant.core import callback import homeassistant.helpers.config_validation a...
true
true
1c2f81a36eb04fce59a539821083dbe39c1341bd
18,007
py
Python
anti_sybil/utils.py
BrightID/BrightID-Anti-Sybil
8f31a73bae05a61b66ef0fd8a68bfb255127a943
[ "0BSD" ]
32
2019-01-10T17:44:54.000Z
2022-03-17T21:15:07.000Z
anti_sybil/utils.py
BrightID/BrightID-Anti-Sybil
8f31a73bae05a61b66ef0fd8a68bfb255127a943
[ "0BSD" ]
2
2019-01-25T07:54:21.000Z
2021-02-06T09:01:24.000Z
anti_sybil/utils.py
BrightID/BrightID-Anti-Sybil
8f31a73bae05a61b66ef0fd8a68bfb255127a943
[ "0BSD" ]
7
2019-11-04T01:55:35.000Z
2022-01-22T17:03:59.000Z
from arango import ArangoClient from bisect import bisect import networkx as nx import numpy as np import zipfile import tarfile import requests import json import csv import os GRAPH_TEMPLATE = GRAPH_3D_TEMPLATE = COMPARE_GRAPH_TEMPLATE = None BACKUP_URL = 'https://storage.googleapis.com/brightid-backups/brightid.tar...
37.592902
126
0.596935
from arango import ArangoClient from bisect import bisect import networkx as nx import numpy as np import zipfile import tarfile import requests import json import csv import os GRAPH_TEMPLATE = GRAPH_3D_TEMPLATE = COMPARE_GRAPH_TEMPLATE = None BACKUP_URL = 'https://storage.googleapis.com/brightid-backups/brightid.tar...
true
true
1c2f81b03678af7869adfd7799bca16693d3ecce
1,317
py
Python
keystone/common/policies/token_revocation.py
rajivmucheli/keystone
d55099d4a17e3672d478aae8c367bcdf9af15fb9
[ "Apache-2.0" ]
null
null
null
keystone/common/policies/token_revocation.py
rajivmucheli/keystone
d55099d4a17e3672d478aae8c367bcdf9af15fb9
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
keystone/common/policies/token_revocation.py
rajivmucheli/keystone
d55099d4a17e3672d478aae8c367bcdf9af15fb9
[ "Apache-2.0" ]
5
2019-06-06T15:11:37.000Z
2021-06-07T08:23:23.000Z
# 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 # distributed under t...
38.735294
79
0.714503
from oslo_policy import policy from keystone.common.policies import base token_revocation_policies = [ policy.DocumentedRuleDefault( name=base.IDENTITY % 'revocation_list', check_str=base.RULE_SERVICE_OR_ADMIN, # difference since this API is going to return an empty li...
true
true
1c2f82336bf13e363d3cfc4c3ec671a414e336c0
1,570
py
Python
sagemaker-dash/tutorials/app2.py
philippe-heitzmann/python-apps
1cc6e5e9b9ac81c81a3d4f0e420ff488fe6b2f0a
[ "MIT" ]
13
2021-05-23T15:47:24.000Z
2022-03-24T16:22:14.000Z
sagemaker-dash/tutorials/app2.py
philippe-heitzmann/python-apps
1cc6e5e9b9ac81c81a3d4f0e420ff488fe6b2f0a
[ "MIT" ]
4
2021-11-16T20:44:55.000Z
2022-01-13T19:13:38.000Z
sagemaker-dash/tutorials/app2.py
philippe-heitzmann/python-apps
1cc6e5e9b9ac81c81a3d4f0e420ff488fe6b2f0a
[ "MIT" ]
11
2021-01-31T06:18:10.000Z
2021-11-21T00:02:05.000Z
# -*- coding: utf-8 -*- # Run this app with `python app.py` and # visit http://127.0.0.1:8050/ in your web browser. import dash import dash_core_components as dcc import dash_html_components as html import plotly.express as px import pandas as pd external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] ...
31.4
78
0.590446
import dash import dash_core_components as dcc import dash_html_components as html import plotly.express as px import pandas as pd external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) colors = {'background': '#111111', 'text':...
true
true
1c2f82d07a90ad4af67c057f3f46e0d05ad12446
1,777
py
Python
machine_learning_service/asgi.py
clemencegoh/machine_learning_service
49ccb65dd8cca544bed801559b920cd7bea2d120
[ "MIT" ]
null
null
null
machine_learning_service/asgi.py
clemencegoh/machine_learning_service
49ccb65dd8cca544bed801559b920cd7bea2d120
[ "MIT" ]
null
null
null
machine_learning_service/asgi.py
clemencegoh/machine_learning_service
49ccb65dd8cca544bed801559b920cd7bea2d120
[ "MIT" ]
null
null
null
""" ASGI config for machine_learning_service project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application from chatapp.middle...
29.616667
84
0.615644
import os from django.core.asgi import get_asgi_application from chatapp.middleware import websockets os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'machine_learning_service.settings') django_application = get_asgi_application() application = get_asgi_application() application = websockets(application) ...
true
true
1c2f850bf574fe5662363a54d5b21bfabd524c82
9,553
py
Python
gen.py
pengfei2017/lstm_and_ctc_ocr
23c746ce806d44795b7f1557afad03f6dc88084e
[ "MIT" ]
2
2018-11-18T02:40:25.000Z
2020-03-17T14:41:51.000Z
gen.py
pengfei2017/lstm_and_ctc_ocr
23c746ce806d44795b7f1557afad03f6dc88084e
[ "MIT" ]
null
null
null
gen.py
pengfei2017/lstm_and_ctc_ocr
23c746ce806d44795b7f1557afad03f6dc88084e
[ "MIT" ]
3
2018-07-06T11:38:08.000Z
2020-03-17T14:45:38.000Z
#!/usr/bin/env python # # Copyright (c) 2016 Matthew Earl # # 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, modif...
32.828179
88
0.611745
__all__ = ( 'generate_ims', ) import math import os import random import sys import cv2 import numpy from PIL import Image from PIL import ImageDraw from PIL import ImageFont import common from common import OUTPUT_SHAPE fonts = ["fonts/华文细黑.ttf"] FONT_HEIGHT = 32 CHARS = common.C...
true
true
1c2f8511726841e7d4acc41ea149bb001473f4e0
3,218
py
Python
autotrader_1/autotrader_1/settings.py
msamunetogetoge/ta-lib_with_bitflyer
021cb88bd764d42c054e4f0a8f3ed330dc8a79ae
[ "MIT" ]
null
null
null
autotrader_1/autotrader_1/settings.py
msamunetogetoge/ta-lib_with_bitflyer
021cb88bd764d42c054e4f0a8f3ed330dc8a79ae
[ "MIT" ]
null
null
null
autotrader_1/autotrader_1/settings.py
msamunetogetoge/ta-lib_with_bitflyer
021cb88bd764d42c054e4f0a8f3ed330dc8a79ae
[ "MIT" ]
null
null
null
""" Django settings for autotrader_1 project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ ""...
26.377049
92
0.671224
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '0qw(@t+8bbmv14#k2_5v!#jx&ei_ee%_&a!fxl*htynys4s9f4' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'technical', 'django.contrib.admin', 'django.contrib.auth...
true
true
1c2f868be044541af4d2d26dbb6612c5b00cce43
679
py
Python
Configuration/Generator/python/DoubleElectronPt10Extended_pythia8_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Generator/python/DoubleElectronPt10Extended_pythia8_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Generator/python/DoubleElectronPt10Extended_pythia8_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms generator = cms.EDFilter("Pythia8PtGun", PGunParameters = cms.PSet( MaxPt = cms.double(10.01), MinPt = cms.double(9.99), ParticleID = cms.vint32(11), AddAntiParticle = cms.bool(True), MaxEta = cms.double(4.0), MaxPhi = cms.dou...
32.333333
79
0.631811
import FWCore.ParameterSet.Config as cms generator = cms.EDFilter("Pythia8PtGun", PGunParameters = cms.PSet( MaxPt = cms.double(10.01), MinPt = cms.double(9.99), ParticleID = cms.vint32(11), AddAntiParticle = cms.bool(True), MaxEta = cms.double(4.0), MaxPhi = cms.dou...
true
true
1c2f86efffda03a5811f1554bd9b4781fba665a5
3,729
py
Python
tests/unit/core/providers/aws/test_response.py
avosper-intellaegis/runway
757d4e7db269ec16479b044ac82a69f25fa2a450
[ "Apache-2.0" ]
134
2018-02-26T21:35:23.000Z
2022-03-03T00:30:27.000Z
tests/unit/core/providers/aws/test_response.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
937
2018-03-08T22:04:35.000Z
2022-03-30T12:21:47.000Z
tests/unit/core/providers/aws/test_response.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
70
2018-02-26T23:48:11.000Z
2022-03-02T18:44:30.000Z
"""Test runway.core.providers.aws._response.""" # pylint: disable=no-self-use # pyright: basic from __future__ import annotations from typing import TYPE_CHECKING from runway.core.providers.aws import BaseResponse, ResponseError, ResponseMetadata if TYPE_CHECKING: from pytest_mock import MockerFixture MODULE = ...
36.920792
85
0.665326
from __future__ import annotations from typing import TYPE_CHECKING from runway.core.providers.aws import BaseResponse, ResponseError, ResponseMetadata if TYPE_CHECKING: from pytest_mock import MockerFixture MODULE = "runway.core.providers.aws._response" class TestBaseResponse: def test_init(self, mock...
true
true
1c2f87ddb47c9dc701136acf203c663f95516839
3,580
py
Python
students/linden/firstgame.py
sleepinghungry/wwtag
8ffa886f28281e3acef2465953d26db85a81a045
[ "MIT" ]
null
null
null
students/linden/firstgame.py
sleepinghungry/wwtag
8ffa886f28281e3acef2465953d26db85a81a045
[ "MIT" ]
null
null
null
students/linden/firstgame.py
sleepinghungry/wwtag
8ffa886f28281e3acef2465953d26db85a81a045
[ "MIT" ]
null
null
null
from basic_context import BasicGameWorld from basic_context import BasicGameEngine from basic_context import NORTH, SOUTH, EAST, WEST, UP, DOWN, RIGHT, LEFT, IN, OUT, FORWARD, BACK, NORTH_WEST, NORTH_EAST, SOUTH_WEST, SOUTH_EAST, NOT_DIRECTION from basic_context import Die import random import time world = BasicGameWo...
42.117647
230
0.738268
from basic_context import BasicGameWorld from basic_context import BasicGameEngine from basic_context import NORTH, SOUTH, EAST, WEST, UP, DOWN, RIGHT, LEFT, IN, OUT, FORWARD, BACK, NORTH_WEST, NORTH_EAST, SOUTH_WEST, SOUTH_EAST, NOT_DIRECTION from basic_context import Die import random import time world = BasicGameWo...
true
true
1c2f8852d45aed7abebdf9ca4460bae1586b80b7
3,832
py
Python
deepchem/models/tests/test_megnet.py
Chahalprincy/deepchem
9d1a6a879cc74b065694b3ddb763d52151d57b7a
[ "MIT" ]
null
null
null
deepchem/models/tests/test_megnet.py
Chahalprincy/deepchem
9d1a6a879cc74b065694b3ddb763d52151d57b7a
[ "MIT" ]
null
null
null
deepchem/models/tests/test_megnet.py
Chahalprincy/deepchem
9d1a6a879cc74b065694b3ddb763d52151d57b7a
[ "MIT" ]
null
null
null
""" Test for MEGNetModel """ import pytest import tempfile import numpy as np import deepchem as dc from deepchem.utils.fake_data_generator import FakeGraphGenerator as FGG try: from deepchem.models.torch_models import MEGNetModel # When pytest runs without pytorch in the environment (ex: as in tensorflow workflow...
32.474576
88
0.575678
import pytest import tempfile import numpy as np import deepchem as dc from deepchem.utils.fake_data_generator import FakeGraphGenerator as FGG try: from deepchem.models.torch_models import MEGNetModel except ModuleNotFoundError: pass @pytest.mark.torch def test_megnet_overfit(): fgg = FGG(avg_n_nodes...
true
true
1c2f888b68a0b40bc943e04a36c78682cd388704
183
py
Python
python-curso/scripts python/Desafio 02.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
python-curso/scripts python/Desafio 02.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
python-curso/scripts python/Desafio 02.py
JohnnyPessoli/Cursos
ea80ed21469d0807c54c9091adea9ec0116b8ba7
[ "MIT" ]
null
null
null
Dia=input('Digite o dia de nascimento:') Mês=input('Digite o mês de nascimento:') Ano=input('Digite o ano de nascimento:') print('Você nasceu no dia',Dia,'/',Mês,'/', Ano,'Correto?')
36.6
59
0.688525
Dia=input('Digite o dia de nascimento:') Mês=input('Digite o mês de nascimento:') Ano=input('Digite o ano de nascimento:') print('Você nasceu no dia',Dia,'/',Mês,'/', Ano,'Correto?')
true
true
1c2f891aed25a0ef2145170175c635d35a56e4ef
1,968
py
Python
myuw/dao/hx_toolkit_dao.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
myuw/dao/hx_toolkit_dao.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
myuw/dao/hx_toolkit_dao.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import math import datetime from myuw.dao.term import get_current_quarter, get_comparison_date from hx_toolkit.file_dao import get_rendered_article_by_id, \ get_article_by_phase_quarter_week, get_article_links_by_category def ...
25.230769
78
0.694106
import math import datetime from myuw.dao.term import get_current_quarter, get_comparison_date from hx_toolkit.file_dao import get_rendered_article_by_id, \ get_article_by_phase_quarter_week, get_article_links_by_category def get_article_of_week_by_request(request): term = get_current_quarter(request) ...
true
true
1c2f89404ac573ff16e678a54fdb6435926de604
1,312
py
Python
sensor/light_sensor.py
stefanmoosbrugger/GardenPi
f42f18ae60e17fdfc747df9d89dbb9ae9d673e04
[ "MIT" ]
1
2019-10-10T14:08:19.000Z
2019-10-10T14:08:19.000Z
sensor/light_sensor.py
stefanmoosbrugger/GardenPi
f42f18ae60e17fdfc747df9d89dbb9ae9d673e04
[ "MIT" ]
null
null
null
sensor/light_sensor.py
stefanmoosbrugger/GardenPi
f42f18ae60e17fdfc747df9d89dbb9ae9d673e04
[ "MIT" ]
null
null
null
# This file implements the light sensor class. import sensor_base import random import __builtin__ if not __builtin__.testmode: import grovepi import collections import logging, sys import time class LightSensor(sensor_base.SensorBase): def __init__(self,port_number): self.port_num = port_number ...
32.8
100
0.627287
import sensor_base import random import __builtin__ if not __builtin__.testmode: import grovepi import collections import logging, sys import time class LightSensor(sensor_base.SensorBase): def __init__(self,port_number): self.port_num = port_number if not __builtin__.testmode: gro...
true
true
1c2f894d8743dd717dedfc20b4581dac0260ce4b
8,602
py
Python
thunder_board/clients.py
ZW7436/ThunderBoard
b122d7fb75208da43df86213fb32901caa6c2e41
[ "MIT" ]
7
2020-04-10T09:05:45.000Z
2021-08-30T07:26:49.000Z
thunder_board/clients.py
ZW7436/ThunderBoard
b122d7fb75208da43df86213fb32901caa6c2e41
[ "MIT" ]
2
2021-09-08T01:52:52.000Z
2022-03-12T00:23:47.000Z
thunder_board/clients.py
ZW7436/ThunderBoard
b122d7fb75208da43df86213fb32901caa6c2e41
[ "MIT" ]
4
2021-03-31T14:27:21.000Z
2021-08-30T07:26:52.000Z
import io import socket import struct import time import threading import json import logging class BaseClient: def __init__(self, name, board="", id="", server_host="localhost", server_port=2333): self.type = 'base' self.name = name self.board = board if board else "Default" self....
31.859259
116
0.556382
import io import socket import struct import time import threading import json import logging class BaseClient: def __init__(self, name, board="", id="", server_host="localhost", server_port=2333): self.type = 'base' self.name = name self.board = board if board else "Default" self....
true
true
1c2f8d526733ecd583c146f33f07be78e77d81fa
78,089
py
Python
tccli/services/iotcloud/iotcloud_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
tccli/services/iotcloud/iotcloud_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
tccli/services/iotcloud/iotcloud_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli import __version__ from tccli.utils import Utils from tccli.exceptions import ConfigurationError from tencentcloud.common import credential from tencentcloud.common.profile.ht...
43.698377
105
0.729258
import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli import __version__ from tccli.utils import Utils from tccli.exceptions import ConfigurationError from tencentcloud.common import credential from tencentcloud.common.profile.http_profile import HttpP...
true
true
1c2f8df33b72a6b914682b38fc69d3e05ea4f7c3
529
py
Python
src/pandas/read_files.py
lalitmcb/python
057b5750f7e2e46b5057d15badec756373d8ed79
[ "MIT" ]
null
null
null
src/pandas/read_files.py
lalitmcb/python
057b5750f7e2e46b5057d15badec756373d8ed79
[ "MIT" ]
null
null
null
src/pandas/read_files.py
lalitmcb/python
057b5750f7e2e46b5057d15badec756373d8ed79
[ "MIT" ]
null
null
null
import pandas as pd #install xlrd module to support excel. #In python 3 use: pip3 install xlrd #read the excel file by giving name and sheet excel_df = pd.read_excel('titanic.xls',sheetname=0) print(excel_df.head()) #Writing the csv file out #By default index also goes in csv. It can be ignored #sep is optional. By d...
27.842105
53
0.754253
import pandas as pd excel_df = pd.read_excel('titanic.xls',sheetname=0) print(excel_df.head()) excel_df.to_csv('titanic.csv',index=False,sep=',') #Reading the csv file is similar #Let's read the same csv file that we generated csv_df = pd.read_csv('titanic.csv') print(csv_df.head())
true
true
1c2f8e3cd64718a8fb3b5a388f58e845a5c21132
1,057
py
Python
tests/python/pants_test/java/jar/test_manifest.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/java/jar/test_manifest.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/java/jar/test_manifest.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2015 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 import unittest from pants.java.jar.manifest import Manifest class TestManifest(unitte...
28.567568
82
0.729423
from __future__ import absolute_import, division, print_function, unicode_literals import unittest from pants.java.jar.manifest import Manifest class TestManifest(unittest.TestCase): def test_isempty(self): manifest = Manifest() self.assertTrue(manifest.is_empty()) manifest.addentry('Header', 'va...
true
true
1c2f90cd0923c4977c7f832f2a779490ef9a9be4
1,435
py
Python
setup.py
JackStC/empiricalutilities
9d6878594b562cb5f8bb75e8a61ccbc07c8b5cce
[ "MIT" ]
null
null
null
setup.py
JackStC/empiricalutilities
9d6878594b562cb5f8bb75e8a61ccbc07c8b5cce
[ "MIT" ]
null
null
null
setup.py
JackStC/empiricalutilities
9d6878594b562cb5f8bb75e8a61ccbc07c8b5cce
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst')) as f: long_description = f.read() setup( name='empiricalutilities', version='0.1.8',...
28.7
91
0.607666
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst')) as f: long_description = f.read() setup( name='empiricalutilities', version='0.1.8', description='A Python project for empirica...
true
true
1c2f91023ac824e07d1e9f4a6d023ff56fb8e3c7
540
py
Python
modules/shared/domain/value_objects/string/value_string.py
eduardolujan/hexagonal_architecture_django
8055927cb460bc40f3a2651c01a9d1da696177e8
[ "BSD-3-Clause" ]
6
2020-08-09T23:41:08.000Z
2021-03-16T22:05:40.000Z
modules/shared/domain/value_objects/string/value_string.py
eduardolujan/hexagonal_architecture_django
8055927cb460bc40f3a2651c01a9d1da696177e8
[ "BSD-3-Clause" ]
1
2020-10-02T02:59:38.000Z
2020-10-02T02:59:38.000Z
modules/shared/domain/value_objects/string/value_string.py
eduardolujan/hexagonal_architecture_django
8055927cb460bc40f3a2651c01a9d1da696177e8
[ "BSD-3-Clause" ]
2
2021-03-16T22:05:43.000Z
2021-04-30T06:35:25.000Z
# -*- utf-8 -*- class String: def __init__(self, value): if type(value) is not str: raise ValueError(f"Is not string value:{value} type:{type(value)}") self.__value = value def __deepcopy__(self, memodict={}): return self.__value def __repr__(self): return ...
19.285714
79
0.592593
class String: def __init__(self, value): if type(value) is not str: raise ValueError(f"Is not string value:{value} type:{type(value)}") self.__value = value def __deepcopy__(self, memodict={}): return self.__value def __repr__(self): return self.__value ...
true
true
1c2f9311d987db97536687b13ca66399f98e171a
6,794
py
Python
python/topology/go.py
rayhaanj/scion
1242ea4f6ce0d7f0a9ae13c09ba62e5b7e6a3ce3
[ "Apache-2.0" ]
null
null
null
python/topology/go.py
rayhaanj/scion
1242ea4f6ce0d7f0a9ae13c09ba62e5b7e6a3ce3
[ "Apache-2.0" ]
null
null
null
python/topology/go.py
rayhaanj/scion
1242ea4f6ce0d7f0a9ae13c09ba62e5b7e6a3ce3
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 ETH Zurich # Copyright 2018 ETH Zurich, Anapaya Systems # # 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 b...
35.570681
95
0.530321
import os import toml from lib.app.sciond import get_default_sciond_path from lib.defines import SCIOND_API_SOCKDIR from lib.util import write_file from topology.common import ( ArgsTopoDicts, BR_CONFIG_NAME, COMMON_DIR, CS_CONFIG_NAME, sciond_name, SD_CONFIG_NAME, prom_addr...
true
true
1c2f94c8d12445c85d2c0543340c870acc09cc29
6,731
py
Python
tests/automated/helpers.py
iambluefred/panda
db4a43f8ceb422baa25264a7c053e2aa15665aa9
[ "MIT" ]
1
2021-08-23T16:27:39.000Z
2021-08-23T16:27:39.000Z
tests/automated/helpers.py
iambluefred/panda
db4a43f8ceb422baa25264a7c053e2aa15665aa9
[ "MIT" ]
1
2021-05-06T18:39:54.000Z
2021-05-26T13:38:12.000Z
tests/automated/helpers.py
iambluefred/panda
db4a43f8ceb422baa25264a7c053e2aa15665aa9
[ "MIT" ]
10
2020-05-13T19:37:38.000Z
2021-05-19T20:03:58.000Z
import os import time import random import _thread import faulthandler from functools import wraps from panda import Panda from panda_jungle import PandaJungle # pylint: disable=import-error from nose.tools import assert_equal from parameterized import parameterized, param from .timeout import run_with_timeout SPEED_...
30.595455
102
0.696033
import os import time import random import _thread import faulthandler from functools import wraps from panda import Panda from panda_jungle import PandaJungle from nose.tools import assert_equal from parameterized import parameterized, param from .timeout import run_with_timeout SPEED_NORMAL = 500 SPEED_GMLAN = 33....
true
true
1c2f95489d4b1945231c9e67928cbaf1ef6c9453
1,269
py
Python
programmers/KAKAO Tests/Constructing Columns and Beams.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
1
2020-04-11T09:51:54.000Z
2020-04-11T09:51:54.000Z
programmers/KAKAO Tests/Constructing Columns and Beams.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
programmers/KAKAO Tests/Constructing Columns and Beams.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
from operator import itemgetter def solution(n, buildFrames): struc = set() def check(struc): for x, y, a in struc: if a == 0: if not (y == 0 or not {(x, y - 1, 0), (x, y, 1), (x - 1, y, 1)}.isdisjoint(struc)): return False else: ...
37.323529
120
0.381403
from operator import itemgetter def solution(n, buildFrames): struc = set() def check(struc): for x, y, a in struc: if a == 0: if not (y == 0 or not {(x, y - 1, 0), (x, y, 1), (x - 1, y, 1)}.isdisjoint(struc)): return False else: ...
true
true
1c2f968603b43bbc0a6b5a27db3d2ef2d84cade7
28
py
Python
tests/unit/providers/utils/__init__.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
tests/unit/providers/utils/__init__.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
tests/unit/providers/utils/__init__.py
YelloFam/python-dependency-injector
541131e33858ee1b8b5a7590d2bb9f929740ea1e
[ "BSD-3-Clause" ]
null
null
null
"""Provider utils tests."""
14
27
0.642857
true
true
1c2f96c90fc6ca21256b6ac8e0cbd8441af6eca9
55,885
py
Python
nematus/config.py
lovodkin93/nematus
06d53fdb20e72f694daa4ca1d526b99b6dbdde12
[ "BSD-3-Clause" ]
null
null
null
nematus/config.py
lovodkin93/nematus
06d53fdb20e72f694daa4ca1d526b99b6dbdde12
[ "BSD-3-Clause" ]
null
null
null
nematus/config.py
lovodkin93/nematus
06d53fdb20e72f694daa4ca1d526b99b6dbdde12
[ "BSD-3-Clause" ]
2
2020-12-14T14:27:16.000Z
2020-12-16T06:03:45.000Z
import argparse import collections import json import logging import pickle import sys import util class ParameterSpecification: """Describes a Nematus configuration parameter. For many parameters, a ParameterSpecification simply gets mapped to an argparse.add_argument() call when reading parameters fro...
42.273071
104
0.620471
import argparse import collections import json import logging import pickle import sys import util class ParameterSpecification: def __init__(self, name, default, legacy_names=[], visible_arg_names=[], hidden_arg_names=[], derivation_func=None, **argparse_args): self.name = name ...
true
true
1c2f97a5470279e0328929549407453c7ff957e3
1,115
py
Python
python/py-collections-deque/main.py
shollingsworth/HackerRank
2f0e048044e643d6aa9d07c1898f3b00adf489b0
[ "Apache-2.0" ]
null
null
null
python/py-collections-deque/main.py
shollingsworth/HackerRank
2f0e048044e643d6aa9d07c1898f3b00adf489b0
[ "Apache-2.0" ]
null
null
null
python/py-collections-deque/main.py
shollingsworth/HackerRank
2f0e048044e643d6aa9d07c1898f3b00adf489b0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import __future__ import sys import json def banner(): ban = '====' * 30 print("{}\nSAMPLE INP:\n{}\n{}".format(ban,ban,open(ip, 'r').read())) print("{}\nSAMPLE OUT:\n{}\n{}".format(ban,ban,open(op, 'r').read())) print("{}\nSTART:\n{}".format(ban,ban)) ...
24.23913
109
0.589238
import __future__ import sys import json def banner(): ban = '====' * 30 print("{}\nSAMPLE INP:\n{}\n{}".format(ban,ban,open(ip, 'r').read())) print("{}\nSAMPLE OUT:\n{}\n{}".format(ban,ban,open(op, 'r').read())) print("{}\nSTART:\n{}".format(ban,ban)) sys.stdin = open(ip, 'r') cnt = -1 def comp...
true
true
1c2f982c7eb9f52ecf729babd04a09ac77352ab2
1,413
py
Python
images/tests.py
JeremyKimotho/gallery
ea90263a8b54f13b932b6cddf8bdac19f3b308a2
[ "MIT" ]
null
null
null
images/tests.py
JeremyKimotho/gallery
ea90263a8b54f13b932b6cddf8bdac19f3b308a2
[ "MIT" ]
null
null
null
images/tests.py
JeremyKimotho/gallery
ea90263a8b54f13b932b6cddf8bdac19f3b308a2
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Category, Location, Image import datetime as dt class ImageTestClass(TestCase): def setUp(self): self.jeremy = Image(image_name='Jeremy', image_description='Jeremy is a Beast') def test_instance(self): self.assertTrue(isinstance(self.jeremy, Image)) ...
25.690909
83
0.709837
from django.test import TestCase from .models import Category, Location, Image import datetime as dt class ImageTestClass(TestCase): def setUp(self): self.jeremy = Image(image_name='Jeremy', image_description='Jeremy is a Beast') def test_instance(self): self.assertTrue(isinstance(self.jeremy, Image)) ...
true
true
1c2f9886c30209c8f8c18348757a2729fc8d5b30
1,832
py
Python
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
17.960784
76
0.600437
from enum import Enum class ApplicationType(str, Enum): web = "web" other = "other" class FlowType(str, Enum): bluefield = "Bluefield" class RequestSource(str, Enum): rest = "rest" class PurgeState(str, Enum): pending = "pending" completed = "completed" class FavoriteTyp...
true
true
1c2f98d2bb8b898807a6dbecf9de37ee18febfab
350
py
Python
app/users/apps.py
guilloulouis/stage_medecine
7ec9067402e510d812a375bbfe46f2ab545587f9
[ "MIT" ]
null
null
null
app/users/apps.py
guilloulouis/stage_medecine
7ec9067402e510d812a375bbfe46f2ab545587f9
[ "MIT" ]
null
null
null
app/users/apps.py
guilloulouis/stage_medecine
7ec9067402e510d812a375bbfe46f2ab545587f9
[ "MIT" ]
1
2021-04-30T16:38:19.000Z
2021-04-30T16:38:19.000Z
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' def ready(self): from django.db.models.signals import m2m_changed from users.models import Student from users.signals import stage_added_to_student m2m_changed.connect(stage_added_to_student, sender...
29.166667
87
0.742857
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' def ready(self): from django.db.models.signals import m2m_changed from users.models import Student from users.signals import stage_added_to_student m2m_changed.connect(stage_added_to_student, sender...
true
true
1c2f98f9a5e0784aa2e43010aa4f0ee77764a093
41,857
py
Python
ansys/mapdl/core/_commands/apdl/parameter_definition.py
JourneyG/pymapdl
23fdc008c151c0546504e4ef8257a64f5f169100
[ "MIT" ]
1
2021-07-28T00:42:53.000Z
2021-07-28T00:42:53.000Z
ansys/mapdl/core/_commands/apdl/parameter_definition.py
JourneyG/pymapdl
23fdc008c151c0546504e4ef8257a64f5f169100
[ "MIT" ]
null
null
null
ansys/mapdl/core/_commands/apdl/parameter_definition.py
JourneyG/pymapdl
23fdc008c151c0546504e4ef8257a64f5f169100
[ "MIT" ]
null
null
null
import os class ParameterDefinition: def afun(self, lab="", **kwargs): """Specifies units for angular functions in parameter expressions. APDL Command: *AFUN Parameters ---------- lab Specifies the units to be used: Use radians for input and outp...
45.695415
614
0.630241
import os class ParameterDefinition: def afun(self, lab="", **kwargs): command = f"*AFUN,{lab}" return self.run(command, **kwargs) def dim(self, par="", type_="", imax="", jmax="", kmax="", var1="", var2="", var3="", csysid="", **kwargs): command = f"*DIM,{par},{type_},{i...
true
true
1c2f9a7a20d5abc765e5ecede822365f427f6daf
2,273
py
Python
sdbuild/packages/xrfdc/package/setup.py
michalkouril/PYNQ
c72febc2decc83816f40b91a7f60e11fe707c248
[ "BSD-3-Clause" ]
1
2021-12-18T09:54:09.000Z
2021-12-18T09:54:09.000Z
sdbuild/packages/xrfdc/package/setup.py
michalkouril/PYNQ
c72febc2decc83816f40b91a7f60e11fe707c248
[ "BSD-3-Clause" ]
null
null
null
sdbuild/packages/xrfdc/package/setup.py
michalkouril/PYNQ
c72febc2decc83816f40b91a7f60e11fe707c248
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2019, Xilinx, 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 con...
39.877193
79
0.720634
from setuptools import setup with open("README.md", encoding='utf-8') as fh: readme_lines = fh.readlines()[:] long_description = (''.join(readme_lines)) setup( name="xrfdc", version='1.0', description="Driver for the RFSoC RF Data Converter IP", long_description=lon...
true
true
1c2f9ba902803ac26a5da1ca5b8b26ae271ffd27
25,420
py
Python
HLACERServer/Pipeline/FeatureExtractor_GATE.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
6
2018-11-03T22:43:35.000Z
2022-02-15T17:51:33.000Z
HLACERServer/Pipeline/FeatureExtractor_GATE.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
2
2019-04-08T03:42:59.000Z
2019-10-28T13:42:59.000Z
HLACERServer/Pipeline/FeatureExtractor_GATE.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
10
2017-04-10T21:40:22.000Z
2022-02-21T16:50:10.000Z
from Pipeline.LifFileParser import LifFileParser import sys from collections import defaultdict,OrderedDict from Pipeline.Authentication import Authentication import requests import json import copy from Pipeline.MetaMap import find_snomed ''' This file implements a feature extractor tool for GATE which allows users t...
42.155887
149
0.530606
from Pipeline.LifFileParser import LifFileParser import sys from collections import defaultdict,OrderedDict from Pipeline.Authentication import Authentication import requests import json import copy from Pipeline.MetaMap import find_snomed class FeatureExtractor: def __init__(self, filename="", lif_string=""): ...
true
true
1c2f9be739ba817cd997258c805e95fee7d7ef05
5,365
py
Python
exopy_hqc_legacy/tasks/tasks/instr/apply_mag_field_task.py
Exopy/ecpy_hqc_legacy
3e31a8865d130907a82005e6cd78d99c6da7a951
[ "BSD-3-Clause" ]
null
null
null
exopy_hqc_legacy/tasks/tasks/instr/apply_mag_field_task.py
Exopy/ecpy_hqc_legacy
3e31a8865d130907a82005e6cd78d99c6da7a951
[ "BSD-3-Clause" ]
34
2015-12-14T22:06:57.000Z
2018-02-07T08:40:47.000Z
exopy_hqc_legacy/tasks/tasks/instr/apply_mag_field_task.py
Exopy/ecpy_hqc_legacy
3e31a8865d130907a82005e6cd78d99c6da7a951
[ "BSD-3-Clause" ]
6
2018-04-20T14:48:54.000Z
2021-06-23T22:25:17.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ------...
35.766667
84
0.592917
from time import sleep import numbers from inspect import cleandoc from atom.api import (Str, Float, Bool, set_default) from exopy.tasks.api import InstrumentTask, validators from exopy_hqc_legacy.instruments.drivers.driver_tools import InstrTimeoutError class ApplyMagFieldTask(InstrumentTask): fie...
true
true
1c2f9cb0f0f6ad3b0ba9caddb0ca01340165cd8f
6,290
py
Python
neutron/agent/metadata/namespace_proxy.py
armando-migliaccio/neutron-1
e31861c15bc73e65a7c22212df2a56f9e45aa0e4
[ "Apache-2.0" ]
null
null
null
neutron/agent/metadata/namespace_proxy.py
armando-migliaccio/neutron-1
e31861c15bc73e65a7c22212df2a56f9e45aa0e4
[ "Apache-2.0" ]
null
null
null
neutron/agent/metadata/namespace_proxy.py
armando-migliaccio/neutron-1
e31861c15bc73e65a7c22212df2a56f9e45aa0e4
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
34.751381
79
0.595548
import httplib import socket import eventlet eventlet.monkey_patch() import httplib2 from oslo.config import cfg import six.moves.urllib.parse as urlparse import webob from neutron.agent.linux import daemon from neutron.common import config from neutron.common import utils from neutron.openstack.common...
true
true
1c2f9d0764cf97e8baaa01bd411ffddb6120b77e
994
py
Python
plugins/wigle/komand_wigle/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/wigle/komand_wigle/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/wigle/komand_wigle/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT from .add_comment.action import AddComment from .get_country_statistics.action import GetCountryStatistics from .get_files_status.action import GetFilesStatus from .get_general_statistics.action import GetGeneralStatistics from .get_group_statistics.action import GetGroupStatisti...
49.7
63
0.880282
from .add_comment.action import AddComment from .get_country_statistics.action import GetCountryStatistics from .get_files_status.action import GetFilesStatus from .get_general_statistics.action import GetGeneralStatistics from .get_group_statistics.action import GetGroupStatistics from .get_kml.action import GetKml f...
true
true
1c2f9d0fc489ea0d1d13f99334354b6620938490
15,993
py
Python
models/lstm_model.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
40
2019-04-29T09:17:48.000Z
2021-11-19T06:32:02.000Z
models/lstm_model.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
null
null
null
models/lstm_model.py
HLTCHKUST/emotion-dialogue
0d58b339134dd9a2f386948ae474b270a77370f9
[ "MIT" ]
4
2019-09-01T10:00:56.000Z
2020-03-08T16:00:22.000Z
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torch.autograd import Variable import numpy as np import math from models.common_layer import Attention from utils import constant from models.comm...
52.264706
179
0.667792
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torch.autograd import Variable import numpy as np import math from models.common_layer import Attention from utils import constant from models.comm...
true
true
1c2f9d11fb3cb06f9f3a510b0c9d7f611974d2a1
925
py
Python
extended_choices/__init__.py
art1415926535/django-extended-choices
bb310c5da4d53685c69173541172e4b813a6afb2
[ "BSD-3-Clause" ]
60
2015-05-24T10:38:13.000Z
2022-03-13T12:16:16.000Z
extended_choices/__init__.py
art1415926535/django-extended-choices
bb310c5da4d53685c69173541172e4b813a6afb2
[ "BSD-3-Clause" ]
28
2015-04-02T22:19:44.000Z
2021-03-03T08:58:33.000Z
extended_choices/__init__.py
art1415926535/django-extended-choices
bb310c5da4d53685c69173541172e4b813a6afb2
[ "BSD-3-Clause" ]
12
2015-08-25T06:21:44.000Z
2019-12-10T01:39:48.000Z
"""Little helper application to improve django choices (for fields)""" from __future__ import unicode_literals import pkg_resources import six from os import path from setuptools.config import read_configuration from .choices import Choices, OrderedChoices, AutoDisplayChoices, AutoChoices # noqa: F401 def _extract_...
34.259259
91
0.731892
from __future__ import unicode_literals import pkg_resources import six from os import path from setuptools.config import read_configuration from .choices import Choices, OrderedChoices, AutoDisplayChoices, AutoChoices def _extract_version(package_name): try: version = pkg_resources.get_distri...
true
true
1c2fa0ff5b9381182b654ca980c8c114ee61e659
5,888
py
Python
frappe-bench/env/lib/python2.7/site-packages/num2words/lang_DE.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/num2words/lang_DE.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/num2words/lang_DE.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Fo...
40.888889
148
0.544158
from __future__ import unicode_literals, print_function from .lang_EU import Num2Word_EU class Num2Word_DE(Num2Word_EU): def set_high_numwords(self, high): max = 3 + 6*len(high) for word, n in zip(high, range(max, 3, -6)): self.cards[10**n] = word + "illiarde" ...
true
true
1c2fa18af3497416319f5f949b16e202eafbf06f
4,971
py
Python
operators/azure-service-operator/python/pulumi_pulumi_kubernetes_crds_operators_azure_service_operator/azure/v1alpha1/PostgreSQLDatabase.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
null
null
null
operators/azure-service-operator/python/pulumi_pulumi_kubernetes_crds_operators_azure_service_operator/azure/v1alpha1/PostgreSQLDatabase.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
2
2020-09-18T17:12:23.000Z
2020-12-30T19:40:56.000Z
operators/azure-service-operator/python/pulumi_pulumi_kubernetes_crds_operators_azure_service_operator/azure/v1alpha1/PostgreSQLDatabase.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outp...
41.425
172
0.661436
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ... import meta_v1 as _meta_v1 from ._inputs import * __all__ = ['PostgreSQLDatabase'] class PostgreSQLDatabase(pulumi.CustomResource): ...
true
true
1c2fa1b28d4236ecd86c3cc30dc15d65ac8ab769
10,886
py
Python
nemo/collections/asr/parts/features.py
borisdayma/NeMo
88f6c5b93574adb219185d5ded14b6393c485ea0
[ "Apache-2.0" ]
10
2020-03-17T08:32:06.000Z
2021-04-19T19:03:50.000Z
nemo/collections/asr/parts/features.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
1
2020-06-11T00:54:42.000Z
2020-06-11T00:54:42.000Z
nemo/collections/asr/parts/features.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
3
2020-03-10T05:10:07.000Z
2020-12-08T01:33:35.000Z
# Taken straight from Patter https://github.com/ryanleary/patter # TODO: review, and copyright and fix/add comments import math import librosa import torch import torch.nn as nn from torch_stft import STFT from nemo import logging from nemo.collections.asr.parts.perturb import AudioAugmentor from nemo.collections.asr...
36.653199
119
0.60215
import math import librosa import torch import torch.nn as nn from torch_stft import STFT from nemo import logging from nemo.collections.asr.parts.perturb import AudioAugmentor from nemo.collections.asr.parts.segment import AudioSegment CONSTANT = 1e-5 def normalize_batch(x, seq_len, normalize_type): if norm...
true
true
1c2fa4607fad66cd68a24ce8e5744d69da3257bb
650
py
Python
mlxtend/docs/make_userguide.py
WhiteWolf21/fp-growth
01e1d853b09f244f14e66d7d0c87f139a0f67c81
[ "MIT" ]
null
null
null
mlxtend/docs/make_userguide.py
WhiteWolf21/fp-growth
01e1d853b09f244f14e66d7d0c87f139a0f67c81
[ "MIT" ]
null
null
null
mlxtend/docs/make_userguide.py
WhiteWolf21/fp-growth
01e1d853b09f244f14e66d7d0c87f139a0f67c81
[ "MIT" ]
null
null
null
# API generator script # # Sebastian Raschka 2014-2020 # mlxtend Machine Learning Library Extensions # # Author: Sebastian Raschka <sebastianraschka.com> # # License: BSD 3 clause import yaml import os.path s = "# User Guide Index" yml_cont = open('mkdocs.yml', 'r') usr_gd = yaml.load(yml_cont)['pages'][1]['User Gu...
22.413793
60
0.633846
import yaml import os.path s = "# User Guide Index" yml_cont = open('mkdocs.yml', 'r') usr_gd = yaml.load(yml_cont)['pages'][1]['User Guide'] for dct in usr_gd[1:]: subpk = list(dct.keys())[0] s += '\n\n## `%s`' % subpk for obj in dct[subpk]: bsname = os.path.basename(obj).split('.md')[0...
true
true
1c2fa478453f7b0416d6189af5154d347cc6e565
6,317
py
Python
rasa/core/channels/botframework.py
anoop2503/rasa
990bab95954a2f6605f039ce9fb1317b39858651
[ "Apache-2.0" ]
1
2021-07-06T20:49:07.000Z
2021-07-06T20:49:07.000Z
rasa/core/channels/botframework.py
anoop2503/rasa
990bab95954a2f6605f039ce9fb1317b39858651
[ "Apache-2.0" ]
null
null
null
rasa/core/channels/botframework.py
anoop2503/rasa
990bab95954a2f6605f039ce9fb1317b39858651
[ "Apache-2.0" ]
1
2020-01-13T14:54:22.000Z
2020-01-13T14:54:22.000Z
# -*- coding: utf-8 -*- import datetime import json import logging import requests from sanic import Blueprint, response from sanic.request import Request from typing import Text, Dict, Any from rasa.core.channels.channel import UserMessage, OutputChannel, InputChannel logger = logging.getLogger(__name__) MICROSOFT...
32.394872
98
0.576698
import datetime import json import logging import requests from sanic import Blueprint, response from sanic.request import Request from typing import Text, Dict, Any from rasa.core.channels.channel import UserMessage, OutputChannel, InputChannel logger = logging.getLogger(__name__) MICROSOFT_OAUTH2_URL = "https://...
true
true
1c2fa48e6922a25e39c7a2a1af51ab9a9bf4482e
14,086
py
Python
pygsti/modelmembers/operations/lpdenseop.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
73
2016-01-28T05:02:05.000Z
2022-03-30T07:46:33.000Z
pygsti/modelmembers/operations/lpdenseop.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
113
2016-02-25T15:32:18.000Z
2022-03-31T13:18:13.000Z
pygsti/modelmembers/operations/lpdenseop.py
pyGSTi-Developers/pyGSTi
bfedc1de4d604f14b0f958615776fb80ddb59e33
[ "Apache-2.0" ]
41
2016-03-15T19:32:07.000Z
2022-02-16T10:22:05.000Z
""" The LinearlyParamArbitraryOp class and supporting functionality. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, ...
42.555891
118
0.639216
import numpy as _np from pygsti.modelmembers.operations.denseop import DenseOperator as _DenseOperator from pygsti.modelmembers.operations.linearop import LinearOperator as _LinearOperator from pygsti.baseobjs.statespace import StateSpace as _StateSpace from pygsti.tools import matrixtools as _mt IMAG_TOL = ...
true
true
1c2fa5b2a808191a18d71c60db9fe0df1548d91f
1,987
py
Python
catacomb/utils/formatter.py
mitchjeitani/safe
9b710319a769d532902cb1f7bfecd94155c4e2bf
[ "MIT" ]
30
2017-11-09T09:38:04.000Z
2021-04-15T16:04:18.000Z
catacomb/utils/formatter.py
mitchjeitani/safe
9b710319a769d532902cb1f7bfecd94155c4e2bf
[ "MIT" ]
14
2017-11-22T12:47:17.000Z
2018-06-18T04:47:48.000Z
catacomb/utils/formatter.py
mitchjeitani/safe
9b710319a769d532902cb1f7bfecd94155c4e2bf
[ "MIT" ]
3
2018-04-04T10:40:20.000Z
2019-05-25T07:17:04.000Z
import click import sys import textwrap from catacomb.common import constants, errors from terminaltables import AsciiTable def color_text(text, color): """Adds color to the provided text. Arguments: text (str): The text to color. color (str): The color as a string, e.g. 'red', 'green' and ...
24.530864
76
0.653749
import click import sys import textwrap from catacomb.common import constants, errors from terminaltables import AsciiTable def color_text(text, color): try: text = click.style(text, fg=color) except TypeError: print_warning(errors.INVALID_COLOR.format(color)) return text def to_table(...
true
true
1c2fa7114a080c54a55dcd81f2300d640e401a1f
294
py
Python
doc/sphinx/conf.py
ReverentEngineer/ber
7942c0b10a42873d3507cac095a14b6aa9a73cdc
[ "MIT" ]
null
null
null
doc/sphinx/conf.py
ReverentEngineer/ber
7942c0b10a42873d3507cac095a14b6aa9a73cdc
[ "MIT" ]
null
null
null
doc/sphinx/conf.py
ReverentEngineer/ber
7942c0b10a42873d3507cac095a14b6aa9a73cdc
[ "MIT" ]
null
null
null
project = 'BER' copyright = '2020, Jeff Caffrey-Hill' author = 'Jeff Caffrey-Hill' extensions = [] templates_path = ['_templates'] exclude_patterns = [] html_theme = 'alabaster' html_static_path = ['_static'] html_css_files = ['css/style.css'] html_theme_options = { 'nosidebar': True, }
21
37
0.704082
project = 'BER' copyright = '2020, Jeff Caffrey-Hill' author = 'Jeff Caffrey-Hill' extensions = [] templates_path = ['_templates'] exclude_patterns = [] html_theme = 'alabaster' html_static_path = ['_static'] html_css_files = ['css/style.css'] html_theme_options = { 'nosidebar': True, }
true
true
1c2fa7b4e689efac207e1e801a3d543f5d85fce7
772
py
Python
preprocess/anonymize_wordpiece.py
mounicam/neural_splitter
143346775d03667225bccb9455369a9b08352a67
[ "BSD-3-Clause" ]
null
null
null
preprocess/anonymize_wordpiece.py
mounicam/neural_splitter
143346775d03667225bccb9455369a9b08352a67
[ "BSD-3-Clause" ]
null
null
null
preprocess/anonymize_wordpiece.py
mounicam/neural_splitter
143346775d03667225bccb9455369a9b08352a67
[ "BSD-3-Clause" ]
null
null
null
import argparse from wordpiece import FullTokenizer def main(args): tokenizer = FullTokenizer(args.vocab, do_lower_case=False) fp = open(args.output, "w") for line in open(args.input): line = line.strip() tokens = tokenizer.tokenize(line) tokens.append("[SEP]") tokens = ["...
27.571429
70
0.623057
import argparse from wordpiece import FullTokenizer def main(args): tokenizer = FullTokenizer(args.vocab, do_lower_case=False) fp = open(args.output, "w") for line in open(args.input): line = line.strip() tokens = tokenizer.tokenize(line) tokens.append("[SEP]") tokens = ["...
true
true
1c2fa82082af0f0a89575f7ee8afb28ae0c8e46b
965
py
Python
sim_spawner/setup.py
09ubberboy90/lvl4-ros2-sim-comp
c197c76b29a9d864a800b81332bc3a549ecaa7c3
[ "BSD-3-Clause" ]
1
2021-05-03T09:16:11.000Z
2021-05-03T09:16:11.000Z
sim_spawner/setup.py
09ubberboy90/lvl4-ros2-sim-comp
c197c76b29a9d864a800b81332bc3a549ecaa7c3
[ "BSD-3-Clause" ]
1
2021-05-03T20:39:31.000Z
2021-11-24T14:57:55.000Z
sim_spawner/setup.py
09ubberboy90/lvl4-ros2-sim-comp
c197c76b29a9d864a800b81332bc3a549ecaa7c3
[ "BSD-3-Clause" ]
1
2021-05-03T09:16:21.000Z
2021-05-03T09:16:21.000Z
from setuptools import setup package_name = 'sim_spawner' setup( name=package_name, version='1.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], ins...
31.129032
94
0.658031
from setuptools import setup package_name = 'sim_spawner' setup( name=package_name, version='1.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], ins...
true
true
1c2fa9eca07cb2778eed074247670b3c0203e92f
6,944
py
Python
components/aws/sagemaker/tests/unit_tests/tests/test_batch_transform.py
kamalmemon/pipelines
7e68991a2a7bfa767f893facfe58190690ca89ed
[ "Apache-2.0" ]
null
null
null
components/aws/sagemaker/tests/unit_tests/tests/test_batch_transform.py
kamalmemon/pipelines
7e68991a2a7bfa767f893facfe58190690ca89ed
[ "Apache-2.0" ]
4
2022-02-14T21:39:59.000Z
2022-03-08T23:38:00.000Z
components/aws/sagemaker/tests/unit_tests/tests/test_batch_transform.py
kamalmemon/pipelines
7e68991a2a7bfa767f893facfe58190690ca89ed
[ "Apache-2.0" ]
2
2019-10-15T03:06:15.000Z
2019-10-15T03:10:39.000Z
import unittest import os import signal from unittest.mock import patch, call, Mock, MagicMock, mock_open, ANY from botocore.exceptions import ClientError from batch_transform.src import batch_transform from common import _utils # TODO : Errors out if model_name doesn't contain '-' # fix model_name '-' bug require...
35.979275
117
0.671947
import unittest import os import signal from unittest.mock import patch, call, Mock, MagicMock, mock_open, ANY from botocore.exceptions import ClientError from batch_transform.src import batch_transform from common import _utils # fix model_name '-' bug required_args = [ '--region', 'us-west-2', '--model_name...
true
true
1c2faa4b61cd56eb36cb503b7db5d29f59826ba6
35,062
py
Python
zerver/lib/push_notifications.py
apexlabs-ai/zulip
316a87c03736f2ef3503b3417ee3d16cae1b913d
[ "Apache-2.0" ]
null
null
null
zerver/lib/push_notifications.py
apexlabs-ai/zulip
316a87c03736f2ef3503b3417ee3d16cae1b913d
[ "Apache-2.0" ]
null
null
null
zerver/lib/push_notifications.py
apexlabs-ai/zulip
316a87c03736f2ef3503b3417ee3d16cae1b913d
[ "Apache-2.0" ]
null
null
null
import base64 import binascii import logging import re import time from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union import gcm import lxml.html import orjson from django.conf import settings from django.db import IntegrityError, transaction from django.db.models import F from django....
41.990419
113
0.650048
import base64 import binascii import logging import re import time from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union import gcm import lxml.html import orjson from django.conf import settings from django.db import IntegrityError, transaction from django.db.models import F from django....
true
true
1c2fab0514f311db6469ee743995314e21162298
2,010
py
Python
custom_components/netdaemon/switch.py
skotl/netdaemon-integration
71fb6036330cddbd4629d942652b93b31c204eec
[ "MIT" ]
1
2021-08-24T18:47:10.000Z
2021-08-24T18:47:10.000Z
custom_components/netdaemon/switch.py
skotl/netdaemon-integration
71fb6036330cddbd4629d942652b93b31c204eec
[ "MIT" ]
32
2021-01-01T17:41:41.000Z
2022-02-05T18:42:32.000Z
custom_components/netdaemon/switch.py
skotl/netdaemon-integration
71fb6036330cddbd4629d942652b93b31c204eec
[ "MIT" ]
8
2021-04-23T09:58:02.000Z
2022-01-03T10:30:48.000Z
"""Switch platform for NetDaemon.""" from typing import TYPE_CHECKING from homeassistant.components.switch import SwitchEntity from .const import ( ATTR_CLIENT, ATTR_COORDINATOR, ATTR_ENTITY_ID, ATTR_STATE, DOMAIN, LOGGER, PLATFORM_SWITCH, STATE_ON_VALUES, ) from .entity import NetDaem...
30
79
0.69005
from typing import TYPE_CHECKING from homeassistant.components.switch import SwitchEntity from .const import ( ATTR_CLIENT, ATTR_COORDINATOR, ATTR_ENTITY_ID, ATTR_STATE, DOMAIN, LOGGER, PLATFORM_SWITCH, STATE_ON_VALUES, ) from .entity import NetDaemonEntity if TYPE_CHECKING: from ...
true
true
1c2fab7d0bbcc372a971bf0468a371a8d711930d
1,298
py
Python
data_structures/stack/stack.py
papudova/programming-for-linguists
2349b5d2787eb0f9e57f281647fcc7f20e900688
[ "Apache-2.0" ]
null
null
null
data_structures/stack/stack.py
papudova/programming-for-linguists
2349b5d2787eb0f9e57f281647fcc7f20e900688
[ "Apache-2.0" ]
null
null
null
data_structures/stack/stack.py
papudova/programming-for-linguists
2349b5d2787eb0f9e57f281647fcc7f20e900688
[ "Apache-2.0" ]
null
null
null
""" Programming for linguists Implementation of the data structure "Stack" """ from typing import Iterable class Stack: """ Stack Data Structure """ # pylint: disable=missing-module-docstring def __init__(self, maximum, data: Iterable = None): self.data = list(data) if data else [] ...
24.037037
60
0.564715
from typing import Iterable class Stack: def __init__(self, maximum, data: Iterable = None): self.data = list(data) if data else [] self.maximum = maximum def push(self, element): if self.maximum <= len(self.data): self.data.append(element) def pop(self): ...
true
true
1c2fab9eb0e822b4f94ee06c94a0274429e18786
4,279
py
Python
main.py
SzymonZos/Fuzzy-Data-Analysis
20b27ac183e8d65c41b7f3e3e491c8fb08b9696f
[ "MIT" ]
1
2020-06-11T19:47:42.000Z
2020-06-11T19:47:42.000Z
main.py
SzymonZos/Fuzzy-Data-Analysis
20b27ac183e8d65c41b7f3e3e491c8fb08b9696f
[ "MIT" ]
1
2020-07-30T08:41:13.000Z
2020-08-14T19:00:27.000Z
main.py
SzymonZos/Fuzzy-Data-Analysis
20b27ac183e8d65c41b7f3e3e491c8fb08b9696f
[ "MIT" ]
1
2020-06-25T22:08:34.000Z
2020-06-25T22:08:34.000Z
import re import numpy as np import pandas as pd import matplotlib.pyplot as plt from functools import partial from contextlib import ExitStack from sklearn.cluster import KMeans from sklearn.decomposition import PCA from skfuzzy.cluster import cmeans, cmeans_predict raw_datasets = ["models/" + name for name in ["pim...
38.205357
84
0.618836
import re import numpy as np import pandas as pd import matplotlib.pyplot as plt from functools import partial from contextlib import ExitStack from sklearn.cluster import KMeans from sklearn.decomposition import PCA from skfuzzy.cluster import cmeans, cmeans_predict raw_datasets = ["models/" + name for name in ["pim...
true
true
1c2fac94405577726546c0175556f60c71cf410e
49,500
py
Python
beets/library.py
stragu/beets
da46a62772ab7a88c5799c84841f744dfc0f0a20
[ "MIT" ]
null
null
null
beets/library.py
stragu/beets
da46a62772ab7a88c5799c84841f744dfc0f0a20
[ "MIT" ]
null
null
null
beets/library.py
stragu/beets
da46a62772ab7a88c5799c84841f744dfc0f0a20
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
33.627717
79
0.589475
from __future__ import (division, absolute_import, print_function, unicode_literals) import os import sys import unicodedata import time import re from unidecode import unidecode from beets import logging from beets.mediafile import MediaFile, MutagenError, UnreadableFileError f...
true
true
1c2fad5561db6a64f83057a8feee7bb3000d869a
2,138
py
Python
grr/server/grr_response_server/serialize.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/serialize.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/serialize.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """This module serializes AFF4 objects in various ways.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from future.utils import iteritems from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import compatib...
31.441176
80
0.724509
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from future.utils import iteritems from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import compatibility from grr_response_core.lib.util.compat import yaml from grr_response_serve...
true
true
1c2fae7920b9bc1d34e0a50572315bd565c0af92
613
py
Python
aoc_helper/data.py
Starwort/aoc_helper
7ad39770e91d0f537b90baa4e3d65fa0e152e0f7
[ "MIT" ]
5
2020-12-06T17:14:17.000Z
2021-12-09T19:54:44.000Z
aoc_helper/data.py
Starwort/aoc_helper
7ad39770e91d0f537b90baa4e3d65fa0e152e0f7
[ "MIT" ]
8
2020-12-06T08:39:44.000Z
2021-12-10T04:27:10.000Z
aoc_helper/data.py
Starwort/aoc_helper
7ad39770e91d0f537b90baa4e3d65fa0e152e0f7
[ "MIT" ]
8
2021-12-02T04:00:50.000Z
2022-01-26T20:07:55.000Z
import datetime import pathlib import re DATA_DIR = pathlib.Path.home() / ".config" / "aoc_helper" if not DATA_DIR.exists(): DATA_DIR.mkdir(parents=True) DEFAULT_YEAR = datetime.datetime.today().year URL = "https://adventofcode.com/{year}/day/{day}" WAIT_TIME = re.compile(r"You have (?:(\d+)m )?(\d+)s left to wai...
29.190476
85
0.683524
import datetime import pathlib import re DATA_DIR = pathlib.Path.home() / ".config" / "aoc_helper" if not DATA_DIR.exists(): DATA_DIR.mkdir(parents=True) DEFAULT_YEAR = datetime.datetime.today().year URL = "https://adventofcode.com/{year}/day/{day}" WAIT_TIME = re.compile(r"You have (?:(\d+)m )?(\d+)s left to wai...
true
true
1c2faf958ad3017ae6f9fa4391d3e37c36bec1cd
11,445
py
Python
pol/pol_stack_II_load_POL03.py
mlares/CMB_polarization
936d17d0be81564dbae96d8aae0cb9f824f8a94d
[ "MIT" ]
null
null
null
pol/pol_stack_II_load_POL03.py
mlares/CMB_polarization
936d17d0be81564dbae96d8aae0cb9f824f8a94d
[ "MIT" ]
null
null
null
pol/pol_stack_II_load_POL03.py
mlares/CMB_polarization
936d17d0be81564dbae96d8aae0cb9f824f8a94d
[ "MIT" ]
null
null
null
import pickle import numpy as np import cmfg from Parser import Parser from math import pi from astropy import units as u import itertools from sklearn.neighbors import NearestNeighbors from matplotlib import pyplot as plt from random import random from matplotlib import colors, ticker, rc class MidpointNormalize(c...
24.455128
88
0.584797
import pickle import numpy as np import cmfg from Parser import Parser from math import pi from astropy import units as u import itertools from sklearn.neighbors import NearestNeighbors from matplotlib import pyplot as plt from random import random from matplotlib import colors, ticker, rc class MidpointNormalize(c...
true
true
1c2fb00c0438f657aa01efb9065b538cc0f0773c
5,784
py
Python
venv/Lib/site-packages/sqlalchemy/connectors/mxodbc.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
5,383
2018-11-27T07:34:03.000Z
2022-03-31T19:40:59.000Z
venv/Lib/site-packages/sqlalchemy/connectors/mxodbc.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
2,719
2018-11-27T07:55:01.000Z
2022-03-31T22:09:44.000Z
venv/Lib/site-packages/sqlalchemy/connectors/mxodbc.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
998
2018-11-28T09:34:38.000Z
2022-03-30T19:04:11.000Z
# connectors/mxodbc.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """ Provide a SQLALchemy connector for the eGenix mxODBC commercial Python ada...
34.634731
79
0.648513
import re import sys import warnings from . import Connector from ..util import warn_deprecated class MxODBCConnector(Connector): driver = "mxodbc" supports_sane_multi_rowcount = False supports_unicode_statements = True supports_unicode_binds = True supports_native_decimal = True @...
true
true