hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fe71193921113acb993f1583b9800b88eaf704d9 | 225 | py | Python | corehq/apps/case_search/migrations/0005_migrate_json_config.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/apps/case_search/migrations/0005_migrate_json_config.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/apps/case_search/migrations/0005_migrate_json_config.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | # Generated by Django 1.10.7 on 2017-05-18 19:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('case_search', '0004_auto_20170518_2018'),
]
operations = []
| 17.307692 | 51 | 0.675556 |
17e1863a573626d654f0eac9ac4af458bfb949cd | 620 | py | Python | JogoAsteroide/Asteroide.py | CarlosHenrique13/Python | a047315627574ae84812797fac5da4acce2c30a6 | [
"MIT"
] | 1 | 2020-12-12T13:02:30.000Z | 2020-12-12T13:02:30.000Z | JogoAsteroide/Asteroide.py | CarlosHenrique13/Python | a047315627574ae84812797fac5da4acce2c30a6 | [
"MIT"
] | null | null | null | JogoAsteroide/Asteroide.py | CarlosHenrique13/Python | a047315627574ae84812797fac5da4acce2c30a6 | [
"MIT"
] | null | null | null | import pygame
import math
import random
class Asteroide(pygame.sprite.Sprite):
def __init__(self, *groups):
super().__init__(*groups)
self.image = pygame.image.load("data/contro.png") # 32x32
self.image = pygame.transform.scale(self.image, [100, 100])
self.rect = pygame.Rect(50, ... | 25.833333 | 67 | 0.590323 |
535351e6563a0a05f8a2a9ce03f6d8dd7e87abca | 10,736 | py | Python | tensorflow/python/distribute/values_util.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 1 | 2020-08-09T21:50:17.000Z | 2020-08-09T21:50:17.000Z | tensorflow/python/distribute/values_util.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 3 | 2021-08-25T16:13:38.000Z | 2022-02-10T02:04:06.000Z | tensorflow/python/distribute/values_util.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 1 | 2021-11-07T12:48:44.000Z | 2021-11-07T12:48:44.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.04 | 115 | 0.719262 |
549fbdca41d37df9370fa4ff0d62132c6b789848 | 13,780 | py | Python | pyqg/tests/test_model.py | dante831/pyqg | a8e1eb957d1c3a7fd72b362169e84d5889420268 | [
"MIT"
] | null | null | null | pyqg/tests/test_model.py | dante831/pyqg | a8e1eb957d1c3a7fd72b362169e84d5889420268 | [
"MIT"
] | null | null | null | pyqg/tests/test_model.py | dante831/pyqg | a8e1eb957d1c3a7fd72b362169e84d5889420268 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import pyqg
import pytest
class PyqgModelTester(unittest.TestCase):
def setUp(self):
# need to eliminate beta and U for tests
self.m = pyqg.QGModel(beta=0., U1=0., U2=0., filterfac=0.)
# the maximum wavelengths to use in tests
# if we go to higher... | 39.82659 | 92 | 0.556894 |
7185799a817f8ea49308fbad46c09df7a190904c | 1,219 | py | Python | tests/toolkit/test_transfer_config.py | KamilPiechowiak/iatransfer | d7607662a2d2f7d1a16164c813e8721a0563552b | [
"Apache-2.0"
] | 4 | 2021-02-05T01:51:57.000Z | 2022-01-11T13:59:33.000Z | tests/toolkit/test_transfer_config.py | KamilPiechowiak/iatransfer | d7607662a2d2f7d1a16164c813e8721a0563552b | [
"Apache-2.0"
] | 3 | 2021-02-05T20:05:05.000Z | 2021-02-05T20:05:33.000Z | tests/toolkit/test_transfer_config.py | KamilPiechowiak/iatransfer | d7607662a2d2f7d1a16164c813e8721a0563552b | [
"Apache-2.0"
] | null | null | null | import unittest
from typing import List, Dict
import timm
from iatransfer.research.transfer.utils import get_transfer_method_name
from iatransfer.toolkit import IAT
from iatransfer.utils.file_utils import read_json
class TransferConfigTest(unittest.TestCase):
def transfer(self, models: List[Dict], methods: Lis... | 40.633333 | 89 | 0.648072 |
d30aa6e40ff843e2720824f1527e8b176dff8266 | 8,012 | py | Python | torchreid/models/shufflenetv2.py | mangye16/deep-person-reid | 42eaccea712c3ebcc5273085a3cfea400a4783b8 | [
"MIT"
] | 2 | 2021-05-05T09:17:46.000Z | 2021-08-29T15:16:43.000Z | torchreid/models/shufflenetv2.py | mangye16/deep-person-reid | 42eaccea712c3ebcc5273085a3cfea400a4783b8 | [
"MIT"
] | null | null | null | torchreid/models/shufflenetv2.py | mangye16/deep-person-reid | 42eaccea712c3ebcc5273085a3cfea400a4783b8 | [
"MIT"
] | null | null | null | """
Code source: https://github.com/pytorch/vision
"""
from __future__ import division, absolute_import
import torch
import torch.utils.model_zoo as model_zoo
from torch import nn
__all__ = [
'shufflenet_v2_x0_5', 'shufflenet_v2_x1_0', 'shufflenet_v2_x1_5',
'shufflenet_v2_x2_0'
]
model_urls = {
'shufflene... | 30.348485 | 103 | 0.578133 |
33dc165cc73244e74241403fd0480081a2289b62 | 1,907 | py | Python | pylark/api_service_helpdesk_start_service.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | 7 | 2021-08-18T00:42:05.000Z | 2022-03-14T09:49:15.000Z | pylark/api_service_helpdesk_start_service.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | null | null | null | pylark/api_service_helpdesk_start_service.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | 1 | 2022-03-14T09:49:20.000Z | 2022-03-14T09:49:20.000Z | # Code generated by lark_sdk_gen. DO NOT EDIT.
from pylark.lark_request import RawRequestReq, _new_method_option
from pylark import lark_type, lark_type_sheet, lark_type_approval
import attr
import typing
import io
@attr.s
class StartHelpdeskServiceReq(object):
human_service: bool = attr.ib(
default=None... | 42.377778 | 188 | 0.709491 |
4d1a65309fc7f3d29e0fe8dfb636d3023ef40517 | 31,200 | py | Python | tests/unit/test_image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | tests/unit/test_image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | tests/unit/test_image.py | jbarz1/sagemaker-python-sdk | a7399455f5386d83ddc5cb15c0db00c04bd518ec | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 37.320574 | 102 | 0.676795 |
c0239276466fdc0750451f2bc88accba7c7d277c | 202 | py | Python | multilog/__init__.py | tjlaboss/multilog | 0b4ed593a842b27f49cebdb003f055188bb05b64 | [
"MIT"
] | null | null | null | multilog/__init__.py | tjlaboss/multilog | 0b4ed593a842b27f49cebdb003f055188bb05b64 | [
"MIT"
] | 4 | 2021-07-17T14:14:43.000Z | 2022-03-24T16:42:42.000Z | multilog/__init__.py | tjlaboss/multilog | 0b4ed593a842b27f49cebdb003f055188bb05b64 | [
"MIT"
] | null | null | null | __version_info__ = (0, 0, 1)
__version__ = ".".join([str(x) for x in __version_info__])
__author__ = "Travis J. Labossiere-Hickman (@tjlaboss)"
from . import processor
from .processor import Processor
| 28.857143 | 58 | 0.737624 |
ec7f2953af47075b94bac6dbf21e28ffc68da0a4 | 13,492 | py | Python | bert_tsim/extract_feature.py | sliderSun/bert | c9e16d652f85398fbb6ca6aea72f11f82166c672 | [
"Apache-2.0"
] | 84 | 2018-12-24T03:20:07.000Z | 2021-11-09T08:38:38.000Z | extract_feature.py | YL1113/bert-utils | a066214e9cbd3ff5cc905f94c7354189d986a1fd | [
"Apache-2.0"
] | 3 | 2020-06-16T10:12:50.000Z | 2021-04-08T09:41:35.000Z | extract_feature.py | YL1113/bert-utils | a066214e9cbd3ff5cc905f94c7354189d986a1fd | [
"Apache-2.0"
] | 39 | 2019-02-14T09:45:17.000Z | 2021-12-11T02:32:09.000Z | import modeling
import tokenization
from graph import optimize_graph
import args
from queue import Queue
from threading import Thread
import tensorflow as tf
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
class InputExample(object):
def __init__(self, unique_id, text_a, text_b):
self.unique_id = uni... | 39.79941 | 123 | 0.570486 |
e45e69f6953d68c55cbdd4ca4334a6c2412ed72d | 1,840 | py | Python | TWSelection-SD.py | mbafrani/TimeWindowSelection | 49bfec38e4b2dd9e4e33a5ad6f7d42065eee0c83 | [
"MIT"
] | null | null | null | TWSelection-SD.py | mbafrani/TimeWindowSelection | 49bfec38e4b2dd9e4e33a5ad6f7d42065eee0c83 | [
"MIT"
] | null | null | null | TWSelection-SD.py | mbafrani/TimeWindowSelection | 49bfec38e4b2dd9e4e33a5ad6f7d42065eee0c83 | [
"MIT"
] | null | null | null | import pandas as pd
from SDLogGeneration import SDLogGeneration
from TWSelection import TWSelection
# Sample step for the time window selection appraoch
if __name__=="__main__":
tws = TWSelection()
sdgen = SDLogGeneration()
tw_result=""
event_log= "event_log.csv"
event_log = pd.read_csv(event_log)... | 44.878049 | 123 | 0.692391 |
9a7578813e4c6c75ed5bbf025502da7c7419a005 | 539 | py | Python | app.py | stuartornum/docker-uwsgi-headers | 109a5b6d6fd28a69d146d112def0912c782711a4 | [
"Apache-2.0"
] | null | null | null | app.py | stuartornum/docker-uwsgi-headers | 109a5b6d6fd28a69d146d112def0912c782711a4 | [
"Apache-2.0"
] | null | null | null | app.py | stuartornum/docker-uwsgi-headers | 109a5b6d6fd28a69d146d112def0912c782711a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import bottle
from bottle import request
app = application = bottle.Bottle()
@app.route('/test')
def show_index():
return str(request.environ)
class StripPathMiddleware(object):
'''
Get that slash out of the request
'''
def __init__(self, a):
self.a = a
def ... | 17.387097 | 51 | 0.606679 |
2cab6a1da9dce5699ec4d2d037aef90a538c2fb5 | 12,489 | py | Python | marge/app.py | groq/marge-bot | 8eed64ef595d3699528b6084be50d916e2f971b0 | [
"BSD-3-Clause"
] | null | null | null | marge/app.py | groq/marge-bot | 8eed64ef595d3699528b6084be50d916e2f971b0 | [
"BSD-3-Clause"
] | null | null | null | marge/app.py | groq/marge-bot | 8eed64ef595d3699528b6084be50d916e2f971b0 | [
"BSD-3-Clause"
] | 3 | 2021-02-19T18:40:12.000Z | 2021-10-01T22:12:34.000Z | """
An auto-merger of merge requests for GitLab
"""
import contextlib
import logging
import logging.handlers
import os
import pwd
import re
import signal
import sys
import tempfile
import time
from datetime import timedelta
import configargparse
from . import bot
from . import error
from . import gitlab
from . impor... | 35.7851 | 109 | 0.617583 |
06386624d81eebf11f8456d67730a10f9d448cbb | 390 | py | Python | test/test_add_contact2.py | LesyaLeontyeva/python_training | 869a5e3f7e8113024752b36c911deb352ca9b98e | [
"Apache-2.0"
] | null | null | null | test/test_add_contact2.py | LesyaLeontyeva/python_training | 869a5e3f7e8113024752b36c911deb352ca9b98e | [
"Apache-2.0"
] | null | null | null | test/test_add_contact2.py | LesyaLeontyeva/python_training | 869a5e3f7e8113024752b36c911deb352ca9b98e | [
"Apache-2.0"
] | null | null | null | from model.contact2 import Contact2
def test_add_contact(app,db,json_contacts):
contact2 = json_contacts
old_contacts = db.get_contact_list()
app.contact.create(contact2)
new_contacts = db.get_contact_list()
old_contacts.append(contact2)
assert sorted(old_contacts, key=... | 30 | 107 | 0.720513 |
3f220d072d623d54ee769b561ee7e88a4270e8da | 5,802 | py | Python | satchmo/apps/payment/config.py | jtslade/satchmo-svn | a9d791342ac6c5712de55c26ea4780057e27d452 | [
"BSD-3-Clause"
] | 1 | 2016-05-09T08:15:33.000Z | 2016-05-09T08:15:33.000Z | satchmo/apps/payment/config.py | jtslade/satchmo-svn | a9d791342ac6c5712de55c26ea4780057e27d452 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/payment/config.py | jtslade/satchmo-svn | a9d791342ac6c5712de55c26ea4780057e27d452 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.utils.translation import ugettext_lazy, ugettext
from livesettings import *
from satchmo_store.shop import get_satchmo_setting
from satchmo_utils import is_string_like, load_module
import logging
import signals
_ = ugettext_lazy
log = logging.getLogger('payment.config')
P... | 34.742515 | 212 | 0.668046 |
4a9e1e26170df37c73221d3e53c949050bf47db7 | 1,809 | py | Python | tests/resources/test_measurement_run.py | shenganzhang/citrine-python | 43bde84024b32a5efd4ba3fe58532fb2188438f4 | [
"Apache-2.0"
] | 23 | 2019-11-01T23:52:53.000Z | 2022-03-12T23:51:42.000Z | tests/resources/test_measurement_run.py | shenganzhang/citrine-python | 43bde84024b32a5efd4ba3fe58532fb2188438f4 | [
"Apache-2.0"
] | 289 | 2019-09-09T22:48:32.000Z | 2022-03-25T16:56:03.000Z | tests/resources/test_measurement_run.py | shenganzhang/citrine-python | 43bde84024b32a5efd4ba3fe58532fb2188438f4 | [
"Apache-2.0"
] | 8 | 2019-10-30T18:51:26.000Z | 2021-10-06T03:36:34.000Z | from uuid import UUID
import pytest
from citrine.resources.measurement_run import MeasurementRunCollection
from tests.resources.test_data_concepts import run_noop_gemd_relation_search_test
from tests.utils.session import FakeSession
@pytest.fixture
def session() -> FakeSession:
return FakeSession()
@pytest.fi... | 30.661017 | 105 | 0.733554 |
e37100a6b8bde31413ec3e354ba94c26a5ec1653 | 3,495 | py | Python | cms/forms/utils.py | ScholzVolkmer/django-cms-old | 5641181e793ed3c833dd310fc3cc49c3660e548d | [
"BSD-3-Clause"
] | 1 | 2016-11-03T09:34:09.000Z | 2016-11-03T09:34:09.000Z | cms/forms/utils.py | ScholzVolkmer/django-cms-old | 5641181e793ed3c833dd310fc3cc49c3660e548d | [
"BSD-3-Clause"
] | null | null | null | cms/forms/utils.py | ScholzVolkmer/django-cms-old | 5641181e793ed3c833dd310fc3cc49c3660e548d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from cms.models import Page
from cms.models.titlemodels import Title
from cms.utils import i18n
from collections import defaultdict
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.db.models.signals import post_save, po... | 36.40625 | 77 | 0.713305 |
1ad39c17887026d9dc9ac316632aa3086622abe9 | 322 | py | Python | example/sampleapp/admin.py | s-a-s-forks/django-cms | 697a0b01eb5f931b9026d6f7c00d5608cc23f2c8 | [
"BSD-3-Clause"
] | null | null | null | example/sampleapp/admin.py | s-a-s-forks/django-cms | 697a0b01eb5f931b9026d6f7c00d5608cc23f2c8 | [
"BSD-3-Clause"
] | null | null | null | example/sampleapp/admin.py | s-a-s-forks/django-cms | 697a0b01eb5f931b9026d6f7c00d5608cc23f2c8 | [
"BSD-3-Clause"
] | 1 | 2019-02-13T06:24:02.000Z | 2019-02-13T06:24:02.000Z | from django.contrib import admin
from example.sampleapp.models import Picture, Category
from cms.admin.placeholderadmin import PlaceholderAdmin
class PictureInline(admin.StackedInline):
model = Picture
class CategoryAdmin(PlaceholderAdmin):
inlines = [PictureInline]
admin.site.register(Category, CategoryAdmi... | 29.272727 | 55 | 0.822981 |
16eba4e6d638bd386dc64d1c1830eb0bcdb7353c | 376 | py | Python | modules/gmailSPAMMER.py | Jose-30/PyEmailSpamer | 0fb0635580437e0774dbb2e071cf01bd9d4bbe94 | [
"MIT"
] | null | null | null | modules/gmailSPAMMER.py | Jose-30/PyEmailSpamer | 0fb0635580437e0774dbb2e071cf01bd9d4bbe94 | [
"MIT"
] | null | null | null | modules/gmailSPAMMER.py | Jose-30/PyEmailSpamer | 0fb0635580437e0774dbb2e071cf01bd9d4bbe94 | [
"MIT"
] | null | null | null | import smtplib
class Gmail:
def __init__(self, username, password):
self.username = username
self.password = password
def send(self, to, content):
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(self.username, self.password)
server.se... | 28.923077 | 52 | 0.638298 |
4cd35008d8afda5b5566f022d8e3660004090fdc | 43 | py | Python | python/testData/psi/MatMul.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/psi/MatMul.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/psi/MatMul.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | x @ y
x @ y @ z
x @ y * z
x + y @ z
z @= x
| 7.166667 | 9 | 0.302326 |
b6530f07e512c1725c57eb77b138e2bfd2899516 | 4,248 | py | Python | desktop/core/src/desktop/lib/django_test_util.py | sbaudoin/hue | 55c125f389915b23608c825a98ca2e41b702f32a | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/lib/django_test_util.py | sbaudoin/hue | 55c125f389915b23608c825a98ca2e41b702f32a | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/lib/django_test_util.py | sbaudoin/hue | 55c125f389915b23608c825a98ca2e41b702f32a | [
"Apache-2.0"
] | 1 | 2020-04-02T04:50:26.000Z | 2020-04-02T04:50:26.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 30.561151 | 111 | 0.728814 |
d5e07b3d6020a1a5521220766d7bcdc8fe264271 | 274 | py | Python | python_settings/exceptions.py | fsboehme/python-settings | 71a4388a983f5cf88ef3223877427260dde98d9c | [
"MIT"
] | 7 | 2019-05-01T20:08:57.000Z | 2022-01-20T09:42:28.000Z | python_settings/exceptions.py | fsboehme/python-settings | 71a4388a983f5cf88ef3223877427260dde98d9c | [
"MIT"
] | 1 | 2020-05-07T18:35:45.000Z | 2020-05-09T19:54:26.000Z | python_settings/exceptions.py | fsboehme/python-settings | 71a4388a983f5cf88ef3223877427260dde98d9c | [
"MIT"
] | 3 | 2020-05-07T14:50:33.000Z | 2021-11-25T15:02:24.000Z | class ImproperlyConfigured(Exception):
"""
Something in the settings was not properly configured
"""
class LazyInitializationImproperlyConfigured(ImproperlyConfigured):
"""
Something in the LazySetting instantiation was not properly configured
"""
| 24.909091 | 74 | 0.748175 |
3eda5c20662895c4d5602b7b1c4c6db65b148872 | 1,146 | py | Python | examples/betterme/pkulaw_crawler.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | 3 | 2020-12-03T07:30:02.000Z | 2021-02-07T13:37:33.000Z | examples/betterme/pkulaw_crawler.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | null | null | null | examples/betterme/pkulaw_crawler.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | 1 | 2021-02-07T13:37:38.000Z | 2021-02-07T13:37:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : MeUtils.
# @File : pkulaw_crawler
# @Time : 2021/9/1 上午11:30
# @Author : yuanjie
# @WeChat : 313303303
# @Software : PyCharm
# @Description :
from meutils.date_utils import date_difference
from meutils.request_utils.xpath... | 36.967742 | 110 | 0.642234 |
003be4cf76cc18b632d870e29f6b788bb6da89d5 | 2,043 | py | Python | rich/scope.py | clintonc/rich | 62c444806ecafd1a5813e7fb1a9d29e158455764 | [
"MIT"
] | null | null | null | rich/scope.py | clintonc/rich | 62c444806ecafd1a5813e7fb1a9d29e158455764 | [
"MIT"
] | null | null | null | rich/scope.py | clintonc/rich | 62c444806ecafd1a5813e7fb1a9d29e158455764 | [
"MIT"
] | null | null | null | from typing import Any, Tuple, TYPE_CHECKING
from collections.abc import Mapping
from .highlighter import ReprHighlighter
from .panel import Panel
from .pretty import Pretty
from .text import Text
from .table import Table
if TYPE_CHECKING:
from .console import ConsoleRenderable
def render_scope(
scope: Ma... | 30.492537 | 81 | 0.632403 |
d752aee85546fe780f02c491376a3cac1c360afe | 690 | py | Python | src/2/splitting_strings_on_any_of_multiple_delimiters/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/2/splitting_strings_on_any_of_multiple_delimiters/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/2/splitting_strings_on_any_of_multiple_delimiters/example.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | # example.py
#
# Example of splitting a string on multiple delimiters using a regex
import re
line = 'asdf fjdk; afed, fjek,asdf, foo'
# (a) Splitting on space, comma, and semicolon
parts = re.split(r'[;,\s]\s*', line)
print(parts)
# (b) Splitting with a capture group
fields = re.split(r'(;|,|\s)\s*', line)
pr... | 23 | 68 | 0.668116 |
921fb6484e92ff0e3205e6f25fb26bf217206169 | 461 | py | Python | src/test/test_proj/run.py | Gzah92/vunit-test-explorer | 30f82209de10418497c8c02634d98e91842e7d8e | [
"MIT"
] | null | null | null | src/test/test_proj/run.py | Gzah92/vunit-test-explorer | 30f82209de10418497c8c02634d98e91842e7d8e | [
"MIT"
] | null | null | null | src/test/test_proj/run.py | Gzah92/vunit-test-explorer | 30f82209de10418497c8c02634d98e91842e7d8e | [
"MIT"
] | null | null | null | import os
from os.path import join, dirname
from vunit import VUnit
import subprocess
root = dirname(__file__)
vu = VUnit.from_argv()
testlib = vu.add_library("testlib")
testlib.add_source_files(join(root, "vhdl/testlib/*.vhd"))
testlib.test_bench("tb_test1").test("test1").add_config("conf2")
testlib2 = vu.add_libr... | 27.117647 | 67 | 0.763557 |
f2544583f17c6890169b5c362a034e65b25b30b6 | 227 | py | Python | Bioinformatics Stronghold/Completing a Tree.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | Bioinformatics Stronghold/Completing a Tree.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | Bioinformatics Stronghold/Completing a Tree.py | Vinay-Vinod/Rosalind | 6818a38d1378a55e84e9f75636bacce2c274d24c | [
"MIT"
] | null | null | null | data = '''
10
1 2
2 8
4 10
5 9
6 10
7 9
'''
data = list(map(int, data.split()))
new = [[data[0]]]
for i in range(1, len(data), 2):
new.append(data[i:i+2])
start = new[0][0]
edges = new[1:]
print(start - len(edges) - 1)
| 10.809524 | 35 | 0.550661 |
4bbba8ce36959b6d700f6433c95d9765dcdf8cbf | 11,063 | py | Python | tests/cli/test_add.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | null | null | null | tests/cli/test_add.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | null | null | null | tests/cli/test_add.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | null | null | null | import shutil
from pathlib import Path
import pytest
from pdm.cli import actions
from pdm.models.pip_shims import Link
from pdm.models.specifiers import PySpecSet
from tests import FIXTURES
@pytest.mark.usefixtures("repository")
def test_add_package(project, working_set, is_dev):
actions.do_add(project, is_dev,... | 37.124161 | 88 | 0.695019 |
cb9fe6b8adcda6ef44ab2175411bcb641860c08d | 4,898 | py | Python | run.py | carol-wambui/passwordlock | bfa49c6fd30e1b82e547a35b96b7b37229969425 | [
"MIT"
] | null | null | null | run.py | carol-wambui/passwordlock | bfa49c6fd30e1b82e547a35b96b7b37229969425 | [
"MIT"
] | null | null | null | run.py | carol-wambui/passwordlock | bfa49c6fd30e1b82e547a35b96b7b37229969425 | [
"MIT"
] | null | null | null | #!User/bin/ev/python3
from user import Credentials , User
def demand_user(username,password):
createuser = User(username,password)
return createuser
def enter_user (username,password):
save_user = User.user_recognised(username,password)
return save_user
def save_user(user):
user.save_user()
def use... | 36.827068 | 133 | 0.524908 |
35bffb51b91cb506996b288503a3252dfe97fb7f | 10,394 | py | Python | contrib/spendfrom/spendfrom.py | globalsmartasset/globalsmartasset | 88b8ac2c6396299a80d08c3c412035585b52b301 | [
"MIT"
] | 2 | 2021-06-16T18:16:46.000Z | 2021-09-21T11:33:55.000Z | contrib/spendfrom/spendfrom.py | globalsmartasset/globalsmartasset | 88b8ac2c6396299a80d08c3c412035585b52b301 | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | globalsmartasset/globalsmartasset | 88b8ac2c6396299a80d08c3c412035585b52b301 | [
"MIT"
] | 3 | 2019-12-28T17:58:56.000Z | 2021-09-13T17:29:40.000Z | #!/usr/bin/env python
#
# Use the raw transactions API to spend globalsmartassets received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a global... | 38.783582 | 115 | 0.645276 |
66c0db47ecbba95fa7e7b279bbe4ba2951bd237f | 559 | py | Python | SanDiego/course_3/week1/reachability.py | skprpi/Algorithms | 0473f997981f5f981c1c9dd50cf7004dda29eb8a | [
"MIT"
] | null | null | null | SanDiego/course_3/week1/reachability.py | skprpi/Algorithms | 0473f997981f5f981c1c9dd50cf7004dda29eb8a | [
"MIT"
] | null | null | null | SanDiego/course_3/week1/reachability.py | skprpi/Algorithms | 0473f997981f5f981c1c9dd50cf7004dda29eb8a | [
"MIT"
] | null | null | null | count_node, count_edge = map(int, input().split())
node_matrix = [[] for i in range(count_node + 1)]
visited = [False for _ in range(count_node + 1)]
for i in range(count_edge):
x, y = map(int, input().split())
node_matrix[x].append(y)
node_matrix[y].append(x)
start_node, finish_node = map(int, input().spli... | 29.421053 | 51 | 0.640429 |
47076a02f41533d078054a4a63be0ec1823db3d7 | 7,922 | py | Python | SENG474_Kickstarter_Prediction.py | jbarlo/SENG474-Kickstarter-Forecast-Classifier | b7e95a58bbd498f423506f165f4468eb6d604616 | [
"CC0-1.0"
] | null | null | null | SENG474_Kickstarter_Prediction.py | jbarlo/SENG474-Kickstarter-Forecast-Classifier | b7e95a58bbd498f423506f165f4468eb6d604616 | [
"CC0-1.0"
] | null | null | null | SENG474_Kickstarter_Prediction.py | jbarlo/SENG474-Kickstarter-Forecast-Classifier | b7e95a58bbd498f423506f165f4468eb6d604616 | [
"CC0-1.0"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pandas
import math
import sys
import numbers
import argparse
from sklearn.cluster import KMeans
from sklearn.naive_bayes import GaussianNB
from sklearn.preprocessing import LabelEncoder
from sklearn.linear_model import LogisticRegression
from sklearn.svm import ... | 32.467213 | 205 | 0.716864 |
7d1c5a3f4cbca53845b3c7ab3ec3cca42355d169 | 11,655 | py | Python | sdk/python/pulumi_azure_native/vmwarecloudsimple/latest/get_dedicated_cloud_node.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/vmwarecloudsimple/latest/get_dedicated_cloud_node.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/vmwarecloudsimple/latest/get_dedicated_cloud_node.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 38.213115 | 386 | 0.659116 |
5df155605064a8842b754b01095307e0f96301e8 | 1,537 | py | Python | lib/cogs/welcome.py | weibolu-rm/weibolu-bot | 9752cee470f0ce09ea6f14b56e1a5b7da72baf18 | [
"MIT"
] | null | null | null | lib/cogs/welcome.py | weibolu-rm/weibolu-bot | 9752cee470f0ce09ea6f14b56e1a5b7da72baf18 | [
"MIT"
] | 1 | 2020-12-30T04:48:58.000Z | 2020-12-30T04:48:58.000Z | lib/cogs/welcome.py | weibolu-rm/weibolu-bot | 9752cee470f0ce09ea6f14b56e1a5b7da72baf18 | [
"MIT"
] | null | null | null | from discord.ext.commands import Cog, command
from ..db import db
class Welcome(Cog):
def __init__(self, bot):
self.bot = bot
@Cog.listener()
async def on_ready(self):
self.welcome_channel = self.bot.get_channel(757103651000025180)
@Cog.listener()
async def on_member_join(self... | 42.694444 | 131 | 0.677944 |
52f2ac904ebef7a9b2fd819231efc70a6ad9f0a4 | 2,750 | py | Python | src/static.py | InTaVia/grlc | 539e0ee9ace02ebbe8fa82037329e10df252acb5 | [
"MIT"
] | null | null | null | src/static.py | InTaVia/grlc | 539e0ee9ace02ebbe8fa82037329e10df252acb5 | [
"MIT"
] | 1 | 2021-07-10T15:06:29.000Z | 2021-07-12T16:12:07.000Z | src/static.py | InTaVia/grlc | 539e0ee9ace02ebbe8fa82037329e10df252acb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# static.py: static values for the grlc Server
import os
from configparser import ConfigParser
DEFAULT_HOST = None
DEFAULT_PORT = 8088
# XSD datatypes for parsing queries with parameters
XSD_DATATYPES = ["decimal", "float", "double", "integer", "positiveInteger", "negativeInteger", "nonPositive... | 41.666667 | 522 | 0.713455 |
83a54f5dcb0a60751c3760a2db1c5313f1647000 | 621 | py | Python | setup.py | codacy-badger/dMRIParcellation | 4d7a0fd1f99ca8ac236cd3a1b704b86eaad6e2c3 | [
"BSD-3-Clause"
] | 2 | 2017-05-16T15:58:28.000Z | 2017-10-11T01:33:52.000Z | setup.py | codacy-badger/dMRIParcellation | 4d7a0fd1f99ca8ac236cd3a1b704b86eaad6e2c3 | [
"BSD-3-Clause"
] | 2 | 2017-05-16T15:34:39.000Z | 2017-05-24T11:38:10.000Z | setup.py | codacy-badger/dMRIParcellation | 4d7a0fd1f99ca8ac236cd3a1b704b86eaad6e2c3 | [
"BSD-3-Clause"
] | 2 | 2017-05-15T15:49:38.000Z | 2020-03-21T10:48:02.000Z | ''' Setup file '''
from setuptools import setup
def readme():
with open('README.md') as f:
return f.read()
package_name = 'MNNparcellation'
inc_module = package_name + '.inc'
setup(name=package_name,
version='0.1',
description='A tool to parcellate the cortical surface into\
... | 29.571429 | 75 | 0.68599 |
a4717cf7ea629fd5626907a677eaa4348b52ede2 | 45,139 | py | Python | src/transformers/utils/hub.py | aakashb95/transformers | 224bde91caff4ccfd12277ab5e9bf97c61e22ee9 | [
"Apache-2.0"
] | null | null | null | src/transformers/utils/hub.py | aakashb95/transformers | 224bde91caff4ccfd12277ab5e9bf97c61e22ee9 | [
"Apache-2.0"
] | null | null | null | src/transformers/utils/hub.py | aakashb95/transformers | 224bde91caff4ccfd12277ab5e9bf97c61e22ee9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The HuggingFace Team. 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 applicabl... | 41.872913 | 139 | 0.660006 |
b0c2a253aa6aa2398f3060b6ec5ab71269845fc1 | 884 | py | Python | tests/journal/firewall-activation.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | 3 | 2019-08-02T21:02:47.000Z | 2021-09-08T13:59:43.000Z | tests/journal/firewall-activation.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | tests/journal/firewall-activation.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2019 all rights reserved
#
"""
Verify that firewall channels by the same name share a common state
"""
def test():
# access the package
import journal
# build a firewall channel
firewall = journal.firewal... | 19.644444 | 79 | 0.66629 |
cc63c3afe56854d176e64cefd5d021ecadd4f2d6 | 52,867 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons/archimesh/achm_curtain_maker.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons/archimesh/achm_curtain_maker.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons/archimesh/achm_curtain_maker.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 47.41435 | 119 | 0.527494 |
c1eae452b6e8051c44a5919fb5afe10bb228442f | 19,902 | py | Python | efficientdet/dataloader.py | vidalmaxime/automl | c7fe34ccc93ca006d47c80df5476ebd34ee29250 | [
"Apache-2.0"
] | 1 | 2020-11-25T16:43:11.000Z | 2020-11-25T16:43:11.000Z | efficientdet/dataloader.py | GauravKakade/automl | c4fb2f91d82b29c1116908f86a65a74c8836b2e2 | [
"Apache-2.0"
] | null | null | null | efficientdet/dataloader.py | GauravKakade/automl | c4fb2f91d82b29c1116908f86a65a74c8836b2e2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Research. 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... | 43.549234 | 80 | 0.672797 |
8e2c4f104e81560348273bd50b881ed26308a120 | 6,365 | py | Python | carla-kitti/scenario_runner/kitti_format.py | HanjiangHu/Multi-LiDAR-Placement-for-3D-Detection | b80ef987efb49a853bc8efde7438c22ed467dc4d | [
"MIT"
] | null | null | null | carla-kitti/scenario_runner/kitti_format.py | HanjiangHu/Multi-LiDAR-Placement-for-3D-Detection | b80ef987efb49a853bc8efde7438c22ed467dc4d | [
"MIT"
] | null | null | null | carla-kitti/scenario_runner/kitti_format.py | HanjiangHu/Multi-LiDAR-Placement-for-3D-Detection | b80ef987efb49a853bc8efde7438c22ed467dc4d | [
"MIT"
] | null | null | null | """
#Values Name Description
----------------------------------------------------------------------------
1 type Describes the type of object: 'Car', 'Van', 'Truck',
'Pedestrian', 'Person_sitting', 'Cyclist', 'Tram',
'Misc' or 'DontCare'
1 truncated ... | 47.5 | 163 | 0.583818 |
38563b27005046d435ecf3784e4f8be312ee4e72 | 49,025 | py | Python | test/run_test.py | mwootton/pytorch | d03ff1a17dcc0fa4dc992ef84a58cbd76f5864d9 | [
"Intel"
] | null | null | null | test/run_test.py | mwootton/pytorch | d03ff1a17dcc0fa4dc992ef84a58cbd76f5864d9 | [
"Intel"
] | null | null | null | test/run_test.py | mwootton/pytorch | d03ff1a17dcc0fa4dc992ef84a58cbd76f5864d9 | [
"Intel"
] | null | null | null | #!/usr/bin/env python3
import argparse
import copy
import csv
from datetime import datetime
import json
import modulefinder
import os
import shutil
import signal
import subprocess
import sys
import tempfile
import torch
from torch.utils import cpp_extension
from torch.testing._internal.common_utils import FILE_SCHEMA... | 38.420846 | 121 | 0.667965 |
050101ede55daa3b5383f8e964871e96cef659ac | 7,719 | py | Python | fax/tests/hock_schittkowski_suite.py | evgenii-nikishin/fax | 78a45453e6db91872dc9f669f7a6f28ab5fbef58 | [
"MIT"
] | 68 | 2019-11-26T00:02:35.000Z | 2022-02-03T08:19:26.000Z | fax/tests/hock_schittkowski_suite.py | evgenii-nikishin/fax | 78a45453e6db91872dc9f669f7a6f28ab5fbef58 | [
"MIT"
] | 32 | 2020-01-28T02:14:59.000Z | 2021-02-08T20:59:34.000Z | fax/tests/hock_schittkowski_suite.py | evgenii-nikishin/fax | 78a45453e6db91872dc9f669f7a6f28ab5fbef58 | [
"MIT"
] | 10 | 2020-02-23T11:11:59.000Z | 2021-09-08T14:08:39.000Z | import collections
import itertools
import os
import tempfile
import urllib.request
import zipfile
from typing import Text, Union, List
APM_TESTS = "https://apmonitor.com/wiki/uploads/Apps/hs.zip"
def load_suite(inequality=False, intermediates=False, ) -> List["fax.tests.HockSchittkowski"]:
import fax.tests.Hock... | 32.707627 | 132 | 0.617956 |
bf05a9bde2f8741401e0d36c4e6b1b257b29eab4 | 5,035 | py | Python | Simulator/Classes/Network.py | Sulles/YOLOL_Simulator | cfecdd8b0bcaaa5661fff6cf187bf2a8a3a62bd6 | [
"MIT"
] | 5 | 2019-07-15T02:16:26.000Z | 2021-09-13T02:23:48.000Z | Simulator/Classes/Network.py | Sulles/YOLOL_Simulator | cfecdd8b0bcaaa5661fff6cf187bf2a8a3a62bd6 | [
"MIT"
] | 1 | 2019-07-14T22:27:42.000Z | 2019-07-21T06:14:47.000Z | Simulator/Classes/Network.py | Sulles/YOLOL_Simulator | cfecdd8b0bcaaa5661fff6cf187bf2a8a3a62bd6 | [
"MIT"
] | null | null | null | """
Created: July 13, 2019
Last Updated: August 3, 2019
Author: Sulles
=== DESCRIPTION ===
This class hosts all the objects within a network
"""
from copy import copy
from math import sqrt
from time import time
from .map import *
class Network:
def __init__(self, name, obj_settings):
"""
:param... | 37.574627 | 120 | 0.581529 |
50f067c3997da8cf7b3b9fe3770df84f40c8c319 | 6,298 | py | Python | src/python/trailblazer/utils/csv_to_kw18.py | Kitware/trailblazer | f5576eaf150162ba3642f764fedb0ad1f2f54428 | [
"Apache-2.0"
] | null | null | null | src/python/trailblazer/utils/csv_to_kw18.py | Kitware/trailblazer | f5576eaf150162ba3642f764fedb0ad1f2f54428 | [
"Apache-2.0"
] | 1 | 2020-08-17T15:42:30.000Z | 2020-08-17T15:42:30.000Z | src/python/trailblazer/utils/csv_to_kw18.py | Kitware/trailblazer | f5576eaf150162ba3642f764fedb0ad1f2f54428 | [
"Apache-2.0"
] | null | null | null | # Distributed under the Apache License, Version 2.0.
# See accompanying NOTICE file for details.
import logging
import argparse
from pyproj import Geod
from trailblazer.traffic.vital import Detection
""" KW18 FORMAT
Index Metadata
0 Track-id
1 Track-length (# of detections)
2 Frame-num... | 46.651852 | 108 | 0.497142 |
64f9ef3742b6761d89fe7b9572d0e74ae72204e3 | 725 | py | Python | doc/source/conf.py | vehicle-lang/vehicle | 25842faea65b4f7f0f7b1bb11ea6e4bf3f4a59b0 | [
"BSD-3-Clause"
] | 9 | 2022-02-10T12:56:42.000Z | 2022-02-17T18:51:05.000Z | doc/source/conf.py | vehicle-lang/vehicle | 25842faea65b4f7f0f7b1bb11ea6e4bf3f4a59b0 | [
"BSD-3-Clause"
] | 19 | 2022-03-07T14:09:13.000Z | 2022-03-31T20:49:39.000Z | doc/source/conf.py | vehicle-lang/vehicle | 25842faea65b4f7f0f7b1bb11ea6e4bf3f4a59b0 | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
# -- Project information
project = 'Vehicle'
copyright = '2022'
author = 'Matthew Daggitt, Wen Kokke et al.'
release = '0.1'
version = '0.1.0'
# -- General configuration
extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.au... | 20.138889 | 62 | 0.68 |
29d6d497293c3e0a973b5beff789a737ba7edd91 | 3,133 | py | Python | tests/test.py | MatanelAbayof/Wikishield | 9cc34e413eb8fd0246555e8df93fe774a4531955 | [
"Apache-2.0"
] | 1 | 2020-08-19T10:19:22.000Z | 2020-08-19T10:19:22.000Z | tests/test.py | MatanelAbayof/Wikishield | 9cc34e413eb8fd0246555e8df93fe774a4531955 | [
"Apache-2.0"
] | null | null | null | tests/test.py | MatanelAbayof/Wikishield | 9cc34e413eb8fd0246555e8df93fe774a4531955 | [
"Apache-2.0"
] | null | null | null | import toolforge
import requests
import time
#toolforge.set_user_agent('wikishield')
import toolforge
args = {
'host': 'tools.db.svc.eqiad.wmflabs'}
conn = toolforge.connect('s54207__wikishield_p', **args)
import pickle
file_path = r"assets/clfs/en.pickle"
with open(file_path, "rb") as pickle_file:
obj... | 21.756944 | 80 | 0.767635 |
174783a53a1b18f80abde1098f5550b790d3c816 | 374 | py | Python | mergeIntervals/mergeIntervals.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | 11 | 2019-05-02T22:27:01.000Z | 2020-10-30T08:43:02.000Z | mergeIntervals/mergeIntervals.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | null | null | null | mergeIntervals/mergeIntervals.py | YasinEhsan/interview-prep | ed9f95af5a37b05304e45b41511068b6f72533e7 | [
"Apache-2.0"
] | 3 | 2019-11-01T01:35:01.000Z | 2020-01-11T18:00:39.000Z | #9.26
def merge(intervals):
merged = []
# TODO: Write your code here
intervals.sort(key = lambda x : x.start)
curr = intervals[0]
for i in range(len(intervals)-1):
after = intervals[i+1]
if curr.end < after.start:
merged.append(curr)
curr = after
else:
curr.end = max(curr.en... | 16.26087 | 42 | 0.617647 |
e4ae7636dd79fc0a27dbcb63e52a87e8c0ecdc40 | 45,645 | py | Python | modified-labelImg/labelImg.py | AnastatiaDorval/deepray | 571b65a1dcd9c7ca137b7b7c5211920c61f20cb0 | [
"MIT"
] | null | null | null | modified-labelImg/labelImg.py | AnastatiaDorval/deepray | 571b65a1dcd9c7ca137b7b7c5211920c61f20cb0 | [
"MIT"
] | null | null | null | modified-labelImg/labelImg.py | AnastatiaDorval/deepray | 571b65a1dcd9c7ca137b7b7c5211920c61f20cb0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import codecs
import distutils.spawn
import os.path
from pickle import FALSE
import platform
import re
import sys
import matplotlib
import subprocess
import shutil
import webbrowser as wb
from astropy.io import fits
from astropy.utils.data import get_pkg_da... | 39.519481 | 144 | 0.617417 |
9cb300f83d9c4ced68f69f06170a32f82f039d8c | 3,176 | py | Python | python/paddle/fluid/tests/unittests/test_fleet_meta_optimizer.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_fleet_meta_optimizer.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_fleet_meta_optimizer.py | juncaipeng/Paddle | e5bbffa84cf0c0768dd681b9aa0133169cca6c58 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 41.246753 | 80 | 0.68136 |
ea0ec9cb6b562eaafd4e12187a0fa2b42126ce1a | 6,496 | py | Python | index_scraper.py | matijanjic/indexScraper | 11475fedfc5de6e759da646ef10537dab4f707c8 | [
"MIT"
] | null | null | null | index_scraper.py | matijanjic/indexScraper | 11475fedfc5de6e759da646ef10537dab4f707c8 | [
"MIT"
] | 5 | 2021-06-14T11:11:58.000Z | 2021-06-23T20:08:49.000Z | index_scraper.py | matijanjic/indexScraper | 11475fedfc5de6e759da646ef10537dab4f707c8 | [
"MIT"
] | null | null | null | import time
import datetime
import re
import smtplib
import ssl
from imbox import Imbox
from requests_html import HTMLSession
# e-mail info for the bot
sender_email = "botzaindex@gmail.com"
receiver_email = "matijanjic@gmail.com"
# For SSL
port = 465
# Create a secure SSL context
context = ssl.create_default_contex... | 39.609756 | 139 | 0.56681 |
0d1bac6aead39f4ec44dd78e64757a205d021b6a | 87,547 | py | Python | python/cudf/cudf/tests/test_binops.py | NVnavkumar/cudf | ef6a3907d0fc9223fe3f0e61b73a0ea9f5c7281f | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/tests/test_binops.py | NVnavkumar/cudf | ef6a3907d0fc9223fe3f0e61b73a0ea9f5c7281f | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/tests/test_binops.py | NVnavkumar/cudf | ef6a3907d0fc9223fe3f0e61b73a0ea9f5c7281f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018-2022, NVIDIA CORPORATION.
import decimal
import operator
import random
from itertools import combinations_with_replacement, product
import cupy as cp
import numpy as np
import pandas as pd
import pytest
import cudf
from cudf import Series
from cudf.core.index import as_index
from cudf.testing i... | 29.526813 | 79 | 0.563434 |
62acee89ce6539acaf73a5e87e295002f39f8b7d | 506 | py | Python | class3_exercise1.py | nokn0k/Net_AutomationScripts | 06664d984c5be64a7fe080009b09c4fcaa6ec210 | [
"Apache-2.0"
] | null | null | null | class3_exercise1.py | nokn0k/Net_AutomationScripts | 06664d984c5be64a7fe080009b09c4fcaa6ec210 | [
"Apache-2.0"
] | null | null | null | class3_exercise1.py | nokn0k/Net_AutomationScripts | 06664d984c5be64a7fe080009b09c4fcaa6ec210 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
ARP = [
{'mac_addr': '0062.ec29.70fe', 'ip_addr': '10.220.88.1', 'interface': 'gi0/0/0'},
{'mac_addr': 'c89c.1dea.0eb6', 'ip_addr': '10.220.88.20', 'interface': 'gi0/0/0'},
{'mac_addr': 'a093.5141.b780', 'ip_addr': '10.220.88.22', 'interface': 'gi0/0/0'},
{'mac_addr': '0001.00ff.0001', 'ip_addr... | 31.625 | 82 | 0.598814 |
d963b956b7a27264038d193430353ab9b5844b39 | 330 | py | Python | txproductpages/exceptions.py | ktdreyer/txproductpages | f3e0d1392fd2dd78609734530d85772d1ded4913 | [
"MIT"
] | null | null | null | txproductpages/exceptions.py | ktdreyer/txproductpages | f3e0d1392fd2dd78609734530d85772d1ded4913 | [
"MIT"
] | null | null | null | txproductpages/exceptions.py | ktdreyer/txproductpages | f3e0d1392fd2dd78609734530d85772d1ded4913 | [
"MIT"
] | null | null | null | class ProductPagesException(Exception):
pass
class ReleaseNotFoundException(ProductPagesException):
pass
class NoTasksException(ProductPagesException):
"""
A release has no tasks at all. Product Management must fill in the tasks.
"""
pass
class TaskNotFoundException(ProductPagesException):... | 18.333333 | 77 | 0.751515 |
2de363eab6feaf1af719fd571c931f5ca81c9dbf | 1,773 | py | Python | scripts/benchmark/benchmark_pca.py | Duconnor/Pudding | 4565f2ad9a933e83e9eacbc5ebe848599ea9cec1 | [
"MIT"
] | 3 | 2022-01-08T05:05:30.000Z | 2022-01-09T10:09:57.000Z | scripts/benchmark/benchmark_pca.py | Duconnor/Pudding | 4565f2ad9a933e83e9eacbc5ebe848599ea9cec1 | [
"MIT"
] | null | null | null | scripts/benchmark/benchmark_pca.py | Duconnor/Pudding | 4565f2ad9a933e83e9eacbc5ebe848599ea9cec1 | [
"MIT"
] | null | null | null | '''
This benchmark script was inspired by https://github.com/nmerrill67/GPU_GSPCA/blob/master/demo.py
'''
import numpy as np
import matplotlib.pyplot as plt
from time import time
from sklearn.decomposition import PCA
import pudding
def benchmark_random():
'''
This function benchmark our implementation with S... | 33.45283 | 173 | 0.708968 |
c4a29e13bb48d6fc904800b8f7ad077cdb4e62ae | 853 | py | Python | tests/ut/python/optimizer/test_tile_eliminate.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | 1 | 2022-03-05T02:59:21.000Z | 2022-03-05T02:59:21.000Z | tests/ut/python/optimizer/test_tile_eliminate.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | null | null | null | tests/ut/python/optimizer/test_tile_eliminate.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from mindspore import context
from mindspore import ms_function, ops, Tensor, dtype
@ms_function
def expand_tensor(a, b):
out = ops.tile(a, b)
return out
def test_tile_eliminate():
"""
Feature: tile_eliminate
Description: All value of multiplier is '1' but length of multiplier... | 30.464286 | 120 | 0.652989 |
9c48af6e194a13cd3427ae1084a3aaddbff54e6a | 5,467 | py | Python | one-to-one-screensharing-samples/ios/OneToOneScreenShareSampleUITests/ScreenShareUITest.py | marinaserranomontes/misc-opentok-accelerators | 5898ed038f78feebf6fb7afd48a8d80d7b8c922d | [
"Apache-2.0"
] | 1 | 2019-02-14T16:48:20.000Z | 2019-02-14T16:48:20.000Z | one-to-one-screensharing-samples/ios/OneToOneScreenShareSampleUITests/ScreenShareUITest.py | opentok/misc-opentok-accelerators | 5898ed038f78feebf6fb7afd48a8d80d7b8c922d | [
"Apache-2.0"
] | null | null | null | one-to-one-screensharing-samples/ios/OneToOneScreenShareSampleUITests/ScreenShareUITest.py | opentok/misc-opentok-accelerators | 5898ed038f78feebf6fb7afd48a8d80d7b8c922d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
import unittest
import os
import random
import string
from random import randint
from appium import webdriver
from time import sleep
class ScreenShareUITest(unittest.TestCase):
baseLayout = '//UIAApplication[1]/UIAWindow[1]'
controlLayout = '/UIAButton[X]'
ssLayout = '//UIAAp... | 46.726496 | 122 | 0.672581 |
89ddcdf75901e8baf5411ce86da998c7529f9c1d | 4,651 | py | Python | google/cloud/asset/__init__.py | aaronlichen-hp/python-asset | 0e0dee8bbd825b4ce6c9f271163f5d9f13c82f2d | [
"Apache-2.0"
] | null | null | null | google/cloud/asset/__init__.py | aaronlichen-hp/python-asset | 0e0dee8bbd825b4ce6c9f271163f5d9f13c82f2d | [
"Apache-2.0"
] | null | null | null | google/cloud/asset/__init__.py | aaronlichen-hp/python-asset | 0e0dee8bbd825b4ce6c9f271163f5d9f13c82f2d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 44.295238 | 88 | 0.823264 |
990004135224edb303a9717698819ef0912fe706 | 12,888 | py | Python | src/upnp.py | d42/PyBitmessage | 32bb2a6e443978f31396fe244919068e9590c197 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-11-10T02:28:36.000Z | 2019-11-10T02:28:36.000Z | src/upnp.py | d42/PyBitmessage | 32bb2a6e443978f31396fe244919068e9590c197 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/upnp.py | d42/PyBitmessage | 32bb2a6e443978f31396fe244919068e9590c197 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | null | null | null | # pylint: disable=too-many-statements,too-many-branches,protected-access,no-self-use
"""
Complete UPnP port forwarding implementation in separate thread.
Reference: http://mattscodecave.com/posts/using-python-and-upnp-to-forward-a-port
"""
import httplib
import socket
import time
import urllib2
from random import ran... | 36.509915 | 115 | 0.572005 |
9e1e71c83cb284c2524aff3444655742967b4602 | 1,977 | py | Python | estudent/exporters/ios_class_timetable.py | CreeperzEdge/mq-timetable-export | 220c52eb4fe422e5d2496fba97be75928d8f031c | [
"Unlicense"
] | null | null | null | estudent/exporters/ios_class_timetable.py | CreeperzEdge/mq-timetable-export | 220c52eb4fe422e5d2496fba97be75928d8f031c | [
"Unlicense"
] | null | null | null | estudent/exporters/ios_class_timetable.py | CreeperzEdge/mq-timetable-export | 220c52eb4fe422e5d2496fba97be75928d8f031c | [
"Unlicense"
] | null | null | null |
# iOS app: https://apps.apple.com/au/app/class-timetable/id425121147
import datetime
import uuid
import plistlib
from ._base import TimetableExporter
from ..class_ import RegisteredClass
def seconds_since_midnight(t=None):
if t is None:
t = datetime.datetime.now()
dt_combine = datetime.datetime.comb... | 29.073529 | 89 | 0.546282 |
ba342731a657b44c91157dd609963dfcccd453d6 | 5,986 | py | Python | contrib/zmq/zmq_sub.py | freelancedeveloper025/titaniumcore | 7a629d0391d78527bad017ce0b8b02c964a26258 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub.py | freelancedeveloper025/titaniumcore | 7a629d0391d78527bad017ce0b8b02c964a26258 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub.py | freelancedeveloper025/titaniumcore | 7a629d0391d78527bad017ce0b8b02c964a26258 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Ttm should be started with the command line arguments:
... | 44.340741 | 107 | 0.634146 |
4485b4ba8dd0a0abe5eb28511dbf976b916dc9a0 | 189 | py | Python | business_logic/blockly/exceptions.py | civilian/django-business-logic | 3af2175318d019e6327d41e0256cb945b33a713c | [
"MIT"
] | 160 | 2016-05-25T12:51:02.000Z | 2022-01-29T20:39:22.000Z | business_logic/blockly/exceptions.py | civilian/django-business-logic | 3af2175318d019e6327d41e0256cb945b33a713c | [
"MIT"
] | 36 | 2016-09-06T11:13:27.000Z | 2021-02-27T12:33:31.000Z | business_logic/blockly/exceptions.py | civilian/django-business-logic | 3af2175318d019e6327d41e0256cb945b33a713c | [
"MIT"
] | 30 | 2016-07-23T14:41:51.000Z | 2022-03-25T21:31:06.000Z | # -*- coding: utf-8 -*-
class BlocklyXmlParserException(Exception):
pass
class BlocklyXmlBuilderException(Exception):
pass
class NodeTreeCreatorException(Exception):
pass
| 13.5 | 44 | 0.73545 |
3ac2d9e810d245b768720c91671a8ff1944ba079 | 1,688 | py | Python | setup.py | oreillymedia/binderhub | 1835d07222388da2a23765899cd006e6f6462827 | [
"BSD-3-Clause"
] | 1 | 2020-06-19T17:22:14.000Z | 2020-06-19T17:22:14.000Z | setup.py | oreillymedia/binderhub | 1835d07222388da2a23765899cd006e6f6462827 | [
"BSD-3-Clause"
] | null | null | null | setup.py | oreillymedia/binderhub | 1835d07222388da2a23765899cd006e6f6462827 | [
"BSD-3-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
import subprocess
# get the version
version_ns = {}
here = os.path.dirname(__file__)
with open(os.path.join(here, 'binderhub', '_version.py')) as f:
exec(f.read(), {}, version_ns)
with open(os.path.join(here, 'requirements.txt')) as f:
requirements = [
... | 32.461538 | 77 | 0.678318 |
31a7f17673e9bc0d710794657d3c018ccf850436 | 2,679 | py | Python | {{cookiecutter.project_slug}}/setup.py | rsperl/python-template | 1865f507df25fc5c5e6ca1f6498d30e7744b8ac7 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | rsperl/python-template | 1865f507df25fc5c5e6ca1f6498d30e7744b8ac7 | [
"Apache-2.0"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | rsperl/python-template | 1865f507df25fc5c5e6ca1f6498d30e7744b8ac7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
{%- set license_classifiers = {
'MIT license': 'License :: OSI Approved :: MIT License',
'BSD license': 'License :: OSI Approved :: BSD License',
'ISC license... | 37.208333 | 102 | 0.62598 |
838e0d837e59cbf2baffcf42e2fa0c0cf3fefc96 | 2,685 | py | Python | Fusion360AddinSkeleton.py | tapnair/Fusion360AddinSkeleton | 894f293853b5fbcadfcbcc8ccb8d75f5cb15452b | [
"MIT"
] | 34 | 2017-02-22T23:55:04.000Z | 2022-03-30T19:24:13.000Z | Ratchets.py | a1650078/fusion360_ratchets | 2fe525809f70ddea2031026b9383d4048d81d7bb | [
"MIT"
] | 1 | 2020-04-26T22:08:58.000Z | 2020-04-26T22:08:58.000Z | Ratchets.py | a1650078/fusion360_ratchets | 2fe525809f70ddea2031026b9383d4048d81d7bb | [
"MIT"
] | 9 | 2016-11-21T19:43:47.000Z | 2020-06-02T09:02:37.000Z | # Importing sample Fusion Command
# Could import multiple Command definitions here
from .Demo1Command import Demo1Command
from .Demo2Command import Demo2Command
from .DemoPaletteCommand import DemoPaletteShowCommand, DemoPaletteSendCommand
commands = []
command_definitions = []
# Define parameters for 1st command
cmd... | 29.833333 | 78 | 0.718808 |
b8e13213153e0757dabab1ad11bb2c0dd95074e4 | 1,084 | py | Python | alipay/aop/api/response/AlipayCommerceOperationPromoterPointReceiveResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceOperationPromoterPointReceiveResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceOperationPromoterPointReceiveResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.PointReceiveInfo import PointReceiveInfo
class AlipayCommerceOperationPromoterPointReceiveResponse(AlipayResponse):
def __init__(self):
super(AlipayComme... | 36.133333 | 124 | 0.759225 |
2a9f6e95ce2dace98fa5abc2c95447fca8e28292 | 2,725 | py | Python | bindings/python/ensmallen/datasets/networkrepository/comyoutube.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/networkrepository/comyoutube.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/networkrepository/comyoutube.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph com-youtube.
The graph is automatically retrieved from the NetworkRepository repository.
References
---------------------
Please cite the following if you use the data:
```bib
@inproceedings{nr,
title = {The Network Data Repository with Inter... | 28.684211 | 94 | 0.65578 |
2831cfe72c32825dcaa094410ab6bb644b792c9e | 1,595 | py | Python | util/.pre_commit.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | util/.pre_commit.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | util/.pre_commit.py | mabrahamdevops/python_notebooks | 6d5e7383b60cc7fd476f6e85ab93e239c9c32330 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import os
import glob
from __code.file_handler import read_ascii, make_ascii_file_from_string
# this will clean up all the ipynb files by running the nbstripout program
# in the specified folder
parser = argparse.ArgumentParser(description='Preparing notebooks for deploymenet to analysis machine')
pa... | 30.673077 | 103 | 0.690909 |
e060cffca2fd3b31197dec12bd9d8f0bfabefe82 | 1,198 | py | Python | correlate.py | cgtuebingen/LearningToSynchronizeVideos | eb2367db69eb7946eb82cc12b0f29119c7f63e23 | [
"Apache-2.0"
] | 4 | 2019-03-22T21:11:41.000Z | 2020-10-27T05:48:54.000Z | correlate.py | cgtuebingen/LearningToSynchronizeVideos | eb2367db69eb7946eb82cc12b0f29119c7f63e23 | [
"Apache-2.0"
] | null | null | null | correlate.py | cgtuebingen/LearningToSynchronizeVideos | eb2367db69eb7946eb82cc12b0f29119c7f63e23 | [
"Apache-2.0"
] | 3 | 2018-11-17T15:59:57.000Z | 2021-09-03T13:45:21.000Z | import h5py
import tensorflow as tf
from user_ops import p2dist
import numpy as np
import cv2
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--left', help='path to h5 embeddings', type=str, required=True)
parser.add_argument('--right', help='path to h5 e... | 31.526316 | 89 | 0.685309 |
7cca7a97288d26e6e86a93666b3d93a5436986bd | 14,319 | py | Python | tools/norm_db_init.py | pombredanne/brat | c411494b9d8cad5ed068db24b7662d388bf1fa3e | [
"CC-BY-3.0"
] | 1 | 2019-10-10T00:53:52.000Z | 2019-10-10T00:53:52.000Z | tools/norm_db_init.py | pombredanne/brat | c411494b9d8cad5ed068db24b7662d388bf1fa3e | [
"CC-BY-3.0"
] | null | null | null | tools/norm_db_init.py | pombredanne/brat | c411494b9d8cad5ed068db24b7662d388bf1fa3e | [
"CC-BY-3.0"
] | 1 | 2020-04-21T09:03:18.000Z | 2020-04-21T09:03:18.000Z | #!/usr/bin/env python
# Creates SQL and simstring DBs for brat normalization support.
# Each line in the input file should have the following format:
# ID<TAB>TYPE1:LABEL1:STRING1<TAB>TYPE2:LABEL2:STRING2[...]
# Where the ID is the unique ID normalized to, and the
# TYPE:LABEL:STRING triplets provide various inform... | 32.841743 | 168 | 0.613241 |
80384fafd5b0cedb421361141b3e818cb4718351 | 704 | py | Python | polling_stations/apps/dashboard/urls.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/dashboard/urls.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | 364 | 2020-10-19T07:16:41.000Z | 2022-03-31T06:10:55.000Z | polling_stations/apps/dashboard/urls.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
app_name = "dashboard"
urlpatterns = [
url(r"^$", views.IndexView.as_view(), name="index"),
url(
r"council/(?P<pk>[^/]+)/$",
views.CouncilDetailView.as_view(),
name="council_detail",
),
url(
r"council/(?P<council_pk>... | 25.142857 | 88 | 0.568182 |
e895c3d2f88572d8c5889ba28ad81aec2a42af4e | 7,056 | py | Python | train_exp.py | mk37972/SCAPE | 01080e4159917546c76dd15ae5c74e092f4ae299 | [
"MIT"
] | null | null | null | train_exp.py | mk37972/SCAPE | 01080e4159917546c76dd15ae5c74e092f4ae299 | [
"MIT"
] | null | null | null | train_exp.py | mk37972/SCAPE | 01080e4159917546c76dd15ae5c74e092f4ae299 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 15:36:15 2020
@author: mincheol
"""
from baselines import run
import mpi4py
## Block (Position control approach)
defaultargs = ['--alg=her','--env=Block-v1', '--num_timesteps=5e4']
for dim in [4]:
for seed in [10,500,1000]:
... | 41.751479 | 111 | 0.569728 |
91728e7fc08c0b98958e30c230fafbe3bb937367 | 3,922 | py | Python | hexanonymize.py | neilrjones/DevOps-Python-tools | 12646de550ba296cf26e4a058e9a1cc1cc723c8f | [
"MIT"
] | 1 | 2022-02-22T00:20:00.000Z | 2022-02-22T00:20:00.000Z | hexanonymize.py | neilrjones/DevOps-Python-tools | 12646de550ba296cf26e4a058e9a1cc1cc723c8f | [
"MIT"
] | null | null | null | hexanonymize.py | neilrjones/DevOps-Python-tools | 12646de550ba296cf26e4a058e9a1cc1cc723c8f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2020-01-02 17:08:32 +0000 (Thu, 02 Jan 2020)
#
# https://github.com/harisekhon/devops-python-tools
#
# License: GNU GPL version 2 (this file only), rest of this repo is licensed as per the adjacent LICENSE file
#
# If you're using my c... | 33.521368 | 119 | 0.608108 |
c1c0b242f6646b7a3e3b7db77689edbcadf5d43f | 9,420 | py | Python | restler/engine/transport_layer/messaging.py | reggieag/restler-fuzzer | 32c7c4c58968269c1d49899deb967c6bc51f0655 | [
"MIT"
] | null | null | null | restler/engine/transport_layer/messaging.py | reggieag/restler-fuzzer | 32c7c4c58968269c1d49899deb967c6bc51f0655 | [
"MIT"
] | 1 | 2021-03-30T02:53:04.000Z | 2021-03-30T22:39:03.000Z | restler/engine/transport_layer/messaging.py | reggieag/restler-fuzzer | 32c7c4c58968269c1d49899deb967c6bc51f0655 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
""" Transport layer fuctionality using python sockets. """
from __future__ import print_function
import ssl
import socket
import time
import threading
from importlib import util
from utils.logger import raw_network_logging as RAW_LOGGING
from en... | 34.505495 | 93 | 0.605308 |
6d7632ab9267e3303130fd0280e111686fced16e | 24,818 | py | Python | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | 2 | 2020-09-22T14:38:24.000Z | 2020-10-30T03:11:36.000Z | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import
import distutils.util
try:
from importlib.machinery import EXTENSION_SUFFIXES
except... | 33.00266 | 112 | 0.615763 |
ea66b487f0d6432855936cb976594d26fbb02621 | 10,989 | py | Python | base_handler.py | AppScale/crisismap | 758f0befbdbbc0eb2621fdaa2d250afd84d8829b | [
"Apache-2.0"
] | 4 | 2015-04-03T16:33:17.000Z | 2018-02-17T12:27:04.000Z | base_handler.py | AppScale/crisismap | 758f0befbdbbc0eb2621fdaa2d250afd84d8829b | [
"Apache-2.0"
] | null | null | null | base_handler.py | AppScale/crisismap | 758f0befbdbbc0eb2621fdaa2d250afd84d8829b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2012 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 applic... | 38.693662 | 80 | 0.688416 |
bf7781774a88e4179c95f33b69508b0e96013233 | 414 | py | Python | ros/src/tl_detector/light_classification/test_tl_classifier.py | Data-drone/CarND-Capstone | 8556f911fa29f3db4385d79ba4a0f02c48e96e24 | [
"MIT"
] | null | null | null | ros/src/tl_detector/light_classification/test_tl_classifier.py | Data-drone/CarND-Capstone | 8556f911fa29f3db4385d79ba4a0f02c48e96e24 | [
"MIT"
] | 10 | 2019-12-16T22:20:49.000Z | 2022-03-12T00:10:35.000Z | ros/src/tl_detector/light_classification/test_tl_classifier.py | Data-drone/CarND-Capstone | 8556f911fa29f3db4385d79ba4a0f02c48e96e24 | [
"MIT"
] | null | null | null | # testing container notes:
# docker run -v $PWD:/root/detector --rm -it tensorflow/tensorflow:1.3.0-devel
# docker run -p 4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ --rm -it capstone
import unittest
from tl_classifier import TLClassifier
def test_tl_classifier_init():
new_classifier = TLClassifier()
... | 27.6 | 85 | 0.73913 |
8166a1ab403edba28d59c44764d600e8ddeb70b7 | 13,125 | py | Python | tests/test_keeper.py | abingham/keeper | 1ce9724141b61128033fb890f79d2b663117fa16 | [
"MIT"
] | null | null | null | tests/test_keeper.py | abingham/keeper | 1ce9724141b61128033fb890f79d2b663117fa16 | [
"MIT"
] | null | null | null | tests/test_keeper.py | abingham/keeper | 1ce9724141b61128033fb890f79d2b663117fa16 | [
"MIT"
] | null | null | null | import logging
import os
import sys
import shutil
import unittest
import warnings
from keeper import Keeper
logging.basicConfig(level=logging.DEBUG)
console = logging.StreamHandler(sys.stdout)
console.setLevel(logging.DEBUG)
logging.getLogger().addHandler(console)
class KeeperTests(unittest.TestCase):
def set... | 35.377358 | 95 | 0.648152 |
ce37c4f590e62258ef7131b47ebec9fb866f2863 | 2,195 | py | Python | data/19-01-09-RNAseqProfilesFish/get_fastqfiles.py | santiago1234/MZT-rna-stability | 80a303a4f240308bccbadc29abeaa61a39d91861 | [
"MIT"
] | 7 | 2021-01-07T03:27:15.000Z | 2022-01-28T19:10:12.000Z | data/19-01-09-RNAseqProfilesFish/get_fastqfiles.py | santiago1234/MZT-rna-stability | 80a303a4f240308bccbadc29abeaa61a39d91861 | [
"MIT"
] | null | null | null | data/19-01-09-RNAseqProfilesFish/get_fastqfiles.py | santiago1234/MZT-rna-stability | 80a303a4f240308bccbadc29abeaa61a39d91861 | [
"MIT"
] | null | null | null | import pandas as pd
import os
from optimalcodon.limsdatacopy import get_fastqs_from_lims
path_to_fastqs = "/n/analysis/Bazzini/arb/MOLNG-2541/HGYJ3BGX9/" # TODO: change this to unix
destination_dir = "rawfastqfiles"
sample_report = os.path.join(path_to_fastqs, "Sample_Report.csv")
sample_report = pd.read_csv(sample_re... | 43.9 | 113 | 0.779499 |
0a7751278318456037ce6a0d7f3c946311966429 | 30,447 | py | Python | jams/kriging.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | null | null | null | jams/kriging.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | null | null | null | jams/kriging.py | MuellerSeb/jams_python | 1bca04557da79d8f8a4c447f5ccc517c40ab7dfc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import numpy as np
from scipy.spatial.distance import pdist, squareform
def kriging(x, y, z, semi_mod, semi_popt, xnew=None, ynew=None, plot=False,
masked=False, silent=True, eop=None, block=False):
"""
Krigi... | 43.620344 | 97 | 0.507735 |
1e4f880ad6834f9fd6ca401b893bad617bb772d0 | 4,917 | py | Python | bot.py | BlitheZhang/LCBot-master | b253d09bde1600c9ddb7e5f3b6eda426d4ae11d2 | [
"MIT"
] | null | null | null | bot.py | BlitheZhang/LCBot-master | b253d09bde1600c9ddb7e5f3b6eda426d4ae11d2 | [
"MIT"
] | null | null | null | bot.py | BlitheZhang/LCBot-master | b253d09bde1600c9ddb7e5f3b6eda426d4ae11d2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from wxpy import *
import re
'''
使用 cache 来缓存登陆信息,同时使用控制台登陆
'''
bot = Bot('bot.pkl', console_qr=True)
'''
开启 PUID 用于后续的控制
'''
bot.enable_puid('wxpy_puid.pkl')
'''
邀请信息处理
'''
rp_new_member_name = (
re.compile(r'^"(.+)"通过'),
re.compile(r'邀请"(.+)"加入'),
)
'''
为保证兼容,在下方... | 20.573222 | 81 | 0.614196 |
982eb224c97591e0a2abadebf3193b8d65bd35ee | 399 | py | Python | digiconsult/asgi.py | leandrocaprara/DigiConsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | 1 | 2020-04-23T21:38:57.000Z | 2020-04-23T21:38:57.000Z | digiconsult/asgi.py | leandrocaprara/digiconsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | null | null | null | digiconsult/asgi.py | leandrocaprara/digiconsult | 3a57c56203584414910711fce1639b8e90292de8 | [
"MIT"
] | null | null | null | """
ASGI config for digiconsult 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.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
c86a04d026b9bc2b820b8794610d0a2f70495628 | 3,518 | py | Python | CLIMATExScience/air-pollution-index/data-cleaning/2018-Pahang.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | null | null | null | CLIMATExScience/air-pollution-index/data-cleaning/2018-Pahang.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | null | null | null | CLIMATExScience/air-pollution-index/data-cleaning/2018-Pahang.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | 1 | 2021-12-16T04:56:09.000Z | 2021-12-16T04:56:09.000Z | # -*- coding: utf-8 -*-
"""
23 May 2020
Author: Xiandi Ooi
We will first download the file from the source.
Then, the data is organized to ease future analysis. Specific changes are as follows:
1. Datetime variable added;
2. Numerical API values are extracted;
3. Dominant pollutant type are extracted
"""
... | 39.52809 | 161 | 0.640421 |
4598300e9cf0bcf6e9db6efed3f32a659d9c2e56 | 2,030 | py | Python | data-api/EDR/provider/tileset.py | ShaneMill1/NCPP_EDR_API | 063aee887a4501ac1435356723083bcbaa5994c9 | [
"MIT"
] | null | null | null | data-api/EDR/provider/tileset.py | ShaneMill1/NCPP_EDR_API | 063aee887a4501ac1435356723083bcbaa5994c9 | [
"MIT"
] | null | null | null | data-api/EDR/provider/tileset.py | ShaneMill1/NCPP_EDR_API | 063aee887a4501ac1435356723083bcbaa5994c9 | [
"MIT"
] | null | null | null | from EDR.provider.hgt import HGT
import math
import requests
from requests.adapters import HTTPAdapter
import gzip
import numpy as np
base_url = "https://elevation-tiles-prod.s3.amazonaws.com/skadi/"
class TILESET():
def get_path(self, lat, lng):
lat_filename = "N"
if lat < 0:
lat_fi... | 28.591549 | 70 | 0.538424 |
1e00eeb62484faef246270f484204d848bd09599 | 3,825 | py | Python | opentelekom/dns/v2/zone.py | tsdicloud/python-opentelekom-sdk | 809f3796dba48ad0535990caf7519bb9afa71d2d | [
"Apache-2.0"
] | null | null | null | opentelekom/dns/v2/zone.py | tsdicloud/python-opentelekom-sdk | 809f3796dba48ad0535990caf7519bb9afa71d2d | [
"Apache-2.0"
] | null | null | null | opentelekom/dns/v2/zone.py | tsdicloud/python-opentelekom-sdk | 809f3796dba48ad0535990caf7519bb9afa71d2d | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.416667 | 77 | 0.669542 |
caa51b687169b08dcf87cbcf887273ebf3eaef73 | 5,299 | py | Python | src/python/packages/metadapter/processors/spread_processor.py | s3a-spatialaudio/VISR | 55f6289bc5058d4898106f3520e1a60644ffb3ab | [
"ISC"
] | 17 | 2019-03-12T14:52:22.000Z | 2021-11-09T01:16:23.000Z | src/python/packages/metadapter/processors/spread_processor.py | s3a-spatialaudio/VISR | 55f6289bc5058d4898106f3520e1a60644ffb3ab | [
"ISC"
] | null | null | null | src/python/packages/metadapter/processors/spread_processor.py | s3a-spatialaudio/VISR | 55f6289bc5058d4898106f3520e1a60644ffb3ab | [
"ISC"
] | 2 | 2019-08-11T12:53:07.000Z | 2021-06-22T10:08:08.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Sept 2 2016
@author: JF
"""
import math
#from metadata_processor_interface import MetadataProcessorInterface
from metadapter import SequenceProcessorInterface
def lin2dB( linVal ):
return 20.0 * math.log10( linVal )
def dB2lin( dbVal ):
return math.pow( 10.0, ... | 38.678832 | 117 | 0.515192 |
9f53370e6f63074038c643e5dfa3b9910e38fdef | 3,955 | py | Python | conans/test/integration/command/upload/upload_compression_test.py | Wonders11/conan | 28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8 | [
"MIT"
] | 6,205 | 2015-12-01T13:40:05.000Z | 2022-03-31T07:30:25.000Z | conans/test/integration/command/upload/upload_compression_test.py | Wonders11/conan | 28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8 | [
"MIT"
] | 8,747 | 2015-12-01T16:28:48.000Z | 2022-03-31T23:34:53.000Z | conans/test/integration/command/upload/upload_compression_test.py | Mattlk13/conan | 005fc53485557b0a570bb71670f2ca9c66082165 | [
"MIT"
] | 961 | 2015-12-01T16:56:43.000Z | 2022-03-31T13:50:52.000Z | import os
from conans.model.ref import ConanFileReference, PackageReference
from conans.test.assets.genconanfile import GenConanfile
from conans.test.utils.test_files import uncompress_packaged_files
from conans.test.utils.tools import TestClient
def test_reuse_uploaded_tgz():
client = TestClient(default_server_... | 41.197917 | 97 | 0.686726 |
204a83b3ac91639cabc937fab4bbe8a6e09c7ba8 | 127 | py | Python | tests/test_validators.py | zbendef/data-genie | 83e34855313179d9386530b33364b9dad0b58aab | [
"MIT"
] | 5 | 2019-03-28T02:58:26.000Z | 2019-12-15T23:11:44.000Z | tests/test_validators.py | zbendef/data-genie | 83e34855313179d9386530b33364b9dad0b58aab | [
"MIT"
] | 10 | 2020-05-21T01:30:30.000Z | 2021-04-22T05:39:19.000Z | tests/test_validators.py | zbendef/data-genie | 83e34855313179d9386530b33364b9dad0b58aab | [
"MIT"
] | 4 | 2020-05-21T17:46:17.000Z | 2021-05-03T23:32:38.000Z | from genie_pkg.validators import *
import pytest
def test_valid_cc():
cc = '5218933507687324'
assert is_valid_cc(cc)
| 15.875 | 34 | 0.740157 |
312f5d1724f4bd5cf024ce9f0408ddf390a63b5a | 622 | py | Python | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/package.py | pitabwire/opentelemetry-python-contrib | 7ca068d7ce565339f00a207852fa32792fe03e2b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/package.py | pitabwire/opentelemetry-python-contrib | 7ca068d7ce565339f00a207852fa32792fe03e2b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/package.py | pitabwire/opentelemetry-python-contrib | 7ca068d7ce565339f00a207852fa32792fe03e2b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.588235 | 74 | 0.754019 |
49ad1898f0349478693aa0377a7923e641632f27 | 88 | py | Python | output/models/ms_data/regex/re_e10_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/re_e10_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/re_e10_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.regex.re_e10_xsd.re_e10 import Doc
__all__ = [
"Doc",
]
| 14.666667 | 61 | 0.715909 |
169c742cc546554c008ccd3ebb7fbbd27eb2a786 | 207 | py | Python | tests/constants.py | m-mead/pip-tools | 37ce9e36d6033ede0667a1b293cd16843a85be4d | [
"BSD-3-Clause"
] | 4,085 | 2017-02-17T08:51:25.000Z | 2022-03-31T22:44:12.000Z | tests/constants.py | m-mead/pip-tools | 37ce9e36d6033ede0667a1b293cd16843a85be4d | [
"BSD-3-Clause"
] | 1,173 | 2017-02-17T16:50:44.000Z | 2022-03-31T20:14:19.000Z | tests/constants.py | astrojuanlu/pip-tools | 4776ac99fb8a396f6d2ed1a4370fd3b2e6875940 | [
"BSD-3-Clause"
] | 351 | 2017-02-17T17:33:08.000Z | 2022-03-30T13:33:38.000Z | import os
TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), "test_data")
MINIMAL_WHEELS_PATH = os.path.join(TEST_DATA_PATH, "minimal_wheels")
PACKAGES_PATH = os.path.join(TEST_DATA_PATH, "packages")
| 34.5 | 69 | 0.792271 |
219c9b316f483c8beb5a341575ee319a5f1ff3fb | 5,000 | py | Python | airflow/utils/email.py | Hartorn/airflow | a79e2d4c4aa105f3fac5ae6a28e29af9cd572407 | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | airflow/utils/email.py | Hartorn/airflow | a79e2d4c4aa105f3fac5ae6a28e29af9cd572407 | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | airflow/utils/email.py | vuppalli/airflow | dfe8337ca2d3ed173d9ecc112938271519792c40 | [
"Apache-2.0"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 34.013605 | 105 | 0.6626 |
e9d94340a64e36d2c46f108a85abca6cd122210a | 2,604 | py | Python | htm_rl/htm_rl/agents/q/cluster_memory_stats.py | cog-isa/htm-rl | baf5b67a11283d37165bf6a29d6808a234d6d98c | [
"MIT"
] | 1 | 2021-12-09T22:09:24.000Z | 2021-12-09T22:09:24.000Z | htm_rl/htm_rl/agents/q/cluster_memory_stats.py | cog-isa/htm-rl | baf5b67a11283d37165bf6a29d6808a234d6d98c | [
"MIT"
] | null | null | null | htm_rl/htm_rl/agents/q/cluster_memory_stats.py | cog-isa/htm-rl | baf5b67a11283d37165bf6a29d6808a234d6d98c | [
"MIT"
] | 1 | 2021-11-18T08:54:20.000Z | 2021-11-18T08:54:20.000Z | from htm_rl.common.utils import safe_divide
class ClusterMemoryStats:
clusters: int
added: int
matched: int
mismatched: int
removed: int
sum_similarity_threshold: float
sum_match_similarity: float
sum_match_cluster_trace: float
sum_mismatch_similarity: float
sum_removed_best_m... | 30.635294 | 89 | 0.687788 |
bad72b56341add60c088292bb58b7e9e59698427 | 31,808 | py | Python | rptools/rplibs/rpPathway.py | brsynth/rpTools | e8fc9952499927e63da90cb9af8c3370619d3627 | [
"MIT"
] | 4 | 2021-01-14T14:52:55.000Z | 2022-01-28T09:31:59.000Z | rptools/rplibs/rpPathway.py | brsynth/rpTools | e8fc9952499927e63da90cb9af8c3370619d3627 | [
"MIT"
] | 5 | 2021-01-18T09:24:48.000Z | 2021-12-17T06:47:07.000Z | rptools/rplibs/rpPathway.py | brsynth/rpTools | e8fc9952499927e63da90cb9af8c3370619d3627 | [
"MIT"
] | 2 | 2021-09-14T07:02:20.000Z | 2022-01-31T16:59:42.000Z | """A class to represent a metabolic pathway."""
# The MIT License (MIT)
#
# Copyright (c) 2018 Institute for Molecular Systems Biology, ETH Zurich.
# Copyright (c) 2019 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark
#
# Permission is hereby granted, free of charge, to any person... | 32.22695 | 103 | 0.546969 |
6f7ef6f15debf9f13874231b010b276cfa11d85f | 1,247 | py | Python | kivyx/colors.py | yunus-ceyhan/kivyx | f4348eb8c00ad62346b827d1ab6197f8f84cde8e | [
"MIT"
] | 1 | 2022-03-28T07:27:32.000Z | 2022-03-28T07:27:32.000Z | kivyx/colors.py | yunus-ceyhan/kivyx | f4348eb8c00ad62346b827d1ab6197f8f84cde8e | [
"MIT"
] | null | null | null | kivyx/colors.py | yunus-ceyhan/kivyx | f4348eb8c00ad62346b827d1ab6197f8f84cde8e | [
"MIT"
] | null | null | null | x_colors = {
"Light": {
"bg" : "#F4F4F8",
"card": "#FFFFFF",
"txt" : "#44484B",
"primary": "#CBE6F8",
"accent" : "#EFF4F8",
"opposite": "#EEEEEE",
"disabled": "#9B9B9B"
},
"Dark": {
"bg" : "#181C1F",
"card": "#212A31",
"... | 24.45098 | 30 | 0.385726 |
bbdf6192b68d1f6fafefea20b0f2cb1fbe7e36c2 | 431 | py | Python | xldlib/resources/parameters/__init__.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/resources/parameters/__init__.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/resources/parameters/__init__.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | '''
Resources/Parameters
____________________
User configurable (or potentially configurable) parameters,
as well as objects and functions to configure the parameters.
:copyright: (c) 2015 The Regents of the University of California.
:license: GNU GPL, see licenses/GNU GPLv3.txt for more detai... | 22.684211 | 69 | 0.686775 |
89b5b92dd1bd08c2e01ea570a1fb8b25bcfe9e54 | 5,959 | py | Python | treemenus/models.py | boardman/django-treemenus | b5a9957b887da4f36684dbe2bfd86ef61281ee3b | [
"BSD-3-Clause"
] | 1 | 2016-05-09T07:15:31.000Z | 2016-05-09T07:15:31.000Z | treemenus/models.py | boardman/django-treemenus | b5a9957b887da4f36684dbe2bfd86ef61281ee3b | [
"BSD-3-Clause"
] | null | null | null | treemenus/models.py | boardman/django-treemenus | b5a9957b887da4f36684dbe2bfd86ef61281ee3b | [
"BSD-3-Clause"
] | null | null | null | from itertools import chain
from django.db import models
from django.contrib.auth.models import Group
from django.utils.translation import ugettext_lazy
from django.utils.translation import ugettext as _
class MenuItem(models.Model):
parent = models.ForeignKey('self', verbose_name=ugettext_lazy('Parent'... | 41.964789 | 156 | 0.605806 |
3dcceade66b9fba3735c1642c241f6522c487288 | 5,543 | py | Python | spid_cie_oidc/authority/tests/mocked_responses.py | francescatronconi/spid-cie-oidc-django | 7244811a832e9ea486f6ce83cf0dbd6156478516 | [
"Apache-2.0"
] | null | null | null | spid_cie_oidc/authority/tests/mocked_responses.py | francescatronconi/spid-cie-oidc-django | 7244811a832e9ea486f6ce83cf0dbd6156478516 | [
"Apache-2.0"
] | null | null | null | spid_cie_oidc/authority/tests/mocked_responses.py | francescatronconi/spid-cie-oidc-django | 7244811a832e9ea486f6ce83cf0dbd6156478516 | [
"Apache-2.0"
] | null | null | null | from django.test import Client
from django.urls import reverse
from spid_cie_oidc.entity.models import FederationEntityConfiguration
from spid_cie_oidc.entity.jwtse import unpad_jwt_payload
from spid_cie_oidc.entity.exceptions import HttpError
from spid_cie_oidc.entity.tests.settings import ta_conf_data
from .settings... | 32.994048 | 88 | 0.575501 |
ede962bdea1f960067d8e658a2f9838e77cae0dc | 1,781 | py | Python | plugins/azure_compute/komand_azure_compute/actions/vm_in_subscription/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/azure_compute/komand_azure_compute/actions/vm_in_subscription/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/azure_compute/komand_azure_compute/actions/vm_in_subscription/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import komand
from .schema import VmInSubscriptionInput, VmInSubscriptionOutput, Input, Output
# Custom imports below
import requests
import json
from komand.exceptions import PluginException
class VmInSubscription(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name... | 32.981481 | 99 | 0.594048 |
d53dd570debba3ecd19318d7bb1acd11cb3f560a | 5,826 | py | Python | redshift_upload/upload.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | null | null | null | redshift_upload/upload.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | 1 | 2022-03-12T03:50:55.000Z | 2022-03-12T03:50:55.000Z | redshift_upload/upload.py | douglassimonsen/redshift_upload | e549c770538f022c0b90a983ca056f3e9c16c643 | [
"MIT"
] | null | null | null | try:
from db_interfaces import redshift # type: ignore
from credential_store import credential_store
import local_utilities # type: ignore
import redshift_utilities # type: ignore
import constants # type: ignore
except ModuleNotFoundError:
from .db_interfaces import redshift # type: ... | 36.4125 | 127 | 0.65242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.