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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14f355cdab23daa8309ed76d9005eb380f2cd860 | 1,706 | py | Python | tests/utils/test_relation_utils.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 61 | 2019-05-23T14:41:53.000Z | 2022-03-03T11:33:38.000Z | tests/utils/test_relation_utils.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 505 | 2019-05-20T15:21:09.000Z | 2022-03-01T23:10:31.000Z | tests/utils/test_relation_utils.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 33 | 2019-05-23T01:30:47.000Z | 2022-03-28T10:25:09.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 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 agr... | 34.12 | 74 | 0.644197 |
66b3f32e950662e83532f03a6714dca31b23d959 | 5,217 | py | Python | ckanext/archiver/command_celery.py | vrk-kpa/ckanext-archiver | 13472493d4ec55a6f9299bee6ba7c98b4ddbcfb1 | [
"MIT"
] | 16 | 2016-01-11T14:42:41.000Z | 2022-03-18T03:20:15.000Z | ckanext/archiver/command_celery.py | vrk-kpa/ckanext-archiver | 13472493d4ec55a6f9299bee6ba7c98b4ddbcfb1 | [
"MIT"
] | 49 | 2015-03-23T14:47:37.000Z | 2021-05-27T06:27:55.000Z | ckanext/archiver/command_celery.py | vrk-kpa/ckanext-archiver | 13472493d4ec55a6f9299bee6ba7c98b4ddbcfb1 | [
"MIT"
] | 30 | 2015-01-08T09:04:31.000Z | 2021-06-22T13:53:21.000Z | from __future__ import print_function
from future import standard_library
import sys
import os
from pkg_resources import iter_entry_points, VersionConflict
import configparser
from celery import Celery
from ckan.lib.cli import CkanCommand
standard_library.install_aliases() # noqa
class CeleryCmd(CkanCommand):
... | 35.732877 | 117 | 0.562392 |
e3a5423b4e97ecb0001e4c01597f49059584916e | 887 | py | Python | python/cucim/src/cucim/skimage/morphology/__init__.py | chrisroat/cucim | 8b909e374b9a77bb1c8ad747c793c30a3d86d4b4 | [
"Apache-2.0"
] | null | null | null | python/cucim/src/cucim/skimage/morphology/__init__.py | chrisroat/cucim | 8b909e374b9a77bb1c8ad747c793c30a3d86d4b4 | [
"Apache-2.0"
] | null | null | null | python/cucim/src/cucim/skimage/morphology/__init__.py | chrisroat/cucim | 8b909e374b9a77bb1c8ad747c793c30a3d86d4b4 | [
"Apache-2.0"
] | null | null | null | from ._skeletonize import thin
from .binary import (binary_closing, binary_dilation, binary_erosion,
binary_opening)
from .footprints import (ball, cube, diamond, disk, octagon, octahedron,
rectangle, square, star)
from .gray import (black_tophat, closing, dilation, erosion... | 24.638889 | 72 | 0.631342 |
201217ecb5af970bd57bfc115d8e807bc8c946ab | 2,318 | py | Python | Iteration_03_Random_Walk.py | timothy-allan/41_PERCENT_CUT | 459064f75ecd99b0b32595564a7f556742f28a03 | [
"MIT"
] | null | null | null | Iteration_03_Random_Walk.py | timothy-allan/41_PERCENT_CUT | 459064f75ecd99b0b32595564a7f556742f28a03 | [
"MIT"
] | null | null | null | Iteration_03_Random_Walk.py | timothy-allan/41_PERCENT_CUT | 459064f75ecd99b0b32595564a7f556742f28a03 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 9 09:17:05 2019
@author: timallan
"""
'''
runfile('/Users/timallan/Desktop/whiteFang/05_CODE/PYTHON/PIL/RANDOM_WALK/PIL_random_walk_05.py', wdir='/Users/timallan/Desktop/whiteFang/05_CODE/PYTHON/PIL/RANDOM_WALK')
1910.6162600517273
125951 125951 98... | 23.896907 | 170 | 0.705349 |
f72fde9be8445c641564cc9689aca34ffff96645 | 5,280 | py | Python | mmdet/core/hook/ema.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | mmdet/core/hook/ema.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | mmdet/core/hook/ema.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import math
from mmcv.parallel import is_module_wrapper
from mmcv.runner.hooks import HOOKS, Hook
class BaseEMAHook(Hook):
"""Exponential Moving Average Hook.
Use Exponential Moving Average on all parameters of model in training
process. All par... | 40.305344 | 79 | 0.621212 |
4318141e6bc0960ef76475d89f4ad4e38b3e0e04 | 20,221 | py | Python | improver/calibration/dataframe_utilities.py | tjtg/improver | 9c8f014c63d9e7b7a8bf17677b17e9009a36d956 | [
"BSD-3-Clause"
] | null | null | null | improver/calibration/dataframe_utilities.py | tjtg/improver | 9c8f014c63d9e7b7a8bf17677b17e9009a36d956 | [
"BSD-3-Clause"
] | null | null | null | improver/calibration/dataframe_utilities.py | tjtg/improver | 9c8f014c63d9e7b7a8bf17677b17e9009a36d956 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 35.852837 | 88 | 0.655556 |
8d464156c0f851fd7283c78fa72549cb9b20c65a | 101 | py | Python | components/icdc-pidgin/tests/system_test.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 2 | 2019-06-10T15:30:51.000Z | 2020-01-18T23:24:13.000Z | components/icdc-pidgin/tests/system_test.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 2 | 2019-02-20T17:06:20.000Z | 2020-07-07T22:54:58.000Z | {{cookiecutter.package_name}}/tests/system_test.py | uc-cdis/template-repo | ebcf2e612c7ac092ffb58a64bf304ed800642bcd | [
"Apache-2.0"
] | 2 | 2018-10-30T21:38:57.000Z | 2020-09-08T19:01:30.000Z | def test_status_endpoint(client):
res = client.get("/_status")
assert res.status_code == 200
| 25.25 | 33 | 0.70297 |
1b309167e79bedb279b877ac1ae23476e9cab4d8 | 1,353 | py | Python | Examples/Nguyen_Dupuis.py | gyq18/Dynamic-traffic-assignment-node-based-with-CTM | 2533b7cea599d47ca4346ab00a00cfdc0bc22f5e | [
"MIT"
] | 14 | 2020-02-19T13:28:10.000Z | 2022-03-19T08:06:21.000Z | Examples/Nguyen_Dupuis.py | Xutete/Dynamic-traffic-assignment-node-based-with-CTM | 2533b7cea599d47ca4346ab00a00cfdc0bc22f5e | [
"MIT"
] | null | null | null | Examples/Nguyen_Dupuis.py | Xutete/Dynamic-traffic-assignment-node-based-with-CTM | 2533b7cea599d47ca4346ab00a00cfdc0bc22f5e | [
"MIT"
] | 5 | 2020-02-19T13:28:10.000Z | 2021-11-01T08:04:51.000Z | '''
@author: Sai Kiran Mayakuntla
'''
import sys
sys.path.append('../')
import numpy as np
from Codes import *
connections = [[1,2],[6],[10,16],[4,5],[6],[9],[7,8],[9],[11],[12,13],[11],[14,15],[19],[25],[17,18],[19],[23],[20],[23],[20],[21,22],[25],[24],[24],[],[]]
lengths = np.array([2,3,2,2,1,2,2,2,1,2,2,2,1,5,3,... | 28.787234 | 183 | 0.648928 |
e7fd118856dcb708223f713db2211f346b3be52b | 5,220 | py | Python | experiments/mynet/train_check.py | TeamOfProfGuo/DANet | 65f7cda4599dbdb1e44a755eb6b2a723ec244322 | [
"MIT"
] | null | null | null | experiments/mynet/train_check.py | TeamOfProfGuo/DANet | 65f7cda4599dbdb1e44a755eb6b2a723ec244322 | [
"MIT"
] | null | null | null | experiments/mynet/train_check.py | TeamOfProfGuo/DANet | 65f7cda4599dbdb1e44a755eb6b2a723ec244322 | [
"MIT"
] | 1 | 2021-03-04T08:51:17.000Z | 2021-03-04T08:51:17.000Z | ###########################################################################
# Created by: Hang Zhang
# Email: zhang.hang@rutgers.edu
# Copyright (c) 2017
###########################################################################
import os, sys
BASE_DIR = os.path.dirname(os.path.dirname(os.getcwd()))
sys.path.append(B... | 35.510204 | 120 | 0.656513 |
0eb78167d670a8782235ea4116c35b7184f38d7e | 3,642 | py | Python | test/IECoreRI/TextureOrientationTest.py | gcodebackups/cortex-vfx | 72fa6c6eb3327fce4faf01361c8fcc2e1e892672 | [
"BSD-3-Clause"
] | 5 | 2016-07-26T06:09:28.000Z | 2022-03-07T03:58:51.000Z | test/IECoreRI/TextureOrientationTest.py | gcodebackups/cortex-vfx | 72fa6c6eb3327fce4faf01361c8fcc2e1e892672 | [
"BSD-3-Clause"
] | null | null | null | test/IECoreRI/TextureOrientationTest.py | gcodebackups/cortex-vfx | 72fa6c6eb3327fce4faf01361c8fcc2e1e892672 | [
"BSD-3-Clause"
] | 3 | 2015-03-25T18:45:24.000Z | 2020-02-15T15:37:18.000Z | ##########################################################################
#
# Copyright (c) 2008, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 41.386364 | 110 | 0.692751 |
97ab12a588b967bc3b551e5276bf0fd965770ba0 | 2,706 | py | Python | tests/test_synthetic.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | 3 | 2020-07-02T18:39:36.000Z | 2021-06-16T09:35:53.000Z | tests/test_synthetic.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | 28 | 2020-06-26T12:47:52.000Z | 2020-09-08T00:33:42.000Z | tests/test_synthetic.py | dylanbuchi/MONAI | 1651f1b003b0ffae8b615d191952ad65ad091277 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 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 wri... | 29.413043 | 117 | 0.585366 |
4d98e106e4cd68c8c85c1f7e9ed64473269c13b1 | 890 | py | Python | backend/models/cnn_mnist.py | AroMorin/DNNOP | 271e65811fe7cadcffc8155049e256fa78c0c5c6 | [
"MIT"
] | 6 | 2020-01-14T00:01:34.000Z | 2021-12-28T14:31:05.000Z | backend/models/cnn_mnist.py | AroMorin/DNNOP | 271e65811fe7cadcffc8155049e256fa78c0c5c6 | [
"MIT"
] | null | null | null | backend/models/cnn_mnist.py | AroMorin/DNNOP | 271e65811fe7cadcffc8155049e256fa78c0c5c6 | [
"MIT"
] | 1 | 2020-09-06T10:44:29.000Z | 2020-09-06T10:44:29.000Z | """A script that defines a simple CNN, used in the PyTorch example to solve
MNIST problem
"""
import torch.nn as nn
import torch.nn.functional as F
import torch
class Net(nn.Module):
def __init__(self, model_params):
print("Creating basic CNN MNIST model")
super(Net, self).__init__()
self.c... | 32.962963 | 75 | 0.607865 |
e3ee9bc422cd8d4f66e40e646045bc5708377fff | 3,178 | py | Python | tests/test_repo_utils.py | MartinBasti/osbs-client | 1a6a99b5dc4e7dfa82f883ed74782f3842c447d3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_repo_utils.py | MartinBasti/osbs-client | 1a6a99b5dc4e7dfa82f883ed74782f3842c447d3 | [
"BSD-3-Clause"
] | 1 | 2018-04-25T18:33:55.000Z | 2018-04-26T10:56:09.000Z | tests/test_repo_utils.py | sosiouxme/osbs-client | 92e7ba9a838f2811796c0787ad0fde53a32f7ea2 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2017 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from flexmock import flexmock
from osbs.constants import REPO_CONFIG_FILE, ADDITIONAL_TAGS_FILE, REPO_CONTAINER_CONFIG
from osbs.repo_utils i... | 32.762887 | 88 | 0.646318 |
6eb3f3f1247327e1de85a6d287fbe41b79d7ff38 | 393 | py | Python | books/migrations/0003_book_genres.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | null | null | null | books/migrations/0003_book_genres.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | null | null | null | books/migrations/0003_book_genres.py | Mashex/BookFlix | bdac6dbc56ba0c90f6ee7a2308f93e54dcb759c7 | [
"Unlicense"
] | 1 | 2019-09-30T20:02:11.000Z | 2019-09-30T20:02:11.000Z | # Generated by Django 2.1.3 on 2019-09-28 06:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('books', '0002_auto_20190927_0931'),
]
operations = [
migrations.AddField(
model_name='book',
name='genres',
... | 20.684211 | 63 | 0.592875 |
2d6954633e7a94bfc488c8c66ab7d7785958fff8 | 115 | py | Python | mysite/news/urls.py | Griefman/django-wfms | 3bd2c821173a12c43a3e6be705a022b159a462a8 | [
"MIT"
] | null | null | null | mysite/news/urls.py | Griefman/django-wfms | 3bd2c821173a12c43a3e6be705a022b159a462a8 | [
"MIT"
] | null | null | null | mysite/news/urls.py | Griefman/django-wfms | 3bd2c821173a12c43a3e6be705a022b159a462a8 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('', index),
path('test/', test),
]
| 14.375 | 28 | 0.617391 |
61fbf1da27d9a14449f9161aea1dc1382a2dc391 | 823 | py | Python | home/send_mms.py | SpyrosD3v25/aviato_whistle | f79911bd8edb58e2552d12069b678e7570d88a28 | [
"MIT"
] | null | null | null | home/send_mms.py | SpyrosD3v25/aviato_whistle | f79911bd8edb58e2552d12069b678e7570d88a28 | [
"MIT"
] | null | null | null | home/send_mms.py | SpyrosD3v25/aviato_whistle | f79911bd8edb58e2552d12069b678e7570d88a28 | [
"MIT"
] | null | null | null | """
This file is responsible for sending mms to the number phone_num parameter passed in here.
"""
import os
from twilio.rest import Client
class Send:
def __init__(self, category, img_path, phone_num):
self.category = category
self.img_path = img_path
self.phone_num = phone_num
def ... | 26.548387 | 91 | 0.617254 |
afbb5f0bc24dc151811f818627ce268b11cebe5b | 4,430 | py | Python | .history/predict_20210815201031.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | .history/predict_20210815201031.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | .history/predict_20210815201031.py | Arcofcosmos/MyYolov4_Pytorch | 14c445503d0fc69b8a8b64ecdc87256ac4c1fce1 | [
"MIT"
] | null | null | null | #----------------------------------------------------#
# 对视频中的predict.py进行了修改,
# 将单张图片预测、摄像头检测和FPS测试功能
# 整合到了一个py文件中,通过指定mode进行模式的修改。
#----------------------------------------------------#
import time
import cv2
import numpy as np
from PIL import Image
#from moviepy.editor import *
from moviepy.editor import Aud... | 36.916667 | 134 | 0.543567 |
3a954b94e875f58133e0a40796bbed75ee55c6d9 | 2,986 | py | Python | fiware_cloto/cloto/wsgi.py | telefonicaid/fiware-cloto | 8249cb81812475453035d8d106a8f7352a1b3a47 | [
"Apache-2.0"
] | 2 | 2016-07-20T20:08:28.000Z | 2019-05-03T08:17:16.000Z | fiware_cloto/cloto/wsgi.py | telefonicaid/fiware-cloto | 8249cb81812475453035d8d106a8f7352a1b3a47 | [
"Apache-2.0"
] | 65 | 2015-02-03T14:49:39.000Z | 2021-03-25T21:45:48.000Z | fiware_cloto/cloto/wsgi.py | telefonicaid/fiware-cloto | 8249cb81812475453035d8d106a8f7352a1b3a47 | [
"Apache-2.0"
] | 12 | 2015-01-22T09:21:51.000Z | 2021-04-07T23:27:19.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright 2014 Telefónica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE project.
#
# 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 th... | 38.282051 | 94 | 0.786001 |
b4a069a957ad68a3e426cd3c53adbfe214178ab4 | 1,748 | py | Python | profiles_api/serializers.py | karanotts/profiles-rest-api | 9cd68b1c36a8ad526b3314002cbcc889ed2f7c64 | [
"MIT"
] | null | null | null | profiles_api/serializers.py | karanotts/profiles-rest-api | 9cd68b1c36a8ad526b3314002cbcc889ed2f7c64 | [
"MIT"
] | 5 | 2020-04-25T15:28:20.000Z | 2021-09-22T18:55:27.000Z | profiles_api/serializers.py | karanotts/profiles-rest-api | 9cd68b1c36a8ad526b3314002cbcc889ed2f7c64 | [
"MIT"
] | null | null | null | """ Serializers allow to convert data inputs into python objects and other way around """
from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
""" Serializes a name field for testing APIView """
name = serializers.CharField(max_length=10)
c... | 31.781818 | 100 | 0.62357 |
d906c0371d207136994e019a0e643e31af48e3cf | 160 | py | Python | pandas/util/__init__.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | pandas/util/__init__.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 16 | 2021-03-19T09:44:52.000Z | 2022-03-12T00:22:14.000Z | pandas/util/__init__.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 9 | 2020-02-05T10:24:12.000Z | 2020-02-10T13:08:50.000Z | from pandas.util._decorators import Appender, Substitution, cache_readonly # noqa
from pandas.core.util.hashing import hash_array, hash_pandas_object # noqa
| 40 | 82 | 0.825 |
89e1f89a96f3e81136804b273be988277733e9f3 | 21 | py | Python | variable_and_data_type/data_type_demo/get_the_data_type.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | variable_and_data_type/data_type_demo/get_the_data_type.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | variable_and_data_type/data_type_demo/get_the_data_type.py | pysga1996/python-basic-programming | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | [
"MIT"
] | null | null | null | x = 5
print(type(x))
| 7 | 14 | 0.571429 |
2753bff953b7498ca5c02fa79e83a2046dea6f5d | 214 | py | Python | PythonComparisonOperators/chained_comparison_operators.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | 1 | 2017-05-02T10:28:36.000Z | 2017-05-02T10:28:36.000Z | PythonComparisonOperators/chained_comparison_operators.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | null | null | null | PythonComparisonOperators/chained_comparison_operators.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | null | null | null | print(1 < 2)
print(2 < 3)
print(1 < 2 < 3)
print(1 < 2 and 2 < 3)
print(1 < 3)
print(3 > 2)
print(1 < 3 > 2)
print(1 < 3 and 3 > 2)
print(1 == 2)
print(2 < 3)
print(1 == 2 or 2 > 1)
print(1 == 1 or 100 == 1)
| 11.263158 | 25 | 0.495327 |
db11117133f9235bc167a8b3120a0f1bbfbc652b | 37,243 | py | Python | openstack_controller/datadog_checks/openstack_controller/openstack_controller.py | haiyuanhe/integrations-core | bc33d3dd29fd134dcd38880f855e7a3d9aafcf40 | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | openstack_controller/datadog_checks/openstack_controller/openstack_controller.py | haiyuanhe/integrations-core | bc33d3dd29fd134dcd38880f855e7a3d9aafcf40 | [
"BSD-3-Clause"
] | null | null | null | openstack_controller/datadog_checks/openstack_controller/openstack_controller.py | haiyuanhe/integrations-core | bc33d3dd29fd134dcd38880f855e7a3d9aafcf40 | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import re
import copy
import requests
from six import iteritems, itervalues, next
from datetime import datetime
from datadog_checks.checks import AgentCheck
from datadog_checks.config import is_affirmative
from d... | 45.362972 | 119 | 0.625863 |
b11310508268aaddffed283588313c9317059b50 | 102,026 | py | Python | autotest/t505_test.py | modflowpy/flopy | a13056d18ba8e2f2a1cbf2c42e6c4f29d168f59f | [
"CC0-1.0",
"BSD-3-Clause"
] | 351 | 2015-01-03T15:18:48.000Z | 2022-03-31T09:46:43.000Z | autotest/t505_test.py | modflowpy/flopy | a13056d18ba8e2f2a1cbf2c42e6c4f29d168f59f | [
"CC0-1.0",
"BSD-3-Clause"
] | 1,256 | 2015-01-15T21:10:42.000Z | 2022-03-31T22:43:06.000Z | autotest/t505_test.py | modflowpy/flopy | a13056d18ba8e2f2a1cbf2c42e6c4f29d168f59f | [
"CC0-1.0",
"BSD-3-Clause"
] | 553 | 2015-01-31T22:46:48.000Z | 2022-03-31T17:43:35.000Z | import os
import numpy as np
import flopy
import flopy.utils.binaryfile as bf
from flopy.mf6.data.mfdatastorage import DataStorageType
from flopy.utils.datautil import PyListUtil
from flopy.mf6.mfbase import FlopyException
from flopy.mf6.modflow.mfgwf import ModflowGwf
from flopy.mf6.modflow.mfgwfchd import ModflowGw... | 28.658989 | 79 | 0.571501 |
693cc598ab7042f5c1b0052baf046635edd498ec | 18,308 | py | Python | erp/admin.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | erp/admin.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | erp/admin.py | Foohx/acceslibre | 55135e096f2ec4e413ff991f01c17f5e0d5925c0 | [
"MIT"
] | null | null | null | import nested_admin
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.contrib.gis.admin import OSMGeoAdmin
from django.db.models import Count, Q
from django.http import HttpR... | 30.062397 | 213 | 0.608532 |
acbd9a87e3cc31e434abc5494b0f7e014cd38bb5 | 3,859 | py | Python | influxdb_client/domain/label_update.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/label_update.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/label_update.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Labe... | 27.368794 | 127 | 0.568282 |
0d6bd2f0def692ce6322422619e6e14e734f9d6f | 3,019 | py | Python | Image Segmtation on COCO Dataset/keras_segmentation/models/segnet.py | joykour/COCO-Dataset-2018-Stuff-Segmentation-Challenge | 973ef2d75c1821c8348fd01a3f2b084c4243ebd2 | [
"MIT"
] | 1 | 2019-11-14T06:49:17.000Z | 2019-11-14T06:49:17.000Z | Image Segmtation on COCO Dataset/keras_segmentation/models/segnet.py | joykour/COCO-Dataset-2018-Stuff-Segmentation-Challenge | 973ef2d75c1821c8348fd01a3f2b084c4243ebd2 | [
"MIT"
] | null | null | null | Image Segmtation on COCO Dataset/keras_segmentation/models/segnet.py | joykour/COCO-Dataset-2018-Stuff-Segmentation-Challenge | 973ef2d75c1821c8348fd01a3f2b084c4243ebd2 | [
"MIT"
] | 1 | 2019-11-16T07:39:00.000Z | 2019-11-16T07:39:00.000Z |
from keras.models import *
from keras.layers import *
import os
from .config import IMAGE_ORDERING
from .model_utils import get_segmentation_model
from .vgg16 import get_vgg_encoder
from .mobilenet import get_mobilenet_encoder
from .basic_models import vanilla_encoder
from .resnet50 import get_resnet50_encoder
de... | 29.891089 | 136 | 0.727393 |
dc27acabffeace6b76f95f42d86f2f5b5b903486 | 5,018 | py | Python | app/__init__.py | alphagov-mirror/document-download-frontend | 42f6c80b7df64a71e832d4c9f1e2a0c2df977e19 | [
"MIT"
] | 1 | 2018-06-06T13:33:44.000Z | 2018-06-06T13:33:44.000Z | app/__init__.py | alphagov-mirror/document-download-frontend | 42f6c80b7df64a71e832d4c9f1e2a0c2df977e19 | [
"MIT"
] | 44 | 2018-07-17T10:05:52.000Z | 2022-03-22T20:48:53.000Z | app/__init__.py | alphagov-mirror/document-download-frontend | 42f6c80b7df64a71e832d4c9f1e2a0c2df977e19 | [
"MIT"
] | 2 | 2019-08-29T13:57:45.000Z | 2021-04-10T19:10:35.000Z | import os
from functools import partial
import jinja2
from flask import current_app, make_response, render_template
from flask.globals import _lookup_req_object
from flask_wtf import CSRFProtect
from flask_wtf.csrf import CSRFError
from govuk_frontend_jinja.flask_ext import init_govuk_frontend
from notifications_utils... | 34.606897 | 94 | 0.730371 |
9a8389ab2dede95042176f0bb8a3b7ecebd1158c | 13,855 | py | Python | var/spack/repos/builtin/packages/openspeedshop/package.py | NeuralEnsemble/spack | bed3a694985466544aa16a19af0f0a13221b51a9 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/openspeedshop/package.py | NeuralEnsemble/spack | bed3a694985466544aa16a19af0f0a13221b51a9 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/openspeedshop/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import spack.store
from spack import *
class Openspeedshop(CMakePackage):
"""OpenSpeedShop is a community... | 42.240854 | 108 | 0.608589 |
dafcce3e7b35b1ace6adffe3a6cd029844e80df1 | 1,236 | py | Python | CNN/LeNet.py | DandelionLau/NetworkCollections | 29e5cd2091f7085b3241209ed9447f2baadbce41 | [
"Apache-2.0"
] | 8 | 2019-12-20T07:18:06.000Z | 2021-04-30T15:04:41.000Z | CNN/LeNet.py | DandelionLau/NetworkCollections | 29e5cd2091f7085b3241209ed9447f2baadbce41 | [
"Apache-2.0"
] | null | null | null | CNN/LeNet.py | DandelionLau/NetworkCollections | 29e5cd2091f7085b3241209ed9447f2baadbce41 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @FileName: LeNet.py
# @Description: Implementation of LeNet
# @Author : Ryuk
# @CreateDate: 2019/11/4 17:25
# @LastEditTime: 2019/11/4 17:25
# @LastEditors: Please set LastEditors
# @Version:
import torch
import torch.nn as nn
class Lenet(nn.Module):
def __init__(self):
super(Le... | 25.22449 | 65 | 0.581715 |
72c60d3f3410415743d9385b687fc2adff41a49a | 4,304 | py | Python | msgraph-cli-extensions/beta/education_beta/azext_education_beta/vendored_sdks/education/operations/_education_users_classes_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/education_beta/azext_education_beta/vendored_sdks/education/operations/_education_users_classes_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/beta/education_beta/azext_education_beta/vendored_sdks/education/operations/_education_users_classes_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"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 ... | 42.613861 | 133 | 0.679136 |
5396f7ce25ad935c4d7fb0074bc898b78a62ad7a | 15,589 | py | Python | tests/utils.py | npty/go-spacemesh | a3ba021480a2aa5ed9b88d9d2c1f62dbddf7c1f1 | [
"MIT"
] | null | null | null | tests/utils.py | npty/go-spacemesh | a3ba021480a2aa5ed9b88d9d2c1f62dbddf7c1f1 | [
"MIT"
] | null | null | null | tests/utils.py | npty/go-spacemesh | a3ba021480a2aa5ed9b88d9d2c1f62dbddf7c1f1 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from functools import wraps
from kubernetes.client.rest import ApiException
from kubernetes.stream import stream
import functools
import ntpath
import os
import pytz
import re
from shutil import copyfile
from subprocess import Popen, PIPE
import time
import tests.config as conf... | 39.070175 | 121 | 0.680672 |
a87abeb2db11d7c010ec37398816528bc4b98f76 | 3,160 | py | Python | assets/src/ba_data/python/bastd/mapdata/monkey_face.py | SahandAslani/ballistica | 7e3814cd2a1920ea8f5820cb1cdbb4dc5420d30e | [
"MIT"
] | 2 | 2020-07-02T22:18:58.000Z | 2020-07-02T22:19:49.000Z | assets/src/ba_data/python/bastd/mapdata/monkey_face.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | assets/src/ba_data/python/bastd/mapdata/monkey_face.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | 58.518519 | 79 | 0.662975 |
415b5b68914faf3e3638db9ddfedb6c109eb3f7e | 9,973 | py | Python | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 15 | 2020-07-10T15:43:02.000Z | 2022-03-09T03:11:30.000Z | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 2 | 2020-09-09T19:09:19.000Z | 2020-10-21T16:30:23.000Z | habitat_baselines/config/default.py | rpartsey/habitat-pointnav-aux | 03a24ddca8ab257f64092c70d4f2ff6805287b40 | [
"MIT",
"Unlicense"
] | 1 | 2021-02-05T14:50:30.000Z | 2021-02-05T14:50:30.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.
from typing import List, Optional, Union
import numpy as np
from habitat import get_config as get_task_config
from hab... | 36.531136 | 108 | 0.684348 |
9ced14c2a4edd2d45aaf2b23c9e9a0e87454c217 | 7,222 | py | Python | niftypet/nipet/mmrnorm.py | NiftyPET/NIPET | b1c3799c4a795e1db34dc36decd197ab74e95c6e | [
"Apache-2.0"
] | 10 | 2019-12-11T07:05:07.000Z | 2021-12-21T13:52:56.000Z | niftypet/nipet/mmrnorm.py | NiftyPET/NIPET | b1c3799c4a795e1db34dc36decd197ab74e95c6e | [
"Apache-2.0"
] | 21 | 2019-12-11T11:47:07.000Z | 2022-02-08T19:42:40.000Z | niftypet/nipet/mmrnorm.py | pjmark/NIPET | b1c3799c4a795e1db34dc36decd197ab74e95c6e | [
"Apache-2.0"
] | 3 | 2019-02-19T21:19:00.000Z | 2019-08-27T02:26:31.000Z | """mmraux.py: auxilary functions for PET list-mode data processing."""
import logging
import re
from os import fspath, path
from pathlib import Path
import numpy as np
import pydicom as dcm
from pkg_resources import resource_filename
# auxiliary functions through Python extensions in CUDA
from . import mmr_auxe
log ... | 36.846939 | 99 | 0.570202 |
0b52bc36d9411728b1b83e1553b0c8b7588822b8 | 5,745 | py | Python | youtube-upload/youtube-upload.py | whatneuron/reddit-movie-maker | 5f6339857971dfab244cdbe9be6accd79b8785ac | [
"MIT"
] | null | null | null | youtube-upload/youtube-upload.py | whatneuron/reddit-movie-maker | 5f6339857971dfab244cdbe9be6accd79b8785ac | [
"MIT"
] | null | null | null | youtube-upload/youtube-upload.py | whatneuron/reddit-movie-maker | 5f6339857971dfab244cdbe9be6accd79b8785ac | [
"MIT"
] | 1 | 2021-01-06T02:11:49.000Z | 2021-01-06T02:11:49.000Z | #!/usr/bin/python
import argparse
import httplib
import httplib2
import os
import random
import time
import google.oauth2.credentials
import google_auth_oauthlib.flow
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from googleapiclient.http import MediaFileUpload
from google_a... | 37.064516 | 84 | 0.723934 |
1f46d2cbb70e0e3e9ba0b21e683a75a33a30c570 | 232 | py | Python | condominios/condominios/doctype/comunicacion_condominio/test_comunicacion_condominio.py | Ipasoft-sv/condominios | f17feb02359e5ec0b1004d4bb8160154b0c7c0dd | [
"MIT"
] | null | null | null | condominios/condominios/doctype/comunicacion_condominio/test_comunicacion_condominio.py | Ipasoft-sv/condominios | f17feb02359e5ec0b1004d4bb8160154b0c7c0dd | [
"MIT"
] | null | null | null | condominios/condominios/doctype/comunicacion_condominio/test_comunicacion_condominio.py | Ipasoft-sv/condominios | f17feb02359e5ec0b1004d4bb8160154b0c7c0dd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Energenys-Ipasoft and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestComunicacioncondominio(unittest.TestCase):
pass
| 21.090909 | 56 | 0.780172 |
a4f87420898b43de49b0e5f0b183a3cbc53c12c3 | 4,115 | py | Python | reno/formatter.py | kastenhq/reno | a19cd28f20b642cb027c97fed7d93b6e8842dbd8 | [
"Apache-2.0"
] | null | null | null | reno/formatter.py | kastenhq/reno | a19cd28f20b642cb027c97fed7d93b6e8842dbd8 | [
"Apache-2.0"
] | null | null | null | reno/formatter.py | kastenhq/reno | a19cd28f20b642cb027c97fed7d93b6e8842dbd8 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.474138 | 75 | 0.590765 |
dd356b58ee91d68ff9d86773c3c446e2da4f976d | 3,245 | py | Python | rstbx/viewer/indexing.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | rstbx/viewer/indexing.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | rstbx/viewer/indexing.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
from rstbx.viewer import controls, results_base
from libtbx import str_utils
from libtbx import easy_pickle
import wx
import os
import sys
columns = ["Solution", "Metric fit", "RMSD", "#spots", "Crystal system",
"Unit cell", "Volume"]
column_sizes = [60, 80, 80, 60, 120, 250, 80]
c... | 33.112245 | 72 | 0.673344 |
f83e7d28c129f27b958281ca8ce5fe8f39f12525 | 1,630 | py | Python | wfpm/cli/test_cmd.py | aferriz/wfpm | ce628f5a9f06ac8d20836090e03830215b0d8361 | [
"Apache-2.0"
] | null | null | null | wfpm/cli/test_cmd.py | aferriz/wfpm | ce628f5a9f06ac8d20836090e03830215b0d8361 | [
"Apache-2.0"
] | null | null | null | wfpm/cli/test_cmd.py | aferriz/wfpm | ce628f5a9f06ac8d20836090e03830215b0d8361 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (c) 2021, Ontario Institute for Cancer Research (OICR).
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... | 31.346154 | 79 | 0.66135 |
30daf2af8a0b58feeebe8589c6c2cbee17885ff0 | 129 | py | Python | profiling/pure_python/integrate.py | MDRCS/High-Performance-Python | 35275c6d1b63a849f33499bf8ab27470355c2796 | [
"MIT"
] | null | null | null | profiling/pure_python/integrate.py | MDRCS/High-Performance-Python | 35275c6d1b63a849f33499bf8ab27470355c2796 | [
"MIT"
] | null | null | null | profiling/pure_python/integrate.py | MDRCS/High-Performance-Python | 35275c6d1b63a849f33499bf8ab27470355c2796 | [
"MIT"
] | null | null | null | def integrate(a, b, f, N=2000):
dx = (b-a)/N
s=0.0
for i in range(N):
s += f(a+i*dx)
return s * dx
| 14.333333 | 31 | 0.426357 |
e4b77ca2fbc36a92c313294896de028eb268592a | 360 | py | Python | remit_admin/templatetags/bootstrapped_goodies_tags.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | null | null | null | remit_admin/templatetags/bootstrapped_goodies_tags.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | remit_admin/templatetags/bootstrapped_goodies_tags.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | null | null | null | from django import template
from django.template.loader import render_to_string, TemplateDoesNotExist
register = template.Library()
@register.simple_tag(takes_context=True)
def render_with_template_if_exist(context, template, fallback):
text = fallback
try:
text = render_to_string(template, context)
... | 25.714286 | 73 | 0.758333 |
95d44e7610f923b849cee1074c3f405554ce6d30 | 2,001 | py | Python | scripts/addons/animation_nodes/id_keys/existing_keys.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2020-04-16T22:12:40.000Z | 2022-01-22T17:18:45.000Z | scripts/addons/animation_nodes/id_keys/existing_keys.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | null | null | null | scripts/addons/animation_nodes/id_keys/existing_keys.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2019-05-16T04:01:09.000Z | 2020-08-25T11:42:26.000Z | from collections import namedtuple
from .. utils.handlers import eventHandler
from .. utils.operators import makeOperator
idKeysInFile = []
unremovableIDKeys = set()
@eventHandler("FILE_LOAD_POST")
@eventHandler("ADDON_LOAD_POST")
@makeOperator("an.update_id_keys_list", "Update ID Key List", redraw = True)
def update... | 27.791667 | 84 | 0.709645 |
c7e4eec0c03a40616eaccecd81483dc319675b9e | 2,035 | py | Python | fragmenter/Rotator.py | ofgulban/parcellation_fragmenter | d70229d07e99a0e2eb35f88128964fe3275e4c74 | [
"BSD-3-Clause"
] | 1 | 2018-08-26T20:44:58.000Z | 2018-08-26T20:44:58.000Z | fragmenter/Rotator.py | raamana/parcellation_fragmenter | 23e66c7e2871ab974f40d59d7bad87ee41c1a9b4 | [
"BSD-3-Clause"
] | null | null | null | fragmenter/Rotator.py | raamana/parcellation_fragmenter | 23e66c7e2871ab974f40d59d7bad87ee41c1a9b4 | [
"BSD-3-Clause"
] | null | null | null | from fragmenter import NullBase
from fragmenter import rotations
import numpy as np
from scipy.spatial import KDTree
class Rotator(NullBase.NullBase):
"""
Class to generate null models of parcellations by perturbing an existing
map using KD-Trees for the nearest neighor search.
Parameters:
- - - ... | 26.428571 | 76 | 0.580344 |
501fef42d45f95698b601126fae0f708ad02b7e2 | 2,210 | py | Python | David-codes/conexao_python_mysql-base.py | davidson-santos/monitoria-python-2021 | ec19ddfe7f0a29aaa998d57f8b847fc570f1e604 | [
"MIT"
] | null | null | null | David-codes/conexao_python_mysql-base.py | davidson-santos/monitoria-python-2021 | ec19ddfe7f0a29aaa998d57f8b847fc570f1e604 | [
"MIT"
] | 1 | 2021-09-17T13:38:13.000Z | 2021-09-17T13:38:13.000Z | David-codes/conexao_python_mysql-base.py | davidson-santos/monitoria-python-2021 | ec19ddfe7f0a29aaa998d57f8b847fc570f1e604 | [
"MIT"
] | 2 | 2021-09-17T13:24:58.000Z | 2021-09-17T13:35:53.000Z | #INSTALAÇÃO DE BIBLIOTECAS (CASO NECESSÁRIO)
#pip install mysql-connector-python
#Importação de bibliotecas
import mysql.connector
import sys
#Início do programa
def abre_conexao_bd():
try:
con = mysql.connector.connect(host="200.128.9.67", port=33006, database="ei32teste", user="ei32teste", password="tes1... | 32.028986 | 159 | 0.647511 |
32c0c8cc749ea5470822071d3fa9a263055ebfc3 | 278 | py | Python | pygears/lib/saturate.py | bogdanvuk/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 120 | 2018-04-23T08:29:04.000Z | 2022-03-30T14:41:52.000Z | pygears/lib/saturate.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-07-09T17:12:58.000Z | 2022-03-18T09:05:10.000Z | pygears/lib/saturate.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-05-10T19:42:08.000Z | 2022-03-28T18:26:44.000Z | from pygears import module, datagear
from pygears.typing import Uint
from pygears.typing import Integral, code, saturate as type_saturate
@datagear
def saturate(data: Integral, *, t, limits=None) -> b'type_saturate(data, t, limits)':
return type_saturate(data, t, limits)
| 30.888889 | 85 | 0.766187 |
797973a07384ed42714da30772cadca0c94a6420 | 8,296 | py | Python | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 1,144 | 2021-03-30T05:06:16.000Z | 2022-03-31T10:40:31.000Z | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 593 | 2021-07-01T10:34:25.000Z | 2022-03-31T23:24:40.000Z | querybook/server/datasources_socketio/datadoc.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 113 | 2021-03-30T00:07:20.000Z | 2022-03-31T07:18:43.000Z | import time
import functools
from flask import request
from flask_login import current_user
from flask_socketio import join_room, leave_room, rooms
from app.auth.permission import verify_environment_permission
from app.flask_app import socketio
from app.db import DBSession
from clients.redis_client import with_redis
... | 31.18797 | 83 | 0.692864 |
acb7eae67f47e1bbbbadc818bce0bb38619583b8 | 24,850 | py | Python | applications/StructuralMechanicsApplication/tests/test_patch_test_membrane.py | HayoungChung/Kratos | 8a996625261ecf2e33923df95e449c0874d6f4f5 | [
"BSD-4-Clause"
] | 2 | 2019-10-25T09:28:10.000Z | 2019-11-21T12:51:46.000Z | applications/StructuralMechanicsApplication/tests/test_patch_test_membrane.py | pyfsi/Kratos | 726aa15a04d92c958ba10c8941ce074716115ee8 | [
"BSD-4-Clause"
] | 13 | 2019-10-07T12:06:51.000Z | 2020-02-18T08:48:33.000Z | applications/StructuralMechanicsApplication/tests/test_patch_test_membrane.py | pyfsi/Kratos | 726aa15a04d92c958ba10c8941ce074716115ee8 | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division
import KratosMultiphysics
import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication
import KratosMultiphysics.KratosUnittest as KratosUnittest
class BasePatchTestMembrane(KratosUnittest.TestCase):
def _add_variables... | 52.760085 | 118 | 0.644588 |
94e41f3421dd86325df55a31a24c5ed10d202f12 | 3,326 | py | Python | contrib/zmq/zmq_sub3.4.py | StayAtHomeProgrammer/Ravencoin | f31e43d7a0f9dcadab9db1a9f1bc6016609e738e | [
"MIT"
] | 1,102 | 2017-10-28T14:49:48.000Z | 2022-03-30T00:57:26.000Z | contrib/zmq/zmq_sub3.4.py | StayAtHomeProgrammer/Ravencoin | f31e43d7a0f9dcadab9db1a9f1bc6016609e738e | [
"MIT"
] | 733 | 2018-01-03T16:46:49.000Z | 2022-03-27T04:55:44.000Z | contrib/zmq/zmq_sub3.4.py | StayAtHomeProgrammer/Ravencoin | f31e43d7a0f9dcadab9db1a9f1bc6016609e738e | [
"MIT"
] | 795 | 2018-01-03T23:03:01.000Z | 2022-03-25T15:08:45.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017-2020 The Raven Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Rave... | 36.549451 | 107 | 0.650331 |
a52c3927b5af40267a632e546078e40692c03f37 | 344 | py | Python | conf.py | cecpanda/lantern | 989c1accb4370219de2f3ef2f6097520967d86fa | [
"MIT"
] | null | null | null | conf.py | cecpanda/lantern | 989c1accb4370219de2f3ef2f6097520967d86fa | [
"MIT"
] | 8 | 2020-06-05T19:12:10.000Z | 2022-03-11T23:31:13.000Z | conf.py | cecpanda/lantern | 989c1accb4370219de2f3ef2f6097520967d86fa | [
"MIT"
] | null | null | null | '''
Gunicorn config
'''
import multiprocessing
bind = "10.53.141.255:8000"
workers = multiprocessing.cpu_count() * 2 + 1
daemon = True
accesslog = './gunicorn_acess.log'
errorlog = './gunicorn_error.log'
loglevel = 'info'
timeout = 120
'''
gunicorn -c conf.py lantern.wsgi
pstree -ap | grep gunicorn
kill -HU... | 11.466667 | 45 | 0.68314 |
e4e699a4dbd76ef04453676ba1e793a6704137bb | 26,354 | py | Python | strawberry/ext/mypy_plugin.py | furious-luke/strawberry | bb54ebb148bab7f3f824cb23c31d425d841b86c3 | [
"MIT"
] | null | null | null | strawberry/ext/mypy_plugin.py | furious-luke/strawberry | bb54ebb148bab7f3f824cb23c31d425d841b86c3 | [
"MIT"
] | 55 | 2021-07-12T02:17:04.000Z | 2022-03-17T02:26:28.000Z | strawberry/ext/mypy_plugin.py | furious-luke/strawberry | bb54ebb148bab7f3f824cb23c31d425d841b86c3 | [
"MIT"
] | 1 | 2022-02-20T22:23:24.000Z | 2022-02-20T22:23:24.000Z | from typing import Any, Callable, Dict, List, Optional, Set, Tuple, cast
from typing_extensions import Final
from mypy.nodes import (
ARG_POS,
GDEF,
MDEF,
Argument,
AssignmentStmt,
CallExpr,
CastExpr,
Context,
Expression,
IndexExpr,
MemberExpr,
NameExpr,
Placeholder... | 34.813738 | 88 | 0.593572 |
30f2278a10c70ba089912ea77fade98522ca4ccf | 6,925 | py | Python | yoyoman01_traject/scripts/listener.py | Gepetto/yoyoman01_robot | cd2fccb9378a1208605de88c88ec7b1482eaa271 | [
"BSD-2-Clause"
] | null | null | null | yoyoman01_traject/scripts/listener.py | Gepetto/yoyoman01_robot | cd2fccb9378a1208605de88c88ec7b1482eaa271 | [
"BSD-2-Clause"
] | 1 | 2018-09-28T14:13:45.000Z | 2018-10-01T12:42:07.000Z | yoyoman01_traject/scripts/listener.py | Gepetto/yoyoman01_robot | cd2fccb9378a1208605de88c88ec7b1482eaa271 | [
"BSD-2-Clause"
] | 2 | 2018-04-13T07:29:15.000Z | 2018-05-24T14:19:07.000Z | #!/usr/bin/env python
import os
import rospy
from std_msgs.msg import String
from sensor_msgs.msg import JointState
from gazebo_msgs.msg import LinkStates
from sensor_msgs.msg import Imu
import numpy as np
import math
rospy.init_node('listener', anonymous=True)
Q_angle=0.01
Q_gyro=0.0003
R_angle=0.01
x_bias=0
... | 25.93633 | 157 | 0.626282 |
0906e935120c0d224a4ee39ad497fd732830682e | 1,851 | py | Python | pycue/setup.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | null | null | null | pycue/setup.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | 1 | 2020-09-09T20:39:24.000Z | 2020-09-09T20:39:24.000Z | pycue/setup.py | mb0rt/OpenCue | 7cce111306ccfa6c94f12806c8668866f2ee70ad | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the OpenCue Project
#
# 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... | 33.053571 | 75 | 0.6953 |
b4375b7de562056cef57a814b256426fe3dc8cd1 | 89 | py | Python | Competive Programming/Python/CodeAbbey/sums-in-loop.py | RitamDey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | 2 | 2016-10-14T16:58:05.000Z | 2017-05-04T04:59:18.000Z | Competive Programming/Python/CodeAbbey/sums-in-loop.py | GreenJoey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | null | null | null | Competive Programming/Python/CodeAbbey/sums-in-loop.py | GreenJoey/My-Simple-Programs | 147b455a6a40c371ec894ce979e8a61d242e03bd | [
"Unlicense"
] | null | null | null | answers = [sum(map(int, input().split())) for a in range(int(input()))]
print(*answers)
| 22.25 | 71 | 0.640449 |
335e21d61d948dc16992f4d52a2305d59776e3ad | 1,814 | py | Python | nuage_horizon/dashboards/project/networks/urls.py | nuagenetworks/nuage-openstack-horizon | 0c1cdbc12197e3bb7fd1c0b506035094c4e37b4e | [
"Apache-2.0"
] | null | null | null | nuage_horizon/dashboards/project/networks/urls.py | nuagenetworks/nuage-openstack-horizon | 0c1cdbc12197e3bb7fd1c0b506035094c4e37b4e | [
"Apache-2.0"
] | null | null | null | nuage_horizon/dashboards/project/networks/urls.py | nuagenetworks/nuage-openstack-horizon | 0c1cdbc12197e3bb7fd1c0b506035094c4e37b4e | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Alcatel-Lucent USA 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 o... | 42.186047 | 78 | 0.678611 |
b1a24433910328359fbdcd8716032e456c793981 | 1,853 | py | Python | python-3.4.4.amd64/Lib/email/__init__.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/email/__init__.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/email/__init__.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | # Copyright (C) 2001-2007 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""A package for parsing, handling, and generating email messages."""
__version__ = '5.1.0'
__all__ = [
'base64mime',
'charset',
'encoders',
'errors',
'feedparser',
'gener... | 28.507692 | 78 | 0.662169 |
23741b3b5e0cc8b19e5b08e9a8cec5353879bfa4 | 125 | py | Python | Python/Examples2/volume_calculator_exception.py | msiplab/EicProgLab | 4ca523d09c3b414fceda10f3cff055e94fbcc2a9 | [
"MIT"
] | 1 | 2021-04-16T04:26:05.000Z | 2021-04-16T04:26:05.000Z | Python/Examples2/volume_calculator_exception.py | msiplab/EicProgLab | 4ca523d09c3b414fceda10f3cff055e94fbcc2a9 | [
"MIT"
] | null | null | null | Python/Examples2/volume_calculator_exception.py | msiplab/EicProgLab | 4ca523d09c3b414fceda10f3cff055e94fbcc2a9 | [
"MIT"
] | 2 | 2020-06-30T02:11:18.000Z | 2021-08-09T04:44:16.000Z | class VolumeCalculatorException(Exception):
def __init__(self, msg):
Exception.__init__(self, msg)
| 20.833333 | 43 | 0.648 |
735b1dabcae5ad306fe4ad840fc045cd513b95e0 | 947 | py | Python | manage.py | REFEDS/met | bcb5ac40ec4ab6a47ba47c795fc5f0544bd05e12 | [
"BSD-2-Clause"
] | null | null | null | manage.py | REFEDS/met | bcb5ac40ec4ab6a47ba47c795fc5f0544bd05e12 | [
"BSD-2-Clause"
] | null | null | null | manage.py | REFEDS/met | bcb5ac40ec4ab6a47ba47c795fc5f0544bd05e12 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#################################################################
# MET v2 Metadate Explorer Tool
#
# This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md
# Copyright (c) 2012, TERENA All rights reserved.
#
# This Software is based on MET v1 developed f... | 35.074074 | 97 | 0.636748 |
1903aa5f9edd0f3df2dc3de26df2d504ae800244 | 440 | py | Python | helpers.py | Herbsi/pathfinder | 3ec86a26a27bb8bae4c8a2464f0a69d98f449287 | [
"MIT"
] | null | null | null | helpers.py | Herbsi/pathfinder | 3ec86a26a27bb8bae4c8a2464f0a69d98f449287 | [
"MIT"
] | null | null | null | helpers.py | Herbsi/pathfinder | 3ec86a26a27bb8bae4c8a2464f0a69d98f449287 | [
"MIT"
] | null | null | null | def nothing():
pass
def validInput(input_msg,
error_msg,
valid,
*error_args,
preamble=nothing,
cast=str):
while True:
preamble()
try:
user_input = cast(input(input_msg))
if valid(user_input):
... | 22 | 47 | 0.484091 |
75d4a054f48d3d002226712b6c5ae225939eca4f | 155 | py | Python | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_BestCycle_SVR.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_BestCycle_SVR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_BestCycle_SVR.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Anscombe'] , ['ConstantTrend'] , ['BestCycle'] , ['SVR'] ); | 38.75 | 82 | 0.748387 |
ecb6799476b20784d51635936ef6d854890f48b0 | 9,321 | py | Python | src/viz/backend/querybank.py | nusids/cofi | ad1a18df3d8e67a5f82a5341a7abcb1bef51d1cb | [
"AFL-3.0"
] | 4 | 2021-03-05T10:54:22.000Z | 2021-06-28T04:11:02.000Z | src/viz/backend/querybank.py | nusids/cofi | ad1a18df3d8e67a5f82a5341a7abcb1bef51d1cb | [
"AFL-3.0"
] | null | null | null | src/viz/backend/querybank.py | nusids/cofi | ad1a18df3d8e67a5f82a5341a7abcb1bef51d1cb | [
"AFL-3.0"
] | 1 | 2021-03-07T12:00:01.000Z | 2021-03-07T12:00:01.000Z | user_whereabouts = """
SELECT
ap.floor_key AS bdg_fl_key,
ap.building_key,
ap.FLOOR,
f.START AS session_interval_start,
COUNT(*) AS session_count
FROM
(
SELECT
ap_key,
generate_series( make_timestamp(EXTRACT(YEAR FROM session_start):... | 39.495763 | 534 | 0.546186 |
636964ec1667f18de331f97271d0ab2cac1b83f9 | 442 | py | Python | rx_utils/docs/__init__.py | Carsten-Leue/UtilsRxPY | 09ca2544a0641fd405250bf7232b242852a0cb73 | [
"MIT"
] | null | null | null | rx_utils/docs/__init__.py | Carsten-Leue/UtilsRxPY | 09ca2544a0641fd405250bf7232b242852a0cb73 | [
"MIT"
] | null | null | null | rx_utils/docs/__init__.py | Carsten-Leue/UtilsRxPY | 09ca2544a0641fd405250bf7232b242852a0cb73 | [
"MIT"
] | null | null | null | """Exposes the inverse object mapping for sphinx"""
from typing import Sequence
from os.path import dirname, join, normpath
# version information
__version__ = '0.0.8'
def get_objects_inv_path() -> str:
"""Returns the pathname of the object.inv file
Returns:
the pathname
"""
return normpath(... | 20.090909 | 59 | 0.699095 |
88283c862906371889c72157caacb4fa0b4fd9ed | 44 | py | Python | RecamanSequence/__init__.py | urosjevremovic/Recamans-Sequence | ab6a90c363271dc842f26ccd1b69168a9764de9e | [
"MIT"
] | null | null | null | RecamanSequence/__init__.py | urosjevremovic/Recamans-Sequence | ab6a90c363271dc842f26ccd1b69168a9764de9e | [
"MIT"
] | null | null | null | RecamanSequence/__init__.py | urosjevremovic/Recamans-Sequence | ab6a90c363271dc842f26ccd1b69168a9764de9e | [
"MIT"
] | null | null | null | from RecamanSequence import recaman_sequence | 44 | 44 | 0.931818 |
e8b8bc83a9661cf79cd96e3307e0a8ed8d916e31 | 5,838 | py | Python | lib/python-bitcoinlib/bitcoin/serialize.py | landau28m/dust-b-gone | f76cae82dcf7baabcfb2bfad7edca1b91ea879aa | [
"MIT"
] | 1 | 2020-11-19T00:56:31.000Z | 2020-11-19T00:56:31.000Z | lib/python-bitcoinlib/bitcoin/serialize.py | landau28m/dust-b-gone | f76cae82dcf7baabcfb2bfad7edca1b91ea879aa | [
"MIT"
] | null | null | null | lib/python-bitcoinlib/bitcoin/serialize.py | landau28m/dust-b-gone | f76cae82dcf7baabcfb2bfad7edca1b91ea879aa | [
"MIT"
] | null | null | null |
#
# serialize.py
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import absolute_import, division, print_function, unicode_literals
import struct
import hashlib
# Py3 compatibility
import sys
bchr = chr
... | 25.946667 | 82 | 0.604145 |
beb4ee0fb47a5ea422d2e143a2937e25b13e5cba | 439 | py | Python | webtask.py | manterfield/sublime_selector | 7d9c8e668e9308dee715be05ff14f3e84c059407 | [
"MIT"
] | 1 | 2019-05-15T16:01:17.000Z | 2019-05-15T16:01:17.000Z | webtask.py | sanmaodo/sublime_selector | 7d9c8e668e9308dee715be05ff14f3e84c059407 | [
"MIT"
] | null | null | null | webtask.py | sanmaodo/sublime_selector | 7d9c8e668e9308dee715be05ff14f3e84c059407 | [
"MIT"
] | 1 | 2019-05-12T08:47:46.000Z | 2019-05-12T08:47:46.000Z | import webbrowser
import urllib
GOOGLE = 'google'
STACK = 'stackoverflow'
def google_search(text):
url = ''.join(('http://www.google.com/#q=', urllib.quote(text), ))
webbrowser.open(url, new=0, autoraise=True)
return text
def stackoverflow_search(text):
url = ''.join((
'http://www.stackover... | 21.95 | 70 | 0.646925 |
8b8ec950c170e0f157bc07ccbc2f5be1fedf6f51 | 3,478 | py | Python | src/primaires/scripting/commandes/structure/supprimer.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 14 | 2015-08-21T19:15:21.000Z | 2017-11-26T13:59:17.000Z | src/primaires/scripting/commandes/structure/supprimer.py | vincent-lg/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 20 | 2015-09-29T20:50:45.000Z | 2018-06-21T12:58:30.000Z | src/primaires/scripting/commandes/structure/supprimer.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 3 | 2015-05-02T19:42:03.000Z | 2018-09-06T10:55:00.000Z | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | 46.373333 | 79 | 0.689189 |
d75323e86046512440000a76d5da1056a246cef5 | 2,418 | py | Python | caql/epsilon_greedy_policy.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-01-19T23:35:59.000Z | 2022-01-19T23:35:59.000Z | caql/epsilon_greedy_policy.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | caql/epsilon_greedy_policy.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 35.043478 | 79 | 0.712159 |
97aad693fa6b75da6344eeb96cfada6b587d2edc | 4,631 | py | Python | tools/Aspect.py | silvergl/kieker-lang-pack-python | 6d1b3024b3b8680a6735d75ee59b3bc5c4c2d414 | [
"Apache-2.0"
] | null | null | null | tools/Aspect.py | silvergl/kieker-lang-pack-python | 6d1b3024b3b8680a6735d75ee59b3bc5c4c2d414 | [
"Apache-2.0"
] | null | null | null | tools/Aspect.py | silvergl/kieker-lang-pack-python | 6d1b3024b3b8680a6735d75ee59b3bc5c4c2d414 | [
"Apache-2.0"
] | null | null | null | import inspect
from monitoring.Record import (BeforeOperationEvent,
AfterOperationFailedEvent, AfterOperationEvent)
from monitoring.Controller import MonitoringController, WriterController
from monitoring.Writer import TCPWriter
import types
from monitoring.tcp import TCPClient
#tcp = TC... | 37.959016 | 103 | 0.602462 |
3117a27c0278cec3d15b2a0bff8ba45e395003e4 | 3,503 | py | Python | monai/data/dataloader.py | Can-Zhao/MONAI | e29ef022b97a4e809dd22d4d208005f541ee061b | [
"Apache-2.0"
] | 3 | 2020-06-22T20:59:14.000Z | 2021-04-09T21:24:45.000Z | monai/data/dataloader.py | Borda/MONAI | e0db5a564225a7cb62e7a23df97267019006302f | [
"Apache-2.0"
] | null | null | null | monai/data/dataloader.py | Borda/MONAI | e0db5a564225a7cb62e7a23df97267019006302f | [
"Apache-2.0"
] | 1 | 2020-05-27T12:53:58.000Z | 2020-05-27T12:53:58.000Z | # Copyright (c) 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, so... | 41.211765 | 107 | 0.686269 |
7778d041a3388820fd7bc79789ff4b55df87bccc | 914 | py | Python | Packages/Patterns_Packages/Alphabets/Lower_Case_alphabets/m.py | SaikumarS2611/Python | 205f5aaba3bd2de714503b5bed8853d24e85329e | [
"MIT"
] | null | null | null | Packages/Patterns_Packages/Alphabets/Lower_Case_alphabets/m.py | SaikumarS2611/Python | 205f5aaba3bd2de714503b5bed8853d24e85329e | [
"MIT"
] | null | null | null | Packages/Patterns_Packages/Alphabets/Lower_Case_alphabets/m.py | SaikumarS2611/Python | 205f5aaba3bd2de714503b5bed8853d24e85329e | [
"MIT"
] | null | null | null | def for_m():
""" Lower case Alphabet letter 'n' pattern using Python for loop"""
for row in range(4):
for col in range(5):
if row==0 and (col==0 or col%2!=0) or row>0 and col%2==0:
print('*', end = ' ')
... | 33.851852 | 82 | 0.326039 |
21362cdf743f30b7a9fdfd606cf38eb84ec54b28 | 14,053 | py | Python | src/sardana/taurus/core/tango/sardana/test/test_macro.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | src/sardana/taurus/core/tango/sardana/test/test_macro.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | src/sardana/taurus/core/tango/sardana/test/test_macro.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | #!/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... | 40.151429 | 80 | 0.56785 |
47f273db6345c99cb5e0820efa18083683f8a694 | 1,257 | py | Python | src/investigations/investigations.py | willgdjones/GTEx | c56a5d548978545ab8a98e74236d52343113e9e6 | [
"MIT"
] | 2 | 2019-02-21T13:05:31.000Z | 2020-02-02T14:37:29.000Z | src/investigations/investigations.py | willgdjones/GTEx | c56a5d548978545ab8a98e74236d52343113e9e6 | [
"MIT"
] | null | null | null | src/investigations/investigations.py | willgdjones/GTEx | c56a5d548978545ab8a98e74236d52343113e9e6 | [
"MIT"
] | null | null | null | import pickle
import numpy as np
import argparse
# from sklearn.decomposition import PCA
# from sklearn.linear_model import LinearRegression
# from matplotlib.colors import Normalize
import os
import sys
sys.path.insert(0, os.getcwd())
from src.utils.helpers import *
GTEx_directory = '/hps/nobackup/research/stegle/us... | 34.916667 | 120 | 0.708831 |
209eee7acb5d223040c3699d133c4160ef950011 | 1,203 | py | Python | python/dpu_utils/utils/dataloading.py | mayank-sfdc/dpu-utils | 72cac67490ccf19fede6b86269c57843549b526c | [
"MIT"
] | 61 | 2019-05-14T15:09:19.000Z | 2022-03-31T18:47:41.000Z | python/dpu_utils/utils/dataloading.py | mayank-sfdc/dpu-utils | 72cac67490ccf19fede6b86269c57843549b526c | [
"MIT"
] | 16 | 2019-06-04T13:59:59.000Z | 2022-03-14T09:49:19.000Z | python/dpu_utils/utils/dataloading.py | mayank-sfdc/dpu-utils | 72cac67490ccf19fede6b86269c57843549b526c | [
"MIT"
] | 32 | 2019-07-05T08:55:59.000Z | 2022-02-19T03:37:02.000Z | import gzip
import json
import codecs
from collections import OrderedDict
from typing import Any, Iterator, Iterable
__all__ = ['load_json_gz', 'save_json_gz', 'load_jsonl_gz', 'save_jsonl_gz']
def load_json_gz(filename: str) -> Any:
reader = codecs.getreader('utf-8')
with gzip.open(filename) as f... | 31.657895 | 77 | 0.654198 |
06593da94fdffe738e6f9a1c312b91a57753bec1 | 1,835 | py | Python | instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py | LetzNico/opentelemetry-python | b565d6b643f175faee3f57ef81c8b7edbf50ec41 | [
"Apache-2.0"
] | null | null | null | instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py | LetzNico/opentelemetry-python | b565d6b643f175faee3f57ef81c8b7edbf50ec41 | [
"Apache-2.0"
] | null | null | null | instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py | LetzNico/opentelemetry-python | b565d6b643f175faee3f57ef81c8b7edbf50ec41 | [
"Apache-2.0"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.980392 | 75 | 0.701362 |
c1b959f68882d219a9de74762a6b77609cc5fe1d | 2,326 | bzl | Python | srpc.bzl | hihybin/srpc | 92a68bcd5fba301d09f3c2a12ed804f63b0e2ea6 | [
"Apache-2.0"
] | 1,226 | 2020-09-14T09:38:19.000Z | 2022-03-30T02:30:34.000Z | srpc.bzl | hihybin/srpc | 92a68bcd5fba301d09f3c2a12ed804f63b0e2ea6 | [
"Apache-2.0"
] | 46 | 2020-09-15T02:22:08.000Z | 2022-03-30T14:50:20.000Z | srpc.bzl | liuzengh/srpc | 1c4b0744dffb767c339186b14d9b9cefdfce15a0 | [
"Apache-2.0"
] | 283 | 2020-09-14T09:38:32.000Z | 2022-03-31T11:36:09.000Z | def gen_srpc_pb_cc(name, files, deps_lib):
native.genrule(
name = name,
srcs = files,
outs = [
name + ".srpc.h",
"client." + name + ".srpc.cc",
"server." + name + ".srpc.cc",
],
cmd = "$(location srpc_generator) protobuf $(<) ./ && mv " + n... | 28.716049 | 327 | 0.428633 |
d81bd490f3a82945b0a1760b2355014e30bbfaa1 | 29,563 | py | Python | marve/Measurements.py | lfoppiano/marve | a99ac94abe13a98df54ecd66fa5b1879be5f436d | [
"Apache-2.0"
] | 62 | 2017-01-05T17:41:59.000Z | 2021-11-26T21:04:19.000Z | marve/Measurements.py | lfoppiano/marve | a99ac94abe13a98df54ecd66fa5b1879be5f436d | [
"Apache-2.0"
] | 7 | 2017-01-27T15:42:05.000Z | 2021-09-13T16:23:15.000Z | marve/Measurements.py | lfoppiano/marve | a99ac94abe13a98df54ecd66fa5b1879be5f436d | [
"Apache-2.0"
] | 19 | 2017-01-06T06:12:22.000Z | 2021-09-14T10:59:09.000Z | #!/usr/bin/env python
# encoding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version... | 42.782923 | 153 | 0.567804 |
96138fd2310a4c290d3684f10b55f187fc8b6e45 | 5,614 | py | Python | numba/tests/test_compile_cache.py | yaredev0/numba | 8dd28abf57bd554fe25921ad2abee5d2faa81816 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 10 | 2019-04-27T08:45:34.000Z | 2021-06-21T22:08:54.000Z | numba/tests/test_compile_cache.py | yaredev0/numba | 8dd28abf57bd554fe25921ad2abee5d2faa81816 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 108 | 2020-08-17T22:38:26.000Z | 2021-12-06T09:44:14.000Z | numba/tests/test_compile_cache.py | yaredev0/numba | 8dd28abf57bd554fe25921ad2abee5d2faa81816 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 10 | 2019-07-20T02:16:10.000Z | 2021-06-22T06:56:23.000Z | import unittest
from contextlib import contextmanager
from llvmlite import ir
from numba.core import types, typing, callconv, cpu, cgutils
class TestCompileCache(unittest.TestCase):
'''
Tests that the caching in BaseContext.compile_internal() works correctly by
checking the state of the cache when it is... | 40.978102 | 83 | 0.61596 |
30efd3e520d72e743da6e55444a12e5dda1b5179 | 199 | py | Python | sdipylib/plot.py | sdrdl/sdipylib | 197a6c434d2b34a52e6544973407e92f3561727a | [
"BSD-2-Clause"
] | null | null | null | sdipylib/plot.py | sdrdl/sdipylib | 197a6c434d2b34a52e6544973407e92f3561727a | [
"BSD-2-Clause"
] | null | null | null | sdipylib/plot.py | sdrdl/sdipylib | 197a6c434d2b34a52e6544973407e92f3561727a | [
"BSD-2-Clause"
] | null | null | null | """Plotting support"""
def source_attribution(ax, text ):
ax.text(0, -.05, text, fontsize=14,
horizontalalignment='left', verticalalignment='top',
transform=ax.transAxes) | 33.166667 | 64 | 0.643216 |
bb56fcfd7b9a46da3c7c48e7c1858d7c3f5adc49 | 9,241 | py | Python | tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/s3.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | 2 | 2015-09-21T14:13:30.000Z | 2016-02-12T11:33:46.000Z | tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/s3.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | null | null | null | tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/s3.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | 2 | 2017-01-05T16:14:59.000Z | 2019-01-31T23:15:25.000Z | # -*- coding: utf-8 -*-
'''
Connection module for Amazon S3
:configuration: This module accepts explicit s3 credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no further
configuration is necessa... | 31.325424 | 87 | 0.57418 |
925fe9459d73d6e6a1b85a8becdadba40759bd9c | 362 | py | Python | resources/static.py | riipandi/falcon-foundation | 8d36283bd7ae747aa552d91ed9ecb2abc556490c | [
"MIT"
] | null | null | null | resources/static.py | riipandi/falcon-foundation | 8d36283bd7ae747aa552d91ed9ecb2abc556490c | [
"MIT"
] | null | null | null | resources/static.py | riipandi/falcon-foundation | 8d36283bd7ae747aa552d91ed9ecb2abc556490c | [
"MIT"
] | null | null | null | import os
from falcon import falcon
from pathlib import Path
STATIC_DIR = str(Path('.').resolve()) + '/static'
# Static resource
class StaticResource(object):
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
resp.content_type = 'text/html'
with open(STATIC_DIR + '/index.html', 'r... | 25.857143 | 56 | 0.640884 |
5b9891f19461ae8ad32e1f78d1bdeb0cfe7164e6 | 23,314 | py | Python | simulation/python_standard_lib/test/test_cgi.py | john-grando/pyExpandObjects | c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4 | [
"BSD-3-Clause"
] | null | null | null | simulation/python_standard_lib/test/test_cgi.py | john-grando/pyExpandObjects | c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4 | [
"BSD-3-Clause"
] | 1 | 2021-02-03T01:56:56.000Z | 2021-02-03T01:56:56.000Z | simulation/python_standard_lib/test/test_cgi.py | john-grando/pyExpandObjects | c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4 | [
"BSD-3-Clause"
] | 1 | 2022-01-11T18:31:05.000Z | 2022-01-11T18:31:05.000Z | import cgi
import os
import sys
import tempfile
import unittest
from collections import namedtuple
from io import StringIO, BytesIO
from test import support
class HackedSysModule:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
... | 36.599686 | 184 | 0.543493 |
3f32b66256c64c6ab8278547d954ae0a9b70e2eb | 3,532 | py | Python | python/rootba/latex/containers.py | zeta1999/rootba | d1a680a88980d7ac57cf2ff7459d00ac1cab6c9a | [
"BSD-3-Clause"
] | 139 | 2021-06-20T17:20:44.000Z | 2022-03-30T01:15:38.000Z | python/rootba/latex/containers.py | zeta1999/rootba | d1a680a88980d7ac57cf2ff7459d00ac1cab6c9a | [
"BSD-3-Clause"
] | 5 | 2021-07-10T11:51:08.000Z | 2022-01-01T00:05:39.000Z | python/rootba/latex/containers.py | NikolausDemmel/rootba | 0762f36a0afa7196709bd0fa147ae75ee7c7632c | [
"BSD-3-Clause"
] | 20 | 2021-06-22T03:33:30.000Z | 2022-03-28T11:41:54.000Z | #
# BSD 3-Clause License
#
# This file is part of the RootBA project.
# https://github.com/NikolausDemmel/rootba
#
# Copyright (c) 2021, Nikolaus Demmel.
# All rights reserved.
#
import math
from pylatex import Package
from pylatex.base_classes import Container
from ..metric import metrics_from_config
from ..metric i... | 32.109091 | 118 | 0.642412 |
e48f79f9211c66d08418bccc35bbdfed16e0f7f1 | 7,878 | py | Python | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | 1 | 2017-07-12T18:34:29.000Z | 2017-07-12T18:34:29.000Z | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | null | null | null | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
from q1_softmax import softmax
from q1_softmax import cross_entropy_loss
from model import Model
from utils.general_utils import get_minibatches
class Config(object):
"""Holds model hyperparams and data information.
The config class is used to store va... | 35.327354 | 121 | 0.627317 |
ceb53c678e3dee8efec9642da18d27d5e937c45c | 24,306 | py | Python | salt/modules/win_pkg.py | trebuchet-deploy/salt | dcdf1148248912a4592f0f48d2303903588729cc | [
"Apache-2.0"
] | null | null | null | salt/modules/win_pkg.py | trebuchet-deploy/salt | dcdf1148248912a4592f0f48d2303903588729cc | [
"Apache-2.0"
] | null | null | null | salt/modules/win_pkg.py | trebuchet-deploy/salt | dcdf1148248912a4592f0f48d2303903588729cc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
A module to manage software on Windows
:depends: - win32com
- win32con
- win32api
- pywintypes
'''
# Import third party libs
try:
import win32api
import win32con
HAS_DEPENDENCIES = True
except ImportError:
HAS_DEPENDENCIES = False
# Im... | 31.814136 | 133 | 0.593269 |
2701aad510fa375cbd025c3aaccf4aaa3caca683 | 2,629 | py | Python | src/train.py | tilayealemu/melanet | 3d2b1ade192f650f43b8024eb50f73f58096fbd4 | [
"Apache-2.0"
] | 16 | 2018-12-15T20:12:49.000Z | 2022-03-26T15:51:47.000Z | src/train.py | tilayealemu/melanet | 3d2b1ade192f650f43b8024eb50f73f58096fbd4 | [
"Apache-2.0"
] | 16 | 2019-03-26T19:29:07.000Z | 2021-08-10T11:59:26.000Z | src/train.py | tilayealemu/melanet | 3d2b1ade192f650f43b8024eb50f73f58096fbd4 | [
"Apache-2.0"
] | 9 | 2020-01-01T19:31:09.000Z | 2022-02-21T14:48:58.000Z | """
Defines a functions for training a NN.
"""
from src.data_generator import AudioGenerator
from src.data_generator import make_audio_gen
import _pickle as pickle
from keras import backend as K
from keras.models import Model
from keras.layers import (Input, Lambda)
from keras.optimizers import SGD
from keras.callba... | 38.661765 | 97 | 0.726132 |
cecaf659aa1381de89783da4207546b80eee59a1 | 52,217 | py | Python | tests/ut/python/ops/test_tensor_slice.py | kungfu-team/mindspore-bert | 71501cf52ae01db9d6a73fb64bcfe68a6509dc32 | [
"Apache-2.0"
] | null | null | null | tests/ut/python/ops/test_tensor_slice.py | kungfu-team/mindspore-bert | 71501cf52ae01db9d6a73fb64bcfe68a6509dc32 | [
"Apache-2.0"
] | null | null | null | tests/ut/python/ops/test_tensor_slice.py | kungfu-team/mindspore-bert | 71501cf52ae01db9d6a73fb64bcfe68a6509dc32 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 44.214225 | 119 | 0.58525 |
986969b756308e53f44ee8292bb120b4552dc3cf | 5,334 | py | Python | GetTrialDeviceToken.py | haya695/speak-unity-sample | 6992cb83ebf5cd75ec6d4fba738637c84655a6c8 | [
"BSD-2-Clause"
] | null | null | null | GetTrialDeviceToken.py | haya695/speak-unity-sample | 6992cb83ebf5cd75ec6d4fba738637c84655a6c8 | [
"BSD-2-Clause"
] | null | null | null | GetTrialDeviceToken.py | haya695/speak-unity-sample | 6992cb83ebf5cd75ec6d4fba738637c84655a6c8 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, NTT DOCOMO, INC.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# Redistributions of source code must retain the above copyright notice,
# this l... | 41.348837 | 117 | 0.666104 |
0c7b41cb0a74ee36fb34fbaee64c090973f37af2 | 6,833 | py | Python | modules/tests/inv/send_receive_item.py | smeissner/eden | 9c4c78f0808e53c52d3caa4fa68162cddc174547 | [
"MIT"
] | 1 | 2021-01-21T18:24:25.000Z | 2021-01-21T18:24:25.000Z | modules/tests/inv/send_receive_item.py | smeissner/eden | 9c4c78f0808e53c52d3caa4fa68162cddc174547 | [
"MIT"
] | null | null | null | modules/tests/inv/send_receive_item.py | smeissner/eden | 9c4c78f0808e53c52d3caa4fa68162cddc174547 | [
"MIT"
] | null | null | null | """ Sahana Eden Module Automated Tests - INV003 Send - Receive Items
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
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 ... | 37.13587 | 110 | 0.475487 |
238a2dabb2ea642b950eb37991ef9943a481a4cc | 17,252 | py | Python | temp/src/models/predictor.py | aiKSTlab/kobertsum | 429c4458b214380eb7681f5d551d26febc63bac4 | [
"MIT"
] | 2 | 2022-01-05T01:35:48.000Z | 2022-03-16T10:10:50.000Z | temp/src/models/predictor.py | aiKSTlab/kobertsum | 429c4458b214380eb7681f5d551d26febc63bac4 | [
"MIT"
] | null | null | null | temp/src/models/predictor.py | aiKSTlab/kobertsum | 429c4458b214380eb7681f5d551d26febc63bac4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" Translator Class and builder """
from __future__ import print_function
import codecs
import os
import math
import torch
from tensorboardX import SummaryWriter
from others.utils import rouge_results_to_str, test_rouge, tile
from translate.beam import GNMTGlobalScorer
def build_predictor(ar... | 39.568807 | 237 | 0.545386 |
82ffe4de71453075b73982f7720b3dcb81e18301 | 115 | py | Python | somelibrary/b.py | amelvill-umich/walk_packages_test | 969dee4665354cd4f9ec7e1d549b5aebbb59c841 | [
"Unlicense"
] | null | null | null | somelibrary/b.py | amelvill-umich/walk_packages_test | 969dee4665354cd4f9ec7e1d549b5aebbb59c841 | [
"Unlicense"
] | null | null | null | somelibrary/b.py | amelvill-umich/walk_packages_test | 969dee4665354cd4f9ec7e1d549b5aebbb59c841 | [
"Unlicense"
] | null | null | null | from __future__ import print_function
class bClass:
def TestFunction(self):
print('hello from bClass') | 23 | 37 | 0.730435 |
2ff654a5aedce1e1f4db5ede7a468d04a2b6e524 | 3,845 | py | Python | src/operatorclasses/operator.py | EmeraldEntities/arknights-scraper | 993ebef9cbfb69fc244b8e68e64c0b96614a7595 | [
"MIT"
] | 1 | 2020-07-05T02:47:00.000Z | 2020-07-05T02:47:00.000Z | src/operatorclasses/operator.py | EmeraldEntities/arknights-scraper | 993ebef9cbfb69fc244b8e68e64c0b96614a7595 | [
"MIT"
] | null | null | null | src/operatorclasses/operator.py | EmeraldEntities/arknights-scraper | 993ebef9cbfb69fc244b8e68e64c0b96614a7595 | [
"MIT"
] | null | null | null | """A basic Operator class that can be created for parsing/testing
that stores some essential information about each Operator."""
import sys
class Operator:
"""The class for creating Operator objects, which stores information
about Operators.
This solely exists so that operator information can be
hel... | 25.805369 | 89 | 0.598179 |
ed9bb0e08781ca89538314b0617819aad3835158 | 1,787 | py | Python | examples/bayesian_liner_regression.py | oarriaga/tfp-workshop | 8ea5cd53a8487bddb77b6516346d739a36421fc9 | [
"MIT"
] | 4 | 2019-11-29T11:35:18.000Z | 2019-12-22T05:53:41.000Z | examples/bayesian_liner_regression.py | oarriaga/tfp-workshop | 8ea5cd53a8487bddb77b6516346d739a36421fc9 | [
"MIT"
] | null | null | null | examples/bayesian_liner_regression.py | oarriaga/tfp-workshop | 8ea5cd53a8487bddb77b6516346d739a36421fc9 | [
"MIT"
] | 2 | 2019-12-09T14:08:41.000Z | 2021-04-27T06:21:18.000Z | import tensorflow as tf
from tensorflow_probability import distributions as tfd
class BayesianLinearRegression(tf.keras.Model):
def __init__(self, output_dim, name=None):
super(BayesianLinearRegression, self).__init__(name=name)
self.w_loc = tf.Variable(tf.random.normal([output_dim, 1]), name='w_l... | 38.847826 | 81 | 0.643537 |
b93ba779afc61162d6866dc464d563fb67365796 | 4,606 | py | Python | ucsmsdk/mometa/ape/ApeVirtualMediaBoot.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/ape/ApeVirtualMediaBoot.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/ape/ApeVirtualMediaBoot.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for ApeVirtualMediaBoot ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ApeVirtualMediaBootConsts():
CHASSIS_ID_N_A = "N/A"
IS_HOST_AGENT_... | 56.170732 | 248 | 0.661094 |
926113eebf79cedc974cb2f45648699b16274d61 | 4,351 | py | Python | src/xdevice/_core/environment/manager_lite.py | OpenHarmony-mirror/test_xdevice | 163d847ff39390b7082db416ccb3a44894760a7e | [
"Apache-2.0"
] | null | null | null | src/xdevice/_core/environment/manager_lite.py | OpenHarmony-mirror/test_xdevice | 163d847ff39390b7082db416ccb3a44894760a7e | [
"Apache-2.0"
] | null | null | null | src/xdevice/_core/environment/manager_lite.py | OpenHarmony-mirror/test_xdevice | 163d847ff39390b7082db416ccb3a44894760a7e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2020 Huawei Device Co., Ltd.
# 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
#
# Unle... | 38.166667 | 78 | 0.613652 |
0c60109fa2071363bb5ec50fc248b17db64c4f82 | 504 | py | Python | app/products/repository.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | null | null | null | app/products/repository.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | null | null | null | app/products/repository.py | prinzz1208/StockManagementBackend | db9f3e3c0ddb41d988be6bc91f20b7af28ff99e0 | [
"MIT"
] | 1 | 2021-09-30T18:01:08.000Z | 2021-09-30T18:01:08.000Z | from sqlalchemy.orm.session import Session
from app.database import models
from app.database.helpers import save
from app.products.schemas import AddProductDTO
def get_products(category_id,db:Session):
return db.query(models.Product).filter(category_id=category_id).all()
def add_product(add_product_dto: AddProduc... | 36 | 102 | 0.813492 |
a1580c1af04df1b70fc6fbf13904b0895e6a933f | 155 | py | Python | client/admin.py | JamieJiHeonKim/authentication-lab | 12579ebf00f6b4f64af6b5594f12a0c8a3a4cd28 | [
"MIT"
] | null | null | null | client/admin.py | JamieJiHeonKim/authentication-lab | 12579ebf00f6b4f64af6b5594f12a0c8a3a4cd28 | [
"MIT"
] | null | null | null | client/admin.py | JamieJiHeonKim/authentication-lab | 12579ebf00f6b4f64af6b5594f12a0c8a3a4cd28 | [
"MIT"
] | null | null | null | from django.contrib import admin
from rest_framework.authtoken.admin import TokenAdmin
# Register your models here.
TokenAdmin.raw_id_fields = ('user',)
| 22.142857 | 53 | 0.806452 |
bbd9e26a638e67d8bf368be3d14c4fa444702846 | 1,981 | py | Python | regression.py | BrandonCook7/VaccinePredictor | b94b133a91b5fa48e353e08f35bf36857feba6ae | [
"MIT"
] | null | null | null | regression.py | BrandonCook7/VaccinePredictor | b94b133a91b5fa48e353e08f35bf36857feba6ae | [
"MIT"
] | null | null | null | regression.py | BrandonCook7/VaccinePredictor | b94b133a91b5fa48e353e08f35bf36857feba6ae | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import datetime
from datetime import date
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.impute import SimpleImputer
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import Polyno... | 34.155172 | 119 | 0.769813 |
fb7ae5321f98f15b30b9206682e2da8fbcbcdb21 | 2,390 | py | Python | p15-kernels.py | loicdewit/cs451-practicals | 4fd779cf1848a86ba873570a6b8f848e8cd6e7cb | [
"BSD-3-Clause"
] | 1 | 2021-03-02T21:54:36.000Z | 2021-03-02T21:54:36.000Z | p15-kernels.py | loicdewit/cs451-practicals | 4fd779cf1848a86ba873570a6b8f848e8cd6e7cb | [
"BSD-3-Clause"
] | 2 | 2021-03-04T23:29:59.000Z | 2021-03-26T14:20:18.000Z | p15-kernels.py | loicdewit/cs451-practicals | 4fd779cf1848a86ba873570a6b8f848e8cd6e7cb | [
"BSD-3-Clause"
] | 21 | 2021-03-02T21:50:07.000Z | 2021-03-30T22:09:13.000Z | #%%
import random
from shared import bootstrap_accuracy, simple_boxplot
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression, SGDClassifier
import typing as T
from dataclasses import dataclass
#%%
# start off by seeding random number generators:
RA... | 28.452381 | 80 | 0.679916 |
d96685de6ad303083be96047c16515f0650db74e | 24,598 | py | Python | hypergbm/utils/tool.py | ArkiZh/HyperGBM | 8bb3f6f0ab4aac34880cd77591bb08109cd6d577 | [
"Apache-2.0"
] | 1 | 2021-08-10T04:37:38.000Z | 2021-08-10T04:37:38.000Z | hypergbm/utils/tool.py | ArkiZh/HyperGBM | 8bb3f6f0ab4aac34880cd77591bb08109cd6d577 | [
"Apache-2.0"
] | null | null | null | hypergbm/utils/tool.py | ArkiZh/HyperGBM | 8bb3f6f0ab4aac34880cd77591bb08109cd6d577 | [
"Apache-2.0"
] | null | null | null | import argparse
import math
import os
import pickle
import re
import sys
from functools import partial
import numpy as np
import psutil
from hypernets.utils.const import TASK_BINARY, TASK_MULTICLASS
# from hypernets.utils import logging
#
# logger = logging.get_logger(__name__)
metric_choices = ['accuracy', 'auc',... | 46.853333 | 120 | 0.5846 |
9cd57e1c1de9e025129d686e4f401777488926de | 678 | py | Python | jaad/tests/test_backends.py | AmadeusITGroup/jaad | 9cc818c7011243c82224256f52abf734cea33298 | [
"BSD-3-Clause"
] | null | null | null | jaad/tests/test_backends.py | AmadeusITGroup/jaad | 9cc818c7011243c82224256f52abf734cea33298 | [
"BSD-3-Clause"
] | null | null | null | jaad/tests/test_backends.py | AmadeusITGroup/jaad | 9cc818c7011243c82224256f52abf734cea33298 | [
"BSD-3-Clause"
] | null | null | null | from django.forms import BooleanField as DjangoBooleanField
from django.test import SimpleTestCase
from jaad.backends import JaadBackend
from jaad.forms.fields import BooleanField as JaadBooleanField
SIMPLE_DICT = {
"correspondents": {"from": "user", "to": "world"},
"messages": ["hello", "everybody"],
}
clas... | 33.9 | 85 | 0.772861 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.