hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75add9850964e02003ea7b9fe4aadf86b5d2b4e2 | 2,249 | py | Python | package/spack-r-dorng/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-r-dorng/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-r-dorng/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 47.851064 | 78 | 0.681636 |
be3e4fd64ba04b7f02310f91fffd0685ab7a358b | 10,182 | py | Python | test/functional/rpc_signrawtransaction.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | null | null | null | test/functional/rpc_signrawtransaction.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | null | null | null | test/functional/rpc_signrawtransaction.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test transaction signing using the signrawtransaction* RPCs."""
from test_framework.test_framework imp... | 53.308901 | 712 | 0.72638 |
682c5608d4fd74e8f9ae82b587c9ae8124a46762 | 27,554 | py | Python | SMlib/widgets/externalshell/pythonshell.py | koll00/Gui_SM | d02d28b20ef2ae1aa602b9bb52a6bb55fd66be9c | [
"MIT"
] | 1 | 2021-01-25T02:13:36.000Z | 2021-01-25T02:13:36.000Z | SMlib/widgets/externalshell/pythonshell.py | koll00/Gui_SM | d02d28b20ef2ae1aa602b9bb52a6bb55fd66be9c | [
"MIT"
] | null | null | null | SMlib/widgets/externalshell/pythonshell.py | koll00/Gui_SM | d02d28b20ef2ae1aa602b9bb52a6bb55fd66be9c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""External Python Shell widget: execute Python script in a separate process"""
import sys
import os
import os.path as osp
import socket
from PyQt4.QtG... | 44.585761 | 81 | 0.57948 |
3a44e2f66ca046d6955fd8b4c797dc0146e6edf7 | 6,458 | py | Python | dqn_agent.py | kapalko/DRL_Banana_Collector | a3e5f2707c582fd6f1a15524ef9f5f89b1f7efc5 | [
"MIT"
] | null | null | null | dqn_agent.py | kapalko/DRL_Banana_Collector | a3e5f2707c582fd6f1a15524ef9f5f89b1f7efc5 | [
"MIT"
] | null | null | null | dqn_agent.py | kapalko/DRL_Banana_Collector | a3e5f2707c582fd6f1a15524ef9f5f89b1f7efc5 | [
"MIT"
] | null | null | null | import numpy as np
import random
from collections import namedtuple, deque
from model import QNetwork
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 64 # minibatch size
GAMMA = 0.99 # discount factor
TAU = 1e-3 ... | 39.864198 | 127 | 0.621555 |
28b74599b9fa9c137190b8bb8773b9cfda458c01 | 14,992 | py | Python | sdk/python/pulumi_azure_native/devices/v20191104/iot_hub_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20191104/iot_hub_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devices/v20191104/iot_hub_resource.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 49.154098 | 2,842 | 0.666222 |
55416475c51ae4ef89e3f7691be78c1145c9bc10 | 13,374 | py | Python | cryptoapis/model/inline_response40082.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/inline_response40082.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/inline_response40082.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 46.926316 | 484 | 0.597054 |
aca5846b4ac3a6f936467b2d15fe7196b235d270 | 5,699 | py | Python | funcat/func.py | HereticSK/funcat | 0d0549cec3e1da75d6023871c2e146f956b4193b | [
"Apache-2.0"
] | 806 | 2017-01-07T16:00:45.000Z | 2022-03-30T12:10:53.000Z | funcat/func.py | dadacf/funcat | 0d0549cec3e1da75d6023871c2e146f956b4193b | [
"Apache-2.0"
] | 35 | 2017-02-25T03:43:31.000Z | 2021-12-11T03:23:25.000Z | funcat/func.py | dadacf/funcat | 0d0549cec3e1da75d6023871c2e146f956b4193b | [
"Apache-2.0"
] | 357 | 2017-01-07T16:55:20.000Z | 2022-02-21T06:31:33.000Z | # -*- coding: utf-8 -*-
#
from functools import reduce
import numpy as np
import talib
from .context import ExecutionContext
from .utils import FormulaException, rolling_window, handle_numpy_warning
from .time_series import (
MarketDataSeries,
NumericSeries,
BoolSeries,
fit_series,
get_series,
... | 26.384259 | 82 | 0.627829 |
e64a90eaa7f889fe9206d80bb6149af2a5ad835a | 17,933 | py | Python | rasa/core/utils.py | skerdudou/rasa | 5a6050a20a1d6ca33204dd8e9dec27004562548a | [
"Apache-2.0"
] | null | null | null | rasa/core/utils.py | skerdudou/rasa | 5a6050a20a1d6ca33204dd8e9dec27004562548a | [
"Apache-2.0"
] | null | null | null | rasa/core/utils.py | skerdudou/rasa | 5a6050a20a1d6ca33204dd8e9dec27004562548a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import asyncio
import errno
import json
import logging
import os
import re
import sys
import tarfile
import tempfile
import warnings
import zipfile
from asyncio import AbstractEventLoop, Future
from hashlib import md5, sha1
from io import BytesIO as IOReader, StringIO
from typing... | 29.112013 | 88 | 0.645904 |
74a046de2483d0d2ca31d90cf98f4b3ef589ae8a | 1,227 | py | Python | twitcher/adapter/default.py | bird-house/twitcher | c9bf4246b13c20135bc6a26d2afc6cb1fba911e5 | [
"Apache-2.0"
] | 13 | 2016-06-03T12:40:00.000Z | 2022-02-25T00:40:01.000Z | twitcher/adapter/default.py | bird-house/twitcher | c9bf4246b13c20135bc6a26d2afc6cb1fba911e5 | [
"Apache-2.0"
] | 92 | 2015-10-29T12:07:04.000Z | 2022-03-15T21:20:51.000Z | twitcher/adapter/default.py | bird-house/twitcher | c9bf4246b13c20135bc6a26d2afc6cb1fba911e5 | [
"Apache-2.0"
] | 3 | 2017-06-27T19:57:53.000Z | 2020-04-11T11:46:51.000Z | """
Factories to create storage backends.
"""
from twitcher.adapter.base import AdapterInterface
from twitcher.owssecurity import OWSSecurity
from twitcher.owsregistry import OWSRegistry
from twitcher.store import ServiceStore
from twitcher.utils import get_settings
from pyramid.config import Configurator
TWITCHER_AD... | 30.675 | 63 | 0.748981 |
560798396250ddf7a8cf5f1af555478fbd7ec404 | 12,619 | py | Python | pytorch/model.py | bobbyrathoree/boggins-image-enhancer | e815774fa02e700420da1cdc907214b7fa8309fe | [
"Apache-2.0"
] | 2 | 2019-12-15T08:19:12.000Z | 2020-04-15T02:17:15.000Z | pytorch/model.py | bobbyrathoree/boggins-image-enhancer | e815774fa02e700420da1cdc907214b7fa8309fe | [
"Apache-2.0"
] | 11 | 2020-01-28T23:09:52.000Z | 2022-03-12T00:07:38.000Z | pytorch/model.py | bobbyrathoree/boggins-image-enhancer | e815774fa02e700420da1cdc907214b7fa8309fe | [
"Apache-2.0"
] | 1 | 2020-01-06T00:50:52.000Z | 2020-01-06T00:50:52.000Z | import logging
from collections import OrderedDict
import torch
import torch.nn as nn
from torch.optim import lr_scheduler
from networks import *
from borrowed.loss import GANLoss, GradientPenaltyLoss
logger = logging.getLogger("base")
class BaseModel:
def __init__(self, opt):
self.opt = opt
se... | 37.781437 | 88 | 0.557255 |
c8d4f25c54f8837f5219a582c147f48ce3e8a985 | 371 | py | Python | utils/util.py | caitinggui/flask-user | 0c8c9f3bfc27c6e7e2121cf5450a54ba74dc353e | [
"MIT"
] | 4 | 2018-08-01T15:19:30.000Z | 2020-12-15T01:07:04.000Z | utils/util.py | caitinggui/flask-user | 0c8c9f3bfc27c6e7e2121cf5450a54ba74dc353e | [
"MIT"
] | null | null | null | utils/util.py | caitinggui/flask-user | 0c8c9f3bfc27c6e7e2121cf5450a54ba74dc353e | [
"MIT"
] | 1 | 2018-08-01T15:19:58.000Z | 2018-08-01T15:19:58.000Z | # coding: utf-8
def requestGetParam(request, key, default=None):
param = request.args.get(key, default)
return param
def requestPostParam(request, key, default=None):
return request.form.get(key, default)
def requestParam(request, key, default=None):
return request.args.get(key, default) if key in... | 23.1875 | 100 | 0.730458 |
db580e5b10a3679f8e508c2b2417ae4a23c77754 | 870 | py | Python | kubernetes/test/test_v1_taint.py | fooka03/python | 073cf4d89e532f92b57e8955b4efc3d5d5eb80cf | [
"Apache-2.0"
] | 2 | 2020-07-02T05:47:41.000Z | 2020-07-02T05:50:34.000Z | kubernetes/test/test_v1_taint.py | fooka03/python | 073cf4d89e532f92b57e8955b4efc3d5d5eb80cf | [
"Apache-2.0"
] | 1 | 2021-03-25T23:44:49.000Z | 2021-03-25T23:44:49.000Z | k8sdeployment/k8sstat/python/kubernetes/test/test_v1_taint.py | JeffYFHuang/gpuaccounting | afa934350ebbd0634beb60b9df4a147426ea0006 | [
"MIT"
] | 1 | 2021-10-13T17:45:37.000Z | 2021-10-13T17:45:37.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 21.75 | 124 | 0.695402 |
57bc0037ecacafe8932cec14b755e409444dc2ba | 2,719 | py | Python | hlrobot_gazebo/scripts/show_tf1.py | liuxiao916/HLRobot_gazebo | ff2cef471c933cdd0204f5839a0658f813ce2d4d | [
"MIT"
] | 8 | 2021-11-27T10:36:34.000Z | 2021-12-28T10:40:14.000Z | hlrobot_gazebo/scripts/show_tf1.py | liuxiao916/HLRobot_gazebo | ff2cef471c933cdd0204f5839a0658f813ce2d4d | [
"MIT"
] | null | null | null | hlrobot_gazebo/scripts/show_tf1.py | liuxiao916/HLRobot_gazebo | ff2cef471c933cdd0204f5839a0658f813ce2d4d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import tf
from sensor_msgs.msg import JointState
from scipy.spatial.transform import Rotation as R
import numpy as np
import csv
def callback(data):
ispublished = 0
while not ispublished:
try:
(trans, rot) = listener.lookupTransform(
'/too... | 35.776316 | 97 | 0.519676 |
b469cec9dfa52734204d113e3bc64730f60b01d6 | 3,972 | py | Python | LYOCR/frame_two.py | lstoryzx/LYOCR | adf1239be3bebb4cbccac8034577ef03b89d4d76 | [
"MIT"
] | 2 | 2021-03-12T06:50:53.000Z | 2021-03-16T05:29:31.000Z | LYOCR/frame_two.py | lstoryzx/LYOCR | adf1239be3bebb4cbccac8034577ef03b89d4d76 | [
"MIT"
] | 1 | 2021-03-12T08:09:05.000Z | 2021-03-16T05:33:35.000Z | LYOCR/frame_two.py | lstoryzx/LYOCR | adf1239be3bebb4cbccac8034577ef03b89d4d76 | [
"MIT"
] | 1 | 2021-09-25T07:20:38.000Z | 2021-09-25T07:20:38.000Z | # -*- coding:utf8 -*-
import tkinter as tk
from tkinter import ttk
from tkinter.constants import BOTH, CENTER, E, END, LEFT, NE, NW, RIGHT, W, X, Y
import json
import baiduocr
import tencentocr
'''
if not ('Tables') in os.listdir():
os.mkdir("./Tables/")
with open('api.json', 'r') as f:
data = json.load(f... | 36.109091 | 207 | 0.628147 |
6cfe9411001cad14f64b1597ad7cc9af32fa6196 | 7,815 | py | Python | 2d_segmentation/torch/unet_training_dict.py | slbryson/tutorials | b3130b6c593b33ba3574ccbb9ca8de5094017ca4 | [
"Apache-2.0"
] | 1 | 2021-07-13T00:34:40.000Z | 2021-07-13T00:34:40.000Z | 2d_segmentation/torch/unet_training_dict.py | wanglanrixitroy/tutorials | 25700d0fa4835c520f5ca8da44ff16493acd5a2e | [
"Apache-2.0"
] | null | null | null | 2d_segmentation/torch/unet_training_dict.py | wanglanrixitroy/tutorials | 25700d0fa4835c520f5ca8da44ff16493acd5a2e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 MONAI Consortium
# 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, s... | 41.791444 | 114 | 0.63263 |
7802e77c6efe3a8af506f281097193ef0d4eb724 | 3,870 | py | Python | object_detection/serving_script/object_detection_grpc_client.py | qq2016/kubeflow_learning | 930706686108f997aab42ccf2fe455dcf09a4afc | [
"Apache-2.0"
] | 1,165 | 2018-03-01T01:47:14.000Z | 2022-03-31T08:35:00.000Z | object_detection/serving_script/object_detection_grpc_client.py | arki1/examples | c93b792d67c8c52bc91d4ccf5fbaead4e2324331 | [
"Apache-2.0"
] | 929 | 2018-02-04T18:20:16.000Z | 2022-03-31T18:20:43.000Z | object_detection/serving_script/object_detection_grpc_client.py | arki1/examples | c93b792d67c8c52bc91d4ccf5fbaead4e2324331 | [
"Apache-2.0"
] | 687 | 2018-02-01T21:35:30.000Z | 2022-03-29T07:47:47.000Z | import os
import argparse
from argparse import RawTextHelpFormatter
from grpc.beta import implementations
import numpy as np
from PIL import Image
import tensorflow as tf
from tensorflow_serving.apis import predict_pb2
from tensorflow_serving.apis import prediction_service_pb2_grpc
from object_detection.utils impor... | 39.090909 | 94 | 0.674677 |
7835108700872460df8f2aabc6f0b1c503933784 | 564 | py | Python | psyneulink/library/components/mechanisms/processing/transfer/__init__.py | JeshuaT/PsyNeuLink | 912f691028e848659055430f37b6c15273c762f1 | [
"Apache-2.0"
] | 67 | 2018-01-05T22:18:44.000Z | 2022-03-27T11:27:31.000Z | psyneulink/library/components/mechanisms/processing/transfer/__init__.py | JeshuaT/PsyNeuLink | 912f691028e848659055430f37b6c15273c762f1 | [
"Apache-2.0"
] | 1,064 | 2017-12-01T18:58:27.000Z | 2022-03-31T22:22:24.000Z | psyneulink/library/components/mechanisms/processing/transfer/__init__.py | JeshuaT/PsyNeuLink | 912f691028e848659055430f37b6c15273c762f1 | [
"Apache-2.0"
] | 25 | 2017-12-01T20:27:07.000Z | 2022-03-08T21:49:39.000Z | from . import contrastivehebbianmechanism
from . import kohonenmechanism
from . import kwtamechanism
from . import lcamechanism
from . import recurrenttransfermechanism
from .contrastivehebbianmechanism import *
from .kohonenmechanism import *
from .kwtamechanism import *
from .lcamechanism import *
from .recurrenttra... | 31.333333 | 51 | 0.851064 |
4bcb5e32adf4296bbd091c8daff5381fd914d35a | 13,694 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 26.798434 | 116 | 0.684606 |
a4754852edd98ac2e2e8bc818d1737e6ebec76d7 | 7,385 | py | Python | test/functional/wallet_listreceivedby.py | houssem545/E-TND | 0c5f67b8e5d9a502c6d321c5e0696bc3e9b4690d | [
"MIT"
] | 5 | 2017-12-30T19:20:14.000Z | 2021-05-29T22:36:14.000Z | test/functional/wallet_listreceivedby.py | houssem545/E-TND | 0c5f67b8e5d9a502c6d321c5e0696bc3e9b4690d | [
"MIT"
] | 9 | 2017-11-03T21:40:40.000Z | 2021-05-23T08:32:43.000Z | test/functional/wallet_listreceivedby.py | houssem545/E-TND | 0c5f67b8e5d9a502c6d321c5e0696bc3e9b4690d | [
"MIT"
] | 19 | 2017-08-29T02:08:40.000Z | 2021-05-22T09:14:09.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework ... | 47.645161 | 197 | 0.629926 |
bdf70b450678d8790748cd76a9a8a1b49ccd4230 | 4,718 | py | Python | DDPG/DDPG.py | LQNew/LWDRL | 0e4fab077a0cfbd27590b840557f4fda033c74ff | [
"MIT"
] | 11 | 2021-03-10T02:36:19.000Z | 2021-05-17T09:07:56.000Z | DDPG/DDPG.py | LQNew/LWDRL | 0e4fab077a0cfbd27590b840557f4fda033c74ff | [
"MIT"
] | null | null | null | DDPG/DDPG.py | LQNew/LWDRL | 0e4fab077a0cfbd27590b840557f4fda033c74ff | [
"MIT"
] | null | null | null | import copy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# Implementation of Deep Deterministic Policy Gradients (DDPG)
# Paper: https://arxiv.org/abs/1509.02971
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
def weight_init(m):
"""Custom w... | 33.7 | 93 | 0.708563 |
f3bde4985aa912fd438e0de129cbbbdaff86297b | 132,680 | py | Python | pyontutils/scigraph_client.py | dbrnz/pyontutils | 439e7b572a0a8cbe6817b9a294745db8688da666 | [
"MIT"
] | null | null | null | pyontutils/scigraph_client.py | dbrnz/pyontutils | 439e7b572a0a8cbe6817b9a294745db8688da666 | [
"MIT"
] | null | null | null | pyontutils/scigraph_client.py | dbrnz/pyontutils | 439e7b572a0a8cbe6817b9a294745db8688da666 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""WARNING: DO NOT MODIFY THIS FILE
IT IS AUTOMATICALLY GENERATED BY scigraph.py
AND WILL BE OVERWRITTEN
Swagger Version: 2.0, API Version: 1.0.1
generated for http://localhost:9000/scigraph/swagger.json
by scigraph.py
"""
import re
import copy
import inspect
import builtins
from urllib.parse imp... | 44.182484 | 448 | 0.574578 |
39b3a6f828df7180fb2ea7a808857463660a0e34 | 94,480 | py | Python | evap/staff/tests/test_views.py | mhmohammadzade/EvaP | 6a42001e8cb5365890c025e79983a4ea31f25bb6 | [
"MIT"
] | 1 | 2019-11-10T06:58:10.000Z | 2019-11-10T06:58:10.000Z | evap/staff/tests/test_views.py | mhmohammadzade/EvaP | 6a42001e8cb5365890c025e79983a4ea31f25bb6 | [
"MIT"
] | null | null | null | evap/staff/tests/test_views.py | mhmohammadzade/EvaP | 6a42001e8cb5365890c025e79983a4ea31f25bb6 | [
"MIT"
] | null | null | null | import datetime
import os
import glob
from django.conf import settings
from django.contrib.auth.models import Group
from django.core import mail
from django.urls import reverse
from django.test import override_settings
from django.test.testcases import TestCase
from django_webtest import WebTest
from model_mommy impo... | 46.450344 | 187 | 0.693808 |
b1c99ec2889f3bcfab916fa820c153a552f0e295 | 987 | py | Python | analyze.py | maldn/mosaic.py | 22326985d034d37255d6cc628f5998c8170fe687 | [
"MIT"
] | null | null | null | analyze.py | maldn/mosaic.py | 22326985d034d37255d6cc628f5998c8170fe687 | [
"MIT"
] | null | null | null | analyze.py | maldn/mosaic.py | 22326985d034d37255d6cc628f5998c8170fe687 | [
"MIT"
] | null | null | null | import sys
from PIL import Image, ImageOps
import scipy
import scipy.misc
import scipy.cluster
from rgb2lab import rgb2lab
NUM_CLUSTERS = 3
def inspect(image):
ar = scipy.misc.fromimage(image)
shape = ar.shape
# flatten array
ar = ar.reshape(scipy.product(shape[:2]), shape[2])
codes, dist = scipy.cluster.vq.km... | 25.307692 | 73 | 0.678825 |
3e44af4bb612453cc7862def3f992392052f934b | 900 | py | Python | main.py | wzcwzc05/qq-bot | b75e5b31bd6091edae614e2836f0105dc125d142 | [
"MIT"
] | null | null | null | main.py | wzcwzc05/qq-bot | b75e5b31bd6091edae614e2836f0105dc125d142 | [
"MIT"
] | null | null | null | main.py | wzcwzc05/qq-bot | b75e5b31bd6091edae614e2836f0105dc125d142 | [
"MIT"
] | null | null | null | from multiprocessing import Process
import os
import requests
import configparser
import time
from urllib import request
# 具体端口设计在main.ini中
config = configparser.ConfigParser()
config.read('./main.ini')
flask_port = config.getint('flask', 'port')
http_port = config.getint('go-cqhttp', 'port')
def go_cqhttp():
os... | 23.076923 | 66 | 0.634444 |
63510479caa3549d5f7203f24f9fa3a20917c558 | 33,348 | py | Python | run_nq.py | valemore/nq_transformers | fcc31f06989fc7b83cec10477e56573aebd1a0eb | [
"Apache-2.0"
] | 2 | 2020-03-22T17:20:10.000Z | 2021-05-11T13:45:27.000Z | run_nq.py | valemore/nq_transformers | fcc31f06989fc7b83cec10477e56573aebd1a0eb | [
"Apache-2.0"
] | null | null | null | run_nq.py | valemore/nq_transformers | fcc31f06989fc7b83cec10477e56573aebd1a0eb | [
"Apache-2.0"
] | null | null | null | '''
Finetuning Huggingface's models for question-answering on Natural Questions (NQ) datasety by Google
For the full list of options, type python run_nq.py -h
'''
from __future__ import absolute_import, division, print_function
import argparse
import json
import logging
import os
import random
import glob
import sy... | 52.269592 | 154 | 0.657221 |
6ac4068ebc23fb5d27bee728ecbf382d332aa1a2 | 1,641 | py | Python | QCS/Question/views/QuestionDetails.py | udcymen/Question-Catalog-System | 89860cf73458fbbaa0edea37981abc41e4cb17d1 | [
"MIT"
] | null | null | null | QCS/Question/views/QuestionDetails.py | udcymen/Question-Catalog-System | 89860cf73458fbbaa0edea37981abc41e4cb17d1 | [
"MIT"
] | 6 | 2020-02-12T02:42:58.000Z | 2021-06-02T00:36:25.000Z | QCS/Question/views/QuestionDetails.py | udcymen/Question-Catalog-System | 89860cf73458fbbaa0edea37981abc41e4cb17d1 | [
"MIT"
] | null | null | null | from .HelperFunction import get_question
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from django.views.decorators.http import require_http_methods
@require_http_methods(["GET", "POST", "DELETE"])
def question_detail(request, question_ref):
question = get_question(questio... | 35.673913 | 90 | 0.605728 |
27b96a301567ffd51842e89e624c0c624f2b126d | 566 | py | Python | var/spack/repos/builtin/packages/testdfsio/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/testdfsio/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/testdfsio/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 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)
class Testdfsio(MavenPackage):
"""A corrected and enhanced version of Apache Hadoop TestDFSIO"""
homepage = "htt... | 35.375 | 95 | 0.736749 |
00e941838d76521c62f33fe4830705c8b8698189 | 2,384 | py | Python | io/dataset.py | AlbertZhangHIT/pyflann3 | 30e7edf51c28dc17f72405181156c8908d8d3ba6 | [
"MIT"
] | null | null | null | io/dataset.py | AlbertZhangHIT/pyflann3 | 30e7edf51c28dc17f72405181156c8908d8d3ba6 | [
"MIT"
] | null | null | null | io/dataset.py | AlbertZhangHIT/pyflann3 | 30e7edf51c28dc17f72405181156c8908d8d3ba6 | [
"MIT"
] | 1 | 2021-09-25T05:28:22.000Z | 2021-09-25T05:28:22.000Z | #Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
#Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
#
#THE BSD LICENSE
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions
#are met:
#
... | 37.84127 | 75 | 0.735738 |
9b42dbfd0f4f6a55819daa1b7a973e9bd75aec4d | 21,523 | py | Python | src/lib/opts_mayank.py | mayanks888/CenterTrack | ea225eb64332aab9d7b803d976be2d63ade9c6d3 | [
"MIT"
] | null | null | null | src/lib/opts_mayank.py | mayanks888/CenterTrack | ea225eb64332aab9d7b803d976be2d63ade9c6d3 | [
"MIT"
] | null | null | null | src/lib/opts_mayank.py | mayanks888/CenterTrack | ea225eb64332aab9d7b803d976be2d63ade9c6d3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import sys
class opts(object):
def __init__(self):
self.parser = argparse.ArgumentParser()
# basic experiment setting
self.parser.add_argument('--task', default='ddd',
... | 53.14321 | 186 | 0.608187 |
633c151cbd86f13a5aa4075327c01a5ec2c14e26 | 603 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_200/rule_91.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_200/rule_91.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/numtrees_200/rule_91.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,... | 75.375 | 441 | 0.674959 |
c91d381ced55ac4ff4a819f5f0806c77b988e45f | 3,495 | py | Python | tensortools/cpwarp/postprocess.py | nhat-le/tensortools | a5898ad657ef7c5d875fdc02b65354a6361256be | [
"MIT"
] | 122 | 2017-01-12T02:34:30.000Z | 2022-03-31T21:06:39.000Z | tensortools/cpwarp/postprocess.py | nhat-le/tensortools | a5898ad657ef7c5d875fdc02b65354a6361256be | [
"MIT"
] | 24 | 2017-02-27T18:04:05.000Z | 2021-11-24T17:01:59.000Z | tensortools/cpwarp/postprocess.py | nhat-le/tensortools | a5898ad657ef7c5d875fdc02b65354a6361256be | [
"MIT"
] | 50 | 2017-01-10T19:02:12.000Z | 2022-03-27T12:19:45.000Z | """
Diagnostic measures for CP decomposition fits.
"""
import numpy as np
from munkres import Munkres
from scipy.spatial.distance import cdist
def shifted_align(U, V, permute_U=False, permute_V=False):
"""Aligns two models and returns a similarity score.
Parameters
----------
U : ShiftedCP or MultiS... | 30.12931 | 74 | 0.646352 |
14fc7112e7dfc8d7d149f56546cce0e72935b510 | 824 | py | Python | scripts/dahlia_reset_approvals.py | Dahlia-Finance/dahlia_contracts | 3cf35103b2341a2ca07f8b5653946c74cedf3a78 | [
"MIT"
] | 1 | 2022-01-14T11:04:09.000Z | 2022-01-14T11:04:09.000Z | scripts/dahlia_reset_approvals.py | Pinnata/pinnata-contracts | 3cf35103b2341a2ca07f8b5653946c74cedf3a78 | [
"MIT"
] | 3 | 2021-12-16T19:54:57.000Z | 2021-12-20T18:32:21.000Z | scripts/dahlia_reset_approvals.py | Dahlia-Finance/pinnata_contracts | 3cf35103b2341a2ca07f8b5653946c74cedf3a78 | [
"MIT"
] | 2 | 2021-11-24T05:01:56.000Z | 2021-12-04T00:27:54.000Z | from brownie import (
accounts, HomoraBank, SafeBox
)
from brownie import interface
import json
def main():
deployer = accounts.load('kyle_personal')
with open('scripts/dahlia_addresses.json', 'r') as f:
addr = json.load(f)
mainnet_addr = addr.get('mainnet')
interface.IERC20Ex(mainnet_add... | 45.777778 | 108 | 0.703883 |
4c6a7432345564e54ba21e68892d3c99a1e6d0c4 | 25,477 | py | Python | v2.5.7/toontown/pets/Pet.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v2.5.7/toontown/pets/Pet.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v2.5.7/toontown/pets/Pet.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from panda3d.core import *
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import *
from direct.fsm.ClassicFSM import *
from direct.fsm.State import *
from direct.distributed.ClockDelta import globalClockDelta
from otp.avatar import Avatar
from direct.actor import Actor
from direc... | 37.247076 | 427 | 0.612749 |
7b6812c0f0865b4464759939faf2609035374544 | 5,487 | py | Python | crawl.py | shanks2999/SearchEngine | 0ba15a99111b9471508e0da90737916f9e3b3f6b | [
"MIT"
] | 3 | 2019-10-02T09:48:44.000Z | 2020-08-18T14:56:20.000Z | crawl.py | shanks2999/SearchEngine | 0ba15a99111b9471508e0da90737916f9e3b3f6b | [
"MIT"
] | null | null | null | crawl.py | shanks2999/SearchEngine | 0ba15a99111b9471508e0da90737916f9e3b3f6b | [
"MIT"
] | null | null | null |
import settings
import preprocess
import queue
import requests
from bs4 import BeautifulSoup
from bs4.element import Comment
import urllib.request
myList = []
valid_url_set = set()
def plot_web_graph(link, threshold):
settings.link_set.add(link)
myList.append(link)
valid_url_set.add(link)
with open(".... | 31.716763 | 91 | 0.577365 |
58a7e15457557729d46edd7bddb89e99ad543248 | 4,128 | py | Python | cogs/calendar.py | zhudotexe/bookwyrm | f6dd689a72cd6080b3e8585a643c003b2c1f2fc2 | [
"MIT"
] | null | null | null | cogs/calendar.py | zhudotexe/bookwyrm | f6dd689a72cd6080b3e8585a643c003b2c1f2fc2 | [
"MIT"
] | null | null | null | cogs/calendar.py | zhudotexe/bookwyrm | f6dd689a72cd6080b3e8585a643c003b2c1f2fc2 | [
"MIT"
] | null | null | null | import asyncio
import datetime
import re
import dateparser
import discord
from dateparser.search import search_dates
from discord.ext import commands
from natural import date
from models.games import Game
from utils import constants
class Calendar(commands.Cog):
def __init__(self, bot: commands.Bot):
se... | 34.4 | 110 | 0.619428 |
4201b3b564930dce6e3db6667e3d00ad1d799d6a | 2,231 | py | Python | main.py | jmaslanka/SudokuSolver | d0f50b05b7147556107406c72e0031d681729bde | [
"MIT"
] | null | null | null | main.py | jmaslanka/SudokuSolver | d0f50b05b7147556107406c72e0031d681729bde | [
"MIT"
] | null | null | null | main.py | jmaslanka/SudokuSolver | d0f50b05b7147556107406c72e0031d681729bde | [
"MIT"
] | null | null | null | import sys
import subprocess
import time
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from Solver import Board
qtCreatorFile = "window.ui"
Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)
class MyApp(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self):
QtWidgets.QMainWindow.__init__(... | 30.148649 | 78 | 0.591663 |
940130c740322064563f136957ccc577f369199f | 368 | py | Python | Functions_Files_and_Dictionaries/Functions_and_Tuples/Functions_Tuples/tuple_packing.py | samyumobi/A-Complete-Python-Guide-For-Beginners | 6ee3d73ebb481dbb5788cb0e615efdaf09079a18 | [
"MIT"
] | 7 | 2019-06-04T13:44:27.000Z | 2021-01-05T22:42:15.000Z | Functions_Files_and_Dictionaries/Functions_and_Tuples/Functions_Tuples/tuple_packing.py | samyumobi/A-Complete-Python-Guide-For-Beginners | 6ee3d73ebb481dbb5788cb0e615efdaf09079a18 | [
"MIT"
] | null | null | null | Functions_Files_and_Dictionaries/Functions_and_Tuples/Functions_Tuples/tuple_packing.py | samyumobi/A-Complete-Python-Guide-For-Beginners | 6ee3d73ebb481dbb5788cb0e615efdaf09079a18 | [
"MIT"
] | 5 | 2019-09-14T11:37:47.000Z | 2021-07-26T19:49:24.000Z | def circleInfo(r):
""" Return (circumference, area) of a circle of radius r """
c = 2 * 3.14159 * r
a = 3.14159 * r * r
return (c, a)
print(circleInfo(10))
# or equivalently
def circleInfo_p(r):
""" Return (circumference, area) of a circle of radius r """
c = 2 * 3.14159 * r
a = 3.14159 *... | 20.444444 | 64 | 0.581522 |
1ca029ca64a0d89f0c93cc73fa09dcd2df326be0 | 4,832 | py | Python | sdk/python/pulumi_azure_native/documentdb/latest/get_database_account_table.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/latest/get_database_account_table.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/latest/get_database_account_table.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 38.656 | 505 | 0.658526 |
7f8525bc75542ee67191e9fae5d95857798ad57e | 4,104 | py | Python | trinity/plugins/builtin/tx_pool/pool.py | pipermerriam/py-evm | 5a52ce035d77483577395a18f782b42ca78de77b | [
"MIT"
] | 137 | 2017-03-17T11:37:51.000Z | 2022-03-07T07:51:28.000Z | trinity/plugins/builtin/tx_pool/pool.py | retzger/py-evm | 5a52ce035d77483577395a18f782b42ca78de77b | [
"MIT"
] | 102 | 2017-04-07T10:43:03.000Z | 2018-11-11T18:01:56.000Z | trinity/plugins/builtin/tx_pool/pool.py | retzger/py-evm | 5a52ce035d77483577395a18f782b42ca78de77b | [
"MIT"
] | 39 | 2017-03-17T11:38:52.000Z | 2021-02-18T23:05:17.000Z | from typing import (
cast,
Callable,
Iterable,
List,
Set,
Type,
)
import uuid
from bloom_filter import (
BloomFilter
)
from cancel_token import CancelToken
from eth.rlp.transactions import (
BaseTransactionFields
)
from p2p.peer import (
BasePeer,
PeerPool,
PeerSubscriber... | 31.813953 | 98 | 0.639864 |
1b9b1130eaf1ff0fdea16651ed444b53f500cb8b | 1,536 | py | Python | tests/test_text.py | iscc/iscc-sdk | 329bf7611979cbb064d95902f5b29fb9b8dfc15b | [
"Apache-2.0"
] | 1 | 2022-03-21T19:34:10.000Z | 2022-03-21T19:34:10.000Z | tests/test_text.py | iscc/iscc-sdk | 329bf7611979cbb064d95902f5b29fb9b8dfc15b | [
"Apache-2.0"
] | 23 | 2022-01-24T16:05:33.000Z | 2022-03-29T10:48:04.000Z | tests/test_text.py | iscc/iscc-sdk | 329bf7611979cbb064d95902f5b29fb9b8dfc15b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pathlib import Path
import pytest
import iscc_sdk as idk
def test_text_meta_extract_pdf(pdf_file):
assert idk.text_meta_extract(pdf_file) == {"name": "title from metadata"}
def test_text_meta_extract_docx(docx_file):
assert idk.text_meta_extract(docx_file) == {"creator": "titu... | 30.117647 | 99 | 0.720052 |
c815ac7b59c140f92cca05c81496ad5fce91006a | 1,495 | py | Python | app/auth/views.py | Anne56njeri/Blog | 59a1ee653165b3d83f8c284ecef020285ada57cc | [
"Unlicense",
"MIT"
] | null | null | null | app/auth/views.py | Anne56njeri/Blog | 59a1ee653165b3d83f8c284ecef020285ada57cc | [
"Unlicense",
"MIT"
] | null | null | null | app/auth/views.py | Anne56njeri/Blog | 59a1ee653165b3d83f8c284ecef020285ada57cc | [
"Unlicense",
"MIT"
] | null | null | null | from flask import render_template,redirect,url_for
from . import auth
from ..models import Writer
from .forms import Registration,Login
from .. import db
from flask_login import login_user,logout_user,login_required
from flask import flash
@auth.route('/register',methods = ["GET","POST"])
def register_writer():
... | 35.595238 | 100 | 0.707023 |
a6909e1688c6eaa4c09ab189a408b98ba927be3d | 5,786 | py | Python | seq2seq/data/parallel_data_provider.py | liyc7711/seq2seq | 1592b842b652ae648b96c164bead38eb089ce08e | [
"Apache-2.0"
] | 1 | 2021-04-21T05:30:15.000Z | 2021-04-21T05:30:15.000Z | seq2seq/data/parallel_data_provider.py | liyc7711/seq2seq | 1592b842b652ae648b96c164bead38eb089ce08e | [
"Apache-2.0"
] | null | null | null | seq2seq/data/parallel_data_provider.py | liyc7711/seq2seq | 1592b842b652ae648b96c164bead38eb089ce08e | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 34.646707 | 78 | 0.687176 |
20aa79ccb70b6c459e4e70c7ccb7d29d77eafb90 | 2,700 | py | Python | bfassist/certificates/__init__.py | SanHime/bfassist | f4870189a54373487064897ad0d5bf46ae9d97f8 | [
"Apache-2.0"
] | 1 | 2021-07-09T14:40:14.000Z | 2021-07-09T14:40:14.000Z | bfassist/certificates/__init__.py | SanHime/bfassist | f4870189a54373487064897ad0d5bf46ae9d97f8 | [
"Apache-2.0"
] | null | null | null | bfassist/certificates/__init__.py | SanHime/bfassist | f4870189a54373487064897ad0d5bf46ae9d97f8 | [
"Apache-2.0"
] | null | null | null | #############################################################################
#
#
# BFA SSL-Certificates Manager
#
#
#############################################################################
""" This provides a small manager for generating and administrating the ssl certificates used by bfa. Well, currently
it ju... | 36.486486 | 120 | 0.63963 |
018d640068e58eecca93b8baf94d6dbf5fb4ed3e | 241 | py | Python | app/grandchallenge/challenges/apps.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/challenges/apps.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/challenges/apps.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class ChallengesConfig(AppConfig):
name = "grandchallenge.challenges"
def ready(self):
# noinspection PyUnresolvedReferences
import grandchallenge.challenges.signals # noqa: F401
| 24.1 | 62 | 0.738589 |
c2a8a890753cfae1e525a55ef65164f3361f31ff | 78 | py | Python | test/files/python_shebang.py | faho/littlecheck | 12cad505fa6c3c4b45e5e2a0d25b043435ed0cee | [
"CC0-1.0"
] | 26 | 2019-06-08T22:04:46.000Z | 2022-01-11T22:08:04.000Z | test/files/python_shebang.py | 0verk1ll/littlecheck | 5f6c024fbdf6654e7851d3fd756a6d56e167476e | [
"CC0-1.0"
] | 7 | 2019-06-24T15:36:59.000Z | 2022-01-28T11:10:00.000Z | test/files/python_shebang.py | 0verk1ll/littlecheck | 5f6c024fbdf6654e7851d3fd756a6d56e167476e | [
"CC0-1.0"
] | 3 | 2019-06-24T15:38:18.000Z | 2021-03-21T21:24:28.000Z | #!/usr/bin/python
import sys
sys.stderr.write("weeeee\n")
# CHECKERR: weeeee
| 13 | 28 | 0.717949 |
544249ea13f350480ad58aa40d73412ed74cc7c1 | 221,704 | py | Python | src/molecule.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | null | null | null | src/molecule.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | 5 | 2021-07-20T05:05:01.000Z | 2022-03-02T05:08:05.000Z | src/molecule.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import itertools
import os
import re
import sys
import sysconfig
import json
from collections import OrderedDict, namedtuple, Counter
from ctypes import *
from datetime import date
from warnings imp... | 45.853981 | 245 | 0.516725 |
9100e60abec48e1f0316b8e8255122e012c547c1 | 3,364 | py | Python | src/problem4.py | conradja/08-Exam1-201920 | 5bbde91a17e6e7450879ab8eb70ff3035eb1486f | [
"MIT"
] | null | null | null | src/problem4.py | conradja/08-Exam1-201920 | 5bbde91a17e6e7450879ab8eb70ff3035eb1486f | [
"MIT"
] | null | null | null | src/problem4.py | conradja/08-Exam1-201920 | 5bbde91a17e6e7450879ab8eb70ff3035eb1486f | [
"MIT"
] | null | null | null | """
Exam 1, problem 4.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues,
and Joseph Conrad.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
import rosegraphics as rg
def main():
""" Calls the TEST functions in thi... | 34.326531 | 79 | 0.555589 |
1f1c7d7861961eee24b8d2869b3cc533ac82893c | 1,087 | py | Python | setup.py | Clever/ebs-snapshots | f62721dded3d778dc8149ee95307d43f22f00dec | [
"Apache-2.0"
] | 13 | 2015-08-02T07:35:03.000Z | 2019-01-23T17:25:40.000Z | setup.py | Clever/ebs-snapshots | f62721dded3d778dc8149ee95307d43f22f00dec | [
"Apache-2.0"
] | 17 | 2015-01-14T22:26:54.000Z | 2019-01-17T22:08:14.000Z | setup.py | Clever/ebs-snapshots | f62721dded3d778dc8149ee95307d43f22f00dec | [
"Apache-2.0"
] | 8 | 2015-07-22T21:14:12.000Z | 2019-01-22T13:09:36.000Z | #!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from pip.req import parse_requirements
import version
import pkg_resources
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, '../README.md')) as f:
README = f.read()
with open(os.path.join(... | 28.605263 | 75 | 0.675253 |
ad392bab3a87952b5e936e15fd46ec037f6c4c40 | 685 | py | Python | src/training_scripts/train-xgb-quantiles.py | vms10/meli-data-challenge-2021 | aae618688240fd618261a2368bbd273cd4133cd4 | [
"MIT"
] | 22 | 2021-09-21T13:09:12.000Z | 2022-03-09T19:15:52.000Z | src/training_scripts/train-xgb-quantiles.py | vms10/meli-data-challenge-2021 | aae618688240fd618261a2368bbd273cd4133cd4 | [
"MIT"
] | null | null | null | src/training_scripts/train-xgb-quantiles.py | vms10/meli-data-challenge-2021 | aae618688240fd618261a2368bbd273cd4133cd4 | [
"MIT"
] | 2 | 2021-09-21T22:42:51.000Z | 2021-12-24T04:03:53.000Z | import os, sys
# Append the src directory to sys.path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import config
from datasetutils import load_lvl_0_dataset
from models.XGBMultiQuantileRegressor import XGBMultiQuantileRegressor
from models.InputScaler import InputScaler
X_train, T_trai... | 36.052632 | 97 | 0.823358 |
3ae94760254c7e8958b53aafeed9eb221cbef79f | 2,992 | py | Python | toontown/ai/HolidayDecorator.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | null | null | null | toontown/ai/HolidayDecorator.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 1 | 2021-06-08T17:16:48.000Z | 2021-06-08T17:16:48.000Z | toontown/ai/HolidayDecorator.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 3 | 2021-06-03T05:36:36.000Z | 2021-06-22T15:07:31.000Z | from toontown.toonbase import ToontownGlobals
from direct.interval.IntervalGlobal import Parallel, Sequence, Func, Wait
from panda3d.core import Vec4, CSDefault, TransformState, NodePath, TransparencyAttrib
from panda3d.toontown import loadDNAFile
class HolidayDecorator:
def __init__(self):
self.dnaStore ... | 42.742857 | 364 | 0.635361 |
d990fbbdad2763808aa3c8741cc82f9d48e8c9c6 | 50,407 | py | Python | google/cloud/aiplatform_v1beta1/services/metadata_service/transports/grpc_asyncio.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 180 | 2020-09-23T17:21:15.000Z | 2022-03-30T17:25:47.000Z | google/cloud/aiplatform_v1beta1/services/metadata_service/transports/grpc_asyncio.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 601 | 2020-09-23T16:23:44.000Z | 2022-03-31T19:08:23.000Z | google/cloud/aiplatform_v1beta1/services/metadata_service/transports/grpc_asyncio.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 109 | 2020-09-23T16:22:04.000Z | 2022-03-28T21:18:29.000Z | # -*- 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... | 42.97272 | 108 | 0.645902 |
7f3bde78584f2ed0c0da572ccbd33dbc1871ee6b | 718 | py | Python | 6-main.py | ledbagholberton/Neural-Transfer | b2996dd2e970ce498e3743b55f3add8786f49b22 | [
"MIT"
] | null | null | null | 6-main.py | ledbagholberton/Neural-Transfer | b2996dd2e970ce498e3743b55f3add8786f49b22 | [
"MIT"
] | null | null | null | 6-main.py | ledbagholberton/Neural-Transfer | b2996dd2e970ce498e3743b55f3add8786f49b22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import matplotlib.image as mpimg
import numpy as np
import tensorflow as tf
NST = __import__('6-neural_style').NST
if __name__ == '__main__':
style_image = mpimg.imread("starry_night.jpg")
content_image = mpimg.imread("golden_gate.jpg")
np.random.seed(0)
nst = NST(style_image... | 29.916667 | 69 | 0.738162 |
973b90c4c5daabf4231768865adf66f8d13acfa4 | 3,384 | py | Python | api/predict.py | yil532/MAX-Chinese-Phonetic-Similarity-Estimator | 8f1699a6212fe0352ab7d5c99a8a540de40c4405 | [
"Apache-2.0"
] | 23 | 2019-06-04T21:39:03.000Z | 2022-01-18T10:39:56.000Z | api/predict.py | yil532/MAX-Chinese-Phonetic-Similarity-Estimator | 8f1699a6212fe0352ab7d5c99a8a540de40c4405 | [
"Apache-2.0"
] | 10 | 2019-05-29T00:13:26.000Z | 2020-04-08T19:55:10.000Z | api/predict.py | yil532/MAX-Chinese-Phonetic-Similarity-Estimator | 8f1699a6212fe0352ab7d5c99a8a540de40c4405 | [
"Apache-2.0"
] | 10 | 2019-06-04T21:39:06.000Z | 2021-07-06T09:05:36.000Z | #
# Copyright 2018-2019 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 41.777778 | 121 | 0.682329 |
a7a67065f3aee65978cb196d0069836b41f071f5 | 2,278 | py | Python | config/users/models.py | Gregory124124/ignatovich-main | f9bc93a40ae954eaf785880e0aae133561d4e1cd | [
"MIT"
] | null | null | null | config/users/models.py | Gregory124124/ignatovich-main | f9bc93a40ae954eaf785880e0aae133561d4e1cd | [
"MIT"
] | null | null | null | config/users/models.py | Gregory124124/ignatovich-main | f9bc93a40ae954eaf785880e0aae133561d4e1cd | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import (BaseUserManager, AbstractBaseUser,
PermissionsMixin)
class UserManager(BaseUserManager):
use_in_migrations = True
def _create_user(self, email, password, **extra_fiel... | 35.59375 | 74 | 0.66374 |
0ca315b7965dda50f78161bd046771e934327485 | 4,558 | py | Python | dataset.py | ruthcrasto/meta-optim-public | 10034fc952fabf25610f3a65f589850fe19b1517 | [
"MIT"
] | 38 | 2018-02-23T00:53:42.000Z | 2021-04-21T00:22:58.000Z | dataset.py | ruthcrasto/meta-optim-public | 10034fc952fabf25610f3a65f589850fe19b1517 | [
"MIT"
] | 1 | 2018-07-26T17:45:03.000Z | 2018-07-26T17:45:03.000Z | dataset.py | ruthcrasto/meta-optim-public | 10034fc952fabf25610f3a65f589850fe19b1517 | [
"MIT"
] | 6 | 2018-03-09T22:36:41.000Z | 2020-10-19T12:59:11.000Z | # 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... | 38.627119 | 89 | 0.649846 |
f143e82927859f8b39192c0bb23e0c5d0f6a6997 | 247 | py | Python | plasmapy/analysis/swept_langmuir/__init__.py | MarikinPaulina/PlasmaPy | 9a9e4200981618fdfba4bd9347180b6cbe3040d7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2021-04-20T00:07:30.000Z | 2021-04-20T00:07:30.000Z | plasmapy/analysis/swept_langmuir/__init__.py | MarikinPaulina/PlasmaPy | 9a9e4200981618fdfba4bd9347180b6cbe3040d7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | plasmapy/analysis/swept_langmuir/__init__.py | MarikinPaulina/PlasmaPy | 9a9e4200981618fdfba4bd9347180b6cbe3040d7 | [
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """
Subpackage containing routines for analyzing swept Langmuir probe traces.
"""
__all__ = ["check_sweep", "find_floating_potential", "find_vf_"]
from .floating_potential import find_floating_potential, find_vf_
from .helpers import check_sweep
| 30.875 | 73 | 0.809717 |
cb935c60569153c60b6cf8b0575141fcfa87d5f3 | 552 | py | Python | test/programytest/extensions/banking/test_balance.py | cdoebler1/AIML2 | ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a | [
"MIT"
] | 345 | 2016-11-23T22:37:04.000Z | 2022-03-30T20:44:44.000Z | test/programytest/extensions/banking/test_balance.py | MikeyBeez/program-y | 00d7a0c7d50062f18f0ab6f4a041068e119ef7f0 | [
"MIT"
] | 275 | 2016-12-07T10:30:28.000Z | 2022-02-08T21:28:33.000Z | test/programytest/extensions/banking/test_balance.py | VProgramMist/modified-program-y | f32efcafafd773683b3fe30054d5485fe9002b7d | [
"MIT"
] | 159 | 2016-11-28T18:59:30.000Z | 2022-03-20T18:02:44.000Z | import unittest
from programy.extensions.banking.balance import BankingBalanceExtension
from programytest.client import TestClient
class BankBalanceExtensionTests(unittest.TestCase):
def setUp(self):
client = TestClient()
self.context = client.create_client_context("testid")
def test_balanc... | 26.285714 | 71 | 0.722826 |
04ca91c6491a6d042e5476b1d4ad3322b1eba4c2 | 5,548 | py | Python | test/test_SegmentMaker_validate.py | josiah-wolf-oberholtzer/consort | 6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571 | [
"MIT"
] | 9 | 2015-02-11T09:35:40.000Z | 2019-04-29T23:57:49.000Z | test/test_SegmentMaker_validate.py | josiah-wolf-oberholtzer/consort | 6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571 | [
"MIT"
] | 2 | 2016-02-07T18:54:47.000Z | 2017-08-10T01:38:01.000Z | test/test_SegmentMaker_validate.py | josiah-wolf-oberholtzer/consort | 6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571 | [
"MIT"
] | 1 | 2019-05-13T12:37:15.000Z | 2019-05-13T12:37:15.000Z | import abjad
import collections
import consort
from abjad.tools import systemtools
def test_SegmentMaker_validate_01():
segment_metadata = collections.OrderedDict(
segment_count=2,
segment_number=1,
)
music_specifier = consort.MusicSpecifier(
pitch_handler=consort.AbsolutePit... | 34.459627 | 82 | 0.329668 |
014f3af09f2d09e836899a73662e53a589de222b | 214 | py | Python | co2_read.py | ClifHouck/cython-libholtekco2 | 01524fee0d4f937d5ee2799923bbe7bed327bb18 | [
"MIT"
] | null | null | null | co2_read.py | ClifHouck/cython-libholtekco2 | 01524fee0d4f937d5ee2799923bbe7bed327bb18 | [
"MIT"
] | null | null | null | co2_read.py | ClifHouck/cython-libholtekco2 | 01524fee0d4f937d5ee2799923bbe7bed327bb18 | [
"MIT"
] | null | null | null | import holtekco2
import time
device = holtekco2.CO2Device()
for i in range(0, 100):
try:
print device.read_data()
except Exception as e:
pass
#print e, e.data
time.sleep(0.1)
| 15.285714 | 32 | 0.61215 |
64167f26a9b10211457c6d7b273c645f98b9cb74 | 1,830 | py | Python | app/app.py | tinybike/bigtrees-flask | f385c5f58eeba8c2e4b5b6f5bdd90fe779aa87ce | [
"MIT"
] | 1 | 2015-03-09T02:45:36.000Z | 2015-03-09T02:45:36.000Z | app/app.py | tinybike/bigtrees-flask | f385c5f58eeba8c2e4b5b6f5bdd90fe779aa87ce | [
"MIT"
] | null | null | null | app/app.py | tinybike/bigtrees-flask | f385c5f58eeba8c2e4b5b6f5bdd90fe779aa87ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
bigtrees web app
"""
from __future__ import division
import os
from flask import Flask, request, render_template
port = int(os.environ.get("PORT", 5000))
app = Flask(__name__)
app.debug = "DYNO" not in os.environ
app.config["datafile"] = os.path.join("app", "data", "TP001_jenkins.csv")
@ap... | 32.105263 | 77 | 0.625137 |
71a38aec87a851522400b3bd4e7e07596d30aec8 | 2,712 | py | Python | hopdarm/cepstrum.py | NCBI-Codeathons/HIPDARM | 844a23d4a413712e0ade2bad3e9ddd4b2b5f1cc8 | [
"MIT"
] | 1 | 2019-11-09T03:29:01.000Z | 2019-11-09T03:29:01.000Z | hopdarm/cepstrum.py | NCBI-Codeathons/HOPDARM | 844a23d4a413712e0ade2bad3e9ddd4b2b5f1cc8 | [
"MIT"
] | null | null | null | hopdarm/cepstrum.py | NCBI-Codeathons/HOPDARM | 844a23d4a413712e0ade2bad3e9ddd4b2b5f1cc8 | [
"MIT"
] | 1 | 2019-11-09T16:43:43.000Z | 2019-11-09T16:43:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from argparse import ArgumentParser
from tensorflow import keras
from pathlib import Path
from numpy.fft import fft, ifft
parser = ArgumentParser()
parser.add_argument('--latest', action='store_true')
args = parser.parse_args()
... | 27.12 | 90 | 0.664823 |
d11ae4a1ef7ad2066e997cac5c7756bef9d83d82 | 14,227 | py | Python | auto-update.py | MikeOwino/virus-1 | be656443ece52984d438b8c799da0b52ca56cc1d | [
"MIT"
] | null | null | null | auto-update.py | MikeOwino/virus-1 | be656443ece52984d438b8c799da0b52ca56cc1d | [
"MIT"
] | null | null | null | auto-update.py | MikeOwino/virus-1 | be656443ece52984d438b8c799da0b52ca56cc1d | [
"MIT"
] | null | null | null | import subprocess
import sqlite3
import time
import urllib
from datetime import datetime
from urllib.request import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
try:
chrome_options = Options()
chrome_options.add_argument('--headles... | 37.341207 | 185 | 0.520981 |
7aceecddd92b4c062edaba1a16d8be8712aa9113 | 1,427 | py | Python | tricircle-6.0.0/tricircle/network/central_sfc_plugin.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2021-03-19T16:48:54.000Z | 2021-03-19T16:48:54.000Z | tricircle-6.0.0/tricircle/network/central_sfc_plugin.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | tricircle-6.0.0/tricircle/network/central_sfc_plugin.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2017 Huawei Technologies Co., Ltd.
# 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
#
# Unl... | 33.97619 | 78 | 0.730203 |
58030a2b35c9a9f161d8736db34050dae64b9cc6 | 2,447 | py | Python | hummingbird/ml/operator_converters/sklearn/discretizer.py | gwd666/hummingbird | a39f0fbf4016754f8301dbaf54b0291b6a2e02e0 | [
"MIT"
] | null | null | null | hummingbird/ml/operator_converters/sklearn/discretizer.py | gwd666/hummingbird | a39f0fbf4016754f8301dbaf54b0291b6a2e02e0 | [
"MIT"
] | null | null | null | hummingbird/ml/operator_converters/sklearn/discretizer.py | gwd666/hummingbird | a39f0fbf4016754f8301dbaf54b0291b6a2e02e0 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Conve... | 37.075758 | 94 | 0.654679 |
d19732da0748fea9d826e1134b4ca44f3e74ec74 | 1,338 | py | Python | airbnb_api/api_function.py | mljarman/testdeploymentapp | b245dd478f020566da67dd00ab5558afca723f70 | [
"MIT"
] | null | null | null | airbnb_api/api_function.py | mljarman/testdeploymentapp | b245dd478f020566da67dd00ab5558afca723f70 | [
"MIT"
] | 1 | 2021-06-02T01:01:12.000Z | 2021-06-02T01:01:12.000Z | airbnb_api/api_function.py | mljarman/testdeploymentapp | b245dd478f020566da67dd00ab5558afca723f70 | [
"MIT"
] | null | null | null | import spacy
from spacy.tokenizer import Tokenizer
def get_lemmas(text):
nlp = spacy.load("en_core_web_sm-2.2.5")
tokenizer = Tokenizer(nlp.vocab)
STOP_WORDS = nlp.Defaults.stop_words.union([' ', 'und', '-', 'die', 'der', 'berlin', 'ein', 'das', 'mit', 'ist', 'im', 'zu', 'eine', 'es', 'für'
... | 24.777778 | 149 | 0.555306 |
abd622d154e7ae385c47f427dd3f66101f0035ed | 15,583 | py | Python | selfdrive/car/honda/carstate.py | Nanosekunde/openpilot | 334c74172f1b8cab278fb6203d8cf0338652ad55 | [
"MIT"
] | 1 | 2020-01-27T13:00:51.000Z | 2020-01-27T13:00:51.000Z | selfdrive/car/honda/carstate.py | Nanosekunde/openpilot | 334c74172f1b8cab278fb6203d8cf0338652ad55 | [
"MIT"
] | 2 | 2019-10-03T09:20:55.000Z | 2019-10-03T09:51:49.000Z | selfdrive/car/honda/carstate.py | Nanosekunde/openpilot | 334c74172f1b8cab278fb6203d8cf0338652ad55 | [
"MIT"
] | 2 | 2019-09-29T14:44:10.000Z | 2019-09-30T16:06:48.000Z | from common.numpy_fast import interp
from common.kalman.simple_kalman import KF1D
from selfdrive.can.can_define import CANDefine
from selfdrive.can.parser import CANParser
from selfdrive.config import Conversions as CV
from selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, SPEED_FACTOR, HONDA_BOSCH
def pars... | 42.928375 | 149 | 0.650196 |
3c372eb6f9c9bd354743a847abbde02853886cc4 | 2,005 | py | Python | tests/test_utils_stats.py | wondersell/seller-stats | bb55fcb5e24afe5636c7d38d59a0d6128d16f231 | [
"MIT"
] | 2 | 2020-09-05T07:32:43.000Z | 2021-02-19T00:23:43.000Z | tests/test_utils_stats.py | wondersell/seller-stats | bb55fcb5e24afe5636c7d38d59a0d6128d16f231 | [
"MIT"
] | 94 | 2020-05-18T19:55:01.000Z | 2021-08-02T06:21:25.000Z | tests/test_utils_stats.py | wondersell/seller-stats | bb55fcb5e24afe5636c7d38d59a0d6128d16f231 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytest
from seller_stats.utils.stats import get_distribution_thresholds
@pytest.mark.parametrize('mock_data, mock_thresholds, mock_labels', [
[(1, 450, 1294, 2455, 3964, 4345), [0, 500, 1000, 1500, 2000, 2500, np.inf], ['0-500', '500-1000', '1000-1500', '1500-2000', ... | 38.557692 | 152 | 0.696758 |
f4a80e931581f48eac6021bb63e69bf773604ce3 | 12,755 | py | Python | srpc/connection.py | fergul/py-SRPC | 14d75934ee8930c002db9d579533a1544df35f8a | [
"0BSD"
] | null | null | null | srpc/connection.py | fergul/py-SRPC | 14d75934ee8930c002db9d579533a1544df35f8a | [
"0BSD"
] | null | null | null | srpc/connection.py | fergul/py-SRPC | 14d75934ee8930c002db9d579533a1544df35f8a | [
"0BSD"
] | null | null | null | from threading import Condition
from payload import ConnectPayload, ControlPayload, DataPayload
from srpcDefs import SRPCDef, Command
from srpcTypes import Query
class Connection(object):
"""Manages state for a single RPC connection to another host"""
#SRPC states
IDLE = 0
QACK_SENT = 1
RESPONSE_S... | 36.133144 | 86 | 0.552724 |
1553d755ee5a2586481837ed9288ae1d7add034e | 6,915 | py | Python | examples/contrib/gp/sv-dkl.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | 2 | 2019-01-26T01:53:31.000Z | 2020-02-26T17:39:17.000Z | examples/contrib/gp/sv-dkl.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | null | null | null | examples/contrib/gp/sv-dkl.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | 1 | 2019-02-06T14:39:57.000Z | 2019-02-06T14:39:57.000Z | """
An example to use Gaussian Process (GP) module to classify MNIST. Follow the idea
from reference [1], we will combine a convolutional neural network with a RBF kernel
to create a "deep" kernel. Then we train a SparseVariationalGP model using SVI. Note
that the model is trained end-to-end in mini-batch.
With defaul... | 43.765823 | 103 | 0.619234 |
0c8222c693a2160be2695588b749956706a35287 | 10,395 | py | Python | test/unit/ConfigLoaderNewTest.py | rmmilewi/pira | 58d6510af3d3dfc0581921d9e00bf24d026a8c44 | [
"BSD-3-Clause"
] | 6 | 2019-08-15T17:00:33.000Z | 2020-10-01T13:01:02.000Z | test/unit/ConfigLoaderNewTest.py | rmmilewi/pira | 58d6510af3d3dfc0581921d9e00bf24d026a8c44 | [
"BSD-3-Clause"
] | null | null | null | test/unit/ConfigLoaderNewTest.py | rmmilewi/pira | 58d6510af3d3dfc0581921d9e00bf24d026a8c44 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T21:10:11.000Z | 2020-02-18T21:10:11.000Z | """
File: ConfigLoaderNewTest.py
License: Part of the PIRA project. Licensed under BSD 3 clause license. See LICENSE.txt file at https://github.com/jplehr/pira/LICENSE.txt
Description: Tests for the argument mapping
"""
import sys
sys.path.append('../')
import unittest
import typing
from lib.ConfigurationLoader impo... | 36.346154 | 138 | 0.687734 |
94cbd6b0f119801a4d23849640b5bf284b799de3 | 8,941 | py | Python | predictions/consumers.py | jeancochrane/predictions | 7b6de33f272d4736cbbd674ae4c96971b9f752a0 | [
"MIT"
] | 2 | 2021-01-04T17:40:24.000Z | 2022-02-03T19:32:11.000Z | predictions/consumers.py | jeancochrane/predictions | 7b6de33f272d4736cbbd674ae4c96971b9f752a0 | [
"MIT"
] | 13 | 2020-11-14T17:27:47.000Z | 2020-12-29T04:44:13.000Z | predictions/consumers.py | jeancochrane/predictions | 7b6de33f272d4736cbbd674ae4c96971b9f752a0 | [
"MIT"
] | null | null | null | import json
from asgiref.sync import async_to_sync
from channels.generic.websocket import WebsocketConsumer
from django.conf import settings
from predictions import models
class BaseConsumer(WebsocketConsumer):
def connect(self):
if settings.GAME_IS_ACTIVE():
self.is_connected = True
... | 32.871324 | 88 | 0.541215 |
21054525506e32e5874922021e5d910f6e05428f | 4,248 | py | Python | google/api/servicecontrol/v1/google-cloud-servicecontrol-v1-py/google/cloud/servicecontrol_v1/types/metric_value.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/api/servicecontrol/v1/google-cloud-servicecontrol-v1-py/google/cloud/servicecontrol_v1/types/metric_value.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/api/servicecontrol/v1/google-cloud-servicecontrol-v1-py/google/cloud/servicecontrol_v1/types/metric_value.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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... | 31.93985 | 114 | 0.650424 |
ef5c79a818162b312a48f85b2a119d9429aedf81 | 7,969 | py | Python | tests/test_rows.py | python-tableformatter/tableformatter | fea430b7f6f0476bf88656176413b81847e3971c | [
"MIT"
] | 19 | 2018-06-23T11:29:55.000Z | 2021-01-05T03:10:16.000Z | tests/test_rows.py | python-tableformatter/tableformatter | fea430b7f6f0476bf88656176413b81847e3971c | [
"MIT"
] | 37 | 2018-06-22T22:10:44.000Z | 2021-01-22T15:49:01.000Z | tests/test_rows.py | python-tableformatter/tableformatter | fea430b7f6f0476bf88656176413b81847e3971c | [
"MIT"
] | 2 | 2019-04-25T11:11:15.000Z | 2020-11-02T10:49:45.000Z | # coding=utf-8
"""
Unit testing of tableformatter with simple cases
- with a list of tuples as table entries
- using a list of objects for the table entries
"""
import pytest
import tableformatter as tf
from collections import namedtuple
# Make the test results reproducible regardless of what color libraries are inst... | 41.722513 | 101 | 0.461413 |
d0e6962591d15c4a5fe401ea54f1f8b8741bd8d9 | 13,447 | py | Python | pseudo/generators/csharp_generator.py | mifieldxu/pseudo-lang | 889477c094236dc36526984be6f6537a4875e5a9 | [
"MIT"
] | 661 | 2016-03-12T07:32:36.000Z | 2018-11-12T14:31:30.000Z | pseudo/generators/csharp_generator.py | mifieldxu/pseudo-lang | 889477c094236dc36526984be6f6537a4875e5a9 | [
"MIT"
] | 21 | 2016-03-07T03:49:17.000Z | 2018-11-05T08:30:42.000Z | pseudo/generators/csharp_generator.py | mifieldxu/pseudo-lang | 889477c094236dc36526984be6f6537a4875e5a9 | [
"MIT"
] | 45 | 2016-03-07T03:48:09.000Z | 2018-04-16T20:55:47.000Z | from pseudo.code_generator import CodeGenerator, switch
from pseudo.middlewares import DeclarationMiddleware, NameMiddleware, TupleMiddleware
from pseudo.pseudo_tree import Node, local
OPS = {'not': '!', 'and': '&&', 'or': '||'}
def index_switch(s):
if isinstance(s.sequence.pseudo_type, list) and s.sequence.pseud... | 32.480676 | 205 | 0.460921 |
2b9f6c03e209ec15796be3ae672ecd8bf23eb8fe | 2,648 | py | Python | Scrape/better_reads.py | better-reads/Data-Science | 972231901a0dd790e67ad148cf1c3f07c4a19f1e | [
"MIT"
] | null | null | null | Scrape/better_reads.py | better-reads/Data-Science | 972231901a0dd790e67ad148cf1c3f07c4a19f1e | [
"MIT"
] | null | null | null | Scrape/better_reads.py | better-reads/Data-Science | 972231901a0dd790e67ad148cf1c3f07c4a19f1e | [
"MIT"
] | 1 | 2019-08-02T12:34:24.000Z | 2019-08-02T12:34:24.000Z | import bs4
import pandas as pd
import numpy as np
import requests as r
import re
import traceback
export_file_name = 'Best_Books_Ever.csv'
def initiate_1():
# Target url to web scrape
url = 'https://www.goodreads.com/list/show/1.Best_Books_Ever'
# Get url and check status
res = r.get(url)... | 27.873684 | 77 | 0.553625 |
4b7f5e3ca6e979b75f489fcaa2422bc5bd7c27c0 | 21,933 | py | Python | salt/states/glassfish.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | salt/states/glassfish.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | salt/states/glassfish.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | """
Manage Glassfish/Payara server
.. versionadded:: Carbon
Management of glassfish using its RESTful API
You can setup connection parameters like this
.. code-block:: yaml
- server:
- ssl: true
- url: localhost
- port: 4848
- user: admin
- password: changeit
"""
import salt.utils.... | 32.932432 | 112 | 0.602198 |
434a36753ab147cd5fdd8119107b0816912489d5 | 4,866 | py | Python | tests/unit_tests/weightwindows/test_wwinp_reader.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | 123 | 2015-01-09T18:21:00.000Z | 2018-07-21T03:05:48.000Z | tests/unit_tests/weightwindows/test_wwinp_reader.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | 673 | 2015-01-02T20:37:12.000Z | 2018-08-02T15:28:47.000Z | tests/unit_tests/weightwindows/test_wwinp_reader.py | RyotaroOKabe/openmc | 9926294324cb80dd7ff0e4f1a9b361addfcfa8fc | [
"MIT"
] | 102 | 2015-01-03T18:18:46.000Z | 2018-07-26T14:34:13.000Z | from pathlib import Path
import numpy as np
import openmc
import pytest
# check that we can successfully read wwinp files with the following contents:
#
# - neutrons on a rectilinear mesh
# - neutrons and photons on a rectilinear mesh
# check that the following raises the correct exceptions (for now):
#
# - wwinp... | 33.791667 | 78 | 0.560625 |
ed9659d073d9ba9f362e3f71f3a2bb2a1248d1d2 | 5,685 | py | Python | classification/clustering/cluster.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | classification/clustering/cluster.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | classification/clustering/cluster.py | mananshah99/diseasenetworks | 14f910af07d8d62cf5643b828598dd8c958db750 | [
"MIT"
] | null | null | null | '''
cluster.py
Description: cluster.py is a class-based file that clusters documents using
cosine similarity with tf-idf vectorization. It further provides robust and
easily understandable function headings and descriptors.
Usage: cluster.py may not be called directly in a program--it consists of classes
* Docume... | 32.485714 | 100 | 0.604222 |
c7931db7e6160f76c77d59583a2faf5678f95f79 | 11,290 | gyp | Python | src/cc/cc_tests.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 9 | 2018-09-21T05:36:12.000Z | 2021-11-15T15:14:36.000Z | src/cc/cc_tests.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | null | null | null | src/cc/cc_tests.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 3 | 2018-11-28T14:54:13.000Z | 2020-07-02T07:36:07.000Z | # Copyright (c) 2012 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.
{
'variables': {
'chromium_code': 1,
'cc_unit_tests_source_files': [
'animation/animation_unittest.cc',
'animation/keyframed_animat... | 35.84127 | 105 | 0.631621 |
b19d41eb60602c49cc62fe7804d827f3addaef9c | 168 | py | Python | litedb/__init__.py | jjmrocha/liteDB | f23901a548d45cd03209e86b7caa6e41b7f3c2fd | [
"MIT"
] | 1 | 2021-07-15T00:34:34.000Z | 2021-07-15T00:34:34.000Z | litedb/__init__.py | jjmrocha/liteDB | f23901a548d45cd03209e86b7caa6e41b7f3c2fd | [
"MIT"
] | null | null | null | litedb/__init__.py | jjmrocha/liteDB | f23901a548d45cd03209e86b7caa6e41b7f3c2fd | [
"MIT"
] | null | null | null | from litedb.bucket import Bucket
from litedb.erros import *
from litedb.model import Field
from litedb.query import where, asc, desc
from litedb.repo import Repository
| 28 | 41 | 0.821429 |
032964d2a12aaede0540fb34f22520556c6bed79 | 781 | py | Python | module3-nosql-and-document-oriented-databases/insert_into_MongoDB.py | Captmoonshot/DS-Unit-3-Sprint-2-SQL-and-Databases | 1487f223f8752002c45494cd9312017755a06728 | [
"MIT"
] | null | null | null | module3-nosql-and-document-oriented-databases/insert_into_MongoDB.py | Captmoonshot/DS-Unit-3-Sprint-2-SQL-and-Databases | 1487f223f8752002c45494cd9312017755a06728 | [
"MIT"
] | null | null | null | module3-nosql-and-document-oriented-databases/insert_into_MongoDB.py | Captmoonshot/DS-Unit-3-Sprint-2-SQL-and-Databases | 1487f223f8752002c45494cd9312017755a06728 | [
"MIT"
] | null | null | null | import pymongo
import json
"""I have a file called rpg_as_json.json in the directory"""
client = pymongo.MongoClient("mongodb://<username>:<PassWord>@lambda-mongo-db-shard-00-00-ht3ri.mongodb.net:27017,lambda-mongo-db-shard-00-01-ht3ri.mongodb.net:27017,lambda-mongo-db-shard-00-02-ht3ri.mongodb.net:27017/test?ssl=tr... | 31.24 | 302 | 0.773367 |
411003abbf9adff6c9c4b86a403b4f3c35e2dafc | 18,744 | py | Python | flask_uploads.py | jacobthetechy/flask-uploads | 592ba9eddae0cd831e5ef9a79689eb2fcfa50919 | [
"MIT"
] | null | null | null | flask_uploads.py | jacobthetechy/flask-uploads | 592ba9eddae0cd831e5ef9a79689eb2fcfa50919 | [
"MIT"
] | null | null | null | flask_uploads.py | jacobthetechy/flask-uploads | 592ba9eddae0cd831e5ef9a79689eb2fcfa50919 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flaskext.uploads
================
This module provides upload support for Flask. The basic pattern is to set up
an `UploadSet` object and upload your files to it.
:copyright: 2010 Matthew "LeafStorm" Frazier
:license: MIT/X11, see LICENSE for details
"""
import sys
PY3 = sys.version_inf... | 37.116832 | 79 | 0.643939 |
d77b6112c6005cf4345025e3027c7af3d7c54a36 | 8,377 | py | Python | vis2png.py | jramapuram/visdom_to_csv | 41b35ba6ccda14cbc32ed50fe32264784ade75ee | [
"MIT"
] | 1 | 2021-06-14T20:11:15.000Z | 2021-06-14T20:11:15.000Z | vis2png.py | jramapuram/visdom_to_csv | 41b35ba6ccda14cbc32ed50fe32264784ade75ee | [
"MIT"
] | null | null | null | vis2png.py | jramapuram/visdom_to_csv | 41b35ba6ccda14cbc32ed50fe32264784ade75ee | [
"MIT"
] | null | null | null | import os
import json
import pickle
import argparse
import numpy as np
import seaborn as sns
import pandas as pd
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 13})
# plt.rcParams.update({'font.size': 5})
plt.rcParams.update({'savefig.dpi': 1000})
# set global... | 40.468599 | 107 | 0.61251 |
66c8795b11e79d29444ed25b7dcddee56903fd35 | 13,981 | py | Python | venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 38,667 | 2015-01-01T00:15:34.000Z | 2022-03-31T22:57:03.000Z | venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 1,242 | 2015-01-22T14:56:46.000Z | 2022-03-31T18:02:38.000Z | venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 11,269 | 2015-01-01T08:41:17.000Z | 2022-03-31T16:12:52.000Z | from __future__ import absolute_import
import re
from collections import namedtuple
from ..exceptions import LocationParseError
from ..packages import six
url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]
# We only want to normalize urls with an HTTP(S) scheme.
# urllib3 infers URLs withou... | 32.438515 | 88 | 0.561548 |
f136efa96ad7a65ce872aa4668b4c3e8e48b1d8d | 2,221 | py | Python | Scripts/core/google/protobuf/message.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/core/google/protobuf/message.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/core/google/protobuf/message.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Core\google\protobuf\message.py
# Compiled at: 2011-01-24 08:39:36
# Size of source mod 2**32: 9937 bytes
_... | 23.378947 | 107 | 0.677172 |
7cf299dd84e23a1245c42169bf2a3d76df72ef81 | 5,238 | py | Python | timetracker/activities/views.py | tm-kn/cht2520-assignment-1-django | 7090084aa6d9f459dcc70479d1b4dbcc6422b79f | [
"BSD-2-Clause"
] | null | null | null | timetracker/activities/views.py | tm-kn/cht2520-assignment-1-django | 7090084aa6d9f459dcc70479d1b4dbcc6422b79f | [
"BSD-2-Clause"
] | 4 | 2020-02-12T00:48:34.000Z | 2021-06-10T21:39:20.000Z | timetracker/activities/views.py | tm-kn/cht2520-assignment-1-django | 7090084aa6d9f459dcc70479d1b4dbcc6422b79f | [
"BSD-2-Clause"
] | null | null | null | from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.postgres.search import SearchVector
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.utils import timezone
from django.utils.translation import ugettext as _
from djang... | 34.235294 | 78 | 0.674876 |
f552659842e02cf3ada34c0f05d8219ccf2bd308 | 432 | py | Python | regression_ensemble.py | davide97l/wine_price_prediction | 85190235e9d81e41966e82cab7ef05599966a93a | [
"MIT"
] | null | null | null | regression_ensemble.py | davide97l/wine_price_prediction | 85190235e9d81e41966e82cab7ef05599966a93a | [
"MIT"
] | null | null | null | regression_ensemble.py | davide97l/wine_price_prediction | 85190235e9d81e41966e82cab7ef05599966a93a | [
"MIT"
] | null | null | null | import pandas as pd
if __name__ == '__main__':
files = ["results_train/rf_predictions.csv", "results_train/xg_predictions.csv"]
assert len(files) > 1
data = pd.read_csv(files[0], header=None).values
for f in files[1:]:
df = pd.read_csv(f, header=None).values
data += df
data //= len... | 30.857143 | 84 | 0.655093 |
e0e950454f8deb5a36aef0744694a19742bb2c1c | 4,696 | py | Python | TRV.indigoPlugin/Contents/Server Plugin/zwave_interpreter/zwave_utility.py | autolog/TRV_Controller | 39b40e666cf35dad517335f1bea27a8ab45e2c22 | [
"MIT"
] | null | null | null | TRV.indigoPlugin/Contents/Server Plugin/zwave_interpreter/zwave_utility.py | autolog/TRV_Controller | 39b40e666cf35dad517335f1bea27a8ab45e2c22 | [
"MIT"
] | null | null | null | TRV.indigoPlugin/Contents/Server Plugin/zwave_interpreter/zwave_utility.py | autolog/TRV_Controller | 39b40e666cf35dad517335f1bea27a8ab45e2c22 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Z-Wave Interpreter © Autolog 2020
#
from .zwave_constants import *
from .zwave_constants_interpretation import *
class ZwaveUtility:
"""
Z-wave Interpreter Utility methods
"""
def __init__(self, exception_handler, logger, command_classes, zw_interp... | 37.870968 | 146 | 0.59753 |
2d95cda8303c19cd615aa9fe0178e74f0b78234f | 4,351 | py | Python | py_alg_dat/stack.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | py_alg_dat/stack.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | py_alg_dat/stack.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2015 by Brian Horn, trycatchhorn@gmail.com.
#
# 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 w... | 28.81457 | 79 | 0.618019 |
b6bf0471eb19a40c74ff242b002ee70b327313e8 | 6,278 | py | Python | soccer/gameplay/tests/test_field.py | bopas2/robocup-software | 2b926983e745e109db3630a8c919cb1d4651891d | [
"Apache-2.0"
] | 1 | 2019-09-24T22:59:25.000Z | 2019-09-24T22:59:25.000Z | soccer/gameplay/tests/test_field.py | bopas2/robocup-software | 2b926983e745e109db3630a8c919cb1d4651891d | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/tests/test_field.py | bopas2/robocup-software | 2b926983e745e109db3630a8c919cb1d4651891d | [
"Apache-2.0"
] | null | null | null | import unittest
import main
import robocup
import evaluation.field
import constants
class Moc_Robot:
def __init__(self, x, y):
self.pos = robocup.Point(x, y)
self.visible = True;
def set_pos(self, x, y):
self.pos = robocup.Point(x, y)
class TestField(unittest.TestCase):
def __init__(self, *args, **kwargs):
... | 40.503226 | 144 | 0.692099 |
5fc9d24fdf6409d65839a6783676cd550e96d6b2 | 11,821 | py | Python | codes/models/base_model.py | YuvalBahat/Explorable-Super-Resolution_old | 49fa9ca77d28e4e508422b8f11b86f17fe75a258 | [
"Apache-2.0"
] | null | null | null | codes/models/base_model.py | YuvalBahat/Explorable-Super-Resolution_old | 49fa9ca77d28e4e508422b8f11b86f17fe75a258 | [
"Apache-2.0"
] | null | null | null | codes/models/base_model.py | YuvalBahat/Explorable-Super-Resolution_old | 49fa9ca77d28e4e508422b8f11b86f17fe75a258 | [
"Apache-2.0"
] | null | null | null | import os
import torch
import torch.nn as nn
import CEM.CEMnet as CEMnet
import numpy as np
import collections
import matplotlib.pyplot as plt
from utils.util import compute_RF_numerical
class BaseModel():
def __init__(self, opt):
self.opt = opt
self.save_dir = opt['path']['models'] # save models
... | 54.474654 | 207 | 0.625159 |
b905b4c15d4a96770465056a43d4f216fff16ebd | 267 | py | Python | LearningCurve/make_pizza/make_pizzas/views.py | maoxiaopan/Python | b156c147d3e38c4a31e01e6577afff761073291f | [
"Apache-2.0"
] | null | null | null | LearningCurve/make_pizza/make_pizzas/views.py | maoxiaopan/Python | b156c147d3e38c4a31e01e6577afff761073291f | [
"Apache-2.0"
] | null | null | null | LearningCurve/make_pizza/make_pizzas/views.py | maoxiaopan/Python | b156c147d3e38c4a31e01e6577afff761073291f | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.contrib.admin.models import LogEntry, ADDITION,CHANGE,DELETION
# Create your views here.
def index(request):
return render(request, 'make_pizzas/index.html')
# This "templates" folder must be proprietary 专有 term, | 29.666667 | 74 | 0.786517 |
be5f47a7707db960555edbbbb4f502f906a7fcdf | 2,026 | py | Python | visprotocol/visprotocol/server/Ball_ThreeScreens.py | ClandininLab/multistim | 9aba24a85317e4cbd81555be45c4df87cfad035c | [
"MIT"
] | null | null | null | visprotocol/visprotocol/server/Ball_ThreeScreens.py | ClandininLab/multistim | 9aba24a85317e4cbd81555be45c4df87cfad035c | [
"MIT"
] | 5 | 2019-08-07T16:58:50.000Z | 2019-08-29T15:11:23.000Z | visprotocol/visprotocol/server/Ball_ThreeScreens.py | ClandininLab/multistim | 9aba24a85317e4cbd81555be45c4df87cfad035c | [
"MIT"
] | 1 | 2021-12-05T00:26:43.000Z | 2021-12-05T00:26:43.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from flystim.screen import Screen
from flystim.stim_server import StimServer
from flystim.dlpc350 import make_dlpc350_objects
from math import pi
# Define screen(s) for the rig
def dir_to_tri_list(dir):
# set screen width
w = 3.0e-2
# set coordinates as a fun... | 28.942857 | 80 | 0.531589 |
a002d614e984d4482144ddbb82ac341cdaf45436 | 1,222 | py | Python | gwells/models/LithologyStructureCode.py | fieranmason/gwells | 867d56bbe52343054862c72ac6285058a6556a58 | [
"Apache-2.0"
] | 1 | 2020-01-29T22:42:40.000Z | 2020-01-29T22:42:40.000Z | gwells/models/LithologyStructureCode.py | fieranmason/gwells | 867d56bbe52343054862c72ac6285058a6556a58 | [
"Apache-2.0"
] | 1 | 2018-05-02T05:28:33.000Z | 2018-05-09T15:58:07.000Z | gwells/models/LithologyStructureCode.py | fieranmason/gwells | 867d56bbe52343054862c72ac6285058a6556a58 | [
"Apache-2.0"
] | 1 | 2018-05-02T23:56:48.000Z | 2018-05-02T23:56:48.000Z | """
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distri... | 35.941176 | 96 | 0.729951 |
7479bc0a134621ad4bffe7da45ba543cbe286b15 | 2,435 | py | Python | sys_tools.py | Alternative-Profit/Ubot | 529514307c5431144fd56f6aba928dce1e880d93 | [
"Apache-2.0"
] | 1 | 2022-01-04T11:36:06.000Z | 2022-01-04T11:36:06.000Z | sys_tools.py | Alternative-Profit/Ubot | 529514307c5431144fd56f6aba928dce1e880d93 | [
"Apache-2.0"
] | 1 | 2022-01-08T20:18:50.000Z | 2022-01-08T20:18:50.000Z | sys_tools.py | Alternative-Profit/Ubot | 529514307c5431144fd56f6aba928dce1e880d93 | [
"Apache-2.0"
] | 3 | 2022-01-08T20:10:47.000Z | 2022-03-12T08:09:32.000Z | import sys
from os import environ
from typing import Dict, Optional
_CACHE: Dict[str, str] = {}
def secured_env(key: str, default: Optional[str] = None) -> Optional[str]:
""" get secured env """
if not key:
raise ValueError
try:
value = environ.pop(key)
except KeyError:
if k... | 27.670455 | 97 | 0.558932 |
7b6979cbfc8c0259814215049208ed6936f4546d | 508 | py | Python | classical/webapp/blog/models.py | madhav28/Montecarlo_Quant | 0aadc43696443a4d1e235bea2dcf033b70ef0ec0 | [
"Apache-2.0"
] | 23 | 2018-12-19T13:13:50.000Z | 2022-03-29T13:20:46.000Z | classical/webapp/blog/models.py | madhav28/Montecarlo_Quant | 0aadc43696443a4d1e235bea2dcf033b70ef0ec0 | [
"Apache-2.0"
] | 4 | 2019-01-27T10:41:55.000Z | 2019-11-09T18:44:15.000Z | classical/webapp/blog/models.py | madhav28/Montecarlo_Quant | 0aadc43696443a4d1e235bea2dcf033b70ef0ec0 | [
"Apache-2.0"
] | 11 | 2018-12-15T06:35:22.000Z | 2021-07-26T12:55:15.000Z | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.urls import reverse
class Post(models.Model):
title = models.CharField(max_length=1000)
content=models.TextField()
Date_Posted = models.DateTimeField(default=timezone.now)
author=mode... | 28.222222 | 60 | 0.744094 |
e951e7f7fa1c81cda6ede306ed5eec713a89941d | 7,359 | py | Python | models.py | wangjinjia1/dcase2019task5_YSU | c307cd118bb27cb913850f80d14f327399145ee9 | [
"MIT"
] | 3 | 2019-07-22T07:22:37.000Z | 2020-11-25T09:32:22.000Z | models.py | wangjinjia1/dcase2019task5_YSU | c307cd118bb27cb913850f80d14f327399145ee9 | [
"MIT"
] | null | null | null | models.py | wangjinjia1/dcase2019task5_YSU | c307cd118bb27cb913850f80d14f327399145ee9 | [
"MIT"
] | 1 | 2020-07-31T07:03:43.000Z | 2020-07-31T07:03:43.000Z | import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def move_data_to_gpu(x, cuda):
if 'float' in str(x.dtype):
x = torch.Tensor(x)
elif 'int' in str(x.dtype):
x = torch.LongTensor(x)
else:
raise Exception("Error!")
if cuda:
... | 29.673387 | 111 | 0.556326 |
77631aeeea84779dcf56e5caacb3c633b4cbf807 | 32,485 | py | Python | pymysqlreplication/tests/test_data_type.py | hurbcom/python-mysql-replication | 7e97754b9e77dc7a75c0af05444c2f40dd2f6018 | [
"Apache-2.0"
] | null | null | null | pymysqlreplication/tests/test_data_type.py | hurbcom/python-mysql-replication | 7e97754b9e77dc7a75c0af05444c2f40dd2f6018 | [
"Apache-2.0"
] | null | null | null | pymysqlreplication/tests/test_data_type.py | hurbcom/python-mysql-replication | 7e97754b9e77dc7a75c0af05444c2f40dd2f6018 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import copy
import platform
import json
import sys
import os
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
from decimal import Decimal
from pymysqlreplication.tests import base
from pymysqlreplication.constants.BINLOG import *
from pymysqlreplication... | 49.294385 | 159 | 0.638633 |
f29c6b178b28c822d797671f6d2e64d2a974b45d | 7,244 | py | Python | flask/testing.py | AIHackerTest/flask | b4fb9fda1fe9cd49c3db5ccb539e99693b1d582f | [
"BSD-3-Clause"
] | 2 | 2017-11-22T01:23:35.000Z | 2017-11-22T01:24:17.000Z | flask/testing.py | AIHackerTest/flask | b4fb9fda1fe9cd49c3db5ccb539e99693b1d582f | [
"BSD-3-Clause"
] | null | null | null | flask/testing.py | AIHackerTest/flask | b4fb9fda1fe9cd49c3db5ccb539e99693b1d582f | [
"BSD-3-Clause"
] | 2 | 2017-11-22T07:00:34.000Z | 2019-07-01T08:57:19.000Z | # -*- coding: utf-8 -*-
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import werkzeug
from contextlib im... | 36.22 | 78 | 0.618167 |
23ca7bf66fa3a9b6d074c27aae1566fbe82b03c5 | 10,368 | py | Python | tests/tree_struct_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 26 | 2016-06-04T20:48:09.000Z | 2021-07-28T18:13:30.000Z | tests/tree_struct_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 146 | 2016-04-06T19:07:54.000Z | 2022-01-02T20:09:53.000Z | tests/tree_struct_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 28 | 2016-04-09T20:40:48.000Z | 2021-05-08T17:52:59.000Z | from unittest import TestCase
from regparser.tree import struct
from regparser.tree.depth.markers import MARKERLESS
class NodeTest(TestCase):
def assert_depth(self, depth, label, node_type=struct.Node.REGTEXT):
node = struct.Node("x", label=label, node_type=node_type)
self.assertEqual(depth, node... | 40.5 | 78 | 0.54755 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.