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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03ce80f14693f47df40b909f6f548c18d1356dcd | 1,494 | py | Python | other/two_sum.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | other/two_sum.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | other/two_sum.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 31.125 | 107 | 0.692771 |
03ce9820c05ba7bbdb7dbb40e2854ac07fd825e5 | 1,390 | py | Python | tool/GenerateIncludesList.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | tool/GenerateIncludesList.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | tool/GenerateIncludesList.py | Naftoreiclag/Cpp-Project-Template | 6471f05266d01365f545062272ba9f403119c763 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 James Fong
#
# 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 i... | 35.641026 | 76 | 0.715827 |
03cea4b7f3390b17ba8dbd4c7aee9c1d62d0723c | 2,039 | py | Python | tests/test_pitch.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | tests/test_pitch.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | tests/test_pitch.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | import unittest
from flask_login import current_user
from app import db
from app.models import User,Pitch
class TestPitch(unittest.TestCase):
'''
class facilitates the creation of test units to test Pitch class behavior
'''
def setUp(self):
'''
function runs before every test case
... | 33.983333 | 247 | 0.666994 |
03ceb0b6e019ecba5d6a23be7dd791e978329e4a | 513 | py | Python | terrascript/resource/vmware/vmc.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/vmware/vmc.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/vmware/vmc.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/vmware/vmc.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:30:35 UTC)
import terrascript
class vmc_cluster(terrascript.Resource):
pass
class vmc_public_ip(terrascript.Resource):
pass
class vmc_sddc(terrascript.Resource):
pass
class vmc_site_recovery(terrascri... | 15.545455 | 73 | 0.727096 |
03cebc3da16a276cad16b76b4fe1b6635aab871c | 3,119 | py | Python | tests/test_chi_landmark_commission.py | danielahuang/city-scrapers | 711d1995f59100793e771068a6f5d9149e773412 | [
"MIT"
] | null | null | null | tests/test_chi_landmark_commission.py | danielahuang/city-scrapers | 711d1995f59100793e771068a6f5d9149e773412 | [
"MIT"
] | null | null | null | tests/test_chi_landmark_commission.py | danielahuang/city-scrapers | 711d1995f59100793e771068a6f5d9149e773412 | [
"MIT"
] | null | null | null | from datetime import date, time
import pytest
from tests.utils import file_response
from city_scrapers.spiders.chi_landmark_commission import ChiLandmarkCommissionSpider
test_response = file_response(
'files/chi_landmark_commission_landmarks_commission.html',
'https://www.cityofchicago.org/city/en/depts/dcd/... | 32.831579 | 132 | 0.679705 |
03cee32b25573c317c458700932f6a00621fd19c | 6,648 | py | Python | simulation/util.py | vipulharsh/Fulcrum | 36153c14b3704b026ebbb0da28ad040e87cb8cb8 | [
"Apache-2.0"
] | null | null | null | simulation/util.py | vipulharsh/Fulcrum | 36153c14b3704b026ebbb0da28ad040e87cb8cb8 | [
"Apache-2.0"
] | null | null | null | simulation/util.py | vipulharsh/Fulcrum | 36153c14b3704b026ebbb0da28ad040e87cb8cb8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013 The Regents of The University California
#
# 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 applicab... | 41.55 | 128 | 0.698857 |
03cf16626e9c3554547d75f50b2df8a9137a0749 | 225 | py | Python | capnpy/convert_case.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 45 | 2016-10-28T10:16:07.000Z | 2022-03-06T20:16:57.000Z | capnpy/convert_case.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 42 | 2016-12-20T18:10:53.000Z | 2021-09-08T12:29:04.000Z | capnpy/convert_case.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 21 | 2017-02-28T06:39:15.000Z | 2021-09-07T05:30:46.000Z | import re
# http://stackoverflow.com/a/1176023/1046372
A = re.compile('(.)([A-Z][a-z]+)')
B = re.compile('([a-z0-9])([A-Z])')
def from_camel_case(name):
s1 = A.sub(r'\1_\2', name)
return B.sub(r'\1_\2', s1).lower()
| 22.5 | 44 | 0.577778 |
03cf2c2345151ae4cd0c8d47647aa206268f9fb8 | 424 | py | Python | color_scheme/manager/setup.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | 1 | 2021-11-01T09:14:46.000Z | 2021-11-01T09:14:46.000Z | color_scheme/manager/setup.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | null | null | null | color_scheme/manager/setup.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name='manage-color',
version='0.6.0',
description='preview color schemes in your terminal and setup',
author='tetutaro',
author_email='tetsutaro.maruyama@gmail.com',
url='https://github.com/tetutaro/dotfiles/color_scheme',
license='MIT',
packages=['ma... | 26.5 | 67 | 0.679245 |
03cf6ed93b0c63b70898cfaff2e8d0352bea6482 | 5,167 | py | Python | apps/logs/logic/attempt_import.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/logs/logic/attempt_import.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/logs/logic/attempt_import.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | import logging
import os
import traceback
from django.conf import settings
from django.db.transaction import atomic
from logs.logic.data_import import import_counter_records
from logs.models import OrganizationPlatform, ImportBatch
from nigiri.client import Sushi5Client, SushiException, SushiError
from sushi.models i... | 39.442748 | 95 | 0.663635 |
03cf6edc380c142ab1867e15988322839ad719c8 | 5,104 | py | Python | asposewordscloud/models/requests/get_footnote_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/get_footnote_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/get_footnote_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_footnote_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a ... | 43.254237 | 127 | 0.642829 |
03cf6f107c1c5589522d7be4946562a466740b0e | 9,431 | py | Python | tensorflow/contrib/estimator/python/estimator/export.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/estimator/python/estimator/export.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/estimator/python/estimator/export.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.102679 | 174 | 0.756335 |
03cf70df1c8aeaed1552a04f09595265a903946e | 58,332 | py | Python | lib/matplotlib/figure.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | lib/matplotlib/figure.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/figure.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | """
The figure module provides the top-level
:class:`~matplotlib.artist.Artist`, the :class:`Figure`, which
contains all the plot elements. The following classes are defined
:class:`SubplotParams`
control the default spacing of the subplots
:class:`Figure`
top level container for all plot elements
"""
from... | 33.894248 | 79 | 0.569893 |
03cf8242299594c661c0f17efe30da7b6fb87e71 | 38,004 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.039638 | 613 | 0.671219 |
03cfc337e93e9bb09107eacc07dbd859210f58cf | 42,862 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 84.043137 | 3,551 | 0.831109 |
03cfd5ad1b48d97fdc159908d31f558dbcc38bf9 | 21,681 | py | Python | openstack/tests/unit/baremetal/v1/test_node.py | infonova/openstacksdk | 3cf6730a71d8fb448f24af8a5b4e82f2af749cea | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/baremetal/v1/test_node.py | infonova/openstacksdk | 3cf6730a71d8fb448f24af8a5b4e82f2af749cea | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/baremetal/v1/test_node.py | infonova/openstacksdk | 3cf6730a71d8fb448f24af8a5b4e82f2af749cea | [
"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
# distributed under t... | 40.601124 | 77 | 0.631382 |
03d00faaf556edd41087fb6cfba7c65d46a9aff3 | 11,019 | py | Python | main/main.py | kepelrs/simon_kivy | 3116595676eb82411a739a8b0a6a1d90e62ba146 | [
"MIT"
] | 1 | 2021-07-21T02:36:50.000Z | 2021-07-21T02:36:50.000Z | main/main.py | kepelrs/simon_kivy | 3116595676eb82411a739a8b0a6a1d90e62ba146 | [
"MIT"
] | null | null | null | main/main.py | kepelrs/simon_kivy | 3116595676eb82411a739a8b0a6a1d90e62ba146 | [
"MIT"
] | 1 | 2021-01-26T14:03:58.000Z | 2021-01-26T14:03:58.000Z | # import os
# os.environ["KIVY_WINDOW"] = "sdl2"
# uncomment the above lines to run on raspberrypi like it runs on windows.
import kivy
kivy.require('1.9.1')
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.clock import Clock
from time import sleep, time
from random import randint
from functo... | 32.408824 | 87 | 0.588166 |
03d0163037b3ffb3243f9f7b36c80a6e4a2647ef | 1,098 | py | Python | py/cidoc_crm_types/entities/e66_formation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/entities/e66_formation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/entities/e66_formation.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from .e63_beginning_of_existence import E63BeginningofExistence
from .e7_activity import E7Activity
from dataclasses import dataclass
@dataclass
class E66Formation(E63BeginningofExistence, E7Activity):
"""
Scope note:
This class comprises events that result in the formation of a formal or informal E74 Group of p... | 40.666667 | 393 | 0.784153 |
03d01b995b6859c83e879ffb9f8969f1840d0cd9 | 951 | py | Python | login_system/data_admin.py | Unicorn-Code-Inc/PyLogin | 3b8ce697f633423278e1a8969f56bf278860b8ca | [
"MIT"
] | 1 | 2020-12-31T01:13:34.000Z | 2020-12-31T01:13:34.000Z | login_system/data_admin.py | Unicorn-Code-Inc/PyLogin | 3b8ce697f633423278e1a8969f56bf278860b8ca | [
"MIT"
] | null | null | null | login_system/data_admin.py | Unicorn-Code-Inc/PyLogin | 3b8ce697f633423278e1a8969f56bf278860b8ca | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from sys import path
from admintype import AdminType
@dataclass
class Admin:
""" A class representing an admin """
firstname: str
lastname: str
username: str
age: str
password: str
type: AdminType
def data_to_dict(self) -> dic... | 21.613636 | 72 | 0.533123 |
03d077f22e9d45e2e1ede2d994dfc99144338a27 | 4,022 | py | Python | alipay/aop/api/request/ZhimaCreditEpDossierCourtassessSubmitRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/ZhimaCreditEpDossierCourtassessSubmitRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/ZhimaCreditEpDossierCourtassessSubmitRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaCreditEpDossierCourtassessSubmitModel import ZhimaCreditEpDossierCourtassessSubmitModel
class ZhimaCreditEpDossierCourtassessSu... | 27.737931 | 148 | 0.648931 |
03d07e0479ec9a2f385b354e6eaa5757efb5d761 | 1,959 | py | Python | src/test/py/ltprg/game/synthetic_nom_ref/network_components.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | 11 | 2017-08-03T15:42:19.000Z | 2021-02-04T12:43:35.000Z | src/test/py/ltprg/game/synthetic_nom_ref/network_components.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | null | null | null | src/test/py/ltprg/game/synthetic_nom_ref/network_components.py | forkunited/ltprg | 4e40d3571d229023df0f845c68643024e04bc202 | [
"MIT"
] | 1 | 2021-02-04T12:43:37.000Z | 2021-02-04T12:43:37.000Z | import torch
import torch.nn as nn
class MLP(nn.Module):
def __init__(self, in_sz, h_szs, out_sz,
hiddens_nonlinearity, final_nonlinearity):
# in_sz (int, input sz)
# h_szs (list of hidden layer szs)
# out_sz (int, output sz)
# hiddens_nonlinearity ('relu', 'tanh')
# final_nonlinea... | 29.681818 | 76 | 0.684022 |
03d081509565ad9f6411b9a607a7f7487ffb4bef | 12,571 | py | Python | dataset.py | Algue-Rythme/GAT-Skim-Gram | e6e9db5a936e87a2adfdf81a1f00d952d800d1c8 | [
"Apache-2.0"
] | 1 | 2021-10-30T23:19:57.000Z | 2021-10-30T23:19:57.000Z | dataset.py | Algue-Rythme/GAT-Skim-Gram | e6e9db5a936e87a2adfdf81a1f00d952d800d1c8 | [
"Apache-2.0"
] | null | null | null | dataset.py | Algue-Rythme/GAT-Skim-Gram | e6e9db5a936e87a2adfdf81a1f00d952d800d1c8 | [
"Apache-2.0"
] | null | null | null | import itertools
from itertools import chain
from itertools import product
import os
from collections import defaultdict
import numpy as np
import tensorflow as tf
import tensorflow_datasets.public_api as tfds
def standardize_features(features):
mean = tf.math.reduce_mean(features, axis=0, keepdims=True)
std ... | 43.49827 | 117 | 0.652136 |
03d085720b2912d5aa9dc60914ea4a2290b1ffac | 25,210 | py | Python | species/util/data_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/util/data_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/util/data_util.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | """
Utility functions for data processing.
"""
from typing import Optional, List
import h5py
import numpy as np
from typeguard import typechecked
from scipy.interpolate import griddata
def update_sptype(sptypes):
"""
Function to update a list with spectral types to two characters (e.g., M8, L3, or T1).
... | 36.430636 | 99 | 0.472194 |
03d0859ffdb89453a1313fffae52459828ebfc4f | 1,906 | py | Python | executor/src/transpiler/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 6 | 2020-09-29T09:03:04.000Z | 2022-03-14T06:52:25.000Z | executor/src/transpiler/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | null | null | null | executor/src/transpiler/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 4 | 2020-10-01T07:49:22.000Z | 2021-06-16T19:44:12.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "l... | 34.654545 | 116 | 0.731375 |
03d0a3a0c55816fd5e025d33722ef8306ee9b11c | 9,711 | py | Python | code/generation-model/dynamic_selection/decoders.py | Merterm/-Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | 5 | 2022-03-14T15:52:09.000Z | 2022-03-30T11:42:47.000Z | code/generation-model/dynamic_selection/decoders.py | Merterm/Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | null | null | null | code/generation-model/dynamic_selection/decoders.py | Merterm/Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | null | null | null | from codecs import EncodedFile
import torch.nn as nn
from torch import Tensor
import torch
from helpers import freeze_params, ConfigurationError, subsequent_mask, uneven_subsequent_mask
from transformer_layers import PositionalEncoding, \
TransformerDecoderLayer, TransformerEncoderLayer
import random
class Decode... | 34.806452 | 94 | 0.589126 |
03d0a585bccb18688c4a5c7982f91a60d109d612 | 9,570 | py | Python | stable_baselines/her/experiment/train.py | jfsantos/stable-baselines | 5bd4ffa98e364b9e8e8b4e64bc2d1be9b6e4897a | [
"MIT"
] | null | null | null | stable_baselines/her/experiment/train.py | jfsantos/stable-baselines | 5bd4ffa98e364b9e8e8b4e64bc2d1be9b6e4897a | [
"MIT"
] | null | null | null | stable_baselines/her/experiment/train.py | jfsantos/stable-baselines | 5bd4ffa98e364b9e8e8b4e64bc2d1be9b6e4897a | [
"MIT"
] | 1 | 2019-12-25T16:45:54.000Z | 2019-12-25T16:45:54.000Z | import os
import sys
from subprocess import CalledProcessError
import click
import numpy as np
import json
from mpi4py import MPI
from stable_baselines import logger
from stable_baselines.common import set_global_seeds, tf_util
from stable_baselines.common.mpi_moments import mpi_moments
import stable_baselines.her.ex... | 40.379747 | 118 | 0.667398 |
03d0d0531762389c4826c3597e75ac85cad82839 | 1,347 | py | Python | pyxtal_ml/descriptors/charge.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 11 | 2018-11-18T21:57:16.000Z | 2021-07-20T12:23:28.000Z | pyxtal_ml/descriptors/charge.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 34 | 2018-10-23T14:54:48.000Z | 2019-03-26T18:07:09.000Z | pyxtal_ml/descriptors/charge.py | qzhu2017/ML-Materials | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 3 | 2018-11-15T06:34:37.000Z | 2019-01-04T02:04:25.000Z | from pymatgen.core.structure import Structure
import numpy as np
from optparse import OptionParser
import os.path as op
from monty.serialization import loadfn
filename = op.join(op.dirname(__file__), 'element_charge.json')
ele_data = loadfn(filename)
class Charge(object):
'''
'''
def __init__(self, stru... | 28.659574 | 72 | 0.596882 |
03d0d1317578ace4a3d56aa6986d08d763d80bea | 2,216 | py | Python | tensorbay/opendataset/VOC2012Segmentation/loader.py | Hoteryoung/tensorbay-python-sdk | 53c34dd529c20ec69b34ddd348b5c8e74f4094d0 | [
"MIT"
] | 2 | 2021-08-23T08:30:15.000Z | 2021-08-30T03:18:41.000Z | tensorbay/opendataset/VOC2012Segmentation/loader.py | yyy624297803/tensorbay-python-sdk | 58cca7e16264c7ce7e3059a9dd974886b3abd917 | [
"MIT"
] | null | null | null | tensorbay/opendataset/VOC2012Segmentation/loader.py | yyy624297803/tensorbay-python-sdk | 58cca7e16264c7ce7e3059a9dd974886b3abd917 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=invalid-name, missing-module-docstring
import os
from ...dataset import Data, Dataset
from ...label import InstanceMask, SemanticMask
_SEGMENT_NAMES = ("train", "val")
DATASET_NAME = "VOC2012Segmentation"
def VOC2012... | 30.777778 | 99 | 0.601986 |
03d0dc708ff857d202392f648024c8b252a3f2d5 | 2,795 | py | Python | pdfmajor/utils/lzw.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 23 | 2019-01-13T23:32:24.000Z | 2021-07-08T04:29:15.000Z | pdfmajor/utils/lzw.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 3 | 2019-08-09T18:42:01.000Z | 2019-12-13T15:43:24.000Z | pdfmajor/utils/lzw.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 2 | 2020-01-09T11:18:20.000Z | 2020-03-24T06:02:30.000Z |
from io import BytesIO
from ..utils import int2byte
import logging
class CorruptDataError(Exception):
pass
## LZWDecoder
##
class LZWDecoder(object):
def __init__(self, fp):
self.fp = fp
self.buff = 0
self.bpos = 8
self.nbits = 9
self.table = None
self.prev... | 27.401961 | 78 | 0.421467 |
03d0dd950fd123b58b8fb4261ef8c47d36a535ca | 31,107 | py | Python | salt/states/pip_state.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/states/pip_state.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/states/pip_state.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Installation of Python Packages Using pip
=========================================
These states manage system installed python packages. Note that pip must be
installed for these states to be available, so pip states should include a
requisite to a pkg.installed state for the package which... | 33.592873 | 116 | 0.559778 |
03d0e16626aff10b74cb84a8e7e3489e19a37d06 | 4,500 | py | Python | ros/src/tl_detector/light_classification/tl_classifier.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 4 | 2020-03-30T02:10:33.000Z | 2021-01-13T14:22:01.000Z | ros/src/tl_detector/light_classification/tl_classifier.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 9 | 2020-09-26T00:55:09.000Z | 2022-03-12T00:22:36.000Z | ros/src/tl_detector/light_classification/tl_classifier.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 9 | 2020-03-30T02:11:52.000Z | 2020-04-05T02:15:08.000Z | import numpy as np
import os
import six.moves.urllib as urllib
import sys
import tarfile
import tensorflow as tf
import zipfile
import rospy
from collections import defaultdict
from io import StringIO
from PIL import Image
from .object_detection.utils import label_map_util
from .object_detection.utils import visuali... | 40.540541 | 132 | 0.706889 |
03d0ed0b9f5181441da1779fca470304f1619dda | 212 | py | Python | office365/graph/teams/teamMessagingSettings.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/teams/teamMessagingSettings.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/teams/teamMessagingSettings.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | from office365.runtime.client_value_object import ClientValueObject
class TeamMessagingSettings(ClientValueObject):
def __init__(self):
super().__init__()
self.allowUserEditMessages = True
| 23.555556 | 67 | 0.764151 |
03d14b0c99edbaa38616c8e6d60ccca92669ab49 | 350 | py | Python | src/polygon/PolyWrapper.py | markos373/MarketBot | 77b7b88c2c12b1d153f1f19893827aafdac2811b | [
"MIT"
] | 7 | 2020-01-23T16:14:50.000Z | 2022-01-03T16:04:11.000Z | src/polygon/PolyWrapper.py | markos373/MarketBot | 77b7b88c2c12b1d153f1f19893827aafdac2811b | [
"MIT"
] | 3 | 2020-03-04T00:06:35.000Z | 2020-03-24T21:01:06.000Z | src/polygon/PolyWrapper.py | markos373/MarketBot | 77b7b88c2c12b1d153f1f19893827aafdac2811b | [
"MIT"
] | 4 | 2020-04-04T01:28:12.000Z | 2021-09-26T22:25:41.000Z | import requests
ENDPOINT = "https://api.polygon.io/v1/last_quote/stocks/{}?apiKey={}"
class PolyWrapper:
def __init__(self,alpaca_api_key):
self.api_key = alpaca_api_key
def getLastQuote(self,ticker):
url = ENDPOINT.format(ticker,self.api_key)
data = requests.get(url).json()
r... | 29.166667 | 69 | 0.674286 |
03d14bb165328aeaa97bf92edbaf66a35751946c | 1,358 | py | Python | UnleashClient/api/metrics.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 1 | 2018-10-13T19:59:46.000Z | 2018-10-13T19:59:46.000Z | UnleashClient/api/metrics.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 27 | 2018-10-03T09:53:48.000Z | 2018-10-27T09:47:14.000Z | UnleashClient/api/metrics.py | ivanklee86/unleash-client | daa476537d38085516699a56830ef1f431ced5cf | [
"MIT"
] | 1 | 2018-10-12T16:09:07.000Z | 2018-10-12T16:09:07.000Z | import json
import requests
from UnleashClient.constants import REQUEST_TIMEOUT, APPLICATION_HEADERS, METRICS_URL
from UnleashClient.utils import LOGGER
# pylint: disable=broad-except
def send_metrics(url: str,
request_body: dict,
custom_headers: dict) -> bool:
"""
Attempts t... | 30.863636 | 94 | 0.639175 |
03d1504ca10eea48dd4c0f77b205b47556afa10e | 1,534 | py | Python | test/test_adult_symptom_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | test/test_adult_symptom_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | test/test_adult_symptom_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | import csv
import pytest
from smartva.symptom_prep import SymptomPrep
from smartva.data import adult_symptom_data
headers = ['sid']
headers.extend(['a4_06']) # alcohol amount
headers.extend(['a2_63_1'])
data = [
{'sid': 'lower_belly_pain', 'a2_63_1': '2'},
{'sid': 'heavy_alcohol', 'a4_06': '3'},
]
expected_r... | 26.448276 | 102 | 0.642112 |
03d19d0427a1a5415d1bcce91aac13594cff1def | 893 | py | Python | src/pest.py | wikilimo/mobile-pest-identification | 6539468212f51c058ad14d594078892441b5bbf6 | [
"CC0-1.0"
] | 12 | 2020-05-24T14:33:32.000Z | 2022-03-28T10:56:22.000Z | src/pest.py | wikilimo/mobile-pest-identification | 6539468212f51c058ad14d594078892441b5bbf6 | [
"CC0-1.0"
] | 2 | 2021-06-03T03:10:58.000Z | 2022-03-30T07:39:05.000Z | src/pest.py | wikilimo/mobile-pest-identification | 6539468212f51c058ad14d594078892441b5bbf6 | [
"CC0-1.0"
] | 4 | 2020-12-10T02:41:47.000Z | 2022-03-26T07:26:08.000Z | import utils
# Filter future deprecation warnings
utils.filterwarnings('ignore')
root = utils.Path("../ip102_v1.1")
model_dir = utils.Path("models/pest")
detector = utils.PestDetector(root=root, model_dir=model_dir)
# Preparing data and model with an optional quantization
detector.getdata(bs=32, num_workers=1, nois... | 29.766667 | 80 | 0.789474 |
03d1b59ead83c5d24a182d0961c63f41c3d1581e | 3,538 | py | Python | alipay/aop/api/domain/AlipayBossFncAntbudgetReturnModel.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/AlipayBossFncAntbudgetReturnModel.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/AlipayBossFncAntbudgetReturnModel.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 AlipayBossFncAntbudgetReturnModel(object):
def __init__(self):
self._amount = None
self._biz_budget_apply_code = None
self._biz_type = None
self._biz_uk_id = None
... | 30.5 | 93 | 0.603731 |
03d1e7ffcbc613e57393637ddd2976be2ef11bb9 | 372 | py | Python | func_tests/framework/utils/button_web_element.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/framework/utils/button_web_element.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/framework/utils/button_web_element.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from selenium.webdriver.remote.webelement import WebElement
class Button(WebElement):
def __init__(self, buttonWebElement):
super(Button, self).__init__(buttonWebElement.parent, buttonWebElement.id)
self.webElement = buttonWebElement
def is_enabled... | 28.615385 | 82 | 0.736559 |
03d23f42c8a605daaadc6f570087c90c37b49059 | 4,536 | py | Python | plotting/01u_plot_learning.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | 1 | 2022-03-17T15:46:25.000Z | 2022-03-17T15:46:25.000Z | plotting/01u_plot_learning.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | null | null | null | plotting/01u_plot_learning.py | MSchnei/MRI_segmentation_preparation_scripts | 02f65b584e09908247202fff57714b63ef44e7dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Compare classic, dense, denseExt U-Net at dr 0.05 with unweighted loss."""
import os
import numpy as np
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
from load_tfevents import func_load_event
# %% Set input parameters
# Set path to log dir... | 37.180328 | 92 | 0.671296 |
03d2444ccfc8941b7848210074c0acbe4ea5e945 | 3,190 | py | Python | src/uvm/comps/test.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-10-13T06:14:28.000Z | 2019-10-13T06:14:28.000Z | src/uvm/comps/test.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | null | null | null | src/uvm/comps/test.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-12-23T06:21:49.000Z | 2019-12-23T06:21:49.000Z | #
#------------------------------------------------------------------------------
# Copyright 2007-2011 Mentor Graphics Corporation
# Copyright 2007-2018 Cadence Design Systems, Inc.
# Copyright 2015-2018 NVIDIA Corporation
# Copyright 2019 Matthew Ballance
# All Rights Reserved Worldwide
#
# Licensed under the Apa... | 40.379747 | 79 | 0.677743 |
03d2a980db9f20c6e5f0ece822d2c9e7f8c61117 | 9,965 | py | Python | python/serving/src/bigdl/serving/client.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/serving/src/bigdl/serving/client.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/serving/src/bigdl/serving/client.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL Authors.
#
# 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 ... | 34.126712 | 98 | 0.579227 |
03d2aff09b046ebe0454cedfb0eab9f3b4f9fe27 | 11,586 | py | Python | sfp/tuning_curves.py | billbrod/spatial-frequency-preferences | 4a83fe209bbbf8130f297bcc6e17cb79b36006c2 | [
"MIT"
] | 3 | 2020-12-17T14:28:17.000Z | 2022-03-13T20:17:14.000Z | sfp/tuning_curves.py | billbrod/spatial-frequency-preferences | 4a83fe209bbbf8130f297bcc6e17cb79b36006c2 | [
"MIT"
] | null | null | null | sfp/tuning_curves.py | billbrod/spatial-frequency-preferences | 4a83fe209bbbf8130f297bcc6e17cb79b36006c2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""fit tuning curves to first level results
"""
import matplotlib as mpl
# we do this because sometimes we run this without an X-server, and this backend doesn't need
# one. We set warn=False because the notebook uses a different backend and will spout out a big
# warning to that effect; that's unnece... | 51.265487 | 103 | 0.621785 |
03d2bb7c1f08a95a90100444ca256afc425b4063 | 3,150 | py | Python | erpnext_ocr/tests/test_tesseract.py | loftwah/erpnext_ocr | a3d2f309c3760b9343dff8ca3193c0059e28928d | [
"MIT"
] | null | null | null | erpnext_ocr/tests/test_tesseract.py | loftwah/erpnext_ocr | a3d2f309c3760b9343dff8ca3193c0059e28928d | [
"MIT"
] | 2 | 2020-06-01T16:34:32.000Z | 2020-06-01T16:34:33.000Z | erpnext_ocr/tests/test_tesseract.py | loftwah/erpnext_ocr | a3d2f309c3760b9343dff8ca3193c0059e28928d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Monogramm and Contributors
# See license.txt
from __future__ import unicode_literals
import locale
import unittest
import os
import frappe
from erpnext_ocr.erpnext_ocr.doctype.ocr_read.ocr_read import read_document
class TestTesseract(unittest.TestCase):
def test_... | 38.414634 | 135 | 0.614603 |
03d2bff48c4604fdb886b74f9c3804c6eb986b46 | 936 | py | Python | somaticseq/vcfModifier/copy_TextFile.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | somaticseq/vcfModifier/copy_TextFile.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | somaticseq/vcfModifier/copy_TextFile.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
import argparse
import somaticseq.genomicFileHandler.genomic_file_handlers as genome
def run():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# Variant Call Type, i.e., snp or indel
parser.add_argument('-infile', '--input-file', type=st... | 28.363636 | 101 | 0.684829 |
03d2d41787d9b246b56760a0676ce6db0a3d34e2 | 9,277 | py | Python | zappa/util.py | enterstudio/Zappa | 95230480afb17428726c6054f1b9294ff3f6f85e | [
"MIT"
] | null | null | null | zappa/util.py | enterstudio/Zappa | 95230480afb17428726c6054f1b9294ff3f6f85e | [
"MIT"
] | null | null | null | zappa/util.py | enterstudio/Zappa | 95230480afb17428726c6054f1b9294ff3f6f85e | [
"MIT"
] | 1 | 2017-02-26T22:19:07.000Z | 2017-02-26T22:19:07.000Z | import calendar
import datetime
import durationpy
import fnmatch
import json
import os
import re
import requests
import shutil
import stat
import urlparse
##
# Settings / Packaging
##
def copytree(src, dst, symlinks=False, ignore=None):
"""
This is a contributed re-implementation of 'copytree' that
should... | 29.172956 | 118 | 0.621322 |
03d2dbe662ef0c1cd0c4c8646eadf76dd624a3dc | 3,259 | py | Python | feincms/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 17 | 2015-03-11T09:57:21.000Z | 2019-09-03T11:11:45.000Z | feincms/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | null | null | null | feincms/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 3 | 2015-07-07T06:33:11.000Z | 2020-01-29T15:45:49.000Z | from __future__ import absolute_import, unicode_literals
VERSION = (1, 18, 0)
__version__ = ".".join(map(str, VERSION))
class LazySettings(object):
def _load_settings(self):
from feincms import default_settings
from django.conf import settings as django_settings
for key in dir(default_se... | 32.59 | 79 | 0.646517 |
03d3333b34b85e70475aaa00559af62a1c4834ef | 33,082 | py | Python | monkeytype/stubs.py | deaglancrew/MonkeyType | d582ee3914f9eee1fdfb76a57bb9f4206e017ceb | [
"BSD-3-Clause"
] | 3,890 | 2017-12-14T05:53:56.000Z | 2022-03-31T17:34:58.000Z | monkeytype/stubs.py | deaglancrew/MonkeyType | d582ee3914f9eee1fdfb76a57bb9f4206e017ceb | [
"BSD-3-Clause"
] | 215 | 2017-12-14T19:24:24.000Z | 2022-03-23T21:35:07.000Z | monkeytype/stubs.py | deaglancrew/MonkeyType | d582ee3914f9eee1fdfb76a57bb9f4206e017ceb | [
"BSD-3-Clause"
] | 173 | 2017-12-14T19:12:43.000Z | 2022-03-23T16:04:31.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import asyncio
import collections
import enum
import inspect
import logging
import re
from abc import (
ABCMeta,
... | 39.430274 | 118 | 0.651381 |
03d33c782caac664ba656b654da72e641300b2b3 | 2,372 | py | Python | tests/nemo_text_processing/en/test_time.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2021-09-10T10:40:51.000Z | 2021-09-10T10:40:51.000Z | tests/nemo_text_processing/en/test_time.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | tests/nemo_text_processing/en/test_time.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2022-01-07T03:39:11.000Z | 2022-01-07T03:39:11.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. 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 appli... | 46.509804 | 111 | 0.778246 |
03d340c64ac1270b0ee6294df176f6c151518417 | 9,479 | py | Python | testing/old_tests/tst_algv3_s1600as_n0_101.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 2 | 2019-09-26T20:56:06.000Z | 2019-11-18T21:03:27.000Z | testing/old_tests/tst_algv3_s1600as_n0_101.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 6 | 2018-03-19T20:36:49.000Z | 2018-04-13T15:27:29.000Z | testing/old_tests/tst_algv3_s1600as_n0_101.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 5 | 2018-10-04T18:51:02.000Z | 2020-07-02T15:31:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from pyomo.environ import *
from pyomo.core.base import Constraint, Objective, Suffix, minimize
from pyomo.opt import ProblemFormat, SolverFactory
from nmpc_mhe.dync.MHEGenv2 import MheGen
from sample_mods.bfb.nob5_hi_t import bfb_dae
f... | 38.689796 | 118 | 0.570524 |
03d35b5707f6fd5cd00b4dec0d18bfe40ca982b2 | 2,515 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/update_channel_available_messages.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/update_channel_available_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/update_channel_available_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram 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... | 33.533333 | 103 | 0.638569 |
03d39d169c71b9288daddef95d6930427722cb06 | 741 | py | Python | keepassxc_pwned/log.py | sturmianseq/keepassxc-pwned | 40f97e1277b0c798c7709ffcafae54715ab4cfa6 | [
"MIT"
] | 26 | 2019-07-18T13:32:52.000Z | 2022-02-03T20:08:46.000Z | keepassxc_pwned/log.py | sturmianseq/keepassxc-pwned | 40f97e1277b0c798c7709ffcafae54715ab4cfa6 | [
"MIT"
] | 15 | 2019-10-02T09:31:56.000Z | 2021-08-24T23:43:20.000Z | keepassxc_pwned/log.py | sturmianseq/keepassxc-pwned | 40f97e1277b0c798c7709ffcafae54715ab4cfa6 | [
"MIT"
] | 3 | 2019-07-18T13:32:53.000Z | 2021-08-11T08:50:45.000Z | import sys
import logging
logger: logging.Logger = logging.getLogger("keepassxc_pwned")
def setup_logs(log_level: int = logging.INFO):
"""
Setup the global logger
This does not setup logs more than once.
"""
global logger
if logger.handlers:
return # logs have already been set up
... | 24.7 | 61 | 0.68691 |
03d3b3c05170d63e57203b7276c463f4118be2dd | 2,043 | py | Python | examples/py/gradient_decent.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 11 | 2020-09-07T09:29:01.000Z | 2022-01-09T10:16:39.000Z | examples/py/gradient_decent.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 2 | 2020-11-23T16:59:21.000Z | 2020-12-17T18:06:01.000Z | examples/py/gradient_decent.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 1 | 2020-11-19T15:09:53.000Z | 2020-11-19T15:09:53.000Z | from time import sleep # for delaying between iterations
import click # for cleaning the command line
import topogenesis as tg
import numpy as np
np.random.seed(0)
# create a step one moore neighbourhood
s = tg.create_stencil("von_neumann", 1)
# assign the arg-minimum function
s.function = tg.sfunc.argmi... | 21.967742 | 83 | 0.634361 |
03d3c12fac444b72a79c8660a5c2757bcca0f491 | 408 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/mcp4728_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/mcp4728_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/mcp4728_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import board
import busio
import adafruit_mcp4728
i2c = busio.I2C(board.SCL, board.SDA)
mcp4728 = adafruit_mcp4728.MCP4728(i2c)
mcp4728.channel_a.value = 65535 # Voltage = VDD
mcp4728.channel_b.value = int(65535 / 2) # VD... | 27.2 | 62 | 0.757353 |
03d3cefd8bb897e53dc299479a1a3fd11a8cf334 | 3,505 | py | Python | src/encoded/tests/test_schema_functional_characterization_experiment.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | null | null | null | src/encoded/tests/test_schema_functional_characterization_experiment.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | null | null | null | src/encoded/tests/test_schema_functional_characterization_experiment.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | null | null | null | import pytest
from datetime import datetime
@pytest.fixture
def functional_characterization_experiment_item(testapp, lab, award, cell_free):
item = {
'lab': lab['@id'],
'award': award['@id'],
'assay_term_name': 'STARR-seq',
'biosample_ontology': cell_free['uuid'],
'status':... | 39.829545 | 127 | 0.739515 |
03d3df5ea4b82f989e24355d2901979ed637ec8b | 14,789 | py | Python | st2common/tests/unit/test_purge_executions.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/tests/unit/test_purge_executions.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/tests/unit/test_purge_executions.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 47.860841 | 100 | 0.692745 |
03d3e584651a6b80a54cc25ae4456e848b2d42f3 | 1,261 | py | Python | monitoring/setup/monitoring_simple_object.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | monitoring/setup/monitoring_simple_object.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | monitoring/setup/monitoring_simple_object.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 48.5 | 79 | 0.513085 |
03d444d9df951c778426b6d458a3630383fb5d47 | 7,344 | py | Python | acore/tests/test_sampling_mechanisms.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 9 | 2020-03-17T10:38:28.000Z | 2022-03-10T20:05:11.000Z | acore/tests/test_sampling_mechanisms.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | null | null | null | acore/tests/test_sampling_mechanisms.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 1 | 2020-10-15T19:44:12.000Z | 2020-10-15T19:44:12.000Z | import sys
sys.path.append("..")
import pytest
import numpy as np
from models.sen_poisson import SenPoissonLoader
from models.toy_gmm import ToyGMMLoader
from scipy.stats import multivariate_normal, norm
def test__camelus_linc_sampling():
np.random.seed(7)
mean_instrumental = np.repeat(0, 7)
cov_instrum... | 44.509091 | 118 | 0.586465 |
03d44c5215283394ea42a8598f79b813fed198f6 | 1,169 | py | Python | 2021/11/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2021/11/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2021/11/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | from collections import deque
def generate_neighboors(x, y):
"""Generates all possible neighbors within the map"""
for nx in range(x-1, x+2):
for ny in range(y-1, y+2):
if (nx == x and ny == y) or nx < 0 or ny < 0 or nx >= len(octo) or ny >= len(octo[0]):
continue
... | 29.225 | 98 | 0.52438 |
03d49fdb6aa19be9ca16e80eb5a218712d77af8a | 1,716 | py | Python | partools/rl/main.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/rl/main.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/rl/main.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | from time import time
from importlib import reload
import partools.utils as u
from . import gl
@u.log_exeptions
def reqlist(**kwargs):
"""Performs multi threaded SQL queries on a given perimeter on an Oracle DB
See README.md for guidance
See partools/quickstart/reqlist.py for examples of use
"""
... | 26 | 79 | 0.634033 |
03d50a0fe742a77dc758b5465635c317736011cd | 3,198 | py | Python | backend/tests/models/test_mapbox.py | bayesimpact/tds-frontend | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 15 | 2018-05-08T23:54:38.000Z | 2020-03-07T20:46:37.000Z | backend/tests/models/test_mapbox.py | akegan/encompass | 85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2 | [
"Apache-2.0"
] | 297 | 2018-02-05T19:04:26.000Z | 2022-02-12T07:52:37.000Z | backend/tests/models/test_mapbox.py | bayesimpact/tds | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 6 | 2018-05-21T19:51:15.000Z | 2019-03-21T19:20:27.000Z | """Test MapBox API."""
import os
from backend.lib.utils.datatypes import Point
from backend.models import time
import mock
import requests
NEWPORT_RI = Point(**{'longitude': -71.312796, 'latitude': 41.49008})
CLEVELAND_OH = Point(**{'longitude': -81.695391, 'latitude': 41.499498})
class MockResponse:
"""Mock ... | 32.969072 | 91 | 0.631957 |
03d52823c735b0fd61b297bba7173660394f8711 | 2,409 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 39.491803 | 139 | 0.636779 |
03d57b3d9aec96f50f49bbe2823063c19cb356be | 11,389 | py | Python | modules/core/tools/includes.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/core/tools/includes.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/core/tools/includes.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | """
Common JS/CSS includes
Copyright: (c) 2010-2022 Sahana Software Foundation
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 limit... | 43.469466 | 139 | 0.568882 |
03d57b99f759211d854f1a15b5c8b944a772eb7d | 24,773 | py | Python | appengine/cr-buildbucket/test/search_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/cr-buildbucket/test/search_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/cr-buildbucket/test/search_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"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.
import datetime
import mock
from google.appengine.ext import ndb
from components import auth
from testing_utils import testing
from go.chromium.org.luci.b... | 32.25651 | 79 | 0.683405 |
03d57fc96e0f1c8196cbff9e814b67b3f3cd5e11 | 4,062 | py | Python | pymite/mite.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | 4 | 2016-09-25T17:25:41.000Z | 2019-12-28T06:25:10.000Z | pymite/mite.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | null | null | null | pymite/mite.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | 2 | 2017-09-23T14:55:59.000Z | 2018-10-28T09:18:14.000Z | # -*- coding: utf-8 -*-
# File: mite.py
""" mite api base module"""
__author__ = 'Otto Hockel'
__docformat__ = 'plaintext'
import json
import urllib.parse
import urllib.request as request
from pymite.utils import declassify, clean_dict
class MiteAPI(object):
""" wrap the mite api. """
def __init__(self,... | 29.867647 | 73 | 0.568193 |
03d5a1d4f50471492d4b588573cdaaece6dc665e | 16,156 | py | Python | mtr/sync/south_migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/south_migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/south_migrations/0001_initial.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Settings'
db.create_table(u'sync_settings', (
... | 73.436364 | 171 | 0.605534 |
03d5a6f217439a065ea7370eacaa56271943da32 | 4,172 | py | Python | simdisk.py | aleung12/manga | 5d2b4076592205b411ecc48881b00a512b468b86 | [
"MIT"
] | null | null | null | simdisk.py | aleung12/manga | 5d2b4076592205b411ecc48881b00a512b468b86 | [
"MIT"
] | null | null | null | simdisk.py | aleung12/manga | 5d2b4076592205b411ecc48881b00a512b468b86 | [
"MIT"
] | null | null | null | ### last changed: 08/28/2018
from astropy.io import fits
import numpy as np
import os, time, gc, sys, types
from dirs import *
def mkdisk(pos_angle_deg,inclination_deg,ext,dim,V_sys=0.,V_max=220.,h_rot=10.,sigma_cen=250.):
pos_angle = pos_angle_deg *np.pi/180
inclination = inclination_deg *np.pi/180
r... | 39.733333 | 128 | 0.551055 |
03d5b0d19c884e3aaf75d39087e8635918bc0fa1 | 6,269 | py | Python | sdk/core/azure-core/azure/core/pipeline/transport/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/core/azure-core/azure/core/pipeline/transport/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/pipeline/transport/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 38.937888 | 111 | 0.56899 |
03d60cb79e483e5c76aef4fd24ebe486ffad7df1 | 259 | py | Python | sog/bin/encrypt_pass.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | 1 | 2022-02-03T05:44:57.000Z | 2022-02-03T05:44:57.000Z | sog/bin/encrypt_pass.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | 1 | 2020-10-17T01:14:33.000Z | 2020-10-17T01:14:33.000Z | sog/bin/encrypt_pass.py | jnewblanc/sog | ed1ae5bd409bc3e64f204ed3180a5f06f28db731 | [
"CC0-1.0"
] | null | null | null | ''' Prompt for password and return encrypted string '''
import sys
sys.path.append('../')
import common.security # noqa: E402
prompt = "Password: "
password = input(prompt)
print("Encrypted password: {}".format(common.security.encrypt_password(password)))
| 25.9 | 82 | 0.733591 |
03d6351cf8c55ffae934d2ed563cac41d917e0fb | 930 | py | Python | alipay/aop/api/response/AlipayInsSceneTaskflowBatchFinishResponse.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/response/AlipayInsSceneTaskflowBatchFinishResponse.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/response/AlipayInsSceneTaskflowBatchFinishResponse.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.response.AlipayResponse import AlipayResponse
class AlipayInsSceneTaskflowBatchFinishResponse(AlipayResponse):
def __init__(self):
super(AlipayInsSceneTaskflowBatchFinishResponse, self).__init__()
self._task_flow_id_li... | 32.068966 | 114 | 0.717204 |
03d64cc3dfb298a97366318d80520bfb158c7cd0 | 114 | py | Python | python/p67.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p67.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p67.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | class Solution:
def addBinary(self, a: str, b: str) -> str:
return format(int(a, 2) + int(b, 2), "b")
| 28.5 | 49 | 0.552632 |
03d662da259d1a699b3b99031e00e4bde5f6395c | 2,074 | py | Python | orderbook_veinte/orderbook/views/asks.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/orderbook/views/asks.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/orderbook/views/asks.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | #Rest framework
from rest_framework.generics import mixins
from rest_framework.viewsets import GenericViewSet
from rest_framework.response import Response
#models
from orderbook_veinte.orderbook.models.Order import Orders
from django.db.models import Q
#serializers
from orderbook_veinte.orderbook.serializers import... | 28.027027 | 87 | 0.661041 |
03d690944cb1663630c1766a265ac45a3de87ecd | 1,390 | py | Python | retrobiocat_web/app/biocatdb/routes/contributions/contributor_sign_up.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/routes/contributions/contributor_sign_up.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/routes/contributions/contributor_sign_up.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.app.biocatdb import bp
from flask import render_template, flash, redirect, url_for, session, request, jsonify
from retrobiocat_web.app.biocatdb.model_forms import PaperInfo
from flask_security import roles_required, current_user
from retrobiocat_web.mongo.models.user_models import User, Role
from r... | 46.333333 | 91 | 0.799281 |
03d6930d8b084f8fe30ecae752fd02589d640de8 | 2,033 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_report_reason_geo_irrelevant.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_report_reason_geo_irrelevant.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_report_reason_geo_irrelevant.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram 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... | 31.765625 | 103 | 0.640433 |
03d6c1eba48e72edb951a9b2bf253544f2df9748 | 4,583 | py | Python | tests/swig/python/runtime/test_agent_function_conditions.py | twinkarma/FLAMEGPU2_dev | 733a6c2016c0fd15cd835c6bb2fcb6ded75c8d15 | [
"MIT"
] | null | null | null | tests/swig/python/runtime/test_agent_function_conditions.py | twinkarma/FLAMEGPU2_dev | 733a6c2016c0fd15cd835c6bb2fcb6ded75c8d15 | [
"MIT"
] | 4 | 2020-10-19T18:31:24.000Z | 2020-12-14T21:26:46.000Z | tests/swig/python/runtime/test_agent_function_conditions.py | twinkarma/FLAMEGPU2_dev | 733a6c2016c0fd15cd835c6bb2fcb6ded75c8d15 | [
"MIT"
] | null | null | null | import pytest
from unittest import TestCase
from pyflamegpu import *
AGENT_COUNT = 1000
MODEL_NAME = "Model"
AGENT_NAME = "Agent"
FUNCTION_NAME1 = "Function1"
FUNCTION_NAME2 = "Function2"
STATE1 = "Start"
STATE2 = "End"
STATE3 = "End2"
class TestAgentFunctionConditions(TestCase):
NullFn1 = """
FLAMEGPU... | 33.698529 | 98 | 0.60048 |
03d718fa3ee1f0f5e80f1f145c0c52eb454ff37a | 8,674 | py | Python | worker/android/adb_wrapper.py | ClaudioRizzo/JniFuzzerFramework | 520a85fe7c4fe348a0b62c32993bf3ae6e503598 | [
"MIT"
] | null | null | null | worker/android/adb_wrapper.py | ClaudioRizzo/JniFuzzerFramework | 520a85fe7c4fe348a0b62c32993bf3ae6e503598 | [
"MIT"
] | null | null | null | worker/android/adb_wrapper.py | ClaudioRizzo/JniFuzzerFramework | 520a85fe7c4fe348a0b62c32993bf3ae6e503598 | [
"MIT"
] | null | null | null | import subprocess
import os
import datetime
import time
from config import Config
def start_server():
c = Config()
return subprocess.run([c.adb, 'start-server'], stdout=subprocess.PIPE)
def kill_server():
c = Config()
return subprocess.run([c.adb, 'kill-server'], stdout=subprocess.PIPE)
def list_... | 36.445378 | 79 | 0.508531 |
03d724efbe88b39ec3b91734301bdb70a2632f58 | 27,606 | py | Python | tensorflow_similarity/models/similarity_model.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | tensorflow_similarity/models/similarity_model.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | tensorflow_similarity/models/similarity_model.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow Authors
#
# 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 ... | 39.493562 | 98 | 0.590451 |
03d7777172938bdf614787f159dccbed9fcbd3da | 2,399 | py | Python | test3/test_BooleanQuery.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | 5 | 2017-03-17T04:35:39.000Z | 2021-04-06T07:20:04.000Z | test3/test_BooleanQuery.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | null | null | null | test3/test_BooleanQuery.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | 1 | 2018-02-19T13:17:14.000Z | 2018-02-19T13:17:14.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 re... | 36.348485 | 84 | 0.621509 |
03d793fbbd195757165711c2d486f4fe89303742 | 30,045 | py | Python | girder_annotation/test_annotation/test_annotations_rest.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | girder_annotation/test_annotation/test_annotations_rest.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | girder_annotation/test_annotation/test_annotations_rest.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | import copy
import json
import struct
import pytest
from . import girder_utilities as utilities
from .test_annotations import makeLargeSampleAnnotation, sampleAnnotation, sampleAnnotationEmpty
pytestmark = pytest.mark.girder
try:
from girder_large_image import constants
from girder_large_image_annotation.mo... | 40.167112 | 96 | 0.550208 |
03d7a9f6cdda78f785635a6f91f6295bd91af6bf | 2,302 | py | Python | 20191109/wrong_code_practice.py | carriejiao2017/WorkReviews | 8e0df4b9aa6278b8f61e360d44b5b717151e084e | [
"MIT"
] | 1 | 2021-11-09T10:53:58.000Z | 2021-11-09T10:53:58.000Z | 20191109/wrong_code_practice.py | carriejiao2017/WorkReviews | 8e0df4b9aa6278b8f61e360d44b5b717151e084e | [
"MIT"
] | null | null | null | 20191109/wrong_code_practice.py | carriejiao2017/WorkReviews | 8e0df4b9aa6278b8f61e360d44b5b717151e084e | [
"MIT"
] | null | null | null | def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Sorts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print (wor... | 27.404762 | 86 | 0.706777 |
03d7b52beecaf308a1793609b42ba3b05b3bf44c | 3,076 | py | Python | tests/test_util.py | milkmilk2/dydx-python | 140aa8c3df1e8cd7323911efa16dd71d2ec07b38 | [
"Apache-2.0"
] | null | null | null | tests/test_util.py | milkmilk2/dydx-python | 140aa8c3df1e8cd7323911efa16dd71d2ec07b38 | [
"Apache-2.0"
] | null | null | null | tests/test_util.py | milkmilk2/dydx-python | 140aa8c3df1e8cd7323911efa16dd71d2ec07b38 | [
"Apache-2.0"
] | null | null | null | import pytest
import dydx.util as utils
import dydx.constants as consts
PRIVATE_KEY_1 = '0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d' # noqa: E501
PRIVATE_KEY_2 = '0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1' # noqa: E501
ADDRESS_1 = '0x90F8bf6A479f320ead074411a4B0e7944E... | 45.910448 | 175 | 0.742523 |
03d7c3bf429a13cb323e1009f0a1b4e277fc9960 | 2,111 | py | Python | lib/datasets/Jester.py | damo-cv/MotionRGBD | 3fef378604ef72672496178e0b57ac72b5155e65 | [
"MIT"
] | 6 | 2021-12-15T23:58:21.000Z | 2022-01-19T06:38:39.000Z | lib/datasets/Jester.py | zhoubenjia/MotionRGBD | d9c4308e4308192e186cab6fde6d8d4ba3d655ba | [
"MIT"
] | null | null | null | lib/datasets/Jester.py | zhoubenjia/MotionRGBD | d9c4308e4308192e186cab6fde6d8d4ba3d655ba | [
"MIT"
] | 2 | 2021-12-21T06:30:26.000Z | 2022-01-12T11:42:53.000Z | '''
Copyright (C) 2010-2021 Alibaba Group Holding Limited.
'''
import torch
from .base import Datasets
from torchvision import transforms, set_image_backend
import random, os
from PIL import Image
import numpy as np
import logging
import accimage
set_image_backend('accimage')
np.random.seed(123)
class JesterData(Data... | 38.381818 | 186 | 0.63477 |
03d7e2c47c82b69be37351c9ae1ef13841441182 | 1,432 | py | Python | libraries/mavlink/mavlink/share/pyshared/pymavlink/examples/flightmodes.py | HARSHAL-IITB/IITBQUAD | 17e00ed00f8a57335524374d12f447d045a42c6a | [
"MIT"
] | null | null | null | libraries/mavlink/mavlink/share/pyshared/pymavlink/examples/flightmodes.py | HARSHAL-IITB/IITBQUAD | 17e00ed00f8a57335524374d12f447d045a42c6a | [
"MIT"
] | null | null | null | libraries/mavlink/mavlink/share/pyshared/pymavlink/examples/flightmodes.py | HARSHAL-IITB/IITBQUAD | 17e00ed00f8a57335524374d12f447d045a42c6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
show changes in flight modes
'''
import sys, time, os
# allow import from the parent directory, where mavlink.py is
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
from optparse import OptionParser
parser = OptionParser("flightmodes.py [options]")
parser... | 27.018868 | 110 | 0.629888 |
03d7f92455b8aa4bef8a6d31d380d043f4792c87 | 11,678 | py | Python | recipes/windnoise/model/dc_crn.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | recipes/windnoise/model/dc_crn.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | recipes/windnoise/model/dc_crn.py | wangwei2009/speechbrain | ebbac4561a9c9101786e0ab0b1105017eb655fc8 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import os
import sys
# from show import show_params, show_model
import torch.nn.functional as F
from .conv_stft import ConvSTFT, ConviSTFT
from .complexnn import ComplexConv2d, ComplexConvTranspose2d, NavieComplexLSTM, complex_cat, ComplexBatchNorm
class DCCRN(nn.Module):
de... | 34.964072 | 120 | 0.515499 |
03d80553a3aa8fddae65b10550d1718f64637279 | 9,375 | py | Python | publish.py | mvexel/alsoslc | e0b49c48c97ee845f730394b312443daf0f97e8b | [
"MIT"
] | null | null | null | publish.py | mvexel/alsoslc | e0b49c48c97ee845f730394b312443daf0f97e8b | [
"MIT"
] | 7 | 2019-08-16T20:06:59.000Z | 2022-03-11T23:56:37.000Z | publish.py | mvexel/alsoslc | e0b49c48c97ee845f730394b312443daf0f97e8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Publish AlsoSLC"""
import sys
import os
from datetime import datetime
from distutils.dir_util import copy_tree
from random import random
import imghdr
from PIL import Image, IptcImagePlugin
from PIL.ExifTags import TAGS, GPSTAGS
from jinja2 import (
Environment,
FileSystemLoader,
... | 27.654867 | 103 | 0.56448 |
03d806fbdbcabfc413d31b178b25e7ce420dc2e1 | 816 | py | Python | botx/clients/methods/errors/messaging.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/clients/methods/errors/messaging.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/clients/methods/errors/messaging.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Definition for "messaging" error."""
from typing import NoReturn
from botx.clients.methods.base import BotXMethod
from botx.clients.types.http import HTTPResponse
from botx.exceptions import BotXAPIError
class MessagingError(BotXAPIError):
"""Error for raising when there is messaging error."""
message_te... | 26.322581 | 73 | 0.71201 |
03d80bd1272542c764315d21b93d16e9178645c2 | 2,014 | py | Python | examples/units_and_coordinates/AltAz_Coordinate_transform.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-07-02T13:01:42.000Z | 2020-08-27T20:05:31.000Z | examples/units_and_coordinates/AltAz_Coordinate_transform.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2020-05-11T13:38:56.000Z | 2020-05-11T13:38:56.000Z | examples/units_and_coordinates/AltAz_Coordinate_transform.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 6 | 2017-03-15T07:17:05.000Z | 2020-09-30T18:36:49.000Z | """
=======================================================
Converting between Helioprojective and AltAz Coordinate
=======================================================
How to find the Sun in the sky as viewed from a particular location.
"""
import astropy.units as u
from astropy.coordinates import AltAz, EarthLoca... | 50.35 | 90 | 0.594836 |
03d83864e7a0c3189daa1dcdc57b0775a24889ef | 148 | py | Python | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | 1 | 2021-12-11T11:26:14.000Z | 2021-12-11T11:26:14.000Z | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | from .arm import *
from .MAB import *
from .MAB_MC import *
from .mabplot import *
from .mabCutils import *
# TODO(Antares): Give hint to user here
| 21.142857 | 39 | 0.722973 |
03d85fedb08560d689d4f9f807f5d6141d64d037 | 1,323 | py | Python | ui/urls.py | obmarg/pypod | ede9aa4d8d47e2fe76682569121163c111a3ef7f | [
"BSD-2-Clause"
] | 3 | 2015-12-09T18:08:01.000Z | 2018-11-28T18:50:12.000Z | ui/urls.py | obmarg/pypod | ede9aa4d8d47e2fe76682569121163c111a3ef7f | [
"BSD-2-Clause"
] | null | null | null | ui/urls.py | obmarg/pypod | ede9aa4d8d47e2fe76682569121163c111a3ef7f | [
"BSD-2-Clause"
] | null | null | null |
import re
from views import Index, AddPodcast, RemovePodcast
from baseviews import File, Folder
class Url(object):
""" Object representing a URL """
def __init__( self, regexp, view ):
""" Constructor
Params:
regexp - String regular expression to match
view... | 37.8 | 101 | 0.573696 |
03d8baaa32a375e8f58c53d97d58e136da3d9ee8 | 1,084 | py | Python | py/1143. Longest Common Subsequence.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/1143. Longest Common Subsequence.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/1143. Longest Common Subsequence.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/longest-common-subsequence/
# Given two strings text1 and text2, return the length of their longest common
# subsequence. If there is no common subsequence, return 0.
# A subsequence of a string is a new string generated from the original string
# with some characters (can be none) del... | 37.37931 | 80 | 0.571956 |
03d8c8c887c2503754ee9034c3836c94fd4e6bec | 10,715 | py | Python | rosslt_msgs/srv/_get_value.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | rosslt_msgs/srv/_get_value.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | rosslt_msgs/srv/_get_value.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | # generated from rosidl_generator_py/resource/_idl.py.em
# with input from rosslt_msgs:srv\GetValue.idl
# generated code does not contain a copyright notice
# Import statements for member types
import rosidl_parser.definition # noqa: E402, I100
class Metaclass_GetValue_Request(type):
"""Metaclass of message '... | 35.716667 | 134 | 0.617079 |
03d8efcee2cd27cc48a355a3db0ffb4827f7770d | 612 | py | Python | Parsing/component4.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | Parsing/component4.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | Parsing/component4.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | from grammar_engine import GrammarEngine
from island_parser import IslandParser
def component4():
grammar_engine = GrammarEngine("component4.txt")
grammar = grammar_engine.grammar
generated_texts = []
for i in range(1):
text = grammar_engine.generate("origin")
generated_texts.append(text)
final_sen... | 26.608696 | 56 | 0.722222 |
03d91f4a1aa1eb0142977dd4d8db73d902809511 | 916 | py | Python | syndication/vars_plugins/run_vars.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 1 | 2018-07-11T20:20:21.000Z | 2018-07-11T20:20:21.000Z | syndication/vars_plugins/run_vars.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 46 | 2018-08-08T19:46:15.000Z | 2019-02-22T20:33:49.000Z | syndication/vars_plugins/run_vars.py | dani4571/FleetDeploymentReporting | 8b132a20fa3e9c4e4215feade79f689be6e4b364 | [
"Apache-2.0"
] | 7 | 2018-06-26T15:27:55.000Z | 2018-12-05T19:41:25.000Z | import uuid
from ansible.plugins.vars import BaseVarsPlugin
from ansible.inventory.host import Host
__metaclass__ = type
DOCUMENTATION = '''
vars: run_vars
version_added: "2.4"
short_description: Generates a unique id per run
description:
- Generates a uuid
- Vars are provided as run_... | 24.105263 | 69 | 0.59607 |
03d9225a3af33fd452564c59a10fdb800b2d111f | 791 | py | Python | durf_hq/durf_hq.py | dominikusbrian/durf_hq | ed1dded4aae34e1e5987170ec1aebba390d4c1e6 | [
"BSD-3-Clause"
] | 1 | 2021-06-15T06:12:31.000Z | 2021-06-15T06:12:31.000Z | durf_hq/durf_hq.py | dominikusbrian/durf_hq | ed1dded4aae34e1e5987170ec1aebba390d4c1e6 | [
"BSD-3-Clause"
] | 15 | 2021-06-15T06:22:50.000Z | 2021-08-05T01:57:59.000Z | durf_hq/durf_hq.py | dominikusbrian/durf_hq | ed1dded4aae34e1e5987170ec1aebba390d4c1e6 | [
"BSD-3-Clause"
] | 2 | 2021-06-15T02:59:08.000Z | 2021-06-21T02:35:10.000Z | """
durf_hq.py
The headquarter for all DURF projects @ NYUSH
Handles the primary functions
"""
def canvas(with_attribution=True):
"""
Placeholder function to show example docstring (NumPy format)
Replace this function and doc string for your own project
Parameters
----------
with_attributio... | 22.6 | 65 | 0.666245 |
03d94cf3ec77b10d52f83a4c3678812be520f669 | 25,103 | py | Python | chroma_api/utils.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_api/utils.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_api/utils.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import sys
import traceback
import logging
import itertools
from chroma_core.models.jobs import SchedulingError
import bisect
from collections import namedtuple
from d... | 41.355848 | 137 | 0.625503 |
03d95e9409c3543e1084e09337520200e182dbe2 | 71 | py | Python | eli-demo.py | eli-read-code/ReadCode-faker | c3ede6201b3b79951ebe09324f9a2a3affddef95 | [
"MIT"
] | null | null | null | eli-demo.py | eli-read-code/ReadCode-faker | c3ede6201b3b79951ebe09324f9a2a3affddef95 | [
"MIT"
] | null | null | null | eli-demo.py | eli-read-code/ReadCode-faker | c3ede6201b3b79951ebe09324f9a2a3affddef95 | [
"MIT"
] | null | null | null | from faker import Faker
fake = Faker(locale='zh-CN')
print(fake.city()) | 23.666667 | 28 | 0.732394 |
03d965f113676a4effc92b4c6aea93db0da6d9fc | 4,119 | py | Python | src/api/bkuser_core/tests/bkiam/test_converter.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/bkiam/test_converter.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/bkiam/test_converter.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 40.782178 | 115 | 0.415878 |
03d96a2cd8ab22a472a67f092e36224820405fa8 | 15,596 | py | Python | tensorflow/compiler/tests/depthwise_conv_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/depthwise_conv_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/depthwise_conv_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.989744 | 80 | 0.606502 |
03d98086ec46488e5ced23ce3066930a923340bb | 947 | py | Python | flydream/serialprotocol.py | dblanchet/pyfda | 594e9b4575b065fd16f2defc007e5100e5f11a26 | [
"Unlicense"
] | 1 | 2015-08-05T09:02:06.000Z | 2015-08-05T09:02:06.000Z | flydream/serialprotocol.py | dblanchet/pyfda | 594e9b4575b065fd16f2defc007e5100e5f11a26 | [
"Unlicense"
] | null | null | null | flydream/serialprotocol.py | dblanchet/pyfda | 594e9b4575b065fd16f2defc007e5100e5f11a26 | [
"Unlicense"
] | null | null | null |
# Supported sampling frequencies.
FREQ_1_HERTZ = b'\x00'
FREQ_2_HERTZ = b'\x01'
FREQ_4_HERTZ = b'\x02'
FREQ_8_HERTZ = b'\x03'
# Device capacity information.
EMPTY_ALTIMETER = 0x020000
FULL_ALTIMETER = 0x100000
# Serial commands.
COMMAND_UPLOAD = b'\x0F\xDA\x10\x00\xCA\03\x00'
COMMAND_SETUP_PREFIX = b'\x0F\xDA... | 27.057143 | 58 | 0.717001 |
03d99ee3f058cf0a0b8d6dd8363c36ebe06dfa92 | 28,692 | py | Python | git_common.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | git_common.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | git_common.py | wuyong2k/chromium_depot_tool | b80458a73a9f20d688adb10162fb3a9348081885 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 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.
# Monkeypatch IMapIterator so that Ctrl-C can kill everything properly.
# Derived from https://gist.github.com/aljungberg/626518
import multiprocessing.pool
... | 28.606181 | 80 | 0.66475 |
03d9b1ff0cd215619df4f61ea1e94e14e069c18f | 9,241 | py | Python | geomloss/examples/optimal_transport/plot_wasserstein_barycenters_1D.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | null | null | null | geomloss/examples/optimal_transport/plot_wasserstein_barycenters_1D.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | 1 | 2021-07-15T12:43:21.000Z | 2021-07-15T12:43:21.000Z | geomloss/examples/optimal_transport/plot_wasserstein_barycenters_1D.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | null | null | null | """
Wasserstein barycenters in 1D
==================================
Let's compute Wasserstein barycenters
with a Sinkhorn divergence,
using Eulerian and Lagrangian optimization schemes.
"""
##############################################
# Setup
# ---------------------
import numpy as np
import matplotlib.pyplot as ... | 35.542308 | 101 | 0.604047 |
03da265aa9045f6ea53c67965ffca846b3c92c13 | 2,182 | py | Python | autox/autox_server/feature_engineer/fe_target_encoding.py | fanghy06/AutoX | 0bad349ef1b047152e2608760fd5d197128be723 | [
"Apache-2.0"
] | 499 | 2021-07-27T02:57:58.000Z | 2022-03-28T12:08:27.000Z | autox/autox_server/feature_engineer/fe_target_encoding.py | anonymouslycn/AutoX | ca1045c5919b4d97f1e4c2d8c235f63f6ec5af31 | [
"Apache-2.0"
] | 9 | 2021-08-03T15:14:56.000Z | 2022-03-11T07:06:06.000Z | autox/autox_server/feature_engineer/fe_target_encoding.py | anonymouslycn/AutoX | ca1045c5919b4d97f1e4c2d8c235f63f6ec5af31 | [
"Apache-2.0"
] | 87 | 2021-07-27T01:13:02.000Z | 2022-03-29T02:14:09.000Z | import warnings
warnings.filterwarnings('ignore')
import time
from autox.autox_server.util import log
def fe_target_encoding(G_df_dict, G_data_info, G_hist, is_train, remain_time):
# 对G_df_dict['BIG']表做扩展特征
start = time.time()
log('[+] feature engineer, target encoding')
Id = G_data_info['target_id']... | 38.280702 | 96 | 0.601283 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.