hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7964ec7f0edea8edc6a5d5f9588dbea9a3a0ad25 | 1,261 | py | Python | metrics/get_plot.py | hahahahahzt/DP-Star | 8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11 | [
"MIT"
] | null | null | null | metrics/get_plot.py | hahahahahzt/DP-Star | 8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11 | [
"MIT"
] | null | null | null | metrics/get_plot.py | hahahahahzt/DP-Star | 8ae5bc0f79b50445e7dfbef9bed54e55c4eafa11 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] # 用来正常显示中文标签
import matplotlib.font_manager as fm # 字体管理器
def run_data():
data = {
"Query AvRE": [0.060, 0.046, 0.142, 0.025],
# "Freq Patten AvRE": [0.748, 0.795, 0.865, 0.827],
"Trip Error": [0.390, 0.20... | 32.333333 | 83 | 0.559873 |
7964ed0b6252f0454a826911cef6d5d97e3a9f08 | 6,295 | py | Python | sympy/functions/elementary/tests/test_piecewise.py | matthew-brett/sympy | 7b87b62144c28f2e734e9106897c72806b99d181 | [
"BSD-3-Clause"
] | null | null | null | sympy/functions/elementary/tests/test_piecewise.py | matthew-brett/sympy | 7b87b62144c28f2e734e9106897c72806b99d181 | [
"BSD-3-Clause"
] | null | null | null | sympy/functions/elementary/tests/test_piecewise.py | matthew-brett/sympy | 7b87b62144c28f2e734e9106897c72806b99d181 | [
"BSD-3-Clause"
] | null | null | null | from sympy import diff, Integral, integrate, log, oo, Piecewise, \
piecewise_fold, raises, symbols, pi, solve, Rational, Interval, \
lambdify, expand
from sympy.utilities.pytest import XFAIL
x,y = symbols('xy')
def test_piecewise():
# Test canonization
assert Piecewise((x, x < 1), (0, True)) == Piece... | 34.027027 | 83 | 0.514059 |
7964f0bd05960292a79c5b613c8a31890377957c | 468 | py | Python | setup.py | robertchase/fsm | b7dfa1803b52d60cf7197c9f1e64f00d20d1b1c7 | [
"MIT"
] | null | null | null | setup.py | robertchase/fsm | b7dfa1803b52d60cf7197c9f1e64f00d20d1b1c7 | [
"MIT"
] | 1 | 2019-02-08T20:53:52.000Z | 2019-05-25T09:45:04.000Z | setup.py | robertchase/fsm | b7dfa1803b52d60cf7197c9f1e64f00d20d1b1c7 | [
"MIT"
] | null | null | null | from setuptools import find_packages
from distutils.core import setup
setup(
name='fsm',
version='1.2',
packages=find_packages(exclude=['tests']),
description='A finite state machine library',
long_description="""
Documentation
-------------
You can see the project and documentation at the `Git... | 26 | 104 | 0.673077 |
7964f1d1ee6a2540711dd12b54eb6d023d9a5ffb | 2,104 | py | Python | misc-code/slider-test-soverflow.py | adrianhindes/generalizedModeling | ba0e366814fa289aafde4011b95d24b647da4cb6 | [
"MIT"
] | null | null | null | misc-code/slider-test-soverflow.py | adrianhindes/generalizedModeling | ba0e366814fa289aafde4011b95d24b647da4cb6 | [
"MIT"
] | null | null | null | misc-code/slider-test-soverflow.py | adrianhindes/generalizedModeling | ba0e366814fa289aafde4011b95d24b647da4cb6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 3 20:13:34 2019
@author: hindesa
"""
from numpy import pi, sin
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button, RadioButtons
def signal(amp, freq):
return amp * sin(2 * pi * freq * t)
axis_color = 'lightgoldenrodyel... | 31.402985 | 85 | 0.740494 |
7964f1f83a9a9e5218370c1557998ed98ef137d4 | 137 | py | Python | profiles_api/profiles/urls.py | padmajapotula/profiles-rest-api | f74f6af2091ca36fc7382ec9c45f1ca01afa6d1e | [
"MIT"
] | null | null | null | profiles_api/profiles/urls.py | padmajapotula/profiles-rest-api | f74f6af2091ca36fc7382ec9c45f1ca01afa6d1e | [
"MIT"
] | null | null | null | profiles_api/profiles/urls.py | padmajapotula/profiles-rest-api | f74f6af2091ca36fc7382ec9c45f1ca01afa6d1e | [
"MIT"
] | null | null | null | from django.urls import path,include
from profiles import views
urlpatterns = [
path('hello-view/', views.HelloApiView.as_view())
]
| 19.571429 | 53 | 0.744526 |
7964f1feb1b639ceba7d5b50f7b08a71f1e12844 | 130 | py | Python | setup.py | juftin/lunch-money | e530559c75f7f24254ff0f10273e3eea56f124b2 | [
"MIT"
] | 4 | 2021-09-25T06:32:17.000Z | 2022-01-24T22:35:03.000Z | setup.py | juftin/lunch-money | e530559c75f7f24254ff0f10273e3eea56f124b2 | [
"MIT"
] | null | null | null | setup.py | juftin/lunch-money | e530559c75f7f24254ff0f10273e3eea56f124b2 | [
"MIT"
] | 1 | 2021-09-27T19:27:47.000Z | 2021-09-27T19:27:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Package Installation setup.py File
"""
from setuptools import setup
setup()
| 11.818182 | 34 | 0.661538 |
7964f32843281c9247e6610d48e93465eed8fc7c | 4,543 | py | Python | test/channel/test_channel.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 772 | 2020-01-21T13:59:42.000Z | 2022-03-30T08:20:16.000Z | test/channel/test_channel.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 126 | 2020-03-03T07:54:39.000Z | 2022-03-08T23:24:03.000Z | test/channel/test_channel.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 198 | 2020-01-22T02:16:17.000Z | 2022-03-31T01:13:05.000Z | # Copyright 2020 The FedLearner 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... | 36.344 | 74 | 0.643628 |
7964f3a1dc5fb18d5cb712932a01de6426120666 | 19 | py | Python | notebooks/_solutions/case-curieuzeneuzen-air-quality23.py | jorisvandenbossche/DS-python-geospatial | 893a12edc5c203a75815f6dcb5f1e18c577c8cd5 | [
"BSD-3-Clause"
] | 58 | 2020-10-09T10:10:59.000Z | 2022-03-07T14:58:07.000Z | notebooks/_solutions/case-curieuzeneuzen-air-quality23.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 24 | 2020-09-30T19:57:14.000Z | 2021-10-05T07:21:09.000Z | notebooks/_solutions/case-curieuzeneuzen-air-quality23.py | amitkb3/DS-python-geospatial | 5f156ebff67e06d59b2a7ef446d1fed746ce0650 | [
"BSD-3-Clause"
] | 19 | 2020-10-05T09:32:18.000Z | 2022-03-20T00:09:14.000Z | gdf_combined.head() | 19 | 19 | 0.842105 |
7964f45179919573d9ad7e69978d02106d57d9af | 207 | py | Python | querybook/server/const/db.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 1,144 | 2021-03-30T05:06:16.000Z | 2022-03-31T10:40:31.000Z | querybook/server/const/db.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 593 | 2021-07-01T10:34:25.000Z | 2022-03-31T23:24:40.000Z | querybook/server/const/db.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 113 | 2021-03-30T00:07:20.000Z | 2022-03-31T07:18:43.000Z | import datetime
now = datetime.datetime.utcnow
utf8mb4_name_length = 191
name_length = 255
password_length = 255
description_length = 5000
text_length = 65535
mediumtext_length = 16777215
url_length = 2083
| 18.818182 | 30 | 0.821256 |
7964f61502e05f5e64a0cd0338e9898bab32569e | 1,522 | py | Python | fpdf/php.py | the-worldly-monkey/stripy | e894ae480f5437ac2045d9ddc345297628a131ec | [
"MIT"
] | null | null | null | fpdf/php.py | the-worldly-monkey/stripy | e894ae480f5437ac2045d9ddc345297628a131ec | [
"MIT"
] | null | null | null | fpdf/php.py | the-worldly-monkey/stripy | e894ae480f5437ac2045d9ddc345297628a131ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: latin-1 -*-
from .py3k import PY3K, basestring, unicode
# fpdf php helpers:
def substr(s, start, length = -1):
if length < 0: length = len(s) - start
return s[start:start + length]
def sprintf(fmt, *args): return fmt % args
def print_r(array):
if not is... | 27.178571 | 61 | 0.592641 |
7964f6f417fdb1fdfcacf394d1d35f782307b84b | 4,697 | py | Python | scalyr_agent/third_party_tls/oscrypto/_win/_advapi32_cffi.py | zak905/scalyr-agent-2 | 490f03f2a3f0a8d075d74df20610ceb23dff6c8c | [
"Apache-2.0"
] | null | null | null | scalyr_agent/third_party_tls/oscrypto/_win/_advapi32_cffi.py | zak905/scalyr-agent-2 | 490f03f2a3f0a8d075d74df20610ceb23dff6c8c | [
"Apache-2.0"
] | 1 | 2020-06-03T13:19:37.000Z | 2020-06-03T13:35:28.000Z | scalyr_agent/third_party_tls/oscrypto/_win/_advapi32_cffi.py | zak905/scalyr-agent-2 | 490f03f2a3f0a8d075d74df20610ceb23dff6c8c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from .._ffi import FFIEngineError, register_ffi
from .._types import str_cls
from ..errors import LibraryNotFoundError
try:
import cffi
except (ImportError):
raise FFIEngineError('Error importing cffi')
__all... | 31.313333 | 105 | 0.676176 |
7964f6f7f988693423cd3827a7c87fde21d70dde | 916 | py | Python | admin_interface/migrations/0008_change_related_modal_background_opacity_type.py | MNeipp/django-admin-interface | fbc29246ff9c9287af37e3e53f0cbd7b35d65944 | [
"MIT"
] | 1,129 | 2015-11-15T14:41:01.000Z | 2022-03-31T21:24:14.000Z | admin_interface/migrations/0008_change_related_modal_background_opacity_type.py | MNeipp/django-admin-interface | fbc29246ff9c9287af37e3e53f0cbd7b35d65944 | [
"MIT"
] | 152 | 2015-11-13T17:27:04.000Z | 2022-03-28T07:57:28.000Z | admin_interface/migrations/0008_change_related_modal_background_opacity_type.py | MNeipp/django-admin-interface | fbc29246ff9c9287af37e3e53f0cbd7b35d65944 | [
"MIT"
] | 142 | 2015-11-25T17:08:03.000Z | 2022-03-14T22:36:26.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('admin_interface', '0007_add_favicon'),
]
operations = [
migrations.RemoveField(
model_name='theme',
... | 27.757576 | 68 | 0.469432 |
7964f7f9b1570930d239dd0ccf2a0cb8c0bc0fb0 | 22,289 | py | Python | repo2docker/app.py | Orientsoft/repo2docker | 47c45561184cb133368162d35c8ebc03be5b3ec1 | [
"BSD-3-Clause"
] | null | null | null | repo2docker/app.py | Orientsoft/repo2docker | 47c45561184cb133368162d35c8ebc03be5b3ec1 | [
"BSD-3-Clause"
] | null | null | null | repo2docker/app.py | Orientsoft/repo2docker | 47c45561184cb133368162d35c8ebc03be5b3ec1 | [
"BSD-3-Clause"
] | null | null | null | """repo2docker: convert git repositories into jupyter-suitable docker images
Images produced by repo2docker can be used with Jupyter notebooks standalone
or with BinderHub.
Usage:
python -m repo2docker https://github.com/you/your-repo
"""
import argparse
import json
import sys
import logging
import os
import pwd... | 32.826215 | 88 | 0.550944 |
7964fa379f0909df4e9bc2d8db27356a0c8debee | 2,559 | py | Python | scripts/make_plots.py | MINDS-i/MINDS-i-Debugger | 2971bd8016fccc6654f24fd21b88b66c857c8278 | [
"Apache-2.0"
] | null | null | null | scripts/make_plots.py | MINDS-i/MINDS-i-Debugger | 2971bd8016fccc6654f24fd21b88b66c857c8278 | [
"Apache-2.0"
] | null | null | null | scripts/make_plots.py | MINDS-i/MINDS-i-Debugger | 2971bd8016fccc6654f24fd21b88b66c857c8278 | [
"Apache-2.0"
] | null | null | null | import argparse
import matplotlib.pyplot as plt
def main():
parser = argparse.ArgumentParser(description="Create a plots from a rover log. Each plot will be \
saved as an individual file in the local directory.")
parser.add_argument("filepath")
parser.add_argument('-a','--all',action='store_tr... | 37.632353 | 126 | 0.535365 |
7964fae9a352f2bdb045063f571fcc4cb60fe68e | 611 | py | Python | website/models.py | mhas1381/mySite | a6d30746f57b896abd87621ee42f7f3750551ad0 | [
"MIT"
] | null | null | null | website/models.py | mhas1381/mySite | a6d30746f57b896abd87621ee42f7f3750551ad0 | [
"MIT"
] | null | null | null | website/models.py | mhas1381/mySite | a6d30746f57b896abd87621ee42f7f3750551ad0 | [
"MIT"
] | null | null | null | from email import message
import email
from django.db import models
# Create your models here.
class Contact(models.Model):
name = models.CharField(max_length=255)
email = models.EmailField()
subject = models.CharField(max_length=255)
message = models.TextField()
created_date = models.DateTimeFiel... | 26.565217 | 58 | 0.708674 |
7964fc1bf079fac0d98e9cf84693e05c42b205cc | 2,121 | py | Python | Python/pytorch/Distributed/torch_test.py | llsc-supercloud/teaching-examples | c260b549879a576bfd69edc25a3079dc3933af30 | [
"MIT"
] | 19 | 2019-05-03T14:26:48.000Z | 2022-03-04T16:53:22.000Z | Python/pytorch/Distributed/torch_test.py | llsc-supercloud/teaching-examples | c260b549879a576bfd69edc25a3079dc3933af30 | [
"MIT"
] | 1 | 2019-12-18T21:42:49.000Z | 2019-12-18T21:42:49.000Z | Python/pytorch/Distributed/torch_test.py | llsc-supercloud/teaching-examples | c260b549879a576bfd69edc25a3079dc3933af30 | [
"MIT"
] | 8 | 2019-11-15T04:10:07.000Z | 2022-03-06T21:23:00.000Z | import os
import argparse
import socket
import torch
import torch.distributed as dist
from torch.multiprocessing import Process
# run() will be the training function
def run(rank, size, hostname):
print(f"{hostname}: {rank} of {size}")
# See this : https://pytorch.org/docs/stable/nn.html#torch.nn.parallel.Dist... | 38.563636 | 103 | 0.693541 |
7964fdb738fb1495e6c3c85bca17153bb6616fb3 | 589 | py | Python | var.py | kodyli/Trade | 3f6ad239e2c2b73307317d1e585b226f3c9d96f5 | [
"MIT"
] | 1 | 2020-01-15T01:34:28.000Z | 2020-01-15T01:34:28.000Z | var.py | kodyli/Trade | 3f6ad239e2c2b73307317d1e585b226f3c9d96f5 | [
"MIT"
] | null | null | null | var.py | kodyli/Trade | 3f6ad239e2c2b73307317d1e585b226f3c9d96f5 | [
"MIT"
] | null | null | null | from __future__ import print_function
import datetime
import numpy as np
from pandas_datareader import data as web
from scipy.stats import norm
def var_cov_var(P,c,mu,sigma):
alpha = norm.ppf(1-c,mu,sigma)
return P-P*(alpha + 1)
if __name__ == "__main__":
start = datetime.datetime(2010,1,1)
end = d... | 25.608696 | 46 | 0.675722 |
7964fdcd9cdf463c7f5761d64e1c84ec07622663 | 9,455 | py | Python | scripts-python-make-data/ising-multi-heat-capacity.py | SimonEnsemble/thesis-pommerenck-1 | c546b981b0fa7cebbe80e32d45dee5e8714ea89c | [
"MIT"
] | 1 | 2021-03-24T00:42:10.000Z | 2021-03-24T00:42:10.000Z | scripts-python-make-data/ising-multi-heat-capacity.py | SimonEnsemble/thesis-pommerenck-1 | c546b981b0fa7cebbe80e32d45dee5e8714ea89c | [
"MIT"
] | null | null | null | scripts-python-make-data/ising-multi-heat-capacity.py | SimonEnsemble/thesis-pommerenck-1 | c546b981b0fa7cebbe80e32d45dee5e8714ea89c | [
"MIT"
] | 1 | 2021-03-23T18:42:16.000Z | 2021-03-23T18:42:16.000Z | #!/usr/bin/env python
from __future__ import division
import sys, os
import numpy as np
import readnew
from glob import glob
import matplotlib.pyplot as plt
import yaml
import os.path
import time # Need to wait some time if file is being written
import argparse
parser = argparse.ArgumentParser(description =
"""
... | 39.070248 | 158 | 0.561713 |
7964febf206fd2ca20183b68efd439ff7aa93fe7 | 1,924 | py | Python | tests/utils/test_resource.py | MC-kit/mckit-meshes | 8aa06ff95ffd1dabac95f399d45047325c265f78 | [
"MIT"
] | null | null | null | tests/utils/test_resource.py | MC-kit/mckit-meshes | 8aa06ff95ffd1dabac95f399d45047325c265f78 | [
"MIT"
] | 2 | 2022-02-17T18:10:15.000Z | 2022-03-01T11:19:16.000Z | tests/utils/test_resource.py | MC-kit/mckit-meshes | 8aa06ff95ffd1dabac95f399d45047325c265f78 | [
"MIT"
] | null | null | null | import pytest
from mckit_meshes.utils.resource import Path, filename_resolver, path_resolver
THIS_FILENAME = Path(__file__).name
# noinspection PyCompatibility
@pytest.mark.parametrize(
"package, resource, expected",
[
(None, THIS_FILENAME, THIS_FILENAME),
("tests", "data/ng-2.3.5.ps", "data... | 29.6 | 83 | 0.703222 |
7964ff8ee7a694cb3d84468c04c34aafbc93476d | 395 | py | Python | Matlab/socket_/socket_test.py | GihoonKim/Tools | b9275aef8b9079dcdfdaf4be0736d49de246a0cc | [
"MIT"
] | null | null | null | Matlab/socket_/socket_test.py | GihoonKim/Tools | b9275aef8b9079dcdfdaf4be0736d49de246a0cc | [
"MIT"
] | null | null | null | Matlab/socket_/socket_test.py | GihoonKim/Tools | b9275aef8b9079dcdfdaf4be0736d49de246a0cc | [
"MIT"
] | null | null | null | import socket
import struct
HOST = ''
PORT = 50007
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print('Connected by',addr)
while 1:
data = conn.recv(1024)
data_ = struct.unpack('>d',data)
print(data_)
if not data: break
# msg1 =... | 14.62963 | 53 | 0.64557 |
7964ffe1f34080ef1ff1c676ee82f55c7046b5c2 | 6,310 | py | Python | test/functional/feature_dersig.py | fuxingloh/defichain | 8e6cdc7a4a681066c5959ffbea2bc065722f1857 | [
"MIT"
] | null | null | null | test/functional/feature_dersig.py | fuxingloh/defichain | 8e6cdc7a4a681066c5959ffbea2bc065722f1857 | [
"MIT"
] | null | null | null | test/functional/feature_dersig.py | fuxingloh/defichain | 8e6cdc7a4a681066c5959ffbea2bc065722f1857 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
Test that the DERSIG soft-fork activates at (regtest) height 1251.
"""
from tes... | 41.513158 | 183 | 0.666403 |
79650002144f8f811f8e0f4707655e5502295325 | 4,357 | py | Python | tests/nightly/dist_device_sync_kvstore_byteps.py | ChaokunChang/incubator-mxnet | 3a5c78aa145411f01f9ce636b6a0f798b4730433 | [
"Apache-2.0"
] | null | null | null | tests/nightly/dist_device_sync_kvstore_byteps.py | ChaokunChang/incubator-mxnet | 3a5c78aa145411f01f9ce636b6a0f798b4730433 | [
"Apache-2.0"
] | null | null | null | tests/nightly/dist_device_sync_kvstore_byteps.py | ChaokunChang/incubator-mxnet | 3a5c78aa145411f01f9ce636b6a0f798b4730433 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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
# "L... | 37.560345 | 140 | 0.688547 |
79650076258a7a3755333bf5bf2694ce2f683fe0 | 3,791 | py | Python | ckan_cloud_operator/providers/ckan/instance/cli.py | aluminiumgeek/ckan-cloud-operator | c667f2d9b8fefb0abd3d92ce58f1a9eee4417c88 | [
"MIT"
] | null | null | null | ckan_cloud_operator/providers/ckan/instance/cli.py | aluminiumgeek/ckan-cloud-operator | c667f2d9b8fefb0abd3d92ce58f1a9eee4417c88 | [
"MIT"
] | null | null | null | ckan_cloud_operator/providers/ckan/instance/cli.py | aluminiumgeek/ckan-cloud-operator | c667f2d9b8fefb0abd3d92ce58f1a9eee4417c88 | [
"MIT"
] | null | null | null | import click
import yaml
import json
import traceback
from ckan_cloud_operator import logs
from ckan_cloud_operator import kubectl
from . import manager
@click.group()
def instance():
"""Manage CKAN Instances"""
pass
@instance.command()
@click.argument('INSTANCE_TYPE')
@click.argument('VALUES_FILE')
@clic... | 34.153153 | 119 | 0.747824 |
7965010d0680f1b7295b94d03b4c471fc96c1516 | 813 | py | Python | scripts/simple_collectible/create_collectible.py | djmendez-coding/nft-mix | 4dd293c6d767a59e688af4809053d325c97d3e00 | [
"MIT"
] | 5 | 2022-02-08T15:14:10.000Z | 2022-02-09T22:53:55.000Z | scripts/simple_collectible/create_collectible.py | djmendez-coding/nft-mix | 4dd293c6d767a59e688af4809053d325c97d3e00 | [
"MIT"
] | null | null | null | scripts/simple_collectible/create_collectible.py | djmendez-coding/nft-mix | 4dd293c6d767a59e688af4809053d325c97d3e00 | [
"MIT"
] | 2 | 2022-02-08T15:41:26.000Z | 2022-02-11T19:29:06.000Z | #!/usr/bin/python3
from brownie import SimpleCollectible, accounts, network, config
from scripts.helpful_scripts import OPENSEA_FORMAT
sample_token_uri = "https://gateway.pinata.cloud/ipfs/QmWQsp2XQk6L5xVhSvMb6xZ2WSTDW2415czRZbZjYFKXPN?preview=1"
def main():
dev = accounts.add(config["wallets"]["from_key"])
... | 38.714286 | 111 | 0.747847 |
7965031fb4ad23d31aba68c543633c359adbc0f2 | 1,360 | py | Python | analysis_methods.py | KCGallagher/moonshot-predictor | 3770aa4a01f08fec595cf243e01e5dd102a5335a | [
"MIT"
] | null | null | null | analysis_methods.py | KCGallagher/moonshot-predictor | 3770aa4a01f08fec595cf243e01e5dd102a5335a | [
"MIT"
] | null | null | null | analysis_methods.py | KCGallagher/moonshot-predictor | 3770aa4a01f08fec595cf243e01e5dd102a5335a | [
"MIT"
] | null | null | null | # Methods for analysing the data
import numpy as np
import pandas as pd
class AnalysisMethods:
"""Collection of methods to generate information about target compounds
"""
@staticmethod
def type_of_amide(df):
"""Determines whether molecule is a acrlyamide or chloroacetamide
:p... | 32.380952 | 77 | 0.638235 |
796503261bc0da4dbd38c017915d6293ed46fe21 | 12,936 | py | Python | lithic/types/account_holder_create_params.py | lithic-com/lithic-python | be19d7195ebdf217b45f1ab59b39021d51330989 | [
"Apache-2.0"
] | null | null | null | lithic/types/account_holder_create_params.py | lithic-com/lithic-python | be19d7195ebdf217b45f1ab59b39021d51330989 | [
"Apache-2.0"
] | null | null | null | lithic/types/account_holder_create_params.py | lithic-com/lithic-python | be19d7195ebdf217b45f1ab59b39021d51330989 | [
"Apache-2.0"
] | null | null | null | # File generated from our OpenAPI spec by Stainless.
from __future__ import annotations
from typing import Optional, Union, List
from typing_extensions import Literal, TypedDict, Required
from ..types import shared_params
__all__ = [
"KYCIndividualAddress",
"KYCIndividual",
"KYC",
"KybBusinessEntityAd... | 46.532374 | 581 | 0.7374 |
7965041ee45873f0dde077502f36b546b36fbe0c | 461 | py | Python | yt_concate/pipeline/steps/read_captions.py | smallwater94/yt-concat | 3bec02f25ac41263511c26917a87deac3edc65b9 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/read_captions.py | smallwater94/yt-concat | 3bec02f25ac41263511c26917a87deac3edc65b9 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/read_captions.py | smallwater94/yt-concat | 3bec02f25ac41263511c26917a87deac3edc65b9 | [
"MIT"
] | null | null | null | from yt_concate.pipeline.steps.step import Step
import pickle
class ReadCaptions(Step):
def process(self, transporter, inputs, utils):
print('處理字幕中......')
for yto in transporter:
try:
with open(yto.caption_filepath, 'rb') as f:
yto.captions = pickle... | 28.8125 | 59 | 0.56833 |
796504a8b886a6309ee65ba282ff5f8dbb0221b7 | 1,690 | py | Python | lfp_atn_simuran/batch_params/CSR3-openfield.py | seankmartin/lfp_atn | 647889eddfa9ba3910c74df7e61f10fd98c61854 | [
"MIT"
] | 1 | 2021-09-14T11:22:29.000Z | 2021-09-14T11:22:29.000Z | lfp_atn_simuran/batch_params/CSR3-openfield.py | seankmartin/lfp_atn | 647889eddfa9ba3910c74df7e61f10fd98c61854 | [
"MIT"
] | null | null | null | lfp_atn_simuran/batch_params/CSR3-openfield.py | seankmartin/lfp_atn | 647889eddfa9ba3910c74df7e61f10fd98c61854 | [
"MIT"
] | 1 | 2021-03-11T17:07:52.000Z | 2021-03-11T17:07:52.000Z | """simuran_batch_params.py describes behaviour for recursing through directories."""
import os
# Where to start running batch analysis from
start_dir = os.path.abspath(
os.path.join("__dirname__", "CSubRet3_sham", "recording")
)
# regex_filters should be a list of regex patterns to match against.
regex_filters =... | 32.5 | 84 | 0.752663 |
79650522d8f7c498f70bd05482456ca0c37556be | 1,910 | py | Python | postgresql/src/interfaces/python/setup.py | anjingbin/starccm | 70db48004aa20bbb82cc24de80802b40c7024eff | [
"BSD-3-Clause"
] | 2 | 2020-01-06T07:43:30.000Z | 2020-07-11T20:53:53.000Z | postgresql/src/interfaces/python/setup.py | anjingbin/starccm | 70db48004aa20bbb82cc24de80802b40c7024eff | [
"BSD-3-Clause"
] | null | null | null | postgresql/src/interfaces/python/setup.py | anjingbin/starccm | 70db48004aa20bbb82cc24de80802b40c7024eff | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Setup script for the PyGreSQL version 3
# created 2000/04 Mark Alexander <mwa@gate.net>
# tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us>
# win32 support 2001/01 Gerhard Haering <gerhard@bigfoot.de>
# requires distutils; standard in Python 1.6, otherwise download from
# http://www.pyt... | 33.508772 | 164 | 0.729843 |
7965054d9fa869cb0f2da9c818c733ff9d75cb90 | 6,500 | py | Python | src/main/ui/visualanalyzer.py | Terrathaw/ba21_loma_2_py | eebf5104dd054cef1ab61f0b257933ff679e75ec | [
"MIT"
] | null | null | null | src/main/ui/visualanalyzer.py | Terrathaw/ba21_loma_2_py | eebf5104dd054cef1ab61f0b257933ff679e75ec | [
"MIT"
] | null | null | null | src/main/ui/visualanalyzer.py | Terrathaw/ba21_loma_2_py | eebf5104dd054cef1ab61f0b257933ff679e75ec | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import *
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import soundfile as sf
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from scipy import signal as sig
import main.common.env as env
matplotlib.use("TkAgg")
LARGE_FONT = ("Verdana", 12)
c... | 40.372671 | 129 | 0.645385 |
7965055244fce93cb148ea677747fff1a1cdeb59 | 4,741 | py | Python | src/object_detection.py | atyshka/Dataspeed-Object-Detection | 93e7133c0396d5a94b8e7f9d04ffbf4ee62353c8 | [
"Apache-2.0"
] | null | null | null | src/object_detection.py | atyshka/Dataspeed-Object-Detection | 93e7133c0396d5a94b8e7f9d04ffbf4ee62353c8 | [
"Apache-2.0"
] | null | null | null | src/object_detection.py | atyshka/Dataspeed-Object-Detection | 93e7133c0396d5a94b8e7f9d04ffbf4ee62353c8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
A ROS node to detect objects via TensorFlow Object Detection API.
Author:
Cagatay Odabasi -- cagatay.odabasi@ipa.fraunhofer.de
"""
# ROS
import rospy
import cv2
from copy import deepcopy
from ds_object_detection.msg import Detection, DetectionArray, Rect
from sensor_msgs.msg import I... | 29.447205 | 73 | 0.632145 |
796505b57d31954ebdd4637e0fda24d539866b95 | 71,691 | py | Python | nova/api/ec2/cloud.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/cloud.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | nova/api/ec2/cloud.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | 43.161349 | 79 | 0.580826 |
796505c02a6bcb478e4cd260d2e3ce19bb0b36f9 | 7 | py | Python | pyghostbt/tool/loan.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | null | null | null | pyghostbt/tool/loan.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | null | null | null | pyghostbt/tool/loan.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | 2 | 2019-12-16T02:30:13.000Z | 2021-12-14T00:24:34.000Z | # 借贷逻辑。 | 7 | 7 | 0.571429 |
79650716ec44af015f4b43851ce26bb2c562adab | 1,976 | py | Python | numba/tests/test_entrypoints.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/tests/test_entrypoints.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/tests/test_entrypoints.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | import sys
import types
import pkg_resources
from .support import TestCase
class TestEntrypoints(TestCase):
"""
Test registration of init() functions from Numba extensions
"""
def test_init_entrypoint(self):
# loosely based on Pandas test from:
# https://github.com/pandas-dev/pand... | 32.393443 | 78 | 0.591093 |
79650728b247dc49da75928411021aa57fd03cb1 | 9,806 | py | Python | projects/hodgkins/diseasome.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | projects/hodgkins/diseasome.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | projects/hodgkins/diseasome.py | dhimmel/serg-pycode | 075de0ba470e4fbda5e33dfc23cb9ecd86ec53b7 | [
"BSD-2-Clause-Patent"
] | null | null | null | import itertools
import os
import csv
import collections
import networkx
import numpy
import numpy.linalg
import bioparser.data
class DiseasomeMaker(object):
def __init__(self):
self.ontology = self.get_ontology()
@staticmethod
def transfer_annotations(node_to_genes, node_goto_node):
... | 36.318519 | 132 | 0.616255 |
79650827d2d23a92b05582484547a871aadf983d | 18,218 | py | Python | bokeh/util/serialization.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | bokeh/util/serialization.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | bokeh/util/serialization.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 30.721754 | 120 | 0.585739 |
796508d630f346f25b516d3e4aea5af90e249f22 | 5,312 | py | Python | h5py/tests/types/test_types.py | qsnake/h5py | 45e77c3798032de2f740414a9e014fbca8c0ac18 | [
"BSD-3-Clause"
] | null | null | null | h5py/tests/types/test_types.py | qsnake/h5py | 45e77c3798032de2f740414a9e014fbca8c0ac18 | [
"BSD-3-Clause"
] | null | null | null | h5py/tests/types/test_types.py | qsnake/h5py | 45e77c3798032de2f740414a9e014fbca8c0ac18 | [
"BSD-3-Clause"
] | 8 | 2018-07-05T22:16:08.000Z | 2021-08-19T06:07:45.000Z |
"""
Test NumPy dtype to HDF5 type conversion.
"""
import numpy as np
from h5py import tests, h5t, h5r
class TestIntegers(tests.HTest):
def test_int(self):
""" (Types) Integer dtype to HDF5 literal """
htype = h5t.py_create('i')
self.assertIsInstance(htype, h5t.TypeIntegerID)
def... | 33.2 | 79 | 0.620858 |
79650953689d59e3b8b0570b3efe21b31628029b | 3,036 | py | Python | tests/fastapi_test.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | null | null | null | tests/fastapi_test.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | 7 | 2022-01-03T19:48:06.000Z | 2022-03-14T22:01:57.000Z | tests/fastapi_test.py | commonism/aiopenapi3 | 3efb0e65fdcdce7408c888df3f4adbad8abb4359 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import uuid
import sys
import pytest
import pytest_asyncio
import uvloop
from hypercorn.asyncio import serve
from hypercorn.config import Config
import aiopenapi3
from api.main import app
@pytest.fixture(scope="session")
def config(unused_tcp_port_factory):
c = Config()
c.bind = [f"localhos... | 32.645161 | 107 | 0.708498 |
79650978a5dd909da8891850d3f480a030c4669d | 5,336 | py | Python | scripts/01_generate_soms.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 4 | 2020-03-06T14:06:12.000Z | 2021-06-25T15:03:54.000Z | scripts/01_generate_soms.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 3 | 2020-03-25T10:54:52.000Z | 2020-11-26T19:06:23.000Z | scripts/01_generate_soms.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 2 | 2020-04-14T11:26:25.000Z | 2021-04-02T19:25:52.000Z | #!/usr/bin/env python3
"""
Train a reference SOM and optionally use that to transform the given
dataset.
"""
import logging
import json
from collections import defaultdict
import pandas as pd
from argmagic import argmagic
from flowcat import utils, io_functions, sommodels
from flowcat.dataset import case_dataset
from... | 31.952096 | 91 | 0.644678 |
7965099401576913b909ea8bd77ef87751f8d8a7 | 2,840 | py | Python | colour/models/rgb/datasets/dji_dgamut.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | 2 | 2020-05-03T20:15:42.000Z | 2021-04-09T18:19:06.000Z | colour/models/rgb/datasets/dji_dgamut.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | null | null | null | colour/models/rgb/datasets/dji_dgamut.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | 1 | 2019-12-11T19:48:27.000Z | 2019-12-11T19:48:27.000Z | # -*- coding: utf-8 -*-
"""
DJI D-Gamut Colourspace
=======================
Defines the *DJI D-Gamut* colourspace:
- :attr:`colour.models.DJI_D_GAMUT_COLOURSPACE`.
See Also
--------
`RGB Colourspaces Jupyter Notebook
<http://nbviewer.jupyter.org/github/colour-science/colour-notebooks/\
blob/master/notebooks/models... | 26.542056 | 78 | 0.676761 |
79650a3a95d60d0fbe744b0f85e0d6aa4d82d9b6 | 44,897 | py | Python | test/functional/feature_segwit.py | ElizabethOkerio/Whive-Core | ac81ed549ed75b21209b67b80eddf10b459ed6f5 | [
"MIT"
] | 1 | 2020-04-15T19:20:47.000Z | 2020-04-15T19:20:47.000Z | test/functional/feature_segwit.py | ElizabethOkerio/Whive-Core | ac81ed549ed75b21209b67b80eddf10b459ed6f5 | [
"MIT"
] | null | null | null | test/functional/feature_segwit.py | ElizabethOkerio/Whive-Core | ac81ed549ed75b21209b67b80eddf10b459ed6f5 | [
"MIT"
] | null | null | null | #!/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 the SegWit changeover logic."""
from decimal import Decimal
from test_framework.address import (... | 59.782956 | 224 | 0.681315 |
79650afc1f6ba3d9d5933ce0ad1d1721360b54db | 10,745 | py | Python | packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py | benlindsay/plotly.py | 51ec6cb50d537a37da704ca74c07f11b62730110 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py | benlindsay/plotly.py | 51ec6cb50d537a37da704ca74c07f11b62730110 | [
"MIT"
] | 1 | 2022-01-22T14:39:41.000Z | 2022-01-22T14:39:41.000Z | packages/python/plotly/plotly/validators/heatmapgl/_colorbar.py | RARedeem/plotly.py | 8289eb1c85125e147c4ce14b56272ed50b99ef20 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="colorbar", parent_name="heatmapgl", **kwargs):
super(ColorbarValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 47.334802 | 82 | 0.526105 |
79650b4340d0f5b998b39f833436d37aa866c1b3 | 4,441 | py | Python | steampipe_alchemy/models/aws_redshift_cluster.py | dboeke/steampipe_alchemy | a02513d59288c554919747482e378315c3b0780d | [
"BSD-3-Clause"
] | null | null | null | steampipe_alchemy/models/aws_redshift_cluster.py | dboeke/steampipe_alchemy | a02513d59288c554919747482e378315c3b0780d | [
"BSD-3-Clause"
] | null | null | null | steampipe_alchemy/models/aws_redshift_cluster.py | dboeke/steampipe_alchemy | a02513d59288c554919747482e378315c3b0780d | [
"BSD-3-Clause"
] | null | null | null | from sqlalchemy import Column
from sqlalchemy.types import JSON, Text, Boolean, TIMESTAMP, BigInteger
from sqlalchemy.dialects import postgresql as psql
from steampipe_alchemy import Base
class AwsRedshiftCluster(Base):
__tablename__ = 'aws_redshift_cluster'
cluster_identifier = Column('cluster_identifier', T... | 71.629032 | 124 | 0.782707 |
79650b4cfb9ca8871254b21300a8a41cd70a2962 | 3,527 | py | Python | bindings/python/ensmallen/datasets/string/actinomaduralatinanbrc106108.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/actinomaduralatinanbrc106108.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/actinomaduralatinanbrc106108.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Actinomadura latina NBRC 106108.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein... | 33.590476 | 223 | 0.681032 |
79650cd1c747090e61e999fa5ff39c08f1e884c0 | 849 | py | Python | samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py | data-experts/openapi-generator | b86a51ae17e25feae0e0c9f9e6f423b8ff54057d | [
"Apache-2.0"
] | 1 | 2020-08-07T08:38:39.000Z | 2020-08-07T08:38:39.000Z | samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py | data-experts/openapi-generator | b86a51ae17e25feae0e0c9f9e6f423b8ff54057d | [
"Apache-2.0"
] | 5 | 2021-05-11T22:59:16.000Z | 2022-02-27T10:31:06.000Z | samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py | data-experts/openapi-generator | b86a51ae17e25feae0e0c9f9e6f423b8ff54057d | [
"Apache-2.0"
] | 1 | 2019-10-06T12:57:47.000Z | 2019-10-06T12:57:47.000Z | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 21.769231 | 174 | 0.683157 |
79650d228be82124d96dfd3ca6afc67a0ee4cd53 | 1,350 | py | Python | agent/indy_catalyst_agent/transport/inbound/manager.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/transport/inbound/manager.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/transport/inbound/manager.py | blhagadorn/indy-catalyst | c268dba024096d312f541fde40443a1757f21661 | [
"Apache-2.0"
] | null | null | null | """Inbound transport manager."""
import logging
from .base import BaseInboundTransport
from ...classloader import ClassLoader, ModuleLoadError, ClassNotFoundError
MODULE_BASE_PATH = "indy_catalyst_agent.transport.inbound"
class InboundTransportManager:
"""Inbound transport manager class."""
def __init__(s... | 30.681818 | 79 | 0.66963 |
79650df6bab3011a8e39b19e6a940785cb303c27 | 21,928 | py | Python | tests/test_binaries.py | qibaoyuan/fairseq | eabd07fdcfd5b007d05428e81a31b7f3fc5de959 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T10:28:13.000Z | 2022-01-05T10:28:13.000Z | tests/test_binaries.py | vineelpratap/fairseq | 208295dfc76492748500f97a4f9a808d8053a184 | [
"BSD-3-Clause"
] | null | null | null | tests/test_binaries.py | vineelpratap/fairseq | 208295dfc76492748500f97a4f9a808d8053a184 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import contextlib
from io import S... | 39.017794 | 112 | 0.526496 |
79650e1d0453304a984af5526eee8ed9b2ed1eff | 992 | py | Python | aldryn_people/migrations/0022_auto_20190110_1746.py | evgeny-dmi3ev/js-people | d2b09030d268ffd557909a5eebb787bf4d0c2d1f | [
"BSD-3-Clause"
] | null | null | null | aldryn_people/migrations/0022_auto_20190110_1746.py | evgeny-dmi3ev/js-people | d2b09030d268ffd557909a5eebb787bf4d0c2d1f | [
"BSD-3-Clause"
] | 1 | 2019-01-15T16:06:44.000Z | 2019-01-15T16:06:44.000Z | aldryn_people/migrations/0022_auto_20190110_1746.py | evgeny-dmi3ev/js-people | d2b09030d268ffd557909a5eebb787bf4d0c2d1f | [
"BSD-3-Clause"
] | 1 | 2019-01-09T11:53:59.000Z | 2019-01-09T11:53:59.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-01-10 17:46
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image
class Migration(migrations.Migration):
dependencies = [
m... | 33.066667 | 204 | 0.685484 |
79650eecb2637bd19d57568db9877d328047eef0 | 1,352 | py | Python | setup.py | tillhainbach/ANSIEscapes | 4264f2352fb3bdd7ae04e01c2e44a30eadecf946 | [
"MIT"
] | null | null | null | setup.py | tillhainbach/ANSIEscapes | 4264f2352fb3bdd7ae04e01c2e44a30eadecf946 | [
"MIT"
] | null | null | null | setup.py | tillhainbach/ANSIEscapes | 4264f2352fb3bdd7ae04e01c2e44a30eadecf946 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import os
from version_query import predict_version_str
file_dir = os.path.abspath(os.path.dirname(__file__))
__version__ = predict_version_str().split("+") [0]
name = 'pyansiescapes'
# Get the long description from the README file
with open(os.path.join(file_dir, 'README.m... | 34.666667 | 108 | 0.66568 |
796510faa9edf37a7d02cf9f14e05fd28b6c7d85 | 3,370 | py | Python | cirq-core/cirq/ion/convert_to_ion_gates_test.py | Saibaba-Alapati/Cirq | 782efcd04c3bbf73a0d630306a3d1cfd9966521d | [
"Apache-2.0"
] | 2 | 2019-01-12T07:10:32.000Z | 2020-09-08T03:47:22.000Z | cirq-core/cirq/ion/convert_to_ion_gates_test.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 5 | 2020-08-20T01:03:57.000Z | 2021-04-13T00:26:48.000Z | cirq-core/cirq/ion/convert_to_ion_gates_test.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 1 | 2021-12-30T21:50:00.000Z | 2021-12-30T21:50:00.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.040404 | 97 | 0.672107 |
7965112136c7dd31bd1fe846b3ceef461fadcd58 | 5,857 | py | Python | pype/hosts/tvpaint/plugins/publish/collect_workfile_data.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/tvpaint/plugins/publish/collect_workfile_data.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/tvpaint/plugins/publish/collect_workfile_data.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | import os
import json
import pyblish.api
import avalon.api
from avalon.tvpaint import pipeline, lib
class ResetTVPaintWorkfileMetadata(pyblish.api.Action):
"""Fix invalid metadata in workfile."""
label = "Reset invalid workfile metadata"
on = "failed"
def process(self, context, plugin):
meta... | 37.06962 | 77 | 0.603039 |
79651188fb517e5ec3784097835f36b03482bbcc | 1,087 | py | Python | endpoints_management/control/signing.py | lumapps/endpoints-management-python | 0408547e82de2a344ebb6b5600559f82e78c3980 | [
"Apache-2.0"
] | 22 | 2016-09-01T16:40:34.000Z | 2020-12-13T14:54:18.000Z | endpoints_management/control/signing.py | lumapps/endpoints-management-python | 0408547e82de2a344ebb6b5600559f82e78c3980 | [
"Apache-2.0"
] | 69 | 2016-09-01T22:25:16.000Z | 2020-10-20T07:44:10.000Z | endpoints_management/control/signing.py | lumapps/endpoints-management-python | 0408547e82de2a344ebb6b5600559f82e78c3980 | [
"Apache-2.0"
] | 20 | 2016-09-01T22:05:07.000Z | 2022-03-13T02:26:59.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 33.96875 | 80 | 0.707452 |
796511f704eb033394025dfed5cfe16a4d941080 | 54 | py | Python | sharedData.py | raghavendramanandi/SSLAutoPilot | e5b54dc54bb0710dce236aa98d22d46bc445f68a | [
"MIT"
] | null | null | null | sharedData.py | raghavendramanandi/SSLAutoPilot | e5b54dc54bb0710dce236aa98d22d46bc445f68a | [
"MIT"
] | null | null | null | sharedData.py | raghavendramanandi/SSLAutoPilot | e5b54dc54bb0710dce236aa98d22d46bc445f68a | [
"MIT"
] | null | null | null | csrFile = ""
certbotLocation = ""
webrootLocation = "" | 18 | 20 | 0.685185 |
796512c3feacf84bdf6a82f098c58c3ff19aee47 | 4,086 | py | Python | src/descriptor_tools/__init__.py | sad2project/descriptor-tools | ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb | [
"CC0-1.0"
] | 10 | 2015-12-15T02:17:49.000Z | 2021-08-15T12:25:06.000Z | src/descriptor_tools/__init__.py | sad2project/descriptor-tools | ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb | [
"CC0-1.0"
] | 1 | 2016-06-26T22:21:08.000Z | 2016-06-27T05:29:53.000Z | src/descriptor_tools/__init__.py | sad2project/descriptor-tools | ebeaba07e8519dbda25ddaa34ce9a9c49891e2bb | [
"CC0-1.0"
] | 3 | 2017-11-19T01:16:30.000Z | 2019-10-08T23:22:29.000Z | # coding=utf-8
"""
# descriptor-tools
A collection of classes and functions to make the creation of descriptors
simpler and quicker. Most of the ideas present in this library were presented,
but not fully fleshed out in my book (link to the book), *Python Descriptors: A
Comprehensive Guide*.
The first major contributi... | 49.829268 | 80 | 0.799559 |
796512d29adb4dc9d2969aa7944c3d756ba86d46 | 672 | py | Python | trails/feeds/cruzit.py | jayvdb/maltrail | 4a23621cea36309a195bffb8703d42fb2ab88908 | [
"MIT"
] | 2 | 2020-03-26T14:55:59.000Z | 2020-12-16T09:13:51.000Z | trails/feeds/cruzit.py | BUGUB/maltrail | 09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e | [
"MIT"
] | null | null | null | trails/feeds/cruzit.py | BUGUB/maltrail | 09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e | [
"MIT"
] | 1 | 2020-11-09T07:16:27.000Z | 2020-11-09T07:16:27.000Z | #!/usr/bin/env python
"""
Copyright (c) 2014-2020 Maltrail developers (https://github.com/stamparm/maltrail/)
See the file 'LICENSE' for copying permission
"""
from core.common import retrieve_content
__url__ = "https://www.cruzit.com/xxwbl2txt.php"
__check__ = "ipaddress"
__info__ = "known attacker"
__reference__ =... | 24.888889 | 83 | 0.650298 |
7965145d893d9c7222c43b3e60157c3c32d0204b | 46,928 | py | Python | .jupyter/jupyter_notebook_config.py | codechaotic/fml | 5a4702c611af2d89c1b841e6c12609a8d0cc65e4 | [
"MIT"
] | null | null | null | .jupyter/jupyter_notebook_config.py | codechaotic/fml | 5a4702c611af2d89c1b841e6c12609a8d0cc65e4 | [
"MIT"
] | null | null | null | .jupyter/jupyter_notebook_config.py | codechaotic/fml | 5a4702c611af2d89c1b841e6c12609a8d0cc65e4 | [
"MIT"
] | null | null | null | # Configuration file for jupyter-notebook.
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging fo... | 37.482428 | 144 | 0.711068 |
7965148b02fa91cad0dc8b660f49952a11faf494 | 786 | py | Python | series_generator_2.py | Santhoshkumard11/Day_2_Day_Python | 877955ab5dbe990b4369702f1ae92428df63caef | [
"Unlicense"
] | 4 | 2019-04-03T01:02:21.000Z | 2022-03-08T11:07:42.000Z | series_generator_2.py | Santhoshkumard11/Day_2_Day_Python | 877955ab5dbe990b4369702f1ae92428df63caef | [
"Unlicense"
] | null | null | null | series_generator_2.py | Santhoshkumard11/Day_2_Day_Python | 877955ab5dbe990b4369702f1ae92428df63caef | [
"Unlicense"
] | null | null | null | #question 1
#generate the series
# #3 5 8 13 20 31 44 61 80 103 132 163
#method to generate the prime number
def prime_number_generator(n):
primeList = [0]
condition,num = 0,2
while condition < n:
for itr in range(2,num):
if (num % itr) == 0:
... | 21.243243 | 58 | 0.600509 |
79651493492edfe1f13961643013b715af986b92 | 1,650 | py | Python | setup.py | GetAttached/vdist | 58bb69b8c4edb57f90c1d7aa67180b415aab99a6 | [
"MIT"
] | null | null | null | setup.py | GetAttached/vdist | 58bb69b8c4edb57f90c1d7aa67180b415aab99a6 | [
"MIT"
] | null | null | null | setup.py | GetAttached/vdist | 58bb69b8c4edb57f90c1d7aa67180b415aab99a6 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import ci_scripts.ci_tools as tools
VDIST_PACKAGES_CONFIG = "packaging/vdist_build.cnf"
setup(
name='vdist',
# Version is set in packaging/vdist_build.cnf and returned through
# tools.get_current_version().
version=tools.get_current_version(VDIST_PACKAGES_CO... | 40.243902 | 78 | 0.640606 |
7965158d6770b81fff944c3179bc9eff47c5740c | 2,638 | py | Python | tools/analysis/benchmark.py | Naoki-Wake/mmaction2 | a2032605db82509744a18d993c94a06feb1efd15 | [
"Apache-2.0"
] | 648 | 2021-06-24T19:33:09.000Z | 2022-03-31T06:27:24.000Z | tools/analysis/benchmark.py | jayleicn/mmaction2-1 | 0a6fde1abb8403f1f68b568f5b4694c6f828e27e | [
"Apache-2.0"
] | 53 | 2021-07-01T03:07:52.000Z | 2022-03-27T16:15:29.000Z | tools/analysis/benchmark.py | jayleicn/mmaction2-1 | 0a6fde1abb8403f1f68b568f5b4694c6f828e27e | [
"Apache-2.0"
] | 117 | 2021-06-25T01:22:32.000Z | 2022-03-31T08:33:55.000Z | import argparse
import time
import torch
from mmcv import Config
from mmcv.cnn import fuse_conv_bn
from mmcv.parallel import MMDataParallel
from mmcv.runner.fp16_utils import wrap_fp16_model
from mmaction.datasets import build_dataloader, build_dataset
from mmaction.models import build_model
def parse_args():
p... | 28.365591 | 79 | 0.635709 |
79651660edc411a71164b3e22a4f68f076042923 | 903 | py | Python | gstatus_discovery.py | MrCirca/zabbix-glusterfs | 71c3415eb5b5a665d2818e58b39b20e02d7ca572 | [
"MIT"
] | 17 | 2018-01-15T10:55:58.000Z | 2020-03-30T19:37:01.000Z | gstatus_discovery.py | MrCirca/zabbix-glusterfs | 71c3415eb5b5a665d2818e58b39b20e02d7ca572 | [
"MIT"
] | 4 | 2018-07-25T14:57:44.000Z | 2022-01-05T14:53:07.000Z | gstatus_discovery.py | MrCirca/zabbix-glusterfs | 71c3415eb5b5a665d2818e58b39b20e02d7ca572 | [
"MIT"
] | 19 | 2018-01-30T13:03:45.000Z | 2022-01-05T14:29:46.000Z | #!/usr/bin/python3
import json
import subprocess
import sys
gluster_volume_names = []
gstatus_output = subprocess.check_output('gstatus -a -o json ', shell=True).decode()
date, time, json_part = gstatus_output.split(maxsplit=2)
gluster_info = json.loads(json_part)
volume_list = gluster_info["volume_summary"]
nargs = ... | 25.8 | 84 | 0.644518 |
796516e52ab1a676329e851357da8c019a63380f | 3,473 | py | Python | wpwatcher/daemon.py | mediaonegroup/WPWatcher | a8289af766e604e1c8f7d538513bf69dd74bfb50 | [
"Apache-2.0"
] | 27 | 2020-03-22T08:15:19.000Z | 2022-02-09T14:51:25.000Z | wpwatcher/daemon.py | mediaonegroup/WPWatcher | a8289af766e604e1c8f7d538513bf69dd74bfb50 | [
"Apache-2.0"
] | 38 | 2020-04-09T14:59:36.000Z | 2021-04-25T20:10:19.000Z | wpwatcher/daemon.py | mediaonegroup/WPWatcher | a8289af766e604e1c8f7d538513bf69dd74bfb50 | [
"Apache-2.0"
] | 11 | 2020-04-17T01:07:19.000Z | 2021-11-12T00:08:34.000Z |
from typing import Optional
import time
from datetime import datetime, timedelta
from wpwatcher import log
from wpwatcher.core import WPWatcher
from wpwatcher.config import Config
from wpwatcher.report import ScanReport
from wpwatcher.site import Site
from filelock import FileLock, Timeout
# Date format used everyw... | 38.164835 | 126 | 0.619061 |
79651890a0811b14bfa6ab8405993790602ced42 | 973 | py | Python | users/schema.py | sun337/django-postgres-graphql-boilerplate | 0e48cf87aa74c32f76ffcd7bf30291080891e363 | [
"MIT"
] | null | null | null | users/schema.py | sun337/django-postgres-graphql-boilerplate | 0e48cf87aa74c32f76ffcd7bf30291080891e363 | [
"MIT"
] | null | null | null | users/schema.py | sun337/django-postgres-graphql-boilerplate | 0e48cf87aa74c32f76ffcd7bf30291080891e363 | [
"MIT"
] | null | null | null | import graphene
from graphene_django.types import DjangoObjectType
from users.models import User
from graphql import GraphQLError
from graphql_jwt.decorators import login_required
class UserType(DjangoObjectType):
class Meta:
model = User
exclude_fields = ['password']
class Query(graphene.ObjectType):
use... | 24.325 | 68 | 0.736896 |
7965193034804baf273400624e729c73034d6a72 | 11,370 | py | Python | tools/det3d/torchie/apis/train.py | yukke42/CenterPointTensorRT | c06ec5da881b4f44f22f9e4b67bebbd35b7d1ed3 | [
"MIT"
] | 68 | 2021-12-06T06:30:13.000Z | 2022-03-30T08:37:19.000Z | tools/det3d/torchie/apis/train.py | yukke42/CenterPointTensorRT | c06ec5da881b4f44f22f9e4b67bebbd35b7d1ed3 | [
"MIT"
] | 8 | 2022-01-07T09:41:02.000Z | 2022-03-22T12:33:07.000Z | tools/det3d/torchie/apis/train.py | yukke42/CenterPointTensorRT | c06ec5da881b4f44f22f9e4b67bebbd35b7d1ed3 | [
"MIT"
] | 22 | 2021-12-15T02:15:27.000Z | 2022-03-30T08:37:22.000Z | from __future__ import division
import re
from collections import OrderedDict, defaultdict
from functools import partial
try:
import apex
except:
print("No APEX!")
import numpy as np
import torch
from det3d.builder import _create_learning_rate_scheduler
# from det3d.datasets.kitti.eval_hooks import KittiDis... | 33.738872 | 125 | 0.640809 |
796519e06a4ab8686e366dbb3c924ce81a114ee2 | 9,711 | py | Python | docs/conf.py | lopter-dbx/envoy | d342e96e7ba2319329838e799021838354e88118 | [
"Apache-2.0"
] | 5 | 2020-11-30T15:36:04.000Z | 2022-02-28T00:30:28.000Z | docs/conf.py | lopter-dbx/envoy | d342e96e7ba2319329838e799021838354e88118 | [
"Apache-2.0"
] | 104 | 2021-10-03T11:09:20.000Z | 2022-01-05T00:21:59.000Z | docs/conf.py | lopter-dbx/envoy | d342e96e7ba2319329838e799021838354e88118 | [
"Apache-2.0"
] | 12 | 2020-09-11T14:26:33.000Z | 2022-03-24T12:26:30.000Z | # -*- coding: utf-8 -*-
#
# envoy documentation build configuration file, created by
# sphinx-quickstart on Sat May 28 10:51:27 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 34.314488 | 99 | 0.73185 |
79651afee087fa58019639c7f723ebb9f0f93e53 | 807 | py | Python | recipes/Python/456372_Purge/recipe-456372.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/456372_Purge/recipe-456372.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/456372_Purge/recipe-456372.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | import os, sys
def purge(path):
for name in os.listdir(path):
path_name = os.path.join(path, name)
try:
if os.path.isdir(path_name):
purge(path_name)
elif os.path.isfile(path_name):
size = os.path.getsize(path_name)
file(path_n... | 26.032258 | 61 | 0.506815 |
79651b154a5135f8c551f2eeff641681c7cd8e1f | 239 | py | Python | Python/sort/sort_util/__init__.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | 1 | 2018-10-31T10:36:34.000Z | 2018-10-31T10:36:34.000Z | Python/sort/sort_util/__init__.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | null | null | null | Python/sort/sort_util/__init__.py | BackEndTea/Learning | ccbf8fdbb8fb23643898d73e64fe7442ab46b791 | [
"MIT"
] | 2 | 2021-05-06T11:18:25.000Z | 2021-12-04T07:56:29.000Z | from sort_util.utility import merge
from sort_util.utility import heapify
from sort_util.utility import Pile
from sort_util.utility import create_heap
from sort_util.utility import dequeue_max
from sort_util.utility import insertion_sort
| 29.875 | 44 | 0.870293 |
79651b8c5365dd95bb92045e36340ba291a73d49 | 14,600 | py | Python | cloudkitty/storage/v2/elasticsearch/client.py | shanafang9/cloudkitty | 911c90569ccb09ecf0d7aa11a5a707c8ebda09cf | [
"Apache-2.0"
] | 1 | 2021-11-23T02:23:19.000Z | 2021-11-23T02:23:19.000Z | cloudkitty/storage/v2/elasticsearch/client.py | shanafang9/cloudkitty | 911c90569ccb09ecf0d7aa11a5a707c8ebda09cf | [
"Apache-2.0"
] | null | null | null | cloudkitty/storage/v2/elasticsearch/client.py | shanafang9/cloudkitty | 911c90569ccb09ecf0d7aa11a5a707c8ebda09cf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Objectif Libre
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 35.696822 | 79 | 0.578425 |
79651bede5da64fce80ac328c1c3a44cdbf53506 | 35,342 | py | Python | lib/twisted/words/protocols/jabber/xmlstream.py | Kagami/kisa | 2597f67e519b8d66fec2684ff5a7726436bb029b | [
"CC0-1.0"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | lib/twisted/words/protocols/jabber/xmlstream.py | Kagami/kisa | 2597f67e519b8d66fec2684ff5a7726436bb029b | [
"CC0-1.0"
] | null | null | null | lib/twisted/words/protocols/jabber/xmlstream.py | Kagami/kisa | 2597f67e519b8d66fec2684ff5a7726436bb029b | [
"CC0-1.0"
] | 3 | 2015-03-10T20:56:17.000Z | 2021-08-21T02:44:24.000Z | # -*- test-case-name: twisted.words.test.test_jabberxmlstream -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
XMPP XML Streams
Building blocks for setting up XML Streams, including helping classes for
doing authentication on either client or server side, and working with XML
Stanzas.... | 31.083553 | 80 | 0.640145 |
79651c15ff4eb80030194b007a27f29d4bfc9fda | 552 | py | Python | 강의 자료/02-알고리즘/15~17-동적 프로그래밍/문제별 코드/2156-포도주 시식/solution.py | rhs0266/FastCampus | 88b5f4c18ebfb9ebf141ace644e40d2975ff665a | [
"MIT"
] | 407 | 2020-11-14T02:25:56.000Z | 2022-03-31T04:12:17.000Z | 강의 자료/02-알고리즘/15~17-동적 프로그래밍/문제별 코드/2156-포도주 시식/solution.py | rhs0266/FastCampus | 88b5f4c18ebfb9ebf141ace644e40d2975ff665a | [
"MIT"
] | 48 | 2020-11-16T15:29:10.000Z | 2022-03-14T06:32:16.000Z | 강의 자료/02-알고리즘/15~17-동적 프로그래밍/문제별 코드/2156-포도주 시식/solution.py | rhs0266/FastCampus | 88b5f4c18ebfb9ebf141ace644e40d2975ff665a | [
"MIT"
] | 78 | 2020-11-28T08:29:39.000Z | 2022-03-29T06:54:48.000Z | import sys
si = sys.stdin.readline
n = int(si())
a= [0] * n
for i in range(n):
a[i] = int(si())
dy = [[0, 0] for _ in range(n + 2)]
# 초기값 채우기
dy[0][0], dy[0][1] = 0, a[0]
if n >= 2:
dy[1][0], dy[1][1] = a[1], a[0] + a[1]
# 점화식을 토대로 dy 배열 채우기
for i in range(2, n):
dy[i][0] = max(dy[i - 2][0] + a[i], dy[... | 19.034483 | 79 | 0.427536 |
79651d2c25aeb69492e957a060fc6e155728f66d | 273 | py | Python | src/authentication/mailchimp/__init__.py | pykulytsky/freelance-service | 0f6e36093128ae3e63bd7dcf21959882eae7e683 | [
"MIT"
] | null | null | null | src/authentication/mailchimp/__init__.py | pykulytsky/freelance-service | 0f6e36093128ae3e63bd7dcf21959882eae7e683 | [
"MIT"
] | 45 | 2021-01-18T14:01:20.000Z | 2021-08-02T07:40:10.000Z | src/authentication/mailchimp/__init__.py | pykulytsky/freelance-service | 0f6e36093128ae3e63bd7dcf21959882eae7e683 | [
"MIT"
] | 1 | 2021-01-26T09:58:22.000Z | 2021-01-26T09:58:22.000Z | from authentication.mailchimp.client import AppMailchimp
from authentication.mailchimp.http import MailchimpHTTPException
from authentication.mailchimp.member import MailchimpMember
__all__ = [
AppMailchimp,
MailchimpMember,
MailchimpHTTPException,
]
| 27.3 | 65 | 0.805861 |
79651d67da9f8dcea4e7da0799da51365c60afd3 | 9,513 | py | Python | readthedocs/projects/migrations/0013_remove_extensions_and_docpath.py | ardalis/readthedocs.org | 1c417d866f014e01d3842022facf7fed4c09921a | [
"MIT"
] | 2 | 2015-08-08T11:32:34.000Z | 2017-11-12T18:17:05.000Z | readthedocs/projects/migrations/0013_remove_extensions_and_docpath.py | ardalis/readthedocs.org | 1c417d866f014e01d3842022facf7fed4c09921a | [
"MIT"
] | 5 | 2021-02-08T20:51:19.000Z | 2021-12-13T20:45:26.000Z | readthedocs/projects/migrations/0013_remove_extensions_and_docpath.py | ardalis/readthedocs.org | 1c417d866f014e01d3842022facf7fed4c09921a | [
"MIT"
] | 14 | 2017-01-12T11:17:42.000Z | 2019-04-19T10:09:15.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Project.docs_directory'
db.delete_column('projects_project', 'docs_directory')
... | 72.068182 | 182 | 0.567329 |
79651d9b83b88e5caf43e51d2a76499f1117e154 | 2,382 | py | Python | run_mypy.py | kennylevinsen/meson | 9851c2589521d5933170b8405da84b8bc8295b51 | [
"Apache-2.0"
] | null | null | null | run_mypy.py | kennylevinsen/meson | 9851c2589521d5933170b8405da84b8bc8295b51 | [
"Apache-2.0"
] | null | null | null | run_mypy.py | kennylevinsen/meson | 9851c2589521d5933170b8405da84b8bc8295b51 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from pathlib import Path
import argparse
import os
import subprocess
import sys
import typing as T
from mesonbuild.mesonlib import version_compare
modules = [
# fully typed submodules
'mesonbuild/ast',
'mesonbuild/cmake',
'mesonbuild/compilers',
'mesonbuild/dependencies',
... | 26.175824 | 108 | 0.654072 |
7965200ab4543098ce72b0092e916861b6b367d6 | 2,930 | py | Python | abletondrumrack/adg.py | kant/Ableton-Drum-Rack | 54dc3615c424d087e73dec4698a8049688079c54 | [
"MIT"
] | null | null | null | abletondrumrack/adg.py | kant/Ableton-Drum-Rack | 54dc3615c424d087e73dec4698a8049688079c54 | [
"MIT"
] | null | null | null | abletondrumrack/adg.py | kant/Ableton-Drum-Rack | 54dc3615c424d087e73dec4698a8049688079c54 | [
"MIT"
] | null | null | null | """ Create the '.adg' preset file. """
import os
import gzip
from xml.etree import ElementTree as ET
def write_adg(blank, fname, path):
"""
Write the adg file.
"""
blank.write(fname + '.xml')
with open(fname + '.xml') as new:
header = '<?xml version="1.0" encoding="UTF-8"?>\n'
... | 40.136986 | 106 | 0.5843 |
7965200e7b6f2060ce39e8bb8bd42c531aa4aae9 | 10,303 | py | Python | data_sampling/flower_tuple_loader.py | ahmdtaha/softmax_triplet_loss | 1f9e382f64e500a07b06fc128a4be86fa29326c8 | [
"Apache-2.0"
] | 21 | 2019-09-09T05:57:33.000Z | 2022-01-23T17:16:47.000Z | data_sampling/flower_tuple_loader.py | ahmdtaha/softmax_triplet_loss | 1f9e382f64e500a07b06fc128a4be86fa29326c8 | [
"Apache-2.0"
] | 1 | 2019-09-06T07:15:44.000Z | 2019-09-09T14:15:04.000Z | data_sampling/flower_tuple_loader.py | ahmdtaha/softmax_triplet_loss | 1f9e382f64e500a07b06fc128a4be86fa29326c8 | [
"Apache-2.0"
] | 2 | 2020-01-15T13:51:19.000Z | 2020-01-27T17:44:30.000Z | import scipy.io as sio
# import configuration as config
import constants as const
import numpy as np
import imageio
import os
import cv2
from utils import os_utils
import time
import sys
import glob
import pandas as pd
# from data_sampling.preprocess_factory import PreProcessFactory
from multiprocessing.dummy import Po... | 40.089494 | 120 | 0.611375 |
79652045a3ffbc1a303e038aa4bb5f33f5b77220 | 16,941 | py | Python | improver_tests/blending/weighted_blend/test_MergeCubesForWeightedBlending.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/blending/weighted_blend/test_MergeCubesForWeightedBlending.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/blending/weighted_blend/test_MergeCubesForWeightedBlending.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 44.232376 | 86 | 0.665545 |
796520aee1d634a01a6a6d72abc36bb37de07298 | 4,078 | py | Python | wsi_2/algorithm.py | hornisslaw/wsi | a58c055109b7b16238817a5e4d9d01c6b845af0a | [
"MIT"
] | null | null | null | wsi_2/algorithm.py | hornisslaw/wsi | a58c055109b7b16238817a5e4d9d01c6b845af0a | [
"MIT"
] | null | null | null | wsi_2/algorithm.py | hornisslaw/wsi | a58c055109b7b16238817a5e4d9d01c6b845af0a | [
"MIT"
] | null | null | null | from __future__ import annotations
import numpy as np
import random
import matplotlib.pyplot as plt
from plots import plot_cycle
def initial_population(
cities: dict,
population_size: int,
starting_city: str
) -> list[list[str]]:
population = []
city_names = list(cities.keys())
... | 32.887097 | 79 | 0.61746 |
796523ded29f7830a78f0f42a1f511778322d57e | 333 | py | Python | database.py | DiegoSaragozaSilva/Megadados-P1 | fc37126851e77bbe7a4dc73cc359150a97a2687d | [
"MIT"
] | null | null | null | database.py | DiegoSaragozaSilva/Megadados-P1 | fc37126851e77bbe7a4dc73cc359150a97a2687d | [
"MIT"
] | null | null | null | database.py | DiegoSaragozaSilva/Megadados-P1 | fc37126851e77bbe7a4dc73cc359150a97a2687d | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from dotenv import dotenv_values
env = dotenv_values()
engine = create_engine(env.get('URL'))
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declara... | 25.615385 | 75 | 0.822823 |
796524968511de572a5768aaa3a92fa5d038d8cb | 9,586 | py | Python | examples/starkex-cairo/starkware/crypto/signature/signature.py | LatticeLabVentures/BeamNet | e4a755dbc52b4eaef73074b22d4431df88394b4a | [
"CC0-1.0"
] | 47 | 2020-05-24T05:31:24.000Z | 2022-03-26T23:54:01.000Z | examples/starkex-cairo/starkware/crypto/signature/signature.py | LatticeLabVentures/BeamNet | e4a755dbc52b4eaef73074b22d4431df88394b4a | [
"CC0-1.0"
] | 4 | 2021-08-11T19:07:37.000Z | 2021-11-28T09:22:51.000Z | examples/starkex-cairo/starkware/crypto/signature/signature.py | LatticeLabVentures/BeamNet | e4a755dbc52b4eaef73074b22d4431df88394b4a | [
"CC0-1.0"
] | 16 | 2020-03-01T02:40:20.000Z | 2022-03-21T10:58:00.000Z | ###############################################################################
# Copyright 2019 StarkWare Industries Ltd. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). #
... | 38.344 | 99 | 0.6256 |
79652532623a0e15684b3766c86d824b75c38a59 | 3,298 | py | Python | trove/db/sqlalchemy/mappers.py | cp16net/trove | 5daa2d6aa06c56482c3e65d52469743cfcf54535 | [
"Apache-2.0"
] | null | null | null | trove/db/sqlalchemy/mappers.py | cp16net/trove | 5daa2d6aa06c56482c3e65d52469743cfcf54535 | [
"Apache-2.0"
] | null | null | null | trove/db/sqlalchemy/mappers.py | cp16net/trove | 5daa2d6aa06c56482c3e65d52469743cfcf54535 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# 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... | 41.746835 | 78 | 0.660703 |
7965254377de2de8fa2002bcb4583aeb2d274d8f | 9,824 | py | Python | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_lower_triangular.py | leandrolcampos/probability | d50d9a85907b08d317dca934dbbd5beb47619cb0 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_lower_triangular.py | leandrolcampos/probability | d50d9a85907b08d317dca934dbbd5beb47619cb0 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_lower_triangular.py | leandrolcampos/probability | d50d9a85907b08d317dca934dbbd5beb47619cb0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Probability Authors. All Rights Reserved.
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# THIS FILE IS AUTO-GENERATED BY `gen_linear_operators.py`.
# DO NOT MODIFY DIRECTLY.
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... | 38.225681 | 113 | 0.689434 |
79652581863a3fd73d70766ca58833aec6bc5c16 | 484 | py | Python | MainWindow.py | Stray-Alex/myMail | abee4a9102844021226f5cda448eb4c1a3a336e8 | [
"MIT"
] | null | null | null | MainWindow.py | Stray-Alex/myMail | abee4a9102844021226f5cda448eb4c1a3a336e8 | [
"MIT"
] | null | null | null | MainWindow.py | Stray-Alex/myMail | abee4a9102844021226f5cda448eb4c1a3a336e8 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from MenuBar import *
class MainWindow(QMainWindow):
def __init__(self, parent=None):
super().__init__(parent)
self.resize(760, 650)
self.setWindowTitle("myMail")
bar = MenuBar(self)
if... | 19.36 | 37 | 0.64876 |
796525b65b251583cb8ddacb375741c614f9170d | 13,248 | py | Python | src/main.py | jojowither/Question-Answer-Project | f44ca52acc784e13295cb977cedb513854fac814 | [
"MIT"
] | null | null | null | src/main.py | jojowither/Question-Answer-Project | f44ca52acc784e13295cb977cedb513854fac814 | [
"MIT"
] | null | null | null | src/main.py | jojowither/Question-Answer-Project | f44ca52acc784e13295cb977cedb513854fac814 | [
"MIT"
] | null | null | null | import argparse
import glob
import logging
import os
import random
import timeit
import numpy as np
import torch
from transformers import (MODEL_FOR_QUESTION_ANSWERING_MAPPING, WEIGHTS_NAME,
AdamW, AutoConfig, AutoModelForQuestionAnswering,
AutoTokenizer, get_linear_... | 37.959885 | 126 | 0.635417 |
796527962b8ccf7c380b598f7f7f4b59764256d8 | 28,958 | py | Python | easy_thumbnails/files.py | dlam26/easy-thumbnails | e8e2aa07805cbd99d4c725dde9b8039700c4533b | [
"BSD-3-Clause"
] | null | null | null | easy_thumbnails/files.py | dlam26/easy-thumbnails | e8e2aa07805cbd99d4c725dde9b8039700c4533b | [
"BSD-3-Clause"
] | null | null | null | easy_thumbnails/files.py | dlam26/easy-thumbnails | e8e2aa07805cbd99d4c725dde9b8039700c4533b | [
"BSD-3-Clause"
] | null | null | null | import os
from django.utils import six
from django.core.files.base import File, ContentFile
from django.core.files.storage import (
default_storage, Storage)
from django.db.models.fields.files import ImageFieldFile, FieldFile
from django.core.files.images import get_image_dimensions
from django.utils.safestring i... | 38.405836 | 79 | 0.629601 |
796528e8fef6d47b1649722f7a0e865dfe7e31da | 1,114 | py | Python | wb/main/environment/validators/validator.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 23 | 2022-03-17T12:24:09.000Z | 2022-03-31T09:13:30.000Z | wb/main/environment/validators/validator.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 18 | 2022-03-21T08:17:44.000Z | 2022-03-30T12:42:30.000Z | wb/main/environment/validators/validator.py | apaniukov/workbench | 2f2653ecfd0143d2d53e33ad84379f13443fdfaa | [
"Apache-2.0"
] | 16 | 2022-03-17T12:24:14.000Z | 2022-03-31T12:15:12.000Z | """
OpenVINO DL Workbench
Base abstractions for environment validation
Copyright (c) 2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/license... | 35.935484 | 94 | 0.764811 |
796529548c087d7a5b9e0d11f7333ff1785514be | 16,972 | py | Python | pydantic/networks.py | vgerak/pydantic | 8b368ac014e16e89442d25ba1b43616e9e886489 | [
"MIT"
] | null | null | null | pydantic/networks.py | vgerak/pydantic | 8b368ac014e16e89442d25ba1b43616e9e886489 | [
"MIT"
] | null | null | null | pydantic/networks.py | vgerak/pydantic | 8b368ac014e16e89442d25ba1b43616e9e886489 | [
"MIT"
] | null | null | null | import re
from ipaddress import (
IPv4Address,
IPv4Interface,
IPv4Network,
IPv6Address,
IPv6Interface,
IPv6Network,
_BaseAddress,
_BaseNetwork,
)
from typing import (
TYPE_CHECKING,
Any,
Dict,
FrozenSet,
Generator,
Optional,
Pattern,
Set,
Tuple,
Ty... | 29.827768 | 118 | 0.596512 |
796529f4d6cba22c38f184b5f8bc0ec8242a2dbf | 294 | py | Python | setup.py | ErikEkstedt/TurnGPT | cd2efed91d2d117a7eb20a207a39696303b94657 | [
"MIT"
] | 5 | 2021-03-16T15:58:31.000Z | 2022-01-27T06:50:52.000Z | setup.py | Throde/TurnGPT | 162d4604174df35e59aae25a58595408cec1722f | [
"MIT"
] | 1 | 2022-01-27T06:50:16.000Z | 2022-01-27T06:50:16.000Z | setup.py | Throde/TurnGPT | 162d4604174df35e59aae25a58595408cec1722f | [
"MIT"
] | 3 | 2021-09-15T15:08:01.000Z | 2022-03-02T18:17:05.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="turngpt",
version="0.0.0",
description="turngpt",
author="erikekst",
author_email="erikekst@kth.se",
# REPLACE WITH YOUR OWN GITHUB PROJECT LINK
url="",
packages=find_packages(),
)
| 19.6 | 47 | 0.663265 |
79652a60f633265072c619d3c561df614fde9f8c | 5,839 | py | Python | tests/test_reader.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | tests/test_reader.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | 21 | 2021-12-21T16:47:35.000Z | 2022-03-29T04:34:59.000Z | tests/test_reader.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | from pyquery import PyQuery as pq
from pelican.plugins.myst.signals import myst_yaml_register
from pelican.utils import SafeDatetime
from .helpers import assert_dict_contains, read_content_metadata, read_file
def test_read_markdown_and_metadata():
page = read_file("page.md")
assert page
assert page.titl... | 28.482927 | 93 | 0.62014 |
79652b3163295665c97e6ce4e703ad5293eb9e43 | 8,146 | py | Python | timepiece/templatetags/timepiece_tags.py | gaga3966/django-timepiece | a4a6e8152c6d55ce50f32377c443ba3c381c27ed | [
"MIT"
] | null | null | null | timepiece/templatetags/timepiece_tags.py | gaga3966/django-timepiece | a4a6e8152c6d55ce50f32377c443ba3c381c27ed | [
"MIT"
] | null | null | null | timepiece/templatetags/timepiece_tags.py | gaga3966/django-timepiece | a4a6e8152c6d55ce50f32377c443ba3c381c27ed | [
"MIT"
] | null | null | null | import datetime
from dateutil.relativedelta import relativedelta
import urllib
from django import template
from django.core.urlresolvers import reverse
from django.db.models import Sum
from django.template.defaultfilters import date as date_format_filter
from django.utils.safestring import mark_safe
from timepiece im... | 34.961373 | 89 | 0.653818 |
79652b37b7708992aa2595ce16687abffefaf4e1 | 6,266 | py | Python | python/paddle/fluid/tests/unittests/test_translated_layer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 8 | 2016-08-15T07:02:27.000Z | 2016-08-24T09:34:00.000Z | python/paddle/fluid/tests/unittests/test_translated_layer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 1 | 2021-11-01T06:28:16.000Z | 2021-11-01T06:28:16.000Z | python/paddle/fluid/tests/unittests/test_translated_layer.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 5 | 2021-12-10T11:20:06.000Z | 2022-02-18T05:18:12.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 30.715686 | 79 | 0.623364 |
79652c4baa9a972d95f37c28d0d53e310f5297d4 | 15,946 | py | Python | Python3.6-CDN_PushUrlsCache/tencentcloud/tag/v20180813/tag_client.py | tencentyun/scf-demo-repo | c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e | [
"Python-2.0",
"OLDAP-2.7"
] | 46 | 2019-03-01T02:19:18.000Z | 2021-12-18T12:37:02.000Z | Python3.6-CDN_PushUrlsCache/tencentcloud/tag/v20180813/tag_client.py | Juliiii/scf-demo-repo | 766928f14c64fbccab0713d6c6af0de3e716c9b0 | [
"Python-2.0",
"OLDAP-2.7"
] | 8 | 2019-01-22T10:46:43.000Z | 2020-12-30T13:03:04.000Z | Python2.7-CDN_Edgepack/tencentcloud/tag/v20180813/tag_client.py | tencentyun/scf-demo-repo | c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e | [
"Python-2.0",
"OLDAP-2.7"
] | 67 | 2018-10-29T09:50:49.000Z | 2022-01-06T07:35:56.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 40.992288 | 106 | 0.599774 |
79652c53e12e09e70f8a71ca40d5e4829cceb80f | 5,378 | py | Python | python/paddle/fluid/tests/unittests/ir/inference/test_reshape2_matmul_fuse_pass.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/ir/inference/test_reshape2_matmul_fuse_pass.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/ir/inference/test_reshape2_matmul_fuse_pass.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 31.822485 | 80 | 0.511714 |
79652ce162d6adf09461ea51d4c4a1a3f4453148 | 2,897 | py | Python | baselines/ppo/mlp_policy.py | yimingpeng/cmaes_baselines | 8ba0a37ab305ef98b7806866b39f560a78dfd85b | [
"MIT"
] | 1 | 2019-05-22T08:44:41.000Z | 2019-05-22T08:44:41.000Z | baselines/ppo/mlp_policy.py | yimingpeng/cmaes_baselines | 8ba0a37ab305ef98b7806866b39f560a78dfd85b | [
"MIT"
] | null | null | null | baselines/ppo/mlp_policy.py | yimingpeng/cmaes_baselines | 8ba0a37ab305ef98b7806866b39f560a78dfd85b | [
"MIT"
] | null | null | null | from baselines.common.mpi_running_mean_std import RunningMeanStd
import baselines.common.tf_util as U
import tensorflow as tf
import gym
from baselines.common.distributions import make_pdtype
class MlpPolicy(object):
recurrent = False
def __init__(self, name, *args, **kwargs):
with tf.variable_scope(na... | 45.984127 | 138 | 0.651363 |
79652d71251efcc80bc74a90edca574537c17338 | 140 | py | Python | captcha/__init__.py | stweil/django-simple-captcha | a1b6ffb0c55886f52debfe3375c0dac87c1a01ef | [
"MIT"
] | null | null | null | captcha/__init__.py | stweil/django-simple-captcha | a1b6ffb0c55886f52debfe3375c0dac87c1a01ef | [
"MIT"
] | null | null | null | captcha/__init__.py | stweil/django-simple-captcha | a1b6ffb0c55886f52debfe3375c0dac87c1a01ef | [
"MIT"
] | null | null | null | VERSION = (0, 5, 17)
def get_version():
"Return the version as a human-format string."
return ".".join([str(i) for i in VERSION])
| 20 | 50 | 0.628571 |
79652db0b092f566efb21a4097367792f1583f7c | 2,319 | py | Python | directord/components/builtin_queuesentinel.py | sshnaidm/directord | 7a0de288db23729c60bf1f4e9936dac97c69ebe6 | [
"Apache-2.0"
] | 10 | 2021-11-08T11:29:59.000Z | 2022-01-11T16:29:23.000Z | directord/components/builtin_queuesentinel.py | sshnaidm/directord | 7a0de288db23729c60bf1f4e9936dac97c69ebe6 | [
"Apache-2.0"
] | 21 | 2021-05-19T22:40:45.000Z | 2021-09-30T14:40:12.000Z | directord/components/builtin_queuesentinel.py | sshnaidm/directord | 7a0de288db23729c60bf1f4e9936dac97c69ebe6 | [
"Apache-2.0"
] | 6 | 2021-05-04T14:35:24.000Z | 2021-08-19T10:46:04.000Z | # Copyright Peznauts <kevin@cloudnull.com>. 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... | 30.92 | 77 | 0.659767 |
79652e6edb5bd5cf1ac2106eec9ca3ccf03b078d | 9,981 | py | Python | dbms/tests/integration/test_odbc_interaction/test.py | reflection/ClickHouse | af31ff24b99d389c901b89536decdfeb1a80c563 | [
"Apache-2.0"
] | 4 | 2020-04-27T13:03:31.000Z | 2020-10-15T09:51:13.000Z | dbms/tests/integration/test_odbc_interaction/test.py | reflection/ClickHouse | af31ff24b99d389c901b89536decdfeb1a80c563 | [
"Apache-2.0"
] | null | null | null | dbms/tests/integration/test_odbc_interaction/test.py | reflection/ClickHouse | af31ff24b99d389c901b89536decdfeb1a80c563 | [
"Apache-2.0"
] | 2 | 2019-12-09T10:36:46.000Z | 2022-01-13T17:14:08.000Z | import time
import pytest
import os
import pymysql.cursors
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from helpers.cluster import ClickHouseCluster
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
cluster = ClickHouseCluster(__file__, base_configs_dir=os.path.join(SCRIPT_DIR, ... | 47.528571 | 323 | 0.672578 |
7965300795a635b0b28483620e70ca99f524cb7f | 2,183 | py | Python | booktemplates.py | JulienLeonard/chichar0 | 5445a867d91022fac4ef09ef3f332c3848659d9a | [
"Apache-2.0"
] | null | null | null | booktemplates.py | JulienLeonard/chichar0 | 5445a867d91022fac4ef09ef3f332c3848659d9a | [
"Apache-2.0"
] | null | null | null | booktemplates.py | JulienLeonard/chichar0 | 5445a867d91022fac4ef09ef3f332c3848659d9a | [
"Apache-2.0"
] | null | null | null | LIST_BOOK_TEMPLATE = """\
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<div align="center">
<h1>Books list</h1>
<hr>
%s
<hr>
<form action="/" method="get">
<div><input type="submit" value="Home"></div>
</form>
</div>
"""
VI... | 20.027523 | 78 | 0.479157 |
796530ff85cb7611af995b8645914098aa418250 | 10,031 | py | Python | ENV/lib/python3.6/site-packages/tornado/test/testing_test.py | ShannonTully/data-science | f0e08aec65d9bfa7694308b653283a35a8affb26 | [
"MIT"
] | 4 | 2018-06-03T14:08:15.000Z | 2020-09-09T01:56:29.000Z | ENV/lib/python3.6/site-packages/tornado/test/testing_test.py | ShannonTully/data-science | f0e08aec65d9bfa7694308b653283a35a8affb26 | [
"MIT"
] | null | null | null | ENV/lib/python3.6/site-packages/tornado/test/testing_test.py | ShannonTully/data-science | f0e08aec65d9bfa7694308b653283a35a8affb26 | [
"MIT"
] | 3 | 2020-04-28T17:47:50.000Z | 2021-04-05T06:11:46.000Z | from __future__ import absolute_import, division, print_function
from tornado import gen, ioloop
from tornado.log import app_log
from tornado.test.util import unittest, skipBefore35, exec_test
from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, bind_unused_port, gen_test, ExpectLog
from tornado.web import Ap... | 31.844444 | 99 | 0.622371 |
79653229d66a5176ba8c28294e3f7a999b555e34 | 240 | py | Python | PIP/Minor Assignment 8/a8q7.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | null | null | null | PIP/Minor Assignment 8/a8q7.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | null | null | null | PIP/Minor Assignment 8/a8q7.py | ankitrajbiswal/SEM_5 | db716e242e77149a4091e0e564356ddc724aeff0 | [
"Apache-2.0"
] | null | null | null | def powersetsum(arr, arr1, n):
if n == 0:
print(sum(arr1))
return
arr1.append(arr[n-1])
powersetsum(arr,arr1,n-1)
arr1.pop()
powersetsum(arr,arr1,n-1)
arr=[2, 3]
arr1 =[]
powersetsum(arr, arr1, len(arr))
| 20 | 32 | 0.579167 |
796533d38ab3d1c89a992230c11646f4a432f483 | 3,988 | py | Python | datcore-sdk/python/datcore_sdk/models/reset_password_request.py | mguidon/aiohttp-dsm | 612e4c7f6f73df7d6752269965c428fda0276191 | [
"MIT"
] | null | null | null | datcore-sdk/python/datcore_sdk/models/reset_password_request.py | mguidon/aiohttp-dsm | 612e4c7f6f73df7d6752269965c428fda0276191 | [
"MIT"
] | null | null | null | datcore-sdk/python/datcore_sdk/models/reset_password_request.py | mguidon/aiohttp-dsm | 612e4c7f6f73df7d6752269965c428fda0276191 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Blackfynn Swagger
Swagger documentation for the Blackfynn api # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class ResetPasswordRequest(object):
"""NOTE: This class is auto genera... | 28.283688 | 98 | 0.587262 |
79653436e09ad2f6ac6a65eb457e1a3c6dcff71d | 3,174 | py | Python | RoboFace17_Final_Version/Processes.py | Quantico-VH/Roboface | e5b876241dd455beab30cf13a7fa810921e460e9 | [
"MIT"
] | null | null | null | RoboFace17_Final_Version/Processes.py | Quantico-VH/Roboface | e5b876241dd455beab30cf13a7fa810921e460e9 | [
"MIT"
] | null | null | null | RoboFace17_Final_Version/Processes.py | Quantico-VH/Roboface | e5b876241dd455beab30cf13a7fa810921e460e9 | [
"MIT"
] | null | null | null | import numpy as np
from threading import Thread, Event
import face
from time import sleep, time
import os
from scipy.io import wavfile
from scipy.ndimage.filters import maximum_filter1d,gaussian_filter
import matplotlib.pyplot as plt
from nltk.tokenize import sent_tokenize
import string
#download nltk punkt in order to... | 28.594595 | 137 | 0.619408 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.