hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74647ada53b32bbaaa82bfaa5513aca01ad89cb
12,522
py
Python
src/textual/layout.py
NoblySP/textual
0995fbc69e4740edb31fdf6f645617650e3376bb
[ "MIT" ]
1
2021-08-10T11:46:19.000Z
2021-08-10T11:46:19.000Z
src/textual/layout.py
NoblySP/textual
0995fbc69e4740edb31fdf6f645617650e3376bb
[ "MIT" ]
null
null
null
src/textual/layout.py
NoblySP/textual
0995fbc69e4740edb31fdf6f645617650e3376bb
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import ABC, abstractmethod, abstractmethod from dataclasses import dataclass from itertools import chain from operator import itemgetter import sys from typing import Iterable, Iterator, NamedTuple, TYPE_CHECKING from rich import segment import rich.repr from rich.control ...
31.781726
92
0.583134
from __future__ import annotations from abc import ABC, abstractmethod, abstractmethod from dataclasses import dataclass from itertools import chain from operator import itemgetter import sys from typing import Iterable, Iterator, NamedTuple, TYPE_CHECKING from rich import segment import rich.repr from rich.control ...
true
true
f746489abdb7d7e7019a542221de4996fca5bd6e
1,224
py
Python
domains/nav/problems/auto/problem1116_SD.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
1
2021-09-28T12:56:56.000Z
2021-09-28T12:56:56.000Z
domains/nav/problems/auto/problem1116_SD.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
null
null
null
domains/nav/problems/auto/problem1116_SD.py
patras91/rae_release
0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30
[ "BSD-3-Clause" ]
1
2022-03-31T16:30:39.000Z
2022-03-31T16:30:39.000Z
__author__ = 'patras' from domain_springDoor import * from timer import DURATION from state import state, rv DURATION.TIME = { 'unlatch1': 5, 'unlatch2': 5, 'holdDoor': 2, 'passDoor': 3, 'releaseDoor': 2, 'closeDoors': 3, 'move': 7, 'take': 2, 'put': 2, } DURATION.COUNTER = { ...
24
88
0.487745
__author__ = 'patras' from domain_springDoor import * from timer import DURATION from state import state, rv DURATION.TIME = { 'unlatch1': 5, 'unlatch2': 5, 'holdDoor': 2, 'passDoor': 3, 'releaseDoor': 2, 'closeDoors': 3, 'move': 7, 'take': 2, 'put': 2, } DURATION.COUNTER = { ...
true
true
f74648c0866f27238413a8d3452ffc12b9252651
22,688
py
Python
g3ar/threadutils/threadpoolex.py
VillanCh/g3ar
99e01dacc130b02a3759ff04b1d36c6b9e0111ff
[ "BSD-2-Clause" ]
48
2016-12-20T18:48:07.000Z
2021-07-28T07:39:38.000Z
g3ar/threadutils/threadpoolex.py
VillanCh/g3ar
99e01dacc130b02a3759ff04b1d36c6b9e0111ff
[ "BSD-2-Clause" ]
null
null
null
g3ar/threadutils/threadpoolex.py
VillanCh/g3ar
99e01dacc130b02a3759ff04b1d36c6b9e0111ff
[ "BSD-2-Clause" ]
24
2016-12-21T02:18:12.000Z
2021-11-30T04:19:45.000Z
#!/usr/bin/env python #coding:utf-8 """ Author: --<v1ll4n> Purpose: ThreadPool From Twisted and Add Common Resource Created: 05/13/17 """ from __future__ import unicode_literals import uuid import threading import traceback try: import queue except: import Queue as queue import time import random cla...
29.312661
104
0.435781
from __future__ import unicode_literals import uuid import threading import traceback try: import queue except: import Queue as queue import time import random class LaborQuit(Exception): pass _callback_chain_lock = threading.Lock() elf): return self._inuse @inuse.setter def inus...
true
true
f74649f2d8fc5d9ebda3e129de35a289fc60f05d
2,499
py
Python
openGaussBase/testcase/SQL/DDL/directory/Opengauss_Function_DDL_Create_Directory_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DDL/directory/Opengauss_Function_DDL_Create_Directory_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DDL/directory/Opengauss_Function_DDL_Create_Directory_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 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" BASIS, W...
32.454545
84
0.603441
import os import unittest from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger from yat.test import Node from yat.test import macro logger = Logger() class Function(unittest.TestCase): def setUp(self): logger.info(f"-----{os.path.basename(__file__)}开始执行-----") ...
true
true
f7464c3f1d64f27226897fde14b087f7a781104d
1,841
py
Python
longqiao/longqiao/apps/users/utils.py
yktimes/longqiao
80f98c3f5816c08af9fb8ed6dc43f61c4cc9893d
[ "Apache-2.0" ]
1
2019-09-11T10:24:47.000Z
2019-09-11T10:24:47.000Z
longqiao/longqiao/apps/users/utils.py
yktimes/longqiao
80f98c3f5816c08af9fb8ed6dc43f61c4cc9893d
[ "Apache-2.0" ]
null
null
null
longqiao/longqiao/apps/users/utils.py
yktimes/longqiao
80f98c3f5816c08af9fb8ed6dc43f61c4cc9893d
[ "Apache-2.0" ]
null
null
null
import datetime import re from rest_framework_jwt.settings import api_settings from django.contrib.auth.backends import ModelBackend from .models import User # def get_user_by_account(account): # """ # 根据帐号获取user对象 # :param account: 账号,可以是用户名,也可以是手机号 # :return: User对象 或者 None # """ # try: # ...
21.406977
90
0.624117
import datetime import re from rest_framework_jwt.settings import api_settings from django.contrib.auth.backends import ModelBackend from .models import User # 根据帐号获取user对象 # :param account: 账号,可以是用户名,也可以是手机号 # :return: User对象 或者 None # """ UsernameMobileAuthBackend(ModelBackend): def authe...
true
true
f7464c75a95b7caa0a1d00744ad0eff4f444aaa2
5,302
py
Python
process_launchers.py
node21challenge/rank3_node21_detection
bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6
[ "Apache-2.0" ]
null
null
null
process_launchers.py
node21challenge/rank3_node21_detection
bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6
[ "Apache-2.0" ]
null
null
null
process_launchers.py
node21challenge/rank3_node21_detection
bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6
[ "Apache-2.0" ]
1
2022-02-13T14:58:24.000Z
2022-02-13T14:58:24.000Z
import logging import os from collections import OrderedDict from pathlib import Path import torch import itertools import detectron2.utils.comm as comm from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.data import MetadataCatalog from detectron2.engine impor...
30.647399
99
0.700868
import logging import os from collections import OrderedDict from pathlib import Path import torch import itertools import detectron2.utils.comm as comm from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.data import MetadataCatalog from detectron2.engine impor...
true
true
f7464dc51ab3ea9751a2a49c3e005d90df108c43
1,015
py
Python
main.py
IntensifyScratch/MessageAPI
825d8619cb7ddccbdf9c232cefe213e28d843e36
[ "MIT" ]
null
null
null
main.py
IntensifyScratch/MessageAPI
825d8619cb7ddccbdf9c232cefe213e28d843e36
[ "MIT" ]
null
null
null
main.py
IntensifyScratch/MessageAPI
825d8619cb7ddccbdf9c232cefe213e28d843e36
[ "MIT" ]
null
null
null
import os import time import scratchconnect login = scratchconnect.ScratchConnect("-IntensifyServer-", "Intens1!") print("Logged In!") project = login.connect_project(project_id=599331245) print("Connected Project!") variables = project.connect_cloud_variables() print("Connected Cloud Variables!") while True: ...
36.25
90
0.6867
import os import time import scratchconnect login = scratchconnect.ScratchConnect("-IntensifyServer-", "Intens1!") print("Logged In!") project = login.connect_project(project_id=599331245) print("Connected Project!") variables = project.connect_cloud_variables() print("Connected Cloud Variables!") while True: ...
true
true
f7464e0f0c15dbd35fddf3e1712cf665bf0d2b48
15,563
py
Python
python/mxnet/gluon/nn/binary_layers.py
simonmaurer/BMXNet-v2
91fcc480d66415c9c70254e00114b839e5229f10
[ "Apache-2.0" ]
null
null
null
python/mxnet/gluon/nn/binary_layers.py
simonmaurer/BMXNet-v2
91fcc480d66415c9c70254e00114b839e5229f10
[ "Apache-2.0" ]
null
null
null
python/mxnet/gluon/nn/binary_layers.py
simonmaurer/BMXNet-v2
91fcc480d66415c9c70254e00114b839e5229f10
[ "Apache-2.0" ]
null
null
null
from functools import reduce from operator import mul from .basic_layers import Dense, HybridBlock from .conv_layers import _Conv from ...base import numeric_types from ...symbol import Symbol from sys import version_info class BinaryLayerConfig: def __init__(self, grad_cancel=1.0, bits=1, bits_a=1, activation=...
44.087819
120
0.643578
from functools import reduce from operator import mul from .basic_layers import Dense, HybridBlock from .conv_layers import _Conv from ...base import numeric_types from ...symbol import Symbol from sys import version_info class BinaryLayerConfig: def __init__(self, grad_cancel=1.0, bits=1, bits_a=1, activation=...
true
true
f746500fc02a6a1d5107e7545b93382ce91299c0
3,334
py
Python
telelbirds/settings.py
kngeno/telelbirds
924bb2f1c397bbab2bd626d582c8e86704d86176
[ "MIT" ]
2
2021-01-05T06:16:32.000Z
2021-09-09T10:42:53.000Z
telelbirds/settings.py
kngeno/telelbirds
924bb2f1c397bbab2bd626d582c8e86704d86176
[ "MIT" ]
null
null
null
telelbirds/settings.py
kngeno/telelbirds
924bb2f1c397bbab2bd626d582c8e86704d86176
[ "MIT" ]
null
null
null
""" Django settings for telelbirds project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os ...
24.880597
91
0.695261
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'bzb(%44=gi!3@3+6e^a1d8b-#6jak=fd@kj^@lpekyrrql(7@4' DEBUG = True SITE_ID = 1 # Run management command 'set_site_values to set these values SITE_NAME = 'TelelBirds' SITE_DOMAIN = 'telelbirds.com' ALLOWED_HOSTS ...
true
true
f746505f545be7e9c5ee1e10af7eb72bd7d56eb9
536
py
Python
Python/number-of-matching-subsequences.py
ycsheu/LeetCode-Solutions
32c3b4d5c130b6ade3c7db8212f0eb8ec4396cc0
[ "MIT" ]
7
2019-04-13T13:44:26.000Z
2021-05-08T07:59:41.000Z
Python/number-of-matching-subsequences.py
cchen767/LeetCode-Solutions
79c1c5b422fb88253f586350ddfc7d774c9d2ffc
[ "MIT" ]
null
null
null
Python/number-of-matching-subsequences.py
cchen767/LeetCode-Solutions
79c1c5b422fb88253f586350ddfc7d774c9d2ffc
[ "MIT" ]
5
2019-06-21T13:36:41.000Z
2021-11-29T04:42:24.000Z
# Time: O(n + w), n is the size of S, w is the size of words # Space: O(1) import collections class Solution(object): def numMatchingSubseq(self, S, words): """ :type S: str :type words: List[str] :rtype: int """ waiting = collections.defaultdict(list) for...
24.363636
61
0.533582
import collections class Solution(object): def numMatchingSubseq(self, S, words): waiting = collections.defaultdict(list) for word in words: waiting[word[0]].append(iter(word[1:])) for c in S: for it in waiting.pop(c, ()): waiting[next(it, None)]....
true
true
f74650bca27cd98f848ab712fe6441c4342d001e
878
py
Python
setup.py
filipeandre/f_tools
3ac9cf87ced81459fd7f534b287f9cb450ec8806
[ "MIT" ]
null
null
null
setup.py
filipeandre/f_tools
3ac9cf87ced81459fd7f534b287f9cb450ec8806
[ "MIT" ]
null
null
null
setup.py
filipeandre/f_tools
3ac9cf87ced81459fd7f534b287f9cb450ec8806
[ "MIT" ]
null
null
null
"""Setup for the f_tools package.""" import setuptools with open('README.md') as f: README = f.read() setuptools.setup( author="Filipe Ferreira", author_email="py@filipeandre.com", name='f_tools', license="MIT", description='A set of low level framework utilities', version='1.2.3', long_description=README, ...
27.4375
65
0.6959
import setuptools with open('README.md') as f: README = f.read() setuptools.setup( author="Filipe Ferreira", author_email="py@filipeandre.com", name='f_tools', license="MIT", description='A set of low level framework utilities', version='1.2.3', long_description=README, url='https://github.com/filipeandre/...
true
true
f74651872fe5deb51046334f7572a7f69c539cd4
13,265
py
Python
tests/script_tests.py
anukaal/pywikibot
086e99d686ceebb40cb2e3dc7989e78ce6de3b85
[ "MIT" ]
1
2021-07-28T11:48:03.000Z
2021-07-28T11:48:03.000Z
tests/script_tests.py
anukaal/pywikibot
086e99d686ceebb40cb2e3dc7989e78ce6de3b85
[ "MIT" ]
null
null
null
tests/script_tests.py
anukaal/pywikibot
086e99d686ceebb40cb2e3dc7989e78ce6de3b85
[ "MIT" ]
null
null
null
"""Test that each script can be compiled and executed.""" # # (C) Pywikibot team, 2014-2021 # # Distributed under the terms of the MIT license. # import os import sys import unittest from contextlib import suppress from pywikibot.tools import has_module from tests import join_root_path, unittest_print from tests.aspec...
35.467914
79
0.572333
import os import sys import unittest from contextlib import suppress from pywikibot.tools import has_module from tests import join_root_path, unittest_print from tests.aspects import DefaultSiteTestCase, MetaTestCaseClass, PwbTestCase from tests.utils import execute_pwb scripts_path = join_root_path('scripts') ...
true
true
f746538a7c2a3bfe29d874de132ca682050fd11b
1,599
py
Python
detection/yolov3/yolov3.py
benoitLemoine/stage2A
a81de38deaf786227e6d34c04803da5e5854c9f1
[ "MIT" ]
1
2019-11-20T18:44:33.000Z
2019-11-20T18:44:33.000Z
detection/yolov3/yolov3.py
benoitLemoine/stage2A
a81de38deaf786227e6d34c04803da5e5854c9f1
[ "MIT" ]
4
2020-01-28T22:12:51.000Z
2021-03-19T00:47:24.000Z
detection/yolov3/yolov3.py
benoitLemoine/peopleCounting
a81de38deaf786227e6d34c04803da5e5854c9f1
[ "MIT" ]
null
null
null
import tensorflow as tf import cv2 as cv import numpy as np from PIL import Image from core import utils classesPath = "../../data/coco.names" modelPath = "../../checkpoint/yolov3_cpu_nms.pb" IMAGE_H, IMAGE_W = 416, 416 classes = utils.read_coco_names(classesPath) num_classes = len(classes) input_tensor, output_tens...
30.75
116
0.6404
import tensorflow as tf import cv2 as cv import numpy as np from PIL import Image from core import utils classesPath = "../../data/coco.names" modelPath = "../../checkpoint/yolov3_cpu_nms.pb" IMAGE_H, IMAGE_W = 416, 416 classes = utils.read_coco_names(classesPath) num_classes = len(classes) input_tensor, output_tens...
true
true
f74654c1eab56d82c107b8d5f591840165ea5a13
604
py
Python
tools.py
Doraemon-h/Information-Retrieval
48a12b7420a9da77dd7a00cafcd81356a350ad84
[ "MIT" ]
null
null
null
tools.py
Doraemon-h/Information-Retrieval
48a12b7420a9da77dd7a00cafcd81356a350ad84
[ "MIT" ]
null
null
null
tools.py
Doraemon-h/Information-Retrieval
48a12b7420a9da77dd7a00cafcd81356a350ad84
[ "MIT" ]
null
null
null
import json import os projectpath ="./" reuterspath = "./Reuters" def writeToFile(item,filename): # 将数据写入到文件中 file = open(filename,'w') str = json.JSONEncoder().encode(item) file.write(str) file.close() #获取文档名中的文档的id def getDocID(filename): end = filename.find('.') docId...
20.827586
42
0.634106
import json import os projectpath ="./" reuterspath = "./Reuters" def writeToFile(item,filename): file = open(filename,'w') str = json.JSONEncoder().encode(item) file.write(str) file.close() def getDocID(filename): end = filename.find('.') docId = filename[0:end] re...
true
true
f746553ae824b7143283649925ff265e0cf466de
1,665
py
Python
akebono/commands/models/inspect.py
OTA2000/akebono
11f88f3605a66989ac5cf11cb6af7b93987bcf59
[ "MIT" ]
3
2018-09-28T01:35:41.000Z
2020-06-22T07:09:14.000Z
akebono/commands/models/inspect.py
OTA2000/akebono
11f88f3605a66989ac5cf11cb6af7b93987bcf59
[ "MIT" ]
1
2020-01-06T08:15:10.000Z
2020-01-06T08:15:10.000Z
akebono/commands/models/inspect.py
OTA2000/akebono
11f88f3605a66989ac5cf11cb6af7b93987bcf59
[ "MIT" ]
6
2018-08-10T03:04:28.000Z
2020-02-03T02:28:08.000Z
import datetime import copy import pprint from .base import CommandBase from akebono.inspector import get_scenario_summary def _get_fixed_length_str(s, length): if not isinstance(s, str): raise TypeError('invalid type') l = length - len(s) if l < 0: raise Exception('invalid length') r...
36.195652
96
0.563964
import datetime import copy import pprint from .base import CommandBase from akebono.inspector import get_scenario_summary def _get_fixed_length_str(s, length): if not isinstance(s, str): raise TypeError('invalid type') l = length - len(s) if l < 0: raise Exception('invalid length') r...
true
true
f74655406b7d7e59061c29d572b77a797ffa5b38
2,025
py
Python
main.py
LaoKpa/T-1000
5d88f74ddb2a0d47c3101072d6b9f6971fb2ba26
[ "MIT" ]
111
2019-10-30T01:12:49.000Z
2022-03-10T04:54:43.000Z
main.py
charlesedwards/T-1000
5d88f74ddb2a0d47c3101072d6b9f6971fb2ba26
[ "MIT" ]
16
2019-10-24T15:52:05.000Z
2022-02-05T17:55:02.000Z
main.py
charlesedwards/T-1000
5d88f74ddb2a0d47c3101072d6b9f6971fb2ba26
[ "MIT" ]
33
2019-11-03T14:51:23.000Z
2021-12-02T07:40:25.000Z
if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='T-1000 bot') parser.add_argument('-a', action="store", dest='assets', nargs='+', help='assets to test') parser.add_argument('-c', action="store", dest="currency", type=str, default='DAI') parser.add_argument('-g', action="sto...
46.022727
99
0.721975
if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='T-1000 bot') parser.add_argument('-a', action="store", dest='assets', nargs='+', help='assets to test') parser.add_argument('-c', action="store", dest="currency", type=str, default='DAI') parser.add_argument('-g', action="sto...
true
true
f74655e64b0b3241641d247965d896e4533502d1
1,380
py
Python
scripts/backup/s3cleanup.py
MTES-MCT/biocarburants
ff084916e18cdbdc41400f36fa6cc76a5e05900e
[ "MIT" ]
4
2020-03-22T18:13:12.000Z
2021-01-25T10:33:31.000Z
scripts/backup/s3cleanup.py
MTES-MCT/carbure
2876756b760ab4866fa783bb40e61a046eebb1ab
[ "MIT" ]
20
2020-07-06T14:33:14.000Z
2022-03-15T16:54:17.000Z
scripts/backup/s3cleanup.py
MTES-MCT/biocarburants
ff084916e18cdbdc41400f36fa6cc76a5e05900e
[ "MIT" ]
4
2020-04-03T12:19:12.000Z
2021-06-15T12:20:57.000Z
import sys import os import boto3 import datetime import argparse def cleanup_s3db(args): s3 = boto3.resource('s3', aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'], aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'], region_name=os.environ['AWS_S3_REGION_NAME'], endpoint_url=os.environ['AWS_S3_ENDPOINT_UR...
32.857143
271
0.676812
import sys import os import boto3 import datetime import argparse def cleanup_s3db(args): s3 = boto3.resource('s3', aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'], aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'], region_name=os.environ['AWS_S3_REGION_NAME'], endpoint_url=os.environ['AWS_S3_ENDPOINT_UR...
true
true
f746561d2e6febb8c9a9e2a0a2f369ef9ea25cea
847
py
Python
python_modules/libraries/dagster-postgres/dagster_postgres/utils.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
1
2019-11-25T19:03:32.000Z
2019-11-25T19:03:32.000Z
python_modules/libraries/dagster-postgres/dagster_postgres/utils.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-postgres/dagster_postgres/utils.py
shahvineet98/dagster
2471d39c52f660e23e8c0d8e8ded873ddc3df036
[ "Apache-2.0" ]
null
null
null
import time import psycopg2 def get_conn(conn_string): conn = psycopg2.connect(conn_string) conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) return conn def get_conn_string(username, password, hostname, db_name, port='5432'): return 'postgresql://{username}:{password}@{hostn...
25.666667
95
0.693034
import time import psycopg2 def get_conn(conn_string): conn = psycopg2.connect(conn_string) conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) return conn def get_conn_string(username, password, hostname, db_name, port='5432'): return 'postgresql://{username}:{password}@{hostn...
true
true
f746566e6654c9d0903c29149dd8a3faeebbbb6a
3,177
py
Python
eth/vm/message.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
1,641
2017-11-24T04:24:22.000Z
2022-03-31T14:59:30.000Z
eth/vm/message.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
1,347
2017-11-23T10:37:36.000Z
2022-03-20T16:31:44.000Z
eth/vm/message.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
567
2017-11-22T18:03:27.000Z
2022-03-28T17:49:08.000Z
import logging from eth_typing import Address from eth.abc import MessageAPI from eth.constants import ( CREATE_CONTRACT_ADDRESS, ) from eth.typing import ( BytesOrView, ) from eth.validation import ( validate_canonical_address, validate_is_bytes, validate_is_bytes_or_view, validate_is_integer...
29.146789
89
0.633617
import logging from eth_typing import Address from eth.abc import MessageAPI from eth.constants import ( CREATE_CONTRACT_ADDRESS, ) from eth.typing import ( BytesOrView, ) from eth.validation import ( validate_canonical_address, validate_is_bytes, validate_is_bytes_or_view, validate_is_integer...
true
true
f746575b0e87cb800e494f0905cce68409b6d6ab
329
py
Python
mutations/mutation_organization/__init__.py
akarapun/elearning
fe116d5815925269819061ea183cbfdb773844cf
[ "MIT" ]
1
2020-03-14T11:00:14.000Z
2020-03-14T11:00:14.000Z
mutations/mutation_organization/__init__.py
akarapun/elearning
fe116d5815925269819061ea183cbfdb773844cf
[ "MIT" ]
null
null
null
mutations/mutation_organization/__init__.py
akarapun/elearning
fe116d5815925269819061ea183cbfdb773844cf
[ "MIT" ]
null
null
null
import graphene from graphene import ( String, Int ) # Org schema Base class from schema_models import Org class OrgCreateInput(graphene.InputObjectType): orgCode = String(required=True) strCode = String() parentOrgCode = String() orgTypeCode = String() orgDesc = String() createdBy = ...
18.277778
47
0.696049
import graphene from graphene import ( String, Int ) from schema_models import Org class OrgCreateInput(graphene.InputObjectType): orgCode = String(required=True) strCode = String() parentOrgCode = String() orgTypeCode = String() orgDesc = String() createdBy = String()
true
true
f74658e2dd606c2a8b4288efb0b7a945d40c22d8
1,094
py
Python
mycode/test_03_ch5_4.py
JamesWang007/Dive-into-DL-PyTorch
267b54168322ab37da44e83008fba4f24b70fa9f
[ "Apache-2.0" ]
1
2019-11-15T18:35:36.000Z
2019-11-15T18:35:36.000Z
mycode/test_03_ch5_4.py
JamesWang007/Dive-into-DL-PyTorch
267b54168322ab37da44e83008fba4f24b70fa9f
[ "Apache-2.0" ]
null
null
null
mycode/test_03_ch5_4.py
JamesWang007/Dive-into-DL-PyTorch
267b54168322ab37da44e83008fba4f24b70fa9f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Mar 25 23:09:40 2020 5.4 池化层 https://tangshusen.me/Dive-into-DL-PyTorch/#/chapter05_CNN/5.4_pooling @author: bejin """ import torch from torch import nn def pool2d(X, pool_size, mode='max'): X = X.float() p_h, p_w = pool_size Y = torch.zeros(X.shape[0] ...
13.675
74
0.526508
import torch from torch import nn def pool2d(X, pool_size, mode='max'): X = X.float() p_h, p_w = pool_size Y = torch.zeros(X.shape[0] - p_h + 1, X.shape[1] - p_w + 1) for i in range(Y.shape[0]): for j in range(Y.shape[1]): if mode == 'max': Y[i, j] = X[i: i + p_h...
true
true
f74659e6a5d3ef3eba4b6d5de9c4e424fb7564e8
693
py
Python
prob-78.py
tushargayan2324/Project_Euler
874accc918e23337510056d7140cd85a1656dd3e
[ "MIT" ]
null
null
null
prob-78.py
tushargayan2324/Project_Euler
874accc918e23337510056d7140cd85a1656dd3e
[ "MIT" ]
null
null
null
prob-78.py
tushargayan2324/Project_Euler
874accc918e23337510056d7140cd85a1656dd3e
[ "MIT" ]
null
null
null
#Project Euler Problem-78 #Author Tushar Gayan #Multinomial Theorem import math import numpy as np def mod_list(pow,terms): m = [] for i in range(terms): if i%pow == 0: m.append(1) else: m.append(0) return m[::-1] def partition(n): num_l...
20.382353
53
0.545455
import math import numpy as np def mod_list(pow,terms): m = [] for i in range(terms): if i%pow == 0: m.append(1) else: m.append(0) return m[::-1] def partition(n): num_list = [] for i in range(1,n+1): num_list.append(i) ...
true
true
f7465aa17531ab2069fea78139986db5f8232c2b
4,622
py
Python
src/app/section_3/sectionWrInjGraph.py
dheerajgupta0001/rtm_daily_report_generator
591a21ed1888df8b50eb8e873e03387df5d5a6e7
[ "MIT" ]
null
null
null
src/app/section_3/sectionWrInjGraph.py
dheerajgupta0001/rtm_daily_report_generator
591a21ed1888df8b50eb8e873e03387df5d5a6e7
[ "MIT" ]
null
null
null
src/app/section_3/sectionWrInjGraph.py
dheerajgupta0001/rtm_daily_report_generator
591a21ed1888df8b50eb8e873e03387df5d5a6e7
[ "MIT" ]
1
2021-10-21T09:08:46.000Z
2021-10-21T09:08:46.000Z
import datetime as dt from src.repos.metricsData.metricsDataRepo import MetricsDataRepo import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'figure.max_open_warning': 0}) import matplotlib.dates as mdates def fetchWrInjGraphContext(appDbConnStr: str, startDt: dt.datetime, endDt: dt.datetime) -> ...
45.762376
131
0.718736
import datetime as dt from src.repos.metricsData.metricsDataRepo import MetricsDataRepo import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'figure.max_open_warning': 0}) import matplotlib.dates as mdates def fetchWrInjGraphContext(appDbConnStr: str, startDt: dt.datetime, endDt: dt.datetime) -> ...
true
true
f7465b2fbf84774444410d20d5b8469a940a6c5c
2,059
py
Python
umu-python/app/service/umm_client_async.py
suomitek/cubeai
cc4c0f5f445a552d239910da63944307c1f06e37
[ "Apache-2.0" ]
null
null
null
umu-python/app/service/umm_client_async.py
suomitek/cubeai
cc4c0f5f445a552d239910da63944307c1f06e37
[ "Apache-2.0" ]
null
null
null
umu-python/app/service/umm_client_async.py
suomitek/cubeai
cc4c0f5f445a552d239910da63944307c1f06e37
[ "Apache-2.0" ]
null
null
null
import json from app.service.http_client_async import async_http_client service_name = 'umm' async def create_task(task, jwt): return await async_http_client('post', service_name, '/api/tasks', body=json.dumps(task.__dict__), jwt=jwt) async def update_task(task, jwt): return await async_http_client('put',...
35.5
121
0.745993
import json from app.service.http_client_async import async_http_client service_name = 'umm' async def create_task(task, jwt): return await async_http_client('post', service_name, '/api/tasks', body=json.dumps(task.__dict__), jwt=jwt) async def update_task(task, jwt): return await async_http_client('put',...
true
true
f7465b4c4708bf7194086e63ed3e8dded867a3b8
279
py
Python
catalog/bindings/gmd/vertical_cstype.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/vertical_cstype.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/vertical_cstype.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from bindings.gmd.abstract_coordinate_system_type import AbstractCoordinateSystemType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class VerticalCstype(AbstractCoordinateSystemType): class Meta: name = "VerticalCSType"
25.363636
85
0.810036
from dataclasses import dataclass from bindings.gmd.abstract_coordinate_system_type import AbstractCoordinateSystemType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class VerticalCstype(AbstractCoordinateSystemType): class Meta: name = "VerticalCSType"
true
true
f7465b68629a068e3b32847c3fdb67764d9689d2
3,607
py
Python
examples/pytorch/example04_housing_validation.py
ii-research-yu/pgbm
d050a5f71f1a458d8269c4f5201744c0d7c4d487
[ "Apache-2.0" ]
79
2021-06-02T06:59:08.000Z
2022-03-10T20:27:02.000Z
examples/pytorch/example04_housing_validation.py
ii-research-yu/pgbm
d050a5f71f1a458d8269c4f5201744c0d7c4d487
[ "Apache-2.0" ]
11
2021-06-07T17:39:34.000Z
2022-01-10T14:00:21.000Z
examples/pytorch/example04_housing_validation.py
ii-research-yu/pgbm
d050a5f71f1a458d8269c4f5201744c0d7c4d487
[ "Apache-2.0" ]
10
2021-06-08T01:04:03.000Z
2022-03-31T23:41:23.000Z
""" Copyright (c) 2021 Olivier Sprangers as part of Airlab Amsterdam 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 require...
35.712871
121
0.693374
import torch from pgbm import PGBM from sklearn.model_selection import train_test_split from sklearn.datasets import fetch_california_housing import matplotlib.pyplot as plt def mseloss_objective(yhat, y, sample_weight=None): gradient = (yhat - y) hessian = torch.ones_like(yhat) return gradient, hessian...
true
true
f7465b8b5dce012009d013d220d056c339c49b48
387
py
Python
Dictionary_1.py
SahilSandasani/Py
edd96992f862425aca9182ac781acb6a91eaed06
[ "MIT" ]
null
null
null
Dictionary_1.py
SahilSandasani/Py
edd96992f862425aca9182ac781acb6a91eaed06
[ "MIT" ]
null
null
null
Dictionary_1.py
SahilSandasani/Py
edd96992f862425aca9182ac781acb6a91eaed06
[ "MIT" ]
null
null
null
student = {"Name":"Drax", "Age":13, "Class":"First"} print(student["Name"]) print(student["Age"]) print(student["Class"]) student["Name"] = "Quill" print(student["Name"]) student["School"] = "Falletone" print(student["School"]) print(student) print(len(student)) #del student["Name"] print(student) #student.clear() prin...
22.764706
52
0.692506
student = {"Name":"Drax", "Age":13, "Class":"First"} print(student["Name"]) print(student["Age"]) print(student["Class"]) student["Name"] = "Quill" print(student["Name"]) student["School"] = "Falletone" print(student["School"]) print(student) print(len(student)) print(student) print(student) print(student) print(stu...
true
true
f7465be3544cf5da84cf8b1b04ca7226091800a2
808
py
Python
17 GuessNo/main.py
codewithsandy/Python-Basic-Exp
4c70ada4a042923a94301453c7bd76e704cd2989
[ "MIT" ]
3
2021-05-08T13:11:41.000Z
2021-05-14T02:43:20.000Z
17 GuessNo/main.py
codewithsandy/Python-Basic-Exp
4c70ada4a042923a94301453c7bd76e704cd2989
[ "MIT" ]
null
null
null
17 GuessNo/main.py
codewithsandy/Python-Basic-Exp
4c70ada4a042923a94301453c7bd76e704cd2989
[ "MIT" ]
null
null
null
n = 18 number_of_guesses=1 print("Number of guesses is limited to only 9 times from 1 to 100") while (number_of_guesses<=9): guess_number = int(input("Guess the number :\n")) if guess_number<20: print("You enter Less No. Please enter greator no.\n") elif guess_number<40: print("Please enter ...
38.47619
72
0.674505
n = 18 number_of_guesses=1 print("Number of guesses is limited to only 9 times from 1 to 100") while (number_of_guesses<=9): guess_number = int(input("Guess the number :\n")) if guess_number<20: print("You enter Less No. Please enter greator no.\n") elif guess_number<40: print("Please enter ...
true
true
f7465cd9d9a542e1082a13dffc61193fe367e269
5,324
py
Python
main_ver2.py
leenuu/discord-bot
f2ff4bea8c65a5b780c41bbe12b40ee8e8f827db
[ "MIT" ]
null
null
null
main_ver2.py
leenuu/discord-bot
f2ff4bea8c65a5b780c41bbe12b40ee8e8f827db
[ "MIT" ]
null
null
null
main_ver2.py
leenuu/discord-bot
f2ff4bea8c65a5b780c41bbe12b40ee8e8f827db
[ "MIT" ]
null
null
null
import openpyxl import json from datetime import datetime class bank: def __init__(self): self.log = dict() self.log['server'] = list() self.data = dict() self.goods = {1 : 1000, 2 : 800, 3 : 600, 4 : 550, 5 : 500, 6 : 400, 7 : 350, 8 : 300, 9 : 100, 10 : 50} self.files = ...
33.275
167
0.509016
import openpyxl import json from datetime import datetime class bank: def __init__(self): self.log = dict() self.log['server'] = list() self.data = dict() self.goods = {1 : 1000, 2 : 800, 3 : 600, 4 : 550, 5 : 500, 6 : 400, 7 : 350, 8 : 300, 9 : 100, 10 : 50} self.files = ...
true
true
f7465d9aec98e76d4b6de70ba5a9759ac139ed39
1,254
py
Python
lib/surface/assured/operations/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/assured/operations/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/assured/operations/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
33.891892
82
0.759171
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base from googlecloudsdk.calliope.base import ReleaseTrack @base.ReleaseTracks(ReleaseTrack.GA, ReleaseTrack.BETA, ReleaseTrack.ALPHA) class Operations(base...
true
true
f7465f80f5bc1996a23bf77fdee9783fb3241a29
12,898
py
Python
src/ZODB/BaseStorage.py
unkloud/ZODB
63dcee8d3bf0df6a05b75a378292a1a6061ce0c2
[ "ZPL-2.1" ]
null
null
null
src/ZODB/BaseStorage.py
unkloud/ZODB
63dcee8d3bf0df6a05b75a378292a1a6061ce0c2
[ "ZPL-2.1" ]
null
null
null
src/ZODB/BaseStorage.py
unkloud/ZODB
63dcee8d3bf0df6a05b75a378292a1a6061ce0c2
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
33.853018
79
0.615754
preget = preindex.get # restore() is a new storage API method which has an identical # signature to store() except that it does not return anything. # Semantically, restore() is also identical to store() except that it # doesn't do the ConflictError or VersionLockError consistency ...
true
true
f74663c775b9d66e801488139184466fb325657e
6,050
py
Python
pyconcz/programme/models.py
webknjaz/cz.pycon.org-2019
cead95a962892cba8dd0f530eb2a68d6c34a84b9
[ "MIT" ]
null
null
null
pyconcz/programme/models.py
webknjaz/cz.pycon.org-2019
cead95a962892cba8dd0f530eb2a68d6c34a84b9
[ "MIT" ]
null
null
null
pyconcz/programme/models.py
webknjaz/cz.pycon.org-2019
cead95a962892cba8dd0f530eb2a68d6c34a84b9
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.urls import reverse class Speaker(models.Model): full_name = models.CharField(max_length=200) bio = models.TextF...
36.890244
180
0.668926
from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.urls import reverse class Speaker(models.Model): full_name = models.CharField(max_length=200) bio = models.TextF...
true
true
f74663fe94d2f7be48bb1d8290e4be2b67471bbd
5,928
py
Python
cykel/settings.py
exmatrikulator/cykel
37f71ce7ac2ce8fb94956eed0c496b50d60b9020
[ "MIT" ]
null
null
null
cykel/settings.py
exmatrikulator/cykel
37f71ce7ac2ce8fb94956eed0c496b50d60b9020
[ "MIT" ]
null
null
null
cykel/settings.py
exmatrikulator/cykel
37f71ce7ac2ce8fb94956eed0c496b50d60b9020
[ "MIT" ]
null
null
null
"""Django settings for cykel project. Generated by 'django-admin startproject' using Django 2.0.4. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os impo...
28.5
105
0.727227
import os import environ import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration env = environ.Env( DEBUG=(bool, False) ) environ.Env.read_env() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = env("SECRET_KEY") DEBUG = env("DEBUG") ALLO...
true
true
f746656ccab7774acec8e6d4c08f2a558a8f3933
234
py
Python
test/ROUTER/router_connect.py
huiyaozheng/Mirage-zmq
af288a3378a7c357bd5646a3abf4fd5ae777369b
[ "ISC" ]
8
2019-05-09T09:27:12.000Z
2019-05-13T14:44:48.000Z
test/ROUTER/router_connect.py
huiyaozheng/0MQ-MirageOS
af288a3378a7c357bd5646a3abf4fd5ae777369b
[ "ISC" ]
null
null
null
test/ROUTER/router_connect.py
huiyaozheng/0MQ-MirageOS
af288a3378a7c357bd5646a3abf4fd5ae777369b
[ "ISC" ]
1
2019-05-09T09:22:36.000Z
2019-05-09T09:22:36.000Z
import zmq import time context = zmq.Context() socket = context.socket(zmq.ROUTER) socket.connect("tcp://127.0.0.1:5556") time.sleep(1) socket.send_multipart([b'router',b'Hello']) address, msg = socket.recv_multipart() print(msg)
23.4
43
0.730769
import zmq import time context = zmq.Context() socket = context.socket(zmq.ROUTER) socket.connect("tcp://127.0.0.1:5556") time.sleep(1) socket.send_multipart([b'router',b'Hello']) address, msg = socket.recv_multipart() print(msg)
true
true
f7466644154d90181574be5be94e98e8a3df0a8c
213
py
Python
Python/DTypes.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
Python/DTypes.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
Python/DTypes.py
sid-146/Python-RePo-sEm-6
daf23074a411d38013329baf9eb2b8fb0c42fc54
[ "MIT" ]
null
null
null
a = int(10) print(a, type(a)) b = 1.0 # b = float(1.0) print(b,type(b)) c = 1+2j print(c,type(c)) l = [1,2,3,4,5] print(l ,type(l)) t = (1,2,3,4,5) print(t,type(t)) s = 'Sudhanwa Kaveeshwar' print(s,type(s))
11.210526
25
0.553991
a = int(10) print(a, type(a)) b = 1.0 print(b,type(b)) c = 1+2j print(c,type(c)) l = [1,2,3,4,5] print(l ,type(l)) t = (1,2,3,4,5) print(t,type(t)) s = 'Sudhanwa Kaveeshwar' print(s,type(s))
true
true
f746665a4be2371d32ed54b112ebfdc033a4e04b
2,409
py
Python
tasks/tests/test_get_task_comments.py
aradz1997/beyond-os-06-group-2
5c8970b65b82fb2b9be243c252360fb7feb0d3b8
[ "MIT" ]
7
2021-11-06T20:30:41.000Z
2021-12-15T09:13:17.000Z
tasks/tests/test_get_task_comments.py
aradz1997/beyond-os-06-group-2
5c8970b65b82fb2b9be243c252360fb7feb0d3b8
[ "MIT" ]
131
2021-11-02T07:23:29.000Z
2022-01-01T18:12:51.000Z
tasks/tests/test_get_task_comments.py
aradz1997/beyond-os-06-group-2
5c8970b65b82fb2b9be243c252360fb7feb0d3b8
[ "MIT" ]
5
2021-10-30T07:17:57.000Z
2021-11-01T18:52:26.000Z
from django.db.models.query import QuerySet import pytest from tasks.models import Comment, Priority, Status, Task from users.models import Role, User NUM_COMMENTS_PER_USER = 3 @pytest.mark.django_db class TestTaskComments: @pytest.fixture def user_and_manager(self, users): user = users[1][0] ...
42.263158
101
0.594853
from django.db.models.query import QuerySet import pytest from tasks.models import Comment, Priority, Status, Task from users.models import Role, User NUM_COMMENTS_PER_USER = 3 @pytest.mark.django_db class TestTaskComments: @pytest.fixture def user_and_manager(self, users): user = users[1][0] ...
true
true
f7466a15eb3a2166af14f5bbedb2f57c189841ad
5,274
py
Python
L1Trigger/L1CaloTrigger/python/L1TowerCalibrationProducer_cfi.py
thesps/cmssw
ad5315934948ce96699b29cc1d5b03a59f99634f
[ "Apache-2.0" ]
null
null
null
L1Trigger/L1CaloTrigger/python/L1TowerCalibrationProducer_cfi.py
thesps/cmssw
ad5315934948ce96699b29cc1d5b03a59f99634f
[ "Apache-2.0" ]
null
null
null
L1Trigger/L1CaloTrigger/python/L1TowerCalibrationProducer_cfi.py
thesps/cmssw
ad5315934948ce96699b29cc1d5b03a59f99634f
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms L1TowerCalibrationProducer = cms.EDProducer("L1TowerCalibrator", # Choosen settings 6 March 2019, 10_3_X MTD samples HcalTpEtMin = cms.double(0.5), EcalTpEtMin = cms.double(0.5), HGCalHadTpEtMin = cms.double(0.25), HGCalEmTpEtMin = cms.double(0.25), HFTp...
28.354839
93
0.610922
import FWCore.ParameterSet.Config as cms L1TowerCalibrationProducer = cms.EDProducer("L1TowerCalibrator", HcalTpEtMin = cms.double(0.5), EcalTpEtMin = cms.double(0.5), HGCalHadTpEtMin = cms.double(0.25), HGCalEmTpEtMin = cms.double(0.25), HFTpEtMin = cms.double(0.5), puThreshold = cms.doub...
true
true
f7466b1d1e26141a6f5bcafa5a12db73034c5dab
13,449
py
Python
lib/python3.8/site-packages/ansible_collections/community/aws/plugins/modules/aws_api_gateway.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/aws/plugins/modules/aws_api_gateway.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/aws/plugins/modules/aws_api_gateway.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: aws_api_gateway version_added: 1.0...
36.447154
141
0.693955
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: aws_api_gateway version_added: 1.0.0 short_description: Manage AWS API Gateway APIs description: - Allows for the management of API Gateway APIs. - Normally you should give the api_id ...
true
true
f7466c3fd6f78170fd547a1885605d89989e138e
572,517
py
Python
codespace/python/tencentcloud/cwp/v20180228/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
codespace/python/tencentcloud/cwp/v20180228/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
null
null
null
codespace/python/tencentcloud/cwp/v20180228/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
29.097225
226
0.586086
import warnings from tencentcloud.common.abstract_model import AbstractModel class AccountStatistics(AbstractModel): def __init__(self): self.Username = None self.MachineNum = None def _deserialize(self, params): self.Username = params.get("Username") self.Ma...
true
true
f7466c6fb8542e5def1c710dca00b390de18b84a
432
py
Python
datasets/document_dataset_base.py
ktodorov/historical-ocr
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
[ "MIT" ]
null
null
null
datasets/document_dataset_base.py
ktodorov/historical-ocr
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
[ "MIT" ]
null
null
null
datasets/document_dataset_base.py
ktodorov/historical-ocr
d4d7bf0addf5ff98b7182c00ff716e79c97e050e
[ "MIT" ]
null
null
null
from typing import Dict, List from overrides.overrides import overrides from datasets.dataset_base import DatasetBase class DocumentDatasetBase(DatasetBase): def __init__(self): super().__init__() def get_indices_per_document(self) -> Dict[int, List[int]]: return {} def use_collate_func...
22.736842
63
0.706019
from typing import Dict, List from overrides.overrides import overrides from datasets.dataset_base import DatasetBase class DocumentDatasetBase(DatasetBase): def __init__(self): super().__init__() def get_indices_per_document(self) -> Dict[int, List[int]]: return {} def use_collate_func...
true
true
f7466d01e23333824c958e9a28cea6043c83cc97
20,640
py
Python
menu.py
edubevi/PTIN-AComRe
9c62a7db16b09999c374e7b7183b760ea22ca1c6
[ "MIT" ]
null
null
null
menu.py
edubevi/PTIN-AComRe
9c62a7db16b09999c374e7b7183b760ea22ca1c6
[ "MIT" ]
null
null
null
menu.py
edubevi/PTIN-AComRe
9c62a7db16b09999c374e7b7183b760ea22ca1c6
[ "MIT" ]
3
2018-05-15T06:54:52.000Z
2019-04-28T15:27:57.000Z
#!/usr/bin/env python from tkinter import * import time, docker, subprocess, sys, json, os # List of allowed devices with their type id. devices = {"doctor":1, "patient":2, "ambulance":3,"smoke":4,"weather":5,"air":6, "nurse":7, "stretcher":8} # stores the number of devices by type. num_devices = {"doctor":0, "patien...
38.364312
141
0.584496
from tkinter import * import time, docker, subprocess, sys, json, os devices = {"doctor":1, "patient":2, "ambulance":3,"smoke":4,"weather":5,"air":6, "nurse":7, "stretcher":8} num_devices = {"doctor":0, "patient":0, "ambulance":0,"smoke":0,"weather":0,"air":0, "nurse":0, "stretcher":0} def runcontainers(): d...
true
true
f7466d3bb02f09ebc73a80fd021fea6330428ac0
4,173
py
Python
helloworld/settings.py
keisukeee-ma/hello
f3a32b14132e3086cf81d6a6ccc45dfe025b5f23
[ "MIT" ]
null
null
null
helloworld/settings.py
keisukeee-ma/hello
f3a32b14132e3086cf81d6a6ccc45dfe025b5f23
[ "MIT" ]
null
null
null
helloworld/settings.py
keisukeee-ma/hello
f3a32b14132e3086cf81d6a6ccc45dfe025b5f23
[ "MIT" ]
null
null
null
""" Django settings for helloworld project on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/setting...
30.23913
91
0.719626
import os import dj_database_url import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) SECRET_KEY = "tf)!7lw(kb4q0o1(xjedy_l8t+8+s1uzc-35fs21j71vw+56n5" DEBUG = True # Application definition INSTALLED_APPS = [ ...
true
true
f7466d9a9a39cd526767a4db9c03ebc587a1cffc
19,181
py
Python
cbor2/decoder.py
waveform80/cbor2
4e1e7624e0e8dbef1eea19e86d3f808f13d2518e
[ "MIT" ]
2
2020-12-09T17:26:25.000Z
2021-05-07T02:21:57.000Z
cbor2/decoder.py
waveform80/cbor2
4e1e7624e0e8dbef1eea19e86d3f808f13d2518e
[ "MIT" ]
1
2020-11-09T22:22:06.000Z
2020-11-09T22:22:06.000Z
cbor2/decoder.py
waveform80/cbor2
4e1e7624e0e8dbef1eea19e86d3f808f13d2518e
[ "MIT" ]
1
2021-05-12T14:19:10.000Z
2021-05-12T14:19:10.000Z
import re import struct from .compat import Mapping from datetime import datetime, timedelta from io import BytesIO from .compat import timezone, range, byte_as_integer, unpack_float16 from .types import ( CBORDecodeValueError, CBORDecodeEOF, CBORTag, undefined, break_marker, CBORSimpleValue, FrozenDict) time...
33.300347
84
0.587508
import re import struct from .compat import Mapping from datetime import datetime, timedelta from io import BytesIO from .compat import timezone, range, byte_as_integer, unpack_float16 from .types import ( CBORDecodeValueError, CBORDecodeEOF, CBORTag, undefined, break_marker, CBORSimpleValue, FrozenDict) time...
true
true
f7466eda650f91e778bb606ecca1bf76221997a7
518
py
Python
flavio/__init__.py
jasonaebischerGIT/flavio
b8d833c8380c619112ed75175cb7db52b788b1cd
[ "MIT" ]
null
null
null
flavio/__init__.py
jasonaebischerGIT/flavio
b8d833c8380c619112ed75175cb7db52b788b1cd
[ "MIT" ]
null
null
null
flavio/__init__.py
jasonaebischerGIT/flavio
b8d833c8380c619112ed75175cb7db52b788b1cd
[ "MIT" ]
null
null
null
from ._version import __version__ from . import physics from . import statistics from . import io from . import parameters from . import measurements from . import classes from .classes import Measurement, Parameter, ParameterConstraints, Observable, NamedInstanceClass from .config import config from flavio.physics.eft...
39.846154
121
0.84749
from ._version import __version__ from . import physics from . import statistics from . import io from . import parameters from . import measurements from . import classes from .classes import Measurement, Parameter, ParameterConstraints, Observable, NamedInstanceClass from .config import config from flavio.physics.eft...
true
true
f7466ef116c6e0267b787907c8763fbd487f5e8d
8,859
py
Python
test/integration_test/test_multi_transfer.py
heshu-by/likelib
76a06b0df7dea5520d5b43e6cf9ef4b9e81dad83
[ "Apache-2.0" ]
1
2020-10-23T19:09:27.000Z
2020-10-23T19:09:27.000Z
test/integration_test/test_multi_transfer.py
heshu-by/likelib
76a06b0df7dea5520d5b43e6cf9ef4b9e81dad83
[ "Apache-2.0" ]
null
null
null
test/integration_test/test_multi_transfer.py
heshu-by/likelib
76a06b0df7dea5520d5b43e6cf9ef4b9e81dad83
[ "Apache-2.0" ]
1
2020-12-08T11:16:30.000Z
2020-12-08T11:16:30.000Z
from tester import test_case, Node, NodePoll import concurrent.futures @test_case("multi_transfer") def main(env, logger): settings_node_1 = Node.Settings(Node.Id(20300, 50150)) settings_node_2 = Node.Settings(Node.Id(20301, 50151), nodes=[settings_node_1.id, ]) with Node(env, settings_node_1, logger) as...
40.085973
133
0.637205
from tester import test_case, Node, NodePoll import concurrent.futures @test_case("multi_transfer") def main(env, logger): settings_node_1 = Node.Settings(Node.Id(20300, 50150)) settings_node_2 = Node.Settings(Node.Id(20301, 50151), nodes=[settings_node_1.id, ]) with Node(env, settings_node_1, logger) as...
true
true
f7466fd7b861e4976f6d3248fd57ea0c5d9af782
2,186
py
Python
matrix_cp_one.py
zhangkaifang/cp_decomposition
75eb5f3df302c08ad2e62f41e6d93bb990a16797
[ "MIT" ]
1
2021-07-21T15:51:09.000Z
2021-07-21T15:51:09.000Z
matrix_cp_one.py
zhangkaifang/cp_decomposition
75eb5f3df302c08ad2e62f41e6d93bb990a16797
[ "MIT" ]
null
null
null
matrix_cp_one.py
zhangkaifang/cp_decomposition
75eb5f3df302c08ad2e62f41e6d93bb990a16797
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- '''===================================== @Author :Kaifang Zhang @Time :2021/7/5 1:31 @Contact: kaifang.zkf@dtwave-inc.com ========================================''' import numpy as np def LFM_grad_desc(R, K, max_iter, alpha=1e-4, lamda=1e-4): """ 实现矩阵缺失元素补全使用梯度...
25.126437
93
0.39936
import numpy as np def LFM_grad_desc(R, K, max_iter, alpha=1e-4, lamda=1e-4): M = len(R) N = len(R[0]) P = np.random.rand(M, K) Q = np.random.rand(N, K) Q = Q.T for step in range(max_iter): for u in range(M): for i in range(N): ...
true
true
f7466ffb92c2778c6a1d0e803d106aa0c557aeec
2,071
py
Python
Array/532K-diffPairsArray.py
john-the-dev/leetcode
f1038a5357c841a0d3c8aca1ae1a7d0387f77545
[ "Apache-2.0" ]
null
null
null
Array/532K-diffPairsArray.py
john-the-dev/leetcode
f1038a5357c841a0d3c8aca1ae1a7d0387f77545
[ "Apache-2.0" ]
null
null
null
Array/532K-diffPairsArray.py
john-the-dev/leetcode
f1038a5357c841a0d3c8aca1ae1a7d0387f77545
[ "Apache-2.0" ]
null
null
null
# 532. K-diff Pairs in an Array ''' Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair is an integer pair (nums[i], nums[j]), where the following are true: 0 <= i, j < nums.length i != j |nums[i] - nums[j]| == k Notice that |val| denotes the absolute...
26.896104
104
0.573153
from common import * from collections import defaultdict class Solution: def findPairs(self, nums: List[int], k: int) -> int: out = 0 if k == 0: h = defaultdict(int) for num in nums: h[num] += 1 for num in h: if h[num] > 1: out += ...
true
true
f74672c64d84c81ad650e391b98b90c0c5e23d05
3,202
py
Python
Research/website/reqs/reqs/settings.py
R2-A2-07/reqs
cc07dfcaa69b193dc389f8566a622776539eedda
[ "MIT" ]
null
null
null
Research/website/reqs/reqs/settings.py
R2-A2-07/reqs
cc07dfcaa69b193dc389f8566a622776539eedda
[ "MIT" ]
null
null
null
Research/website/reqs/reqs/settings.py
R2-A2-07/reqs
cc07dfcaa69b193dc389f8566a622776539eedda
[ "MIT" ]
null
null
null
""" Django settings for reqs project. Generated by 'django-admin startproject' using Django 2.1.3. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ imp...
26.46281
92
0.668332
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'ulm4!r3dj%@6&lc+9u11!*xffrv2g#4y4&^0@7@-(oy#rp25sy' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'dja...
true
true
f7467317540c0060911f989c35fe309dfef3d2e4
4,570
py
Python
frappe/contacts/address_and_contact.py
chaitraliw/mws_frappe
52182a27f3b9a61d080e741e349a308be3e94582
[ "MIT" ]
1
2020-08-12T23:07:02.000Z
2020-08-12T23:07:02.000Z
frappe/contacts/address_and_contact.py
chaitraliw/mws_frappe
52182a27f3b9a61d080e741e349a308be3e94582
[ "MIT" ]
null
null
null
frappe/contacts/address_and_contact.py
chaitraliw/mws_frappe
52182a27f3b9a61d080e741e349a308be3e94582
[ "MIT" ]
2
2018-03-22T02:33:53.000Z
2018-08-03T14:31:58.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def load_address_and_contact(doc, key=None): """Loads address list and contact list in `__onload`""" from frappe.contacts.doctype.addre...
30.466667
116
0.706346
from __future__ import unicode_literals import frappe def load_address_and_contact(doc, key=None): from frappe.contacts.doctype.address.address import get_address_display filters = [ ["Dynamic Link", "link_doctype", "=", doc.doctype], ["Dynamic Link", "link_name", "=", doc.name], ["Dynamic Link", "parentty...
true
true
f74673388abb88c36cad2ef74c11409967a84c8f
2,672
py
Python
ga4ghtest/services/drs/client.py
ga4gh/workflow-interop
e2b3422f6867ce632c65e017d7b558f3cce9fcf1
[ "Apache-2.0" ]
5
2019-04-15T17:37:33.000Z
2020-04-24T15:18:06.000Z
ga4ghtest/services/drs/client.py
Sage-Bionetworks/synevalharness
e2b3422f6867ce632c65e017d7b558f3cce9fcf1
[ "Apache-2.0" ]
58
2018-12-07T15:55:35.000Z
2022-02-18T15:42:27.000Z
ga4ghtest/services/drs/client.py
Sage-Bionetworks/synapse-orchestrator
e2b3422f6867ce632c65e017d7b558f3cce9fcf1
[ "Apache-2.0" ]
4
2018-07-18T23:00:09.000Z
2018-07-31T20:01:21.000Z
import logging import json import requests from ga4gh.drs.cli.methods.get import get def api_reponse(postresult): if postresult.status_code != 200: error = str(json.loads(postresult.text)) logging.error(error) raise Exception(error) return json.loads(postresult.text) class DRSClien...
29.362637
89
0.516841
import logging import json import requests from ga4gh.drs.cli.methods.get import get def api_reponse(postresult): if postresult.status_code != 200: error = str(json.loads(postresult.text)) logging.error(error) raise Exception(error) return json.loads(postresult.text) class DRSClien...
true
true
f746744d04e673a5beedb0b9b86e287617465a83
8,962
py
Python
python/nano/src/bigdl/nano/pytorch/onnx/onnxrt_inference.py
EmiCareOfCell44/BigDL
6278ee8eed09b5072da53dab3a99530cf5f69ba2
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/pytorch/onnx/onnxrt_inference.py
EmiCareOfCell44/BigDL
6278ee8eed09b5072da53dab3a99530cf5f69ba2
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/pytorch/onnx/onnxrt_inference.py
EmiCareOfCell44/BigDL
6278ee8eed09b5072da53dab3a99530cf5f69ba2
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
44.81
98
0.597969
from pytorch_lightning import LightningModule import onnxruntime as ort from functools import partial import warnings import torch import math import numpy as np ONNXRT_BINDED_COMPONENTS = ['_ortsess_up_to_date', '_ortsess', '_build_ortsess', ...
true
true
f7467469129901657e4b53cc9687b8c54304318a
17,593
py
Python
echopype/convert/set_groups_ad2cp.py
gavinmacaulay/echopype
1698b6076a16506f638e691d4d014c8649cc735d
[ "Apache-2.0" ]
null
null
null
echopype/convert/set_groups_ad2cp.py
gavinmacaulay/echopype
1698b6076a16506f638e691d4d014c8649cc735d
[ "Apache-2.0" ]
null
null
null
echopype/convert/set_groups_ad2cp.py
gavinmacaulay/echopype
1698b6076a16506f638e691d4d014c8649cc735d
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional import numpy as np import xarray as xr from .parse_ad2cp import Ad2cpDataPacket, Field, HeaderOrDataRecordFormats from .set_groups_base import SetGroupsBase, set_encodings def merge_attrs(datasets: List[xr.Dataset]) -> List[xr.Dataset]: """ Merges attrs from a list of datas...
44.539241
89
0.547263
from typing import List, Optional import numpy as np import xarray as xr from .parse_ad2cp import Ad2cpDataPacket, Field, HeaderOrDataRecordFormats from .set_groups_base import SetGroupsBase, set_encodings def merge_attrs(datasets: List[xr.Dataset]) -> List[xr.Dataset]: total_attrs = dict() for ds in datas...
true
true
f74674d3d04e992c9b38b8f5f7cfef8b4888cf75
1,290
py
Python
cycling_in_france/helper_func.py
nenb/cycling_in_france
6cddc433a2136f52be996719db0a1d876fcf5c59
[ "MIT" ]
null
null
null
cycling_in_france/helper_func.py
nenb/cycling_in_france
6cddc433a2136f52be996719db0a1d876fcf5c59
[ "MIT" ]
null
null
null
cycling_in_france/helper_func.py
nenb/cycling_in_france
6cddc433a2136f52be996719db0a1d876fcf5c59
[ "MIT" ]
null
null
null
import regionmask import numpy as np import dask def create_windmax_dict(u, v, names, borders, longitude, latitude): """Produce a dictionary of masked maximum wind speeds in units of mph.""" if u.units != "m s**-1": raise ValueError("U field does not have units m/s") if v.units != "m s**-1": ...
40.3125
79
0.662791
import regionmask import numpy as np import dask def create_windmax_dict(u, v, names, borders, longitude, latitude): if u.units != "m s**-1": raise ValueError("U field does not have units m/s") if v.units != "m s**-1": raise ValueError("V field does not have units m/s") metre_to_mile = 36...
true
true
f7467591ae6761e546c213db7a2ec4b80d04fc60
195
py
Python
Containers-&-Orchestration/Docker/python-hello-world/app.py
kibetamos/Everything-Tech
25edb8e3be35bda13faf258c18d5c6653b9e73a7
[ "Apache-2.0" ]
371
2021-11-15T12:50:58.000Z
2022-03-11T19:53:40.000Z
Containers-&-Orchestration/Docker/python-hello-world/app.py
a-abukar/Everything-Tech
eb513519f607501339b628b3c4bf002293d61513
[ "Apache-2.0" ]
19
2021-11-15T18:22:17.000Z
2022-03-06T11:20:04.000Z
Containers-&-Orchestration/Docker/python-hello-world/app.py
a-abukar/Everything-Tech
eb513519f607501339b628b3c4bf002293d61513
[ "Apache-2.0" ]
111
2021-11-15T13:04:51.000Z
2022-03-29T11:51:00.000Z
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def home(): return "<h1>Hello world</h1>" if __name__ == "__main__": app.run(host='0.0.0.0', debug=True)
17.727273
40
0.651282
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def home(): return "<h1>Hello world</h1>" if __name__ == "__main__": app.run(host='0.0.0.0', debug=True)
true
true
f74675c0730e34b83b01be82622c62b1f662e778
679
py
Python
RegularizedFastMarching/RegularizedFastMarchingLib/Regularization.py
AldrickF/SlicerRegularizedFastMarching
3841be22f23f411f7f4639d3b792c05cb4ce20e6
[ "Apache-2.0" ]
1
2021-09-22T19:50:56.000Z
2021-09-22T19:50:56.000Z
RegularizedFastMarching/RegularizedFastMarchingLib/Regularization.py
lassoan/SlicerRegularizedFastMarching
8a04a594cf5dd6c98e1f9dd93e61af6e6852339f
[ "Apache-2.0" ]
null
null
null
RegularizedFastMarching/RegularizedFastMarchingLib/Regularization.py
lassoan/SlicerRegularizedFastMarching
8a04a594cf5dd6c98e1f9dd93e61af6e6852339f
[ "Apache-2.0" ]
2
2021-05-26T13:24:14.000Z
2021-05-28T13:38:04.000Z
def regularization(InputImage, StructuringElementRadius=3): """ Compute the 3D scalar field that will be used to regularize the seeds propagation Inputs: * InputImage: the 3D image that will be segmented. Must be a 3D numpy array. * StructuringElementRadius: A structuring element of size (1+2*St...
52.230769
173
0.745214
def regularization(InputImage, StructuringElementRadius=3): from scipy import ndimage MSE = StructuringElementRadius return ndimage.morphological_gradient(InputImage, size=(MSE, MSE, MSE))
true
true
f7467a3e6d77d4ed54fcc40ed69a9b17b82a8341
27,908
py
Python
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_security_partner_providers_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_security_partner_providers_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/virtual-wan/azext_vwan/vendored_sdks/v2021_03_01/v2021_03_01/aio/operations/_security_partner_providers_operations.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.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 may ...
51.490775
217
0.681131
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f7467a43632fcf5a37b5c7f91d37d4b9596aa837
772
py
Python
Defs/ex111/utilidadesCeV/funcao/__init__.py
Dioclesiano/Python
ba9166048fe824fef96fcf6cf3696714e79f4235
[ "MIT" ]
null
null
null
Defs/ex111/utilidadesCeV/funcao/__init__.py
Dioclesiano/Python
ba9166048fe824fef96fcf6cf3696714e79f4235
[ "MIT" ]
null
null
null
Defs/ex111/utilidadesCeV/funcao/__init__.py
Dioclesiano/Python
ba9166048fe824fef96fcf6cf3696714e79f4235
[ "MIT" ]
null
null
null
def resumo(n, credito, debito, brasao='R$', conversao=False): moeda(n, brasao) print('-'*60) print('RESULTADO'.center(60)) print('-'*60) print(f'O juros de {credito}% sobre {moeda(n, brasao)} corresponde a \t{aumentar(n, credito, brasao, conversao)}') print(f'O desconto de {debito}% sobre {moed...
33.565217
119
0.648964
def resumo(n, credito, debito, brasao='R$', conversao=False): moeda(n, brasao) print('-'*60) print('RESULTADO'.center(60)) print('-'*60) print(f'O juros de {credito}% sobre {moeda(n, brasao)} corresponde a \t{aumentar(n, credito, brasao, conversao)}') print(f'O desconto de {debito}% sobre {moed...
true
true
f7467a8d2938826771969c63f8dfda3640e2461c
6,027
py
Python
custom_components/eldes_alarm/core/eldes_cloud.py
evaliukonis/eldes
32c3e24effdd6b109b1199d85f174eddd2c602a4
[ "MIT" ]
null
null
null
custom_components/eldes_alarm/core/eldes_cloud.py
evaliukonis/eldes
32c3e24effdd6b109b1199d85f174eddd2c602a4
[ "MIT" ]
null
null
null
custom_components/eldes_alarm/core/eldes_cloud.py
evaliukonis/eldes
32c3e24effdd6b109b1199d85f174eddd2c602a4
[ "MIT" ]
null
null
null
"""Implementation for Eldes Cloud""" import asyncio import async_timeout import logging import aiohttp from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED ) from ..const import API_URL, API_PATHS _LOGGER = logging.getLogger(__name__) ALARM_STATES_MAP = ...
25.978448
129
0.558653
import asyncio import async_timeout import logging import aiohttp from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED ) from ..const import API_URL, API_PATHS _LOGGER = logging.getLogger(__name__) ALARM_STATES_MAP = { "DISARMED": STATE_ALARM_DISARME...
true
true
f7467c8775c1f95a0719aaff5fcc019f3e357d78
426
py
Python
graphsaint/setup.py
wohlbier/GraphSAINT
cea64e77d97b77d76b05fba17cbfaa0d985d9aa3
[ "MIT" ]
null
null
null
graphsaint/setup.py
wohlbier/GraphSAINT
cea64e77d97b77d76b05fba17cbfaa0d985d9aa3
[ "MIT" ]
null
null
null
graphsaint/setup.py
wohlbier/GraphSAINT
cea64e77d97b77d76b05fba17cbfaa0d985d9aa3
[ "MIT" ]
null
null
null
# cython: language_level=3 from distutils.core import setup, Extension from Cython.Build import cythonize import numpy # import cython_utils import os os.environ["CC"] = "g++" os.environ["CXX"] = "g++" setup(ext_modules = cythonize(["graphsaint/cython_sampler.pyx","graphsaint/cython_utils.pyx","graphsaint/norm_aggr.p...
32.769231
160
0.762911
from distutils.core import setup, Extension from Cython.Build import cythonize import numpy import os os.environ["CC"] = "g++" os.environ["CXX"] = "g++" setup(ext_modules = cythonize(["graphsaint/cython_sampler.pyx","graphsaint/cython_utils.pyx","graphsaint/norm_aggr.pyx"]), include_dirs = [numpy.get_include()])
true
true
f7467d5e3c76937ae35619a311e263f79f7f5de1
63,016
py
Python
python/ray/serve/deployment_state.py
niuguy/ray
37ef372a10fccca7e4d18dc48cd900f9d2fd159f
[ "Apache-2.0" ]
null
null
null
python/ray/serve/deployment_state.py
niuguy/ray
37ef372a10fccca7e4d18dc48cd900f9d2fd159f
[ "Apache-2.0" ]
null
null
null
python/ray/serve/deployment_state.py
niuguy/ray
37ef372a10fccca7e4d18dc48cd900f9d2fd159f
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict, OrderedDict from enum import Enum import json import math import os import pickle import random import time from typing import Any, Callable, Dict, List, Optional, Tuple import ray from ray import ObjectRef from ray.actor import ActorHandle from ray.exceptions import RayActorError,...
38.707617
98
0.626746
from collections import defaultdict, OrderedDict from enum import Enum import json import math import os import pickle import random import time from typing import Any, Callable, Dict, List, Optional, Tuple import ray from ray import ObjectRef from ray.actor import ActorHandle from ray.exceptions import RayActorError,...
true
true
f7467f05fae463872907ecc5078c11e551362a19
2,108
py
Python
photos/views.py
omololevy/Gallery
ed7760b514c355da90904b4cf7c93c9910e59866
[ "MIT" ]
3
2021-12-25T23:11:15.000Z
2022-01-08T17:40:39.000Z
photos/views.py
omololevy/Gallery
ed7760b514c355da90904b4cf7c93c9910e59866
[ "MIT" ]
null
null
null
photos/views.py
omololevy/Gallery
ed7760b514c355da90904b4cf7c93c9910e59866
[ "MIT" ]
null
null
null
from django.shortcuts import render,redirect from .models import Image from .forms import UploadForm from django.db.models import Q from django.db.models.base import ObjectDoesNotExist from django.http import HttpResponse,Http404 def home(request): pictures = Image.objects.all() ctx = {'pictures':pictures} ...
32.430769
108
0.653226
from django.shortcuts import render,redirect from .models import Image from .forms import UploadForm from django.db.models import Q from django.db.models.base import ObjectDoesNotExist from django.http import HttpResponse,Http404 def home(request): pictures = Image.objects.all() ctx = {'pictures':pictures} ...
true
true
f7468182fd40781c002e397fd19fd1370271eceb
5,868
py
Python
helpdesk/management/commands/escalate_tickets.py
tqangxl/django-helpdesk
3d7bcb4928f54e7978e6ba39accda12865ebae26
[ "CC-BY-3.0", "BSD-3-Clause" ]
1
2019-04-12T02:42:45.000Z
2019-04-12T02:42:45.000Z
helpdesk/management/commands/escalate_tickets.py
tqangxl/django-helpdesk
3d7bcb4928f54e7978e6ba39accda12865ebae26
[ "CC-BY-3.0", "BSD-3-Clause" ]
1
2019-07-16T13:55:09.000Z
2019-07-16T13:55:09.000Z
helpdesk/management/commands/escalate_tickets.py
tqangxl/django-helpdesk
3d7bcb4928f54e7978e6ba39accda12865ebae26
[ "CC-BY-3.0", "BSD-3-Clause" ]
1
2019-07-08T16:23:22.000Z
2019-07-08T16:23:22.000Z
#!/usr/bin/python """ django-helpdesk - A Django powered ticket tracker for small enterprise. (c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. scripts/escalate_tickets.py - Easy way to escalate tickets based on their age, designed to be run from Cron or similar. ""...
29.786802
89
0.54499
from __future__ import print_function from datetime import timedelta, date import getopt from optparse import make_option import sys from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from django.utils.translation import ugettext as _ try: from django.utils import t...
true
true
f74682bbfa40eadd5fe5981e3998b9389f1629fc
30,769
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_network_security_groups_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_network_security_groups_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_network_security_groups_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.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 may ...
49.949675
211
0.668823
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f7468314c762cc0a7911f4b43d569a39f01c09b0
124
py
Python
DIY_NN/solutions/ff_compute_gradient.py
PinmanHuang/CrashCourseML
b59ebf138d42fc9a1669735c6363d50938200e69
[ "MIT" ]
3
2019-02-16T05:57:09.000Z
2019-09-16T07:07:18.000Z
DIY_NN/solutions/ff_compute_gradient.py
PinmanHuang/CrashCourseML
b59ebf138d42fc9a1669735c6363d50938200e69
[ "MIT" ]
null
null
null
DIY_NN/solutions/ff_compute_gradient.py
PinmanHuang/CrashCourseML
b59ebf138d42fc9a1669735c6363d50938200e69
[ "MIT" ]
8
2019-02-14T02:51:26.000Z
2019-10-07T07:44:24.000Z
p = np.eye(3)[y][:, None] grad_d = q - p grad_C = grad_d @ U.T grad_b = (C.T @ grad_d ) * Drelu(A@x+b) grad_A = grad_b @ x.T
24.8
39
0.564516
p = np.eye(3)[y][:, None] grad_d = q - p grad_C = grad_d @ U.T grad_b = (C.T @ grad_d ) * Drelu(A@x+b) grad_A = grad_b @ x.T
true
true
f74684978a80111e4cff8855e884ee278229b775
2,478
py
Python
taiga/webhooks/models.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
taiga/webhooks/models.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
12
2019-11-25T14:08:32.000Z
2021-06-24T10:35:51.000Z
taiga/webhooks/models.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
48.588235
105
0.711864
from django.db import models from django.utils.translation import ugettext_lazy as _ from taiga.base.db.models.fields import JSONField class Webhook(models.Model): project = models.ForeignKey("projects.Project", null=False, blank=False, related_name="webhooks") ...
true
true
f74684ee9030ef0ef44538ae53fa4320456a667a
2,723
py
Python
analytical/templatetags/analytical.py
jayhaluska/django-analytical
3a652cd6bce737e6b15ecee84b44bb9f42c688a7
[ "MIT" ]
null
null
null
analytical/templatetags/analytical.py
jayhaluska/django-analytical
3a652cd6bce737e6b15ecee84b44bb9f42c688a7
[ "MIT" ]
null
null
null
analytical/templatetags/analytical.py
jayhaluska/django-analytical
3a652cd6bce737e6b15ecee84b44bb9f42c688a7
[ "MIT" ]
null
null
null
""" Analytical template tags and filters. """ from __future__ import absolute_import import logging from django import template from django.template import Node, TemplateSyntaxError from importlib import import_module from analytical.utils import AnalyticalException TAG_LOCATIONS = ['head_top', 'head_bottom', 'bo...
27.785714
78
0.682336
from __future__ import absolute_import import logging from django import template from django.template import Node, TemplateSyntaxError from importlib import import_module from analytical.utils import AnalyticalException TAG_LOCATIONS = ['head_top', 'head_bottom', 'body_top', 'body_bottom'] TAG_POSITIONS = ['firs...
true
true
f746859468e06be5f14625940d20799989d56d50
615
py
Python
codedigger/social_auth/google.py
prayutsu/Backend
944c37f0941fc6836a04c5bb85936558b9b30cff
[ "Apache-2.0" ]
null
null
null
codedigger/social_auth/google.py
prayutsu/Backend
944c37f0941fc6836a04c5bb85936558b9b30cff
[ "Apache-2.0" ]
null
null
null
codedigger/social_auth/google.py
prayutsu/Backend
944c37f0941fc6836a04c5bb85936558b9b30cff
[ "Apache-2.0" ]
1
2021-09-29T13:01:34.000Z
2021-09-29T13:01:34.000Z
from google.auth.transport import requests from google.oauth2 import id_token class Google: """Google class to fetch the user info and return it""" @staticmethod def validate(auth_token): """ validate method Queries the Google oAUTH2 api to fetch the user info """ try: ...
29.285714
76
0.582114
from google.auth.transport import requests from google.oauth2 import id_token class Google: @staticmethod def validate(auth_token): try: idinfo = id_token.verify_oauth2_token(auth_token, requests.Request()) if 'accounts.google....
true
true
f74686e9932e89d49f6fc6ccad48fb7c67e2b608
3,371
py
Python
sacrerouge/tests/metrics/blanc_test.py
CogComp/stat-analysis-experiments
f4662d2c6ae4f7f549c9bb8fe8d49f3a786af4f3
[ "Apache-2.0" ]
1
2022-03-30T13:39:10.000Z
2022-03-30T13:39:10.000Z
sacrerouge/tests/metrics/blanc_test.py
CogComp/stat-analysis-experiments
f4662d2c6ae4f7f549c9bb8fe8d49f3a786af4f3
[ "Apache-2.0" ]
null
null
null
sacrerouge/tests/metrics/blanc_test.py
CogComp/stat-analysis-experiments
f4662d2c6ae4f7f549c9bb8fe8d49f3a786af4f3
[ "Apache-2.0" ]
1
2021-12-05T14:55:10.000Z
2021-12-05T14:55:10.000Z
import unittest from sacrerouge.common.testing.metric_test_cases import DocumentBasedMetricTestCase from sacrerouge.common.testing.util import sacrerouge_command_exists from sacrerouge.metrics import Blanc from sacrerouge.metrics.blanc import BLANC_INSTALLED @unittest.skipIf(not BLANC_INSTALLED, '"blanc" not install...
51.861538
123
0.689706
import unittest from sacrerouge.common.testing.metric_test_cases import DocumentBasedMetricTestCase from sacrerouge.common.testing.util import sacrerouge_command_exists from sacrerouge.metrics import Blanc from sacrerouge.metrics.blanc import BLANC_INSTALLED @unittest.skipIf(not BLANC_INSTALLED, '"blanc" not install...
true
true
f746881b6d4ef39a1ba2318f77cf1f3667e8274e
2,616
py
Python
data/p4VQE/R2/benchmark/startQiskit_QC77.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R2/benchmark/startQiskit_QC77.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R2/benchmark/startQiskit_QC77.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=12 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
27.829787
118
0.636468
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.tes...
true
true
f746895e9fbef0941f223b9b48f165b7501e2a5c
2,403
py
Python
Device_Tests/camera_model/camera_model.py
maxbot5/Ball-Handle-Software
fe1b04c3f252a9e6848c2e79601f5633473abb28
[ "MIT" ]
null
null
null
Device_Tests/camera_model/camera_model.py
maxbot5/Ball-Handle-Software
fe1b04c3f252a9e6848c2e79601f5633473abb28
[ "MIT" ]
null
null
null
Device_Tests/camera_model/camera_model.py
maxbot5/Ball-Handle-Software
fe1b04c3f252a9e6848c2e79601f5633473abb28
[ "MIT" ]
null
null
null
import math as ma # test_data = 400,1280/2 #test input test_data = 150, 68 hight = 495-114 #mm #ball parameter r_ball = 114.8 #mm #angles ang_cam_tilt = ma.radians(30) ang_rev_cam_tilt = ma.radians(90)-ang_cam_tilt ang_cam_flare_X = ma.radians(47) #Öffnungswinkel pixy cam ang_cam_flare_Y = ma.radians(75) 'PIXY Par...
29.304878
99
0.733666
import math as ma = 150, 68 hight = 495-114 r_ball = 114.8 ang_cam_tilt = ma.radians(30) ang_rev_cam_tilt = ma.radians(90)-ang_cam_tilt ang_cam_flare_X = ma.radians(47) ang_cam_flare_Y = ma.radians(75) X_cam_pixel = 800 Y_cam_pixel = 1280 ang_offset = ma.radians(30) et = 463 x_image_cam = 0 delta_X_image_c...
true
true
f746895fcb8ae9818b1a7c41668e02a5a69ab672
5,679
py
Python
evap/evaluation/templatetags/evaluation_filters.py
pixunil/EvaP
e1311bf8ca48a7d8d71449cc2bd3c01a07a18fe8
[ "MIT" ]
null
null
null
evap/evaluation/templatetags/evaluation_filters.py
pixunil/EvaP
e1311bf8ca48a7d8d71449cc2bd3c01a07a18fe8
[ "MIT" ]
null
null
null
evap/evaluation/templatetags/evaluation_filters.py
pixunil/EvaP
e1311bf8ca48a7d8d71449cc2bd3c01a07a18fe8
[ "MIT" ]
1
2019-04-23T19:48:59.000Z
2019-04-23T19:48:59.000Z
from collections import namedtuple from django.forms import TypedChoiceField from django.template import Library from django.utils.translation import ugettext_lazy as _ from evap.evaluation.models import BASE_UNIPOLAR_CHOICES from evap.rewards.tools import can_reward_points_be_used_by from evap.student.forms import H...
31.904494
148
0.729002
from collections import namedtuple from django.forms import TypedChoiceField from django.template import Library from django.utils.translation import ugettext_lazy as _ from evap.evaluation.models import BASE_UNIPOLAR_CHOICES from evap.rewards.tools import can_reward_points_be_used_by from evap.student.forms import H...
true
true
f74689725c645f0b236f98e65511c1fb73112082
4,920
py
Python
readability/text/analyzer.py
Cong-1998/Flesch_Kincaid
8dc695541cfd5266cbbb1d61605b5f232fb9a31d
[ "MIT" ]
null
null
null
readability/text/analyzer.py
Cong-1998/Flesch_Kincaid
8dc695541cfd5266cbbb1d61605b5f232fb9a31d
[ "MIT" ]
null
null
null
readability/text/analyzer.py
Cong-1998/Flesch_Kincaid
8dc695541cfd5266cbbb1d61605b5f232fb9a31d
[ "MIT" ]
null
null
null
import os import re from .syllables import count as count_syllables from nltk.tokenize import sent_tokenize, TweetTokenizer from nltk.stem.porter import PorterStemmer class AnalyzerStatistics: def __init__(self, stats): self.stats = stats @property def num_poly_syllable_words(self): retur...
31.538462
78
0.618293
import os import re from .syllables import count as count_syllables from nltk.tokenize import sent_tokenize, TweetTokenizer from nltk.stem.porter import PorterStemmer class AnalyzerStatistics: def __init__(self, stats): self.stats = stats @property def num_poly_syllable_words(self): retur...
true
true
f746897b0f11c0721acb5665fae267095eb98542
12,900
py
Python
google/cloud/videointelligence/v1p2beta1/videointelligence-v1p2beta1-py/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/videointelligence/v1p2beta1/videointelligence-v1p2beta1-py/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/videointelligence/v1p2beta1/videointelligence-v1p2beta1-py/google/cloud/videointelligence_v1p2beta1/services/video_intelligence_service/async_client.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
46.909091
187
0.677907
from collections import OrderedDict import functools import re from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources import google.api_core.client_options as ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 ...
true
true
f74689826eaced6d71ee0d612eb56e92a8a4d186
23,636
py
Python
src/twisted/protocols/memcache.py
matthew-turnaroundfactor/twisted
62ae75dfa76de1e4db515fc6390171ba3e9160a7
[ "MIT", "Unlicense" ]
null
null
null
src/twisted/protocols/memcache.py
matthew-turnaroundfactor/twisted
62ae75dfa76de1e4db515fc6390171ba3e9160a7
[ "MIT", "Unlicense" ]
1
2019-10-02T18:56:18.000Z
2019-10-02T18:56:18.000Z
src/twisted/protocols/memcache.py
matthew-turnaroundfactor/twisted
62ae75dfa76de1e4db515fc6390171ba3e9160a7
[ "MIT", "Unlicense" ]
1
2019-10-02T18:36:25.000Z
2019-10-02T18:36:25.000Z
# -*- test-case-name: twisted.test.test_memcache -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Memcache client protocol. Memcached is a caching server, storing data in the form of pairs key/value, and memcache is the protocol to talk with it. To connect to a server, create a factory ...
30.856397
79
0.582036
from collections import deque from twisted.protocols.basic import LineReceiver from twisted.protocols.policies import TimeoutMixin from twisted.internet.defer import Deferred, fail, TimeoutError from twisted.python import log from twisted.python.compat import ( intToBytes, iteritems, nativeString, networkStr...
true
true
f7468bc9c96332e6e32427dd26336d3f82ac2c16
951
py
Python
example_py/example_2.py
YoshimitsuMatsutaIe/ans_2021
a04cd9b9541583aaa8a6dc5ece323ae1cf706c3b
[ "MIT" ]
null
null
null
example_py/example_2.py
YoshimitsuMatsutaIe/ans_2021
a04cd9b9541583aaa8a6dc5ece323ae1cf706c3b
[ "MIT" ]
null
null
null
example_py/example_2.py
YoshimitsuMatsutaIe/ans_2021
a04cd9b9541583aaa8a6dc5ece323ae1cf706c3b
[ "MIT" ]
null
null
null
### SciPyを使った実装 ### import numpy as np from scipy.integrate import solve_ivp import matplotlib.pyplot as plt def diff_eq(x, t, a): """微分方程式""" return a * x def do_example_2(): time_list = np.arange(0.0, 2.0, 0.01) # 時間のリスト x_init = [1.0] # 初期値 a = 1 # 解く sol = solve_ivp( ...
23.195122
70
0.576236
import solve_ivp import matplotlib.pyplot as plt def diff_eq(x, t, a): return a * x def do_example_2(): time_list = np.arange(0.0, 2.0, 0.01) x_init = [1.0] a = 1 sol = solve_ivp( fun = diff_eq, y0 = x_init, t_span=(0.0, 2.0), t_eval = time_list,...
true
true
f7468cb4dc72522230b8a6894296c85bc8f6ed78
3,262
py
Python
experiments/mnist/load_data.py
LLNL/XNAS
62f90bb29b492a3b993d7a866d229634a2d95057
[ "MIT" ]
null
null
null
experiments/mnist/load_data.py
LLNL/XNAS
62f90bb29b492a3b993d7a866d229634a2d95057
[ "MIT" ]
null
null
null
experiments/mnist/load_data.py
LLNL/XNAS
62f90bb29b492a3b993d7a866d229634a2d95057
[ "MIT" ]
1
2022-03-04T23:23:31.000Z
2022-03-04T23:23:31.000Z
""" MIT License Copyright (c) 2022, Lawrence Livermore National Security, LLC Written by Zachariah Carmichael et al. 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...
32.949495
78
0.656652
from xnas.utils import get_logger logger = get_logger(__name__) def preprocess(image, label): import tensorflow as tf mean = [0.13066044] std = [0.3081079] image = tf.image.convert_image_dtype(image, dtype=tf.float32) image = (image - tf.reshape(mean, [1, 1, 1])) / tf.reshape(std, [1, 1, 1...
true
true
f7468d54b10e63232e7320f54dd6fbc2b1c0fd9b
31,342
py
Python
redwood/cli/admin/delete.py
BD2KGenomics/dcc-ops
7a4a5fe4fa2881edecf68830224bf7db282a8fea
[ "Apache-2.0" ]
2
2017-04-27T06:51:11.000Z
2021-10-10T21:16:54.000Z
redwood/cli/admin/delete.py
BD2KGenomics/dcc-ops
7a4a5fe4fa2881edecf68830224bf7db282a8fea
[ "Apache-2.0" ]
143
2017-02-13T21:46:12.000Z
2021-06-01T21:55:45.000Z
redwood/cli/admin/delete.py
BD2KGenomics/dcc-ops
7a4a5fe4fa2881edecf68830224bf7db282a8fea
[ "Apache-2.0" ]
5
2017-06-21T17:24:02.000Z
2021-10-10T21:16:46.000Z
""" delete.py This script allows developers to delete files generated from redwood storage system. """ import argparse import os import json import boto3 import botocore import defaults import docker import logging import urllib2 import ssl import datetime from io import BytesIO logger = logging.getLogger('admin-de...
34.747228
93
0.57616
import argparse import os import json import boto3 import botocore import defaults import docker import logging import urllib2 import ssl import datetime from io import BytesIO logger = logging.getLogger('admin-delete') logger.setLevel(level=logging.INFO) strmhd = logging.StreamHandler() strmhd.setLevel(level=logging...
true
true
f7468d703c28bb02ec43eafb8acab843db7f913f
12,662
py
Python
pmlb/pmlb.py
EpistasisLab/penn-ml-benchmarks
ac4ae198e62a7828cb9ff957d805bc33197dca28
[ "MIT" ]
540
2016-11-11T19:24:10.000Z
2020-10-05T22:38:35.000Z
pmlb/pmlb.py
EpistasisLab/penn-ml-benchmarks
ac4ae198e62a7828cb9ff957d805bc33197dca28
[ "MIT" ]
76
2016-11-11T19:30:36.000Z
2020-10-09T13:03:55.000Z
pmlb/pmlb.py
EpistasisLab/penn-ml-benchmarks
ac4ae198e62a7828cb9ff957d805bc33197dca28
[ "MIT" ]
92
2016-11-13T16:56:27.000Z
2020-10-03T16:41:35.000Z
# -*- coding: utf-8 -*- """ PMLB was primarily developed at the University of Pennsylvania by: - Randal S. Olson (rso@randalolson.com) - William La Cava (lacava@upenn.edu) - Weixuan Fu (weixuanf@upenn.edu) - and many more generous open source contributors Permission is hereby granted, free of charge, ...
40.453674
171
0.661981
import pandas as pd import os from .dataset_lists import ( dataset_names, classification_dataset_names, regression_dataset_names) import requests import warnings import subprocess import pathlib from sklearn.neighbors import NearestNeighbors from sklearn.preprocessing import StandardScaler from .suppor...
true
true
f7468db44d334e9e19584b5ea019d0c1eb7a9e16
5,349
py
Python
lte/gateway/python/magma/pipelined/app/dpi.py
KenG98/magma
dac860761778371f305901e54d81fb09eff102e7
[ "BSD-3-Clause" ]
3
2019-08-16T17:03:09.000Z
2019-08-23T21:57:48.000Z
lte/gateway/python/magma/pipelined/app/dpi.py
irsols-devops/magma
1f01a86e0515ffeef689e863db6daa7b31a57e0b
[ "BSD-3-Clause" ]
null
null
null
lte/gateway/python/magma/pipelined/app/dpi.py
irsols-devops/magma
1f01a86e0515ffeef689e863db6daa7b31a57e0b
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2016-present, Facebook, 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. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ from magma.pipelined.openfl...
40.218045
79
0.621051
from magma.pipelined.openflow import flows from magma.pipelined.app.base import MagmaController from magma.pipelined.openflow.magma_match import MagmaMatch from magma.pipelined.openflow.registers import Direction import shlex import subprocess import logging from ryu.lib.packet import ether_types appMap = {"faceboo...
true
true
f7468ea9db60312428886af048c8ee5c6c571537
2,144
py
Python
Project Code/encrypt.py
wtl5736/Introduction-to-Cryptography-Project
731cabc0de4893a557d6a69fd688abf232ab633d
[ "MIT" ]
1
2018-04-26T15:54:18.000Z
2018-04-26T15:54:18.000Z
Project Code/encrypt.py
wtl5736/Introduction-to-Cryptography-Project
731cabc0de4893a557d6a69fd688abf232ab633d
[ "MIT" ]
null
null
null
Project Code/encrypt.py
wtl5736/Introduction-to-Cryptography-Project
731cabc0de4893a557d6a69fd688abf232ab633d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Name: encrypt.py Author: Wesley Lee - wtl5736@rit.edu Assignment: Introduction to Cryptography Project Date: 04-20-2018 Description: Encrypts a file usesing a symmetric-key algorithm based on a special class of graphs. """ from time import * from getA import * # In...
27.487179
89
0.507929
from time import * from getA import * def encrypt_init(plaintext, password): plaintextASCII = [ord(a) for a in plaintext] asciiPW = [ord(b) for b in password] A = getA(asciiPW, plaintextASCII) L_1 = matmul(A, plaintextASCII) newL_1 = [int(a) % 127 for a in L_1] return newL_1, asciiPW ...
true
true
f7468f07b2fe702711760257c1b3666620304495
3,851
py
Python
SCLPsolver/tests/MCQN_test_mpc.py
haroldship/SCLPsolver
70b79acb074f51d4a269993f6a1fcf04a8196a89
[ "Apache-2.0" ]
1
2020-08-11T16:01:55.000Z
2020-08-11T16:01:55.000Z
SCLPsolver/tests/MCQN_test_mpc.py
haroldship/SCLPsolver
70b79acb074f51d4a269993f6a1fcf04a8196a89
[ "Apache-2.0" ]
null
null
null
SCLPsolver/tests/MCQN_test_mpc.py
haroldship/SCLPsolver
70b79acb074f51d4a269993f6a1fcf04a8196a89
[ "Apache-2.0" ]
2
2020-06-29T15:23:59.000Z
2022-02-07T08:58:40.000Z
# Copyright 2020 IBM 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 applicable law or agreed to in writing, ...
41.408602
141
0.699299
import sys import numpy as np import os proj = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) sys.path.append(proj) from SCLP import SCLP, SCLP_settings from doe.data_generators.MCQN import generate_MCQN_data from subroutines.utils import relative_to_project from doe.res...
true
true
f7468f3ab7a1cbdc49079324e6479beb7d7f6893
6,611
py
Python
so_pysm_models/alms.py
dennis-l/so_pysm_models
da21d51fd09ef409542862a773d22ed1656bb1bb
[ "BSD-3-Clause" ]
4
2018-12-14T10:16:12.000Z
2021-09-07T02:54:51.000Z
so_pysm_models/alms.py
dennis-l/so_pysm_models
da21d51fd09ef409542862a773d22ed1656bb1bb
[ "BSD-3-Clause" ]
40
2018-12-05T21:48:09.000Z
2021-09-29T01:03:25.000Z
so_pysm_models/alms.py
dennis-l/so_pysm_models
da21d51fd09ef409542862a773d22ed1656bb1bb
[ "BSD-3-Clause" ]
11
2018-12-05T21:43:07.000Z
2021-04-09T16:51:56.000Z
import numpy as np import healpy as hp try: from pixell import curvedsky, enmap except: pass try: # PySM >= 3.2.1 import pysm3.units as u import pysm3 as pysm except ImportError: import pysm.units as u import pysm class PrecomputedAlms(object): def __init__( self, filena...
35.929348
102
0.589775
import numpy as np import healpy as hp try: from pixell import curvedsky, enmap except: pass try: import pysm3.units as u import pysm3 as pysm except ImportError: import pysm.units as u import pysm class PrecomputedAlms(object): def __init__( self, filename, inp...
true
true
f74690937d3082ed5549936e9637be3f849e0e07
798
py
Python
analyzeData/script.py
Tiloon/Movie-processing
6b1fc71171a39d11b37a13ecc6384c361ef4e873
[ "MIT" ]
null
null
null
analyzeData/script.py
Tiloon/Movie-processing
6b1fc71171a39d11b37a13ecc6384c361ef4e873
[ "MIT" ]
null
null
null
analyzeData/script.py
Tiloon/Movie-processing
6b1fc71171a39d11b37a13ecc6384c361ef4e873
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import json from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import LinearSVC import pickle class Payload: def __init__(self, svm, vect): self.svm = svm self.vect = vect def use(self, comm): return self.svm.predict(self.vect.tr...
25.741935
106
0.636591
import sys import json from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import LinearSVC import pickle class Payload: def __init__(self, svm, vect): self.svm = svm self.vect = vect def use(self, comm): return self.svm.predict(self.vect.transform(comm)) de...
true
true
f746917be39127fc8cf775799df9be8dfb62da54
956
py
Python
setup.py
jerrygb/TensorFlowOnSpark
b9cf66466ea5eee86ce498ca83e4f00fb9e9f51e
[ "Apache-2.0" ]
null
null
null
setup.py
jerrygb/TensorFlowOnSpark
b9cf66466ea5eee86ce498ca83e4f00fb9e9f51e
[ "Apache-2.0" ]
null
null
null
setup.py
jerrygb/TensorFlowOnSpark
b9cf66466ea5eee86ce498ca83e4f00fb9e9f51e
[ "Apache-2.0" ]
null
null
null
from setuptools import setup with open('README.md') as f: long_description = f.read() setup( name='tensorflowonspark', packages=['tensorflowonspark'], version='2.1.2', description='Deep learning with TensorFlow on Apache Spark clusters', long_description=long_description, long_description_content_type='...
32.965517
85
0.688285
from setuptools import setup with open('README.md') as f: long_description = f.read() setup( name='tensorflowonspark', packages=['tensorflowonspark'], version='2.1.2', description='Deep learning with TensorFlow on Apache Spark clusters', long_description=long_description, long_description_content_type='...
true
true
f7469291496c66cdddda764e2a4ee21f12245102
617
py
Python
gesund_projekt/api/views/challenges.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
gesund_projekt/api/views/challenges.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
gesund_projekt/api/views/challenges.py
asis2016/gesund-projekt
cb3828b69cd6a86deeab16943e38b6ebffd86abb
[ "MIT" ]
null
null
null
from rest_framework.generics import ListAPIView, RetrieveAPIView from api.serializers import ChallengeSerializer from challenges.models import Challenge class ChallengeListAPIView(ListAPIView): """ Lists all challenges. """ serializer_class = ChallengeSerializer def get_queryset(self): return Ch...
29.380952
71
0.769854
from rest_framework.generics import ListAPIView, RetrieveAPIView from api.serializers import ChallengeSerializer from challenges.models import Challenge class ChallengeListAPIView(ListAPIView): serializer_class = ChallengeSerializer def get_queryset(self): return Challenge.objects.all().filter(autho...
true
true
f74692db3656e7a00909094520a016296766290e
18,671
py
Python
ExpFile.py
zzpwahaha/DataCrylsis
b4436435d6ead3322ce54d22e048077732e39e57
[ "MIT" ]
null
null
null
ExpFile.py
zzpwahaha/DataCrylsis
b4436435d6ead3322ce54d22e048077732e39e57
[ "MIT" ]
null
null
null
ExpFile.py
zzpwahaha/DataCrylsis
b4436435d6ead3322ce54d22e048077732e39e57
[ "MIT" ]
null
null
null
# created by mark brown import h5py as h5 from colorama import Fore, Style from numpy import array as arr import numpy as np import Miscellaneous as misc import datetime dataAddress = None currentVersion = 1 def annotate(fileID=None, expFile_version=currentVersion, useBaseA=True): #hashNum = int(input("Title-Level...
40.766376
172
0.544749
import h5py as h5 from colorama import Fore, Style from numpy import array as arr import numpy as np import Miscellaneous as misc import datetime dataAddress = None currentVersion = 1 def annotate(fileID=None, expFile_version=currentVersion, useBaseA=True): hashNum = 3 with ExpFile(expFile_version=e...
true
true
f7469349adc6dd5c002788ed65aeb740e8ff4310
8,019
py
Python
src/core/src/tortuga/objects/kit.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
33
2018-03-02T17:07:39.000Z
2021-05-21T18:02:51.000Z
src/core/src/tortuga/objects/kit.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
201
2018-03-05T14:28:24.000Z
2020-11-23T19:58:27.000Z
src/core/src/tortuga/objects/kit.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
23
2018-03-02T17:21:59.000Z
2020-11-18T14:52:38.000Z
# Copyright 2008-2018 Univa 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 applicable law or agreed to in...
29.373626
76
0.590223
from typing import Iterable, Optional import tortuga.objects.component import tortuga.objects.kitSource from tortuga.objects.tortugaObject import TortugaObject, TortugaObjectList from tortuga.utility.helper import str2bool class Kit(TortugaObject): \ ROOT_TAG = 'kit' def __init__(s...
true
true
f74693b4705cab0b611ef287c46328ac6823579f
43,678
py
Python
sympy/sets/fancysets.py
syhqik-wafxo0-Mopgib/sympy
551f6fe60fe6d4251a0ac76e64197f23063af261
[ "BSD-3-Clause" ]
1
2020-01-15T17:04:02.000Z
2020-01-15T17:04:02.000Z
sympy/sets/fancysets.py
sonishreyas/sympy
fbf508919adb0064505746b58d755d3a63fe6a4d
[ "BSD-3-Clause" ]
null
null
null
sympy/sets/fancysets.py
sonishreyas/sympy
fbf508919adb0064505746b58d755d3a63fe6a4d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, division from functools import reduce from sympy.core.basic import Basic from sympy.core.compatibility import with_metaclass, range, PY3 from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import Lambda from sympy.core.logic import f...
30.802539
121
0.540684
from __future__ import print_function, division from functools import reduce from sympy.core.basic import Basic from sympy.core.compatibility import with_metaclass, range, PY3 from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import Lambda from sympy.core.logic import f...
true
true
f74693e790102986f5ea81176f949a0675c8ab3e
4,448
py
Python
tests/test_one_hot_encode.py
yotammarton/TransformDF2Numpy
3528fe2f207089186865290b9f5cbd14d91e8c82
[ "MIT" ]
null
null
null
tests/test_one_hot_encode.py
yotammarton/TransformDF2Numpy
3528fe2f207089186865290b9f5cbd14d91e8c82
[ "MIT" ]
null
null
null
tests/test_one_hot_encode.py
yotammarton/TransformDF2Numpy
3528fe2f207089186865290b9f5cbd14d91e8c82
[ "MIT" ]
null
null
null
import unittest import numpy as np import pandas as pd import df2numpy from df2numpy import TransformDF2Numpy, one_hot_encode, NAN_CATEGORY, DROPPED_CATEGORY from df2numpy.errors import * df = pd.DataFrame({ "A": ["Aa", "Ab", "Ac", "Aa", "Ac", "Aa", "Aa", "Aa"], # uniques: 3, to_be_thresholded: "Ab" "B": [1....
28.883117
112
0.480216
import unittest import numpy as np import pandas as pd import df2numpy from df2numpy import TransformDF2Numpy, one_hot_encode, NAN_CATEGORY, DROPPED_CATEGORY from df2numpy.errors import * df = pd.DataFrame({ "A": ["Aa", "Ab", "Ac", "Aa", "Ac", "Aa", "Aa", "Aa"], "B": [1., -3., 0., 2, 3, 0, -1.3, 0.192], ...
true
true
f74694212f5afafd8daa98c7657a36bf1fec0d47
3,924
py
Python
utils/embeds.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
utils/embeds.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
utils/embeds.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
import discord from discord.embeds import EmptyEmbed class CustomEmbeds: confirm_path = 'https://raw.githubusercontent.com/davisschenk/Unnamed-Bot/master/images/ConfirmIcon.png?token=AIRYAKQHGVMHHBQ73J7G2AK5FKHRK' add_path = 'https://raw.githubusercontent.com/davisschenk/Unnamed-Bot/master/images/AddIcon.png?t...
44.590909
167
0.677115
import discord from discord.embeds import EmptyEmbed class CustomEmbeds: confirm_path = 'https://raw.githubusercontent.com/davisschenk/Unnamed-Bot/master/images/ConfirmIcon.png?token=AIRYAKQHGVMHHBQ73J7G2AK5FKHRK' add_path = 'https://raw.githubusercontent.com/davisschenk/Unnamed-Bot/master/images/AddIcon.png?t...
true
true
f74696a866a868795fea76bc8bb1d2e85bde8357
7,991
py
Python
setup.py
G705-Ghilan/HackerMode
6e799333fe6479a26c1f403eba318ae857a45cb6
[ "MIT" ]
null
null
null
setup.py
G705-Ghilan/HackerMode
6e799333fe6479a26c1f403eba318ae857a45cb6
[ "MIT" ]
null
null
null
setup.py
G705-Ghilan/HackerMode
6e799333fe6479a26c1f403eba318ae857a45cb6
[ "MIT" ]
null
null
null
import os import json import shutil from lib.config import Config from lib.variables import Variables, HACKERMODE_FOLDER_NAME RED = '\033[1;31m' GREEN = '\033[1;32m' YELLOW = '\033[1;33m' NORMAL = '\033[0m' UNDERLINE = '\033[4m' BOLD = '\033[1m' with open(os.path.join(Variables.HACKERMODE_PATH, 'packages.json')) as...
40.563452
149
0.564385
import os import json import shutil from lib.config import Config from lib.variables import Variables, HACKERMODE_FOLDER_NAME RED = '\033[1;31m' GREEN = '\033[1;32m' YELLOW = '\033[1;33m' NORMAL = '\033[0m' UNDERLINE = '\033[4m' BOLD = '\033[1m' with open(os.path.join(Variables.HACKERMODE_PATH, 'packages.json')) as...
true
true
f74697b2e0fa77c16292d4dd0a67ff3f31325bb3
15,819
py
Python
validate.py
chrisjuniorli/pytorch-image-models
bb815fa90c46b1f5f2f59a0dcddab8ce69f91dcf
[ "Apache-2.0" ]
null
null
null
validate.py
chrisjuniorli/pytorch-image-models
bb815fa90c46b1f5f2f59a0dcddab8ce69f91dcf
[ "Apache-2.0" ]
null
null
null
validate.py
chrisjuniorli/pytorch-image-models
bb815fa90c46b1f5f2f59a0dcddab8ce69f91dcf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ ImageNet Validation Script This is intended to be a lean and easily modifiable ImageNet validation script for evaluating pretrained models or training checkpoints against ImageNet or similarly organized image datasets. It prioritizes canonical PyTorch, standard Python style, and good perform...
44.560563
187
0.62899
import argparse import os import csv import glob import time import logging import torch import torch.nn as nn import torch.nn.parallel from collections import OrderedDict from contextlib import suppress from timm.models import create_model, apply_test_time_pool, load_checkpoint, is_model, list_models from timm.data ...
true
true
f74698cbc4678bb1c82b5cb67a32560f192fe9f5
28,378
py
Python
pymc3/step_methods/metropolis.py
mcnoat/pymc3
8b1f64cce32db3357301b88bbe9f7108733ac70a
[ "Apache-2.0" ]
1
2020-12-10T12:05:25.000Z
2020-12-10T12:05:25.000Z
pymc3/step_methods/metropolis.py
mcnoat/pymc3
8b1f64cce32db3357301b88bbe9f7108733ac70a
[ "Apache-2.0" ]
2
2019-12-30T17:58:29.000Z
2020-01-01T23:23:39.000Z
pymc3/step_methods/metropolis.py
mcnoat/pymc3
8b1f64cce32db3357301b88bbe9f7108733ac70a
[ "Apache-2.0" ]
1
2019-12-30T16:21:43.000Z
2019-12-30T16:21:43.000Z
# Copyright 2020 The PyMC Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
31.778275
101
0.603778
import numpy as np import numpy.random as nr import scipy.linalg import theano import pymc3 as pm from pymc3.distributions import draw_values from pymc3.step_methods.arraystep import ( ArrayStep, ArrayStepShared, Competence, PopulationArrayStepShared, metrop_select, ) from pymc3.thea...
true
true
f746996b9fef1ed3ea638b564861edcaa1379a63
4,788
py
Python
entities/items.py
TwoBlueCats/wandering-shadows
8962134d2a046e017b8c49b2d67a4f98e67f1d33
[ "MIT" ]
null
null
null
entities/items.py
TwoBlueCats/wandering-shadows
8962134d2a046e017b8c49b2d67a4f98e67f1d33
[ "MIT" ]
null
null
null
entities/items.py
TwoBlueCats/wandering-shadows
8962134d2a046e017b8c49b2d67a4f98e67f1d33
[ "MIT" ]
null
null
null
from combat import Damage, DamageType from components import consumable, effects from components_types import ConsumableTarget as Target, ConsumableType from entities.factory import ItemFactory from ranged_value import Range def effect_level_up(effect: effects.Effect, floor: int, base: int): match effect: ...
29.73913
100
0.645781
from combat import Damage, DamageType from components import consumable, effects from components_types import ConsumableTarget as Target, ConsumableType from entities.factory import ItemFactory from ranged_value import Range def effect_level_up(effect: effects.Effect, floor: int, base: int): match effect: ...
true
true
f7469ab5ddca5ea20407691b007c3a589bf3b9c8
12,812
py
Python
src/pip/_internal/vcs/git.py
DiegoCaraballo/pip
4b6bb5da37c182acd509c85f72840ca37108cf65
[ "MIT" ]
1
2021-02-13T22:40:04.000Z
2021-02-13T22:40:04.000Z
src/pip/_internal/vcs/git.py
DiegoCaraballo/pip
4b6bb5da37c182acd509c85f72840ca37108cf65
[ "MIT" ]
null
null
null
src/pip/_internal/vcs/git.py
DiegoCaraballo/pip
4b6bb5da37c182acd509c85f72840ca37108cf65
[ "MIT" ]
null
null
null
from __future__ import absolute_import import logging import os.path import re from pip._vendor.packaging.version import parse as parse_version from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip._internal.exceptions import BadCom...
35.688022
79
0.581408
from __future__ import absolute_import import logging import os.path import re from pip._vendor.packaging.version import parse as parse_version from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip._internal.exceptions import BadCom...
true
true
f7469e02efdd16b0ca1a97732c6a2a74edf69850
13,900
py
Python
src/main.py
wodxyj/plpp
cd74916536cf180a37b088ec61ea2a12a63719f2
[ "MIT" ]
null
null
null
src/main.py
wodxyj/plpp
cd74916536cf180a37b088ec61ea2a12a63719f2
[ "MIT" ]
null
null
null
src/main.py
wodxyj/plpp
cd74916536cf180a37b088ec61ea2a12a63719f2
[ "MIT" ]
null
null
null
import os import shutil import time import configargparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim as optim import torch.utils.data from tensorboardX import SummaryWriter from torch.optim.lr_scheduler import MultiStepLR from tqdm ...
44.126984
120
0.644964
import os import shutil import time import configargparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim as optim import torch.utils.data from tensorboardX import SummaryWriter from torch.optim.lr_scheduler import MultiStepLR from tqdm ...
true
true
f7469e54f61a1f5f1ce6bd3f9cb80c15814e0247
6,616
py
Python
mmt/models/resnet.py
wangyuan249/Mymmt767
6b9bb566d290bd3157350f6496fcb5df8c2b515c
[ "MIT" ]
null
null
null
mmt/models/resnet.py
wangyuan249/Mymmt767
6b9bb566d290bd3157350f6496fcb5df8c2b515c
[ "MIT" ]
null
null
null
mmt/models/resnet.py
wangyuan249/Mymmt767
6b9bb566d290bd3157350f6496fcb5df8c2b515c
[ "MIT" ]
null
null
null
from __future__ import absolute_import from torch import nn from torch.nn import functional as F from torch.nn import init import torchvision import torch import pdb from .layers import ( SpatialAttention2d, WeightedSum2d) __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resn...
36.153005
98
0.578446
from __future__ import absolute_import from torch import nn from torch.nn import functional as F from torch.nn import init import torchvision import torch import pdb from .layers import ( SpatialAttention2d, WeightedSum2d) __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resn...
true
true
f7469ea3c6d22a9802b77bd70fe053c2c256c38f
949
py
Python
setup.py
dontbanmeplz/image-to-ascii
d7191b349f68cfce8ff9688847797a3eed79e064
[ "MIT" ]
8
2021-03-03T15:40:34.000Z
2021-09-18T22:28:47.000Z
setup.py
dontbanmeplz/image-to-ascii
d7191b349f68cfce8ff9688847797a3eed79e064
[ "MIT" ]
null
null
null
setup.py
dontbanmeplz/image-to-ascii
d7191b349f68cfce8ff9688847797a3eed79e064
[ "MIT" ]
3
2021-03-04T15:06:39.000Z
2021-08-19T03:19:28.000Z
from distutils.core import setup setup( name = 'image_to_ascii', packages = ['image_to_ascii'], version = '0.2', license='MIT', description = 'A simple python library to convert images to ASCII art', long_description="README.md", author = 'Aypro', author_email = 'ayprogaming1@gmail.com', ...
32.724138
85
0.630137
from distutils.core import setup setup( name = 'image_to_ascii', packages = ['image_to_ascii'], version = '0.2', license='MIT', description = 'A simple python library to convert images to ASCII art', long_description="README.md", author = 'Aypro', author_email = 'ayprogaming1@gmail.com', ...
true
true
f7469f145e0d8dbca9cae5631dcc71882595efbd
364
py
Python
Exercicios-Python/exercicios-curso-em-video/d035.py
PedroGoes16/Estudos
142a697a1d375590bb76847a74ed2b8f9fa44a9d
[ "MIT" ]
null
null
null
Exercicios-Python/exercicios-curso-em-video/d035.py
PedroGoes16/Estudos
142a697a1d375590bb76847a74ed2b8f9fa44a9d
[ "MIT" ]
null
null
null
Exercicios-Python/exercicios-curso-em-video/d035.py
PedroGoes16/Estudos
142a697a1d375590bb76847a74ed2b8f9fa44a9d
[ "MIT" ]
null
null
null
print('-='*20) print('Analisador de Triângulos') print('-='*20) r1 = float(input('Primeiro segmento: ')) r2 = float(input('Segundo segmento: ')) r3 = float(input('Terceiro segmento: ')) if r1 < r2 + r3 and r3 < r2 + r1 and r2 < r1 + r3 : print('Os segmentos acima, PODEM FORMAR triângulos!') else: print('Os segm...
33.090909
61
0.662088
print('-='*20) print('Analisador de Triângulos') print('-='*20) r1 = float(input('Primeiro segmento: ')) r2 = float(input('Segundo segmento: ')) r3 = float(input('Terceiro segmento: ')) if r1 < r2 + r3 and r3 < r2 + r1 and r2 < r1 + r3 : print('Os segmentos acima, PODEM FORMAR triângulos!') else: print('Os segm...
true
true
f7469f5ca3132fdfca4ebbd47da2aa7673db3622
5,283
py
Python
ros/src/twist_controller/dbw_node.py
djiglesias/CarND-Capstone
45e8ca022b08ab3625d49533976bdecc5f909f8c
[ "MIT" ]
1
2018-08-17T13:57:44.000Z
2018-08-17T13:57:44.000Z
ros/src/twist_controller/dbw_node.py
djiglesias/CarND-Capstone
45e8ca022b08ab3625d49533976bdecc5f909f8c
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
djiglesias/CarND-Capstone
45e8ca022b08ab3625d49533976bdecc5f909f8c
[ "MIT" ]
5
2018-08-18T11:47:54.000Z
2018-09-25T20:02:45.000Z
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller ''' You can build this node only after you have built (or partially built) th...
40.022727
101
0.619345
import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller class DBWNode(object): def __init__(self): rospy.init_node('dbw_node') ...
true
true