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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3824622f3b98a6a911b517ef13f2ead5cf547243 | 4,075 | py | Python | experiments/vitchyr/icml2017/watermaze_memory/generate_ablation_figure_data.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/icml2017/watermaze_memory/generate_ablation_figure_data.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/icml2017/watermaze_memory/generate_ablation_figure_data.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | """
Generate data for ablation analysis for ICML 2017 workshop paper.
"""
import random
from torch.nn import functional as F
from rlkit.envs.pygame.water_maze import (
WaterMazeMemory,
)
from rlkit.exploration_strategies.ou_strategy import OUStrategy
from rlkit.launchers.launcher_util import (
run_experiment,... | 31.10687 | 70 | 0.586503 |
3824660c8a3aa634dfa705f744bfc6c99151417e | 78,850 | py | Python | tests/test_iot/test_iot.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_iot/test_iot.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_iot/test_iot.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import json
import sure # noqa
import boto3
from moto import mock_iot
from botocore.exceptions import ClientError
import pytest
def generate_thing_group_tree(iot_client, tree_dict, _parent=None):
"""
Generates a thing group tree given the input tree structure.
:p... | 39.583333 | 100 | 0.699087 |
3824804d50d40a4df68e49c996670e17713fa2f7 | 791 | py | Python | libra_client/lbrtypes/account_config/events/received_payment.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_config/events/received_payment.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_config/events/received_payment.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from libra_client.canoser import Struct, Uint64
from libra_client.move_core_types.identifier import Identifier
from libra_client.move_core_types.account_address import AccountAddress
from libra_client.move_core_types.move_resource import MoveResource
from libra_client.lbrtypes.account_config.constants.libra import LIBR... | 41.631579 | 90 | 0.79646 |
3824868aa7fd126eaec64313b95b70e4b95c6cd8 | 13,216 | py | Python | google_apputils/humanize.py | jeremydw/google-apputils-python | d47eab8b06a3d33163596c2439c1077e84488d1c | [
"Apache-2.0"
] | 1 | 2020-11-15T17:49:33.000Z | 2020-11-15T17:49:33.000Z | google_apputils/humanize.py | jeremydw/google-apputils-python | d47eab8b06a3d33163596c2439c1077e84488d1c | [
"Apache-2.0"
] | null | null | null | google_apputils/humanize.py | jeremydw/google-apputils-python | d47eab8b06a3d33163596c2439c1077e84488d1c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2008 Google Inc. All Rights Reserved.
"""Lightweight routines for producing more friendly output.
Usage examples:
'New messages: %s' % humanize.Commas(star_count)
-> 'New messages: 58,192'
'Found %s.' % humanize.Plural(error_count, 'error')
-> 'F... | 28.982456 | 78 | 0.673577 |
38248fcf151becfd082014b745aaba75cdb4651e | 1,043 | py | Python | api_env/app/core/migrations/0004_recipe.py | AnuragTimilsina/recipe-app-api | 77ed8c0aa490727dd4c54fcfb698426510c8a48d | [
"MIT"
] | null | null | null | api_env/app/core/migrations/0004_recipe.py | AnuragTimilsina/recipe-app-api | 77ed8c0aa490727dd4c54fcfb698426510c8a48d | [
"MIT"
] | null | null | null | api_env/app/core/migrations/0004_recipe.py | AnuragTimilsina/recipe-app-api | 77ed8c0aa490727dd4c54fcfb698426510c8a48d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-06-14 06:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.965517 | 118 | 0.604027 |
3824a1207fa505fc0fa6a3dd92915fe63313b243 | 5,801 | py | Python | src/examples/lossuser/loss_user.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/lossuser/loss_user.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/lossuser/loss_user.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 11/9/21 2:41 PM
# @Author : Jiyuan Wang
# @File : loss_user.py
import pandas as pd
import numpy as np
import matplotlib.pylab as plt
import seaborn as sns
import os
from sklearn.model_selection import learning_curve, train_test_split, GridSearchCV
from skl... | 37.915033 | 115 | 0.680055 |
3824a5cd5c4c7604ef51f317f56585942f813f30 | 12,088 | py | Python | plugins/aea-cli-benchmark/aea_cli_benchmark/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/utils.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.
# ... | 31.894459 | 131 | 0.64502 |
3824c3fa349c5ca99524e5e390aeaf757d392e28 | 2,782 | py | Python | scout/choices.py | theteam/django-scout | 75d6b708d4c65cca05e8f1678df40543f6e81b0d | [
"BSD-3-Clause"
] | null | null | null | scout/choices.py | theteam/django-scout | 75d6b708d4c65cca05e8f1678df40543f6e81b0d | [
"BSD-3-Clause"
] | null | null | null | scout/choices.py | theteam/django-scout | 75d6b708d4c65cca05e8f1678df40543f6e81b0d | [
"BSD-3-Clause"
] | 1 | 2022-03-20T04:22:41.000Z | 2022-03-20T04:22:41.000Z | from django.utils.translation import ugettext_lazy as _
HTTP_200 = 200
HTTP_201 = 201
HTTP_202 = 202
HTTP_203 = 203
HTTP_204 = 204
HTTP_205 = 205
HTTP_206 = 206
HTTP_301 = 301
HTTP_302 = 302
HTTP_303 = 303
HTTP_304 = 304
HTTP_305 = 305
HTTP_307 = 307
HTTP_400 = 400
HTTP_401 = 401
HTTP_403 = 403
HTTP_404 = 404
HTTP_405... | 34.345679 | 73 | 0.655643 |
3824d8a53c5c4cc1ea24e85ab503eb092ca4ddb0 | 18,991 | py | Python | river/rules/amrules.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/rules/amrules.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/rules/amrules.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import collections
import functools
import io
import math
import typing
from river import anomaly, base, drift, linear_model, stats, tree
from ..tree.split_criterion import VarianceRatioSplitCriterion
from ..tree.splitter.base import Splitter
from ..tree.splitter.nominal_splitter_reg import NominalSplitterReg
from .b... | 34.591985 | 98 | 0.612027 |
3824e962e6eafb32c6afe8fed0ba9102414ae4d6 | 876 | py | Python | examples/basics/linear_regression.py | lfwin/tflearn | 06015c73a4d9ad9edafeb9b61ee9004fd715f69e | [
"MIT"
] | 20 | 2016-04-04T06:15:43.000Z | 2021-04-18T18:40:30.000Z | examples/basics/linear_regression.py | NLPDev/tflearn | 77436978c62124bd91ef739dc77c9ea58277c779 | [
"MIT"
] | null | null | null | examples/basics/linear_regression.py | NLPDev/tflearn | 77436978c62124bd91ef739dc77c9ea58277c779 | [
"MIT"
] | 9 | 2016-04-26T05:31:47.000Z | 2019-08-24T18:12:21.000Z | """ Linear Regression Example """
from __future__ import absolute_import, division, print_function
import tflearn
# Regression data
X = [3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,7.042,10.791,5.313,7.997,5.654,9.27,3.1]
Y = [1.7,2.76,2.09,3.19,1.694,1.573,3.366,2.596,2.53,1.221,2.827,3.465,1.65,2.904,2.42,2... | 35.04 | 96 | 0.666667 |
3824efa3c87f64498f62b01b97ebd83ca17f8f49 | 118 | py | Python | opacus/version.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 958 | 2020-08-28T15:34:15.000Z | 2022-03-29T20:58:14.000Z | opacus/version.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 330 | 2020-08-28T07:11:02.000Z | 2022-03-31T19:16:10.000Z | opacus/version.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 161 | 2020-08-28T06:12:10.000Z | 2022-03-31T07:47:04.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
__version__ = "0.14.0"
| 23.6 | 70 | 0.720339 |
382524e275c140a498ae59191441d4aa7893b479 | 204 | py | Python | test/test.py | qiujiyan/ofpp | fd3362d2a082d502e88a1468b92c3f1092e23401 | [
"MIT"
] | null | null | null | test/test.py | qiujiyan/ofpp | fd3362d2a082d502e88a1468b92c3f1092e23401 | [
"MIT"
] | null | null | null | test/test.py | qiujiyan/ofpp | fd3362d2a082d502e88a1468b92c3f1092e23401 | [
"MIT"
] | null | null | null | import sys
sys.path.append("c:/Users/macbook/githubProject/ofpp/")
import Ofpp
workdir = r'C:/Users/macbook/githubProject/VortexTracking/data/case-oneCylinder'
mesh = Ofpp.FoamMesh(workdir+'/')
| 29.142857 | 81 | 0.745098 |
38253202f671b6d6a3e46132836f9871e03a3903 | 1,285 | py | Python | data/transcoder_evaluation_gfg/python/CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/CHECK_POSSIBLE_TRANSFORM_ONE_STRING_ANOTHER.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( s1 , s2 ) :
n = len ( s1 )
m = len ( s2 )
dp = ( [ [ False for i in range ( m + 1 ) ] for i in range ( ... | 31.341463 | 82 | 0.474708 |
382533f1cf2d6cf5152dc04b412abdaf241a5644 | 2,769 | py | Python | autoio-base/ioformat/tests/test_format.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | null | null | null | autoio-base/ioformat/tests/test_format.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 1 | 2022-02-15T19:35:14.000Z | 2022-02-15T19:35:14.000Z | autoio-base/ioformat/tests/test_format.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 13 | 2020-06-24T05:21:11.000Z | 2021-05-05T19:58:30.000Z | """
test ioformat._format functions
"""
import os
import ioformat
MAKO_PATH = os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'data')
INI_STR = (
'! From Theory\n'
'A + B = C + D 1.00 0.00 0.00 \n'
' PLOG / 0.01 3.0E+8 2.0 100.0\n'
'\n'
'A + D = E 2.00 0.00 0.00 \... | 27.969697 | 79 | 0.492597 |
382536927bd0aca25d887935de1eb6e7771870e3 | 2,647 | py | Python | src/modules/host/geo.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/host/geo.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/host/geo.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 29.087912 | 80 | 0.363808 |
38253b3bc8219ac1629e089b3010ca9a52cc6211 | 1,339 | py | Python | py/0350.intersection-of-two-arrays-ii.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0350.intersection-of-two-arrays-ii.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0350.intersection-of-two-arrays-ii.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=350 lang=python3
#
# [350] Intersection of Two Arrays II
#
# https://leetcode.com/problems/intersection-of-two-arrays-ii/description/
#
# algorithms
# Easy (51.95%)
# Likes: 2053
# Dislikes: 507
# Total Accepted: 467.2K
# Total Submissions: 899K
# Testcase Example: '[1,2,2,1]\n[2,2]'
#
# ... | 21.253968 | 78 | 0.643017 |
382544491314bc2c4d882f09ae207ad913945bcb | 144 | py | Python | iris_sdk/models/maps/tn_rate_centers_list.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/tn_rate_centers_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/tn_rate_centers_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class TnRateCentersListMap(BaseMap):
state = None
r_cs = None | 18 | 49 | 0.743056 |
3825544a9c0126b74b2c51953f4ec9233c9c2984 | 5,812 | py | Python | tests/parallel_test_suite.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | tests/parallel_test_suite.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | tests/parallel_test_suite.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | import sys
import math
import matplotlib.pyplot as plt
import torch
from timeit import default_timer as timer
import os
import json
from subprocess import PIPE, run
import numpy as np
import shutil
from datetime import datetime
import multiprocessing as mp
sys.path.append('./tests/python_test_utils')
imp... | 37.25641 | 181 | 0.597213 |
38255b5da9c08117084cfdf051cf2c93b8b77f8e | 2,728 | py | Python | earhart/skyfield_helpers.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | earhart/skyfield_helpers.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | earhart/skyfield_helpers.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | """
Data-getters:
get_hygdata: All stars in Hipparcos, Yale Bright Star, and Gliese catalogs
get_asterisms: Stellarium database asterisms
get_constellation_boundaries: IAU constellation boundaries
get_messier_data: The Messier catalog
All using data parsed from Eleanor Lutz's absolutely amazing
https:/... | 26.745098 | 78 | 0.703812 |
3825606fcd3b1d083f1b90b7eb75b07e6da88c33 | 1,974 | py | Python | tests/core/test_openapi.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 4,618 | 2015-08-06T18:17:02.000Z | 2022-03-31T10:03:07.000Z | tests/core/test_openapi.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 1,578 | 2015-07-30T09:47:41.000Z | 2022-03-31T13:12:50.000Z | tests/core/test_openapi.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 546 | 2015-07-30T10:31:35.000Z | 2022-03-31T12:44:32.000Z | import unittest
from unittest import mock
from cornice.service import get_services
from kinto.core.openapi import OpenAPI
from .support import BaseWebTest
class OpenAPITest(BaseWebTest, unittest.TestCase):
def setUp(self):
super(OpenAPITest, self).setUp()
self.request = mock.MagicMock()
... | 35.25 | 96 | 0.613982 |
3825a7aa8aba7c20ca58b8877bd47e3d26dc2de1 | 4,379 | py | Python | openbb_terminal/common/behavioural_analysis/finbrain_view.py | quincyhill/GamestonkTerminal | 7b374b76629a963cef9a22b41bc8acbef70e876a | [
"MIT"
] | null | null | null | openbb_terminal/common/behavioural_analysis/finbrain_view.py | quincyhill/GamestonkTerminal | 7b374b76629a963cef9a22b41bc8acbef70e876a | [
"MIT"
] | null | null | null | openbb_terminal/common/behavioural_analysis/finbrain_view.py | quincyhill/GamestonkTerminal | 7b374b76629a963cef9a22b41bc8acbef70e876a | [
"MIT"
] | null | null | null | """FinBrain View Module"""
__docformat__ = "numpy"
import logging
import os
from typing import Optional, List
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from openbb_terminal.config_terminal import theme
from openbb_terminal.common.behavioural_analysis import finbrain_model
from openb... | 30.409722 | 88 | 0.578443 |
3825c2c145ad2bfd10b318ea182c40c8a33468b2 | 1,558 | py | Python | robotcar/robotcar-dataset-sdk-3.1/python/image.py | Aniket-Gujarathi/d2-net | c716d37087390af04c8843452dadfa47a64cfbe2 | [
"BSD-3-Clause-Clear"
] | null | null | null | robotcar/robotcar-dataset-sdk-3.1/python/image.py | Aniket-Gujarathi/d2-net | c716d37087390af04c8843452dadfa47a64cfbe2 | [
"BSD-3-Clause-Clear"
] | null | null | null | robotcar/robotcar-dataset-sdk-3.1/python/image.py | Aniket-Gujarathi/d2-net | c716d37087390af04c8843452dadfa47a64cfbe2 | [
"BSD-3-Clause-Clear"
] | null | null | null | ################################################################################
#
# Copyright (c) 2017 University of Oxford
# Authors:
# Geoff Pascoe (gmp@robots.ox.ac.uk)
#
# This work is licensed under the Creative Commons
# Attribution-NonCommercial-ShareAlike 4.0 International License.
# To view a copy of this li... | 29.396226 | 93 | 0.604621 |
3825d72ba1ec011f5b36e6067b84fce497f1ee88 | 5,090 | py | Python | yolox/models/KLD_loss.py | junhai0428/YOLOX-OBB | 9f0d745b89ba6559e692ff06ba09b433b2f4594c | [
"Apache-2.0"
] | null | null | null | yolox/models/KLD_loss.py | junhai0428/YOLOX-OBB | 9f0d745b89ba6559e692ff06ba09b433b2f4594c | [
"Apache-2.0"
] | null | null | null | yolox/models/KLD_loss.py | junhai0428/YOLOX-OBB | 9f0d745b89ba6559e692ff06ba09b433b2f4594c | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
class KLDloss(nn.Module):
def __init__(self, taf=1.0, reduction="none"):
super(KLDloss, self).__init__()
self.reduction = reduction
self.taf = taf
def forward(self, pred, target): # pred [[x,y,w,h,angle], ...]
assert pred.shape[0] == target.... | 44.649123 | 120 | 0.499411 |
382611c889ee6f6100da939fa280c5cc671bb29e | 1,925 | py | Python | python/oneflow/nn/modules/squeeze.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/squeeze.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/squeeze.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 30.555556 | 115 | 0.692468 |
38265831f0a285c5b351fb499677feaa72a83add | 9,207 | py | Python | rally/plugins/openstack/scenarios/vm/vmtasks.py | LorenzoBianconi/rally | 2bbd7ee590cca048fb4ad6a8eefc484989979ff8 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:09.000Z | 2021-09-29T02:16:09.000Z | rally/plugins/openstack/scenarios/vm/vmtasks.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-14T11:29:31.000Z | 2020-07-14T11:29:31.000Z | rally/plugins/openstack/scenarios/vm/vmtasks.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-02T01:33:48.000Z | 2020-07-02T01:33:48.000Z | # Copyright 2014: Rackspace UK
# 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... | 44.478261 | 79 | 0.578473 |
38266ac0aeb652ec52c9b86c8e69255a8ddb7dd4 | 329 | py | Python | probelib/tools/candidates.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | probelib/tools/candidates.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | probelib/tools/candidates.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | from probelib.gen import slide_through_fasta, to_fq_rec
from probelib.io.fastq import write_fq
def candidates(in_file: str,
out_file: str,
length: int,
overlap: int):
gen = slide_through_fasta(in_file, length, overlap)
gen = map(to_fq_rec, gen)
write_fq(out_fil... | 25.307692 | 55 | 0.650456 |
38266e54bceaa285bba53fefdd020615447168d2 | 7,659 | py | Python | ginga/web/pgw/PgMain.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/web/pgw/PgMain.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/ginga/web/pgw/PgMain.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | #
# PgMain.py -- web application threading help routines.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from __future__ import print_function
import sys, traceback
im... | 30.883065 | 83 | 0.564956 |
3826743410a4b220552c168291be14699643b989 | 3,498 | py | Python | tools/colt_layers.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | 6 | 2021-06-28T18:06:53.000Z | 2022-03-09T09:00:50.000Z | tools/colt_layers.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | null | null | null | tools/colt_layers.py | alessandrodepalma/oval-bab | 014b6ee5071508430c8e515bbae725306db68fe1 | [
"MIT"
] | 2 | 2021-06-28T18:06:13.000Z | 2021-09-03T11:24:26.000Z | import torch
import torch.nn as nn
from functools import reduce
class Conv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, dim=None):
super(Conv2d, self).__init__()
self.in_channels = in_channels
self.out_chan... | 26.70229 | 127 | 0.597198 |
38267d7cb8e1a4b8b9abe0010f4bfebdfbd86bd5 | 4,102 | py | Python | salt/utils/minion.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/utils/minion.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/utils/minion.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Utility functions for minions
'''
# Import Python Libs
from __future__ import absolute_import
import os
import threading
# Import Salt Libs
import salt.utils
import salt.payload
def running(opts):
'''
Return the running jobs on this minion
'''
ret = []
proc_dir = os.... | 27.904762 | 77 | 0.572891 |
3826926bfa764a6652af2252bfdb019dd8f35817 | 3,137 | py | Python | cyclonefw/core/utils.py | wenlaizhou/MAX-Framework | b865926ac16650fa9eb65b1a5a42ed892dd5dfc2 | [
"Apache-2.0"
] | null | null | null | cyclonefw/core/utils.py | wenlaizhou/MAX-Framework | b865926ac16650fa9eb65b1a5a42ed892dd5dfc2 | [
"Apache-2.0"
] | null | null | null | cyclonefw/core/utils.py | wenlaizhou/MAX-Framework | b865926ac16650fa9eb65b1a5a42ed892dd5dfc2 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018-2019 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 32.677083 | 119 | 0.658591 |
3826bc03732c3eab6c3da592eafbb7bc0c7c3e3a | 9,144 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_multiapi.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null |
# coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from devtools_testutils import recorded_by_proxy
from testcase import FormRecognizerTest
from preparers import FormRecogni... | 50.241758 | 153 | 0.729549 |
3826d0979496683eb8acdb34c5ac632579fd49f0 | 5,382 | py | Python | setup.py | openedx/edx-repo-health | c27f906fdb0ddb3a7b91b2eba999219989ff8442 | [
"Apache-2.0"
] | null | null | null | setup.py | openedx/edx-repo-health | c27f906fdb0ddb3a7b91b2eba999219989ff8442 | [
"Apache-2.0"
] | 18 | 2022-01-07T00:10:47.000Z | 2022-03-25T00:13:08.000Z | setup.py | openedx/edx-repo-health | c27f906fdb0ddb3a7b91b2eba999219989ff8442 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Package metadata for repo_health.
"""
import os
import re
import sys
from setuptools import setup
def get_version(file_path):
"""
Extract the version string from the file at the given relative path fragments.
"""
filename = os.path.join(os.path.dirname(__file__), file_path)
... | 41.083969 | 131 | 0.657562 |
3826d5643bb9ec9400257e56a3dd0ea6969a4656 | 12,093 | py | Python | salt/modules/saltutil.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2016-07-07T18:43:05.000Z | 2016-07-07T18:43:05.000Z | salt/modules/saltutil.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/modules/saltutil.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2020-12-04T11:28:06.000Z | 2020-12-04T11:28:06.000Z | '''
The Saltutil module is used to manage the state of the salt minion itself. It
is used to manage minion modules as well as automate updates to the salt minion
:depends: - esky Python module for update functionality
'''
# Import python libs
import os
import hashlib
import shutil
import signal
import logging
impor... | 29.210145 | 79 | 0.590011 |
3826d5bd7a65dc03ae6641472bbc603c708c8f65 | 6,488 | py | Python | asposewordscloud/models/requests/insert_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/insert_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/insert_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="insert_footnote_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining... | 49.526718 | 255 | 0.670006 |
38273f78e6970c623bffdf363ebbf697b41fe53e | 1,688 | py | Python | tensorflow_probability/python/bijectors/sigmoid.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/sigmoid.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/sigmoid.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 32.461538 | 78 | 0.69609 |
38274a9720f64c1c78d5c268c0cc204c01c50bc2 | 8,102 | py | Python | humann/search/prescreen.py | alienzj/humann | 73d1cd45e98e79af501ca0076e71946519f0f9db | [
"MIT"
] | null | null | null | humann/search/prescreen.py | alienzj/humann | 73d1cd45e98e79af501ca0076e71946519f0f9db | [
"MIT"
] | null | null | null | humann/search/prescreen.py | alienzj/humann | 73d1cd45e98e79af501ca0076e71946519f0f9db | [
"MIT"
] | null | null | null | """
HUMAnN: prescreen module
Identify initial list of bugs from user supplied fasta/fastq
Copyright (c) 2014 Harvard School of Public Health
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 withou... | 39.715686 | 171 | 0.622933 |
38275b5a0aac6e388b24a499a30a8ddd7dece8f6 | 3,076 | py | Python | bots/zephyr_mirror.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | bots/zephyr_mirror.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 8 | 2021-02-08T20:23:34.000Z | 2022-02-11T03:40:24.000Z | bots/zephyr_mirror.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-04-09T05:50:23.000Z | 2021-04-09T05:50:23.000Z | #!/usr/bin/env python
# Copyright (C) 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 33.802198 | 86 | 0.739272 |
3827707d4be4e97b98b9441693fb5a4ea6416620 | 128,259 | py | Python | cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 IBM 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 req... | 41.669591 | 79 | 0.58063 |
38279670acff7e3da70cf97d27c5d329b334a1a6 | 823 | py | Python | apps/ingest/migrations/0018_auto_20210813_1514.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/ingest/migrations/0018_auto_20210813_1514.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/ingest/migrations/0018_auto_20210813_1514.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | # Generated by Django 2.2.10 on 2021-08-13 15:14
import apps.ingest.models
import apps.ingest.storages
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ingest', '0017_auto_20210812_1358'),
]
operations = [
migrations.RemoveField(
... | 27.433333 | 121 | 0.617254 |
382799d5b983ffe20ec0d43f8a5e1a384f9e880d | 105 | py | Python | python/13_regex_and_parsing/08_validatingphonenumbers.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/13_regex_and_parsing/08_validatingphonenumbers.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/13_regex_and_parsing/08_validatingphonenumbers.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | Solution to [Validating phone numbers](https://www.hackerrank.com/challenges/validating-the-phone-number) | 105 | 105 | 0.828571 |
3827daebb08d8b3d68207690cc14dfcfe4acd463 | 3,367 | py | Python | linkpage/models.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | 2 | 2020-07-29T17:35:31.000Z | 2021-06-06T11:37:49.000Z | linkpage/models.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | 4 | 2020-10-28T19:06:02.000Z | 2021-01-11T16:06:46.000Z | linkpage/models.py | strassan/www.kaifeck.de | b54698e8e57eaedbc4cb4ea3335fc719df92108f | [
"MIT"
] | null | null | null | import os
from io import BytesIO
from django.core.files.base import ContentFile
from django.db import models
from django.utils import timezone
from PIL import Image
THUMB_SIZE = (250, 250)
class LinkFolder(models.Model):
title = models.CharField(max_length=128)
description = models.TextField(null=True, bl... | 34.71134 | 118 | 0.653401 |
3827e2dd81c557a7bd3fecb1985c9fbd0cfbdf86 | 500 | py | Python | LR/lr/tests/test_helpers.py | LearningRegistry/LearningRegistry | d9f0a8117a4adb8fcf6bf101d3d58d799463a2e2 | [
"Apache-2.0"
] | 26 | 2015-04-14T03:11:58.000Z | 2022-01-06T14:31:07.000Z | LR/lr/tests/test_helpers.py | LearningRegistry/LearningRegistry | d9f0a8117a4adb8fcf6bf101d3d58d799463a2e2 | [
"Apache-2.0"
] | 11 | 2015-04-03T21:54:03.000Z | 2017-05-02T17:20:03.000Z | LR/lr/tests/test_helpers.py | LearningRegistry/LearningRegistry | d9f0a8117a4adb8fcf6bf101d3d58d799463a2e2 | [
"Apache-2.0"
] | 16 | 2015-02-11T09:30:18.000Z | 2020-11-20T02:06:24.000Z | from lr.lib.helpers import *
import base64
def test_getBasicAuthHeaderFromURL_no_auth():
url = "http://learningregistry.org"
auth = getBasicAuthHeaderFromURL(url)
assert auth == {}
def test_getBasicAuthHeaderFromURL():
url = "http://user:password@learningregistry.org"
base64_enc = base64.encodes... | 29.411765 | 71 | 0.716 |
3828435b80337b9b3753f6c4bc90065a6b07a077 | 4,602 | py | Python | geosoft/gxapi/GXSHD.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | null | null | null | geosoft/gxapi/GXSHD.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | null | null | null | geosoft/gxapi/GXSHD.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | null | null | null | ### extends 'class_empty.py'
### block ClassImports
# NOTICE: Do not edit anything here, it is generated code
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref
### endblock ClassImports
### block Header
# NOTICE: The code generator will not replace the code in this block
### end... | 31.958333 | 175 | 0.648848 |
382847a1a5ee78c37f83c5cbbf04390b8ead4bd1 | 5,325 | py | Python | sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_helpers.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_helpers.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/translation/azure-ai-translation-document/azure/ai/translation/document/_helpers.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import datetime
from typing import Union, Optional, List
from azure.core.credentials import AzureKeyCredential
from azure.core.pipeline.policies import AzureKeyCredenti... | 34.803922 | 114 | 0.57108 |
38284b7d7895012ef03ef1f20185aa1b808e389e | 202 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/sessions/apps.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/apps.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/apps.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class SessionsConfig(AppConfig):
name = 'django.contrib.sessions'
verbose_name = _("Sessions")
| 25.25 | 56 | 0.747525 |
382850688e999d1182409491e63a6aaacba43967 | 3,998 | py | Python | alipay/aop/api/request/AlipayOpenMiniAmpeInvokeappUnbindRequest.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/request/AlipayOpenMiniAmpeInvokeappUnbindRequest.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/request/AlipayOpenMiniAmpeInvokeappUnbindRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniAmpeInvokeappUnbindModel import AlipayOpenMiniAmpeInvokeappUnbindModel
class AlipayOpenMiniAmpeInvokeappUnbindRequest(... | 27.572414 | 148 | 0.646823 |
382850f8bfa3d3670fd2eb570a6813ac457ad870 | 521 | py | Python | dynamo_db_resource/resource.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | dynamo_db_resource/resource.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | dynamo_db_resource/resource.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | from .dynamo_db_table import Table
__all__ = ["database_resource"]
class DatabaseResourceController:
def __init__(self):
self.__tables = dict()
def __getitem__(self, table_name: str) -> (Table):
if table_name not in self.__tables:
self.__create_table_connection(table_name)
... | 23.681818 | 57 | 0.715931 |
38286673e68947a5b4709f762634c0f4727dafc2 | 121,998 | py | Python | tests/test_create.py | kiwi0fruit/conda | ad31c75a4e73a423ef584b2918adece9301d6c6e | [
"BSD-3-Clause"
] | null | null | null | tests/test_create.py | kiwi0fruit/conda | ad31c75a4e73a423ef584b2918adece9301d6c6e | [
"BSD-3-Clause"
] | null | null | null | tests/test_create.py | kiwi0fruit/conda | ad31c75a4e73a423ef584b2918adece9301d6c6e | [
"BSD-3-Clause"
] | 1 | 2019-11-13T04:22:14.000Z | 2019-11-13T04:22:14.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import bz2
from contextlib import contextmanager
from datetime import datetime
import fnmatch
from glob import glob
from conda._vendor.toolz.itertoolz import groupby
from conda.gateways.disk.permissions import m... | 48.624153 | 162 | 0.620977 |
3828a3e0c324076a7dc4f24e9a238f79c2520747 | 1,937 | py | Python | mcscf/test/test_c2h4.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | mcscf/test/test_c2h4.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | mcscf/test/test_c2h4.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import unittest
from pyscf import scf
from pyscf import gto
from pyscf import mcscf
mol = gto.Mole()
mol.verbose = 0
mol.output = None
mol.atom = [
["C", (-0.65830719, 0.61123287, -0.00800148)],
["C", ( 0.73685281, 0.61123287, -0.00800148)],
["H", ( 1.43439081, 1.81898387, -0.00800... | 26.534247 | 54 | 0.583893 |
3828b2425e436d4712fe128ca0c61ba699990c3e | 6,989 | py | Python | fairscale/nn/model_parallel/initialize.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-30T10:38:32.000Z | 2020-10-30T10:38:32.000Z | fairscale/nn/model_parallel/initialize.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | fairscale/nn/model_parallel/initialize.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Ve... | 39.044693 | 114 | 0.729718 |
3828b42318116e008198c611f0414f2060e8c051 | 795 | py | Python | tracopt/versioncontrol/git/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/versioncontrol/git/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/versioncontrol/git/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 28.392857 | 67 | 0.74717 |
3828f3a232362345888f5bb30a020dab64722780 | 2,358 | py | Python | src/tankoubonBuilder/tankoubon.py | Rishabh4275/manga_downloader | 0e89fddc8d07d810f836c0cf6682a822666a9544 | [
"MIT"
] | 214 | 2015-01-03T00:46:43.000Z | 2021-03-23T07:32:00.000Z | src/tankoubonBuilder/tankoubon.py | Rishabh4275/manga_downloader | 0e89fddc8d07d810f836c0cf6682a822666a9544 | [
"MIT"
] | 42 | 2015-01-24T00:07:06.000Z | 2020-06-22T18:41:00.000Z | src/tankoubonBuilder/tankoubon.py | Rishabh4275/manga_downloader | 0e89fddc8d07d810f836c0cf6682a822666a9544 | [
"MIT"
] | 74 | 2015-01-21T10:30:48.000Z | 2021-01-30T03:35:17.000Z | #!/usr/bin/env python
import os
import re
import shutil
import zipfile
from fileinput import filename
class Tankoubon:
'''
classdocs
'''
def __init__( self, manga = None, chapters = [], chaptersLocation = {},
volumeNumber = 1, fileFormat = ".cbz" ):
'''
Constructor
'''
self.manga = manga
self.chap... | 28.756098 | 86 | 0.675573 |
3828f5a4ebd22e4712d44cbbe0f1cf42e4c21d13 | 612 | py | Python | spa/management/commands/debugUserProfile.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | spa/management/commands/debugUserProfile.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | spa/management/commands/debugUserProfile.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib.auth.models import User
from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
def handle_noargs(self, **options):
try:
users = User.objects.all()
for user in users:
try:
if user.get_profile() is N... | 32.210526 | 65 | 0.526144 |
3828f737d4a6111e9563e68c355e26b5f82acdf9 | 2,149 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/auth/sent_code_type_app.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/auth/sent_code_type_app.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/auth/sent_code_type_app.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.144928 | 103 | 0.621219 |
38290e8b7987e4894ebbdfd151417ed3e732a63f | 5,604 | py | Python | ForgeDiscussion/forgediscussion/tests/functional/test_import.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeDiscussion/forgediscussion/tests/functional/test_import.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeDiscussion/forgediscussion/tests/functional/test_import.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 45.193548 | 99 | 0.59975 |
3829134dd976dedfe73024bfe92d7593bed8aab3 | 6,455 | py | Python | oscar_docdata/migrations/0001_initial.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2017-04-25T10:31:27.000Z | 2022-03-01T10:58:10.000Z | oscar_docdata/migrations/0001_initial.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 45 | 2017-04-26T13:17:51.000Z | 2022-02-16T12:27:57.000Z | oscar_docdata/migrations/0001_initial.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2017-07-18T03:43:53.000Z | 2020-07-10T16:29:30.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from decimal import Decimal
from oscar_docdata import appsettings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
]
operations = [
migration... | 67.239583 | 376 | 0.633772 |
38292eb4c0ed5a10e0c508a26597da2c80446a04 | 3,737 | py | Python | examples/extending_tensorflow/summaries.py | lfwin/tflearn | 06015c73a4d9ad9edafeb9b61ee9004fd715f69e | [
"MIT"
] | 20 | 2016-04-04T06:15:43.000Z | 2021-04-18T18:40:30.000Z | examples/extending_tensorflow/summaries.py | NLPDev/tflearn | 77436978c62124bd91ef739dc77c9ea58277c779 | [
"MIT"
] | null | null | null | examples/extending_tensorflow/summaries.py | NLPDev/tflearn | 77436978c62124bd91ef739dc77c9ea58277c779 | [
"MIT"
] | 9 | 2016-04-26T05:31:47.000Z | 2019-08-24T18:12:21.000Z | """
This example introduces the use of TFLearn functions to easily summarize
variables into tensorboard.
TFLearn can summarize:
- Loss / Accuracy: The model loss and accuracy over training steps.
- Activations: Histogram of operation output values.(Requires to add each
activation to monitor into tf.Graphkeys.ACTIV... | 41.988764 | 76 | 0.667915 |
382933b31fd349707fd1a6f94fd04d4f386ad561 | 13,476 | py | Python | finley/test/python/runcoalgas.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | finley/test/python/runcoalgas.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | finley/test/python/runcoalgas.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | #######################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development until 2012 by Earth Systems... | 42.917197 | 156 | 0.563372 |
3829478737c54fd8456a48fca09dff4f26238d09 | 1,199 | py | Python | examples/arduino_serial.py | mitag/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 25 | 2018-10-07T13:37:48.000Z | 2022-03-25T07:28:11.000Z | examples/arduino_serial.py | c0qu1/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 1 | 2019-07-10T00:58:33.000Z | 2019-07-10T08:42:39.000Z | examples/arduino_serial.py | c0qu1/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 13 | 2018-10-07T11:53:07.000Z | 2021-05-23T12:41:29.000Z | from __future__ import print_function, division, absolute_import
import time
from robust_serial import write_order, Order, write_i8, write_i16, read_i8, read_order
from robust_serial.utils import open_serial_port
if __name__ == '__main__':
try:
serial_file = open_serial_port(baudrate=115200, timeout=Non... | 28.547619 | 86 | 0.684737 |
38294d6521e02f5f6fbca1d83ef3c98d862a2827 | 391 | py | Python | wazimap/wsgi.py | anoited007/country-dashboard | 577bbcc4992e24c484650895fabbcdf4343e1bdb | [
"MIT"
] | 16 | 2017-10-19T03:36:41.000Z | 2022-03-03T11:46:20.000Z | wazimap/wsgi.py | ChrisAchinga/wazimap | a66a1524030a8b98e7ea0dfb270d1946ca75b3b2 | [
"MIT"
] | 66 | 2016-02-15T08:59:29.000Z | 2017-09-21T14:00:43.000Z | wazimap/wsgi.py | ChrisAchinga/wazimap | a66a1524030a8b98e7ea0dfb270d1946ca75b3b2 | [
"MIT"
] | 18 | 2017-10-06T12:26:37.000Z | 2021-08-30T01:38:37.000Z | """
WSGI config for wazimap project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | 24.4375 | 78 | 0.787724 |
382958abd7747eff4fdff59e0c9698ad0dc84ab3 | 1,824 | py | Python | utils/metrics.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | utils/metrics.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | utils/metrics.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | import numpy as np
class Evaluator(object):
def __init__(self, num_class):
self.num_class = num_class
self.confusion_matrix = np.zeros((self.num_class,)*2)
def Pixel_Accuracy(self):
Acc = np.diag(self.confusion_matrix).sum() / self.confusion_matrix.sum()
return Acc
def Pi... | 35.764706 | 99 | 0.642544 |
382995ba4eeda8b587cd25be7736d50ebeaa7e60 | 3,986 | py | Python | predictive-horizontal-pod-autoscaler/short/experiment.py | jthomperoo/custom-pod-autoscaler-experiments | f065bee72391dff008a388d46cba40df3fb23c98 | [
"Apache-2.0"
] | 4 | 2020-02-26T14:00:01.000Z | 2022-02-25T15:23:09.000Z | predictive-horizontal-pod-autoscaler/short/experiment.py | jthomperoo/custom-pod-autoscaler-experiments | f065bee72391dff008a388d46cba40df3fb23c98 | [
"Apache-2.0"
] | 1 | 2021-06-12T09:40:56.000Z | 2021-06-12T09:51:45.000Z | predictive-horizontal-pod-autoscaler/short/experiment.py | jthomperoo/custom-pod-autoscaler-experiments | f065bee72391dff008a388d46cba40df3fb23c98 | [
"Apache-2.0"
] | 1 | 2021-07-07T09:58:23.000Z | 2021-07-07T09:58:23.000Z | # Copyright 2020 Jamie Thompson.
#
# 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 writi... | 33.216667 | 110 | 0.658555 |
3829b0c7b92f9ef6c2eb190f9b18a6861396aee3 | 392 | py | Python | profile_rest_api/urls.py | shaileshkumar593/first_rest_api | 96226caeaa4fa02c292bdb903f3997f7779aa82c | [
"MIT"
] | null | null | null | profile_rest_api/urls.py | shaileshkumar593/first_rest_api | 96226caeaa4fa02c292bdb903f3997f7779aa82c | [
"MIT"
] | null | null | null | profile_rest_api/urls.py | shaileshkumar593/first_rest_api | 96226caeaa4fa02c292bdb903f3997f7779aa82c | [
"MIT"
] | null | null | null | from django.urls import path,include
from rest_framework.routers import DefaultRouter
from profile_rest_api import views
router = DefaultRouter()
router.register('hello-viewset', views.HelloViewSet, basename='hello-viewset')
router.register('profile', views.UserProfileViewSet)
urlpatterns = [
path('hello-view/... | 26.133333 | 78 | 0.767857 |
3829cf8315eb2a3ce3e5fe077fdd6b7ac213caa8 | 491 | py | Python | test/filter11.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | null | null | null | test/filter11.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | null | null | null | test/filter11.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | null | null | null | import time
from mpipe import OrderedStage, FilterStage, Pipeline
def passthru(value):
time.sleep(0.013)
return value
s1 = FilterStage(
(OrderedStage(passthru),),
max_tasks=2,
)
p1 = Pipeline(s1)
def pull(task):
for task, result in p1.results():
if result:
print('{0} {1}'... | 15.83871 | 53 | 0.637475 |
3829e7f9e909c010a378f672f248a8c68bb1448a | 364 | py | Python | azure-devops/azext_devops/version.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/version.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/version.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 52 | 94 | 0.365385 |
382a1233d4f34b41731da46d2e025dccebf67a89 | 8,146 | py | Python | river/datasets/synth/led.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/datasets/synth/led.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/datasets/synth/led.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import numpy as np
from river import datasets
from river.utils.skmultiflow_utils import check_random_state
class LED(datasets.base.SyntheticDataset):
"""LED stream generator.
This data source originates from the CART book [^1]. An implementation
in C was donated to the UCI [^2] machine learning reposito... | 36.204444 | 92 | 0.571692 |
382a18ddaf94b7ebfdaaba374ab8e531dd232614 | 101 | py | Python | iniesta/sns/__init__.py | crazytruth/iniesta | 1e1cc079d04758f319c6bcee4a8a14a176e7b24e | [
"MIT"
] | 1 | 2021-03-14T08:27:43.000Z | 2021-03-14T08:27:43.000Z | iniesta/sns/__init__.py | crazytruth/iniesta | 1e1cc079d04758f319c6bcee4a8a14a176e7b24e | [
"MIT"
] | 1 | 2020-10-08T08:14:04.000Z | 2020-10-08T08:14:04.000Z | iniesta/sns/__init__.py | crazytruth/iniesta | 1e1cc079d04758f319c6bcee4a8a14a176e7b24e | [
"MIT"
] | null | null | null | from .message import SNSMessage
from .client import SNSClient
__all__ = ("SNSMessage", "SNSClient")
| 20.2 | 37 | 0.772277 |
382a34364daf1e463bd2f5920657fce3bbaef5c8 | 390 | py | Python | ProGED/__init__.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | 5 | 2021-02-04T10:53:10.000Z | 2022-03-29T11:14:29.000Z | ProGED/__init__.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | 8 | 2021-02-04T10:11:36.000Z | 2022-03-04T13:35:16.000Z | ProGED/__init__.py | smeznar/ProGED | 191cfd2b7b1fece819109a4b61e3f7533332fd74 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from ProGED.model import Model
from ProGED.model_box import ModelBox, symbolic_difference
from ProGED.generators.grammar import GeneratorGrammar
from ProGED.generators.grammar_construction import grammar_from_template
from ProGED.parameter_estimation import fit_models
from ProGED.task import ED... | 35.454545 | 72 | 0.848718 |
382a720c6769dc619662f00038508c7ffc2b376e | 2,711 | py | Python | partools/tools/dup.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/tools/dup.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/tools/dup.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | from random import shuffle
import partools.utils as u
def find_dup(in_path, out_path='', open_out=False, col=0):
"""Finds the duplicates in in_path file
- col: if the file is a csv, the duplicates will be searched in this column index
"""
from .init import init_find_dup
from .finish import finis... | 27.11 | 85 | 0.646256 |
382a7df32dd2f5b09edf20795c4620481a78e998 | 638 | py | Python | docs/src/development/dependencies_injection/dependencies_injection1.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | docs/src/development/dependencies_injection/dependencies_injection1.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | docs/src/development/dependencies_injection/dependencies_injection1.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import asyncio
from dataclasses import dataclass
from uuid import UUID
from botx import Bot, Depends, Message
@dataclass
class User:
user_huid: UUID
username: str
bot = Bot()
def get_user_huid_from_message(message: Message) -> UUID:
return message.user_huid
async def fetch_user_by_huid(
user_hu... | 19.9375 | 65 | 0.739812 |
382ab0268d5d6e217e9a554c911e11c51a698f40 | 20,993 | py | Python | cpnest/sampler.py | mj-will/cpnest | 2e5c9fd756f9b1765f1e6afcfc75dd2b379061c0 | [
"MIT"
] | 25 | 2016-11-22T12:16:19.000Z | 2021-12-08T17:08:14.000Z | cpnest/sampler.py | mj-will/cpnest | 2e5c9fd756f9b1765f1e6afcfc75dd2b379061c0 | [
"MIT"
] | 70 | 2016-11-22T14:26:50.000Z | 2021-12-06T14:35:11.000Z | cpnest/sampler.py | mj-will/cpnest | 2e5c9fd756f9b1765f1e6afcfc75dd2b379061c0 | [
"MIT"
] | 23 | 2017-02-16T21:03:39.000Z | 2021-01-14T14:39:18.000Z | from __future__ import division
import sys
import os
import logging
import time
import numpy as np
from math import log
from collections import deque
from random import random,randrange
from . import parameter
from .proposal import DefaultProposalCycle
from . import proposal
from .cpnest import CheckPoint, RunManager
... | 37.090106 | 162 | 0.564664 |
382abc5d4b1883f19b648d59c750943be79e3b81 | 667 | py | Python | packages/liotad/cal_sha1sum.py | giyyanan/liota | 838d8407f8b167d6ad25470dbd66deaec88607fe | [
"BSD-2-Clause"
] | 361 | 2016-04-29T14:07:18.000Z | 2021-01-23T10:15:39.000Z | packages/liotad/cal_sha1sum.py | giyyanan/liota | 838d8407f8b167d6ad25470dbd66deaec88607fe | [
"BSD-2-Clause"
] | 148 | 2016-05-26T19:27:04.000Z | 2021-02-22T05:39:40.000Z | packages/liotad/cal_sha1sum.py | giyyanan/liota | 838d8407f8b167d6ad25470dbd66deaec88607fe | [
"BSD-2-Clause"
] | 153 | 2016-04-28T22:46:23.000Z | 2020-02-13T19:01:07.000Z | import os
import sys
import hashlib
def sha1sum(path_file):
"""
This method calculates SHA-1 checksum of file.
:param path_file: the relative or absolute path of a file
:return: the SHA-1 checksum of the file
"""
if not os.path.isfile(path_file):
return None
sha1 = hashlib.sha1()
... | 23.821429 | 61 | 0.617691 |
382acc893efe2cc420dbe6dc78fb9c8412a9399d | 21,239 | py | Python | Automate.py | lowandrew/ROGA_Redmine | f1fea6e68e48aaef459e457fe68e72b47b82251a | [
"MIT"
] | null | null | null | Automate.py | lowandrew/ROGA_Redmine | f1fea6e68e48aaef459e457fe68e72b47b82251a | [
"MIT"
] | 2 | 2021-03-22T17:16:05.000Z | 2021-06-01T21:47:39.000Z | Automate.py | lowandrew/ROGA_Redmine | f1fea6e68e48aaef459e457fe68e72b47b82251a | [
"MIT"
] | null | null | null | # This is where I'll learn to use python-docx so that ROGAs can get automated.
import sys
import datetime
import pandas as pd
class Automate:
"""
Main automation class, with common functions for different species ROGAs. Inherited by Automate_Salmonella,
Automate_Listeria, and Automate_VTEC.
"""
# ... | 49.740047 | 140 | 0.567164 |
382af1b2d371ff53975de462e10bb20fed4b5c70 | 5,978 | py | Python | asposewordscloud/models/requests/remove_range_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/remove_range_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/remove_range_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="remove_range_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# ... | 46.341085 | 170 | 0.659083 |
382af59000b514a9fc0425877cf1c1290a159531 | 4,046 | py | Python | alipay/aop/api/request/AntMerchantExpandIndirectSupplementCreateRequest.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/request/AntMerchantExpandIndirectSupplementCreateRequest.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/request/AntMerchantExpandIndirectSupplementCreateRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AntMerchantExpandIndirectSupplementCreateModel import AntMerchantExpandIndirectSupplementCreateModel
class AntMerchantExpandIndirect... | 27.903448 | 148 | 0.651013 |
382b09da963b176a86450b53b91c068198e7fc43 | 1,717 | py | Python | modelscript/test/drivers/objects/test_obs_model.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/test/drivers/objects/test_obs_model.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/test/drivers/objects/test_obs_model.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
import os
from modelscript.scripts.objects.parser import ObjectModelSource
from modelscript.test.framework import getTestFile
class TestObjectModel(object):
THE_MODEL = None
def __init__(self):
if TestObjectModel.THE_MODEL is None:
obs_file = getTestFile('obs/ob-main-turbo... | 35.770833 | 73 | 0.628422 |
382b1926779fc9dc20de8f9340a1b091ad145d17 | 2,666 | py | Python | replies/views.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 187 | 2018-03-08T11:18:11.000Z | 2021-12-26T13:29:02.000Z | replies/views.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 67 | 2018-03-09T14:56:47.000Z | 2021-06-24T08:52:40.000Z | replies/views.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 52 | 2018-03-08T11:18:12.000Z | 2021-08-02T16:07:04.000Z | from actstream.models import Follow
from django.db.utils import IntegrityError
from django_comments import signals
from notifications.signals import notify
from rest_framework import mixins
from rest_framework import permissions
from rest_framework import status
from rest_framework import viewsets
from rest_framework.d... | 36.027027 | 79 | 0.61853 |
382b26c293ef443fcdc30103b5873bcc887b7ce7 | 2,124 | py | Python | prepare_data.py | tom-pelsmaeker/vae-lagging-encoder | b190239019a94c85858d188a0853886eb48ce4be | [
"MIT"
] | 173 | 2018-12-21T16:34:04.000Z | 2022-02-22T08:47:28.000Z | prepare_data.py | tom-pelsmaeker/vae-lagging-encoder | b190239019a94c85858d188a0853886eb48ce4be | [
"MIT"
] | 11 | 2019-01-12T22:15:20.000Z | 2020-09-21T03:34:42.000Z | prepare_data.py | tom-pelsmaeker/vae-lagging-encoder | b190239019a94c85858d188a0853886eb48ce4be | [
"MIT"
] | 28 | 2019-01-03T16:11:41.000Z | 2021-02-17T20:28:04.000Z | import argparse
import requests
import tarfile
import os
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(URL, params = { 'id' : id }, stream = True)
token = get_confirm_token(response)
if... | 28.702703 | 96 | 0.656309 |
382b9400741fde47f90c6612ed04a1aefe0a23b2 | 37,693 | py | Python | codes_src/fairseq/models/multilingual_transformer.py | ZhenYangIACAS/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 50 | 2021-11-15T02:34:43.000Z | 2021-11-18T07:24:46.000Z | codes_src/fairseq/models/multilingual_transformer.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | null | null | null | codes_src/fairseq/models/multilingual_transformer.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 26 | 2021-11-15T02:35:14.000Z | 2021-11-15T08:25:42.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from collections import OrderedDict
from fairseq import utils
from fairseq.models import (
FairseqEncoder,
FairseqIncrementalDecoder,... | 45.799514 | 164 | 0.634627 |
382b9f9d1cf42bd3c206b59c73d3a7b9eaf974ff | 4,953 | py | Python | leetcode_python/Binary_Search_Tree/split-bst.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Binary_Search_Tree/split-bst.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Binary_Search_Tree/split-bst.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
class Solution(object):
def splitBST(self, root, V):
if not root:
return None, None
elif root.val <= V:
result = self.splitBST(root.right, V)
root.right = result[0]
return root, result[1]
else:
result = self.splitBST(root.left,... | 27.983051 | 68 | 0.493438 |
382bb0d10fa6f3e15c2fe394fdf95b171b80d86d | 1,772 | py | Python | alipay/aop/api/domain/BrandQuotaQueryCondition.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/BrandQuotaQueryCondition.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/BrandQuotaQueryCondition.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.CreditPayUserVO import CreditPayUserVO
class BrandQuotaQueryCondition(object):
def __init__(self):
self._is_query_seller_list = None
self._seller_info = None
... | 29.533333 | 91 | 0.646163 |
382bbb45e93578112555936e5f1603a784c1d283 | 7,671 | py | Python | iroha_helper.py | Piteryo/iroha_flask | 6f5e5a03827d3dc539fd4fff89a4513041ca41af | [
"WTFPL"
] | null | null | null | iroha_helper.py | Piteryo/iroha_flask | 6f5e5a03827d3dc539fd4fff89a4513041ca41af | [
"WTFPL"
] | null | null | null | iroha_helper.py | Piteryo/iroha_flask | 6f5e5a03827d3dc539fd4fff89a4513041ca41af | [
"WTFPL"
] | null | null | null | from irohalib import IrohaCrypto
import binascii
from irohalib import Iroha, IrohaGrpc
import os
import json
class IrohaHelper:
def __init__(self, admin_key, iroha, net):
self.admin_private_key = admin_key
self.iroha = iroha
self.net = net
self.accounts = {}
self.accounts['... | 39.953125 | 129 | 0.606179 |
382bbd48da3b1f0dd312218f62b472cba8ceada6 | 1,473 | py | Python | models/final_experiment_scripts/eICU/LoS/channel_wise_lstm_no_labs.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 29 | 2020-11-23T16:27:41.000Z | 2022-03-25T16:05:24.000Z | models/final_experiment_scripts/eICU/LoS/channel_wise_lstm_no_labs.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 2 | 2020-11-28T04:11:12.000Z | 2021-08-23T12:42:08.000Z | models/final_experiment_scripts/eICU/LoS/channel_wise_lstm_no_labs.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 9 | 2021-02-23T07:12:58.000Z | 2022-01-13T15:11:59.000Z | from eICU_preprocessing.split_train_test import create_folder
from torch.optim import Adam
from models.lstm_model import BaseLSTM
from models.experiment_template import ExperimentTemplate
from models.initialise_arguments import initialise_lstm_arguments
from models.final_experiment_scripts.best_hyperparameters import b... | 42.085714 | 128 | 0.646979 |
382bcc5631729898a702fb7ed772436030cec509 | 2,705 | py | Python | sapp/sarif.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/sarif.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/sarif.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 20 | 2021-04-08T01:28:53.000Z | 2022-03-22T22:26:05.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
import json
from dataclasses import dataclass, field
from json import JSONEncoder
from typing import Set, Dict, Union, List, ... | 30.393258 | 122 | 0.586322 |
382c0b189ed7eca9cacf6cc823f5744e8a9b8c33 | 3,502 | py | Python | twitoff/app.py | dustiny5/TwitOff | 8d7be0d7e71e74d96533b33b7eeff12b7313c666 | [
"MIT"
] | null | null | null | twitoff/app.py | dustiny5/TwitOff | 8d7be0d7e71e74d96533b33b7eeff12b7313c666 | [
"MIT"
] | null | null | null | twitoff/app.py | dustiny5/TwitOff | 8d7be0d7e71e74d96533b33b7eeff12b7313c666 | [
"MIT"
] | null | null | null | """
Main application and routing/configuration logic for TwitOff
"""
import os
from decouple import config # Reads our .env file
from flask import Flask, render_template, request
from .models import DB, User
from .twitter import add_or_update_user
from .predict import predict_user
def create_app():
""" Create and ... | 39.795455 | 87 | 0.606225 |
382c1e5f8a81e67e95b00c7324d820101d9f16cb | 2,269 | py | Python | connaisseur/logging_wrapper.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | null | null | null | connaisseur/logging_wrapper.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | null | null | null | connaisseur/logging_wrapper.py | funkypenguin/connaisseur | 37d85332e519454a017b02ecb1cd77913f51f70a | [
"Apache-2.0"
] | null | null | null | import logging
import time
class ConnaisseurLoggingWrapper:
"""
Logging wrapper for a WSGI application that logs all HTTP requests
"""
def __init__(self, app, log_level):
self.logger = logging.getLogger(
"connaisseurRequestLogger"
) # has no handler and hence propagates l... | 41.254545 | 112 | 0.66461 |
382c4645b13f85c0c17040eb0bd8bb382688f0b8 | 1,132 | py | Python | src/main/python/cfn_sphere/aws/kms.py | ImmobilienScout24/cfn-sphere | d5f8155fd04f569d161423f8914a93434fe7eedd | [
"Apache-2.0"
] | 1 | 2016-06-29T08:45:22.000Z | 2016-06-29T08:45:22.000Z | src/main/python/cfn_sphere/aws/kms.py | ImmobilienScout24/cfn-sphere | d5f8155fd04f569d161423f8914a93434fe7eedd | [
"Apache-2.0"
] | null | null | null | src/main/python/cfn_sphere/aws/kms.py | ImmobilienScout24/cfn-sphere | d5f8155fd04f569d161423f8914a93434fe7eedd | [
"Apache-2.0"
] | null | null | null | import base64
from builtins import bytes
import boto3
from boto3.exceptions import Boto3Error
from botocore.exceptions import ClientError
from cfn_sphere.exceptions import CfnSphereBotoError
class KMS(object):
def __init__(self, region="eu-west-1"):
self.client = boto3.client('kms', region_name=region)
... | 32.342857 | 100 | 0.689046 |
382c4815059429be74ee344635d5644aac1a241b | 628 | py | Python | setup.py | laherre/LnkParse3 | eab34ae629f4ab6c67ae5855280b6a2465208222 | [
"MIT"
] | null | null | null | setup.py | laherre/LnkParse3 | eab34ae629f4ab6c67ae5855280b6a2465208222 | [
"MIT"
] | null | null | null | setup.py | laherre/LnkParse3 | eab34ae629f4ab6c67ae5855280b6a2465208222 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='LnkParse3',
version='0.3.3',
description='Windows Shortcut file (LNK) parser',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/M... | 26.166667 | 53 | 0.654459 |
382c690fc098b5f96aca318efb5a49483849295c | 5,334 | py | Python | train.py | swagshaw/Keyword-Spotting-Playground | 1221c02f5a40d9cd7e17a0780eb5b6e8fe2e24ab | [
"MIT"
] | 1 | 2022-03-31T21:01:42.000Z | 2022-03-31T21:01:42.000Z | train.py | swagshaw/Keyword-Spotting-Playground | 1221c02f5a40d9cd7e17a0780eb5b6e8fe2e24ab | [
"MIT"
] | null | null | null | train.py | swagshaw/Keyword-Spotting-Playground | 1221c02f5a40d9cd7e17a0780eb5b6e8fe2e24ab | [
"MIT"
] | null | null | null | """
# !/usr/bin/env python
-*- coding: utf-8 -*-
@Time : 2022/3/15 下午4:57
@Author : Yang "Jan" Xiao
@Description : train
"""
import logging
from tqdm import tqdm
import torch.nn as nn
from torch.utils.data import DataLoader
from utils.data_loader import *
from utils.utils import *
logger = logging.getLogger()
d... | 43.365854 | 118 | 0.596925 |
382c69134050e1c2b6350dc9c63dfb7d45f63498 | 364 | py | Python | data-reader/xml_generator.py | smrachi/python-click-cli | d45ee06e863c7e3d43f81abf45c69e84525f62d6 | [
"BSD-2-Clause"
] | null | null | null | data-reader/xml_generator.py | smrachi/python-click-cli | d45ee06e863c7e3d43f81abf45c69e84525f62d6 | [
"BSD-2-Clause"
] | null | null | null | data-reader/xml_generator.py | smrachi/python-click-cli | d45ee06e863c7e3d43f81abf45c69e84525f62d6 | [
"BSD-2-Clause"
] | null | null | null | """Creating an XML file
this program creates an xml file and saves it including the xml
declaration line.
"""
import xml.etree.ElementTree as ET
tree = ET.ElementTree("tree")
document = ET.Element("outer")
node1 = ET.SubElement(document, "inner")
node1.text = "text"
tree._setroot(document)
tree.write("./output.xm... | 22.75 | 67 | 0.736264 |
382ca12f45a9be4b429a0d76ccbe8a1792e0df16 | 186 | py | Python | tiveU/articles/apps.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/articles/apps.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | tiveU/articles/apps.py | rds0751/newtiveu | 779ac840f0787ea0e74701b43d4320b44429527e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class ArticlesConfig(AppConfig):
name = 'tiveU.articles'
verbose_name = _('Articles')
| 23.25 | 55 | 0.768817 |
382cabdf97a30a2b584b4ceaff14fe6dabd29349 | 93 | py | Python | textacy/spacier/__init__.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | 1 | 2021-11-03T19:11:11.000Z | 2021-11-03T19:11:11.000Z | textacy/spacier/__init__.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | textacy/spacier/__init__.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | 1 | 2022-02-20T14:23:03.000Z | 2022-02-20T14:23:03.000Z | from . import components
from . import core
from . import doc_extensions
from . import utils
| 18.6 | 28 | 0.784946 |
382cb77127c43ecdce13daf461410c86285ba0db | 3,160 | py | Python | WebMonitoring/WebsiteMonitorHelpers/request_helpers.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 15 | 2019-11-03T18:01:27.000Z | 2021-05-05T20:54:57.000Z | WebMonitoring/WebsiteMonitorHelpers/request_helpers.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 392 | 2019-11-09T21:28:01.000Z | 2022-03-31T13:04:45.000Z | WebMonitoring/WebsiteMonitorHelpers/request_helpers.py | raresraf/rafMetrics | 21eb5e8210364bf70eee746d71c45f3e353dcb10 | [
"MIT"
] | 1 | 2021-03-11T18:35:16.000Z | 2021-03-11T18:35:16.000Z | from WebMonitoring.configs.settings import SHOW_VERBOSE_MESSAGE
def parse_request(entry):
serverIPAddress = get_server_ip(entry)
pageRef = get_page_ref(entry)
startedDateTime = get_started_date_time(entry)
time = get_time(entry)
responseStatus = get_response_status(entry)
headersSize = get_hea... | 26.115702 | 63 | 0.603165 |
382cd76eed0732e4eb3165b6904f7870044281d0 | 43,380 | py | Python | pycep/model.py | crlorentzen/pycep | 5b0cff5a13e1e54c0b3fc3f260601f927607f530 | [
"Apache-2.0"
] | null | null | null | pycep/model.py | crlorentzen/pycep | 5b0cff5a13e1e54c0b3fc3f260601f927607f530 | [
"Apache-2.0"
] | null | null | null | pycep/model.py | crlorentzen/pycep | 5b0cff5a13e1e54c0b3fc3f260601f927607f530 | [
"Apache-2.0"
] | null | null | null | """The pycep model library."""
# coding=utf-8
import platform
import tarfile
from base64 import b64encode
from glob import glob
from shutil import rmtree, move, Error
from uuid import uuid4
from json import dumps
from os import mkdir, chdir, walk, getcwd, remove
from logging import error, info
from yaml_info.yamlinfo i... | 46.897297 | 119 | 0.537275 |
382cd913fece8fcbb5e96b07a2bd679865151d21 | 3,012 | py | Python | classify_tool_data.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | classify_tool_data.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | classify_tool_data.py | skbly7/usefulness | ed11cd55080d553cf62873999a5e00b154057fbc | [
"MIT"
] | null | null | null | import cPickle as pickle
import collections
import csv
import bs4
import re
import markdown
from textpreprocess import textpreprocess
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
with open('trained_model.pickle', 'rb') as handle:
vectorizer, clf, svd = pickle.load(handle)
android = False
# change filena... | 26.892857 | 145 | 0.580677 |
382cde6b403a2bf5637f63358cf84dc74402efad | 12,780 | py | Python | vistrails/packages/mongodb/init.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/packages/mongodb/init.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/packages/mongodb/init.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | 38.035714 | 86 | 0.594601 |
382d374f8a3fda854b3075f8656424f7daeb3caa | 2,980 | py | Python | river/model_selection/base.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/model_selection/base.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/model_selection/base.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | from abc import ABC, abstractmethod
from typing import Iterator, List
from river import base, compose, linear_model, metrics, optim, preprocessing
from river._bandit import Bandit, BanditPolicy
__all__ = ["ModelSelectionRegressor", "ModelSelectionClassifier"]
class ModelSelector(base.Ensemble, ABC):
"""A generi... | 26.607143 | 86 | 0.575839 |
382d595d68ba4f2c55ad92825577b6e04daadde9 | 4,251 | py | Python | demo/sax/sax2obj.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | demo/sax/sax2obj.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | demo/sax/sax2obj.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | """
A general XML element -> Python object converter based on SAX.
"""
from xml.sax import saxexts,saxlib,saxutils
import re,string
reg_ws=re.compile("[%s]+" % string.whitespace)
class ConvSpec:
"""Contains the information needed to convert SAX events to Python
objects."""
def __init__(self):
pa... | 25.608434 | 79 | 0.591155 |
382d624b7409abae17da4ae905c6b311d69f8ed0 | 309 | py | Python | linear-algebra/solve-system-linear-equations.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 2 | 2020-09-29T04:09:41.000Z | 2020-10-18T13:33:36.000Z | linear-algebra/solve-system-linear-equations.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | null | null | null | linear-algebra/solve-system-linear-equations.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 1 | 2021-12-26T04:55:55.000Z | 2021-12-26T04:55:55.000Z | import numpy as np
"""
# Equation
3x - 2y = 7
2x - 2y = 2
--------------
We know, Ax = b, where A => co-efficient matrix
b => constant-vector
x => unknowns
"""
A = np.array([[3, -2], [2, -2]])
b = np.array([7, 2])
solution_vector = np.linalg.solve(A, b)
print(solution_vector) # [5, 4]
| 17.166667 | 47 | 0.527508 |
382d711e72fb3665a16fbdd8b21f4d1d30c146cd | 1,493 | py | Python | src/visitpy/visit_flow/flow/tests/test_state_control.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/tests/test_state_control.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/tests/test_state_control.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: test_state_control.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 3/24/2012
des... | 29.86 | 104 | 0.619558 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.