hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08f4d109627bdb40204fdedf66bcc382e75036c9 | 653 | py | Python | calibrate2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | calibrate2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | 1 | 2021-11-11T22:15:36.000Z | 2021-11-11T22:15:36.000Z | calibrate2.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | # %%
import matplotlib.pyplot as plt
import numpy as np
import functions
import importlib as imp
# %% calibrate camera A
imp.reload(functions)
A_img = functions.open_img('IMG_2987_new.jpg')
A_ang_pix = functions.calib(A_img, 30.5, 7, 7, zoom=30)
print('Angle per pixel for camera A')
# %% calibrate camera B
B_img =... | 18.138889 | 55 | 0.719755 |
08f4ecb08b9b4b1782ab43c1e55ce9b2331271f3 | 3,388 | py | Python | tests/mdts/lib/rule.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2015-05-19T08:36:55.000Z | 2015-05-19T08:36:55.000Z | tests/mdts/lib/rule.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mdts/lib/rule.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | 1 | 2018-10-25T05:52:05.000Z | 2018-10-25T05:52:05.000Z | # Copyright 2014 Midokura SARL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 29.46087 | 74 | 0.610685 |
08f521fe8cd3aa66ead9d75fb9bf738ff32941f5 | 4,361 | py | Python | test/frame/noise/test_action_space_noise.py | lorenzosteccanella/machin | 9d3ce87dbed820b5019211b0690b54613084d9e4 | [
"MIT"
] | 287 | 2020-06-13T05:19:50.000Z | 2022-03-31T04:46:32.000Z | test/frame/noise/test_action_space_noise.py | ikamensh/machin | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | [
"MIT"
] | 19 | 2020-08-19T05:33:45.000Z | 2022-03-27T15:16:03.000Z | test/frame/noise/test_action_space_noise.py | ikamensh/machin | af7b423c47bc1412530cf6c96c11bd3af9b3e239 | [
"MIT"
] | 44 | 2020-07-06T00:41:44.000Z | 2022-03-29T17:05:08.000Z | from machin.frame.noise.action_space_noise import (
add_normal_noise_to_action,
add_clipped_normal_noise_to_action,
add_uniform_noise_to_action,
add_ou_noise_to_action,
)
import pytest
import torch as t
class TestAllActionSpaceNoise:
###############################################################... | 38.254386 | 86 | 0.522587 |
08f53ee898bfa97ca942bb4cf5a85aec5645e839 | 1,865 | py | Python | leetcode_python/String/minimum-time-difference.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/String/minimum-time-difference.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/String/minimum-time-difference.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# https://blog.csdn.net/fuxuemingzhu/article/details/80525152
# IDEA : ZIP + MAP
# ZIP:
# >>> a = [1,2,3]
# >>> b = [4,5,6]
# >>> c = [4,5,6,7,8]
# >>> zipped = zip(a,b)
# [(1, 4), (2, 5), (3, 6)]
# >>> zip(a,c)
# [(1, 4), (2, 5), (3, 6)]
# >>> zip(*zipped)
# [(1, 2, 3), (4, 5,... | 27.028986 | 101 | 0.474531 |
08f56294e7b5cf907dd5d67287babf03b95a90bc | 815 | py | Python | nicos_mlz/toftof/setups/collimator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/toftof/setups/collimator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/toftof/setups/collimator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'neutron guide changer or collimator'
group = 'lowlevel'
tango_base = 'tango://tofhw.toftof.frm2.tum.de:10000/toftof/hubermc/'
devices = dict(
ngc_motor = device('nicos.devices.entangle.Motor',
description = 'Motor of the neutron guide changing mechanism',
tangodevice = tango_base +... | 29.107143 | 70 | 0.568098 |
08f56c2dbbc323f0b1f383a72ae8b01d486c20c2 | 26,283 | py | Python | Sublime Text 3/Packages/backrefs/st3/backrefs/uniprops/unidata/decompositiontype.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 7 | 2016-01-20T01:44:36.000Z | 2019-01-29T11:52:39.000Z | Sublime Text 3/Packages/backrefs/st3/backrefs/uniprops/unidata/decompositiontype.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 4 | 2016-01-27T17:42:07.000Z | 2021-08-13T12:31:25.000Z | Sublime Text 3/Packages/backrefs/st3/backrefs/uniprops/unidata/decompositiontype.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 2 | 2015-11-15T09:11:34.000Z | 2019-01-29T11:52:41.000Z | """Unicode Properties from Unicode version 6.1.0 (autogen)."""
unicode_decomposition_type = {
"^canonical": "\x00-\xbf\xc6\xd0\xd7-\xd8\xde-\xdf\xe6\xf0\xf7-\xf8\xfe\u0110-\u0111\u0126-\u0127\u0131-\u0133\u0138\u013f-\u0142\u0149-\u014b\u0152-\u0153\u0166-\u0167\u017f-\u019f\u01a2-\u01ae\u01b1-\u01cc\u01dd\u01e4-\... | 332.696203 | 4,323 | 0.776091 |
08f56c5df596754666382a3d68259dc657df7dce | 10,275 | py | Python | tests/test_security.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | 3 | 2017-06-05T15:46:22.000Z | 2019-05-22T21:26:54.000Z | tests/test_security.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | 93 | 2016-06-22T18:57:47.000Z | 2022-02-14T10:50:27.000Z | tests/test_security.py | agraubert/agutil | d9a568df01959ed985c9c8e77bdd501ac13bdbbf | [
"MIT"
] | null | null | null | import unittest
import os
from py_compile import compile
import sys
import random
import threading
import warnings
import tempfile
import os
import time
import io
import port_for as pf
TRAVIS = 'CI' in os.environ
def make_random_string():
return "".join(chr(random.randint(0,255)) for i in range(25))
def make_ran... | 39.068441 | 155 | 0.634939 |
08f57553b29b984506b7d27eff576b27e588be75 | 1,292 | py | Python | python_modules/libraries/dagster-datadog/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-datadog/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-datadog/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from setuptools import find_packages, setup
def get_version() -> str:
version: Dict[str, str] = {}
with open("dagster_datadog/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__":
ver = get_ver... | 34 | 105 | 0.611455 |
08f57fd4a5fcabc32d17f7a5f4e539a5a00b3685 | 736 | py | Python | alipay/aop/api/response/AlipayOpenAuthResauthCheckResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenAuthResauthCheckResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenAuthResauthCheckResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenAuthResauthCheckResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenAuthResauthCheckResponse, self).__init__()
self._auth_status = None
@prop... | 28.307692 | 107 | 0.722826 |
08f57ff6b80fa223feee0a3fa519aaac7e009860 | 1,086 | py | Python | plugins/aea-ledger-fetchai/aea_ledger_fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | plugins/aea-ledger-fetchai/aea_ledger_fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | plugins/aea-ledger-fetchai/aea_ledger_fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 37.448276 | 80 | 0.621547 |
08f59a68ce04af751e1ceb48cd6903e3343ae600 | 22 | py | Python | dirlist/__init__.py | buczaq/python-packages | 9a31446d1b8d2f381667f4c922f6748fb80173ee | [
"MIT"
] | null | null | null | dirlist/__init__.py | buczaq/python-packages | 9a31446d1b8d2f381667f4c922f6748fb80173ee | [
"MIT"
] | null | null | null | dirlist/__init__.py | buczaq/python-packages | 9a31446d1b8d2f381667f4c922f6748fb80173ee | [
"MIT"
] | null | null | null | from . import dirlist
| 11 | 21 | 0.772727 |
08f5b84edc9d25290f2bf69a669735197b45b38f | 727 | py | Python | supriya/ugens/Select.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Select.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Select.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya.enums import CalculationRate
from supriya.synthdefs import PureUGen
class Select(PureUGen):
"""
A signal selector.
::
>>> sources = supriya.ugens.In.ar(bus=0, channel_count=8)
>>> selector = supriya.ugens.Phasor.kr() * 8
>>> select = supriya.ugens... | 22.030303 | 79 | 0.6011 |
08f5da4a7fee584ef33993b7295c91c24c759243 | 21,696 | py | Python | ulmo/usgs/nwis/hdf5.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | ulmo/usgs/nwis/hdf5.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | ulmo/usgs/nwis/hdf5.py | NasserMo/ulmo | 46c835100bb76f44f46c752f8cadb3cbe84652b1 | [
"BSD-3-Clause"
] | null | null | null | import contextlib
import copy
import os
import shutil
import sys
import tempfile
import warnings
import numpy as np
import pandas
import tables
from tables.scripts import ptrepack
from ulmo import util
from ulmo.usgs.nwis import core
# default hdf5 file path
DEFAULT_HDF5_FILE_PATH = util.get_default_h5file_path('us... | 37.797909 | 91 | 0.655098 |
08f5db8bc7b7f21b28da82dc680fb8c4ac20c18b | 1,988 | py | Python | gamertags.py | ValentiMS/py360 | c291b37773fbf5e4b459429fa95662533774183c | [
"BSD-2-Clause"
] | 11 | 2015-01-30T23:44:19.000Z | 2021-08-18T19:38:42.000Z | gamertags.py | ValentiMS/py360 | c291b37773fbf5e4b459429fa95662533774183c | [
"BSD-2-Clause"
] | 4 | 2019-02-24T05:44:03.000Z | 2019-11-24T19:17:47.000Z | gamertags.py | ValentiMS/py360 | c291b37773fbf5e4b459429fa95662533774183c | [
"BSD-2-Clause"
] | 5 | 2018-08-02T19:41:55.000Z | 2021-04-02T11:10:06.000Z | # An example of using py360 to extract all the GamerTags present on an image.
# Where does this data live?
# GamerTags are inside the Account block of a user's STFS container located on
# the XTAF partition.
# How do you find user STFS containers?
# Gamer profiles are located in the /Content directory in subdirector... | 44.177778 | 87 | 0.680584 |
08f60420387cd1b70db58ec2fbc362ff53c5393a | 2,733 | py | Python | tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v1_3_3/jsd_f9bd99c74bba8832.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Get Status API for Events data model.
Copyright (c) 2019 Cisco and/or its affiliates.
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, in... | 32.535714 | 78 | 0.592755 |
08f6139ac736e85ee8a2898ecf6553822d70f1c3 | 1,730 | py | Python | analysis/copy_maps_to_new_folder.py | ludazhao/art_history_net | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | 15 | 2016-12-30T21:03:48.000Z | 2022-01-31T08:09:09.000Z | analysis/copy_maps_to_new_folder.py | ludazhao/SherlockNet | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | null | null | null | analysis/copy_maps_to_new_folder.py | ludazhao/SherlockNet | 396f7b99b3c4fe4f9da752d8f7eb0f3395752f57 | [
"MIT"
] | null | null | null | import os
import glob
import numpy as np
import cPickle as pickle
import h5py
from scipy.misc import imsave
print "Loading data"
(image_metadata, book_metadata, image_to_idx) = pickle.load(open("/data/all_metadata.pkl", 'r'))
if not glob.glob("/data/maps_by_date"): os.mkdir("/data/maps_by_date")
image_hdf5 =... | 29.827586 | 105 | 0.639884 |
08f631f3ed7df5643ea61838e55cf888ebc26efa | 1,480 | py | Python | examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 38.947368 | 76 | 0.77973 |
08f6454f1be4f76217991f14ee8362c445452ed6 | 1,718 | py | Python | server/src/routes/api/pathways.py | CollinStark/metamdb | 6df29f0b0ab1362904f3efb42a651ee433f517df | [
"MIT"
] | 1 | 2021-05-27T13:43:08.000Z | 2021-05-27T13:43:08.000Z | server/src/routes/api/pathways.py | metamdb/metamdb | f884cfb604007ed0bbebbd76ee353fa14797b5fb | [
"MIT"
] | 1 | 2021-06-11T09:35:24.000Z | 2021-06-11T09:35:24.000Z | server/src/routes/api/pathways.py | metamdb/metamdb | f884cfb604007ed0bbebbd76ee353fa14797b5fb | [
"MIT"
] | null | null | null | from typing import Optional
from flask import Blueprint, json, jsonify, request
from src.errors import handler
from src.models.casm import Pathway, PathwayJsonSchema, PathwayReactionsSchema
pathways_blueprint = Blueprint('pathways',
__name__,
url_prefix='/... | 29.118644 | 78 | 0.664144 |
08f660f66da20c311069f412aee62208d1b302a8 | 2,529 | py | Python | functional/tests/identity/v3/test_idp.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | functional/tests/identity/v3/test_idp.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | functional/tests/identity/v3/test_idp.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 45.981818 | 79 | 0.658758 |
08f6896501956b742ee4ff1b365f051604aa8cd5 | 209,205 | py | Python | salt/states/file.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | salt/states/file.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | salt/states/file.py | ari/salt | 05de98e237719b4f0cc68f08871ffaa532eddec5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Operations on regular files, special files, directories, and symlinks
=====================================================================
Salt States can aggressively manipulate files on a system. There are a number
of ways in which files can be managed.
Regular files can be enforced wit... | 35.030978 | 117 | 0.557214 |
08f68cb4ee1324f3e7e6d714d9683f6c299ca985 | 2,748 | py | Python | src/main.py | kabrezi/bstrip | 9386c79434c892d0dbef1263b9f7f1adb598bb5f | [
"Apache-2.0"
] | null | null | null | src/main.py | kabrezi/bstrip | 9386c79434c892d0dbef1263b9f7f1adb598bb5f | [
"Apache-2.0"
] | null | null | null | src/main.py | kabrezi/bstrip | 9386c79434c892d0dbef1263b9f7f1adb598bb5f | [
"Apache-2.0"
] | null | null | null | #/home/pi/Segnix/test.py
import serial, string
import re, struct
from array import *
# s = '\x1f\x01\q\x01\x00\x00\x00'
# result = map(ord,s)
# print (list(result))
# t = map(ord, s)
# struct.unpack('7S', s)
# print (t)
output =" "
r = 255
r1 = 101
r2 = 102
r3 = 113
r4 = 0
BL = []
Page_Num = []
Obj_Num = []
Quantit... | 23.487179 | 113 | 0.481805 |
08f6c40d66f4ca92a1f54857addec6e2e9f7c074 | 58,856 | py | Python | app/BWT.py | rmzelle/rgi | b08bf5a12758a6e7cc828563606b01646c38d407 | [
"FTL"
] | null | null | null | app/BWT.py | rmzelle/rgi | b08bf5a12758a6e7cc828563606b01646c38d407 | [
"FTL"
] | null | null | null | app/BWT.py | rmzelle/rgi | b08bf5a12758a6e7cc828563606b01646c38d407 | [
"FTL"
] | null | null | null | from app.settings import *
import csv, glob
from multiprocessing import Pool
import time
import statistics
class BWT(object):
"""
Class to align metagenomic reads to CARD and wildCARD reference using bwa or bowtie2 and
provide reports (gene, allele report and read level reports).
"""
def __init__(self, aligner, ... | 36.854101 | 206 | 0.672217 |
08f6c55aa07d10e8587e3b35964547bc480f65ae | 1,757 | py | Python | oscar/lib/python2.7/site-packages/django/conf/locale/pt/formats.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/conf/locale/pt/formats.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/conf/locale/pt/formats.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y'
TIME_FO... | 41.833333 | 91 | 0.542402 |
08f6d61c324e14495838754fb3156de52030b3c3 | 406 | py | Python | category_job_evaluation_tests/aexp/fibonacci_recursion.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | 2 | 2020-07-23T19:32:58.000Z | 2020-10-24T20:54:09.000Z | category_job_evaluation_tests/aexp/fibonacci_recursion.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | null | null | null | category_job_evaluation_tests/aexp/fibonacci_recursion.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | 1 | 2021-07-11T14:41:04.000Z | 2021-07-11T14:41:04.000Z | # Fibonacci code with recursion
# function to print nth Fibonacci number
def Fibonacci(n):
if n == 1 or n == 2:
return (n-1)
else:
return Fibonacci(n-1) + Fibonacci(n-2)
# main
if __name__ == "__main__":
n = int(input("Enter the range: "))
if n <= 0:
print("Please enter a posit... | 23.882353 | 48 | 0.573892 |
08f6f2003c0bb09d59642c152c4ea11aefec46f5 | 26,187 | py | Python | python/ray/rllib/evaluation/sampler.py | FlyClover/ray | 51dae23d5c8e81449bf381427fcb246c821a0196 | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/evaluation/sampler.py | FlyClover/ray | 51dae23d5c8e81449bf381427fcb246c821a0196 | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/evaluation/sampler.py | FlyClover/ray | 51dae23d5c8e81449bf381427fcb246c821a0196 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import defaultdict, namedtuple
import logging
import numpy as np
import six.moves.queue as queue
import threading
import time
from ray.rllib.evaluation.episode import MultiAgentEpisode, _flatt... | 40.225806 | 79 | 0.599878 |
08f6fbe2a87af578cb378bc5e9058f5fbd9c21b3 | 1,325 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/region_AD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_AD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_AD.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. AD metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_AD = PhoneMetadata(id='AD', country_code=376, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[16]\\d{5,8}|[37-9]\\d{5}', possible... | 94.642857 | 139 | 0.691321 |
08f70abfe8c04ddc77c8562ac0038607fab620a5 | 1,448 | py | Python | consumers/faust_project/medicare/models.py | cfloressuazo/science-streaming | ef38624743128c0d1ff9b8c199f9c748678aa48a | [
"MIT"
] | null | null | null | consumers/faust_project/medicare/models.py | cfloressuazo/science-streaming | ef38624743128c0d1ff9b8c199f9c748678aa48a | [
"MIT"
] | null | null | null | consumers/faust_project/medicare/models.py | cfloressuazo/science-streaming | ef38624743128c0d1ff9b8c199f9c748678aa48a | [
"MIT"
] | null | null | null | import faust
from dataclasses_avroschema import AvroModel
class MedicareKeyModel(faust.Record, serializer='avro_medicare_key'):
npi: int
class MedicareValueModel(faust.Record, serializer='avro_medicare_value'):
npi: int
nppes_provider_last_org_name: str
nppes_provider_first_name: str
nppes_prov... | 28.96 | 93 | 0.77279 |
08f722380e4371b0a598a3f31cc55cc588eb7032 | 3,693 | py | Python | abb_python/src/models.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | 2 | 2019-02-28T01:47:23.000Z | 2021-04-10T14:37:46.000Z | abb_python/src/models.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | null | null | null | abb_python/src/models.py | karim174/brain-computer-interface-and-vision-based-autonomous-agent-for-shared-control-over-robotic-arm | d099cad43bfb98261c2571991f4e163d444b62b4 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import numpy as np
import tensorflow.contrib.slim as slim
from gym import spaces
from Networks import P_Network
from Networks import Q_Network
from ray.rlli... | 61.55 | 151 | 0.521527 |
08f73a8677a5fd599c2f5e31a30ed8b31b89f431 | 1,102 | py | Python | odoons/commands/install.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | null | null | null | odoons/commands/install.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | 3 | 2021-10-05T14:29:51.000Z | 2021-10-17T21:52:41.000Z | odoons/commands/install.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | null | null | null | import os
import subprocess
from .command import Command
from odoons.utils import printing
from odoons.utils.config import ADDONS_REQ_INSTALL_CONFIG, get_git_addons_path
class Install(Command):
def run(self, args):
"""
Action method responsible of the ACTION_INSTALL sub command
:return: ... | 33.393939 | 83 | 0.638838 |
08f73b10d983e883b611acea500db0d589447b0b | 7,484 | py | Python | appengine/cr-buildbucket/bulkproc.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | appengine/cr-buildbucket/bulkproc.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | appengine/cr-buildbucket/bulkproc.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Build bulk processing of builds, a miniature map-reduce."""
import datetime
import json
import logging
import math
import posixpath
from google.appengin... | 29.936 | 80 | 0.646847 |
08f7499ae89e5dfecd5c6e1049c2bc2d0c0d3901 | 347 | py | Python | lightly/api/routes/users/docker/__init__.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 1 | 2021-06-23T07:31:26.000Z | 2021-06-23T07:31:26.000Z | lightly/api/routes/users/docker/__init__.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | null | null | null | lightly/api/routes/users/docker/__init__.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | null | null | null | """ Docker Routes
This site is under construction.
"""
# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved
from lightly.api.routes.users.docker.service import get_authorization
from lightly.api.routes.users.docker.service import get_soft_authorization
from lightly.api.routes.users.docker.servi... | 28.916667 | 74 | 0.81268 |
08f784ed763987a2a98c832d5b797c7f3c7a7ce6 | 11,302 | py | Python | util/masking.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | util/masking.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | null | null | null | util/masking.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import logging
import math
import warnings
from collections import namedtuple
from typing import Tuple
import libtbx.phil
from cctbx import crystal
from dxtbx.masking import (
mask_untrusted_circle,
mask_untrusted_polygon,
mask_untrusted_rec... | 33.046784 | 95 | 0.564148 |
08f7a5b06d88bc505c8c121108b508f0b20474e3 | 162 | py | Python | figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | 1 | 2021-07-12T13:50:35.000Z | 2021-07-12T13:50:35.000Z | import netwulf as nw
from expon_smallworld import get_expon_small_world
N = 20
k0 = 3
G = get_expon_small_world(N,k0,node_creation_order='asc')
nw.visualize(G)
| 18 | 57 | 0.796296 |
08f7f3aeec25e0c896799b1b949ded67c0fff9df | 507 | py | Python | resource_manager/leases/migrations/0002_resource_type.py | jsaunders/resource_manager | 29d106bec49f74c4b2d9ecd8cab1b788eb1477e0 | [
"MIT"
] | null | null | null | resource_manager/leases/migrations/0002_resource_type.py | jsaunders/resource_manager | 29d106bec49f74c4b2d9ecd8cab1b788eb1477e0 | [
"MIT"
] | null | null | null | resource_manager/leases/migrations/0002_resource_type.py | jsaunders/resource_manager | 29d106bec49f74c4b2d9ecd8cab1b788eb1477e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-17 02:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('leases', '0001_initial'),
]
operations = [
migrations.AddField(
... | 24.142857 | 121 | 0.60355 |
08f82956e5a3797388119bf5153e31ebc0293d9c | 1,240 | py | Python | module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py | JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering | 0736656f45258b72d1f155f06483e3bf4007acff | [
"MIT"
] | null | null | null | module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py | JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering | 0736656f45258b72d1f155f06483e3bf4007acff | [
"MIT"
] | null | null | null | module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py | JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering | 0736656f45258b72d1f155f06483e3bf4007acff | [
"MIT"
] | null | null | null | """
Docstring
How to set up a python package
- A pipenvironment, so import pipenv, run pipenv in the directory you intend to use it.
- Any LICENSE file you need.
- Create a setup file with these minimum things:
- import setuptools
- required packages
- setuptools.setup(everything that's needed here)
- A f... | 23.396226 | 159 | 0.712903 |
08f849320267e322cad7eeb9fa326528844ff079 | 14,789 | py | Python | clif/python/func_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/python/func_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/python/func_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 25.900175 | 97 | 0.481777 |
08f84b823550acc435807f894bce77bb5033a0a3 | 44,534 | py | Python | ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | ExtentionPackages/pysnmp/smi/mibs/SNMPv2-SMI.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | null | null | null | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net>
# License: http://pysnmp.sf.net/license.html
#
import sys
import traceback
from pysnmp.smi.indices import OidOrderedDict
from pysnmp.smi import exval, error
from pysnmp.proto import rfc1902
from pysnmp import cache, debu... | 35.741573 | 209 | 0.599901 |
08f87a44c29e1014cf5dba172fae2997c70e6cec | 15,015 | py | Python | tests/api.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | 4 | 2021-08-02T22:10:00.000Z | 2022-03-31T02:44:47.000Z | tests/api.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | 3 | 2021-12-07T02:00:36.000Z | 2022-01-18T22:20:07.000Z | tests/api.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | 4 | 2021-08-02T23:50:55.000Z | 2022-01-18T07:05:15.000Z | # Copyright 2021 Lawrence Livermore National Security, LLC and other MuyGPyS
# Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
import os
import sys
import pickle as pkl
from absl.testing import absltest
from absl.testing import parameterized
from MuyGPyS.examples.t... | 31.878981 | 79 | 0.448618 |
08f8d6ac60d3ae792f7a4e2aa92c51dfee668339 | 44,957 | py | Python | Lib/site-packages/wx-3.0-msw/wx/build/config.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | Lib/site-packages/wx-3.0-msw/wx/build/config.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/build/config.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #----------------------------------------------------------------------
# Name: wx.build.config
# Purpose: Most of the contents of this module used to be located
# in wxPython's setup.py script. It was moved here so
# it would be installed with the rest of wxPython and
# ... | 35.708499 | 113 | 0.561247 |
08f8db6b3c18e7f8c827d0210af94ce25185bcf7 | 9,188 | py | Python | analysis/weekly-report.py | ProjectPepperHSB/Backend-Services | 06f0a6e58dbc06fc29e8144a149be4978363f036 | [
"MIT"
] | null | null | null | analysis/weekly-report.py | ProjectPepperHSB/Backend-Services | 06f0a6e58dbc06fc29e8144a149be4978363f036 | [
"MIT"
] | null | null | null | analysis/weekly-report.py | ProjectPepperHSB/Backend-Services | 06f0a6e58dbc06fc29e8144a149be4978363f036 | [
"MIT"
] | null | null | null | # ----- I M P O R T S ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
import sys, getpass, traceback
import warnings
import pandas as pd
import numpy as np
# from sklearn.linear_model import LinearRegression
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
from matplo... | 45.485149 | 151 | 0.602416 |
08f919a758d0a984f4d15a658f5e9d6ae2ce4b9a | 4,981 | py | Python | applications/examples/controllers/database_examples.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | applications/examples/controllers/database_examples.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | applications/examples/controllers/database_examples.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null |
response.menu = [['Register User', False, URL(r=request,
f='register_user')], ['Register Dog', False,
URL('register_dog')], ['Register Product'
, False, URL('register_product')],
['Buy product', False, URL('buy')]]
def register_user():
""" simpl... | 32.555556 | 75 | 0.583216 |
08f9481be40076b1d667c69211abeea2e8b44ea8 | 2,800 | py | Python | textacy/preprocessing/normalize.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | textacy/preprocessing/normalize.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | textacy/preprocessing/normalize.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | """
Normalize
---------
Normalize aspects of raw text that may vary in problematic ways.
"""
import re
import unicodedata
from .resources import (
QUOTE_TRANSLATION_TABLE,
RE_HYPHENATED_WORD,
RE_LINEBREAK,
RE_NONBREAKING_SPACE,
RE_ZWSP,
)
def normalize_hyphenated_words(text: str) -> str:
"""... | 32.941176 | 89 | 0.664643 |
08f950b1e8f2b230813bd147c05b7f22be83e0ff | 2,306 | py | Python | python/test/test_meas.py | sarus-tech/opendp | e4b1714fdadd72fe488647be83f6bfc7d1d20064 | [
"MIT"
] | null | null | null | python/test/test_meas.py | sarus-tech/opendp | e4b1714fdadd72fe488647be83f6bfc7d1d20064 | [
"MIT"
] | null | null | null | python/test/test_meas.py | sarus-tech/opendp | e4b1714fdadd72fe488647be83f6bfc7d1d20064 | [
"MIT"
] | null | null | null | from opendp.mod import enable_features
from opendp.typing import L1Distance
enable_features("floating-point")
def test_base_laplace():
from opendp.meas import make_base_laplace
meas = make_base_laplace(scale=10.5)
print("base laplace:", meas(100.))
assert meas.check(1., 1.3)
def test_base_vector_la... | 32.942857 | 92 | 0.688638 |
08f9580f32dfe283385ef5f9f76c8f7e5ba3c915 | 4,173 | py | Python | bonds/environment.py | yintaosong/spacegroup | 2cfedc2eb966b78c5e66fefa993cc7fb8478fd88 | [
"MIT"
] | null | null | null | bonds/environment.py | yintaosong/spacegroup | 2cfedc2eb966b78c5e66fefa993cc7fb8478fd88 | [
"MIT"
] | null | null | null | bonds/environment.py | yintaosong/spacegroup | 2cfedc2eb966b78c5e66fefa993cc7fb8478fd88 | [
"MIT"
] | null | null | null | '''
Created on Sep 11, 2014
@author: Yintao Song
'''
from __future__ import print_function, division, absolute_import
from .globals import *
from .site import Site
from itertools import groupby
class Environment(object):
'''
An environment of an atom site is defined by
the bonds between itself and its ne... | 31.37594 | 103 | 0.521447 |
08f98a9087b3a4efb3b7acca76db5f77f7aa6ea4 | 181 | py | Python | license_emailing_api/admin.py | Max635/under-test | 04c1125612135b9e298253ab8cdccd1cb051f75a | [
"PostgreSQL"
] | 1 | 2021-02-11T18:10:27.000Z | 2021-02-11T18:10:27.000Z | license_emailing_api/admin.py | Max635/under-test | 04c1125612135b9e298253ab8cdccd1cb051f75a | [
"PostgreSQL"
] | null | null | null | license_emailing_api/admin.py | Max635/under-test | 04c1125612135b9e298253ab8cdccd1cb051f75a | [
"PostgreSQL"
] | null | null | null | from django.contrib import admin
from .models import CustomerLicenseModel
class CustomerAdmin(admin.ModelAdmin):
fields = '__all__'
admin.site.register(CustomerLicenseModel)
| 20.111111 | 41 | 0.812155 |
08f9a01c19c6367d38d7b6636d53d3e2085c38e7 | 2,954 | py | Python | gibson2/render/mesh_renderer/mesh_renderer_settings.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 3 | 2021-02-07T14:00:38.000Z | 2021-07-03T19:40:59.000Z | gibson2/render/mesh_renderer/mesh_renderer_settings.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | gibson2/render/mesh_renderer/mesh_renderer_settings.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 2 | 2021-04-01T12:14:59.000Z | 2021-06-18T13:04:39.000Z | import os
import gibson2
import platform
class MeshRendererSettings(object):
def __init__(
self,
use_fisheye=False,
msaa=False,
enable_shadow=False,
enable_pbr=True,
env_texture_filename=os.path.join(gibson2.ig_dataset_path, 'scenes', 'background',
... | 38.363636 | 97 | 0.639472 |
08f9c19fa671de52109df4bec1481d8b44b3eaea | 2,038 | py | Python | river/optim/initializers.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/optim/initializers.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/optim/initializers.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | """Weight initializers."""
import numpy as np
from river.optim.base import Initializer
__all__ = ["Constant", "Normal", "Zeros"]
class Constant(Initializer):
"""Constant initializer which always returns the same value.
Parameters
----------
value
Examples
--------
>>... | 20.795918 | 97 | 0.565751 |
08fab356a2ce1db48bc057d009dc0bcfbcfe9386 | 1,488 | py | Python | d20/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | d20/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | d20/a1.py | nikosgraser/aoc-2020 | f6b197eca161028f3e62cebc1b8e756898d545f5 | [
"0BSD"
] | null | null | null | from typing import List
class Tile:
def __init__(self, tile_id: str, tile_lines: List[str]):
self.tile_id = tile_id
self.raw_lines = tile_lines
self.borders = self.get_borders()
def get_borders(self):
return [
list(self.raw_lines[0]),
[line[-1] for line... | 28.615385 | 84 | 0.62836 |
08fad39274dfe0f5e6ba5101790b570b6836d8f7 | 2,940 | py | Python | alipay/aop/api/domain/MiniAppTemplateData.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/MiniAppTemplateData.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/MiniAppTemplateData.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class MiniAppTemplateData(object):
def __init__(self):
self._app_name = None
self._desc = None
self._image = None
self._link = None
self._logo = None
sel... | 25.344828 | 67 | 0.523129 |
08faeca5e3e4d6a1f1c86c1fe139592f751cfda2 | 3,280 | py | Python | app/app/settings.py | hossamhsn74/recipe-app-api | 59e749975eb33fa34a32d0fbbd154d5cdd9ca0b4 | [
"MIT"
] | null | null | null | app/app/settings.py | hossamhsn74/recipe-app-api | 59e749975eb33fa34a32d0fbbd154d5cdd9ca0b4 | [
"MIT"
] | 5 | 2021-03-19T15:15:57.000Z | 2022-03-12T00:54:15.000Z | app/app/settings.py | hossamhsn74/recipe-app-api | 59e749975eb33fa34a32d0fbbd154d5cdd9ca0b4 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.1.5.
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/
"""
from pathlib imp... | 25.625 | 91 | 0.689329 |
08fafde4de9612f4eb6272f3d96b8fb3360e5804 | 1,575 | py | Python | userbot/modules/tiktok_downloader.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-10-25T03:36:43.000Z | 2021-05-27T09:10:09.000Z | userbot/modules/tiktok_downloader.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2021-07-16T10:10:09.000Z | 2021-12-19T23:34:15.000Z | userbot/modules/tiktok_downloader.py | minaricious/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2020-10-27T03:00:57.000Z | 2021-09-02T12:17:54.000Z | # Copyright (C) 2020 Frizzy.
# All rights reserved.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
from telethon.errors.rpcerrorlist import YouBlockedUserError
from userbot import bot, CMD_HELP
from userbot.events im... | 35 | 94 | 0.622857 |
08fb0e0f42c55e3b5d8f27d6bf0e3c811834336d | 22,344 | py | Python | tests/frontend/compilers/test_xcov.py | SubhashishQPIT/strawberryfields | dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9 | [
"Apache-2.0"
] | 646 | 2018-03-26T15:12:35.000Z | 2022-03-21T18:52:42.000Z | tests/frontend/compilers/test_xcov.py | tonybruguier/strawberryfields | 298601e409528f22c6717c2d816ab68ae8bda1fa | [
"Apache-2.0"
] | 666 | 2018-03-27T20:21:27.000Z | 2022-03-25T18:35:33.000Z | tests/frontend/compilers/test_xcov.py | tonybruguier/strawberryfields | 298601e409528f22c6717c2d816ab68ae8bda1fa | [
"Apache-2.0"
] | 182 | 2018-04-11T17:09:39.000Z | 2022-03-29T15:38:43.000Z | # Copyright 2019-2020 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | 39.9 | 107 | 0.597655 |
08fb1bfac117e1c7d06a5742d6ce534c10a03759 | 2,129 | py | Python | src/generators.py | sachithdickwella/python-tute | 42583d04db0ab907288b9bef0b022730eec0aa7d | [
"Apache-2.0"
] | null | null | null | src/generators.py | sachithdickwella/python-tute | 42583d04db0ab907288b9bef0b022730eec0aa7d | [
"Apache-2.0"
] | null | null | null | src/generators.py | sachithdickwella/python-tute | 42583d04db0ab907288b9bef0b022730eec0aa7d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# #################################################################################################
# Generators using 'yield' keyword.
# #################################################################################################
def create_cubes(n):
for x in r... | 26.283951 | 102 | 0.47675 |
08fb4c5e9c1fdb3f91fac358bedd9fb7eea40723 | 3,507 | py | Python | workers/tests/test_median.py | Open-EO/openeo-sentinelhub-python-driver | 92f990f098065ffb658eba6dca291dd1d5fc70f2 | [
"Apache-2.0"
] | 2 | 2019-12-03T12:49:47.000Z | 2020-10-25T20:14:39.000Z | workers/tests/test_median.py | Open-EO/openeo-sentinelhub-python-driver | 92f990f098065ffb658eba6dca291dd1d5fc70f2 | [
"Apache-2.0"
] | 5 | 2019-12-03T10:32:48.000Z | 2020-10-09T13:07:39.000Z | workers/tests/test_median.py | Open-EO/openeo-sentinelhub-python-driver | 92f990f098065ffb658eba6dca291dd1d5fc70f2 | [
"Apache-2.0"
] | 4 | 2020-03-06T14:51:52.000Z | 2020-11-24T10:30:18.000Z | import pytest
import sys, os
import xarray as xr
import numpy as np
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import process
from process._common import ProcessArgumentInvalid, ProcessArgumentRequired
@pytest.fixture
def generate_data():
def _construct(
data = [[[[0... | 40.310345 | 164 | 0.600513 |
08fb64c192e87a460cae81f36e164dac64c4d5c0 | 22,347 | py | Python | leo/plugins/qt_events.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/qt_events.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/qt_events.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20140907103315.18766: * @file ../plugins/qt_events.py
#@@first
'''Leo's Qt event handling code.'''
#@+<< about internal bindings >>
#@+node:ekr.20110605121601.18538: ** << about internal bindings >>
#@@nocolor-node
#@+at
#
# Here are the rules for translating key b... | 39.205263 | 92 | 0.537343 |
08fb872a38405165d7ac61a5c560b50d755b96cc | 423 | py | Python | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | beers/migrations/0016_beer_stem_and_stein_pk.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | # Generated by Django 2.1.7 on 2019-02-23 03:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("beers", "0015_auto_20190221_2323"),
]
operations = [
migrations.AddField(
model_name="beer",
name="stem_and_stein_pk... | 22.263158 | 82 | 0.619385 |
08fb8e3876bf962d720b4f5cc58c458c35db8ca5 | 407 | py | Python | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-14T21:16:07.000Z | 2020-07-09T07:30:44.000Z | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-01T12:33:36.000Z | 2020-04-01T12:33:49.000Z | onyx/models/NotificationsModel.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | null | null | null | from onyx.extensions import db
class Notifications(db.Model):
__tablename__ = 'notifications'
id = db.Column(db.Integer, primary_key=True)
seen = db.Column(db.Boolean(), nullable=False)
user = db.Column(db.String(), nullable=False)
title = db.Column(db.String(), nullable=False)
content = db.Co... | 31.307692 | 50 | 0.678133 |
08fba1f852164d0eefdc0ec549fbe56f1b3e96cd | 9,451 | py | Python | tests/test_runtime/test_typecheck_schema.py | zekna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | 5 | 2015-06-18T20:04:56.000Z | 2016-03-15T15:32:44.000Z | tests/test_runtime/test_typecheck_schema.py | sarlianna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | 1 | 2016-01-19T01:39:54.000Z | 2016-01-27T19:17:31.000Z | tests/test_runtime/test_typecheck_schema.py | zekna/py-types | ec39da1277986f0ea44830dfb0da9d906deb13e1 | [
"MIT"
] | null | null | null | from py_types.runtime import (
typecheck,
)
from py_types.runtime.schema import (
schema,
SchemaOr,
SchemaError
)
import unittest
from copy import deepcopy
#----------------------
# Test fodder
#----------------------
# asserts.py
@typecheck
def type_checked(best: int, slot: str) -> str:
return... | 35.003704 | 105 | 0.608719 |
08fbced37f98f25cd248e3306e86088c8daac578 | 2,186 | py | Python | src/user/service.py | wuttinanhi/flask-simple-auth | 03755791cb7ef9e16c928741cbe4b3fbc2e65be5 | [
"MIT"
] | null | null | null | src/user/service.py | wuttinanhi/flask-simple-auth | 03755791cb7ef9e16c928741cbe4b3fbc2e65be5 | [
"MIT"
] | null | null | null | src/user/service.py | wuttinanhi/flask-simple-auth | 03755791cb7ef9e16c928741cbe4b3fbc2e65be5 | [
"MIT"
] | null | null | null | """
user service class
"""
# pylint: disable=no-member
from __future__ import annotations
import bcrypt
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm.session import Session
from src.database import db
from src.exception import UserAlreadyExistsException
from src.exception.user_not_found import UserN... | 30.788732 | 78 | 0.629918 |
08fbfcb0fe70b8a7f500353cc5e9aa840ae65ae3 | 581 | py | Python | contxt/cli/commands/orgs.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 4 | 2019-06-04T17:59:52.000Z | 2020-09-09T17:33:30.000Z | contxt/cli/commands/orgs.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 61 | 2019-05-24T17:49:56.000Z | 2022-03-24T15:22:57.000Z | contxt/cli/commands/orgs.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | 2 | 2021-12-07T01:03:56.000Z | 2022-02-18T16:40:24.000Z | from typing import List
import click
from contxt.cli.clients import Clients
from contxt.cli.utils import fields_option, print_table, sort_option
from contxt.models.facilities import Organization
@click.group()
def orgs() -> None:
"""Organizations."""
@orgs.command()
@fields_option(default=["id", "name", "slug... | 25.26087 | 68 | 0.73494 |
08fc0cd604712a003b119c844386fec1fb0c5562 | 18,812 | py | Python | src/openapi_client/model/task.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 6 | 2022-01-03T07:07:18.000Z | 2022-03-21T08:13:49.000Z | src/openapi_client/model/task.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 1 | 2022-02-02T13:01:05.000Z | 2022-02-10T12:01:17.000Z | src/openapi_client/model/task.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 1 | 2022-02-10T11:53:55.000Z | 2022-02-10T11:53:55.000Z | """
Nozbe Teams API
Nozbe Teams API specification # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@nozbe.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from openapi_client.exceptions import ApiAttributeError
from op... | 43.953271 | 115 | 0.571231 |
08fc215b0f662a53adfd8fd5aed9068f1adcb759 | 6,103 | py | Python | visualization/simple_data_vis.py | Just-DIRECT-Capstone/Protein-Purification-Model-Public | cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a | [
"MIT"
] | 1 | 2021-10-11T10:15:14.000Z | 2021-10-11T10:15:14.000Z | visualization/simple_data_vis.py | Just-DIRECT-Capstone/Protein-Purification-Model-Public | cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a | [
"MIT"
] | 1 | 2021-04-30T16:24:12.000Z | 2021-05-04T22:17:31.000Z | visualization/simple_data_vis.py | Just-DIRECT-Capstone/Protein-Purification-Model-Public | cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a | [
"MIT"
] | null | null | null | """imports"""
from inspect import isdatadescriptor
import numpy as np
import matplotlib.pyplot as plt
import utils
from surrogate_models.nn_defs import multi_mse
def histograms(data,x_data,y_data):
"""builds histograms"""
n_outputs = len(y_data)
n_inputs = len(x_data)
n_gen = int(np.ceil(n_inputs**0.5)... | 42.678322 | 134 | 0.560708 |
08fc3443e9069702afa5032d5ef24049583e843c | 3,564 | py | Python | support/razor_display.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | 3 | 2021-07-11T03:52:50.000Z | 2022-01-06T11:30:08.000Z | support/razor_display.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | null | null | null | support/razor_display.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | 1 | 2021-07-18T05:42:40.000Z | 2021-07-18T05:42:40.000Z | '''
Created on 01-Feb-2021
@author: Abhishek Prajapati
'''
class RazorPyDisplay(object):
'''
classdocs
'''
def __init__(self, params):
'''
Constructor
'''
pass
@classmethod
def display_head(cls):
print(r"""
... | 55.6875 | 178 | 0.133838 |
08fc537c7a88f2e1ab0de0fdf2a54401477d5812 | 343 | py | Python | util/data/gen/wbemsvc.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/wbemsvc.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/wbemsvc.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'DllCanUnloadNow', 'address': '0x7ffb2a351560'}, {'type': 'function', 'name': 'DllGetClassObject', 'address': '0x7ffb2a3514a0'}, {'type': 'function', 'name': 'DllRegisterServer', 'address': '0x7ffb2a352550'}, {'type': 'function', 'name': 'DllUnregisterServer', 'addre... | 171.5 | 330 | 0.670554 |
08fc628fbff105e1d225fa3ebcc1826c88347880 | 2,878 | py | Python | source/graph.py | sanmik/brain-network-viz | 9c881e49c14c94e3f7ef4b7776d98c930716ee91 | [
"MIT"
] | 5 | 2017-09-01T14:05:03.000Z | 2019-07-13T07:52:49.000Z | source/graph.py | sanmik/brain-network-viz | 9c881e49c14c94e3f7ef4b7776d98c930716ee91 | [
"MIT"
] | null | null | null | source/graph.py | sanmik/brain-network-viz | 9c881e49c14c94e3f7ef4b7776d98c930716ee91 | [
"MIT"
] | 1 | 2017-09-01T14:05:03.000Z | 2017-09-01T14:05:03.000Z | """
Maintain model data about all Lobes, Nodes, and Edges involved in this
visualization. Handles parsing input files and constructing those entities.
"""
# Library Imports
import csv
import bisect
# Local Module Imports
import config
from lobe import Lobe
from node import Node
from edge import Edge
class Graph... | 36.897436 | 78 | 0.658791 |
08fcb04cc49bed0eb145c67b18a0a9734c0640f4 | 1,294 | py | Python | tests/xlfunctions_vs_excel/datedif_test.py | ckp95/xlcalculator | 8f3f04a2a0a2ecb12c3d5837a5b13519137ae427 | [
"MIT"
] | 54 | 2020-04-26T09:18:29.000Z | 2022-03-30T08:47:45.000Z | tests/xlfunctions_vs_excel/datedif_test.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 41 | 2020-05-04T04:12:36.000Z | 2022-01-31T02:41:05.000Z | tests/xlfunctions_vs_excel/datedif_test.py | st-lo/xlcalculator | 19190ec90e948b7ab1eceb06448b96cc1728bc51 | [
"MIT"
] | 21 | 2020-05-21T20:49:23.000Z | 2022-02-20T14:15:56.000Z | from .. import testing
class DatedifTest(testing.FunctionalTestCase):
filename = "DATEDIF.xlsx"
def test_counta_evaluation_Y(self):
excel_value = self.evaluator.get_cell_value('Sheet1!C2')
value = self.evaluator.evaluate('Sheet1!C2')
self.assertEqual(excel_value, value)
def test_... | 35.944444 | 64 | 0.693199 |
08fcc72379f1b84f9ff2b24a250f93d7a36db0cc | 5,008 | py | Python | supplychainpy/reporting/blueprints/simulation/controller.py | luisccalves/supplychainpy | 63a10b77ffdcc5bca71e815c70667c819d8f9af0 | [
"BSD-3-Clause"
] | 231 | 2016-05-30T02:34:45.000Z | 2022-03-28T17:00:29.000Z | supplychainpy/reporting/blueprints/simulation/controller.py | luisccalves/supplychainpy | 63a10b77ffdcc5bca71e815c70667c819d8f9af0 | [
"BSD-3-Clause"
] | 77 | 2016-03-23T16:28:34.000Z | 2021-09-30T22:08:03.000Z | supplychainpy/reporting/blueprints/simulation/controller.py | luisccalves/supplychainpy | 63a10b77ffdcc5bca71e815c70667c819d8f9af0 | [
"BSD-3-Clause"
] | 103 | 2016-08-10T19:53:09.000Z | 2022-03-16T16:34:38.000Z | # Copyright (c) 2015-2016, The Authors and Contributors
# <see AUTHORS file>
# 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 n... | 59.619048 | 116 | 0.754593 |
08fceb23180337d7845db05ee20ad928d86c202b | 3,628 | py | Python | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | """
Created on July 22 2021
@author: Joan Hérisson
"""
from unittest import TestCase
from copy import deepcopy
from chemlite import Compound
from rptools.rplibs.rpCompound import rpCompound
class Test_rpCompound(TestCase):
__id = 'test'
__dict = {
'id': __id,
'name': '',
'smiles': '... | 28.566929 | 94 | 0.550717 |
08fceb23c32d886e5de501b8ca5001703b22deb3 | 2,879 | py | Python | cloud_snitch/tests/models/test_versioned_property.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 1 | 2018-07-11T20:20:21.000Z | 2018-07-11T20:20:21.000Z | cloud_snitch/tests/models/test_versioned_property.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 46 | 2018-08-08T19:46:15.000Z | 2019-02-22T20:33:49.000Z | cloud_snitch/tests/models/test_versioned_property.py | dani4571/FleetDeploymentReporting | 8b132a20fa3e9c4e4215feade79f689be6e4b364 | [
"Apache-2.0"
] | 7 | 2018-06-26T15:27:55.000Z | 2018-12-05T19:41:25.000Z | import unittest
from cloud_snitch.models.base import VersionedProperty
class TestVersionedProperty(unittest.TestCase):
def test_default(self):
"""Test default values with no kwargs."""
prop = VersionedProperty()
self.assertTrue(prop.type is str)
self.assertTrue(prop.concat_proper... | 35.9875 | 66 | 0.66794 |
08fd1ff41562de45a9ad2550dff64ca41175f0b2 | 685 | py | Python | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 689 | 2021-12-10T07:09:35.000Z | 2022-03-31T13:46:21.000Z | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 95 | 2021-12-10T08:10:58.000Z | 2022-03-31T22:09:35.000Z | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 73 | 2021-12-20T15:35:07.000Z | 2022-03-30T06:53:41.000Z | """GANomaly Model."""
# Copyright (C) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 34.25 | 76 | 0.766423 |
08fd2b2553be6e15311b6af5ce9f654b6115ed03 | 3,230 | py | Python | alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenIotvspUserCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.IotVspOrgUserAddUserInfoRequest import IotVspOrgUserAddUserInfoRequest
class AlipayOpenIotvspUserCreateModel(object):
def __init__(self):
self._component_out_id = Non... | 32.959184 | 100 | 0.608669 |
08fd3c002a7bdb86532b23465860bad86e3b5401 | 6,936 | py | Python | maro/data_lib/binary_converter.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/data_lib/binary_converter.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/data_lib/binary_converter.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import sys
import time
import warnings
import calendar
from struct import Struct
from csv import DictReader
from dateutil.parser import parse as parse_dt
from dateutil.tz import gettz, UTC
from maro.data_lib.item_meta import BinaryMet... | 31.103139 | 137 | 0.596453 |
08fd3cf4d43b84b54801855b7c3d5744ae968ca8 | 1,327 | py | Python | superset/migrations/versions/5a7bad26f2a7_.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/5a7bad26f2a7_.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/5a7bad26f2a7_.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.365854 | 83 | 0.752072 |
08fd7154e0e9283c6c072eb114ea21da3e41fac3 | 1,911 | py | Python | docsim/elas/models.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 1 | 2020-04-29T13:52:29.000Z | 2020-04-29T13:52:29.000Z | docsim/elas/models.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | 136 | 2019-09-19T03:36:21.000Z | 2019-11-28T08:50:45.000Z | docsim/elas/models.py | tarohi24/docsim | 4879bcc889c32470a27094eb183c2ce15ae2f1fb | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Any, Dict, List
import numpy as np
class Field:
@classmethod
def mapping(cls) -> Dict:
raise NotImplementedError('This is an abstract class.')
def to_elas_value(self) -> Any:
raise NotImplementedError('This is an abstract class.')
... | 18.375 | 63 | 0.588174 |
08fd78b97941cbd67e8b5d189db109afcb9a2e98 | 1,455 | py | Python | flask_blog/__init__.py | dmitriyvek/flask-blog | 86e94f9a9bdae682061bb26662da9649f6a4e6ab | [
"MIT"
] | null | null | null | flask_blog/__init__.py | dmitriyvek/flask-blog | 86e94f9a9bdae682061bb26662da9649f6a4e6ab | [
"MIT"
] | null | null | null | flask_blog/__init__.py | dmitriyvek/flask-blog | 86e94f9a9bdae682061bb26662da9649f6a4e6ab | [
"MIT"
] | null | null | null | from flask import Flask
from flasgger import Swagger
from flask_debugtoolbar import DebugToolbarExtension
from flask_debug_api import DebugAPIExtension
from flask_marshmallow import Marshmallow
from flask_mail import Mail
from flask_migrate import Migrate
from config.settings import app_config
from config.swagger_conf... | 27.980769 | 57 | 0.767698 |
08fd95d80822cc48134ea4086524daf768cf3604 | 7,636 | py | Python | ndac/predict.py | anotherjoshsmith/NovoNordisk_Capstone | a39adb2ae68f001bdf0e4b2200d7b8f923f27c2f | [
"MIT"
] | 1 | 2019-05-16T02:16:23.000Z | 2019-05-16T02:16:23.000Z | ndac/predict.py | anotherjoshsmith/NovoNordisk_Capstone | a39adb2ae68f001bdf0e4b2200d7b8f923f27c2f | [
"MIT"
] | 10 | 2020-01-28T22:23:44.000Z | 2022-02-09T23:39:01.000Z | ndac/predict.py | anotherjoshsmith/NovoNordisk_Capstone | a39adb2ae68f001bdf0e4b2200d7b8f923f27c2f | [
"MIT"
] | 2 | 2018-04-17T20:15:24.000Z | 2018-04-19T17:14:38.000Z | import numpy as np
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Flatten
from keras.layers import Dropout
from keras.layers.embeddings import Embedding
from keras.layers.convolutional import Conv1D
from keras.layers.convolu... | 36.018868 | 84 | 0.621661 |
08fda8997f5cc648d34273e622059f0dbe37116d | 14,982 | py | Python | gui/qt/installwizard.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | 1 | 2017-02-21T17:52:54.000Z | 2017-02-21T17:52:54.000Z | gui/qt/installwizard.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | null | null | null | gui/qt/installwizard.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | null | null | null | import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore
import electrum_ltc as electrum
from electrum_ltc.i18n import _
from seed_dialog import SeedDisplayLayout, SeedWarningLayout, SeedInputLayout
from network_dialog import NetworkChoiceLayout
from util import *
from password_d... | 38.122137 | 80 | 0.622681 |
08fdb542ae7e0ac1ebe344ee2948acf29ca299f7 | 9,934 | py | Python | autotest/gdrivers/aaigrid.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/aaigrid.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/aaigrid.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test Arc/Info ASCII Grid support.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
##############################################################################... | 33.22408 | 618 | 0.580532 |
08fdbe447bb458eccb887efc4d6e0520184ce763 | 1,392 | py | Python | py/695. Max Area of Island.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/695. Max Area of Island.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/695. Max Area of Island.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/max-area-of-island/
# You are given an m x n binary matrix grid. An island is a group of 1's
# (representing land) connected 4-directionally (horizontal or vertical.) You may
# assume all four edges of the grid are surrounded by water.
# The area of an island is the number of cells wit... | 34.8 | 81 | 0.524425 |
08fe01d435ca9edb8b4d2e4e9cfdab1f6e9c4dfa | 2,275 | py | Python | webservices/resources/dates.py | dwillis/openFEC | dae84b0e526eac4a917e80697a7999956f9c96cb | [
"CC0-1.0"
] | 2 | 2020-04-09T15:29:43.000Z | 2021-01-13T12:08:22.000Z | webservices/resources/dates.py | dwillis/openFEC | dae84b0e526eac4a917e80697a7999956f9c96cb | [
"CC0-1.0"
] | null | null | null | webservices/resources/dates.py | dwillis/openFEC | dae84b0e526eac4a917e80697a7999956f9c96cb | [
"CC0-1.0"
] | null | null | null | from datetime import date
from flask.ext.restful import Resource
from webservices import args
from webservices import spec
from webservices import utils
from webservices import schemas
from webservices.common import models
from webservices.common.util import filter_query
def filter_upcoming(query, column, kwargs):
... | 25.561798 | 75 | 0.663297 |
08fe22c3e84c135c31eeb9870c3a2f711b4b6626 | 52,813 | py | Python | tests/test_sources.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | 1 | 2021-04-07T06:20:55.000Z | 2021-04-07T06:20:55.000Z | tests/test_sources.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | null | null | null | tests/test_sources.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | null | null | null | """
test_sources
~~~~~~~~~~~~
Unit tests for the pjinoise.generator module.
"""
from copy import deepcopy
import unittest as ut
from unittest.mock import call, patch
import numpy as np
from pjinoise import sources as s
from pjinoise.common import grayscale_to_ints_list, print_array
from pjinoise.constants import P
... | 36.173288 | 77 | 0.471342 |
08fe32aa9044c49e51038dc1d87f6dbbc4fcaa22 | 1,097 | py | Python | tests/test_imageObject.py | jhunkeler/drizzlepac | 09ca153b8e4f4e03dd155c61243d722e1c40caee | [
"BSD-3-Clause"
] | 28 | 2016-08-16T04:16:32.000Z | 2022-03-27T15:39:29.000Z | tests/test_imageObject.py | jhunkeler/drizzlepac | 09ca153b8e4f4e03dd155c61243d722e1c40caee | [
"BSD-3-Clause"
] | 822 | 2016-03-10T01:19:28.000Z | 2022-03-30T20:25:34.000Z | tests/test_imageObject.py | jhunkeler/drizzlepac | 09ca153b8e4f4e03dd155c61243d722e1c40caee | [
"BSD-3-Clause"
] | 33 | 2016-03-16T19:18:03.000Z | 2021-12-27T04:20:44.000Z | #!/usr/bin/env python
import pytest
from drizzlepac import imageObject
#from http://blog.moertel.com/articles/2008/03/19/property-checking-with-pythons-nose-testing-framework
def forall_cases(cases):
def decorate(testfn):
def gen():
for case in cases:
yield testfn, case
... | 31.342857 | 103 | 0.678213 |
08fe5b8fc02517d0bd0f62b8ba3252c5918566ce | 54,460 | py | Python | Amplo/Pipeline.py | nielsuit227/AutoML | 51e2076d52d76dc84a190293b5bb59da2833df89 | [
"MIT"
] | 2 | 2021-06-16T22:09:01.000Z | 2021-09-06T20:26:42.000Z | Amplo/Pipeline.py | nielsuit227/AutoML | 51e2076d52d76dc84a190293b5bb59da2833df89 | [
"MIT"
] | 1 | 2021-06-04T08:22:02.000Z | 2021-06-04T08:22:02.000Z | Amplo/Pipeline.py | nielsuit227/AutoML | 51e2076d52d76dc84a190293b5bb59da2833df89 | [
"MIT"
] | 1 | 2021-09-15T08:34:20.000Z | 2021-09-15T08:34:20.000Z | import re
import os
import time
import copy
import json
import Amplo
import joblib
import shutil
import warnings
import numpy as np
import pandas as pd
from tqdm import tqdm
from datetime import datetime
from shap import TreeExplainer
from sklearn import metrics
from sklearn.model_selection import KFold
from sklearn.m... | 41.667942 | 120 | 0.590488 |
08fe5dd473c045f7355db283e132f07708cf080c | 82 | py | Python | spatialpandas/io/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/io/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:28.000Z | 2021-04-17T15:22:28.000Z | spatialpandas/io/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:00.000Z | 2021-04-17T15:22:00.000Z | from .parquet import read_parquet, read_parquet_dask, to_parquet, to_parquet_dask
| 41 | 81 | 0.865854 |
08fe6422dec84665742a8ddf76cc44cc0c473caa | 44,411 | py | Python | nova/exception.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/exception.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/exception.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 28.432138 | 79 | 0.692981 |
08fe7b235e238fa6c56b60dbd2473765b6607a76 | 2,949 | py | Python | birdsonganalysis/plot.py | gnouveau/birdsonganalysis | 58032538c63e9506d386e5fff5c2e8321c1d2983 | [
"MIT"
] | null | null | null | birdsonganalysis/plot.py | gnouveau/birdsonganalysis | 58032538c63e9506d386e5fff5c2e8321c1d2983 | [
"MIT"
] | null | null | null | birdsonganalysis/plot.py | gnouveau/birdsonganalysis | 58032538c63e9506d386e5fff5c2e8321c1d2983 | [
"MIT"
] | null | null | null | """Plotting function for birdsonganalysis."""
import numpy as np
import seaborn as sns
import matplotlib.patches as p
import matplotlib.pyplot as plt
from .songfeatures import spectral_derivs
from .constants import FREQ_RANGE
def spectral_derivs_plot(spec_der, contrast=0.1, ax=None, freq_range=None,
... | 38.802632 | 79 | 0.608342 |
08febb61b155757d0b556cca37703b316e694288 | 221 | py | Python | django_istio_opentracing/client_hooks/_const.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 3 | 2020-11-06T14:59:54.000Z | 2021-05-30T03:13:20.000Z | django_istio_opentracing/client_hooks/_const.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 1 | 2021-05-30T23:30:19.000Z | 2021-06-03T09:38:10.000Z | django_istio_opentracing/client_hooks/_const.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 1 | 2021-09-29T09:09:40.000Z | 2021-09-29T09:09:40.000Z | """transaction tag"""
BEGIN = "BEGIN"
COMMIT = "COMMIT"
ROLLBACK = "ROLLBACK"
TRANS_TAGS = [BEGIN, COMMIT, ROLLBACK]
"""database instance"""
MYSQLDB = "mysql"
PGDB = "postgress"
SQLITE = "sqlite"
REDIS = "redis"
| 11.05 | 38 | 0.651584 |
08ff464c7558c2de28a12d0372a1a6fce1ad1146 | 3,813 | py | Python | src/main.py | middlec000/wordler | ad76dea50f0baab398d16366bfc55557ae187fce | [
"MIT"
] | null | null | null | src/main.py | middlec000/wordler | ad76dea50f0baab398d16366bfc55557ae187fce | [
"MIT"
] | null | null | null | src/main.py | middlec000/wordler | ad76dea50f0baab398d16366bfc55557ae187fce | [
"MIT"
] | null | null | null | import streamlit as st
import pandas as pd
from helper_methods import *
def suggest(df: pd.DataFrame, original_length: int, num_words_to_display: int, sort_by: str) -> None:
"""
Print the suggested words nicely and ordered by the desired metric.
Args:
df (pd.DataFrame): Remaining words.
o... | 49.519481 | 169 | 0.695515 |
08ff7e58ce1e1f75221d4b721c894b292e46dfad | 1,668 | py | Python | models/ModelSet/settings.py | Easonyesheng/StereoCameraToolk | 660e43019d0687e96e6da3aca48c1c423ae5abff | [
"MIT"
] | 27 | 2020-10-16T07:21:35.000Z | 2022-03-11T02:56:13.000Z | models/ModelSet/settings.py | Easonyesheng/StereoCamera | 9319b7f4e5ce36833de722a15e1074e82b8b4f84 | [
"MIT"
] | null | null | null | models/ModelSet/settings.py | Easonyesheng/StereoCamera | 9319b7f4e5ce36833de722a15e1074e82b8b4f84 | [
"MIT"
] | 6 | 2021-02-01T09:54:40.000Z | 2022-03-11T03:16:39.000Z |
import os
import yaml
# Normal
# IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\ForCalibAc30_newdata\img'
# IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\ForCalibAc5_bgdata\img'
# IMGPATH = r'D:\DeepCalib\CalibrationNet\Dataset\data_vs_noise\data_vs_noise_radius1.5_bg\ForCalibAc5_bg\img'
# IMGPATH = r'D:\DeepC... | 39.714286 | 110 | 0.791966 |
08ff893ccbc78b254dd3c4d85cf48585e2974714 | 3,649 | py | Python | functioning_implementations/own_algorithm_no_trigger/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | functioning_implementations/own_algorithm_no_trigger/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | functioning_implementations/own_algorithm_no_trigger/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | # Copyright (c) 2020 Max Planck Gesellschaft
# !/usr/bin/env python
from baselines.common import set_global_seeds, tf_util as U
from baselines import bench
import os.path as osp
import gym, logging
import pdb
import os
dirname_rel = os.path.dirname(__file__)
splitted = dirname_rel.split("/")
dirname_rel = ("/".join(di... | 37.234694 | 157 | 0.653604 |
08ff8bf81623b6f46121c3c30309d17fce902d67 | 1,461 | py | Python | alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AnttechAiCvTfjsModelQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AnttechAiCvTfjsModelQueryModel(object):
def __init__(self):
self._model_code = None
self._model_version = None
@property
def model_code(self):
return self._model_... | 26.089286 | 77 | 0.609856 |
08ff96cbc09045677c194e0206b4caad20377c40 | 523 | py | Python | tests/test_greendo.py | jmcculloch/greendo | 490f552458bf4f931b56dc331a6b0db87202bfa2 | [
"Apache-2.0"
] | null | null | null | tests/test_greendo.py | jmcculloch/greendo | 490f552458bf4f931b56dc331a6b0db87202bfa2 | [
"Apache-2.0"
] | null | null | null | tests/test_greendo.py | jmcculloch/greendo | 490f552458bf4f931b56dc331a6b0db87202bfa2 | [
"Apache-2.0"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import greendo
USERNAME='TODO'
PASSWORD='TODO'
client = greendo.Client(USERNAME, PASSWORD)
devices = client.devices[-1]
def test_door_status():
print(devices.door.door_status())
assert devices.door.door_st... | 23.772727 | 82 | 0.734226 |
08ff9777abfbc7ca0741fd06cf5af369c71b4a2f | 2,620 | py | Python | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/tests/test_source.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/tests/test_source.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/tests/test_source.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | """
Test highlight backend.
"""
from __future__ import absolute_import
import unittest
from django.core.management import call_command
from nine.versions import DJANGO_GTE_1_10
import pytest
from rest_framework import status
import factories
from .base import BaseRestFrameworkTestCase
if DJANGO_GTE_1_10:
f... | 26.2 | 79 | 0.63626 |
08ffc24a02eda47afa662764f66d18ef3b2c2c3b | 7,177 | py | Python | forest.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | 7 | 2020-06-24T12:14:40.000Z | 2022-01-19T17:01:02.000Z | forest.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | forest.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import random
from signal import signal, SIGINT, SIGTERM
from forest.configuration import Configuration
from forest.logger import get_logger
from forest.parse_examples import parse_file, parse_resnax, show, preprocess
from forest.synthesizer import MultiTreeSynthesizer,... | 44.030675 | 98 | 0.648182 |
1c0001dae2c990332de949c0af3b75b20cb13db1 | 8,048 | py | Python | YarpTp/yarptp.py | kpedrozag/YarpTp | eb8302aab3d8ca737d5046bddeafc4a877796a51 | [
"MIT"
] | null | null | null | YarpTp/yarptp.py | kpedrozag/YarpTp | eb8302aab3d8ca737d5046bddeafc4a877796a51 | [
"MIT"
] | null | null | null | YarpTp/yarptp.py | kpedrozag/YarpTp | eb8302aab3d8ca737d5046bddeafc4a877796a51 | [
"MIT"
] | 1 | 2018-11-20T16:42:38.000Z | 2018-11-20T16:42:38.000Z | import RPi.GPIO as GPIO
from time import sleep
class YarpTp:
def __init__(self):
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
self.__enableA = 0
self.__input1 = 0
self.__input2 = 0
self.__enableB = 0
self.__input3 = 0
self.__input4 = 0
s... | 36.089686 | 139 | 0.600646 |
1c002d2805935f0f76727d9aeb477442c979fc89 | 597 | py | Python | mlab_api/data/raw_data.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 1 | 2017-09-05T14:52:11.000Z | 2017-09-05T14:52:11.000Z | mlab_api/data/raw_data.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 9 | 2017-09-14T15:30:02.000Z | 2019-03-05T18:35:20.000Z | mlab_api/data/raw_data.py | m-lab/mlab-vis-api | 2368d88223148bf73d83c62d285fb458558619e0 | [
"MIT"
] | 3 | 2017-06-01T16:01:37.000Z | 2017-10-24T22:44:47.000Z | # -*- coding: utf-8 -*-
'''
Data class for accessing data for raw data
'''
from mlab_api.data.table_config import get_table_config
from mlab_api.data.base_data import Data
import mlab_api.data.bigtable_utils as bt
class RawData(Data):
'''
Pull out some raw data
'''
def get_raw_test_results(self):
... | 25.956522 | 77 | 0.666667 |
1c00794dc3747db1406055f72accb63a790e7dec | 2,354 | py | Python | www/blog/migrations/0001_initial.py | zsoobhan/prometheus | a255740a9b171ecbb7c5b96c7007830c9e9c7a4b | [
"MIT"
] | 3 | 2015-02-22T23:55:00.000Z | 2020-01-14T05:07:52.000Z | www/blog/migrations/0001_initial.py | zsoobhan/prometheus | a255740a9b171ecbb7c5b96c7007830c9e9c7a4b | [
"MIT"
] | 15 | 2015-03-26T17:58:11.000Z | 2022-01-13T00:40:08.000Z | www/blog/migrations/0001_initial.py | zsoobhan/prometheus | a255740a9b171ecbb7c5b96c7007830c9e9c7a4b | [
"MIT"
] | 2 | 2019-08-28T19:43:16.000Z | 2020-01-14T05:07:54.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='BlogEntry',
fields=[
('i... | 42.035714 | 188 | 0.56712 |
1c009d44cedf7a64045ccd9484b20d02d17e4b4a | 1,568 | py | Python | app/auth/views.py | Carolwanzuu/pitch_app | accd92963cbedb39c53bef5f1851dc11a4ff743a | [
"MIT"
] | null | null | null | app/auth/views.py | Carolwanzuu/pitch_app | accd92963cbedb39c53bef5f1851dc11a4ff743a | [
"MIT"
] | null | null | null | app/auth/views.py | Carolwanzuu/pitch_app | accd92963cbedb39c53bef5f1851dc11a4ff743a | [
"MIT"
] | null | null | null | from flask import render_template,redirect, url_for, flash, request
from ..models import User
from .forms import LoginForm,RegistrationForm
from . import auth
from ..import db
from ..email import mail_message
from flask_login import login_user,logout_user, login_required
@auth.route('/register',methods = ["GET","POST"... | 34.086957 | 105 | 0.697066 |
1c00b77161cac89577f52a3d3713dcb56c6c1565 | 916 | py | Python | python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-slack/dagster_slack_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import json
from dagster_slack import slack_resource
from mock import patch
from dagster import ModeDefinition, execute_solid, solid
@patch("slack_sdk.WebClient.api_call")
def test_slack_resource(mock_api_call):
@solid(required_resource_keys={"slack"})
def slack_solid(context):
assert context.resour... | 27.757576 | 96 | 0.644105 |
1c00c90decdbc520b3c8b8dba9f8c28b67c0f196 | 4,847 | py | Python | experiments/ashvin/vae/reacher2d/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/reacher2d/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/reacher2d/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.multitask.multitask_env import MultitaskToFlatEnv
from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.mujoco.pusher2d import Pusher2DEnv
from rlkit.envs.wrappers import NormalizedBoxEnv
from rlkit.exploration_strategies.base import (
PolicyWrappedWithExplorationStrategy... | 33.19863 | 96 | 0.660615 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.