hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c327c3b65f8a3b5bc4ad8215b779b5c5535b24b
19,759
py
Python
flask_appbuilder/tests/test_mongoengine.py
paulvic/Flask-AppBuilder
44638156b7ec65e9a77ae474aed75f0de949b505
[ "BSD-3-Clause" ]
null
null
null
flask_appbuilder/tests/test_mongoengine.py
paulvic/Flask-AppBuilder
44638156b7ec65e9a77ae474aed75f0de949b505
[ "BSD-3-Clause" ]
null
null
null
flask_appbuilder/tests/test_mongoengine.py
paulvic/Flask-AppBuilder
44638156b7ec65e9a77ae474aed75f0de949b505
[ "BSD-3-Clause" ]
1
2019-09-24T16:23:50.000Z
2019-09-24T16:23:50.000Z
import datetime import logging import os import random import string from flask_appbuilder.charts.views import ( DirectByChartView, DirectChartView, GroupByChartView ) from flask_appbuilder.models.group import aggregate_avg, aggregate_count, aggregate_sum from flask_appbuilder.models.mongoengine.filters im...
34.185121
88
0.582722
import datetime import logging import os import random import string from flask_appbuilder.charts.views import ( DirectByChartView, DirectChartView, GroupByChartView ) from flask_appbuilder.models.group import aggregate_avg, aggregate_count, aggregate_sum from flask_appbuilder.models.mongoengine.filters im...
true
true
1c327d42b132530b5c5576706689cbfda1e2995d
23
py
Python
irc_bot/__version__.py
gazpachoking/irc_bot
8dc69386e5e75a0259a32ce4de538c8ff5abea6d
[ "MIT" ]
null
null
null
irc_bot/__version__.py
gazpachoking/irc_bot
8dc69386e5e75a0259a32ce4de538c8ff5abea6d
[ "MIT" ]
null
null
null
irc_bot/__version__.py
gazpachoking/irc_bot
8dc69386e5e75a0259a32ce4de538c8ff5abea6d
[ "MIT" ]
null
null
null
__version__ = '1.0.34'
11.5
22
0.652174
__version__ = '1.0.34'
true
true
1c327d96fca9133a54293dca75bf94b325167f62
22,647
py
Python
tests/unit/states/postgres_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
tests/unit/states/postgres_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
tests/unit/states/postgres_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
1
2018-04-19T16:57:27.000Z
2018-04-19T16:57:27.000Z
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import # Import Salt Testing libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, Mock, MagicMock, patch ensure_in_syspath('../../') # Import ...
39.317708
87
0.461915
from __future__ import absolute_import from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, Mock, MagicMock, patch ensure_in_syspath('../../') from salt.modules import postgres as postgresmod from salt.states import ( ...
true
true
1c327e79fdd831f32292c1e0db57bf924a41ea04
2,937
py
Python
colored-led-counter/app.py
ceausuveronica/OpenCV-projects
fe9a95eead97212de5afeb59b31a8996ce7fb116
[ "MIT" ]
null
null
null
colored-led-counter/app.py
ceausuveronica/OpenCV-projects
fe9a95eead97212de5afeb59b31a8996ce7fb116
[ "MIT" ]
1
2018-06-02T17:58:12.000Z
2018-06-02T17:58:12.000Z
colored-led-counter/app.py
ceausuveronica/OpenCV-projects
fe9a95eead97212de5afeb59b31a8996ce7fb116
[ "MIT" ]
null
null
null
# import the necessary packages import argparse import numpy as np from pprint import pprint try: from cv2 import cv2 ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required=True, help="path to the input image") ap.add_argument("-c", "--color", ...
27.448598
105
0.630916
import argparse import numpy as np from pprint import pprint try: from cv2 import cv2 ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required=True, help="path to the input image") ap.add_argument("-c", "--color", default="red", ...
true
true
1c327f0296a46c906815f7847743c4fe97379c29
4,433
py
Python
face_detection_mtcnn_img.py
WhiTExB3AR/PreProduceCode-FMPN-FER
0273fc08bc86a522525d35fe0826e2f106d16e3e
[ "MIT" ]
null
null
null
face_detection_mtcnn_img.py
WhiTExB3AR/PreProduceCode-FMPN-FER
0273fc08bc86a522525d35fe0826e2f106d16e3e
[ "MIT" ]
null
null
null
face_detection_mtcnn_img.py
WhiTExB3AR/PreProduceCode-FMPN-FER
0273fc08bc86a522525d35fe0826e2f106d16e3e
[ "MIT" ]
null
null
null
# https://github.com/ipazc/mtcnn # USAGE # python face_detection_mtcnn_img.py --image images\face_detection\team_hlv_tram_anhnguyen_hop.jpg import argparse import imutils # imutils for crop, rotation and resize (also can transition, get edge, plat 3D to 2D and visualize in matplotlib) # https://github.com/PyImageSear...
33.839695
114
0.660501
import argparse import imutils import cv2 import os from PIL import Image from mtcnn import MTCNN from pathlib import Path detector = MTCNN() parser = argparse.ArgumentParser() parser.add_argument("-img", "--image", type=str, required=True, help="path to input image") args = vars(parser.parse_args())...
true
true
1c327f792bcbb80f4d9b267bc06b4d4888738fc7
25,834
py
Python
saw-remote-api/python/saw_client/crucible.py
GaloisInc/saw-script
d012ffe6bf538456ad19f15974c8367734e45413
[ "BSD-3-Clause" ]
411
2015-06-09T22:00:47.000Z
2022-03-30T11:41:23.000Z
saw-remote-api/python/saw_client/crucible.py
GaloisInc/saw-script
d012ffe6bf538456ad19f15974c8367734e45413
[ "BSD-3-Clause" ]
1,151
2015-06-12T20:46:31.000Z
2022-03-23T02:56:32.000Z
saw-remote-api/python/saw_client/crucible.py
GaloisInc/saw-script
d012ffe6bf538456ad19f15974c8367734e45413
[ "BSD-3-Clause" ]
65
2015-06-10T17:52:26.000Z
2022-02-10T18:17:06.000Z
from abc import ABCMeta, abstractmethod from cryptol import cryptoltypes from .utils import deprecated from dataclasses import dataclass import dataclasses import re from typing import Any, Dict, List, Optional, Set, Union, overload from typing_extensions import Literal import inspect import uuid from .llvm_type impor...
38.84812
156
0.626577
from abc import ABCMeta, abstractmethod from cryptol import cryptoltypes from .utils import deprecated from dataclasses import dataclass import dataclasses import re from typing import Any, Dict, List, Optional, Set, Union, overload from typing_extensions import Literal import inspect import uuid from .llvm_type impor...
true
true
1c327fe199f4fd4dc7cff997cd775b5afdd96687
13,546
py
Python
tests/integration_tests/performance/test_vsock_throughput.py
psalaberria002/firecracker
86340cb109d7eb1174bb080ef0bcb0aadc80b0f9
[ "Apache-2.0" ]
1
2020-03-29T00:58:58.000Z
2020-03-29T00:58:58.000Z
tests/integration_tests/performance/test_vsock_throughput.py
psalaberria002/firecracker
86340cb109d7eb1174bb080ef0bcb0aadc80b0f9
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/performance/test_vsock_throughput.py
psalaberria002/firecracker
86340cb109d7eb1174bb080ef0bcb0aadc80b0f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests the VSOCK throughput of Firecracker uVMs.""" import os import json import logging import time import concurrent.futures import pytest from conftest import _test_images_s3_bucket from framework.art...
38.157746
79
0.614573
import os import json import logging import time import concurrent.futures import pytest from conftest import _test_images_s3_bucket from framework.artifacts import ArtifactCollection, ArtifactSet from framework.matrix import TestMatrix, TestContext from framework.builder import MicrovmBuilder from framework.stats i...
true
true
1c328000667faa803cdf321cb49c6f78d6edb454
2,646
py
Python
letsencrypt/constants.py
diafygi/letsencrypt
abe1aa999af7b45e28958a7dcdd8fcc0daa310dd
[ "Apache-2.0" ]
3
2019-03-20T08:32:11.000Z
2021-02-04T13:03:38.000Z
letsencrypt/constants.py
diafygi/letsencrypt
abe1aa999af7b45e28958a7dcdd8fcc0daa310dd
[ "Apache-2.0" ]
null
null
null
letsencrypt/constants.py
diafygi/letsencrypt
abe1aa999af7b45e28958a7dcdd8fcc0daa310dd
[ "Apache-2.0" ]
null
null
null
"""Let's Encrypt constants.""" import logging from acme import challenges SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins" """Setuptools entry point group name for plugins.""" CLI_DEFAULTS = dict( config_files=["/etc/letsencrypt/cli.ini"], verbose_count=-(logging.WARNING / 10), server="https://www...
27.278351
73
0.728269
import logging from acme import challenges SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins" CLI_DEFAULTS = dict( config_files=["/etc/letsencrypt/cli.ini"], verbose_count=-(logging.WARNING / 10), server="https://www.letsencrypt-demo.org/acme/new-reg", rsa_key_size=2048, rollback_checkpoints...
true
true
1c32804e4b4371c9580b161cc812f77631eeb2ff
105
py
Python
gunicorn.conf.py
Moustikitos/ark-zen
f02ec0c5565634aaf154c46173572402bf414817
[ "MIT" ]
3
2018-12-24T09:45:05.000Z
2020-04-23T09:00:00.000Z
gunicorn.conf.py
Moustikitos/zen
bd11216cd2c891804d6ec4444f9321137b0f54e4
[ "MIT" ]
6
2018-05-13T13:12:17.000Z
2018-05-28T19:36:16.000Z
gunicorn.conf.py
Moustikitos/zen
bd11216cd2c891804d6ec4444f9321137b0f54e4
[ "MIT" ]
1
2018-04-07T12:03:43.000Z
2018-04-07T12:03:43.000Z
# -*- coding:utf-8 -*- def post_worker_init(worker): pass def on_exit(server): pass
10.5
30
0.561905
def post_worker_init(worker): pass def on_exit(server): pass
true
true
1c328154f063336c316c04e0f4be1661f6341130
895
py
Python
part3/webapp/starter/pypi_web_mongodb_s/pypi_web_mongodb/data/mongo_setup.py
israelrico007/build-pypi-mongodb-webcast-series
b5960e2619ba4527e27cdb8e6efd7de2bb6c7448
[ "MIT" ]
25
2018-05-30T18:03:35.000Z
2021-11-27T19:03:16.000Z
part3/webapp/starter/pypi_web_mongodb_s/pypi_web_mongodb/data/mongo_setup.py
israelrico007/build-pypi-mongodb-webcast-series
b5960e2619ba4527e27cdb8e6efd7de2bb6c7448
[ "MIT" ]
3
2018-10-18T11:08:32.000Z
2019-12-26T16:42:26.000Z
part3/webapp/starter/pypi_web_mongodb_s/pypi_web_mongodb/data/mongo_setup.py
israelrico007/build-pypi-mongodb-webcast-series
b5960e2619ba4527e27cdb8e6efd7de2bb6c7448
[ "MIT" ]
10
2018-05-30T18:03:49.000Z
2021-11-27T19:03:19.000Z
import ssl import mongoengine def global_init(user=None, password=None, port=27017, server='localhost', use_ssl=True, db_name='pypi_demo'): if user or password: if server != 'localhost' and not server.startswith('mongodb+srv://'): server = 'mongodb+srv://' + server data = dict( ...
34.423077
109
0.597765
import ssl import mongoengine def global_init(user=None, password=None, port=27017, server='localhost', use_ssl=True, db_name='pypi_demo'): if user or password: if server != 'localhost' and not server.startswith('mongodb+srv://'): server = 'mongodb+srv://' + server data = dict( ...
true
true
1c328257d3f7cf8f22ac061f8036f5d6e4c832fc
7,694
py
Python
is452/routes/insurance_offchain.py
is452-griffininsurance/backend-service
f6d97bad153e7ba705f727e00f18cb027a4c3d3b
[ "MIT" ]
null
null
null
is452/routes/insurance_offchain.py
is452-griffininsurance/backend-service
f6d97bad153e7ba705f727e00f18cb027a4c3d3b
[ "MIT" ]
null
null
null
is452/routes/insurance_offchain.py
is452-griffininsurance/backend-service
f6d97bad153e7ba705f727e00f18cb027a4c3d3b
[ "MIT" ]
null
null
null
from flask import request, jsonify from is452 import app from bson.objectid import ObjectId from pymongo import MongoClient from datetime import datetime import json client = MongoClient("mongodb+srv://is452_admin:mianbaochaoren@is452-project.n0htb.mongodb.net/insurance?retryWrites=true&w=majority") collection = cli...
34.044248
134
0.609566
from flask import request, jsonify from is452 import app from bson.objectid import ObjectId from pymongo import MongoClient from datetime import datetime import json client = MongoClient("mongodb+srv://is452_admin:mianbaochaoren@is452-project.n0htb.mongodb.net/insurance?retryWrites=true&w=majority") collection = cli...
true
true
1c32835832835b2d2505fe59b4541b16a736ed38
6,571
py
Python
scripts/position_data.py
jtmccr1/variant_pipeline
7376550d8bb90673914845b53b354f87bfd28d5c
[ "Apache-2.0" ]
11
2018-03-29T06:17:50.000Z
2021-12-16T07:04:57.000Z
scripts/position_data.py
jtmccr1/variant_pipeline
7376550d8bb90673914845b53b354f87bfd28d5c
[ "Apache-2.0" ]
7
2018-01-05T17:53:14.000Z
2019-05-09T17:46:18.000Z
scripts/position_data.py
lauringlab/variant_pipeline
b4a26398a5707814884cbf80a2e22032476e6479
[ "Apache-2.0" ]
15
2017-02-07T21:41:33.000Z
2021-03-19T07:59:31.000Z
from __future__ import division import pysam import numpy as np import yaml from Bio import SeqIO from Bio.Seq import Seq from Bio.Alphabet import generic_dna #from scripts.seq_classes import locus, segment, tally, allele # %% from seq_classes import locus, segment, tally, allele #from scripts.trim_to_regions import ...
38.881657
129
0.569015
from __future__ import division import pysam import numpy as np import yaml from Bio import SeqIO from Bio.Seq import Seq from Bio.Alphabet import generic_dna from seq_classes import locus, segment, tally, allele from trim_to_regions import ReadFASTA import argparse import os import json def main(): parser = arg...
true
true
1c3283d088da48484e2b2afc072a46a997b2b035
327
py
Python
braponto-back/core/migrations/0002_auto_20210223_2124.py
TheRodrigoBraga/Braponto
8367e5e8fdb1dde192c8068b93c4014d77165785
[ "MIT" ]
null
null
null
braponto-back/core/migrations/0002_auto_20210223_2124.py
TheRodrigoBraga/Braponto
8367e5e8fdb1dde192c8068b93c4014d77165785
[ "MIT" ]
2
2021-02-21T13:39:59.000Z
2021-02-23T01:52:00.000Z
braponto-back/core/migrations/0002_auto_20210223_2124.py
TheRodrigoBraga/braponto
8367e5e8fdb1dde192c8068b93c4014d77165785
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-02-24 00:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RenameModel( old_name='Funcionarios', new_name='Funcionario', ),...
18.166667
47
0.590214
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.RenameModel( old_name='Funcionarios', new_name='Funcionario', ), ]
true
true
1c3284f669f39734ab38e65c80681e81e655f75f
32,613
py
Python
discovery-infra/tests/base_test.py
rollandf/assisted-test-infra
f2d3411ceb0838f3045e4ad88f2686bed516cf8f
[ "Apache-2.0" ]
null
null
null
discovery-infra/tests/base_test.py
rollandf/assisted-test-infra
f2d3411ceb0838f3045e4ad88f2686bed516cf8f
[ "Apache-2.0" ]
164
2020-11-02T07:02:58.000Z
2022-03-28T16:03:34.000Z
discovery-infra/tests/base_test.py
rollandf/assisted-test-infra
f2d3411ceb0838f3045e4ad88f2686bed516cf8f
[ "Apache-2.0" ]
null
null
null
import json import logging import os import shutil from contextlib import suppress from pathlib import Path from typing import Callable, List, Optional, Tuple import libvirt from kubernetes.client.exceptions import ApiException as K8sApiException import pytest import test_infra.utils as infra_utils import waiting from...
44.071622
130
0.658296
import json import logging import os import shutil from contextlib import suppress from pathlib import Path from typing import Callable, List, Optional, Tuple import libvirt from kubernetes.client.exceptions import ApiException as K8sApiException import pytest import test_infra.utils as infra_utils import waiting from...
true
true
1c32855ce040c09944098b703eb82adf950f3828
43
py
Python
config.py
cbroms/project-archive
8e7b59b73de2cc3d59f2e302968f6706d2b25e72
[ "Apache-2.0" ]
null
null
null
config.py
cbroms/project-archive
8e7b59b73de2cc3d59f2e302968f6706d2b25e72
[ "Apache-2.0" ]
1
2021-06-28T20:34:30.000Z
2021-06-28T20:34:30.000Z
config.py
cbroms/project-archive
8e7b59b73de2cc3d59f2e302968f6706d2b25e72
[ "Apache-2.0" ]
null
null
null
PATH_TO_STATIC_FILES = "static/static/"
8.6
39
0.744186
PATH_TO_STATIC_FILES = "static/static/"
true
true
1c328629c4074fde72880bb57b9d5bba66ca7c6a
3,437
py
Python
pytorch/diora/net/outside_index.py
willzhang100/diora
d7d80389eeb3294398d125e451e4158ea0b40eb5
[ "Apache-2.0" ]
81
2019-03-31T20:16:01.000Z
2022-02-25T15:39:35.000Z
pytorch/diora/net/outside_index.py
ldzhangyx/diora-for-music-structure
40b3533e0a181c23cb3d17a65fca528c72813cfb
[ "Apache-2.0" ]
7
2019-04-24T02:33:00.000Z
2022-01-08T20:49:34.000Z
pytorch/diora/net/outside_index.py
ldzhangyx/diora-for-music-structure
40b3533e0a181c23cb3d17a65fca528c72813cfb
[ "Apache-2.0" ]
21
2019-04-07T12:37:38.000Z
2022-03-01T09:18:24.000Z
import torch from diora.net.offset_cache import get_offset_cache class OutsideIndex(object): def get_pairs(self, level, i, n): """ Returns all (parent, sibling) coordinate pairs that are used to construct a node at coordinates (level, i) where there n leaf nodes. """ ...
26.643411
69
0.495781
import torch from diora.net.offset_cache import get_offset_cache class OutsideIndex(object): def get_pairs(self, level, i, n): pairs = [] for level_ in range(level + 1, i + 1): p_level = level_ p_i = i s_level = level_ - level - 1 s_i = i - level - ...
true
true
1c3286a6e08dc9dab868e091995ae78493c7e703
11,873
py
Python
src/backend/api/handlers/team.py
bovlb/the-blue-alliance
29389649d96fe060688f218d463e642dcebfd6cc
[ "MIT" ]
null
null
null
src/backend/api/handlers/team.py
bovlb/the-blue-alliance
29389649d96fe060688f218d463e642dcebfd6cc
[ "MIT" ]
null
null
null
src/backend/api/handlers/team.py
bovlb/the-blue-alliance
29389649d96fe060688f218d463e642dcebfd6cc
[ "MIT" ]
null
null
null
from typing import Optional from flask import Response from backend.api.handlers.decorators import ( api_authenticated, validate_keys, ) from backend.api.handlers.helpers.model_properties import ( filter_event_properties, filter_match_properties, filter_team_properties, ModelType, ) from backe...
30.44359
106
0.712541
from typing import Optional from flask import Response from backend.api.handlers.decorators import ( api_authenticated, validate_keys, ) from backend.api.handlers.helpers.model_properties import ( filter_event_properties, filter_match_properties, filter_team_properties, ModelType, ) from backe...
true
true
1c3287c229049cb1b42b466f18808e837cb06b36
41,354
py
Python
tensorflow/python/distribute/collective_all_reduce_strategy.py
Geolem/tensorflow
cfc9d3e1ba3b50dc66f1b81eaea537772ab16024
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/collective_all_reduce_strategy.py
Geolem/tensorflow
cfc9d3e1ba3b50dc66f1b81eaea537772ab16024
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/collective_all_reduce_strategy.py
Geolem/tensorflow
cfc9d3e1ba3b50dc66f1b81eaea537772ab16024
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.241062
134
0.714683
import copy import threading import time import weakref from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.core.protobuf import tensorflow_server_pb2 from tensorflow.python.distribute import collective_util from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib from te...
true
true
1c32884b97603e9760e7db39e37fe69b40866493
5,702
py
Python
alipay/aop/api/domain/InterTradeCompanyConsultOpenApiResult.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/InterTradeCompanyConsultOpenApiResult.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/InterTradeCompanyConsultOpenApiResult.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 InterTradeCompanyConsultOpenApiResult(object): def __init__(self): self._belong_group = None self._cid_list = None self._mid_list = None self._name = None ...
32.033708
75
0.542967
import json from alipay.aop.api.constant.ParamConstants import * class InterTradeCompanyConsultOpenApiResult(object): def __init__(self): self._belong_group = None self._cid_list = None self._mid_list = None self._name = None self._ou = None self._pid_list = None ...
true
true
1c3289843eccdfc2f96541b9080888251b654cde
500
py
Python
arithmetic_op04.py
Mr-Umidjon/Arithmetic_operators
572027880d929134f1aa58477f4bde00a910454c
[ "MIT" ]
null
null
null
arithmetic_op04.py
Mr-Umidjon/Arithmetic_operators
572027880d929134f1aa58477f4bde00a910454c
[ "MIT" ]
null
null
null
arithmetic_op04.py
Mr-Umidjon/Arithmetic_operators
572027880d929134f1aa58477f4bde00a910454c
[ "MIT" ]
null
null
null
# number nomli uch honali butun sonli o’zgaruvchi yarating. # number o’zgaruvchining birinchi raqamini toping va x1 ga taminlang. # number o’zgaruvchining ikkinchi raqamini toping va x2 ga taminlang. # number o’zgaruvchining uchunchi raqamini toping va x3 ga taminlang. # Ularning yig’indisini answer nomli o’zgaruchiga ...
23.809524
71
0.742
number = 184 x1 = 184 % 10 number //= 10 x2 = number % 10 number //= 10 x3 = number % 10 number //= 10 answer = x1 + x2 + x3 print(answer)
true
true
1c328a667887edc617702bd49f36f391c052d1d2
14,439
py
Python
examples/maze_runner/maze_runner.py
noahhefner/nhefner_pygame_menus
f03d0d0b78d4513d81e80aec08bd7479ff6c62bf
[ "MIT" ]
null
null
null
examples/maze_runner/maze_runner.py
noahhefner/nhefner_pygame_menus
f03d0d0b78d4513d81e80aec08bd7479ff6c62bf
[ "MIT" ]
null
null
null
examples/maze_runner/maze_runner.py
noahhefner/nhefner_pygame_menus
f03d0d0b78d4513d81e80aec08bd7479ff6c62bf
[ "MIT" ]
null
null
null
""" This script shows how to implement a menu system with nhefner_pygame_menus. The general structure should be laid out as follows: imports classes def main: game setup stuff here (create players, setup world, etc.) menu manager stuff here (create manager, buttons, pages, etc.) while true: m...
33.193103
109
0.557172
import pygame import os from nhefner_pygame_menus import * BLACK = (0, 0, 0) WHITE = (255, 255, 255) BLUE = (0, 0, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) PURPLE = (255, 0, 255) class Wall(pygame.sprite.Sprite): def __init__(self, x, y, width, height, color): super().__init__() # Ma...
true
true
1c328ae56d56346203a6d125a5f42ea0b98fd624
2,135
py
Python
geoviews/__init__.py
jonmmease/geoviews
ef1424426b82d1674110f2e559ec1a6bcc129326
[ "BSD-3-Clause" ]
null
null
null
geoviews/__init__.py
jonmmease/geoviews
ef1424426b82d1674110f2e559ec1a6bcc129326
[ "BSD-3-Clause" ]
null
null
null
geoviews/__init__.py
jonmmease/geoviews
ef1424426b82d1674110f2e559ec1a6bcc129326
[ "BSD-3-Clause" ]
null
null
null
import param from holoviews import (extension, help, opts, output, renderer, Store, # noqa (API import) Cycle, Palette, Overlay, Layout, NdOverlay, NdLayout, HoloMap, DynamicMap, GridSpace, Dimension, dim) try: # Only available in HoloViews >=1.11 from holoviews i...
46.413043
116
0.626698
import param from holoviews import (extension, help, opts, output, renderer, Store, Cycle, Palette, Overlay, Layout, NdOverlay, NdLayout, HoloMap, DynamicMap, GridSpace, Dimension, dim) try: from holoviews import render, save except: pass from .element import...
true
true
1c328b2e4ae065c1082e8fbbd863543fca6786a7
524
py
Python
phrydy/__init__.py
Josef-Friedrich/phrydy
d89acb06564a387b6e4286b65c00aae61a6316ed
[ "MIT" ]
6
2018-10-05T18:20:18.000Z
2021-12-14T06:38:46.000Z
phrydy/__init__.py
Josef-Friedrich/phrydy
d89acb06564a387b6e4286b65c00aae61a6316ed
[ "MIT" ]
null
null
null
phrydy/__init__.py
Josef-Friedrich/phrydy
d89acb06564a387b6e4286b65c00aae61a6316ed
[ "MIT" ]
null
null
null
from . import field_docs # noqa: F401 from . import doc_generator # noqa: F401 from . import mediafile_extended # noqa: F401 from ._version import get_versions from .mediafile_extended import \ MediaFile, \ MediaFileExtended # noqa: F401 from .field_docs import \ fields, \ FieldDocCollection # n...
22.782609
46
0.721374
from . import field_docs from . import doc_generator from . import mediafile_extended from ._version import get_versions from .mediafile_extended import \ MediaFile, \ MediaFileExtended from .field_docs import \ fields, \ FieldDocCollection from .doc_generator import \ get_max_field_length,...
true
true
1c328ba4a136a085fa44642c7e34ce0bed1de999
53,828
py
Python
data/transcoder_evaluation_gfg/python/MOBILE_NUMERIC_KEYPAD_PROBLEM.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
241
2021-07-20T08:35:20.000Z
2022-03-31T02:39:08.000Z
data/transcoder_evaluation_gfg/python/MOBILE_NUMERIC_KEYPAD_PROBLEM.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
49
2021-07-22T23:18:42.000Z
2022-03-24T09:15:26.000Z
data/transcoder_evaluation_gfg/python/MOBILE_NUMERIC_KEYPAD_PROBLEM.py
mxl1n/CodeGen
e5101dd5c5e9c3720c70c80f78b18f13e118335a
[ "MIT" ]
71
2021-07-21T05:17:52.000Z
2022-03-29T23:49:28.000Z
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( keypad , n ) : if ( not keypad or n <= 0 ) : return 0 if ( n == 1 ) : return 10 odd = [...
737.369863
10,683
0.204447
def f_gold ( keypad , n ) : if ( not keypad or n <= 0 ) : return 0 if ( n == 1 ) : return 10 odd = [ 0 ] * 10 even = [ 0 ] * 10 i = 0 j = 0 useOdd = 0 totalCount = 0 for i in range ( 10 ) : odd [ i ] = 1 for j in range ( 2 , n + 1 ) : useOdd = 1 - ...
true
true
1c328c47f90c2c8cccd9d610252edcd92f1f5310
837
py
Python
exercise/class_game1.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
exercise/class_game1.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
exercise/class_game1.py
LeeBeral/python
9f0d360d69ee5245e3ef13a9dc9fc666374587a4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import random def enemy(ancestry,gear): enemy=ancestry weapon=gear hp=random.randrange(0,20) ac=random.randrange(0,20) return [enemy,weapon,hp,ac] def fight(tgt): print("You take a swing at the " + tgt[0] + ".") hit=random.randrange(0,20) if hit > tgt[3]...
31
73
0.545998
import random def enemy(ancestry,gear): enemy=ancestry weapon=gear hp=random.randrange(0,20) ac=random.randrange(0,20) return [enemy,weapon,hp,ac] def fight(tgt): print("You take a swing at the " + tgt[0] + ".") hit=random.randrange(0,20) if hit > tgt[3]: print("You hi...
true
true
1c328ca537430d8d2940418bb3fd2f878a054306
239
py
Python
Exercicios/007-media-aritmetica.py
fernandaveiga/Curso-em-Video
ea8956fce6e16cbaa8a83106ffa45071cbdc617e
[ "MIT" ]
null
null
null
Exercicios/007-media-aritmetica.py
fernandaveiga/Curso-em-Video
ea8956fce6e16cbaa8a83106ffa45071cbdc617e
[ "MIT" ]
null
null
null
Exercicios/007-media-aritmetica.py
fernandaveiga/Curso-em-Video
ea8956fce6e16cbaa8a83106ffa45071cbdc617e
[ "MIT" ]
null
null
null
# 007 - Desenvolva um programa que leia as duas notas de um aluno e calcule e mostre a sua média: n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda nota: ')) print(f'A médias entre as notas é: {(n1+n2)/2}')
39.833333
97
0.694561
n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda nota: ')) print(f'A médias entre as notas é: {(n1+n2)/2}')
true
true
1c328d7d9526bcf4dbafb0a6f872081e9e52f7ef
1,296
py
Python
Labs/1/NamingShape.py
ArvinZJC/UofG_PGT_PSD_Python
d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4
[ "MIT" ]
null
null
null
Labs/1/NamingShape.py
ArvinZJC/UofG_PGT_PSD_Python
d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4
[ "MIT" ]
null
null
null
Labs/1/NamingShape.py
ArvinZJC/UofG_PGT_PSD_Python
d90e9bb0b53b14c6b1d7e657c3c61e2792e0d9c4
[ "MIT" ]
null
null
null
''' Description: exercise: naming the shape Version: 1.0.0.20210113 Author: Arvin Zhao Date: 2021-01-13 11:04:45 Last Editors: Arvin Zhao LastEditTime: 2021-01-13 11:26:54 ''' def name_shape(slide_num: str, out_of_range_error_msg: str) -> str: ''' Name a shape according to the number of sldies. Parameters...
28.173913
153
0.631944
def name_shape(slide_num: str, out_of_range_error_msg: str) -> str: shape_namer = { '3': 'Triangle', '4': 'Square', '5': 'Pentagon', '6': 'Hexagon', '7': 'Heptagon', '8': 'Octagon', '9': 'Enneagon', '10': 'Decagon' } return shape_namer.get(sl...
true
true
1c328d929a7b5fe0490e67103b0ee806499ee37d
8,945
py
Python
module/dun_datasets/additional_gap_loader.py
a07458666/UncertaintyFlow
cef2512901d4e27bb22fc3997522cd47c03b569c
[ "MIT" ]
null
null
null
module/dun_datasets/additional_gap_loader.py
a07458666/UncertaintyFlow
cef2512901d4e27bb22fc3997522cd47c03b569c
[ "MIT" ]
null
null
null
module/dun_datasets/additional_gap_loader.py
a07458666/UncertaintyFlow
cef2512901d4e27bb22fc3997522cd47c03b569c
[ "MIT" ]
null
null
null
import zipfile import pickle try: import urllib from urllib import urlretrieve except Exception: import urllib.request as urllib from os import path import numpy as np from numpy.random import uniform, randn import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split ...
35.496032
136
0.583007
import zipfile import pickle try: import urllib from urllib import urlretrieve except Exception: import urllib.request as urllib from os import path import numpy as np from numpy.random import uniform, randn import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split ...
true
true
1c328e4b13a641103c83fd1310687f1abef1d462
1,355
py
Python
image/scripts/blank_image.py
Magnitus-/hypriot-kit
07941b56411b1f9e7d45a457a3026456ecfc2652
[ "MIT" ]
1
2018-04-01T21:37:58.000Z
2018-04-01T21:37:58.000Z
image/scripts/blank_image.py
Magnitus-/hypriot-kit
07941b56411b1f9e7d45a457a3026456ecfc2652
[ "MIT" ]
null
null
null
image/scripts/blank_image.py
Magnitus-/hypriot-kit
07941b56411b1f9e7d45a457a3026456ecfc2652
[ "MIT" ]
null
null
null
import glob, os import container from builder import BuilderBase class BlankImage(BuilderBase): repo = 'blank_image' artifact_pattern = "{device}-raw.img.zip" artifact_checksum_pattern = "{device}-raw.img.zip.sha256" def get_description(self): return "Blank SD Image" def __init__(self,...
27.1
61
0.542435
import glob, os import container from builder import BuilderBase class BlankImage(BuilderBase): repo = 'blank_image' artifact_pattern = "{device}-raw.img.zip" artifact_checksum_pattern = "{device}-raw.img.zip.sha256" def get_description(self): return "Blank SD Image" def __init__(self,...
true
true
1c3290b6604a75c73e6c6d0c7728010b0721e2f7
13,121
py
Python
src/azure-cli/azure/cli/command_modules/storage/tests/hybrid_2019_03_01/test_storage_validators.py
digimaun/azure-cli
298994660f0fde6863cb45a7c3142141ed10f923
[ "MIT" ]
2
2020-08-08T11:00:25.000Z
2020-08-08T11:00:30.000Z
src/azure-cli/azure/cli/command_modules/storage/tests/hybrid_2019_03_01/test_storage_validators.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
1
2021-06-02T02:49:48.000Z
2021-06-02T02:49:48.000Z
src/azure-cli/azure/cli/command_modules/storage/tests/hybrid_2019_03_01/test_storage_validators.py
cindywu/azure-cli
bd011cb91ac6e0ac89f53e1105d76ea30b6609a0
[ "MIT" ]
1
2020-09-07T18:44:14.000Z
2020-09-07T18:44:14.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
46.200704
119
0.667099
import unittest import mock from argparse import Namespace from six import StringIO from knack import CLI from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX from azure.cli.core.cloud import get_active_cloud from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version from azure...
true
true
1c3290d3998f3b680588dcc2763f11f9ba21bd86
208
py
Python
bitmovin/resources/enums/encoder_version.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
44
2016-12-12T17:37:23.000Z
2021-03-03T09:48:48.000Z
bitmovin/resources/enums/encoder_version.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
38
2017-01-09T14:45:45.000Z
2022-02-27T18:04:33.000Z
bitmovin/resources/enums/encoder_version.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
27
2017-02-02T22:49:31.000Z
2019-11-21T07:04:57.000Z
import enum class EncoderVersion(enum.Enum): STABLE = 'STABLE' BETA = 'BETA' V0_16_0 = '0.16.0' V0_17_0 = '0.17.0' @staticmethod def default(): return EncoderVersion.STABLE
16
36
0.610577
import enum class EncoderVersion(enum.Enum): STABLE = 'STABLE' BETA = 'BETA' V0_16_0 = '0.16.0' V0_17_0 = '0.17.0' @staticmethod def default(): return EncoderVersion.STABLE
true
true
1c3290d9b25c6a6853fbf30b5d5f09b7eec27ff6
34,256
py
Python
test/test_utils.py
zoogaezee/youtubeDL
01de1a9d506ff51bff4100e11275557226fa8b9a
[ "Unlicense" ]
null
null
null
test/test_utils.py
zoogaezee/youtubeDL
01de1a9d506ff51bff4100e11275557226fa8b9a
[ "Unlicense" ]
null
null
null
test/test_utils.py
zoogaezee/youtubeDL
01de1a9d506ff51bff4100e11275557226fa8b9a
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import json import xml.etree.ElementTree from youtube_dl.u...
44.43061
157
0.607368
from __future__ import unicode_literals import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import io import json import xml.etree.ElementTree from youtube_dl.utils import ( age_restricted, args_to_str, clean_html, DateRange, dete...
true
true
1c32910732157fc016e141a31d5d08ae39abdfc7
3,797
py
Python
test/unit/test_callback.py
talkhouli/sockeye
ef5fed26cda3151883efe446878f4d7f65b5852d
[ "Apache-2.0" ]
1
2019-11-14T14:31:07.000Z
2019-11-14T14:31:07.000Z
test/unit/test_callback.py
talkhouli/sockeye
ef5fed26cda3151883efe446878f4d7f65b5852d
[ "Apache-2.0" ]
null
null
null
test/unit/test_callback.py
talkhouli/sockeye
ef5fed26cda3151883efe446878f4d7f65b5852d
[ "Apache-2.0" ]
1
2019-11-05T14:42:05.000Z
2019-11-05T14:42:05.000Z
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
44.151163
118
0.631551
import os import tempfile import numpy as np import pytest from sockeye import callback from sockeye import constants as C from sockeye import utils test_constants = [('perplexity', np.inf, [{'perplexity': 100.0, '_': 42}, {'perplexity': 50.0}, {'perplexity': 60.0}, {'perplexity': 80.0}], ...
true
true
1c32915066bc8754e129df0f97a3b2fc00012555
6,574
py
Python
_setuputils.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
_setuputils.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
_setuputils.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ gevent build utilities. """ from __future__ import print_function, absolute_import, division import re import os import os.path import sys from subprocess import check_call from glob import glob from setuptools import Extension as _Extension from setuptools.command.build_ext import build_...
29.479821
135
0.634773
from __future__ import print_function, absolute_import, division import re import os import os.path import sys from subprocess import check_call from glob import glob from setuptools import Extension as _Extension from setuptools.command.build_ext import build_ext PYPY = hasattr(sys, 'pypy_version_info') WIN = sy...
true
true
1c32921f448fde06c33182baa152d1c193fd83fc
819
py
Python
Problems/seven_sided_die.py
rohanaurora/daily-coding-challenges
a40340e5a4f15a5f7b66a64f98dc149a66ebd945
[ "MIT" ]
null
null
null
Problems/seven_sided_die.py
rohanaurora/daily-coding-challenges
a40340e5a4f15a5f7b66a64f98dc149a66ebd945
[ "MIT" ]
null
null
null
Problems/seven_sided_die.py
rohanaurora/daily-coding-challenges
a40340e5a4f15a5f7b66a64f98dc149a66ebd945
[ "MIT" ]
null
null
null
# Seven-sided dice from five-sided dice # # Given an equal-probability generator of one of the integers 1 to 5 as dice5, create dice7 that generates a # pseudo-random integer from 1 to 7 in equal probability using only dice5 as a source of random numbers, # and check the distribution for at least one million calls usin...
32.76
110
0.716728
from random import randint def dice5(): return randint(1, 5) def dice7(): r = dice5() + dice5() * 5 - 6 if r < 21: return (r % 7) + 1 else: return dice7() s = dice7() print(s)
true
true
1c329252ff1f3f27a711b8961b57e678169c29da
2,720
py
Python
grism_analysis_main.py
WWGolay/grism-gui
1c689b622724c1bd6afc73d40d197366e86d7bb2
[ "MIT" ]
null
null
null
grism_analysis_main.py
WWGolay/grism-gui
1c689b622724c1bd6afc73d40d197366e86d7bb2
[ "MIT" ]
null
null
null
grism_analysis_main.py
WWGolay/grism-gui
1c689b622724c1bd6afc73d40d197366e86d7bb2
[ "MIT" ]
null
null
null
''' grism_analysis_main Last Updated 5/2/22 University Of Iowa Astronomy Department AJ Serck Will Golay ''' # Python imports from datetime import date, timedelta, datetime import astropy.io.fits as pyfits import os # Custom libraries from bin.grism_analysis_web import grism_web from bin.grism_tools_lib import grism_...
39.42029
136
0.640441
from datetime import date, timedelta, datetime import astropy.io.fits as pyfits import os from bin.grism_analysis_web import grism_web from bin.grism_tools_lib import grism_tools from config import setup_config def main(): cfg = setup_config.read('grism-gui.cfg') default_temp_dir = cfg.get('default', 'defaul...
true
true
1c3292b7fa0d90db80e2778bb80e56558ce08540
2,035
py
Python
frappe/commands/redis_utils.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
frappe/commands/redis_utils.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
frappe/commands/redis_utils.py
oryxsolutions/frappe
d193ea22d17ca40d57432040a8afad72287d9e23
[ "MIT" ]
null
null
null
import os import click import frappe from frappe.installer import update_site_config from frappe.utils.redis_queue import RedisQueue @click.command("create-rq-users") @click.option( "--set-admin-password", is_flag=True, default=False, help="Set new Redis admin(default user) password", ) @click.option( "--use-r...
27.5
93
0.747912
import os import click import frappe from frappe.installer import update_site_config from frappe.utils.redis_queue import RedisQueue @click.command("create-rq-users") @click.option( "--set-admin-password", is_flag=True, default=False, help="Set new Redis admin(default user) password", ) @click.option( "--use-r...
true
true
1c3294341dafd442f43d58b91e40f15dec483b03
167
py
Python
neuro_helper/abstract/__init__.py
mehrshadg/neuro-data-helper
7a17ae7e4cca1a5652c9c0182c209b084073cf1f
[ "MIT" ]
null
null
null
neuro_helper/abstract/__init__.py
mehrshadg/neuro-data-helper
7a17ae7e4cca1a5652c9c0182c209b084073cf1f
[ "MIT" ]
null
null
null
neuro_helper/abstract/__init__.py
mehrshadg/neuro-data-helper
7a17ae7e4cca1a5652c9c0182c209b084073cf1f
[ "MIT" ]
null
null
null
from .map import * __all__ = ["Space", "TopoName", "TemplateName", "HierarchyName", "TemplateData", "AbstractMap", "TemplateMap", "TopoMap", "file_names"]
33.4
80
0.652695
from .map import * __all__ = ["Space", "TopoName", "TemplateName", "HierarchyName", "TemplateData", "AbstractMap", "TemplateMap", "TopoMap", "file_names"]
true
true
1c3294680cf5595fc4436eeac807d9840ea677b4
3,448
py
Python
python/smqtk/bin/minibatch_kmeans_clusters.py
jbeezley/SMQTK
e6b00f94be95f39bbca52a7983ac3d6d1f86f847
[ "BSD-3-Clause" ]
1
2021-04-10T10:51:26.000Z
2021-04-10T10:51:26.000Z
python/smqtk/bin/minibatch_kmeans_clusters.py
jbeezley/SMQTK
e6b00f94be95f39bbca52a7983ac3d6d1f86f847
[ "BSD-3-Clause" ]
3
2021-06-08T22:19:14.000Z
2022-03-12T00:46:44.000Z
python/smqtk/bin/minibatch_kmeans_clusters.py
DigitalCompanion/SMQTK
fc9404b69150ef44f24423844bc80735c0c2b669
[ "BSD-3-Clause" ]
null
null
null
""" Script for generating clusters from descriptors in a given index using the mini-batch KMeans implementation from Scikit-learn (http://scikit-learn.org/stable/modules/generated/sklearn.cluster.MiniBatchKMeans.html). By the nature of Scikit-learn's MiniBatchKMeans implementation, euclidean distance is used to measur...
35.546392
88
0.710847
import logging import os import numpy from six.moves import cPickle from sklearn.cluster import MiniBatchKMeans from smqtk.compute_functions import mb_kmeans_build_apply from smqtk.representation.descriptor_index import get_descriptor_index_impls from smqtk.utils import Configurable from smqtk.utils.bin_utils import ...
true
true
1c3294df2c05ca1b567ad8b831cd7b9923bea59b
5,032
py
Python
venv/lib/python3.7/site-packages/rinoh/font/opentype/gsub.py
rodrez/jobpy
02da7ed62a5f057ce66f7b3c0a5f13223363af9a
[ "MIT" ]
3
2020-05-16T01:54:47.000Z
2021-04-27T01:37:08.000Z
venv/lib/python3.7/site-packages/rinoh/font/opentype/gsub.py
rodrez/jobpy
02da7ed62a5f057ce66f7b3c0a5f13223363af9a
[ "MIT" ]
7
2020-05-11T01:45:45.000Z
2022-03-02T14:58:30.000Z
venv/lib/python3.7/site-packages/rinoh/font/opentype/gsub.py
rodrez/jobpy
02da7ed62a5f057ce66f7b3c0a5f13223363af9a
[ "MIT" ]
1
2020-07-19T04:31:01.000Z
2020-07-19T04:31:01.000Z
# This file is part of rinohtype, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/. from .parse import OpenTypeTable, MultiFormatTable from ...
34.703448
80
0.61566
from .parse import OpenTypeTable, MultiFormatTable from .parse import uint16, ushort, ulong, glyph_id, array, indirect from .parse import context_array, indirect_array from .layout import LayoutTable from .layout import Coverage class SingleSubTable(MultiFormatTable): entries = [('SubstFormat', uint16), ...
true
true
1c32955b469aa7291af353410301fd056959674e
37,823
py
Python
tests/commands/train_test.py
OhadRubin/allennlp
7e61241d2720050d0f39376eebba713acd0b287b
[ "Apache-2.0" ]
null
null
null
tests/commands/train_test.py
OhadRubin/allennlp
7e61241d2720050d0f39376eebba713acd0b287b
[ "Apache-2.0" ]
35
2021-08-11T13:20:30.000Z
2022-03-29T13:17:39.000Z
tests/commands/train_test.py
OhadRubin/allennlp
7e61241d2720050d0f39376eebba713acd0b287b
[ "Apache-2.0" ]
null
null
null
import argparse import copy import json import logging import math import os import re import shutil from collections import OrderedDict, Counter from typing import Optional, List, Dict, Any import pytest import torch from allennlp.commands.train import Train, train_model, train_model_from_args, TrainModel from alle...
40.626208
107
0.584829
import argparse import copy import json import logging import math import os import re import shutil from collections import OrderedDict, Counter from typing import Optional, List, Dict, Any import pytest import torch from allennlp.commands.train import Train, train_model, train_model_from_args, TrainModel from alle...
true
true
1c32983c9fd1009fd780c6074a40829ed2e5320b
10,682
py
Python
SpiderKeeper/app/spider/model.py
huichen90/SpiderKeeper
9b9fdb56c87da7734b9dce2e63adc0e97c201c57
[ "MIT" ]
null
null
null
SpiderKeeper/app/spider/model.py
huichen90/SpiderKeeper
9b9fdb56c87da7734b9dce2e63adc0e97c201c57
[ "MIT" ]
null
null
null
SpiderKeeper/app/spider/model.py
huichen90/SpiderKeeper
9b9fdb56c87da7734b9dce2e63adc0e97c201c57
[ "MIT" ]
null
null
null
import datetime from sqlalchemy import desc from SpiderKeeper.app import db, Base class Project(Base): __tablename__ = 'sk_project' '''创建的工程表''' project_name = db.Column(db.String(50)) @classmethod def load_project(cls, project_list): # 添加工程 for project in project_list: exis...
42.899598
111
0.627691
import datetime from sqlalchemy import desc from SpiderKeeper.app import db, Base class Project(Base): __tablename__ = 'sk_project' project_name = db.Column(db.String(50)) @classmethod def load_project(cls, project_list): for project in project_list: existed_project = cls.query....
true
true
1c3298ce7a8f61c528dabe303770da0032e2cd4a
196
py
Python
bot/hooks/__init__.py
lungdart/discord_rpg_bot
dc574026965b972c6935cca0db2679e7be757939
[ "MIT" ]
1
2021-03-01T22:20:33.000Z
2021-03-01T22:20:33.000Z
bot/hooks/__init__.py
lungdart/discord_rpg_bot
dc574026965b972c6935cca0db2679e7be757939
[ "MIT" ]
17
2021-03-05T16:50:48.000Z
2021-03-18T17:49:47.000Z
bot/hooks/__init__.py
lungdart/discord_rpg_bot
dc574026965b972c6935cca0db2679e7be757939
[ "MIT" ]
null
null
null
from bot.hooks.admin import Admin from bot.hooks.battle import Battle from bot.hooks.manage_char import ManageCharacter from bot.hooks.activities import Activities from bot.hooks.shop import Shop
32.666667
49
0.846939
from bot.hooks.admin import Admin from bot.hooks.battle import Battle from bot.hooks.manage_char import ManageCharacter from bot.hooks.activities import Activities from bot.hooks.shop import Shop
true
true
1c329a5bd7c432f41175cac631c67f134572022d
938
py
Python
swiftwind/core/templatetags/swiftwind_utilities.py
m-den-i/swiftwind
3af9a1ec3327a992f1d3f2c11fefbb3c06cadbce
[ "MIT" ]
11
2016-12-13T00:46:48.000Z
2020-07-28T13:44:12.000Z
swiftwind/core/templatetags/swiftwind_utilities.py
m-den-i/swiftwind
3af9a1ec3327a992f1d3f2c11fefbb3c06cadbce
[ "MIT" ]
15
2017-11-29T19:38:32.000Z
2018-11-02T21:08:04.000Z
swiftwind/core/templatetags/swiftwind_utilities.py
m-den-i/swiftwind
3af9a1ec3327a992f1d3f2c11fefbb3c06cadbce
[ "MIT" ]
4
2018-10-23T12:39:04.000Z
2019-12-30T11:06:23.000Z
import six from django import template register = template.Library() @register.filter def partition(list_, columns=2): """ Break a list into ``columns`` number of columns. """ iter_ = iter(list_) columns = int(columns) rows = [] while True: row = [] for column_number in ...
20.844444
52
0.50533
import six from django import template register = template.Library() @register.filter def partition(list_, columns=2): iter_ = iter(list_) columns = int(columns) rows = [] while True: row = [] for column_number in range(1, columns + 1): try: value = six.n...
true
true
1c329a8a741053888ca17662e28135f888beecd4
648
py
Python
backend/app/alembic/versions/a9c131191819_add_notes_file.py
dmitritruf/distiller-django-react
ec4c3837194306e725d8a2437ace10a899a254d2
[ "BSD-3-Clause" ]
2
2021-11-04T16:27:33.000Z
2021-11-04T20:09:19.000Z
backend/app/alembic/versions/a9c131191819_add_notes_file.py
OpenChemistry/distiller
67da87672654555f9821590f42b108d70a55c1a6
[ "BSD-3-Clause" ]
70
2021-11-04T16:34:52.000Z
2022-03-30T02:52:17.000Z
backend/app/alembic/versions/a9c131191819_add_notes_file.py
dmitritruf/distiller-django-react
ec4c3837194306e725d8a2437ace10a899a254d2
[ "BSD-3-Clause" ]
null
null
null
"""Add notes file Revision ID: a9c131191819 Revises: 6c7e28cf38e9 Create Date: 2021-08-13 10:38:45.529535 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a9c131191819' down_revision = '6c7e28cf38e9' branch_labels = None depends_on = None def upgrade(): #...
22.344828
74
0.686728
from alembic import op import sqlalchemy as sa revision = 'a9c131191819' down_revision = '6c7e28cf38e9' branch_labels = None depends_on = None def upgrade(): op.add_column('scans', sa.Column('notes', sa.String(), nullable=True)) def downgrade(): op.drop_column('scans', 'notes')
true
true
1c329b19455a566b39ba5de47c0f2d1dcab07ece
28,779
py
Python
tests/wallet/simple_sync/test_simple_sync_protocol.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
tests/wallet/simple_sync/test_simple_sync_protocol.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
tests/wallet/simple_sync/test_simple_sync_protocol.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
# flake8: noqa: F811, F401 import asyncio from typing import List, Optional import pytest from clvm.casts import int_to_bytes from colorlog import logging from hddcoin.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward from hddcoin.protocols import wallet_protocol, full_node_protocol f...
45.536392
118
0.710136
import asyncio from typing import List, Optional import pytest from clvm.casts import int_to_bytes from colorlog import logging from hddcoin.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward from hddcoin.protocols import wallet_protocol, full_node_protocol from hddcoin.protocols.full_...
true
true
1c329c6a37fddc5fbee797a6ee3d3ba3ea359df3
2,768
py
Python
models/encoder.py
zsc/End-to-end-ASR-Transformer
3e02ff6210badb588134a81eb17f8c9ab59e735f
[ "Apache-2.0" ]
7
2021-12-08T04:07:48.000Z
2022-01-10T07:27:29.000Z
models/encoder.py
zsc/End-to-end-ASR-Transformer
3e02ff6210badb588134a81eb17f8c9ab59e735f
[ "Apache-2.0" ]
1
2021-12-08T05:14:47.000Z
2021-12-08T05:14:47.000Z
models/encoder.py
zsc/End-to-end-ASR-Transformer
3e02ff6210badb588134a81eb17f8c9ab59e735f
[ "Apache-2.0" ]
1
2021-12-08T05:13:44.000Z
2021-12-08T05:13:44.000Z
import megengine.module as M import megengine.functional as F import megengine as mge from .attention import MultiHeadedAttention from .embedding import PositionalEncoding from .encoder_layer import EncoderLayer from .layer_norm import LayerNorm from .positionwise_feed_forward import PositionwiseFeedForward from .repea...
32.564706
81
0.616329
import megengine.module as M import megengine.functional as F import megengine as mge from .attention import MultiHeadedAttention from .embedding import PositionalEncoding from .encoder_layer import EncoderLayer from .layer_norm import LayerNorm from .positionwise_feed_forward import PositionwiseFeedForward from .repea...
true
true
1c329ca24197b85d788b41f05cb3ae0f8b488d05
13,350
py
Python
code/train_seq2seq.py
sumanbanerjee1/Code-Mixed-Dialog
9df1d4dc800548a883f8bc1a9ce4116c77aebc02
[ "Apache-2.0" ]
35
2018-06-27T11:07:58.000Z
2022-01-06T07:52:35.000Z
code/train_seq2seq.py
sumanbanerjee1/Code-Mixed-Dialog
9df1d4dc800548a883f8bc1a9ce4116c77aebc02
[ "Apache-2.0" ]
null
null
null
code/train_seq2seq.py
sumanbanerjee1/Code-Mixed-Dialog
9df1d4dc800548a883f8bc1a9ce4116c77aebc02
[ "Apache-2.0" ]
6
2019-06-30T07:13:59.000Z
2021-02-17T13:14:52.000Z
import tensorflow as tf import numpy as np import json import pickle import os import subprocess import matplotlib.pyplot as plt import matplotlib.ticker as ticker from tqdm import tqdm from seq2seq.model import Seq2seqModel from seq2seq.data_utils import pad, replace_token_no, get_len flags = tf.app.flags flags.DEFI...
32.402913
112
0.630412
import tensorflow as tf import numpy as np import json import pickle import os import subprocess import matplotlib.pyplot as plt import matplotlib.ticker as ticker from tqdm import tqdm from seq2seq.model import Seq2seqModel from seq2seq.data_utils import pad, replace_token_no, get_len flags = tf.app.flags flags.DEFI...
true
true
1c329d8afed0fdcc1edf83c27cb2d8f18395ae5d
5,367
py
Python
violas_client/canoser/int_type.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/int_type.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/int_type.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
1
2022-01-05T06:49:42.000Z
2022-01-05T06:49:42.000Z
import struct from random import randint from violas_client.canoser.base import Base from struct import pack, unpack from_bytes = int.from_bytes class IntType(Base): @classmethod def to_json_serializable(cls, value): return value @classmethod def encode(cls, value): retu...
25.679426
90
0.575182
import struct from random import randint from violas_client.canoser.base import Base from struct import pack, unpack from_bytes = int.from_bytes class IntType(Base): @classmethod def to_json_serializable(cls, value): return value @classmethod def encode(cls, value): retu...
true
true
1c329db3107c5e67b900cf9359ac76186cdfbe1f
3,680
py
Python
awacs/glue.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
awacs/glue.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
awacs/glue.py
chizou/awacs
335c545d13ea22488b318245af891eb427c139db
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action as BaseAction from aws import BaseARN service_name = 'AWS Glue' prefix = 'glue' class Action(BaseAction): def __init__(self, action=None): sup = super(Action, self) ...
37.171717
70
0.787228
from aws import Action as BaseAction from aws import BaseARN service_name = 'AWS Glue' prefix = 'glue' class Action(BaseAction): def __init__(self, action=None): sup = super(Action, self) sup.__init__(prefix, action) class ARN(BaseARN): def __init__(self, resource='', region='', account=''...
true
true
1c329e24df8c7d20f6476811b5648b3433fdb945
2,084
py
Python
ietf/person/migrations/0012_auto_20160606_0823.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-11-20T03:40:40.000Z
2021-11-20T03:40:42.000Z
ietf/person/migrations/0012_auto_20160606_0823.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ietf/person/migrations/0012_auto_20160606_0823.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import ietf.utils.storage class Migration(migrations.Migration): dependencies = [ ('person', '0011_populate_photos'), ] operations = [ migrations.AlterField( model_name='...
40.076923
163
0.647793
from __future__ import unicode_literals from django.db import models, migrations import ietf.utils.storage class Migration(migrations.Migration): dependencies = [ ('person', '0011_populate_photos'), ] operations = [ migrations.AlterField( model_name='person', nam...
true
true
1c329e4cf35061eb113f0ddacf52c789c39ee2c8
1,205
py
Python
bigfastapi/schemas/customer_schemas.py
Smyja/bigfastapi
b05beede7bb8e853ce0494b495379037ccf27e8d
[ "MIT" ]
null
null
null
bigfastapi/schemas/customer_schemas.py
Smyja/bigfastapi
b05beede7bb8e853ce0494b495379037ccf27e8d
[ "MIT" ]
null
null
null
bigfastapi/schemas/customer_schemas.py
Smyja/bigfastapi
b05beede7bb8e853ce0494b495379037ccf27e8d
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Optional from pydantic import BaseModel, EmailStr class CustomerBase(BaseModel): first_name: str last_name: str email: EmailStr phone_number: str address: str gender: str age: int postal_code: str language: str country: str ci...
23.173077
41
0.696266
from datetime import datetime from typing import Optional from pydantic import BaseModel, EmailStr class CustomerBase(BaseModel): first_name: str last_name: str email: EmailStr phone_number: str address: str gender: str age: int postal_code: str language: str country: str ci...
true
true
1c329f4762f4785e737cff46b09c8e9f80c61634
6,162
py
Python
FeaturesSP500.py
LaplaceKorea/Data
8c16fc8c4cc29c1dc42d340ba1452c7fbc222bd3
[ "MIT" ]
null
null
null
FeaturesSP500.py
LaplaceKorea/Data
8c16fc8c4cc29c1dc42d340ba1452c7fbc222bd3
[ "MIT" ]
null
null
null
FeaturesSP500.py
LaplaceKorea/Data
8c16fc8c4cc29c1dc42d340ba1452c7fbc222bd3
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Tuple from Config import cfg from Features import * import numpy as np DELAYED_BID = 66 DELAYED_ASK = 67 DELAYED_LAST = 68 DELAYED_BID_SIZE = 69 DELAYED_ASK_SIZE = 70 DELAYED_LAST_SIZE = 71 DELAYED_HIGH = 72 DELAYED_LOW = 73 DELAYED_VOLUME = 74 DELAYED_CLOSE = 75 DELAYED_OPEN = 76 ...
26.908297
104
0.499675
from typing import Any, Dict, List, Tuple from Config import cfg from Features import * import numpy as np DELAYED_BID = 66 DELAYED_ASK = 67 DELAYED_LAST = 68 DELAYED_BID_SIZE = 69 DELAYED_ASK_SIZE = 70 DELAYED_LAST_SIZE = 71 DELAYED_HIGH = 72 DELAYED_LOW = 73 DELAYED_VOLUME = 74 DELAYED_CLOSE = 75 DELAYED_OPEN = 76 ...
true
true
1c32a1c327da3427def2508fea5d64478b4d53ed
9,153
py
Python
utils/data/config.py
Chen-Yifan/weaver
431a1427a185fa6357e40b729b8adcf263c349d2
[ "MIT" ]
null
null
null
utils/data/config.py
Chen-Yifan/weaver
431a1427a185fa6357e40b729b8adcf263c349d2
[ "MIT" ]
null
null
null
utils/data/config.py
Chen-Yifan/weaver
431a1427a185fa6357e40b729b8adcf263c349d2
[ "MIT" ]
2
2021-03-06T00:57:04.000Z
2021-05-15T05:16:03.000Z
import numpy as np import yaml import copy from ..logger import _logger from .tools import _get_variable_names def _as_list(x): if x is None: return None elif isinstance(x, (list, tuple)): return x else: return [x] def _md5(fname): '''https://stackoverflow.com/questions/3431...
42.771028
162
0.567136
import numpy as np import yaml import copy from ..logger import _logger from .tools import _get_variable_names def _as_list(x): if x is None: return None elif isinstance(x, (list, tuple)): return x else: return [x] def _md5(fname): import hashlib hash_md5 = hashlib.md5()...
true
true
1c32a23cb2cdd2fe2ed6a06239d902692c93ac99
3,800
py
Python
noxfile.py
oertr/hypermodern-python
5c792d42577692d28df45a981948d774442f63d8
[ "MIT" ]
null
null
null
noxfile.py
oertr/hypermodern-python
5c792d42577692d28df45a981948d774442f63d8
[ "MIT" ]
1
2021-11-24T09:58:54.000Z
2021-11-24T09:58:54.000Z
noxfile.py
oertr/hypermodern-python
5c792d42577692d28df45a981948d774442f63d8
[ "MIT" ]
null
null
null
"""Nox sessions.""" import tempfile from typing import Any import nox from nox.sessions import Session nox.options.sessions = "lint", "mypy", "tests" locations = "src", "tests", "noxfile.py", "docs/conf.py" def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None: """Install packages co...
30.645161
86
0.619474
import tempfile from typing import Any import nox from nox.sessions import Session nox.options.sessions = "lint", "mypy", "tests" locations = "src", "tests", "noxfile.py", "docs/conf.py" def install_with_constraints(session: Session, *args: str, **kwargs: Any) -> None: with tempfile.NamedTemporaryFile() as requ...
true
true
1c32a283e9321b6fee30f4acfd6dc10a11a36b5c
155
py
Python
polls_cms_integration/forms.py
sandilukez/news-project
fcd91edd6b7d6941b77a6390aa86efe3e2b0c3a1
[ "MIT" ]
null
null
null
polls_cms_integration/forms.py
sandilukez/news-project
fcd91edd6b7d6941b77a6390aa86efe3e2b0c3a1
[ "MIT" ]
null
null
null
polls_cms_integration/forms.py
sandilukez/news-project
fcd91edd6b7d6941b77a6390aa86efe3e2b0c3a1
[ "MIT" ]
null
null
null
from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = []
15.5
38
0.670968
from django import forms from polls.models import Poll class PollWizardForm(forms.ModelForm): class Meta: model = Poll exclude = []
true
true
1c32a3d1b74ff3ab9282c97dbdf86760f4c701ba
2,993
py
Python
setup.py
bchretien/bloom
51b12507745521989944730f1c6b8539e26a7406
[ "BSD-3-Clause" ]
1
2016-03-09T00:27:38.000Z
2016-03-09T00:27:38.000Z
setup.py
bchretien/bloom
51b12507745521989944730f1c6b8539e26a7406
[ "BSD-3-Clause" ]
null
null
null
setup.py
bchretien/bloom
51b12507745521989944730f1c6b8539e26a7406
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys from setuptools import setup, find_packages install_requires = [ 'catkin-pkg >= 0.1.14', 'distribute', 'empy', 'python-dateutil', 'PyYAML', 'rosdep >= 0.10.25', 'rosdistro >= 0.3.0', 'vcstools >= 0.1.22', ] # argparse got moved into the stdlib in py2.7...
38.371795
82
0.655864
import sys from setuptools import setup, find_packages install_requires = [ 'catkin-pkg >= 0.1.14', 'distribute', 'empy', 'python-dateutil', 'PyYAML', 'rosdep >= 0.10.25', 'rosdistro >= 0.3.0', 'vcstools >= 0.1.22', ] # python. if sys.version_info[0] == 2 and sys.version_info[1] <= 6:...
true
true
1c32a4844f9e79a9d27d43aaaf31661fe5746e0a
19,655
py
Python
discord/scheduled_event.py
bokja/discord.py-master
7b4bd2eafebeb1b3c186f95cd71b1baaad5b43dd
[ "MIT" ]
null
null
null
discord/scheduled_event.py
bokja/discord.py-master
7b4bd2eafebeb1b3c186f95cd71b1baaad5b43dd
[ "MIT" ]
null
null
null
discord/scheduled_event.py
bokja/discord.py-master
7b4bd2eafebeb1b3c186f95cd71b1baaad5b43dd
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
34.482456
155
0.614551
from __future__ import annotations from datetime import datetime from typing import TYPE_CHECKING, AsyncIterator, Dict, Optional, Union from .asset import Asset from .enums import EventStatus, EntityType, PrivacyLevel, try_enum from .mixins import Hashable from .object import Object, OLDEST_OBJECT from .utils import...
true
true
1c32a485711f2f6dcfcfe2f285a60d4af9815af0
295
py
Python
app/rss_feeder_api/tasks.py
RSaab/rss-scraper
9bf608878e7d08fea6508ae90b27f1c226b313f1
[ "MIT" ]
null
null
null
app/rss_feeder_api/tasks.py
RSaab/rss-scraper
9bf608878e7d08fea6508ae90b27f1c226b313f1
[ "MIT" ]
null
null
null
app/rss_feeder_api/tasks.py
RSaab/rss-scraper
9bf608878e7d08fea6508ae90b27f1c226b313f1
[ "MIT" ]
null
null
null
from rss_feeder_api.celery import app from rss_feeder_api.models import Feed @app.task def my_scheduled_job(): print("cron job") updateAllFeeds() def updateAllFeeds(): feeds = Feed.objects.filter(flagged=False) for feed in feeds: feed.force_update() print("Done!")
21.071429
46
0.708475
from rss_feeder_api.celery import app from rss_feeder_api.models import Feed @app.task def my_scheduled_job(): print("cron job") updateAllFeeds() def updateAllFeeds(): feeds = Feed.objects.filter(flagged=False) for feed in feeds: feed.force_update() print("Done!")
true
true
1c32a4a16b01d9fe059907ca4bf7bb7373fd1a9c
1,592
py
Python
chevah/txftps/checkers.py
chevah/txftps
2227c0017299c840e7e9b69022bac4bb2dd38ae4
[ "BSD-3-Clause" ]
4
2017-04-14T11:22:37.000Z
2021-06-09T10:53:37.000Z
chevah/txftps/checkers.py
chevah/txftps
2227c0017299c840e7e9b69022bac4bb2dd38ae4
[ "BSD-3-Clause" ]
1
2021-10-13T14:17:18.000Z
2021-10-13T14:17:18.000Z
chevah/txftps/checkers.py
chevah/txftps
2227c0017299c840e7e9b69022bac4bb2dd38ae4
[ "BSD-3-Clause" ]
1
2015-06-11T14:07:15.000Z
2015-06-11T14:07:15.000Z
from zope.interface import implements from twisted.cred.checkers import ICredentialsChecker from twisted.internet import defer, error from chevah.txftps.interfaces import ( IPasswordCredentials, ISSLCertificateCredentials, ) class InMemoryPassword(object): implements(ICredentialsChecker) credenti...
28.945455
57
0.67902
from zope.interface import implements from twisted.cred.checkers import ICredentialsChecker from twisted.internet import defer, error from chevah.txftps.interfaces import ( IPasswordCredentials, ISSLCertificateCredentials, ) class InMemoryPassword(object): implements(ICredentialsChecker) credenti...
true
true
1c32a557a767c625830d86fa0aa28718e3690cba
748
py
Python
basiclearning/filter_map_reduce_zip.py
GSGSS/git_learning
ceeabfe88edf2ecbfaf58eb42ca878a7a0910c4c
[ "MIT" ]
null
null
null
basiclearning/filter_map_reduce_zip.py
GSGSS/git_learning
ceeabfe88edf2ecbfaf58eb42ca878a7a0910c4c
[ "MIT" ]
null
null
null
basiclearning/filter_map_reduce_zip.py
GSGSS/git_learning
ceeabfe88edf2ecbfaf58eb42ca878a7a0910c4c
[ "MIT" ]
null
null
null
from functools import reduce # filter 满足条件返回 a = [1, 2, 3, 4, 5, 6, 7, 8, 9] b = 5 slict = filter(lambda x: x < b, a) print(type(slict)) print(list(slict)) # map 依次操作每一个参数 a = [1, 2, 3] map1 = map(lambda x: x+1, a) print(type(map1)) print(list(map1)) b = [4, 5, 6] map2 = map(lambda x, y: x+y, a, b) print(type(map2)) ...
19.684211
48
0.627005
from functools import reduce a = [1, 2, 3, 4, 5, 6, 7, 8, 9] b = 5 slict = filter(lambda x: x < b, a) print(type(slict)) print(list(slict)) a = [1, 2, 3] map1 = map(lambda x: x+1, a) print(type(map1)) print(list(map1)) b = [4, 5, 6] map2 = map(lambda x, y: x+y, a, b) print(type(map2)) print(list(map2)) reduce1 = red...
true
true
1c32a6265cea90b2736089890ec05093424577c9
2,944
py
Python
homework04/tests/test_tree.py
kristinazagaynova/programming-kristinazagaynova
d154a27f927d6da0135bffbd75330d4da8039f98
[ "Unlicense" ]
null
null
null
homework04/tests/test_tree.py
kristinazagaynova/programming-kristinazagaynova
d154a27f927d6da0135bffbd75330d4da8039f98
[ "Unlicense" ]
null
null
null
homework04/tests/test_tree.py
kristinazagaynova/programming-kristinazagaynova
d154a27f927d6da0135bffbd75330d4da8039f98
[ "Unlicense" ]
1
2021-02-20T09:36:40.000Z
2021-02-20T09:36:40.000Z
import pathlib import stat import time import unittest from unittest.mock import patch from pyfakefs.fake_filesystem_unittest import TestCase import pyvcs from pyvcs.index import read_index, update_index from pyvcs.repo import repo_create from pyvcs.tree import commit_tree, write_tree @unittest.skipIf(pyvcs.__versi...
41.464789
97
0.699728
import pathlib import stat import time import unittest from unittest.mock import patch from pyfakefs.fake_filesystem_unittest import TestCase import pyvcs from pyvcs.index import read_index, update_index from pyvcs.repo import repo_create from pyvcs.tree import commit_tree, write_tree @unittest.skipIf(pyvcs.__versi...
true
true
1c32a6ea55192b9a0ff8c4aabefaed68e451b27c
4,128
py
Python
label_maker_dask/utils.py
developmentseed/label-maker-dask
700d2fa224ac674171fd8c4f8709a67f862eac36
[ "MIT" ]
5
2021-10-09T03:25:46.000Z
2021-10-20T07:17:15.000Z
label_maker_dask/utils.py
developmentseed/label-maker-dask
700d2fa224ac674171fd8c4f8709a67f862eac36
[ "MIT" ]
1
2021-10-15T12:39:16.000Z
2021-10-15T13:51:01.000Z
label_maker_dask/utils.py
developmentseed/label-maker-dask
700d2fa224ac674171fd8c4f8709a67f862eac36
[ "MIT" ]
null
null
null
# pylint: disable=unused-argument """Provide utility functions""" import os from io import BytesIO from urllib.parse import parse_qs import numpy as np import rasterio import requests # type: ignore from mercantile import Tile, bounds from PIL import Image, ImageColor from rasterio.crs import CRS from rasterio.warp i...
29.697842
88
0.662306
import os from io import BytesIO from urllib.parse import parse_qs import numpy as np import rasterio import requests from mercantile import Tile, bounds from PIL import Image, ImageColor from rasterio.crs import CRS from rasterio.warp import transform_bounds from rio_tiler.io import COGReader WGS84_CRS = CRS.from_e...
true
true
1c32a743ab53fee05dd8f26beea9f33a973416ba
2,751
py
Python
zimsoap/utils.py
emillion/zimsoap
d1ea2eb4d50f263c9a16e5549af03f1eff3e295e
[ "Apache-2.0" ]
11
2015-02-15T23:52:56.000Z
2021-05-06T18:05:24.000Z
zimsoap/utils.py
emillion/zimsoap
d1ea2eb4d50f263c9a16e5549af03f1eff3e295e
[ "Apache-2.0" ]
25
2015-01-14T11:27:51.000Z
2016-09-07T14:06:52.000Z
zimsoap/utils.py
emillion/zimsoap
d1ea2eb4d50f263c9a16e5549af03f1eff3e295e
[ "Apache-2.0" ]
10
2015-08-12T14:45:17.000Z
2021-12-08T23:40:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """ Misc tool functions """ import pythonzimbra import pythonzimbra.tools.xmlserializer import re import hmac import hashlib from xml.dom import minidom re_zuuid = re.compile(r'[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}') def is_...
24.345133
77
0.605598
from __future__ import unicode_literals import pythonzimbra import pythonzimbra.tools.xmlserializer import re import hmac import hashlib from xml.dom import minidom re_zuuid = re.compile(r'[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}') def is_zuuid(s): return re_zuuid.match(s) def build_preauth_str(preauth_key...
true
true
1c32a8a2a1ea62504b0b0a48f589f3eb0e8f8376
222
py
Python
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
# As mentioned in TestAPIWrapper, I am not familiar with testing api calls # so this is something that I would like to add in the future. class TestSteamworksWrapper(): def testGetGameAchievements(self): pass
31.714286
74
0.752252
class TestSteamworksWrapper(): def testGetGameAchievements(self): pass
true
true
1c32aa6e6005e89cd1da77d33f4d806ef0817224
1,058
py
Python
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
1
2021-02-08T16:59:14.000Z
2021-02-08T16:59:14.000Z
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
from tests.integration.installation_and_upgrade.test_installation_and_upgrade import TestInstallationAndUpgrade class TestAllEndPoints(TestInstallationAndUpgrade): def test_access_all_data_all_endpoints(self): """ Fetch all the data from all the end points """ # Some end points just can't be fetc...
39.185185
111
0.620983
from tests.integration.installation_and_upgrade.test_installation_and_upgrade import TestInstallationAndUpgrade class TestAllEndPoints(TestInstallationAndUpgrade): def test_access_all_data_all_endpoints(self): end_point_exceptions = [ "/api/help/", "/api/test_host/", ...
true
true
1c32ab045b8962e787b6429790061fb8695b5e7f
82,515
py
Python
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
42.402364
116
0.620408
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
true
true
1c32ab08df1cc376afa30d41b2722e1062722afb
1,248
py
Python
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-core/ampel/aux/SimpleTagFilter.py # License: BSD-3-Clause # Author: Jakob van Santen <jakob.van.santen@desy.de> # Date: 06.12.2021 # Last Modified Date: 06.12.2021 # Last Modified By: Jakob van Santen ...
35.657143
75
0.647436
from ampel.types import Tag from ampel.abstract.AbsApplicable import AbsApplicable from ampel.content.DataPoint import DataPoint class SimpleTagFilter(AbsApplicable): require: None | list[Tag] = None forbid: None | list[Tag] = None def __init__(self, **kwargs): super().__init__(**kwargs...
true
true
1c32ab8dde7a37d392ee659a6ea689faa12727e2
39
py
Python
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
10
2015-01-06T14:59:50.000Z
2021-01-10T19:06:16.000Z
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
76
2015-02-07T13:00:22.000Z
2020-04-14T02:10:37.000Z
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
11
2015-05-24T15:55:49.000Z
2017-10-15T11:34:35.000Z
""" Unit Tests for TwistedChecker. """
9.75
30
0.666667
true
true
1c32abaa628bec8a0c59f08ddbef8035e36be06a
517
py
Python
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
1
2022-01-17T14:26:05.000Z
2022-01-17T14:26:05.000Z
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
null
null
null
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
null
null
null
from blockfrost import BlockFrostIPFS, ApiError from blockfrost.ipfs.add import IPFSObjectResponse file_path = "README.md" def test_add(requests_mock): ipfs = BlockFrostIPFS() mock_data = { "name": file_path, "ipfs_hash": "QmZbHqiCxKEVX7QfijzJTkZiSi3WEVTcvANgNAWzDYgZDr", "size": 12529...
30.411765
75
0.727273
from blockfrost import BlockFrostIPFS, ApiError from blockfrost.ipfs.add import IPFSObjectResponse file_path = "README.md" def test_add(requests_mock): ipfs = BlockFrostIPFS() mock_data = { "name": file_path, "ipfs_hash": "QmZbHqiCxKEVX7QfijzJTkZiSi3WEVTcvANgNAWzDYgZDr", "size": 12529...
true
true
1c32acc88d168bc376ec29f2eae66ac341eab896
18,510
py
Python
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
1
2018-07-17T11:23:47.000Z
2018-07-17T11:23:47.000Z
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
2
2019-02-05T21:36:05.000Z
2019-02-08T22:16:42.000Z
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
1
2020-02-29T04:49:11.000Z
2020-02-29T04:49:11.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import str from past.builtins import basestring from builtins import object import copy import hashlib import logging import string from stacker.util import read_value_from_path from stacker.variab...
33.053571
107
0.622474
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import str from past.builtins import basestring from builtins import object import copy import hashlib import logging import string from stacker.util import read_value_from_path from stacker.variab...
true
true
1c32ad1b4981abe93c3f66a5517ee15f7662ec65
407
py
Python
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from new_movies import movies_ranking from new_movies.random_data_utility import random_generator def run_example(): some_movies = random_generator.generate_random_movies(movies_number=15) movies_ranking.print_top_movies(some_movies) # movies_ranking.print_top_movies(some_movies, limit=12) # movies_ra...
29.071429
75
0.805897
from new_movies import movies_ranking from new_movies.random_data_utility import random_generator def run_example(): some_movies = random_generator.generate_random_movies(movies_number=15) movies_ranking.print_top_movies(some_movies) if __name__ == "__main__": run_example()
true
true
1c32ad3d236fe6ddd50443cf1f6b99698ac7bdc6
2,958
py
Python
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
from urllib.parse import urljoin from db import Db import requests import os import re import json import logging import random import string import redis import yaml testcn_pattern = r'test[a-zA-Z]{32}' script_dir = os.path.dirname(os.path.realpath(__file__)) REGISTRAR_URL = os.environ.get('REGISTRAR_URL', 'http://l...
34.395349
113
0.644016
from urllib.parse import urljoin from db import Db import requests import os import re import json import logging import random import string import redis import yaml testcn_pattern = r'test[a-zA-Z]{32}' script_dir = os.path.dirname(os.path.realpath(__file__)) REGISTRAR_URL = os.environ.get('REGISTRAR_URL', 'http://l...
true
true
1c32ae12ebcc78a1b009081906dc246c710134e2
5,914
py
Python
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
import pytest import salt.modules.config as config import salt.modules.virt as virt from salt._compat import ElementTree as ET from tests.support.mock import MagicMock class LibvirtMock(MagicMock): # pylint: disable=too-many-ancestors """ Libvirt library mock """ class virDomain(MagicMock): ...
30.802083
84
0.611769
import pytest import salt.modules.config as config import salt.modules.virt as virt from salt._compat import ElementTree as ET from tests.support.mock import MagicMock class LibvirtMock(MagicMock): class virDomain(MagicMock): class libvirtError(Exception): def __init__(self, msg): supe...
true
true
1c32b056b0adb053ca4604c722481eb2fb2b6a1e
2,233
py
Python
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
1
2020-11-27T08:49:18.000Z
2020-11-27T08:49:18.000Z
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
null
null
null
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
null
null
null
import pytest from common import * def test_slice_expression(df): assert df.x[:2].tolist() == df[:2].x.tolist() assert df.x[2:6].tolist() == df[2:6].x.tolist() assert df.x[-3:].tolist() == df[-3:].x.tolist() # we don't support non 1 steps # assert df.x[::-3].tolist() == df[::-3].x.tolist() def t...
29
87
0.622929
import pytest from common import * def test_slice_expression(df): assert df.x[:2].tolist() == df[:2].x.tolist() assert df.x[2:6].tolist() == df[2:6].x.tolist() assert df.x[-3:].tolist() == df[-3:].x.tolist() # assert df.x[::-3].tolist() == df[::-3].x.tolist() def test_slice_against_numpy(df): ...
true
true
1c32b07e30bd3542e714624d35aa16df31270ecc
1,790
py
Python
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: #pip install pickle-mixin # In[1]: #import the basics but important libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #Sklearn Preprocessing from sklearn.preprocessing import LabelEncoder from sklearn.model_selec...
10.170455
138
0.672626
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, classification_report from sklearn.tree import DecisionTreeClassifier impo...
true
true
1c32b0c57831827048b8dbacc63ac057b4af9b30
17,326
py
Python
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
1
2019-05-19T08:05:02.000Z
2019-05-19T08:05:02.000Z
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
null
null
null
""" Support for MQTT JSON lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.mqtt_json/ """ import json import logging import voluptuous as vol from homeassistant.components import mqtt from homeassistant.components.light import ( ATTR_BR...
36.246862
79
0.616588
import json import logging import voluptuous as vol from homeassistant.components import mqtt from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_COLOR, ATTR_TRANSITION, ATTR_WHITE_VALUE, FLASH_LONG, FLASH_SHORT, SUPPORT_BRIGHTNESS, SUPPORT_COLOR...
true
true
1c32b184f46700426a11d5fd1157683e7e2958c8
5,913
py
Python
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2020-12-13T22:07:53.000Z
2020-12-13T22:07:53.000Z
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.647059
100
0.70066
import copy import os from typing import Any, Dict from unittest import mock import tensorflow as tf from tfx.extensions.google_cloud_ai_platform import constants from tfx.extensions.google_cloud_ai_platform.trainer import executor as ai_platform_trainer_executor from tfx.extensions.google_cloud_ai_platform.tuner imp...
true
true
1c32b1ab805272c3b7c8593a9b1c385e93812605
8,377
py
Python
homeassistant/components/enigma2/media_player.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/enigma2/media_player.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/enigma2/media_player.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for Enigma2 media players.""" from openwebif.api import CreateDevice import voluptuous as vol from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TYPE_TVSHOW, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_T...
30.797794
85
0.676256
from openwebif.api import CreateDevice import voluptuous as vol from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TYPE_TVSHOW, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_TRACK, SUPPORT_SELECT_SOURCE, SUPP...
true
true
1c32b21103d9965df8d0584bef0eb83f78080ed7
2,581
py
Python
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
7
2019-09-09T06:25:20.000Z
2020-03-21T13:53:43.000Z
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
1
2020-12-13T14:26:03.000Z
2020-12-13T14:26:03.000Z
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
1
2019-11-24T12:47:21.000Z
2019-11-24T12:47:21.000Z
ONEGRAM_RRNN = """ extern "C" { __global__ void rrnn_fwd( const float * __restrict__ u, const float * __restrict__ c1_init, const int len, const int batch, const int dim, const int k, floa...
29.329545
82
0.43859
ONEGRAM_RRNN = """ extern "C" { __global__ void rrnn_fwd( const float * __restrict__ u, const float * __restrict__ c1_init, const int len, const int batch, const int dim, const int k, floa...
true
true
1c32b2826520d61f621a1b187296b68c17e23093
659
py
Python
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
6
2015-03-03T13:23:07.000Z
2021-12-19T18:12:41.000Z
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
95
2015-02-07T00:55:39.000Z
2022-02-08T20:22:05.000Z
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
2
2016-03-22T16:53:26.000Z
2019-02-09T22:46:04.000Z
import os os.environ.setdefault("SECRET_KEY", "travis-key") os.environ.setdefault("IS_HTTPS", "no") os.environ.setdefault("DB_NAME", "brouwers") os.environ.setdefault("DB_USER", "postgres") os.environ.setdefault("DB_PASSWORD", "") from .base import * # noqa isort:skip # Secrets DATABASES["mysql"] = {"ENGINE": "dja...
22.724138
81
0.734446
import os os.environ.setdefault("SECRET_KEY", "travis-key") os.environ.setdefault("IS_HTTPS", "no") os.environ.setdefault("DB_NAME", "brouwers") os.environ.setdefault("DB_USER", "postgres") os.environ.setdefault("DB_PASSWORD", "") from .base import * DATABASES["mysql"] = {"ENGINE": "django.db.backends.sqlite3", "N...
true
true
1c32b43e4c148db4b606236f42a2f2577905a7e2
6,359
py
Python
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
17
2020-06-11T20:26:41.000Z
2021-04-03T19:07:57.000Z
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
5
2021-06-24T13:31:16.000Z
2022-03-09T11:28:04.000Z
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
4
2020-09-12T11:52:41.000Z
2021-04-21T19:30:00.000Z
from __future__ import absolute_import, unicode_literals import json from six import string_types __all__ = ['ArangoClient'] from .connection import ( BasicConnection, JWTConnection, JWTSuperuserConnection ) from .database import StandardDatabase from .exceptions import ServerConnectionError from .http ...
36.130682
79
0.611731
from __future__ import absolute_import, unicode_literals import json from six import string_types __all__ = ['ArangoClient'] from .connection import ( BasicConnection, JWTConnection, JWTSuperuserConnection ) from .database import StandardDatabase from .exceptions import ServerConnectionError from .http ...
true
true
1c32b4965cd39a3830378f9064a6396f12e4d4ac
2,114
py
Python
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
1
2020-05-28T17:30:46.000Z
2020-05-28T17:30:46.000Z
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
null
null
null
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
null
null
null
# # Copyright SAS Institute # # 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...
30.2
102
0.703879
from __future__ import absolute_import from __future__ import division from __future__ import print_function from saspy.version import __version__ from saspy.sasbase import SASsession, SASconfig, list_configs from saspy.sasdata import SASdata from saspy.sasexceptions import SASIONotSupportedError, SASConfigNotFoundEr...
true
true
1c32b619b21812aea2744ec4477398c202b9057c
3,920
py
Python
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simulate VGDL Games """ import sys from os import path import numpy as np dir = path.dirname(__file__) gvgai_path = path.join(dir, "gvgai", "clients", "GVGAI-PythonClient", "src", "utils") sys.path.append(gvgai_path) import gym from gym import error, spaces, utils im...
30.866142
158
0.557143
import sys from os import path import numpy as np dir = path.dirname(__file__) gvgai_path = path.join(dir, "gvgai", "clients", "GVGAI-PythonClient", "src", "utils") sys.path.append(gvgai_path) import gym from gym import error, spaces, utils import ClientCommGYM as gvgai class GVGAI_Env(gym.Env): def __init__(s...
true
true
1c32b63182e3843d4781fc4ffb7434839531e4cc
1,011
py
Python
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
from .....tools.decorators import metric """ The Rand index compares the overlap of two clusterings; it considers both correct clustering overlaps while also counting correct disagreements between two clusterings. Similar to NMI, we compared the cell-type labels with the NMI-optimized Louvain clustering computed on th...
30.636364
81
0.726014
from .....tools.decorators import metric @metric( metric_name="ARI", maximize=True, image="openproblems-python-batch-integration", ) def ari(adata): from scib.metrics import ari from scib.metrics.clustering import opt_louvain opt_louvain( adata, label_key="labels", c...
true
true
1c32b6bda5245b70134b39bad44d9245efa72c04
5,608
py
Python
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
null
null
null
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
null
null
null
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
1
2022-02-27T10:44:31.000Z
2022-02-27T10:44:31.000Z
# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu). # # 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, ...
35.719745
97
0.637839
# Networks", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part # of the code. import os import argparse import numpy as np from urllib.request import urlretrieve try: import open3d as o3d except ImportError: raise ImportError('Please install open3d with `pip install open3d`.') import torch import ...
true
true
1c32b6fc1860b7fe41b96112f2204db29b88735e
3,434
py
Python
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
23
2018-12-14T12:45:19.000Z
2022-03-13T07:31:46.000Z
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
3
2018-12-18T19:07:11.000Z
2019-01-16T16:41:55.000Z
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
8
2018-12-20T12:41:59.000Z
2020-11-09T11:12:06.000Z
import math import re import string import numpy as np import torch class UniformSample: def __init__(self, n_sample): self.n_sample = n_sample def __call__(self, frames): n_frames = len(frames) if n_frames < self.n_sample: return frames sample_indices = [ int(i)...
23.682759
93
0.62551
import math import re import string import numpy as np import torch class UniformSample: def __init__(self, n_sample): self.n_sample = n_sample def __call__(self, frames): n_frames = len(frames) if n_frames < self.n_sample: return frames sample_indices = [ int(i)...
true
true
1c32b763016a1c8a4b6126d8abb45c71d372978f
10,551
py
Python
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM 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 # #...
50.725962
130
0.604019
import logging import json import sys from dlab.fab import * from dlab.meta_lib import * from dlab.actions_lib import * import os if __name__ == "__main__": local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'], os.env...
true
true
1c32b79b708f112bdff89c86039028c44360ec78
14,446
py
Python
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
import os import sys import inspect from math import pi # folder containing the output data EXPTS_BASE_DATA_FOLDER = (os.path.realpath( os.path.abspath( os.path.split( os.path.dirname(inspect.getfile(inspect.currentframe())))[0]))) EXPTS_BASE_DATA_FOLDER = os.path.join(EXPTS_BASE_DATA_FOLDER, '...
62.808696
124
0.74775
import os import sys import inspect from math import pi EXPTS_BASE_DATA_FOLDER = (os.path.realpath( os.path.abspath( os.path.split( os.path.dirname(inspect.getfile(inspect.currentframe())))[0]))) EXPTS_BASE_DATA_FOLDER = os.path.join(EXPTS_BASE_DATA_FOLDER, 'data', 'expts', '') EXPTS_BASE_PLOT...
true
true
1c32b7b845744e864bc1c3f8c00f02adb11330da
53
py
Python
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
from inac8hr.wrappers.inac8hr_arcade.sprite import *
26.5
52
0.849057
from inac8hr.wrappers.inac8hr_arcade.sprite import *
true
true
1c32b8911fad87127d03edfe8e86d02ba78a3fe0
9,218
py
Python
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
"""Command line option parsing.""" import os import argparse from typing import Sequence PARSER = argparse.ArgumentParser(description="Runs an Aries Cloud Agent.") PARSER.add_argument( "-it", "--inbound-transport", dest="inbound_transports", type=str, action="append", nargs=3, required=...
26.039548
86
0.669993
import os import argparse from typing import Sequence PARSER = argparse.ArgumentParser(description="Runs an Aries Cloud Agent.") PARSER.add_argument( "-it", "--inbound-transport", dest="inbound_transports", type=str, action="append", nargs=3, required=True, metavar=("<module>", "<ho...
true
true
1c32b8a716fff04e983de872a823ae7a7301c97c
198
py
Python
molo/surveys/admin_urls.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
null
null
null
molo/surveys/admin_urls.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
88
2016-06-14T18:36:18.000Z
2018-09-21T07:33:58.000Z
molo/surveys/admin_urls.py
praekeltfoundation/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
1
2017-10-02T09:27:45.000Z
2017-10-02T09:27:45.000Z
from django.conf.urls import url from molo.surveys.views import index urlpatterns = [ # re-route to overwritten index view, originally in wagtailsurveys url(r'^$', index, name='index'), ]
22
70
0.717172
from django.conf.urls import url from molo.surveys.views import index urlpatterns = [ url(r'^$', index, name='index'), ]
true
true
1c32b909397498ff4375230c5fafdb28c659683a
2,030
py
Python
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
null
null
null
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
1
2021-06-02T00:16:03.000Z
2021-06-02T00:16:03.000Z
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
null
null
null
import io import re import json import aiohttp class GiphyMethodsMeta(type): GIPHY_API_METHODS_URL = 'https://api.giphy.com/v1/' allowed_methods = re.compile(r'gifs') def __new__(cls, name, bases, dct): for attr_name, attr_value in dct.items(): if cls.allowed_methods.match(attr_name)...
32.741935
97
0.614778
import io import re import json import aiohttp class GiphyMethodsMeta(type): GIPHY_API_METHODS_URL = 'https://api.giphy.com/v1/' allowed_methods = re.compile(r'gifs') def __new__(cls, name, bases, dct): for attr_name, attr_value in dct.items(): if cls.allowed_methods.match(attr_name)...
true
true
1c32b9172303fb54d84a0f56fa397803ccc87d99
238
py
Python
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
num = int(input("Digite um numero de 0 a 9999: ")) uni = num // 1 % 10 dez = num // 10 % 10 cen = num // 100 % 10 mil = num // 1000 % 10 print(f'''O numero digitado foi: {num} Unidade: {uni} dezena: {dez} Centena: {cen} Milhar: {mil}''')
21.636364
50
0.588235
num = int(input("Digite um numero de 0 a 9999: ")) uni = num // 1 % 10 dez = num // 10 % 10 cen = num // 100 % 10 mil = num // 1000 % 10 print(f'''O numero digitado foi: {num} Unidade: {uni} dezena: {dez} Centena: {cen} Milhar: {mil}''')
true
true
1c32ba4303f378b2390b94e61729cf0bc77089a1
2,058
py
Python
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
1
2021-07-03T14:05:19.000Z
2021-07-03T14:05:19.000Z
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
null
null
null
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
null
null
null
""" Mask initial bases from alignment FASTA """ import argparse import Bio import Bio.SeqIO from Bio.Seq import Seq def mask_terminal_gaps(seq): L = len(seq) seq_trimmed = seq.lstrip('-') left_gaps = L - len(seq_trimmed) seq_trimmed = seq_trimmed.rstrip('-') right_gaps = L - len(seq_trimmed) - left...
38.830189
144
0.650632
import argparse import Bio import Bio.SeqIO from Bio.Seq import Seq def mask_terminal_gaps(seq): L = len(seq) seq_trimmed = seq.lstrip('-') left_gaps = L - len(seq_trimmed) seq_trimmed = seq_trimmed.rstrip('-') right_gaps = L - len(seq_trimmed) - left_gaps return "N"*left_gaps + seq_trimmed + "...
true
true
1c32ba78dc18ff3d51a570448d94b7e738fa37ea
358
py
Python
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
16
2021-10-15T08:41:52.000Z
2022-01-02T11:14:30.000Z
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
5
2021-10-17T06:04:41.000Z
2021-10-30T16:45:40.000Z
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
43
2021-10-15T14:03:48.000Z
2022-03-09T21:32:46.000Z
from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(ra...
35.8
73
0.639665
from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(ra...
true
true
1c32bb2bde13ef8d4136b6393918978e0551a9c2
277
py
Python
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
null
null
null
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
1
2021-11-06T02:30:37.000Z
2021-11-06T02:30:37.000Z
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
null
null
null
import logging class LoggerAdapter(logging.LoggerAdapter): def __init__(self, prefix, logger): super(LoggerAdapter, self).__init__(logger, {}) self.prefix = prefix def process(self, msg, kwargs): return '[%s] %s' % (self.prefix, msg), kwargs
25.181818
55
0.649819
import logging class LoggerAdapter(logging.LoggerAdapter): def __init__(self, prefix, logger): super(LoggerAdapter, self).__init__(logger, {}) self.prefix = prefix def process(self, msg, kwargs): return '[%s] %s' % (self.prefix, msg), kwargs
true
true
1c32bb5567a439d03bdb2f1993bc61fd4e88448f
1,128
py
Python
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
32.228571
72
0.779255
from __future__ import absolute_import import oneflow import oneflow._oneflow_internal from oneflow.python.oneflow_export import oneflow_export @oneflow_export("Generator") def MakeGenerator(device=None, seed=None): if device is None: device = "auto" if seed is None: return oneflow._oneflow_in...
true
true
1c32bc14a129f0ae18754f98f17e46ae45610067
12,868
py
Python
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
null
null
null
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
1
2016-12-10T04:06:17.000Z
2016-12-10T22:46:04.000Z
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
null
null
null
import time from models.utils.comms import Comms from models.utils.userobj import UserObj from models.utils.callableobj import CallableObj from models.utils.testobj import TestObj from models.utils.color import Gamut REFRESH_TIMEOUT = 5 # Associate a model id with a gamut. ModelsGamut = { 'LCT001': 'B', 'LCT...
33.336788
136
0.578178
import time from models.utils.comms import Comms from models.utils.userobj import UserObj from models.utils.callableobj import CallableObj from models.utils.testobj import TestObj from models.utils.color import Gamut REFRESH_TIMEOUT = 5 ModelsGamut = { 'LCT001': 'B', 'LCT002': 'B', 'LCT003': 'B', 'LC...
true
true
1c32bc3560154a4414ff7fb012ff5c5d11236aac
3,673
py
Python
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- import asyncio import collections import aiohttp from aiohttp import web import tqdm from concurrency_futures.flags2_common import main, HTTPStatus, Result, save_flag # default set low to avoid errors from remote site, such as # 503 - Service Temporarily Unavailable D...
29.620968
117
0.642254
import asyncio import collections import aiohttp from aiohttp import web import tqdm from concurrency_futures.flags2_common import main, HTTPStatus, Result, save_flag DEFAULT_CONCUR_REQ = 5 MAX_CONCUR_REQ = 1000 class FetchError(Exception): def __init__(self, country_code): self.country_code = country_...
true
true