hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f73e7fcbe283ee71828ad54a29ef239ad581fd66
12,957
py
Python
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Tools/MondoReport.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
83
2017-03-15T12:43:25.000Z
2022-03-31T12:38:44.000Z
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Tools/MondoReport.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
18
2017-03-20T14:12:58.000Z
2021-07-28T09:11:55.000Z
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Tools/MondoReport.py
CymaticLabs/Unity3d.Amqp
42ca5de66fcda21ef6a4040bade99118b2ad6374
[ "MIT" ]
25
2017-04-01T01:40:02.000Z
2022-02-20T11:08:12.000Z
#!/usr/bin/env python """ @@TR: This code is pretty much unsupported. MondoReport.py -- Batching module for Python and Cheetah. Version 2001-Nov-18. Doesn't do much practical yet, but the companion testMondoReport.py passes all its tests. -Mike Orr (Iron) TODO: BatchRecord.prev/next/prev_batches/next_batches/query,...
27.864516
80
0.568959
""" @@TR: This code is pretty much unsupported. MondoReport.py -- Batching module for Python and Cheetah. Version 2001-Nov-18. Doesn't do much practical yet, but the companion testMondoReport.py passes all its tests. -Mike Orr (Iron) TODO: BatchRecord.prev/next/prev_batches/next_batches/query, prev.query, next.que...
false
true
f73e7fdc4728deabce9a2c0852d3596fb23c3e73
3,480
py
Python
kitsune/urls.py
rlr/kitsune
591e996a3a115a7b235cbca19f5dec58fc9b6249
[ "BSD-3-Clause" ]
1
2015-03-09T05:48:58.000Z
2015-03-09T05:48:58.000Z
kitsune/urls.py
rlr/kitsune
591e996a3a115a7b235cbca19f5dec58fc9b6249
[ "BSD-3-Clause" ]
null
null
null
kitsune/urls.py
rlr/kitsune
591e996a3a115a7b235cbca19f5dec58fc9b6249
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import include, patterns, url from django.conf import settings from django.views.i18n import javascript_catalog from django.views.decorators.cache import cache_page from django.views.generic.base import RedirectView import authority import badger from waffle.views import wafflejs # Note: This m...
35.876289
77
0.657759
from django.conf.urls import include, patterns, url from django.conf import settings from django.views.i18n import javascript_catalog from django.views.decorators.cache import cache_page from django.views.generic.base import RedirectView import authority import badger from waffle.views import wafflejs from kitsune...
true
true
f73e80ea27abee7043f4be2c11413ab355bc240c
1,279
py
Python
src/data/make_norm.py
lcn-kul/conferencing-speech-2022
1089b2baaf2fcf3ac8ef44c65b80da2e5b2c331b
[ "MIT" ]
1
2022-03-30T15:06:18.000Z
2022-03-30T15:06:18.000Z
src/data/make_norm.py
lcn-kul/conferencing-speech-2022
1089b2baaf2fcf3ac8ef44c65b80da2e5b2c331b
[ "MIT" ]
null
null
null
src/data/make_norm.py
lcn-kul/conferencing-speech-2022
1089b2baaf2fcf3ac8ef44c65b80da2e5b2c331b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import click import logging from dotenv import find_dotenv, load_dotenv from src.data.calculate_norm.calculate_norm import calculate_norm from src.utils.split import Split, ALL_SPLITS, DEV_SPLITS @click.command() @click.option('-e', '--example', is_flag=True) @click.option('-i', '--partition_...
30.452381
81
0.701329
import click import logging from dotenv import find_dotenv, load_dotenv from src.data.calculate_norm.calculate_norm import calculate_norm from src.utils.split import Split, ALL_SPLITS, DEV_SPLITS @click.command() @click.option('-e', '--example', is_flag=True) @click.option('-i', '--partition_idx', default=0) @click...
true
true
f73e81d5d46bc3e54c29fa326008f7c4040f400d
159
py
Python
virtual/bin/django-admin.py
evelyne250/my-gallery
890843ec8b240568d16041fbd0ea5f98f496515c
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
evelyne250/my-gallery
890843ec8b240568d16041fbd0ea5f98f496515c
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
evelyne250/my-gallery
890843ec8b240568d16041fbd0ea5f98f496515c
[ "MIT" ]
null
null
null
#!/home/wecode/Desktop/my-gallery/virtual/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.5
52
0.786164
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f73e825d6fce9be0f47cf6c0fdf66776a6873239
1,373
py
Python
azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_with_scope_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_with_scope_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/models/role_assignment_properties_with_scope_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.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 ...
37.108108
115
0.616897
from msrest.serialization import Model class RoleAssignmentPropertiesWithScope(Model): _attribute_map = { 'scope': {'key': 'scope', 'type': 'str'}, 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, } ...
true
true
f73e831e43ddc79e12c94b4734ebb23f9789a0bb
2,069
py
Python
src/ggrc/models/exceptions.py
j0gurt/ggrc-core
84662dc85aa8864c907eabe70b8efccf92298a1f
[ "ECL-2.0", "Apache-2.0" ]
1
2019-01-04T10:55:14.000Z
2019-01-04T10:55:14.000Z
src/ggrc/models/exceptions.py
farcry4998/ggrc-core
c469039dabb55033c1b379850feb19e8dda2e2a1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc/models/exceptions.py
farcry4998/ggrc-core
c469039dabb55033c1b379850feb19e8dda2e2a1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Model-related exceptions and related logic.""" import re from logging import getLogger from sqlalchemy.exc import IntegrityError logger = getLogger(__name__) def field_lookup(field_string): """Find...
29.985507
78
0.650556
import re from logging import getLogger from sqlalchemy.exc import IntegrityError logger = getLogger(__name__) def field_lookup(field_string): bad_field = 'code' if field_string.startswith('uq_t_'): bad_field = 'title' elif field_string.endswith('email'): bad_field = 'email' elif field_string....
true
true
f73e840107962f302afb83c14068af287b0260fa
3,312
py
Python
RPi/Main.py
ritikbhatia/Multidisciplinary-Design-Project
552285ac10296d2e74c40b3c698a742a52173479
[ "MIT" ]
1
2022-01-12T15:22:46.000Z
2022-01-12T15:22:46.000Z
RPi/Main.py
ritikbhatia/Multidisciplinary-Design-Project
552285ac10296d2e74c40b3c698a742a52173479
[ "MIT" ]
null
null
null
RPi/Main.py
ritikbhatia/Multidisciplinary-Design-Project
552285ac10296d2e74c40b3c698a742a52173479
[ "MIT" ]
null
null
null
from ArduinoHandler import ArduinoHandler import logging import time from datetime import datetime from Queue import Queue import os import sys import multiprocessing from PCHandler import PCHandler from BTHandler import BTHandler from CameraHandler import CameraHandler from PacketsHandler import * jobList = [] m...
23
92
0.589372
from ArduinoHandler import ArduinoHandler import logging import time from datetime import datetime from Queue import Queue import os import sys import multiprocessing from PCHandler import PCHandler from BTHandler import BTHandler from CameraHandler import CameraHandler from PacketsHandler import * jobList = [] m...
true
true
f73e856a0a2e5c97b95c9e04c66d81fbea8db303
59,458
py
Python
tools/mo/unit_tests/mo/middle/InterpolateSequenceToInterpolate_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/unit_tests/mo/middle/InterpolateSequenceToInterpolate_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/unit_tests/mo/middle/InterpolateSequenceToInterpolate_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np import unittest from openvino.tools.mo.middle.InterpolateSequenceToInterpolate import InterpolateSequenceToInterpolate from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo....
37.512934
119
0.519156
import numpy as np import unittest from openvino.tools.mo.middle.InterpolateSequenceToInterpolate import InterpolateSequenceToInterpolate from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.utils.ir_engine.compare_graphs import compare_graphs from unit_tests.utils.graph...
true
true
f73e8577eb976662de1a03926e2323985b4d4c7a
1,376
py
Python
addons/Sprytile-6b68d00/rx/internal/priorityqueue.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
733
2017-08-22T09:47:54.000Z
2022-03-27T23:56:52.000Z
rx/internal/priorityqueue.py
asheraryam/Sprytile
c63be50d14b07192ff134ceab256f0d69b9c4c92
[ "MIT" ]
74
2017-08-16T09:13:05.000Z
2022-03-15T02:31:49.000Z
rx/internal/priorityqueue.py
asheraryam/Sprytile
c63be50d14b07192ff134ceab256f0d69b9c4c92
[ "MIT" ]
77
2017-09-14T16:56:11.000Z
2022-03-27T13:55:16.000Z
import heapq import rx class PriorityQueue(object): """Priority queue for scheduling""" def __init__(self, capacity=None): self.items = [] self.count = 0 # Monotonic increasing for sort stability self.lock = rx.config.get("Lock")() def __len__(self): """Returns length ...
23.724138
70
0.551599
import heapq import rx class PriorityQueue(object): def __init__(self, capacity=None): self.items = [] self.count = 0 self.lock = rx.config.get("Lock")() def __len__(self): return len(self.items) def peek(self): return self.items[0][0] def remove_at(se...
true
true
f73e85bcadcc1dc382bfacc5c9411305e5bf78a8
1,006
py
Python
entry/migrations/0019_visitordetails.py
Shrinidhi1904/AtlasCopco
3116d8f7bdff9635952c3db741adc8abe93bfb72
[ "MIT" ]
1
2021-07-10T12:13:17.000Z
2021-07-10T12:13:17.000Z
entry/migrations/0019_visitordetails.py
Shrinidhi1904/AtlasCopco
3116d8f7bdff9635952c3db741adc8abe93bfb72
[ "MIT" ]
null
null
null
entry/migrations/0019_visitordetails.py
Shrinidhi1904/AtlasCopco
3116d8f7bdff9635952c3db741adc8abe93bfb72
[ "MIT" ]
10
2020-09-25T14:04:02.000Z
2021-11-04T18:41:40.000Z
# Generated by Django 3.1.1 on 2021-01-30 17:49 import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('entry', '0018_auto_20210121_1805'), ] operations = [ migrations...
38.692308
139
0.625249
import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('entry', '0018_auto_20210121_1805'), ] operations = [ migrations.CreateModel( name='VisitorDetails'...
true
true
f73e85e463c8099c9e091af90a3c75d377448f2d
14,449
py
Python
src/spaceone/inventory/manager/collector_manager/filter_manager.py
jihyungSong/inventory
c8b0e4dff4c43693b773a1b486a757599ac29c8e
[ "Apache-2.0" ]
1
2020-07-26T17:53:18.000Z
2020-07-26T17:53:18.000Z
src/spaceone/inventory/manager/collector_manager/filter_manager.py
jihyungSong/inventory
c8b0e4dff4c43693b773a1b486a757599ac29c8e
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/manager/collector_manager/filter_manager.py
jihyungSong/inventory
c8b0e4dff4c43693b773a1b486a757599ac29c8e
[ "Apache-2.0" ]
null
null
null
import logging from google.protobuf.json_format import MessageToDict from spaceone.core import cache from spaceone.core.manager import BaseManager from spaceone.inventory.manager.collector_manager.collecting_manager import RESOURCE_MAP _LOGGER = logging.getLogger(__name__) class FilterManager(BaseManager): """...
42.002907
164
0.561423
import logging from google.protobuf.json_format import MessageToDict from spaceone.core import cache from spaceone.core.manager import BaseManager from spaceone.inventory.manager.collector_manager.collecting_manager import RESOURCE_MAP _LOGGER = logging.getLogger(__name__) class FilterManager(BaseManager): def...
true
true
f73e87693090402e524f96918cc305e8eca95fae
149
py
Python
projects/code_combat/4_Backwoods_Forest/114-Backwoods_Standoff_B/stand_b.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/4_Backwoods_Forest/114-Backwoods_Standoff_B/stand_b.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/4_Backwoods_Forest/114-Backwoods_Standoff_B/stand_b.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
while True: enemy = hero.findNearestEnemy() if hero.isReady("cleave"): hero.cleave(enemy) else: hero.attack(enemy)
21.285714
36
0.583893
while True: enemy = hero.findNearestEnemy() if hero.isReady("cleave"): hero.cleave(enemy) else: hero.attack(enemy)
true
true
f73e88052ea184704f7d5e3ba1ba61be8643b479
437
py
Python
{{cookiecutter.project_slug}}/backend/app/app/schemas/role.py
gma2th/full-stack
fd43b13ade62c5dd7acb9d711400c702593984d4
[ "MIT" ]
516
2018-03-06T19:20:47.000Z
2022-03-30T22:22:11.000Z
{{cookiecutter.project_slug}}/backend/app/app/schemas/role.py
ohld/full-stack
cc2f9753f268a7e1264dd01b888f587c3a45c9a2
[ "MIT" ]
23
2018-03-21T19:38:40.000Z
2020-12-27T23:08:09.000Z
{{cookiecutter.project_slug}}/backend/app/app/schemas/role.py
ohld/full-stack
cc2f9753f268a7e1264dd01b888f587c3a45c9a2
[ "MIT" ]
85
2018-03-29T16:46:40.000Z
2022-01-27T18:47:39.000Z
# Import standard library packages # Import installed packages from marshmallow import fields # Import app code from .base import BaseSchema class RoleSchema(BaseSchema): # Own properties id = fields.Int() created_at = fields.DateTime() name = fields.Str() users = fields.Nested( "UserSch...
21.85
85
0.659039
from marshmallow import fields from .base import BaseSchema class RoleSchema(BaseSchema): id = fields.Int() created_at = fields.DateTime() name = fields.Str() users = fields.Nested( "UserSchema", only=["id", "first_name", "last_name", "email", "is_active", "is_superuser"], ...
true
true
f73e89ae275a921d5d1ba5f77f9c6643a6dc8e51
2,245
py
Python
tests/neptune/new/attributes/test_attribute_base.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
null
null
null
tests/neptune/new/attributes/test_attribute_base.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
null
null
null
tests/neptune/new/attributes/test_attribute_base.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2020, Neptune Labs Sp. z o.o. # # 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...
29.155844
82
0.702004
import random import threading import time import unittest import uuid from typing import Optional from mock import MagicMock from neptune.new.internal.container_type import ContainerType from neptune.new.internal.id_formats import UniqueId from neptune.new.internal.operation_processors.operation_proce...
true
true
f73e8a73deb3d8ddce843f603c78ce40a13fdb7f
2,124
py
Python
mc2/permissions.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
4
2016-03-09T00:51:17.000Z
2017-10-05T23:54:00.000Z
mc2/permissions.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
131
2015-11-19T16:45:23.000Z
2018-07-24T09:36:08.000Z
mc2/permissions.py
praekeltfoundation/mc2
5367a8aed309fade0f17bc72efa099b0afc76aa7
[ "BSD-2-Clause" ]
2
2016-07-30T15:36:23.000Z
2017-09-18T12:40:11.000Z
from urlparse import urlparse from django.db.models import Q from django.conf import settings from mc2.controllers.docker.models import DockerController def get_app_id_from_domain(domain): index = domain.find(settings.HUB_DOMAIN) if not index == -1: return domain[:index - 1] return None def or...
32.676923
73
0.531544
from urlparse import urlparse from django.db.models import Q from django.conf import settings from mc2.controllers.docker.models import DockerController def get_app_id_from_domain(domain): index = domain.find(settings.HUB_DOMAIN) if not index == -1: return domain[:index - 1] return None def or...
true
true
f73e8b29917df51678201e2832c957c61460de85
6,467
py
Python
runtime/eth_test.py
BerkeleyLab/CMOC
79601fc64afde369a8e0534c3e87eb29cd927299
[ "BSD-3-Clause-LBNL" ]
3
2018-12-07T06:01:36.000Z
2022-02-07T17:56:15.000Z
runtime/eth_test.py
BerkeleyLab/CMOC
79601fc64afde369a8e0534c3e87eb29cd927299
[ "BSD-3-Clause-LBNL" ]
null
null
null
runtime/eth_test.py
BerkeleyLab/CMOC
79601fc64afde369a8e0534c3e87eb29cd927299
[ "BSD-3-Clause-LBNL" ]
1
2019-12-05T07:15:41.000Z
2019-12-05T07:15:41.000Z
#!/usr/bin/python import sys import socket import struct import time import logging import sys,getopt import os import random import numpy from matplotlib import pyplot as plt IPADDR = os.environ.get('IP_ADDR') if IPADDR is None: IPADDR = 'rflab1.lbl.gov' # 128.3.128.122 PORTNUM = 3000 global plot_ena, slow_ena pl...
32.661616
259
0.577548
import sys import socket import struct import time import logging import sys,getopt import os import random import numpy from matplotlib import pyplot as plt IPADDR = os.environ.get('IP_ADDR') if IPADDR is None: IPADDR = 'rflab1.lbl.gov' PORTNUM = 3000 global plot_ena, slow_ena plot_ena=0 slow_ena=0 def three_b...
false
true
f73e8b772c941910d9c1f6d5867bc4002a5822ef
21,453
py
Python
scipy/integrate/_ivp/rk.py
pranavrajpal/scipy
7dcdeffed53483a60b3e054618520e0f28adeba4
[ "BSD-3-Clause" ]
1
2021-06-11T22:09:38.000Z
2021-06-11T22:09:38.000Z
scipy/integrate/_ivp/rk.py
pranavrajpal/scipy
7dcdeffed53483a60b3e054618520e0f28adeba4
[ "BSD-3-Clause" ]
1
2021-04-03T20:19:36.000Z
2021-04-03T20:19:36.000Z
scipy/integrate/_ivp/rk.py
YarivLevy81/scipy
859c1061b3d5aa30c4466824049d69edde5499a2
[ "BSD-3-Clause" ]
1
2020-06-28T00:46:20.000Z
2020-06-28T00:46:20.000Z
import numpy as np from .base import OdeSolver, DenseOutput from .common import (validate_max_step, validate_tol, select_initial_step, norm, warn_extraneous, validate_first_step) from . import dop853_coefficients # Multiply steps computed from asymptotic behaviour of errors by this. SAFETY = 0.9 ...
37.180243
107
0.595861
import numpy as np from .base import OdeSolver, DenseOutput from .common import (validate_max_step, validate_tol, select_initial_step, norm, warn_extraneous, validate_first_step) from . import dop853_coefficients SAFETY = 0.9 MIN_FACTOR = 0.2 MAX_FACTOR = 10 def rk_step(fun, t, y, f, h, A,...
true
true
f73e8c70efe2c1e679832da03af75ed96eba0cb0
8,692
py
Python
sdk/python/feast/entity.py
Mwad22/feast
6a09d49e2e7bc105c86f1789c765d89e452af0b0
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/entity.py
Mwad22/feast
6a09d49e2e7bc105c86f1789c765d89e452af0b0
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/entity.py
Mwad22/feast
6a09d49e2e7bc105c86f1789c765d89e452af0b0
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Feast Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
27.681529
84
0.61919
from typing import Dict, MutableMapping, Optional import yaml from google.protobuf import json_format from google.protobuf.json_format import MessageToDict, MessageToJson from google.protobuf.timestamp_pb2 import Timestamp from feast.loaders import yaml as feast_yaml from feast.protos.feast.core.Entity_...
true
true
f73e8cf1b72008c3a80bff339a8965c686f16715
14,933
py
Python
hail/python/hail/ir/matrix_reader.py
iitalics/hail
eebdd30a6a1e0c04d6291abb4b8c834da590fc45
[ "MIT" ]
1
2022-01-03T13:46:08.000Z
2022-01-03T13:46:08.000Z
hail/python/hail/ir/matrix_reader.py
iitalics/hail
eebdd30a6a1e0c04d6291abb4b8c834da590fc45
[ "MIT" ]
2
2016-08-12T18:38:24.000Z
2018-09-05T15:26:35.000Z
hail/python/hail/ir/matrix_reader.py
iitalics/hail
eebdd30a6a1e0c04d6291abb4b8c834da590fc45
[ "MIT" ]
null
null
null
import abc import json import hail as hl from .utils import make_filter_and_replace from ..expr.types import tfloat32, tfloat64, hail_type, tint32, tint64, tstr from ..genetics.reference_genome import reference_genome_type from ..typecheck import * from ..utils import wrap_to_list from ..utils.misc import escape_str ...
43.034582
104
0.583205
import abc import json import hail as hl from .utils import make_filter_and_replace from ..expr.types import tfloat32, tfloat64, hail_type, tint32, tint64, tstr from ..genetics.reference_genome import reference_genome_type from ..typecheck import * from ..utils import wrap_to_list from ..utils.misc import escape_str ...
true
true
f73e8d67e6a1affd983994564338e98edbfa53ef
1,356
py
Python
examples/unwanted/example.py
balakrishnan273818/AdvancedLaneDetection
c0993aa9422654258a41fe9616ab4e24b29e6a7a
[ "MIT" ]
null
null
null
examples/unwanted/example.py
balakrishnan273818/AdvancedLaneDetection
c0993aa9422654258a41fe9616ab4e24b29e6a7a
[ "MIT" ]
null
null
null
examples/unwanted/example.py
balakrishnan273818/AdvancedLaneDetection
c0993aa9422654258a41fe9616ab4e24b29e6a7a
[ "MIT" ]
null
null
null
''' def warper(img, src, dst): # Compute and apply perpective transform img_size = (img.shape[1], img.shape[0]) M = cv2.getPerspectiveTransform(src, dst) warped = cv2.warpPerspective(img, M, img_size, flags=cv2.INTER_NEAREST) # keep same size as input image return warped ''' import numpy as np i...
28.851064
108
0.672566
import numpy as np import cv2 import glob import matplotlib.pyplot as plt objp = np.zeros((6*9,3), np.float32) objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2) objpoints = [] imgpoints = [] images = glob.glob('../camera_cal/*.jpg') for fname in images: img = cv2.imread(fname) gray = cv2.cvtColor(img,c...
true
true
f73e8e214355ee7241a25ffc71cc6cf79a1e0092
830
py
Python
py_sandbox/moduleInfo_configparser.py
kjgonzalez/codefiles
b86f25182d1b5553a331f8721dd06b51fa157c3e
[ "MIT" ]
null
null
null
py_sandbox/moduleInfo_configparser.py
kjgonzalez/codefiles
b86f25182d1b5553a331f8721dd06b51fa157c3e
[ "MIT" ]
10
2019-10-01T20:48:15.000Z
2020-04-14T18:21:09.000Z
py_sandbox/moduleInfo_configparser.py
kjgonzalez/codefiles
b86f25182d1b5553a331f8721dd06b51fa157c3e
[ "MIT" ]
null
null
null
''' date: 200429 objective: check out configparser module, which allows one to read from an ini file src1: https://docs.python.org/3/library/configparser.html src2: https://docs.python.org/3/library/configparser.html#mapping-protocol-access KJG200430: ini files aren't really that appealing to use. in fact, it might be...
28.62069
96
0.698795
import configparser from pprint import pprint dat = configparser.ConfigParser() dat.read('../data/simpsons.ini') pprint(dat) for isec in dat: print('SEC:',isec) for ival in dat[isec]: print(' {}: {}'.format( ival,dat[isec][ival] )) x = dat[isec] y = x[ival] y2 = x.getfloat(ival) print('{}: {}'.fo...
true
true
f73e8ecdd139363c9f8d164bdef6fec9949455c7
30,130
py
Python
src/test/rnn_test.py
DanielSun94/kgenlu
bbf377c6740040cb1a8b656785e7c5bfdb8371d5
[ "MIT" ]
null
null
null
src/test/rnn_test.py
DanielSun94/kgenlu
bbf377c6740040cb1a8b656785e7c5bfdb8371d5
[ "MIT" ]
null
null
null
src/test/rnn_test.py
DanielSun94/kgenlu
bbf377c6740040cb1a8b656785e7c5bfdb8371d5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ NLP From Scratch: Translation with a Sequence to Sequence Network and Attention ******************************************************************************* **Author**: `Sean Robertson <https://github.com/spro/practical-pytorch>`_ This is the third and final tutorial on doing "NLP From S...
35.11655
129
0.651012
from __future__ import unicode_literals, print_function, division from io import open import unicodedata import string import re import random import torch import torch.nn as nn from torch import optim import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
true
true
f73e8fc8b7fc5735d30e5588477a6ef3cdb95e4d
2,059
py
Python
learning_text_transformer/config.py
ianozsvald/learning_text_transformer
23fa318a7c8ed0e2dbd1fc8e68e0cb7d1f15731d
[ "MIT" ]
19
2015-08-28T14:41:16.000Z
2021-03-05T17:26:42.000Z
learning_text_transformer/config.py
ianozsvald/learning_text_transformer
23fa318a7c8ed0e2dbd1fc8e68e0cb7d1f15731d
[ "MIT" ]
null
null
null
learning_text_transformer/config.py
ianozsvald/learning_text_transformer
23fa318a7c8ed0e2dbd1fc8e68e0cb7d1f15731d
[ "MIT" ]
null
null
null
"""""" import os import logging # Simple logging configuration, an example output might be: # 2013-06-03 15:07:55.740 p7470 {start_here.py:31} INFO - This is an example log message LOG_FILE_NAME = "log.log" # The date format is ISO 8601, format includes a decimal separator for # milliseconds (not the default comma) as...
34.316667
111
0.684798
import os import logging LOG_FILE_NAME = "log.log" fmt = '%(asctime)s.%(msecs)d p%(process)s {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s' logging.basicConfig(filename=LOG_FILE_NAME, level=logging.DEBUG, format=fmt, datefmt='%Y-%m-%d %H:%M:%S') CONFIG_ENV_VAR =...
true
true
f73e9005ae34402980d7c1688fb74804bf4165ba
5,952
py
Python
Project_2.py
theKasra/14-puzzle-problem-bidirectionalsearch
f6fe4e0d8a1db1b1675933d8b2461981ac08686b
[ "MIT" ]
null
null
null
Project_2.py
theKasra/14-puzzle-problem-bidirectionalsearch
f6fe4e0d8a1db1b1675933d8b2461981ac08686b
[ "MIT" ]
null
null
null
Project_2.py
theKasra/14-puzzle-problem-bidirectionalsearch
f6fe4e0d8a1db1b1675933d8b2461981ac08686b
[ "MIT" ]
null
null
null
from copy import deepcopy from collections import deque import time import numpy as np class Node: def __init__(self, parent, grid): self.parent = parent self.grid = grid def print_answer(p1, p2): initial_to_middle = [] while p1: initial_to_middle.insert(0, p1.grid) ...
32
92
0.585853
from copy import deepcopy from collections import deque import time import numpy as np class Node: def __init__(self, parent, grid): self.parent = parent self.grid = grid def print_answer(p1, p2): initial_to_middle = [] while p1: initial_to_middle.insert(0, p1.grid) ...
true
true
f73e918b2454f5cf8cc06eb4c8d8076e4d180778
9,498
py
Python
crfnet/model/layers/filter_detections.py
XiaoJake/CameraRadarFusionNet
5506700c21ecda8de7cbbfa0cff25413fbcb2a96
[ "Apache-2.0" ]
3,255
2016-08-18T17:53:27.000Z
2022-03-29T19:53:43.000Z
retinanet_aerial_detection/keras_retinanet/layers/filter_detections.py
luke4u/Deep-Learning
f00e21b646f44ce1590e8fd6d8b5ecba56bf68db
[ "MIT" ]
141
2017-07-17T09:14:37.000Z
2022-03-14T00:00:19.000Z
retinanet_aerial_detection/keras_retinanet/layers/filter_detections.py
luke4u/Deep-Learning
f00e21b646f44ce1590e8fd6d8b5ecba56bf68db
[ "MIT" ]
2,580
2017-05-14T14:33:41.000Z
2022-03-31T15:04:14.000Z
""" Copyright 2017-2018 Fizyr (https://fizyr.com) 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 w...
42.401786
147
0.61634
import keras from .. import backend def filter_detections( boxes, classification, other = [], class_specific_filter = True, nms = True, score_threshold = 0.05, max_detections = 300, nms_threshold = 0.5 ): def _filter_detection...
true
true
f73e92de89b4a24afe0aadf707ce613fc081680c
469
py
Python
src/accounts/migrations/0002_auto_20200616_1337.py
albertonl/langsbay
cab14fe63c28dfe22e0a2ab7ca0e3c45b7d8dd25
[ "MIT" ]
3
2020-07-08T14:36:30.000Z
2021-01-14T14:42:14.000Z
src/accounts/migrations/0002_auto_20200616_1337.py
albertonl/langsbay
cab14fe63c28dfe22e0a2ab7ca0e3c45b7d8dd25
[ "MIT" ]
7
2021-04-08T21:21:27.000Z
2022-01-13T02:58:58.000Z
src/accounts/migrations/0002_auto_20200616_1337.py
albertonl/langsbay
cab14fe63c28dfe22e0a2ab7ca0e3c45b7d8dd25
[ "MIT" ]
1
2020-07-08T14:36:34.000Z
2020-07-08T14:36:34.000Z
# Generated by Django 3.0.7 on 2020-06-16 13:37 from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('learning', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0001_initial'),...
22.333333
66
0.635394
from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('learning', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0001_initial'), ] operations = [ migrations.R...
true
true
f73e945accc54a2ccd7f0c6efb911e6060b822ee
2,451
py
Python
tools/bpflist.py
jerr/bcc
f3fc87aab83ce3e4f1ca227e33853df21147255a
[ "Apache-2.0" ]
4
2018-01-29T13:38:50.000Z
2021-06-30T07:28:47.000Z
tools/bpflist.py
jerr/bcc
f3fc87aab83ce3e4f1ca227e33853df21147255a
[ "Apache-2.0" ]
13
2018-02-09T22:24:29.000Z
2018-06-18T22:33:29.000Z
tools/bpflist.py
jerr/bcc
f3fc87aab83ce3e4f1ca227e33853df21147255a
[ "Apache-2.0" ]
5
2018-01-31T05:04:19.000Z
2018-06-12T00:45:21.000Z
#!/usr/bin/python # # bpflist Display processes currently using BPF programs and maps, # pinned BPF programs and maps, and enabled probes. # # USAGE: bpflist [-v] # # Idea by Brendan Gregg. # # Copyright 2017, Sasha Goldshtein # Licensed under the Apache License, Version 2.0 # # 09-Mar-2017 Sasha Goldshte...
29.53012
76
0.611587
from bcc import BPF, USDT import argparse import re import os import subprocess examples = """examples: bpflist # display all processes currently using BPF bpflist -v # also count kprobes/uprobes bpflist -vv # display kprobes/uprobes and count them """ parser = argparse.ArgumentParser( ...
true
true
f73e94b6a87aba0ff9b566e6233ef2caa1fcb323
645
py
Python
backend/manage.py
crowdbotics-apps/beech-finance-holdi-30302
f12c5cfdffa6b26654411228501b1333edd423c3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/beech-finance-holdi-30302
f12c5cfdffa6b26654411228501b1333edd423c3
[ "FTL", "AML", "RSA-MD" ]
16
2021-09-13T20:33:58.000Z
2022-01-23T17:00:14.000Z
backend/manage.py
crowdbotics-apps/beech-finance-holdi-30302
f12c5cfdffa6b26654411228501b1333edd423c3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beech_finance_holdi_30302.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ...
29.318182
89
0.691473
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beech_finance_holdi_30302.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's ins...
true
true
f73e95393cbe0169f2f513fc304f6501adb0d684
4,348
py
Python
synapse/util/distributor.py
jdreichmann/synapse
6fde6aa9c02d35e0a908437ea49b275df9b58427
[ "Apache-2.0" ]
1
2021-04-27T19:04:56.000Z
2021-04-27T19:04:56.000Z
synapse/util/distributor.py
jdreichmann/synapse
6fde6aa9c02d35e0a908437ea49b275df9b58427
[ "Apache-2.0" ]
null
null
null
synapse/util/distributor.py
jdreichmann/synapse
6fde6aa9c02d35e0a908437ea49b275df9b58427
[ "Apache-2.0" ]
1
2020-09-23T12:36:11.000Z
2020-09-23T12:36:11.000Z
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket 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 applicab...
34.784
81
0.657544
import inspect import logging from twisted.internet import defer from synapse.logging.context import make_deferred_yieldable, run_in_background from synapse.metrics.background_process_metrics import run_as_background_process logger = logging.getLogger(__name__) def user_left_room(distributor, user, r...
true
true
f73e9558ca4bf2989dda025f02d1bd2aea28a192
33
py
Python
django_sourcebook/utils/__init__.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
django_sourcebook/utils/__init__.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
django_sourcebook/utils/__init__.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
__all__ = ["auth", "validators"]
16.5
32
0.636364
__all__ = ["auth", "validators"]
true
true
f73e96c4374ab3916b094067064a1150adadbc8b
688
py
Python
test/python/parametrized_test_case.py
vsmid/openapi
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
[ "MIT" ]
null
null
null
test/python/parametrized_test_case.py
vsmid/openapi
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
[ "MIT" ]
3
2021-12-21T08:18:48.000Z
2022-03-24T10:50:37.000Z
test/python/parametrized_test_case.py
vsmid/openapi
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
[ "MIT" ]
5
2021-12-11T06:10:14.000Z
2022-03-18T11:05:24.000Z
# Manticore Search Client # Copyright (c) 2020-2021, Manticore Software LTD (https://manticoresearch.com) # # All rights reserved import unittest class ParametrizedTestCase(unittest.TestCase): def __init__(self, methodName='runTest', settings=None): super(ParametrizedTestCase, self).__init__(methodName) ...
31.272727
79
0.713663
import unittest class ParametrizedTestCase(unittest.TestCase): def __init__(self, methodName='runTest', settings=None): super(ParametrizedTestCase, self).__init__(methodName) self.settings = settings @staticmethod def parametrize(testcase_class, settings=None): testloader = u...
true
true
f73e97c1f2b58ffa20dbfdf4109bf3cb964e706a
1,742
py
Python
test/utils/jmx/broker/remote_jmx_queue.py
julianghionoiu/tdl-client-python
93a2e4d59e2295c4af73012dfbb75975e4447da3
[ "Apache-2.0" ]
null
null
null
test/utils/jmx/broker/remote_jmx_queue.py
julianghionoiu/tdl-client-python
93a2e4d59e2295c4af73012dfbb75975e4447da3
[ "Apache-2.0" ]
7
2015-12-09T20:56:28.000Z
2020-01-27T12:48:17.000Z
test/utils/jmx/broker/remote_jmx_queue.py
julianghionoiu/tdl-client-python
93a2e4d59e2295c4af73012dfbb75975e4447da3
[ "Apache-2.0" ]
1
2015-09-03T18:33:05.000Z
2015-09-03T18:33:05.000Z
import re class RemoteJmxQueue(object): def __init__(self, jolokia_session, broker_name, queue_name): self.name = queue_name self.jolokia_session = jolokia_session self.queue_bean = ( "org.apache.activemq:type=Broker,brokerName={}," "destinationType=Queue,destination...
30.034483
65
0.552239
import re class RemoteJmxQueue(object): def __init__(self, jolokia_session, broker_name, queue_name): self.name = queue_name self.jolokia_session = jolokia_session self.queue_bean = ( "org.apache.activemq:type=Broker,brokerName={}," "destinationType=Queue,destination...
true
true
f73e9800771ef90292ddd41d4d60f8d6f4683d4a
236
py
Python
aula10/aula10.py
thidoa/Udemy_python3
b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818
[ "Apache-2.0" ]
null
null
null
aula10/aula10.py
thidoa/Udemy_python3
b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818
[ "Apache-2.0" ]
null
null
null
aula10/aula10.py
thidoa/Udemy_python3
b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818
[ "Apache-2.0" ]
null
null
null
numero = input('Digite um numero inteiro: ') if numero.isdigit(): numero = int(numero) if numero % 2 == 0: print('O numero e par!') else: print('O numero e impar!') else: print('Nao e um numero inteiro')
23.6
44
0.584746
numero = input('Digite um numero inteiro: ') if numero.isdigit(): numero = int(numero) if numero % 2 == 0: print('O numero e par!') else: print('O numero e impar!') else: print('Nao e um numero inteiro')
true
true
f73e9874d0e1a0b0a97179e0b4b7f8429b0adeaa
2,031
py
Python
websitePythonScripts/getCombinedRecommendation.py
itsmartagonzalez/Hunediam-Prime
183de7e856dd96d0c412d2f6dd0524560512f56f
[ "MIT" ]
null
null
null
websitePythonScripts/getCombinedRecommendation.py
itsmartagonzalez/Hunediam-Prime
183de7e856dd96d0c412d2f6dd0524560512f56f
[ "MIT" ]
null
null
null
websitePythonScripts/getCombinedRecommendation.py
itsmartagonzalez/Hunediam-Prime
183de7e856dd96d0c412d2f6dd0524560512f56f
[ "MIT" ]
1
2022-02-20T15:45:34.000Z
2022-02-20T15:45:34.000Z
#!/usr/bin/python3 import sys import sqlite3 import logging from collections import Counter from random import shuffle from getSimilarFromContentBased import getSimilarFromContentBased from getRecommendationFromSVD import getRecommendationFromSVD from getInfoFromMovieIDs import getInfoFromMovieIDs logger = logging.ge...
36.267857
152
0.754308
import sys import sqlite3 import logging from collections import Counter from random import shuffle from getSimilarFromContentBased import getSimilarFromContentBased from getRecommendationFromSVD import getRecommendationFromSVD from getInfoFromMovieIDs import getInfoFromMovieIDs logger = logging.getLogger(__name__) ...
true
true
f73e99e7e285171a17190c7d2c837c106094bc64
19,804
py
Python
test-component/draw_graph_2.py
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
2
2017-05-02T06:43:10.000Z
2017-05-30T11:18:03.000Z
test-component/draw_graph_2.py
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
10
2016-08-09T13:11:00.000Z
2016-11-10T12:33:02.000Z
test-component/draw_graph_2.py
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
5
2016-08-07T17:11:20.000Z
2016-10-22T08:45:42.000Z
import matplotlib.pyplot as plt import numpy as np from influxdb import InfluxDBClient import time import datetime import collections time_min = '2017-04-03 16:35:00' time_max = '2017-04-03 22:35:00' time_min_2 = '2017-04-06 09:30:00' time_max_2 = '2017-04-06 14:30:00' # time_min = '2017-03-25 00:00:00' # time_max = ...
47.37799
192
0.59387
import matplotlib.pyplot as plt import numpy as np from influxdb import InfluxDBClient import time import datetime import collections time_min = '2017-04-03 16:35:00' time_max = '2017-04-03 22:35:00' time_min_2 = '2017-04-06 09:30:00' time_max_2 = '2017-04-06 14:30:00' time_grouped = '30s' time_step = 5 onem2m = [...
true
true
f73e99f6bd947fc8027d455d3d18f2e8bd7b71d7
8,095
py
Python
tests/scripts/thread-cert/Cert_9_2_15_PendingPartition.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
2,962
2016-05-11T15:06:06.000Z
2022-03-27T20:06:16.000Z
tests/scripts/thread-cert/Cert_9_2_15_PendingPartition.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
5,899
2016-05-11T19:21:49.000Z
2022-03-31T18:17:20.000Z
tests/scripts/thread-cert/Cert_9_2_15_PendingPartition.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
1,113
2016-05-11T15:37:42.000Z
2022-03-31T09:37:04.000Z
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
40.883838
306
0.658184
import unittest import thread_cert from pktverify.consts import MLE_ADVERTISEMENT, MLE_PARENT_REQUEST, MLE_CHILD_ID_RESPONSE, MLE_CHILD_ID_REQUEST, MGMT_ACTIVE_SET_URI, MGMT_ACTIVE_GET_URI, RESPONSE_TLV, LINK_LAYER_FRAME_COUNTER_TLV, MODE_TLV, TIMEOUT_TLV, VERSION_TLV, TLV_REQUEST_TLV, CHA...
true
true
f73e9b285a96c3377ffcbc581d68e32068f527dc
1,410
py
Python
backend/users/views.py
OkothPius/Arexa
50c280ce00baf1e6ec8c1db69fbebe2a2b6c01da
[ "MIT" ]
null
null
null
backend/users/views.py
OkothPius/Arexa
50c280ce00baf1e6ec8c1db69fbebe2a2b6c01da
[ "MIT" ]
1
2021-11-18T20:05:04.000Z
2021-11-18T20:05:04.000Z
users/views.py
OkothPius/CRS
75111b82203adbdc3f50b1127b6db12bf3428f97
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth.decorators import login_required from . forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm def register(request): if request.method == 'POST': form = UserRegisterForm(request.POST) ...
34.390244
96
0.659574
from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth.decorators import login_required from . forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm def register(request): if request.method == 'POST': form = UserRegisterForm(request.POST) ...
true
true
f73e9bc0c3eb2e3e6e845776ae83116a4355c414
3,509
py
Python
dashboard/modules/log/test_log.py
carlos-aguayo/ray
fedbdd5dc6a47aa9cba170816f8c0950193b4fd6
[ "Apache-2.0" ]
null
null
null
dashboard/modules/log/test_log.py
carlos-aguayo/ray
fedbdd5dc6a47aa9cba170816f8c0950193b4fd6
[ "Apache-2.0" ]
null
null
null
dashboard/modules/log/test_log.py
carlos-aguayo/ray
fedbdd5dc6a47aa9cba170816f8c0950193b4fd6
[ "Apache-2.0" ]
null
null
null
import os import sys import logging import requests import time import traceback import html.parser import urllib.parse import pytest import ray from ray.new_dashboard.tests.conftest import * # noqa from ray.test_utils import ( format_web_url, wait_until_server_available, ) os.environ["RAY_USE_NEW_DASHBOARD"...
30.513043
78
0.593046
import os import sys import logging import requests import time import traceback import html.parser import urllib.parse import pytest import ray from ray.new_dashboard.tests.conftest import * from ray.test_utils import ( format_web_url, wait_until_server_available, ) os.environ["RAY_USE_NEW_DASHBOARD"] = "1...
true
true
f73e9c93ea86cba13818c06c8b68af09a3b326f5
1,658
py
Python
jesse/indicators/gatorosc.py
slipperlobster/flipper
8482edd77604fcec2ea08913f1748c21be80dac7
[ "MIT" ]
3,999
2018-11-09T10:38:51.000Z
2022-03-31T12:29:12.000Z
jesse/indicators/gatorosc.py
slipperlobster/flipper
8482edd77604fcec2ea08913f1748c21be80dac7
[ "MIT" ]
172
2020-04-16T16:19:08.000Z
2022-03-28T13:28:55.000Z
jesse/indicators/gatorosc.py
pmondal08/jesse
527952a74bc76f76cf3a2d25755386f8db285885
[ "MIT" ]
495
2019-03-01T21:48:53.000Z
2022-03-30T15:35:19.000Z
from collections import namedtuple import numpy as np import talib from jesse.helpers import get_candle_source, np_shift from jesse.helpers import slice_candles GATOR = namedtuple('GATOR', ['upper', 'lower', 'upper_change', 'lower_change']) def gatorosc(candles: np.ndarray, source_type: str = "close", sequential: ...
28.101695
97
0.651387
from collections import namedtuple import numpy as np import talib from jesse.helpers import get_candle_source, np_shift from jesse.helpers import slice_candles GATOR = namedtuple('GATOR', ['upper', 'lower', 'upper_change', 'lower_change']) def gatorosc(candles: np.ndarray, source_type: str = "close", sequential: ...
true
true
f73e9da59f7d2905985f41ece3b023016c18acfa
3,801
py
Python
epubcreator/misc/settings_store.py
JFTavares/ePubCreator
56871800e9faff43643c85198f516643cdd5b4fd
[ "Unlicense" ]
6
2015-04-07T23:27:35.000Z
2022-03-03T20:31:28.000Z
epubcreator/misc/settings_store.py
JFTavares/ePubCreator
56871800e9faff43643c85198f516643cdd5b4fd
[ "Unlicense" ]
null
null
null
epubcreator/misc/settings_store.py
JFTavares/ePubCreator
56871800e9faff43643c85198f516643cdd5b4fd
[ "Unlicense" ]
1
2021-04-17T11:36:22.000Z
2021-04-17T11:36:22.000Z
import os from PyQt4 import QtCore, QtGui from epubcreator.epubbase.ebook import Ebook from epubcreator.converters.converter_factory import ConverterFactory class SettingsStore(QtCore.QSettings): """ Permite guardar y recuperar las diversas opciones de configuración. Expone además todos los atributos re...
43.193182
141
0.674033
import os from PyQt4 import QtCore, QtGui from epubcreator.epubbase.ebook import Ebook from epubcreator.converters.converter_factory import ConverterFactory class SettingsStore(QtCore.QSettings): _SETTINGS_GROUP = "userPreferences" _SETTINGS = dict(editor="", sigilPath=...
true
true
f73e9e5f34bc40ffc35264b8d90bb26630570c74
1,378
py
Python
distcache/utils.py
ujas09/distcache
a9d8124fd727472b2e79f8146b8bf73d6957a767
[ "MIT" ]
1
2020-06-28T22:43:23.000Z
2020-06-28T22:43:23.000Z
distcache/utils.py
ujas09/distcache
a9d8124fd727472b2e79f8146b8bf73d6957a767
[ "MIT" ]
null
null
null
distcache/utils.py
ujas09/distcache
a9d8124fd727472b2e79f8146b8bf73d6957a767
[ "MIT" ]
null
null
null
""" Implements network utils like sending and receiving message over socket """ import pickle def send_message(message, client_socket, HEADER_LENGTH, FORMAT): """ sends message on the client_socket """ message = pickle.dumps(message) send_length = "{:<{}}".format(len(message), HEADER_LENGTH) c...
30.622222
102
0.684325
import pickle def send_message(message, client_socket, HEADER_LENGTH, FORMAT): message = pickle.dumps(message) send_length = "{:<{}}".format(len(message), HEADER_LENGTH) client_socket.send(bytes(send_length, FORMAT)) client_socket.send(message) def receive_message(client_socket, HEADER_LENGTH, FORMA...
true
true
f73e9fd4d3660b579a96e1ebca56b74f6b47d341
24,219
py
Python
examples/agent_policy.py
legend-of-zyda/LuxPythonEnvGym
7d818b5943dad1b7fae3c66b612aae93c743bd0e
[ "MIT" ]
61
2021-08-23T00:13:10.000Z
2022-03-26T13:11:57.000Z
examples/agent_policy.py
legend-of-zyda/LuxPythonEnvGym
7d818b5943dad1b7fae3c66b612aae93c743bd0e
[ "MIT" ]
36
2021-08-25T03:32:29.000Z
2021-11-20T05:15:29.000Z
examples/agent_policy.py
legend-of-zyda/LuxPythonEnvGym
7d818b5943dad1b7fae3c66b612aae93c743bd0e
[ "MIT" ]
28
2021-09-03T22:43:18.000Z
2022-01-24T14:57:18.000Z
import sys import time from functools import partial # pip install functools import copy import random import numpy as np from gym import spaces from luxai2021.env.agent import Agent, AgentWithModel from luxai2021.game.actions import * from luxai2021.game.game_constants import GAME_CONSTANTS from luxai2021.game.posi...
42.046875
132
0.516991
import sys import time from functools import partial import copy import random import numpy as np from gym import spaces from luxai2021.env.agent import Agent, AgentWithModel from luxai2021.game.actions import * from luxai2021.game.game_constants import GAME_CONSTANTS from luxai2021.game.position import Position ...
true
true
f73ea08d026446221868f6b1e5293fe358e3ce8d
1,636
py
Python
gge_proxy_manager/models/common.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
null
null
null
gge_proxy_manager/models/common.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
1
2015-04-09T15:58:19.000Z
2015-04-14T06:37:02.000Z
gge_proxy_manager/models/common.py
mrcrgl/gge-storage
a8471624c1a865d4f7eeb00415bd4cd2a91ea310
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from django.conf import settings from .player import Player from django.core.urlresolvers import reverse Q = models.Q class Game(models.Model): name = models.CharField(max_length=128, db_index=True) product_key = models.CharField(max_length...
30.296296
102
0.714548
from __future__ import unicode_literals from django.db import models from django.conf import settings from .player import Player from django.core.urlresolvers import reverse Q = models.Q class Game(models.Model): name = models.CharField(max_length=128, db_index=True) product_key = models.CharField(max_length...
true
true
f73ea0f7d09097f61f4b3add5eda83e1a207affc
962
py
Python
jsngram/notifications/models.py
jjh0106/jsngram
74f2fd79ddd6a6975d3c981ca9cb5bbed050f532
[ "MIT" ]
null
null
null
jsngram/notifications/models.py
jjh0106/jsngram
74f2fd79ddd6a6975d3c981ca9cb5bbed050f532
[ "MIT" ]
11
2020-06-05T20:06:56.000Z
2022-02-17T20:23:22.000Z
jsngram/notifications/models.py
jjh0106/jsngram
74f2fd79ddd6a6975d3c981ca9cb5bbed050f532
[ "MIT" ]
null
null
null
from django.db import models from django.utils.encoding import python_2_unicode_compatible from jsngram.users import models as user_models from jsngram.images import models as image_models class Notification(image_models.TimeStampedModel): TYPE_CHOICES = ( ('like', 'Like'), # 첫 번째는 데이터베이스를 위해, 두 번째는 어드민 ...
40.083333
99
0.713098
from django.db import models from django.utils.encoding import python_2_unicode_compatible from jsngram.users import models as user_models from jsngram.images import models as image_models class Notification(image_models.TimeStampedModel): TYPE_CHOICES = ( ('like', 'Like'), ('comment', 'Comment'...
true
true
f73ea13bf0258131db11e58907d7c863760cd695
155
py
Python
quik/quik-rts.py
inwise/VolatilityIndexLevy
30de823f240cbfc026443d0c702981dc16548274
[ "Apache-2.0" ]
null
null
null
quik/quik-rts.py
inwise/VolatilityIndexLevy
30de823f240cbfc026443d0c702981dc16548274
[ "Apache-2.0" ]
null
null
null
quik/quik-rts.py
inwise/VolatilityIndexLevy
30de823f240cbfc026443d0c702981dc16548274
[ "Apache-2.0" ]
2
2019-07-04T08:18:07.000Z
2021-06-03T11:09:35.000Z
# -*- coding: utf-8 -*- __author__ = 'Александр Гречко' from quik import quik_dde_server_history qds=quik_dde_server_history('rts') qds.start()
17.222222
41
0.703226
__author__ = 'Александр Гречко' from quik import quik_dde_server_history qds=quik_dde_server_history('rts') qds.start()
true
true
f73ea377b494abcbc73ed5facbbc17c8d55fa9d3
1,076
py
Python
arcusd/daemon/arcusd_signals.py
cuenca-mx/arcusd
dbbe420f98568ddc7cc35431e27b009a990b24c1
[ "MIT" ]
null
null
null
arcusd/daemon/arcusd_signals.py
cuenca-mx/arcusd
dbbe420f98568ddc7cc35431e27b009a990b24c1
[ "MIT" ]
241
2018-11-27T22:59:02.000Z
2022-03-31T11:03:49.000Z
arcusd/daemon/arcusd_signals.py
cuenca-mx/arcusd
dbbe420f98568ddc7cc35431e27b009a990b24c1
[ "MIT" ]
2
2019-09-22T03:42:32.000Z
2020-11-02T20:57:13.000Z
from datetime import datetime from celery.signals import task_postrun, task_prerun from arcusd.contracts import Contract from arcusd.data_access.tasks import save_task_info, update_task_info @task_prerun.connect def task_before_run(task_id, task, *args, **kwargs): request_id = task.request.kwargs.get('request_i...
30.742857
69
0.711896
from datetime import datetime from celery.signals import task_postrun, task_prerun from arcusd.contracts import Contract from arcusd.data_access.tasks import save_task_info, update_task_info @task_prerun.connect def task_before_run(task_id, task, *args, **kwargs): request_id = task.request.kwargs.get('request_i...
true
true
f73ea3f50e70aa6f2769bc79957a653e03482c19
59
py
Python
uzkChemTem/__init__.py
DomiDre/uzkChemTem
8a5d259904465901a7ba2a8e6f6c81dbe322d1f5
[ "MIT" ]
null
null
null
uzkChemTem/__init__.py
DomiDre/uzkChemTem
8a5d259904465901a7ba2a8e6f6c81dbe322d1f5
[ "MIT" ]
null
null
null
uzkChemTem/__init__.py
DomiDre/uzkChemTem
8a5d259904465901a7ba2a8e6f6c81dbe322d1f5
[ "MIT" ]
null
null
null
from .tem import load_file, pretty_plot, convert_tiffolder
29.5
58
0.847458
from .tem import load_file, pretty_plot, convert_tiffolder
true
true
f73ea44328adf8e7bd0fede20c5b5ed48b240720
2,962
py
Python
dwi_utilities/comp_high_b.py
pritesh-mehta/dwi-utilities
f1e307fcf51ef4e4cc95ac311f031e3521c1fbbf
[ "Apache-2.0" ]
null
null
null
dwi_utilities/comp_high_b.py
pritesh-mehta/dwi-utilities
f1e307fcf51ef4e4cc95ac311f031e3521c1fbbf
[ "Apache-2.0" ]
1
2022-01-31T23:43:20.000Z
2022-01-31T23:43:20.000Z
dwi_utilities/comp_high_b.py
pritesh-mehta/dwi-utilities
f1e307fcf51ef4e4cc95ac311f031e3521c1fbbf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ @author: pritesh-mehta """ import numpy as np from scipy.optimize import curve_fit from pathlib import Path from argparse import ArgumentParser from dwi_utilities.monoexponential_decay import log_func, func import dwi_utilities.nifti_utilities as nutil def comp_high_b_case(case_dir, target...
33.659091
107
0.61445
import numpy as np from scipy.optimize import curve_fit from pathlib import Path from argparse import ArgumentParser from dwi_utilities.monoexponential_decay import log_func, func import dwi_utilities.nifti_utilities as nutil def comp_high_b_case(case_dir, target_bval, save_case=False, output_dir=None, extension='...
true
true
f73ea519f8832efdc9b25199967e85cf5f3a6553
4,885
py
Python
storm_control/hal4000/testing/testing.py
emanuega/storm-5
f41dba34d1ea219d80954f8b32f0c25b9e7a876c
[ "MIT" ]
null
null
null
storm_control/hal4000/testing/testing.py
emanuega/storm-5
f41dba34d1ea219d80954f8b32f0c25b9e7a876c
[ "MIT" ]
null
null
null
storm_control/hal4000/testing/testing.py
emanuega/storm-5
f41dba34d1ea219d80954f8b32f0c25b9e7a876c
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ The HAL testing module, basically this just sends messages to HAL and verifies that response / behavior is correct. Testing is done by sub-classing this module and providing it with a series of test actions, a little bit like what Dave does when controlling HAL. Hazen 04/17 """ import storm...
36.455224
107
0.605937
import storm_control.sc_library.tcpClient as tcpClient import storm_control.hal4000.halLib.halMessage as halMessage import storm_control.hal4000.halLib.halModule as halModule import storm_control.hal4000.testing.testActionsTCP as testActionsTCP class Testing(halModule.HalModule): def __init__(self, module_par...
true
true
f73ea5c89a9fc888776bfb6480169cb0334eea34
2,357
py
Python
connectomics/model/utils/monitor.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
1
2020-05-17T08:01:56.000Z
2020-05-17T08:01:56.000Z
connectomics/model/utils/monitor.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
null
null
null
connectomics/model/utils/monitor.py
donglaiw/pytorch_connectomics
c79a3cc82f853a86e98930475f6355d0022916dd
[ "MIT" ]
3
2020-03-31T21:40:12.000Z
2021-06-09T02:26:43.000Z
import os,sys import numpy as np # tensorboardX from tensorboardX import SummaryWriter from .visualizer import Visualizer class Logger(object): def __init__(self, log_path='', log_opt=[1,1,0], batch_size=1): self.n = batch_size self.reset() # tensorboardX self.log_tb = None ...
34.661765
96
0.593127
import os,sys import numpy as np from tensorboardX import SummaryWriter from .visualizer import Visualizer class Logger(object): def __init__(self, log_path='', log_opt=[1,1,0], batch_size=1): self.n = batch_size self.reset() self.log_tb = None self.do_print = log_opt[0]=...
true
true
f73ea5d5f0cf546eadffbe00ea6e8a62346d1682
3,672
py
Python
GoToMeeting/GoToMeetingURLProvider.py
KWik/homebysix-recipes
5f5447bfba771633a605be2468f17d8bcf429eac
[ "Apache-2.0" ]
null
null
null
GoToMeeting/GoToMeetingURLProvider.py
KWik/homebysix-recipes
5f5447bfba771633a605be2468f17d8bcf429eac
[ "Apache-2.0" ]
null
null
null
GoToMeeting/GoToMeetingURLProvider.py
KWik/homebysix-recipes
5f5447bfba771633a605be2468f17d8bcf429eac
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2015-2020 Elliot Jordan # Based on original processor by Nick Gamewell # # 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/lice...
33.081081
86
0.639434
import gzip import json import os import platform import socket from distutils.version import LooseVersion from autopkglib import Processor, ProcessorError, URLGetter __all__ = ["GoToMeetingURLProvider"] HOSTNAME = "builds.cdn.getgo.com" if LooseVersion(platform.mac_ver()[0]) < LooseVersion("10...
true
true
f73ea61b70fc6110a4ca101bc31bebcfd315e4e0
1,819
py
Python
MLLib/GeneticAlgorithm/algorithm.py
Tim15/MLib
2222dc67ec0cbaf07942371120be1690359e0ab3
[ "MIT" ]
null
null
null
MLLib/GeneticAlgorithm/algorithm.py
Tim15/MLib
2222dc67ec0cbaf07942371120be1690359e0ab3
[ "MIT" ]
null
null
null
MLLib/GeneticAlgorithm/algorithm.py
Tim15/MLib
2222dc67ec0cbaf07942371120be1690359e0ab3
[ "MIT" ]
null
null
null
class GeneticAlgorithm: def __init__(popSize=10, maxGens=100000, crossoverRate=0.7, mutateRate=0.05): self.pop = [] self.popSize = popSize self.maxGens = maxGens self.crossoverRate = crossoverRate self.mutateRate = mutateRate # Replace funcs def searialize(s...
29.819672
109
0.616273
class GeneticAlgorithm: def __init__(popSize=10, maxGens=100000, crossoverRate=0.7, mutateRate=0.05): self.pop = [] self.popSize = popSize self.maxGens = maxGens self.crossoverRate = crossoverRate self.mutateRate = mutateRate def searialize(self): r...
false
true
f73ea67366e870025b47fe0b105ad3c759233ac0
39,760
py
Python
google_appengine/google/appengine/api/system/system_service_pb.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
26
2015-01-20T08:02:38.000Z
2020-06-10T04:57:41.000Z
google_appengine/google/appengine/api/system/system_service_pb.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
4
2016-02-28T05:53:54.000Z
2017-01-03T07:39:50.000Z
google_appengine/google/appengine/api/system/system_service_pb.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
13
2016-02-28T00:14:23.000Z
2021-05-03T15:47:36.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
32.220421
1,328
0.723164
from google.net.proto import ProtocolBuffer import abc import array import base64 try: from thread import allocate_lock as _Lock except ImportError: from threading import Lock as _Lock try: from google3.net.proto import _net_proto___parse__python except ImportError: _net_proto___parse__python...
true
true
f73ea6b48f02b966ed801c86743b03f96e4e362e
18,171
py
Python
countcps.py
nthall/Twilio-Tools-2
26605c97bd462b5e6a74fa79f3f9ffb0b2217af6
[ "MIT" ]
5
2020-11-03T14:37:19.000Z
2021-02-09T19:45:25.000Z
countcps.py
nthall/Twilio-Tools-2
26605c97bd462b5e6a74fa79f3f9ffb0b2217af6
[ "MIT" ]
1
2021-12-11T04:51:25.000Z
2021-12-11T04:51:25.000Z
countcps.py
nthall/Twilio-Tools-2
26605c97bd462b5e6a74fa79f3f9ffb0b2217af6
[ "MIT" ]
3
2021-10-30T04:08:58.000Z
2022-02-17T01:34:42.000Z
#!/usr/bin/env python """Program that takes a CSV file of CDRs and produces a list of one-second intervals with call counts, again as a CSV file. Optionally, the program will display the spread of CPS values. usage: countcps.py [-h] [-s START] [-e END] [--tz TZ] [-t {auto,header,positional...
40.024229
123
0.614441
import sys import argparse from datetime import datetime, timedelta import csv import logging from decimal import Decimal __version__ = "1.0" DEFAULT_FIELDNAMES = \ ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] DATETIME_FORMATS = { 'Monkey': "%a, %d %b %Y %H:%M:%S %z", ...
true
true
f73ea73828b8a8b0eb57d0c377e6a31b63b3f12b
3,678
py
Python
kivy/input/providers/androidjoystick.py
Zen-CODE/kivy
020cd4ae930f99cab432f6f3746b0566cdc96860
[ "MIT" ]
null
null
null
kivy/input/providers/androidjoystick.py
Zen-CODE/kivy
020cd4ae930f99cab432f6f3746b0566cdc96860
[ "MIT" ]
null
null
null
kivy/input/providers/androidjoystick.py
Zen-CODE/kivy
020cd4ae930f99cab432f6f3746b0566cdc96860
[ "MIT" ]
1
2019-04-16T22:35:58.000Z
2019-04-16T22:35:58.000Z
# pylint: disable=W0611 ''' Android Joystick Input Provider =============================== This module is based on the PyGame JoyStick Input Provider. For more information, please refer to `<http://www.pygame.org/docs/ref/joystick.html>`_ ''' __all__ = ('AndroidMotionEventProvider', ) import os try: import an...
32.839286
79
0.558728
__all__ = ('AndroidMotionEventProvider', ) import os try: import android except ImportError: if 'KIVY_DOC' not in os.environ: raise Exception('android lib not found.') from kivy.logger import Logger from kivy.input.provider import MotionEventProvider from kivy.input.factory import MotionEventFacto...
true
true
f73ea882b3c478b64d849ace9aad77a4fd64c642
504
py
Python
trees.py
dmancevo/trees
a76a8d9c8e11c67042e3d947d58a84fee83ad6b5
[ "Apache-2.0" ]
null
null
null
trees.py
dmancevo/trees
a76a8d9c8e11c67042e3d947d58a84fee83ad6b5
[ "Apache-2.0" ]
null
null
null
trees.py
dmancevo/trees
a76a8d9c8e11c67042e3d947d58a84fee83ad6b5
[ "Apache-2.0" ]
null
null
null
from ctypes import * class Node(Structure): pass Node._fields_ = [ ("leaf", c_int), ("g", c_float), ("min_samples", c_int), ("split_ind", c_int), ("split", c_float), ("left", POINTER(Node)), ("right", POINTER(Node))] trees = CDLL("./trees.so") trees.get_root.argtypes = (c_int, ) trees.get...
21
47
0.621032
from ctypes import * class Node(Structure): pass Node._fields_ = [ ("leaf", c_int), ("g", c_float), ("min_samples", c_int), ("split_ind", c_int), ("split", c_float), ("left", POINTER(Node)), ("right", POINTER(Node))] trees = CDLL("./trees.so") trees.get_root.argtypes = (c_int, ) trees.get...
true
true
f73ea89050f8e5f31753f343554a19afdf4716d5
10,395
py
Python
histomicstk/deeplab/utils/get_dataset_colormap.py
SarderLab/HistomicsTK_PodoSighter
9a75302f645bfb3dfd9688d247388c9948f4eadb
[ "Apache-2.0" ]
null
null
null
histomicstk/deeplab/utils/get_dataset_colormap.py
SarderLab/HistomicsTK_PodoSighter
9a75302f645bfb3dfd9688d247388c9948f4eadb
[ "Apache-2.0" ]
null
null
null
histomicstk/deeplab/utils/get_dataset_colormap.py
SarderLab/HistomicsTK_PodoSighter
9a75302f645bfb3dfd9688d247388c9948f4eadb
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
23.841743
80
0.537085
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import range _ADE20K = 'ade20k' _CITYSCAPES = 'cityscapes' _MAPILLARY_VISTAS = 'mapillary_vistas' _PASCAL = 'pascal' _PC1 = 'PC1' _DATASET_MAX_ENTRIES = { ...
true
true
f73ea8e291e1e1993fa256e8d3edb3b55354375f
879
py
Python
test/sources/test_static.py
ChowNow/blingalytics
a05c866bc0dc7c56b5106c71c12cf10b37c5bae5
[ "MIT" ]
null
null
null
test/sources/test_static.py
ChowNow/blingalytics
a05c866bc0dc7c56b5106c71c12cf10b37c5bae5
[ "MIT" ]
1
2019-08-16T07:15:42.000Z
2019-08-16T15:27:18.000Z
test/sources/test_static.py
ChowNow/blingalytics
a05c866bc0dc7c56b5106c71c12cf10b37c5bae5
[ "MIT" ]
1
2017-06-01T23:32:08.000Z
2017-06-01T23:32:08.000Z
from __future__ import absolute_import import unittest from blingalytics.sources import static from mock import Mock from test import reports class TestStaticSource(unittest.TestCase): def setUp(self): self.report = reports.SuperBasicReport(Mock()) def test_static_source(self): source = sta...
35.16
75
0.678043
from __future__ import absolute_import import unittest from blingalytics.sources import static from mock import Mock from test import reports class TestStaticSource(unittest.TestCase): def setUp(self): self.report = reports.SuperBasicReport(Mock()) def test_static_source(self): source = sta...
true
true
f73eaa0f91a7803cfd80660d9a05e13025b23948
7,041
py
Python
cn/opencv/finger/finger.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/opencv/finger/finger.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/opencv/finger/finger.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
2
2019-06-18T05:53:26.000Z
2019-06-19T03:26:02.000Z
import cv2 as cv import numpy as np import math import time capture = cv.VideoCapture(0) # video = "http://admin:admin@10.242.200.134:8081/" # admin是账号:admin是密码 后面是局域网 # capture = cv.VideoCapture(video) # 获得欧几里距离 def _get_eucledian_distance(vect1, vect2): distant = vect1[0] - vect2[0] dist = np.sqrt(np.su...
40.465517
113
0.564693
import cv2 as cv import numpy as np import math import time capture = cv.VideoCapture(0) stance(vect1, vect2): distant = vect1[0] - vect2[0] dist = np.sqrt(np.sum(np.square(distant))) return dist def gesture_recognition(): while True: ret, frame = capture.read() ...
true
true
f73eaa11e79ce80711a3a3c53d1393426c686df0
10,525
py
Python
tests/components/geo_json_events/test_geo_location.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
4
2020-07-29T17:47:10.000Z
2020-09-16T13:39:13.000Z
tests/components/geo_json_events/test_geo_location.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-11-08T19:40:10.000Z
2022-03-01T11:11:07.000Z
tests/components/geo_json_events/test_geo_location.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""The tests for the geojson platform.""" from homeassistant.components import geo_location from homeassistant.components.geo_json_events.geo_location import ( ATTR_EXTERNAL_ID, SCAN_INTERVAL, ) from homeassistant.components.geo_location import ATTR_SOURCE from homeassistant.const import ( ATTR_FRIENDLY_NAM...
40.953307
87
0.639145
from homeassistant.components import geo_location from homeassistant.components.geo_json_events.geo_location import ( ATTR_EXTERNAL_ID, SCAN_INTERVAL, ) from homeassistant.components.geo_location import ATTR_SOURCE from homeassistant.const import ( ATTR_FRIENDLY_NAME, ATTR_LATITUDE, ATTR_LONGITUDE, ...
true
true
f73eaa3a0a84cb23f0f313df5d2591c453441532
374
py
Python
TelegramSpider/database.py
panchaoxin/telegram-crawler
73d5ad62bf73027a9ca42699a87e865e5db3f589
[ "MIT" ]
9
2019-11-01T01:54:26.000Z
2022-02-22T16:48:15.000Z
TelegramSpider/database.py
zestcode/telegram-crawler
73d5ad62bf73027a9ca42699a87e865e5db3f589
[ "MIT" ]
1
2021-10-16T12:34:00.000Z
2021-10-16T12:34:00.000Z
TelegramSpider/database.py
zestcode/telegram-crawler
73d5ad62bf73027a9ca42699a87e865e5db3f589
[ "MIT" ]
3
2020-07-14T11:31:21.000Z
2021-02-04T12:46:51.000Z
# -*- coding: utf-8 -*- import pymysql MYSQL_HOST = 'localhost' MYSQL_DB = 'telegram' MYSQL_USER = 'root' MYSQL_PASS = '123456' connection = pymysql.connect(host=MYSQL_HOST, user=MYSQL_USER, password=MYSQL_PASS, db=MYSQL_DB, charset='utf8mb4', ...
26.714286
68
0.580214
import pymysql MYSQL_HOST = 'localhost' MYSQL_DB = 'telegram' MYSQL_USER = 'root' MYSQL_PASS = '123456' connection = pymysql.connect(host=MYSQL_HOST, user=MYSQL_USER, password=MYSQL_PASS, db=MYSQL_DB, charset='utf8mb4', cursorcla...
true
true
f73eab6ea9dc15756d5e1e1db1880883de7fd011
18,584
py
Python
back-end/tests/test_api.py
JAYqq/MonGo
e33c9f62c2cf494af2b2d33408853294f3aed168
[ "MIT" ]
1
2019-03-26T04:44:59.000Z
2019-03-26T04:44:59.000Z
back-end/tests/test_api.py
JAYqq/MonGo
e33c9f62c2cf494af2b2d33408853294f3aed168
[ "MIT" ]
5
2020-02-12T13:32:08.000Z
2021-06-02T00:27:16.000Z
back-end/tests/test_api.py
JAYqq/MonGo
e33c9f62c2cf494af2b2d33408853294f3aed168
[ "MIT" ]
null
null
null
from base64 import b64encode from datetime import datetime,timedelta import json import re import unittest from app import create_app,db from app.models import User,Post from tests import TestConfig class APITestCase(unittest.TestCase): '''测试API''' def setUp(self): self.app = create_app(TestConfig) # ...
41.950339
100
0.632426
from base64 import b64encode from datetime import datetime,timedelta import json import re import unittest from app import create_app,db from app.models import User,Post from tests import TestConfig class APITestCase(unittest.TestCase): def setUp(self): self.app = create_app(TestConfig) self.app_...
true
true
f73eabfea7038a598748118e033e9eb6299c0cec
4,963
py
Python
app/utils.py
jkereako/flask-base-app
c83ef1748eaf253ef3da0efb83af0a81181d3d97
[ "MIT" ]
null
null
null
app/utils.py
jkereako/flask-base-app
c83ef1748eaf253ef3da0efb83af0a81181d3d97
[ "MIT" ]
null
null
null
app/utils.py
jkereako/flask-base-app
c83ef1748eaf253ef3da0efb83af0a81181d3d97
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utils ~~~~~ Utility methods. I'm including this file in the skeleton because it contains methods I've found useful. The goal is to keep this file as lean as possible. :author: Jeff Kereakoglow :date: 2014-11-05 :copyright: (c) 201...
24.815
84
0.667137
import re import logging from hashlib import sha224 from datetime import date, datetime from dateutil.parser import parse from unicodedata import normalize from flask import request from app import app, cache try: compat_chr = unichr except NameError: compat_chr = chr _punct_re = re.compile(r'[\t !"#$%&\'(...
true
true
f73eac5bf57fae7ffa78bb1afabfd0f7263f5bca
3,748
py
Python
utils/recalculator.py
Ausakura/gulag
8a81d54a20ead735b234acd4acec550a5ce6f99c
[ "MIT" ]
null
null
null
utils/recalculator.py
Ausakura/gulag
8a81d54a20ead735b234acd4acec550a5ce6f99c
[ "MIT" ]
null
null
null
utils/recalculator.py
Ausakura/gulag
8a81d54a20ead735b234acd4acec550a5ce6f99c
[ "MIT" ]
2
2022-01-19T15:18:33.000Z
2022-03-28T12:02:13.000Z
# -*- coding: utf-8 -*- import asyncio import aiofiles import aiohttp import orjson from pathlib import Path from cmyui import log, Ansi from constants.gamemodes import GameMode from constants.mods import Mods __all__ = 'PPCalculator', BEATMAPS_PATH = Path.cwd() / '.data/osu' class PPCalculator: """Asynchronou...
32.310345
82
0.586446
import asyncio import aiofiles import aiohttp import orjson from pathlib import Path from cmyui import log, Ansi from constants.gamemodes import GameMode from constants.mods import Mods __all__ = 'PPCalculator', BEATMAPS_PATH = Path.cwd() / '.data/osu' class PPCalculator: def __init__(self, map_id: int, **kwa...
true
true
f73eaca3b126b8bc2fc49fbd3b4150fd51b86258
3,315
py
Python
blog/views.py
swapnilkadakia/unicode-website-dev-temp
c7673cde5fdf66e5cad849e51908f86fb9c0544c
[ "MIT" ]
null
null
null
blog/views.py
swapnilkadakia/unicode-website-dev-temp
c7673cde5fdf66e5cad849e51908f86fb9c0544c
[ "MIT" ]
null
null
null
blog/views.py
swapnilkadakia/unicode-website-dev-temp
c7673cde5fdf66e5cad849e51908f86fb9c0544c
[ "MIT" ]
null
null
null
from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth import get_user_model from django.core.paginator import Paginator from django.db.models import Q from django.utils import timezone from .models import Post, Comme...
32.184466
105
0.667873
from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth import get_user_model from django.core.paginator import Paginator from django.db.models import Q from django.utils import timezone from .models import Post, Comme...
true
true
f73eacd68651aa35688f3850987079d8a3b7f40f
150
py
Python
exercises/darts/darts.py
southpush/python
048191583ed2cf668c6180d851d100f277a74101
[ "MIT" ]
null
null
null
exercises/darts/darts.py
southpush/python
048191583ed2cf668c6180d851d100f277a74101
[ "MIT" ]
null
null
null
exercises/darts/darts.py
southpush/python
048191583ed2cf668c6180d851d100f277a74101
[ "MIT" ]
null
null
null
def score(x, y): distance = x ** 2 + y ** 2 return 10 if distance <= 1 ** 2 else 5 if distance <= 5 ** 2 else 1 if distance <= 10 ** 2 else 0
37.5
101
0.546667
def score(x, y): distance = x ** 2 + y ** 2 return 10 if distance <= 1 ** 2 else 5 if distance <= 5 ** 2 else 1 if distance <= 10 ** 2 else 0
true
true
f73eadae4fdc856f5258f55231ef39bc6666f5e3
2,657
py
Python
qf_lib/backtesting/order/order.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
198
2019-08-16T15:09:23.000Z
2022-03-30T12:44:00.000Z
qf_lib/backtesting/order/order.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
13
2021-01-07T10:15:19.000Z
2022-03-29T13:01:47.000Z
qf_lib/backtesting/order/order.py
webclinic017/qf-lib
96463876719bba8a76c8269cef76addf3a2d836d
[ "Apache-2.0" ]
29
2019-08-16T15:21:28.000Z
2022-02-23T09:53:49.000Z
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
39.073529
113
0.640572
from qf_lib.backtesting.contract.contract import Contract from qf_lib.backtesting.order.execution_style import ExecutionStyle from qf_lib.backtesting.order.time_in_force import TimeInForce class Order(object): def __init__(self, contract: Contract, quantity: int, execution_style: ExecutionStyle, ...
true
true
f73eade7e277391770915d76474b462d5d695936
2,038
py
Python
configs/textrecog/abinet/abinet_vision_only_academic.py
hongxuenong/mmocr
e8e3a059f8f2e4fca96af37751c33563fc48e2ba
[ "Apache-2.0" ]
2,261
2021-04-08T03:45:41.000Z
2022-03-31T23:37:46.000Z
configs/textrecog/abinet/abinet_vision_only_academic.py
hongxuenong/mmocr
e8e3a059f8f2e4fca96af37751c33563fc48e2ba
[ "Apache-2.0" ]
789
2021-04-08T05:40:13.000Z
2022-03-31T09:42:39.000Z
configs/textrecog/abinet/abinet_vision_only_academic.py
hongxuenong/mmocr
e8e3a059f8f2e4fca96af37751c33563fc48e2ba
[ "Apache-2.0" ]
432
2021-04-08T03:56:16.000Z
2022-03-30T18:44:43.000Z
_base_ = [ '../../_base_/default_runtime.py', '../../_base_/schedules/schedule_adam_step_20e.py', '../../_base_/recog_pipelines/abinet_pipeline.py', '../../_base_/recog_datasets/ST_MJ_alphanumeric_train.py', '../../_base_/recog_datasets/academic_test.py' ] train_list = {{_base_.train_list}} test_li...
26.467532
75
0.613837
_base_ = [ '../../_base_/default_runtime.py', '../../_base_/schedules/schedule_adam_step_20e.py', '../../_base_/recog_pipelines/abinet_pipeline.py', '../../_base_/recog_datasets/ST_MJ_alphanumeric_train.py', '../../_base_/recog_datasets/academic_test.py' ] train_list = {{_base_.train_list}} test_li...
true
true
f73eae5181fdd60b3bb9fbc533decbc6808fbc1f
1,141
py
Python
Chapter02/quadratic_uni.py
svenpanne/ProgInPy3
93f642d44e27ccb4d2601eae4a960acd8c9f11f8
[ "BSD-3-Clause" ]
null
null
null
Chapter02/quadratic_uni.py
svenpanne/ProgInPy3
93f642d44e27ccb4d2601eae4a960acd8c9f11f8
[ "BSD-3-Clause" ]
null
null
null
Chapter02/quadratic_uni.py
svenpanne/ProgInPy3
93f642d44e27ccb4d2601eae4a960acd8c9f11f8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import cmath import math import sys SQUARED = "\N{SUPERSCRIPT TWO}" ARROW = "\N{RIGHTWARDS ARROW}" if not sys.platform.startswith("linux"): SQUARED = "^2" ARROW = "->" def get_float(msg, allow_zero): x = None while x is None: try: x = float(input(msg)) ...
23.770833
66
0.538124
import cmath import math import sys SQUARED = "\N{SUPERSCRIPT TWO}" ARROW = "\N{RIGHTWARDS ARROW}" if not sys.platform.startswith("linux"): SQUARED = "^2" ARROW = "->" def get_float(msg, allow_zero): x = None while x is None: try: x = float(input(msg)) if not allow_ze...
true
true
f73eaedf47ff3acdcac8b8413faa3dd0f0a60aad
2,493
py
Python
auto_sort/asort.py
SONJAYA80026/Awesome-Linux-Software
4e8344a0a9dfd3e7f14794e732e63e69a1858a64
[ "MIT" ]
null
null
null
auto_sort/asort.py
SONJAYA80026/Awesome-Linux-Software
4e8344a0a9dfd3e7f14794e732e63e69a1858a64
[ "MIT" ]
null
null
null
auto_sort/asort.py
SONJAYA80026/Awesome-Linux-Software
4e8344a0a9dfd3e7f14794e732e63e69a1858a64
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*-coding: utf-8-*- # Author : Christopher L # Blog : http://blog.chriscabin.com # GitHub : https://www.github.com/chrisleegit # File : asort.py # Date : 2016/08/22 11:12 # Version: 0.1 # Description: A very simple python script that can sort items alphabetically. from __future__ import ...
30.777778
119
0.562375
from __future__ import print_function import os import shutil import re README_FILE = '../README.md' TEMP_FILE = 'temp.md' BEGIN = '## Applications' END = '## Setup' regex = re.compile(r"[^[]*\[([^]]*)\]") def main(): global README_FILE README_FILE = os.path.abspath(README_FILE) if no...
true
true
f73eaee079ad1abaad5c5ed2671e8658dbb6bf36
1,808
py
Python
spec_cleaner/rpmcheck.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
spec_cleaner/rpmcheck.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
spec_cleaner/rpmcheck.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
# vim: set ts=4 sw=4 et: coding=UTF-8 from .rpmsection import Section class RpmCheck(Section): """ A class providing methods for %check section cleaning. Replace various troublemakers in check phase. """ def add(self, line: str) -> None: line = self._complete_cleanup(line) # s...
30.133333
82
0.573009
from .rpmsection import Section class RpmCheck(Section): def add(self, line: str) -> None: line = self._complete_cleanup(line) line = self.reg.re_jobs.sub('%{?_smp_mflags}', line) if not self.minimal: line = self._add_jobs(line) line = self._replace_p...
true
true
f73eb0ecd6e9a7b395ba5e76bedcde1ea35053c6
831
py
Python
src/drf_app/urls.py
inabhi9/drf-cloudstorage
7f5e1b1e721208c5682f1f1e443a13af73d039bc
[ "MIT" ]
null
null
null
src/drf_app/urls.py
inabhi9/drf-cloudstorage
7f5e1b1e721208c5682f1f1e443a13af73d039bc
[ "MIT" ]
null
null
null
src/drf_app/urls.py
inabhi9/drf-cloudstorage
7f5e1b1e721208c5682f1f1e443a13af73d039bc
[ "MIT" ]
null
null
null
"""drf_cloudstorage URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Cl...
36.130435
77
0.711191
from django.conf.urls import url from django.urls import include urlpatterns = [ url(r'^cloudfiles', include('drf_cloudstorage.urls')), url(r'^examples', include('example.urls')), ]
true
true
f73eb1084de2482fb9f79a252556c45f0246ecaf
31,870
py
Python
Lib/test/test_yield_from.py
Krrishdhaneja/cpython
9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578
[ "0BSD" ]
1
2020-10-25T16:33:22.000Z
2020-10-25T16:33:22.000Z
Lib/test/test_yield_from.py
Krrishdhaneja/cpython
9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578
[ "0BSD" ]
null
null
null
Lib/test/test_yield_from.py
Krrishdhaneja/cpython
9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- """ Test suite for PEP 380 implementation adapted from original tests written by Greg Ewing see <http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Python3.1.2-rev5.zip> """ import unittest import inspect from test.support import captured_stderr, disable_gc, ...
30.208531
99
0.448321
import unittest import inspect from test.support import captured_stderr, disable_gc, gc_collect from test import support class TestPEP380Operation(unittest.TestCase): def test_delegation_of_initial_next_to_subgenerator(self): trace = [] def g1(): trace.append("Starting...
true
true
f73eb22187c5538329154142b0de18d663b8e20d
2,766
py
Python
e3a.py
advaithca/CG_LAB
07c4424be2f37d21ed7af804361f0a992a8124ac
[ "MIT" ]
null
null
null
e3a.py
advaithca/CG_LAB
07c4424be2f37d21ed7af804361f0a992a8124ac
[ "MIT" ]
null
null
null
e3a.py
advaithca/CG_LAB
07c4424be2f37d21ed7af804361f0a992a8124ac
[ "MIT" ]
null
null
null
# menu driven program to draw a circle using # A) Mid point circle drawing algorithm # B) Polar circle generation algorithm # C) Non-Polar circle generation algorithm from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import sys from math import pi, sin, cos, sqrt xc = 0 yc = 0 ...
24.263158
66
0.519523
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import sys from math import pi, sin, cos, sqrt xc = 0 yc = 0 r = 0 def init(): glClearColor(1.0,2.0,1.0,1.0) gluOrtho2D(-100.0,100.0,-100.0,100.0) def midpoint(): glClear(GL_COLOR_BUFFER_BIT) glColor3f(1....
true
true
f73eb24dc43f550434f4ca9f74dd5e0ac82c4443
9,859
py
Python
packages/core/minos-microservice-common/tests/test_common/test_config/test_v1/test_base.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
null
null
null
packages/core/minos-microservice-common/tests/test_common/test_config/test_v1/test_base.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
null
null
null
packages/core/minos-microservice-common/tests/test_common/test_config/test_v1/test_base.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
null
null
null
import unittest from unittest.mock import ( patch, ) from minos.common import ( Config, ConfigV1, MinosConfigException, ) from tests.utils import ( BASE_PATH, FakeBrokerClientPool, FakeBrokerPort, FakeBrokerPublisher, FakeBrokerSubscriberBuilder, FakeCustomInjection, FakeDat...
34.351916
88
0.632823
import unittest from unittest.mock import ( patch, ) from minos.common import ( Config, ConfigV1, MinosConfigException, ) from tests.utils import ( BASE_PATH, FakeBrokerClientPool, FakeBrokerPort, FakeBrokerPublisher, FakeBrokerSubscriberBuilder, FakeCustomInjection, FakeDat...
true
true
f73eb2876443a53efac68a5e544fb7980b20321f
493
py
Python
plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='templateitemname', parent_name='layout.polar.radialaxis.tickformatstop', **kwargs ): super(TemplateitemnameValidator, sel...
25.947368
78
0.63286
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='templateitemname', parent_name='layout.polar.radialaxis.tickformatstop', **kwargs ): super(TemplateitemnameValidator, sel...
true
true
f73eb300672f802f2ebd72871418ec63ada26f73
1,371
py
Python
construct/tests/test_actionparams.py
construct-org/construct
ac1211e6dedbf87be2fa42e3eb197c2acea6de68
[ "MIT" ]
8
2018-04-04T18:25:18.000Z
2020-01-16T16:45:16.000Z
construct/tests/test_actionparams.py
construct-org/construct
ac1211e6dedbf87be2fa42e3eb197c2acea6de68
[ "MIT" ]
36
2018-02-23T23:53:39.000Z
2020-01-15T19:38:57.000Z
construct/tests/test_actionparams.py
construct-org/construct
ac1211e6dedbf87be2fa42e3eb197c2acea6de68
[ "MIT" ]
1
2019-03-05T20:19:19.000Z
2019-03-05T20:19:19.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from nose.tools import raises from construct import actionparams from construct.errors import ArgumentError params_0 = dict() params_1 = dict( str_arg={ 'label': 'String Argument', 'help': 'A String Argument',...
23.637931
65
0.606856
from __future__ import absolute_import, division, print_function from nose.tools import raises from construct import actionparams from construct.errors import ArgumentError params_0 = dict() params_1 = dict( str_arg={ 'label': 'String Argument', 'help': 'A String Argument', 'required': Tr...
true
true
f73eb32cf11821a8db22abbfaf4672fb58c3ceac
29,274
py
Python
bananas/testing/learners.py
owahltinez/bananas
4d37af1713b7f166ead3459a7004748f954d336e
[ "MIT" ]
null
null
null
bananas/testing/learners.py
owahltinez/bananas
4d37af1713b7f166ead3459a7004748f954d336e
[ "MIT" ]
null
null
null
bananas/testing/learners.py
owahltinez/bananas
4d37af1713b7f166ead3459a7004748f954d336e
[ "MIT" ]
null
null
null
""" This library comes with a comprehensive testing suite that checks for API compliance, input type handling, change map handling, and more. Not all tests are run for every learner; tests specific to certain estimators like [supervised learners](../core/index.md#supervised) or [transformers]( ../transformers/index.md)...
41.82
99
0.640944
import warnings from inspect import signature, Parameter from typing import Union from unittest import TestCase, TestResult from ..changemap.changemap import ChangeMap from ..core.learner import Learner, SupervisedLearner, UnsupervisedLearner from ..core.mixins import BaseClassifier, BaseRegressor from ..dataset.datas...
true
true
f73eb47f9800e745fbf266923083ac6ed6610b41
11,063
py
Python
libtbx/citations.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
libtbx/citations.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
libtbx/citations.py
jbeilstenedmands/cctbx_project
c228fb15ab10377f664c39553d866281358195aa
[ "BSD-3-Clause-LBNL" ]
null
null
null
''' Functionality for handling citations ''' from __future__ import absolute_import, division, print_function import importlib import os import string from operator import attrgetter import libtbx.load_env import libtbx.phil from libtbx import str_utils from libtbx.utils import to_unicode # ========================...
35.120635
81
0.580313
from __future__ import absolute_import, division, print_function import importlib import os import string from operator import attrgetter import libtbx.load_env import libtbx.phil from libtbx import str_utils from libtbx.utils import to_unicode master_citation_phil_str = ''' citation .multiple = True { articl...
true
true
f73eb4fbf5785b8c8fcb4df51a58337a3c02c35d
5,877
py
Python
pythia/utils/general.py
winnerineast/pythia
b6fe288405490f6e02a3e59dbf32a181aee35645
[ "BSD-3-Clause" ]
null
null
null
pythia/utils/general.py
winnerineast/pythia
b6fe288405490f6e02a3e59dbf32a181aee35645
[ "BSD-3-Clause" ]
null
null
null
pythia/utils/general.py
winnerineast/pythia
b6fe288405490f6e02a3e59dbf32a181aee35645
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import collections import gc import os from bisect import bisect import requests import torch import tqdm import yaml from torch import nn def lr_lambda_update(i_iter, cfg): if ( cfg["training_parameters"]["use_warmup"] is True and i_iter <= cfg[...
29.984694
86
0.627361
import collections import gc import os from bisect import bisect import requests import torch import tqdm import yaml from torch import nn def lr_lambda_update(i_iter, cfg): if ( cfg["training_parameters"]["use_warmup"] is True and i_iter <= cfg["training_parameters"]["warmup_iterations"] ):...
true
true
f73eb5b6fefe38addcf70235bf748054ab734316
235
py
Python
python-100-examples/test65.py
zengxianbin/Practice
d0ca7fe8c52f3c0b10fd44f9a52914d5359821fa
[ "MIT" ]
2
2020-04-16T15:33:06.000Z
2020-04-16T15:33:15.000Z
python-100-examples/test65.py
zengxianbin/Practice
d0ca7fe8c52f3c0b10fd44f9a52914d5359821fa
[ "MIT" ]
null
null
null
python-100-examples/test65.py
zengxianbin/Practice
d0ca7fe8c52f3c0b10fd44f9a52914d5359821fa
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 # -*- coding: UTF-8 -*- class Solution(object): def test65(self): ''' 题目:一个最优美的图案。   ''' return "" if __name__ == "__main__": solution = Solution() solution.test65()
19.583333
26
0.52766
class Solution(object): def test65(self): return "" if __name__ == "__main__": solution = Solution() solution.test65()
true
true
f73eb7ef400a4a4bfb9b313a941d4c94b35f9a93
13,163
py
Python
mmdet/models/detectors/two_stage_with_MetaEmbedding.py
Qianna00/mmdetection
31e7dff4c61000002d27117543b85e68d2619b4c
[ "Apache-2.0" ]
1
2021-08-01T08:44:35.000Z
2021-08-01T08:44:35.000Z
mmdet/models/detectors/two_stage_with_MetaEmbedding.py
Qianna00/mmdetection
31e7dff4c61000002d27117543b85e68d2619b4c
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/two_stage_with_MetaEmbedding.py
Qianna00/mmdetection
31e7dff4c61000002d27117543b85e68d2619b4c
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import numpy as np # from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler from ..builder import DETECTORS, build_backbone, build_head, build_neck from .base import BaseDetector from tqdm import tqdm from mmdet.datasets import build_dataloader, build_dataset fro...
40.253823
119
0.542278
import torch import torch.nn as nn import numpy as np from ..builder import DETECTORS, build_backbone, build_head, build_neck from .base import BaseDetector from tqdm import tqdm from mmdet.datasets import build_dataloader, build_dataset from mmcv import Config from mmdet.core import bbox2roi from functools import pa...
true
true
f73eb7f19db30babb245f80d3076eac60dbc1cc6
4,343
py
Python
tests/responses/test_fileresponse.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/responses/test_fileresponse.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/responses/test_fileresponse.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
import io import os import sys import tempfile from unittest import skipIf from django.core.files.base import ContentFile from django.http import FileResponse from django.test import SimpleTestCase class FileResponseTests(SimpleTestCase): def test_file_from_disk_response(self): response = FileResponse(op...
41.759615
88
0.643564
import io import os import sys import tempfile from unittest import skipIf from django.core.files.base import ContentFile from django.http import FileResponse from django.test import SimpleTestCase class FileResponseTests(SimpleTestCase): def test_file_from_disk_response(self): response = FileResponse(op...
true
true
f73eb96c048c0b4013cc5763dce4816837a36598
47,661
py
Python
test/dialect/oracle/test_compiler.py
aadel/sqlalchemy
380f4389922004589bfa7cb4f9b8c8208aa68659
[ "MIT" ]
6
2019-02-18T12:42:44.000Z
2020-11-11T23:10:17.000Z
test/dialect/oracle/test_compiler.py
oladimejiala/sqlalchemy
cbfa1363d7201848a56e7209146e81b9c51aa8af
[ "MIT" ]
null
null
null
test/dialect/oracle/test_compiler.py
oladimejiala/sqlalchemy
cbfa1363d7201848a56e7209146e81b9c51aa8af
[ "MIT" ]
2
2016-11-02T04:59:02.000Z
2019-05-11T06:01:30.000Z
# coding: utf-8 from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import Computed from sqlalchemy import exc from sqlalchemy import except_ from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Index from sqlalchemy import Integer from sqlalchemy import literal ...
37.206089
79
0.560081
from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import Computed from sqlalchemy import exc from sqlalchemy import except_ from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Index from sqlalchemy import Integer from sqlalchemy import literal from sqlalchemy...
true
true
f73eb9d2dfcbcffa1873b6cfe413627568d3ab49
127
py
Python
test/solution_tests/SUM/test_sum.py
DPNT-Sourcecode/CHK-ncqk01
d18125ea324e31b818dbca7618bcb27bbd012a1e
[ "Apache-2.0" ]
null
null
null
test/solution_tests/SUM/test_sum.py
DPNT-Sourcecode/CHK-ncqk01
d18125ea324e31b818dbca7618bcb27bbd012a1e
[ "Apache-2.0" ]
null
null
null
test/solution_tests/SUM/test_sum.py
DPNT-Sourcecode/CHK-ncqk01
d18125ea324e31b818dbca7618bcb27bbd012a1e
[ "Apache-2.0" ]
null
null
null
from solutions.SUM import sum_solution class TestSum: def test_sum(self): assert sum_solution.compute(1, 2) == 3
18.142857
46
0.700787
from solutions.SUM import sum_solution class TestSum: def test_sum(self): assert sum_solution.compute(1, 2) == 3
true
true
f73eba392c5c28d7e301a181792a51fd07e32cf2
2,349
py
Python
notifico/models/channel.py
Pix1234/notifico
144b8f1584d271100249f6cd05db217ca3b22e17
[ "MIT" ]
null
null
null
notifico/models/channel.py
Pix1234/notifico
144b8f1584d271100249f6cd05db217ca3b22e17
[ "MIT" ]
null
null
null
notifico/models/channel.py
Pix1234/notifico
144b8f1584d271100249f6cd05db217ca3b22e17
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- __all__ = ('Channel',) import datetime from sqlalchemy import func from notifico import db from notifico.models.bot import BotEvent class Channel(db.Model): id = db.Column(db.Integer, primary_key=True) created = db.Column(db.TIMESTAMP(), default=datetime.datetime.utcnow) channel ...
29.3625
77
0.584078
__all__ = ('Channel',) import datetime from sqlalchemy import func from notifico import db from notifico.models.bot import BotEvent class Channel(db.Model): id = db.Column(db.Integer, primary_key=True) created = db.Column(db.TIMESTAMP(), default=datetime.datetime.utcnow) channel = db.Column(db.String(...
true
true
f73ebad78fbe9fd650b35e3ecb718a0939131729
302
py
Python
docs/conf.py
rahulunair/haxo
6a4d333ecfa8a347d6a2db63a833c2bfab1278c8
[ "Unlicense" ]
1
2021-07-06T16:26:34.000Z
2021-07-06T16:26:34.000Z
docs/conf.py
Meadosc/haxo
7a9b6ce20861ad342865b496d1c2ba75970d4093
[ "Unlicense" ]
7
2020-06-15T18:57:20.000Z
2020-06-23T22:32:06.000Z
docs/conf.py
Meadosc/haxo
7a9b6ce20861ad342865b496d1c2ba75970d4093
[ "Unlicense" ]
2
2020-06-15T20:58:06.000Z
2020-06-18T04:23:34.000Z
"""sphinx config.""" from datetime import datetime project = "haxo" author = "rahul" master_doc = 'index' copyright = f"2020, {author}" copyright = f"{datetime.now().year}, {author}" extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints"] html_static_path = ["_static"]
27.454545
86
0.715232
from datetime import datetime project = "haxo" author = "rahul" master_doc = 'index' copyright = f"2020, {author}" copyright = f"{datetime.now().year}, {author}" extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints"] html_static_path = ["_static"]
true
true
f73ebb50b84874c31308aadefde84f08553481f4
1,632
py
Python
src/colour_displayer.py
Artemis21/image-analysis
92d8edc627817bae6df2656f0f2baa4f2388a195
[ "MIT" ]
null
null
null
src/colour_displayer.py
Artemis21/image-analysis
92d8edc627817bae6df2656f0f2baa4f2388a195
[ "MIT" ]
null
null
null
src/colour_displayer.py
Artemis21/image-analysis
92d8edc627817bae6df2656f0f2baa4f2388a195
[ "MIT" ]
null
null
null
"""Tool for displaying a selection of colours.""" import math import pathlib from PIL import Image, ImageDraw, ImageFont _font_path = str(pathlib.Path(__file__).parent.absolute() / 'res' / 'font.ttf') FONT = ImageFont.truetype(_font_path, size=20) class ColourDisplayer: """Tool for displaying a selection of co...
32
79
0.557598
import math import pathlib from PIL import Image, ImageDraw, ImageFont _font_path = str(pathlib.Path(__file__).parent.absolute() / 'res' / 'font.ttf') FONT = ImageFont.truetype(_font_path, size=20) class ColourDisplayer: def __init__(self, colours: list[tuple[int, int, int]]): self.colours = colours ...
true
true
f73ebd450de99712371c00863a5bab907e0638f9
1,451
py
Python
profiler/mpops/ms_gpu.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
profiler/mpops/ms_gpu.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
profiler/mpops/ms_gpu.py
BUPT-GAMMA/GammaGL
2b9f32e1ac3533cb75a063243e8a2fa654466d18
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/env python3 # -*- coding:utf-8 -*- # @Time : 2022/04/14 08:36 # @Author : clear # @FileName: ms_gpu.py import os os.environ['TL_BACKEND'] = 'mindspore' os.environ["CUDA_VISIBLE_DEVICES"] = "1" import sys sys.path.insert(0, os.path.abspath('../../')) import time import numpy as np import tensorlayerx ...
27.903846
105
0.698828
import os os.environ['TL_BACKEND'] = 'mindspore' os.environ["CUDA_VISIBLE_DEVICES"] = "1" import sys sys.path.insert(0, os.path.abspath('../../')) import time import numpy as np import tensorlayerx as tlx from gammagl.mpops import * edge_index = np.load('edge_index.npy') num_nodes = int(np.max(edge_index))+1 s...
true
true
f73ebd7a90e6737bcdd743d1e7b0b75e660f5890
2,772
py
Python
docs/conf.py
Miksus/red-base
4c272e8cb2325b51f6293f608a773e011b1d05da
[ "MIT" ]
null
null
null
docs/conf.py
Miksus/red-base
4c272e8cb2325b51f6293f608a773e011b1d05da
[ "MIT" ]
null
null
null
docs/conf.py
Miksus/red-base
4c272e8cb2325b51f6293f608a773e011b1d05da
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
29.489362
79
0.674242
import sphinx_book_theme import os import sys sys.path.insert(0, os.path.abspath('..')) print(f"Root dir: {sys.path[0]}") project = 'redbird' copyright = '2022, Mikael Koli' author = 'Mikael Koli' extensions = [ 'sphinx.ext.doctest', 'sphinx.ext.autodoc', 'sphinx.ext.coverage', ...
true
true
f73ebef40d6836b43a2d977f82de4f291d8af889
3,318
py
Python
emeraldbgc/download_data.py
Finn-Lab/emeraldBGC
8cd625d5d293725a7cb666c0fa733591534aab08
[ "Apache-2.0" ]
null
null
null
emeraldbgc/download_data.py
Finn-Lab/emeraldBGC
8cd625d5d293725a7cb666c0fa733591534aab08
[ "Apache-2.0" ]
null
null
null
emeraldbgc/download_data.py
Finn-Lab/emeraldBGC
8cd625d5d293725a7cb666c0fa733591534aab08
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2021 EMBL - European Bioinformatics Institute # # 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 requi...
31.301887
124
0.676914
import glob import hashlib import os import sys import tarfile import requests PKG_DIRECTORY = os.path.abspath( os.path.dirname(__file__) ) BIN_DIRECTORY = os.path.abspath( os.path.dirname(sys.argv[0]) ) INTERPROSCAN_URL = "http://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.52-86.0/interproscan-5.52-86...
true
true
f73ebf3b488d1a77666e6d9a141e2593cff335fe
754
py
Python
queue/crud.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
queue/crud.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
queue/crud.py
maransowthri/data-structures-algorithms
7558d85573df7f5eeea2b4fd8d6570eada539cdf
[ "Apache-2.0" ]
null
null
null
class Queue: def __init__(self): self.data = [] def __str__(self): values = map(str, self.data) return ' <- '.join(values) def enque(self, val): self.data.append(val) def deque(self): return self.data.pop(0) def peek(self): return s...
19.842105
69
0.586207
class Queue: def __init__(self): self.data = [] def __str__(self): values = map(str, self.data) return ' <- '.join(values) def enque(self, val): self.data.append(val) def deque(self): return self.data.pop(0) def peek(self): return s...
true
true
f73ebf7f3af9a9e38c42247c25c19c6954997d26
3,377
py
Python
sampling/resgld.py
karimul/ebm-sampling
c8c8565a21fde52ac71598f20625857c4ccb8b67
[ "MIT" ]
null
null
null
sampling/resgld.py
karimul/ebm-sampling
c8c8565a21fde52ac71598f20625857c4ccb8b67
[ "MIT" ]
null
null
null
sampling/resgld.py
karimul/ebm-sampling
c8c8565a21fde52ac71598f20625857c4ccb8b67
[ "MIT" ]
null
null
null
import torch import numpy as np from autograd.numpy import sqrt def gen_image_resgld(label, FLAGS, model, im_neg, num_steps, sample=False): im_noise = torch.randn_like(im_neg).detach() T_multiply=0.9 T = 0.9 var=0.1 resgld_beta_high = im_neg resgld_beta_low = im_neg swaps = 0 noise_s...
34.814433
100
0.586023
import torch import numpy as np from autograd.numpy import sqrt def gen_image_resgld(label, FLAGS, model, im_neg, num_steps, sample=False): im_noise = torch.randn_like(im_neg).detach() T_multiply=0.9 T = 0.9 var=0.1 resgld_beta_high = im_neg resgld_beta_low = im_neg swaps = 0 noise_s...
true
true
f73ec07ec988999962c11354160dfde04715d682
547
py
Python
tools/parsebuildpack.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
tools/parsebuildpack.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
tools/parsebuildpack.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
from app import userfiles as user_files import workers.dockerfilebuild import requests w = workers.dockerfilebuild.DockerfileBuildWorker(100, None) resource_key = "5c0a985c-405d-4161-b0ac-603c3757b5f9" resource_url = user_files.get_file_url(resource_key, "127.0.0.1", requires_cors=False) print(resource_url) docker_...
27.35
86
0.793419
from app import userfiles as user_files import workers.dockerfilebuild import requests w = workers.dockerfilebuild.DockerfileBuildWorker(100, None) resource_key = "5c0a985c-405d-4161-b0ac-603c3757b5f9" resource_url = user_files.get_file_url(resource_key, "127.0.0.1", requires_cors=False) print(resource_url) docker_...
true
true
f73ec20f0e50d8a12eb1b8ea024256716d1e90e5
775
py
Python
demo.py
MrLiPP6274/mitmproxy-interface
ea9db2ae06d5860196cee17e80903ea454de7ac2
[ "MIT" ]
null
null
null
demo.py
MrLiPP6274/mitmproxy-interface
ea9db2ae06d5860196cee17e80903ea454de7ac2
[ "MIT" ]
null
null
null
demo.py
MrLiPP6274/mitmproxy-interface
ea9db2ae06d5860196cee17e80903ea454de7ac2
[ "MIT" ]
null
null
null
""" @Time :1:08 下午 @Author :li @decs :demo """ import time import interface from interface.interface_enum import InterfacePath # 1.清除本地缓存 interface.clean_local() # 2.运行mitmproxy:默认运行InterfaceMonitor类,默认端口为8080,也可以自己设定 interface.run() # interface.run(scipt='ResponseMock, InterfaceMonitor', port='8888') # 3.调用接口,...
20.945946
68
0.792258
import time import interface from interface.interface_enum import InterfacePath interface.clean_local() interface.run() time.sleep(20) interface.stop() requestdata = interface.get(InterfacePath.TEST1).request print(requestdata.url) print(requestdata.query) print(requestdata.json()) print(requestdata.header...
true
true
f73ec3ddcf5e97c9e0ee65f1565be31492abcd2d
3,084
py
Python
worden/src/app.py
jvlsg/Worden
383a8549b09f82e2516887bd621829047ecffbec
[ "MIT" ]
4
2020-07-19T06:38:53.000Z
2021-07-30T21:36:37.000Z
worden/src/app.py
jvlsg/Huston
383a8549b09f82e2516887bd621829047ecffbec
[ "MIT" ]
2
2021-02-26T19:43:16.000Z
2021-02-26T19:43:39.000Z
worden/src/app.py
jvlsg/Huston
383a8549b09f82e2516887bd621829047ecffbec
[ "MIT" ]
null
null
null
#!/usr/bin/env python import curses import logging import npyscreen from worden.src.api import api_man from worden.src.api.trackable_object import TrackableObject from worden.src.ui.list_and_details_form import ListAndDetailsForm from worden.src.ui.map_form import MapForm import worden.const as const class WordenApp...
38.55
131
0.703307
import curses import logging import npyscreen from worden.src.api import api_man from worden.src.api.trackable_object import TrackableObject from worden.src.ui.list_and_details_form import ListAndDetailsForm from worden.src.ui.map_form import MapForm import worden.const as const class WordenApp(npyscreen.NPSAppMana...
true
true
f73ec5dad3cb94a49d724ad483fcd5ed5714f395
5,483
py
Python
MICRO_CPU_profiling/experiment_2_algorithm_settings.py
WenqiJiang/faiss-cpu-profiling
f2c7b3051f8860e8918c713ef4baddd563cc515c
[ "MIT" ]
null
null
null
MICRO_CPU_profiling/experiment_2_algorithm_settings.py
WenqiJiang/faiss-cpu-profiling
f2c7b3051f8860e8918c713ef4baddd563cc515c
[ "MIT" ]
null
null
null
MICRO_CPU_profiling/experiment_2_algorithm_settings.py
WenqiJiang/faiss-cpu-profiling
f2c7b3051f8860e8918c713ef4baddd563cc515c
[ "MIT" ]
null
null
null
""" Evaluating index's fluence on performance to achieve certain recall. Note: if using perf to profile the program, use sudo to run the commands (already hardcoded in this script), make sure the user have sudo access Example Usage: python experiment_2_algorithm_settings.py --dbname SIFT1000M --topK 100 --rec...
47.267241
209
0.732628
from __future__ import print_function import os import sys import time import re import pickle import getpass import argparse parser = argparse.ArgumentParser() parser.add_argument('--dbname', type=str, default='SIFT1000M', help="dataset name, e.g., SIFT100M") parser.add_argument('--topK', type=int, default=10, help=...
true
true
f73ec6362b361afc3a9d2421f74a8cf5c39b38fe
10,130
py
Python
shadowlands/credstick/trezor_ethdriver.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
shadowlands/credstick/trezor_ethdriver.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
shadowlands/credstick/trezor_ethdriver.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
import sys from time import sleep import getpass from trezorlib.client import ProtocolMixin, BaseClient from trezorlib.transport import enumerate_devices, get_transport, TransportException from trezorlib import tools from trezorlib import messages as proto import binascii from shadowlands.credstick import Credsti...
32.783172
141
0.601382
import sys from time import sleep import getpass from trezorlib.client import ProtocolMixin, BaseClient from trezorlib.transport import enumerate_devices, get_transport, TransportException from trezorlib import tools from trezorlib import messages as proto import binascii from shadowlands.credstick import Credsti...
true
true
f73ec7a3002233b93515285fcd63ee1574fcded3
3,213
py
Python
palsbet/models.py
denis254/xpredict
a8df45803889c03695ee1a6652baa5cca7aa0c60
[ "BSD-3-Clause" ]
null
null
null
palsbet/models.py
denis254/xpredict
a8df45803889c03695ee1a6652baa5cca7aa0c60
[ "BSD-3-Clause" ]
10
2020-03-24T16:21:33.000Z
2021-09-08T00:35:51.000Z
palsbet/models.py
denis254/xpredict
a8df45803889c03695ee1a6652baa5cca7aa0c60
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.utils import timezone import datetime from django.conf import settings from django.contrib.auth.models import User from django.conf import settings from django.contrib.auth.models import User AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', User) class Visitor(mode...
28.184211
111
0.715219
from django.db import models from django.utils import timezone import datetime from django.conf import settings from django.contrib.auth.models import User from django.conf import settings from django.contrib.auth.models import User AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', User) class Visitor(mode...
true
true
f73ec8a3d647d6148fda25e3c11b5c3edea0ccce
3,464
py
Python
python/GafferUI/PathParameterValueWidget.py
dboogert/gaffer
d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/PathParameterValueWidget.py
dboogert/gaffer
d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/PathParameterValueWidget.py
dboogert/gaffer
d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
37.247312
92
0.706409
true
true