hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
793ffb0ad8f004bda92665ad58c3b30880a75953 | 183 | py | Python | src/front/urls.py | python-krasnodar/clinic-crm | 1d7b84fbf4f1e1510db303df956fa19db8c01b2b | [
"BSD-2-Clause"
] | 3 | 2018-09-14T16:50:49.000Z | 2019-05-13T23:37:33.000Z | src/front/urls.py | sweetlearn/clinic-crm | 1d7b84fbf4f1e1510db303df956fa19db8c01b2b | [
"BSD-2-Clause"
] | null | null | null | src/front/urls.py | sweetlearn/clinic-crm | 1d7b84fbf4f1e1510db303df956fa19db8c01b2b | [
"BSD-2-Clause"
] | 6 | 2018-04-02T04:39:00.000Z | 2021-03-14T11:42:44.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^details/(?P<pk>\d+)/$', views.details, name='details'),
]
| 20.333333 | 66 | 0.622951 |
793ffb40079ee93413042a72829f55058adfcdf2 | 9,619 | py | Python | lib/tests/streamlit/file_util_test.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | 5 | 2020-07-06T21:29:56.000Z | 2022-03-12T20:04:27.000Z | lib/tests/streamlit/file_util_test.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | null | null | null | lib/tests/streamlit/file_util_test.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | 3 | 2020-07-14T23:32:51.000Z | 2021-12-04T16:49:29.000Z | # Copyright 2018-2020 Streamlit 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 or agreed to in wr... | 37.574219 | 86 | 0.612538 |
793ffe548d975c300956ba463cacf66c0e7d291d | 3,803 | py | Python | cli/kamonohashi/cli/object_storage.py | netresj/kamonohashi | f43bd98f41cbcf00dac815142e38b6113fb6f0a9 | [
"Apache-2.0"
] | 100 | 2019-05-28T10:23:30.000Z | 2022-03-05T06:45:25.000Z | cli/kamonohashi/cli/object_storage.py | netresj/kamonohashi | f43bd98f41cbcf00dac815142e38b6113fb6f0a9 | [
"Apache-2.0"
] | 354 | 2019-05-28T07:34:10.000Z | 2022-03-31T06:25:34.000Z | cli/kamonohashi/cli/object_storage.py | netresj/kamonohashi | f43bd98f41cbcf00dac815142e38b6113fb6f0a9 | [
"Apache-2.0"
] | 35 | 2019-05-29T02:50:36.000Z | 2021-10-08T06:13:13.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, with_statement
import logging
import os
import os.path
import click
from kamonohashi.cli import util
from kamonohashi.op import rest
from kamonohashi.op.rest.rest import ApiException
def progressbar(length, label):
bar = click.pro... | 36.219048 | 110 | 0.626874 |
793ffe9e7283959a003b69599e52faba82ac08bc | 684 | py | Python | feedjack/migrations/0003_auto_20150203_0425.py | allo-/feedjack | 8112474504b7265d6722b74b89171df0e6dc7688 | [
"BSD-3-Clause"
] | 2 | 2017-12-19T17:11:04.000Z | 2020-08-19T21:15:51.000Z | feedjack/migrations/0003_auto_20150203_0425.py | allo-/feedjack | 8112474504b7265d6722b74b89171df0e6dc7688 | [
"BSD-3-Clause"
] | 32 | 2016-03-12T13:57:28.000Z | 2017-03-02T11:11:59.000Z | feedjack/migrations/0003_auto_20150203_0425.py | allo-/feedjack | 8112474504b7265d6722b74b89171df0e6dc7688 | [
"BSD-3-Clause"
] | 2 | 2018-04-06T11:55:47.000Z | 2020-01-12T00:22:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedjack', '0002_auto_20150203_0401'),
]
operations = [
migrations.AlterField(
model_name='feed',
na... | 32.571429 | 288 | 0.676901 |
793fff029e5b6bc1d4746278febf57d334c73ac5 | 15,112 | py | Python | core/cli.py | Raul1718/Kunlun-M | e7e475f2c96b6f5b64f6adc385821ade97e6fdd1 | [
"MIT"
] | 1,059 | 2020-08-06T13:32:10.000Z | 2022-03-31T07:20:27.000Z | core/cli.py | xj84684/Kunlun-M | e7e475f2c96b6f5b64f6adc385821ade97e6fdd1 | [
"MIT"
] | 87 | 2020-09-08T06:34:45.000Z | 2022-03-28T05:52:36.000Z | core/cli.py | xj84684/Kunlun-M | e7e475f2c96b6f5b64f6adc385821ade97e6fdd1 | [
"MIT"
] | 171 | 2020-08-13T11:53:47.000Z | 2022-03-30T03:23:07.000Z | # -*- coding: utf-8 -*-
"""
cli
~~~
Implements CLI mode
:author: Feei <feei@feei.cn>
:homepage: https://github.com/wufeifei/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 Feei. All rights reserved
"""
import os
import codecs
import pprint
import t... | 32.568966 | 157 | 0.57762 |
793fff1f00944362dc45671cfb4d0b7ebd3abae6 | 1,448 | py | Python | tests/st/ops/ascend/test_tbe_ops/test_addn.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | 7 | 2020-05-24T03:19:26.000Z | 2020-05-24T03:20:00.000Z | tests/st/ops/ascend/test_tbe_ops/test_addn.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | null | null | null | tests/st/ops/ascend/test_tbe_ops/test_addn.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.177778 | 78 | 0.687845 |
793fff306ada0a6def213e73af270101d74e3dc6 | 1,083 | py | Python | setup.py | fcivaner/hashdir | 74a5ff7319fc02ff5f9a63c51771fbfface446ec | [
"MIT"
] | null | null | null | setup.py | fcivaner/hashdir | 74a5ff7319fc02ff5f9a63c51771fbfface446ec | [
"MIT"
] | null | null | null | setup.py | fcivaner/hashdir | 74a5ff7319fc02ff5f9a63c51771fbfface446ec | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
import hashdir
this_directory = os.path.abspath(os.path.dirname(__file__))
def read_file(path):
with open(os.path.join(this_directory, path), encoding="utf-8") as f:
return f.read()
long_description = read_file("README.md")
setup(
name=hashdir.... | 29.27027 | 73 | 0.696214 |
793fff7afd858b9e162d61669748df5f925984a0 | 4,812 | py | Python | gen/argo/events/client/models/v1_volume_photon_persistent_disk.py | argoproj-labs/argo-events-client-python | 3d6e3dffca4a12a490c2963f4ac90c8894948bb5 | [
"Apache-2.0"
] | null | null | null | gen/argo/events/client/models/v1_volume_photon_persistent_disk.py | argoproj-labs/argo-events-client-python | 3d6e3dffca4a12a490c2963f4ac90c8894948bb5 | [
"Apache-2.0"
] | null | null | null | gen/argo/events/client/models/v1_volume_photon_persistent_disk.py | argoproj-labs/argo-events-client-python | 3d6e3dffca4a12a490c2963f4ac90c8894948bb5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Argo Events
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 31.657895 | 197 | 0.604738 |
793fffcb15f3f3432198b56c54c86c555f81a30e | 3,003 | py | Python | Behavioral-Patterns/Visitor/classic.py | PratikRamdasi/Design-Patterns-in-Python | 689677ab861c96f4908bfc5f5fa77585e14f814c | [
"MIT"
] | null | null | null | Behavioral-Patterns/Visitor/classic.py | PratikRamdasi/Design-Patterns-in-Python | 689677ab861c96f4908bfc5f5fa77585e14f814c | [
"MIT"
] | null | null | null | Behavioral-Patterns/Visitor/classic.py | PratikRamdasi/Design-Patterns-in-Python | 689677ab861c96f4908bfc5f5fa77585e14f814c | [
"MIT"
] | null | null | null | # taken from https://tavianator.com/the-visitor-pattern-in-python/
def _qualname(obj):
"""Get the fully-qualified name of an object (including module)."""
return obj.__module__ + '.' + obj.__qualname__
def _declaring_class(obj):
"""Get the name of the class that declared an object."""
name... | 25.235294 | 72 | 0.606061 |
794000347b4999adfaafda1406a685b8d095259c | 129,363 | py | Python | fkie_node_manager/src/fkie_node_manager/main_window.py | ETHZ-RobotX/multimaster_fkie | 00fd99f210f7a1e15a24b6c531465042c3075f11 | [
"BSD-3-Clause"
] | null | null | null | fkie_node_manager/src/fkie_node_manager/main_window.py | ETHZ-RobotX/multimaster_fkie | 00fd99f210f7a1e15a24b6c531465042c3075f11 | [
"BSD-3-Clause"
] | null | null | null | fkie_node_manager/src/fkie_node_manager/main_window.py | ETHZ-RobotX/multimaster_fkie | 00fd99f210f7a1e15a24b6c531465042c3075f11 | [
"BSD-3-Clause"
] | 1 | 2021-09-12T20:44:20.000Z | 2021-09-12T20:44:20.000Z | # encoding: utf-8
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribution... | 53.833958 | 250 | 0.565046 |
794000deec5b6b8ac744fbc5125dec54cce1908b | 9,859 | py | Python | resources_rc.py | AlliedToasters/detect-craters | 6aa9074bf2b339b62863dec739882a356630466c | [
"BSD-3-Clause"
] | null | null | null | resources_rc.py | AlliedToasters/detect-craters | 6aa9074bf2b339b62863dec739882a356630466c | [
"BSD-3-Clause"
] | null | null | null | resources_rc.py | AlliedToasters/detect-craters | 6aa9074bf2b339b62863dec739882a356630466c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x01\x64\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x18\x... | 46.947619 | 129 | 0.723299 |
79400212e6207882501f101dd79477965e3837e7 | 2,040 | py | Python | game-of-life.py | buha/game-of-life | 8f125631987142bae72d8b725d0973e80bb01755 | [
"MIT"
] | 1 | 2020-01-10T13:38:34.000Z | 2020-01-10T13:38:34.000Z | game-of-life.py | buha/game-of-life | 8f125631987142bae72d8b725d0973e80bb01755 | [
"MIT"
] | null | null | null | game-of-life.py | buha/game-of-life | 8f125631987142bae72d8b725d0973e80bb01755 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import QApplication, QMainWindow
from PyQt5.QtCore import Qt
import design
from random import randint
class MainWindow(QMainWindow):
def __init__(self, screen_width, screen_height, c1, c2):
super().__init__()
# build ui
self.ui = design.Ui_MainWindow()
... | 28.333333 | 91 | 0.621078 |
7940023c29266fd50e3a7e61955bfcda72eb1be3 | 1,596 | py | Python | rvusite/rvu/urls.py | craighagan/rvumanager | b313833bd49cdb36806a4ca4a33039f3d4bcf82e | [
"Apache-2.0"
] | null | null | null | rvusite/rvu/urls.py | craighagan/rvumanager | b313833bd49cdb36806a4ca4a33039f3d4bcf82e | [
"Apache-2.0"
] | null | null | null | rvusite/rvu/urls.py | craighagan/rvumanager | b313833bd49cdb36806a4ca4a33039f3d4bcf82e | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from django.utils import timezone
from django.views.generic import RedirectView
from . import views
def get_current_date_str():
now = timezone.now()
return timezone.template_localtime(now).strftime("%Y-%m-%d")
urlpatterns = [
url(r'^$', views.index, name='index'),
# ex... | 59.111111 | 140 | 0.708647 |
794002515a5b8cca82b9aac07ba69e56177f6077 | 762 | py | Python | tests/weight_test.py | vfurci200/module9_loan | 6239cc9e03bcfb1371b14d7967e490f3ee11b26a | [
"MIT"
] | null | null | null | tests/weight_test.py | vfurci200/module9_loan | 6239cc9e03bcfb1371b14d7967e490f3ee11b26a | [
"MIT"
] | null | null | null | tests/weight_test.py | vfurci200/module9_loan | 6239cc9e03bcfb1371b14d7967e490f3ee11b26a | [
"MIT"
] | null | null | null | from brownie import accounts, Bank, chain
import pytest
def test_lender_weight_calculation(bank,chain):
balance = bank.balance()
bank.deposit( "10 ether", {'from': accounts[0],'amount': "10 ether"})
w_ = bank.percent(100000000,10000000000000000000,16)
assert w_ > 0
# def test_lenders_weight_calculat... | 34.636364 | 75 | 0.653543 |
79400266eb1092298125055baa4bb287d72e0f64 | 548 | py | Python | utils/scripts/OOOlevelGen/src/levels/Big_Fella.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/levels/Big_Fella.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | utils/scripts/OOOlevelGen/src/levels/Big_Fella.py | fullscreennl/monkeyswipe | c56192e202674dd5ab18023f6cf14cf51e95fbd0 | [
"MIT"
] | null | null | null | import LevelBuilder
from sprites import *
def render(name,bg):
lb = LevelBuilder.LevelBuilder(name+".plist",background=bg)
lb.addObject(Friend.FriendSprite(x=263, y=142,width=268,height=268,angle='0',restitution=0.2,static='false',friction=0.5,density=20 ))
lb.addObject(Enemy.EnemySprite(x=263, y=303,width=... | 54.8 | 138 | 0.729927 |
794002af4f8ac7a6ac3b496a55e8e01ff48c1a40 | 5,911 | py | Python | tests/test_general_linear.py | DanielBrooks75/geomstats | 7cbb90b25c719c635413e26be1888b1286623e1a | [
"MIT"
] | null | null | null | tests/test_general_linear.py | DanielBrooks75/geomstats | 7cbb90b25c719c635413e26be1888b1286623e1a | [
"MIT"
] | null | null | null | tests/test_general_linear.py | DanielBrooks75/geomstats | 7cbb90b25c719c635413e26be1888b1286623e1a | [
"MIT"
] | null | null | null | """Unit tests for the General Linear group."""
import warnings
import geomstats.backend as gs
import geomstats.tests
from geomstats.geometry.general_linear import GeneralLinear
RTOL = 1e-5
class TestGeneralLinear(geomstats.tests.TestCase):
def setUp(self):
gs.random.seed(1234)
self.n = 3
... | 33.207865 | 70 | 0.48469 |
794004570de33bd832ba79b10400d6d31492a292 | 2,237 | py | Python | samples/demo_lcdscreen_move.py | PierreRust/apig_charlcd | 9b5a5881e9fd523f6b559a7570f9f6d0d9ff7e42 | [
"Apache-2.0"
] | 2 | 2015-10-14T10:40:40.000Z | 2016-01-04T04:43:55.000Z | samples/demo_lcdscreen_move.py | PierreRust/apig_charlcd | 9b5a5881e9fd523f6b559a7570f9f6d0d9ff7e42 | [
"Apache-2.0"
] | null | null | null | samples/demo_lcdscreen_move.py | PierreRust/apig_charlcd | 9b5a5881e9fd523f6b559a7570f9f6d0d9ff7e42 | [
"Apache-2.0"
] | null | null | null | import asyncio
from apig_charlcd import LcdScreen
import apigpio as apig
# Define GPIO to LCD mapping
LCD_RS = 22
LCD_E = 27
LCD_D4 = 19
LCD_D5 = 13
LCD_D6 = 6
LCD_D7 = 5
@asyncio.coroutine
def write_diag(lcd_screen):
yield from lcd_screen.move_to(0, 0)
yield from lcd_screen.write_char(ord('A'))
yiel... | 22.826531 | 77 | 0.669647 |
794004d91b39ebd16d6d81a93e05b50bccb20bbe | 2,183 | py | Python | imcsdk/mometa/aaa/AaaUserPolicy.py | kgrozis/UCS-CIMC-Scripts | 44069ee853299fe5aeed023e8c998ce2534b8d8b | [
"Apache-2.0"
] | null | null | null | imcsdk/mometa/aaa/AaaUserPolicy.py | kgrozis/UCS-CIMC-Scripts | 44069ee853299fe5aeed023e8c998ce2534b8d8b | [
"Apache-2.0"
] | null | null | null | imcsdk/mometa/aaa/AaaUserPolicy.py | kgrozis/UCS-CIMC-Scripts | 44069ee853299fe5aeed023e8c998ce2534b8d8b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for AaaUserPolicy ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import ImcVersion, MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class AaaUserPolicyConsts():
pass
class AaaUserPolicy(ManagedObject):
"""This is AaaUserPol... | 46.446809 | 232 | 0.669262 |
794004e5fe370528dfa998dad206758c4046611d | 131,139 | py | Python | pygsti/report/workspace.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | 1 | 2021-12-19T15:11:09.000Z | 2021-12-19T15:11:09.000Z | pygsti/report/workspace.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | pygsti/report/workspace.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | """ Defines the Workspace class and supporting functionality."""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S.... | 44.42378 | 119 | 0.552894 |
7940056a7840592e5423b5bbd0ec6d2e7ff7c9ae | 233 | py | Python | common/models.py | StarrFnl/CS_django_2122 | 441adb6df7fba17ccde72f9cf0b7803f8aa2621b | [
"MIT"
] | null | null | null | common/models.py | StarrFnl/CS_django_2122 | 441adb6df7fba17ccde72f9cf0b7803f8aa2621b | [
"MIT"
] | 1 | 2022-01-26T08:54:44.000Z | 2022-01-26T08:54:44.000Z | common/models.py | StarrFnl/CS_django_2122 | 441adb6df7fba17ccde72f9cf0b7803f8aa2621b | [
"MIT"
] | 3 | 2022-01-20T14:55:02.000Z | 2022-01-26T11:16:35.000Z | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class CustomUser(AbstractUser):
id = models.AutoField(primary_key=True)
nickname = models.CharField(max_length=100)
| 29.125 | 51 | 0.7897 |
7940074a7371928505748d90b9c862ee5b2d225e | 82 | py | Python | haystack/nodes/question_generator/__init__.py | mapapa/haystack | 79fdda8a7cf393d774803608a4874f2a6e63cf6f | [
"Apache-2.0"
] | 7 | 2022-01-22T18:58:54.000Z | 2022-03-18T17:06:35.000Z | haystack/nodes/question_generator/__init__.py | mapapa/haystack | 79fdda8a7cf393d774803608a4874f2a6e63cf6f | [
"Apache-2.0"
] | 17 | 2021-12-08T18:00:58.000Z | 2021-12-28T14:03:27.000Z | haystack/nodes/question_generator/__init__.py | mapapa/haystack | 79fdda8a7cf393d774803608a4874f2a6e63cf6f | [
"Apache-2.0"
] | 1 | 2022-01-05T15:24:36.000Z | 2022-01-05T15:24:36.000Z | from haystack.nodes.question_generator.question_generator import QuestionGenerator | 82 | 82 | 0.926829 |
794007ba40c84745eae2f6ada825346f62738407 | 2,696 | py | Python | git/core.py | trobjo/sublime-text-git | 5bd34d60ca5e85defde67cd28532710d734eb367 | [
"MIT"
] | null | null | null | git/core.py | trobjo/sublime-text-git | 5bd34d60ca5e85defde67cd28532710d734eb367 | [
"MIT"
] | null | null | null | git/core.py | trobjo/sublime-text-git | 5bd34d60ca5e85defde67cd28532710d734eb367 | [
"MIT"
] | null | null | null | import sublime
import sublime_plugin
from . import GitWindowCommand, GitTextCommand
class GitCustomCommand(GitWindowCommand):
may_change_files = True
def run(self):
self.get_window().show_input_panel(
"Git command", "",
self.on_input, None, None
)
def on_input(se... | 30.636364 | 78 | 0.616098 |
794008123451312f21d6e94c41014c0b94704ef0 | 3,162 | py | Python | pyocd/probe/pydapaccess/interface/common.py | vince-zeng/pyOCD | c9e7bbaee81c2c94b2d8f05a70b6f341457fdae1 | [
"Apache-2.0"
] | 3 | 2019-06-05T01:32:06.000Z | 2020-05-20T08:55:46.000Z | pyocd/probe/pydapaccess/interface/common.py | vince-zeng/pyOCD | c9e7bbaee81c2c94b2d8f05a70b6f341457fdae1 | [
"Apache-2.0"
] | 1 | 2019-07-05T10:13:09.000Z | 2019-07-05T10:51:43.000Z | pyocd/probe/pydapaccess/interface/common.py | vince-zeng/pyOCD | c9e7bbaee81c2c94b2d8f05a70b6f341457fdae1 | [
"Apache-2.0"
] | 1 | 2019-01-21T03:01:53.000Z | 2019-01-21T03:01:53.000Z | # pyOCD debugger
# Copyright (c) 2019 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... | 36.767442 | 98 | 0.734662 |
7940081cefc65ecaac0dc98bca7741f138e49dd3 | 1,418 | py | Python | setup.py | Spratiher9/Netplot | 4c07b6b86450d0fc7dd36f08e0c24ca67dd5330e | [
"MIT"
] | 19 | 2021-09-22T06:25:24.000Z | 2021-11-17T19:18:37.000Z | setup.py | Spratiher9/Netplot | 4c07b6b86450d0fc7dd36f08e0c24ca67dd5330e | [
"MIT"
] | null | null | null | setup.py | Spratiher9/Netplot | 4c07b6b86450d0fc7dd36f08e0c24ca67dd5330e | [
"MIT"
] | 2 | 2021-10-01T11:57:06.000Z | 2021-10-02T13:08:02.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="netplot", # This is the name of the package
version="0.1.2", # The initial release version
author="Souvik Pratiher", # Full name of ... | 40.514286 | 95 | 0.575458 |
794008e1091212eea37900edf241ccde5bf1fd54 | 1,213 | py | Python | blankmodule.py | shyed2001/Python_Programming | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | 2 | 2019-05-01T04:32:14.000Z | 2019-05-04T11:28:18.000Z | blankmodule.py | shyed2001/python-learning-basics | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | null | null | null | blankmodule.py | shyed2001/python-learning-basics | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | null | null | null | # Created: 01/05/2019
# Copyright: (c) User 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
def is_divisible(x, y):
""" Test if x is exactly divisible by y """
if x % y == 0:
#return True
print(True)
else:
#return False
... | 23.784314 | 81 | 0.556472 |
7940092288d94a46b3433ff0445dbbeb528f9323 | 17,720 | py | Python | shift_detector/precalculations/text_metadata.py | hpi-bp1819-naumann/shift-detector | 5d081d05ec084021f11827aa3fd3e167854b2a2a | [
"Apache-2.0"
] | 3 | 2019-06-21T11:41:08.000Z | 2019-10-24T06:41:51.000Z | shift_detector/precalculations/text_metadata.py | hpi-bp1819-naumann/shift-detector | 5d081d05ec084021f11827aa3fd3e167854b2a2a | [
"Apache-2.0"
] | 63 | 2019-05-16T12:09:57.000Z | 2022-02-10T00:21:01.000Z | shift_detector/precalculations/text_metadata.py | hpi-bp1819-naumann/shift-detector | 5d081d05ec084021f11827aa3fd3e167854b2a2a | [
"Apache-2.0"
] | null | null | null | import logging as logger
import re
import regex
import unicodedata
from abc import abstractmethod
from collections import defaultdict
import pandas as pd
import nltk
# noinspection PyPackageRequirements
from iso639 import languages
from langdetect import detect, DetectorFactory
from nltk.corpus import stopwords
# noin... | 32.394881 | 120 | 0.655926 |
79400943f827182a182078c2b0a4b38f8010d57d | 94 | py | Python | apps/crm/models.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 115 | 2019-08-18T16:12:54.000Z | 2022-03-29T14:17:20.000Z | apps/crm/models.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 22 | 2019-09-09T01:34:54.000Z | 2022-03-12T00:33:40.000Z | apps/crm/models.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 83 | 2019-08-17T17:09:20.000Z | 2022-03-25T04:46:53.000Z | # Localfolder Library
from .submodels.lead import PyLead
from .submodels.stage import PyStage
| 23.5 | 36 | 0.829787 |
794009aa62e480e63ea0e8151495d9b79bf823da | 1,255 | py | Python | sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/operations_list_results_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 33.026316 | 78 | 0.590438 |
794009b0bf0fcfb17fbd54f1dbf6199a54240dfd | 3,122 | py | Python | misu/unitmachine.py | cjrh/unity | 798423e1563929f6ed7417c477c19c5991ab3a9b | [
"BSD-2-Clause"
] | 10 | 2016-09-08T20:56:51.000Z | 2022-03-27T13:21:58.000Z | misu/unitmachine.py | cjrh/misu | 4520f720590c00e46a952c24be04421b867e8508 | [
"BSD-2-Clause"
] | 33 | 2015-03-18T02:01:28.000Z | 2022-03-27T13:14:48.000Z | misu/unitmachine.py | cjrh/unity | 798423e1563929f6ed7417c477c19c5991ab3a9b | [
"BSD-2-Clause"
] | 5 | 2016-08-28T20:33:04.000Z | 2018-08-28T19:28:00.000Z | from __future__ import division
from __future__ import print_function
import traceback
import parsley
def get_unit_text(value):
if not value[1]:
return ''
else:
return value[1]
def calculate(start, pairs):
print('start={} pairs={}'.format(start, pairs))
result = start
for op, va... | 27.385965 | 75 | 0.508648 |
794009c64314b027a4da9764421c4ae457b458e1 | 20,135 | py | Python | old_models/train_4p_resnetd152b.py | artyompal/imet | 75d708392237a1392ac5fa2f598a747408a88f19 | [
"Apache-2.0"
] | 5 | 2019-06-11T09:11:56.000Z | 2020-05-06T16:05:26.000Z | old_models/train_4p_resnetd152b.py | artyompal/imet | 75d708392237a1392ac5fa2f598a747408a88f19 | [
"Apache-2.0"
] | null | null | null | old_models/train_4p_resnetd152b.py | artyompal/imet | 75d708392237a1392ac5fa2f598a747408a88f19 | [
"Apache-2.0"
] | 2 | 2019-06-12T14:14:35.000Z | 2019-07-18T15:06:14.000Z | #!/usr/bin/python3.6
''' Trains a model. '''
import argparse, hashlib, logging, math, os, pprint, random, sys, time
import multiprocessing
from typing import *
from collections import defaultdict, Counter
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.optim as optim
import tor... | 36.809872 | 105 | 0.632133 |
79400a07d426263b1716fc2346086a9e82bd23da | 931 | py | Python | examples/label_prop.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 2,350 | 2021-09-12T08:32:50.000Z | 2022-03-31T18:09:36.000Z | examples/label_prop.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 588 | 2021-09-12T08:49:08.000Z | 2022-03-31T21:02:13.000Z | examples/label_prop.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 505 | 2021-09-13T13:13:32.000Z | 2022-03-31T15:54:00.000Z | import os.path as osp
from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
import torch_geometric.transforms as T
from torch_geometric.nn import LabelPropagation
root = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', 'OGB')
dataset = PygNodePropPredDataset(
'ogbn-arxiv', root, transform=T.C... | 28.212121 | 73 | 0.691729 |
79400aa1b6d5c6fbefabea771733e5f504750efd | 73 | py | Python | count_min_sketch/__init__.py | AWNystrom/CountMinSketch | c4a6eb3320e81c6e4ccedbcaed70854949e5bdd1 | [
"Apache-2.0"
] | 14 | 2016-06-03T16:33:26.000Z | 2021-07-16T09:01:29.000Z | count_min_sketch/__init__.py | AWNystrom/CountMinSketch | c4a6eb3320e81c6e4ccedbcaed70854949e5bdd1 | [
"Apache-2.0"
] | 1 | 2015-07-23T18:19:02.000Z | 2015-07-23T18:19:02.000Z | count_min_sketch/__init__.py | AWNystrom/CountMinSketch | c4a6eb3320e81c6e4ccedbcaed70854949e5bdd1 | [
"Apache-2.0"
] | 10 | 2016-05-12T15:08:59.000Z | 2021-12-23T17:01:56.000Z | from count_min_sketch import CountMinSketch
__all__ = ["CountMinSketch"]
| 24.333333 | 43 | 0.835616 |
79400aceb63ac1b24f2d9988ff46b97123863721 | 2,829 | py | Python | python/mm/selection.py | FumeauxG/mm-api | bb59e448562ff30349d7b1b831ee0db1465a9e6b | [
"MIT"
] | 67 | 2015-03-27T17:30:34.000Z | 2022-03-01T11:08:24.000Z | python/mm/selection.py | FumeauxG/mm-api | bb59e448562ff30349d7b1b831ee0db1465a9e6b | [
"MIT"
] | 15 | 2015-03-17T07:46:58.000Z | 2021-07-10T06:14:16.000Z | python/mm/selection.py | FumeauxG/mm-api | bb59e448562ff30349d7b1b831ee0db1465a9e6b | [
"MIT"
] | 35 | 2015-03-16T15:32:46.000Z | 2022-03-19T17:53:06.000Z | import mmapi;
from convert import *;
from tool import *;
def clear_face_selection(remote):
"""Clear the current face selection (if there is one) and exit the Selection Tool"""
cancel_tool(remote)
def select_all(remote):
"""Select all faces of the active object (will initialize a Selection Tool if necessa... | 36.269231 | 110 | 0.743019 |
79400b4490c2421fbf20988b0cd940520f1b6165 | 11,016 | py | Python | contest/TestCase.py | Lnk2past/contest | c05dfe5314a41cf352b20f5771aefb50e5640e11 | [
"MIT"
] | 3 | 2019-10-24T00:22:04.000Z | 2019-10-26T19:30:53.000Z | contest/TestCase.py | Lnk2past/contest | c05dfe5314a41cf352b20f5771aefb50e5640e11 | [
"MIT"
] | 4 | 2018-07-02T02:23:03.000Z | 2021-09-11T02:13:55.000Z | contest/TestCase.py | Lnk2past/contest | c05dfe5314a41cf352b20f5771aefb50e5640e11 | [
"MIT"
] | 1 | 2019-10-15T02:09:19.000Z | 2019-10-15T02:09:19.000Z | import os
import pathlib
import shutil
from itertools import zip_longest
from subprocess import run, PIPE, TimeoutExpired
from PIL import Image, ImageChops
from contest.utilities import chdir
from contest.utilities.importer import import_from_source
from contest.utilities.logger import logger, logger_format_fields
... | 43.714286 | 150 | 0.560911 |
79400b56fb66d27ccd605540343566ad8c630265 | 8,148 | py | Python | lib/data_formats/read_events.py | tub-rip/event_utils | 1ae06397b17bca32036155b80da64d295d4fe09f | [
"MIT"
] | 43 | 2021-01-12T14:59:15.000Z | 2022-03-31T04:36:17.000Z | lib/data_formats/read_events.py | TimoStoff/event_utils | dc0a0712156bb0c3659d90b33e211fa58a83a75f | [
"MIT"
] | 1 | 2021-11-24T18:21:41.000Z | 2021-11-24T18:21:41.000Z | lib/data_formats/read_events.py | tub-rip/event_utils | 1ae06397b17bca32036155b80da64d295d4fe09f | [
"MIT"
] | 11 | 2020-12-17T11:58:51.000Z | 2022-02-11T17:51:43.000Z | import h5py
import numpy as np
import os
def compute_indices(event_stamps, frame_stamps):
"""
Given event timestamps and frame timestamps as arrays,
find the event indices that correspond to the beginning and
end period of each frames
@param event_stamps The event timestamps
@param frame_stamps... | 46.033898 | 128 | 0.592047 |
79400ca308f57260b4d0d6af045764e9be68743c | 3,327 | py | Python | edge/graphics/subplotter/sample_subplotter.py | Data-Science-in-Mechanical-Engineering/edge | 586eaba2f0957e75940f4f19fa774603f57eae89 | [
"MIT"
] | null | null | null | edge/graphics/subplotter/sample_subplotter.py | Data-Science-in-Mechanical-Engineering/edge | 586eaba2f0957e75940f4f19fa774603f57eae89 | [
"MIT"
] | null | null | null | edge/graphics/subplotter/sample_subplotter.py | Data-Science-in-Mechanical-Engineering/edge | 586eaba2f0957e75940f4f19fa774603f57eae89 | [
"MIT"
] | null | null | null | from . import Subplotter
import numpy as np
def masked(to_mask, mask):
return [item for item, keep in zip(to_mask, mask) if keep]
class SampleSubplotter(Subplotter):
def __init__(self, colors):
super(SampleSubplotter, self).__init__(colors)
self.failed_samples = []
self.unfailed_samp... | 39.141176 | 79 | 0.593628 |
79400cc84ba38b4bef421de53e2fccf55beed4db | 5,542 | py | Python | openwisp_users/admin.py | ShubhamKushwah/openwisp-users | 5ea599e776c6053ea3acbeb6beb2ea62538945f6 | [
"BSD-3-Clause"
] | null | null | null | openwisp_users/admin.py | ShubhamKushwah/openwisp-users | 5ea599e776c6053ea3acbeb6beb2ea62538945f6 | [
"BSD-3-Clause"
] | null | null | null | openwisp_users/admin.py | ShubhamKushwah/openwisp-users | 5ea599e776c6053ea3acbeb6beb2ea62538945f6 | [
"BSD-3-Clause"
] | null | null | null | from allauth.account.models import EmailAddress
from django import forms
from django.apps import apps
from django.contrib import admin
from django.contrib.auth.admin import GroupAdmin as BaseGroupAdmin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.forms import UserChangeForm ... | 36.222222 | 89 | 0.686034 |
79400cf6ff7ec61671266dc62fea56ba1c74695b | 4,357 | py | Python | tests/testModelStudy.py | sys-bio/SBstoat | 31b184176a7f19074c905db76e6e6ac8e4fc36a8 | [
"MIT"
] | null | null | null | tests/testModelStudy.py | sys-bio/SBstoat | 31b184176a7f19074c905db76e6e6ac8e4fc36a8 | [
"MIT"
] | 18 | 2020-09-14T19:30:38.000Z | 2021-04-13T18:45:18.000Z | tests/testModelStudy.py | sys-bio/SBStoat | 31b184176a7f19074c905db76e6e6ac8e4fc36a8 | [
"MIT"
] | 3 | 2021-01-29T04:00:25.000Z | 2021-03-03T23:43:39.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Aug 19, 2020
@author: joseph-hellerstein
"""
from SBstoat.modelStudy import ModelStudy, mkDataSourceDct
import tests._testHelpers as th
from tests import _testConstants as tcn
import matplotlib
import numpy as np
import os
import shutil
import unittest
IGNORE_TEST = False... | 31.80292 | 78 | 0.638513 |
79400d3fdc94a1c62de0a2c7fd1f816241e53970 | 995 | py | Python | tests/app_management/admin.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 36 | 2019-10-22T11:44:37.000Z | 2022-03-15T21:27:03.000Z | tests/app_management/admin.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 6 | 2020-10-03T15:13:26.000Z | 2021-09-25T14:05:50.000Z | tests/app_management/admin.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 3 | 2021-04-26T08:30:46.000Z | 2021-08-18T09:04:49.000Z | # -*- coding: utf-8 -*-
from queryable_properties.admin import QueryablePropertiesAdmin, QueryablePropertiesTabularInline
from ..app_management.models import VersionWithClassBasedProperties
class VersionAdmin(QueryablePropertiesAdmin):
list_display = ('version', 'application', 'is_supported')
list_filter = (... | 35.535714 | 97 | 0.739698 |
79400e0280adae8528b03689a40d0db330670e10 | 1,687 | py | Python | semantic_search/schemas.py | BaderLab/semantic-search | 26abcf7d22df6f0991f17d3c854f104cd8a762f1 | [
"MIT"
] | 1 | 2020-05-08T19:17:46.000Z | 2020-05-08T19:17:46.000Z | semantic_search/schemas.py | BaderLab/semantic-search | 26abcf7d22df6f0991f17d3c854f104cd8a762f1 | [
"MIT"
] | 1 | 2020-05-12T14:50:44.000Z | 2020-05-12T14:50:44.000Z | semantic_search/schemas.py | BaderLab/semantic-search | 26abcf7d22df6f0991f17d3c854f104cd8a762f1 | [
"MIT"
] | null | null | null | from typing import List, Optional
import faiss
from pydantic import BaseModel, Field
from transformers import PreTrainedModel, PreTrainedTokenizer
UID = str
# See: https://fastapi.tiangolo.com/tutorial/body/ for more details on creating a Request Body.
class Document(BaseModel):
uid: UID
text: Optional[s... | 26.777778 | 109 | 0.515708 |
79400e3e4e3ade9b39242a00a264f97f5a12697e | 992 | py | Python | create_index/create_squad_document.py | khoavq/BertSquadSearch | 260b9890fe14523c1c98a6cfeb8f668b6027a41e | [
"MIT"
] | 2 | 2020-08-07T10:58:06.000Z | 2020-09-08T06:30:26.000Z | create_index/create_squad_document.py | khoavq/BertSquadSearch | 260b9890fe14523c1c98a6cfeb8f668b6027a41e | [
"MIT"
] | 4 | 2020-11-13T18:54:30.000Z | 2022-02-10T01:54:13.000Z | create_index/create_squad_document.py | khoavq/BertSquadSearch | 260b9890fe14523c1c98a6cfeb8f668b6027a41e | [
"MIT"
] | 1 | 2020-09-16T08:40:21.000Z | 2020-09-16T08:40:21.000Z | import json
from bert_serving.client import BertClient
from pprint import pprint
bc = BertClient(output_fmt='list', check_length=False)
def create_question_document(d_id, question, is_impossible, emb):
return {
'_op_type': 'index',
'_index': 'squad2.0',
'context_id': d_id,
'questi... | 27.555556 | 83 | 0.606855 |
79400ef9115bdec2d35e638391190dfc21cfc220 | 656 | py | Python | src/loadsave.py | antonrufino/battleship | 76cee1d0d8a53c57e6fbdacee7e6f45cf8859d3d | [
"MIT"
] | null | null | null | src/loadsave.py | antonrufino/battleship | 76cee1d0d8a53c57e6fbdacee7e6f45cf8859d3d | [
"MIT"
] | null | null | null | src/loadsave.py | antonrufino/battleship | 76cee1d0d8a53c57e6fbdacee7e6f45cf8859d3d | [
"MIT"
] | null | null | null | # loadsave.py
# The loadsave module is used to write and read data from files in
# JSON format.
import json
# Based on dcumentation from https://docs.python.org/2/library/json.html
# Converts data to a JSON string and saves it to a file
def saveToFile(fileName, data):
jsonString = json.dumps(data) #convert data ... | 28.521739 | 72 | 0.698171 |
79400f001af4e8b379d6bd713255474ee6c9dd7b | 10,295 | py | Python | aldryn_forms/south_migrations/0007_auto__add_field_formplugin_redirect_type__add_field_formplugin_page__a.py | protoroto/aldryn-forms | 076365f391c096805c5ffea26f40ab728a6fcd2a | [
"BSD-3-Clause"
] | null | null | null | aldryn_forms/south_migrations/0007_auto__add_field_formplugin_redirect_type__add_field_formplugin_page__a.py | protoroto/aldryn-forms | 076365f391c096805c5ffea26f40ab728a6fcd2a | [
"BSD-3-Clause"
] | null | null | null | aldryn_forms/south_migrations/0007_auto__add_field_formplugin_redirect_type__add_field_formplugin_page__a.py | protoroto/aldryn-forms | 076365f391c096805c5ffea26f40ab728a6fcd2a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FormPlugin.redirect_type'
db.add_column(u'cmsplugin_formplugin', 'redirect_type',
... | 76.259259 | 184 | 0.57863 |
79400fc8d4676bf55ba03dbbc402ba01f7c44924 | 210 | py | Python | WEEKS/wk17/CodeSignal-Solutions/12_-_sortByHeight.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/wk17/CodeSignal-Solutions/12_-_sortByHeight.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/wk17/CodeSignal-Solutions/12_-_sortByHeight.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | def sortByHeight(a):
treePositions = [x for x in range(len(a)) if a[x] == -1]
people = sorted([x for x in a if x != -1])
for tree in treePositions:
people.insert(tree, -1)
return people
| 30 | 60 | 0.595238 |
79400fea822b9ff6ea33922dd280de797360c319 | 1,292 | py | Python | nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | 2 | 2017-10-05T21:08:38.000Z | 2018-10-09T23:01:23.000Z | nipype/interfaces/semtools/diffusion/tests/test_auto_extractNrrdVectorIndex.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | 1 | 2016-10-11T19:18:53.000Z | 2016-10-11T19:18:53.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from .....testing import assert_equal
from ..gtract import extractNrrdVectorIndex
def test_extractNrrdVectorIndex_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohas... | 29.363636 | 78 | 0.675697 |
794010e969b9b4297b6e55f409514a91ce49cc68 | 43 | py | Python | webpath.py | liu-jian/seos | e14fc217bbbb6fac91857d7283f5fe93d3d36128 | [
"MIT"
] | null | null | null | webpath.py | liu-jian/seos | e14fc217bbbb6fac91857d7283f5fe93d3d36128 | [
"MIT"
] | null | null | null | webpath.py | liu-jian/seos | e14fc217bbbb6fac91857d7283f5fe93d3d36128 | [
"MIT"
] | null | null | null | webpath = {
'web-1-04': '/var/www/',
}
| 10.75 | 28 | 0.44186 |
794010f011272d5dc9a089a0d0b3635f91a2cf86 | 170 | py | Python | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_Seasonal_DayOfMonth_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_Seasonal_DayOfMonth_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_ConstantTrend_Seasonal_DayOfMonth_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Anscombe'] , ['ConstantTrend'] , ['Seasonal_DayOfMonth'] , ['MLP'] ); | 42.5 | 92 | 0.764706 |
79401111b0d32d264521ef722783be652dbf9b4e | 5,096 | py | Python | tests/integration/ASR_CTC/example_asr_ctc_experiment.py | Chaanks/speechbrain | 6447bde54f6e3fb07fdb934ab535f17cadfbad53 | [
"Apache-2.0"
] | null | null | null | tests/integration/ASR_CTC/example_asr_ctc_experiment.py | Chaanks/speechbrain | 6447bde54f6e3fb07fdb934ab535f17cadfbad53 | [
"Apache-2.0"
] | null | null | null | tests/integration/ASR_CTC/example_asr_ctc_experiment.py | Chaanks/speechbrain | 6447bde54f6e3fb07fdb934ab535f17cadfbad53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env/python3
"""This minimal example trains a CTC-based speech recognizer on a tiny dataset.
The encoder is based on a combination of convolutional, recurrent, and
feed-forward networks (CRDNN) that predict phonemes. A greedy search is used on
top of the output probabilities.
Given the tiny dataset, the expe... | 33.973333 | 80 | 0.67759 |
794011182d1bd92892fb47a1e8da2622e6d928ad | 1,588 | py | Python | py/cidoc_crm_types/properties/p139_has_alternative_form.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p139_has_alternative_form.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p139_has_alternative_form.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
@dataclass
class P139HasAlternativeForm:
"""
Scope note:
This property establishes a relationship of equivalence between two instances of E41 Appellation independent from any item identified by them. It is a dynamic asymmetric relationship, where the range expresses the derivativ... | 52.933333 | 307 | 0.729219 |
7940112fbaa9f2e66776e5e2dbdc2075505fdd3d | 299 | py | Python | test/test_dash/test_callbacks.py | tschm/pyweb | 4a4fc0190bd7d5ef5f17b6ce094c3e945b3cc821 | [
"MIT"
] | null | null | null | test/test_dash/test_callbacks.py | tschm/pyweb | 4a4fc0190bd7d5ef5f17b6ce094c3e945b3cc821 | [
"MIT"
] | null | null | null | test/test_dash/test_callbacks.py | tschm/pyweb | 4a4fc0190bd7d5ef5f17b6ce094c3e945b3cc821 | [
"MIT"
] | null | null | null | from pyweb.pydash.pydash.callbacks import Cache
from test.settings import read
import pandas.testing as pt
def test_cache():
prices = read("price.csv", index_col=0, parse_dates=True)
x = Cache.to_json(frame=prices)
pt.assert_frame_equal(prices, Cache.read_json(x), check_names=False)
| 27.181818 | 72 | 0.759197 |
7940115d216623ea75ace1f77a6044495a9eb51e | 14,799 | py | Python | data_extraction.py | cbjuan/opensim-arff | f36357e56f9ac7c876ccfcafd3ed958e4f349ffb | [
"MIT"
] | null | null | null | data_extraction.py | cbjuan/opensim-arff | f36357e56f9ac7c876ccfcafd3ed958e4f349ffb | [
"MIT"
] | null | null | null | data_extraction.py | cbjuan/opensim-arff | f36357e56f9ac7c876ccfcafd3ed958e4f349ffb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Python Libraries
import MySQLdb
import json
import io
import datetime
import re
# Importing other code
from classes import *
def saveJson(json_name, objects_list, encoder_class):
with io.open(''+json_name+'.json', 'w', encoding='utf-8') as jsonTemp:
jsonTemp.write(unicode(json.... | 39.889488 | 117 | 0.638692 |
7940116303ba9b4c83df2c70c546fa5b793008c3 | 13,391 | py | Python | electrum_mona/gui/kivy/uix/dialogs/tx_dialog.py | Redstoneguy129/electrum-mona | c9a417b2a6ddb359faedef7d7c639add3bcab954 | [
"MIT"
] | null | null | null | electrum_mona/gui/kivy/uix/dialogs/tx_dialog.py | Redstoneguy129/electrum-mona | c9a417b2a6ddb359faedef7d7c639add3bcab954 | [
"MIT"
] | null | null | null | electrum_mona/gui/kivy/uix/dialogs/tx_dialog.py | Redstoneguy129/electrum-mona | c9a417b2a6ddb359faedef7d7c639add3bcab954 | [
"MIT"
] | null | null | null | import copy
from datetime import datetime
from typing import NamedTuple, Callable, TYPE_CHECKING
from functools import partial
from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.uix.label import Label... | 35.709333 | 128 | 0.574341 |
7940118b5ed28d8ccbe93e60e28b2498bef9b421 | 2,214 | py | Python | uwcoursesearch/helpers/CourseData.py | ConMur/UWCourseSearch | ecd5005e7a2a153fe02c015893910a4e60899770 | [
"MIT"
] | null | null | null | uwcoursesearch/helpers/CourseData.py | ConMur/UWCourseSearch | ecd5005e7a2a153fe02c015893910a4e60899770 | [
"MIT"
] | null | null | null | uwcoursesearch/helpers/CourseData.py | ConMur/UWCourseSearch | ecd5005e7a2a153fe02c015893910a4e60899770 | [
"MIT"
] | null | null | null | class CourseInfo:
def __init__(self, course_code, text):
self.code = course_code
self.text = text
class TermInfo:
"""
Represents a term. Contains the id of the term (eg. 1179) and the name
of the term (eg. Fall 2017)
"""
def __init__(self, term_id, term_name):
self.id =... | 34.59375 | 81 | 0.676152 |
794011c18d97ea10a4f94469c8bcf33c592a1ae0 | 2,202 | py | Python | {{cookiecutter.project_name|capitalize }}Proj/playground/app/{{cookiecutter.project_name}}.py | papermerge/cookiecutter-js | 1d66ffc8d71ee5f7beade26794ccdf32196738fd | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_name|capitalize }}Proj/playground/app/{{cookiecutter.project_name}}.py | papermerge/cookiecutter-js | 1d66ffc8d71ee5f7beade26794ccdf32196738fd | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_name|capitalize }}Proj/playground/app/{{cookiecutter.project_name}}.py | papermerge/cookiecutter-js | 1d66ffc8d71ee5f7beade26794ccdf32196738fd | [
"Apache-2.0"
] | null | null | null | import os
import time
import random
from flask import (
Blueprint,
render_template,
request
)
global_context = {
'features': [
{
'url': '/01-sample',
'title': '01 - Sample'
},
{
'url': '/02-sample',
'title': '02 - Sample'
... | 23.178947 | 72 | 0.573569 |
794012c47a1bebe98b3142b33b899c983b88cadd | 2,512 | py | Python | hred-tensorflow-master/main.py | hzhwcmhf/contk_docs | d4874cce5347bcf9f33d9fe99756c7145f181b88 | [
"MIT"
] | 5 | 2019-03-14T14:56:47.000Z | 2021-09-26T05:31:02.000Z | hred-tensorflow-master/main.py | hzhwcmhf/contk_docs | d4874cce5347bcf9f33d9fe99756c7145f181b88 | [
"MIT"
] | 10 | 2020-01-28T22:51:46.000Z | 2022-02-10T00:25:23.000Z | hred-tensorflow-master/main.py | hzhwcmhf/contk_docs | d4874cce5347bcf9f33d9fe99756c7145f181b88 | [
"MIT"
] | 3 | 2019-08-27T10:13:54.000Z | 2021-09-21T00:58:30.000Z | import os
import json
import numpy as np
import tensorflow as tf
from cotk.dataloader import MultiTurnDialog
from cotk.wordvector import WordVector, Glove
from utils import debug, try_cache
from model import HredModel
def create_model(sess, data, args, embed):
with tf.variable_scope(args.name):
model = HredModel(... | 33.493333 | 82 | 0.739252 |
794013068f0dd0c979ee6c5b45e6acce98abbf8f | 1,371 | py | Python | publish/utils.py | nacady/django-publish | a9b0b0b0ce0a2cd664d256edc4c819180dc882df | [
"BSD-3-Clause"
] | null | null | null | publish/utils.py | nacady/django-publish | a9b0b0b0ce0a2cd664d256edc4c819180dc882df | [
"BSD-3-Clause"
] | null | null | null | publish/utils.py | nacady/django-publish | a9b0b0b0ce0a2cd664d256edc4c819180dc882df | [
"BSD-3-Clause"
] | 1 | 2021-06-28T03:59:45.000Z | 2021-06-28T03:59:45.000Z | # -*- coding: utf-8 -*-
class NestedSet(object):
'''
a class that can be used a bit like a set,
but will let us store hiearchy too
'''
def __init__(self):
self._root_elements = []
self._children = {}
def add(self, item, parent=None):
if parent is None:
... | 25.388889 | 62 | 0.577681 |
7940136ed83445ba0e1f42d0751dc2b7f74000a1 | 23,272 | py | Python | cwt/cose.py | dajiaji/python-cwt | 61723510663dc4cd5a5171ff3a78994cac5f5213 | [
"MIT"
] | 11 | 2021-04-29T13:48:15.000Z | 2022-01-31T22:27:14.000Z | cwt/cose.py | dajiaji/python-cwt | 61723510663dc4cd5a5171ff3a78994cac5f5213 | [
"MIT"
] | 185 | 2021-04-23T22:14:50.000Z | 2022-03-28T06:27:35.000Z | cwt/cose.py | dajiaji/python-cwt | 61723510663dc4cd5a5171ff3a78994cac5f5213 | [
"MIT"
] | 5 | 2021-08-09T02:21:18.000Z | 2022-01-05T11:39:08.000Z | from typing import Any, Dict, List, Optional, Union
from asn1crypto import pem
from cbor2 import CBORTag
from .cbor_processor import CBORProcessor
from .const import COSE_ALGORITHMS_RECIPIENT
from .cose_key_interface import COSEKeyInterface
from .recipient_interface import RecipientInterface
from .recipients import R... | 40.262976 | 118 | 0.553799 |
7940165d0d55b0abc445a778840227163b95ace5 | 4,897 | py | Python | uploadhaddocks/util.py | rcook/upload-haddocks | a33826be1873da68ba073a42ec828c8ec150d576 | [
"MIT"
] | null | null | null | uploadhaddocks/util.py | rcook/upload-haddocks | a33826be1873da68ba073a42ec828c8ec150d576 | [
"MIT"
] | 2 | 2017-12-29T03:26:52.000Z | 2017-12-30T20:17:13.000Z | uploadhaddocks/util.py | rcook/upload-haddocks | a33826be1873da68ba073a42ec828c8ec150d576 | [
"MIT"
] | null | null | null | ############################################################
#
# uploadhaddocks.util
# Copyright (C) 2017, Richard Cook
# Released under MIT License
# https://github.com/rcook/upload-haddocks
#
############################################################
from __future__ import print_function
import fnmatch
import json... | 32.430464 | 98 | 0.616908 |
79401814190bd28e9f30ac44117e886cc00c8c35 | 5,828 | py | Python | src/reader/data.py | nboukraa/openqa | 876d56c074f425ec6eff53fe7dda9a1a807bd0c2 | [
"MIT"
] | null | null | null | src/reader/data.py | nboukraa/openqa | 876d56c074f425ec6eff53fe7dda9a1a807bd0c2 | [
"MIT"
] | null | null | null | src/reader/data.py | nboukraa/openqa | 876d56c074f425ec6eff53fe7dda9a1a807bd0c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Edit from DrQA"""
import numpy as np
import logging
import unicodedata
from torch.utils.data import Datase... | 32.377778 | 134 | 0.541695 |
7940187fac1752fc7baa2568ecf349be24197d40 | 3,199 | py | Python | example/settings.py | miceno/django-categories | ef58cae61ee8d0c0920302305f019d76896e72fb | [
"Apache-2.0"
] | null | null | null | example/settings.py | miceno/django-categories | ef58cae61ee8d0c0920302305f019d76896e72fb | [
"Apache-2.0"
] | null | null | null | example/settings.py | miceno/django-categories | ef58cae61ee8d0c0920302305f019d76896e72fb | [
"Apache-2.0"
] | null | null | null | # Django settings for sample project.
import os
import sys
import django
APP = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
PROJ_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, APP)
DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE... | 26.882353 | 88 | 0.632385 |
79401882e359264ec49111bae57969ea26bebca0 | 4,810 | py | Python | src/azure-cli/azure/cli/command_modules/acs/_consts.py | allanpedroni/azure-cli | 4223f08e758e9fe16223564ba9fc77aee6315751 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/acs/_consts.py | allanpedroni/azure-cli | 4223f08e758e9fe16223564ba9fc77aee6315751 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/acs/_consts.py | allanpedroni/azure-cli | 4223f08e758e9fe16223564ba9fc77aee6315751 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 32.281879 | 119 | 0.795634 |
794018c29845469dc6032916e51f7dbe8ae4b85b | 1,050 | py | Python | experimental/soundwave/services/pinpoint_service.py | bopopescu/chromium72-third-party-catapult | 774e1355b871e13bb858147a136e9cb476f55030 | [
"BSD-3-Clause"
] | 1 | 2019-01-04T10:08:58.000Z | 2019-01-04T10:08:58.000Z | experimental/soundwave/services/pinpoint_service.py | kind-john/catapult | 29635376119833f172a58a48a3282d353ce55d2b | [
"BSD-3-Clause"
] | null | null | null | experimental/soundwave/services/pinpoint_service.py | kind-john/catapult | 29635376119833f172a58a48a3282d353ce55d2b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
from services import luci_auth
from services import request
SERVICE_URL = 'https://pinpoint-dot-chromeperf.appspot.com/a... | 25.609756 | 72 | 0.698095 |
794018d0f6669996b339580171f8a2e0334d7880 | 2,020 | py | Python | examples/example_mdrpd.py | teixeirafilipe/cpd | 9bd801fa0e9f81807af48cb089f5481c26332994 | [
"MIT"
] | null | null | null | examples/example_mdrpd.py | teixeirafilipe/cpd | 9bd801fa0e9f81807af48cb089f5481c26332994 | [
"MIT"
] | null | null | null | examples/example_mdrpd.py | teixeirafilipe/cpd | 9bd801fa0e9f81807af48cb089f5481c26332994 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# MIT License
#
#Copyright 2020 Filipe Teixeira
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to us... | 34.827586 | 79 | 0.769307 |
79401908b63d09320b018c46b1bc2b7824bb9ddd | 2,801 | py | Python | test_ramanujan_generator.py | csfulop/sicp_python | 52335542de5beb2323ac8339d399d33706e7f1e0 | [
"MIT"
] | null | null | null | test_ramanujan_generator.py | csfulop/sicp_python | 52335542de5beb2323ac8339d399d33706e7f1e0 | [
"MIT"
] | null | null | null | test_ramanujan_generator.py | csfulop/sicp_python | 52335542de5beb2323ac8339d399d33706e7f1e0 | [
"MIT"
] | null | null | null | from unittest import TestCase
from ramanujan_generator import integers_from, interleave, generator_map, pairs, merge_weighted, generator_filter, \
weighted_pairs, merge_with_next_item, ramanujan_numbers
class TestRamanujanGenerator(TestCase):
def test_integers_from(self):
g = integers_from(1)
... | 35.0125 | 116 | 0.559443 |
79401955cbdb176325edeae6386425c77a0354c5 | 28,962 | py | Python | qcodes/instrument_drivers/american_magnetics/AMI430.py | ctschnur/Qcodes | 623e39aa3774da8b7aa062734a85f4e1f79a635b | [
"MIT"
] | 1 | 2020-10-19T08:09:04.000Z | 2020-10-19T08:09:04.000Z | qcodes/instrument_drivers/american_magnetics/AMI430.py | ctschnur/Qcodes | 623e39aa3774da8b7aa062734a85f4e1f79a635b | [
"MIT"
] | 206 | 2020-10-01T06:33:56.000Z | 2022-03-29T16:08:08.000Z | qcodes/instrument_drivers/american_magnetics/AMI430.py | Akshita07/Qcodes | f75e4786e268f415935aa4658d92526279c7a102 | [
"MIT"
] | null | null | null | import collections
import logging
import time
from functools import partial
from typing import Union, Iterable, Callable
import numbers
import numpy as np
from qcodes import Instrument, IPInstrument, InstrumentChannel
from qcodes.utils.deprecate import deprecate
from qcodes.math_utils.field_vector import FieldVector
... | 36.568182 | 79 | 0.544576 |
79401a1bd561dadb01efaeb2624bc4eb9ddf567d | 1,578 | py | Python | share/rpcauth/rpcauth.py | OpenBullet-Coin/OpenBullet | 4887371728d143ab50c19c59ddcae76204eca112 | [
"MIT"
] | 2 | 2021-04-25T12:13:06.000Z | 2021-07-27T16:09:45.000Z | share/rpcauth/rpcauth.py | OpenBullet-Coin/OpenBullet | 4887371728d143ab50c19c59ddcae76204eca112 | [
"MIT"
] | null | null | null | share/rpcauth/rpcauth.py | OpenBullet-Coin/OpenBullet | 4887371728d143ab50c19c59ddcae76204eca112 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from argparse import ArgumentParser
from base64 import urlsafe_b64encode
from binascii import hexlify
fro... | 33.574468 | 134 | 0.714829 |
79401a947b4a9f8ff58dbba2971b114f0ffd9425 | 3,283 | py | Python | make/photon/prepare/utils/registry.py | thechristschn/harbor | dbec54573c4c50c62b08c317d3b3241d0ce9912b | [
"Apache-2.0"
] | 1 | 2020-07-31T15:00:54.000Z | 2020-07-31T15:00:54.000Z | make/photon/prepare/utils/registry.py | thechristschn/harbor | dbec54573c4c50c62b08c317d3b3241d0ce9912b | [
"Apache-2.0"
] | 3 | 2020-03-09T15:24:24.000Z | 2020-09-10T08:54:35.000Z | make/photon/prepare/utils/registry.py | thechristschn/harbor | dbec54573c4c50c62b08c317d3b3241d0ce9912b | [
"Apache-2.0"
] | 1 | 2020-12-10T06:46:23.000Z | 2020-12-10T06:46:23.000Z | import copy
import os
import subprocess
from g import config_dir, templates_dir, DEFAULT_GID, DEFAULT_UID, data_dir
from urllib.parse import urlsplit
from utils.jinja import render_jinja
from utils.misc import prepare_dir
registry_config_dir = os.path.join(config_dir, "registry")
registry_config_template_path = os.pat... | 37.306818 | 115 | 0.670728 |
79401ab6ce68ecae49c4b517d83c3b0492e7f65b | 1,625 | py | Python | mopidy_gmusic/__init__.py | sebsebmc/mopidy-gmusic | 2a081de654e7f1fa90ac5e840df3e75dc0815d05 | [
"Apache-2.0"
] | null | null | null | mopidy_gmusic/__init__.py | sebsebmc/mopidy-gmusic | 2a081de654e7f1fa90ac5e840df3e75dc0815d05 | [
"Apache-2.0"
] | null | null | null | mopidy_gmusic/__init__.py | sebsebmc/mopidy-gmusic | 2a081de654e7f1fa90ac5e840df3e75dc0815d05 | [
"Apache-2.0"
] | 1 | 2019-05-02T21:59:05.000Z | 2019-05-02T21:59:05.000Z | from __future__ import unicode_literals
import os
from mopidy import config, ext
__version__ = '4.0.0'
class GMusicExtension(ext.Extension):
dist_name = 'Mopidy-GMusic'
ext_name = 'gmusic'
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file... | 31.862745 | 79 | 0.690462 |
79401ac2c02e754404a2814c0e7c0a163c086971 | 427 | py | Python | tasks.py | dmitrypol/redis101 | 49e5ddccff6b799eefc5fcaaf7e1a5335ba570a4 | [
"MIT"
] | 1 | 2019-04-17T07:46:50.000Z | 2019-04-17T07:46:50.000Z | tasks.py | dmitrypol/redis101 | 49e5ddccff6b799eefc5fcaaf7e1a5335ba570a4 | [
"MIT"
] | null | null | null | tasks.py | dmitrypol/redis101 | 49e5ddccff6b799eefc5fcaaf7e1a5335ba570a4 | [
"MIT"
] | null | null | null | import os
import time
from redis import Redis
redis_conn = Redis(host=os.environ['REDIS_HOST'], port=os.environ['REDIS_PORT'])
from rq.decorators import job
@job('default', connection=redis_conn)
def generate_report(input_param):
time.sleep(5)
return {'input_param': input_param}
@job('default', connection=... | 23.722222 | 80 | 0.744731 |
79401adf5a088c952359b9d305fdc6ccbfa3384f | 2,055 | py | Python | test_typographie.py | Delegation-numerique-en-sante/mesconseilscovid | 3101bc0e272f3c1c337d93af5df56a9a5344e9b6 | [
"MIT"
] | 26 | 2020-05-08T07:52:32.000Z | 2021-12-27T10:25:44.000Z | test_typographie.py | Delegation-numerique-en-sante/mesconseilscovid | 3101bc0e272f3c1c337d93af5df56a9a5344e9b6 | [
"MIT"
] | 419 | 2020-05-10T10:28:26.000Z | 2022-03-31T13:19:41.000Z | test_typographie.py | Delegation-numerique-en-sante/mesconseilscovid | 3101bc0e272f3c1c337d93af5df56a9a5344e9b6 | [
"MIT"
] | 19 | 2020-05-10T10:23:16.000Z | 2021-12-03T19:48:04.000Z | import pytest
@pytest.mark.parametrize(
"in_,out_",
[
("", ""),
(" ", " "),
("\u00a0", "\u00a0"),
("\u202f", "\u202f"),
("ici !", "ici !"),
("non ?", "non ?"),
("infos :", "infos :"),
("entre « guillemets »", "entre « guille... | 32.619048 | 74 | 0.451095 |
79401ae47d13502daa08de30f27bfcaf909cc099 | 4,806 | py | Python | lldb/test/API/lit.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | null | null | null | lldb/test/API/lit.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | null | null | null | lldb/test/API/lit.cfg.py | medismailben/llvm-project | e334a839032fe500c3bba22bf976ab7af13ce1c1 | [
"Apache-2.0"
] | null | null | null | # -*- Python -*-
# Configuration file for the 'lit' test runner.
import os
import platform
import shlex
import shutil
import lit.formats
# name: The name of this test suite.
config.name = 'lldb-api'
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.py']
# test_source_root: The roo... | 35.865672 | 81 | 0.738452 |
79401af043debb768909871bf4e5a5238afcb4b6 | 3,063 | py | Python | examples/decoding/plot_decoding_spoc_CMC.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 3 | 2021-01-04T08:45:56.000Z | 2021-05-19T12:25:59.000Z | examples/decoding/plot_decoding_spoc_CMC.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 1 | 2015-10-07T14:19:29.000Z | 2015-10-07T14:19:29.000Z | examples/decoding/plot_decoding_spoc_CMC.py | mehrdad-shokri/mne-python | 4c44bd6ae90dd4d5c6c2e925d93f1b2fbf7bda6a | [
"BSD-3-Clause"
] | 2 | 2021-04-28T11:52:52.000Z | 2021-05-05T02:36:32.000Z | """
====================================
Continuous Target Decoding with SPoC
====================================
Source Power Comodulation (SPoC) [1]_ allows to identify the composition of
orthogonal spatial filters that maximally correlate with a continuous target.
SPoC can be seen as an extension of the CSP for c... | 34.033333 | 78 | 0.709109 |
79401b7bb4c65d981c9ef943cdf8975d7fbbb11c | 2,522 | py | Python | artic/vcfextract.py | ColinAnthony/fieldbioinformatics | 41f9881218ffe22476662e35ac7786ecbd950696 | [
"MIT"
] | null | null | null | artic/vcfextract.py | ColinAnthony/fieldbioinformatics | 41f9881218ffe22476662e35ac7786ecbd950696 | [
"MIT"
] | null | null | null | artic/vcfextract.py | ColinAnthony/fieldbioinformatics | 41f9881218ffe22476662e35ac7786ecbd950696 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import vcf
import sys
import subprocess
import csv
import os
from collections import defaultdict
from operator import attrgetter
def read_vcf(fn):
vcfinfo = {}
vcf_reader = vcf.Reader(open(fn, 'r'))
for record in vcf_reader:
vcfinfo[record.POS] = record
return vcfinfo
de... | 31.135802 | 159 | 0.55115 |
79401c17bf0b1efa7f09fd1b26b9d1f9142b0e1b | 2,049 | py | Python | compiler/languages.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2020-08-02T11:50:27.000Z | 2020-09-21T05:10:32.000Z | compiler/languages.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | compiler/languages.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | import os
# import subprocess
from subprocess import PIPE, Popen
class Language(object):
_FORMAT = None
def __init__(self, fullpath):
self.fullpath = fullpath
self.path, _ = os.path.split(fullpath)
@classmethod
def format(cls):
if cls._FORMAT:
return cls._FORMAT
... | 28.068493 | 104 | 0.599317 |
79401cef0e420ddeb37e4508e745339915bcc118 | 6,101 | py | Python | tests/test_base.py | complexsplit/messer | c272c43aee52d83809d7a9a725c321d67a58345c | [
"Apache-2.0"
] | 2 | 2018-12-27T09:59:33.000Z | 2020-08-29T14:41:13.000Z | tests/test_base.py | complexsplit/messer | c272c43aee52d83809d7a9a725c321d67a58345c | [
"Apache-2.0"
] | 5 | 2019-08-14T13:29:38.000Z | 2019-10-16T18:08:46.000Z | tests/test_base.py | complexsplit/messer | c272c43aee52d83809d7a9a725c321d67a58345c | [
"Apache-2.0"
] | 5 | 2019-01-16T16:13:22.000Z | 2020-09-27T12:03:47.000Z | """
(c) 2018 Adobe. All rights reserved.
This file is licensed to you 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 t... | 35.47093 | 128 | 0.714801 |
79401e19f73712372f6b0eb5f931237f47f5c84a | 249 | py | Python | backend/university/viewsets/university.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | backend/university/viewsets/university.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | backend/university/viewsets/university.py | andriyandrushko0/univowl | da613316021f7b41b133b5b6e360cc6b9db60504 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from ..models import University
from ..serializers import UniversitySerializer
class UniversityViewSet(viewsets.ModelViewSet):
queryset = University.objects.all()
serializer_class = UniversitySerializer
| 27.666667 | 47 | 0.823293 |
79401e6a27a491bdb3dff453b4b06d12fc8957aa | 17,439 | py | Python | parcels/particlefile.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | 1 | 2020-10-01T02:27:00.000Z | 2020-10-01T02:27:00.000Z | parcels/particlefile.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | null | null | null | parcels/particlefile.py | jelletreep/parcels | 7ba3e08de7de046474373f6a5fe02835fc99a8dc | [
"MIT"
] | null | null | null | """Module controlling the writing of ParticleSets to NetCDF file"""
import os
import random
import shutil
import string
from datetime import timedelta as delta
from glob import glob
import netCDF4
import numpy as np
from parcels.tools.error import ErrorCode
from parcels.tools.loggers import logger
try:
from mpi4p... | 44.601023 | 124 | 0.617123 |
79401eca6dfe77303b43913f338473ceb10db6da | 1,773 | py | Python | pythonCodeSnippets/TextFileViewer.py | erichstuder/random | 233cf7538a04b4144b700fee7e955744efd204ce | [
"MIT"
] | 1 | 2018-12-08T07:42:04.000Z | 2018-12-08T07:42:04.000Z | pythonCodeSnippets/TextFileViewer.py | erichstuder/random | 233cf7538a04b4144b700fee7e955744efd204ce | [
"MIT"
] | null | null | null | pythonCodeSnippets/TextFileViewer.py | erichstuder/random | 233cf7538a04b4144b700fee7e955744efd204ce | [
"MIT"
] | null | null | null | """
IT - Internal Tracer
Copyright (C) 2019 Erich Studer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program i... | 34.096154 | 93 | 0.697688 |
79401fad2ff11175b447e05dfe763807c624f061 | 11,586 | py | Python | eval_scores_rgb_flow.py | Ewenwan/DTPP | 0a10dd8c61596d5326fbbe70dcac0eae59088c27 | [
"BSD-2-Clause"
] | 1 | 2019-05-07T01:00:18.000Z | 2019-05-07T01:00:18.000Z | eval_scores_rgb_flow.py | Ewenwan/DTPP | 0a10dd8c61596d5326fbbe70dcac0eae59088c27 | [
"BSD-2-Clause"
] | null | null | null | eval_scores_rgb_flow.py | Ewenwan/DTPP | 0a10dd8c61596d5326fbbe70dcac0eae59088c27 | [
"BSD-2-Clause"
] | 1 | 2019-09-18T05:27:50.000Z | 2019-09-18T05:27:50.000Z | import argparse
import sys
import numpy as np
import scipy.io as sio
from pyActionRecog.utils.video_funcs import default_aggregation_func
from pyActionRecog.utils.metrics import mean_class_accuracy
# parser = argparse.ArgumentParser()
# parser.add_argument('score_files', nargs='+', type=str)
# parser.add_argument('--... | 49.512821 | 175 | 0.763421 |
79402228fac0b4ad572b6c4c3d87e04145bf7f23 | 436 | py | Python | .history/spider/car_spider_20201124003716.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | .history/spider/car_spider_20201124003716.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | .history/spider/car_spider_20201124003716.py | KustomApe/nerdape | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | [
"MIT"
] | null | null | null | from selenium import webdriver
import pandas as pd
import time
"""[Initial setting]
初期設定
"""
options = webdriver.ChromeOptions()
options.add_argument('--headeless')
options.add_argument('--disable-gpu')
options.add_argument('--lang-ja')
browser = webdriver.Chrome(chrome_options=options, executable_path='./chromedriver... | 31.142857 | 84 | 0.745413 |
794022ac5116d3c5a1b194d33516876384f2375c | 77,618 | py | Python | rasa/shared/core/domain.py | alexyuwen/rasa | cf04a71c980675db9968a79bb8900c96c70cc78c | [
"Apache-2.0"
] | 1 | 2021-04-29T18:21:20.000Z | 2021-04-29T18:21:20.000Z | rasa/shared/core/domain.py | alexyuwen/rasa | cf04a71c980675db9968a79bb8900c96c70cc78c | [
"Apache-2.0"
] | null | null | null | rasa/shared/core/domain.py | alexyuwen/rasa | cf04a71c980675db9968a79bb8900c96c70cc78c | [
"Apache-2.0"
] | 1 | 2021-04-29T18:27:46.000Z | 2021-04-29T18:27:46.000Z | import copy
import collections
import json
import logging
import os
from enum import Enum
from pathlib import Path
from typing import (
Any,
Dict,
List,
NamedTuple,
NoReturn,
Optional,
Set,
Text,
Tuple,
Union,
TYPE_CHECKING,
Iterable,
)
from rasa.shared.constants import ... | 39.844969 | 171 | 0.613131 |
794024b3a013e6bf20a0116927ca83547f33eb65 | 137 | py | Python | examples/debugging/error.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 694 | 2018-11-30T01:06:30.000Z | 2022-03-31T14:46:26.000Z | examples/debugging/error.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 323 | 2018-11-05T17:44:34.000Z | 2022-03-31T16:56:41.000Z | examples/debugging/error.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | 68 | 2019-04-01T04:24:47.000Z | 2022-02-24T17:22:04.000Z | """Illustrates an error that can be debugged using post mortem debugging."""
print("hello")
foo = 123
zero = 0
foo / zero
print("done")
| 17.125 | 76 | 0.70073 |
794024c4af2ec20e845f0d9d227bc2cd8c798cda | 3,272 | py | Python | tools/mkatlas.py | ChenThread/fromage | 0feec3fd17a67da4de9fbcb34c77da4ef6d24211 | [
"Zlib"
] | 54 | 2017-11-19T00:42:58.000Z | 2022-03-07T21:45:04.000Z | tools/mkatlas.py | ChenThread/fromage | 0feec3fd17a67da4de9fbcb34c77da4ef6d24211 | [
"Zlib"
] | 2 | 2020-03-25T02:32:49.000Z | 2021-12-05T19:35:26.000Z | tools/mkatlas.py | ChenThread/fromage | 0feec3fd17a67da4de9fbcb34c77da4ef6d24211 | [
"Zlib"
] | 9 | 2017-11-19T14:40:57.000Z | 2022-01-10T05:04:12.000Z | import sys, struct
import numpy as np
import scipy.cluster.vq as vq
from PIL import Image, ImageOps, ImageColor
im = Image.open(sys.argv[1])
fp = open(sys.argv[2], "wb")
clut = [None] * 256
single_pixel_colors = [None] * 256
imgdata = [None] * (256*256)
imgwidth = 256
mipmap_levels = 4
def draw_4bit(im, ix, iy, iw, i... | 32.078431 | 85 | 0.627139 |
794025019423ba8528ac7801e16f4532f255a79d | 2,686 | py | Python | bionlp/evaluate/postprocess.py | abhyudaynj/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 191 | 2016-08-19T08:20:59.000Z | 2021-09-07T09:42:00.000Z | bionlp/evaluate/postprocess.py | gabrielStanovsky/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 3 | 2017-02-17T06:01:19.000Z | 2020-05-05T13:33:02.000Z | bionlp/evaluate/postprocess.py | gabrielStanovsky/LSTM-CRF-models | a29780c24f19512177bcec837bc06ea839e8108c | [
"MIT"
] | 69 | 2016-09-28T10:10:22.000Z | 2021-05-18T09:37:51.000Z | import pickle, sys, random,logging,os,json
from operator import itemgetter
logger=logging.getLogger(__name__)
IGNORE_TAG='None'
def prepare_document_report(o,l,p,encoded_documents,output_dir):
logger.info('Preparing the documents reports with the IGNORE_TAG = \'{0}\' ( This is case sensitive)'.format(IGNORE_TAG))
... | 47.122807 | 164 | 0.605733 |
794025492dc046c980c7d6a1696cf7c753b657d0 | 7,486 | py | Python | Sketches/MH/MobileReframe/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/MH/MobileReframe/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/MH/MobileReframe/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | 34.497696 | 97 | 0.637991 |
7940255f38d8b4d03577f0a5891a7e03e07f7bf2 | 5,007 | py | Python | molecule/scenario.py | RuriRyan/molecule | 952552a807e5c3873e39d181cb12565a1db4008d | [
"MIT"
] | 1 | 2020-11-05T18:12:36.000Z | 2020-11-05T18:12:36.000Z | molecule/scenario.py | RuriRyan/molecule | 952552a807e5c3873e39d181cb12565a1db4008d | [
"MIT"
] | 8 | 2020-09-16T07:32:49.000Z | 2020-09-20T15:17:32.000Z | molecule/scenario.py | RuriRyan/molecule | 952552a807e5c3873e39d181cb12565a1db4008d | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2017 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 28.129213 | 79 | 0.632115 |
79402561fde5e6e7c76111aeffaa5c2a9f1f4c37 | 68,497 | py | Python | pysc2/lib/features.py | AdamSchunk/pysc2 | c793aeb3a9bf70ffa9880205018a21d5c29b9582 | [
"Apache-2.0"
] | 1 | 2019-09-20T05:22:56.000Z | 2019-09-20T05:22:56.000Z | pysc2/lib/features.py | AdamSchunk/pysc2 | c793aeb3a9bf70ffa9880205018a21d5c29b9582 | [
"Apache-2.0"
] | null | null | null | pysc2/lib/features.py | AdamSchunk/pysc2 | c793aeb3a9bf70ffa9880205018a21d5c29b9582 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 36.68827 | 97 | 0.661971 |
794026175d8d4cf4400493492e2a55a96dc0b38f | 639 | py | Python | Q069.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q069.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q069.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | """
069
sqrt(x)
easy
Given a non-negative integer x, compute and return the square root of x.
Since the return type is an integer, the decimal digits are truncated,
and only the integer part of the result is returned.
"""
class Solution:
def mySqrt(self, x: int) -> int:
l = 0
r = x
whil... | 15.585366 | 72 | 0.466354 |
7940274c7ca37fbcfc1fd714a6a0bce0a9a093f9 | 1,053 | py | Python | roma/via/library/__init__.py | WilliamRo/roma | c23e6717b791dfbbb1b76d0a765f5814d92f8b1b | [
"Apache-2.0"
] | 2 | 2020-11-17T13:29:21.000Z | 2021-09-08T13:29:08.000Z | roma/via/library/__init__.py | WilliamRo/roma | c23e6717b791dfbbb1b76d0a765f5814d92f8b1b | [
"Apache-2.0"
] | null | null | null | roma/via/library/__init__.py | WilliamRo/roma | c23e6717b791dfbbb1b76d0a765f5814d92f8b1b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 William Ro. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 27.710526 | 80 | 0.687559 |
79402936ee8c57ef0f611a9d88693dd7d9f2c397 | 29 | py | Python | db/search/resolvers/__init__.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 1 | 2022-03-03T09:55:57.000Z | 2022-03-03T09:55:57.000Z | db/search/resolvers/__init__.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 7 | 2022-02-09T10:44:53.000Z | 2022-03-28T03:29:43.000Z | db/search/resolvers/__init__.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | null | null | null | from .hit import HitResolver
| 14.5 | 28 | 0.827586 |
794029627bdef95beb5ef63ccf63f95b93492e2a | 1,722 | py | Python | src/helloworldservice/app.py | brymck/brymck-io-old | 436e0104fbb25e4ef2d74184632c96af52bdd0b7 | [
"MIT"
] | null | null | null | src/helloworldservice/app.py | brymck/brymck-io-old | 436e0104fbb25e4ef2d74184632c96af52bdd0b7 | [
"MIT"
] | 7 | 2020-09-06T07:23:27.000Z | 2022-02-26T14:41:46.000Z | src/helloworldservice/app.py | brymck/brymck-io-old | 436e0104fbb25e4ef2d74184632c96af52bdd0b7 | [
"MIT"
] | null | null | null | import os
import time
from concurrent.futures import ThreadPoolExecutor
import grpc
from opencensus.trace.exporters.stackdriver_exporter import StackdriverExporter
from opencensus.trace.ext.grpc.server_interceptor import OpenCensusServerInterceptor
from opencensus.trace.samplers.always_on import AlwaysOnSampler
impor... | 28.229508 | 84 | 0.753194 |
79402a43b667587b869016d60580e9257801956a | 2,393 | py | Python | streamdeck_ui/display/filter.py | WMRamadan/streamdeck-ui | e366752af183bfb02a7d3d95d900cdd2190ad4bc | [
"MIT"
] | null | null | null | streamdeck_ui/display/filter.py | WMRamadan/streamdeck-ui | e366752af183bfb02a7d3d95d900cdd2190ad4bc | [
"MIT"
] | null | null | null | streamdeck_ui/display/filter.py | WMRamadan/streamdeck-ui | e366752af183bfb02a7d3d95d900cdd2190ad4bc | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from fractions import Fraction
from typing import Callable, Tuple
from PIL import Image
class Filter(ABC):
"""
A filter transforms a given input image to the desired output image. A filter can signal that it
is complete and will be removed from the pipeline.
:para... | 39.883333 | 168 | 0.691601 |
79402be215be1cf4e27544179de1b332e6d90875 | 50,017 | py | Python | napari/layers/points/_tests/test_points.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | 1 | 2021-04-24T10:10:54.000Z | 2021-04-24T10:10:54.000Z | napari/layers/points/_tests/test_points.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | 2 | 2021-05-17T02:15:08.000Z | 2022-03-12T21:19:52.000Z | napari/layers/points/_tests/test_points.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | null | null | null | from copy import copy
from itertools import cycle, islice
import numpy as np
import pandas as pd
import pytest
from vispy.color import get_colormap
from napari._tests.utils import check_layer_world_data_extent
from napari.layers import Points
from napari.layers.points._points_utils import points_to_squares
from napar... | 32.227448 | 82 | 0.655417 |
79402c8f2c493f51569912048672b73d3c2685d8 | 15,527 | py | Python | tests/rule_based_profiler/test_rule_based_profiler.py | alecsaunders/great_expectations | 4227c970fd93cd66a9ad3b8ee5cd5e09763a4432 | [
"Apache-2.0"
] | 1 | 2022-01-26T18:51:29.000Z | 2022-01-26T18:51:29.000Z | tests/rule_based_profiler/test_rule_based_profiler.py | taylorfturner/great_expectations | e4964894fb97b933cac713ef1f1a78e33d362ff3 | [
"Apache-2.0"
] | null | null | null | tests/rule_based_profiler/test_rule_based_profiler.py | taylorfturner/great_expectations | e4964894fb97b933cac713ef1f1a78e33d362ff3 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List, Optional
from great_expectations.rule_based_profiler.rule import Rule
from great_expectations.rule_based_profiler.types import ParameterContainer
from great_expectations.util import deep_filter_properties_iterable
def test_reconcile_profiler_variables_no_overrides(
profiler_wi... | 35.859122 | 110 | 0.563792 |
79402d1e3c4809c51b24717a4eae769068710ba9 | 11,693 | py | Python | code/python/FactSetEstimatesReportBuilder/v1/fds/sdk/FactSetEstimatesReportBuilder/model/response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/FactSetEstimatesReportBuilder/v1/fds/sdk/FactSetEstimatesReportBuilder/model/response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/FactSetEstimatesReportBuilder/v1/fds/sdk/FactSetEstimatesReportBuilder/model/response.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
FactSet Estimates Report Builder
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
... | 43.958647 | 148 | 0.573933 |
79402d84de98eca47b8029ac8673db95142db1b4 | 9,174 | py | Python | custom/icds/location_reassignment/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | null | null | null | custom/icds/location_reassignment/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | custom/icds/location_reassignment/tasks.py | EXTREMOPHILARUM/commcare-hq | b97aa9095615d0c3c5f259db67ad9438afa3d7a5 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.core.mail.message import EmailMessage
from django.template.defaultfilters import linebreaksbr
from celery.task import task
from corehq.apps.userreports.data_source_providers import (
DynamicDataSourceProvider,
StaticDataSourceProvider,
)
from corehq.apps.userreport... | 39.714286 | 112 | 0.661216 |
79402e673c97f0039cfca5d72a689081da629e19 | 421 | py | Python | website_project_django/asgi.py | jakubpliszka/website_project | de6925253fe5397b584086f1b9acc86532301d68 | [
"MIT"
] | null | null | null | website_project_django/asgi.py | jakubpliszka/website_project | de6925253fe5397b584086f1b9acc86532301d68 | [
"MIT"
] | null | null | null | website_project_django/asgi.py | jakubpliszka/website_project | de6925253fe5397b584086f1b9acc86532301d68 | [
"MIT"
] | null | null | null | """
ASGI config for website_project_django project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefaul... | 24.764706 | 82 | 0.800475 |
79402ebbe8de733badba628aa22a4eba7cbed942 | 1,357 | py | Python | models/segtran_modified/code/networks/deformable_unet/unet.py | indigoYoshimaru/3d-brain-thesis | bc6fd5e85e7e8e88c5a3cccafad098c7f3d7586a | [
"MIT"
] | null | null | null | models/segtran_modified/code/networks/deformable_unet/unet.py | indigoYoshimaru/3d-brain-thesis | bc6fd5e85e7e8e88c5a3cccafad098c7f3d7586a | [
"MIT"
] | null | null | null | models/segtran_modified/code/networks/deformable_unet/unet.py | indigoYoshimaru/3d-brain-thesis | bc6fd5e85e7e8e88c5a3cccafad098c7f3d7586a | [
"MIT"
] | null | null | null | from .unet_parts import *
class UNet(nn.Module):
def __init__(self, n_channels, n_classes,downsize_nb_filters_factor=2):
super(UNet, self).__init__()
self.inc = inconv(n_channels, 64//downsize_nb_filters_factor)
self.down1 = down(64//downsize_nb_filters_factor, 128//downsize_nb_filters_fac... | 45.233333 | 91 | 0.680177 |
79402f67d726666a7886a4432d048dc5871e3935 | 42 | py | Python | blossom/learners/__init__.py | phanxuanphucnd/Blossom | e589c2b16c8d5742cec724f1ec1c04bf10c81eef | [
"MIT"
] | 3 | 2021-06-12T20:01:26.000Z | 2021-09-24T08:13:26.000Z | blossom/learners/__init__.py | Arizona-Voice/blossom | 02aedadaeb20fab183ef2bb3e84e2cace4c92f96 | [
"MIT"
] | null | null | null | blossom/learners/__init__.py | Arizona-Voice/blossom | 02aedadaeb20fab183ef2bb3e84e2cace4c92f96 | [
"MIT"
] | null | null | null | from .mhatt_learner import MHAttKWSLearner | 42 | 42 | 0.904762 |
794030d322af122f4be78c5c70c8766736a9825c | 2,581 | py | Python | Geog5222/indexing/pm2quadtree.py | thejayhaykid/Python | 641c33b94762f0cace203dcf4cc121571625ab02 | [
"MIT"
] | null | null | null | Geog5222/indexing/pm2quadtree.py | thejayhaykid/Python | 641c33b94762f0cace203dcf4cc121571625ab02 | [
"MIT"
] | null | null | null | Geog5222/indexing/pm2quadtree.py | thejayhaykid/Python | 641c33b94762f0cace203dcf4cc121571625ab02 | [
"MIT"
] | null | null | null | from xdcel import *
from pmquadtree import *
import pickle
def split_by_edges_pm2(edges, pmq):
subedges = []
for e in edges:
if is_intersect(pmq.extent, e):
subedges.append(e)
elif pmq.extent.contains(e.fr) and\
pmq.extent.contains(e.to):
subedges.append(e)
i... | 30.364706 | 57 | 0.528477 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.