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 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f75a168d5dbee366b2c696a5a5ad674da39ad519 | 16,052 | py | Python | tests/integration/test_mysql_protocol/test.py | ageraab/ClickHouse | 7cf35388407ee57f4e75c7040202274fea793ca2 | [
"Apache-2.0"
] | 3 | 2021-09-14T08:36:18.000Z | 2022-02-24T02:55:38.000Z | tests/integration/test_mysql_protocol/test.py | ageraab/ClickHouse | 7cf35388407ee57f4e75c7040202274fea793ca2 | [
"Apache-2.0"
] | 1 | 2020-12-28T19:33:08.000Z | 2020-12-28T19:33:08.000Z | tests/integration/test_mysql_protocol/test.py | ageraab/ClickHouse | 7cf35388407ee57f4e75c7040202274fea793ca2 | [
"Apache-2.0"
] | 1 | 2020-05-18T11:31:48.000Z | 2020-05-18T11:31:48.000Z | # coding: utf-8
import docker
import datetime
import math
import os
import pytest
import subprocess
import time
import pymysql.connections
from docker.models.containers import Container
from helpers.cluster import ClickHouseCluster
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join... | 44.837989 | 176 | 0.647271 |
import docker
import datetime
import math
import os
import pytest
import subprocess
import time
import pymysql.connections
from docker.models.containers import Container
from helpers.cluster import ClickHouseCluster
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(SCRIPT_DIR, './... | true | true |
f75a1690c00ec241d949116d86d7f3dc3e6681a7 | 7,230 | py | Python | demos/colorization_demo/python/colorization_demo.py | AlexKoff88/open_model_zoo | 8944a46653427cfa53db10fa91d677826adf31e1 | [
"Apache-2.0"
] | null | null | null | demos/colorization_demo/python/colorization_demo.py | AlexKoff88/open_model_zoo | 8944a46653427cfa53db10fa91d677826adf31e1 | [
"Apache-2.0"
] | null | null | null | demos/colorization_demo/python/colorization_demo.py | AlexKoff88/open_model_zoo | 8944a46653427cfa53db10fa91d677826adf31e1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
Copyright (c) 2018-2021 Intel Corporation
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 applic... | 42.781065 | 109 | 0.639142 |
from openvino.runtime import Core, get_version
import cv2 as cv
import numpy as np
import logging as log
from time import perf_counter
import sys
from argparse import ArgumentParser, SUPPRESS
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parents[2] / 'common/python'))
import monitors
from ima... | true | true |
f75a1693bc609ecdd511e9776c6a87594d84f5fd | 1,297 | py | Python | shallow_backup/constants.py | mschmidtkorth/shallow-backup | 6629fed7d5a3a13eb068c7ef0168cfa8ffbd3bbf | [
"MIT"
] | 1 | 2021-07-25T19:26:47.000Z | 2021-07-25T19:26:47.000Z | shallow_backup/constants.py | mschmidtkorth/shallow-backup | 6629fed7d5a3a13eb068c7ef0168cfa8ffbd3bbf | [
"MIT"
] | null | null | null | shallow_backup/constants.py | mschmidtkorth/shallow-backup | 6629fed7d5a3a13eb068c7ef0168cfa8ffbd3bbf | [
"MIT"
] | null | null | null | class ProjInfo:
PROJECT_NAME = 'shallow-backup'
VERSION = '4.0.4'
AUTHOR_GITHUB = 'alichtman'
AUTHOR_FULL_NAME = 'Aaron Lichtman'
DESCRIPTION = "Easily create lightweight backups of installed packages, dotfiles, and more."
URL = 'https://github.com/alichtman/shallow-backup'
BUG_REPORT_URL = 'https://github.com/a... | 58.954545 | 117 | 0.451041 | class ProjInfo:
PROJECT_NAME = 'shallow-backup'
VERSION = '4.0.4'
AUTHOR_GITHUB = 'alichtman'
AUTHOR_FULL_NAME = 'Aaron Lichtman'
DESCRIPTION = "Easily create lightweight backups of installed packages, dotfiles, and more."
URL = 'https://github.com/alichtman/shallow-backup'
BUG_REPORT_URL = 'https://github.com/a... | true | true |
f75a17173ed763be477c320d93f9d5c128e2dbab | 10,695 | py | Python | intensio/intensio_obfuscator.py | vflanker/py-confuser | a96ea578b94605a6a9c90e8c7402930b7cee7a06 | [
"MIT"
] | null | null | null | intensio/intensio_obfuscator.py | vflanker/py-confuser | a96ea578b94605a6a9c90e8c7402930b7cee7a06 | [
"MIT"
] | null | null | null | intensio/intensio_obfuscator.py | vflanker/py-confuser | a96ea578b94605a6a9c90e8c7402930b7cee7a06 | [
"MIT"
] | 1 | 2021-07-20T03:02:26.000Z | 2021-07-20T03:02:26.000Z | # -*- coding: utf-8 -*-
# https://github.com/Hnfull/Intensio-Obfuscator
"""
/$$$$$$ /$$ /$$
|_ $$_/ | $$ |__/
| $$ /$$$$$$$ /$$$$$$ /$$$$... | 54.846154 | 175 | 0.462833 |
import sys
import re
import time
import colorama
colorama.init(autoreset=True)
SUCESS_COLOUR = colorama.Fore.GREEN + colorama.Style.BRIGHT
ERROR_COLOUR = colorama.Fore.RED + colorama.Style.BRIGHT
BANNER_COLOUR = colorama.Fore.WHITE + colorama.Style.BRIGHT
SECTION_COLOUR = colorama.Fore.YELLOW + c... | true | true |
f75a17ef6280a52c5cf129ce1e635342ce780cab | 12,794 | py | Python | flask_security/utils.py | joergwork/flask-security | 76ad77a23398b38d730bc15f1052ff645cbca846 | [
"MIT"
] | 1 | 2017-06-29T10:41:47.000Z | 2017-06-29T10:41:47.000Z | flask_security/utils.py | lashex/flask-security | 7132a03f84972753bf1a4688dfaa099bdae5e0f3 | [
"MIT"
] | null | null | null | flask_security/utils.py | lashex/flask-security | 7132a03f84972753bf1a4688dfaa099bdae5e0f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flask.ext.security.utils
~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security utils module
:copyright: (c) 2012 by Matt Wright.
:license: MIT, see LICENSE for more details.
"""
import base64
import hashlib
import hmac
import sys
try:
from urlparse import urlsplit
except Import... | 29.892523 | 97 | 0.687588 |
import base64
import hashlib
import hmac
import sys
try:
from urlparse import urlsplit
except ImportError: from urllib.parse import urlsplit
from contextlib import contextmanager
from datetime import datetime, timedelta
from flask import url_for, flash, current_app, request, session, render_template
from f... | true | true |
f75a18d64c5be25ac14432a568f372f4ab8964d6 | 2,328 | py | Python | office365/onenote/notebooks/notebook_collection.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/onenote/notebooks/notebook_collection.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/onenote/notebooks/notebook_collection.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.entity_collection import EntityCollection
from office365.onenote.notebooks.copy_notebook_model import CopyNotebookModel
from office365.onenote.notebooks.notebook import Notebook
from office365.onenote.notebooks.recent_notebook import RecentNotebook
from office365.runtime.client_result import ClientResult... | 48.5 | 117 | 0.752148 | from office365.entity_collection import EntityCollection
from office365.onenote.notebooks.copy_notebook_model import CopyNotebookModel
from office365.onenote.notebooks.notebook import Notebook
from office365.onenote.notebooks.recent_notebook import RecentNotebook
from office365.runtime.client_result import ClientResult... | true | true |
f75a1b0b14be57335290d4f68baf1d6dcbccecaf | 601 | py | Python | algorithms/simple_array_sum.py | cileong/hackerrank-solutions | dbb68d685ee5dce5142a24e4062d7945b178356b | [
"MIT"
] | null | null | null | algorithms/simple_array_sum.py | cileong/hackerrank-solutions | dbb68d685ee5dce5142a24e4062d7945b178356b | [
"MIT"
] | null | null | null | algorithms/simple_array_sum.py | cileong/hackerrank-solutions | dbb68d685ee5dce5142a24e4062d7945b178356b | [
"MIT"
] | null | null | null | #!/bin/python3
import os
# Complete the 'simpleArraySum' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY ar as parameter.
# Solution 1:
# def simpleArraySum(ar):
# res = 0
# for i in ar:
# res += i
# return res
# Solution 2:
def simpleArra... | 19.387097 | 53 | 0.625624 |
import os
def simpleArraySum(ar):
return sum(ar)
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
ar_count = int(input().strip())
ar = list(map(int, input().rstrip().split()))
result = simpleArraySum(ar)
fptr.write(str(result) + '\n')
fptr.close() | true | true |
f75a1b672ccd08352db47d12d913a0950bac6b21 | 2,931 | py | Python | sdk/python/test/e2e/test_e2e_xgboostjob.py | qiankunli/tf-operator | 65ad3d53914a835fa457c3fe8e2668fafb3f862c | [
"Apache-2.0"
] | 121 | 2021-10-04T16:34:19.000Z | 2022-03-31T09:25:18.000Z | sdk/python/test/e2e/test_e2e_xgboostjob.py | qiankunli/tf-operator | 65ad3d53914a835fa457c3fe8e2668fafb3f862c | [
"Apache-2.0"
] | 179 | 2021-10-04T16:30:34.000Z | 2022-03-31T17:08:13.000Z | sdk/python/test/e2e/test_e2e_xgboostjob.py | qiankunli/tf-operator | 65ad3d53914a835fa457c3fe8e2668fafb3f862c | [
"Apache-2.0"
] | 45 | 2021-10-05T12:42:24.000Z | 2022-03-29T06:41:03.000Z | # Copyright 2021 kubeflow.org.
#
# 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,... | 33.689655 | 92 | 0.672808 |
import os
from kubernetes.client import V1PodTemplateSpec
from kubernetes.client import V1ObjectMeta
from kubernetes.client import V1PodSpec
from kubernetes.client import V1Container
from kubeflow.training import XGBoostJobClient
from kubeflow.training import V1ReplicaSpec
from kubeflow.training import KubeflowOrgV1... | true | true |
f75a1bc97cc7425135b23e92680ffba9974abbeb | 4,656 | py | Python | lib/handler.py | code-fortis/Jarvis | 54151ea2203832d1563a4fffbfb428d822026522 | [
"MIT"
] | null | null | null | lib/handler.py | code-fortis/Jarvis | 54151ea2203832d1563a4fffbfb428d822026522 | [
"MIT"
] | null | null | null | lib/handler.py | code-fortis/Jarvis | 54151ea2203832d1563a4fffbfb428d822026522 | [
"MIT"
] | null | null | null | # Import all the modules required
import hashlib
import json
import multiprocessing
import os
import subprocess
import sys
import time
# import logging function
from . import logger
log = logger.log
#****************************#
# Utility functions
#****************************#
def getTime(format=None):
''' Ret... | 30.631579 | 135 | 0.578823 | import hashlib
import json
import multiprocessing
import os
import subprocess
import sys
import time
from . import logger
log = logger.log
def getTime(format=None):
if not format:
return time.strftime("%c")
return time.strftime(format)
def runCmd(command, shell=False, cont=False, debug=False, log=Non... | true | true |
f75a1be7361c4aebe6097b8551a4ede490ca370c | 22,848 | py | Python | format_input.py | bvaisvil/lefse | 6e325486b9d72a3d489b472691d171377d85b589 | [
"MIT"
] | null | null | null | format_input.py | bvaisvil/lefse | 6e325486b9d72a3d489b472691d171377d85b589 | [
"MIT"
] | null | null | null | format_input.py | bvaisvil/lefse | 6e325486b9d72a3d489b472691d171377d85b589 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys,os,argparse,pickle,re,numpy
import functools
#***************************************************************************************************************
#* Log of change *
#* Januar... | 47.799163 | 224 | 0.504027 |
import sys,os,argparse,pickle,re,numpy
import functools
def read_input_file(inp_file, CommonArea):
if inp_file.endswith('.biom'): CommonArea = biom_processing(inp_file) return CommonArea
with open(inp_file) as inp:
CommonArea['ReturnedData'] = [... | true | true |
f75a1c76365b1508b5746a5688ee161f5586df8a | 8,666 | py | Python | built-in/PyTorch/Official/cv/scene_text_detection/PSENet_for_PyTorch/NPU/test/test_npu.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/PyTorch/Official/cv/scene_text_detection/PSENet_for_PyTorch/NPU/test/test_npu.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/PyTorch/Official/cv/scene_text_detection/PSENet_for_PyTorch/NPU/test/test_npu.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # Copyright [yyyy] [name of copyright owner]
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | 36.720339 | 108 | 0.599815 |
import argparse
import collections
import os
import sys
import time
import cv2
import numpy as np
import torch
from torch.utils import data
import models
import util
from dataset import IC15TestLoader
from pypse import pse as pypse
def extend_3c(img):
img = img.reshape(img.shape[0], img.shape[1], 1)
img = ... | true | true |
f75a1ca5964f5673f23bcedd0d466003a0ad4693 | 702 | py | Python | days/day021/bite_003_Word_Values/test_bite_003.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | 2 | 2018-10-28T17:12:37.000Z | 2018-10-28T17:12:39.000Z | days/day021/bite_003_Word_Values/test_bite_003.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | 3 | 2018-10-28T17:11:04.000Z | 2018-10-29T22:36:36.000Z | days/day021/bite_003_Word_Values/test_bite_003.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | null | null | null | from bite_003 import load_words, calc_word_value, max_word_value
words = load_words()
def test_load_words():
assert len(words) == 235886
assert words[0] == 'A'
assert words[-1] == 'Zyzzogeton'
assert ' ' not in ''.join(words)
def test_calc_word_value():
assert calc_word_value('bob'... | 29.25 | 73 | 0.669516 | from bite_003 import load_words, calc_word_value, max_word_value
words = load_words()
def test_load_words():
assert len(words) == 235886
assert words[0] == 'A'
assert words[-1] == 'Zyzzogeton'
assert ' ' not in ''.join(words)
def test_calc_word_value():
assert calc_word_value('bob'... | true | true |
f75a1cc775a09476d78021c6b3b65a4a4868efa3 | 346 | py | Python | Python-Future-Date/weight.py | DSNR/snippets | 12006dd083be60c6444d8b5ca48fd917005e081b | [
"MIT"
] | null | null | null | Python-Future-Date/weight.py | DSNR/snippets | 12006dd083be60c6444d8b5ca48fd917005e081b | [
"MIT"
] | null | null | null | Python-Future-Date/weight.py | DSNR/snippets | 12006dd083be60c6444d8b5ca48fd917005e081b | [
"MIT"
] | null | null | null | import datetime
current_weight = 220
goal_weight = 180
avg_lbs_week = 2
start_date = datetime.date.today()
end_date = start_date
while current_weight > goal_weight:
end_date += datetime.timedelta(days=7)
current_weight -= avg_lbs_week
print(end_date)
print(f'Reached goal in {(end_date - start_... | 21.625 | 68 | 0.719653 | import datetime
current_weight = 220
goal_weight = 180
avg_lbs_week = 2
start_date = datetime.date.today()
end_date = start_date
while current_weight > goal_weight:
end_date += datetime.timedelta(days=7)
current_weight -= avg_lbs_week
print(end_date)
print(f'Reached goal in {(end_date - start_... | true | true |
f75a1d8edb143b917b297b9a0e7f567d72bf96b0 | 12,588 | py | Python | deeplodocus/data/load/loader.py | samuelwestlake/deeplodocus-dev | 12b283ca4eb39abf13ddc56eabc78e01e90627ff | [
"MIT"
] | null | null | null | deeplodocus/data/load/loader.py | samuelwestlake/deeplodocus-dev | 12b283ca4eb39abf13ddc56eabc78e01e90627ff | [
"MIT"
] | null | null | null | deeplodocus/data/load/loader.py | samuelwestlake/deeplodocus-dev | 12b283ca4eb39abf13ddc56eabc78e01e90627ff | [
"MIT"
] | null | null | null | # Python imports
from typing import Optional
from typing import List
from typing import Union
from typing import Any
import numpy as np
import mimetypes
import weakref
# Deeplodocus imports
from deeplodocus.utils.notification import Notification
from deeplodocus.utils.generic_utils import get_int_or_float
from deeplo... | 26.225 | 119 | 0.535431 | from typing import Optional
from typing import List
from typing import Union
from typing import Any
import numpy as np
import mimetypes
import weakref
from deeplodocus.utils.notification import Notification
from deeplodocus.utils.generic_utils import get_int_or_float
from deeplodocus.utils.generic_utils import is_np_... | true | true |
f75a1ea23f81ae167a3013a1bfe3a2335c3bef39 | 455 | py | Python | XiuxiuService/AliSDK/top/api/rest/AlibabaAliqinFcSmsNumSendRequest.py | nightHearter/XiuxiuService | 281c2d5eef85936edcd0d9ec97c8d165078f444c | [
"MIT"
] | null | null | null | XiuxiuService/AliSDK/top/api/rest/AlibabaAliqinFcSmsNumSendRequest.py | nightHearter/XiuxiuService | 281c2d5eef85936edcd0d9ec97c8d165078f444c | [
"MIT"
] | null | null | null | XiuxiuService/AliSDK/top/api/rest/AlibabaAliqinFcSmsNumSendRequest.py | nightHearter/XiuxiuService | 281c2d5eef85936edcd0d9ec97c8d165078f444c | [
"MIT"
] | null | null | null | '''
Created by auto_sdk on 2017.05.15
'''
from top.api.base import RestApi
class AlibabaAliqinFcSmsNumSendRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.extend = None
self.rec_num = None
self.sms_free_sign_name = None
self.sms_param... | 26.764706 | 56 | 0.723077 | from top.api.base import RestApi
class AlibabaAliqinFcSmsNumSendRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.extend = None
self.rec_num = None
self.sms_free_sign_name = None
self.sms_param = None
self.sms_template_code = None
s... | true | true |
f75a1fc8b4d554316a53156cf6faef3348efc70a | 5,437 | py | Python | qiskit/_quantumjob.py | drmandaarbpande/qiskit-sdk-py | 04065ed68be2dbe25aefa1d153057f6f3986ae7b | [
"Apache-2.0"
] | 1 | 2019-03-08T16:25:23.000Z | 2019-03-08T16:25:23.000Z | qiskit/_quantumjob.py | drmandaarbpande/qiskit-sdk-py | 04065ed68be2dbe25aefa1d153057f6f3986ae7b | [
"Apache-2.0"
] | null | null | null | qiskit/_quantumjob.py | drmandaarbpande/qiskit-sdk-py | 04065ed68be2dbe25aefa1d153057f6f3986ae7b | [
"Apache-2.0"
] | 1 | 2020-12-13T23:03:20.000Z | 2020-12-13T23:03:20.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 40.574627 | 80 | 0.565753 |
import random
import string
from qiskit import _openquantumcompiler as openquantumcompiler
import qiskit.backends as backends
class QuantumJob():
def __init__(self, circuits, backend='local_qasm_simulator',
circuit_config=None, seed=None,
resources=None,
s... | true | true |
f75a204101d1a1aaad3d29f1fbb6ce74ee0f4f61 | 11,332 | py | Python | spearmint/kernels/matern.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 4 | 2020-05-24T14:19:13.000Z | 2021-03-31T08:46:49.000Z | spearmint/kernels/matern.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | null | null | null | spearmint/kernels/matern.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 9 | 2018-06-28T13:06:35.000Z | 2021-06-20T18:21:58.000Z | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... | 47.414226 | 99 | 0.755295 | # expenses of litigation) incurred by or imposed upon the Indemnitees
# or any one of them in connection with any claims, suits, actions,
# demands or judgments arising from End User’s breach of this
# Agreement or its Institution’s use of the Software except to the
# extent caused by the gross negligence or willful mi... | true | true |
f75a20ccddfead1640a4dfa6f72ce07103e91666 | 3,292 | py | Python | .github/scripts/build_assets/api_handler.py | JRcalado/devicons | 0121dda970f0424593a80bb87d9ea712c27d2dec | [
"MIT"
] | 2 | 2021-12-01T07:45:09.000Z | 2021-12-04T08:49:04.000Z | .github/scripts/build_assets/api_handler.py | levilimas/devicon | 00f02ef57fb7601fd1ddcc2fe6fe670fef3ae3e4 | [
"MIT"
] | 3 | 2021-02-23T20:08:26.000Z | 2021-04-11T00:37:25.000Z | .github/scripts/build_assets/api_handler.py | levilimas/devicon | 00f02ef57fb7601fd1ddcc2fe6fe670fef3ae3e4 | [
"MIT"
] | 1 | 2021-11-22T11:10:17.000Z | 2021-11-22T11:10:17.000Z | import requests
import sys
import re
def get_merged_pull_reqs_since_last_release(token):
"""
Get all the merged pull requests since the last release.
"""
stopPattern = r"^(r|R)elease v"
pull_reqs = []
found_last_release = False
page = 1
print("Getting PRs since last release.")
whi... | 32.27451 | 111 | 0.63548 | import requests
import sys
import re
def get_merged_pull_reqs_since_last_release(token):
stopPattern = r"^(r|R)elease v"
pull_reqs = []
found_last_release = False
page = 1
print("Getting PRs since last release.")
while not found_last_release:
data = get_merged_pull_reqs(token, page)
... | true | true |
f75a218989039642d069610b4f37742b6d728b6d | 461 | py | Python | sympy/parsing/autolev/test-examples/ruletest12.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | sympy/parsing/autolev/test-examples/ruletest12.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | sympy/parsing/autolev/test-examples/ruletest12.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | import sympy.physics.mechanics as me
import sympy as sm
import math as m
import numpy as np
x, y = me.dynamicsymbols('x y')
a, b, r = sm.symbols('a b r', real=True)
eqn = sm.Matrix([[0]])
eqn[0] = a*x**3+b*y**2-r
eqn = eqn.row_insert(eqn.shape[0], sm.Matrix([[0]]))
eqn[eqn.shape[0]-1] = a*sm.sin(x)**2+b*sm.cos(2*y)-r*... | 30.733333 | 62 | 0.642082 | import sympy.physics.mechanics as me
import sympy as sm
import math as m
import numpy as np
x, y = me.dynamicsymbols('x y')
a, b, r = sm.symbols('a b r', real=True)
eqn = sm.Matrix([[0]])
eqn[0] = a*x**3+b*y**2-r
eqn = eqn.row_insert(eqn.shape[0], sm.Matrix([[0]]))
eqn[eqn.shape[0]-1] = a*sm.sin(x)**2+b*sm.cos(2*y)-r*... | true | true |
f75a2262207b19434ba5d3b7c28049e77aa78d32 | 1,233 | py | Python | afterflight/progressbarupload/templatetags/progress_bar.py | foobarbecue/afterflight | 7085f719593f88999dce93f35caec5f15d2991b6 | [
"Apache-2.0"
] | 1 | 2019-03-27T08:34:36.000Z | 2019-03-27T08:34:36.000Z | afterflight/progressbarupload/templatetags/progress_bar.py | foobarbecue/afterflight | 7085f719593f88999dce93f35caec5f15d2991b6 | [
"Apache-2.0"
] | null | null | null | afterflight/progressbarupload/templatetags/progress_bar.py | foobarbecue/afterflight | 7085f719593f88999dce93f35caec5f15d2991b6 | [
"Apache-2.0"
] | 1 | 2021-05-15T06:09:44.000Z | 2021-05-15T06:09:44.000Z | import uuid
from django import template
from django.forms.widgets import Media
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from settings import PROGRESSBARUPLOAD_INCLUDE_JQUERY
register = template.Library()
@register.simple_tag
def progress_bar():
"""
progress... | 27.4 | 74 | 0.69262 | import uuid
from django import template
from django.forms.widgets import Media
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from settings import PROGRESSBARUPLOAD_INCLUDE_JQUERY
register = template.Library()
@register.simple_tag
def progress_bar():
progress_bar_tag... | true | true |
f75a235c457100e8a2cee9f6d4b7e32f6e6e0043 | 71,606 | py | Python | sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | trucleduc/beam | 35b1ba8b0c25e6a54c6ebeac06ffc573082d5b63 | [
"Apache-2.0"
] | 1 | 2021-05-23T02:17:11.000Z | 2021-05-23T02:17:11.000Z | sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | almamuncsit/beam | aa58e1e5db4af2a6f97520756831e87aa1d3e3fb | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | almamuncsit/beam | aa58e1e5db4af2a6f97520756831e87aa1d3e3fb | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 42.673421 | 99 | 0.709591 |
from __future__ import absolute_import
from __future__ import division
import base64
import logging
import os
import subprocess
import sys
import threading
import time
import traceback
import urllib
from builtins import hex
from collections import defaultdict
from typing import TYPE_CHECKING
from typing import List
... | true | true |
f75a23643655220e8acc579927e7db1094649707 | 547 | py | Python | lib/click-6.6/tests/test_bashcomplete.py | brianrodri/google_appengine | ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43 | [
"Apache-2.0"
] | 26 | 2015-01-20T08:02:38.000Z | 2020-06-10T04:57:41.000Z | lib/click-6.6/tests/test_bashcomplete.py | brianrodri/google_appengine | ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43 | [
"Apache-2.0"
] | 4 | 2018-03-28T16:49:17.000Z | 2019-11-02T18:35:02.000Z | lib/click-6.6/tests/test_bashcomplete.py | brianrodri/google_appengine | ec4e7cdfa1afd99de23b0a32eb94563fe5e6ef43 | [
"Apache-2.0"
] | 13 | 2016-02-28T00:14:23.000Z | 2021-05-03T15:47:36.000Z | # -*- coding: utf-8 -*-
import click
from click._bashcomplete import get_choices
def test_basic():
@click.group()
@click.option('--global-opt')
def cli(global_opt):
pass
@cli.command()
@click.option('--local-opt')
def sub(local_opt):
pass
assert list(get_choices(cli, 'lol... | 26.047619 | 73 | 0.557587 |
import click
from click._bashcomplete import get_choices
def test_basic():
@click.group()
@click.option('--global-opt')
def cli(global_opt):
pass
@cli.command()
@click.option('--local-opt')
def sub(local_opt):
pass
assert list(get_choices(cli, 'lol', [], '')) == ['sub']
... | true | true |
f75a2366574f947785d7899a5099d21f687a103a | 4,030 | py | Python | nldi_xstool/__openChannel.py | ACWI-SSWD/nldi_xstool | f201befc6454202042d2ed76e82c3c07edcf4c48 | [
"CC0-1.0"
] | null | null | null | nldi_xstool/__openChannel.py | ACWI-SSWD/nldi_xstool | f201befc6454202042d2ed76e82c3c07edcf4c48 | [
"CC0-1.0"
] | 2 | 2021-06-25T15:13:51.000Z | 2021-07-15T18:38:12.000Z | nldi_xstool/__openChannel.py | ACWI-SSWD/nldi_xstool | f201befc6454202042d2ed76e82c3c07edcf4c48 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 5 16:26:25 2015
@author: mweier
"""
import numpy as np
from numba import jit
@jit
def channelBuilder(wsDepth, rightSS, leftSS, widthBottom):
"""
Builds trapziodal channel station/elevation array given depth,
right side slope, left side slope, and bottom wi... | 30.074627 | 97 | 0.562779 |
import numpy as np
from numba import jit
@jit
def channelBuilder(wsDepth, rightSS, leftSS, widthBottom):
leftToe = wsDepth*1.25*leftSS
rightToe = wsDepth*1.25*rightSS
staElev = np.array([(0.0, wsDepth*1.25),
(leftToe, 0.0),
(leftToe + widthBottom, 0.0),
... | true | true |
f75a246d15af09379df82fc26e15b7ef9fab2ee2 | 1,384 | py | Python | src/quiggler/models.py | nalch/quiggler | c3f1945a92d6d070c3670c0b3627757da6b0375c | [
"Apache-2.0"
] | null | null | null | src/quiggler/models.py | nalch/quiggler | c3f1945a92d6d070c3670c0b3627757da6b0375c | [
"Apache-2.0"
] | 1 | 2021-09-03T02:02:06.000Z | 2021-09-03T02:02:06.000Z | src/quiggler/models.py | nalch/quiggler | c3f1945a92d6d070c3670c0b3627757da6b0375c | [
"Apache-2.0"
] | null | null | null | from boltons.strutils import slugify
from django.db import models
from quiggler.constants import QUILT_TYPES, QUILT_TYPES_DEFAULT
class SlugModel(models.Model):
slug = models.SlugField(primary_key=True, unique=True, editable=False)
name = models.CharField(max_length=255)
class Meta:
abstract = T... | 30.086957 | 100 | 0.714595 | from boltons.strutils import slugify
from django.db import models
from quiggler.constants import QUILT_TYPES, QUILT_TYPES_DEFAULT
class SlugModel(models.Model):
slug = models.SlugField(primary_key=True, unique=True, editable=False)
name = models.CharField(max_length=255)
class Meta:
abstract = T... | true | true |
f75a24e138666443e5bea091fb166475a84f9128 | 1,698 | py | Python | src/gausskernel/dbmind/xtuner/tuner/knobs/knobs_tp.py | wotchin/openGauss-server | ebd92e92b0cfd76b121d98e4c57a22d334573159 | [
"MulanPSL-1.0"
] | 1 | 2020-06-30T15:00:50.000Z | 2020-06-30T15:00:50.000Z | src/gausskernel/dbmind/xtuner/tuner/knobs/knobs_tp.py | wotchin/openGauss-server | ebd92e92b0cfd76b121d98e4c57a22d334573159 | [
"MulanPSL-1.0"
] | null | null | null | src/gausskernel/dbmind/xtuner/tuner/knobs/knobs_tp.py | wotchin/openGauss-server | ebd92e92b0cfd76b121d98e4c57a22d334573159 | [
"MulanPSL-1.0"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co.,Ltd.
#
# openGauss is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
#
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS... | 23.260274 | 86 | 0.47232 |
rl_knobs = {
"work_mem": {
"default": 2048,
"max": 262144,
"min": 64,
"unit": "kb",
"type": "int"
},
"shared_buffers": {
"default": 65536,
"max": 1048576,
"min": 16,
"unit": "8kB",
"type": "int",
"reboot": True
},
... | true | true |
f75a2573837c7c60694a881a451bdebdb9857002 | 2,143 | py | Python | example/content/views.py | eGenGuru/django-sirtrevor | 873dc572eeedba0257c393e1a93e7be790e07d67 | [
"MIT"
] | 39 | 2015-02-10T00:30:03.000Z | 2020-11-07T19:11:59.000Z | example/content/views.py | eGenGuru/django-sirtrevor | 873dc572eeedba0257c393e1a93e7be790e07d67 | [
"MIT"
] | 5 | 2015-01-16T17:56:01.000Z | 2018-11-30T13:09:26.000Z | example/content/views.py | eGenGuru/django-sirtrevor | 873dc572eeedba0257c393e1a93e7be790e07d67 | [
"MIT"
] | 16 | 2015-06-01T03:36:00.000Z | 2020-09-18T12:44:16.000Z | import json
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.views.generic import FormView, CreateView, DetailView
from sirtrevor import SirTrevorContent
from .forms import ContentForm, ContentModelForm
from .models import Content
TEST_CONTENT = {
"data": [
{
... | 28.959459 | 360 | 0.572095 | import json
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.views.generic import FormView, CreateView, DetailView
from sirtrevor import SirTrevorContent
from .forms import ContentForm, ContentModelForm
from .models import Content
TEST_CONTENT = {
"data": [
{
... | true | true |
f75a270a31e3fa3fa9adf3f08e3cfbeb39d46dd3 | 631 | py | Python | empower/managers/__init__.py | altonbill/empower-runtime | f400140aebd541f23a04891d7b873b3b2c63336e | [
"Apache-2.0"
] | 52 | 2016-04-18T09:40:29.000Z | 2021-12-14T19:32:21.000Z | empower/managers/__init__.py | altonbill/empower-runtime | f400140aebd541f23a04891d7b873b3b2c63336e | [
"Apache-2.0"
] | 36 | 2016-07-04T14:10:58.000Z | 2021-08-13T01:10:32.000Z | empower/managers/__init__.py | altonbill/empower-runtime | f400140aebd541f23a04891d7b873b3b2c63336e | [
"Apache-2.0"
] | 51 | 2016-04-20T14:21:32.000Z | 2022-03-18T14:43:56.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2019 Roberto Riggio
#
# 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 applicabl... | 33.210526 | 66 | 0.748019 | true | true | |
f75a277c0122aaa4314f036ee27c7225a59b0907 | 8,356 | py | Python | docs/conf.py | richardjgowers/foyer | 65532495f77e7e78f8e27a653bff582039f51ed7 | [
"MIT"
] | null | null | null | docs/conf.py | richardjgowers/foyer | 65532495f77e7e78f8e27a653bff582039f51ed7 | [
"MIT"
] | null | null | null | docs/conf.py | richardjgowers/foyer | 65532495f77e7e78f8e27a653bff582039f51ed7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 29.114983 | 99 | 0.665989 |
import os
import pip
import sys
import mock
MOCK_MODULES = ['numpy',
'mdtraj',
'mdtraj.core.element',
'mbuild'
'networkx',
'oset',
'parmed',
'parmed.periodic_table',
'scipy',
... | true | true |
f75a2792699fc4a809b6939cd2cea400c3155bcd | 566 | py | Python | checkout/migrations/0004_order_user_profile.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | null | null | null | checkout/migrations/0004_order_user_profile.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | null | null | null | checkout/migrations/0004_order_user_profile.py | aineon/velvet-goldmine | f775c212c937e56e83d1c288ef1a7c4d8210c023 | [
"RSA-MD",
"Info-ZIP"
] | 2 | 2021-04-30T10:28:58.000Z | 2021-07-17T10:00:21.000Z | # Generated by Django 3.1.7 on 2021-04-02 17:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
('checkout', '0003_auto_20210402_1428'),
]
operations = [
migrations.Ad... | 26.952381 | 155 | 0.64841 |
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
('checkout', '0003_auto_20210402_1428'),
]
operations = [
migrations.AddField(
model_name='order',
... | true | true |
f75a28748fcf2d6f9fd68d27d704cf0d2f6ee399 | 4,514 | py | Python | models/matcher.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | 2 | 2020-07-17T15:09:47.000Z | 2020-11-20T13:52:48.000Z | models/matcher.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | null | null | null | models/matcher.py | whq-hqw/detr_change | 142f75cc5e0b59ca6e07928ddcbed3e461816611 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Modules to compute the matching cost and solve the corresponding LSAP.
"""
import torch
from scipy.optimize import linear_sum_assignment
from torch import nn
from util.box_ops import box_cxcywh_to_xyxy, generalized_box_iou
class HungarianMatc... | 49.604396 | 119 | 0.67922 | import torch
from scipy.optimize import linear_sum_assignment
from torch import nn
from util.box_ops import box_cxcywh_to_xyxy, generalized_box_iou
class HungarianMatcher(nn.Module):
def __init__(self, cost_class: float = 1, cost_bbox: float = 1, cost_giou: float = 1):
super().__init__()
self.co... | true | true |
f75a293952b8d2f33cb254ea003cbdb20ed5ed33 | 23,163 | py | Python | salt/cloud/clouds/digital_ocean_v2.py | Achimh3011/salt | b6e6968c22f840df0d43bea7e99c188c623b850b | [
"Apache-2.0"
] | 1 | 2016-04-26T03:42:32.000Z | 2016-04-26T03:42:32.000Z | salt/cloud/clouds/digital_ocean_v2.py | apergos/salt | 106c715d495a9c2bd747c8ca75745236b0d7fb41 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/digital_ocean_v2.py | apergos/salt | 106c715d495a9c2bd747c8ca75745236b0d7fb41 | [
"Apache-2.0"
] | 1 | 2021-12-02T15:30:00.000Z | 2021-12-02T15:30:00.000Z | # -*- coding: utf-8 -*-
'''
DigitalOcean Cloud Module v2
============================
The DigitalOcean cloud module is used to control access to the DigitalOcean
VPS system.
Use of this module only requires the ``personal_access_token`` parameter to be set. Set up the
cloud configuration at ``/etc/salt/cloud.provider... | 29.849227 | 161 | 0.594612 | from __future__ import absolute_import
import os
import copy
import time
import json
import pprint
import requests
import logging
import salt.utils.cloud
import salt.config as config
from salt.exceptions import (
SaltCloudConfigError,
SaltCloudNotFound,
SaltCloudSystemExit,
SaltCloudExecutionFailure,
... | true | true |
f75a2a1f2c2213c0b623fe4f49cfef754fea2215 | 300 | py | Python | xiaoxuan/Question_4.py | loongoo/GitDemo | 7098edab6581dfd12d9b966154762f314410902a | [
"MIT"
] | null | null | null | xiaoxuan/Question_4.py | loongoo/GitDemo | 7098edab6581dfd12d9b966154762f314410902a | [
"MIT"
] | null | null | null | xiaoxuan/Question_4.py | loongoo/GitDemo | 7098edab6581dfd12d9b966154762f314410902a | [
"MIT"
] | null | null | null | # encoding: utf-8
def Fib(n):
if n == 0:
return 0
elif n == 1:
return 1
elif n >= 2:
return Fib(n - 1) + Fib(n - 2)
def sequence(n):
seq = []
for num in range(n + 1):
seq.append(Fib(num))
print seq
if __name__== "__main__":
sequence(20) | 15.789474 | 38 | 0.486667 |
def Fib(n):
if n == 0:
return 0
elif n == 1:
return 1
elif n >= 2:
return Fib(n - 1) + Fib(n - 2)
def sequence(n):
seq = []
for num in range(n + 1):
seq.append(Fib(num))
print seq
if __name__== "__main__":
sequence(20) | false | true |
f75a2b90902cb9f04c620676bd3271517bb0b7ef | 3,641 | py | Python | setup.py | chrissmith-mcafee/opendxl-maxmind-client-python | 1769a60e88d8d30066a945692984208b4ead7e63 | [
"Apache-2.0"
] | 3 | 2017-05-04T18:42:03.000Z | 2019-03-16T19:33:58.000Z | setup.py | chrissmith-mcafee/opendxl-maxmind-client-python | 1769a60e88d8d30066a945692984208b4ead7e63 | [
"Apache-2.0"
] | 1 | 2018-03-27T20:30:33.000Z | 2018-03-27T20:30:33.000Z | setup.py | chrissmith-mcafee/opendxl-maxmind-client-python | 1769a60e88d8d30066a945692984208b4ead7e63 | [
"Apache-2.0"
] | 3 | 2017-08-01T18:31:28.000Z | 2020-02-19T19:01:31.000Z | # pylint: disable=no-member, no-name-in-module, import-error
from __future__ import absolute_import
import glob
import os
import distutils.command.sdist
import distutils.log
import subprocess
from setuptools import Command, setup
import setuptools.command.sdist
# Patch setuptools' sdist behaviour with distutils' sdis... | 28.224806 | 91 | 0.620983 |
from __future__ import absolute_import
import glob
import os
import distutils.command.sdist
import distutils.log
import subprocess
from setuptools import Command, setup
import setuptools.command.sdist
setuptools.command.sdist.sdist.run = distutils.command.sdist.sdist.run
VERSION_INFO = {}
CWD = os.path.abspath(os.pa... | true | true |
f75a2bcfaa6ecc7e945cda41e7de47fa4bf22645 | 1,778 | py | Python | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/StopScdnDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/StopScdnDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/StopScdnDomainRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.56 | 74 | 0.766592 |
from aliyunsdkcore.request import RpcRequest
from aliyunsdkscdn.endpoint import endpoint_data
class StopScdnDomainRequest(RpcRequest):
def __init__(self):
RpcRequest.__init__(self, 'scdn', '2017-11-15', 'StopScdnDomain')
self.set_method('POST')
if hasattr(self, "endpoint_map"):
setattr(self, "endpoint_map... | true | true |
f75a2becb508489fb9b471e380f9c5346cf6205c | 159,454 | py | Python | python/ccxt/okex.py | XandeTorres/ccxt | 0edbf63ad4151855eccf6864e032d6779b549b40 | [
"MIT"
] | 24,910 | 2017-10-27T21:41:59.000Z | 2022-03-31T23:08:57.000Z | python/ccxt/okex.py | rafaelfliu/ccxt | fff2bdfb6efccdd9bdbe56f89721d64c54ba8615 | [
"MIT"
] | 8,201 | 2017-10-28T10:19:28.000Z | 2022-03-31T23:49:37.000Z | python/ccxt/okex.py | rafaelfliu/ccxt | fff2bdfb6efccdd9bdbe56f89721d64c54ba8615 | [
"MIT"
] | 6,632 | 2017-10-28T02:53:24.000Z | 2022-03-31T23:20:14.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticati... | 44.967287 | 515 | 0.473748 |
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from ccxt.base.errors import PermissionDenied
from ccxt.base.errors import AccountSuspended
from ccxt.base.errors import ArgumentsRequired
from ccxt.base.errors import Bad... | true | true |
f75a2c9071c5a9c9921f3041e485b8fd5b2af567 | 1,800 | py | Python | backend/rumergy_backend/rumergy/signals.py | Firefly-Tech/rumergy-webapp | 859054bd9ee710a11b393027bb9cb1bad55d0f00 | [
"MIT"
] | 1 | 2021-11-08T00:28:37.000Z | 2021-11-08T00:28:37.000Z | backend/rumergy_backend/rumergy/signals.py | Firefly-Tech/rumergy-webapp | 859054bd9ee710a11b393027bb9cb1bad55d0f00 | [
"MIT"
] | 1 | 2021-11-02T02:17:37.000Z | 2021-11-02T02:17:37.000Z | backend/rumergy_backend/rumergy/signals.py | Firefly-Tech/rumergy-webapp | 859054bd9ee710a11b393027bb9cb1bad55d0f00 | [
"MIT"
] | 1 | 2021-10-18T22:27:04.000Z | 2021-10-18T22:27:04.000Z | from django.core.mail import EmailMultiAlternatives
from django.dispatch import receiver
from django.template.loader import render_to_string
from django.urls import reverse
from django.conf import settings
from decouple import config
from django_rest_passwordreset.signals import reset_password_token_created
from django... | 34.615385 | 97 | 0.723333 | from django.core.mail import EmailMultiAlternatives
from django.dispatch import receiver
from django.template.loader import render_to_string
from django.urls import reverse
from django.conf import settings
from decouple import config
from django_rest_passwordreset.signals import reset_password_token_created
from django... | true | true |
f75a2dcdfab017f9e1147695c83ddc283ba40cd1 | 2,447 | py | Python | src/xuex-ai/storage/stores/nosql/mongo/dao/processor.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | null | null | null | src/xuex-ai/storage/stores/nosql/mongo/dao/processor.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | null | null | null | src/xuex-ai/storage/stores/nosql/mongo/dao/processor.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, m... | 34.957143 | 120 | 0.692685 | from programy.storage.stores.utils import DAOUtils
class Processor(object):
def __init__(self, classname):
self.id = None
self.classname = classname
def to_document(self):
document = {"classname": self.classname}
if self.id is not None:
document['_id'] = self.id
... | true | true |
f75a2f23ff814fb68cb3965a71b201a3ddad0c88 | 501 | py | Python | apps/receitas/migrations/0002_receita_pessoa.py | Jumbeba/rafa_receitas | 67bbdec8f07a86c5caa5b0229600faae5f1ea623 | [
"MIT"
] | null | null | null | apps/receitas/migrations/0002_receita_pessoa.py | Jumbeba/rafa_receitas | 67bbdec8f07a86c5caa5b0229600faae5f1ea623 | [
"MIT"
] | null | null | null | apps/receitas/migrations/0002_receita_pessoa.py | Jumbeba/rafa_receitas | 67bbdec8f07a86c5caa5b0229600faae5f1ea623 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-11-19 11:25
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('receitas', '0001_initial'),
]
operations = [
migrations.AddField(
... | 23.857143 | 110 | 0.654691 |
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('receitas', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='receita',
name='pess... | true | true |
f75a2f5dc6645827f7825e31dd8ab095242cfd6c | 231 | py | Python | tests/basics/del-name.py | lurch/micropython | 28dfbc2ba2ef41a7810e4e39290031eb2207a0a9 | [
"MIT"
] | 2 | 2019-04-17T03:56:40.000Z | 2019-04-17T03:56:42.000Z | tests/basics/del_name.py | roger-/micropython | bad2df3e95cd5719099319d71590a79bf6bc4493 | [
"MIT"
] | null | null | null | tests/basics/del_name.py | roger-/micropython | bad2df3e95cd5719099319d71590a79bf6bc4493 | [
"MIT"
] | 2 | 2016-12-19T14:41:42.000Z | 2019-04-07T16:13:58.000Z | # del global
x = 1
print(x)
del x
try:
print(x)
except NameError:
print("NameError")
try:
del x
except: # NameError:
# FIXME uPy returns KeyError for this
print("NameError")
class C:
def f():
pass
| 12.157895 | 41 | 0.601732 |
x = 1
print(x)
del x
try:
print(x)
except NameError:
print("NameError")
try:
del x
except: print("NameError")
class C:
def f():
pass
| true | true |
f75a2f67ff98ffc04b4df0f1499e899d4aa4af8b | 3,524 | py | Python | liquid/builtin/filters/math.py | jg-rp/liquid | a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c | [
"MIT"
] | 19 | 2021-03-20T05:44:23.000Z | 2022-03-24T18:34:34.000Z | liquid/builtin/filters/math.py | jg-rp/liquid | a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c | [
"MIT"
] | 50 | 2020-12-07T15:30:56.000Z | 2022-03-25T17:10:10.000Z | liquid/builtin/filters/math.py | jg-rp/liquid | a2946d3ee7f8ac0c8db05f943ff8deb10bfad18c | [
"MIT"
] | 3 | 2021-01-24T15:51:22.000Z | 2022-03-25T16:00:17.000Z | """Maths related filter definitions."""
import math
import decimal
from typing import Optional
from typing import Union
from liquid.context import is_undefined
from liquid.exceptions import FilterArgumentError
from liquid.filter import math_filter
from liquid.filter import num_arg
from liquid.filter import int_arg
... | 26.900763 | 82 | 0.677639 |
import math
import decimal
from typing import Optional
from typing import Union
from liquid.context import is_undefined
from liquid.exceptions import FilterArgumentError
from liquid.filter import math_filter
from liquid.filter import num_arg
from liquid.filter import int_arg
DecimalT = decimal.Decimal
NumberT = Un... | true | true |
f75a302ae3c5311ef43b08cccca588d2838cfb80 | 13,607 | py | Python | amy/autoemails/models.py | za/amy | 1d8ab79fcb0b9057f22c6ca0a65ec0bad5f3a440 | [
"MIT"
] | null | null | null | amy/autoemails/models.py | za/amy | 1d8ab79fcb0b9057f22c6ca0a65ec0bad5f3a440 | [
"MIT"
] | null | null | null | amy/autoemails/models.py | za/amy | 1d8ab79fcb0b9057f22c6ca0a65ec0bad5f3a440 | [
"MIT"
] | null | null | null | from collections import namedtuple
from typing import List, Optional
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.mail import EmailMultiAlternatives
from django.db import models
from django.template import Template, TemplateSyntaxError, engines
from django.urls i... | 33.848259 | 111 | 0.610274 | from collections import namedtuple
from typing import List, Optional
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.mail import EmailMultiAlternatives
from django.db import models
from django.template import Template, TemplateSyntaxError, engines
from django.urls i... | true | true |
f75a30b2a99d4cf06f531ae2f01dbee23c7ce49e | 2,072 | py | Python | src/Provision/ResetAndUpdate_AZURE.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | src/Provision/ResetAndUpdate_AZURE.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | src/Provision/ResetAndUpdate_AZURE.py | foundriesio/plug-and-trust-ssscli | f77c65d5b3de649d7db1c023ee41d871f77cd224 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 NXP
# SPDX-License-Identifier: Apache-2.0
#
#
# This script is used to provision key and certificate to secure element.
# These Provisioned keys and certificates are used in azure demo
from .Provision_util import *
from . import cloud_credentials
def reset_and_update(cur_dir, keypair_index_priva... | 33.419355 | 100 | 0.614865 |
from .Provision_util import *
from . import cloud_credentials
def reset_and_update(cur_dir, keypair_index_private, certificate_index):
session_obj = session_open()
SE_UID = get_unique_id(session_obj)
if SE_UID is None or SE_UID == 0:
return STATUS_FAIL
INPUT_DIR = cur_dir + os.se... | true | true |
f75a3110739b048736dda2f3a6df3319c3b77716 | 20,910 | py | Python | manuscript_analyses/excisionFinder/hg38_analysis/src/ExcisionFinder_hg38.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | null | null | null | manuscript_analyses/excisionFinder/hg38_analysis/src/ExcisionFinder_hg38.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | null | null | null | manuscript_analyses/excisionFinder/hg38_analysis/src/ExcisionFinder_hg38.py | LLataniotis/AlleleAnalyzer | ab50ab5d4b6c20138fb29500da419f52b6fdb670 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
"""
ExcisionFinder identifies allele-specific excision sites. Written in Python version 3.6.1.
Kathleen Keough et al 2017-2018.
Note: This version of the script is intended only for analysis of large cohorts, particularly the
1000 Genomes cohort. There is a more general purpose script for small... | 20,910 | 20,910 | 0.621473 | false | true | |
f75a3532392a23ba2ded3e814e2b396972667575 | 4,965 | py | Python | RegSimple/Testing&Shelved/AutoDomainFinder_v3.0.py | kxu776/WebScrapingMirror | 85a7dbb61baa29ce805b1e41d7ab21ee091d0bb7 | [
"MIT"
] | null | null | null | RegSimple/Testing&Shelved/AutoDomainFinder_v3.0.py | kxu776/WebScrapingMirror | 85a7dbb61baa29ce805b1e41d7ab21ee091d0bb7 | [
"MIT"
] | null | null | null | RegSimple/Testing&Shelved/AutoDomainFinder_v3.0.py | kxu776/WebScrapingMirror | 85a7dbb61baa29ce805b1e41d7ab21ee091d0bb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 19 17:54:29 2018
@author: ujejskik
"""
from bs4 import BeautifulSoup, SoupStrainer
from urllib.request import urlopen
import urllib.request as ul
from urllib.parse import urlparse, urljoin
import time
import tkinter
from tkinter.filedialog import askopenfilename
import p... | 30.838509 | 150 | 0.614502 |
from bs4 import BeautifulSoup, SoupStrainer
from urllib.request import urlopen
import urllib.request as ul
from urllib.parse import urlparse, urljoin
import time
import tkinter
from tkinter.filedialog import askopenfilename
import pandas as pd
from random import randint
from Blacklists import BLACKLIST, INVALID_TYPES ... | true | true |
f75a359a93b6e6c9182ec7b3e5e20bb505d03564 | 2,604 | py | Python | theorem_predict/eval_transformer.py | lupantech/InterGPS | 0f326027d16d7d50a9c189f897739dfb95085021 | [
"MIT"
] | 69 | 2021-05-11T23:12:18.000Z | 2022-03-14T07:23:25.000Z | theorem_predict/eval_transformer.py | lupantech/InterGPS | 0f326027d16d7d50a9c189f897739dfb95085021 | [
"MIT"
] | 8 | 2021-07-21T09:55:42.000Z | 2022-02-15T02:31:47.000Z | theorem_predict/eval_transformer.py | lupantech/InterGPS | 0f326027d16d7d50a9c189f897739dfb95085021 | [
"MIT"
] | 21 | 2021-07-26T09:08:16.000Z | 2022-03-24T09:50:21.000Z | #!/usr/bin/env python
# coding: utf-8
import json
import ast
from tqdm import tqdm
import torch
from transformers import BartForConditionalGeneration, BartTokenizerFast
def evaluate(diagram_logic_file, text_logic_file, tokenizer_name, model_name, check_point, seq_num):
test_lst = range(2401, 3002)
## read... | 32.148148 | 108 | 0.649002 |
import json
import ast
from tqdm import tqdm
import torch
from transformers import BartForConditionalGeneration, BartTokenizerFast
def evaluate(diagram_logic_file, text_logic_file, tokenizer_name, model_name, check_point, seq_num):
test_lst = range(2401, 3002)
with open(diagram_logic_file) as f:
... | true | true |
f75a367ef6b8eb61d26b11eacc2b59ac586efdde | 6,996 | py | Python | research/cv/StackedHourglass/infer/sdk/eval/api.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/StackedHourglass/infer/sdk/eval/api.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/StackedHourglass/infer/sdk/eval/api.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 41.892216 | 112 | 0.617067 | import json
import logging
import MxpiDataType_pb2 as MxpiDataType
from StreamManagerApi import StreamManagerApi, MxDataInput, InProtobufVector, MxProtobufIn, StringVector
class SdkApi:
INFER_TIMEOUT = 3000
STREAM_NAME = "im_hourglass"
def __init__(self, pipeline_cfg="./config/StackedHourglass.... | true | true |
f75a3728d39d27c0e8b86fa07eed6328d5271978 | 366 | py | Python | top/mkrvidor4000/Manifest.py | hdl-util/AS4C4M16SA-7XCN | 9b444b9fcd6668c61babc11beeed4cdd0d71e31e | [
"Apache-2.0",
"MIT"
] | 42 | 2020-05-03T17:40:19.000Z | 2021-11-17T11:09:34.000Z | top/mkrvidor4000/Manifest.py | hdl-util/AS4C4M16SA-7XCN | 9b444b9fcd6668c61babc11beeed4cdd0d71e31e | [
"Apache-2.0",
"MIT"
] | null | null | null | top/mkrvidor4000/Manifest.py | hdl-util/AS4C4M16SA-7XCN | 9b444b9fcd6668c61babc11beeed4cdd0d71e31e | [
"Apache-2.0",
"MIT"
] | 5 | 2020-05-04T01:29:03.000Z | 2022-03-19T06:51:44.000Z | files = [
"mkrvidor4000_top.sv"
]
modules = {
"git": [
"git@github.com:hdl-util/hdmi.git::master",
"git@github.com:hdl-util/sound.git::master",
"git@github.com:hdl-util/vga-text-mode.git::master",
"git@github.com:hdl-util/clock-domain-crossing.git::master"
],
"local" : [... | 22.875 | 67 | 0.565574 | files = [
"mkrvidor4000_top.sv"
]
modules = {
"git": [
"git@github.com:hdl-util/hdmi.git::master",
"git@github.com:hdl-util/sound.git::master",
"git@github.com:hdl-util/vga-text-mode.git::master",
"git@github.com:hdl-util/clock-domain-crossing.git::master"
],
"local" : [... | true | true |
f75a3732c2a5ac821166cd2889c9259b513c106c | 1,492 | py | Python | abbyy_to_epub3/utils.py | tfmorris/abbyy-to-epub3 | 946d6247bdcfbd6dc69eda6590fece18a74d898d | [
"Apache-2.0"
] | 2 | 2019-03-13T00:58:37.000Z | 2020-10-28T13:13:36.000Z | abbyy_to_epub3/utils.py | tfmorris/abbyy-to-epub3 | 946d6247bdcfbd6dc69eda6590fece18a74d898d | [
"Apache-2.0"
] | null | null | null | abbyy_to_epub3/utils.py | tfmorris/abbyy-to-epub3 | 946d6247bdcfbd6dc69eda6590fece18a74d898d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Deborah Kaplan
#
# 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 writin... | 30.44898 | 77 | 0.640751 |
def is_increasing(l):
for a, b in zip(l, l[1:]):
if a >= b:
return False
return True
def dirtify_xml(text):
text = text.replace("&", "&")
text = text.replace("<", "<")
text = text.replace(">", ">")
text = text.replace('"', """)
text = text.replace("&apo... | true | true |
f75a377eb6f985abc401767d1c586ef423e0294d | 8,752 | py | Python | util/decrypt_and_verify_cert_bundles.py | mhqz/deflect | ea1ffeb77a867185f287b56810a49455b2fff8ff | [
"CC-BY-4.0"
] | null | null | null | util/decrypt_and_verify_cert_bundles.py | mhqz/deflect | ea1ffeb77a867185f287b56810a49455b2fff8ff | [
"CC-BY-4.0"
] | null | null | null | util/decrypt_and_verify_cert_bundles.py | mhqz/deflect | ea1ffeb77a867185f287b56810a49455b2fff8ff | [
"CC-BY-4.0"
] | null | null | null | # Copyright (c) 2021, eQualit.ie inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import shutil
import gnupg
import certifi
import tarfile
from cryptography.hazmat.primitives import... | 33.532567 | 102 | 0.674246 |
import logging
import os
import shutil
import gnupg
import certifi
import tarfile
from cryptography.hazmat.primitives import serialization
from itertools import accumulate
import pem
from OpenSSL.crypto import load_certificate, dump_certificate
from OpenSSL.crypto import FILETYPE_PEM
from OpenSSL.crypto import X50... | true | true |
f75a379b230001facf57ee9dcf56d321d19e7bcf | 6,818 | py | Python | vmware_nsx/tests/unit/extensions/test_secgroup_rule_local_ip_prefix.py | mail2nsrajesh/vmware-nsx | 63154b510b9fd95c10fffae86bfc49073cafeb40 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/tests/unit/extensions/test_secgroup_rule_local_ip_prefix.py | mail2nsrajesh/vmware-nsx | 63154b510b9fd95c10fffae86bfc49073cafeb40 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/tests/unit/extensions/test_secgroup_rule_local_ip_prefix.py | mail2nsrajesh/vmware-nsx | 63154b510b9fd95c10fffae86bfc49073cafeb40 | [
"Apache-2.0"
] | 1 | 2019-06-21T18:07:53.000Z | 2019-06-21T18:07:53.000Z | # Copyright 2015 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 43.705128 | 78 | 0.667938 |
import mock
import webob.exc
from oslo_utils import uuidutils
from neutron.api.v2 import attributes
from neutron.db import api as db_api
from neutron.db import db_base_plugin_v2
from neutron.db import securitygroups_db
from neutron.tests.unit.extensions import test_securitygroup
from neutron_lib import constants as ... | true | true |
f75a389b20252838b3fc3cd8bed2cfc22ef62697 | 3,238 | py | Python | punica/box/repo_box.py | lucas7788/punica-python | e9b2144b16e6b9ae121cbee8943c3df34d389d7c | [
"MIT"
] | null | null | null | punica/box/repo_box.py | lucas7788/punica-python | e9b2144b16e6b9ae121cbee8943c3df34d389d7c | [
"MIT"
] | null | null | null | punica/box/repo_box.py | lucas7788/punica-python | e9b2144b16e6b9ae121cbee8943c3df34d389d7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import json
import shutil
import git
from punica.exception.punica_exception import PunicaError, PunicaException
from punica.config.punica_config import InitConfig
from punica.utils.file_system import (
ensure_remove_dir_if_exists,
remove_file... | 35.582418 | 83 | 0.610871 |
import os
import re
import json
import shutil
import git
from punica.exception.punica_exception import PunicaError, PunicaException
from punica.config.punica_config import InitConfig
from punica.utils.file_system import (
ensure_remove_dir_if_exists,
remove_file_if_exists
)
class Box:
@staticmethod
... | true | true |
f75a38a721f0bac6c712df0c06fc9571c4964fb6 | 4,081 | py | Python | doc/conf.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | 6 | 2020-05-29T22:52:30.000Z | 2020-11-08T23:27:07.000Z | doc/conf.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | null | null | null | doc/conf.py | uiuc-covid19-modeling/pydemic | 3c0af60c2ac7e0dbf722584f61c45f9a2f993521 | [
"MIT"
] | 5 | 2020-06-12T01:47:18.000Z | 2022-03-29T13:26:09.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 28.538462 | 90 | 0.640774 |
project = 'pydemic'
copyright = '2020, George N Wong and Zachary J Weiner'
author = 'George N Wong and Zachary J Weiner'
import pkg_resources
version = pkg_resources.get_distribution(project).version
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.linkcod... | true | true |
f75a38ab1b3725e688701a8fa97fb74ac5c11ac2 | 12,114 | py | Python | corehq/apps/es/tests.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/es/tests.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | corehq/apps/es/tests.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | import json
from datetime import date
from unittest import TestCase
from corehq.elastic import ESError, SIZE_LIMIT
from .es_query import HQESQuery, ESQuerySet
from . import filters
from . import forms, users
class ElasticTestMixin(object):
def checkQuery(self, query, json_output):
msg = "Expected Query:\... | 34.31728 | 102 | 0.424468 | import json
from datetime import date
from unittest import TestCase
from corehq.elastic import ESError, SIZE_LIMIT
from .es_query import HQESQuery, ESQuerySet
from . import filters
from . import forms, users
class ElasticTestMixin(object):
def checkQuery(self, query, json_output):
msg = "Expected Query:\... | true | true |
f75a39c90f46ca6cc7004023c1a48a50a8bb9181 | 3,633 | py | Python | metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_lever_pull.py | zajaczajac/metaworld | 4febbc4f702c3145b73b012b58b111b2c439032a | [
"MIT"
] | null | null | null | metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_lever_pull.py | zajaczajac/metaworld | 4febbc4f702c3145b73b012b58b111b2c439032a | [
"MIT"
] | null | null | null | metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_lever_pull.py | zajaczajac/metaworld | 4febbc4f702c3145b73b012b58b111b2c439032a | [
"MIT"
] | null | null | null | import numpy as np
from gym.spaces import Box
from metaworld.envs.env_util import get_asset_full_path
from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set
class SawyerLeverPullEnv(SawyerXYZEnv):
def __init__(self):
hand_low = (-0.5, 0.40, -0.15)
hand_hig... | 29.778689 | 121 | 0.590696 | import numpy as np
from gym.spaces import Box
from metaworld.envs.env_util import get_asset_full_path
from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set
class SawyerLeverPullEnv(SawyerXYZEnv):
def __init__(self):
hand_low = (-0.5, 0.40, -0.15)
hand_hig... | true | true |
f75a3a65e5028bb380d4c5e5df1a3e9e1b8643e0 | 1,027 | py | Python | leapp/workflows/phases.py | asilveir/leapp | 1b03c1d73bcfad3a10b74e2a31ad9f3d3bfc352f | [
"Apache-2.0"
] | null | null | null | leapp/workflows/phases.py | asilveir/leapp | 1b03c1d73bcfad3a10b74e2a31ad9f3d3bfc352f | [
"Apache-2.0"
] | 3 | 2022-01-31T10:24:53.000Z | 2022-03-29T12:30:04.000Z | leapp/workflows/phases.py | asilveir/leapp | 1b03c1d73bcfad3a10b74e2a31ad9f3d3bfc352f | [
"Apache-2.0"
] | null | null | null | from leapp.utils.meta import with_metaclass
from leapp.workflows.flags import Flags
from leapp.workflows.policies import Policies
class PhaseMeta(type):
classes = []
def __new__(mcs, name, bases, attrs):
klass = super(PhaseMeta, mcs).__new__(mcs, name, bases, attrs)
PhaseMeta.classes.append(k... | 27.026316 | 75 | 0.615385 | from leapp.utils.meta import with_metaclass
from leapp.workflows.flags import Flags
from leapp.workflows.policies import Policies
class PhaseMeta(type):
classes = []
def __new__(mcs, name, bases, attrs):
klass = super(PhaseMeta, mcs).__new__(mcs, name, bases, attrs)
PhaseMeta.classes.append(k... | true | true |
f75a3b65bd48b641a071e81b9a9c13e8794024d3 | 129 | py | Python | pytesting.py | sestinj/meta | a607202d9f142348d8b1c1f4be72981d86eed013 | [
"CNRI-Python"
] | null | null | null | pytesting.py | sestinj/meta | a607202d9f142348d8b1c1f4be72981d86eed013 | [
"CNRI-Python"
] | null | null | null | pytesting.py | sestinj/meta | a607202d9f142348d8b1c1f4be72981d86eed013 | [
"CNRI-Python"
] | null | null | null | from sdk import meta
old = "this is a string"
print(meta("const neww = old.substr(0, 2);", "javascript", {"old":old}, ["neww"])) | 32.25 | 82 | 0.635659 | from sdk import meta
old = "this is a string"
print(meta("const neww = old.substr(0, 2);", "javascript", {"old":old}, ["neww"])) | true | true |
f75a3d74513281fe0784d65ffabea0749fa241fd | 450 | py | Python | blogproject/comments/models.py | ghostcode/django-blog | 66b8bc86304e2faed701884a33b19af538642395 | [
"MIT"
] | null | null | null | blogproject/comments/models.py | ghostcode/django-blog | 66b8bc86304e2faed701884a33b19af538642395 | [
"MIT"
] | 10 | 2019-12-23T02:10:45.000Z | 2022-02-10T09:04:19.000Z | blogproject/comments/models.py | ghostcode/django-blog | 66b8bc86304e2faed701884a33b19af538642395 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Comment(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=255)
url = models.URLField(blank=True)
text = models.TextField()
created_time = models.DateTimeField(auto_now_add=True)
post = mode... | 23.684211 | 58 | 0.677778 | from django.db import models
class Comment(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=255)
url = models.URLField(blank=True)
text = models.TextField()
created_time = models.DateTimeField(auto_now_add=True)
post = models.ForeignKey(
'blo... | true | true |
f75a3d7801f5331f36b541073c9c1fe6aa2a2265 | 12,836 | py | Python | h5_extract_write_plot/h5_extract_write_plot.py | realspacekolle/pyScattData | 585376761ef380c1f006bc8a0d23adaed5e9258d | [
"BSD-3-Clause"
] | null | null | null | h5_extract_write_plot/h5_extract_write_plot.py | realspacekolle/pyScattData | 585376761ef380c1f006bc8a0d23adaed5e9258d | [
"BSD-3-Clause"
] | 4 | 2022-01-27T12:57:15.000Z | 2022-03-03T10:53:48.000Z | h5_extract_write_plot/h5_extract_write_plot.py | realspacekolle/pyScattData | 585376761ef380c1f006bc8a0d23adaed5e9258d | [
"BSD-3-Clause"
] | 1 | 2022-01-26T09:55:16.000Z | 2022-01-26T09:55:16.000Z | import sys
from pathlib import Path
import h5py
import numpy as np
import matplotlib.pyplot as plt
TWOTHETA_KEYS = ["2th", "2theta", "twotheta"]
Q_KEYS = ["q"]
INTENSITY_KEYS = ["i", "intensity", "int"]
STACK_INDICES_KEY = "stack_indices"
DPI = 300
FIGSIZE = (12,4)
FONTSIZE_LABELS = 20
FONTSIZE_TICKS = 14
LINEWIDTH ... | 39.253823 | 80 | 0.495871 | import sys
from pathlib import Path
import h5py
import numpy as np
import matplotlib.pyplot as plt
TWOTHETA_KEYS = ["2th", "2theta", "twotheta"]
Q_KEYS = ["q"]
INTENSITY_KEYS = ["i", "intensity", "int"]
STACK_INDICES_KEY = "stack_indices"
DPI = 300
FIGSIZE = (12,4)
FONTSIZE_LABELS = 20
FONTSIZE_TICKS = 14
LINEWIDTH ... | true | true |
f75a3d984fd161be15feb9c30dda77b3d22a4a01 | 652 | py | Python | doc/example_dimension.py | ilopata1/matplotlib-scalebar | 7e0d7b668021f01501b47b6eeecc1e8808d81c29 | [
"BSD-2-Clause"
] | 92 | 2016-01-13T02:54:22.000Z | 2022-03-30T01:16:45.000Z | doc/example_dimension.py | ilopata1/matplotlib-scalebar | 7e0d7b668021f01501b47b6eeecc1e8808d81c29 | [
"BSD-2-Clause"
] | 41 | 2016-05-25T19:34:02.000Z | 2022-03-12T12:26:49.000Z | doc/example_dimension.py | ilopata1/matplotlib-scalebar | 7e0d7b668021f01501b47b6eeecc1e8808d81c29 | [
"BSD-2-Clause"
] | 24 | 2016-05-25T19:19:10.000Z | 2022-01-07T14:34:59.000Z | import matplotlib.pyplot as plt
from matplotlib_scalebar.scalebar import ScaleBar
from matplotlib_scalebar.dimension import _Dimension, _PREFIXES_FACTORS, _LATEX_MU
class TimeDimension(_Dimension):
def __init__(self):
super().__init__("s")
for prefix, factor in _PREFIXES_FACTORS.items():
... | 29.636364 | 82 | 0.677914 | import matplotlib.pyplot as plt
from matplotlib_scalebar.scalebar import ScaleBar
from matplotlib_scalebar.dimension import _Dimension, _PREFIXES_FACTORS, _LATEX_MU
class TimeDimension(_Dimension):
def __init__(self):
super().__init__("s")
for prefix, factor in _PREFIXES_FACTORS.items():
... | true | true |
f75a3dda5b1b479a45e52c50d1390b7d076a8b1f | 29,646 | py | Python | site/flask/lib/python2.7/site-packages/coverage/control.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | site/flask/lib/python2.7/site-packages/coverage/control.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | site/flask/lib/python2.7/site-packages/coverage/control.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | """Core control stuff for Coverage."""
import atexit, os, random, socket, sys
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from cover... | 38.007692 | 83 | 0.611482 |
import atexit, os, random, socket, sys
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from coverage.config import CoverageConfig
from coverage.data import Cove... | true | true |
f75a3e4b20351f60e5114f424a20510f54cc6fc1 | 4,401 | py | Python | sdk/keyvault/azure-keyvault-secrets/samples/hello_world.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/samples/hello_world.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-04T18:12:16.000Z | 2019-06-04T18:12:16.000Z | sdk/keyvault/azure-keyvault-secrets/samples/hello_world.py | vchske/azure-sdk-for-python | 6383ed3676b7355af7be394562b126209961ec13 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | import datetime
import os
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
from azure.core.exceptions import HttpResponseError
# ----------------------------------------------------------------------------------------------------------
# Prerequistes -
#
# 1. An Azure K... | 48.9 | 135 | 0.650307 | import datetime
import os
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
from azure.core.exceptions import HttpResponseError
def run_sample():
VAULT_URL = os.environ["VAULT_URL"]
credential = DefaultAzureCredential()
client = SecretClient(v... | true | true |
f75a3f329682d190ddeb46937a0d3eaf4fce8d33 | 615 | py | Python | Mundo1/026.py | eliascastrosousa/exerciciospythonmundo1 | ec6326952e69ca60d018476308b96959b92a24d8 | [
"MIT"
] | null | null | null | Mundo1/026.py | eliascastrosousa/exerciciospythonmundo1 | ec6326952e69ca60d018476308b96959b92a24d8 | [
"MIT"
] | null | null | null | Mundo1/026.py | eliascastrosousa/exerciciospythonmundo1 | ec6326952e69ca60d018476308b96959b92a24d8 | [
"MIT"
] | null | null | null | # desafio 026: Faça um programa que leia uma frase pelo teclado e mostre quantas vezes aparece a letra "A", em que posição ela aparece a
# primeira vez e em que posição ela aparece a última vez.
autor = input('Digite o seu autor preferido: ').strip()
autor_lower = (autor.lower())
quantidade = (autor_lower.count('a'))
... | 47.307692 | 136 | 0.715447 |
autor = input('Digite o seu autor preferido: ').strip()
autor_lower = (autor.lower())
quantidade = (autor_lower.count('a'))
primeiroa = (autor_lower.find('a'))
ultimoa = (autor_lower.rfind('a'))
print('o nome do autor {}'.format(autor))
print ('a letra a, aparece {} vezes.' .format(quantidade))
print ('Aparece pela pr... | true | true |
f75a40142e7c85ef27bd4b2c6739c0e849f9b143 | 3,181 | py | Python | goji/types/weight_proof.py | nowing11/goji-blockchain | 31f3c80819e3786040c404680b672bd2216b4f89 | [
"Apache-2.0"
] | 2 | 2022-02-09T04:30:19.000Z | 2022-03-19T14:01:43.000Z | goji/types/weight_proof.py | zcomputerwiz/goji-blockchain | 3be896d4dcb48a734f8d2a901ab5648201fbd4d7 | [
"Apache-2.0"
] | 1 | 2021-12-30T09:17:47.000Z | 2021-12-30T09:17:47.000Z | goji/types/weight_proof.py | zcomputerwiz/gojiv2-blockchain | 3be896d4dcb48a734f8d2a901ab5648201fbd4d7 | [
"Apache-2.0"
] | 1 | 2022-03-15T08:42:52.000Z | 2022-03-15T08:42:52.000Z | from dataclasses import dataclass
from typing import List, Optional
from goji.types.blockchain_format.proof_of_space import ProofOfSpace
from goji.types.blockchain_format.reward_chain_block import RewardChainBlock
from goji.types.blockchain_format.sized_bytes import bytes32
from goji.types.blockchain_format.vdf import... | 30.883495 | 95 | 0.735303 | from dataclasses import dataclass
from typing import List, Optional
from goji.types.blockchain_format.proof_of_space import ProofOfSpace
from goji.types.blockchain_format.reward_chain_block import RewardChainBlock
from goji.types.blockchain_format.sized_bytes import bytes32
from goji.types.blockchain_format.vdf import... | true | true |
f75a409fc22a0a5fe082aa1b4ca9d781380a0a06 | 804 | py | Python | django_project/testdj/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | django_project/testdj2/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | django_project/testdj2/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testdj.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 34.956522 | 77 | 0.641791 | import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testdj.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
try:
import django
except ImportError:
... | true | true |
f75a40e1b79564a90a8dfcde67d7a19a703fd4f5 | 4,278 | py | Python | Scripts/BeringSeaIce_NSIDC_Feb.py | whigg/BeringSeaIce2018 | 0ddb93f9bbca6ad7489eae4a9240105de7bb7eee | [
"MIT"
] | 1 | 2019-01-12T12:01:11.000Z | 2019-01-12T12:01:11.000Z | Scripts/BeringSeaIce_NSIDC_Feb.py | zmlabe/BeringSeaIce2018 | b5404cfbb51cb6f893be78d53b94de8092b25a7b | [
"MIT"
] | null | null | null | Scripts/BeringSeaIce_NSIDC_Feb.py | zmlabe/BeringSeaIce2018 | b5404cfbb51cb6f893be78d53b94de8092b25a7b | [
"MIT"
] | 3 | 2018-04-05T17:58:17.000Z | 2021-02-12T19:20:50.000Z | """
Script calculates sea ice extent in the Bering Sea from SIC fields
Notes
-----
Author : Zachary Labe
Date : 12 March 2018
"""
### Import modules
import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
import datetime
import statsmodels.api as sm
### Define directories
directorydat... | 33.685039 | 97 | 0.641655 |
import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
import datetime
import statsmodels.api as sm
directorydata2 = '/home/zlabe/Documents/Projects/BeringSeaIce2018/Data/'
directoryfigure = '/home/zlabe/Documents/Projects/BeringSeaIce2018/Figures/'
now = datetime.datetime.now()
currentmn = s... | true | true |
f75a4137cd8904a2b6edb7792f732b1db4322cde | 2,227 | py | Python | pfm/models.py | rugleb/potential-field-method | 2b56e94aef59e804c2fde414436656af9c97cdbe | [
"MIT"
] | 3 | 2021-01-05T09:51:13.000Z | 2021-05-22T13:34:51.000Z | pfm/models.py | rugleb/potential-field-method | 2b56e94aef59e804c2fde414436656af9c97cdbe | [
"MIT"
] | 1 | 2020-01-10T07:30:39.000Z | 2020-01-10T07:30:39.000Z | pfm/models.py | rugleb/potential-field-method | 2b56e94aef59e804c2fde414436656af9c97cdbe | [
"MIT"
] | 1 | 2020-09-18T14:01:37.000Z | 2020-09-18T14:01:37.000Z | # pylint: disable=C0103,W0613,R0201
from abc import ABC
from pathlib import Path
from typing import Dict, List
import attr
from marshmallow import EXCLUDE, Schema, fields, post_load
from shapely import geometry
__all__ = (
"Point",
"PointSchema",
"Polygon",
"PolygonSchema",
"Space",
"SpaceSch... | 23.197917 | 69 | 0.616974 |
from abc import ABC
from pathlib import Path
from typing import Dict, List
import attr
from marshmallow import EXCLUDE, Schema, fields, post_load
from shapely import geometry
__all__ = (
"Point",
"PointSchema",
"Polygon",
"PolygonSchema",
"Space",
"SpaceSchema",
)
class Point(geometry.Point... | true | true |
f75a41be1b4730086ce2e9e5e925d394cfa4f1db | 2,422 | py | Python | test/functional/wallet_implicitsegwit.py | vmta/umkoin | ac2a1f5903444d0b39706119d6ab757afb8b856f | [
"MIT"
] | 6 | 2018-02-28T22:23:46.000Z | 2020-02-13T13:49:44.000Z | test/functional/wallet_implicitsegwit.py | vmta/umkoin | ac2a1f5903444d0b39706119d6ab757afb8b856f | [
"MIT"
] | null | null | null | test/functional/wallet_implicitsegwit.py | vmta/umkoin | ac2a1f5903444d0b39706119d6ab757afb8b856f | [
"MIT"
] | 6 | 2018-02-05T12:51:25.000Z | 2020-04-26T10:42:49.000Z | #!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet implicit segwit feature."""
import test_framework.address as address
from test_framework.te... | 36.69697 | 98 | 0.706441 |
import test_framework.address as address
from test_framework.test_framework import UmkoinTestFramework
address_types = ('legacy', 'bech32', 'p2sh-segwit')
def key_to_address(key, address_type):
if address_type == 'legacy':
return address.key_to_p2pkh(key)
elif address_type == 'p2sh-segwit':
r... | true | true |
f75a42688a0da7ef6f31ef0d3bc5eb80f7296b2b | 1,318 | py | Python | vaultlocker/tests/unit/test_systemd.py | placeholder-tech/vaultlocker | 4ae0afbdaf3c66744ba14b43b3d538442df57184 | [
"Apache-2.0"
] | null | null | null | vaultlocker/tests/unit/test_systemd.py | placeholder-tech/vaultlocker | 4ae0afbdaf3c66744ba14b43b3d538442df57184 | [
"Apache-2.0"
] | null | null | null | vaultlocker/tests/unit/test_systemd.py | placeholder-tech/vaultlocker | 4ae0afbdaf3c66744ba14b43b3d538442df57184 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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, softw... | 30.651163 | 76 | 0.694992 |
from unittest import mock
from vaultlocker import systemd
from vaultlocker.tests.unit import base
class TestSystemD(base.TestCase):
@mock.patch.object(systemd, 'subprocess')
def test_enable(self, _subprocess):
systemd.enable('my-service.service')
_subprocess.check_call.assert_called_once_... | true | true |
f75a426a711aac2de2455a06c4e5a92521d385a0 | 2,379 | py | Python | setup.py | DanRod1999/muse-lsl | d5a62a7ec2ac43210b0449b7ad1af9d1e217f240 | [
"BSD-3-Clause"
] | null | null | null | setup.py | DanRod1999/muse-lsl | d5a62a7ec2ac43210b0449b7ad1af9d1e217f240 | [
"BSD-3-Clause"
] | null | null | null | setup.py | DanRod1999/muse-lsl | d5a62a7ec2ac43210b0449b7ad1af9d1e217f240 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
from shutil import copyfile
import os
def get_long_description():
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md')) as f:
long_description = f.read()
return long_description
def copy_do... | 32.589041 | 78 | 0.6343 | from setuptools import setup, find_packages
from shutil import copyfile
import os
def get_long_description():
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md')) as f:
long_description = f.read()
return long_description
def copy_do... | true | true |
f75a433b9de9a3a3b5c9df0950db0fd68db8daf9 | 8,361 | py | Python | docs/conf.py | gr33ndata/esh5or | e9d04bede21f6bfc3a1bf58ba06a45c4e0e010d8 | [
"BSD-3-Clause"
] | 1 | 2015-06-30T14:44:08.000Z | 2015-06-30T14:44:08.000Z | docs/conf.py | gr33ndata/esh5or | e9d04bede21f6bfc3a1bf58ba06a45c4e0e010d8 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | gr33ndata/esh5or | e9d04bede21f6bfc3a1bf58ba06a45c4e0e010d8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# esh5or documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | 30.403636 | 76 | 0.714269 |
import sys
import os
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
import esh5or
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'esh5or'
copyright = u'2015, Tarek Amr'... | true | true |
f75a4385297cc565523256c0229b4e85f97ce833 | 493 | py | Python | src/simple_domain.py | popop12342/corpus-builber | cd38f1f82088c93445881a134ca80b639abac9c0 | [
"MIT"
] | null | null | null | src/simple_domain.py | popop12342/corpus-builber | cd38f1f82088c93445881a134ca80b639abac9c0 | [
"MIT"
] | null | null | null | src/simple_domain.py | popop12342/corpus-builber | cd38f1f82088c93445881a134ca80b639abac9c0 | [
"MIT"
] | null | null | null | from corpus_builder.rule import Rule
from corpus_builder.grammar import Grammar
from corpus_builder.builder import CorpusBuilder
root_rule = Rule('<S>', ('<A>', '<B>'))
a_rule = Rule('<A>', ['a', '<B>'])
b_rule = Rule('<B>', ('<A>', 'b', '<C>'))
c_rule = Rule('<C>', 'c')
rule_set = [root_rule, a_rule, b_rule, c_rule]... | 30.8125 | 67 | 0.634888 | from corpus_builder.rule import Rule
from corpus_builder.grammar import Grammar
from corpus_builder.builder import CorpusBuilder
root_rule = Rule('<S>', ('<A>', '<B>'))
a_rule = Rule('<A>', ['a', '<B>'])
b_rule = Rule('<B>', ('<A>', 'b', '<C>'))
c_rule = Rule('<C>', 'c')
rule_set = [root_rule, a_rule, b_rule, c_rule]... | true | true |
f75a43a08eaeee676ad626e1154aa18afa49ab07 | 23,314 | py | Python | textacy/corpus.py | mvaz/textacy | 760b96a561eb3379b3a211a0353c9bc47127e99c | [
"Apache-2.0"
] | null | null | null | textacy/corpus.py | mvaz/textacy | 760b96a561eb3379b3a211a0353c9bc47127e99c | [
"Apache-2.0"
] | null | null | null | textacy/corpus.py | mvaz/textacy | 760b96a561eb3379b3a211a0353c9bc47127e99c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
A class for working with a collection of spaCy docs. Includes functionality for
easily adding, getting, and removing documents; saving to / loading their data
from disk; and tracking basic corpus statistics.
"""
from __future__ import absolute_import, division, print_function, unicode_litera... | 36.889241 | 94 | 0.574547 | from __future__ import absolute_import, division, print_function, unicode_literals
import collections
import itertools
import logging
import math
import numpy as np
import spacy
import srsly
from cytoolz import itertoolz
from thinc.neural.ops import NumpyOps
from . import cache
from . import compat
from . import io ... | true | true |
f75a44e1c839099c01c5c88e5a232bf48ab841e1 | 10,571 | py | Python | project5/CrossValidation.py | MaxRobinson/CS449 | cdc65ce4784fb15eeb0a17a50498217f07aa190c | [
"Apache-2.0"
] | null | null | null | project5/CrossValidation.py | MaxRobinson/CS449 | cdc65ce4784fb15eeb0a17a50498217f07aa190c | [
"Apache-2.0"
] | null | null | null | project5/CrossValidation.py | MaxRobinson/CS449 | cdc65ce4784fb15eeb0a17a50498217f07aa190c | [
"Apache-2.0"
] | 1 | 2019-09-15T02:22:40.000Z | 2019-09-15T02:22:40.000Z | """ Created by Max 10/4/2017 """
from __future__ import division
import random
import math
from typing import Dict, Tuple, List
class CrossValidation:
def __init__(self, folds, learner):
"""
Constructor
:param folds: num folds
:param learner: the k-NN algorithm to use.
""... | 35.712838 | 127 | 0.634282 | from __future__ import division
import random
import math
from typing import Dict, Tuple, List
class CrossValidation:
def __init__(self, folds, learner):
self.folds = folds
self.learner = learner
def cross_validation_regression(self, dataset):
random.shuffle(dataset)
fold_l... | true | true |
f75a44ef1ff184280e6287285add8a1328ab3eed | 456 | py | Python | ch04packaging/greetings/greetings/test/test_greeter.py | ashnair1/rsd-engineeringcourse | f78b097e4e02a3164d1334e44d1a84353dbf0596 | [
"CC-BY-3.0"
] | null | null | null | ch04packaging/greetings/greetings/test/test_greeter.py | ashnair1/rsd-engineeringcourse | f78b097e4e02a3164d1334e44d1a84353dbf0596 | [
"CC-BY-3.0"
] | null | null | null | ch04packaging/greetings/greetings/test/test_greeter.py | ashnair1/rsd-engineeringcourse | f78b097e4e02a3164d1334e44d1a84353dbf0596 | [
"CC-BY-3.0"
] | null | null | null | import yaml
import os
import pytest
from ..greeter import greet
def read_fixture():
with open(os.path.join(os.path.dirname(__file__),
'fixtures',
'samples.yaml')) as fixtures_file:
fixtures = yaml.load(fixtures_file)
return fixtures
@pytest.mark.pa... | 28.5 | 61 | 0.638158 | import yaml
import os
import pytest
from ..greeter import greet
def read_fixture():
with open(os.path.join(os.path.dirname(__file__),
'fixtures',
'samples.yaml')) as fixtures_file:
fixtures = yaml.load(fixtures_file)
return fixtures
@pytest.mark.pa... | true | true |
f75a453854464a1f2beb9337da419d235c02f9b8 | 2,566 | py | Python | test/IECoreGL/BufferTest.py | aitorvfx/cortex | c0c27794fc67ccfce68b064e284747165c49ef1c | [
"BSD-3-Clause"
] | 5 | 2015-09-13T14:49:30.000Z | 2017-02-04T21:04:59.000Z | test/IECoreGL/BufferTest.py | aitorvfx/cortex | c0c27794fc67ccfce68b064e284747165c49ef1c | [
"BSD-3-Clause"
] | 1 | 2018-11-07T19:40:15.000Z | 2018-11-07T19:40:15.000Z | test/IECoreGL/BufferTest.py | aitorvfx/cortex | c0c27794fc67ccfce68b064e284747165c49ef1c | [
"BSD-3-Clause"
] | 3 | 2015-02-03T17:13:40.000Z | 2022-01-07T15:55:00.000Z | ##########################################################################
#
# Copyright (c) 2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 39.476923 | 77 | 0.691348 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
import unittest
import imath
import IECore
import IECoreGL
IECoreGL.init( False )
class BufferTest( unittest.TestCase ) :
def test( self ) :
d = IECore.V3fVectorData( [ imath.V3f( x ) for x in range( 0, 100 ) ] )
b = IECoreGL.Cache... | true | true |
f75a4548dbfab2e4aa4853124b5c163ddb0a970c | 35 | py | Python | inheritance_graph/__init__.py | NeilGirdhar/inheritance_graph | 810a3b976d50eb717cb0e3b530ffbf068475c01b | [
"MIT"
] | 1 | 2022-03-04T23:31:49.000Z | 2022-03-04T23:31:49.000Z | inheritance_graph/__init__.py | NeilGirdhar/inheritance_graph | 810a3b976d50eb717cb0e3b530ffbf068475c01b | [
"MIT"
] | null | null | null | inheritance_graph/__init__.py | NeilGirdhar/inheritance_graph | 810a3b976d50eb717cb0e3b530ffbf068475c01b | [
"MIT"
] | null | null | null | from .explain_mro_failure import *
| 17.5 | 34 | 0.828571 | from .explain_mro_failure import *
| true | true |
f75a4601df47e97d0e70d0c9db5395f1f5cfe4ae | 456 | py | Python | pelicanconf.py | jonathan-zz-zhao/my-blog | a7bf605eb6044fecfbfbf7893ccadd9a4e53a44e | [
"MIT"
] | null | null | null | pelicanconf.py | jonathan-zz-zhao/my-blog | a7bf605eb6044fecfbfbf7893ccadd9a4e53a44e | [
"MIT"
] | null | null | null | pelicanconf.py | jonathan-zz-zhao/my-blog | a7bf605eb6044fecfbfbf7893ccadd9a4e53a44e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
AUTHOR = 'Jonathan'
SITENAME = 'My Blog'
SITEURL = 'https://jonathan-zz-zhao.github.io/'
PATH = 'content'
STATIC_PATHS = ['images']
TIMEZONE = 'America/Toronto'
DEFAULT_LANG = 'en'
DEFAULT_PAGINATION = 10
# set to False ... | 24 | 51 | 0.710526 | from __future__ import unicode_literals
import os
AUTHOR = 'Jonathan'
SITENAME = 'My Blog'
SITEURL = 'https://jonathan-zz-zhao.github.io/'
PATH = 'content'
STATIC_PATHS = ['images']
TIMEZONE = 'America/Toronto'
DEFAULT_LANG = 'en'
DEFAULT_PAGINATION = 10
if os.environ.get('PELICAN_ENV') == 'DEV':
RELATIVE_URLS = ... | true | true |
f75a4612c72062c5155086d373a22dfcdc927988 | 7,842 | py | Python | SUAVE/SUAVE-2.5.0/regression/scripts/noise_optimization/Plot_Mission.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/regression/scripts/noise_optimization/Plot_Mission.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/regression/scripts/noise_optimization/Plot_Mission.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | # Plot_Mission.py
#
# Created: May 2015, E. Botero
# Modified:
# ----------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------
import SUAVE
from SUAVE.Core import Units
import pylab as plt
# ----------------... | 38.630542 | 97 | 0.528182 |
import SUAVE
from SUAVE.Core import Units
import pylab as plt
def plot_mission(results,line_style='bo-'):
axis_font = {'fontname':'Arial', 'size':'14'}
fig = plt.figure("Aerodynamic Forces",figsize=(8,6))
for segment in list(results.segments.values()):
time = segment.... | true | true |
f75a46be7b4ccea161a566cc25fd4d66b17cadaa | 78 | py | Python | 1/for.py | gdaPythonProjects/training2019-thursday | cd4d406a83f3ec914e136cec21d96988eb2ee2e9 | [
"MIT"
] | 5 | 2019-11-07T17:04:17.000Z | 2019-11-20T18:47:28.000Z | 1/for.py | gdaPythonProjects/training2019-thursday | cd4d406a83f3ec914e136cec21d96988eb2ee2e9 | [
"MIT"
] | null | null | null | 1/for.py | gdaPythonProjects/training2019-thursday | cd4d406a83f3ec914e136cec21d96988eb2ee2e9 | [
"MIT"
] | null | null | null | s = 0
for i in range(101):
s += i
print("Suma liczb od 1 do 100 to: ", s)
| 15.6 | 39 | 0.551282 | s = 0
for i in range(101):
s += i
print("Suma liczb od 1 do 100 to: ", s)
| true | true |
f75a4726b88287f827804368bf130f59bb4f9213 | 5,436 | py | Python | homeassistant/components/alarmdecoder/alarm_control_panel.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 1 | 2022-02-21T05:50:41.000Z | 2022-02-21T05:50:41.000Z | homeassistant/components/alarmdecoder/alarm_control_panel.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 12 | 2021-12-16T06:18:49.000Z | 2022-03-31T06:25:54.000Z | homeassistant/components/alarmdecoder/alarm_control_panel.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 1 | 2022-02-24T16:07:32.000Z | 2022-02-24T16:07:32.000Z | """Support for AlarmDecoder-based alarm control panels (Honeywell/DSC)."""
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanelEntity,
AlarmControlPanelEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.co... | 32.357143 | 88 | 0.680831 | import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanelEntity,
AlarmControlPanelEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_CODE,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARM... | true | true |
f75a472787c6b459bcfceca815b5092280b6e71f | 6,206 | py | Python | wesp9/wesp9Lib/connection.py | netgab/wesp9 | ba5cd9f4a9505cb3f07d8786b7454113ed913fc3 | [
"MIT"
] | null | null | null | wesp9/wesp9Lib/connection.py | netgab/wesp9 | ba5cd9f4a9505cb3f07d8786b7454113ed913fc3 | [
"MIT"
] | null | null | null | wesp9/wesp9Lib/connection.py | netgab/wesp9 | ba5cd9f4a9505cb3f07d8786b7454113ed913fc3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#! -*- coding: utf-8 -*-
# Imports
## Standard: Mandatory generic modules
import sys
import logging
import json
import time
## External
import requests
import urllib3
## Custom
from wesp9Lib.statisticModels import wirlessClientStatistics
# Create logger
logger = logging.getLogger(__name__)
... | 41.932432 | 149 | 0.74283 |
import sys
import logging
import json
import time
import requests
import urllib3
from wesp9Lib.statisticModels import wirlessClientStatistics
logger = logging.getLogger(__name__)
class restconf:
RESTCONF_BASEPATH = "/restconf/data"
RESTCONF_HTTP_HEADERS = {
"Accept": "application/yang-data+json",
... | true | true |
f75a4779c56aa806398eb4130c71b25554bbcc03 | 8,804 | py | Python | requirements/docutils-0.18/test/test_writers/test_html4css1_misc.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | requirements/docutils-0.18/test/test_writers/test_html4css1_misc.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | requirements/docutils-0.18/test/test_writers/test_html4css1_misc.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | 1 | 2022-02-03T08:03:30.000Z | 2022-02-03T08:03:30.000Z | #! /usr/bin/env python
# coding: utf-8
# $Id: test_html4css1_misc.py 8356 2019-08-26 16:44:19Z milde $
# Authors: Lea Wiemann, Dmitry Shachnev, Günter Milde
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.
"""
Miscellaneous HTML writer tests.
"""
from... | 42.124402 | 84 | 0.618469 |
from __future__ import absolute_import
import os
from .__init__ import DocutilsTestSupport
from docutils import core
class EncodingTestCase(DocutilsTestSupport.StandardTestCase):
def test_xmlcharrefreplace(self):
settings_overrides={
'output_encoding': 'latin1',
... | true | true |
f75a494e7a5b17d32e2c7131ec2370e9917abcba | 23,493 | py | Python | src/dirbs/schema_migrators/v85_upgrade.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-09-16T10:59:23.000Z | 2022-01-12T09:37:41.000Z | src/dirbs/schema_migrators/v85_upgrade.py | dirbs/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 5 | 2020-03-25T14:12:24.000Z | 2021-06-22T06:35:19.000Z | src/dirbs/schema_migrators/v85_upgrade.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-10-11T06:29:53.000Z | 2021-11-18T05:44:42.000Z | """
DIRBS DB schema migration script (v84 -> v85).
Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are me... | 60.238462 | 119 | 0.509003 |
import logging
from psycopg2 import sql
import dirbs.schema_migrators
import dirbs.utils as utils
import dirbs.partition_utils as part_utils
class SchemaMigrator(dirbs.schema_migrators.AbstractMigrator):
def _repartition_pairing_list(self, conn, *, num_physical_shards):
with conn.cursor() as cursor, u... | true | true |
f75a4996a9e85f83190385dfccff466c6834e1be | 2,204 | py | Python | rmn/models/residual_attention_network.py | TomKingsfordUoA/ResidualMaskingNetwork | 6ce5ddf70f8ac8f1e6da2746b0bbeb9e457ceb7d | [
"MIT"
] | 242 | 2020-01-09T11:06:21.000Z | 2022-03-26T14:51:48.000Z | rmn/models/residual_attention_network.py | huyhnueit68/ResidualMaskingNetwork | b77abb6e548b9a09b5c96b1592d71332b45d050e | [
"MIT"
] | 33 | 2020-01-09T08:42:10.000Z | 2022-03-23T07:52:56.000Z | rmn/models/residual_attention_network.py | huyhnueit68/ResidualMaskingNetwork | b77abb6e548b9a09b5c96b1592d71332b45d050e | [
"MIT"
] | 61 | 2020-01-19T02:20:37.000Z | 2022-03-25T13:08:48.000Z | import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.autograd import Variable
import numpy as np
from .basic_layers import ResidualBlock
from .attention_module import AttentionModule
class ResidualAttentionModel(nn.Module):
def __init__(self, in_channels=3, num_classes=1000):
... | 37.355932 | 88 | 0.643376 | import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.autograd import Variable
import numpy as np
from .basic_layers import ResidualBlock
from .attention_module import AttentionModule
class ResidualAttentionModel(nn.Module):
def __init__(self, in_channels=3, num_classes=1000):
... | true | true |
f75a49b5b0a0b077fd2d109a41b6b87b519853b3 | 3,013 | py | Python | dashboard/kpi/weekly_done.py | areshytko/productivity-dashboard | 4729d7c9e132c2fc58e1d09a40d72660d877a6a6 | [
"Apache-2.0"
] | null | null | null | dashboard/kpi/weekly_done.py | areshytko/productivity-dashboard | 4729d7c9e132c2fc58e1d09a40d72660d877a6a6 | [
"Apache-2.0"
] | null | null | null | dashboard/kpi/weekly_done.py | areshytko/productivity-dashboard | 4729d7c9e132c2fc58e1d09a40d72660d877a6a6 | [
"Apache-2.0"
] | null | null | null | """
"""
import math
from typing import Callable, Optional
import datetime
import pandas as pd
from dashboard.kpi.base import BaseKPI, KpiZone, get_current_week, get_recent_weeks
from dashboard.data import WeeklyStats
from dashboard.load import PomodorosProcessed
from dashboard.config import Config
class WeeklyDoneK... | 42.43662 | 124 | 0.633588 | import math
from typing import Callable, Optional
import datetime
import pandas as pd
from dashboard.kpi.base import BaseKPI, KpiZone, get_current_week, get_recent_weeks
from dashboard.data import WeeklyStats
from dashboard.load import PomodorosProcessed
from dashboard.config import Config
class WeeklyDoneKPI(BaseK... | true | true |
f75a4a050456cd1d91f261decd13b6bef8fef756 | 5,690 | py | Python | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | null | null | null | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 1 | 2020-07-30T06:44:01.000Z | 2020-07-30T06:44:01.000Z | src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_database_account_region_operations.py | wwendyc/azure-cli-extensions | 6b4099676bb5d43fdb57bc69f9c0281cca510a0a | [
"MIT"
] | 5 | 2020-09-08T22:46:48.000Z | 2020-11-08T14:54:35.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 45.52 | 191 | 0.642882 |
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from .. import models
class DatabaseAccountRegionOperations(object):
models = models
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._seri... | true | true |
f75a4b7ab099148ddcdf91e0e33326fc6f9e7b0d | 640 | gyp | Python | n-api/binding.gyp | jgarces-tw/win-ca | f16156fa945c7ce119e395e0f76100c882460bde | [
"BSD-3-Clause"
] | null | null | null | n-api/binding.gyp | jgarces-tw/win-ca | f16156fa945c7ce119e395e0f76100c882460bde | [
"BSD-3-Clause"
] | null | null | null | n-api/binding.gyp | jgarces-tw/win-ca | f16156fa945c7ce119e395e0f76100c882460bde | [
"BSD-3-Clause"
] | null | null | null | {
"targets": [
{
"target_name": "crypt32",
"cflags!": [
"-fno-exceptions"
],
"cflags_cc!": [
"-fno-exceptions"
],
"sources": [
"crypt32.cc"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"defi... | 17.777778 | 60 | 0.409375 | {
"targets": [
{
"target_name": "crypt32",
"cflags!": [
"-fno-exceptions"
],
"cflags_cc!": [
"-fno-exceptions"
],
"sources": [
"crypt32.cc"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
"defi... | true | true |
f75a4b9705dbc70ad412584ba11c345cfff34d46 | 16,370 | py | Python | alipay/aop/api/request/AlipayOpenMiniVersionAuditApplyRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 32 | 2018-05-24T08:40:15.000Z | 2019-04-04T20:54:55.000Z | alipay/aop/api/request/AlipayOpenMiniVersionAuditApplyRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 7 | 2018-05-24T08:42:59.000Z | 2020-09-06T23:18:46.000Z | alipay/aop/api/request/AlipayOpenMiniVersionAuditApplyRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 13 | 2018-04-25T11:27:58.000Z | 2021-03-15T12:22:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.RegionInfo import RegionInfo
class AlipayOpenMiniVersionAuditApplyRequest(object):
def __init__(self, biz_model=None):
... | 34.390756 | 162 | 0.63989 | import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.RegionInfo import RegionInfo
class AlipayOpenMiniVersionAuditApplyRequest(object):
def __init__(self, biz_model=None):
self._biz_model = biz_model
self._app_... | true | true |
f75a4d11f99887edb6a02989eab35cb30b39af8e | 281 | py | Python | src/CursoEmvideo/ex111/utilidades/dado/__init__.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | src/CursoEmvideo/ex111/utilidades/dado/__init__.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | src/CursoEmvideo/ex111/utilidades/dado/__init__.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | def leiadinheiro(msg):
valido = False
while not valido:
entrada = str(input(msg)).replace(',', '.').strip()
if entrada.isalpha() or entrada == '':
print('Preço inválido')
else:
valido = True
return float(entrada)
| 28.1 | 59 | 0.52669 | def leiadinheiro(msg):
valido = False
while not valido:
entrada = str(input(msg)).replace(',', '.').strip()
if entrada.isalpha() or entrada == '':
print('Preço inválido')
else:
valido = True
return float(entrada)
| true | true |
f75a4d2b590788872a636949a7de8119dd9119c9 | 2,333 | py | Python | tutorial/reduces.py | bbbbdragon/python-pype-lang-3 | 7dc7b01cbaab8423d8e6effbac0936b43c134a84 | [
"MIT"
] | 4 | 2020-01-21T00:35:15.000Z | 2021-09-27T17:32:36.000Z | tutorial/reduces.py | bbbbdragon/python-pype-lang-3 | 7dc7b01cbaab8423d8e6effbac0936b43c134a84 | [
"MIT"
] | null | null | null | tutorial/reduces.py | bbbbdragon/python-pype-lang-3 | 7dc7b01cbaab8423d8e6effbac0936b43c134a84 | [
"MIT"
] | null | null | null | '''
python3 reduces.py
python3 watch_file.py -p2 python3 reduces.py -p1 ./reinstall_from_source.sh -d /Users/bennettbullock/python-pype-lang-3
'''
from pype3 import pypeify,pypeify_namespace,p,_,_0,_1,_2,_last
from pype3 import ep,db,a,iff,d,ift,squash,ifp
from pype3.time_helpers import *
from pype3.helpers import *
... | 22.650485 | 119 | 0.645521 | from pype3 import pypeify,pypeify_namespace,p,_,_0,_1,_2,_last
from pype3 import ep,db,a,iff,d,ift,squash,ifp
from pype3.time_helpers import *
from pype3.helpers import *
from pype3.vals import PypeVal as v
from copy import deepcopy
from pype3.numpy_helpers import *
def add(x,y):
(_+y,
)
def summation(ls)... | true | true |
f75a4ed70f4ffa83873bd56ac6171b22433e799e | 9,577 | py | Python | pinax/blog/views.py | Fortschritt/pinax-blog | 7e1323d8b20cf3de43cfdf23f3bd552ea85f8460 | [
"MIT"
] | null | null | null | pinax/blog/views.py | Fortschritt/pinax-blog | 7e1323d8b20cf3de43cfdf23f3bd552ea85f8460 | [
"MIT"
] | null | null | null | pinax/blog/views.py | Fortschritt/pinax-blog | 7e1323d8b20cf3de43cfdf23f3bd552ea85f8460 | [
"MIT"
] | null | null | null | import json
from datetime import datetime
from django.contrib.sites.models import Site
from django.db.models import Q
from django.http import Http404, HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, redirect
from django.template.loader import render_to_string
from django.urls import reverse
... | 32.464407 | 119 | 0.681007 | import json
from datetime import datetime
from django.contrib.sites.models import Site
from django.db.models import Q
from django.http import Http404, HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, redirect
from django.template.loader import render_to_string
from django.urls import reverse
... | true | true |
f75a50a652885c4656759ab35f1b3f3c2d4234e0 | 9,190 | py | Python | peekingduck/pipeline/nodes/dabble/statisticsv1/utils.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | 1 | 2021-12-02T05:15:58.000Z | 2021-12-02T05:15:58.000Z | peekingduck/pipeline/nodes/dabble/statisticsv1/utils.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | null | null | null | peekingduck/pipeline/nodes/dabble/statisticsv1/utils.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 AI Singapore
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 36.181102 | 98 | 0.616431 |
import re
from typing import Any, Callable, Dict, List, Tuple, Union
class Stats:
def __init__(self, ops: Dict[str, Callable]) -> None:
self.ops = ops
self.func: str
self.expr: str
self.condition = {"op_func": Callable, "operand": str}
self.data_type: str
self.key... | true | true |
f75a50c1482b4bb1fe6ffd60d87d657ea7164b51 | 1,481 | py | Python | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_update_context_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_update_context_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/aiplatform_v1beta1_generated_metadata_service_update_context_async.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 32.911111 | 85 | 0.771776 |
from google.cloud import aiplatform_v1beta1
async def sample_update_context():
client = aiplatform_v1beta1.MetadataServiceAsyncClient()
request = aiplatform_v1beta1.UpdateContextRequest(
)
response = await client.update_context(request=request)
print(response)
| true | true |
f75a51430ea40b673285af9e20333bc06be416b6 | 3,568 | py | Python | allprojects/models.py | erhic/Awwards-django-Api | 323c7d4196bb475293bac16cf9ee95b8e3656988 | [
"MIT"
] | null | null | null | allprojects/models.py | erhic/Awwards-django-Api | 323c7d4196bb475293bac16cf9ee95b8e3656988 | [
"MIT"
] | null | null | null | allprojects/models.py | erhic/Awwards-django-Api | 323c7d4196bb475293bac16cf9ee95b8e3656988 | [
"MIT"
] | 1 | 2022-03-28T15:07:57.000Z | 2022-03-28T15:07:57.000Z | from django.db import models
import os
# Create your models here.
import datetime as dt
from django.utils import timezone
from cloudinary.models import CloudinaryField
from django.contrib.auth.models import User
from allprojects.models import User
from django.db import models
# .............
from PIL import Image
... | 28.544 | 87 | 0.671805 | from django.db import models
import os
import datetime as dt
from django.utils import timezone
from cloudinary.models import CloudinaryField
from django.contrib.auth.models import User
from allprojects.models import User
from django.db import models
from PIL import Image
class Profile(models.Model):
user= mo... | true | true |
f75a5163cfeccb0ee4740637d685de4163a7cd88 | 10,178 | py | Python | wand/version.py | claudep/wand | 0badc75904cb6efd126f1f01b74ca40af9e92ab8 | [
"MIT"
] | null | null | null | wand/version.py | claudep/wand | 0badc75904cb6efd126f1f01b74ca40af9e92ab8 | [
"MIT"
] | null | null | null | wand/version.py | claudep/wand | 0badc75904cb6efd126f1f01b74ca40af9e92ab8 | [
"MIT"
] | null | null | null | """:mod:`wand.version` --- Version data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can find the current version in the command line interface:
.. sourcecode:: console
$ python -m wand.version
0.0.0
$ python -m wand.version --verbose
Wand 0.0.0
ImageMagick 6.7.7-6 2012-06-03 Q16 http://www.imagemagick... | 34.385135 | 79 | 0.642857 | from __future__ import print_function
import ctypes
import datetime
import re
import sys
try:
from .api import libmagick, library
except ImportError: libmagick = None
from .compat import binary, string_type, text
__all__ = ('VERSION', 'VERSION_INFO', 'MAGICK_VERSION',
'MAGICK_VERSION_DELEGATES',... | true | true |
f75a5170503e10d878099c4ecebfb5a34b268279 | 22,417 | py | Python | google-cloud-sdk/lib/googlecloudsdk/third_party/apis/deploymentmanager/v2/deploymentmanager_v2_client.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/lib/googlecloudsdk/third_party/apis/deploymentmanager/v2/deploymentmanager_v2_client.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/googlecloudsdk/third_party/apis/deploymentmanager/v2/deploymentmanager_v2_client.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | """Generated client library for deploymentmanager version v2."""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.deploymentmanager.v2 import deploymentmanager_v2_messages as messages
class DeploymentmanagerV2(base_api.Base... | 40.030357 | 233 | 0.694874 | from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.deploymentmanager.v2 import deploymentmanager_v2_messages as messages
class DeploymentmanagerV2(base_api.BaseApiClient):
MESSAGES_MODULE = messages
BASE_URL = u'https://www.googleapis.com/deploymentmanager/v2/'
_PACKAGE = u'deploymentm... | true | true |
f75a526b0c9625b1b8c6461619d37cc7ff472067 | 1,863 | py | Python | auctions/models.py | CptCaveira/commerce | 36d9f447c961e821f1324b008969fbc139ce7b64 | [
"CC0-1.0"
] | null | null | null | auctions/models.py | CptCaveira/commerce | 36d9f447c961e821f1324b008969fbc139ce7b64 | [
"CC0-1.0"
] | null | null | null | auctions/models.py | CptCaveira/commerce | 36d9f447c961e821f1324b008969fbc139ce7b64 | [
"CC0-1.0"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models.fields import BooleanField
from django.db.models.fields.related import ForeignKey, ManyToManyField
class User(AbstractUser):
pass
class Category(models.Model):
class Meta:
verbose_name_plural = "cate... | 39.638298 | 88 | 0.750403 | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models.fields import BooleanField
from django.db.models.fields.related import ForeignKey, ManyToManyField
class User(AbstractUser):
pass
class Category(models.Model):
class Meta:
verbose_name_plural = "cate... | true | true |
f75a526ea2c4c902e434114dfcd5a070f03b8959 | 9,226 | py | Python | UFO_models/SMEFTsim_U35_alphaScheme_UFO/coupling_orders.py | matthewfeickert/SMEFTsim | db7d4a80bdcff424eee27dde71f1eb09ac894039 | [
"MIT"
] | 4 | 2020-12-29T03:42:43.000Z | 2021-09-22T09:57:37.000Z | UFO_models/SMEFTsim_U35_alphaScheme_UFO/coupling_orders.py | matthewfeickert/SMEFTsim | db7d4a80bdcff424eee27dde71f1eb09ac894039 | [
"MIT"
] | 3 | 2021-05-19T11:06:59.000Z | 2021-12-11T00:12:02.000Z | UFO_models/SMEFTsim_U35_alphaScheme_UFO/coupling_orders.py | matthewfeickert/SMEFTsim | db7d4a80bdcff424eee27dde71f1eb09ac894039 | [
"MIT"
] | 4 | 2021-09-22T09:57:39.000Z | 2022-03-29T16:09:36.000Z | # This file was automatically created by FeynRules 2.3.35
# Mathematica version: 12.1.0 for Linux x86 (64-bit) (March 18, 2020)
# Date: Tue 18 Aug 2020 11:58:03
from object_library import all_orders, CouplingOrder
QCD = CouplingOrder(name = 'QCD',
expansion_order = 99,
hierar... | 30.651163 | 69 | 0.458704 |
from object_library import all_orders, CouplingOrder
QCD = CouplingOrder(name = 'QCD',
expansion_order = 99,
hierarchy = 1)
QED = CouplingOrder(name = 'QED',
expansion_order = 99,
hierarchy = 2)
SMHLOOP = CouplingOrder(name = 'SMHLOOP... | true | true |
f75a52b9f07f02ed02c348163ef1865d97aca812 | 7,648 | py | Python | wqt/command/handle.py | warchive/wqt | 31025d115dac006a42574930a7f6a6a646b4fa1e | [
"MIT"
] | 1 | 2018-02-05T13:53:21.000Z | 2018-02-05T13:53:21.000Z | wqt/command/handle.py | warchive/wqt | 31025d115dac006a42574930a7f6a6a646b4fa1e | [
"MIT"
] | 2 | 2018-02-06T01:55:07.000Z | 2018-02-06T01:56:55.000Z | wqt/command/handle.py | waterloop/wqt | 31025d115dac006a42574930a7f6a6a646b4fa1e | [
"MIT"
] | 1 | 2018-02-02T04:43:19.000Z | 2018-02-02T04:43:19.000Z | """@package command
Handle building, listing, and showing WQt projects
"""
import os
import shutil
import subprocess
from colorama import Fore
from wqt.command import creation
from wqt.command.creation import (
update
)
from wqt.command.resource import (
get_configuration,
set_configuration
)
from wqt.te... | 28.221402 | 102 | 0.64409 |
import os
import shutil
import subprocess
from colorama import Fore
from wqt.command import creation
from wqt.command.creation import (
update
)
from wqt.command.resource import (
get_configuration,
set_configuration
)
from wqt.templates.files import QType
from wqt.utils.finder import (
get_cmake_pro... | true | true |
f75a54280108d270e96c73dd94e4e846be2f3e32 | 1,916 | py | Python | caldera/types/peer_info.py | wolfrage76/caldera-blockchain | abff7e964822616ed698fb62b3506eaa7e9f217c | [
"Apache-2.0"
] | 10 | 2021-06-25T20:38:04.000Z | 2021-07-04T01:36:35.000Z | caldera/types/peer_info.py | wolfrage76/caldera-blockchain | abff7e964822616ed698fb62b3506eaa7e9f217c | [
"Apache-2.0"
] | 11 | 2021-07-02T04:32:26.000Z | 2021-07-08T01:58:12.000Z | caldera/types/peer_info.py | wolfrage76/caldera-blockchain | abff7e964822616ed698fb62b3506eaa7e9f217c | [
"Apache-2.0"
] | 1 | 2021-07-07T03:17:53.000Z | 2021-07-07T03:17:53.000Z | import ipaddress
from dataclasses import dataclass
from typing import Optional, Union
from caldera.util.ints import uint16, uint64
from caldera.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class PeerInfo(Streamable):
host: str
port: uint16
def is_valid(self, allow_pr... | 28.176471 | 97 | 0.601253 | import ipaddress
from dataclasses import dataclass
from typing import Optional, Union
from caldera.util.ints import uint16, uint64
from caldera.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class PeerInfo(Streamable):
host: str
port: uint16
def is_valid(self, allow_pr... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.