hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ca55bcd797a3ff309a8bc97e580fff5cccac62c | 7,849 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/pbm.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/pbm.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_vmware/pbm.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 35.840183 | 79 | 0.658428 |
1ca5a8fbc21995ae17f88c8f64cae6e9dcc6f739 | 12,761 | py | Python | examples/gui/tk/simulator.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | examples/gui/tk/simulator.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | 1 | 2020-10-29T12:01:38.000Z | 2022-03-21T02:39:59.000Z | examples/gui/tk/simulator.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Note that this is not finished
"""
# --------------------------------------------------------------------------- #
# System
# --------------------------------------------------------------------------- #
import os
import getpass
import pickle
from threading import Thread
# ------------------... | 37.532353 | 87 | 0.470966 |
1ca5be529adad23ff5f68d50667d1130f813db8a | 549 | py | Python | leetcode/238.product-of-array-except-self.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/238.product-of-array-except-self.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | leetcode/238.product-of-array-except-self.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=238 lang=python3
#
# [238] Product of Array Except Self
#
# @lc code=start
class Solution:
def productExceptSelf(self, nums: List[int]) -> List[int]:
result = []
# 왼쪽 곱셈
point = 1
for i in range(len(nums)):
result.append(point)
point ... | 18.931034 | 62 | 0.493625 |
1ca5eb6740346b09d259a5bf54c6364541fd8bf7 | 2,080 | py | Python | unit_tests/__init__.py | gnuoy/charm-mistral | 2fc24d6c1d5cf500f90261fb66b5f42ea496f195 | [
"Apache-2.0"
] | 9 | 2017-03-24T10:01:30.000Z | 2019-01-28T21:53:48.000Z | unit_tests/__init__.py | openstack/charm-mistral | 2fc24d6c1d5cf500f90261fb66b5f42ea496f195 | [
"Apache-2.0"
] | null | null | null | unit_tests/__init__.py | openstack/charm-mistral | 2fc24d6c1d5cf500f90261fb66b5f42ea496f195 | [
"Apache-2.0"
] | 1 | 2019-02-13T13:53:57.000Z | 2019-02-13T13:53:57.000Z | # Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 45.217391 | 78 | 0.787019 |
1ca6012cb490a0f79ed70fa36d47ee6cd787decd | 1,315 | py | Python | signalfx_tracing/libraries/django_/apps.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/libraries/django_/apps.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | signalfx_tracing/libraries/django_/apps.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 SignalFx. All rights reserved.
from django.apps import AppConfig
from django.conf import settings
from .instrument import config, instrument
class SignalFxConfig(AppConfig):
name = 'signalfx_tracing'
verbose_name = 'SignalFx Tracing'
def ready(self):
if getattr(settings, 'S... | 45.344828 | 77 | 0.725475 |
1ca65c70b75c147d6506345c5b8f21794f70a0ad | 902 | py | Python | backend/model/migrate/versions/598eddeda2a_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | backend/model/migrate/versions/598eddeda2a_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | backend/model/migrate/versions/598eddeda2a_.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | """added 'limit' field for balance limit
Revision ID: 598eddeda2a
Revises: 4ac0506251e
Create Date: 2015-06-23 15:13:55.400557
"""
# revision identifiers, used by Alembic.
revision = '598eddeda2a'
down_revision = '4ac0506251e'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
d... | 18.408163 | 78 | 0.694013 |
1ca65dd4077dce0d0a2211c257e45511a66d38bf | 7,557 | py | Python | gen_data.py | bolianchen/pytorch_depth_from_videos_in_the_wild | 6f013154ba9f3a8de944c788a9370980e4c2b7c8 | [
"MIT"
] | 5 | 2022-02-25T04:38:16.000Z | 2022-03-28T17:38:03.000Z | gen_data.py | bolianchen/pytorch_depth_from_videos_in_the_wild | 6f013154ba9f3a8de944c788a9370980e4c2b7c8 | [
"MIT"
] | 5 | 2022-02-25T07:26:39.000Z | 2022-03-02T06:04:32.000Z | gen_data.py | bolianchen/pytorch_depth_from_videos_in_the_wild | 6f013154ba9f3a8de944c788a9370980e4c2b7c8 | [
"MIT"
] | null | null | null | # Copyright All Rights Reserved.
"""Generates data for training/validation and save it to disk."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import multiprocessing
import os
import yaml
from absl import app
from absl import flags
fro... | 34.665138 | 89 | 0.618499 |
1ca69067a9fa65b72bc6ba659e2063ae0cd3ada3 | 271 | py | Python | abc/129/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/129/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/129/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N = int(input())
W = list(map(int, input().split()))
ans = 1e7
for t in range(0, N):
left = 0
right = 0
for i, x in enumerate(W):
if i <= t:
left += x
else:
right += x
ans = min(ans, abs(left - right))
print(ans)
| 16.9375 | 37 | 0.461255 |
1ca706929082882aa395d4e6e6f054c4a648c08e | 6,239 | py | Python | model.py | LeianChen/GUI_new2 | 4bb97f982c86bc71caa12e03691b3448094e18b5 | [
"Apache-2.0"
] | null | null | null | model.py | LeianChen/GUI_new2 | 4bb97f982c86bc71caa12e03691b3448094e18b5 | [
"Apache-2.0"
] | null | null | null | model.py | LeianChen/GUI_new2 | 4bb97f982c86bc71caa12e03691b3448094e18b5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__version__ 1.0.0
Basic agent-based modelling. Builds agents into a 2D plane represented by a
raster environment. Scrapes some web data and use it to initialise the model.
Agents have methods of move, eat, and share. When running the model, a new
window will appear. Pl... | 27.364035 | 115 | 0.556499 |
1ca722f303585b1e88bf5f3170b44c7b8e821879 | 5,370 | py | Python | dataloaders/datasets/cityscapes.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | dataloaders/datasets/cityscapes.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | dataloaders/datasets/cityscapes.py | bmhopkinson/pytorch-deeplab-xception | f652206cfa07363018c1879de496da49358ba289 | [
"MIT"
] | null | null | null | import os
import numpy as np
import scipy.misc as m
from PIL import Image
from torch.utils import data
from myinfo import Path
from torchvision import transforms
from dataloaders import custom_transforms as tr
class CityscapesSegmentation(data.Dataset):
NUM_CLASSES = 19
def __init__(self, args, root=Path.db_r... | 36.530612 | 103 | 0.596834 |
1ca7258319dd412386a5c8e143821ea62d238e9a | 4,048 | py | Python | src/python/pants/base/revision.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/base/revision.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/base/revision.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import re
from functools import total_ordering
from itertools import zip_longest
@total_ordering
class Revision:
"""Represents a software revision that is comparable to another revisio... | 31.625 | 94 | 0.662796 |
1ca73a1c9adff6287780b71f80bf35800ca26844 | 1,497 | py | Python | docs/extract-toolkit-docs.py | gvalkov/guile-gmsl | a41ee76ec45530a5abf19cb7bcdd2910a78f2576 | [
"BSD-3-Clause"
] | 7 | 2017-08-18T10:58:41.000Z | 2020-05-19T09:18:03.000Z | docs/extract-toolkit-docs.py | gvalkov/gnu-make-toolkit | a41ee76ec45530a5abf19cb7bcdd2910a78f2576 | [
"BSD-3-Clause"
] | null | null | null | docs/extract-toolkit-docs.py | gvalkov/gnu-make-toolkit | a41ee76ec45530a5abf19cb7bcdd2910a78f2576 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import re
import sys
import json
import fileinput
import collections
def find_sections(lines):
'''Extract lines between '# ---+->' and '# ---+-<' markers.'''
section = []
in_section = False
for line in lines:
line = line.strip()
if line.startswith('# ---') and... | 24.95 | 66 | 0.556446 |
1ca78dd99dd07d046f12e7c9905bd9395c58e396 | 1,005 | py | Python | examples/sender.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/sender.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/sender.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import smtplib, time
# QQ邮箱
HOST = 'smtp.qq.com' # 服务器主机,相当于第三方客户端
PORT = '465' # 端口 使用SSL,端口号465或587
FROM = '发件人邮箱' # 发件人的邮箱账号,必须是本人可登录的.
TO = ['yuanjie@xiaomi.com', '邮箱账号二'] # 接收邮件的人的账号.可以是类表;也可以是用,连接的字符串 '邮箱账号1', '邮箱账号二'
SUBJECT = '这是一封测试邮件' # 邮件的标题
CONTENT = '这是一... | 30.454545 | 107 | 0.643781 |
1ca793afbed628f06b034f2b770057f5fc591964 | 4,108 | py | Python | setup.py | Lauszus/socketsocketcan | 107942701b36bb2141f499d9a44b6f9b45d403d6 | [
"MIT"
] | 2 | 2019-11-05T20:48:56.000Z | 2021-01-02T23:47:43.000Z | setup.py | Lauszus/socketsocketcan | 107942701b36bb2141f499d9a44b6f9b45d403d6 | [
"MIT"
] | null | null | null | setup.py | Lauszus/socketsocketcan | 107942701b36bb2141f499d9a44b6f9b45d403d6 | [
"MIT"
] | 1 | 2021-10-10T23:04:30.000Z | 2021-10-10T23:04:30.000Z | import glob
import os
import re
import sys
import setuptools
from setuptools.command.build_ext import build_ext
with open('socketsocketcan/__init__.py', 'r') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
with open('README.md', 'r') as fd:
long_descripti... | 31.121212 | 99 | 0.621227 |
1ca799b8c6f732468c111e0b14dc71db97c6b75b | 388 | py | Python | democracy_club/apps/everyelection/migrations/0002_auto_20160129_1737.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/everyelection/migrations/0002_auto_20160129_1737.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/everyelection/migrations/0002_auto_20160129_1737.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('everyelection', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='AuthorityElectionPositions',... | 20.421053 | 50 | 0.639175 |
1ca7ac626e0e49ef3ebe3ba7966ba8033c7ad33c | 779 | py | Python | tests.py | steinitzu/spotify-api | ab915c185c2f8b37e9716d49e0005e4176c08b1b | [
"MIT"
] | 11 | 2017-07-13T17:39:18.000Z | 2019-11-25T09:44:10.000Z | tests.py | steinitzu/spotify-api | ab915c185c2f8b37e9716d49e0005e4176c08b1b | [
"MIT"
] | 3 | 2017-08-15T20:44:14.000Z | 2019-08-19T05:58:01.000Z | tests.py | steinitzu/spotify-api | ab915c185c2f8b37e9716d49e0005e4176c08b1b | [
"MIT"
] | 3 | 2017-08-13T09:30:43.000Z | 2019-08-12T17:24:20.000Z | import os
import pytest
from spotify.auth import OAuth
from spotify.client import Client
CLIENT_ID = os.environ['SPOTAPI_CLIENT_ID']
CLIENT_SECRET = os.environ['SPOTAPI_CLIENT_SECRET']
REFRESH_TOKEN = os.environ['SPOTAPI_REFRESH_TOKEN']
FRANK_ZAPPA = '6ra4GIOgCZQZMOaUECftGN'
@pytest.fixture
def spotify_auth():
... | 22.257143 | 54 | 0.741977 |
1ca7be14768b98077de0211c1235a4d887d705f3 | 4,868 | py | Python | ThirdParty/AutobahnPython/autobahn/pbkdf2.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/AutobahnPython/autobahn/pbkdf2.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/AutobahnPython/autobahn/pbkdf2.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # -*- coding: utf-8 -*-
"""
pbkdf2
~~~~~~
This module implements pbkdf2 for Python. It also has some basic
tests that ensure that it works. The implementation is straightforward
and uses stdlib only stuff and can be easily be copy/pasted into
your favourite application.
Use this as repla... | 36.059259 | 78 | 0.64092 |
1ca7d2f9f39590acb6f9ac3e69ee8328171e1179 | 22,228 | py | Python | sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from urlli... | 37.931741 | 122 | 0.638294 |
1ca7de3aff1002422a6d84ba210dc1cadaa8b442 | 7,870 | py | Python | utility/messageFactory.py | sleinen/backend | 6df1a8f399586ce19aa04b85b92b2c73d2d1d7d8 | [
"Apache-2.0"
] | null | null | null | utility/messageFactory.py | sleinen/backend | 6df1a8f399586ce19aa04b85b92b2c73d2d1d7d8 | [
"Apache-2.0"
] | null | null | null | utility/messageFactory.py | sleinen/backend | 6df1a8f399586ce19aa04b85b92b2c73d2d1d7d8 | [
"Apache-2.0"
] | null | null | null | """
MessageFactory class that send a automated messages to
specified rooms or people.
"""
# Copyright 2018 Cisco and its affiliates
#
# 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
#
# htt... | 42.085561 | 88 | 0.629479 |
1ca7e5992f89699c1fc082713a468d3862c13077 | 564 | py | Python | users/models.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | 1 | 2021-09-24T04:32:35.000Z | 2021-09-24T04:32:35.000Z | users/models.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | null | null | null | users/models.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from PIL import Image
# Create your models here.
class Profile(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE)
image = models.ImageField(upload_to='profile/',default='default.jpg')
def __str__(self):
return self.u... | 25.636364 | 70 | 0.73227 |
1ca7e8dd15261657e20896b60c7d874ff61bae6d | 77 | py | Python | custom_components/hyperion_link/const.py | MichelGerding/Hyperion_link | c4d1f39dd961c8e0a59dce6a51593338564dee84 | [
"MIT"
] | null | null | null | custom_components/hyperion_link/const.py | MichelGerding/Hyperion_link | c4d1f39dd961c8e0a59dce6a51593338564dee84 | [
"MIT"
] | null | null | null | custom_components/hyperion_link/const.py | MichelGerding/Hyperion_link | c4d1f39dd961c8e0a59dce6a51593338564dee84 | [
"MIT"
] | null | null | null | """Constants for the hyperion_link integration."""
DOMAIN = "hyperion_link"
| 19.25 | 50 | 0.753247 |
1ca7e9f46ab28b5bbf76f92d78467ca7186d2d8d | 1,840 | py | Python | tests/test_divisible_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-07-13T00:34:41.000Z | 2021-07-13T00:34:41.000Z | tests/test_divisible_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | tests/test_divisible_pad.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 35.384615 | 93 | 0.683696 |
1ca7f32f721a8a901987b1acc60f0e760fc945d0 | 140 | py | Python | src/logml.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null | src/logml.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | 56 | 2019-09-10T19:00:38.000Z | 2022-02-10T00:35:57.000Z | src/logml.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from logml import *
# Main: Create a LogMl object and call it
if __name__ == "__main__":
ml = LogMl()
ml()
| 14 | 41 | 0.628571 |
1ca7f74a01f02e167ff2d2e124f122282a8596f9 | 891 | py | Python | src/compas_singular/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | 1 | 2021-04-19T15:09:21.000Z | 2021-04-19T15:09:21.000Z | src/compas_singular/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | src/compas_singular/__init__.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | """
********************************************************************************
compas_singular
********************************************************************************
.. currentmodule:: compas_singular
.. toctree::
:maxdepth: 1
compas_singular.algorithms
compas_singular.datastructures
... | 22.275 | 80 | 0.567901 |
1ca80128cdf7a19f0c1068af336029430f65afaf | 23,298 | py | Python | examples/FasterRCNN/train.py | YongyiTang92/tensorpack | fed46d9186450d9d3764231e5bdf0bbc4a173c15 | [
"Apache-2.0"
] | 1 | 2019-01-17T03:40:31.000Z | 2019-01-17T03:40:31.000Z | examples/FasterRCNN/train.py | yyht/tensorpack | 49675590da8a39c649b5f0f5ba522a22b90e2d69 | [
"Apache-2.0"
] | null | null | null | examples/FasterRCNN/train.py | yyht/tensorpack | 49675590da8a39c649b5f0f5ba522a22b90e2d69 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: train.py
import argparse
import itertools
import numpy as np
import os
import shutil
import cv2
import six
assert six.PY3, "FasterRCNN requires Python 3!"
import tensorflow as tf
import tqdm
import tensorpack.utils.viz as tpviz
from tensorpack import *
from tensor... | 45.06383 | 116 | 0.638081 |
1ca812c99c80209f469d6d315cc50b3093c57447 | 3,890 | py | Python | migrations/transactional/versions/42026ba5bc27_createdb.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | migrations/transactional/versions/42026ba5bc27_createdb.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | migrations/transactional/versions/42026ba5bc27_createdb.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | """createdb
Revision ID: 42026ba5bc27
Revises:
Create Date: 2017-06-22 20:07:58.548427
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '42026ba5bc27'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('entity_type'... | 40.103093 | 90 | 0.698972 |
1ca83e8dc322256dec04718d325857beccf415d8 | 600 | py | Python | archive/nexus-api-v2/Database/Utilities/Discord/Enumerations/User.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Utilities/Discord/Enumerations/User.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Utilities/Discord/Enumerations/User.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | """
...
"""
from . import *
class Type(Integer, Enumeration):
"""
...
"""
NONE: None
EMPLOYEE = 1 << 0
PARTNER = 1 << 1
HYPE_SQUAD_EVENTS = 1 << 2
BUG_HUNTER_LEVEL_1 = 1 << 3
HOUSE_BRAVERY = 1 << 6
HOUSE_BRILLIANCE = 1 << 7
HOUSE_BALANCE = 1 << 8
EARLY_SUPPORTER = 1 <<... | 17.142857 | 52 | 0.546667 |
1ca849c4f9aaba0495ad611b670b1234f87d3ba7 | 69,685 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/layout/coloraxis/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/layout/coloraxis/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/layout/coloraxis/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class ColorBar(_BaseLayoutHierarchyType):
# bgcolor
# -------
@property
def bgcolor(self):
"""
Sets the color of padded area.
The 'bgcolor' property is a color and ma... | 37.364611 | 102 | 0.571759 |
1ca856b706ccc447fa53927d0a535ba032d708e8 | 26,694 | py | Python | lib/roi_data_layer/minibatch.py | ivalab/affordanceNet_Novel | 8e51773dacaadae6bde3dce9fdd43ee28819218a | [
"BSD-2-Clause"
] | 3 | 2020-07-31T02:39:21.000Z | 2020-11-24T13:01:50.000Z | lib/roi_data_layer/minibatch.py | ivalab/affordanceNet_Context | 92a636412674b506b45c94a370412260c381756f | [
"BSD-2-Clause"
] | 1 | 2021-11-02T08:43:49.000Z | 2021-11-02T08:43:49.000Z | lib/roi_data_layer/minibatch.py | ivalab/affordanceNet_Context | 92a636412674b506b45c94a370412260c381756f | [
"BSD-2-Clause"
] | 1 | 2022-02-06T17:17:50.000Z | 2022-02-06T17:17:50.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Compute minibatch blobs for training a Fast R-CNN network."""
impor... | 45.167513 | 204 | 0.53379 |
1ca86b97d768fec3b177252dfb2f793f2a39af0b | 11,983 | py | Python | handcam/tensorflow/handcam/wrn_visualization.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | 1 | 2022-02-10T13:19:20.000Z | 2022-02-10T13:19:20.000Z | handcam/tensorflow/handcam/wrn_visualization.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | null | null | null | handcam/tensorflow/handcam/wrn_visualization.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | null | null | null | from handcam.ltt.util.TFTools import (
_DatasetInitializerHook,
shuffle_dataset,
per_sequence_standardization,
per_sequence_standardization_rgbd,
)
import tensorflow as tf
import glob
import sys
import numpy as np
import six
import os
import pickle
import datetime
from handcam.ltt.network.model.Wide_Res... | 31.954667 | 172 | 0.655262 |
1ca871a299516f6a260aa359334d951452069308 | 2,555 | py | Python | src/w2v.py | 9meo/Thai-Clickbait | b4d98b2b58545fa4b031aad993fb9150493f729b | [
"MIT"
] | 3 | 2019-09-15T01:08:48.000Z | 2021-11-26T11:04:11.000Z | src/w2v.py | 9meo/Thai-Clickbait | b4d98b2b58545fa4b031aad993fb9150493f729b | [
"MIT"
] | null | null | null | src/w2v.py | 9meo/Thai-Clickbait | b4d98b2b58545fa4b031aad993fb9150493f729b | [
"MIT"
] | null | null | null | from __future__ import print_function
from gensim.models import word2vec
from os.path import join, exists, split
import os
import numpy as np
def train_word2vec(sentence_matrix, vocabulary_inv,
num_features=300, min_word_count=1, context=10 , seg='seg_lextoplus'):
"""
Trains, saves, loads W... | 41.209677 | 110 | 0.640705 |
1ca891e6c05c37b74742030ac80d72a178e11f3e | 27,518 | py | Python | lib/spack/spack/compilers/__init__.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | lib/spack/spack/compilers/__init__.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/compilers/__init__.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""This module contains functions related to finding compilers on the
system and configuring Spack to use multiple compile... | 36.160315 | 79 | 0.664401 |
1ca8cbda7ba9419fc239afa953eac8a280ff4fa7 | 2,674 | py | Python | empower/cli/projects_commands/create_project.py | agottipati9/empower-runtime | 9aedede85a96e61ba23dce2fd9523999ad6226ab | [
"Apache-2.0"
] | null | null | null | empower/cli/projects_commands/create_project.py | agottipati9/empower-runtime | 9aedede85a96e61ba23dce2fd9523999ad6226ab | [
"Apache-2.0"
] | null | null | null | empower/cli/projects_commands/create_project.py | agottipati9/empower-runtime | 9aedede85a96e61ba23dce2fd9523999ad6226ab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
#
# 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,
# sof... | 28.446809 | 73 | 0.61107 |
1ca8ef9ecdd60c6e6e08cea40bfd24d9970761b3 | 5,685 | py | Python | opentracing_instrumentation/request_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | null | null | null | opentracing_instrumentation/request_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | null | null | null | opentracing_instrumentation/request_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | 1 | 2022-03-01T02:09:57.000Z | 2022-03-01T02:09:57.000Z | # Copyright (c) 2015 Uber Technologies, Inc.
#
# 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, publ... | 35.754717 | 79 | 0.700967 |
1ca8f2a3645e4a46d28bc0c7b3dffbeae1665ee4 | 45,117 | py | Python | tf2onnx/optimizer/transpose_optimizer.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1 | 2022-03-28T06:21:16.000Z | 2022-03-28T06:21:16.000Z | tf2onnx/optimizer/transpose_optimizer.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | null | null | null | tf2onnx/optimizer/transpose_optimizer.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
"""Transpose Optimizer."""
from collections import defaultdict
import numpy as np
import onnx
from tf2onnx.constants import NCHW_TO_NHWC, NHWC_TO_NCHW, NCDHW_TO_NDHWC, NDHWC_TO_NCDHW, TARGET_CHANNELS_LAST
from .. import utils
from .optimizer_base import GraphOptimizerBase
# p... | 46.704969 | 118 | 0.607842 |
1ca92a622360065cbfbe882fa7f9f8ed2e3e196d | 523 | py | Python | imageWarper.py | andreysay/CarND-Advanced-Lane-Lines | 57810c305ae0f89d4a8322f1a23c0f04c0c10a57 | [
"MIT"
] | null | null | null | imageWarper.py | andreysay/CarND-Advanced-Lane-Lines | 57810c305ae0f89d4a8322f1a23c0f04c0c10a57 | [
"MIT"
] | null | null | null | imageWarper.py | andreysay/CarND-Advanced-Lane-Lines | 57810c305ae0f89d4a8322f1a23c0f04c0c10a57 | [
"MIT"
] | null | null | null | import cv2
def warper(img, src, dst):
# Compute and apply perpective transform
img_size = (img.shape[1], img.shape[0])
# use cv2.getPerspectiveTransform() to get M, the transform matrix, and invM, the inverse
M = cv2.getPerspectiveTransform(src, dst)
invM = cv2.getPerspectiveTransform(dst, src)
... | 40.230769 | 107 | 0.713193 |
1ca92a8b34e75cec1dc4723a56eedc362b8aaacc | 11,775 | py | Python | examples/ommhelper/force.py | z-gong/openmm-velocityVerlet | 87783cdec2eb64cf0811707ebd97be656e23ab34 | [
"Unlicense"
] | 5 | 2021-04-02T06:08:57.000Z | 2022-02-13T17:37:28.000Z | examples/ommhelper/force.py | z-gong/openmm-velocityVerlet | 87783cdec2eb64cf0811707ebd97be656e23ab34 | [
"Unlicense"
] | 5 | 2021-05-12T07:34:24.000Z | 2022-03-21T14:49:59.000Z | protex/scripts/ommhelper/force.py | wiederm/protex | 7fb945dcee138705e28465f4657678185ed97cb8 | [
"MIT"
] | 1 | 2021-12-09T16:18:13.000Z | 2021-12-09T16:18:13.000Z | import simtk.openmm as mm
from .util import CONST
from .unit import *
def slab_correction(system):
'''
Apply Yeh's long range coulomb correction for slab geometry in z direction
to eliminate the undesired interactions between periodic slabs.
It's useful for 2-D systems simulated under 3-D periodic co... | 33.739255 | 119 | 0.621996 |
1ca9330b4c791277d74797c8d79fded86e8084ae | 37,597 | py | Python | lib/models/cell_searchs/nb101/optimizers/darts/train_search_no_higher.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | lib/models/cell_searchs/nb101/optimizers/darts/train_search_no_higher.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | lib/models/cell_searchs/nb101/optimizers/darts/train_search_no_higher.py | Mirofil/AutoDL-Projects | e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893 | [
"MIT"
] | null | null | null | # python ./lib/models/cell_searchs/nb101/optimizers/darts/train_search_no_higher.py --seed=90 --mode=reptile --inner_steps=4 --inner_steps_same_batch=True
import argparse
import glob
import json
import logging
import os
import pickle
import sys
import time
import numpy as np
import torch
import torch.backends.cudnn a... | 49.996011 | 258 | 0.642525 |
1ca950d9e719e3e902a7a5ac176b54f18f6bc294 | 12,008 | py | Python | otp/login/TTAccount.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | otp/login/TTAccount.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | otp/login/TTAccount.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToonPythonUtil as PythonUtil
from otp.otpbase import OTPLocalizer
from otp.login import HTTPUtil
from otp.login import RemoteValueSet
import copy
accountServer = ''
accoun... | 42.885714 | 284 | 0.628248 |
1ca9641c8d90b06819311004488c601d5db12210 | 3,200 | py | Python | test/functional/rpc_signmessage.py | luisriverag/namecoin-core | f2c234926bdb151338732df7ace37a105c14e776 | [
"MIT"
] | 2 | 2021-06-04T10:39:59.000Z | 2021-06-16T00:03:57.000Z | test/functional/rpc_signmessage.py | Penny-Admixture/namecoin-core | c750aba537f6d10a3a565814f53f4999577142ab | [
"MIT"
] | 1 | 2021-09-06T21:01:56.000Z | 2021-09-15T21:05:19.000Z | test/functional/rpc_signmessage.py | Penny-Admixture/namecoin-core | c750aba537f6d10a3a565814f53f4999577142ab | [
"MIT"
] | 1 | 2021-05-21T19:55:53.000Z | 2021-05-21T19:55:53.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC commands for signing and verifying messages."""
from test_framework.test_framework import Bit... | 50.793651 | 148 | 0.717188 |
1ca98853fe781c4f7172310d7540b217b4281337 | 13,577 | py | Python | google/cloud/vision_v1p3beta1/services/image_annotator/async_client.py | glaswasser/python-vision | 706c314a86b8f35c313bb3e907ae84317dca1a0b | [
"Apache-2.0"
] | 3 | 2021-03-29T19:21:08.000Z | 2021-12-31T09:30:11.000Z | google/cloud/vision_v1p3beta1/services/image_annotator/async_client.py | glaswasser/python-vision | 706c314a86b8f35c313bb3e907ae84317dca1a0b | [
"Apache-2.0"
] | 3 | 2021-09-08T03:19:56.000Z | 2022-03-12T00:58:03.000Z | google/cloud/vision_v1p3beta1/services/image_annotator/async_client.py | baronrustamov/python-vision | 236a5676459abaa3f0b7d991977dc712259a3176 | [
"Apache-2.0"
] | 1 | 2021-03-30T05:02:53.000Z | 2021-03-30T05:02:53.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 o... | 41.519878 | 103 | 0.674376 |
1ca9892bf3d5f0277644933aece66e993d278a5f | 4,521 | py | Python | dash_bio/Pileup.py | brybackGMet/dash-bio | 31cc7828e26094c4c49b08374dc515ef25637834 | [
"MIT"
] | 1 | 2022-01-14T19:44:57.000Z | 2022-01-14T19:44:57.000Z | dash_bio/Pileup.py | apblair/dash-bio | aab01c520460e69eda29e07c97c3a9f9aef61f60 | [
"MIT"
] | null | null | null | dash_bio/Pileup.py | apblair/dash-bio | aab01c520460e69eda29e07c97c3a9f9aef61f60 | [
"MIT"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Pileup(Component):
"""A Pileup component.
The Pileup component is a genome visualization component
developed by the the Hammerlab. It uses an
example integration of pileup.js and React (https://www.... | 38.974138 | 236 | 0.657155 |
1ca9cdcd1e131f4703e65c19f01198215cbf331c | 179 | py | Python | server/apis/routes/protected_urls.py | Aradhya-Tripathi/free-watch | c3353c0eec8d545372f22d6ac437ed71c1940f70 | [
"MIT"
] | 5 | 2021-10-09T09:36:12.000Z | 2021-12-14T17:03:31.000Z | server/apis/routes/protected_urls.py | Aradhya-Tripathi/fire-watch | c3353c0eec8d545372f22d6ac437ed71c1940f70 | [
"MIT"
] | 8 | 2022-02-21T19:01:49.000Z | 2022-03-05T20:43:05.000Z | server/apis/routes/protected_urls.py | Aradhya-Tripathi/free-watch | c3353c0eec8d545372f22d6ac437ed71c1940f70 | [
"MIT"
] | 1 | 2021-12-17T09:12:49.000Z | 2021-12-17T09:12:49.000Z | from apis.views import protected_views
from apis.routes import path
urlpatterns = [
path("me", protected_views.me),
path("details", protected_views.UserAPI.as_view()),
]
| 22.375 | 55 | 0.73743 |
1ca9e17c153d16686e2f3020885908c15e927d8e | 5,140 | py | Python | invenio_explicit_acls/acls/propertyvalue_acls.py | oarepo/invenio-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | null | null | null | invenio_explicit_acls/acls/propertyvalue_acls.py | oarepo/invenio-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | 7 | 2019-05-08T08:35:01.000Z | 2021-06-25T15:21:34.000Z | invenio_explicit_acls/acls/propertyvalue_acls.py | oarepo/invenio-explicit-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | 2 | 2019-03-31T19:07:30.000Z | 2019-05-06T08:11:45.000Z | #
# Copyright (c) 2019 UCT Prague.
#
# propertyvalue_acls.py is part of Invenio Explicit ACLs
# (see https://github.com/oarepo/invenio-explicit-acls).
#
# 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 ... | 36.197183 | 118 | 0.678016 |
1ca9e3045ec5033c644be0139496c81738040436 | 1,063 | py | Python | supriya/ugens/TIRand.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/TIRand.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/TIRand.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate
from supriya.synthdefs import UGen
class TIRand(UGen):
"""
A triggered integer random number generator.
::
>>> trigger = supriya.ugens.Impulse.ar()
>>> t_i_rand = supriya.ugens.TIRand.ar(
... minimum=0,
... m... | 23.108696 | 81 | 0.578551 |
1ca9ecbf438a5c4324ce4a72d64c9ca8b04baa04 | 5,244 | py | Python | test/functional/mempool_persist.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 63 | 2017-07-25T21:57:21.000Z | 2022-02-05T02:58:03.000Z | test/functional/mempool_persist.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 105 | 2017-09-04T00:52:17.000Z | 2021-05-22T13:58:37.000Z | test/functional/mempool_persist.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 62 | 2017-08-04T19:48:40.000Z | 2021-07-07T12:21:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool persistence.
By default, biblepayd will dump mempool on shutdown and
then reload it on st... | 45.206897 | 207 | 0.69775 |
1ca9f2512a4a578e2d7f6daa5ea8b6234c146323 | 5,648 | py | Python | tests/test_iam/test_iam_groups.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | tests/test_iam/test_iam_groups.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | tests/test_iam/test_iam_groups.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | from __future__ import unicode_literals
from datetime import datetime
import boto
import boto3
import sure # noqa
from nose.tools import assert_raises
from boto.exception import BotoServerError
from moto import mock_iam, mock_iam_deprecated
MOCK_POLICY = """
{
"Version": "2012-10-17",
"Statement":
{
... | 33.619048 | 132 | 0.709101 |
1caa114b9aaa39f458a6182f66ff2a6fdfc11c3e | 1,845 | py | Python | test/unit/webdriver/device/network_test.py | Jonahss/python-client | 6e4ae308f98653966b96294f779a9df061d0d56b | [
"Apache-2.0"
] | 1 | 2019-05-01T11:05:43.000Z | 2019-05-01T11:05:43.000Z | test/unit/webdriver/device/network_test.py | Jonahss/python-client | 6e4ae308f98653966b96294f779a9df061d0d56b | [
"Apache-2.0"
] | null | null | null | test/unit/webdriver/device/network_test.py | Jonahss/python-client | 6e4ae308f98653966b96294f779a9df061d0d56b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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, software... | 30.75 | 76 | 0.686721 |
1caa6d4c5350402cebd54687387a365e009c3bbd | 647 | py | Python | py/resolution/config/config.py | AntonBankevich/LJA | 979d7929bf0b39fd142ec6465dc0c17814465ef9 | [
"BSD-3-Clause"
] | 53 | 2021-10-10T22:16:27.000Z | 2022-03-23T06:21:06.000Z | py/resolution/config/config.py | AntonBankevich/LJA | 979d7929bf0b39fd142ec6465dc0c17814465ef9 | [
"BSD-3-Clause"
] | 20 | 2021-05-10T07:44:24.000Z | 2022-03-24T13:23:58.000Z | py/resolution/config/config.py | AntonBankevich/DR | 73450ad3b25f90a3c7747aaf17fe60d13d9692d3 | [
"BSD-3-Clause"
] | 6 | 2022-01-27T01:45:56.000Z | 2022-03-18T04:23:33.000Z | import os
from shutil import copyfile
import yaml
from utils.os_utils import expandpath
this_dirname = os.path.dirname(os.path.realpath(__file__))
config_fn = os.path.join(this_dirname, 'config.yaml')
root_dir = os.path.join(this_dirname, os.path.pardir, os.path.pardir)
def get_config():
with open(config_fn) as... | 23.962963 | 69 | 0.697063 |
1caa6f5f8d520d58c1d640fda1b6dd502c04dd30 | 989 | py | Python | pygcvs/helpers.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | pygcvs/helpers.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | pygcvs/helpers.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | from .parser import GcvsParser
try:
import ephem
except ImportError: # pragma: no cover
ephem = None
def read_gcvs(filename):
"""
Reads variable star data in `GCVS format`_.
:param filename: path to GCVS data file (usually ``iii.dat``)
.. _`GCVS format`: http://www.sai.msu.su/gcvs/gcvs/iii... | 26.72973 | 89 | 0.646107 |
1caa78b44495c9f594b2ba1c8b0114de3b1a35b6 | 3,349 | py | Python | ucb_cs61A/projects/maps/abstractions.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | null | null | null | ucb_cs61A/projects/maps/abstractions.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2017-07-31T08:15:26.000Z | 2017-07-31T08:15:26.000Z | ucb_cs61A/projects/maps/abstractions.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2019-10-06T16:52:31.000Z | 2019-10-06T16:52:31.000Z | """Data Abstractions"""
from utils import mean
#############################
# Phase 1: Data Abstraction #
#############################
# Reviews
def make_review(restaurant_name, rating):
"""Return a review data abstraction."""
return [restaurant_name, rating]
def review_restaurant_name(review):
"""R... | 28.87069 | 78 | 0.678411 |
1caa7b4632fb9c71bca0210e464684af9a061abb | 1,408 | py | Python | setup.py | bowang-lab/Transformer-GCN-QA | 7b0a5f5a005ebaae75796c200035f7e6ce175971 | [
"MIT"
] | 11 | 2019-08-30T07:39:55.000Z | 2022-03-24T09:29:35.000Z | setup.py | berc-uoft/Transformer-GCN-QA | 7b0a5f5a005ebaae75796c200035f7e6ce175971 | [
"MIT"
] | 27 | 2019-04-19T14:59:09.000Z | 2019-06-18T15:51:51.000Z | setup.py | bowang-lab/Transformer-GCN-QA | 7b0a5f5a005ebaae75796c200035f7e6ce175971 | [
"MIT"
] | 1 | 2019-04-19T19:20:23.000Z | 2019-04-19T19:20:23.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="TransformerGCNQA",
version="0.1.0",
author="John Giorgi",
author_email="johnmgiorgi@gmail.com",
license="MIT",
description="End-to-end neural question answering achitecture based on tr... | 29.333333 | 99 | 0.605824 |
1caaa79685649df41865169e49ad903c14174dcc | 4,488 | py | Python | tests/integration/basket/model_tests.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/basket/model_tests.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/basket/model_tests.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal as D
from django.test import TestCase
from oscar.apps.basket.models import Basket
from oscar.apps.partner import strategy
from oscar.test import factories
from oscar.apps.catalogue.models import Option
class TestAddingAProductToABasket(TestCase):
def setUp(self):
self.basket... | 35.619048 | 93 | 0.694296 |
1caab9b1a83d43f4db7e674e45777832540afbe3 | 56,653 | py | Python | pyxtal_ml/descriptors/gaussian.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 11 | 2018-11-18T21:57:16.000Z | 2021-07-20T12:23:28.000Z | pyxtal_ml/descriptors/gaussian.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 34 | 2018-10-23T14:54:48.000Z | 2019-03-26T18:07:09.000Z | pyxtal_ml/descriptors/gaussian.py | qzhu2017/ML-Materials | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 3 | 2018-11-15T06:34:37.000Z | 2019-01-04T02:04:25.000Z | import numpy as np
import itertools
################################ Gaussian Class ###############################
class Gaussian:
"""
Get the all the desired symmetry functions.
Parameters
----------
crystal: object
Pymatgen crystal structure object.
symmetry_parameters: dict
... | 35.014215 | 80 | 0.454045 |
1caac3616c839782864508345fa9b731f56e2d0e | 8,590 | py | Python | rock4/softtest/pc/uiwpf/TestDriver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 5 | 2018-09-25T05:49:49.000Z | 2021-12-30T11:06:09.000Z | rock4/softtest/pc/uiwpf/TestDriver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 3 | 2018-04-01T04:27:21.000Z | 2019-01-03T11:02:33.000Z | rock4/softtest/pc/uiwpf/TestDriver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 7 | 2018-09-25T05:49:51.000Z | 2021-12-30T11:06:11.000Z | # -*- encoding: utf-8 -*-
'''
Current module: rock4.softtest.pc.uiwpf.TestDriver
Rough version history:
v1.0 Original version to use
********************************************************************
@AUTHOR: Administrator-Bruce Luo(罗科峰)
MAIL: lkf20031988@163.com
RCS: rock4.softtes... | 38.520179 | 263 | 0.523516 |
1caae1557435129c5428ec1eec0f8cb0a80d3a58 | 10,407 | py | Python | sphinxcontrib/confluencebuilder/assets.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | sphinxcontrib/confluencebuilder/assets.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | sphinxcontrib/confluencebuilder/assets.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2018-2020 Sphinx Confluence Builder Contributors (AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
from .std.confluence import INVALID_CHARS
from .util import ConfluenceUtil
from docutils import nodes
from sphinx import addnodes
from sphinx.util.images import guess_mimety... | 37.570397 | 80 | 0.595465 |
1cab06934ea23e29f3162501a5ff0711e0c28bdd | 2,454 | py | Python | solve_sudoku.py | lsubotic/image-to-sudoku-solver | e65ce2592d6f47aa1feeaa8977a2fc5c8838237f | [
"MIT"
] | 1 | 2022-03-21T14:18:10.000Z | 2022-03-21T14:18:10.000Z | solve_sudoku.py | lsubotic/image-to-sudoku-solver | e65ce2592d6f47aa1feeaa8977a2fc5c8838237f | [
"MIT"
] | null | null | null | solve_sudoku.py | lsubotic/image-to-sudoku-solver | e65ce2592d6f47aa1feeaa8977a2fc5c8838237f | [
"MIT"
] | null | null | null | from termcolor import colored
import numpy as np
# Other
from recognize_numbers import form_sudoku_grid
def find_empty(grid):
"""
Find an empty square in the grid and returns its position, if no empty squares are found return None
"""
for i in range(9):
for j in range(9):
... | 23.596154 | 105 | 0.513855 |
1cab416e068e3626901d7a320f6826bbf7d7d6af | 1,785 | py | Python | dense_layer.py | tiredamage42/WikiCrawler | 264d3511dec20bcf9c633315d3d6c93aa64cbe5c | [
"MIT"
] | 1 | 2021-02-14T19:49:39.000Z | 2021-02-14T19:49:39.000Z | dense_layer.py | tiredamage42/WikiCrawler | 264d3511dec20bcf9c633315d3d6c93aa64cbe5c | [
"MIT"
] | null | null | null | dense_layer.py | tiredamage42/WikiCrawler | 264d3511dec20bcf9c633315d3d6c93aa64cbe5c | [
"MIT"
] | null | null | null | import tensorflow.compat.v1 as tf
import graph_utils
tf.disable_v2_behavior()
'''
fully connected dense layer
'''
class DenseLayer():
def __init__(self, layer_name, features):
self.is_built = False
self.layer_name = layer_name
self.features = features
def __call__(self, in_tensor):
... | 35.7 | 105 | 0.552941 |
1cab49435217ce215caa257915150ff568e9137d | 15,669 | py | Python | fastai/gen_doc/nbdoc.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | null | null | null | fastai/gen_doc/nbdoc.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | null | null | null | fastai/gen_doc/nbdoc.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | null | null | null | "`gen_doc.nbdoc` generates notebook documentation from module functions and links to correct places"
import inspect,importlib,enum,os,re
from IPython.core.display import display, Markdown, HTML
from nbconvert import HTMLExporter
from IPython.core import page
from IPython import get_ipython
from typing import Dict, Any... | 46.357988 | 128 | 0.674708 |
1cab6311c5bc345daf7a43f97bd91e86dedadfec | 954 | py | Python | alipay/aop/api/response/AlipayUserAntidVirtualCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserAntidVirtualCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserAntidVirtualCreateResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayUserAntidVirtualCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayUserAntidVirtualCreateResponse, self).__init__()
self._ant_id = None
sel... | 26.5 | 109 | 0.674004 |
1cab799027b5690e0ae218a06efd03d06141786b | 127 | py | Python | mobiletrans/mtcore/context_processors.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | 1 | 2015-04-28T14:48:27.000Z | 2015-04-28T14:48:27.000Z | mobiletrans/mtcore/context_processors.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | mobiletrans/mtcore/context_processors.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | from django.contrib.sites.models import Site
def site(request):
return {
'site': Site.objects.get_current()
}
| 18.142857 | 44 | 0.661417 |
1caba5a95b143af5cafc1811e5316115c8b6281d | 1,738 | py | Python | utils.py | dattranfiot/Carla-ppo | f6961e50a8e43ef65d1c0bb6e953db99c0948b36 | [
"MIT"
] | 1 | 2021-01-08T20:02:58.000Z | 2021-01-08T20:02:58.000Z | utils.py | dattranfiot/Carla-ppo | f6961e50a8e43ef65d1c0bb6e953db99c0948b36 | [
"MIT"
] | null | null | null | utils.py | dattranfiot/Carla-ppo | f6961e50a8e43ef65d1c0bb6e953db99c0948b36 | [
"MIT"
] | null | null | null | import types
import cv2
import numpy as np
import scipy.signal
import tensorflow as tf
class VideoRecorder():
def __init__(self, filename, frame_size, fps=30):
self.video_writer = cv2.VideoWriter(
filename,
cv2.VideoWriter_fourcc(*"MPEG"), int(fps),
(frame_size[1], fra... | 34.078431 | 83 | 0.683544 |
1cac0a1e615b962bcbd1c7527e04dceab5e5442d | 1,909 | py | Python | tensorflow/contrib/tensor_forest/hybrid/python/models/stochastic_hard_decisions_to_data_then_nn.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/tensor_forest/hybrid/python/models/stochastic_hard_decisions_to_data_then_nn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/tensor_forest/hybrid/python/models/stochastic_hard_decisions_to_data_then_nn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.5 | 96 | 0.72132 |
1cac115007d35437dba96949a4305e561ba6e8eb | 1,940 | py | Python | 0x15-api/1-export_to_CSV.py | jfbm74/holberton-system_engineering-devops | ae9318ac98fdbca4ba4eb08035f9157fd0af9dc8 | [
"MIT"
] | null | null | null | 0x15-api/1-export_to_CSV.py | jfbm74/holberton-system_engineering-devops | ae9318ac98fdbca4ba4eb08035f9157fd0af9dc8 | [
"MIT"
] | null | null | null | 0x15-api/1-export_to_CSV.py | jfbm74/holberton-system_engineering-devops | ae9318ac98fdbca4ba4eb08035f9157fd0af9dc8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Module that returns information about TO DO list
progress for a given employee ID
"""
import csv
import requests
from sys import argv
def get_user(id):
"""Function that returns a given user
Args:
id (int): ID Employee
Returns:
[user]: [User Data]
"""
url ... | 24.25 | 69 | 0.590722 |
1cac143d2edf23cf64d6d37d7fca83898b413f87 | 727 | py | Python | publication_backbone/plugins/sitemap/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/plugins/sitemap/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/plugins/sitemap/models.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models
from future.utils import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from fluent_contents.models.db import ContentItem
from . import appsettings
@python_2_unicode_compatible
class SitemapItem(ContentItem):
"""
Sitemap... | 27.961538 | 171 | 0.737276 |
1cac2fe7ce80190e796856fc49052054adc59524 | 740 | py | Python | src/spnego/_sspi_raw/__init__.py | ghettorce/pyspnego | 5376adb1b3fb7cfccd00be2317e85b7150f177a0 | [
"MIT"
] | 25 | 2020-05-23T10:17:46.000Z | 2022-02-21T16:52:02.000Z | src/spnego/_sspi_raw/__init__.py | ghettorce/pyspnego | 5376adb1b3fb7cfccd00be2317e85b7150f177a0 | [
"MIT"
] | 33 | 2020-07-04T00:05:55.000Z | 2022-03-15T23:20:29.000Z | src/spnego/_sspi_raw/__init__.py | ghettorce/pyspnego | 5376adb1b3fb7cfccd00be2317e85b7150f177a0 | [
"MIT"
] | 7 | 2020-08-27T03:44:46.000Z | 2022-01-21T04:50:05.000Z | # Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
from spnego._sspi_raw.sspi import (
ClientContextAttr,
ClientContextReq,
Credential,
CredentialUse,
SecBuffer,
SecBufferDesc,
SecBufferType,... | 23.125 | 72 | 0.691892 |
1cac5881237f2f95fd19416acfa017d8b521e586 | 57,832 | py | Python | pollination_sdk/api/teams_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/api/teams_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/api/teams_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and... | 45.971383 | 162 | 0.592336 |
1cac847539285a77aa801892102d3fa15c8c6bea | 13,760 | py | Python | primehub/admin_instancetypes.py | InfuseAI/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 10 | 2021-09-13T23:14:22.000Z | 2022-02-06T06:07:40.000Z | primehub/admin_instancetypes.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 4 | 2021-08-10T03:10:27.000Z | 2021-12-16T02:11:50.000Z | primehub/admin_instancetypes.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 1 | 2021-12-21T11:59:51.000Z | 2021-12-21T11:59:51.000Z | import json
from typing import Iterator, Dict, Any
from primehub import Helpful, Module, cmd, primehub_load_config
from primehub.utils import PrimeHubException, resource_not_found
from primehub.utils.optionals import file_flag
from primehub.utils.validator import validate_name, validate_groups
NODE_SELECTOR_KEY_LEN_E... | 31.060948 | 119 | 0.599491 |
1caca29fc2ef715a9ae7d6348b25721115f2b53a | 1,969 | py | Python | test/vanilla/version-tolerant/AcceptanceTests/test_object_type.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/version-tolerant/AcceptanceTests/test_object_type.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/version-tolerant/AcceptanceTests/test_object_type.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 41.020833 | 89 | 0.697816 |
1cacb959855d3a6c5822be3b645757e1537ed249 | 31,363 | py | Python | src/database.py | ZAFW/whopaybot | a2d51de69223efc10ae09f0a70962b8397a5dd93 | [
"MIT"
] | null | null | null | src/database.py | ZAFW/whopaybot | a2d51de69223efc10ae09f0a70962b8397a5dd93 | [
"MIT"
] | null | null | null | src/database.py | ZAFW/whopaybot | a2d51de69223efc10ae09f0a70962b8397a5dd93 | [
"MIT"
] | null | null | null | import psycopg2
import uuid
import json
import utils
import math
class Database:
def __init__(self, host, db, port, user, pw):
self.host = host
self.db = db
self.port = port
self.user = user
self.pw = pw
def get_connection(self):
return Connection(
... | 33.400426 | 82 | 0.454995 |
1cacf0a4e20d7049b92d33fcfb5d310461275c08 | 23,003 | py | Python | mlgauge/analysis.py | SuryaThiru/mlgauge | fcdab7dcccaeea5c48972754dcbbbe289c51e775 | [
"MIT"
] | 23 | 2021-01-10T16:52:08.000Z | 2022-02-08T13:30:02.000Z | mlgauge/analysis.py | SuryaThiru/mlgauge | fcdab7dcccaeea5c48972754dcbbbe289c51e775 | [
"MIT"
] | 3 | 2021-01-11T04:17:24.000Z | 2021-08-07T05:40:43.000Z | mlgauge/analysis.py | SuryaThiru/mlgauge | fcdab7dcccaeea5c48972754dcbbbe289c51e775 | [
"MIT"
] | 3 | 2021-01-10T16:52:28.000Z | 2021-02-11T16:52:40.000Z | import os
from copy import deepcopy
from datetime import datetime
from tqdm import tqdm
import numpy as np
import pandas as pd
import xarray as xr
import seaborn as sns
import pmlb
import openml
from sklearn.model_selection import train_test_split
from sklearn.utils import check_random_state
from mlgauge.method impo... | 41.747731 | 240 | 0.541103 |
1cad062a3c1c7d41dc525f8c740fb61b6f01a0db | 1,333 | py | Python | mdrsl/rule_models/rr/scoring.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/rule_models/rr/scoring.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/rule_models/rr/scoring.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import Dict, List
import pandas as pd
from mdrsl.data_handling.nan_data_filtering import remove_instances_with_nans_in_column
from mdrsl.evaluation.predictive_performance_metrics import ScoreInfo
from rule_models.rr.rr_rule_set_learner import GreedyRoundRobinTargetRuleClassifier
TargetAttr = str
def ... | 37.027778 | 108 | 0.779445 |
1cad1f37ef04182ccfb5f76657fa36df78ac9404 | 29,127 | py | Python | sfepy/homogenization/engine.py | MarcusAndreasSvensson/sfepy | 2702311ebb0693160fca5955a2a755b24aef58cb | [
"BSD-3-Clause"
] | null | null | null | sfepy/homogenization/engine.py | MarcusAndreasSvensson/sfepy | 2702311ebb0693160fca5955a2a755b24aef58cb | [
"BSD-3-Clause"
] | null | null | null | sfepy/homogenization/engine.py | MarcusAndreasSvensson/sfepy | 2702311ebb0693160fca5955a2a755b24aef58cb | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division
from copy import copy
from sfepy.base.base import output, get_default, Struct
from sfepy.applications import PDESolverApp, Application
from .coefs_base import MiniAppBase, CoefEval
from sfepy.discrete.evaluate import eval_equations
import sfepy.base.multiproc as multi
i... | 37.534794 | 79 | 0.536375 |
1cad37b677c632be21ea3ef7e9d9b7ac472bfa79 | 4,228 | py | Python | utils/evaluate_model.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | utils/evaluate_model.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | utils/evaluate_model.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
from utils.load_data import load_data
from utils.CSV_data_generator import DataGen
from models.NormBase import NormBase
def evaluate_model(config, save_name, legacy = False):
"""
This function runs and evaluates the model with given config.
The model is saved to models/saved/c... | 44.505263 | 91 | 0.601939 |
1cad3cf72fd9e55c370708003b5cfc6962c4bf8e | 22,217 | py | Python | analysis/webservice/NexusHandler.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 23 | 2016-08-09T22:45:14.000Z | 2020-02-17T08:18:29.000Z | analysis/webservice/NexusHandler.py | lewismc/incubator-sdap-nexus | ff98fa346303431542b8391cc2a1bf7561d1bd03 | [
"Apache-2.0"
] | 6 | 2017-04-27T21:22:17.000Z | 2021-06-01T21:45:52.000Z | analysis/webservice/NexusHandler.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 5 | 2016-08-31T13:47:29.000Z | 2017-11-14T21:45:22.000Z | """
Copyright (c) 2016 Jet Propulsion Laboratory,
California Institute of Technology. All rights reserved
"""
import sys
import numpy as np
import logging
import time
import types
from datetime import datetime
from netCDF4 import Dataset
from nexustiles.nexustiles import NexusTileService
from webservice.webmodel impor... | 40.030631 | 165 | 0.508755 |
1cad79c2c705c29368034f39aa1b20d69b81c7b3 | 345 | py | Python | steam_community_market/__init__.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 25 | 2019-10-15T23:23:09.000Z | 2022-01-05T20:40:59.000Z | steam_community_market/__init__.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 5 | 2020-01-07T12:17:32.000Z | 2021-11-15T04:08:10.000Z | steam_community_market/__init__.py | offish/steam_community_market | c31b76fe32c9061bb7650d5a7f6cb94014db9714 | [
"MIT"
] | 6 | 2020-01-05T12:01:21.000Z | 2022-02-01T16:15:07.000Z | """
steam_community_market
======================
Get item prices and volumes from the Steam Community Market using Python 3
"""
__title__ = "steam_community_market"
__author__ = "offish"
__license__ = "MIT"
__version__ = "1.2.3"
from .market import Market
from .request import request
from .enums impor... | 21.5625 | 75 | 0.692754 |
1cad8eefa860355f60902532a56a5158e70341e2 | 12,625 | py | Python | yardstick/ssh.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | yardstick/ssh.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | yardstick/ssh.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 36.383285 | 79 | 0.570931 |
1cad90d1be64155c1dd88c556e8b2bd81ef0e70d | 9,414 | py | Python | tests/fixtures/runner/test_load_fixture_runner.py | limedaniel/django-dynamic-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 11 | 2016-05-18T18:02:25.000Z | 2019-08-21T09:10:34.000Z | tests/fixtures/runner/test_load_fixture_runner.py | limedaniel/django-dynamic-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 16 | 2016-05-18T06:31:56.000Z | 2020-12-30T16:38:10.000Z | tests/fixtures/runner/test_load_fixture_runner.py | Peter-Slump/django-factory-boy-fixtures | 630182bd2a2b45833d29fa34134d6b68ff7a4349 | [
"MIT"
] | 7 | 2017-04-22T18:30:37.000Z | 2021-12-22T11:14:38.000Z | from unittest import TestCase, mock
from dynamic_fixtures.fixtures.exceptions import FixtureNotFound, MultipleFixturesFound
from dynamic_fixtures.fixtures.loader import Graph
from dynamic_fixtures.fixtures.runner import LoadFixtureRunner
from tests.mixins import MockTestCaseMixin
class LoadFixtureRunnerTestCase(Mock... | 35.659091 | 88 | 0.595602 |
1cad953f7e8a05e7edafa661325ef0ab8444acf3 | 327 | py | Python | services/selection/filters/tilefilter.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | services/selection/filters/tilefilter.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | services/selection/filters/tilefilter.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.tiles.base import Tile
from services.selection.filters.base import SelectionFilter
class TileExclusion(SelectionFilter):
"""
Excludes any Tiles
"""
def filter(self, targets):
self.resolution = [
target for target in targets
if not isinstance(target, Tile)
... | 21.8 | 59 | 0.648318 |
1cadaa02d4ac9e01c4f0cfb9011ee69b27718968 | 251 | py | Python | ext/DataMining/3_FeatureEngineering/SmoothMapping/__init__.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/utils/pandas_utils/0_DA/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/utils/pandas_utils/0_DA/__init__.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : __init__.py
# @Time : 2019-07-05 18:09
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
| 20.916667 | 36 | 0.521912 |
1cadae41f4cd13600e59290f5b1790c134c1097d | 1,251 | py | Python | appengine/findit/waterfall/extractor.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/waterfall/extractor.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/waterfall/extractor.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # 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.
from waterfall import extractor_util
class Extractor(object):
"""An interface to extract failure signal from a failed step or test."""
def ExtractFile... | 39.09375 | 80 | 0.728217 |
1cadb3f0c1623421fb2a6cbdf4c805e381cf196f | 27,497 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 40.259151 | 202 | 0.659599 |
1cadda6322721bf807ecaf4f064985c88b90d2bd | 3,559 | py | Python | tools/yolo_anchor-cluster.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | tools/yolo_anchor-cluster.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | tools/yolo_anchor-cluster.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | #coding=utf-8
import xml.etree.ElementTree as ET
import numpy as np
def iou(box, clusters):
"""
计算一个ground truth边界盒和k个先验框(Anchor)的交并比(IOU)值。
参数box: 元组或者数据,代表ground truth的长宽。
参数clusters: 形如(k,2)的numpy数组,其中k是聚类Anchor框的个数
返回:ground truth和每个Anchor框的交并比。
"""
x = np.minimum(clusters[:, 0], box[... | 33.261682 | 84 | 0.614498 |
1cade7c134abfbd140334a69fe412d42d86f67e6 | 4,818 | py | Python | tests/sklearn_classification.py | wmonteiro92/xmoai-examples | 0286d57e15cb60693f57cdff386cbb246787442b | [
"MIT"
] | 1 | 2021-03-22T11:31:00.000Z | 2021-03-22T11:31:00.000Z | tests/sklearn_classification.py | wmonteiro92/xmoai-examples | 0286d57e15cb60693f57cdff386cbb246787442b | [
"MIT"
] | null | null | null | tests/sklearn_classification.py | wmonteiro92/xmoai-examples | 0286d57e15cb60693f57cdff386cbb246787442b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 11 16:49:49 2020
@author: wmonteiro92
"""
from xmoai.setup.configure import generate_counterfactuals_classification_proba, generate_counterfactuals_classification_simple
from sklearn_data.datasets import load_sample_from_dataset
from sklearn_data.m... | 41.534483 | 127 | 0.6401 |
1cadf0621823e7db7479a1ef2d7cb3013444e2ab | 9,924 | py | Python | python/tvm/tensor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | python/tvm/tensor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | python/tvm/tensor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 28.932945 | 93 | 0.621423 |
1cae57915cdfd82d962165a3aa7e72f2c7e37330 | 11,217 | py | Python | saf/saf.py | vanatteveldt/saf | f50d8476bbd9ba81c85b29cedb1db89381389092 | [
"MIT"
] | null | null | null | saf/saf.py | vanatteveldt/saf | f50d8476bbd9ba81c85b29cedb1db89381389092 | [
"MIT"
] | null | null | null | saf/saf.py | vanatteveldt/saf | f50d8476bbd9ba81c85b29cedb1db89381389092 | [
"MIT"
] | null | null | null | import collections
class SAF(object):
def __init__(self, saf):
self.saf = saf
self._tokens = {t['id']: t for t in saf['tokens']}
self._children = None # cache token : [(rel, child), ...]
def get_token(self, token_id):
return self._tokens[token_id]
def get_parent(self, toke... | 39.636042 | 102 | 0.528929 |
1cae84b7ce436ae052359323311d881405783c47 | 4,502 | py | Python | components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_create_cluster.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_create_cluster.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_create_cluster.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2018 The Kubeflow 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... | 42.87619 | 103 | 0.689916 |
1cae98472cd8235649fdd1dcc564ca6aaea7ffe5 | 686 | py | Python | app/core/migrations/0003_ingredient.py | Chaithanya-Kumar-N/recipe-app-api | 3376ab362282f98b47654a98ac4e6f3ad04b832b | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | Chaithanya-Kumar-N/recipe-app-api | 3376ab362282f98b47654a98ac4e6f3ad04b832b | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | Chaithanya-Kumar-N/recipe-app-api | 3376ab362282f98b47654a98ac4e6f3ad04b832b | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-06-24 14:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_tag'),
]
operations = [
migrations.CreateModel(
... | 28.583333 | 118 | 0.618076 |
1caeabe4f0b82ba9c4205cf9d6bd90778a06e664 | 3,234 | py | Python | predictionserver/servermixins/donationserver.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2020-12-04T17:59:19.000Z | 2020-12-04T17:59:19.000Z | predictionserver/servermixins/donationserver.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | null | null | null | predictionserver/servermixins/donationserver.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2021-03-05T05:03:36.000Z | 2021-03-05T05:03:36.000Z | from predictionserver.futureconventions.typeconventions import Activity
from predictionserver.servermixins.baseserver import BaseServer
from predictionserver.serverhabits.donationhabits import DonationHabits
from pprint import pprint
class DonationServer:
def __init__(self, **kwargs):
super().__init__(**... | 38.047059 | 90 | 0.546382 |
1caecdb05cb8c7804ae20edec541ba800208f4a4 | 4,064 | py | Python | alipay/aop/api/request/MybankCreditLoanapplyBkruralindustryTrackAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/MybankCreditLoanapplyBkruralindustryTrackAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/MybankCreditLoanapplyBkruralindustryTrackAddRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankCreditLoanapplyBkruralindustryTrackAddModel import MybankCreditLoanapplyBkruralindustryTrackAddModel
class MybankCreditLoanapp... | 28.027586 | 148 | 0.652559 |
1caf01a7f3e0e45bc2935a91f6b86078ecdf8da0 | 7,130 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pioasm.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pioasm.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pioasm.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries LLC
#
# SPDX-License-Identifier: MIT
"""
`adafruit_pioasm`
================================================================================
Simple assembler to convert pioasm to bytes
* Author(s): Scott Shawcroft
"""
import array
... | 42.189349 | 88 | 0.52777 |
1caf58f3ea72b7f9fa60ee848d0b72ad3e5f2af1 | 826 | py | Python | cousinsInBinaryTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-08-09T07:07:53.000Z | 2020-08-09T07:07:53.000Z | cousinsInBinaryTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | null | null | null | cousinsInBinaryTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-06-06T20:56:33.000Z | 2020-06-06T20:56:33.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isCousins(self, root: TreeNode, x: int, y: int) -> bool:
# store (parent, depth) tuple
res = ... | 29.5 | 64 | 0.527845 |
1caf5c980eb8fb6d75078499e2c2c11b4bae6556 | 4,651 | py | Python | scripts/replay-log.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 53 | 2015-02-07T04:58:23.000Z | 2022-03-07T15:49:07.000Z | scripts/replay-log.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 283 | 2015-01-01T17:16:37.000Z | 2018-05-09T23:51:48.000Z | scripts/replay-log.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 28 | 2015-02-20T01:37:38.000Z | 2021-03-12T07:05:23.000Z | #!/usr/bin/python
# This script allows the planning requests produced by the Logged
# metaplanner (using PrPy's serialization facilities) to be replayed.
# Downstream users may need to add some additional features
# (e.g. initializing robot-specific helpers such as HerbPy)
# in their log replay facilities so that plan... | 38.758333 | 126 | 0.774027 |
1caf6f156166915c11b26efc58890a1026855882 | 34,535 | py | Python | qcodes/instrument/channel.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | qcodes/instrument/channel.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | 230 | 2020-08-17T06:08:33.000Z | 2022-03-29T12:06:58.000Z | qcodes/instrument/channel.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | """ Base class for the channel of an instrument """
from typing import (
List, Union, Optional, Dict, Sequence,
cast, Any, Tuple, Callable,
)
from .base import InstrumentBase, Instrument
from .parameter import (MultiParameter, ArrayParameter, Parameter,
ParamRawDataType, Iterator)
from ..utils.validators i... | 39.786866 | 90 | 0.583958 |
1caf781873719419d2f3a3caf6d7ad3380a70608 | 421 | py | Python | produzione_scientifica/produzione_scientifica/wsgi.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/produzione_scientifica/wsgi.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/produzione_scientifica/wsgi.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | """
WSGI config for produzione_scientifica 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/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefaul... | 24.764706 | 82 | 0.800475 |
1caf880a1f026ca3ff42b93035fa6d169a100378 | 18,275 | py | Python | test/nicos_ess/test_devices/test_area_detector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | test/nicos_ess/test_devices/test_area_detector.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | test/nicos_ess/test_devices/test_area_detector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 33.780037 | 79 | 0.616471 |
1cafbd616307eb536bf6db19b11e077443f808ba | 8,096 | py | Python | microutil/loading.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 2 | 2021-07-06T05:31:51.000Z | 2021-10-05T13:29:59.000Z | microutil/loading.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 16 | 2021-02-08T22:36:42.000Z | 2021-11-01T22:36:02.000Z | microutil/loading.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | null | null | null | import glob
import json
import os
import re
import dask.array as da
import numpy as np
import pandas as pd
import tifffile
import xarray as xr
__all__ = [
"micromanager_metadata_to_coords",
"load_image_sequence",
"load_mm_frames",
]
def micromanager_metadata_to_coords(summary, n_times=None, z_centered=T... | 32.777328 | 99 | 0.606843 |
1cafc645d4880b7d44b07426621260275050d564 | 6,481 | py | Python | tests/integration/test_update.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | 1 | 2020-12-28T18:00:22.000Z | 2020-12-28T18:00:22.000Z | tests/integration/test_update.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | 7 | 2020-12-28T19:57:35.000Z | 2021-04-17T14:43:15.000Z | tests/integration/test_update.py | admdev8/packit | 11bf44e8b08a742664d8bfe0c38336efc1a7adf3 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Red Hat, Inc.
# 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,... | 35.222826 | 87 | 0.68616 |
1cafcda0c0d08ff0766869db2969f8eda1bdd4c4 | 136 | py | Python | abc/097/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/097/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/097/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | a, b, c, d = map(int, input().split())
if abs(a - b) <= d and abs(b - c) <= d or abs(a - c) <= d:
print("Yes")
else:
print("No") | 27.2 | 58 | 0.470588 |
1cafdad543a0d22a3634576c8d2694fce4291fb5 | 2,651 | py | Python | data_profiler/tests/test_data_profiler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | 1 | 2021-02-13T21:53:16.000Z | 2021-02-13T21:53:16.000Z | data_profiler/tests/test_data_profiler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | data_profiler/tests/test_data_profiler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
import unittest
from unittest import mock
from . import test_utils
from data_profiler import Data, Profiler
# This is taken from: https://github.com/rlworkgroup/dowel/pull/36/files
# undo when cpython#4800 is merged.
unittest.case._AssertWarnsContext.__enter__ = test... | 31.188235 | 91 | 0.61109 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.