hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d07162e5203436bee107a0bb3dde7beca3cfbe0 | 828 | py | Python | sdks/bkapi-client-core/tests/conftest.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | null | null | null | sdks/bkapi-client-core/tests/conftest.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | null | null | null | sdks/bkapi-client-core/tests/conftest.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in co... | 59.142857 | 118 | 0.769324 |
2d072b32aa69a7e421b8f31e68831d4f7b3b2c20 | 1,688 | py | Python | tests/rundb/test_rundb.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | tests/rundb/test_rundb.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | tests/rundb/test_rundb.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | # Copyright 2018 Iguazio
#
# 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, softwa... | 30.690909 | 116 | 0.722749 |
2d072cf6a6afcd7e05b6064db1179266ec9300d8 | 8,885 | py | Python | apps/iiif/manifests/tests/tests.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/iiif/manifests/tests/tests.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/iiif/manifests/tests/tests.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | """
Test class for IIIF Manifests
"""
import json
import random
import boto3
from moto import mock_s3
from datetime import datetime
from time import sleep
from django.test import TestCase, Client
from django.test import RequestFactory
from django.conf import settings
from django.contrib.auth import get_user_model
from ... | 38.969298 | 140 | 0.637929 |
2d072ef6ec8be9a567a8a604c9abfbf64ebdac4a | 625 | py | Python | run_experiment.py | grofers/funk-svd | 00af23be7568a3774bbf31769c4bfbab4ae52430 | [
"MIT"
] | 151 | 2019-04-03T16:41:11.000Z | 2022-03-31T05:27:59.000Z | run_experiment.py | grofers/funk-svd | 00af23be7568a3774bbf31769c4bfbab4ae52430 | [
"MIT"
] | 11 | 2019-11-19T22:37:50.000Z | 2022-03-16T23:47:35.000Z | run_experiment.py | grofers/funk-svd | 00af23be7568a3774bbf31769c4bfbab4ae52430 | [
"MIT"
] | 52 | 2019-04-05T10:01:08.000Z | 2022-03-27T12:01:54.000Z | from funk_svd.dataset import fetch_ml_ratings
from funk_svd import SVD
from sklearn.metrics import mean_absolute_error
df = fetch_ml_ratings(variant='100k')
train = df.sample(frac=0.8, random_state=7)
val = df.drop(train.index.tolist()).sample(frac=0.5, random_state=8)
test = df.drop(train.index.tolist())... | 28.409091 | 80 | 0.712 |
2d072f75341fb41671561d64a02abc4cbee44644 | 921 | py | Python | labs/lab-09/cp4.py | ez-ant/oss-repo-template | e4b96d3063d04165ecee6cae8687c619dc0b3434 | [
"MIT"
] | null | null | null | labs/lab-09/cp4.py | ez-ant/oss-repo-template | e4b96d3063d04165ecee6cae8687c619dc0b3434 | [
"MIT"
] | null | null | null | labs/lab-09/cp4.py | ez-ant/oss-repo-template | e4b96d3063d04165ecee6cae8687c619dc0b3434 | [
"MIT"
] | null | null | null | import pymongo
from pymongo import MongoClient
import pprint
from bson.objectid import ObjectId
client = MongoClient('localhost', 27018)
db = client.mongo_db_lab
collection = db.definitions
print("Fetch all Records:")
for c in collection.find():
pprint.pprint(c)
print("")
print("Fetch one record")
pprint.ppri... | 26.314286 | 81 | 0.72747 |
2d074f2228fa3f26a331be671c8bebc602b5c173 | 1,127 | py | Python | LogisticRegression/test.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 37 | 2019-10-29T13:12:41.000Z | 2022-01-20T02:42:28.000Z | LogisticRegression/test.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 5 | 2020-07-23T10:32:59.000Z | 2021-09-01T11:37:15.000Z | LogisticRegression/test.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 2 | 2020-05-27T06:00:56.000Z | 2021-02-08T10:45:41.000Z | import pickle
import argparse
import os
import utils
parser = argparse.ArgumentParser()
parser.add_argument('--data_dir', type=str, default='../data/intermediate/KBP/rm', help='directory containing train/dev/test file.')
parser.add_argument('--save_dir', type=str, default='../dumped_model', help='directory to save tes... | 26.833333 | 132 | 0.688554 |
2d0795265d23596f91435434a7b8b0889440fd9b | 1,762 | py | Python | geojsonlint/cors_middleware.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 66 | 2015-01-15T08:36:08.000Z | 2022-01-18T11:40:58.000Z | geojsonlint/cors_middleware.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 12 | 2016-05-23T09:40:03.000Z | 2021-02-25T16:12:27.000Z | geojsonlint/cors_middleware.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 29 | 2015-02-23T22:41:10.000Z | 2020-02-10T18:58:59.000Z | import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS
XS_SHARING_ALLOWED_... | 36.708333 | 94 | 0.69807 |
2d07bc0bebfc098c7da22339cc12952a20f6d71e | 5,141 | py | Python | protonets/models/Metric_Learning.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | protonets/models/Metric_Learning.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | protonets/models/Metric_Learning.py | sss441803/QFSL | ddf4508d25e7ccb3e5a036746fcf4ddf546d63f8 | [
"MIT"
] | null | null | null | import torch
from torch import nn
from qtensor_ai import HybridModule, DefaultOptimizer
from qtensor_ai import ParallelComposer
'''Circuit for learnable quantum embeddings. Lloyd et. al., arXiv:2001.03622'''
class MetricLearningComposer(ParallelComposer):
def __init__(self, n_qubits, n_layers):
self.n_la... | 43.940171 | 141 | 0.670103 |
2d07e408a107abc7bf30ca995705956d49bcf4d3 | 2,637 | py | Python | JDjango/api/cmdtools/reduce.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/api/cmdtools/reduce.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/api/cmdtools/reduce.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | import os, re
### HTML
patt_del_comment_html = re.compile(r'(<!--.*?-->)') # 删掉注释
patt_del_space_html = re.compile(r'(\s+)') # 删除多余的空格,只保留一个
### CSS
patt_del_comment_css = re.compile(r'(/[*].*?[*]/)')
patt_del_space_css = re.compile(r'(\s+)')
### JS
patt_del_comment_js = re.compile(r'(/[*].*?[*]/)')
patt_del_space_j... | 30.662791 | 65 | 0.608646 |
2d07f9f8bd4cf414723fd461280adbaeda9329f0 | 2,375 | py | Python | tests/test_trtable.py | sgml/dipper | cff0d01299e982183a5345b8a7eb00094ed05257 | [
"BSD-3-Clause"
] | null | null | null | tests/test_trtable.py | sgml/dipper | cff0d01299e982183a5345b8a7eb00094ed05257 | [
"BSD-3-Clause"
] | null | null | null | tests/test_trtable.py | sgml/dipper | cff0d01299e982183a5345b8a7eb00094ed05257 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import unittest
import os
import yaml
class TranslationTestCase(unittest.TestCase):
def testIfTableIsAMap(self):
from yaml.constructor import ConstructorError
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loa... | 32.986111 | 103 | 0.592 |
2d080cf4a17e419b4b0176d8baa81662d64c5858 | 3,573 | py | Python | python-code/dlib-learning/get_faces_from_camera.py | juxiangwu/image-processing | c644ef3386973b2b983c6b6b08f15dc8d52cd39f | [
"Apache-2.0"
] | 13 | 2018-09-07T02:29:07.000Z | 2021-06-18T08:40:09.000Z | python-code/dlib-learning/get_faces_from_camera.py | juxiangwu/image-processing | c644ef3386973b2b983c6b6b08f15dc8d52cd39f | [
"Apache-2.0"
] | null | null | null | python-code/dlib-learning/get_faces_from_camera.py | juxiangwu/image-processing | c644ef3386973b2b983c6b6b08f15dc8d52cd39f | [
"Apache-2.0"
] | 4 | 2019-06-20T00:09:39.000Z | 2021-07-15T10:14:36.000Z | # created at 2018-05-11
# updated at 2018-08-24
# By coneypo
# Blog: http://www.cnblogs.com/AdaminXie
# GitHub: https://github.com/coneypo/Dlib_face_recognition_from_camera
# 进行人脸录入
# 录入多张人脸
import dlib # 人脸识别的库 Dlib
import numpy as np # 数据处理的库 Numpy
import cv2 # 图像处理的库 OpenCv
import os... | 27.274809 | 110 | 0.578785 |
2d082675e21dc88f0f92e4c331ef81174d4f9007 | 623 | py | Python | app-configurations/sublime/Sublime Text 3/Packages/HTML-CSS-JS Prettify/src/py/utils/constants.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | 4 | 2018-06-08T23:18:47.000Z | 2020-02-24T06:14:06.000Z | Sublime Text 3/Packages/HTML-CSS-JS Prettify/src/py/utils/constants.py | dusunboy/MySublimeText3Backup | ab1eeeb42fdb6c3552fa5830a74c55ea261c2eb8 | [
"Unlicense",
"MIT"
] | 3 | 2021-05-10T18:59:14.000Z | 2021-09-02T01:50:15.000Z | Sublime Text 3/Packages/HTML-CSS-JS Prettify/src/py/utils/constants.py | dusunboy/MySublimeText3Backup | ab1eeeb42fdb6c3552fa5830a74c55ea261c2eb8 | [
"Unlicense",
"MIT"
] | 3 | 2020-02-03T13:24:54.000Z | 2020-02-03T13:45:37.000Z | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""Various constants used by this plugin"""
from sublime import platform, version
PLATFORM = platform()
SUBLIME_VERSION... | 41.533333 | 76 | 0.751204 |
2d08479f7d8cbd15afcec154f18cead4376947d8 | 12,198 | py | Python | toontown/hood/HydrantInteractiveProp.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/hood/HydrantInteractiveProp.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/hood/HydrantInteractiveProp.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.actor import Actor
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import Sequence, Func
from toontown.hood import InteractiveAnimatedProp
from toontown.hood import GenericAnimatedProp
from toontown.toonbase import ToontownGlobals, ToontownBattleGlobals, TTLocalizer
c... | 51.686441 | 162 | 0.418921 |
2d08814b8583a2b1dc29c70a66ec3dd997c4bc90 | 2,994 | py | Python | utils.py | JiaMingLin/dlcv_adda | e292eb0e61fc79eb15a16bcf786e834436b09089 | [
"Apache-2.0"
] | null | null | null | utils.py | JiaMingLin/dlcv_adda | e292eb0e61fc79eb15a16bcf786e834436b09089 | [
"Apache-2.0"
] | null | null | null | utils.py | JiaMingLin/dlcv_adda | e292eb0e61fc79eb15a16bcf786e834436b09089 | [
"Apache-2.0"
] | null | null | null | """Utilities for ADDA."""
import os
import random
import torch
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import params
from datasets import get_usps, get_mnist,get_mnistm, get_svhn
def make_variable(tensor):
"""Convert Tensor to Variable."""
if torch.cuda.is_available():
... | 26.732143 | 72 | 0.620574 |
2d08afac607de093393d3e750687cc8b4cb05fcb | 18,597 | py | Python | networking_opencontrail/tests/unit/ml2/test_oc_mech_driver.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/tests/unit/ml2/test_oc_mech_driver.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | networking_opencontrail/tests/unit/ml2/test_oc_mech_driver.py | SSU-DCN/opencontrail | 7ad252b008015c213341155dce1c99083049e0e3 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 OpenStack Foundation
#
# 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 ... | 35.221591 | 79 | 0.615261 |
2d08d90d93b2df6a8c62ca1a5b54546099c28524 | 938 | py | Python | server/src/validation/flux_upload.py | CollinStark/metamdb | 6df29f0b0ab1362904f3efb42a651ee433f517df | [
"MIT"
] | 1 | 2021-05-27T13:43:08.000Z | 2021-05-27T13:43:08.000Z | server/src/validation/flux_upload.py | metamdb/metamdb | f884cfb604007ed0bbebbd76ee353fa14797b5fb | [
"MIT"
] | 1 | 2021-06-11T09:35:24.000Z | 2021-06-11T09:35:24.000Z | server/src/validation/flux_upload.py | metamdb/metamdb | f884cfb604007ed0bbebbd76ee353fa14797b5fb | [
"MIT"
] | null | null | null | """Flux model validation."""
from typing import Optional, Tuple, TypedDict
class Errors(TypedDict):
file: str
ALLOWED_HEADERS = set(['FORWARD/REVERSE', 'NET/EXCHANGE'])
def validate_flux(first_header: str,
second_header: str) -> Tuple[bool, Optional[dict[str, str]]]:
"""Flux model valid... | 27.588235 | 116 | 0.639659 |
2d08e8f9bd812c0f65ee429a3a2084c18016734d | 2,415 | py | Python | src/nlp_lemmatization_map.py | andifunke/topic-labeling | f38ffce44fb1d661114bc53afb565ec61b61eae0 | [
"Apache-2.0"
] | 28 | 2019-02-05T23:01:32.000Z | 2021-09-05T13:48:46.000Z | src/nlp_lemmatization_map.py | andifunke/topic-labeling | f38ffce44fb1d661114bc53afb565ec61b61eae0 | [
"Apache-2.0"
] | 1 | 2022-02-11T23:26:59.000Z | 2022-03-12T09:20:21.000Z | src/nlp_lemmatization_map.py | andifunke/topic-labeling | f38ffce44fb1d661114bc53afb565ec61b61eae0 | [
"Apache-2.0"
] | 8 | 2019-08-30T02:23:50.000Z | 2022-02-22T19:20:14.000Z | import gc
import re
from os.path import join
import pandas as pd
from constants import ETL_PATH, DSETS, POS_N
from utils import multiload
def get_best_text(grp):
token: str = grp.name
texts = grp.text.values
counts = grp.counts.values
# If there is only one option, return it (avoid unnecessary check... | 30.56962 | 101 | 0.580538 |
2d08f5eeacb1610e4f82492c355a627d2f6ab74f | 3,679 | py | Python | intersight/models/equipment_device_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_device_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_device_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class EquipmentDeviceSummaryRef(object):
"""
NOTE: ... | 24.526667 | 78 | 0.550149 |
2d0904ec1bdc76bab1b9f33e782ae9a14f476144 | 216 | py | Python | pni_customization/pni_customization/doctype/pni_packing/test_pni_packing.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_packing/test_pni_packing.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/pni_packing/test_pni_packing.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Jigar Tarpara and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestPNIPacking(unittest.TestCase):
pass
| 19.636364 | 52 | 0.763889 |
2d090bc2d9cac0841ea7795421df67c12d88a9e5 | 5,083 | py | Python | alipay/aop/api/domain/AlipayCommerceEntertainmentItemUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEntertainmentItemUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEntertainmentItemUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceEntertainmentItemUploadModel(object):
def __init__(self):
self._enable = None
self._item_extended_info = None
self._item_id = None
self._item_name = ... | 31.571429 | 87 | 0.601416 |
2d096f00fbb07ac66bf6f0e27805b7a4a4d51a00 | 443 | py | Python | vision_transform_codes/tests/_set_the_path.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/_set_the_path.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | vision_transform_codes/tests/_set_the_path.py | spencerkent/vision-transform-codes | 63258ce698e436ee3ce29def75c89337759fb98b | [
"BSD-3-Clause"
] | null | null | null | """
Dumb little utility for adding the top-level vision_transform_codes directory
to the python module path at runtime. Should be sufficient for any script to
just call ``import _set_the_path``. There are probably better ways to do this.
"""
import sys
import os
examples_fullpath = os.path.dirname(os.path.abspath(__fil... | 40.272727 | 78 | 0.801354 |
2d0982e1d0425a67ed0787dd512a25bd448c6d7e | 119 | py | Python | src/map/renderOrder.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | src/map/renderOrder.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | src/map/renderOrder.py | Wombatlord/tcod-Tutorial | 0ed0276c06ebd1836691b4017750f984eefd31f9 | [
"MIT"
] | null | null | null | from enum import auto, Enum
class RenderOrder(Enum):
CORPSE = auto()
ITEM = auto()
ACTOR = auto()
| 14.875 | 28 | 0.579832 |
2d09b4d3934a5b3a6809e5d9d9228324400dd6dd | 1,483 | py | Python | acme/jax/utils_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | null | null | null | acme/jax/utils_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 1 | 2021-01-25T15:39:56.000Z | 2021-01-25T15:39:56.000Z | acme/jax/utils_test.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | 2 | 2021-01-07T11:35:19.000Z | 2021-01-07T12:16:21.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 27.462963 | 74 | 0.683749 |
2d09bb0ef32c03b441d4f4cd05babade98e5f656 | 26,751 | py | Python | txdav/who/test/test_groups.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/who/test/test_groups.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/who/test/test_groups.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2013-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 31.508834 | 108 | 0.557474 |
2d09c0b4b4839c1665dd1f463be7ae2ad4005a6f | 6,997 | py | Python | pgbot/commands/utils/help.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 77 | 2020-11-16T05:26:49.000Z | 2021-03-08T06:27:06.000Z | pgbot/commands/utils/help.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 71 | 2021-03-19T17:51:30.000Z | 2022-02-19T12:42:19.000Z | pgbot/commands/utils/help.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 19 | 2021-03-19T12:48:17.000Z | 2021-12-18T04:41:08.000Z | """
This file is a part of the source code for the PygameCommunityBot.
This project has been licensed under the MIT license.
Copyright (c) 2020-present PygameCommunityDiscord
This file defines some utility functions for pg!help command
"""
from __future__ import annotations
import re
import typing
import discord
f... | 31.376682 | 87 | 0.530942 |
2d09dc9a4a0b29f897c521cccf4969be843f2df7 | 25,114 | py | Python | unagi/task.py | Christopher-Bradshaw/unagi | 29bb2df0c8674438f24c3932e0b1b65a83dec4ae | [
"MIT"
] | null | null | null | unagi/task.py | Christopher-Bradshaw/unagi | 29bb2df0c8674438f24c3932e0b1b65a83dec4ae | [
"MIT"
] | null | null | null | unagi/task.py | Christopher-Bradshaw/unagi | 29bb2df0c8674438f24c3932e0b1b65a83dec4ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import shutil
import tempfile
import time
import glob
from collections.abc import Iterable
import requests
import tarfile
import numpy as np
import astropy.units as u
from astropy import wcs
from astropy.io import fits
from astropy.utils.data import download_fil... | 38.876161 | 120 | 0.603886 |
2d0a2248aa08ee66c47cbaac00aabb35e166f9ec | 1,295 | py | Python | croupier_plugin/utilities.py | ari-apc-lab/croupier | cfffa81df64898abb837da23921f7fa614033e85 | [
"Apache-2.0"
] | 5 | 2019-03-21T15:32:40.000Z | 2022-02-16T09:16:06.000Z | croupier_plugin/utilities.py | ari-apc-lab/croupier | cfffa81df64898abb837da23921f7fa614033e85 | [
"Apache-2.0"
] | 25 | 2021-05-13T09:24:31.000Z | 2022-03-03T16:20:38.000Z | croupier_plugin/utilities.py | ari-apc-lab/croupier | cfffa81df64898abb837da23921f7fa614033e85 | [
"Apache-2.0"
] | 3 | 2019-07-08T13:55:40.000Z | 2021-05-20T13:13:22.000Z | """
Copyright (c) 2019 HLRS. All rights reserved.
This file is part of Croupier.
Croupier is free software: you can redistribute it and/or modify it
under the terms of the Apache License, Version 2.0 (the License) License.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUD... | 37 | 78 | 0.765251 |
2d0a2ecdd47e722881d1ebf3e5cee7be71fbd7ca | 210 | py | Python | instrupy/__init__.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | 1 | 2022-01-14T17:22:05.000Z | 2022-01-14T17:22:05.000Z | instrupy/__init__.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | 4 | 2021-06-20T13:45:54.000Z | 2022-02-05T05:55:43.000Z | instrupy/__init__.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | 1 | 2022-03-08T19:06:38.000Z | 2022-03-08T19:06:38.000Z | """ Python package containing remote-sensing instrument models to calculate observation metrics
and simulate satellite imagery.
"""
from .base import InstrumentModelFactory, Instrument, BasicSensorModel
| 30 | 95 | 0.809524 |
2d0a4f8af49abd73d4c29eb85b3b8eb8131fcaa7 | 4,350 | py | Python | oscar/lib/python2.7/site-packages/_pytest/tmpdir.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/_pytest/tmpdir.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/_pytest/tmpdir.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """ support for providing temporary directories to test functions. """
from __future__ import absolute_import, division, print_function
import re
import pytest
import py
from _pytest.monkeypatch import MonkeyPatch
class TempdirFactory:
"""Factory for temporary directories under the common base temp ... | 34.251969 | 93 | 0.595632 |
2d0a60e2828c696d697236a1760d1882026be04d | 5,649 | py | Python | test/__init__.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 9 | 2015-10-21T18:08:01.000Z | 2021-05-26T15:33:14.000Z | test/__init__.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 6 | 2015-11-16T18:36:06.000Z | 2020-08-09T10:36:27.000Z | test/__init__.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 3 | 2015-11-16T09:55:13.000Z | 2018-03-29T02:04:20.000Z | """
Unit tests.
See doc/devel.md for usage instructions.
"""
import json
import logging
import re
import sys
from os import environ
from traceback import format_exc
from unittest import TestCase
import psycopg2
import pg_jts
logging.basicConfig()
verbosity = sys.argv.count('-v')
if verbosity == 0:
level = loggi... | 30.701087 | 85 | 0.498672 |
2d0a6e12ab6ca26478b516481d3d7562e7175c8a | 1,347 | py | Python | neuro-cli/src/neuro_cli/docker_credential_helper.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-cli/src/neuro_cli/docker_credential_helper.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-cli/src/neuro_cli/docker_credential_helper.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import sys
from json import dumps
import neuro_sdk
from .asyncio_utils import run
from .const import EX_DATAERR, EX_UNAVAILABLE, EX_USAGE
def error(message: str, exit_code: int) -> None:
print(message)
exit(exit_code)
async def async_main(action: str) -> None:
if action == "store":
error("Plea... | 30.613636 | 86 | 0.581292 |
2d0a8c245f2ad9073530102eb8a0c3b4ca85eaa3 | 183 | py | Python | sjtwo-c/site_scons/site_tools/codegen/site_packages/bin/can_logger.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/bin/can_logger.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/bin/can_logger.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | #!c:\python37\python.exe
# coding: utf-8
"""
See :mod:`can.logger`.
"""
from __future__ import absolute_import
from can.logger import main
if __name__ == "__main__":
main()
| 12.2 | 38 | 0.672131 |
2d0ac685f02097f2cb8f2f717f7d720e87488a5b | 16,855 | py | Python | apogee_tools/cannon_tools/run_cannon.py | jbirky/apogee_tools | 9dd09ebba4f38347c47e9326e1f116846256542c | [
"MIT"
] | 1 | 2019-09-24T01:53:54.000Z | 2019-09-24T01:53:54.000Z | apogee_tools/cannon_tools/run_cannon.py | jbirky/apogee_tools | 9dd09ebba4f38347c47e9326e1f116846256542c | [
"MIT"
] | 23 | 2017-07-11T17:09:04.000Z | 2018-10-08T23:41:26.000Z | apogee_tools/cannon_tools/run_cannon.py | jbirky/apogee_tools | 9dd09ebba4f38347c47e9326e1f116846256542c | [
"MIT"
] | 2 | 2019-11-08T22:55:37.000Z | 2020-01-17T18:08:04.000Z | import numpy as np
import matplotlib.pyplot as plt
from operator import itemgetter
from astropy.io import ascii
from pathlib import Path
import apogee_tools as ap
import glob
import shutil
try:
from TheCannon import apogee, dataset, model
except:
print("apogee_tools: Optional dependency TheCannon is not installed. T... | 29.570175 | 171 | 0.671967 |
2d0adfde11acc1aa85197085a243952f203f4795 | 2,082 | py | Python | f5_cccl/resource/ltm/monitor/test/test_icmp_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/monitor/test/test_icmp_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/monitor/test/test_icmp_monitor.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | 1 | 2019-11-02T05:22:48.000Z | 2019-11-02T05:22:48.000Z | #!/usr/bin/env python
# Copyright 2017 F5 Networks 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... | 26.025 | 74 | 0.706052 |
2d0afb7f18f7dfcc8cf1e3ca1087c009e3e728f5 | 974 | py | Python | scripts/genotype_from_fpaths.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | null | null | null | scripts/genotype_from_fpaths.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | null | null | null | scripts/genotype_from_fpaths.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | 1 | 2022-03-10T13:08:21.000Z | 2022-03-10T13:08:21.000Z | import os
import pathlib
import click
import parse
from fishtools.config import Config
def is_image(filename, image_exts=['.czi']):
_, ext = os.path.splitext(filename)
return ext in image_exts
@click.command()
@click.argument('config_fpath')
def main(config_fpath):
config = Config(config_fpath)
... | 20.723404 | 60 | 0.666324 |
2d0b13496e1bb93b3d53e92bcf9c886a5dec7030 | 1,651 | py | Python | changedetectionio/tests/conftest.py | wwwxxx0402/changedetection.io | 5bfdb28bd23458b501686fc232cacd549d51e48d | [
"Apache-2.0"
] | null | null | null | changedetectionio/tests/conftest.py | wwwxxx0402/changedetection.io | 5bfdb28bd23458b501686fc232cacd549d51e48d | [
"Apache-2.0"
] | null | null | null | changedetectionio/tests/conftest.py | wwwxxx0402/changedetection.io | 5bfdb28bd23458b501686fc232cacd549d51e48d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import pytest
from changedetectionio import changedetection_app
from changedetectionio import store
import os
# https://github.com/pallets/flask/blob/1.1.2/examples/tutorial/tests/test_auth.py
# Much better boilerplate than the docs
# https://www.python-boilerplate.com/py3+flask+pytest/
global app... | 27.065574 | 118 | 0.662629 |
2d0b1d8d6905b25ec4d096852dbce9e97efc38dd | 1,271 | py | Python | bin/Notifier/Backends/Snore.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 55 | 2016-11-20T17:08:19.000Z | 2022-03-11T22:19:43.000Z | bin/Notifier/Backends/Snore.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 17 | 2017-09-20T07:52:17.000Z | 2021-12-03T10:03:00.000Z | bin/Notifier/Backends/Snore.py | juergenhoetzel/craft | 9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd | [
"BSD-2-Clause"
] | 29 | 2016-12-10T15:00:11.000Z | 2021-12-02T12:54:05.000Z | import ctypes
import os
import subprocess
from CraftOS.osutils import OsUtils
from Notifier.NotificationInterface import *
from CraftCore import CraftCore
import utils
class Snore(NotificationInterface):
def __init__(self):
NotificationInterface.__init__(self, "Snore")
self.icon = os.path.join(Cra... | 38.515152 | 119 | 0.596381 |
2d0b2793bbf58db9f82fba4979daaad6c99583cd | 442 | py | Python | obscure-hex.py | Rajpratik71/devel-scripts | 068285719a13b02889b1314361cc5bdb764d9a3a | [
"Apache-2.0"
] | null | null | null | obscure-hex.py | Rajpratik71/devel-scripts | 068285719a13b02889b1314361cc5bdb764d9a3a | [
"Apache-2.0"
] | null | null | null | obscure-hex.py | Rajpratik71/devel-scripts | 068285719a13b02889b1314361cc5bdb764d9a3a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""Filter for obscuring hex addresses.
Filters out 'addresses' of the form 0x0000000007641700, replacing them
with anonymized tags of the form '0x<...>'. Useful for prepareing two
dump files for a diff.
"""
import re
import sys
import script_utils as u
# Setup
u.setdeflanglocale()
# Read
lines ... | 18.416667 | 70 | 0.705882 |
2d0b54d458331cbbb81912a03cdb56e2a94cb6b5 | 2,498 | py | Python | src/modules/image_processor.py | phantran/NeuronCoverageDNN | cb133d46d12e2ae8fc2572d963628fdc721d1888 | [
"MIT"
] | 1 | 2021-06-30T14:04:51.000Z | 2021-06-30T14:04:51.000Z | src/modules/image_processor.py | phantran/beamng-neuron-coverage | cb133d46d12e2ae8fc2572d963628fdc721d1888 | [
"MIT"
] | null | null | null | src/modules/image_processor.py | phantran/beamng-neuron-coverage | cb133d46d12e2ae8fc2572d963628fdc721d1888 | [
"MIT"
] | null | null | null | from random import randrange
import numpy as np
import cv2
class ImageProcessor:
abbr = {
"Original": "Original",
"Translation": "Tr",
"Shearing": "Sh",
"Rotation": "Ro",
"Contrast": "Co",
"Blurring": "Bl",
"Brightness": "Br"
}
@staticmethod
de... | 24.019231 | 68 | 0.472378 |
2d0b6614b325cbe59363c836b869b0b1d5db3ce8 | 69,526 | py | Python | google/cloud/security/privateca_v1/types/resources.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | google/cloud/security/privateca_v1/types/resources.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | google/cloud/security/privateca_v1/types/resources.py | renovate-bot/python-security-private-ca | e87815a7614bd6d2aabef5fabc050c1161a76fbf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 47.784192 | 151 | 0.660559 |
2d0b7cb9474f9e0ac993fce1f998635ab83e133c | 2,187 | py | Python | vistrails/packages/spreadsheet/__init__.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/packages/spreadsheet/__init__.py | VizierDB/Vistrails | 895f7204fbf56a9cdf3f46afae72969c2fc64a24 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/packages/spreadsheet/__init__.py | VizierDB/Vistrails | 895f7204fbf56a9cdf3f46afae72969c2fc64a24 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | 45.5625 | 79 | 0.710562 |
2d0b8e1cc233d137b4dc70b0a05db104dbd61074 | 8,135 | py | Python | models/alae.py | revsic/tf-alae | 46f8a5fe1e8de637ed694ed3cfcd3a5ebdc9cc1d | [
"MIT"
] | 11 | 2020-05-03T22:04:59.000Z | 2021-06-01T12:53:05.000Z | models/alae.py | revsic/tf-alae | 46f8a5fe1e8de637ed694ed3cfcd3a5ebdc9cc1d | [
"MIT"
] | null | null | null | models/alae.py | revsic/tf-alae | 46f8a5fe1e8de637ed694ed3cfcd3a5ebdc9cc1d | [
"MIT"
] | 2 | 2020-10-08T07:02:32.000Z | 2020-10-11T12:01:02.000Z | import tensorflow as tf
class ALAE(tf.keras.Model):
"""Interface for trainable ALAE object.
(ALAE: Adversarial Latent Autoencoder, Pidhorskyi et al., 2020.)
"""
def __init__(self):
super(ALAE, self).__init__()
def prepare(self, z_dim, gamma, learning_rate, beta1, beta2, disc_gclip=None):
... | 35.524017 | 94 | 0.568162 |
2d0b9087a475cfeb415c45594e210c81e2522e68 | 1,946 | py | Python | docs/conf.py | sansbacon/namematcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | 1 | 2019-05-01T04:47:29.000Z | 2019-05-01T04:47:29.000Z | docs/conf.py | sansbacon/playermatcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | null | null | null | docs/conf.py | sansbacon/playermatcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 35.381818 | 79 | 0.662898 |
2d0b944db91a6b592a3b2acbb0c287390511b368 | 696 | py | Python | miados.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | miados.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | miados.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | #-*-coding: utf-8-*-
from time import strftime
from subprocess import run
from random import randint
def startLink(link):
run("start {}".format(link), shell=True)
def main():
date = strftime("%d/%m/%y")
print(date)
if date == "23/08/19":
print("El día de los miados ha llegado")
links_miados = (
"https://ww... | 27.84 | 69 | 0.691092 |
2d0bd8a6332766abee730ac4a154d603a88ce3f8 | 6,558 | py | Python | models/cite_wa/OneLabelTextCNN/model.py | DeepWTO/deepwto-draft | c61dc02e4ce3e72e8423c712ddc5483f851443f5 | [
"Apache-2.0"
] | 34 | 2019-02-04T14:57:08.000Z | 2022-02-07T13:32:35.000Z | models/cite_wa/OneLabelTextCNN/model.py | syyunn/DeepWTO | 0e9f206ec2ce24b1afdf895bc81509dd84235b82 | [
"Apache-2.0"
] | 3 | 2020-03-02T05:06:24.000Z | 2020-03-06T08:39:18.000Z | models/cite_wa/OneLabelTextCNN/model.py | DeepWTO/deepwto-draft | c61dc02e4ce3e72e8423c712ddc5483f851443f5 | [
"Apache-2.0"
] | 4 | 2020-02-17T04:17:12.000Z | 2022-02-07T14:27:01.000Z | # -*- coding:utf-8 -*-
__author__ = 'Randolph'
__modify__ = 'Zachary'
import tensorflow as tf
from utils.layers import do_cnn, fc_w_nl_bn
class OneLabelTextCNN(object):
"""A CNN for generation of text-seq encoding."""
def __init__(self,
sequence_length_gov,
sequence_length_... | 42.862745 | 73 | 0.452425 |
2d0bf66152ad9cc2b13d5a00fadf8f51cdd6528b | 5,943 | py | Python | nova/tests/unit/api/openstack/compute/test_api.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_api.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_api.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | 1 | 2020-03-01T17:04:57.000Z | 2020-03-01T17:04:57.000Z | # Copyright 2010 OpenStack Foundation
# 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 requ... | 34.958824 | 78 | 0.666162 |
2d0bfb2881aa86d12a527f63bffa1914d6d41ad0 | 11,364 | py | Python | src/main/resources/loc_mccabe_extract.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 2 | 2020-05-25T15:19:57.000Z | 2020-12-07T07:58:19.000Z | src/main/resources/loc_mccabe_extract.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 2 | 2020-05-25T16:44:15.000Z | 2020-05-25T17:44:18.000Z | src/main/resources/loc_mccabe_extract.py | jacksonpradolima/comfort | 30b6d845716f9cd4ba8639b168a8520cb56c6f30 | [
"Apache-2.0"
] | 1 | 2020-05-25T16:44:57.000Z | 2020-05-25T16:44:57.000Z | import os
import re
import tokenize
from ast import NodeVisitor, iter_child_nodes, parse
from lib2to3 import refactor
from lib2to3.pgen2.parse import ParseError
import sys
pattern = re.compile("[\(\[].*?[\)\]]")
SUFFIX_RE = re.compile('/?(__init__)?\.py[cwo]?')
def delete_program_part_identifier(string):
new_s... | 32.561605 | 139 | 0.579901 |
2d0c4dff9f39caa627feb5d3e8008fc7544f83b8 | 1,536 | py | Python | datasets/CaFE/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 3 | 2020-11-03T14:54:22.000Z | 2021-04-12T12:23:10.000Z | datasets/CaFE/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | null | null | null | datasets/CaFE/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 2 | 2020-12-03T06:21:59.000Z | 2021-01-16T04:47:12.000Z | """Process the raw CaFE dataset.
This assumes the file structure from the original compressed file:
/.../
Colère/
Faible/
*.aiff [for 192k data]
*.wav [for 48k data]
Fort/
...
"""
from pathlib import Path
import click
from ertk.dataset import resample_audio, write_an... | 26.033898 | 79 | 0.620443 |
2d0c8aeb7dfa856253b73e4f89d2eb9fca8d1664 | 28,013 | py | Python | nnvm/tests/python/compiler/test_top_level4.py | joshpoll/tvm | fc28cfa791a01234dde70bd12b71c882dfff9e6a | [
"Apache-2.0"
] | null | null | null | nnvm/tests/python/compiler/test_top_level4.py | joshpoll/tvm | fc28cfa791a01234dde70bd12b71c882dfff9e6a | [
"Apache-2.0"
] | null | null | null | nnvm/tests/python/compiler/test_top_level4.py | joshpoll/tvm | fc28cfa791a01234dde70bd12b71c882dfff9e6a | [
"Apache-2.0"
] | null | null | null | import math
import numpy as np
import tvm
from tvm.contrib import graph_runtime
import topi
import nnvm.symbol as sym
import nnvm.compiler
from nnvm.testing.config import ctx_list
def helper(symbol, inputs, dtype,
np_forward, np_backward=None,
need_input=True, need_head_grads=True, in_range={}):... | 37.957995 | 136 | 0.579053 |
2d0ca6cfdc3ca7e24ff23d1359b1df71186b6425 | 4,867 | py | Python | Scripts/Simulator.py | AskingAlexander/SparseShield_NIvsHS | 75c4c2f56baa1d0ff2589964d2a2c6dfc1a49996 | [
"MIT"
] | null | null | null | Scripts/Simulator.py | AskingAlexander/SparseShield_NIvsHS | 75c4c2f56baa1d0ff2589964d2a2c6dfc1a49996 | [
"MIT"
] | null | null | null | Scripts/Simulator.py | AskingAlexander/SparseShield_NIvsHS | 75c4c2f56baa1d0ff2589964d2a2c6dfc1a49996 | [
"MIT"
] | null | null | null | import time
import networkx as nx
import random
import numpy as np
import logging
from collections import defaultdict
import warnings
from joblib import Parallel, delayed
class Simulator():
def __init__(self, G, seeds):
self.G = G
self.seeds = seeds
self.blocked = {}
self.log = {}... | 38.626984 | 115 | 0.604685 |
2d0cb4f5bf2b11d6e4b745a0d68c106d6c0220ba | 744 | py | Python | django_codemod/visitors/shortcuts.py | cvanderkolk/django-codemod | 9d03ebbf98285e408bacf7553c886fbf4960b720 | [
"MIT"
] | null | null | null | django_codemod/visitors/shortcuts.py | cvanderkolk/django-codemod | 9d03ebbf98285e408bacf7553c886fbf4960b720 | [
"MIT"
] | 2 | 2022-01-19T14:30:11.000Z | 2022-01-28T14:32:34.000Z | django_codemod/visitors/shortcuts.py | jayvdb/django-codemod | 8626e6bb5383d9ef3b733861d6996213d90cf26d | [
"MIT"
] | null | null | null | from typing import Sequence
from libcst import Arg, Call, Name
from django_codemod.constants import DJANGO_20, DJANGO_30
from django_codemod.visitors.base import BaseSimpleFuncRenameTransformer
class RenderToResponseTransformer(BaseSimpleFuncRenameTransformer):
"""
Resolve deprecation of ``django.shortcuts.... | 31 | 72 | 0.737903 |
2d0cb7bf72566fda845fa39c48d865adb2244b1b | 3,005 | py | Python | src/data/make_dataset.py | JonnyTran/nuclei-segmentation | 4f71b5f32bbc2ff12a7af5568e4b351fd4c06614 | [
"FTL"
] | 3 | 2018-08-17T11:52:48.000Z | 2021-02-03T15:53:19.000Z | src/data/make_dataset.py | JonnyTran/nuclei-segmentation | 4f71b5f32bbc2ff12a7af5568e4b351fd4c06614 | [
"FTL"
] | null | null | null | src/data/make_dataset.py | JonnyTran/nuclei-segmentation | 4f71b5f32bbc2ff12a7af5568e4b351fd4c06614 | [
"FTL"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import matplotlib.pyplot as plt
import numpy as np
import scipy.io
from definitions import ROOT_DIR
class CRCHistoPhenotypes_Patch:
def __init__(self, patch_size=(52, 52), pad_mode="symmetric"):
self.classif_dir = os.path.join(ROOT_DIR, 'data/external/CRCHistoPhenotypes... | 42.928571 | 121 | 0.56406 |
2d0cf784e27aa39c7072f6acf6dd8c6437b5a336 | 26 | py | Python | easytorch/vision/__init__.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 20 | 2020-07-30T16:46:57.000Z | 2021-12-11T21:24:19.000Z | easytorch/vision/__init__.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 4 | 2020-12-13T15:03:28.000Z | 2022-03-12T00:59:06.000Z | easytorch/vision/__init__.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 3 | 2021-06-06T00:23:01.000Z | 2021-11-08T14:21:13.000Z | from .imageutils import *
| 13 | 25 | 0.769231 |
2d0cfbaee6aaa9797b35aba3baefc820035f7df0 | 3,041 | py | Python | neon/optimizers/adadelta.py | zhenglab/neon | ba5b008a03001c2a2e38a1e688b4f265c6461539 | [
"Apache-2.0"
] | 3 | 2017-02-02T05:20:48.000Z | 2021-07-07T16:50:41.000Z | neon/optimizers/adadelta.py | tambetm/neon | 1597082ad0bab59102f1ceb20feb08c5a0bf9d04 | [
"Apache-2.0"
] | null | null | null | neon/optimizers/adadelta.py | tambetm/neon | 1597082ad0bab59102f1ceb20feb08c5a0bf9d04 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... | 41.094595 | 79 | 0.593226 |
2d0d003037f73c89755d26290150823b37ea5169 | 1,369 | py | Python | icedata/template/tests/test_generator.py | FraPochetti/icedata | fdd094dfbf80e2668ef942ea26fe6b4d31052eb7 | [
"Apache-2.0"
] | null | null | null | icedata/template/tests/test_generator.py | FraPochetti/icedata | fdd094dfbf80e2668ef942ea26fe6b4d31052eb7 | [
"Apache-2.0"
] | null | null | null | icedata/template/tests/test_generator.py | FraPochetti/icedata | fdd094dfbf80e2668ef942ea26fe6b4d31052eb7 | [
"Apache-2.0"
] | null | null | null | from icevision.imports import *
from icevision.utils import *
import icedata
def test_generate_dataset():
dataset_name = "test_ds"
datasets_dir = Path(icedata.datasets.__file__).absolute().parent
new_dataset_path = datasets_dir / dataset_name
init_filepath = datasets_dir / "__init__.py"
original_i... | 31.837209 | 87 | 0.693937 |
2d0d090daa61faba493edb5467ea027058593453 | 1,463 | py | Python | model/datasets/convert_cls.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 24 | 2021-08-09T00:47:22.000Z | 2022-03-06T09:38:48.000Z | model/datasets/convert_cls.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 3 | 2021-07-19T16:01:37.000Z | 2022-03-03T07:09:03.000Z | model/datasets/convert_cls.py | elviva404/food-detection-yolov5 | 796a0c1df6e9c9a705dff7782b3f9b213344f11b | [
"MIT"
] | 8 | 2021-11-08T12:39:05.000Z | 2022-01-30T14:59:37.000Z | import os
from shutil import copyfile
from tqdm import tqdm
def convert_food101():
ROOT = './data/MAFood121/images'
TRAIN_SPLIT = './data/MAFood121/annotations/train.txt'
VAL_SPLIT = './data/MAFood121/annotations/test.txt'
CLASS_ID = './data/MAFood121/annotations/dishes.txt'
def get_label_i... | 26.6 | 82 | 0.589884 |
2d0d109a2370c3e9d2633d2e56f125208d6ba62f | 2,161 | py | Python | tests/test_common.py | jannafierst/SIDR | ad2d461dc930b95a42f1a6105b1e802df60b4149 | [
"MIT"
] | 7 | 2017-10-23T01:35:06.000Z | 2020-12-18T23:21:41.000Z | tests/test_common.py | jannafierst/SIDR | ad2d461dc930b95a42f1a6105b1e802df60b4149 | [
"MIT"
] | 2 | 2018-08-01T11:09:19.000Z | 2018-10-15T22:33:30.000Z | tests/test_common.py | jannafierst/SIDR | ad2d461dc930b95a42f1a6105b1e802df60b4149 | [
"MIT"
] | 1 | 2018-08-07T17:06:13.000Z | 2018-08-07T17:06:13.000Z | import sidr
import pytest
import mock
from contextlib import closing
try: # https://stackoverflow.com/questions/11914472/stringio-in-python3
from StringIO import StringIO
except ImportError:
from io import StringIO
# TODO: handle initial newline in csv
test_names = """1 | root | | scientific na... | 40.773585 | 149 | 0.615919 |
2d0d4ebc47a112d6423fd4aca77cf9d074964265 | 4,299 | py | Python | tests/rnnnumbers.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | tests/rnnnumbers.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | tests/rnnnumbers.py | tonib/tokens-rnn-tensorflow | 9da815d3f9f4d215dd4d7041e5638eeb3ac51a0a | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.feature_column as feature_column
from tensorflow.contrib.estimator import RNNClassifier
import tensorflow.contrib.feature_column as contrib_feature_column
import test_utils
from typing import List
# Test to make a char RNN predictor
# Simple sample text to learn: repetitions ... | 30.707143 | 146 | 0.704582 |
2d0d6b6d24d96e2f8d4544da5d0fffebbe49fe18 | 1,229 | py | Python | setup.py | ImaginaryLandscape/django-yaba | 4f5a8704461757144d6040023f0b6e1f60b5c6e1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ImaginaryLandscape/django-yaba | 4f5a8704461757144d6040023f0b6e1f60b5c6e1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ImaginaryLandscape/django-yaba | 4f5a8704461757144d6040023f0b6e1f60b5c6e1 | [
"BSD-3-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
media_files = []
for dirpath, dirnames, filenames in os.walk('src/django_yaba/media'):
media_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
setup(
name = "django-yaba",
version = "0.2.7",
author = "Mark Rogers",
aut... | 25.604167 | 84 | 0.571196 |
2d0d709cf9c5b219f3b5b3f04c90f6199df957c2 | 10,744 | py | Python | experimental/optimal_sampling_entropy.py | ScSteffen/neuralEntropy | 796e0b38ac9c01f59772d49be3368b8ac9ad24d7 | [
"MIT"
] | 1 | 2021-03-12T09:40:48.000Z | 2021-03-12T09:40:48.000Z | experimental/optimal_sampling_entropy.py | ScSteffen/neuralEntropy | 796e0b38ac9c01f59772d49be3368b8ac9ad24d7 | [
"MIT"
] | null | null | null | experimental/optimal_sampling_entropy.py | ScSteffen/neuralEntropy | 796e0b38ac9c01f59772d49be3368b8ac9ad24d7 | [
"MIT"
] | null | null | null | """
Author: Steffen Schotthöfer
Date: 21.04.2020
Brief: Script to test the optimal convex data sampling alogrithm
"""
import matplotlib.pyplot as plt
import numpy as np
import scipy.optimize
import tensorflow as tf
from src.neuralClosures.configModel import initNeuralClosure
from src import utils
from src import math... | 39.5 | 117 | 0.569341 |
2d0d806a247c2e9dd1ebbfe9afd6e8e968916366 | 4,607 | py | Python | rls/algorithms/base/sarl_policy.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/base/sarl_policy.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/base/sarl_policy.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
from copy import deepcopy
import numpy as np
from rls.algorithms.base.policy import Policy
from rls.common.data import Data
from rls.common.specs import EnvAgentSpec
from rls.nn.modules import CuriosityModel
from rls.utils.converter import to_tensor
from rls.utils... | 36.275591 | 124 | 0.555459 |
2d0df8d6a4f5c0e14cad0bf26e3e427bda3f99f6 | 3,711 | py | Python | src/rubrix/sdk/api/datasets/list_datasets.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/api/datasets/list_datasets.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/api/datasets/list_datasets.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 24.74 | 75 | 0.663703 |
2d0eba3debf813cf40d091d0b8f4ea2ffa46e623 | 35,803 | py | Python | py_qualtrics_api/tools.py | blueogive/py_qualtrics_api | 252440c79302bc1df7e5f88a3432a60d23ea68ce | [
"MIT"
] | null | null | null | py_qualtrics_api/tools.py | blueogive/py_qualtrics_api | 252440c79302bc1df7e5f88a3432a60d23ea68ce | [
"MIT"
] | null | null | null | py_qualtrics_api/tools.py | blueogive/py_qualtrics_api | 252440c79302bc1df7e5f88a3432a60d23ea68ce | [
"MIT"
] | null | null | null | #! /usr/local/bin python3
import yaml
import pandas as pd
import requests
from getpass import getpass
from datetime import datetime, timedelta
import zipfile
import io
import time
class QualtricsAPI:
def __init__(self, config_file_or_dict):
self.config = self.APIConfig(config_file_or_dict)
class APIConfig:
... | 39.825362 | 123 | 0.588694 |
2d0ec53f04f5a18c97d36775e9de771d929ea6de | 435 | py | Python | mscr_ws/build/catkin_generated/order_packages.py | lakhanshiva/motivational-scr | 14723f42a0456838a56ab63970cf847f42206ed9 | [
"Apache-2.0"
] | null | null | null | mscr_ws/build/catkin_generated/order_packages.py | lakhanshiva/motivational-scr | 14723f42a0456838a56ab63970cf847f42206ed9 | [
"Apache-2.0"
] | null | null | null | mscr_ws/build/catkin_generated/order_packages.py | lakhanshiva/motivational-scr | 14723f42a0456838a56ab63970cf847f42206ed9 | [
"Apache-2.0"
] | null | null | null | # generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = "/home/lakhanshiva/motivational-scr/mscr_ws/src"
whitelisted_packages = "".split(';') if "" != "" else []
blacklisted_packages = "".split(';') if "" != "" else []
underlay_workspaces = "/home/lakhanshiva/motivational-scr/mscr_ws/devel... | 72.5 | 185 | 0.721839 |
2d0ec5e678784add7a0d15d31c41e4f0dae9132d | 2,938 | py | Python | tests/test_tempest_testcase_list.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | null | null | null | tests/test_tempest_testcase_list.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | 2 | 2019-01-14T22:48:35.000Z | 2019-02-25T20:06:06.000Z | tests/test_tempest_testcase_list.py | rcbops/tempest-zigzag | 12f4bc528c9b88263f04394e5f31755519aa02e8 | [
"Apache-2.0"
] | 2 | 2019-01-08T20:19:16.000Z | 2019-01-10T22:12:30.000Z | from tempest_zigzag.tempest_testcase_list import TempestTestcaseList
from lxml.etree import _Element
from lxml import etree
import pytest
@pytest.fixture
def single_test_list_entry():
"""A single line from the output of
tempest run --list-tests
"""
return "tempest.api.compute.admin.test_aggregates.Agg... | 35.829268 | 159 | 0.721579 |
2d0f10c25f2753fea18e830bc38a17d9a2bb1f84 | 1,351 | py | Python | dataworkspaces/__init__.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 6 | 2019-04-16T10:44:41.000Z | 2021-02-24T09:34:10.000Z | dataworkspaces/__init__.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 67 | 2019-03-08T13:32:31.000Z | 2022-03-09T15:15:41.000Z | dataworkspaces/__init__.py | data-workspaces/data-workspaces-core | 2fd457414a9481f78dbd689c92479fb3a6d838b0 | [
"Apache-2.0"
] | 2 | 2020-04-24T02:48:56.000Z | 2022-01-14T01:07:48.000Z | # Copyright 2018,2019 by MPI-SWS and Data-ken Research. Licensed under Apache 2.0. See LICENSE.txt.
"""
Welcome to Data Workspaces. To get started, see the documentation at
https://data-workspaces-core.readthedocs.io/en/latest/. For most applications,
you will interact through the command line interface (dws), the inte... | 37.527778 | 99 | 0.76906 |
2d0f14be0d54de3e4c4db43a1f5b929537c14d50 | 162 | py | Python | contenido/tests/HU059_test.py | slinan/badSmellsAnalisis | 0a5f20ed9538181c1219a4c053b952ac5dcbc3a8 | [
"MIT"
] | null | null | null | contenido/tests/HU059_test.py | slinan/badSmellsAnalisis | 0a5f20ed9538181c1219a4c053b952ac5dcbc3a8 | [
"MIT"
] | null | null | null | contenido/tests/HU059_test.py | slinan/badSmellsAnalisis | 0a5f20ed9538181c1219a4c053b952ac5dcbc3a8 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.test import Client
from contenido.models import Audio
class HU059Test(TestCase):
def setUp(self):
pass
| 18 | 34 | 0.753086 |
2d0f6e60b30d4413ba78df9d646e6aafb1c4415f | 2,207 | py | Python | Python/setup.py | tmiethlinger/WarpX | 890d05be22a5e27c43a35319154a812fd5f6c91e | [
"BSD-3-Clause-LBNL"
] | null | null | null | Python/setup.py | tmiethlinger/WarpX | 890d05be22a5e27c43a35319154a812fd5f6c91e | [
"BSD-3-Clause-LBNL"
] | null | null | null | Python/setup.py | tmiethlinger/WarpX | 890d05be22a5e27c43a35319154a812fd5f6c91e | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016-2020 Andrew Myers, David Grote, Maxence Thevenet
# Remi Lehe
#
# This file is part of WarpX.
#
# License: BSD-3-Clause-LBNL
"""
setup.py file for WarpX
"""
import argparse
import os
import sys
from setuptools import setup
argparser = argparse.ArgumentParser(add_help=False)
a... | 33.439394 | 178 | 0.685546 |
2d0fb85b8e0c9e3146ea49c55a571b129f28885a | 6,767 | py | Python | PhenDisco/ReleaseV1.0/information-retrieval/DB.py | DBMI/iSeeDELVE | 72b51b275bd8ae2e1587f4b6709f24307dd6560f | [
"BSD-4-Clause-UC"
] | null | null | null | PhenDisco/ReleaseV1.0/information-retrieval/DB.py | DBMI/iSeeDELVE | 72b51b275bd8ae2e1587f4b6709f24307dd6560f | [
"BSD-4-Clause-UC"
] | null | null | null | PhenDisco/ReleaseV1.0/information-retrieval/DB.py | DBMI/iSeeDELVE | 72b51b275bd8ae2e1587f4b6709f24307dd6560f | [
"BSD-4-Clause-UC"
] | null | null | null | # The script pull out data from database
# Written by Son Doan, Oct 2012
import MySQLdb
import sys,re
class Table:
''' This class is for retrieve data from dbGaP database '''
def __init__(self, db, name):
self.db = db
self.name = name
self.dbc = self.db.cursor()
# Get an item by index of record
def __geti... | 29.942478 | 360 | 0.617556 |
2d0fc180d31b76dc7b2b1ea55fffcb8e3f675de5 | 3,991 | py | Python | alipay/aop/api/request/ZhimaMerchantContractOfferModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/ZhimaMerchantContractOfferModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/ZhimaMerchantContractOfferModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaMerchantContractOfferModifyModel import ZhimaMerchantContractOfferModifyModel
class ZhimaMerchantContractOfferModifyRequest(obj... | 27.524138 | 148 | 0.646455 |
2d0fe647e12f77ee65e198c6a0fcd28ff888c99a | 991 | py | Python | config/urls.py | masashimorita/django-recipe-api | fff18bf838e0e458ece1573b2d9751154eab241b | [
"MIT"
] | null | null | null | config/urls.py | masashimorita/django-recipe-api | fff18bf838e0e458ece1573b2d9751154eab241b | [
"MIT"
] | null | null | null | config/urls.py | masashimorita/django-recipe-api | fff18bf838e0e458ece1573b2d9751154eab241b | [
"MIT"
] | null | null | null | """config URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 38.115385 | 77 | 0.717457 |
2d1021562aa264448db64cb31d821d103aaf5e54 | 1,114 | py | Python | src/pairs/mapper.py | t0mmyt/cloud_computing | d971a4c95ede11384d58023d1b13dd8c644073c4 | [
"BSD-2-Clause"
] | null | null | null | src/pairs/mapper.py | t0mmyt/cloud_computing | d971a4c95ede11384d58023d1b13dd8c644073c4 | [
"BSD-2-Clause"
] | null | null | null | src/pairs/mapper.py | t0mmyt/cloud_computing | d971a4c95ede11384d58023d1b13dd8c644073c4 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python2
import re
from sys import stdin, stdout
def mapper():
"""
Pairs mapper function
Reads stdin, (emits w1 w2 : n=1) on stdout
"""
previous_word = None
line = stdin.readline()
while line:
if len(line) != 0:
# Make everything lower case
li... | 29.315789 | 79 | 0.510772 |
2d104a9fee4c85982298082debb1f70427806a4e | 872 | py | Python | apps/base/middleware.py | goobes/box | 42e136d98b2a25ffd8717b3c8c9d97654cc15e54 | [
"MIT"
] | null | null | null | apps/base/middleware.py | goobes/box | 42e136d98b2a25ffd8717b3c8c9d97654cc15e54 | [
"MIT"
] | 21 | 2018-02-21T06:53:36.000Z | 2022-03-11T23:14:47.000Z | apps/base/middleware.py | goobes/box | 42e136d98b2a25ffd8717b3c8c9d97654cc15e54 | [
"MIT"
] | 1 | 2018-03-01T11:01:20.000Z | 2018-03-01T11:01:20.000Z | """ Middleware """
from django.http import HttpResponseRedirect
from django.urls import reverse
from .models import Profile
from utils import has_profile
class CheckProfileMiddleware(object):
"""
Checks for whether a user has a profile or not. If a logged in user does not have a profile created,
then they... | 34.88 | 104 | 0.669725 |
2d1093756925ffbb38040d917f2e9d39039f2a0b | 2,004 | py | Python | ntutm/vocab/doc2vocab_count/jieba_vocab.py | m516825/IR_Lab_Package | eabb30cd2898b4cdf39b514038fa42d509d67e77 | [
"MIT"
] | null | null | null | ntutm/vocab/doc2vocab_count/jieba_vocab.py | m516825/IR_Lab_Package | eabb30cd2898b4cdf39b514038fa42d509d67e77 | [
"MIT"
] | null | null | null | ntutm/vocab/doc2vocab_count/jieba_vocab.py | m516825/IR_Lab_Package | eabb30cd2898b4cdf39b514038fa42d509d67e77 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import xml.etree.ElementTree as ET
import vocab
import os
import sys, getopt
def count_em(valid_path):
x = 0
for root, dirs, files in os.walk(valid_path):
for f in files:
x = x+1
return x
if __name__ == "__main__":
#########################
inputdir = ''
output... | 25.692308 | 116 | 0.595808 |
2d10aa7dcaa61275555f4c004ca850836fa3722d | 550 | py | Python | terrascript/provider/carlpett/sops.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/carlpett/sops.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/carlpett/sops.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/carlpett/sops.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:27:24 UTC)
import terrascript
class sops(terrascript.Provider):
"""A Terraform provider for reading Mozilla sops files"""
__description__ = "A Terraform provider for reading Mozilla sops files"
__names... | 27.5 | 75 | 0.718182 |
2d10bf5aab2a533f1c1ea2115cd7fc0aee8947b0 | 3,884 | py | Python | morphine/feature_extractor.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 11 | 2015-03-24T12:17:17.000Z | 2021-01-27T15:49:06.000Z | morphine/feature_extractor.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 2 | 2018-11-04T15:18:29.000Z | 2020-06-19T07:41:19.000Z | morphine/feature_extractor.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 3 | 2015-11-04T19:00:55.000Z | 2017-05-11T13:26:57.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from itertools import starmap
from operator import mul
from six.moves import reduce
try:
from cytoolz import functoolz, dicttoolz
except ImportError:
from toolz import functoolz, dicttoolz
import pycrfsuite
def get_parsed_sents(morph, sents):
r... | 35.309091 | 86 | 0.673275 |
2d10df13d698d8ad9b90638b06c9e7f22df8c2d6 | 5,449 | py | Python | aio/kafka/gkafka.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | 3 | 2021-11-09T09:43:21.000Z | 2021-12-16T18:15:43.000Z | aio/kafka/gkafka.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | null | null | null | aio/kafka/gkafka.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | 2 | 2022-03-10T11:24:46.000Z | 2022-03-25T06:39:17.000Z | # -*- coding: utf-8 -*-
# created: 2021-07-29
# creator: liguopeng@liguopeng.net
import collections
import logging
from copy import copy
from datetime import datetime
from types import TracebackType
from typing import (
Any,
AnyStr,
AsyncContextManager,
AsyncGenerator,
Awaitable,
Callable,
... | 31.49711 | 99 | 0.644338 |
2d10f8bd80cd20d05138ece0975722ebf2949d34 | 1,911 | py | Python | tql/utils/time/DateTime.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/utils/time/DateTime.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/utils/time/DateTime.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : iWork.
# @File : Time
# @Time : 2019-06-13 22:17
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
import time
import numpy as np
import dateutil
import pendulum
from pytz import tim... | 26.915493 | 87 | 0.678702 |
2d10fbd37548129ce2b6dfc3f2a2ec93ff6de7ab | 9,152 | py | Python | api/medicine_api/readers/sheet_reader.py | maxwelld90/medicine-for-ukraine | f10152929a3827b9de055d993103b352959f3b33 | [
"MIT"
] | 2 | 2022-03-21T14:00:27.000Z | 2022-03-21T17:17:51.000Z | api/medicine_api/readers/sheet_reader.py | maxwelld90/medicine-for-ukraine | f10152929a3827b9de055d993103b352959f3b33 | [
"MIT"
] | 19 | 2022-03-21T14:14:26.000Z | 2022-03-31T07:49:40.000Z | api/medicine_api/readers/sheet_reader.py | maxwelld90/medicine-for-ukraine | f10152929a3827b9de055d993103b352959f3b33 | [
"MIT"
] | 4 | 2022-03-02T13:56:30.000Z | 2022-03-22T10:49:00.000Z | import zlib
import redis
import pickle
import pygsheets
from django.conf import settings
from medicine_api.models import Sheet
from medicine_api.readers import exceptions
from pygsheets.exceptions import WorksheetNotFound
REDIS_WORKSHEET_SUFFIX = '-WORKSHEET'
REDIS_DATAFRAME_SUFFIX = '-DF'
class SheetReader(object):... | 41.789954 | 147 | 0.644559 |
2d112d187dcbf561ad9bb5fc0d07ea490171df3d | 2,811 | py | Python | upho/cui/settings.py | yuzie007/upho | 9e130fc1d5314fdbc77a6336e84c02e67d459bfb | [
"MIT"
] | 25 | 2017-10-09T07:31:26.000Z | 2022-02-28T10:36:01.000Z | upho/cui/settings.py | yuzie007/ph_unfolder | 87050d1db494ed018739f1e9523a013ae70feec8 | [
"MIT"
] | 4 | 2018-07-01T15:59:54.000Z | 2020-09-23T11:16:09.000Z | upho/cui/settings.py | yuzie007/ph_unfolder | 87050d1db494ed018739f1e9523a013ae70feec8 | [
"MIT"
] | 13 | 2017-10-16T13:45:11.000Z | 2021-12-27T15:45:06.000Z | import re
import numpy as np
def parse_phonopy_conf(filename):
with open(filename, "r") as f:
return _parse_phonopy_conf_strings(f.readlines())
def _parse_phonopy_conf_strings(lines):
lines = _remove_comments(lines)
lines = _parse_continuation_lines(lines)
d = _create_dictionary(lines)
r... | 27.558824 | 78 | 0.549626 |
2d11372d4533a64a01e74c1465d116e17e828495 | 8,887 | py | Python | src/api/bkuser_core/bkiam/constants.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/bkiam/constants.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/bkiam/constants.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 34.180769 | 115 | 0.605716 |
2d1137f7a3a55e7a95b45405c334edc499d8c2fa | 3,190 | py | Python | researcher/experiment.py | Lewington-pitsos/researcher | b52d13bed0bd2681763e0e9c08d08a591ca23aaa | [
"MIT"
] | null | null | null | researcher/experiment.py | Lewington-pitsos/researcher | b52d13bed0bd2681763e0e9c08d08a591ca23aaa | [
"MIT"
] | null | null | null | researcher/experiment.py | Lewington-pitsos/researcher | b52d13bed0bd2681763e0e9c08d08a591ca23aaa | [
"MIT"
] | null | null | null | import datetime
from researcher.globals import DATE_FORMAT, METADATA_KEYS, OBSERVATIONS_NAME
from researcher.observations import FinalizedObservations
class Experiment(FinalizedObservations):
"""Contains all the data related to a single recorded experiment.
Attributes:
data (dict): All information, o... | 34.301075 | 126 | 0.618809 |
2d115d6406d38361ad97bafb86c67bf6ad39ca19 | 3,760 | py | Python | API/feowl-api/feowl/models.py | jplusplus/feowl | f6278d41329f911f30760cb21a387c1cc9fa7a83 | [
"Apache-2.0"
] | null | null | null | API/feowl-api/feowl/models.py | jplusplus/feowl | f6278d41329f911f30760cb21a387c1cc9fa7a83 | [
"Apache-2.0"
] | null | null | null | API/feowl-api/feowl/models.py | jplusplus/feowl | f6278d41329f911f30760cb21a387c1cc9fa7a83 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth.models import User
from django.contrib.gis.db import models
from django.contrib.auth.hashers import make_password
import settings
from tastypie.models import create_api_key
models.signals.post_save.connect(create_api_key, sender=User)
def get_sentinel_user():
return Contributor.objects.... | 39.166667 | 153 | 0.721809 |
2d11761633442c2d1dd04dee9914ac56dcf146cd | 514 | py | Python | scripts/check_config.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | null | null | null | scripts/check_config.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | null | null | null | scripts/check_config.py | JIC-Image-Analysis/fishtools | 9d7cfa695711ec4b40986be65e11eea7ad1b0b5d | [
"MIT"
] | 1 | 2022-03-10T13:08:21.000Z | 2022-03-10T13:08:21.000Z | import logging
import pathlib
import click
import parse
from fishtools.data import DataLoader, get_specs
from fishtools.config import Config
logger = logging.getLogger("fishtools")
@click.command()
@click.argument('config_fpath')
def main(config_fpath):
logging.basicConfig(level=logging.INFO)
config = C... | 16.580645 | 48 | 0.741245 |
2d11815f406e3eb8ff85b7ca66abccb40e81642f | 658 | py | Python | exampleproject/urls.py | hangpark/django-docker-boilerplate | aa3cb19fad00e90df52a0850d3403984804feb4b | [
"MIT"
] | 7 | 2018-06-11T07:55:35.000Z | 2021-12-13T03:07:14.000Z | exampleproject/urls.py | hangpark/django-docker-boilerplate | aa3cb19fad00e90df52a0850d3403984804feb4b | [
"MIT"
] | 2 | 2020-06-05T17:38:01.000Z | 2021-06-10T19:11:51.000Z | exampleproject/urls.py | hangpark/django-docker-boilerplate | aa3cb19fad00e90df52a0850d3403984804feb4b | [
"MIT"
] | 2 | 2018-12-02T10:30:23.000Z | 2020-09-09T16:45:08.000Z | from django.conf.urls import url
from django.contrib import admin
from apps.manager.views import MainPageView, ErrorView
handler400 = ErrorView.as_view(template_name='error/400.jinja', status_code=400)
handler403 = ErrorView.as_view(template_name='error/403.jinja', status_code=403)
handler404 = ErrorView.as_view(temp... | 29.909091 | 80 | 0.75076 |
2d1184a1641f55c4fd630beb467d14beba7b964a | 987 | py | Python | app/core/tests/test_validador.py | taniodev/chat-serv | d6de2a82f79ba3d380117514fef9c4d0e9c3227b | [
"MIT"
] | null | null | null | app/core/tests/test_validador.py | taniodev/chat-serv | d6de2a82f79ba3d380117514fef9c4d0e9c3227b | [
"MIT"
] | 9 | 2020-02-12T21:40:08.000Z | 2022-03-17T14:49:11.000Z | app/core/tests/test_validador.py | taniodev/chat-serv | d6de2a82f79ba3d380117514fef9c4d0e9c3227b | [
"MIT"
] | null | null | null | from unittest.mock import AsyncMock
import pytest
from app.core import lista_de_comandos, usuarios_conectados
from app.core.validador import nome_valido
@pytest.fixture
def setup():
lista_de_comandos['umcomandoqualquer'] = AsyncMock()
usuarios_conectados['fulano'] = AsyncMock()
yield
del lista_de_co... | 31.83871 | 80 | 0.716312 |
2d118829c3bac9e9d9a650c2e1d5b2bf9a615529 | 128 | py | Python | src/radical/__init__.py | iparask/campaign_manager | 7d7f3934fdde6acadc7581825697c89009fcf6fd | [
"MIT"
] | 4 | 2019-05-24T02:19:14.000Z | 2021-08-10T05:20:08.000Z | src/iceberg_seals/search/utils/creators/__init__.py | iceberg-project/Seals | f0193af5a4bb7647abd49f17d97537784f8f29e6 | [
"MIT"
] | 58 | 2018-06-12T16:22:43.000Z | 2020-12-21T15:38:53.000Z | src/radical/cm/__init__.py | iparask/campaign_manager | 7d7f3934fdde6acadc7581825697c89009fcf6fd | [
"MIT"
] | 3 | 2018-08-29T17:35:02.000Z | 2018-10-24T22:28:33.000Z | """
Author: Ioannis Paraskevakos
License: MIT
Copyright: 2018-2019
"""
__import__('pkg_resources').declare_namespace(__name__)
| 16 | 55 | 0.78125 |
2d11fbaceb7b27a09e468045223265faab4f9aa1 | 837 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbMetricsSummary.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbMetricsSummary.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbMetricsSummary.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbMetricsSummary(BaseType):
def __init__(self, key=None, min_value=None, max_value=None):
required = {
"key": False,
"min_value": False,
"max_value": False,
}
self.key = key
self.min_... | 23.25 | 63 | 0.611708 |
2d1225fa23340cb78d644497658564e67e190a61 | 11,252 | py | Python | doc/conf.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 11 | 2018-09-07T11:33:23.000Z | 2022-01-07T12:16:11.000Z | doc/conf.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 102 | 2018-03-22T15:35:26.000Z | 2022-03-23T17:46:16.000Z | doc/conf.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 7 | 2018-06-11T15:01:41.000Z | 2020-03-31T09:29:33.000Z | # -*- coding: utf-8 -*-
#
# Gpipe documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 20 11:17:20 2009.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 33.289941 | 96 | 0.694988 |
2d122652d8e8ac2a85b83d09b6f4c88940763b2e | 2,710 | py | Python | back/userapp/serializers.py | HaeSe0ng/SWPP | 3bfc95edd2b341283d8d63d398b05e74605d54af | [
"Apache-2.0"
] | 2 | 2019-09-16T08:06:45.000Z | 2019-12-17T14:35:51.000Z | back/userapp/serializers.py | HaeSe0ng/SWPP | 3bfc95edd2b341283d8d63d398b05e74605d54af | [
"Apache-2.0"
] | 43 | 2019-10-05T02:45:23.000Z | 2020-07-18T11:15:00.000Z | back/userapp/serializers.py | eodmsabc/SNU-SWPP | 3a2453b6747e9e198fda5174a208ca1f2f3e6cd3 | [
"Apache-2.0"
] | 3 | 2019-12-16T05:48:11.000Z | 2019-12-17T14:43:09.000Z | ''' Custom user model serializer '''
from rest_framework import serializers
from django.contrib.auth import get_user_model
from django.conf import settings
from djoser.serializers import TokenSerializer
from djoser.conf import settings as djoser_settings
from stream_chat import StreamChat
class StreamTokenSerializer(... | 39.275362 | 89 | 0.667528 |
2d122e72481ad135c8e2f52973a24bd9054a1226 | 3,991 | py | Python | Tools/ROS/rockin_hri_client/ActionFrameClient_onlyNames.py | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | null | null | null | Tools/ROS/rockin_hri_client/ActionFrameClient_onlyNames.py | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | null | null | null | Tools/ROS/rockin_hri_client/ActionFrameClient_onlyNames.py | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | 2 | 2018-06-04T12:38:54.000Z | 2018-09-22T10:31:27.000Z | from Tkinter import *
class Application(Frame):
goto = "{\"frame\":\"motion\", \"frame_elements\":{\"goal\":\"kitchen\"}}"
bring = "{\"frame\":\"bringing\", \"frame_elements\":{\"theme\":\"pipe\",\"goal\":\"unloading area\"}}"
bring2 = "{\"frame\":\"bringing\", \"frame_elements\":{\"theme\":\"pipe\",\"sou... | 41.14433 | 135 | 0.610373 |
2d122ef056eb02ce7c0357369f9920077c456c22 | 2,143 | py | Python | setup.py | anhaidgroup/magellan_labeler | 97583163091cd04a8bfd3824d78291da58f24f9c | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2019-03-13T11:49:35.000Z | 2021-11-17T01:37:36.000Z | setup.py | anhaidgroup/magellan_labeler | 97583163091cd04a8bfd3824d78291da58f24f9c | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2017-12-31T19:00:37.000Z | 2020-01-29T18:56:47.000Z | setup.py | anhaidgroup/magellan_labeler | 97583163091cd04a8bfd3824d78291da58f24f9c | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 4 | 2017-12-30T17:23:07.000Z | 2020-02-25T20:49:35.000Z | # check if pip is installed. If not, raise an ImportError
PIP_INSTALLED = True
try:
import pip
except ImportError:
PIP_INSTALLED = False
if not PIP_INSTALLED:
raise ImportError('pip is not installed.')
def install_and_import(package):
import importlib
try:
importlib.import_module(package... | 30.183099 | 85 | 0.595427 |
2d1243a913f645809a8e6a637e6952a3b115917a | 18,834 | py | Python | moto/ecs/responses.py | pinzon/moto | 8def040f8de814162b53c5a084f48d494a5f99ca | [
"Apache-2.0"
] | 5,460 | 2015-01-01T01:11:17.000Z | 2022-03-31T23:45:38.000Z | moto/ecs/responses.py | pinzon/moto | 8def040f8de814162b53c5a084f48d494a5f99ca | [
"Apache-2.0"
] | 4,475 | 2015-01-05T19:37:30.000Z | 2022-03-31T13:55:12.000Z | moto/ecs/responses.py | spulec/moto | 8def040f8de814162b53c5a084f48d494a5f99ca | [
"Apache-2.0"
] | 1,831 | 2015-01-14T00:00:44.000Z | 2022-03-31T20:30:04.000Z | import json
from moto.core.responses import BaseResponse
from .models import ecs_backends
class EC2ContainerServiceResponse(BaseResponse):
@property
def ecs_backend(self):
"""
ECS Backend
:return: ECS Backend object
:rtype: moto.ecs.models.EC2ContainerServiceBackend
"... | 39.987261 | 91 | 0.647552 |
2d124a49529357061dba964dd9d2730bff1bb351 | 40,693 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/debug/debug.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/debug/debug.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/debug/debug.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.425873 | 80 | 0.693657 |
2d1271d1eed331a68cec10349e828e12c2117807 | 797 | py | Python | instructors/lessons/higher_order_functions/examples/decorator1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/higher_order_functions/examples/decorator1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/higher_order_functions/examples/decorator1.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | """
You might notice we haven't used any @ symbols. We'll do that next.
For now lets focus on the order of resolution of our print statements.
The additional instatiation of the decorated result is responsible
for the print order (The extra parentheses in the main area).
This would be totally fine in your code, but ... | 24.151515 | 80 | 0.715182 |
2d127572c7b4730425113c229570eb71df4e127f | 2,264 | py | Python | fedml_api/model/mobile/mnn_torch.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | 1 | 2022-03-23T06:35:31.000Z | 2022-03-23T06:35:31.000Z | fedml_api/model/mobile/mnn_torch.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | null | null | null | fedml_api/model/mobile/mnn_torch.py | Little0o0/FedML | 720015c90fcfec88d465a81b1e8fb45676dce9fb | [
"Apache-2.0"
] | null | null | null | import MNN
import torch
import copy
F = MNN.expr
def transform_mnn_to_tensor(mnn_path):
model_path = mnn_path
var_map = F.load_as_dict(model_path)
input_dicts, output_dicts = F.get_inputs_and_outputs(var_map)
input_names = [n for n in input_dicts.keys()]
output_names = [n for n in output_dicts.ke... | 32.811594 | 91 | 0.723057 |
2d127bf9df2a6f193dcc2d8321b21286ce8cda10 | 6,679 | py | Python | runtime/test/specs/V1_1/lstm2_state_relaxed.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/V1_1/lstm2_state_relaxed.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/V1_1/lstm2_state_relaxed.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2018 The Android Open Source 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 la... | 46.706294 | 136 | 0.643959 |
2d12e0803951f915277d763dff0877ed2e243330 | 461 | py | Python | MicroWebSrv2/__init__.py | NoSDante/micropython-esp32 | 7722be7aab5cc7ca603775636a9b1a4e1f7497f0 | [
"CC0-1.0"
] | 2 | 2022-01-31T19:53:02.000Z | 2022-02-28T13:11:01.000Z | MicroWebSrv2/__init__.py | NoSDante/micropython-esp32 | 7722be7aab5cc7ca603775636a9b1a4e1f7497f0 | [
"CC0-1.0"
] | null | null | null | MicroWebSrv2/__init__.py | NoSDante/micropython-esp32 | 7722be7aab5cc7ca603775636a9b1a4e1f7497f0 | [
"CC0-1.0"
] | 1 | 2022-01-24T17:57:14.000Z | 2022-01-24T17:57:14.000Z |
"""
The MIT License (MIT)
Copyright © 2019 Jean-Christophe Bos & HC² (www.hc2.fr)
"""
print()
print(' ---------------------------')
print(' - Python pkg MicroWebSrv2 -')
print(' - version 2.0.6 -')
print(' - by JC`zic & HC2 -')
print(' ---------------------------')
prin... | 24.263158 | 55 | 0.481562 |
2d1327ca599e88d907435fdfcc4cddb369519f58 | 6,084 | py | Python | leetcode/2-medium/8-math/7-fracdecimal/frac_to_decimal.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/2-medium/8-math/7-fracdecimal/frac_to_decimal.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/2-medium/8-math/7-fracdecimal/frac_to_decimal.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | # https://leetcode.com/explore/interview/card/top-interview-questions-medium/113/math/821/
# https://leetcode.com/problems/fraction-to-recurring-decimal/
# Fraction to Recurring Decimal
#
# Given two integers representing the numerator and denominator of a
# fraction, return the fraction in string format.
#
# If the f... | 40.291391 | 405 | 0.59336 |
2d1332cc5b8317fdf29fcc97096fc336dbb58300 | 1,022 | py | Python | axonius_api_client/version.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | null | null | null | axonius_api_client/version.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | null | null | null | axonius_api_client/version.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Version information for this package."""
__version__ = "4.10.7"
VERSION: str = __version__
"""Version of package."""
__url__ = "https://github.com/Axonius/axonius_api_client"
URL: str = __url__
"""URL of package."""
__author__ = "Axonius"
AUTHOR: str = __author__
"""Auth of package."""
__t... | 24.333333 | 65 | 0.720157 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.