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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c8fdf87fb6fbdd7efff63d64b83d94f0c4c65fb | 737 | py | Python | styler_rest_framework/business/__init__.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | 3 | 2020-08-31T06:29:15.000Z | 2021-09-08T09:24:52.000Z | styler_rest_framework/business/__init__.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | 31 | 2020-08-20T01:27:05.000Z | 2022-02-10T07:17:21.000Z | styler_rest_framework/business/__init__.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | null | null | null | """ Module for business classes
"""
from functools import wraps
from styler_rest_framework.datasource import session_scope
def session_aware(func):
"""Decorator to wrap the method inside a session aware context.
It also injects the db_session in the function, necessary to
control flush, commit, and rol... | 23.774194 | 67 | 0.632293 |
1c90032c6b7be0caa498f62c13f9f9c2b527e219 | 2,972 | py | Python | news/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | news/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | news/migrations/0001_initial.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2022-02-12 08:44
import ckeditor_uploader.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.... | 44.358209 | 186 | 0.569314 |
1c90161e8f133215343842df97a715bd4b292f39 | 8,637 | py | Python | frappe/utils/help.py | ibgadmin/frappe | bfe8ca8847817fed44dbfc279e0a23aebf17fc4b | [
"MIT"
] | null | null | null | frappe/utils/help.py | ibgadmin/frappe | bfe8ca8847817fed44dbfc279e0a23aebf17fc4b | [
"MIT"
] | null | null | null | frappe/utils/help.py | ibgadmin/frappe | bfe8ca8847817fed44dbfc279e0a23aebf17fc4b | [
"MIT"
] | 1 | 2018-03-21T16:13:12.000Z | 2018-03-21T16:13:12.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import hashlib
from frappe.model.db_schema import DbManager
from frappe.installer import get_root_connection
from frappe.database import... | 30.411972 | 109 | 0.654973 |
1c90379c9d3a16a11c3c15d38029fcbcd803a14c | 8,219 | py | Python | backend/config_app/config_orgues/config_app_styles.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | 1 | 2019-12-17T22:31:00.000Z | 2019-12-17T22:31:00.000Z | backend/config_app/config_orgues/config_app_styles.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | 10 | 2019-05-28T19:57:28.000Z | 2021-06-01T23:46:00.000Z | backend/config_app/config_orgues/config_app_styles.py | co-demos/apiviz-backend | 8a86b92dce728e81c1c935427b890da590edd720 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from . import version, uuid_models
default_app_styles_config = [
### TIERS LIEUX STYLES
### GLOBAL STYLES
{ "field" : "app_colors",
### COLOR INPUTS AS HEXA
"content" : {
### DEFAULTS
"navbar-border-color" : '#3D3A39' , #'#0... | 49.215569 | 211 | 0.536318 |
1c9044fbe2244fb8ade53c5822779d875f6335f1 | 1,862 | py | Python | tests/test_model_priorityChange.py | clockworksspheres/eisenban | 9a61e45a43c57207bded5d1ad69dd9dabb2167e3 | [
"Unlicense"
] | null | null | null | tests/test_model_priorityChange.py | clockworksspheres/eisenban | 9a61e45a43c57207bded5d1ad69dd9dabb2167e3 | [
"Unlicense"
] | null | null | null | tests/test_model_priorityChange.py | clockworksspheres/eisenban | 9a61e45a43c57207bded5d1ad69dd9dabb2167e3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env -S python -u
"""
Template for tests
"""
#--- Native python libraries
import re
import os
import sys
import time
import unittest
import tempfile
import ctypes as C
from datetime import datetime
#####
# Include the parent project directory in the PYTHONPATH
appendDir = "/".join(os.path.abspath(os.path.d... | 20.921348 | 83 | 0.431257 |
1c904e6be201ac3fef5084dd387a851e73f5e129 | 9,750 | py | Python | salt/states/ipset.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/states/ipset.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/states/ipset.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
Management of ipsets
======================
This is an ipset-specific module designed to manage IPSets for use
in IPTables Firewalls.
.. code-block:: yaml
setname:
ipset.set_present:
- set_type: bitmap:ip
- range: 192.168.0.0/16
- comment: True
setna... | 28.343023 | 106 | 0.482051 |
1c90586f67a385dfe06151a67b5181682960bb3c | 4,581 | py | Python | tests/utils.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | 6 | 2018-12-12T10:45:42.000Z | 2022-03-16T20:50:36.000Z | tests/utils.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | 15 | 2019-01-08T11:55:31.000Z | 2022-03-01T15:06:52.000Z | tests/utils.py | marktsavage/djangocms-navigation | d15db1c4dd09162b8034b583e9630e7b97dfea86 | [
"BSD-3-Clause"
] | 9 | 2018-12-14T00:58:25.000Z | 2022-03-11T17:16:17.000Z | from contextlib import contextmanager
from django.apps import apps
from django.conf import UserSettingsHolder, settings
from django.test.signals import setting_changed
from django.test.utils import TestContextDecorator
from djangocms_versioning.helpers import version_list_url
class UsefulAssertsMixin(object):
d... | 42.416667 | 91 | 0.725169 |
1c905a5967f63a2330c0cd7f274051098488156f | 6,234 | py | Python | deckparser/importers/newave/importPATAMAR.py | venidera/deckparser | 88e9e141cb7ef2cdea2994f7664157d9eae6ec4f | [
"Apache-2.0"
] | 13 | 2018-07-26T20:18:30.000Z | 2022-03-18T07:18:34.000Z | deckparser/importers/newave/importPATAMAR.py | venidera/deckparser | 88e9e141cb7ef2cdea2994f7664157d9eae6ec4f | [
"Apache-2.0"
] | null | null | null | deckparser/importers/newave/importPATAMAR.py | venidera/deckparser | 88e9e141cb7ef2cdea2994f7664157d9eae6ec4f | [
"Apache-2.0"
] | 3 | 2021-04-23T21:46:59.000Z | 2021-08-30T11:24:07.000Z | from deckparser.importers.imputils import line2list, searchInList
def importPATAMAR(fdata, dger, sss):
# Inicia a leitura do arquivo
# Verificar o numero de patamares de carga
idxline = 2
numpatamarcarga = int(fdata[idxline].strip())
# Ler duracao dos patamares
idxline = 6
PATDURA = dict()... | 42.993103 | 85 | 0.423003 |
1c905a8cba041f96e5c55659654c910300826077 | 2,015 | py | Python | Models.py | StefanKDS/Birds | bb0c8e8fd9b1a8658b4f7073b1d18fb7a2c5bdb2 | [
"MIT"
] | null | null | null | Models.py | StefanKDS/Birds | bb0c8e8fd9b1a8658b4f7073b1d18fb7a2c5bdb2 | [
"MIT"
] | null | null | null | Models.py | StefanKDS/Birds | bb0c8e8fd9b1a8658b4f7073b1d18fb7a2c5bdb2 | [
"MIT"
] | null | null | null | import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras.layers import Conv1D, MaxPooling1D, GlobalAveragePooling1D
def create_and_fit_dense_model(batch_size, epochs, callbacks, X_train, X_test, y_train, y_test):
# BUILD THE MODEL
model = Sequential... | 37.314815 | 104 | 0.698759 |
1c9066a4985a2ceea0548547ed7f6abce1c97543 | 7,022 | py | Python | lockwise_password_importer.py | avallete/lockwise-password-importer | fe49f676202b7ece3c2c5d74042a233f0a0af775 | [
"MIT"
] | 18 | 2019-11-08T16:43:25.000Z | 2020-06-10T11:47:26.000Z | lockwise_password_importer.py | avallete/lockwise-password-importer | fe49f676202b7ece3c2c5d74042a233f0a0af775 | [
"MIT"
] | 8 | 2019-11-14T20:11:01.000Z | 2020-09-16T11:57:26.000Z | lockwise_password_importer.py | avallete/lockwise-password-importer | fe49f676202b7ece3c2c5d74042a233f0a0af775 | [
"MIT"
] | 2 | 2020-01-17T03:19:24.000Z | 2020-06-03T01:36:44.000Z | import base64
import csv
import hashlib
import hmac
import json
import logging
import os
import time
import uuid
from binascii import hexlify
import click
import fxa.core
import fxa.crypto
import voluptuous
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import padding
from... | 34.253659 | 117 | 0.642125 |
1c906d607722ed419c723265ae600e407b74e692 | 2,550 | py | Python | exeteracovid/algorithms/inconsistent_testing.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 3 | 2021-03-23T14:23:06.000Z | 2021-12-29T16:54:42.000Z | exeteracovid/algorithms/inconsistent_testing.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 29 | 2021-02-22T12:12:53.000Z | 2021-09-27T10:52:25.000Z | exeteracovid/algorithms/inconsistent_testing.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 1 | 2021-03-08T15:00:30.000Z | 2021-03-08T15:00:30.000Z | # Copyright 2020 KCL-BMEIS - King's College London
# 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... | 49.038462 | 121 | 0.678431 |
1c90984ea5c89a19c64bfe9f89784ec93ea58abe | 9,845 | py | Python | fathom/speech/speech.py | rdadolf/fathom | 1dc013d055e59fb09c886ae3a667084119deac5c | [
"Apache-2.0"
] | 77 | 2016-09-28T01:34:38.000Z | 2022-03-22T10:43:12.000Z | fathom/speech/speech.py | rdadolf/fathom | 1dc013d055e59fb09c886ae3a667084119deac5c | [
"Apache-2.0"
] | 21 | 2016-10-05T21:30:03.000Z | 2019-11-01T10:26:40.000Z | fathom/speech/speech.py | rdadolf/fathom | 1dc013d055e59fb09c886ae3a667084119deac5c | [
"Apache-2.0"
] | 25 | 2016-09-28T01:50:47.000Z | 2020-03-06T07:27:11.000Z | #!/usr/bin/env python
import numpy as np
import tensorflow as tf
#from tensorflow.models.rnn import rnn, rnn_cell
from tensorflow.python.ops import functional_ops
from tensorflow.python.ops import variable_scope as vs
from tensorflow.contrib.rnn.python.ops.rnn_cell import _linear
from fathom.nn import NeuralNetworkM... | 37.720307 | 143 | 0.699848 |
1c90af2adef6b653b56ef557f874f3e18e0731cf | 7,930 | py | Python | magnum/tests/unit/common/test_keystone.py | gyliu513/magnum | 943eba8a7b03b11878399198091327d2e1b90fcb | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/common/test_keystone.py | gyliu513/magnum | 943eba8a7b03b11878399198091327d2e1b90fcb | [
"Apache-2.0"
] | null | null | null | magnum/tests/unit/common/test_keystone.py | gyliu513/magnum | 943eba8a7b03b11878399198091327d2e1b90fcb | [
"Apache-2.0"
] | null | null | null | # 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
# distributed under t... | 42.864865 | 79 | 0.68802 |
1c90b76592f7938d1f5c3fc78499586dda54256f | 5,647 | py | Python | bookmarks/iso8601.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | bookmarks/iso8601.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | bookmarks/iso8601.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """ISO-8601 date format support, sufficient for the profile defined in
<http://www.w3.org/TR/NOTE-datetime>.
The parser is more flexible on the input format than is required to support
the W3C profile, but all accepted date/time values are legal ISO 8601 dates.
The tostring() method only generates formatted dates that... | 30.197861 | 79 | 0.568443 |
1c90c16e7e500a5d017313d517e3c50de95cef7c | 404 | py | Python | money/views/shared/pagination.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | null | null | null | money/views/shared/pagination.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | 2 | 2020-06-06T13:08:38.000Z | 2022-02-10T14:51:16.000Z | money/views/shared/pagination.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | null | null | null | # Copyright (C) Takeshi Nakamura. All rights reserved.
"""Pagination"""
from django.core.paginator import EmptyPage, PageNotAnInteger
def page(paginator, num):
"""Paginator object"""
try:
page_obj = paginator.page(num)
except PageNotAnInteger:
page_obj = paginator.page(1)
except Emp... | 21.263158 | 61 | 0.690594 |
1c91069a91abaae5c6eebf4c61db6f12cfb1a4dc | 5,246 | py | Python | mslib/msui/performance_settings.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/msui/performance_settings.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/msui/performance_settings.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.msui.performance_settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module defines the performance settings dialog
This file is part of mss.
:copyright: Copyright 2017 Joern Ungermann
:copyright: Copyright 2017-2021 by the mss team, see AUTHORS.
:license: APA... | 40.353846 | 112 | 0.662409 |
1c910e46dcb35d29e53d71d97c203250e07fbea5 | 2,178 | py | Python | setup.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | setup.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | setup.py | david-homley/appcli | 08e336082fb5f4b79169b9c2cd7561bf489e28ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
"""
Python Package File
________________________________________________________________________________
Created by brightSPARK Labs
www.brightsparklabs.com
"""
# to use a consistent encoding
from codecs import open
from os import path
from subprocess import PIPE, run... | 28.657895 | 80 | 0.544536 |
1c915e21fcbecd57c478fdd5bec17262df5521d7 | 1,661 | py | Python | custom_components/python_script/sensor.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 13 | 2019-06-04T12:23:25.000Z | 2021-11-23T17:24:27.000Z | custom_components/python_script/sensor.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 1 | 2020-10-22T11:14:24.000Z | 2020-10-22T18:36:30.000Z | custom_components/python_script/sensor.py | zvldz/homeassistant | becbe7087e3cf152cce2f9bb3670e3a0a283fc79 | [
"BSD-2-Clause"
] | 1 | 2020-08-25T18:41:34.000Z | 2020-08-25T18:41:34.000Z | import logging
from homeassistant.const import CONF_UNIT_OF_MEASUREMENT, CONF_NAME, CONF_ICON
from homeassistant.helpers.entity import Entity
logger = logging.getLogger(__name__)
async def async_setup_platform(hass, config, add_entities,
discovery_info=None):
try:
if 'file... | 24.791045 | 78 | 0.618302 |
1c917907a0fff75a909d8d13a1350bb7a448c9b1 | 51 | py | Python | botx/clients/methods/v3/command/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/clients/methods/v3/command/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/clients/methods/v3/command/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Definition for methods for command resource."""
| 25.5 | 50 | 0.745098 |
1c917e8003ef2e4ca923dec31ce953a1434d7b47 | 932 | py | Python | quart/globals.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | 1 | 2020-08-09T19:45:14.000Z | 2020-08-09T19:45:14.000Z | quart/globals.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | quart/globals.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | from functools import partial
from typing import Any, List # noqa: F401
from .local import LocalProxy, LocalStack
def _ctx_lookup(ctx_stacks: List[LocalStack], name: str) -> Any:
top = None
for ctx_stack in ctx_stacks:
top = ctx_stack.top
if top is not None:
break
if top is N... | 34.518519 | 97 | 0.736052 |
1c919e6a715a9b1dc359866d84d9e6cfeca414f2 | 13,052 | py | Python | fffw/encoding/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | null | null | null | fffw/encoding/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | null | null | null | fffw/encoding/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, replace, asdict, field, fields
from typing import Union, List, cast, Optional
from fffw.graph import base
from fffw.encoding import mixins
from fffw.graph.meta import Meta, VideoMeta, TS, Scene, VIDEO, AUDIO, AudioMeta
from fffw.graph.meta import StreamType, Device
from fffw.wrapper.... | 29.264574 | 80 | 0.592553 |
1c91fa273fe43e26ee8bcb5e5f4ebdcef812ba9b | 13,791 | py | Python | Tools/Scripts/webkitpy/common/system/executive_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/common/system/executive_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/common/system/executive_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2009 Daniel Bates (dbates@intudata.com). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source co... | 49.967391 | 151 | 0.686752 |
1c92ab0440b7e5fc31cb5c5c9a768b609ee3e342 | 11,947 | py | Python | parlai/messenger/core/message_sender.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/messenger/core/message_sender.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/messenger/core/message_sender.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
import logging
import requests
import parlai.mturk.core.shared_utils as shared_utils
MAX_QUICK_REPLIES = 10... | 35.241888 | 79 | 0.545241 |
1c92b003ff60d3bf235917ea6066be12c48d2123 | 3,836 | py | Python | src/news_kg/nlp.py | andreeaiana/geneg | f2039e3c26608399ca60709895aaed6c745a5dc9 | [
"MIT"
] | 2 | 2021-12-09T16:21:31.000Z | 2021-12-10T10:35:20.000Z | src/news_kg/nlp.py | andreeaiana/geneg | f2039e3c26608399ca60709895aaed6c745a5dc9 | [
"MIT"
] | null | null | null | src/news_kg/nlp.py | andreeaiana/geneg | f2039e3c26608399ca60709895aaed6c745a5dc9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" NLP methods mainly for the normalization of node names. """
import re
import validators
import unicodedata
from titlecase import titlecase
def _regularize_spaces(text: str) -> str:
""" Replaces spaces in a string with underscores. """
return text.replace(' ', '_')
def _capitali... | 32.508475 | 98 | 0.60245 |
1c92b1d9130a290ce14ab81c52dc318288827d55 | 6,968 | py | Python | pca_detection.py | luh0907/nn_breaking_detection | 6e810a5296bea3c6ef975b4e62caa2d94e992b81 | [
"BSD-2-Clause"
] | 77 | 2017-11-05T01:02:57.000Z | 2022-01-31T06:54:44.000Z | pca_detection.py | luh0907/nn_breaking_detection | 6e810a5296bea3c6ef975b4e62caa2d94e992b81 | [
"BSD-2-Clause"
] | 1 | 2017-11-15T08:53:02.000Z | 2017-11-15T08:53:02.000Z | pca_detection.py | luh0907/nn_breaking_detection | 6e810a5296bea3c6ef975b4e62caa2d94e992b81 | [
"BSD-2-Clause"
] | 26 | 2017-11-02T02:05:39.000Z | 2021-11-03T08:24:07.000Z | ## pca_detect.py -- break inner-layer pca-based detection
##
## Copyright (C) 2017, Nicholas Carlini <nicholas@carlini.com>.
##
## This program is licenced under the BSD 2-Clause licence,
## contained in the LICENCE file in this directory.
import sys
import time
import tensorflow as tf
import numpy as np
import rando... | 29.905579 | 107 | 0.628731 |
1c92b838ea5f388081b2aadfa5e051ed3f7703ea | 1,489 | py | Python | PyXAB/partition/BinaryPartition.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null | PyXAB/partition/BinaryPartition.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null | PyXAB/partition/BinaryPartition.py | WilliamLwj/PyXAB | a95c713090fe875bc557bc7b0e11ab000a921407 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implmentation of Binary Partition
"""
# Author: Wenjie Li <li3549@purdue.edu>
# License: MIT
from PyXAB.partition.Node import P_node
from PyXAB.partition.Partition import Partition
import numpy as np
import pdb
class BinaryPartition(Partition):
def __init__(self, domain, node=P_node):
... | 31.020833 | 86 | 0.638684 |
1c92d7a987b0605a5bc75271642655cf673ae84d | 9,755 | py | Python | misc/twitterBot.py | davidko-ww/WonderPyExamples | 12dbf138483fe0cecaa78a6b67dc4cf68fe7ddb3 | [
"MIT"
] | 10 | 2018-07-31T06:45:22.000Z | 2021-01-20T07:43:53.000Z | misc/twitterBot.py | davidko-ww/WonderPyExamples | 12dbf138483fe0cecaa78a6b67dc4cf68fe7ddb3 | [
"MIT"
] | 3 | 2018-07-31T20:31:54.000Z | 2020-07-30T22:37:49.000Z | misc/twitterBot.py | davidko-ww/WonderPyExamples | 12dbf138483fe0cecaa78a6b67dc4cf68fe7ddb3 | [
"MIT"
] | 7 | 2018-07-31T22:41:46.000Z | 2021-11-04T18:06:00.000Z | import WonderPy.core.wwMain
from WonderPy.core.wwConstants import WWRobotConstants
from threading import Thread
import twitter
from queue import *
'''
This example requires you to set up a Twitter Application (https://apps.twitter.com/)
and provide your key and token below.
This example will listen for tweets to a s... | 39.334677 | 120 | 0.602563 |
1c93027ff6359233f432c0ee9330e833d80fabf3 | 4,514 | py | Python | whoville/cloudbreak/models/stack_repo_details_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/stack_repo_details_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/models/stack_repo_details_json.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 30.093333 | 984 | 0.590385 |
1c93401eeb4f3261e5c7e6faf0c1feb174790d43 | 7,851 | py | Python | annofilt/get_complete_genomes.py | nickp60/annofilt | bb199309d697616fbfa5426052d197a7659b7342 | [
"MIT"
] | 3 | 2018-05-21T08:12:44.000Z | 2021-11-23T12:24:15.000Z | annofilt/get_complete_genomes.py | nickp60/annofilt | bb199309d697616fbfa5426052d197a7659b7342 | [
"MIT"
] | 1 | 2020-11-12T01:34:27.000Z | 2020-11-17T14:49:50.000Z | annofilt/get_complete_genomes.py | nickp60/annofilt | bb199309d697616fbfa5426052d197a7659b7342 | [
"MIT"
] | 1 | 2022-03-27T14:35:37.000Z | 2022-03-27T14:35:37.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Nick Waters
"""
import os
import sys
import subprocess
import argparse
import shutil
import pandas as pd
import urllib.request
from . import shared_methods as sm
def get_args(): # pragma nocover
parser = argparse.ArgumentParser(
description="... | 37.564593 | 327 | 0.615463 |
1c93557014a9283d72f1e34e196c8c3160ffedd5 | 10,023 | py | Python | structure/voice.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | 1 | 2021-05-06T19:45:54.000Z | 2021-05-06T19:45:54.000Z | structure/voice.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | structure/voice.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | """
File: voice.py
Purpose: A voice is a Line, but has an associated instrument and an interval tree for note searches relative to
whole note time.
"""
from misc.interval_tree import IntervalTree
from misc.interval import Interval
from structure.line import Line
from structure.dynamics import Dynamics
from... | 36.849265 | 117 | 0.609598 |
1c9377b7eb2bbf7026fdb632fb588c70d44f4bd9 | 4,444 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/gis/forms/fields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/forms/fields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/forms/fields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django import forms
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.utils.translation import ugettext_lazy as _
from .widgets import OpenLayersWidget
class GeometryField(forms.Field):
"""
This is the basic form field for a G... | 34.449612 | 108 | 0.618587 |
1c9389f4e1c7dd74a6604f87aa48f76c2f90123b | 11,602 | py | Python | test/test_external_jwt_authn.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | test/test_external_jwt_authn.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | test/test_external_jwt_authn.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | import base64
import unittest
from datetime import datetime, timedelta
from tempfile import NamedTemporaryFile
from contextlib import contextmanager
import jwt
import requests
from Crypto.PublicKey import RSA
from flask import Flask, jsonify, request, make_response
from app import app
from data.users import Externa... | 34.02346 | 97 | 0.609809 |
1c93b7c56b5065ae203b95ec536873c5430333cc | 5,737 | py | Python | bokeh/core/state.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | 1 | 2020-02-06T05:27:53.000Z | 2020-02-06T05:27:53.000Z | bokeh/core/state.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | bokeh/core/state.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | ''' Encapsulate implicit state that is useful for Bokeh plotting APIs.
.. note::
While ``State`` objects can also be manipulated explicitly, they are
automatically configured when the functions :func:`~bokeh.io.output_file`,
etc. from :ref:`bokeh.io` are used, so this is not necessary under
typical usa... | 31.872222 | 136 | 0.634478 |
1c93ceb791fddddb9001f32e93195da88f7dfdf8 | 15,747 | py | Python | demos/ridgeregression.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | demos/ridgeregression.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | demos/ridgeregression.py | ThomasTNO/mpyc | 11ea79be06a676a8b2ae2d81d94621ec35c638e8 | [
"MIT"
] | null | null | null | """Demo Linear and Ridge Regression.
MPyC demo accompanying the paper 'Efficient Secure Ridge Regression from
Randomized Gaussian Elimination' by Frank Blom, Niek J. Bouman, Berry
Schoenmakers, and Niels de Vreede, presented at TPMPC 2019 by Frank Blom.
See https://eprint.iacr.org/2019/773 (or https://ia.cr/2019/773).... | 39.171642 | 98 | 0.544929 |
1c93d83bb5d60dbfd67c90b11b7b2f1951924db3 | 4,880 | py | Python | src/python/cms/registry.py | NSAPH-Data-Platform/nsaph-cms | be00ffde53feed0d80c07342b7b9c94f1a62ff32 | [
"Apache-2.0"
] | null | null | null | src/python/cms/registry.py | NSAPH-Data-Platform/nsaph-cms | be00ffde53feed0d80c07342b7b9c94f1a62ff32 | [
"Apache-2.0"
] | null | null | null | src/python/cms/registry.py | NSAPH-Data-Platform/nsaph-cms | be00ffde53feed0d80c07342b7b9c94f1a62ff32 | [
"Apache-2.0"
] | 1 | 2022-01-11T19:00:59.000Z | 2022-01-11T19:00:59.000Z | '''
Medicaid Domain for NSAPH
Running this module will create/update data model for raw CMS data
https://github.com/NSAPH/data_model
Demographics: /data/incoming/rce/ci3_d_medicaid/processed_data/cms_medicaid-max/data_cms_medicaid-max-demographics_patient
Description of columns:
https://gitlab-int.rc.f... | 34.857143 | 144 | 0.64918 |
1c93f19797c6c5257d6373ccf60c76c7a075792d | 66 | py | Python | unit_tests/__init__.py | uk-gov-mirror/LandRegistry.hmlr-design-system | 02f680224512b344d28d13b2821fd74687fa9d7f | [
"MIT"
] | 6 | 2019-02-19T11:30:30.000Z | 2022-02-22T12:10:25.000Z | unit_tests/__init__.py | uk-gov-mirror/LandRegistry.hmlr-design-system | 02f680224512b344d28d13b2821fd74687fa9d7f | [
"MIT"
] | 21 | 2019-02-19T14:09:22.000Z | 2022-01-13T13:16:38.000Z | unit_tests/__init__.py | uk-gov-mirror/LandRegistry.hmlr-design-system | 02f680224512b344d28d13b2821fd74687fa9d7f | [
"MIT"
] | 6 | 2019-05-10T09:18:57.000Z | 2021-04-15T14:12:11.000Z | from demo import config
config.STATIC_ASSETS_MODE = "production"
| 16.5 | 40 | 0.818182 |
1c941e04adc22dfcc472d15355edf0e8632a3205 | 1,536 | py | Python | 2021/20/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | 2 | 2020-12-04T09:45:38.000Z | 2020-12-07T14:06:12.000Z | 2021/20/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | 2021/20/solution1.py | frenzymadness/aoc | c9018e757bae61a696e675a827aef873995abdd3 | [
"WTFPL"
] | null | null | null | from itertools import product
algo = ""
image = []
pixels = {".": "0", "#": "1"}
with open("input.txt") as input_file:
for line in input_file:
line = line.strip()
if not line:
break
algo += line
for line in input_file:
line = line.strip()
image.append(... | 24.774194 | 71 | 0.565104 |
1c94209ccb95c0928aad2532f8d500538c245817 | 271 | py | Python | python/reneu/neuron.py | wolfv/reneu | a1a4d782adcce6635b118909aa26c92fb6cc84e8 | [
"Apache-2.0"
] | 1 | 2019-11-16T16:43:20.000Z | 2019-11-16T16:43:20.000Z | python/reneu/neuron.py | wolfv/reneu | a1a4d782adcce6635b118909aa26c92fb6cc84e8 | [
"Apache-2.0"
] | null | null | null | python/reneu/neuron.py | wolfv/reneu | a1a4d782adcce6635b118909aa26c92fb6cc84e8 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .skeleton import Skeleton
class Neuron(Skeleton):
def __init__(self, nodes: np.ndarray, parents: np.ndarray,
classes: np.ndarray=None, synapses: np.ndarray=None):
super().__init__(nodes, parents, classes=classes)
| 33.875 | 73 | 0.682657 |
1c94679eea8f6a6e3c4fb9c2425960e3226e2d1b | 29,574 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_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... | 38.258732 | 136 | 0.649963 |
1c947043979c9ee6879aa9b15364d3a937418c9f | 1,379 | py | Python | epm_client/__init__.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | 1 | 2019-05-23T12:51:18.000Z | 2019-05-23T12:51:18.000Z | epm_client/__init__.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | null | null | null | epm_client/__init__.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
EPM REST API
REST API description of the ElasTest Platform Manager Module.
OpenAPI spec version: 0.1.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import models into sdk package
from .models.adapter import A... | 28.142857 | 68 | 0.815809 |
1c947249b0d54faeaba4bdd0937e6a6f6658b4a4 | 6,547 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_recommended_sensitivity_labels_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_recommended_sensitivity_labels_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_recommended_sensitivity_labels_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.79085 | 232 | 0.701237 |
1c948e2cac154e620a2fbd4b517a63826f144ea5 | 27,134 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 41.552833 | 185 | 0.67174 |
1c94acff62a24559ad5d5e9976dd9ef9cbbd98e1 | 1,539 | py | Python | alipay/aop/api/domain/AlipayBossFncSubaccountAccountApplyModel.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/domain/AlipayBossFncSubaccountAccountApplyModel.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/domain/AlipayBossFncSubaccountAccountApplyModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.ApplySubAccountAndBindOrder import ApplySubAccountAndBindOrder
class AlipayBossFncSubaccountAccountApplyModel(object):
def __init__(self):
self._apply_sub_account_and... | 34.2 | 115 | 0.727745 |
1c94ae373b80f0ed82eaffcd56eac68131f65729 | 47 | py | Python | backend/lib/database/__init__.py | bayesimpact/tds-frontend | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 15 | 2018-05-08T23:54:38.000Z | 2020-03-07T20:46:37.000Z | backend/lib/database/__init__.py | akegan/encompass | 85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2 | [
"Apache-2.0"
] | 297 | 2018-02-05T19:04:26.000Z | 2022-02-12T07:52:37.000Z | backend/lib/database/__init__.py | bayesimpact/tds | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 6 | 2018-05-21T19:51:15.000Z | 2019-03-21T19:20:27.000Z | """Functions to interact with the database."""
| 23.5 | 46 | 0.723404 |
1c94b23d978c0f7d7066b2b8d089c1e6e6842588 | 86 | py | Python | master/api-master/api-master/api/src/run.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/api-master/api-master/api/src/run.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/api-master/api-master/api/src/run.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | """Run file."""
from app import manager
if __name__ == '__main__':
manager.run()
| 14.333333 | 26 | 0.639535 |
1c94f0181094feaeec226d955a3e0e4462d58984 | 2,774 | py | Python | resourcesync/views.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 4 | 2019-12-19T17:17:42.000Z | 2021-12-11T23:12:45.000Z | resourcesync/views.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 32 | 2020-03-19T15:56:05.000Z | 2021-12-23T12:46:06.000Z | resourcesync/views.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=UTF-8
import json
import logging
import requests
from django.core import serializers
from django.http import HttpResponseNotFound
from django.http.response import HttpResponse, JsonResponse
from django.shortcuts import render
from eatb.utils.datetime import ts_date, DT_ISO_FORMAT, date_f... | 38 | 114 | 0.731074 |
1c950907b0d17c70249393dd188445be56f6d46f | 1,692 | py | Python | data_type/ulint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | data_type/ulint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | data_type/ulint.py | hsocarras/pycip | 288a741e5cf1e9df366ed62437e0b99f6920ef90 | [
"Apache-2.0"
] | null | null | null | from .base_datatype import BaseDatatype
class ULINT(BaseDatatype):
"""Class to implement ULINT datatype of CIP especification.
Methods
-------
class encode
class decode
classmethod validate_range
classmethod GetIDCode
staticmethod Identify
"""
_id_code = 0xC9
_min_v... | 22.864865 | 79 | 0.533688 |
1c953433dae2473959a93ee2d27507c1580b8ed2 | 1,587 | py | Python | pkgcore/repository/virtual.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 1 | 2021-07-05T13:10:18.000Z | 2021-07-05T13:10:18.000Z | pkgcore/repository/virtual.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/repository/virtual.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2005-2008 Brian harring <ferringb@gmail.com>
# License: GPL2/BSD
"""
virtual repository, pkgs generated via callable
"""
__all__ = ("tree",)
from pkgcore.package import virtual
from pkgcore.repository import prototype
class tree(prototype.tree):
factory_kls = staticmethod(virtual.factory)
de... | 29.943396 | 80 | 0.643352 |
1c9535aa1449c2b5e1b1ec8f6f7bd20ce9d26376 | 5,132 | py | Python | src/layer_linter/dependencies/graph.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 63 | 2018-06-21T10:39:54.000Z | 2021-06-04T14:28:44.000Z | src/layer_linter/dependencies/graph.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 86 | 2018-06-20T13:30:30.000Z | 2019-06-04T12:47:28.000Z | src/layer_linter/dependencies/graph.py | SimonBiggs/layer_linter | 9eb518b74118e4a2d8079e2f32ecc12612ca9e86 | [
"BSD-3-Clause"
] | 4 | 2018-08-14T08:49:55.000Z | 2019-02-16T09:24:47.000Z | import logging
from typing import List, Optional, Any
import networkx # type: ignore
from networkx.algorithms import shortest_path # type: ignore
from ..module import Module, SafeFilenameModule
from .path import ImportPath
from .scanner import PackageScanner
from .analysis import DependencyAnalyzer
logger = loggin... | 36.140845 | 97 | 0.64166 |
1c953dc7ae81a8e7f1c3a6eff0641e01157ba122 | 1,711 | py | Python | serie2/Sum.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | serie2/Sum.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | serie2/Sum.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | # Authors: Tom Lambert (lambertt) and Yuuma Odaka-Falush (odafaluy)
import numpy
def sum_indices(addends, problems):
"""
Sums the given addends, starting by the first number and following the list
"""
result = numpy.float16(0)
for addend in addends:
if numpy.isnan(addend):
pr... | 27.596774 | 85 | 0.594389 |
1c9541711bb728e5b0dbaacd68643e0aef710ebf | 6,253 | py | Python | src/olympia/files/tests/test_admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10 | 2018-08-16T04:55:06.000Z | 2022-01-08T16:09:39.000Z | src/olympia/files/tests/test_admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 171 | 2018-05-20T00:27:59.000Z | 2022-03-21T13:34:27.000Z | src/olympia/files/tests/test_admin.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 12 | 2018-08-01T16:46:09.000Z | 2022-01-08T16:09:46.000Z | from django.conf import settings
from django.utils.encoding import force_text
from django.utils.http import urlquote
from olympia import amo
from olympia.amo.tests import TestCase, addon_factory, user_factory
from olympia.amo.urlresolvers import reverse
from olympia.amo.templatetags.jinja_helpers import user_media_url... | 39.575949 | 77 | 0.66624 |
1c9561fb00312e416eb79722dc127a7fb5488e66 | 1,175 | py | Python | errorcam/scripts/make_vqacaption_data.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 2 | 2021-07-25T12:44:29.000Z | 2021-07-27T08:55:48.000Z | errorcam/scripts/make_vqacaption_data.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | null | null | null | errorcam/scripts/make_vqacaption_data.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 1 | 2021-07-25T12:44:30.000Z | 2021-07-25T12:44:30.000Z | from collections import defaultdict
import json
import os
if __name__=="__main__":
coco_data_path = "/data/DataSets/COCO/"
vqa_data_path = "/data/DataSets/VQA"
splits=["train", "val"]
format_data = {'images':[]}
for split in splits:
vqa_data = json.load(open(os.path.join(vqa_data... | 28.658537 | 112 | 0.605106 |
1c956f215fcba21e73d5f0a0f5ab4ac94cdf9fcc | 36,053 | py | Python | PyFunceble/helpers.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | PyFunceble/helpers.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | PyFunceble/helpers.py | mitchellkrogza/PyFunceble | b2b0d3fc18097cd630eed849ee99d961263d607b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# pylint:disable=line-too-long
"""
The tool to check the availability or syntax of domains, IPv4 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
███... | 31.45986 | 88 | 0.547083 |
1c957cd972d0915efe75a042be4e28733a894ed6 | 5,038 | py | Python | oscar/lib/python2.7/site-packages/psycopg2/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/psycopg2/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """A Python driver for PostgreSQL
psycopg is a PostgreSQL_ database adapter for the Python_ programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim... | 37.318519 | 85 | 0.716753 |
1c9582f454aec1a7337a37ac94cf582ded46d97f | 1,974 | py | Python | pydemic/models/abstract_seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 3 | 2020-05-10T23:52:41.000Z | 2021-08-31T14:38:24.000Z | pydemic/models/abstract_seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-09-27T03:26:51.000Z | 2022-03-30T12:18:08.000Z | pydemic/models/abstract_seir.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-10-01T04:07:39.000Z | 2020-10-01T04:07:39.000Z | import numpy as np
import pandas as pd
from scipy import integrate
from sidekick import X
from .abstract_sir import AbstractSIR as Base
from .. import params
from ..formulas import K, R0_from_K
from ..utils import state_property, param_property, param_transform
class AbstractSEIR(Base):
"""
Abstract base cla... | 33.457627 | 83 | 0.675279 |
1c958815de8906ce5f734991d49e223e1c7b8159 | 583 | py | Python | tests/models/lignucinteractiontestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/models/lignucinteractiontestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | tests/models/lignucinteractiontestcase.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from credoscript import models
from tests import CredoEntityTestCase
class LigNucInteractionTestCase(CredoEntityTestCase):
def setUp(self):
self.lignucint = models.LigNucInteraction.query.limit(1).first()
# test overloaded methods
def test_has_biomolecule(self):
self.assertOneToOne(self.l... | 34.294118 | 78 | 0.754717 |
1c958a9c6b87901d8e7985fbf9d3c6bdd3f2590c | 2,656 | py | Python | PythonNetCode/chapter2/2_1_forking_mixin_socket_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter2/2_1_forking_mixin_socket_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter2/2_1_forking_mixin_socket_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 2
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
# See more: http://docs.python.org/2/library/socketserver.html
import os
import socket
import threading
import SocketServer
SERVER_HOST ... | 30.181818 | 97 | 0.652108 |
1c9590ef6345f4e2d122c36f38994ce34be3bfe3 | 3,193 | py | Python | src/homework/homework6_menu.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | null | null | null | src/homework/homework6_menu.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | 1 | 2018-03-08T19:46:08.000Z | 2018-03-08T20:00:47.000Z | src/homework/homework6_menu.py | acc-cosc-1336/cosc-1336-spring-2018-vcruz350 | 0cee9fde3d4129c51626c4e0c870972aebec9b95 | [
"MIT"
] | null | null | null | #write import statements for homework 6 functions
from src.homework.homework6 import get_point_mutations
from src.homework.homework6 import get_dna_complement
from src.homework.homework6 import transcribe_dna_into_rna
from src.homework.homework6 import get_gc_content
def menu_options():
print()
print('... | 29.293578 | 99 | 0.61259 |
1c95b700da12c4ad13362c44973b8ee1f07c8ba4 | 9,461 | py | Python | tests/pipe/test_refine.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 39 | 2021-12-14T11:05:25.000Z | 2022-03-31T18:50:58.000Z | tests/pipe/test_refine.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 17 | 2022-01-04T14:32:26.000Z | 2022-03-29T14:01:36.000Z | tests/pipe/test_refine.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:40:17.000Z | 2022-03-30T02:09:55.000Z | # -*- coding: utf-8 -*-
# File: test_refine.py
# Copyright 2021 Dr. Janis Meyer. 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/L... | 29.47352 | 111 | 0.400486 |
1c95ca7d8392b3f4ac8c4c8e45928000b5dff6fb | 6,043 | py | Python | shexer/core/instances/instance_tracker.py | DaniFdezAlvarez/shexer | 4f4dffc95bcad038cbc1bd85b58e5558c7c0a6d1 | [
"Apache-2.0"
] | 16 | 2019-03-18T21:32:36.000Z | 2022-03-28T17:53:57.000Z | shexer/core/instances/instance_tracker.py | DaniFdezAlvarez/shexer | 4f4dffc95bcad038cbc1bd85b58e5558c7c0a6d1 | [
"Apache-2.0"
] | 67 | 2019-02-27T12:58:55.000Z | 2022-03-28T20:38:48.000Z | shexer/core/instances/instance_tracker.py | DaniFdezAlvarez/shexer | 4f4dffc95bcad038cbc1bd85b58e5558c7c0a6d1 | [
"Apache-2.0"
] | 2 | 2019-03-09T00:30:28.000Z | 2020-01-09T18:04:14.000Z | from shexer.model.property import Property
from shexer.utils.uri import remove_corners
from shexer.utils.factories.h_tree import get_basic_h_tree
from shexer.core.instances.annotators.annotator_func import get_proper_annotator
from shexer.core.instances.abstract_instance_tracker import AbstractInstanceTracker
from shex... | 40.831081 | 128 | 0.68658 |
1c95d918ab86cf4a0c116b1d64878a13de4ea3ec | 7,254 | py | Python | homeassistant/components/fritzbox/climate.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-03-05T17:29:45.000Z | 2021-03-05T17:29:45.000Z | homeassistant/components/fritzbox/climate.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/fritzbox/climate.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-06-01T12:43:03.000Z | 2020-06-01T12:43:03.000Z | """Support for AVM Fritz!Box smarthome thermostate devices."""
import requests
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
ATTR_HVAC_MODE,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
PRESET_COMFORT,
PRESET_ECO,
SUPPORT_PRESET_MODE,
SUPP... | 32.24 | 79 | 0.677144 |
1c95ddf0e8487935c3a6042de58d79eab29dbb34 | 80 | py | Python | nid_validator/egyptian_validator/tests/__init__.py | mohamedmansor/Egyptian-national-ID-validator | 59ce1f69c916611fb2565c028301353ce5ebd91f | [
"MIT"
] | null | null | null | nid_validator/egyptian_validator/tests/__init__.py | mohamedmansor/Egyptian-national-ID-validator | 59ce1f69c916611fb2565c028301353ce5ebd91f | [
"MIT"
] | 25 | 2021-01-05T03:48:11.000Z | 2021-09-22T19:38:49.000Z | nid_validator/egyptian_validator/tests/__init__.py | mohamedmansor/Egyptian-national-ID-validator | 59ce1f69c916611fb2565c028301353ce5ebd91f | [
"MIT"
] | null | null | null | from .integration_test import NIDTestAPI
from .unit_test import TestNIDValidator | 40 | 40 | 0.8875 |
1c96018483fb99bcb7e21cd41a698e0d382b099e | 1,447 | py | Python | txdav/caldav/datastore/scheduling/ischedule/test/test_remoteservers.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/caldav/datastore/scheduling/ischedule/test/test_remoteservers.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/caldav/datastore/scheduling/ischedule/test/test_remoteservers.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2012-2015 Apple 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 l... | 29.530612 | 92 | 0.706289 |
1c96233ff431091181ed60422e1e91f9ce67f0c6 | 20,645 | py | Python | airflow_client/client/model/trigger_rule.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/trigger_rule.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/trigger_rule.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 70.702055 | 8,098 | 0.644563 |
1c963f6b9d67c3807b764449ad62caa198e57de2 | 13,332 | py | Python | tests/unit/pubsublite/internal/wire/committer_impl_test.py | LaudateCorpus1/python-pubsublite | f0d65ca7b1efec9eae2dda1481c4bfe978eaa2dd | [
"Apache-2.0"
] | 15 | 2020-11-10T15:36:52.000Z | 2022-03-06T15:00:25.000Z | tests/unit/pubsublite/internal/wire/committer_impl_test.py | LaudateCorpus1/python-pubsublite | f0d65ca7b1efec9eae2dda1481c4bfe978eaa2dd | [
"Apache-2.0"
] | 110 | 2020-11-11T18:14:31.000Z | 2022-03-30T22:42:17.000Z | tests/unit/pubsublite/internal/wire/committer_impl_test.py | LaudateCorpus1/python-pubsublite | f0d65ca7b1efec9eae2dda1481c4bfe978eaa2dd | [
"Apache-2.0"
] | 6 | 2020-11-13T19:24:27.000Z | 2022-01-29T08:13:14.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 33 | 87 | 0.69937 |
1c964bc0e7ec5a709406e1d59dbb16f283dfd67a | 39,583 | py | Python | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_afd_custom_domains_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.726554 | 245 | 0.67529 |
1c965a0e6d739618ccbf66ec2c96a6f59100ee5c | 6,687 | py | Python | ice_validator/app_tests/preload_tests/test_environment.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-29T19:33:22.000Z | ice_validator/app_tests/preload_tests/test_environment.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ice_validator/app_tests/preload_tests/test_environment.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2019-07-23T15:47:43.000Z | 2021-07-02T15:04:19.000Z | # -*- coding: utf8 -*-
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
# ===========================================... | 34.117347 | 84 | 0.712876 |
1c965f7d9b896e597d353e1d9111a6788894565b | 18,408 | py | Python | axonius_api_client/api/system/system_users.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/api/system/system_users.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/api/system/system_users.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""API for working with system users."""
from typing import Generator, List, Optional, Tuple, Union
from ...constants.api import MAX_PAGE_SIZE
from ...exceptions import ApiError, NotFoundError
from ...parsers.tables import tablize_users
from ...tools import coerce_bool
from .. import json_api
f... | 33.838235 | 99 | 0.581595 |
1c968ac26f37d61ec849f8eb96127a9526e22344 | 41,947 | py | Python | pygeoapi/openapi.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | pygeoapi/openapi.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | pygeoapi/openapi.py | ksonda/pygeoapi | 8ce6e1b1d678a0bcf2d9810e36fa1701a244a062 | [
"MIT"
] | null | null | null | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2021 Tom Kralidis
#
# 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 ... | 41.696819 | 244 | 0.439888 |
1c96bb66a7969455f9ff525361190cfe86ee2eb1 | 8,875 | py | Python | chemsynth/chempoint.py | 0xwhoami/growtopia-chemsynth-router | 08ad29ccd3ec6b36ddb48662f84073102392979f | [
"CC0-1.0"
] | null | null | null | chemsynth/chempoint.py | 0xwhoami/growtopia-chemsynth-router | 08ad29ccd3ec6b36ddb48662f84073102392979f | [
"CC0-1.0"
] | null | null | null | chemsynth/chempoint.py | 0xwhoami/growtopia-chemsynth-router | 08ad29ccd3ec6b36ddb48662f84073102392979f | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2020-End_Of_Life
See the file 'LICENSE' for copying permission
"""
# absolute import
from chemsynth.chemsynth import Chemsynth, ChemsynthException
from helper.helper_func import find, copy
__all__ = ['ChemsynthPoint',
'ChemsynthPointException'
... | 30.290102 | 104 | 0.65138 |
1c96c835392c389189533ffe09b37b7b0fea01ee | 1,441 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/bodyformurlencodeddata/models/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.483871 | 147 | 0.740458 |
1c96ecd4e43bb877ddf87f71d953cf922f10d8ed | 247 | py | Python | openpds/core/management/commands/flumoji_firebase.py | eschloss/FluFuture | 385506f5d12201b3909d08e42fb1ebb5c0cb323f | [
"MIT"
] | null | null | null | openpds/core/management/commands/flumoji_firebase.py | eschloss/FluFuture | 385506f5d12201b3909d08e42fb1ebb5c0cb323f | [
"MIT"
] | null | null | null | openpds/core/management/commands/flumoji_firebase.py | eschloss/FluFuture | 385506f5d12201b3909d08e42fb1ebb5c0cb323f | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
import logging
from openpds.questions.tasks import howAreYouFeelingTodayAllUsers
class Command(BaseCommand):
def handle(self, *args, **kwargs):
howAreYouFeelingTodayAllUsers.delay()
| 30.875 | 65 | 0.801619 |
1c96fd9f50935cad1f7553f650af5cbf72bc6a56 | 1,665 | py | Python | stdplugins/delpfp.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 1 | 2020-08-02T11:14:29.000Z | 2020-08-02T11:14:29.000Z | stdplugins/delpfp.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 1 | 2021-02-08T20:40:44.000Z | 2021-02-08T20:40:44.000Z | stdplugins/delpfp.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 1 | 2020-05-31T07:19:52.000Z | 2020-05-31T07:19:52.000Z | from telethon.errors import ImageProcessFailedError, PhotoCropSizeSmallError
from telethon.errors.rpcerrorlist import (PhotoExtInvalidError,
UsernameOccupiedError)
from telethon.tl.functions.account import (UpdateProfileRequest,
Upda... | 36.195652 | 81 | 0.606006 |
1c970791eb809cfdfa95176a1c145047fb08b117 | 9,363 | py | Python | datathon/datathon_etl_pipelines/mimic_cxr/prepare_mimic_cxr.py | kourtneyshort/healthcare | 1d1e2375304ac99f43a8b6aee7374fcdf641eb6f | [
"Apache-2.0"
] | 310 | 2018-02-23T01:40:01.000Z | 2022-03-30T12:25:56.000Z | datathon/datathon_etl_pipelines/mimic_cxr/prepare_mimic_cxr.py | kourtneyshort/healthcare | 1d1e2375304ac99f43a8b6aee7374fcdf641eb6f | [
"Apache-2.0"
] | 189 | 2018-06-19T15:32:10.000Z | 2022-03-11T23:48:14.000Z | datathon/datathon_etl_pipelines/mimic_cxr/prepare_mimic_cxr.py | animesh/healthcare | 7d3d4dc9deb3d31eab99035780ccb9a44f00b687 | [
"Apache-2.0"
] | 165 | 2018-03-06T19:29:18.000Z | 2022-03-21T10:53:45.000Z | r"""Load the MIMIC CXR dataset onto GCP.
The raw MIMIC CXR dataset is originally hosted by Physionet as a collection of
tar files which contain JPG images, and a gzip'd CSV file of labels.
The JPG images have paths of the form:
(train|valid)/p([0-9]+)/s([0-9]+)/view([0-9]+)_(frontal|lateral|other)\.jpg
which lists th... | 34.936567 | 85 | 0.698387 |
1c97158b8a668bf15e138b5f97f825bf83c132d9 | 4,853 | py | Python | ngraph/transformers/passes/cpulayout.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/transformers/passes/cpulayout.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/transformers/passes/cpulayout.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 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.apa... | 32.790541 | 99 | 0.613847 |
1c97562dbaedd32a938d63e341926a907550b885 | 7,273 | py | Python | pitopcommon/bitwise_ops.py | cbajumpa/pi-top-Python-Common-Library | 28b0301de0c5468714518e669742ef6be7738ce6 | [
"Apache-2.0"
] | 1 | 2021-05-12T14:21:12.000Z | 2021-05-12T14:21:12.000Z | pitopcommon/bitwise_ops.py | cbajumpa/pi-top-Python-Common-Library | 28b0301de0c5468714518e669742ef6be7738ce6 | [
"Apache-2.0"
] | 10 | 2020-12-01T11:27:24.000Z | 2021-07-28T23:29:20.000Z | pitopcommon/bitwise_ops.py | cbajumpa/pi-top-Python-Common-Library | 28b0301de0c5468714518e669742ef6be7738ce6 | [
"Apache-2.0"
] | 1 | 2021-02-01T21:17:56.000Z | 2021-02-01T21:17:56.000Z | from math import ceil
from pitopcommon.logger import PTLogger
def split_into_bytes(data: int, no_of_bytes: int = -1, little_endian: bool = False, signed: bool = False):
"""
This function will split a given integer into a integer list representing the bytes to be split;
:param data: A integer that represen... | 39.961538 | 106 | 0.715798 |
1c97612727fbaf93e9536a31bae2accea8492904 | 1,834 | py | Python | napari/utils/_dtype.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | 1 | 2021-05-16T19:31:42.000Z | 2021-05-16T19:31:42.000Z | napari/utils/_dtype.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/_dtype.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
_np_uints = {
8: np.uint8,
16: np.uint16,
32: np.uint32,
64: np.uint64,
}
_np_ints = {
8: np.int8,
16: np.int16,
32: np.int32,
64: np.int64,
}
_np_floats = {
32: np.float32,
64: np.float64,
}
_np_complex = {
64: np.complex64,
128: np.complex128,
}
... | 22.925 | 77 | 0.622137 |
1c9762e4b4bd667b080656a34aa28fe07ce48be7 | 580 | py | Python | neuro-cli/tests/unit/test_project.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-cli/tests/unit/test_project.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-cli/tests/unit/test_project.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import os
from pathlib import Path
from typing import Optional
import pytest
from neuro_cli.project import _project_init
@pytest.mark.parametrize("name", [None, "my-custom name"])
def test_project_init(tmp_path: Path, name: Optional[str]) -> None:
old_workdir = os.getcwd()
path = tmp_path / (name or "neuro ... | 25.217391 | 67 | 0.681034 |
1c976e1e81cdeba3173fdfd577dedbae2fb98859 | 737 | py | Python | examples/resources/simple_run_resource_example_test.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 19 | 2020-04-18T14:47:37.000Z | 2022-03-26T14:18:21.000Z | examples/resources/simple_run_resource_example_test.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 4 | 2020-03-17T21:01:58.000Z | 2021-09-24T21:07:25.000Z | examples/resources/simple_run_resource_example_test.py | Fladdimir/casymda | 6cf599bed2229c4aff9bca31350604b38ef76138 | [
"MIT"
] | 4 | 2020-05-09T16:31:57.000Z | 2022-01-23T09:11:19.000Z | """sample model execution"""
from simpy import Environment
import examples.resources.resource_example_model as model_module
def test_simple_run():
"""run model"""
env = Environment()
model = model_module.Model(env)
model.source.max_entities = 6
model.source.inter_arrival_time = 0
model.env.... | 28.346154 | 73 | 0.744912 |
1c97e022716b5ebd09316722f726c4115057c4af | 68,965 | py | Python | versioneer.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | versioneer.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | versioneer.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # pylint: skip-file
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
*... | 37.706397 | 90 | 0.623766 |
1c97eba874cd83943cd9affa8bb930ddb4922376 | 14,276 | py | Python | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 17 | 2016-04-17T04:00:56.000Z | 2020-08-19T12:03:18.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 23 | 2016-03-23T11:12:19.000Z | 2021-12-17T18:24:16.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... | 33.35514 | 79 | 0.612006 |
1c980e1b80510a70081ee9440b66b8b93d3afb8f | 7,661 | py | Python | tests/cupy/admm/test_tvl1.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | tests/cupy/admm/test_tvl1.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | tests/cupy/admm/test_tvl1.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | from __future__ import division
from builtins import object
from past.utils import old_div
import pytest
import numpy as np
try:
import cupy as cp
try:
cp.cuda.Device(0).compute_capability
except cp.cuda.runtime.CUDARuntimeError:
pytest.skip("GPU device inaccessible", allow_module_level=Tru... | 28.585821 | 79 | 0.509986 |
1c9813e2bb7426bda72c8163fc0f320653efb244 | 17,773 | py | Python | lyaf_optdepth/utils.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/utils.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/utils.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import chi2
from matplotlib.patches import Ellipse
from scipy.special import erf
from astroML.plotting.mcmc import convert_to_stdev as cts
from scipy.optimize import curve_fit
def draw_ellipse(pos, cov, nsig=None, ax=None, label="temp",
... | 34.377176 | 90 | 0.587971 |
1c982050a2ed02f5ba6e4a68a4e91c0c680ab9e2 | 305 | py | Python | tacotron2/app/syntesis/fields.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | 1 | 2020-03-03T23:04:05.000Z | 2020-03-03T23:04:05.000Z | tacotron2/app/syntesis/fields.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | null | null | null | tacotron2/app/syntesis/fields.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | 1 | 2020-03-26T19:37:46.000Z | 2020-03-26T19:37:46.000Z | from marshmallow import ValidationError, fields
class BytesField(fields.Field):
def _validate(self, value):
if not isinstance(value, bytes):
raise ValidationError('Invalid input type.')
if value is None or value == b'':
raise ValidationError('Invalid value') | 30.5 | 56 | 0.665574 |
1c98325c723ca53cb4ce8ca5098ecf43188bc318 | 2,955 | py | Python | oval-gear.py | phillbaker/non-circular-gears-generator | 268506c53dc4b11832a11674d36b71ec2d161dd9 | [
"Unlicense"
] | 7 | 2016-02-10T09:29:33.000Z | 2021-09-29T20:23:30.000Z | oval-gear.py | phillbaker/non-circular-gears-generator | 268506c53dc4b11832a11674d36b71ec2d161dd9 | [
"Unlicense"
] | 1 | 2016-03-01T03:11:25.000Z | 2016-03-02T03:13:47.000Z | oval-gear.py | phillbaker/non-circular-gears-generator | 268506c53dc4b11832a11674d36b71ec2d161dd9 | [
"Unlicense"
] | 2 | 2016-04-02T02:58:20.000Z | 2016-05-21T08:51:38.000Z | #!/usr/bin/python
from slfmaker import SLFMaker, SLFMakerSphereTeeth
from math import sin,cos,pi,sqrt
class oval (SLFMaker):
"Makes elliptical gears."
def __init__(self, teeth, ts, a, e, nodes, iradius, depth, tolerance):
# various oval parameters
self.a = a;
self.nodes = nodes
... | 39.4 | 105 | 0.545516 |
1c9860e554b6cac999201d8e82c2f319a0146805 | 9,497 | py | Python | src/python/ecc/ecc.py | cvai-repo/eccentricity | 33efe402c2521f7bc0366e5ca66d4d3205d7c515 | [
"Apache-2.0"
] | 9 | 2017-06-28T21:35:22.000Z | 2019-03-09T20:34:24.000Z | src/python/ecc/ecc.py | sailor01/eccentricity | b8a4570635320aad4e6e48712104b56cf3f67291 | [
"Apache-2.0"
] | 10 | 2020-09-26T00:50:00.000Z | 2022-03-12T00:19:58.000Z | src/python/ecc/ecc.py | sailor01/eccentricity | b8a4570635320aad4e6e48712104b56cf3f67291 | [
"Apache-2.0"
] | 8 | 2017-11-09T01:31:53.000Z | 2020-10-06T13:25:46.000Z | """Builds the eccentricity model.
Based on the tutorial for the CIFAR-10 model in Tensorflow.
http://tensorflow.org/tutorials/deep_cnn/
Relevant comments from that tutorial have been kept, others are added from me.
Summary of available functions:
# Compute inference on the model inputs to make a prediction.
predi... | 37.836653 | 204 | 0.681794 |
1c9866942c41c09903a2e7b2b98a472bf77871ec | 3,889 | py | Python | detection/core/bbox/transforms.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 1 | 2021-08-12T06:51:29.000Z | 2021-08-12T06:51:29.000Z | detection/core/bbox/transforms.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 3 | 2021-04-05T08:04:39.000Z | 2021-11-12T19:16:26.000Z | detection/core/bbox/transforms.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 1 | 2021-09-06T06:05:31.000Z | 2021-09-06T06:05:31.000Z | # -*- coding:utf-8 -*-
# author:栗山未来ii
# e-mail:1353593259@qq.com
# datetime:1993/12/01
# filename:aaa.py
# software: PyCharm
from detection.utils.misc import *
def bbox2delta(box, gt_box, target_means, target_stds):
'''Compute refinement needed to transform box to gt_box.
Args
---
box: [...... | 24.770701 | 67 | 0.552327 |
1c9866f540045dde5c658c24f81b536c5d1db61c | 20,016 | py | Python | colour/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/__init__.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Colour
======
`Colour <https://github.com/colour-science/colour>`__ is an open-source
`Python <https://www.python.org/>`__ package providing a comprehensive number
of algorithms and datasets for colour science.
It is freely available under the
`New BSD License <https://opensource.org/licen... | 46.119816 | 79 | 0.748851 |
1c98690ae8d08cc4bf0d8c84d0c7a7c87a6d357d | 471 | py | Python | multi_robot_motion_planning/DiscoPygal/mrmp/linear_path_intersection_test.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | multi_robot_motion_planning/DiscoPygal/mrmp/linear_path_intersection_test.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | multi_robot_motion_planning/DiscoPygal/mrmp/linear_path_intersection_test.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | from ms_polygon_segment import *
def do_intersect(p1, p2, source, target):
# fix p1 and move p2 relatively
ps = Polygon_set_2()
p1 = minkowski_sum_polygon_point(p1, source[0])
ps.insert(p1)
s = source[1]
t = target[1] + Vector_2(target[0], source[0])
if s == t:
ms = minkowski_sum_p... | 27.705882 | 55 | 0.645435 |
1c98b6d5c183602f5c7428b07c035bb5c9550632 | 3,494 | py | Python | djangocms_blog/cms_toolbars.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 1 | 2022-01-09T20:23:10.000Z | 2022-01-09T20:23:10.000Z | djangocms_blog/cms_toolbars.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 2 | 2020-05-17T21:27:25.000Z | 2020-05-17T22:48:48.000Z | djangocms_blog/cms_toolbars.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 2 | 2020-05-17T21:23:51.000Z | 2020-07-02T12:34:02.000Z | from cms.toolbar_base import CMSToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils.urlutils import admin_reverse
from django.urls import reverse
from django.utils.translation import gettext_lazy as _, override
from .settings import get_setting
@toolbar_pool.register
class BlogToolbar(CMSToolbar):
d... | 47.216216 | 117 | 0.647682 |
1c990f1197cf06eb1b620161b3ef8664e57a65c6 | 20,441 | py | Python | alipay/aop/api/domain/AlipayMerchantOrderSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayMerchantOrderSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayMerchantOrderSyncModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.UserInfomation import UserInfomation
from alipay.aop.api.domain.DiscountInfoData import DiscountInfoData
from alipay.aop.api.domain.OrderExtInfo import OrderExtInfo
from alipay.aop.... | 37.506422 | 106 | 0.607407 |
1c99134685a16ca79539c8435dc3af4b05dbcf02 | 1,774 | py | Python | tests/prototypes/test_integer_partitions.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | 5 | 2015-05-06T05:08:26.000Z | 2017-04-21T03:32:13.000Z | tests/prototypes/test_integer_partitions.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | null | null | null | tests/prototypes/test_integer_partitions.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | null | null | null | import unittest
from PADS import IntegerPartitions
from funcstructs.prototypes.integer_partitions import (
isqrt,
minimal_partition,
fixed_lex_partitions,
partition_number
)
class LevyPartitionTests(unittest.TestCase):
def test_integer_root(self):
"""Test r = isqrt(n) is greatest intege... | 35.48 | 77 | 0.573844 |
1c9928aa6c87ef2b77ec471bfc4b37c38b49cc51 | 2,770 | py | Python | chapter_1_fundamentals/play_async.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | chapter_1_fundamentals/play_async.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | chapter_1_fundamentals/play_async.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
## VOICEBOOK REPOSITORY ##
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neur... | 34.197531 | 121 | 0.61444 |
1c992d7d3fdc3211525704cc81c4722461758c0c | 32,989 | py | Python | spyder_vim/tests/test_vim.py | bgallois/spyder-vim | 9dd3c500571c07cebd713049d284b1a07d668352 | [
"MIT"
] | null | null | null | spyder_vim/tests/test_vim.py | bgallois/spyder-vim | 9dd3c500571c07cebd713049d284b1a07d668352 | [
"MIT"
] | null | null | null | spyder_vim/tests/test_vim.py | bgallois/spyder-vim | 9dd3c500571c07cebd713049d284b1a07d668352 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""Tests for the plugin."""
# Standard library imports
import os
import os.path as osp
# Test library imports
import pytest
try:
from unittest.mock import Mock
except ImportError:
from mock imp... | 34.872093 | 76 | 0.706114 |
1c99334882ee9e2328fce3ec5bae31086e9bc22f | 24,072 | py | Python | framework/tasks/process_npx.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | framework/tasks/process_npx.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | 14 | 2019-03-01T02:35:36.000Z | 2019-05-28T18:31:24.000Z | framework/tasks/process_npx.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Module for tasks that do post-run processing of output files.
"""
__author__ = "Lloyd McCarthy"
__license__ = "MIT"
import logging
import subprocess
from datetime import datetime
from os import remove
from typing import Generator, List, NamedTuple, Tuple
from openpyxl import load_workbook
fr... | 31.507853 | 97 | 0.582876 |
1c99d5f0296abfc5d39bec19a54510296e338e9c | 3,135 | py | Python | ForgeActivity/forgeactivity/tests/functional/test_rest.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeActivity/forgeactivity/tests/functional/test_rest.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeActivity/forgeactivity/tests/functional/test_rest.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 40.192308 | 78 | 0.655183 |
1c99f038cc51db2ee42d1294711d4284359eb12b | 6,925 | py | Python | dragons/plugins/echo.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | dragons/plugins/echo.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | dragons/plugins/echo.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | """
created by @sandy1709
Idea by @BlazingRobonix
"""
from dragons import drgub
from ..core.managers import edit_delete, edit_or_reply
from ..sql_helper.echo_sql import (
addecho,
get_all_echos,
get_echos,
is_echo,
remove_all_echos,
remove_echo,
remove_echos,
)
from . import get_user_from_... | 33.293269 | 156 | 0.572996 |
1c9a727e0d6aae6c3352824c521a11e96890bcfd | 44,559 | py | Python | pyscf/mcscf/casci.py | seunghoonlee89/pyscf-ecCC-TCC | 2091566fb83c1474e40bf74f271be2ce4611f60c | [
"Apache-2.0"
] | 2 | 2021-09-17T06:10:17.000Z | 2022-01-22T23:37:22.000Z | pyscf/mcscf/casci.py | seunghoonlee89/pyscf-ecCC-TCC | 2091566fb83c1474e40bf74f271be2ce4611f60c | [
"Apache-2.0"
] | null | null | null | pyscf/mcscf/casci.py | seunghoonlee89/pyscf-ecCC-TCC | 2091566fb83c1474e40bf74f271be2ce4611f60c | [
"Apache-2.0"
] | 2 | 2021-09-16T23:37:42.000Z | 2021-10-14T23:00:39.000Z | #!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. 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
#
# U... | 40.656022 | 110 | 0.606028 |
1c9a8d7e289e0d5ad1ff24160eb6dd7d0ea48695 | 3,857 | py | Python | experiments/ashvin/icml2020/hand/sparse/pen_mc1_pretrain3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse/pen_mc1_pretrain3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse/pen_mc1_pretrain3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies import GaussianP... | 30.370079 | 130 | 0.570391 |
1c9aa288b960a8d698c557d8eda616e7210deac7 | 6,920 | py | Python | angr/analyses/complete_calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/complete_calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/complete_calling_conventions.py | zjzh/angr | 654fc90a65748c926ee63279850b6aa9f4f8d292 | [
"BSD-2-Clause"
] | null | null | null | from typing import Optional
import logging
import claripy
from ..knowledge_plugins.cfg import CFGModel
from ..analyses.cfg import CFGUtils
from . import Analysis, register_analysis
_l = logging.getLogger(name=__name__)
class CompleteCallingConventionsAnalysis(Analysis):
"""
Implements full-binary calling c... | 48.055556 | 121 | 0.621243 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.