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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73dd760eb7eeee35ecd7836a780605903f466cd6 | 42 | py | Python | astwro/exttools/__init__.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 6 | 2017-06-15T20:34:51.000Z | 2020-04-15T14:21:43.000Z | astwro/exttools/__init__.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 18 | 2017-08-15T20:53:55.000Z | 2020-10-05T23:40:34.000Z | astwro/exttools/__init__.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 2 | 2017-11-06T15:33:53.000Z | 2020-10-02T21:06:05.000Z | # coding=utf-8
from .Runner import Runner
| 14 | 26 | 0.761905 |
73ddbbe445acccbb58d676dedfdc5ce96db4c141 | 708 | py | Python | setup.py | Wykleph/Swarm | c0b10c673a555213fdf46dd0648a2c729dd33494 | [
"MIT"
] | 7 | 2018-10-04T01:15:03.000Z | 2018-11-03T01:51:28.000Z | setup.py | Wykleph/Swarm | c0b10c673a555213fdf46dd0648a2c729dd33494 | [
"MIT"
] | 2 | 2018-10-04T05:47:58.000Z | 2018-10-04T15:48:49.000Z | setup.py | Wykleph/Swarm | c0b10c673a555213fdf46dd0648a2c729dd33494 | [
"MIT"
] | 1 | 2018-10-04T03:57:46.000Z | 2018-10-04T03:57:46.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="Swarm",
version="0.0.3",
author="py-am-i",
author_email="duckpuncherirl@gmail.com",
description="Swarm is a strategy rouge-like space simulator game written with `pygame/python3`.",
lo... | 28.32 | 101 | 0.65678 |
73ddbcbad82a5d4cb55abfeca11847ac41c7e831 | 8,280 | py | Python | tests/integration/test_submission.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | null | null | null | tests/integration/test_submission.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | 1 | 2021-03-25T22:26:08.000Z | 2021-03-25T22:26:08.000Z | tests/integration/test_submission.py | ohsu-comp-bio/gen3-etl-lite | c91093e6c7b269db5baca41619a93356a68c4e97 | [
"MIT"
] | null | null | null | import uuid
import json
import pytest
import time
import requests
SLEEP_TIME=15
try:
from types import SimpleNamespace as SN
except ImportError as error:
class SN (object):
def __init__ (self, **kwargs):
self.__dict__.update(kwargs)
def __repr__ (self):
keys = sorted(s... | 40.788177 | 159 | 0.7093 |
73ddc3664c541f75e13cc636fe83f0a3c8181948 | 18,617 | py | Python | dali/python/nvidia/dali/plugin/paddle.py | truthiswill/DALI | 1c96cb62018138585b616888d4616646135cedad | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-12-25T01:36:32.000Z | 2019-12-25T01:36:32.000Z | dali/python/nvidia/dali/plugin/paddle.py | CZZLEGEND/DALI | efd1f39b32b893c320ad580e7e84557df8f73983 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/python/nvidia/dali/plugin/paddle.py | CZZLEGEND/DALI | efd1f39b32b893c320ad580e7e84557df8f73983 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | 41.64877 | 112 | 0.596337 |
73ddf5ea7fc34a59fb06937bd5e05dc5452b67d7 | 775 | py | Python | core/apps/home/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/home/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/home/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from django.urls import path, re_path
from apps.home import views
def repath_func(request):
from django.http import HttpResponseRedirect
return HttpResponseRedirect(request.path_info)
urlpatterns = [
# The home page
path('', v... | 26.724138 | 75 | 0.659355 |
73de01103f3993ddf915e121cfc1b5e897750f3d | 9,361 | py | Python | Implement_google_AdaptiveFL/ServerAndClient/FlowerEC10/server.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | 4 | 2021-12-13T06:03:35.000Z | 2022-03-22T05:12:41.000Z | Implement_google_AdaptiveFL/ServerAndClient/FlowerEC10/server.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | null | null | null | Implement_google_AdaptiveFL/ServerAndClient/FlowerEC10/server.py | kuihao/KuihaoFL | 69c9161497f2a82ab8ef2d785a0c7e2e6975a328 | [
"Apache-2.0"
] | null | null | null | from enum import Flag
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
from typing import Any, Callable, Dict, List, Optional, Tuple
import numpy as np
import flwr as fl
from flwr.server.strategy import FedAvg, FedYogi, FedAdam, FedAdagrad
from mypkg import (
ServerArg,
ModelNameGenerator,
secure_mkdir,... | 39.834043 | 145 | 0.67653 |
73de1a01211701cb3610f9942677e6795fc4c8ed | 7,218 | py | Python | core/argo/core/optimizers/ExtendedNesterovNonconst.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 4 | 2020-12-07T19:13:13.000Z | 2022-01-30T18:52:18.000Z | core/argo/core/optimizers/ExtendedNesterovNonconst.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 12 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:46:34.000Z | core/argo/core/optimizers/ExtendedNesterovNonconst.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 2 | 2021-03-02T18:31:04.000Z | 2021-03-02T21:56:43.000Z | '''
DOCUMENTATION:
Nesterov method with constant momentum factor is given in the work of Defazio:
https://arxiv.org/abs/1812.04634
See Table 1, page 3 - 'Modern Momentum' (here: beta is the momentum factor)
The Extended Nesterov method (without prox argument), is given in the follow... | 53.466667 | 170 | 0.694514 |
73de1bffb46de3df866150585652ad860bb192ae | 2,706 | py | Python | bcherry-web/playground/main.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 3 | 2016-11-13T09:06:41.000Z | 2021-09-11T23:36:19.000Z | bcherry-web/playground/main.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | null | null | null | bcherry-web/playground/main.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 2 | 2017-04-04T10:03:18.000Z | 2021-09-11T23:36:26.000Z | #!/usr/bin/env python
import os
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
import time
class MainHandler(webapp.RequestHandler):
def get(self):
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render... | 34.692308 | 78 | 0.746489 |
73de2f8ecea34a0ee1bced8502ba1bd0cdcc0760 | 2,170 | py | Python | python/sdk/setup.py | Omrisnyk/merlin | cc2dbeabe52ac6e413db7f7647ed54c7edb7695f | [
"Apache-2.0"
] | 97 | 2020-10-15T08:03:56.000Z | 2022-03-31T22:30:59.000Z | python/sdk/setup.py | babywyrm/merlin | 29f669ab613d6808d0186067b948496b508caa96 | [
"Apache-2.0"
] | 91 | 2020-10-26T03:15:27.000Z | 2022-03-31T10:19:55.000Z | python/sdk/setup.py | babywyrm/merlin | 29f669ab613d6808d0186067b948496b508caa96 | [
"Apache-2.0"
] | 26 | 2020-10-21T03:53:36.000Z | 2022-03-16T06:43:15.000Z | #!/usr/bin/env python
# Copyright 2020 The Merlin 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... | 27.468354 | 88 | 0.646544 |
73de4d0bb16a37bc57add7f17f9a5babc091adfa | 3,483 | py | Python | scripts/converter_v3.py | ATLAS-Titan/allocation-modeling | b315aa7ac0cf613ed02c59188ff19e9738f36aca | [
"Apache-2.0"
] | null | null | null | scripts/converter_v3.py | ATLAS-Titan/allocation-modeling | b315aa7ac0cf613ed02c59188ff19e9738f36aca | [
"Apache-2.0"
] | null | null | null | scripts/converter_v3.py | ATLAS-Titan/allocation-modeling | b315aa7ac0cf613ed02c59188ff19e9738f36aca | [
"Apache-2.0"
] | null | null | null | #
# Copyright European Organization for Nuclear Research (CERN)
# National Research Centre "Kurchatov Institute"
# Rutgers University
#
# 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 ... | 35.540816 | 79 | 0.480907 |
73de68566a7a5cadd2256d48bf99e427ce678fe8 | 2,816 | py | Python | src/fidesops/service/processors/post_processor_strategy/post_processor_strategy_filter.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | src/fidesops/service/processors/post_processor_strategy/post_processor_strategy_filter.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | src/fidesops/service/processors/post_processor_strategy/post_processor_strategy_filter.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Any, Optional, Dict
from fidesops.schemas.saas.strategy_configuration import (
FilterPostProcessorConfiguration,
StrategyConfiguration,
IdentityParamRef,
)
from fidesops.service.processors.post_processor_strategy.post_processor_strategy import (
PostProcessorStrategy,
... | 33.129412 | 184 | 0.628551 |
73de72a27148de0df4d07890ab3151d6fae7be4b | 4,061 | py | Python | models/learned_loss_old.py | allenai/interactron | 2be41b34adf6917348cb2440cded9975ec4f5d0d | [
"Apache-2.0"
] | 4 | 2022-03-30T06:07:32.000Z | 2022-03-31T02:05:18.000Z | models/learned_loss.py | allenai/interactron | 2be41b34adf6917348cb2440cded9975ec4f5d0d | [
"Apache-2.0"
] | null | null | null | models/learned_loss.py | allenai/interactron | 2be41b34adf6917348cb2440cded9975ec4f5d0d | [
"Apache-2.0"
] | 2 | 2022-03-30T10:05:42.000Z | 2022-03-31T02:05:23.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import matplotlib.pyplot as plt
import cv2
from models.detectron2_detector import Detectron2Detector
from models.gpt import GPT
from models.components import LinearBlock
from utils.constants import tlvis_classes
from utils.model_util... | 39.427184 | 116 | 0.664615 |
73de7b41da5d0cb9fcaa2203fc40713383b71f3a | 508 | py | Python | components/amp-utility/python/uhashlib.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/uhashlib.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/uhashlib.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # * coding: UTF8 *
"""
该模块实现相应 CPython 模块的子集,如下所示 , 模块实现二进制数据的散列算法。目前实现了SHA256算法。SHA256是深思熟虑之选,这是一种现代的加密安全算法。 这意味着单个算法既可覆盖任何散列算法的用例,也可覆盖与安全相关的使用,从而省略了诸如MD5或SHA1之类的遗留算法以节省时间。
SHA256 - 最新一代,现代散列算法
类
------------------------------
"""
class sha256(object):
"""
创建一个hasher对象,并选择性地将数据输入其中
"""
def __init__... | 14.111111 | 150 | 0.588583 |
73de89ee3a6f19f38f86e246786fc059f9542160 | 801 | py | Python | features/steps/calculating_tubing_descriptors.py | tonyroberts/project-tetra-display | ada1169d3884e61c06e90fe50a9886b50564c7dd | [
"MIT"
] | 4 | 2020-07-29T09:18:16.000Z | 2021-05-19T22:31:23.000Z | features/steps/calculating_tubing_descriptors.py | tonyroberts/project-tetra-display | ada1169d3884e61c06e90fe50a9886b50564c7dd | [
"MIT"
] | 44 | 2020-07-29T09:12:07.000Z | 2021-07-04T01:50:57.000Z | features/steps/calculating_tubing_descriptors.py | tonyroberts/project-tetra-display | ada1169d3884e61c06e90fe50a9886b50564c7dd | [
"MIT"
] | 4 | 2020-07-31T20:02:47.000Z | 2021-05-14T08:48:38.000Z | from behave import given, when, then
import server
from tetra_constants import DESCRIPTORS, NUMBER_OF_PATIENTS
@given("there are sensors connected")
def step_impl(context):
context.sensors = server.Sensors()
@given("there is a calculator to parse sensor data")
def step_impl(context):
context.calculator = s... | 27.62069 | 77 | 0.734082 |
73de95734ae8fc0d79749d49185671ba98ba9b5f | 5,644 | py | Python | src/test/tests/operators/lcs.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/operators/lcs.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/operators/lcs.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: LCS.py
#
# Tests: operator - LCS
#
# Programmer: Allen Sanderson
# Date: August 25, 2015
#
# Modifications:
# Kathleen Biagas, Thur Sep 17, 2020
# Shorten name used for 'Testing dat... | 31.18232 | 152 | 0.709426 |
73dec6057c60d6406f21eb32b61317c770f12e4c | 1,444 | py | Python | src/external/jemalloc.py | cychan-lbnl/devastator | a23bb21f9da5841fa2036edc68f3a89a2241831b | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-03-16T08:11:02.000Z | 2022-03-16T08:11:02.000Z | src/external/jemalloc.py | cychan-lbnl/devastator | a23bb21f9da5841fa2036edc68f3a89a2241831b | [
"BSD-3-Clause-LBNL"
] | null | null | null | src/external/jemalloc.py | cychan-lbnl/devastator | a23bb21f9da5841fa2036edc68f3a89a2241831b | [
"BSD-3-Clause-LBNL"
] | null | null | null | import shlex
@brutal.rule(caching='file')
def jemalloc_source():
url = "https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2"
tgz = brutal.download(url)
return brutal.untar(tgz)
@brutal.rule(caching='file')
@brutal.coroutine
def jemalloc_context():
src_dir = yield jemalloc_sourc... | 33.581395 | 135 | 0.698061 |
73dec81bad9814ee479aeb16c7b10c65c3486981 | 1,496 | py | Python | setup.py | jdidion/htsget-server | cd00c4165aadb66b21be4a0e5dbaaaddfa97ee64 | [
"CC0-1.0"
] | 1 | 2019-08-22T16:51:23.000Z | 2019-08-22T16:51:23.000Z | setup.py | jdidion/htsget-server | cd00c4165aadb66b21be4a0e5dbaaaddfa97ee64 | [
"CC0-1.0"
] | null | null | null | setup.py | jdidion/htsget-server | cd00c4165aadb66b21be4a0e5dbaaaddfa97ee64 | [
"CC0-1.0"
] | null | null | null | """
Build atropos.
Cython is run when
* no pre-generated C sources are found,
* or the pre-generated C sources are out of date,
* or when --cython is given on the command line.
"""
import sys
from setuptools import setup, find_packages
# Define install and test requirements based on python version
version_info = sys... | 25.355932 | 64 | 0.639037 |
73dee999b8fe71d0515f80076913941dcabb76d2 | 8,742 | py | Python | tests/calendar_cli/model/test_event.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 12 | 2015-10-14T09:05:48.000Z | 2021-06-27T11:32:48.000Z | tests/calendar_cli/model/test_event.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 18 | 2015-10-14T06:20:26.000Z | 2017-01-23T23:33:01.000Z | tests/calendar_cli/model/test_event.py | mogproject/calendar-cli | 095fe4cfe76bc1890742d22accef48a5f9f6ca45 | [
"Apache-2.0"
] | 4 | 2016-10-12T18:35:24.000Z | 2019-12-31T17:13:02.000Z | # encoding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
from datetime import datetime
import pytz
from mog_commons import unittest
from calendar_cli.model import EventTime, Event
from calendar_cli.i18n import MSG_ALL_DAY, MSG_WEEK_DAY
class TestEventTime(unittest.TestCase... | 53.304878 | 116 | 0.597461 |
73defb0da4dc8164f81c8b2c90d2ee6f8689cc24 | 47 | py | Python | geokey_wegovnow/management/commands/__init__.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | null | null | null | geokey_wegovnow/management/commands/__init__.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | 2 | 2017-02-22T13:20:29.000Z | 2018-11-07T16:39:33.000Z | geokey_wegovnow/management/commands/__init__.py | ExCiteS/geokey-wegonow | 66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | [
"MIT"
] | null | null | null | """All commands for the WeGovNow extension."""
| 23.5 | 46 | 0.723404 |
73defe04b20cb398fb6e5d985e57b4f8a7e89e50 | 2,375 | py | Python | sdks/python/appcenter_sdk/models/Symbols.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/Symbols.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/Symbols.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class Symbols(object... | 26.685393 | 80 | 0.550316 |
73df0f98ab8f4b7beafc278117fb89ae875e0922 | 2,320 | py | Python | python/pathilico/pygletelm/message.py | OtaYuji/pathilico | b28cb0d3db043de1f8a70723f8a8142b73b8c8bd | [
"Apache-2.0"
] | null | null | null | python/pathilico/pygletelm/message.py | OtaYuji/pathilico | b28cb0d3db043de1f8a70723f8a8142b73b8c8bd | [
"Apache-2.0"
] | null | null | null | python/pathilico/pygletelm/message.py | OtaYuji/pathilico | b28cb0d3db043de1f8a70723f8a8142b73b8c8bd | [
"Apache-2.0"
] | null | null | null | # Copyright
# 2019 Department of Dermatology, School of Medicine, Tohoku University
#
# 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/LICENS... | 29.367089 | 79 | 0.632759 |
73df28ddff17914b28a2ac223a604cdc97e21b05 | 3,899 | py | Python | apps/Analyzer_Datasets/time_series/lib_utils_time.py | c-hydro/hat | 6342f87237ae9e71f05d54264bce97299ab4eb61 | [
"MIT"
] | 1 | 2022-03-21T03:30:43.000Z | 2022-03-21T03:30:43.000Z | apps/Analyzer_Datasets/time_series/lib_utils_time.py | c-hydro/hat | 6342f87237ae9e71f05d54264bce97299ab4eb61 | [
"MIT"
] | 3 | 2021-05-06T15:22:37.000Z | 2021-05-06T16:31:05.000Z | apps/Analyzer_Datasets/time_series/lib_utils_time.py | c-hydro/hat | 6342f87237ae9e71f05d54264bce97299ab4eb61 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------------------
# Libraries
import logging
import pandas as pd
from datetime import date
from lib_info_args import logger_name
# Logging
log_stream = logging.getLogger(logger_name)
# --------------------------------------------------------------... | 41.042105 | 111 | 0.568351 |
73df3c0eb8fec2b7771ceae6cfb845c8b3b75d43 | 5,726 | py | Python | platon/beacon/main.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/beacon/main.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/beacon/main.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | from typing import (
Any,
Dict,
)
import requests
from platon.module import (
Module,
)
class Beacon(Module):
def __getattribute__(self):
raise ModuleNotFoundError('This module is not available')
# def __init__(
# self,
# base_url: str,
# session: requests.Sessi... | 36.941935 | 85 | 0.634125 |
73df615a6efac0b92b33237a3a04b2320bdb4875 | 1,096 | py | Python | ui/app_list/PRESUBMIT.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | ui/app_list/PRESUBMIT.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | ui/app_list/PRESUBMIT.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for app_list.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | 33.212121 | 79 | 0.760949 |
73df7ab71f5006a9b92cb7673900fa39c40718f8 | 45,836 | py | Python | tests/curve_dags/test_data.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 1 | 2021-03-03T07:00:02.000Z | 2021-03-03T07:00:02.000Z | tests/curve_dags/test_data.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 36 | 2021-11-26T00:08:49.000Z | 2021-11-26T00:09:33.000Z | tests/curve_dags/test_data.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 3 | 2020-06-30T02:38:17.000Z | 2022-01-19T06:14:08.000Z | curve_param = {
"torque_low_limit": 4.0,
"torque_up_limit_min": 26.0,
"torque_up_limit_max": 34.0,
"threshold": 0.30000001192092896,
"slope_threshold": 16.5905818939209,
"torque_threshold": 2.5,
"angle_threshold": 0.07500000298023224,
"angle_up_limit_min": 20.0,
"angle_up_limit_max":... | 20.34443 | 45 | 0.418012 |
73dfa520d48157846e90bf0a83321dc34ebe7176 | 123 | py | Python | webapp/admin.py | saintlyzero/Django-API-Assignment | 3e582f3388536df05c9c8e2ea2b6ab2fd6349a2d | [
"MIT"
] | 1 | 2019-11-20T10:00:56.000Z | 2019-11-20T10:00:56.000Z | webapp/admin.py | saintlyzero/Django-API-Assignment | 3e582f3388536df05c9c8e2ea2b6ab2fd6349a2d | [
"MIT"
] | null | null | null | webapp/admin.py | saintlyzero/Django-API-Assignment | 3e582f3388536df05c9c8e2ea2b6ab2fd6349a2d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Employees
# Register your models here.
admin.site.register(Employees) | 24.6 | 32 | 0.821138 |
73dfb28d8fc1858b1963cfe4cbb25f4e3947caaf | 781 | py | Python | func_tests/tests/projects/testsmsquestionnaire/project_test_sms_questionnaire_data.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/tests/projects/testsmsquestionnaire/project_test_sms_questionnaire_data.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/tests/projects/testsmsquestionnaire/project_test_sms_questionnaire_data.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from tests.logintests.login_data import USERNAME, PASSWORD
VALID_CREDENTIALS = {USERNAME: "quotareached@mailinator.com",
PASSWORD: "test123"}
PROJECT_NAME = "clinic3 test project"
UPGRADE_INSTRUCTION_MSG = u'You have reached your limit of 1000 free Submissions. Subscribe to a monthly subscription... | 52.066667 | 171 | 0.805378 |
73dfb2f89834f89c63524cd67d09c68a6f584df0 | 2,344 | py | Python | HackerRank/DynamicProg_MaxArraySum.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | HackerRank/DynamicProg_MaxArraySum.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | HackerRank/DynamicProg_MaxArraySum.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | '''Given an array of integers, find the subset of non-adjacent elements with the maximum sum. Calculate the sum of that subset.
For example, given an array arr= [-2, 1, 3, -4, 5] we have the following possible subsets:
Subset Sum
[-2, 3, 5] 6
[-2, 3] 1
[-2, -4] -6
[-2, 5] 3
[1, -4] -3
[1, 5] ... | 21.504587 | 140 | 0.682167 |
73dff2c940155d5cc3d594399f925533d8ecf12b | 10,772 | py | Python | doc/conf.py | glotzerlab/signac | a03a6d05d0f994ac9c4d5353533883e49cf6b386 | [
"BSD-3-Clause"
] | 100 | 2019-01-31T01:37:20.000Z | 2022-03-29T10:35:34.000Z | doc/conf.py | glotzerlab/signac | a03a6d05d0f994ac9c4d5353533883e49cf6b386 | [
"BSD-3-Clause"
] | 607 | 2019-01-31T14:08:17.000Z | 2022-03-31T21:51:48.000Z | doc/conf.py | glotzerlab/signac | a03a6d05d0f994ac9c4d5353533883e49cf6b386 | [
"BSD-3-Clause"
] | 31 | 2019-01-31T14:36:50.000Z | 2022-03-14T03:48:32.000Z | """signac documentation build configuration file.
This file is executed with the current directory set to its containing dir.
Note that not all possible configuration values are present in this
autogenerated file.
All configuration values have a default; values that are commented out serve
to show the default.
"""
... | 32.841463 | 85 | 0.702748 |
73dff4f34405910632f481fc2e5a3b3700c44449 | 3,842 | py | Python | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/libs/rosebot.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/libs/rosebot.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha/libs/rosebot.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Capstone Team Project. Code to run on a ROBOT (NOT a laptop).
This code defines the RoseBot class (the top-level class for a robot).
In the code that you write for making a robot do things,
you should construct a RoseBot object and then use it as in this example:
-----------------------------------------... | 45.2 | 79 | 0.530713 |
73dffd013f513141da172fae9acad35f1d938d13 | 7,036 | py | Python | djstripe/migrations/0006_2_3.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 937 | 2017-06-04T18:44:20.000Z | 2022-03-27T07:28:32.000Z | djstripe/migrations/0006_2_3.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 969 | 2017-06-05T01:57:20.000Z | 2022-03-31T23:42:54.000Z | djstripe/migrations/0006_2_3.py | ExtraE113/dj-stripe | 1b50be13fc99b624388a005b8aa1e26c57392203 | [
"MIT"
] | 309 | 2017-06-12T03:18:10.000Z | 2022-03-29T17:05:18.000Z | # Generated by Django 3.0.5 on 2020-04-10 02:30
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
import djstripe.enums
import djstripe.fields
class Migration(migrations.Migration):
dependencies = [("djstripe", "0001_initial")]
operations = [
migrat... | 42.131737 | 265 | 0.584565 |
73dfffedbdf487042aae7f145e1657c9691e0c82 | 16,308 | py | Python | easyml/helpers/model_builder.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | null | null | null | easyml/helpers/model_builder.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | null | null | null | easyml/helpers/model_builder.py | evancasey1/EasyML | 69f0c246cb7e1d6f7167eb504c30693088e703fd | [
"MIT"
] | 1 | 2020-10-25T08:14:33.000Z | 2020-10-25T08:14:33.000Z | import json
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.linear_model import LogisticRegression, LinearRegression
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
from sklearn.neighbors.nearest_centroid import NearestCentroid
from sklearn.preprocessing import S... | 37.40367 | 111 | 0.67194 |
73e016bee0bbdbd050f1186b02c0f18ced34620a | 93,863 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.576137 | 251 | 0.687886 |
73e0278697b45741896112b5a9a1676cd7d48dba | 654 | py | Python | scripts/Bluetooth/BLEClient.py | arsakhar/FitViz | 49bcfa74db6a023e2032c3662dc92ab27b554746 | [
"MIT"
] | 1 | 2020-11-24T14:13:52.000Z | 2020-11-24T14:13:52.000Z | scripts/Bluetooth/BLEClient.py | arsakhar/FitViz | 49bcfa74db6a023e2032c3662dc92ab27b554746 | [
"MIT"
] | null | null | null | scripts/Bluetooth/BLEClient.py | arsakhar/FitViz | 49bcfa74db6a023e2032c3662dc92ab27b554746 | [
"MIT"
] | null | null | null | import asyncio
from bleak import BleakClient
"""
BLE Client Class. Inherits from BleakClient.
"""
class BLEClient(BleakClient):
def __init__(self, address, loop):
super().__init__(address, loop)
"""
Connect to a specified device. **kwargs specifies timeout period
"""
def connect(self, **k... | 23.357143 | 84 | 0.646789 |
73e03e0047e6a3346b25645ca5934ce1fac17921 | 1,531 | py | Python | active_learning/acquisition_functions.py | a-r-j/FlowMO | 8109be8e2e095e4122873bc4e3d9e290c1986bfa | [
"MIT"
] | null | null | null | active_learning/acquisition_functions.py | a-r-j/FlowMO | 8109be8e2e095e4122873bc4e3d9e290c1986bfa | [
"MIT"
] | null | null | null | active_learning/acquisition_functions.py | a-r-j/FlowMO | 8109be8e2e095e4122873bc4e3d9e290c1986bfa | [
"MIT"
] | null | null | null | """
Module containing acquisition functions for active learning
"""
import numpy as np
from scipy.stats import norm
import gpflow
def gp_var(X: np.ndarray, model) -> np.ndarray:
"""
Suggests samples by maximising the predicted uncertainty (no exploitation, full exploration)
:param X: input data
:para... | 28.351852 | 96 | 0.663619 |
73e06726e327812647777baf08e220f3fc49f2f0 | 1,964 | py | Python | td_gen_layout_event_handles.py | sandeep-gh/PySimpleGui_UI_Generator | 602daef1035e0ea7173c8f3dd124ee806e6eb2bd | [
"MIT"
] | null | null | null | td_gen_layout_event_handles.py | sandeep-gh/PySimpleGui_UI_Generator | 602daef1035e0ea7173c8f3dd124ee806e6eb2bd | [
"MIT"
] | 1 | 2021-01-18T00:47:26.000Z | 2021-01-18T16:45:10.000Z | td_gen_layout_event_handles.py | sandeep-gh/PySimpleGui_UI_generator | 602daef1035e0ea7173c8f3dd124ee806e6eb2bd | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
import time
from layout_directive_definitions import Gelem, BlockLD
from layout_directive_definitions import TreeNodeLD
import random
import event_codegen as ecm
import layout_generator_step_by_step as lg
from everything_bagel_dictionary import everything_bagel
import event_codegen as ecm
bld1... | 33.288136 | 96 | 0.528513 |
73e06dbb955d7a5aeebada93f18e58d6eadb1094 | 4,700 | py | Python | mwe_discov_eval/databases/NgramDb.py | nicolaCirillo/mwe_discov_eval | 36f544a802f68d7e274627d57a65531ff23c4c5e | [
"MIT"
] | null | null | null | mwe_discov_eval/databases/NgramDb.py | nicolaCirillo/mwe_discov_eval | 36f544a802f68d7e274627d57a65531ff23c4c5e | [
"MIT"
] | null | null | null | mwe_discov_eval/databases/NgramDb.py | nicolaCirillo/mwe_discov_eval | 36f544a802f68d7e274627d57a65531ff23c4c5e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 1 20:58:38 2021
@author: nicol
"""
from shutil import copyfile
from .SqlDatabase import SqlDatabase
from . import sql_commands as sql
from mwe_discov_eval import messages
from mwe_discov_eval.utils import utils
COMMIT_EACH = 1000
class NgramDb(SqlDatabase):
"""A... | 29.559748 | 79 | 0.597234 |
73e07aaedeb89a21636a8561748cf0fbc8085ab8 | 125 | py | Python | dAAMs/__init__.py | yuxiang-zhou/DensePoseModel | 382d9cc2ccee629c64ec873110c3653bcc3a30fe | [
"MIT"
] | 1 | 2019-05-07T15:01:16.000Z | 2019-05-07T15:01:16.000Z | dAAMs/__init__.py | yuxiang-zhou/DenseHumanPose | 382d9cc2ccee629c64ec873110c3653bcc3a30fe | [
"MIT"
] | null | null | null | dAAMs/__init__.py | yuxiang-zhou/DenseHumanPose | 382d9cc2ccee629c64ec873110c3653bcc3a30fe | [
"MIT"
] | null | null | null | from .svs import SVS
from .base import dAAMs
from .fitter import LucasKanadeDAAMFitter
from .results import DAAMFitterResult
| 25 | 41 | 0.84 |
73e08ce7d5969de2ae54e2505fa7b449bfaf631a | 16,639 | py | Python | tensorflow/python/debug/wrappers/framework_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/debug/wrappers/framework_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/debug/wrappers/framework_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.89357 | 88 | 0.719274 |
73e0a59ba2647a2bcd63d30ed890d89cba61ee37 | 5,079 | py | Python | pytorch/torch/optim/adagrad.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/torch/optim/adagrad.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/torch/optim/adagrad.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | import torch
from .optimizer import Optimizer
class Adagrad(Optimizer):
"""Implements Adagrad algorithm.
It has been proposed in `Adaptive Subgradient Methods for Online Learning
and Stochastic Optimization`_.
Arguments:
params (iterable): iterable of parameters to optimize or dicts defining... | 41.631148 | 123 | 0.534554 |
73e0a9dc80cd46ff5074a070812f55801da17266 | 4,010 | py | Python | chapter_7_design/wake_transcribe.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | chapter_7_design/wake_transcribe.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | chapter_7_design/wake_transcribe.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
## VOICEBOOK REPOSITORY ##
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neur... | 33.140496 | 121 | 0.61995 |
73e0ae8db048d9e437287582bf92c241a88d16b4 | 3,063 | py | Python | brian2/monitors/ratemonitor.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/monitors/ratemonitor.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/monitors/ratemonitor.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from brian2.core.variables import Variables
from brian2.units.allunits import second, hertz
from brian2.units.fundamentalunits import Unit, Quantity
from brian2.groups.group import CodeRunner, Group
__all__ = ['PopulationRateMonitor']
class PopulationRateMonitor(Group, CodeRunner):
'''
Re... | 36.035294 | 79 | 0.624878 |
73e0d1840d2263197b0fc5f8c337460e5faa6272 | 478 | py | Python | askci/apps/api/admin.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 3 | 2019-11-21T09:04:36.000Z | 2019-11-23T13:29:43.000Z | askci/apps/api/admin.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 13 | 2019-11-21T20:28:23.000Z | 2019-11-26T19:34:22.000Z | askci/apps/api/admin.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | null | null | null | """
Copyright (C) 2019-2020 Vanessa Sochat.
This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
from django.contrib import admin
from askci.apps.api.models import Webhook
... | 23.9 | 72 | 0.736402 |
73e0e6413e54202a25babe46c933b015592be710 | 3,442 | py | Python | synapseutils/monitor.py | zimingd/synapsePythonClient | 6bddd4d9de2f06f6f79d8ce814ac57970d6bebee | [
"Apache-2.0"
] | null | null | null | synapseutils/monitor.py | zimingd/synapsePythonClient | 6bddd4d9de2f06f6f79d8ce814ac57970d6bebee | [
"Apache-2.0"
] | null | null | null | synapseutils/monitor.py | zimingd/synapsePythonClient | 6bddd4d9de2f06f6f79d8ce814ac57970d6bebee | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import functools
import traceback
import sys
from multiprocessing import Value, Lock
from synapseclient.utils import printTransferProgress
def notifyMe(syn, messageSubje... | 38.674157 | 112 | 0.612725 |
73e0ff5c2f299cb000f037297a6e449078332f9b | 6,065 | py | Python | cotk/dataloader/context.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 117 | 2019-03-14T15:06:42.000Z | 2022-02-28T07:06:34.000Z | cotk/dataloader/context.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 149 | 2019-03-12T09:43:21.000Z | 2020-08-24T02:56:34.000Z | cotk/dataloader/context.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 51 | 2019-03-14T15:12:48.000Z | 2021-08-09T03:37:48.000Z |
from typing import List, Any, Dict, Union, Optional
from .._utils.metaclass import DocStringInheritor
# For type checking
if False: #pylint: disable=using-constant-test
#pylint: disable=unused-import
from .vocab import Vocab
from .tokenizer import Tokenizer
from collections import OrderedDict
class _UNDEFINED()... | 32.961957 | 110 | 0.713768 |
73e1257004bfd59befcb10a0f4cedad704ba387d | 1,177 | py | Python | analysis/computation/ambitus.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | analysis/computation/ambitus.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | 4 | 2019-03-18T20:11:30.000Z | 2019-03-18T20:11:59.000Z | analysis/computation/ambitus.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | from collections import Counter
from analysis.computation import utils
def frequency(ambitus_list):
freq = Counter(ambitus_list)
r = [['Ambitus', 'Pieces']]
for k, v in sorted(freq.items()):
r.append([k, v])
return r
def frequency_pie(ambitus_list):
r = utils.aux_pie_chart(Counter(ambit... | 30.179487 | 95 | 0.649108 |
73e152dd67f965304d1b73b9f581bc57f6f82e12 | 1,752 | py | Python | setup.py | textX/EasyColorLang | b7b660777ef04422a9a9df5b59b15bb80df0e3b9 | [
"MIT"
] | null | null | null | setup.py | textX/EasyColorLang | b7b660777ef04422a9a9df5b59b15bb80df0e3b9 | [
"MIT"
] | null | null | null | setup.py | textX/EasyColorLang | b7b660777ef04422a9a9df5b59b15bb80df0e3b9 | [
"MIT"
] | null | null | null | import codecs
import os
from setuptools import find_packages, setup
PACKAGE_NAME = "EasyColorLang"
VERSION = "0.1"
AUTHOR = "Igor Majic"
AUTHOR_EMAIL = "majic753@gmail.com"
DESCRIPTION = "A syntax highlighting generator for any textX language"
KEYWORDS = "textX DSL python all languages highlighting coloring"
LICENSE ... | 31.854545 | 108 | 0.681507 |
73e1fd387d797e62b65c558c725eb9486b1e4469 | 267 | py | Python | Battleships/model/rules.py | ruslanabdulin1985/TheTask | 99e53bd283273a90233b29c8aa7aa4380211263b | [
"MIT"
] | null | null | null | Battleships/model/rules.py | ruslanabdulin1985/TheTask | 99e53bd283273a90233b29c8aa7aa4380211263b | [
"MIT"
] | null | null | null | Battleships/model/rules.py | ruslanabdulin1985/TheTask | 99e53bd283273a90233b29c8aa7aa4380211263b | [
"MIT"
] | null | null | null |
class Rules:
def __init__(self, mode, opponent):
if mode == 'standard':
self.ship_stack = [4,3,3,2,2,2,1,1,1,1]; # each element is a ship. e.g [4,3,3] say that there is 1 of type 4 and 2
self.opponent = opponent # human or computer
| 33.375 | 127 | 0.595506 |
73e242f22a9d8a0fc453ee5907bc2cb97f50d328 | 4,823 | py | Python | src/calc/serial/calc_B.py | paytonrodman/athena-analysis | f635338122e15c318dfd754d06cc3dbaa42273d2 | [
"BSD-3-Clause"
] | null | null | null | src/calc/serial/calc_B.py | paytonrodman/athena-analysis | f635338122e15c318dfd754d06cc3dbaa42273d2 | [
"BSD-3-Clause"
] | null | null | null | src/calc/serial/calc_B.py | paytonrodman/athena-analysis | f635338122e15c318dfd754d06cc3dbaa42273d2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# calc_B.py
#
# A program to calculate the effective magnetic field derived from the magnetic flux at the inner
# simulation edge, and compare to the average field in the disk.
#
# Usage: python calc_B.py [options]
#
import numpy as np
import os
import sys
#sys.path.insert(0, '/home/per29/rds/r... | 38.584 | 149 | 0.614763 |
73e248c16f95da21f08d549ef951aa4d3f852761 | 13,061 | gyp | Python | extensions/extensions.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | extensions/extensions.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | extensions/extensions.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'extensions.gypi',
],
'variables': {
'chromium_code': 1,
},
'targets': [
{
# GN version: //extensions/common
... | 39.222222 | 104 | 0.605696 |
73e24c193dfdeaaf093d4484761adb8ae1a8f670 | 1,838 | py | Python | Python_files/OD_matrix_estimation_GLS_Jan_weekday_PM_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/OD_matrix_estimation_GLS_Jan_weekday_PM_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/OD_matrix_estimation_GLS_Jan_weekday_PM_ext.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
import numpy as np
from numpy.linalg import inv
import json
# load logit_route_choice_probability_matrix
P = zload('../temp_files/logit_route_choice_probability_matrix_ext.pkz')
P = np.mat... | 27.848485 | 114 | 0.662677 |
73e252228f2622299f80336e10321317810bb8f5 | 18,823 | py | Python | cockroach/test_client.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | 1 | 2015-11-05T19:20:27.000Z | 2015-11-05T19:20:27.000Z | cockroach/test_client.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | cockroach/test_client.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import threading
import unittest
from cockroach import errors
from cockroach.interface import KVSender, TransactionOptions
from cockroach.kv import KV
from cockroach.http_sender import HTTPSender
from cockroach.methods import Methods
from cockroach.proto import api_pb2, config_pb2, data_pb2
... | 42.974886 | 95 | 0.579185 |
73e2554d4ceae16e3f4c0c8a20fa218a5d49a165 | 1,485 | py | Python | tests/configs/test_zoo_urls.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | 1 | 2020-06-03T07:47:36.000Z | 2020-06-03T07:47:36.000Z | tests/configs/test_zoo_urls.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | tests/configs/test_zoo_urls.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import unittest
from omegaconf import OmegaConf
from mmf.utils.configuration import load_yaml
from mmf.utils.download import DownloadableFile, check_header
from tests.test_utils import skip_if_no_network
class TestConfigsForKeys(unittest.TestCase):
def _test_zo... | 37.125 | 80 | 0.653872 |
73e25eacd8f566ad7c9b269120b9ab0e32ecc589 | 103 | py | Python | tests/_root_dir.py | sebastian-sz/tfdata-image-loader | 7ba03a37086a4bc318961d39b72db76ed1cd85cf | [
"MIT"
] | 1 | 2020-05-12T05:33:17.000Z | 2020-05-12T05:33:17.000Z | tests/_root_dir.py | sebastian-sz/tfdata-image-loader | 7ba03a37086a4bc318961d39b72db76ed1cd85cf | [
"MIT"
] | null | null | null | tests/_root_dir.py | sebastian-sz/tfdata-image-loader | 7ba03a37086a4bc318961d39b72db76ed1cd85cf | [
"MIT"
] | null | null | null | """Module for handling data paths."""
import os
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
| 20.6 | 53 | 0.737864 |
73e268ced93d4575771ba66687b9f2c9b34dbb5a | 22,563 | py | Python | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.006383 | 205 | 0.692018 |
73e26c42d03be84833d32be1b861e6d28d243796 | 1,173 | py | Python | deepreg/log.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 379 | 2020-07-18T22:00:53.000Z | 2022-03-31T05:17:29.000Z | deepreg/log.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 646 | 2020-07-18T08:55:48.000Z | 2022-03-29T02:24:54.000Z | deepreg/log.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 62 | 2020-07-26T05:00:23.000Z | 2022-02-22T21:58:19.000Z | """Module for logger."""
import logging
import os
import sys
def get(name: str) -> logging.Logger:
"""
Configure the logger with formatter and handlers.
The logger should be used as:
.. code-block:: python
from deepreg import log
logger = log.get(__name__)
The log level depend... | 25.5 | 86 | 0.660699 |
73e2703337e31d071623cfa6b64d721f4de6f113 | 989 | py | Python | setup.py | JHay0112/jmath | 3bccf7353c07152ff49ec6aa56785918c9f710ed | [
"MIT"
] | 7 | 2021-06-25T12:57:08.000Z | 2021-12-29T21:53:30.000Z | setup.py | JHay0112/jmath | 3bccf7353c07152ff49ec6aa56785918c9f710ed | [
"MIT"
] | 1 | 2021-08-11T02:16:12.000Z | 2021-08-12T06:05:21.000Z | setup.py | JHay0112/jmath | 3bccf7353c07152ff49ec6aa56785918c9f710ed | [
"MIT"
] | 1 | 2021-09-20T21:25:55.000Z | 2021-09-20T21:25:55.000Z | '''
setup.py
Author: Jordan Hay
Date: 2021-06-17
'''
from setuptools import setup, find_packages
# Open readme
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# Open version
with open("version.txt", "r", encoding="utf-8") as fh:
version = fh.readline()
setup(
... | 24.121951 | 66 | 0.608696 |
73e27040e83af8d285bcc929f8ab591bf957b9d5 | 3,998 | py | Python | alipay/aop/api/request/AlipayOpenAppAppcontentItemDeleteRequest.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/AlipayOpenAppAppcontentItemDeleteRequest.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/AlipayOpenAppAppcontentItemDeleteRequest.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.AlipayOpenAppAppcontentItemDeleteModel import AlipayOpenAppAppcontentItemDeleteModel
class AlipayOpenAppAppcontentItemDeleteRequest(... | 27.572414 | 148 | 0.646823 |
73e293d9729126dcbc6df04ad609fd3212e9bcf9 | 81,399 | py | Python | tests/test_tools.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | tests/test_tools.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | tests/test_tools.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | from copy import copy
import habanero
import pytest
import datetime as dt
from regolith.tools import (
filter_publications,
filter_presentations,
fuzzy_retrieval,
fragment_retrieval,
number_suffix,
latex_safe,
update_schemas,
group,
is_fully_appointed,
group_member_ids,
gro... | 37.356127 | 304 | 0.416676 |
73e2a262a92dde10c0a4c402338d30236552f731 | 3,963 | py | Python | src/sardana/macroserver/basetypes.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/basetypes.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/macroserver/basetypes.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 25.901961 | 88 | 0.645218 |
73e2afe12920cb00a999e054608caceb109c692e | 3,946 | py | Python | nmgr/orm/base_model.py | mesalu/Viv2.NodeManager | 9c616e7c42cb5d543030c00f5e99b6aa9439d108 | [
"MIT"
] | null | null | null | nmgr/orm/base_model.py | mesalu/Viv2.NodeManager | 9c616e7c42cb5d543030c00f5e99b6aa9439d108 | [
"MIT"
] | null | null | null | nmgr/orm/base_model.py | mesalu/Viv2.NodeManager | 9c616e7c42cb5d543030c00f5e99b6aa9439d108 | [
"MIT"
] | null | null | null | """
"""
import enum
def column_info(*, name=None, relation=None, autogenerate=False):
"""
Associates the given method, property, or attribute
as column info within the table representing a
collection of entities.
The name can optionally be remapped by providing a name
parameter as a string. E... | 34.614035 | 124 | 0.638368 |
73e2cdf9ab6475e3b5fa52b9c77da0577ca7110a | 3,926 | py | Python | openstackclient/compute/v2/host.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/host.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/host.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack, 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 agree... | 29.742424 | 77 | 0.579215 |
73e313d795a934476f76f2f3879d5418d5a01d3e | 4,795 | py | Python | API/src/main/resources/Lib/robot/model/tags.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/model/tags.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/model/tags.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 26.638889 | 79 | 0.638999 |
73e348da3b419db4a042e1e3c57b42b2c474ecc2 | 38 | py | Python | gender_extractor/__init__.py | wwydmanski/gender-extractor | 6e328ba4ed1b08e7a874c36d68248540c2d8debc | [
"MIT"
] | null | null | null | gender_extractor/__init__.py | wwydmanski/gender-extractor | 6e328ba4ed1b08e7a874c36d68248540c2d8debc | [
"MIT"
] | null | null | null | gender_extractor/__init__.py | wwydmanski/gender-extractor | 6e328ba4ed1b08e7a874c36d68248540c2d8debc | [
"MIT"
] | null | null | null | from .extractor import GenderExtractor | 38 | 38 | 0.894737 |
73e36b27b76b7c046d43b723895723dd84ac9303 | 72,174 | py | Python | modspectra/cube.py | Deech08/modspectra | 4af177418f9ac3e1ff30bf99968251ac143a96bc | [
"BSD-3-Clause"
] | 2 | 2020-06-04T13:09:50.000Z | 2020-06-04T13:10:03.000Z | modspectra/cube.py | Deech08/modspectra | 4af177418f9ac3e1ff30bf99968251ac143a96bc | [
"BSD-3-Clause"
] | 1 | 2020-10-29T19:55:57.000Z | 2020-10-29T19:55:57.000Z | modspectra/cube.py | Deech08/modspectra | 4af177418f9ac3e1ff30bf99968251ac143a96bc | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import os
from astropy import units as u
from spectral_cube import SpectralCube
import numexpr as ne
import dask.array as da
from dask import delayed
from dask.diagnostics import ProgressBar
import logging
from astropy.coordinates.representation import CylindricalRepresentation, CartesianRepresenta... | 47.265226 | 149 | 0.586569 |
73e3a95266788e4ab3dd425d648d0fd3c527d917 | 4,162 | py | Python | examples/kernelml-enhanced-ridge-example.py | Freedomtowin/kernel_optimizer | 2676044e0f287cd8dda8f9f92a6d3813544965e4 | [
"MIT"
] | 9 | 2019-10-03T18:02:29.000Z | 2021-08-09T09:30:33.000Z | examples/kernelml-enhanced-ridge-example.py | Freedomtowin/kernel_optimizer | 2676044e0f287cd8dda8f9f92a6d3813544965e4 | [
"MIT"
] | 1 | 2019-12-11T09:46:09.000Z | 2021-06-17T00:45:16.000Z | examples/kernelml-enhanced-ridge-example.py | Freedomtowin/kernel_optimizer | 2676044e0f287cd8dda8f9f92a6d3813544965e4 | [
"MIT"
] | 3 | 2020-04-18T10:41:56.000Z | 2021-06-17T02:06:14.000Z |
import kernelml
from numba import jit,njit, prange, types
# import seaborn
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn import linear_model
import numpy
train=pd.read_csv("DATA/kc_house_train_data.csv",dtype = {'bathrooms':float, 'waterfront':int, 'sqft_above':int, 'sqft_liv... | 37.836364 | 403 | 0.646084 |
73e3ce5423e1dc84cd4febe940a90fee9f6ff775 | 1,531 | py | Python | Python/Games/rpcV3.py | erikhayton/Portfolio | ee1e649fe6340911968f27207ad7253d3ddc2cde | [
"MIT"
] | null | null | null | Python/Games/rpcV3.py | erikhayton/Portfolio | ee1e649fe6340911968f27207ad7253d3ddc2cde | [
"MIT"
] | null | null | null | Python/Games/rpcV3.py | erikhayton/Portfolio | ee1e649fe6340911968f27207ad7253d3ddc2cde | [
"MIT"
] | null | null | null | import random
# more specified imput
# from random import randint
human_wins=0
computer_wins=0
winning_score=2
while human_wins < winning_score and computer_wins < winning_score:
print(f"Puny Human Score: {human_wins} Computer Score: {computer_wins}")
# shorter
human = input("Puny human: Input rock, paper,... | 25.516667 | 76 | 0.61855 |
73e3d3f4cc2f3697c5345fccbd0d3d02956e6f1e | 385 | py | Python | app/core/migrations/0010_auto_20201203_2152.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | app/core/migrations/0010_auto_20201203_2152.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | app/core/migrations/0010_auto_20201203_2152.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-03 21:52
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0009_auto_20201202_2144'),
]
operations = [
migrations.RenameField(
model_name='unemploymentbyindustry',
old_name='i... | 20.263158 | 48 | 0.607792 |
73e41ea9d55c6019ac5f31281c270fec65e9ea79 | 8,998 | py | Python | tests/test_validate.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | 1 | 2019-04-09T04:52:16.000Z | 2019-04-09T04:52:16.000Z | tests/test_validate.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | null | null | null | tests/test_validate.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | null | null | null | import yaml
import pytest
from operatorcourier.validate import ValidateCmd
from operatorcourier.format import unformat_bundle
from testfixtures import LogCapture
@pytest.mark.parametrize('bundle,expected_validation_results_dict', [
("tests/test_files/bundles/verification/noicon.valid.bundle.yaml",
{'error... | 46.14359 | 90 | 0.689153 |
73e437db070b903661a65cf95b8cb3437f67e6ac | 6,340 | py | Python | pypiserver/__init__.py | Y-Ge/pypiserver | f6dce96ee7c82a5d4db6cb501f0cd5af2a6d858e | [
"MIT"
] | 1 | 2019-03-18T17:47:54.000Z | 2019-03-18T17:47:54.000Z | pypiserver/__init__.py | DalavanCloud/pypiserver | 537034eb4323f0a84e66cb8d73e3b152c9d08744 | [
"MIT"
] | null | null | null | pypiserver/__init__.py | DalavanCloud/pypiserver | 537034eb4323f0a84e66cb8d73e3b152c9d08744 | [
"MIT"
] | null | null | null | import os
import re as _re
import sys
version = __version__ = "1.2.7"
__version_info__ = tuple(_re.split('[.-]', __version__))
__updated__ = "2019-01-31 18:43:27"
__title__ = "pypiserver"
__summary__ = "A minimal PyPI server for use with pip/easy_install."
__uri__ = "https://github.com/pypiserver/pypiserver"
class ... | 30.047393 | 79 | 0.603943 |
73e459323254e7d423c487948b57b38b79861676 | 6,289 | py | Python | code/generation-model/progressive_transformer/vocabulary.py | Merterm/-Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | 5 | 2022-03-14T15:52:09.000Z | 2022-03-30T11:42:47.000Z | code/generation-model/progressive_transformer/vocabulary.py | Merterm/Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | null | null | null | code/generation-model/progressive_transformer/vocabulary.py | Merterm/Modeling-Intensification-for-SLG | 800fff3d3c7bacc86c1db8382f7c2e68d2f0c074 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Vocabulary module
"""
from collections import defaultdict, Counter
from typing import List
import numpy as np
from torchtext.data import Dataset
from constants import UNK_TOKEN, DEFAULT_UNK_ID, \
EOS_TOKEN, BOS_TOKEN, PAD_TOKEN
class Vocabulary:
""" Vocabulary represents mapping between... | 33.452128 | 79 | 0.59771 |
73e46541472028aa4391bf5a949dc70d6afdbbb0 | 839 | py | Python | venv/lib/python3.6/site-packages/kubernetes/__init__.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/__init__.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/__init__.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 33.56 | 74 | 0.779499 |
73e483775b429775c6f14af3bf69a26e36441403 | 13,729 | py | Python | appcli/configuration/configuration_dir_state.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 2 | 2019-12-06T00:17:07.000Z | 2021-07-23T10:52:34.000Z | appcli/configuration/configuration_dir_state.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 172 | 2019-10-10T04:04:31.000Z | 2022-03-28T03:37:52.000Z | appcli/configuration/configuration_dir_state.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | 6 | 2019-10-04T02:56:35.000Z | 2021-05-07T02:10:27.000Z | #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
"""
States that the configuration directory can be in.
________________________________________________________________________________
Created by brightSPARK Labs
www.brightsparklabs.com
"""
# standard libraries
from collections import defaultdict
from pathlib import... | 41.35241 | 148 | 0.706169 |
73e49410c113212cc0d6966e28424954d6c36c5c | 1,503 | py | Python | tests/script_crawl.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | tests/script_crawl.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | tests/script_crawl.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | from grab.spider import Spider, Task
from grab.script import crawl
from grab.util.module import SPIDER_REGISTRY
from tests.util import BaseGrabTestCase, only_grab_transport
class TestSpider(Spider):
url = None
points = []
def prepare(self):
#from grab.spider.base import logger_verbose
#l... | 28.358491 | 79 | 0.665336 |
73e497c04c2fcbb36025b03b2393f753c6477b25 | 9,375 | py | Python | src/build/android/generate_jacoco_report.py | lazymartin/naiveproxy | 696e8714278e85e67e56a2eaea11f26c53116f0c | [
"BSD-3-Clause"
] | 2,219 | 2018-03-26T02:57:34.000Z | 2022-03-31T00:27:59.000Z | src/build/android/generate_jacoco_report.py | uszhen/naiveproxy | 0aa27e8bd37428f2124a891be1e5e793928cd726 | [
"BSD-3-Clause"
] | 250 | 2018-02-02T23:16:57.000Z | 2022-03-21T06:09:53.000Z | src/build/android/generate_jacoco_report.py | uszhen/naiveproxy | 0aa27e8bd37428f2124a891be1e5e793928cd726 | [
"BSD-3-Clause"
] | 473 | 2019-03-24T16:34:23.000Z | 2022-03-31T02:01:05.000Z | #!/usr/bin/env vpython3
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Aggregates Jacoco coverage files to produce output."""
from __future__ import print_function
import argparse
import fnmatch
imp... | 33.244681 | 80 | 0.686187 |
73e49bd316a0ad43366584823044db8639b86236 | 4,191 | py | Python | python/src/cryptopals/set5/challenge35.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | 1 | 2021-02-20T16:38:25.000Z | 2021-02-20T16:38:25.000Z | python/src/cryptopals/set5/challenge35.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | null | null | null | python/src/cryptopals/set5/challenge35.py | ocirne/cryptopals | 3835bbeef3e521d48814795b94d426139918b9cd | [
"Unlicense"
] | null | null | null | import random
import secrets
from abc import abstractmethod, ABC
from typing import Union
from Crypto.Cipher import AES
from cryptopals.basics import padding, strip_padding, InvalidPaddingException
from cryptopals.digests import SHA1
def aes_cbc_encrypt(priv_key: int, pt: bytes) -> bytes:
s = priv_key.to_bytes(... | 26.358491 | 77 | 0.575758 |
73e4b6f68858a7c98eb2dac179bf2cd9c1e8ce32 | 4,786 | py | Python | auv_control_pi/components/remote_proxy.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | 9 | 2016-10-02T06:59:37.000Z | 2020-09-24T15:36:10.000Z | auv_control_pi/components/remote_proxy.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | null | null | null | auv_control_pi/components/remote_proxy.py | adrienemery/auv-control-pi | 633fe89b652b07eb6ebe03c0550daa211b122297 | [
"MIT"
] | 4 | 2019-01-12T23:09:34.000Z | 2020-11-05T14:52:42.000Z | import logging
from autobahn.asyncio.component import Component, run
from ..config import config
from .ahrs import AHRS
from .auv_control import AUV
from .gps import GPSComponent
from .navigation import Navitgator
logger = logging.getLogger(__name__)
class RouterProxy:
"""A Proxy connect the remoute WAMP route... | 32.780822 | 113 | 0.648767 |
73e4bbeff1d7383061fde873163072fc28067bb2 | 7,511 | py | Python | src/menten_gcn/decorators/base.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | 11 | 2020-12-15T15:36:47.000Z | 2022-03-10T19:23:36.000Z | src/menten_gcn/decorators/base.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | 2 | 2021-01-14T15:04:59.000Z | 2021-01-14T19:24:00.000Z | src/menten_gcn/decorators/base.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | null | null | null | from menten_gcn.wrappers import WrappedPose
from typing import List, Tuple
class Decorator:
#########
# BASIC #
#########
def __init__(self):
pass
def get_version_name(self) -> str:
"""
Get a unique, versioned name of this decorator for maximal reproducability
""... | 33.53125 | 99 | 0.595926 |
73e4c63042c95f6f403b43246352a6981def574a | 2,700 | py | Python | kitchen/chef.py | TrasgoGroup/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | null | null | null | kitchen/chef.py | TrasgoGroup/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | 2 | 2021-02-04T10:32:13.000Z | 2021-02-12T10:11:46.000Z | kitchen/chef.py | MCruces-fz/Cell-Viewer | 4f2421e278b22926cd34e0600d0ecb12026d58c9 | [
"Apache-2.0"
] | 1 | 2021-04-30T11:37:37.000Z | 2021-04-30T11:37:37.000Z | """
A P A C H E L I C E N S E
------------
Version 2.0, January 2004
Copyright 2021 Miguel Cruces Fernández
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 cop... | 28.723404 | 72 | 0.61 |
73e4ce32efe6a5aa49530beaaec8b6bef590a48a | 2,352 | py | Python | Python/model/net.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T18:49:34.000Z | 2022-02-11T18:49:34.000Z | Python/model/net.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | Python/model/net.py | SCAN-NRAD/BrainRegressorCNN | 7917c6a6c4e3728db17ec762c63f8253392e6c04 | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
SCALE = 1.0
def conv_net_V7a_3d(features):
with tf.variable_scope('NET'):
input_layer = features["x"] / SCALE
output_layer = features["y"]
is_train = features["is_train"]
data = tf.reshape(input_layer, [-1, 256, 256, 256, 1])
conv1 = tf.layers.conv3d... | 38.557377 | 128 | 0.581207 |
73e4e35ebe538050aef86fdf0b70584528a62e78 | 6,052 | py | Python | tests/wallet/test_singleton_lifecycle.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | tests/wallet/test_singleton_lifecycle.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | tests/wallet/test_singleton_lifecycle.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | import asyncio
from typing import List, Tuple
from blspy import G2Element
from clvm_tools import binutils
from skynet.types.blockchain_format.program import Program, INFINITE_COST
from skynet.types.announcement import Announcement
from skynet.types.blockchain_format.coin import Coin
from skynet.types.blockchain_form... | 42.321678 | 119 | 0.791474 |
73e507f783025453646e323a102459079c087cc4 | 1,500 | py | Python | tests/test_util.py | nelson-liu/LSTMs-exploit-linguistic-attributes | 227ef83654f7db4510e18f44fcc994bdc4d6c54a | [
"MIT"
] | 5 | 2018-06-13T19:44:02.000Z | 2019-09-02T21:33:41.000Z | tests/test_util.py | nelson-liu/LSTMs-exploit-linguistic-attributes | 227ef83654f7db4510e18f44fcc994bdc4d6c54a | [
"MIT"
] | null | null | null | tests/test_util.py | nelson-liu/LSTMs-exploit-linguistic-attributes | 227ef83654f7db4510e18f44fcc994bdc4d6c54a | [
"MIT"
] | 3 | 2018-08-29T21:48:26.000Z | 2018-11-12T21:59:17.000Z | from __future__ import unicode_literals
from numpy.testing import assert_array_equal
from lstms_exploit_linguistic_attributes.utils import sort_batch_by_length
import torch
from .common.test_case import ReproducibleTestCase
class TestUtils(ReproducibleTestCase):
def test_sort_tensor_by_length(self):
dev... | 36.585366 | 79 | 0.631333 |
73e51e4211af1463f3d96979a261a45c4429319e | 6,228 | py | Python | examples/morphing/flight_conditions/morphed/range_constant_aoa.py | leal26/pyXFOIL | 88ff224be25cdb51eb821315f6e094f68fb13247 | [
"MIT"
] | 50 | 2016-03-15T17:24:55.000Z | 2021-12-28T07:32:45.000Z | examples/morphing/flight_conditions/morphed/range_constant_aoa.py | carsecond/AeroPy | 81685f364abd9536fc62dce114f14bef191dab8c | [
"MIT"
] | 22 | 2017-04-20T11:27:28.000Z | 2022-02-09T05:57:06.000Z | examples/morphing/flight_conditions/morphed/range_constant_aoa.py | carsecond/AeroPy | 81685f364abd9536fc62dce114f14bef191dab8c | [
"MIT"
] | 34 | 2016-03-04T15:57:37.000Z | 2022-02-15T20:06:54.000Z | import aeropy.xfoil_module as xf
from aeropy.geometry.airfoil import CST, create_x
from aeropy.morphing.camber_2D import *
from aeropy.aero_module import air_properties, Reynolds, LLT_calculator
from scipy.interpolate import griddata, RegularGridInterpolator
import numpy as np
import matplotlib.pyplot as plt
import pa... | 31.938462 | 102 | 0.595857 |
73e543796beab2fcacd8193c4d9787822e2162b4 | 3,526 | py | Python | ygoprodeck/constants.py | RonaldTheodoro/ygoprodeck-api-client | 2a64411e08f1b7e32cc60aca5ccd5b5369a4b380 | [
"MIT"
] | 1 | 2020-04-09T22:55:05.000Z | 2020-04-09T22:55:05.000Z | ygoprodeck/constants.py | RonaldTheodoro/ygoprodeck-api-client | 2a64411e08f1b7e32cc60aca5ccd5b5369a4b380 | [
"MIT"
] | 10 | 2018-12-08T02:48:47.000Z | 2021-10-02T20:18:10.000Z | ygoprodeck/constants.py | RonaldTheodoro/ygoprodeck-api-client | 2a64411e08f1b7e32cc60aca5ccd5b5369a4b380 | [
"MIT"
] | 2 | 2018-12-08T05:46:54.000Z | 2021-05-24T23:25:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ygoprodeck.constants
~~~~~~~~~~~~~~~~~~~~
Constant values.
"""
import enum
class EnumMixin(enum.Enum):
@classmethod
def is_valid_value(cls, value):
return any(item.value == value for item in cls)
@classmethod
def valid_values(cls):
... | 23.986395 | 71 | 0.647476 |
73e54f3d9b66b22d44d7d7e8f1269a8983eb9339 | 839 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/rootwrap/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/vmware/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/vmware/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 31.074074 | 78 | 0.688915 |
73e5660045f3586616bf85a8d339a4367b6343e9 | 10,015 | py | Python | doc/conf.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# signac-flow documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 16 14:21:08 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | 32.411003 | 113 | 0.716525 |
73e571f9b5d1e907543b01cf8d0cee822c5e2643 | 1,261 | py | Python | Python/ex113.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | 1 | 2021-02-16T17:36:53.000Z | 2021-02-16T17:36:53.000Z | Python/ex113.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | Python/ex113.py | maurovasconcelos/Ola-Mundo | 526c6c271fbe916c4f9f22153828e4d8c726a544 | [
"MIT"
] | null | null | null | def leiaint(msg):
while True: #repita infinitamente
try: #tente
n = int(input(msg))
except (ValueError, TypeError): #se o erro for Valuem ou Type, faça:
print('\033[31mERRO: Por favor, digite um número inteiro válido.\033[m ')
continue# ...
except (Keyboa... | 38.212121 | 86 | 0.599524 |
73e5a34199b931b8efbfd3f3bfcf4f6c676d45a5 | 4,815 | py | Python | hint/01/Miner-Training-Local-CodeSample-Approach1/MinerEnv.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | hint/01/Miner-Training-Local-CodeSample-Approach1/MinerEnv.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | hint/01/Miner-Training-Local-CodeSample-Approach1/MinerEnv.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | import sys
import numpy as np
from GAME_SOCKET_DUMMY import GameSocket #in testing version, please use GameSocket instead of GAME_SOCKET_DUMMY
from MINER_STATE import State
TreeID = 1
TrapID = 2
SwampID = 3
class MinerEnv:
def __init__(self, host, port):
self.socket = GameSocket(host, port)
self.s... | 41.153846 | 124 | 0.585047 |
73e5b173b2e19f5826c87f6f2796eb99f44bbbae | 20,304 | py | Python | intersight/models/iam_user.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_user.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_user.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamUser(object):
"""
NOTE: This class is auto... | 28.597183 | 374 | 0.593627 |
73e5b7ad4bf19b12c479c7fa20e280455f9be5f9 | 7,713 | py | Python | code/figures/supplement/figS8_schmidt_correction_approaches.py | gchure/quantitative_proteome | 90d15dd208647332aeb06cf7e16ab71a6b210820 | [
"MIT"
] | 2 | 2020-05-18T23:03:10.000Z | 2020-10-27T19:31:51.000Z | code/figures/supplement/figS8_schmidt_correction_approaches.py | gchure/quantitative_proteome | 90d15dd208647332aeb06cf7e16ab71a6b210820 | [
"MIT"
] | 1 | 2020-02-14T23:03:21.000Z | 2020-02-14T23:03:21.000Z | code/figures/supplement/figS8_schmidt_correction_approaches.py | RPGroup-PBoC/growth_limits | 90d15dd208647332aeb06cf7e16ab71a6b210820 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from scipy import stats
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker
import prot.viz
import prot.size
colors, palette = prot.viz.bokeh_theme()
# dataset_colors = prot.viz.dataset_colors()
prot.viz.plotting_style()
# Exponential fit function
from scipy.opti... | 40.171875 | 115 | 0.654868 |
73e5cdc6600030cfe462b4484058f2a16f1ca0f1 | 4,111 | py | Python | aviation_weather/forecast.py | StephenOrJames/aviation-weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | 2 | 2017-03-14T23:28:28.000Z | 2020-01-10T23:04:30.000Z | aviation_weather/forecast.py | aviationweather/aviation_weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | null | null | null | aviation_weather/forecast.py | aviationweather/aviation_weather | 35594cc1ba448acdea9123380cc47ac96d2107c8 | [
"MIT"
] | null | null | null | import re
import aviation_weather
from aviation_weather import exceptions
class Forecast(object):
"""The Forecast class represents a weather forecast.
Attributes:
type (MessageType): The type of forecast (e.g. 'TAF' or 'TAF AMD').
location (Location): The location associated with the forecast... | 35.747826 | 104 | 0.564096 |
73e5f2882cf433bca0fa8fb76f1eb89b9f97dbff | 13,955 | py | Python | dl/step1/create_onegoods_tf_record.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | dl/step1/create_onegoods_tf_record.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | dl/step1/create_onegoods_tf_record.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.449275 | 197 | 0.670799 |
73e5f4bb5d6e7aa955d952943cdd700d42dec584 | 7,817 | py | Python | NGram/prediction_2104/oyster_reader.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-02T14:16:14.000Z | 2021-09-02T14:16:14.000Z | NGram/prediction_2104/oyster_reader.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | null | null | null | NGram/prediction_2104/oyster_reader.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-20T02:59:47.000Z | 2021-09-20T02:59:47.000Z | import csv
from trip import trip
from user import user
class panelDataReader:
def __init__(self, file):
self.reader = csv.reader(open(file), delimiter=",")
self.header = self.reader.next()
self.lastRecord = None
def nextRecord(self):
try:
line = next(self.reader)
except StopIteration:
line = None
... | 29.277154 | 72 | 0.667008 |
73e6159ad96bf86c318bb44aefabc8909dc235a4 | 9,734 | py | Python | dbt/adapters/mysql/impl.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | dbt/adapters/mysql/impl.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | dbt/adapters/mysql/impl.py | avaitla/dbt-mysql | d5f09a4b75441710503819ebac31c52e67118ad2 | [
"Apache-2.0"
] | null | null | null | from concurrent.futures import Future
from dataclasses import asdict
from typing import Optional, List, Dict, Any, Iterable
import agate
import dbt
import dbt.exceptions
from dbt.adapters.base.impl import catch_as_completed
from dbt.adapters.sql import SQLAdapter
from dbt.adapters.mysql import MySQLConnectionManager
... | 34.034965 | 83 | 0.585576 |
73e6164ab2fcaaa33308e50702e8d93b8741e5f4 | 1,374 | py | Python | src/visitpy/visit_utils/src/moab.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_utils/src/moab.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_utils/src/moab.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #!/usr/bin/env python
# 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.
#****************************************************************************... | 34.35 | 98 | 0.586608 |
73e617742938fe8fab4f5cd358b896a4f5b41dbd | 209 | py | Python | ashbee/ashbee/doctype/gratuity_claim/test_gratuity_claim.py | iRaySpace/ashbee | c848bfa19c0ac6d2cdc1b31ca4488a2c98e573ef | [
"MIT"
] | 1 | 2019-05-15T12:55:06.000Z | 2019-05-15T12:55:06.000Z | ashbee/ashbee/doctype/gratuity_claim/test_gratuity_claim.py | iRaySpace/ashbee | c848bfa19c0ac6d2cdc1b31ca4488a2c98e573ef | [
"MIT"
] | null | null | null | ashbee/ashbee/doctype/gratuity_claim/test_gratuity_claim.py | iRaySpace/ashbee | c848bfa19c0ac6d2cdc1b31ca4488a2c98e573ef | [
"MIT"
] | 3 | 2019-05-15T12:55:26.000Z | 2019-12-31T14:34:49.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, 9t9IT and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestGratuityClaim(unittest.TestCase):
pass
| 19 | 44 | 0.770335 |
73e61db53a4e78c4849b1e3a4f9b05e0f83da4b4 | 1,348 | py | Python | portal/apps/dashboard/management/commands/subscriber_data.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/dashboard/management/commands/subscriber_data.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/dashboard/management/commands/subscriber_data.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
from os.path import join
from unicodecsv import writer
from django.core.management.base import BaseCommand
from django.conf import settings
from core.models import Article
from thedaily.models import Subscriber
from automatic_mail import latest_activity
class Command(BaseCommand):
help =... | 39.647059 | 79 | 0.626113 |
73e62338d35911e63f20d83a015a99ee32198695 | 910 | py | Python | sapp/pipeline/trim_trace_graph.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/pipeline/trim_trace_graph.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/pipeline/trim_trace_graph.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.
import logging
from typing import Tuple
from ..trace_graph import TraceGraph
from ..trimmed_trace_graph import TrimmedTraceGraph
from . imp... | 33.703704 | 85 | 0.72967 |
73e6245b4a279b327060a5be38a9264498866096 | 8,029 | py | Python | crypten/communicator/communicator.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2019-12-06T06:08:40.000Z | 2019-12-06T06:08:40.000Z | crypten/communicator/communicator.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 10 | 2021-02-03T16:45:53.000Z | 2021-04-07T16:24:17.000Z | crypten/communicator/communicator.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2021-02-10T06:15:02.000Z | 2021-02-10T06:15:02.000Z | #!/usr/bin/env python3
# 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.
import logging
import timeit
import torch
class Communicator:
"""
Abstract class defining the functions tha... | 35.526549 | 84 | 0.626977 |
73e62d052e7c8c432946e1da0cce302625659ce7 | 434 | py | Python | src/clusto/drivers/devices/appliance/basicappliance.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 216 | 2015-01-10T17:03:25.000Z | 2022-03-24T07:23:41.000Z | src/clusto/drivers/devices/appliance/basicappliance.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 23 | 2015-01-08T16:51:22.000Z | 2021-03-13T12:56:04.000Z | src/clusto/drivers/devices/appliance/basicappliance.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 49 | 2015-01-08T00:13:17.000Z | 2021-09-22T02:01:20.000Z |
from clusto.drivers import Device
from clusto.drivers.devices import PortMixin, IPMixin
class BasicAppliance(IPMixin, PortMixin, Device):
"""
Basic appliance Driver
"""
_clusto_type = 'appliance'
_driver_name = 'basicappliance'
_portmeta = { 'pwr-nema-5' : { 'numports':2, },
... | 24.111111 | 55 | 0.56682 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.