hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
906abee93fd7e753a2591443bd28f75813d6c5f4 | 1,239 | py | Python | 0/spiral_matrix2.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 4 | 2018-03-07T02:56:03.000Z | 2021-06-15T05:43:31.000Z | 0/spiral_matrix2.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | null | null | null | 0/spiral_matrix2.py | IronCore864/leetcode | a62a4cdde9814ae48997176debcaad537f7ad01f | [
"Apache-2.0"
] | 1 | 2021-09-02T12:05:15.000Z | 2021-09-02T12:05:15.000Z | class Solution(object):
def generateMatrix(self, n):
"""
:type n: int
:rtype: List[List[int]]
"""
res = [[0 for _ in range(n)] for _ in range(n)]
i, j = 0, 0
di, dj = 0, 1
for num in range(1, n * n + 1):
res[i][j] = num
if di ==... | 29.5 | 82 | 0.50686 |
ab00e82e6d65d6ed6998c68f04b3983bcc3154c1 | 17,420 | py | Python | src/bindings/python/src/openvino/runtime/ie_api.py | si-eun-kim/openvino | 1db4446e2a6ead55d066e0b4e718fa37f509353a | [
"Apache-2.0"
] | 2 | 2021-12-14T15:27:46.000Z | 2021-12-14T15:34:16.000Z | src/bindings/python/src/openvino/runtime/ie_api.py | si-eun-kim/openvino | 1db4446e2a6ead55d066e0b4e718fa37f509353a | [
"Apache-2.0"
] | 33 | 2021-09-23T04:14:30.000Z | 2022-01-24T13:21:32.000Z | src/bindings/python/src/openvino/runtime/ie_api.py | si-eun-kim/openvino | 1db4446e2a6ead55d066e0b4e718fa37f509353a | [
"Apache-2.0"
] | 11 | 2021-11-09T00:51:40.000Z | 2021-11-10T12:04:16.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from functools import singledispatch
from typing import Any, Union, Dict
import numpy as np
from openvino.pyopenvino import Model
from openvino.pyopenvino import Core as CoreBase
from openvino.pyopenvino import CompiledModel as Compile... | 38.034934 | 110 | 0.637313 |
398f25678be20df263441ac023cb7550c4aa6549 | 5,588 | py | Python | mrjob/tools/emr/mrboss.py | ukwa/mrjob | 091572e87bc24cc64be40278dd0f5c3617c98d4b | [
"Apache-2.0"
] | 1,538 | 2015-01-02T10:22:17.000Z | 2022-03-29T16:42:33.000Z | mrjob/tools/emr/mrboss.py | ukwa/mrjob | 091572e87bc24cc64be40278dd0f5c3617c98d4b | [
"Apache-2.0"
] | 1,027 | 2015-01-09T21:30:37.000Z | 2022-02-26T18:21:42.000Z | mrjob/tools/emr/mrboss.py | ukwa/mrjob | 091572e87bc24cc64be40278dd0f5c3617c98d4b | [
"Apache-2.0"
] | 403 | 2015-01-06T15:49:44.000Z | 2022-03-29T16:42:34.000Z | # Copyright 2009-2012 Yelp
# Copyright 2015-2018 Yelp
# Copyright 2019 Yelp
#
# 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 ... | 37.253333 | 79 | 0.639764 |
71ef729f6489a7fa22a82d8485a2a1de21aaab55 | 2,793 | py | Python | tests/test_modelhub_cli.py | univerone/ML-Model-CI | f77635e469477b640a5c2d9b7ad3fe13374ce59e | [
"Apache-2.0"
] | 170 | 2020-06-08T18:30:52.000Z | 2022-03-28T12:08:11.000Z | tests/test_modelhub_cli.py | crazyCoderLi/ML-Model-CI | f77635e469477b640a5c2d9b7ad3fe13374ce59e | [
"Apache-2.0"
] | 146 | 2020-06-14T18:56:27.000Z | 2022-02-27T21:15:59.000Z | tests/test_modelhub_cli.py | univerone/ML-Model-CI | f77635e469477b640a5c2d9b7ad3fe13374ce59e | [
"Apache-2.0"
] | 36 | 2020-06-08T18:30:56.000Z | 2022-03-07T18:10:19.000Z | # test ModelCI CLI with unitest
from pathlib import Path
import requests
import torch
from typer.testing import CliRunner
import torchvision
from modelci.config import app_settings
from modelci.cli.modelhub import app
runner = CliRunner()
file_dir = f"{str(Path.home())}/.modelci/ResNet50/PyTorch-PYTORCH/Image_Classif... | 28.793814 | 90 | 0.659506 |
3e8e4e86696ba69cbacafd79eec1297e141a8c8b | 4,963 | py | Python | Documentation/Cookbook/Scripts/otbGenerateExamplesRstDoc.py | heralex/OTB | c52b504b64dc89c8fe9cac8af39b8067ca2c3a57 | [
"Apache-2.0"
] | 317 | 2015-01-19T08:40:58.000Z | 2022-03-17T11:55:48.000Z | Documentation/Cookbook/Scripts/otbGenerateExamplesRstDoc.py | guandd/OTB | 707ce4c6bb4c7186e3b102b2b00493a5050872cb | [
"Apache-2.0"
] | 18 | 2015-07-29T14:13:45.000Z | 2021-03-29T12:36:24.000Z | Documentation/Cookbook/Scripts/otbGenerateExamplesRstDoc.py | guandd/OTB | 707ce4c6bb4c7186e3b102b2b00493a5050872cb | [
"Apache-2.0"
] | 132 | 2015-02-21T23:57:25.000Z | 2022-03-25T16:03:16.000Z | #!/usr/bin/env python3
#
# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... | 36.226277 | 132 | 0.68507 |
517afc8e40d402895ea89b6dfbb64d289e9c215c | 1,315 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py | jmalobicky/azure-sdk-for-python | 61234a3d83f8fb481d1dd2386e54e888864878fd | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py | jmalobicky/azure-sdk-for-python | 61234a3d83f8fb481d1dd2386e54e888864878fd | [
"MIT"
] | null | null | null | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py | jmalobicky/azure-sdk-for-python | 61234a3d83f8fb481d1dd2386e54e888864878fd | [
"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.848485 | 83 | 0.660076 |
af18d0966046c99ec5b7964c1af4653e709f815e | 11,484 | py | Python | lang/python/github/com/metaprov/modelaapi/services/review/v1/review_pb2_grpc.py | metaprov/modeldapi | ee05693832051dcd990ee4f061715d7ae0787340 | [
"Apache-2.0"
] | 5 | 2022-02-18T03:40:10.000Z | 2022-03-01T16:11:24.000Z | lang/python/github/com/metaprov/modelaapi/services/review/v1/review_pb2_grpc.py | metaprov/modeldapi | ee05693832051dcd990ee4f061715d7ae0787340 | [
"Apache-2.0"
] | 1 | 2022-01-07T19:59:25.000Z | 2022-02-04T01:21:14.000Z | lang/python/github/com/metaprov/modelaapi/services/review/v1/review_pb2_grpc.py | metaprov/modeldapi | ee05693832051dcd990ee4f061715d7ae0787340 | [
"Apache-2.0"
] | 1 | 2022-03-25T10:21:43.000Z | 2022-03-25T10:21:43.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from github.com.metaprov.modelaapi.services.review.v1 import review_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_review_dot_v1_dot_review__p... | 57.708543 | 168 | 0.737287 |
614d572ae61f8ab850131de032cc7ef605cf5a1d | 435 | py | Python | al5d/scripts/local_config.py | pouyaAB/ros_teleoperate | 4fe993b558b1b96a8483fe9161989ecf348dcdfc | [
"MIT"
] | null | null | null | al5d/scripts/local_config.py | pouyaAB/ros_teleoperate | 4fe993b558b1b96a8483fe9161989ecf348dcdfc | [
"MIT"
] | null | null | null | al5d/scripts/local_config.py | pouyaAB/ros_teleoperate | 4fe993b558b1b96a8483fe9161989ecf348dcdfc | [
"MIT"
] | null | null | null | config = {}
config['record_path'] = '/home/d3gan/development/datasets/record/real_time'
config['robot_command_file'] = '/home/d3gan/development/datasets/record/real_time/commands.csv'
config['image_size'] = 64
config['task'] = '5002'
config['camera_topics'] = ['/camera1/usb_cam1/image_raw', '/camera2/usb_cam2/image_r... | 36.25 | 119 | 0.742529 |
f16237dae9d1799ab8cc26c1b9c14daf1832acb9 | 56,171 | py | Python | spyder/api/plugins.py | feiser2016/spyder | b6e7a45f8bb12b9be6b279218c44e19f603685e8 | [
"MIT"
] | null | null | null | spyder/api/plugins.py | feiser2016/spyder | b6e7a45f8bb12b9be6b279218c44e19f603685e8 | [
"MIT"
] | null | null | null | spyder/api/plugins.py | feiser2016/spyder | b6e7a45f8bb12b9be6b279218c44e19f603685e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
spyder.api.plugins
==================
Here, 'plugins' are Qt objects that can make changes to Spyder's
main window and call other plugins directly.
There are tw... | 34.823931 | 79 | 0.580584 |
6e532740eef8da586e4f483a2640f896e2f64f84 | 4,381 | py | Python | run_model.py | tira-io/LyS-FASTPARSE | 5c148bd146b48c991a9b9c1028c815ef45f09ebb | [
"Apache-2.0"
] | null | null | null | run_model.py | tira-io/LyS-FASTPARSE | 5c148bd146b48c991a9b9c1028c815ef45f09ebb | [
"Apache-2.0"
] | null | null | null | run_model.py | tira-io/LyS-FASTPARSE | 5c148bd146b48c991a9b9c1028c815ef45f09ebb | [
"Apache-2.0"
] | null | null | null |
from argparse import ArgumentParser, Namespace
import codecs
import sys
import pickle
import os
import time
import lysfastparse.utils
import lysfastparse.bcovington.utils_bcovington
import tempfile
import yaml
import subprocess
import lysfastparse.bcovington.covington
parser = ArgumentParser()
parser.add_argument("-... | 35.909836 | 178 | 0.647341 |
19c9d9c6dfa0f9005eec328dfbc0a3eb0f4d50f0 | 229 | py | Python | api_crud/urls.py | TeunSpithoven/NinjaGame-backend | 9b3cf3d87593e0b3fe9956f85ca5633fb08d63af | [
"MIT"
] | null | null | null | api_crud/urls.py | TeunSpithoven/NinjaGame-backend | 9b3cf3d87593e0b3fe9956f85ca5633fb08d63af | [
"MIT"
] | null | null | null | api_crud/urls.py | TeunSpithoven/NinjaGame-backend | 9b3cf3d87593e0b3fe9956f85ca5633fb08d63af | [
"MIT"
] | null | null | null |
from django.contrib import admin
from django.urls import include, path
# urls
urlpatterns = [
path('games/', include('games.urls')),
path('auth/', include('authentication.urls')),
path('admin/', admin.site.urls),
]
| 20.818182 | 50 | 0.672489 |
776ffe7d9b1aabfb20cef0c02100b0cd6f457a57 | 20 | py | Python | cobiv/modules/core/imageset/__init__.py | gokudomatic/cobiv | c095eda704fab319fccc04d43d8099f1e8327734 | [
"MIT"
] | 4 | 2017-12-26T07:19:46.000Z | 2019-09-20T08:27:58.000Z | cobiv/modules/core/imageset/__init__.py | gokudomatic/cobiv | c095eda704fab319fccc04d43d8099f1e8327734 | [
"MIT"
] | 4 | 2017-10-01T12:18:43.000Z | 2019-06-09T10:29:03.000Z | cobiv/modules/core/imageset/__init__.py | gokudomatic/cobiv | c095eda704fab319fccc04d43d8099f1e8327734 | [
"MIT"
] | 1 | 2019-01-07T19:58:00.000Z | 2019-01-07T19:58:00.000Z | __all__=["ImageSet"] | 20 | 20 | 0.75 |
15abf5a87ac8cf0a32c9615268c67a292de267bc | 379 | py | Python | home/migrations/0002_auto_20210320_2138.py | MatheusAfinovicz/MathsBurguer | 82b8cd1499989ac46bb341296bfdd7f432ae5481 | [
"MIT"
] | null | null | null | home/migrations/0002_auto_20210320_2138.py | MatheusAfinovicz/MathsBurguer | 82b8cd1499989ac46bb341296bfdd7f432ae5481 | [
"MIT"
] | null | null | null | home/migrations/0002_auto_20210320_2138.py | MatheusAfinovicz/MathsBurguer | 82b8cd1499989ac46bb341296bfdd7f432ae5481 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-21 00:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='messagebox',
name='message',
... | 19.947368 | 52 | 0.591029 |
3fca61f7458a20f0cc657e059a14392b21971439 | 830 | py | Python | wb/main/environment/manifest/__init__.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 23 | 2022-03-17T12:24:09.000Z | 2022-03-31T09:13:30.000Z | wb/main/environment/manifest/__init__.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 18 | 2022-03-21T08:17:44.000Z | 2022-03-30T12:42:30.000Z | wb/main/environment/manifest/__init__.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 16 | 2022-03-17T12:24:14.000Z | 2022-03-31T12:15:12.000Z | """
OpenVINO DL Workbench
Modules for manipulating with manifest
Copyright (c) 2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICE... | 41.5 | 73 | 0.79759 |
3393383f642b04de44a4e21fc9b07efd53ba87ee | 2,080 | py | Python | iRONS/Software/day2week2month.py | csiro-hydrology/iRONS | 022182d85ed2e7799e5d65bb5b9ed04f91da7526 | [
"MIT"
] | 12 | 2020-12-15T23:39:26.000Z | 2021-10-30T18:48:35.000Z | iRONS/Software/day2week2month.py | csiro-hydrology/iRONS | 022182d85ed2e7799e5d65bb5b9ed04f91da7526 | [
"MIT"
] | 1 | 2021-05-12T08:34:06.000Z | 2021-06-11T10:11:15.000Z | iRONS/Software/day2week2month.py | csiro-hydrology/iRONS | 022182d85ed2e7799e5d65bb5b9ed04f91da7526 | [
"MIT"
] | 5 | 2020-09-12T14:38:46.000Z | 2021-07-17T15:56:36.000Z | # -*- coding: utf-8 -*-
"""
This is a function to transform daily data into weekly
This module is part of the iRONS toolbox by A. Peñuela and F. Pianosi and at
Bristol University (2020).
Licence: MIT
"""
import numpy as np
import pandas as pd
from datetime import timedelta
def day2week(dates,data,date_ini=None,date... | 38.518519 | 152 | 0.647596 |
18d72031e09d563514ea1fa41582dcb1f723387d | 13,877 | py | Python | nursereg/tasks.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | null | null | null | nursereg/tasks.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | 101 | 2015-01-15T14:01:29.000Z | 2016-10-03T15:21:53.000Z | nursereg/tasks.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | null | null | null | import requests
import json
from requests.exceptions import HTTPError
from datetime import datetime
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from celery import task
from celery.utils.log import get_task_logger
from celery.exceptions import SoftTimeLimitExceeded
from djceler... | 33.76399 | 79 | 0.60467 |
bc9f42616f0a016757d35f475b9f9dc2de759866 | 2,056 | py | Python | reversible2/classifier.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | reversible2/classifier.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | reversible2/classifier.py | robintibor/reversible2 | e6fea33ba41c7f76ee50295329b4ef27b879a7fa | [
"MIT"
] | null | null | null | import torch as th
from torch import nn
import numpy as np
from reversible2.sliced import norm_and_var_directions, sample_directions
from reversible2.gaussian import transform_gaussians_by_dirs
from reversible2.gaussian import get_gaussian_log_probs
class SubspaceClassifier(nn.Module):
def __init__(self, n_clas... | 37.381818 | 74 | 0.686284 |
4eb114453870f9471d4131fcff1d81163c7e7e95 | 4,424 | py | Python | HelmholtzAI/benchmarks/implementations/utils/summarize_data.py | mlcommons/hpc_results_v1.0 | a3f7469937aa44a48e186160a2e97464970cf72f | [
"Apache-2.0"
] | 3 | 2021-11-18T20:01:35.000Z | 2021-12-17T17:47:23.000Z | HelmholtzAI/benchmarks/implementations/utils/summarize_data.py | mlcommons/hpc_results_v1.0 | a3f7469937aa44a48e186160a2e97464970cf72f | [
"Apache-2.0"
] | 1 | 2022-03-16T07:29:30.000Z | 2022-03-31T10:19:07.000Z | HelmholtzAI/benchmarks/implementations/utils/summarize_data.py | mlcommons/hpc_results_v1.0 | a3f7469937aa44a48e186160a2e97464970cf72f | [
"Apache-2.0"
] | 1 | 2021-11-18T01:53:25.000Z | 2021-11-18T01:53:25.000Z | # The MIT License (MIT)
#
# Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
#
# 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... | 30.095238 | 82 | 0.680606 |
f1610878338446cf982cc551c8639f569b0414b4 | 472 | py | Python | panifex/__init__.py | lainproliant/panifex | 97782309ab669ecc5528e69e0bc76a8e65bc19f3 | [
"MIT"
] | null | null | null | panifex/__init__.py | lainproliant/panifex | 97782309ab669ecc5528e69e0bc76a8e65bc19f3 | [
"MIT"
] | null | null | null | panifex/__init__.py | lainproliant/panifex | 97782309ab669ecc5528e69e0bc76a8e65bc19f3 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------
# Panifex: The Python dependency-injection based build system.
#
# Author: Lain Musgrove (lainproliant)
# Date: Thursday, January 2 2020
#
# Released under a 3-clause BSD license, see LICENSE for more info.
# -----------------------------------------... | 36.307692 | 70 | 0.533898 |
19f09d97a43d009b58272323808cf4c102a7f0a8 | 2,563 | py | Python | dcmetro.py | mkaiser101/DCfoodtrucks | 955d8c746c8eee53801a073a1922f7c2a0fc7848 | [
"Apache-2.0"
] | null | null | null | dcmetro.py | mkaiser101/DCfoodtrucks | 955d8c746c8eee53801a073a1922f7c2a0fc7848 | [
"Apache-2.0"
] | null | null | null | dcmetro.py | mkaiser101/DCfoodtrucks | 955d8c746c8eee53801a073a1922f7c2a0fc7848 | [
"Apache-2.0"
] | null | null | null | ########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64, requests, pickle, json
class metro_client(object):
def __init__(self):
self.session = requests.Session()
def _handle_creds(self):
'''Reusable credential handler
Arguments:
... | 30.511905 | 101 | 0.521654 |
327fdbc02590f56e58325c21f715f374f8d73343 | 8,802 | py | Python | imperfecto/demos/regret_matching_demo.py | vlongle/Imperfecto | 0d9c75f1238b55e70533355e2cdef2f166e70f89 | [
"MIT"
] | 4 | 2022-03-05T01:25:31.000Z | 2022-03-08T07:52:28.000Z | imperfecto/demos/regret_matching_demo.py | vlongle/Imperfecto | 0d9c75f1238b55e70533355e2cdef2f166e70f89 | [
"MIT"
] | null | null | null | imperfecto/demos/regret_matching_demo.py | vlongle/Imperfecto | 0d9c75f1238b55e70533355e2cdef2f166e70f89 | [
"MIT"
] | null | null | null | """A demo for the regret-matching algorithm (Hart and Mas-Colell 2000) for various
N-player normal form games.
For 2-player zero-sum game, regret matching algorithm's average strategy provably converges to Nash.
However, it seems to work for more than 2-player games as well.
Usage:
Run::
$ python3 imperf... | 41.914286 | 120 | 0.69416 |
3d8de0b9f6069a704c0824dda5ecfa64e647e8dd | 74 | py | Python | 0364 Line of People.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | 1 | 2020-12-29T21:17:26.000Z | 2020-12-29T21:17:26.000Z | 0364 Line of People.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | null | null | null | 0364 Line of People.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | 4 | 2021-09-09T17:42:43.000Z | 2022-03-18T04:54:03.000Z | class Solution:
def solve(self, n, a, b):
return min(n-a,b+1)
| 18.5 | 29 | 0.554054 |
b66cc808b08aa8af3a91cdca379ed9b52a5a68d1 | 463 | py | Python | musicapp/migrations/0003_musician_slug.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | musicapp/migrations/0003_musician_slug.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | musicapp/migrations/0003_musician_slug.py | daniel-afana/MusicDB | c2c897d540e6e514403997510e91044f518c0328 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-14 11:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('musicapp', '0002_auto_20170814_0941'),
]
operations = [
migrations.AddField... | 22.047619 | 63 | 0.61987 |
5df75b06602427edaa4cffeddd06b1e9969783b9 | 3,725 | py | Python | kombu/transport/__init__.py | expa/kombu | 528ac975bd3b815ebe7d1b5f92126d5abd01c6cc | [
"BSD-3-Clause"
] | null | null | null | kombu/transport/__init__.py | expa/kombu | 528ac975bd3b815ebe7d1b5f92126d5abd01c6cc | [
"BSD-3-Clause"
] | null | null | null | kombu/transport/__init__.py | expa/kombu | 528ac975bd3b815ebe7d1b5f92126d5abd01c6cc | [
"BSD-3-Clause"
] | null | null | null | """
kombu.transport
===============
Built-in transports.
"""
from __future__ import absolute_import
from collections import Callable
from kombu.five import string_t
from kombu.syn import _detect_environment
from kombu.utils import symbol_by_name
def supports_librabbitmq():
if _detect_environment() == 'default... | 33.258929 | 76 | 0.645906 |
e3f39da13af1f3ad3dc42c15d8176c22e5fd4609 | 34,925 | py | Python | roles/custom_module/library/ibm_ss_node.py | dheren-git/ibm-spectrum-scale-install-infra | 21f86774a09d9c36fba1ca75e489c9d4b99768d3 | [
"Apache-2.0"
] | null | null | null | roles/custom_module/library/ibm_ss_node.py | dheren-git/ibm-spectrum-scale-install-infra | 21f86774a09d9c36fba1ca75e489c9d4b99768d3 | [
"Apache-2.0"
] | null | null | null | roles/custom_module/library/ibm_ss_node.py | dheren-git/ibm-spectrum-scale-install-infra | 21f86774a09d9c36fba1ca75e489c9d4b99768d3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# author: IBM Corporation
# description: Highly-customizable Ansible role module
# for installing and configuring IBM Spectrum Scale (GPFS)
# company: IBM
# license: Apache-2.0
ANSIBLE_METADATA = {
'status': ['preview'],
'supporte... | 40.005727 | 104 | 0.517051 |
94080e3e659d9a8ffa5950fa74300f54ea5bc0a1 | 829 | py | Python | python/tests/vrp/test_vrp_constraint_programming.py | memgraph/mage | 8c389146dfce35c436e941b04655d9f758351e46 | [
"Apache-2.0"
] | 67 | 2021-01-29T08:38:11.000Z | 2022-03-22T08:39:47.000Z | python/tests/vrp/test_vrp_constraint_programming.py | memgraph/mage | 8c389146dfce35c436e941b04655d9f758351e46 | [
"Apache-2.0"
] | 35 | 2021-04-12T12:51:17.000Z | 2022-03-18T13:24:39.000Z | python/tests/vrp/test_vrp_constraint_programming.py | memgraph/mage | 8c389146dfce35c436e941b04655d9f758351e46 | [
"Apache-2.0"
] | 4 | 2021-07-20T10:59:12.000Z | 2021-12-15T08:07:11.000Z | import pytest
import numpy as np
from mage.geography import InvalidDepotException
from mage.constraint_programming.vrp_cp_solver import VRPConstraintProgrammingSolver
@pytest.fixture
def default_distance_matrix():
return np.array([[0, 1, 2], [1, 0, 3], [2, 3, 0]])
def test_negative_depot_index_raise_exception(... | 30.703704 | 84 | 0.755127 |
869b03d716a0b33dbf3b52cd44039aff00f4ca96 | 11,297 | py | Python | ndbTools.py | jmtoung/26p | 84264015e3112daa2b20d83ac9d364fc4b497cea | [
"Apache-2.0"
] | 1 | 2020-05-27T17:01:35.000Z | 2020-05-27T17:01:35.000Z | ndbTools.py | jmtoung/26p | 84264015e3112daa2b20d83ac9d364fc4b497cea | [
"Apache-2.0"
] | null | null | null | ndbTools.py | jmtoung/26p | 84264015e3112daa2b20d83ac9d364fc4b497cea | [
"Apache-2.0"
] | null | null | null | from google.appengine.ext import ndb
import re
import datetime
# function for getting entity from GAE by key
def GetData(key):
return ndb.Key(urlsafe=key).get()
# function for querying GAE
def QueryData(model, queryParams):
newQueryParams = {}
if 'ancestor' in queryParams:
if isinstance(queryPara... | 33.722388 | 145 | 0.584403 |
11d987c38b6259f67c9f2f9e16180617e34a1f63 | 2,297 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/cli.py | volksman/integrations-core | 34405662b09bf4a8c32feaed16a4745c7e1f24c0 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/cli.py | volksman/integrations-core | 34405662b09bf4a8c32feaed16a4745c7e1f24c0 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/cli.py | volksman/integrations-core | 34405662b09bf4a8c32feaed16a4745c7e1f24c0 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import click
from .commands import ALL_COMMANDS
from .commands.utils import CONTEXT_SETTINGS, echo_success, echo_waiting, echo_warning
from .config import CONFIG_FILE, config_file_exists, load_config, ... | 33.779412 | 118 | 0.66478 |
bea4af61dd1830d9f746e08a30b19bf09c9600c0 | 3,478 | py | Python | tests/integration/test_azure_integrator.py | afreiberger/charm-azure-integrator | 9e3cac110042770dac2eb5f445b9909b730a4ca7 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2018-10-23T17:38:53.000Z | 2019-02-20T18:39:13.000Z | tests/integration/test_azure_integrator.py | afreiberger/charm-azure-integrator | 9e3cac110042770dac2eb5f445b9909b730a4ca7 | [
"ECL-2.0",
"Apache-2.0"
] | 20 | 2018-08-14T20:13:45.000Z | 2021-11-10T14:09:39.000Z | tests/integration/test_azure_integrator.py | charmed-kubernetes/charm-azure-integrator | 428ccf090191d9c61220e3e59ab485de6e0d2071 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2018-10-23T17:38:56.000Z | 2021-05-26T13:27:07.000Z | import logging
import pytest
import requests
log = logging.getLogger(__name__)
@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test, lb_charms):
if {"azure-integrator", "lb-consumer"} & ops_test.model.applications.keys():
# Allow for re-running a previous test or using an existing deploy... | 39.977011 | 89 | 0.612421 |
e50df4ef797c82d8e73c8ad90e95e302be1e4fec | 1,875 | py | Python | coverage/IN_CTS/0516-COVERAGE-bit-vector-h-562/generate_cts_test.py | asuonpaa/ShaderTests | 6a3672040dcfa0d164d313224446496d1775a15e | [
"Apache-2.0"
] | null | null | null | coverage/IN_CTS/0516-COVERAGE-bit-vector-h-562/generate_cts_test.py | asuonpaa/ShaderTests | 6a3672040dcfa0d164d313224446496d1775a15e | [
"Apache-2.0"
] | 47 | 2021-03-11T07:42:51.000Z | 2022-03-14T06:30:14.000Z | coverage/IN_CTS/0516-COVERAGE-bit-vector-h-562/generate_cts_test.py | asuonpaa/ShaderTests | 6a3672040dcfa0d164d313224446496d1775a15e | [
"Apache-2.0"
] | 4 | 2021-03-09T13:37:19.000Z | 2022-02-25T07:32:11.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2021 The GraphicsFuzz Project 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
#
# https://www.apache.org/licenses/LICEN... | 32.327586 | 90 | 0.720533 |
32972ae96d9aa978a6e61951baa7aeaf666bc52e | 14,868 | py | Python | pinkfish/analysis.py | tombohub/pinkfish | e5fdb4d197cd8d7c234125f46ddc462c62f3401d | [
"MIT"
] | null | null | null | pinkfish/analysis.py | tombohub/pinkfish | e5fdb4d197cd8d7c234125f46ddc462c62f3401d | [
"MIT"
] | null | null | null | pinkfish/analysis.py | tombohub/pinkfish | e5fdb4d197cd8d7c234125f46ddc462c62f3401d | [
"MIT"
] | null | null | null | """
Analysis of results.
This module contains some functions that were copied or derived
from the book "Trading Evolved" by Andreas F. Clenow.
Below is a correspondance I had with the author:
------------------------------------------------------------------------
Farrell
October 25, 2019 at 15:49
Hi Andreas,
I just... | 32.676923 | 90 | 0.589252 |
7b06e1838cbb0d4588c4a7905a6c1ea4faa47873 | 4,351 | py | Python | scripts/save_features.py | amudide/chemprop | 376bfc53bc6d449a48641539354ad51f6137e6c7 | [
"MIT"
] | null | null | null | scripts/save_features.py | amudide/chemprop | 376bfc53bc6d449a48641539354ad51f6137e6c7 | [
"MIT"
] | null | null | null | scripts/save_features.py | amudide/chemprop | 376bfc53bc6d449a48641539354ad51f6137e6c7 | [
"MIT"
] | null | null | null | """Computes and saves molecular features for a dataset."""
from multiprocessing import Pool
import os
import shutil
import sys
from typing import List, Tuple
from tqdm import tqdm
from tap import Tap # pip install typed-argument-parser (https://github.com/swansonk14/typed-argument-parser)
sys.path.append(os.path.di... | 36.258333 | 120 | 0.701218 |
8e56b5cab09ac119f7e5929f68511b2d02c4a2ba | 7,780 | py | Python | NeuroevolutionVehicles/simulation.py | ethanrange/neuroevolution-vehicles | fb423b6988a4ce56d3fbf35d705aa34cc6f6ec3e | [
"MIT"
] | null | null | null | NeuroevolutionVehicles/simulation.py | ethanrange/neuroevolution-vehicles | fb423b6988a4ce56d3fbf35d705aa34cc6f6ec3e | [
"MIT"
] | null | null | null | NeuroevolutionVehicles/simulation.py | ethanrange/neuroevolution-vehicles | fb423b6988a4ce56d3fbf35d705aa34cc6f6ec3e | [
"MIT"
] | null | null | null | from walls import *
from parameters import *
from car import Car, CarSensor, carPanel
from GeneticAlgorithm import createPopulation
from NeuralNetwork import NeuralNetwork
import visualisation as vc
import time as t
import json
class Simulation():
def __init__(self):
self.GenerationCount = 0
self... | 30.629921 | 131 | 0.532391 |
9c709941bf1f52dec018b7f9ee9f67535a956980 | 9,682 | py | Python | comgames/AI/TD.py | houluy/comgames | aa2bcb6ef0d16807bab0eebcfe9a4818aebc0c3b | [
"MIT"
] | 2 | 2018-02-21T16:00:20.000Z | 2018-06-18T10:22:21.000Z | comgames/AI/TD.py | houluy/comgames | aa2bcb6ef0d16807bab0eebcfe9a4818aebc0c3b | [
"MIT"
] | null | null | null | comgames/AI/TD.py | houluy/comgames | aa2bcb6ef0d16807bab0eebcfe9a4818aebc0c3b | [
"MIT"
] | null | null | null | import random
from collections import defaultdict, UserDict
import logging
import pickle
import pathlib
import json
import src.game
from .config import config
from .agent import Agent
class Value(UserDict):
def __init__(self):
super().__init__()
def _state2str(self, state):
return ''.join([s... | 43.809955 | 143 | 0.588928 |
31a4866eab2733223d13023f3a35cafb5439427a | 2,269 | py | Python | persist.py | XhinLiang/xhinliang-win | 2fbcdf08779644817e2e55ff4d202f85a6eb1d5f | [
"Apache-2.0"
] | null | null | null | persist.py | XhinLiang/xhinliang-win | 2fbcdf08779644817e2e55ff4d202f85a6eb1d5f | [
"Apache-2.0"
] | 22 | 2021-10-02T06:01:09.000Z | 2022-03-27T05:36:45.000Z | persist.py | XhinLiang/xhinliang-win | 2fbcdf08779644817e2e55ff4d202f85a6eb1d5f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import re
import urllib
def persist_md(md_file_path, output_dir, new_img_prefix):
url_downloader = urllib.URLopener()
change = False
md_lines = []
with open(md_file_path, 'r') as md_file:
str_arr = md_file_path.split('/')
relative_md_file_n... | 38.457627 | 112 | 0.556633 |
ae2810a2dd0ac9c4cf721c65422fc871991e4969 | 3,089 | py | Python | Software de Trading/tests/test_wallets.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | 1 | 2020-05-13T14:12:42.000Z | 2020-05-13T14:12:42.000Z | Software de Trading/tests/test_wallets.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | 7 | 2020-02-12T02:58:40.000Z | 2021-06-04T23:24:08.000Z | Software de Trading/tests/test_wallets.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | null | null | null | # pragma pylint: disable=missing-docstring
from tests.conftest import get_patched_freqtradebot
from unittest.mock import MagicMock
def test_sync_wallet_at_boot(mocker, default_conf):
default_conf['dry_run'] = False
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
get_balances=MagicMock(re... | 33.576087 | 62 | 0.58336 |
0885f4d475c69a945298e60aea52ff57dcb607df | 230 | py | Python | Tests/Inputs/exit.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 1,872 | 2015-01-02T18:56:47.000Z | 2022-03-31T07:34:39.000Z | Tests/Inputs/exit.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 675 | 2015-02-27T09:01:01.000Z | 2022-03-31T14:03:25.000Z | Tests/Inputs/exit.py | aisk/ironpython3 | d492fd811a0cee4d0a07cd46f02a29a3c90d964b | [
"Apache-2.0"
] | 278 | 2015-01-02T03:48:20.000Z | 2022-03-29T20:40:44.000Z | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
import sys
sys.exit()
| 32.857143 | 77 | 0.769565 |
6555a6272aea0b27abb7fa7c1a39904d02cddd2b | 876 | py | Python | problems/best_time_to_buy_and_sell_stock_iii/solution.py | jimit105/leetcode-submissions | ff20c54acf8ad71ed0851c81a0463520fca6a69f | [
"MIT"
] | null | null | null | problems/best_time_to_buy_and_sell_stock_iii/solution.py | jimit105/leetcode-submissions | ff20c54acf8ad71ed0851c81a0463520fca6a69f | [
"MIT"
] | null | null | null | problems/best_time_to_buy_and_sell_stock_iii/solution.py | jimit105/leetcode-submissions | ff20c54acf8ad71ed0851c81a0463520fca6a69f | [
"MIT"
] | null | null | null | # Approach 1 - Bidirectional Dynamic Programming
# Time: O(N)
# Space: O(N)
class Solution:
def maxProfit(self, prices: List[int]) -> int:
if len(prices) <= 1:
return 0
left_min, right_max = prices[0], prices[-1]
n = len(prices)
left_profits = [0] * n
... | 30.206897 | 80 | 0.505708 |
362a402755ef73e862afe8971882456f009c6d17 | 14,123 | py | Python | great_expectations/rule_based_profiler/rule_based_profiler.py | dewmeht/great_expectations | 7d359e039dea393b4c9051ab7a770fb9423024f4 | [
"Apache-2.0"
] | null | null | null | great_expectations/rule_based_profiler/rule_based_profiler.py | dewmeht/great_expectations | 7d359e039dea393b4c9051ab7a770fb9423024f4 | [
"Apache-2.0"
] | null | null | null | great_expectations/rule_based_profiler/rule_based_profiler.py | dewmeht/great_expectations | 7d359e039dea393b4c9051ab7a770fb9423024f4 | [
"Apache-2.0"
] | null | null | null | import uuid
from typing import Any, Dict, List, Optional
from ruamel.yaml.comments import CommentedMap
import great_expectations.exceptions as ge_exceptions
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.core.expectation_suite import ExpectationSuite
fro... | 43.860248 | 292 | 0.675423 |
721a63326d377030a45d29e6ab6ec896525492b6 | 1,538 | py | Python | ckanext-hdx_crisis/ckanext/hdx_crisis/dao/location_data_access.py | alexandru-m-g/hdx-ckan | 647f1f23f0505fa195601245b758edcaf4d25985 | [
"Apache-2.0"
] | 58 | 2015-01-11T09:05:15.000Z | 2022-03-17T23:44:07.000Z | ckanext-hdx_crisis/ckanext/hdx_crisis/dao/location_data_access.py | datopian/hdx-ckan | 2d8871c035a18e48b53859fec522b997b500afe9 | [
"Apache-2.0"
] | 1,467 | 2015-01-01T16:47:44.000Z | 2022-02-28T16:51:20.000Z | ckanext-hdx_crisis/ckanext/hdx_crisis/dao/location_data_access.py | datopian/hdx-ckan | 2d8871c035a18e48b53859fec522b997b500afe9 | [
"Apache-2.0"
] | 17 | 2015-05-06T14:04:21.000Z | 2021-11-11T19:58:16.000Z | '''
Created on Dec 8, 2014
@author: alexandru-m-g
'''
import logging
import ckan.logic as logic
import ckan.model as model
import ckanext.hdx_crisis.dao.data_access as data_access
import ckanext.hdx_theme.helpers.top_line_items_formatter as formatters
from ckan.common import c
get_action = logic.get_action
DataAc... | 28.481481 | 101 | 0.735371 |
0bf660edadd12f37c5d93c674b3c544660d4a84c | 2,467 | py | Python | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 2 | 2018-01-20T13:35:54.000Z | 2021-11-24T16:11:20.000Z | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 10 | 2017-05-09T22:26:31.000Z | 2018-06-15T00:05:07.000Z | test/test_ABVD.py | SimonGreenhill/ABVDGet | 4d101577af00476c113394f014a6c74ba4351e0a | [
"BSD-3-Clause"
] | 1 | 2018-01-20T13:40:40.000Z | 2018-01-20T13:40:40.000Z | import os
import unittest
import tempfile
from abvdget import ABVDatabase, Record
TESTDATA = os.path.join(os.path.dirname(__file__), 'nengone.json')
EXPECTED = {
99: {
"LID": 99,
"Annotation": "arm and hand",
"Cognacy": '1',
"Item": "nin",
"Loan": None,
"Word": "ha... | 26.244681 | 79 | 0.544386 |
9c37efa38a138543911bc948dc1cc7931616c3b3 | 314 | py | Python | rio/utils/token.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | null | null | null | rio/utils/token.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 14 | 2016-04-14T04:18:41.000Z | 2016-05-12T03:46:37.000Z | rio/utils/token.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 1 | 2016-04-06T08:54:20.000Z | 2016-04-06T08:54:20.000Z | # -*- coding: utf-8 -*-
"""
rio.utils.token
~~~~~~~~~~~~~~~
"""
import random
import string
def password_generator(length):
"""Generate a random password.
:param length: integer.
"""
return ''.join(random.choice(string.ascii_lowercase + string.digits)
for _ in range(length))
| 18.470588 | 72 | 0.595541 |
4e7865369744d7dbf17e7762a32374d776f311cf | 756 | py | Python | python/schuelerpraktika/sascha_mueller/Aufgaben/Klassen.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | python/schuelerpraktika/sascha_mueller/Aufgaben/Klassen.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | python/schuelerpraktika/sascha_mueller/Aufgaben/Klassen.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
class konto:
def __init__(self,name,id,geld):
self.name = name
self.id = id
self.geld = geld
def einzahlen(z,geld):
if (geld>0):
self.geld = self.geld + geld
def auszahlen(self,geld):
if (geld<0):
self.geld = self.gel... | 19.384615 | 41 | 0.517196 |
49c663cbc7647958225a51740e3ad49eee2619a9 | 2,573 | py | Python | WuxiaWebScraping/WuxiaWebScraping.py | Zekihan/MyScripts | 083699a886391022c1d490267e6b8b3e43a1dab4 | [
"Apache-2.0"
] | 1 | 2020-08-13T16:48:07.000Z | 2020-08-13T16:48:07.000Z | WuxiaWebScraping/WuxiaWebScraping.pyw | Zekihan/MyScripts | 083699a886391022c1d490267e6b8b3e43a1dab4 | [
"Apache-2.0"
] | null | null | null | WuxiaWebScraping/WuxiaWebScraping.pyw | Zekihan/MyScripts | 083699a886391022c1d490267e6b8b3e43a1dab4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 16 15:26:17 2019
@author: Zekihan
"""
from tkinter import Tk,Scrollbar,RIGHT,Listbox,END,re,LEFT,mainloop,Y,BOTH
from tkinter import *
import webbrowser
def callback(evt):
w = evt.widget
index = int(w.curselection()[0])
if index%4 == 1:
url = w.get(i... | 32.56962 | 271 | 0.559658 |
8a24b4c3f33ed54ce2504b22521cf00a67e51d07 | 4,874 | py | Python | saleor/graphql/product/bulk_mutations/product_max_min.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/product/bulk_mutations/product_max_min.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | 4 | 2021-09-06T03:55:32.000Z | 2021-10-15T08:47:58.000Z | saleor/graphql/product/bulk_mutations/product_max_min.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | import graphene
from django.utils import timezone
from saleor.graphql.core.mutations import ModelBulkDeleteMutation, ModelMutation
from saleor.graphql.product.mutations.product_max_min import (
ProductMaxMinInput,
ProductMaxMinMixin,
)
from saleor.graphql.product.types.product_max_min import ProductMaxMin
fro... | 32.711409 | 88 | 0.678293 |
e7ab62c0bbc41e9bb0db29d96cd3e3fa4d367ab4 | 5,412 | py | Python | doubt/datasets/superconductivity.py | nobias-project/doubt | 270abc9b1fb8e708893d8c4782472488459a0262 | [
"MIT"
] | 27 | 2020-06-27T09:18:30.000Z | 2022-03-18T17:28:39.000Z | doubt/datasets/superconductivity.py | nobias-project/doubt | 270abc9b1fb8e708893d8c4782472488459a0262 | [
"MIT"
] | 27 | 2020-03-30T10:13:47.000Z | 2022-01-07T14:39:37.000Z | doubt/datasets/superconductivity.py | nobias-project/doubt | 270abc9b1fb8e708893d8c4782472488459a0262 | [
"MIT"
] | 2 | 2021-05-13T08:55:19.000Z | 2021-05-13T09:23:04.000Z | '''Superconductivity data set.
This data set is from the UCI data set archive, with the description being
the original description verbatim. Some feature names may have been altered,
based on the description.
'''
from ._dataset import BaseDataset, BASE_DATASET_DESCRIPTION
import pandas as pd
import zipfile
import io... | 32.214286 | 79 | 0.620288 |
171b73297ca3a9a29143236ae1de7ee9351e37c9 | 1,728 | py | Python | app/user/serializers.py | ChenyoisRita/recipe-app-api | 332cf47caa8b6232b2e6c4dfe61cc2d683de4f8d | [
"MIT"
] | null | null | null | app/user/serializers.py | ChenyoisRita/recipe-app-api | 332cf47caa8b6232b2e6c4dfe61cc2d683de4f8d | [
"MIT"
] | null | null | null | app/user/serializers.py | ChenyoisRita/recipe-app-api | 332cf47caa8b6232b2e6c4dfe61cc2d683de4f8d | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the users object"""
class Meta:
model = get_user_model()
fields = (... | 32 | 74 | 0.646412 |
206f7e4ad5605371c7d9d60af2e93bec8f73ec1f | 10,802 | py | Python | fakenet/listeners/RawListener.py | 4k4xs4pH1r3/flare-fakenet-ng | 596bb139b59eb15323510ed41e33661a40c8d80c | [
"Apache-2.0"
] | 1,360 | 2016-06-27T20:54:26.000Z | 2021-09-15T17:20:39.000Z | fakenet/listeners/RawListener.py | stevemk14ebr/flare-fakenet-ng | 706c0d4f1355e30f6abb25626fdcb3e53f2957e1 | [
"Apache-2.0"
] | 90 | 2016-08-29T17:25:24.000Z | 2021-07-17T15:19:46.000Z | fakenet/listeners/RawListener.py | stevemk14ebr/flare-fakenet-ng | 706c0d4f1355e30f6abb25626fdcb3e53f2957e1 | [
"Apache-2.0"
] | 335 | 2016-07-11T23:25:54.000Z | 2021-09-08T22:27:33.000Z | import logging
from ConfigParser import ConfigParser
import os
import sys
import imp
import base64
import threading
import SocketServer
import ssl
import socket
from . import *
INDENT = ' '
def qualify_file_path(filename, fallbackdir):
path = filename
if path:
if not os.path.exists(path):
... | 32.438438 | 147 | 0.560174 |
ef5eef0494390fbb8a48ff3ea37625c1f3a7c567 | 3,578 | py | Python | lib/googlecloudsdk/command_lib/certificate_manager/util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/certificate_manager/util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/certificate_manager/util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. 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 requir... | 31.946429 | 115 | 0.754891 |
6049e203adf7a7017682e027c613ec41f238e376 | 17,277 | py | Python | dface/core/detect.py | tobyclh/DFace | a2d8d303171691c59da381363aa89632fafca78b | [
"Apache-2.0"
] | null | null | null | dface/core/detect.py | tobyclh/DFace | a2d8d303171691c59da381363aa89632fafca78b | [
"Apache-2.0"
] | null | null | null | dface/core/detect.py | tobyclh/DFace | a2d8d303171691c59da381363aa89632fafca78b | [
"Apache-2.0"
] | null | null | null | import cv2
import time
import numpy as np
import torch
import torch.nn.functional as F
from dface.core.models import PNet,RNet,ONet
import dface.core.utils as utils
import dface.core.image_tools as image_tools
from torch.jit import script
def create_mtcnn_net(p_model_path=None, r_model_path=None, o_model_path=None, us... | 32.053803 | 101 | 0.515888 |
a7f323cdf696b18581d2b1afd1e51d44b4da6600 | 5,163 | py | Python | invenio_communities/communities/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | invenio_communities/communities/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | invenio_communities/communities/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2021 CERN.
# Copyright (C) 2021-2022 Northwestern University.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio Communities Service API... | 31.481707 | 79 | 0.592872 |
6dbbca48f5251ac90f83ed0420c774d1d5bbb849 | 452 | py | Python | datatypes_lab/io.py | jeremyosborne/examples-python | 5900b3a4f47d59de0a32d3257a8b90a44e80fdcd | [
"MIT"
] | null | null | null | datatypes_lab/io.py | jeremyosborne/examples-python | 5900b3a4f47d59de0a32d3257a8b90a44e80fdcd | [
"MIT"
] | null | null | null | datatypes_lab/io.py | jeremyosborne/examples-python | 5900b3a4f47d59de0a32d3257a8b90a44e80fdcd | [
"MIT"
] | null | null | null | """Lab:
Ask the user for their name.
Ask the user for their favorite color.
Fail politely if the user puts a ":" character in the name or color.
Write the name:color to the file "echo_out.txt".
Use a try/except and watch for IOError.
Before exiting, echo back all of the contents of the file, splitting
on the colon and... | 37.666667 | 79 | 0.761062 |
2a463476f35f096cdfe4c06e0cf455662421efd9 | 20,877 | py | Python | google/cloud/speech_v1p1beta1/services/speech/async_client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | google/cloud/speech_v1p1beta1/services/speech/async_client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | google/cloud/speech_v1p1beta1/services/speech/async_client.py | ufft47/python-speech | 3c908e213411593b5a53a6dd024b5610848b02d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.859244 | 207 | 0.629832 |
e79ba0565bdfba1ca92b3fee03ada7181349d20e | 6,539 | py | Python | src/PathEmb.py | zhangjiaobxy/PathEmb | 2b8627f106919b39152db11f52741980df6ba8f0 | [
"MIT"
] | 1 | 2019-08-15T19:22:54.000Z | 2019-08-15T19:22:54.000Z | src/PathEmb.py | zhangjiaobxy/PathEmb | 2b8627f106919b39152db11f52741980df6ba8f0 | [
"MIT"
] | null | null | null | src/PathEmb.py | zhangjiaobxy/PathEmb | 2b8627f106919b39152db11f52741980df6ba8f0 | [
"MIT"
] | null | null | null | # PathEmb package
import os, sys, subprocess, argparse
########################################################################
# step 0:
# print help info of PathEmb
# callExample:
# PathEmb.helpInfo()
def helpInfo():
parser = argparse.ArgumentParser(description = 'Run PathEmb.')
parser.add_argument('label', n... | 41.386076 | 154 | 0.583728 |
651955a3da848e15a6195d194d54c4c4d177d914 | 1,241 | py | Python | examples/hacker_news/hacker_news_tests/test_jobs/test_download_job.py | alexismanuel/dagster | b2cdf8cc985ad48ff203b44b664ff3cb4aded9a3 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | examples/hacker_news/hacker_news_tests/test_jobs/test_download_job.py | alexismanuel/dagster | b2cdf8cc985ad48ff203b44b664ff3cb4aded9a3 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | examples/hacker_news/hacker_news_tests/test_jobs/test_download_job.py | alexismanuel/dagster | b2cdf8cc985ad48ff203b44b664ff3cb4aded9a3 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import tempfile
from dagster import ResourceDefinition, fs_io_manager
from hacker_news.jobs.hacker_news_api_download import (
configured_pyspark,
hacker_news_api_download,
hourly_download_config,
)
from hacker_news.resources.hn_resource import hn_snapshot_client
from hacker_news.resources.parquet_io_manage... | 36.5 | 83 | 0.667204 |
4b88f2dfa7eed34f92fe45f277d7e65b50a4fe8c | 220 | py | Python | support/test/python/simple_python/print_env.py | cposture/vimspector | 2eb32f31533b79520ca6788fd41634525234d7e5 | [
"Apache-2.0"
] | 3,130 | 2018-05-25T20:02:11.000Z | 2022-03-31T00:37:59.000Z | support/test/python/simple_python/print_env.py | cposture/vimspector | 2eb32f31533b79520ca6788fd41634525234d7e5 | [
"Apache-2.0"
] | 517 | 2018-09-02T17:40:31.000Z | 2022-03-31T06:26:16.000Z | support/test/python/simple_python/print_env.py | cposture/vimspector | 2eb32f31533b79520ca6788fd41634525234d7e5 | [
"Apache-2.0"
] | 177 | 2018-11-14T12:33:33.000Z | 2022-03-30T05:46:36.000Z | #!/usr/bin/env python
import os
def Main():
print( os.environ.get( 'Something', 'ERROR' ) )
print( os.environ.get( 'SomethingElse', 'ERROR' ) )
for k, v in os.environ:
print( f'{ k } = "{ v }"' )
Main()
| 13.75 | 53 | 0.563636 |
5003b947bee991ef6ce844dd8209943da77ea8a8 | 3,219 | py | Python | haiku.py | balysv/HaikuBotto | 1fbe55552cd8ab152c2f2466b797dafe012a6894 | [
"Unlicense"
] | 3 | 2017-04-15T03:00:22.000Z | 2020-01-20T04:41:13.000Z | haiku.py | balysv/HaikuBotto | 1fbe55552cd8ab152c2f2466b797dafe012a6894 | [
"Unlicense"
] | null | null | null | haiku.py | balysv/HaikuBotto | 1fbe55552cd8ab152c2f2466b797dafe012a6894 | [
"Unlicense"
] | 1 | 2020-05-29T08:06:16.000Z | 2020-05-29T08:06:16.000Z | '''
MIT License Copyright(c) 2016 Balys Valentukevicius
Generates haiku and post them to Twitter. See self.config.py
for self.configuration options.
'''
import config
import markovify
import twitter
import sylco
import threading
import os
from random import randint
class HaikuBotto(object):
def __init__(self):
... | 36.168539 | 107 | 0.618515 |
8cf92e74a04518a24e2ea4b1f55d122a5d0ab40f | 772 | py | Python | lab/pytest/pytest-tut/test_one.py | diyarkudrat/SPD-2.3-Testing-And-Architecture | dde26e3a6aa02deeb7c0941971841b4f9e16f3fa | [
"MIT"
] | null | null | null | lab/pytest/pytest-tut/test_one.py | diyarkudrat/SPD-2.3-Testing-And-Architecture | dde26e3a6aa02deeb7c0941971841b4f9e16f3fa | [
"MIT"
] | null | null | null | lab/pytest/pytest-tut/test_one.py | diyarkudrat/SPD-2.3-Testing-And-Architecture | dde26e3a6aa02deeb7c0941971841b4f9e16f3fa | [
"MIT"
] | null | null | null | import pytest
def calculate_kinetic_energy(mass, velocity):
"""Returns kinetic energy of mass [kg] with velocity level."""
return 0.5 * mass * velocity ** 2
def get_average(li):
if len(li) < 1:
return None
sum = 0
for num in li:
sum += num
mean = sum / len(li)
return mea... | 18.829268 | 66 | 0.625648 |
e3d46266513df6cd0d782617fd530c63381f4967 | 10,636 | py | Python | udf/ext_strat_mentions.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | null | null | null | udf/ext_strat_mentions.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | null | null | null | udf/ext_strat_mentions.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | null | null | null | ##==============================================================================
## LOOK FOR STRATIGRAPHIC NOMENCLATURE - MENTION RECOGINITION
##==============================================================================
# ACQUIRE RELEVANT MODULES
#==================================================================... | 40.441065 | 211 | 0.516736 |
8339eddbf6e7e683581c18997f90a086f2e0fa63 | 903 | py | Python | Bugscan_exploits-master/exp_list/exp-back_77.pyc_dis.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-back_77.pyc_dis.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-back_77.pyc_dis.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #Embedded file name: taodi_cookie_cheat.py
if 0:
i11iIiiIii
def assign(service, arg):
if service == '''taodi''':
return (True, arg)
if 0:
O0 / iIii1I11I1II1 % OoooooooOO - i1IIi
def audit(arg):
o0OO00 = arg
oo, i1iII1IiiIiI1, iIiiiI1IiI1I1, o0OoOoOO00, I11i = curl.curl(dec... | 37.625 | 283 | 0.678848 |
9d78acd494ddf817080f2ad2a1eb629dab38f1ef | 6,839 | py | Python | tests/features/test_archive.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | 1 | 2021-12-02T15:13:47.000Z | 2021-12-02T15:13:47.000Z | tests/features/test_archive.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | null | null | null | tests/features/test_archive.py | ratschlab/tools-project-archives | a42ef1d3d60b24ff39ce5aa73a8fb332b4f25056 | [
"MIT"
] | null | null | null | import tarfile
import pytest
import archiver
from archiver import integrity
from archiver.archive import create_archive
from tests import helpers
from tests.helpers import run_archiver_tool, generate_splitting_directory
from .archiving_helpers import assert_successful_archive_creation, \
get_public_key_paths
de... | 43.56051 | 160 | 0.733002 |
e25478f32c227036b9dacc668b7b81e1e9627866 | 410 | py | Python | fdk_client/application/models/ProductListingPrice.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/models/ProductListingPrice.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/application/models/ProductListingPrice.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Application Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
from .Price import Price
from .Price import Price
class ProductListingPrice(BaseSchema):
# Catalog swagger.json
effective = fields.N... | 18.636364 | 52 | 0.736585 |
9a773603c4e9a1b0a6bf7cab1f3f3ede4add2a86 | 2,961 | py | Python | HW5/2b_all/2b_2/RNN_test.py | leo811121/UIUC-CS-547 | 2a1caeb8f006ce30bb7312cc977c7a87290a7858 | [
"CECILL-B"
] | 1 | 2021-01-26T14:34:08.000Z | 2021-01-26T14:34:08.000Z | HW5/2b_all/2b_2/RNN_test.py | leo811121/UIUC-CS-547 | 2a1caeb8f006ce30bb7312cc977c7a87290a7858 | [
"CECILL-B"
] | null | null | null | HW5/2b_all/2b_2/RNN_test.py | leo811121/UIUC-CS-547 | 2a1caeb8f006ce30bb7312cc977c7a87290a7858 | [
"CECILL-B"
] | 1 | 2021-01-26T14:32:59.000Z | 2021-01-26T14:32:59.000Z | import numpy as np
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
import torch.distributed as dist
import time
import os
import sys
import io
from RNN_model import RNN_model
glove_embeddings = np.load('/u/training/tra335/... | 28.747573 | 107 | 0.563999 |
530197119f3f99aa2dddf8019144447dd6d5e905 | 2,055 | py | Python | Kailash_Work/Other_Programs/date_time_operations.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | 3 | 2019-07-01T14:38:12.000Z | 2019-07-11T18:57:16.000Z | Kailash_Work/Other_Programs/date_time_operations.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | null | null | null | Kailash_Work/Other_Programs/date_time_operations.py | teamtact/learning-challenge-season-2 | aea5897df0e066f6c6ac1d5eb64584e23073db4f | [
"MIT"
] | 25 | 2019-07-01T08:58:40.000Z | 2019-07-02T05:55:31.000Z | #INCLUDE statements for using date and time attributes
import datetime
present = datetime.date.today()
print("Today's data is {}" .format(present)) #prints the today's date completely
#print different attributes of the date
print("Day is {}".format(present.day))
print("Month is {}".format(present.month))
print... | 37.363636 | 118 | 0.683698 |
bff786c0885f417ea998c1f60a21144d0bc6c9f7 | 14 | py | Python | openerp/tests/addons/test_impex/__init__.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 41 | 2019-02-12T10:15:19.000Z | 2021-02-14T00:04:47.000Z | odoo/openerp/addons/test_impex/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 2 | 2019-11-23T16:24:28.000Z | 2020-04-21T18:38:58.000Z | odoo/openerp/addons/test_impex/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 8 | 2019-08-26T01:55:26.000Z | 2021-01-23T22:18:35.000Z | import models
| 7 | 13 | 0.857143 |
5a94d8fde04876732ab61aa388e72ad29b8deb8d | 351 | py | Python | pages/process.py | artbrgn/NBA_Longevity | cd8b06adc116af4f27bf78b326f28e150b647f42 | [
"MIT"
] | 2 | 2020-01-23T14:55:13.000Z | 2020-01-23T14:55:25.000Z | pages/process.py | artbrgn/NBA_Longevity | cd8b06adc116af4f27bf78b326f28e150b647f42 | [
"MIT"
] | 5 | 2019-08-29T03:22:21.000Z | 2021-08-23T20:18:13.000Z | pages/process.py | artbrgn/NBA_Longevity | cd8b06adc116af4f27bf78b326f28e150b647f42 | [
"MIT"
] | 3 | 2019-12-13T05:09:33.000Z | 2020-01-07T17:02:32.000Z | import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
column1 = dbc.Col(
[
dcc.Markdown(
"""
## Process
"""
),
],... | 15.26087 | 43 | 0.603989 |
d932f92e9707d4d3f568eafda33a99186a9543ce | 4,686 | py | Python | mkdocs_awesome_pages_plugin/tests/navigation/test_meta.py | rarescosma/mkdocs-awesome-pages-plugin | 2788b3709f8dd0285e14d86a251b7e68c7020720 | [
"MIT"
] | null | null | null | mkdocs_awesome_pages_plugin/tests/navigation/test_meta.py | rarescosma/mkdocs-awesome-pages-plugin | 2788b3709f8dd0285e14d86a251b7e68c7020720 | [
"MIT"
] | null | null | null | mkdocs_awesome_pages_plugin/tests/navigation/test_meta.py | rarescosma/mkdocs-awesome-pages-plugin | 2788b3709f8dd0285e14d86a251b7e68c7020720 | [
"MIT"
] | null | null | null | from typing import Optional
from unittest import TestCase
from .base import NavigationTestCase
from ...meta import Meta
from ...navigation import NavigationMeta
from ...options import Options
from ...utils import normpath
class TestCommonDirname(TestCase):
def test_all_match(self):
self.assertEqual(
... | 31.24 | 80 | 0.612463 |
9965582855c872e910efdcc769e10e96ebcbd2bf | 21,718 | py | Python | examples/model_compression/ofa/run_glue_ofa.py | frozenfish123/PaddleNLP | b9c2910fb58730c8341067122c347cde5f6e7567 | [
"Apache-2.0"
] | 1 | 2021-06-15T14:20:00.000Z | 2021-06-15T14:20:00.000Z | examples/model_compression/ofa/run_glue_ofa.py | liliustb/PaddleNLP | 17fe183370809337d42390c0842272cef87c5c9d | [
"Apache-2.0"
] | null | null | null | examples/model_compression/ofa/run_glue_ofa.py | liliustb/PaddleNLP | 17fe183370809337d42390c0842272cef87c5c9d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appli... | 37.639515 | 109 | 0.59209 |
d5a74b972ed8455c4b9ae880dc9cf1853d3eb443 | 8,440 | py | Python | LogSystem_JE/venv/Lib/site-packages/pygments/lexers/pawn.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | LogSystem_JE/venv/Lib/site-packages/pygments/lexers/pawn.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | LogSystem_JE/venv/Lib/site-packages/pygments/lexers/pawn.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.pawn
~~~~~~~~~~~~~~~~~~~~
Lexers for the Pawn languages.
:copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer
from pygments.token import Text, Co... | 40.970874 | 84 | 0.448697 |
f248d7331b4abf4e141d68df28c70e4a3036da77 | 3,525 | py | Python | mergify_engine/actions/post_check.py | colmose/mergify-engine | bb52a6887c37e4bcf59a794dec7877600f607d03 | [
"Apache-2.0"
] | 1 | 2019-06-12T09:15:04.000Z | 2019-06-12T09:15:04.000Z | mergify_engine/actions/post_check.py | colmose/mergify-engine | bb52a6887c37e4bcf59a794dec7877600f607d03 | [
"Apache-2.0"
] | 16 | 2020-10-28T08:02:59.000Z | 2020-11-17T12:46:22.000Z | mergify_engine/actions/post_check.py | prosepro/mergify-engine | 7336b73b27d8fa4e007dfa87846b9221e4adadeb | [
"Apache-2.0"
] | 1 | 2018-08-20T11:40:59.000Z | 2018-08-20T11:40:59.000Z | # -*- encoding: utf-8 -*-
#
# Copyright © 2020 Mergify SAS
#
# 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... | 32.638889 | 103 | 0.614468 |
dcfdde23ab22c02959120a6a7c026c81d61f20fc | 6,734 | py | Python | nanodlna/cli.py | matgoebl/nano-dlna | 24ff2231d35e11dc25b76abd39af4e9d43e18b2b | [
"MIT"
] | null | null | null | nanodlna/cli.py | matgoebl/nano-dlna | 24ff2231d35e11dc25b76abd39af4e9d43e18b2b | [
"MIT"
] | null | null | null | nanodlna/cli.py | matgoebl/nano-dlna | 24ff2231d35e11dc25b76abd39af4e9d43e18b2b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
import argparse
import json
import os
import sys
import datetime
import tempfile
from . import devices, dlna, streaming
import logging
def set_logs(args):
if args.debug_activated:
log_filename = os.path.join(
tempfile.mkdtemp(),... | 26.616601 | 87 | 0.630383 |
dd483d6576879314688c8fd07c3b1d5f1f28616d | 1,377 | py | Python | flod_booking/api/ArrangementConflictsResource.py | Trondheim-kommune/Bookingbasen | 58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2017-10-17T12:15:28.000Z | 2017-10-17T12:15:28.000Z | flod_booking/api/ArrangementConflictsResource.py | Trondheim-kommune/Bookingbasen | 58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6 | [
"BSD-2-Clause-FreeBSD"
] | 6 | 2021-03-22T17:15:52.000Z | 2022-01-13T00:39:58.000Z | flod_booking/api/ArrangementConflictsResource.py | Trondheim-kommune/Bookingbasen | 58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-09-09T13:35:03.000Z | 2019-09-09T13:35:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from domain.models import Application
from flask.ext.bouncer import requires, GET
from flask.ext.restful import fields, marshal
from ArrangementBaseResource import ArrangementBaseResource
from BaseResource import ISO8601DateTime
from ResourceResource import resource_field... | 31.295455 | 87 | 0.753086 |
1489798413fa351f113f445731d64306f1ead86d | 495 | py | Python | env/Lib/site-packages/plotly/validators/histogram2d/_colorscale.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/histogram2d/_colorscale.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/histogram2d/_colorscale.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator):
def __init__(self, plotly_name="colorscale", parent_name="histogram2d", **kwargs):
super(ColorscaleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent... | 38.076923 | 86 | 0.682828 |
e44ad3cc5efe39dc156b584b81397bc54210d9a2 | 2,008 | py | Python | flash/core/serve/types/label.py | Actis92/lightning-flash | 49972268cfc0f95f1bd2b8fbf25036970cc44b59 | [
"Apache-2.0"
] | 1,457 | 2021-01-28T20:40:16.000Z | 2022-03-31T06:22:05.000Z | flash/core/serve/types/label.py | Actis92/lightning-flash | 49972268cfc0f95f1bd2b8fbf25036970cc44b59 | [
"Apache-2.0"
] | 1,123 | 2021-01-28T20:37:56.000Z | 2022-03-31T19:34:44.000Z | flash/core/serve/types/label.py | Actis92/lightning-flash | 49972268cfc0f95f1bd2b8fbf25036970cc44b59 | [
"Apache-2.0"
] | 170 | 2021-01-29T00:41:39.000Z | 2022-03-29T16:09:52.000Z | from dataclasses import dataclass, field
from pathlib import Path
from typing import Dict, List, Tuple, Union
import torch
from flash.core.serve.types.base import BaseType
@dataclass(unsafe_hash=True)
class Label(BaseType):
"""Type specifically made for labels that are mapped to a key.
Parameters
-----... | 37.886792 | 107 | 0.625498 |
cee315eed5f0a61687812085025ea0886ab98648 | 1,175 | py | Python | src/targetdb/models/unique_object.py | Subaru-PFS/ets_target_database | 781e4507c3a625de1a59e86dc18ec4f16cd1986f | [
"MIT"
] | null | null | null | src/targetdb/models/unique_object.py | Subaru-PFS/ets_target_database | 781e4507c3a625de1a59e86dc18ec4f16cd1986f | [
"MIT"
] | null | null | null | src/targetdb/models/unique_object.py | Subaru-PFS/ets_target_database | 781e4507c3a625de1a59e86dc18ec4f16cd1986f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from sqlalchemy import BigInteger
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import Float
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
# from sqlalchemy.exc import OperationalError... | 24.479167 | 83 | 0.676596 |
fd0453517c400232abc9e49aadb2e105e7f179a0 | 4,009 | py | Python | tests/test_traffic.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | tests/test_traffic.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | tests/test_traffic.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | import pandas as pd
from traffic.core import Flight
from traffic.data import eurofirs
from traffic.data.samples import switzerland
def test_properties() -> None:
assert len(switzerland) == 1244
assert f"{switzerland.start_time}" == "2018-08-01 05:00:00+00:00"
assert f"{switzerland.end_time}" == "2018-08-0... | 29.262774 | 80 | 0.589673 |
a010065d9926e79e2b2765d9da0b5eaa7164edf1 | 5,580 | py | Python | swagger_server/test/operational_controllers/test_site_and_domain_roles.py | hedleyroos/core-access-control | 9c275beecd4f37280f7234b358f5f9caad372378 | [
"BSD-3-Clause"
] | null | null | null | swagger_server/test/operational_controllers/test_site_and_domain_roles.py | hedleyroos/core-access-control | 9c275beecd4f37280f7234b358f5f9caad372378 | [
"BSD-3-Clause"
] | 71 | 2017-12-04T09:14:15.000Z | 2019-01-30T11:38:06.000Z | swagger_server/test/operational_controllers/test_site_and_domain_roles.py | hedleyroos/core-access-control | 9c275beecd4f37280f7234b358f5f9caad372378 | [
"BSD-3-Clause"
] | 1 | 2021-08-17T12:05:27.000Z | 2021-08-17T12:05:27.000Z | # coding: utf-8
from __future__ import absolute_import
import random
import uuid
from collections import OrderedDict
from ge_core_shared import db_actions, decorators
from flask import json
from project.settings import API_KEY_HEADER
from swagger_server.models.site_role import SiteRole # noqa: E501
from swagger_ser... | 33.214286 | 93 | 0.527419 |
2b427775708cea40073aaa346e9100ddc03ea188 | 4,811 | py | Python | Extensions/regexs.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | Extensions/regexs.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | Extensions/regexs.py | semustafacevik/SearchDomainDH | dc2409c42f6749b5e7f2373c60c21d463531a507 | [
"bzip2-1.0.6"
] | null | null | null | from Extensions.functions import *
import re
class Regexs:
def __init__(self, word):
self.word = word
self.totalResult = ''
self.getTotalResult()
self.disinfectedResult = self.totalResult
self.cleanResult()
self.temp = []
def cleanResult(self):
dirty... | 28.808383 | 145 | 0.503222 |
4ad03ecfd1691d42b2b55dffb97d331b5d887cfc | 984 | py | Python | Chapter 5 - Dictionary & Sets/02_dictionary_methods.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | null | null | null | Chapter 5 - Dictionary & Sets/02_dictionary_methods.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | null | null | null | Chapter 5 - Dictionary & Sets/02_dictionary_methods.py | alex-dsouza777/Python-Basics | 8f1c406f2319cd65b5d54dfea990d09fa69d9adf | [
"MIT"
] | 1 | 2021-04-21T10:23:08.000Z | 2021-04-21T10:23:08.000Z | myDict = {
"fast" : "Fast Learner in a quick manner",
"root" : "A Coder",
"marks" : [1,2,5],
"anotherdict" : {'root':'Player'},
1 : 2
}
#Dictionary Methods
print(myDict.keys()) #Prints the keys
print(type(myDict.keys())) #prints types
print(myDict.values()) #Shows values
print(list(myDict.keys()))... | 30.75 | 91 | 0.699187 |
b9b1a7b846749cce3c24fba766b55c7540c0e716 | 1,069 | py | Python | tethys/core/exceptions.py | tethys-platform/tethys | c27daf5a832b05f9d771b04355001c331bc08766 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-05-20T19:03:14.000Z | 2020-06-03T20:43:34.000Z | tethys/core/exceptions.py | tethys-platform/tethys | c27daf5a832b05f9d771b04355001c331bc08766 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tethys/core/exceptions.py | tethys-platform/tethys | c27daf5a832b05f9d771b04355001c331bc08766 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2020 Konstruktor, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 23.23913 | 74 | 0.775491 |
b8585b224f3c8ffe421bf63553fdde9cbde14ee4 | 8,420 | py | Python | RockPaperOrScissor/RockPaperOrScissor.py | TheBlackPlague/TensorflowExample | e9c7c259a83235bbc377da6c39d13ef6ec99ea06 | [
"MIT"
] | 1 | 2019-11-02T15:10:52.000Z | 2019-11-02T15:10:52.000Z | RockPaperOrScissor/RockPaperOrScissor.py | TheBlackPlague/TensorflowExample | e9c7c259a83235bbc377da6c39d13ef6ec99ea06 | [
"MIT"
] | null | null | null | RockPaperOrScissor/RockPaperOrScissor.py | TheBlackPlague/TensorflowExample | e9c7c259a83235bbc377da6c39d13ef6ec99ea06 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Shaheryar Sohail
#
# 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, me... | 34.793388 | 112 | 0.655107 |
5545a8c854970c4ab0b937590bb26837c1a840d3 | 2,197 | py | Python | Source/tools/Layer_Distance_Calculation/LN/draw_LN.py | Brian-ning/HMNE | 1b4ee4c146f526ea6e2f4f8607df7e9687204a9e | [
"Apache-2.0"
] | 1 | 2020-10-18T13:15:00.000Z | 2020-10-18T13:15:00.000Z | Source/tools/Layer_Distance_Calculation/LN/draw_LN.py | Brian-ning/HMNE | 1b4ee4c146f526ea6e2f4f8607df7e9687204a9e | [
"Apache-2.0"
] | null | null | null | Source/tools/Layer_Distance_Calculation/LN/draw_LN.py | Brian-ning/HMNE | 1b4ee4c146f526ea6e2f4f8607df7e9687204a9e | [
"Apache-2.0"
] | null | null | null | #coding: utf-8
import pickle
import networkx as nx
import matplotlib.pyplot as plt
layers = ['0_LN_1995_1999.txt','1_LN_2000_2004.txt','2_LN_2005_2009.txt','3_LN_2010_2014.txt']
graphs = []
nodes_infor = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, ... | 43.94 | 863 | 0.633591 |
aafa454ae47d86e107f5497ed75f0b66e83672d2 | 945 | py | Python | tests/applier/data_greenplum_cdc_applier_metacols.py | albertteoh/data_pipeline | a99f1c7412375b3e9f4115108fcdde517b2e71a6 | [
"Apache-2.0"
] | 16 | 2017-10-31T21:43:26.000Z | 2019-08-11T08:49:06.000Z | tests/applier/data_greenplum_cdc_applier_metacols.py | albertteoh/data_pipeline | a99f1c7412375b3e9f4115108fcdde517b2e71a6 | [
"Apache-2.0"
] | 1 | 2017-11-01T06:25:56.000Z | 2017-11-01T06:25:56.000Z | tests/applier/data_greenplum_cdc_applier_metacols.py | albertteoh/data_pipeline | a99f1c7412375b3e9f4115108fcdde517b2e71a6 | [
"Apache-2.0"
] | 9 | 2017-10-30T05:23:15.000Z | 2022-02-17T03:53:09.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.8 | 62 | 0.780952 |
faff181697c2e615cb476a1fe75ae920dfec092b | 4,127 | py | Python | ronin/utils/types.py | b0r3dd3v/konnichuwaf | 588643cc9d18ef951778c53e96b116483ca5c9c0 | [
"Apache-2.0"
] | 53 | 2016-12-25T02:10:38.000Z | 2021-09-27T18:48:26.000Z | ronin/utils/types.py | b0r3dd3v/konnichuwaf | 588643cc9d18ef951778c53e96b116483ca5c9c0 | [
"Apache-2.0"
] | 4 | 2016-12-28T04:39:27.000Z | 2020-05-04T18:34:02.000Z | ronin/utils/types.py | tliron/ronin | 588643cc9d18ef951778c53e96b116483ca5c9c0 | [
"Apache-2.0"
] | 8 | 2017-03-19T00:56:52.000Z | 2021-04-07T18:19:21.000Z | # Copyright 2016-2018 Tal Liron
#
# 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 writin... | 34.680672 | 87 | 0.660528 |
c693676bd9534c0534f1fb896b0fa309f1b6eb1e | 950 | py | Python | ams/ticket/migrations/0001_initial.py | magnuspedro/ams | 72ef810d14d9a4724e781489d081140be6674d60 | [
"MIT"
] | null | null | null | ams/ticket/migrations/0001_initial.py | magnuspedro/ams | 72ef810d14d9a4724e781489d081140be6674d60 | [
"MIT"
] | null | null | null | ams/ticket/migrations/0001_initial.py | magnuspedro/ams | 72ef810d14d9a4724e781489d081140be6674d60 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.4 on 2019-01-16 16:07
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ticket',
fields=[
('id', models... | 31.666667 | 118 | 0.564211 |
5c966f97748efbc5708c3d627780487c4e33f8d2 | 1,077 | py | Python | setup.py | Pack3tL0ss/pycentral | a61d263f5534bbb55ce45a63fcf06ba1b16c1aa0 | [
"MIT"
] | null | null | null | setup.py | Pack3tL0ss/pycentral | a61d263f5534bbb55ce45a63fcf06ba1b16c1aa0 | [
"MIT"
] | null | null | null | setup.py | Pack3tL0ss/pycentral | a61d263f5534bbb55ce45a63fcf06ba1b16c1aa0 | [
"MIT"
] | null | null | null | import setuptools
from os import path
this_directory=path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as fh:
long_description = fh.read()
setuptools.setup(
name="pycentral",
version="0.0.2",
author="aruba-automation",
author_email="aruba-auto... | 34.741935 | 83 | 0.661096 |
201d5b01be5b85ee551b03c86f5da9f7f5b70370 | 563 | py | Python | imgcls/data/dataset_mapper.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | null | null | null | imgcls/data/dataset_mapper.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | null | null | null | imgcls/data/dataset_mapper.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | null | null | null | '''
@Copyright (c) tkianai All Rights Reserved.
@Author : tkianai
@Github : https://github.com/tkianai
@Date : 2020-04-26 17:01:20
@FilePath : /ImageCls.detectron2/imgcls/data/dataset_mapper.py
@Description :
'''
from . import classification_utils as c_utils
from detectron2.data.da... | 28.15 | 74 | 0.703375 |
bf559d40f487cc6b1d7a396e68e5c2e8cf5cd2e2 | 1,061 | py | Python | docs/recipes/record_to_bag.py | ChrisTimperley/roswire | 3220583305dc3e90b8cf0a7653cbc1b9c7fdb83b | [
"Apache-2.0"
] | 4 | 2019-09-22T18:38:33.000Z | 2021-04-02T01:37:10.000Z | docs/recipes/record_to_bag.py | ChrisTimperley/roswire | 3220583305dc3e90b8cf0a7653cbc1b9c7fdb83b | [
"Apache-2.0"
] | 208 | 2019-03-27T18:34:39.000Z | 2021-07-26T20:36:07.000Z | docs/recipes/record_to_bag.py | ChrisTimperley/roswire | 3220583305dc3e90b8cf0a7653cbc1b9c7fdb83b | [
"Apache-2.0"
] | null | null | null | import time
import roswire
FN_SITL = '/ros_ws/src/ArduPilot/build/sitl/bin/arducopter'
FN_PARAMS = '/ros_ws/src/ArduPilot/copter.parm'
rsw = roswire.ROSWire()
sources = ['/opt/ros/indigo/setup.bash', '/ros_ws/devel/setup.bash']
with rsw.launch('roswire/example:mavros', sources) as system:
with system.roscore() ... | 36.586207 | 100 | 0.671065 |
97e357a31cd81f55fc5015d08d9f1dd7cd16edb4 | 5,672 | py | Python | test.py | HysMagus/Profesor2Cash | 990a88be41546f4d073ceeaeda0c148e9588374b | [
"MIT"
] | 47 | 2017-12-24T16:39:06.000Z | 2021-12-19T21:56:09.000Z | test.py | HysMagus/Profesor2Cash | 990a88be41546f4d073ceeaeda0c148e9588374b | [
"MIT"
] | 5 | 2017-12-25T06:21:02.000Z | 2021-09-07T23:34:11.000Z | test.py | HysMagus/Profesor2Cash | 990a88be41546f4d073ceeaeda0c148e9588374b | [
"MIT"
] | 21 | 2017-12-24T22:53:32.000Z | 2021-04-17T12:05:51.000Z | #!/usr/bin/env python
import main
import json
import sys
import telepot
from telegram import TelegramBot
from twitter import Twitter
import time
def test_get_coins_bittrex():
main.get_coins_bittrex()
assert len(main.symbol_name) > 0
assert len(main.name_symbol) > 0
assert main.symbol_name["BTC"] == "bitcoin"
asse... | 28.791878 | 287 | 0.715797 |
334d3900b722f0846bbededd958eedce23100053 | 592 | py | Python | setup.py | laureho/cellx | 425d1e6bb21e9243f8cd5be46a9235d23f3df2fc | [
"MIT"
] | null | null | null | setup.py | laureho/cellx | 425d1e6bb21e9243f8cd5be46a9235d23f3df2fc | [
"MIT"
] | null | null | null | setup.py | laureho/cellx | 425d1e6bb21e9243f8cd5be46a9235d23f3df2fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
setup(name='cellx',
version='0.1',
description='CellX libraries',
author='Alan R. Lowe, Christopher Soelistyo, Laure Ho',
author_email='a.lowe@ucl.ac.uk',
url='https://github.com/quantumjot/cellx',
packages=['cellx'],
install_... | 31.157895 | 61 | 0.486486 |
feca9a83ed470257fa32809a538a4c53ae9ef56c | 10,048 | py | Python | miners/xlm.py | parall4x/bittensor | abacb0b0f1b078d3103f516aff1328f049f9dc34 | [
"MIT"
] | null | null | null | miners/xlm.py | parall4x/bittensor | abacb0b0f1b078d3103f516aff1328f049f9dc34 | [
"MIT"
] | null | null | null | miners/xlm.py | parall4x/bittensor | abacb0b0f1b078d3103f516aff1328f049f9dc34 | [
"MIT"
] | null | null | null | #!/bin/python3.7
# The MIT License (MIT)
# Copyright © 2021 Yuma Rao
# 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, c... | 43.124464 | 158 | 0.642416 |
6502fd42b8998f6d0f73ba1b82be5b22ffd84bd8 | 1,164 | py | Python | var/spack/repos/builtin/packages/py-multidict/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-multidict/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-multidict/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyMultidict(PythonPackage):
"""Multidict is dict-like collection of key-value pairs where ... | 44.769231 | 95 | 0.725086 |
576f1b16ab7ab486a063b6563cf531b50a7d2b35 | 1,007 | py | Python | doctor_tests/installer/common/restore_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 3 | 2017-04-05T19:09:36.000Z | 2019-02-28T05:27:21.000Z | doctor_tests/installer/common/restore_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 2 | 2017-09-20T07:31:39.000Z | 2018-04-09T09:38:45.000Z | doctor_tests/installer/common/restore_congress.py | opnfv/doctor | 72a1f8c92f1692f1ea8dcb5bc706ec9939c30e0a | [
"Apache-2.0"
] | 7 | 2017-05-24T02:21:08.000Z | 2019-12-09T16:54:02.000Z | ##############################################################################
# Copyright (c) 2017 ZTE Corporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is avail... | 33.566667 | 78 | 0.594836 |
7442059ba07b2ed1d7164b9be60b8bbc92fec651 | 1,391 | py | Python | python/paddle/fluid/contrib/__init__.py | panyx0718/Paddle | 1ebd7434d545f8c439792468298f1108b631668e | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/__init__.py | panyx0718/Paddle | 1ebd7434d545f8c439792468298f1108b631668e | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/__init__.py | panyx0718/Paddle | 1ebd7434d545f8c439792468298f1108b631668e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 30.23913 | 74 | 0.775701 |
acc6590649121405f2beeb8ac5401d44fd7c0200 | 878 | py | Python | discordbot/commands/minigames/akinator_cmd.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | discordbot/commands/minigames/akinator_cmd.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | discordbot/commands/minigames/akinator_cmd.py | AXXIAR/MiniGamesBot | 7d2e15dfafbe703949326545177ea5782d52a294 | [
"MIT"
] | null | null | null | from discordbot.categories.minigames import Minigames
from discordbot.commands.command import Command
from discordbot.gamemanager import GameManager
from discordbot.user.discord_games.akinator_dc import AkinatorDisc
from discordbot.user.session import Session
class AkinatorCommand(Command):
bot = None
name = ... | 39.909091 | 134 | 0.751708 |
ad65998936d409d870cc039266c379615e86f31a | 9,493 | py | Python | docs/conf.py | criticalhop/ordered | 8783bd61fa3496e929c507f474340daecbcc2ae2 | [
"MIT"
] | 33 | 2021-08-16T08:21:14.000Z | 2022-01-04T03:24:04.000Z | docs/conf.py | criticalhop/ordered | 8783bd61fa3496e929c507f474340daecbcc2ae2 | [
"MIT"
] | 3 | 2021-08-13T18:55:40.000Z | 2021-08-16T06:44:15.000Z | docs/conf.py | criticalhop/ordered | 8783bd61fa3496e929c507f474340daecbcc2ae2 | [
"MIT"
] | 2 | 2021-09-01T17:47:11.000Z | 2021-09-19T04:48:48.000Z | # This file is execfile()d with the current directory set to its containing dir.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
#
# All configuration values have a default; values that are comme... | 33.426056 | 83 | 0.694617 |
beecdc7c6a002bd58f1c7f965469edcf47d60149 | 1,098 | py | Python | src/snapshot_data.py | deepakas/dstoolkit-mlops-base | 405d792c7448fc82734a2c16a4e5be780de2d0e2 | [
"MIT"
] | null | null | null | src/snapshot_data.py | deepakas/dstoolkit-mlops-base | 405d792c7448fc82734a2c16a4e5be780de2d0e2 | [
"MIT"
] | null | null | null | src/snapshot_data.py | deepakas/dstoolkit-mlops-base | 405d792c7448fc82734a2c16a4e5be780de2d0e2 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
import argparse
from azureml.core import Datastore
import utils
def main(datastore, data_path):
# Get snapshot of your data and save it in datastore
os.makedirs(data_path, exist_ok=True)
with open(... | 23.869565 | 71 | 0.687614 |
2d3b0da1f5ab68cfd171a61ed0f4d50998b4c160 | 387 | py | Python | count_1_in_binary.py | Jwy-jump/python_codesets | bb9a38d5dbf7be4d34b6b502ee684bb48dcfcd31 | [
"Apache-2.0"
] | null | null | null | count_1_in_binary.py | Jwy-jump/python_codesets | bb9a38d5dbf7be4d34b6b502ee684bb48dcfcd31 | [
"Apache-2.0"
] | null | null | null | count_1_in_binary.py | Jwy-jump/python_codesets | bb9a38d5dbf7be4d34b6b502ee684bb48dcfcd31 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
class Solution:
# @param num: an integer
# @return: an integer, the number of ones in num
def countOnes(self, num):
# write your code here
ret = 0
num &= 0xffffffff
while num != 0:
if num & 1:
ret += 1
num >>= 1
... | 22.764706 | 53 | 0.516796 |
e9d526ad48344c8cf91c79d9a383cb70b8f18c3c | 1,553 | py | Python | emukit/core/initial_designs/latin_design.py | mmahsereci/emukit | 5f6cd941784dcc3a9e1eb82466b306bf98e17a74 | [
"Apache-2.0"
] | 1 | 2020-03-07T08:26:12.000Z | 2020-03-07T08:26:12.000Z | emukit/core/initial_designs/latin_design.py | aerometu/emukit | 3e39e6000b90dd926d2e026fc2d42b6dea5beb04 | [
"Apache-2.0"
] | null | null | null | emukit/core/initial_designs/latin_design.py | aerometu/emukit | 3e39e6000b90dd926d2e026fc2d42b6dea5beb04 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import numpy as np
try:
import pyDOE
except ImportError:
raise ImportError('pyDOE needs to be installed in order to use latin design')
from .base import ModelFreeDesignBase
from .. import Parameter... | 33.042553 | 123 | 0.68255 |
c5e3931f12d3dd8efb819b2fcfddf3288568b33a | 1,002 | py | Python | apps/tts_tests/migrations/0001_initial.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | apps/tts_tests/migrations/0001_initial.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | apps/tts_tests/migrations/0001_initial.py | michaldomino/Voice-interface-optimization-server | fff59d4c5db599e35d4b5f3915bbb272d2000a26 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2021-03-21 11:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='TtsTest',
fields=[
... | 30.363636 | 118 | 0.562874 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.