hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
546ee763a66e875517fa6ca313b6ecb60b91f69b
1,617
py
Python
assets/python_scripts/xml2txt.py
weiSupreme/weiSupreme.github.io
59d419f2d8207c7da0a427330b21546f4f0d85d0
[ "CC-BY-4.0" ]
3
2018-09-15T05:47:35.000Z
2019-04-08T07:00:02.000Z
assets/python_scripts/xml2txt.py
weiSupreme/weiSupreme.github.io
59d419f2d8207c7da0a427330b21546f4f0d85d0
[ "CC-BY-4.0" ]
null
null
null
assets/python_scripts/xml2txt.py
weiSupreme/weiSupreme.github.io
59d419f2d8207c7da0a427330b21546f4f0d85d0
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/evn python # coding:utf-8 import os try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import sys xml_dir = r"D:\Python\PythonProjects\333_xml" xml_paths = [os.path.join(xml_dir, f) for f in os.listdir(xml_dir) if os.path.isfile(os.path....
29.4
102
0.577613
310be3133b5a907e7e7cbd37d3c67bd8cd6b05b5
1,153
py
Python
tests/unit/test_utils.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
null
null
null
tests/unit/test_utils.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
47
2020-05-14T07:54:48.000Z
2022-03-29T22:17:08.000Z
tests/unit/test_utils.py
Informasjonsforvaltning/organization-page-bffe
473dc9606649f864618f4f8bfc4a6a2a035f06d7
[ "Apache-2.0" ]
null
null
null
"""Unit test cases for utils.""" import pytest from fdk_organization_bff.utils.utils import resource_is_new, url_with_params @pytest.mark.unit def test_url_with_params() -> None: """Params is added correctly.""" url_0 = url_with_params("http://localhost:8000/endpoint", None) url_1 = url_with_params("http...
34.939394
81
0.690373
a39ec4558c0977b5ee346411c8ee3f8e0b782534
1,221
py
Python
mycli/clistyle.py
steverobbins/mycli
ad19b143da483f97a657a69eeff88f9a74966520
[ "BSD-3-Clause" ]
2
2015-08-01T03:39:58.000Z
2015-11-08T07:54:59.000Z
mycli/clistyle.py
steverobbins/mycli
ad19b143da483f97a657a69eeff88f9a74966520
[ "BSD-3-Clause" ]
null
null
null
mycli/clistyle.py
steverobbins/mycli
ad19b143da483f97a657a69eeff88f9a74966520
[ "BSD-3-Clause" ]
null
null
null
from pygments.token import Token from pygments.style import Style from pygments.util import ClassNotFound from prompt_toolkit.styles import default_style_extensions import pygments.styles def style_factory(name): try: style = pygments.styles.get_style_by_name(name) except ClassNotFound: style ...
35.911765
76
0.657658
94a18da4560be081da6b3059d998fab14276d9a8
1,052
py
Python
api/test/api/responders_test/test_data/constants.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
api/test/api/responders_test/test_data/constants.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
api/test/api/responders_test/test_data/constants.py
korenlev/calipso-cvim
39278a5cf09c40b26a8a143ccc0c8d437961abc2
[ "Apache-2.0" ]
null
null
null
############################################################################### # Copyright (c) 2017-2020 Koren Lev (Cisco Systems), # # Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others # # # ...
43.833333
79
0.455323
14180ef85d9e9750aa4cb6f06a8af20b49de6651
1,754
py
Python
eggs/bx_python-0.7.2-py2.6-linux-x86_64-ucs4.egg/EGG-INFO/scripts/maf_to_concat_fasta.py
psnehal/MethylSig
5efad71e71ff2515feff2e49579c856ef9a1bbd8
[ "CC-BY-3.0" ]
null
null
null
eggs/bx_python-0.7.2-py2.6-linux-x86_64-ucs4.egg/EGG-INFO/scripts/maf_to_concat_fasta.py
psnehal/MethylSig
5efad71e71ff2515feff2e49579c856ef9a1bbd8
[ "CC-BY-3.0" ]
null
null
null
eggs/bx_python-0.7.2-py2.6-linux-x86_64-ucs4.egg/EGG-INFO/scripts/maf_to_concat_fasta.py
psnehal/MethylSig
5efad71e71ff2515feff2e49579c856ef9a1bbd8
[ "CC-BY-3.0" ]
null
null
null
#!/afs/bx.psu.edu/project/pythons/py2.6-linux-x86_64-ucs4/bin/python2.6 """ Read a maf and print the text as a fasta file, concatenating blocks. A specific subset of species can be chosen. usage %prog [options] species1,species2,... < maf_file > fasta_file --fill="expression": Insert this between blocks --w...
28.290323
95
0.600912
a74c597dc4960b95584b13a311f8948e26638c61
3,549
py
Python
sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_subscription_async.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_subscription_async.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/servicebus/azure-servicebus/samples/async_samples/mgmt_subscription_async.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
43.280488
137
0.75796
15e89279227612cb8f967e13981f4d21eb54e8d4
2,423
py
Python
oscar/lib/python2.7/site-packages/prompt_toolkit/styles/from_pygments.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/prompt_toolkit/styles/from_pygments.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/prompt_toolkit/styles/from_pygments.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
""" Adaptor for building prompt_toolkit styles, starting from a Pygments style. Usage:: from pygments.styles.tango import TangoStyle style = style_from_pygments(pygments_style_cls=TangoStyle) """ from __future__ import unicode_literals from .base import Style from .from_dict import style_from_dict...
31.064103
78
0.689641
0152fec4750f3db6055010ef2270dd2c335f8656
1,354
py
Python
backend/corpora/common/utils/cloudfront.py
chanzuckerberg/dcp-prototype
24d2323ba5ae1482395da35ea11c42708e3a52ce
[ "MIT" ]
2
2020-02-07T18:12:12.000Z
2020-02-11T14:59:03.000Z
backend/corpora/common/utils/cloudfront.py
HumanCellAtlas/dcp-prototype
44ca66a266004124f39d7d3e3dd75e9076012ff0
[ "MIT" ]
173
2020-01-29T17:48:02.000Z
2020-03-20T02:52:58.000Z
backend/corpora/common/utils/cloudfront.py
HumanCellAtlas/dcp-prototype
44ca66a266004124f39d7d3e3dd75e9076012ff0
[ "MIT" ]
1
2020-03-20T17:06:54.000Z
2020-03-20T17:06:54.000Z
import boto3 import uuid from typing import List from backend.corpora.common.corpora_config import CorporaCloudfrontConfig import logging client = boto3.client("cloudfront") # Since Cloudfront is only used in deployed environments (dev, staging, prod), # only trigger an invalidation if the distribution_id is defin...
33.02439
94
0.70901
3890e1baae75008f888c9888e11fda7dee555729
4,897
py
Python
axiol/functions.py
ramnreddy15/Axiol
39c6828c74709ac4dc27af666945c4a48d37258d
[ "MIT" ]
null
null
null
axiol/functions.py
ramnreddy15/Axiol
39c6828c74709ac4dc27af666945c4a48d37258d
[ "MIT" ]
null
null
null
axiol/functions.py
ramnreddy15/Axiol
39c6828c74709ac4dc27af666945c4a48d37258d
[ "MIT" ]
null
null
null
import asyncio import random from variables import DEFAULT_PREFIX from database import PREFIXES, LEVELDATABASE, PLUGINS, PERMISSIONS async def get_prefix(ctx): prefix = await PREFIXES.find_one({"_id": ctx.guild.id}) if prefix is not None: return prefix["prefix"] else: return DEFAULT_PREFI...
30.416149
131
0.566061
920cbe75be00713016fbf37939080542d048245b
3,740
py
Python
git_commenter/cli.py
fossabot/git-commenter
5634e639b48368df3ffc47451fadb17adb20c300
[ "MIT" ]
null
null
null
git_commenter/cli.py
fossabot/git-commenter
5634e639b48368df3ffc47451fadb17adb20c300
[ "MIT" ]
null
null
null
git_commenter/cli.py
fossabot/git-commenter
5634e639b48368df3ffc47451fadb17adb20c300
[ "MIT" ]
null
null
null
import argparse import pyperclip from termcolor import cprint from .git import GitUtility from .question import Question class InvalidArgumentError(ValueError): def __str__(self): return "The multiple modes can not be specified." class CLI: def __init__(self, message): """ Args: ...
28.549618
75
0.543048
d400aa1345560450bf3ec0cfc9543ba0a7b90a5a
17,117
bzl
Python
go/private/rules/test.bzl
alxn/rules_go
678db7ff7269d3bb13af342617b8deddec6ad7ae
[ "Apache-2.0" ]
null
null
null
go/private/rules/test.bzl
alxn/rules_go
678db7ff7269d3bb13af342617b8deddec6ad7ae
[ "Apache-2.0" ]
null
null
null
go/private/rules/test.bzl
alxn/rules_go
678db7ff7269d3bb13af342617b8deddec6ad7ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
39.259174
138
0.647543
c41f64a60e0266e67ca8d294c0123334e3e86f44
561
py
Python
test_login.py
olga121/Selenium_Webdriver_2107
13e43aa5e4a2e04c6453ba634778fcbb5c793f40
[ "Apache-2.0" ]
null
null
null
test_login.py
olga121/Selenium_Webdriver_2107
13e43aa5e4a2e04c6453ba634778fcbb5c793f40
[ "Apache-2.0" ]
null
null
null
test_login.py
olga121/Selenium_Webdriver_2107
13e43aa5e4a2e04c6453ba634778fcbb5c793f40
[ "Apache-2.0" ]
null
null
null
import pytest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC @pytest.fixture def driver(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_example(driver): drive...
29.526316
79
0.755793
0d05be740e09157b590f036be1d2972da65a7a29
270
py
Python
ros2_draw_squares/launch/call_move_robot_in_square_service_server.launch.py
samialperen/ros2_move_robot
b80693589632a37b20a3cac26004a4a546f1717f
[ "MIT" ]
null
null
null
ros2_draw_squares/launch/call_move_robot_in_square_service_server.launch.py
samialperen/ros2_move_robot
b80693589632a37b20a3cac26004a4a546f1717f
[ "MIT" ]
3
2022-03-30T15:22:36.000Z
2022-03-30T18:23:13.000Z
ros2_draw_squares/launch/call_move_robot_in_square_service_server.launch.py
samialperen/ros2_move_robot
b80693589632a37b20a3cac26004a4a546f1717f
[ "MIT" ]
null
null
null
from launch import LaunchDescription import launch_ros.actions def generate_launch_description(): return LaunchDescription([ launch_ros.actions.Node( package='ros2_draw_squares', executable='move_robot_service_client', output='screen'), ])
27
98
0.744444
74890957a4a2779f58b2ffb16f5cbbdb24b071e2
979
py
Python
scripts/slave/recipe_modules/syzygy/gclient_config.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/syzygy/gclient_config.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/syzygy/gclient_config.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
1
2020-07-23T10:57:32.000Z
2020-07-23T10:57:32.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import DEPS CONFIG_CTX = DEPS['gclient'].CONFIG_CTX @CONFIG_CTX() def syzygy(c): # A syzygy configuration for the gclient module. c.got_revision_mappin...
26.459459
72
0.702758
79c4e773afe00fe8c4655e5ccde6337f7e73d45f
407
py
Python
indoorair_front/indoorair_front/wsgi.py
ydang5/indoorair-front
24264fbbd0da0ab007d9dc058311dd4914953d59
[ "BSD-3-Clause" ]
null
null
null
indoorair_front/indoorair_front/wsgi.py
ydang5/indoorair-front
24264fbbd0da0ab007d9dc058311dd4914953d59
[ "BSD-3-Clause" ]
null
null
null
indoorair_front/indoorair_front/wsgi.py
ydang5/indoorair-front
24264fbbd0da0ab007d9dc058311dd4914953d59
[ "BSD-3-Clause" ]
null
null
null
""" WSGI config for indoorair_front project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJAN...
23.941176
78
0.793612
26d3a0a46bdd79f94d4fec343460258a1465dd73
1,764
py
Python
rabbitai/charts/commands/importers/dispatcher.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
null
null
null
rabbitai/charts/commands/importers/dispatcher.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
null
null
null
rabbitai/charts/commands/importers/dispatcher.py
psbsgic/rabbitai
769e120ba605d56ac076f810a549c38dac410c8e
[ "Apache-2.0" ]
1
2021-07-09T16:29:50.000Z
2021-07-09T16:29:50.000Z
import logging from typing import Any, Dict from marshmallow.exceptions import ValidationError from rabbitai.charts.commands.importers import v1 from rabbitai.commands.base import BaseCommand from rabbitai.commands.exceptions import CommandInvalidError from rabbitai.commands.importers.exceptions import IncorrectVersi...
32.072727
82
0.65873
ed34d314b62d11e9c93e8f9bab37da59ed218373
14,808
py
Python
qiime2/core/type/signature.py
ebolyen/qiime2
f8d53101035ab4618587fe608f21f6e467acc74a
[ "BSD-3-Clause" ]
null
null
null
qiime2/core/type/signature.py
ebolyen/qiime2
f8d53101035ab4618587fe608f21f6e467acc74a
[ "BSD-3-Clause" ]
null
null
null
qiime2/core/type/signature.py
ebolyen/qiime2
f8d53101035ab4618587fe608f21f6e467acc74a
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
41.712676
79
0.577256
14acd9a44b7a5cc95962cb159185a8d4148f3999
13,519
py
Python
tests/terraform/graph/graph_builder/test_graph_builder.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
tests/terraform/graph/graph_builder/test_graph_builder.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
tests/terraform/graph/graph_builder/test_graph_builder.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
import os import shutil from unittest import TestCase from checkov.common.graph.db_connectors.networkx.networkx_db_connector import NetworkxConnector from checkov.terraform.graph_builder.graph_components.block_types import BlockType from checkov.terraform.graph_builder.graph_to_tf_definitions import convert_graph_vert...
61.171946
208
0.684074
bb68d08f2f5d89eca636785c1c25060b28d7ac52
2,222
py
Python
filter.py
pitpig/rozowoo
79ec617978252deed688aaf33c67fa1b0cebe56a
[ "MIT" ]
1
2019-01-09T19:15:30.000Z
2019-01-09T19:15:30.000Z
filter.py
pitpig/rozowoo
79ec617978252deed688aaf33c67fa1b0cebe56a
[ "MIT" ]
null
null
null
filter.py
pitpig/rozowoo
79ec617978252deed688aaf33c67fa1b0cebe56a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging from django import template from model import * import django.template.defaultfilters as defaultfilters import urllib register = template.Library() from datetime import * @register.filter def datetz(date,format): #datetime with timedelta t=timedelta(seconds=3600*g_blog.timedel...
22.22
86
0.654815
0daf571315d900b1297ea876d815cc733e1908fe
10,367
py
Python
genmakefiles.py
mtk-watch/android_external_v8
29eb30806a59123b1f9faf9083a12d26fa418fad
[ "BSD-3-Clause" ]
null
null
null
genmakefiles.py
mtk-watch/android_external_v8
29eb30806a59123b1f9faf9083a12d26fa418fad
[ "BSD-3-Clause" ]
null
null
null
genmakefiles.py
mtk-watch/android_external_v8
29eb30806a59123b1f9faf9083a12d26fa418fad
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os import subprocess import sys from antlr4 import * from gnparser.gnLexer import gnLexer from gnparser.gnParser import gnParser from gnparser.gnListener import gnListener from string import Template DBG = False # Reformat the specified Android.bp file def _bpFmt(filename): ## NOTE: bp...
33.334405
118
0.593904
f3e1beb5f7bd251084f124c79eb225d34be1c904
3,735
py
Python
abtools/utils/decorators.py
menis/abtools
bfc7c6c508b174bb3b74d8f152156242ddd2ee77
[ "MIT" ]
9
2016-06-13T20:00:04.000Z
2022-03-19T19:07:23.000Z
abtools/utils/decorators.py
menis/abtools
bfc7c6c508b174bb3b74d8f152156242ddd2ee77
[ "MIT" ]
null
null
null
abtools/utils/decorators.py
menis/abtools
bfc7c6c508b174bb3b74d8f152156242ddd2ee77
[ "MIT" ]
4
2018-04-10T09:05:21.000Z
2022-01-27T21:23:06.000Z
#!/usr/bin/env python # filename: decorators.py # # Copyright (c) 2015 Bryan Briney # License: The MIT license (http://opensource.org/licenses/MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associated documentation files (the "Software"), to deal in the So...
31.923077
99
0.624096
51819166b8d9013f41886275a6f2467e807ce7e0
7,744
py
Python
qiskit/aqua/algorithms/adaptive/vq_algorithm.py
aaita92/qiskit-aqua
8681045790123eefc347dfd05dee547bddc3d2df
[ "Apache-2.0" ]
2
2020-01-22T23:45:59.000Z
2020-01-22T23:46:02.000Z
qiskit/aqua/algorithms/adaptive/vq_algorithm.py
aaita92/qiskit-aqua
8681045790123eefc347dfd05dee547bddc3d2df
[ "Apache-2.0" ]
null
null
null
qiskit/aqua/algorithms/adaptive/vq_algorithm.py
aaita92/qiskit-aqua
8681045790123eefc347dfd05dee547bddc3d2df
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
37.230769
100
0.634168
7247f929364d2de8f8be14e48728efc4d36406ae
5,508
py
Python
service/paginator.py
getcircle/python-soa
590b53691ff959713e331c25353d8c9280e10100
[ "MIT" ]
null
null
null
service/paginator.py
getcircle/python-soa
590b53691ff959713e331c25353d8c9280e10100
[ "MIT" ]
null
null
null
service/paginator.py
getcircle/python-soa
590b53691ff959713e331c25353d8c9280e10100
[ "MIT" ]
null
null
null
# Copy of Django's paginator: https://github.com/django/django/blob/master/django/core/paginator.py import collections from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self...
32.210526
99
0.611837
741cfd4513df7d3ca1fdbcaf14b96a5a5972210e
1,511
py
Python
Pypractice/test.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
5
2021-09-06T04:27:56.000Z
2021-12-14T14:50:27.000Z
Pypractice/test.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
null
null
null
Pypractice/test.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
null
null
null
import unittest import random import string import subprocess def rand_string(length=15): printable = string.printable[:-5] random_string = ''.join([ printable[random.randint( 0, len(printable) - 1 )] for _ in range(length) ]) return random_string global_key = rand_string() class SampleTest(unittest.Test...
21.898551
63
0.684977
a61d581f084c3f6bf19a46821e4d2b2362444ce1
1,239
py
Python
setup.py
afeinstein20/tess_infos
c546f2c775fea203f2dfce1610305cae184a9b69
[ "MIT" ]
null
null
null
setup.py
afeinstein20/tess_infos
c546f2c775fea203f2dfce1610305cae184a9b69
[ "MIT" ]
null
null
null
setup.py
afeinstein20/tess_infos
c546f2c775fea203f2dfce1610305cae184a9b69
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 16 13:37:42 2020 @author: Maximilian N. Günther MIT Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02109, USA Email: maxgue@mit.edu Web: www.mnguenther.com """ fr...
28.159091
142
0.653753
3ac4349d4f7370291c657a23307f34ddd86fd394
8,095
py
Python
sgk/sparse/sparse_matrix.py
egonrian/google-research
8177adbe9ca0d7e5a9463b54581fe6dd27be0974
[ "Apache-2.0" ]
3
2021-01-18T04:46:49.000Z
2021-03-05T09:21:40.000Z
sgk/sparse/sparse_matrix.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
7
2021-11-10T19:44:38.000Z
2022-02-10T06:48:39.000Z
sgk/sparse/sparse_matrix.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
4
2021-02-08T10:25:45.000Z
2021-04-17T14:46:26.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
28.403509
77
0.665596
0d037cc912676edd5833bb17061c211595ca2116
6,714
py
Python
jolly-jellyfish/src/page_maker/templatetags/render_thumbnail.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
jolly-jellyfish/src/page_maker/templatetags/render_thumbnail.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
jolly-jellyfish/src/page_maker/templatetags/render_thumbnail.py
Artemis21/summer-code-jam-2020
1323288cb1e75b3aa4141c2c6e378f9219cf73d0
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
import os from pathlib import Path from typing import Union from PIL import Image from django import template from django.conf import settings from django.http import HttpRequest from django.utils import timezone from selenium import webdriver from selenium.webdriver.chrome.options import Options as ChromeOptions from...
50.481203
117
0.70703
defb4a5b23287240ed28ec1695d2fdfbec9ac122
3,189
py
Python
voicecontrol/pinyin_typing.py
thautwarm/voicecontrol
dc5565d114fe80f0f06a0e7c541ee447fb7712f3
[ "MIT" ]
2
2021-06-05T08:27:44.000Z
2021-06-05T13:46:27.000Z
voicecontrol/pinyin_typing.py
thautwarm/voicecontrol
dc5565d114fe80f0f06a0e7c541ee447fb7712f3
[ "MIT" ]
null
null
null
voicecontrol/pinyin_typing.py
thautwarm/voicecontrol
dc5565d114fe80f0f06a0e7c541ee447fb7712f3
[ "MIT" ]
null
null
null
import os from pynput.keyboard import Key, Controller import psutil from voicecontrol.st import * keyboard = Controller() voice_input_exe = "iFlyVoice.exe" def get_process(name: str): for p in psutil.process_iter(): if p.name() == name: return p def pressed(k): keybo...
23.622222
72
0.541549
886d9901ecbf2c8cd2bbab9ed49548abcb8f9bdc
2,059
py
Python
tests/step16_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
tests/step16_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
tests/step16_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
from pathlib import Path from step16 import decode_hex, Packet, get_version_sum TEST_INPUT = Path(__file__).parent / 'step16.txt' REAL_INPUT = Path(__file__).parent.parent / 'src/step16.txt' def test_step16(): assert decode_hex('D2FE28') == '110100101111111000101000' assert decode_hex('38006F45291200') == '...
33.209677
101
0.718796
932afd4ea007227b4e807dcdbb7690b3100d8a9f
1,817
py
Python
scapy/error.py
kosciolek/J-Tracert
89ed802f700e02600138ad7132e6a856463620dd
[ "MIT" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
scapy/error.py
kosciolek/J-Tracert
89ed802f700e02600138ad7132e6a856463620dd
[ "MIT" ]
null
null
null
scapy/error.py
kosciolek/J-Tracert
89ed802f700e02600138ad7132e6a856463620dd
[ "MIT" ]
1
2018-11-15T12:37:04.000Z
2018-11-15T12:37:04.000Z
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Logging subsystem and basic exception class. """ ############################# ##### Logging subsystem ##### #######...
29.786885
89
0.549257
c1e575cc633f6fc2fb98acfe03f36e3654118c5a
30,336
py
Python
pretorched/gans/biggan.py
schwettmann/pretorched-x
ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed
[ "MIT" ]
null
null
null
pretorched/gans/biggan.py
schwettmann/pretorched-x
ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed
[ "MIT" ]
null
null
null
pretorched/gans/biggan.py
schwettmann/pretorched-x
ce8c3712434b3cd5d85dcbe8582ff51ddfa7d4ed
[ "MIT" ]
null
null
null
"""biggan.py Implements BigGAN architecture from Large Scale GAN Training for High Fidelity Natural Image Synthesis by Andrew Brock, Jeff Donahue, and Karen Simonyan. Adapted from https://github.com/ajbrock/BigGAN-PyTorch. """ import functools import os import torch import torch.nn as nn import torch.nn.functional...
43.901592
123
0.548688
06c38ca5a3d50d9e9dfbe617e18a755385e83173
3,267
py
Python
src/primaires/pnj/commandes/pspawn/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
14
2015-08-21T19:15:21.000Z
2017-11-26T13:59:17.000Z
src/primaires/pnj/commandes/pspawn/__init__.py
vincent-lg/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
20
2015-09-29T20:50:45.000Z
2018-06-21T12:58:30.000Z
src/primaires/pnj/commandes/pspawn/__init__.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
3
2015-05-02T19:42:03.000Z
2018-09-06T10:55:00.000Z
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this ...
41.884615
79
0.676155
1f15f325c10419b6635c94e464dad42538b22998
87
py
Python
ComRISB/pygtool/gs_ml.py
comscope/comsuite
d51c43cad0d15dc3b4d1f45e7df777cdddaa9d6c
[ "BSD-3-Clause" ]
18
2019-06-15T18:08:21.000Z
2022-01-30T05:01:29.000Z
ComRISB/pygtool/gs_ml.py
comscope/Comsuite
b80ca9f34c519757d337487c489fb655f7598cc2
[ "BSD-3-Clause" ]
null
null
null
ComRISB/pygtool/gs_ml.py
comscope/Comsuite
b80ca9f34c519757d337487c489fb655f7598cc2
[ "BSD-3-Clause" ]
11
2019-06-05T02:57:55.000Z
2021-12-29T02:54:25.000Z
#!/usr/bin/env python from pyglib.gsolver.gs_ml_v2 import driver_gs_ml driver_gs_ml()
17.4
48
0.804598
b9eb6dc2a8a3d52943c35a49f2065c09bd0cd92d
2,298
py
Python
networks/carn_arch.py
xyzhu1/EMASRN
a0f1dc9b78ba814a8b7e3291a0625598cf6c7609
[ "MIT" ]
19
2020-09-18T08:49:19.000Z
2022-03-02T01:56:48.000Z
networks/carn_arch.py
zhuxyme/EMASRN
d92c12d37797514aaa8024168d5b96fb21d26f15
[ "MIT" ]
1
2021-12-06T12:59:47.000Z
2021-12-06T12:59:47.000Z
networks/carn_arch.py
zhuxyme/EMASRN
d92c12d37797514aaa8024168d5b96fb21d26f15
[ "MIT" ]
8
2020-09-23T02:32:40.000Z
2022-01-18T15:18:40.000Z
import torch import torch.nn as nn import networks.carn_ops as ops class Block(nn.Module): def __init__(self, in_channels, out_channels, group=1): super(Block, self).__init__() self.b1 = ops.ResidualBlock(64, 64) self.b2 = ops.ResidualBlock(64...
27.035294
75
0.474326
0527809f637e7960647774d14659f7c40f425019
12,360
py
Python
skrf/media/circularWaveguide.py
dxxx9/scikit-rf
8bbb23ff5ef25ae054cfd45b4558cbdfce3378a7
[ "BSD-3-Clause" ]
379
2015-01-25T12:19:19.000Z
2022-03-29T14:01:07.000Z
skrf/media/circularWaveguide.py
jhillairet/scikit-rf
060257568f3c0bdcc817e89742ec29445df81a09
[ "BSD-3-Clause" ]
456
2015-01-06T19:15:55.000Z
2022-03-31T06:42:57.000Z
skrf/media/circularWaveguide.py
jhillairet/scikit-rf
060257568f3c0bdcc817e89742ec29445df81a09
[ "BSD-3-Clause" ]
211
2015-01-06T17:14:06.000Z
2022-03-31T01:36:00.000Z
""" circularWaveguide (:mod:`skrf.media.circularWaveguide`) ================================================================ .. autosummary:: :toctree: generated/ CircularWaveguide """ from scipy.constants import epsilon_0, mu_0, pi from scipy.special import jn_zeros, jnp_zeros from numpy import sqrt, where ...
30.44335
103
0.521117
d51da784719b9971a212649528c060503f9b8225
1,145
py
Python
Easy/Que100.py
HuangZengPei/LeetCode
d2b8a1dfe986d71d02d2568b55bad6e5b1c81492
[ "MIT" ]
2
2019-11-20T14:05:27.000Z
2019-11-20T14:05:28.000Z
Easy/Que100.py
HuangZengPei/LeetCode
d2b8a1dfe986d71d02d2568b55bad6e5b1c81492
[ "MIT" ]
null
null
null
Easy/Que100.py
HuangZengPei/LeetCode
d2b8a1dfe986d71d02d2568b55bad6e5b1c81492
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): # 不能单独用前序遍历,[1,2]以及[1,null,2]结果相同 def preOrder(self,p,list): if p == None: return ...
26.022727
86
0.464629
ef72a06ada490805daac90b4aa87656bee7afee1
650
py
Python
pysbolgraph/S2ProvUsage.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
4
2018-06-29T10:43:08.000Z
2019-03-27T22:33:33.000Z
pysbolgraph/S2ProvUsage.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
14
2019-01-22T16:03:12.000Z
2019-11-11T19:05:32.000Z
pysbolgraph/S2ProvUsage.py
zhfanrui/pysbolgraph
c4914705bd9b22a2b69db0fc4d43049fcb07ad17
[ "BSD-2-Clause" ]
12
2018-07-01T10:59:37.000Z
2021-03-01T08:48:20.000Z
from .S2Identified import S2Identified from .terms import Prov from .terms import SBOL2 from rdflib import URIRef from rdflib.namespace import RDF class S2ProvUsage(S2Identified): def __init__(self, g, uri): super(S2ProvUsage, self).__init__(g, uri) @property def entity(self): return se...
20.967742
57
0.701538
031a3d34cb4e54b14cb038a2d0f88bb00a191756
305
py
Python
src/xdist/__init__.py
kianmeng/pytest-xdist
290b322a5d48290397ad698fc1dcb729cbe62e07
[ "MIT" ]
883
2015-09-01T22:41:20.000Z
2022-03-30T22:32:43.000Z
src/xdist/__init__.py
kianmeng/pytest-xdist
290b322a5d48290397ad698fc1dcb729cbe62e07
[ "MIT" ]
623
2015-09-02T00:06:07.000Z
2022-03-31T11:40:44.000Z
src/xdist/__init__.py
kianmeng/pytest-xdist
290b322a5d48290397ad698fc1dcb729cbe62e07
[ "MIT" ]
190
2015-09-01T18:56:08.000Z
2022-03-25T17:50:56.000Z
from xdist.plugin import ( is_xdist_worker, is_xdist_master, get_xdist_worker_id, is_xdist_controller, ) from xdist._version import version as __version__ __all__ = [ "__version__", "is_xdist_worker", "is_xdist_master", "is_xdist_controller", "get_xdist_worker_id", ]
19.0625
49
0.714754
4c45351b800bd72bfa76522864c7dd66725bab61
2,954
py
Python
keras_transformer/keras_transformer/core/encoder_decoder/DecoderBlock.py
erelcan/keras-transformer
ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f
[ "Apache-2.0" ]
3
2021-02-14T17:10:59.000Z
2021-02-14T18:09:17.000Z
keras_transformer/keras_transformer/core/encoder_decoder/DecoderBlock.py
erelcan/keras-transformer
ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f
[ "Apache-2.0" ]
null
null
null
keras_transformer/keras_transformer/core/encoder_decoder/DecoderBlock.py
erelcan/keras-transformer
ae88985dd4f1b5f91737e80c7e9c3157b60b4c4f
[ "Apache-2.0" ]
null
null
null
from keras.layers import Layer from keras_transformer.core.encoder_decoder.sub_layers.SelfAttentionSublayer import SelfAttentionSublayer from keras_transformer.core.encoder_decoder.sub_layers.PositionWiseFeedForwardSublayer import PositionWiseFeedForwardSublayer class DecoderBlock(Layer): def __init__(self, d_mo...
48.42623
157
0.721733
2dd69fb5fb52e08a04fd1621a2a947048539e632
2,730
py
Python
tools/lint.py
mvaisakh/art-testing
89dab669dca6d768a79101b1e480794fa46012d5
[ "Apache-2.0" ]
null
null
null
tools/lint.py
mvaisakh/art-testing
89dab669dca6d768a79101b1e480794fa46012d5
[ "Apache-2.0" ]
null
null
null
tools/lint.py
mvaisakh/art-testing
89dab669dca6d768a79101b1e480794fa46012d5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
30.674157
90
0.675824
565c3fc7bbc6b0d7e26084a7a3226b3a2e8db8f9
1,534
py
Python
build_site.py
devinbrady/openanc
5e69dceb08120dd80a902fdfcaaf1a2a9947afaa
[ "CC0-1.0" ]
4
2020-08-04T20:55:18.000Z
2022-03-14T23:18:47.000Z
build_site.py
devinbrady/openanc
5e69dceb08120dd80a902fdfcaaf1a2a9947afaa
[ "CC0-1.0" ]
12
2020-07-16T17:46:12.000Z
2022-01-24T22:02:07.000Z
build_site.py
devinbrady/openanc
5e69dceb08120dd80a902fdfcaaf1a2a9947afaa
[ "CC0-1.0" ]
1
2020-08-04T02:59:24.000Z
2020-08-04T02:59:24.000Z
""" All steps necessary to build OpenANC pages """ import argparse from datetime import datetime from scripts.refresh_data import RefreshData from scripts.index import BuildIndex from scripts.districts import BuildDistricts from scripts.ancs import BuildANCs from scripts.wards import BuildWards start_time = datetime...
28.943396
110
0.736636
89c567a4b46e20dafe52b34e4a3eb8118180fb68
1,646
py
Python
promoterz/representation/oldschool.py
emillj/gekkoJaponicus
d77c8c7a303b97a3643eb3f3c8b995b8b393f3f7
[ "MIT" ]
null
null
null
promoterz/representation/oldschool.py
emillj/gekkoJaponicus
d77c8c7a303b97a3643eb3f3c8b995b8b393f3f7
[ "MIT" ]
null
null
null
promoterz/representation/oldschool.py
emillj/gekkoJaponicus
d77c8c7a303b97a3643eb3f3c8b995b8b393f3f7
[ "MIT" ]
1
2021-11-29T20:18:25.000Z
2021-11-29T20:18:25.000Z
#!/bin/python import random import json import os from copy import deepcopy from deap import base from deap import creator from deap import tools from deap import algorithms import numpy as np from .. import functions def constructPhenotype(stratSettings, individue): # THIS FUNCTION IS UGLYLY WRITTEN; USE WITH ...
27.433333
77
0.709599
924fba0647ef5146df4f41163e8bc74a3044652e
2,054
py
Python
mm2d/core/backend/pymunk/body.py
adamheins/mm2d
9a7b6ef63998757172c3100b916621a25d165d65
[ "MIT" ]
null
null
null
mm2d/core/backend/pymunk/body.py
adamheins/mm2d
9a7b6ef63998757172c3100b916621a25d165d65
[ "MIT" ]
null
null
null
mm2d/core/backend/pymunk/body.py
adamheins/mm2d
9a7b6ef63998757172c3100b916621a25d165d65
[ "MIT" ]
null
null
null
import pymunk from mm2d.shapes import Circle, Segment, Polygon from mm2d.body import Fixture, Body from mm2d.spatial import Transform, Twist, State from .util import transform_to_pymunk def shape_to_pymunk(shape) -> pymunk.Shape: if isinstance(shape, Circle): pymunk_shape = pymunk.Circle(radius=shape.ra...
33.672131
84
0.717137
77e965477a37e700e6be14defbffca1b870271f9
2,341
py
Python
binary_search_tree.py
ValtersJZ/LearningDataStructuresAndAlgorithms
d608494cc6a3bba4b3a91a9469c59de077fcf36f
[ "MIT" ]
1
2019-07-10T10:44:09.000Z
2019-07-10T10:44:09.000Z
binary_search_tree.py
ValtersJZ/LearningDataStructuresAndAlgorithms
d608494cc6a3bba4b3a91a9469c59de077fcf36f
[ "MIT" ]
null
null
null
binary_search_tree.py
ValtersJZ/LearningDataStructuresAndAlgorithms
d608494cc6a3bba4b3a91a9469c59de077fcf36f
[ "MIT" ]
null
null
null
class Node(object): def __init__(self, value): self.value = value self.left = None self.right = None class BST(object): """Binary search tree""" def __init__(self, root): self.root = Node(root) def insert(self, new_val): self._insert_node(self.root, new_val) ...
28.54878
107
0.554464
e6a178b62334da0eca930230515c01df69a7c81c
1,530
py
Python
ivy/functional/backends/tensorflow/data_type.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/tensorflow/data_type.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
1
2022-03-08T13:29:20.000Z
2022-03-08T13:29:20.000Z
ivy/functional/backends/tensorflow/data_type.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
null
null
null
# global import numpy as np import tensorflow as tf from typing import Union, Tuple from tensorflow.python.types.core import Tensor from tensorflow.python.framework.dtypes import DType # local import ivy # noinspection PyShadowingBuiltins def iinfo(type: Union[DType, str, Tensor])\ -> np.iinfo: return tf...
24.677419
90
0.701307
c3a2875d3476b47c8f992f6d3b1cc47576384c26
1,722
py
Python
src/tuplenet/tools/rebuild-etcd.py
vipshop/Tuplenet
25701765b4dfd11ff1da1a126109cce04d987a4b
[ "Apache-2.0" ]
null
null
null
src/tuplenet/tools/rebuild-etcd.py
vipshop/Tuplenet
25701765b4dfd11ff1da1a126109cce04d987a4b
[ "Apache-2.0" ]
null
null
null
src/tuplenet/tools/rebuild-etcd.py
vipshop/Tuplenet
25701765b4dfd11ff1da1a126109cce04d987a4b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys import os def redefine_sys_path(): system_site_packet64_path = '/usr/lib/python2.7/site-packages' system_site_packet_path = '/usr/lib64/python2.7/site-packages' file_path = os.path.realpath(__file__) file_path = file_path.split('/') file_path = '/'.join(file_path[0:...
33.764706
77
0.618467
1f265ae9c13617d5af6ebaebb69f456c03cd9ba9
28,788
py
Python
tests/test_caching.py
AtilaSaraiva/devito
629181c89a43054b9710920e76af0eb14138c97c
[ "MIT" ]
199
2016-08-18T23:33:05.000Z
2019-12-24T07:08:48.000Z
tests/test_caching.py
AtilaSaraiva/devito
629181c89a43054b9710920e76af0eb14138c97c
[ "MIT" ]
949
2016-04-25T11:41:34.000Z
2019-12-27T10:43:40.000Z
tests/test_caching.py
AtilaSaraiva/devito
629181c89a43054b9710920e76af0eb14138c97c
[ "MIT" ]
78
2016-08-30T07:42:34.000Z
2019-12-13T20:34:45.000Z
from ctypes import byref, c_void_p import weakref import numpy as np import pytest from devito import (Grid, Function, TimeFunction, SparseFunction, SparseTimeFunction, ConditionalDimension, SubDimension, Constant, Operator, Eq, Dimension, DefaultDimension, _SymbolCache, clear_...
36.211321
90
0.596811
4f48626ac19168d4fab97edd1ec3c65e3f412a79
1,124
py
Python
src/odcprovider/constants.py
52North/pygeoapi-odc-provider
81d6b6aa35836a4b6efa634153557b6db667a099
[ "Apache-2.0" ]
5
2021-11-09T13:36:41.000Z
2022-02-11T15:54:27.000Z
src/odcprovider/constants.py
MartinPontius/pygeoapi-odc-provider
81d6b6aa35836a4b6efa634153557b6db667a099
[ "Apache-2.0" ]
5
2021-07-07T15:45:04.000Z
2021-09-08T13:04:05.000Z
src/odcprovider/constants.py
52North/pygeoapi-odc-provider
81d6b6aa35836a4b6efa634153557b6db667a099
[ "Apache-2.0" ]
1
2021-07-21T22:23:09.000Z
2021-07-21T22:23:09.000Z
# ================================================================= # Copyright (C) 2021-2021 52°North Spatial Information Research GmbH # # 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 # h...
37.466667
82
0.672598
d5e20bf27f2c4773e7cc28400446dc7b91e03aac
1,676
py
Python
{{cookiecutter.out_dir}}/src/{{cookiecutter.django_project_name}}/settings/dev.py
corpusops/cookiecutter-django
71df2fc679535554a503aed8c170db42c5a02b29
[ "BSD-3-Clause" ]
1
2020-11-30T08:21:17.000Z
2020-11-30T08:21:17.000Z
{{cookiecutter.out_dir}}/src/{{cookiecutter.django_project_name}}/settings/dev.py
corpusops/cookiecutter-django
71df2fc679535554a503aed8c170db42c5a02b29
[ "BSD-3-Clause" ]
4
2019-08-19T15:39:45.000Z
2021-02-16T10:20:28.000Z
{{cookiecutter.out_dir}}/src/{{cookiecutter.django_project_name}}/settings/dev.py
corpusops/cookiecutter-django
71df2fc679535554a503aed8c170db42c5a02b29
[ "BSD-3-Clause" ]
2
2019-08-19T14:52:06.000Z
2020-07-31T12:34:21.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging import os try: from django.utils import six except ImportError: import six from .base import * # noqa os.environ['RELATIVE_SETTINGS_MODULE'] = '.dev' INSTALLED_APPS += tuple([ # noqa {%- if cookiecutt...
25.784615
98
0.701074
4b174e8bd238f7beeda0c733c705f96991215ad0
1,199
py
Python
dynamic_linear_nets.py
Srujan35007/TensorFlow
1fdacd1b0190fd08e7946a15210bbc553e001fea
[ "MIT" ]
null
null
null
dynamic_linear_nets.py
Srujan35007/TensorFlow
1fdacd1b0190fd08e7946a15210bbc553e001fea
[ "MIT" ]
null
null
null
dynamic_linear_nets.py
Srujan35007/TensorFlow
1fdacd1b0190fd08e7946a15210bbc553e001fea
[ "MIT" ]
null
null
null
import time b = time.time() import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf from tensorflow.keras import layers, models, datasets a = time.time() print(f'Imports complete in {a-b} seconds') def get_flat_shape(foo_shape): prod = 1 for i in range(len(foo_shape)): prod = prod...
30.74359
72
0.761468
2307e329bbc9e0e7669f2a0a7640081c32809989
2,395
py
Python
mangaloid_instance/sync/utils.py
zhet1c/instance
301e28c47bb4d18b26329dea81b7f45705d18670
[ "MIT" ]
null
null
null
mangaloid_instance/sync/utils.py
zhet1c/instance
301e28c47bb4d18b26329dea81b7f45705d18670
[ "MIT" ]
null
null
null
mangaloid_instance/sync/utils.py
zhet1c/instance
301e28c47bb4d18b26329dea81b7f45705d18670
[ "MIT" ]
null
null
null
from json import dumps from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives.asymmetric import padding from base64 import b64encode, b64decode from asyncio im...
42.017544
99
0.749896
eb0831f7d6d54bb15d2aa59ba4d21808afbd62d5
4,606
py
Python
Lib/test/test_importlib/import_/test_packages.py
oleksandr-pavlyk/cpython
eb002dbe0da9622245a355db5f0cd5aa2fc70b40
[ "0BSD" ]
5
2021-12-03T23:11:53.000Z
2022-01-08T21:02:50.000Z
Lib/test/test_importlib/import_/test_packages.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
8
2022-01-07T11:31:11.000Z
2022-03-04T00:07:16.000Z
Lib/test/test_importlib/import_/test_packages.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
3
2017-10-18T09:35:14.000Z
2018-09-09T16:40:13.000Z
from test.test_importlib import util import sys import unittest from test import support from test.support import import_helper class ParentModuleTests: """Importing a submodule should import the parent modules.""" def test_import_parent(self): with util.mock_spec('pkg.__init__', 'pkg.module') as mo...
41.125
82
0.576639
75a06865c335831bfde26f0e43be77d0d61f7a3b
4,845
py
Python
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py_prev/trash/903_for_f704.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
1
2020-02-28T12:03:39.000Z
2020-02-28T12:03:39.000Z
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py_prev/trash/903_for_f704.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
null
null
null
Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py_prev/trash/903_for_f704.py
hehuanlin123/DeepLearning
6b7feabbbde9ac9489f76da4c06eeb6703fb165a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 28 22:20:21 2018 @author: Kazuki """ import gc, os from tqdm import tqdm import pandas as pd import sys sys.path.append(f'/home/{os.environ.get("USER")}/PythonLibrary') import lgbextension as ex import lightgbm as lgb from multiprocessing import cp...
32.086093
119
0.544272
b2238d16f3b3d4036d9a6a373e4d9f8995654082
5,172
py
Python
models/5-Deepflash2/Labels.py
cns-iu/HuBMAP---Hacking-the-Kidney
1a41c887f8edb0b52f5afade384a17dc3d3efec4
[ "MIT" ]
null
null
null
models/5-Deepflash2/Labels.py
cns-iu/HuBMAP---Hacking-the-Kidney
1a41c887f8edb0b52f5afade384a17dc3d3efec4
[ "MIT" ]
null
null
null
models/5-Deepflash2/Labels.py
cns-iu/HuBMAP---Hacking-the-Kidney
1a41c887f8edb0b52f5afade384a17dc3d3efec4
[ "MIT" ]
null
null
null
# <h1> HubMap - Hacking the Kidney </h1> # <h3> Goal - Mapping the human body at function tissue unit level - detect crypts FTUs in colon </h3> # # Implementation of Kaggle Notebook - Innovation Prize Winner - Deep Flash2 <br> # Description - Create segmentations masks from RLE and probability density function (PDF) f...
37.751825
160
0.671694
2855488f7315098aa90afd9884695e5338ec6899
1,940
py
Python
mac/google-cloud-sdk/lib/surface/dataproc/autoscaling_policies/delete.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
mac/google-cloud-sdk/lib/surface/dataproc/autoscaling_policies/delete.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
mac/google-cloud-sdk/lib/surface/dataproc/autoscaling_policies/delete.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 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...
32.881356
79
0.742268
db947203a27e69a6e56668dc63431f0e4f5599a2
5,639
py
Python
initialize.py
T-002/pyproject
06112f3f4b5c54d4789da3cb1eb007a33f00960b
[ "MIT" ]
null
null
null
initialize.py
T-002/pyproject
06112f3f4b5c54d4789da3cb1eb007a33f00960b
[ "MIT" ]
null
null
null
initialize.py
T-002/pyproject
06112f3f4b5c54d4789da3cb1eb007a33f00960b
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2016-2017 Christian Schwarz # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitat...
36.380645
100
0.679021
6b94256496fbe4578b3f7da35a7b64fddc31a658
493
py
Python
42.py
Bascil/python-data-structures-code-challenge
d3ec548b828746ec1dfab0236666be543d27c35c
[ "MIT" ]
null
null
null
42.py
Bascil/python-data-structures-code-challenge
d3ec548b828746ec1dfab0236666be543d27c35c
[ "MIT" ]
null
null
null
42.py
Bascil/python-data-structures-code-challenge
d3ec548b828746ec1dfab0236666be543d27c35c
[ "MIT" ]
null
null
null
# Classes - Vertex and Graph classes ''' Vertex class Has a constructor that sets the name of the vertex and creates a new empty set to store neighbours The add neighbour method adds the name of a neighbouring vertex to the neighbours set. This set automatically eliminates duplicates. If a neighbour is already created...
24.65
65
0.742394
e76ca647bed087802a782c174f2d9ccbe0445d5a
5,534
py
Python
jmetal/util/density_estimator.py
badchild0912/jMetalPy
46ec02d143e1db97d97cc6b5826136558cb382c1
[ "MIT" ]
null
null
null
jmetal/util/density_estimator.py
badchild0912/jMetalPy
46ec02d143e1db97d97cc6b5826136558cb382c1
[ "MIT" ]
null
null
null
jmetal/util/density_estimator.py
badchild0912/jMetalPy
46ec02d143e1db97d97cc6b5826136558cb382c1
[ "MIT" ]
null
null
null
import logging import numpy from abc import ABCMeta, abstractmethod from typing import TypeVar, List from functools import cmp_to_key from scipy.spatial.distance import euclidean from jmetal.util.solutions.comparator import SolutionAttributeComparator, Comparator LOGGER = logging.getLogger('jmetal') S = TypeVar('S'...
34.160494
108
0.606072
37fd0cc0f2537388644cfc17fa309b5d56f1ece5
556
py
Python
python-leetcode/100.py
MDGSF/interviews
9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76
[ "MIT" ]
12
2020-01-16T08:55:27.000Z
2021-12-02T14:52:39.000Z
python-leetcode/100.py
MDGSF/interviews
9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76
[ "MIT" ]
null
null
null
python-leetcode/100.py
MDGSF/interviews
9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76
[ "MIT" ]
1
2019-12-11T12:00:38.000Z
2019-12-11T12:00:38.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def isSameTree(self, p: TreeNode, q: TreeNode) -> bool: if p is None and q is None: return True elif p is not...
27.8
92
0.534173
fa49397c56fd2663d9742f9d402375d944661917
22,046
py
Python
tests/master/test_pypi.py
bennuttall/piwheels
4331b6491ea661f9bc387ee6c0802e623dff6fe4
[ "BSD-3-Clause" ]
100
2017-06-15T21:04:07.000Z
2019-07-10T09:21:41.000Z
tests/master/test_pypi.py
bennuttall/piwheels
4331b6491ea661f9bc387ee6c0802e623dff6fe4
[ "BSD-3-Clause" ]
172
2017-04-13T18:50:36.000Z
2019-07-13T11:38:41.000Z
tests/master/test_pypi.py
bennuttall/piwheels
4331b6491ea661f9bc387ee6c0802e623dff6fe4
[ "BSD-3-Clause" ]
12
2017-07-13T12:54:35.000Z
2019-03-02T12:28:45.000Z
# The piwheels project # Copyright (c) 2017 Ben Nuttall <https://github.com/bennuttall> # Copyright (c) 2017 Dave Jones <dave@waveform.org.uk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistribution...
41.054004
103
0.599383
91ab73d4ad4c5fbffceb1820e99aec81013fde36
10,256
py
Python
src/sentry/api/endpoints/organization_health.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
4
2019-05-27T13:55:07.000Z
2021-03-30T07:05:09.000Z
src/sentry/api/endpoints/organization_health.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
99
2019-05-20T14:16:33.000Z
2021-01-19T09:25:15.000Z
src/sentry/api/endpoints/organization_health.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
1
2020-08-10T07:55:40.000Z
2020-08-10T07:55:40.000Z
from __future__ import absolute_import import six from collections import namedtuple, defaultdict from datetime import timedelta from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from django.utils import timezone from sentry.api.bases import OrganizationEndpoint, Env...
33.298701
113
0.593799
50b4d8e6aca744c590e2a5e46c011c1b68bdcc93
14,839
py
Python
code/constituents_utils.py
nateGeorge/beat_market_analysis
6c54b4aba4049d4e4a12b2d064d5d5d537ad8520
[ "Apache-2.0" ]
null
null
null
code/constituents_utils.py
nateGeorge/beat_market_analysis
6c54b4aba4049d4e4a12b2d064d5d5d537ad8520
[ "Apache-2.0" ]
null
null
null
code/constituents_utils.py
nateGeorge/beat_market_analysis
6c54b4aba4049d4e4a12b2d064d5d5d537ad8520
[ "Apache-2.0" ]
null
null
null
import os import glob import datetime from collections import OrderedDict import pandas as pd import numpy as np import pandas_market_calendars as mcal import matplotlib.pyplot as plt FILEPATH = '/home/nate/Dropbox/data/sp600/' CONSTITUENT_FILEPATH = '/home/nate/Dropbox/data/barchart.com/' WRDS_FILEPATH = '/home/nat...
35.163507
140
0.617157
aa818db0e7e9f7b792ae5dfcd2b8fcd61ec69b7f
2,628
py
Python
src/utils.py
a-lucic/focus
26fba5f60c9f71a6b1287a4a557cd8316ad12527
[ "MIT" ]
12
2020-12-26T11:48:34.000Z
2022-02-27T07:28:10.000Z
src/utils.py
a-lucic/focus
26fba5f60c9f71a6b1287a4a557cd8316ad12527
[ "MIT" ]
2
2020-11-02T05:29:10.000Z
2021-01-04T21:10:07.000Z
src/utils.py
a-lucic/focus
26fba5f60c9f71a6b1287a4a557cd8316ad12527
[ "MIT" ]
4
2020-12-22T15:48:21.000Z
2021-06-28T08:50:42.000Z
import tensorflow as tf import numpy as np from tensorflow.losses import Reduction import os import errno def filter_hinge_loss(n_class, mask_vector, feat_input, sigma, temperature, model_fn): n_input = feat_input.shape[0] if not np.any(mask_vector): return np.zeros((n_input, n_class)) filtered_input = t...
27.375
106
0.714612
3b86c0864cb27f827ac86839e34da296d0342b92
58,706
py
Python
nova/virt/driver.py
zaina/nova
181358c172d606b23c9cc14b58d677d911013c02
[ "Apache-2.0" ]
null
null
null
nova/virt/driver.py
zaina/nova
181358c172d606b23c9cc14b58d677d911013c02
[ "Apache-2.0" ]
null
null
null
nova/virt/driver.py
zaina/nova
181358c172d606b23c9cc14b58d677d911013c02
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
40.320055
79
0.650053
a44f16f7d0b3af87d8c60d3cec76e42d02884bab
7,499
py
Python
pymatgen/analysis/structure_prediction/dopant_predictor.py
hpatel1567/pymatgen
8304b25464206c74305214e45935df90bab95500
[ "MIT" ]
2
2017-10-02T03:11:47.000Z
2018-12-02T12:56:12.000Z
pymatgen/analysis/structure_prediction/dopant_predictor.py
darnoceloc/pymatgen
5cc42912a12a265a603df7e34c856561f76edc1f
[ "MIT" ]
3
2017-07-18T01:13:41.000Z
2019-04-29T18:17:30.000Z
pymatgen/analysis/structure_prediction/dopant_predictor.py
darnoceloc/pymatgen
5cc42912a12a265a603df7e34c856561f76edc1f
[ "MIT" ]
2
2016-06-15T00:12:59.000Z
2018-12-02T12:56:47.000Z
import warnings import numpy as np from pymatgen.analysis.structure_prediction.substitution_probability import \ SubstitutionPredictor from pymatgen.core.periodic_table import Specie, Element def get_dopants_from_substitution_probabilities(structure, num_dopants=5, ...
40.101604
80
0.636352
10fe4b7ad0b3581fac8aa462c812dcaa2656f3df
1,271
py
Python
.history/Classiles/ice_cream_20210614181315.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
.history/Classiles/ice_cream_20210614181315.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
.history/Classiles/ice_cream_20210614181315.py
minefarmer/Coding101-OOP
d5655977559e3bd1acf6a4f185a6121cc3b05ce4
[ "Unlicense" ]
null
null
null
"""[Practice: Ice Cream] Class keyword class name class Ice: Instantiation variable class name name ("instance") ice = Ice() Method an action or behavior ==== to add a method, I simply define a function inside the class | method name is (eat) def eat(...
27.042553
107
0.578285
ef8287e4a2a88f22bcb6dbda7c5cd7f8f95e04fa
1,673
py
Python
cpo/commands/fyre/info/get_quick_burn_max_hours.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
7
2021-12-07T09:16:24.000Z
2022-03-08T12:38:54.000Z
cpo/commands/fyre/info/get_quick_burn_max_hours.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
3
2021-11-26T09:43:03.000Z
2021-12-14T08:04:53.000Z
cpo/commands/fyre/info/get_quick_burn_max_hours.py
IBM/cloud-pak-operations-cli
45ddcefb4302801c9a833d1359ea4d740c384556
[ "Apache-2.0" ]
1
2022-03-10T07:14:49.000Z
2022-03-10T07:14:49.000Z
# Copyright 2021 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 wri...
34.142857
118
0.768679
8c76c329e71fd547affa7ba27d5a273330991966
2,433
py
Python
vol2/vol2-python-examples/examples/example_crossover.py
Sun-Joong/aifh
1b6363d26f54b77348020ce88ced0670568ed736
[ "Apache-2.0" ]
777
2015-01-17T22:48:26.000Z
2022-03-31T01:10:07.000Z
vol2/vol2-python-examples/examples/example_crossover.py
Sun-Joong/aifh
1b6363d26f54b77348020ce88ced0670568ed736
[ "Apache-2.0" ]
17
2015-01-02T14:41:24.000Z
2017-09-02T02:57:09.000Z
vol2/vol2-python-examples/examples/example_crossover.py
Sun-Joong/aifh
1b6363d26f54b77348020ce88ced0670568ed736
[ "Apache-2.0" ]
445
2015-01-26T17:01:49.000Z
2022-03-24T07:16:58.000Z
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 2: Nature-Inspired Algorithms Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2014 by Jeff Heaton Licensed under the Apache License, Versi...
30.4125
112
0.633785
30401032ac9f894d9f8172bf845bf9bf99338c8c
1,628
py
Python
case/example/webdriver_savefile_test07.py
w718328952/webdriver_test
66d0ad70899981a9968717525b14a7dc239ef963
[ "Apache-2.0" ]
null
null
null
case/example/webdriver_savefile_test07.py
w718328952/webdriver_test
66d0ad70899981a9968717525b14a7dc239ef963
[ "Apache-2.0" ]
null
null
null
case/example/webdriver_savefile_test07.py
w718328952/webdriver_test
66d0ad70899981a9968717525b14a7dc239ef963
[ "Apache-2.0" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.keys import Keys from time import sleep # time。sleep()实现延时 # 火狐浏览器专用文件配置方法 profile = webdriver.FirefoxProfile() # 指定下载路径 profile.set_preference('browser.download.dir', 'd:\\') # 设置成 2 表示使用自定义下载路径;设置成 0 表示下载到桌面;设置成 1 表示下载到默认路径 profile.set_preference('browser...
40.7
83
0.789926
3ca01dc134a15a595c20114e53b9194f50a12e6c
1,478
py
Python
articles/models.py
varkon/eparhiaodua
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
2
2018-04-24T10:41:11.000Z
2018-04-24T10:41:15.000Z
articles/models.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
articles/models.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils import timezone from tinymce import models as tinymce_model from filebrowser.fields import FileBrowseField from eparhiapp.apps import transliterate # Create your models here. class Article(models.Model) : title = models.CharField(max_length = 255, verbose_name='Заголо...
36.04878
123
0.679296
a9df85b1cc2c4548e7e4c02f5e7bd9d2737f3455
3,356
py
Python
library/apt-upgrade-list.py
cmurphy/ardana-ansible
f3fb1573cfd6adff24c122c85ae877582a24ab55
[ "Apache-2.0" ]
4
2018-12-21T13:30:46.000Z
2020-04-06T10:39:18.000Z
library/apt-upgrade-list.py
cmurphy/ardana-ansible
f3fb1573cfd6adff24c122c85ae877582a24ab55
[ "Apache-2.0" ]
null
null
null
library/apt-upgrade-list.py
cmurphy/ardana-ansible
f3fb1573cfd6adff24c122c85ae877582a24ab55
[ "Apache-2.0" ]
8
2018-03-09T19:50:19.000Z
2019-08-13T09:49:44.000Z
#!/usr/bin/env python # # An Ansible module to query apt for the list of packages # available for update. # # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # (c) Copyright 2017 SUSE LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
31.074074
125
0.701132
2c77f791d430bf98e3c705ae313dc99d7d4c301e
1,307
py
Python
pytket_cirq/setup.py
Travis-S/pytket
ba1b63b5b22533d9366c431b91d69bf9cf77b0d7
[ "Apache-2.0" ]
null
null
null
pytket_cirq/setup.py
Travis-S/pytket
ba1b63b5b22533d9366c431b91d69bf9cf77b0d7
[ "Apache-2.0" ]
null
null
null
pytket_cirq/setup.py
Travis-S/pytket
ba1b63b5b22533d9366c431b91d69bf9cf77b0d7
[ "Apache-2.0" ]
null
null
null
import setuptools from setuptools import setup def find_pytket_subpackages(): locations = [('pytket', 'pytket')] pkg_list = [] for location, prefix in locations: pkg_list += list( map(lambda package_name: '{}.{}'.format(prefix, package_name), setuptools.find_packages(wh...
30.395349
93
0.609028
064e54a074da849bece5a11954121930000b807b
1,344
py
Python
Lista-05/exercicio-03.py
joaofelipecsantos/ser-347
cfaebf7dcba8366b8e8b922c8c7f7e4d270892b8
[ "MIT" ]
null
null
null
Lista-05/exercicio-03.py
joaofelipecsantos/ser-347
cfaebf7dcba8366b8e8b922c8c7f7e4d270892b8
[ "MIT" ]
null
null
null
Lista-05/exercicio-03.py
joaofelipecsantos/ser-347
cfaebf7dcba8366b8e8b922c8c7f7e4d270892b8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ SER-347 - Joao Felipe Lista-05 Exercício 03. Tomando como base os operadores disponíveis em Python documentation - String Methods, apresente as operações para converter os elementos da coluna string de entrada nos resultados apresentados na coluna string de saída. """ ...
24.436364
116
0.633185
02482ffbc3c39476658b620e20dfe02e03f977ad
4,170
py
Python
setup.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
191
2019-04-12T11:28:02.000Z
2022-03-13T16:05:31.000Z
setup.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
38
2019-04-23T16:47:50.000Z
2022-03-22T09:29:21.000Z
setup.py
ziodave/opentapioca
e4d5d41c1fdb199a49745c3efc2a02c6d74be315
[ "Apache-2.0" ]
26
2019-04-23T13:49:05.000Z
2022-02-10T07:43:15.000Z
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
36.26087
144
0.668345
2537bf7400f1054d01421fb8cd16307926b2c4df
2,716
py
Python
Birnn_Transformer/ncc/criterions/retrieval/triplet.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
71
2020-12-04T02:18:13.000Z
2022-03-30T15:19:50.000Z
Birnn_Transformer/ncc/criterions/retrieval/triplet.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
4
2021-03-10T17:48:50.000Z
2022-03-13T10:42:22.000Z
Birnn_Transformer/ncc/criterions/retrieval/triplet.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
11
2020-12-09T12:17:44.000Z
2022-03-30T09:02:13.000Z
# -*- coding: utf-8 -*- import math import torch.nn.functional as F from ncc.criterions import NccCriterion, register_criterion from ncc.data.constants import EPS from ncc.utils import utils from ncc.utils.logging import metrics @register_criterion('triplet') class TripletCriterion(NccCriterion): def __init__(...
38.8
99
0.661635
e97d6ebeb53cc0b1023600963f736c5c2b22ed6f
579
py
Python
pacote-Download/pythontestes/desafio037.py
FernandoFalcone-dev/exercicios-Python
a867cf5cd08ae7325f2f7916b4116b5f31fe83ef
[ "MIT" ]
null
null
null
pacote-Download/pythontestes/desafio037.py
FernandoFalcone-dev/exercicios-Python
a867cf5cd08ae7325f2f7916b4116b5f31fe83ef
[ "MIT" ]
null
null
null
pacote-Download/pythontestes/desafio037.py
FernandoFalcone-dev/exercicios-Python
a867cf5cd08ae7325f2f7916b4116b5f31fe83ef
[ "MIT" ]
null
null
null
num = int(input('Digite um número: ')) print('''Escolha uma das bases para conversão: [ 1 ] converter para \033[1;31mBINÁRIO\033[m [ 2 ] converter para \033[1;32mOCTAL\033[m [ 3 ] converter para \033[1;33mHEXADECIMAL\033[m''') escolha = int(input('Sua opção é: ')) if escolha == 1: print(f'{num} convertido para BINÁ...
38.6
72
0.663212
85f1ccf43946d110972b4e1943e2803363d749d5
3,670
py
Python
python/GafferSceneUI/FilteredSceneProcessorUI.py
cwmartin/gaffer
1f8a0f75522105c9d5efefac6d55cb61c1038909
[ "BSD-3-Clause" ]
null
null
null
python/GafferSceneUI/FilteredSceneProcessorUI.py
cwmartin/gaffer
1f8a0f75522105c9d5efefac6d55cb61c1038909
[ "BSD-3-Clause" ]
null
null
null
python/GafferSceneUI/FilteredSceneProcessorUI.py
cwmartin/gaffer
1f8a0f75522105c9d5efefac6d55cb61c1038909
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
39.042553
132
0.632698
1b2056d98311c91c13d5b48faed495f4a50c6d74
30,829
py
Python
agents/GFootball_with_Memory_Patterns_v47.py
sazas/football
a762fdedf7367ef08cb3a4c6b44713b93aa69d37
[ "Apache-2.0" ]
null
null
null
agents/GFootball_with_Memory_Patterns_v47.py
sazas/football
a762fdedf7367ef08cb3a4c6b44713b93aa69d37
[ "Apache-2.0" ]
null
null
null
agents/GFootball_with_Memory_Patterns_v47.py
sazas/football
a762fdedf7367ef08cb3a4c6b44713b93aa69d37
[ "Apache-2.0" ]
null
null
null
# start executing cells from here to rewrite submission.py from kaggle_environments.envs.football.helpers import * import math import random def find_patterns(obs, player_x, player_y): """ find list of appropriate patterns in groups of memory patterns """ for get_group in groups_of_memory_patterns: gr...
42.347527
120
0.63171
4481dc9ab16eaa9a759504f2f52023fe96dcab30
126
py
Python
python/code/docstrint.py
fishhello/learn
b87eaa9908e895a917c05c883a744533b38984cc
[ "MIT" ]
null
null
null
python/code/docstrint.py
fishhello/learn
b87eaa9908e895a917c05c883a744533b38984cc
[ "MIT" ]
null
null
null
python/code/docstrint.py
fishhello/learn
b87eaa9908e895a917c05c883a744533b38984cc
[ "MIT" ]
null
null
null
def add(x, y): """ 计算两个输入参数之和 :param x: int. :param y: int. :return: int,x 和 y之和 """ return x + y
14
24
0.460317
0865f6b32bd688b89e6c832866587822081fca82
1,665
py
Python
apps/accounts/admin.py
switzersc-usds/bluebutton-web-server
176b118fb3467fe6dc424f40bc117d814714d429
[ "Apache-2.0" ]
null
null
null
apps/accounts/admin.py
switzersc-usds/bluebutton-web-server
176b118fb3467fe6dc424f40bc117d814714d429
[ "Apache-2.0" ]
null
null
null
apps/accounts/admin.py
switzersc-usds/bluebutton-web-server
176b118fb3467fe6dc424f40bc117d814714d429
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from .models import ( ValidPasswordResetKey, UserProfile, ActivationKey, UserIdentificationLabel) admin.site.register(ActivationKey) admin.site.register(ValidPasswordResetKey) ...
27.75
74
0.6997
74bd83349961eb43ea7fcac9d1f84aa392773d13
231,686
py
Python
h2o-py/tests/pyunit_utils/utilsPY.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/pyunit_utils/utilsPY.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/pyunit_utils/utilsPY.py
JannisBush/h2o-3
30aa2a86e6bfa1febb5f95f3cb43811337895f7f
[ "Apache-2.0" ]
1
2021-09-09T03:47:11.000Z
2021-09-09T03:47:11.000Z
# Py2 compat from __future__ import print_function from future import standard_library standard_library.install_aliases() from past.builtins import basestring # standard lib import copy import datetime from decimal import * from functools import reduce import imp import json import math import os import random import ...
51.900986
194
0.659487
fd2736302d493bfef3216488385e0129dc44b446
3,669
py
Python
kuwala/pipelines/google-poi/src/pipeline/search_string_generator.py
arifluthfi16/kuwala
12fda181195acd06d369e05a976e7c9b917af0fd
[ "Apache-2.0" ]
null
null
null
kuwala/pipelines/google-poi/src/pipeline/search_string_generator.py
arifluthfi16/kuwala
12fda181195acd06d369e05a976e7c9b917af0fd
[ "Apache-2.0" ]
4
2021-11-30T15:44:58.000Z
2021-12-20T10:40:46.000Z
kuwala/pipelines/google-poi/src/pipeline/search_string_generator.py
arifluthfi16/kuwala
12fda181195acd06d369e05a976e7c9b917af0fd
[ "Apache-2.0" ]
1
2022-02-09T09:18:45.000Z
2022-02-09T09:18:45.000Z
import json import moment import os from geojson import Polygon from python_utils.src.h3_utils import polyfill_polygon from pyspark.sql import SparkSession from pyspark.sql.functions import array, array_contains, col, concat_ws, lit, udf from pyspark.sql.types import StringType from python_utils.src.spark_udfs import h...
45.8625
119
0.634233
fe4ae19dea405007a8472683506ce9e7c15c791a
5,764
py
Python
plugins/teedoc-plugin-jupyter-notebook-parser/teedoc_plugin_jupyter_notebook_parser/__init__.py
tyhdefu/teedoc
4a4b4f29e4db73a1d03365ce68b7594917f13fc6
[ "MIT" ]
null
null
null
plugins/teedoc-plugin-jupyter-notebook-parser/teedoc_plugin_jupyter_notebook_parser/__init__.py
tyhdefu/teedoc
4a4b4f29e4db73a1d03365ce68b7594917f13fc6
[ "MIT" ]
null
null
null
plugins/teedoc-plugin-jupyter-notebook-parser/teedoc_plugin_jupyter_notebook_parser/__init__.py
tyhdefu/teedoc
4a4b4f29e4db73a1d03365ce68b7594917f13fc6
[ "MIT" ]
null
null
null
import os, sys import re from collections import OrderedDict from datetime import datetime try: curr_path = os.path.dirname(os.path.abspath(__file__)) teedoc_project_path = os.path.abspath(os.path.join(curr_path, "..", "..", "..")) if os.path.basename(teedoc_project_path) == "teedoc": sys.path.inser...
37.921053
117
0.501214
50d1a83ac87a93488d61e1129daca6a4c2455731
115
py
Python
mmdet/version.py
nguyenquangduc2000/SKU110K-DenseDet
ba2027cb654d77867a65204a3ca83acefc7615ee
[ "Apache-2.0" ]
78
2020-07-17T09:56:12.000Z
2022-03-09T06:22:50.000Z
mmdet/version.py
nguyenquangduc2000/SKU110K-DenseDet
ba2027cb654d77867a65204a3ca83acefc7615ee
[ "Apache-2.0" ]
12
2020-10-21T13:05:46.000Z
2022-03-24T09:33:52.000Z
mmdet/version.py
nguyenquangduc2000/SKU110K-DenseDet
ba2027cb654d77867a65204a3ca83acefc7615ee
[ "Apache-2.0" ]
21
2020-08-16T13:21:42.000Z
2022-03-22T12:16:41.000Z
# GENERATED VERSION FILE # TIME: Fri Jul 3 10:58:01 2020 __version__ = '1.0rc1+fb983fe' short_version = '1.0rc1'
19.166667
32
0.713043
4e45ccf3ca2fdfaaa47b528d37bf71a67225c7ce
11,317
py
Python
task/grovertrainer.py
adamoyoung/grover
393afbd69482ed1fca3056fa0274626fab3ae789
[ "MIT" ]
155
2021-01-18T09:29:07.000Z
2022-03-30T20:50:15.000Z
task/grovertrainer.py
adamoyoung/grover
393afbd69482ed1fca3056fa0274626fab3ae789
[ "MIT" ]
13
2021-01-22T09:49:49.000Z
2022-03-07T12:25:18.000Z
task/grovertrainer.py
adamoyoung/grover
393afbd69482ed1fca3056fa0274626fab3ae789
[ "MIT" ]
38
2021-01-22T03:25:15.000Z
2022-03-09T02:45:24.000Z
""" The GROVER trainer. """ import os import time from logging import Logger from typing import List, Tuple from collections.abc import Callable import torch from torch.nn import Module from torch.utils.data import DataLoader from grover.model.models import GroverTask from grover.util.multi_gpu_wrapper import MultiGpu...
40.417857
118
0.596183
2325a7a4697dd349c33b99c59c43e630fb1581b7
20,530
py
Python
materials/code/python/planet_client.py
agroimpacts/nmeo
6cf657aa2e47223eff5b90ba175db14e03a07b43
[ "Apache-2.0" ]
null
null
null
materials/code/python/planet_client.py
agroimpacts/nmeo
6cf657aa2e47223eff5b90ba175db14e03a07b43
[ "Apache-2.0" ]
null
null
null
materials/code/python/planet_client.py
agroimpacts/nmeo
6cf657aa2e47223eff5b90ba175db14e03a07b43
[ "Apache-2.0" ]
1
2022-01-25T22:47:37.000Z
2022-01-25T22:47:37.000Z
from planet import api from planet.api import filters from geo_utils import GeoUtils from pprint import pprint from requests.auth import HTTPBasicAuth from fixed_thread_pool_executor import FixedThreadPoolExecutor import os import ssl import requests import time import urllib.request import shutil import boto3 from bo...
41.558704
131
0.602874
b9d5a48e01de306f7a57a1d019b6ff94c0ef3701
2,965
py
Python
examples/mnist/mnist_mlp_candle.py
vgutta/Benchmarks
f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf
[ "MIT" ]
51
2017-01-24T20:57:27.000Z
2022-02-15T00:33:45.000Z
examples/mnist/mnist_mlp_candle.py
vgutta/Benchmarks
f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf
[ "MIT" ]
59
2017-08-21T22:19:44.000Z
2021-11-01T16:05:35.000Z
examples/mnist/mnist_mlp_candle.py
vgutta/Benchmarks
f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf
[ "MIT" ]
90
2016-11-22T03:57:07.000Z
2022-01-11T04:43:23.000Z
# from tensorflow.keras.callbacks import CSVLogger from tensorflow.keras import backend as K import mnist import candle def initialize_parameters(): mnist_common = mnist.MNIST( mnist.file_path, 'mnist_params.txt', 'keras', prog='mnist_mlp', desc='MNIST example' ) ...
28.786408
68
0.609106
4f3daf9c48e96e2148c76b3072bd3ca82daeb14e
1,355
py
Python
app/core/tests/test_models.py
devmansurov/recipe-app-api
7adb702ae0b75981359d3f598742a1375eee7fde
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
devmansurov/recipe-app-api
7adb702ae0b75981359d3f598742a1375eee7fde
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
devmansurov/recipe-app-api
7adb702ae0b75981359d3f598742a1375eee7fde
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from django.test import TestCase from django.contrib.auth import get_user_model class ModelTest(TestCase): def test_create_user_with_email_successful(self): """Test creating a new user with an email is successful""" email = 'test@gmail.com' passw...
28.829787
69
0.635424
1b0279bb4fd9a9661da48a5261787f6c594fdc8a
4,066
py
Python
official/mnist/dataset.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
7
2018-04-29T03:54:00.000Z
2021-08-17T13:27:28.000Z
official/mnist/dataset.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
null
null
null
official/mnist/dataset.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
3
2018-10-23T01:46:50.000Z
2019-03-19T02:51:51.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.051724
80
0.686178
c328caacc8465f0095141c79008ed9f9f82e2122
3,948
py
Python
PyInquirer/prompts/editor.py
e3rd/PyInquirer
99a6d28d937c456526d93387fac706158f99775f
[ "MIT" ]
null
null
null
PyInquirer/prompts/editor.py
e3rd/PyInquirer
99a6d28d937c456526d93387fac706158f99775f
[ "MIT" ]
null
null
null
PyInquirer/prompts/editor.py
e3rd/PyInquirer
99a6d28d937c456526d93387fac706158f99775f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ `input` type question """ import os import sys from __future__ import print_function, unicode_literals from prompt_toolkit.token import Token from prompt_toolkit.shortcuts import create_prompt_application from prompt_toolkit.validation import Validator, ValidationError from prompt_toolkit.la...
29.909091
76
0.536221
cb1d42d54dff017d017d58ae2e983e58a574e1d8
794
py
Python
mail_multi_website/wizard/mail_compose_message.py
brain-tec/mail-addons
92efb62ad5c4d9843654ae3e49b120a8759ff2bf
[ "MIT" ]
null
null
null
mail_multi_website/wizard/mail_compose_message.py
brain-tec/mail-addons
92efb62ad5c4d9843654ae3e49b120a8759ff2bf
[ "MIT" ]
1
2019-03-15T14:45:46.000Z
2019-03-15T14:45:46.000Z
mail_multi_website/wizard/mail_compose_message.py
brain-tec/mail-addons
92efb62ad5c4d9843654ae3e49b120a8759ff2bf
[ "MIT" ]
1
2021-08-28T11:18:33.000Z
2021-08-28T11:18:33.000Z
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev> # License MIT (https://opensource.org/licenses/MIT). from odoo import api, models from odoo.http import request class MailComposer(models.TransientModel): _inherit = "mail.compose.message" @api.model def create(self, vals): ...
34.521739
83
0.639798
e854a95db23e8f335ecab2141cb6cb668d593f0a
1,870
py
Python
hl/hlist.py
DmitryOlshansky/hl
5f652ee16dbd3813ad997d860b2a0a60869d5d30
[ "MIT" ]
null
null
null
hl/hlist.py
DmitryOlshansky/hl
5f652ee16dbd3813ad997d860b2a0a60869d5d30
[ "MIT" ]
null
null
null
hl/hlist.py
DmitryOlshansky/hl
5f652ee16dbd3813ad997d860b2a0a60869d5d30
[ "MIT" ]
null
null
null
import json from hl import search def ensure(cond, err): if not cond: raise Exception(err) def check_host(h): ensure(type(h['host']) is str, "host name must be string") ensure(type(h['tags']) is list, "tags is a list") ensure(type(h['kv']) is dict, "key-value pairs is object") class HList(object): ...
28.769231
97
0.553476
2711ae5601ccf6278ba86408420b2431f45ea3ad
4,096
py
Python
src/modelling/LoNGAE/utils_gcn.py
1997alireza/Movie-Casting-Problems
df555e57401ec1b120d8e9d3c2d51b1d3a070f21
[ "MIT" ]
3
2021-04-20T06:02:34.000Z
2021-04-24T04:16:45.000Z
src/modelling/LoNGAE/utils_gcn.py
1997alireza/Movie-Casting-Problems
df555e57401ec1b120d8e9d3c2d51b1d3a070f21
[ "MIT" ]
null
null
null
src/modelling/LoNGAE/utils_gcn.py
1997alireza/Movie-Casting-Problems
df555e57401ec1b120d8e9d3c2d51b1d3a070f21
[ "MIT" ]
null
null
null
""" The MIT License Copyright (c) 2017 Thomas Kipf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
35.617391
84
0.664063
6c78b646b05fca7225c4bdd2844f7e13e0034b50
919
py
Python
first_app/views/unequip.py
CONSOLNY/rglk
bc3df20f32a29ecdd66534d4cd698c1601669bbd
[ "MIT" ]
null
null
null
first_app/views/unequip.py
CONSOLNY/rglk
bc3df20f32a29ecdd66534d4cd698c1601669bbd
[ "MIT" ]
1
2016-06-02T04:50:48.000Z
2017-02-06T03:16:27.000Z
first_app/views/unequip.py
CONSOLNY/rglk
bc3df20f32a29ecdd66534d4cd698c1601669bbd
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.utils.http import urlquote from django.utils.http import urlencode from django.http import HttpResponse from django.db.models import Max from math import sqrt from first_app.models import * from first_app.utils import * from first_app.views.draw_world import draw_world ...
34.037037
85
0.725789
4d46e1c65c380acb4123345dc4a12942b32d5ce3
6,733
py
Python
erdantic/base.py
adsharma/erdantic
722a98eda6c7f3f69189407a949d071467a2db97
[ "MIT" ]
null
null
null
erdantic/base.py
adsharma/erdantic
722a98eda6c7f3f69189407a949d071467a2db97
[ "MIT" ]
null
null
null
erdantic/base.py
adsharma/erdantic
722a98eda6c7f3f69189407a949d071467a2db97
[ "MIT" ]
null
null
null
import inspect from abc import ABC, abstractmethod from typing import Any, Callable, Dict, Generic, List, Type, TypeVar, Union from erdantic.etyping import Final, GenericAlias, repr_type, repr_type_with_mro _row_template = """<tr><td>{name}</td><td port="{name}">{type_name}</td></tr>""" FT = TypeVar("FT", bound=Any...
33.167488
98
0.643844
8d5f344c5c4f4bf52110ad4fd6e014af6edb2d68
1,277
py
Python
handlers/gcast.py
BROKENCOBRA/VOICE-CHAT-DIRECT-PLAY
f549495e8ad070636df29a6f80f4adffdd9fb036
[ "Apache-2.0" ]
null
null
null
handlers/gcast.py
BROKENCOBRA/VOICE-CHAT-DIRECT-PLAY
f549495e8ad070636df29a6f80f4adffdd9fb036
[ "Apache-2.0" ]
null
null
null
handlers/gcast.py
BROKENCOBRA/VOICE-CHAT-DIRECT-PLAY
f549495e8ad070636df29a6f80f4adffdd9fb036
[ "Apache-2.0" ]
null
null
null
import asyncio from pyrogram import Client, filters from pyrogram.types import Message from config import SUDO_USERS from callsmusic.callsmusic import client as USER @Client.on_message(filters.command(["broadcast"])) async def broadcast(_, message: Message): sent = 0 failed = 0 if message.from_user.id ...
33.605263
118
0.576351
0fdaf5f6da13800f3292a9594607cb058f70e077
2,958
py
Python
code_pack/geometry/obj_processor.py
DedaoLiu/Postprocessing-3D
e89822a1110f20f02b652d5a8a2ef4ec08697aac
[ "MIT" ]
null
null
null
code_pack/geometry/obj_processor.py
DedaoLiu/Postprocessing-3D
e89822a1110f20f02b652d5a8a2ef4ec08697aac
[ "MIT" ]
null
null
null
code_pack/geometry/obj_processor.py
DedaoLiu/Postprocessing-3D
e89822a1110f20f02b652d5a8a2ef4ec08697aac
[ "MIT" ]
1
2020-08-27T17:07:27.000Z
2020-08-27T17:07:27.000Z
from shutil import copyfile from math import ceil import numpy as np import time def vertex_on_surface(vertex,nodes,ap): """ This function tries to locate the vertex to its closest node. nodes is a list of coordinates: [[x0,y0,z0],[x1,y1,z1],[x2,y2,z2]] nodes is sorted in an ascending order. vertex...
30.494845
88
0.588911
72479158c4169991579fa9823273482c564c1e60
1,929
py
Python
assignment2.py
seraphinatarrant/edinburgh_coursework
4d2ddc10204d6605abf755df263c4821bd3344cc
[ "CC0-1.0" ]
null
null
null
assignment2.py
seraphinatarrant/edinburgh_coursework
4d2ddc10204d6605abf755df263c4821bd3344cc
[ "CC0-1.0" ]
null
null
null
assignment2.py
seraphinatarrant/edinburgh_coursework
4d2ddc10204d6605abf755df263c4821bd3344cc
[ "CC0-1.0" ]
null
null
null
import argparse import numpy as np import spacy from spacy.language import Language from spacy.pipeline import Pipe ### GLOBALS ### # Choices of combination function: average, sum, first, last, maxpool COMBINATION_FUNCTION = "average" class ContextualVectors(Pipe): def __init__(self, nlp): self._nlp = ...
29.676923
110
0.639191
4c3d911ece42b44ade148f99eb3aa2e58eb57f71
1,088
py
Python
cava/nightwatch/indent.py
arthurp/lapis2
1c0644cf1eeb2ddc5a735ca002d561e308ed6014
[ "BSD-2-Clause" ]
null
null
null
cava/nightwatch/indent.py
arthurp/lapis2
1c0644cf1eeb2ddc5a735ca002d561e308ed6014
[ "BSD-2-Clause" ]
null
null
null
cava/nightwatch/indent.py
arthurp/lapis2
1c0644cf1eeb2ddc5a735ca002d561e308ed6014
[ "BSD-2-Clause" ]
null
null
null
import subprocess _indent_options = ("-nbad -bap -bc -bbo -hnl -br -brs -c50 -cd50 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 " "-i4 -ip0 -l120 -nlp -npcs -nprs -psl -sai -saf -saw -ncs -nsc -sob -nfca -cp50 -ss " "-ts8 -il1 -cbi0 -nut".strip().split()) def indent_c(code): try: ...
40.296296
114
0.617647
133aad08134d7a9512553a9292d46e1c2d7253e7
260,797
py
Python
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/39.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/39.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int14000000000000001e/39.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 26581 passenger_arriving = ( (7, 9, 6, 6, 5, 3, 4, 0, 7, 0, 0, 2, 0, 10, 9, 1, 7, 8, 3, 1, 2, 1, 3, 2, 1, 0), # 0 (8, 10, 11, 8, 8, 2, 1, 1, 4, 1, 1, 1, 0, 5, 7, 3, 6, 5, 4, 4, 2, 1, 1, 1, 2, 0), # 1 (6, 7, 5, 8, 6, 4, 3, 3, 3, 1, 0, 0, 0, 13, 4, 3, 4, 3, 6, 3, 2, 4, 0, 0, 0, ...
278.927273
492
0.771761