hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91c0d5fbe053ee5c1bb9c0856a3af7575e8afe20 | 2,145 | py | Python | src/transform_label_rehaper.py | elangovana/character-embedding | e6bb2ff8922015b6213da5c7a3224712c5a0201e | [
"Apache-2.0"
] | null | null | null | src/transform_label_rehaper.py | elangovana/character-embedding | e6bb2ff8922015b6213da5c7a3224712c5a0201e | [
"Apache-2.0"
] | null | null | null | src/transform_label_rehaper.py | elangovana/character-embedding | e6bb2ff8922015b6213da5c7a3224712c5a0201e | [
"Apache-2.0"
] | null | null | null | ############################################################################
# * Copyright 2019 Amazon.com, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located ... | 31.544118 | 128 | 0.592541 |
91c0f23b10bcb1db62edfd5f6627f6523ce4983e | 8,125 | py | Python | experiments/old_tests/train_graphs.py | ericmjl/protein-convolutional-nets | 411f1fb8eab9cb6fecd850ca464e019d14adcb2e | [
"MIT"
] | 2 | 2017-04-07T04:04:00.000Z | 2018-02-23T20:02:34.000Z | experiments/old_tests/train_graphs.py | ericmjl/protein-convolutional-nets | 411f1fb8eab9cb6fecd850ca464e019d14adcb2e | [
"MIT"
] | null | null | null | experiments/old_tests/train_graphs.py | ericmjl/protein-convolutional-nets | 411f1fb8eab9cb6fecd850ca464e019d14adcb2e | [
"MIT"
] | null | null | null | """
In this script, we test the ability of a one convolutional layer network to
learn drug resistance value.
Without doing train/test splitting and cross-validation, this will always be
an overfitting of the data, hence the script name.
"""
from pin import pin
from joblib import Parallel, delayed
from graphfp.layers ... | 33.713693 | 79 | 0.646277 |
91c1163f8e61058dc9fd05f305970d5fc373756b | 1,586 | py | Python | tests/test_archive.py | guillaumevincent/dockersible | 1ad5d9007865f334ea5f79f538e8e622e3b99d5a | [
"MIT"
] | null | null | null | tests/test_archive.py | guillaumevincent/dockersible | 1ad5d9007865f334ea5f79f538e8e622e3b99d5a | [
"MIT"
] | null | null | null | tests/test_archive.py | guillaumevincent/dockersible | 1ad5d9007865f334ea5f79f538e8e622e3b99d5a | [
"MIT"
] | null | null | null | import filecmp
import os
import unittest
import shutil
from dockersible import archive
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
def same_folders(dcmp):
if dcmp.diff_files:
return False
for sub_dcmp in dcmp.subdirs.values():
return same_folders(sub_dcmp)
return True
class... | 31.72 | 106 | 0.699243 |
91c1562595b5b2834a4837ce2e949e42b85d0dda | 900 | py | Python | core/migrations/0002_auto_20190911_1002.py | DerrazSofiane/DjangoREST_To-Do_App | 5d2743ff8f20ff08d9e98e88a4ec35c7c29d9879 | [
"CC0-1.0"
] | null | null | null | core/migrations/0002_auto_20190911_1002.py | DerrazSofiane/DjangoREST_To-Do_App | 5d2743ff8f20ff08d9e98e88a4ec35c7c29d9879 | [
"CC0-1.0"
] | 8 | 2021-03-19T00:35:00.000Z | 2022-03-12T00:18:20.000Z | core/migrations/0002_auto_20190911_1002.py | DerrazSofiane/DjangoREST_To-Do_App | 5d2743ff8f20ff08d9e98e88a4ec35c7c29d9879 | [
"CC0-1.0"
] | null | null | null | import core.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='todomodel',
name='status',
... | 33.333333 | 143 | 0.602222 |
91c175419fcb580b0fb31a36737a18b77bec35bc | 687 | py | Python | src/gps_reader_pkg/folder_methods.py | AndrewWood94/WalkingSpeedPaper | 9a0f65569ff17ca342788ddc9916334c7fc10fca | [
"MIT"
] | null | null | null | src/gps_reader_pkg/folder_methods.py | AndrewWood94/WalkingSpeedPaper | 9a0f65569ff17ca342788ddc9916334c7fc10fca | [
"MIT"
] | null | null | null | src/gps_reader_pkg/folder_methods.py | AndrewWood94/WalkingSpeedPaper | 9a0f65569ff17ca342788ddc9916334c7fc10fca | [
"MIT"
] | null | null | null | import os
def create_folder(path):
"""Method to create path. Will also create parent folders if don't exist.
Args:
path (pathlib.Path): path to folder to create
"""
try:
path.mkdir(parents=True, exist_ok=False)
except FileExistsError:
print(f"{path} exists")
else:
... | 22.9 | 80 | 0.586608 |
91c17bca078c1c8e05926a4aa8df06f0c0d6c455 | 1,073 | py | Python | scons/templates/sid_mpi_options.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | scons/templates/sid_mpi_options.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | scons/templates/sid_mpi_options.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2020 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 33.53125 | 78 | 0.651445 |
91c1c6599954db93121e7fcaa308b1c54335b7e9 | 12,777 | py | Python | Score_AAA/game.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | Score_AAA/game.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | Score_AAA/game.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | from collections import deque
import json
import arcade
import time
from pyglet.gl import GL_NEAREST
from entities import Splash
from lane import Lane
from patterns import PatternGenerator
from score_screen import Score
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
class EnumGameState:
title = 0
game = 1
game_o... | 32.845758 | 88 | 0.540502 |
91c20b85d22e38560f79ddd14b9d7677a1af6e06 | 155 | py | Python | gquantlab/gquantlab/_frontend.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | 1 | 2021-12-24T06:24:21.000Z | 2021-12-24T06:24:21.000Z | gquantlab/gquantlab/_frontend.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | null | null | null | gquantlab/gquantlab/_frontend.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | 2 | 2021-11-02T09:14:59.000Z | 2022-01-05T21:43:47.000Z | #!/usr/bin/env python
# coding: utf-8
"""
Information about the frontend package of the widgets.
"""
module_name = "gquantlab"
module_version = "^0.1.0"
| 15.5 | 54 | 0.696774 |
91c20c96b79c3ff753b5659442a023956271bc3c | 1,096 | py | Python | tests/nwchem_tests/test_opt-rhf-scf.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | tests/nwchem_tests/test_opt-rhf-scf.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | tests/nwchem_tests/test_opt-rhf-scf.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | #Geometry optimization HF/6-31g* on water
import os
import sys
from ..utils import *
from ..addons import *
import qcdb
h2o = qcdb.set_molecule('''
O 0.000000000000 0.000000000000 -0.065638538099
H 0.000000000000 -0.757480611647 0.520865616174
H 0.000000000000 0.7574806... | 28.102564 | 87 | 0.624088 |
91c23b59cbb1d5c939441eeaea8bdfe090d1f295 | 32,601 | py | Python | src/alfasim_sdk/_internal/alfacase/schema.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | src/alfasim_sdk/_internal/alfacase/schema.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | src/alfasim_sdk/_internal/alfacase/schema.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | # fmt: off
##[[[cog
# import cog
# from alfasim_sdk import CaseDescription
# from alfasim_sdk._internal.alfacase.generate_schema import get_all_classes_that_needs_schema, generate_alfacase_schema
# cog.out("from strictyaml import Bool, Enum, Int, Map, MapPattern, Optional, Seq, Str, Float # noreorder")
# cog.out("\n\n"... | 47.732064 | 472 | 0.64679 |
91c24c9b867550f512db9f99f7473338352d5e9d | 12,495 | py | Python | tests/todo.py | tomschr/ics.py | f6cb12281bf78e210d51c6ff5bd324d8f2c01aef | [
"Apache-2.0"
] | null | null | null | tests/todo.py | tomschr/ics.py | f6cb12281bf78e210d51c6ff5bd324d8f2c01aef | [
"Apache-2.0"
] | null | null | null | tests/todo.py | tomschr/ics.py | f6cb12281bf78e210d51c6ff5bd324d8f2c01aef | [
"Apache-2.0"
] | null | null | null | import unittest
from datetime import datetime, datetime as dt, timedelta, timezone
from dateutil.tz import UTC as dateutil_tzutc
from ics.alarm.display import DisplayAlarm
from ics.grammar.parse import Container
from ics.icalendar import Calendar
from ics.todo import Todo
from .fixture import cal27, cal28, cal29, cal... | 34.902235 | 135 | 0.561745 |
91c27942d178896dd129ebf01e8197d1e8e1bde0 | 17,508 | py | Python | sunpy/map/compositemap.py | derdon/sunpy | 619102cd48c73a326c45263369446be9b74366e8 | [
"MIT"
] | null | null | null | sunpy/map/compositemap.py | derdon/sunpy | 619102cd48c73a326c45263369446be9b74366e8 | [
"MIT"
] | null | null | null | sunpy/map/compositemap.py | derdon/sunpy | 619102cd48c73a326c45263369446be9b74366e8 | [
"MIT"
] | null | null | null | """A Composite Map class
Author: `Keith Hughitt <keith.hughitt@nasa.gov>`
"""
from __future__ import absolute_import, print_function, division
import matplotlib.pyplot as plt
import astropy.units as u
from sunpy.map import GenericMap
from sunpy.util import expand_list
from sunpy.extern import six
from sunpy.extern... | 32.362292 | 103 | 0.569682 |
91c28147d19d0174524b89d0d0f9e73fe5984825 | 8,134 | py | Python | dhtsensor/sensor.py | kentwait/dhtsensor | 445408460f448413b022df4ec25d6ccf09c0411e | [
"MIT"
] | null | null | null | dhtsensor/sensor.py | kentwait/dhtsensor | 445408460f448413b022df4ec25d6ccf09c0411e | [
"MIT"
] | null | null | null | dhtsensor/sensor.py | kentwait/dhtsensor | 445408460f448413b022df4ec25d6ccf09c0411e | [
"MIT"
] | null | null | null | from collections import namedtuple
import time
import atexit
import pigpio
Reading = namedtuple('Reading', 'temp rh')
class Sensor(object):
def __init__(self, gpio_pin, powered_by=None):
"""Create a new DHT sensor object that reads from a given GPIO pin.
Parameters
----------
gpi... | 34.760684 | 99 | 0.448119 |
91c2846c5249190cc95373bffa16e97c438330b7 | 1,295 | py | Python | dev/tasks/internal/help_command.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | 12 | 2021-12-27T14:40:17.000Z | 2022-03-22T20:14:42.000Z | dev/tasks/internal/help_command.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | null | null | null | dev/tasks/internal/help_command.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | null | null | null | from typing import Any, Optional
from rich.table import Table
from schema import Or, Schema
from dev.config import config
from dev.console import console
from dev.task import InternalTask
class HelpCommand(InternalTask):
__schema__ = Schema(Or(None, str))
def up(self, args: Optional[Any], extra_args: Optio... | 31.585366 | 86 | 0.661004 |
91c292c7aeec0e9bdd7359abe350cdc69933bf41 | 9,812 | py | Python | carrot/objects.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 63 | 2017-10-12T19:38:17.000Z | 2022-02-21T15:56:17.000Z | carrot/objects.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 93 | 2017-10-13T06:17:14.000Z | 2022-03-02T14:25:40.000Z | carrot/objects.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 19 | 2018-03-26T08:33:13.000Z | 2022-03-17T04:33:49.000Z | import importlib
import json
import logging
import uuid
from typing import Tuple, Callable, Dict, Any, Union
import pika
from django.utils import timezone
class VirtualHost(object):
"""
A RabbitMQ virtual host
"""
def __init__(self,
url: str = None,
host: str = 'lo... | 32.706667 | 119 | 0.581635 |
91c2af0d01d3cf17a0d4529a91c89a4ada884ffc | 1,184 | py | Python | logging_config.py | MoAl78741/FortiGate-Config-Merger | 9e5b4829e2deae24c62e5b12902ec0120fe3d557 | [
"MIT"
] | null | null | null | logging_config.py | MoAl78741/FortiGate-Config-Merger | 9e5b4829e2deae24c62e5b12902ec0120fe3d557 | [
"MIT"
] | null | null | null | logging_config.py | MoAl78741/FortiGate-Config-Merger | 9e5b4829e2deae24c62e5b12902ec0120fe3d557 | [
"MIT"
] | null | null | null | from datetime import date
# Ref: https://scicomp.ethz.ch/public/manual/Python/3.4.3/howto-logging-cookbook.pdf
logs_target = "_logs/logfile_" + str(date.today()) + ".log"
logging_schema = {
"version": 1,
"formatters": {
"standard": {
"class": "logging.Formatter",
"format": "%(... | 27.534884 | 84 | 0.456926 |
91c2bb7b29221295b8364f3018361c81c7ec96d1 | 1,066 | py | Python | alipay/aop/api/domain/AlipayMerchantPayforprivilegePromotionplanQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayMerchantPayforprivilegePromotionplanQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayMerchantPayforprivilegePromotionplanQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayMerchantPayforprivilegePromotionplanQueryModel(object):
def __init__(self):
self._promotion_plan_id = None
@property
def promotion_plan_id(self):
return self._promo... | 26 | 85 | 0.660413 |
91c2e361f0bb095d31eaab531b536fdbb3919b85 | 14,833 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.222561 | 149 | 0.70242 |
91c309c78e0a937170f4cf3b5dc3bff6c2537cab | 2,712 | py | Python | SinGAN/models.py | cbosoft/SinGAN | c3c950ddf59ae57e4685adc555f5cb4723bd7e78 | [
"MIT"
] | null | null | null | SinGAN/models.py | cbosoft/SinGAN | c3c950ddf59ae57e4685adc555f5cb4723bd7e78 | [
"MIT"
] | null | null | null | SinGAN/models.py | cbosoft/SinGAN | c3c950ddf59ae57e4685adc555f5cb4723bd7e78 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
class ConvBlock(nn.Sequential):
def __init__(self, in_channel, out_channel, ker_size, padd, stride):
super().__init__()
self.add_module('conv',nn.Conv2d(in_channel ,out_channel,kernel_size=ker_size,stride=stride... | 31.534884 | 122 | 0.61615 |
91c32e589fff2c0bb0763f74afb910ad7b071c3a | 20,699 | py | Python | node_modules/dropbox/generator/stone/stone/backends/tsd_types.py | Hasunemiku2015/JojoTheOtokonoko | 8ea14531cb480f9b2d4164224e5513293cdc409b | [
"MIT"
] | 1 | 2020-08-28T21:40:16.000Z | 2020-08-28T21:40:16.000Z | node_modules/dropbox/generator/stone/stone/backends/tsd_types.py | Hasunemiku2015/JojoTheOtokonoko | 8ea14531cb480f9b2d4164224e5513293cdc409b | [
"MIT"
] | null | null | null | node_modules/dropbox/generator/stone/stone/backends/tsd_types.py | Hasunemiku2015/JojoTheOtokonoko | 8ea14531cb480f9b2d4164224e5513293cdc409b | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import json
import os
import re
import six
import sys
_MYPY = False
if _MYPY:
import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression
# Hack to get around some of Python 2's standard library mo... | 40.82643 | 100 | 0.600754 |
91c3309788edb5c21a6f2832b349eb05dcd12306 | 57 | py | Python | wavefront_pyformance/__init__.py | ruivapps/wavefront-pyformance | 8a6e3ee1e918b11e068efd44d69d0fbe01b2972a | [
"Apache-2.0"
] | null | null | null | wavefront_pyformance/__init__.py | ruivapps/wavefront-pyformance | 8a6e3ee1e918b11e068efd44d69d0fbe01b2972a | [
"Apache-2.0"
] | null | null | null | wavefront_pyformance/__init__.py | ruivapps/wavefront-pyformance | 8a6e3ee1e918b11e068efd44d69d0fbe01b2972a | [
"Apache-2.0"
] | null | null | null | """Wavefront PyFormance Plugin."""
__version__ = '0.9.2'
| 19 | 34 | 0.684211 |
91c34a9dac16d011c4b2192aa3d355230953ca44 | 9,949 | py | Python | dynafile/__init__.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | dynafile/__init__.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | dynafile/__init__.py | eruvanos/dynafile | 207425b073a963b01c677b697e74842b429c004a | [
"MIT"
] | null | null | null | import hashlib
import time
import warnings
from contextlib import contextmanager
from itertools import groupby
from pathlib import Path
from typing import Union, Optional, List, Callable, NamedTuple, Iterable
from atomicwrites import atomic_write
from sortedcontainers import SortedDict
from dynafile.dispatcher import... | 30.240122 | 111 | 0.59795 |
91c378fb2a7e3351860685b35c7f348b348db2e7 | 3,566 | py | Python | data/process_data.py | se-Laila/DRP | b3510b11792d41b3067445201a651da1eb7898a3 | [
"FTL",
"blessing"
] | null | null | null | data/process_data.py | se-Laila/DRP | b3510b11792d41b3067445201a651da1eb7898a3 | [
"FTL",
"blessing"
] | null | null | null | data/process_data.py | se-Laila/DRP | b3510b11792d41b3067445201a651da1eb7898a3 | [
"FTL",
"blessing"
] | null | null | null | import sys
import numpy as np
import pandas as pd
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
'''
INPUT
messages_filepath - path to the messages file
categories_filepath - - path to the categories file
OUTPUT
df - a dataset of a merged datas... | 32.418182 | 101 | 0.660965 |
91c395cf9553b76c0237ab86130a54446bbe8140 | 5,841 | py | Python | examples/multigpu_advtrain/utils_cifar.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 21 | 2019-06-07T17:05:30.000Z | 2022-02-07T03:25:15.000Z | examples/multigpu_advtrain/utils_cifar.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 1 | 2021-03-01T15:06:09.000Z | 2021-03-01T15:06:09.000Z | examples/multigpu_advtrain/utils_cifar.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 8 | 2019-06-11T03:06:29.000Z | 2022-01-18T04:18:27.000Z | """
https://github.com/renmengye/revnet-public/blob/master/resnet/data/cifar_input.py
MIT License
Copyright (c) 2017 Mengye Ren
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 restrictio... | 32.814607 | 81 | 0.720596 |
91c40e1680de611be166bd4c73f542acef1b4cef | 6,499 | py | Python | python_modules/dagster/dagster/daemon/backfill.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/backfill.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/daemon/backfill.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
from dagster import check
from dagster.core.errors import DagsterBackfillFailedError
from dagster.core.execution.backfill import (
BulkActionStatus,
PartitionBackfill,
submit_backfill_runs,
)
from dagster.core.instance import DagsterInstance
from dagster.core.storage.pipeli... | 40.874214 | 114 | 0.675796 |
91c439c99707acb1e5f94e84fcaec9e0049d191f | 7,888 | py | Python | dxc/ai/run_model/model_pipeline.py | Amarify/DXC-Industrialized-AI-Starter | 87e050e6871bfcd86f37c90ec597f035cb270744 | [
"Apache-2.0"
] | null | null | null | dxc/ai/run_model/model_pipeline.py | Amarify/DXC-Industrialized-AI-Starter | 87e050e6871bfcd86f37c90ec597f035cb270744 | [
"Apache-2.0"
] | null | null | null | dxc/ai/run_model/model_pipeline.py | Amarify/DXC-Industrialized-AI-Starter | 87e050e6871bfcd86f37c90ec597f035cb270744 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from tpot import TPOTRegressor
from tpot import TPOTClassifier
from sklearn.model_selection import train_test_split
from feature_engine import categorical_encoders as ce
from .interpret_model import Global_Model_Explanation
from .interpret_model import Explanation_Dashboard
from sklearn import prepr... | 47.233533 | 187 | 0.707784 |
91c43f9c0c46fbcb8509bfbce36875beea6e324a | 5,793 | py | Python | algorithms/indexing/basis_vector_search/combinations.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | algorithms/indexing/basis_vector_search/combinations.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | null | null | null | algorithms/indexing/basis_vector_search/combinations.py | elena-pascal/dials | c125d54b0aea4f83bec52918a589c95c45412232 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import logging
import math
from dxtbx.model import Crystal
from scitbx.array_family import flex
from dials.algorithms.indexing.compare_orientation_matrices import (
difference_rotation_matrix_axis_angle,
)
from dials.algorithms.indexing.symmetry im... | 36.433962 | 88 | 0.643881 |
91c4687fe5f1e82ee9acadbc64c6423338a88200 | 5,649 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.122137 | 383 | 0.695344 |
91c49c89223f9c94ce82831743ef9920edb18f41 | 7,500 | py | Python | mod.py | mpbagot/hsc-major-project-code | eaa69bf566b5b34ae7d4aa78504f97576fa2bb1c | [
"MIT"
] | 4 | 2018-04-17T11:55:06.000Z | 2021-02-25T16:03:47.000Z | mod.py | mpbagot/mata | eaa69bf566b5b34ae7d4aa78504f97576fa2bb1c | [
"MIT"
] | null | null | null | mod.py | mpbagot/mata | eaa69bf566b5b34ae7d4aa78504f97576fa2bb1c | [
"MIT"
] | null | null | null | """
mod.py
Module containing the Mod loading and Mod API code for the game
"""
# Import the Python3 standard libraries
import os
import sys
import importlib
from api.cmd import FailedCommand, MessageCommand
from api.entity import Pickup
# Initialise the separator for directories
dir_sep = '/' if sys.platform != 'win3... | 34.246575 | 127 | 0.590133 |
91c4b663cd3cffc717d3d93be3710bac287e8506 | 15,859 | py | Python | src/panels.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | src/panels.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | src/panels.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | import sdl2
from entity_types import EntityType
from text import Text
from view import FontSize
class Button:
"""Button that the user can click in the application window."""
def __init__(self, id, texture, relative_x = 0, relative_y = 0,
relative_width = 0, relative_height = 0):
"""I... | 36.881395 | 80 | 0.597642 |
91c4c007a35699dac3d32945e86cccea44051237 | 3,419 | py | Python | contrib/node/src/python/pants/contrib/node/subsystems/command.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | contrib/node/src/python/pants/contrib/node/subsystems/command.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | contrib/node/src/python/pants/contrib/node/subsystems/command.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import os
import subprocess
from collections import namedtuple
from pants.util.strutil import create_path_env_var
logger = logging.getLogger(__name__)
# TODO: Consider ... | 37.571429 | 97 | 0.720679 |
91c4cbb2aa377c1d995fc794cb390d253cb79732 | 914 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NC.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NC.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_NC.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. NC metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_NC = PhoneMetadata(id='NC', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{1,3}|3\\d{3}|5\\d{2}', possibl... | 83.090909 | 182 | 0.726477 |
91c4ef14cf334c431fd5780ce8d1b6dea17e6265 | 1,072 | py | Python | webpage/metadata.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | webpage/metadata.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | 10 | 2021-02-02T23:12:07.000Z | 2021-12-13T20:50:47.000Z | webpage/metadata.py | gfranzini/dig_ed_cat | 5f1a64109010e5366d28d0639f088a2e895c3488 | [
"MIT"
] | null | null | null | # this files contains basic metadata about the project. This data will be used
# (by default) in the base.html and index.html
PROJECT_METADATA = {
'title': 'Dig-Ed-Cat',
'author': 'Peter Andorfer, Ksenia Zaytseva, Greta Franzini',
'subtitle': 'Catalogue of Digital Editions',
'description': 'The Digital... | 48.727273 | 99 | 0.708955 |
91c4f7e17f1cc27ab28b76291eb4b12b5d13eecf | 350 | py | Python | grab-funcs.py | Plexical/pymod.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | 1 | 2016-06-13T19:17:03.000Z | 2016-06-13T19:17:03.000Z | grab-funcs.py | Plexical/pymod.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | 3 | 2017-05-10T08:29:20.000Z | 2018-02-07T20:57:16.000Z | grab-funcs.py | Plexical/pydoc.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | null | null | null | import sys
from pymod import index
from pymod.index import modules
from pymod.mappings import url
dom = index.domof('https://docs.python.org/3/library/functions.html')
for el in (el for el in dom.findAll('a', {'class': 'headerlink'})
if '-' not in el.attrs['href']):
sys.stdout.write("'{}', ".format(el.... | 31.818182 | 69 | 0.66 |
91c508940cc934da316fe348dd7dc6b2db779fcb | 2,364 | py | Python | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 44.603774 | 81 | 0.628173 |
91c50da13a85b0f39a9f325452add81fb0b18b80 | 572 | py | Python | tests/test_experiment_class.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | tests/test_experiment_class.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | 85 | 2021-09-20T12:08:53.000Z | 2022-03-30T12:48:06.000Z | tests/test_experiment_class.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | from unittest import TestCase
import dddm
class TestExperimentClass(TestCase):
"""See if we can init the Experiment class as we expect"""
def test_dummy_init(self):
class DummyExperiment(dddm.Experiment):
pass
dummy_experiment = DummyExperiment()
# dummy_experiment._check... | 26 | 62 | 0.681818 |
91c50fa56016b90348c1b1b49442cdf8e00ddf86 | 18,066 | py | Python | OPTIMIZE-Data_analyze.py | klion93/Exciting-Scripts-Tools | 90f12e9091bc005f7efcbc8d1d7402de8996da2d | [
"Apache-2.0"
] | null | null | null | OPTIMIZE-Data_analyze.py | klion93/Exciting-Scripts-Tools | 90f12e9091bc005f7efcbc8d1d7402de8996da2d | [
"Apache-2.0"
] | null | null | null | OPTIMIZE-Data_analyze.py | klion93/Exciting-Scripts-Tools | 90f12e9091bc005f7efcbc8d1d7402de8996da2d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%#
#%!% ---------------------------------- OPTIMIZE-analyze.py ---------------------------------- %!%#
#%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%... | 35.079612 | 99 | 0.414425 |
91c547ee739f7d829f45dab032315da55d9dece6 | 3,117 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/aio/_auto_rest_swagger_bat_header_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/aio/_auto_rest_swagger_bat_header_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/Expected/AcceptanceTests/HeaderLowLevel/headerlowlevel/aio/_auto_rest_swagger_bat_header_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.291667 | 114 | 0.69137 |
91c556f3bfe975072669c6d4cd380c597fa0df29 | 16,049 | py | Python | lib/googlecloudsdk/core/resource/resource_lex.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/resource/resource_lex.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/core/resource/resource_lex.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2015 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 ag... | 35.428256 | 80 | 0.644402 |
91c565307d13002933eab33a816a242b7953be1c | 3,718 | py | Python | cogs/owner.py | TheGenocides/robocord-1 | 4ed0339b13c2e0797d5e25a5117ffe1900604191 | [
"MIT"
] | 9 | 2021-09-16T03:39:42.000Z | 2022-01-11T23:02:17.000Z | cogs/owner.py | TheGenocides/robocord-1 | 4ed0339b13c2e0797d5e25a5117ffe1900604191 | [
"MIT"
] | 3 | 2021-09-16T18:19:29.000Z | 2021-12-01T16:19:48.000Z | cogs/owner.py | TheGenocides/robocord-1 | 4ed0339b13c2e0797d5e25a5117ffe1900604191 | [
"MIT"
] | 6 | 2021-09-18T03:32:19.000Z | 2022-01-26T12:20:35.000Z | """
The MIT License (MIT)
Copyright (c) 2021-present Pycord Development
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, ... | 36.097087 | 87 | 0.664874 |
91c56e21b0392ac13363ac8b223fcf6172eaf3c6 | 5,565 | py | Python | deep_utils/utils/dir_utils/main.py | Practical-AI/deep_utils | e6fb33ebdb2fc133c25d0e4647846c96ee805ea6 | [
"MIT"
] | 11 | 2021-05-26T09:29:17.000Z | 2021-11-02T15:58:34.000Z | deep_utils/utils/dir_utils/main.py | Practical-AI/deep_utils | e6fb33ebdb2fc133c25d0e4647846c96ee805ea6 | [
"MIT"
] | 15 | 2021-07-24T06:23:04.000Z | 2021-09-18T05:30:20.000Z | deep_utils/utils/dir_utils/main.py | Practical-AI/deep_utils | e6fb33ebdb2fc133c25d0e4647846c96ee805ea6 | [
"MIT"
] | 4 | 2021-07-20T09:36:08.000Z | 2021-09-18T08:31:17.000Z | import os
import shutil
from os.path import join
from typing import Tuple, List, Dict
def transfer_directory_items(in_dir, out_dir, transfer_list, mode='cp', remove_out_dir=False, skip_transfer=False):
print(f'starting to copying/moving from {in_dir} to {out_dir}')
if remove_out_dir or os.path.isdir(out_dir):... | 43.139535 | 118 | 0.595508 |
91c583f49649a4c52b9844c85943ba60e3b2897f | 1,390 | py | Python | opentok/endpoints.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | opentok/endpoints.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | opentok/endpoints.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | class Endpoints(object):
"""
For internal use.
Class that provides the endpoint urls
"""
def __init__(self, api_url, api_key):
self.api_url = api_url
self.api_key = api_key
def session_url(self):
url = self.api_url + '/session/create'
return url
def archive_... | 32.325581 | 97 | 0.584892 |
91c5b0bede2ad13d742cc7178d29586a06a0df2f | 2,833 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/update_chat_default_banned_rights.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/update_chat_default_banned_rights.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/update_chat_default_banned_rights.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 34.975309 | 123 | 0.64137 |
91c5b144072087bcca93e99a312e07b725141357 | 5,550 | py | Python | serie2/Console.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | serie2/Console.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | serie2/Console.py | Koopakiller/Edu-NLA | 8376557cab9f74cedd19ee1573a8c71d7e415dd4 | [
"MIT"
] | null | null | null | # Authors: Tom Lambert (lambertt) and Yuuma Odaka-Falush (odafaluy)
from decimal import Decimal
def print_separator3():
"""Prints a visual separator for Header 3"""
print("")
print("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -")
print("")
def print_separator2():
"""Prints a visu... | 32.080925 | 109 | 0.629189 |
91c614073c0bcb1e8b7c8415bf6e9641047349ef | 42,468 | py | Python | lingvo/core/quant_utils.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 4 | 2019-06-08T00:19:06.000Z | 2020-08-03T16:28:53.000Z | lingvo/core/quant_utils.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | null | null | null | lingvo/core/quant_utils.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 5 | 2018-12-11T08:05:16.000Z | 2020-05-30T03:40:13.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.687395 | 80 | 0.675473 |
91c61726fbf94a0614c73adebd071a802012cc50 | 2,121 | py | Python | energylossidentification/OptimizerBDT.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-01-29T07:24:14.000Z | 2022-03-16T10:05:25.000Z | energylossidentification/OptimizerBDT.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-07-03T00:31:10.000Z | 2021-09-10T07:45:01.000Z | energylossidentification/OptimizerBDT.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 5 | 2019-02-27T22:56:49.000Z | 2019-08-24T19:01:41.000Z | ###################################################################################################
#
# optimizerBDT.py
#
# Copyright (C) by Andreas Zoglauer.
# All rights reserved.
#
# Please see the file License.txt in the main repository for the copyright-notice.
#
################################################... | 30.73913 | 144 | 0.540783 |
91c61a8483bf7f644b4b87e890c9a86eb82be261 | 3,171 | py | Python | hytra/exporters/big_data_viewer.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/exporters/big_data_viewer.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/exporters/big_data_viewer.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import argparse
if __name__ == "__main__":
"""
Transform tracking result and ilastik raw + segmentation data to the BigDataViewer format
"""
parser = argparse.ArgumentParser(
description="Transform tracking result and ilastik raw"
"+ segmentation data... | 29.915094 | 101 | 0.623463 |
91c6387f227fd1f4fd9c39d1cdad2760a887de17 | 44,027 | py | Python | src/sage/modular/arithgroup/congroup_gammaH.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/arithgroup/congroup_gammaH.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/arithgroup/congroup_gammaH.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Congruence Subgroup `\Gamma_H(N)`
AUTHORS:
- Jordi Quer
- David Loeffler
"""
from __future__ import absolute_import
################################################################################
#
# Copyright (C) 2009, The Sage Group -- http://www.sagemath.org/
#
# Distributed u... | 31.719741 | 292 | 0.498785 |
91c63eae113745ea5412d705f111da78320f4b72 | 3,119 | py | Python | vendor/pywork4core/django_app/tests/test_http.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | 1 | 2015-09-16T23:11:55.000Z | 2015-09-16T23:11:55.000Z | vendor/pywork4core/django_app/tests/test_http.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | 34 | 2019-02-03T06:02:55.000Z | 2020-03-27T13:14:50.000Z | vendor/pywork4core/django_app/tests/test_http.py | olivierlefloch/django-short-urls | 7d6c7f37e2678060d1b36cbb00cbeebb2278cbf2 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
import json
from django.http import HttpResponse
from mock import patch
import requests
from django_app.test import PyW4CTestCase
# pylint 1.7.1 gets confused and thinks `http` is a standard python module. Not in python 2.7.x…
from http.utils import ( # pylint... | 38.036585 | 109 | 0.654697 |
91c686f6728c5a2ebd09fb4fd9a2ee288adb0104 | 7,400 | py | Python | ThirdParty/Twisted/twisted/internet/test/test_epollreactor.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 3 | 2016-02-01T02:29:51.000Z | 2020-09-04T17:19:24.000Z | ThirdParty/Twisted/twisted/internet/test/test_epollreactor.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 4 | 2017-02-19T23:58:13.000Z | 2019-11-01T15:31:22.000Z | ThirdParty/Twisted/twisted/internet/test/test_epollreactor.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 6 | 2017-02-13T09:11:02.000Z | 2021-06-29T11:22:18.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.internet.epollreactor}.
"""
from __future__ import division, absolute_import
from twisted.trial.unittest import TestCase
try:
from twisted.internet.epollreactor import _ContinuousPolling
except ImportError:
_Conti... | 29.718876 | 78 | 0.624324 |
91c68e2b4812dab250eea5c09ac718c4b3ae3665 | 836 | py | Python | data/generate_input_list.py | ywyue/ASIS | fdd3e7fa6701799efcf83d9a464ff1608b5d7694 | [
"MIT"
] | 269 | 2019-02-27T01:36:12.000Z | 2021-12-24T08:56:10.000Z | data/generate_input_list.py | ywyue/ASIS | fdd3e7fa6701799efcf83d9a464ff1608b5d7694 | [
"MIT"
] | 44 | 2019-03-01T08:25:01.000Z | 2022-03-02T06:55:57.000Z | data/generate_input_list.py | ywyue/ASIS | fdd3e7fa6701799efcf83d9a464ff1608b5d7694 | [
"MIT"
] | 64 | 2019-02-28T04:05:42.000Z | 2021-08-19T02:42:38.000Z | import os
import glob
h5_dir = "indoor3d_ins_seg_hdf5/"
for i in range(6):
filter_id = i + 1
# For training
train_fold_pattern = "Area_[!{}]*.h5".format(filter_id)
dst_list_path = "train_hdf5_file_list_woArea{}.txt".format(filter_id)
h5_files = glob.glob(os.path.join(h5_dir + train... | 24.588235 | 74 | 0.616029 |
91c6b0211289d5420bd75a47ef4d2a100f071ff5 | 10,239 | py | Python | acme/agents/tf/sac/model.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | null | null | null | acme/agents/tf/sac/model.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | null | null | null | acme/agents/tf/sac/model.py | novatig/acme | 7774e4a22519d8b05951320864e5308974eaad2a | [
"Apache-2.0"
] | null | null | null | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 38.492481 | 80 | 0.683563 |
91c6c946eca641ea3889e3b9dbd3c966f407485b | 1,003 | py | Python | Ranking/generate_qrel.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 172 | 2019-05-15T21:50:45.000Z | 2022-03-23T21:16:35.000Z | Ranking/generate_qrel.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 23 | 2019-06-14T20:47:56.000Z | 2022-03-13T03:23:55.000Z | Ranking/generate_qrel.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 32 | 2019-07-01T04:54:02.000Z | 2022-03-01T15:46:11.000Z | import pandas as pd
import sys
relevant_train = {}
relevant_dev = {}
relevant_eval = {}
eval = pd.read_json('eval_v2.1_hidden.json')
train = pd.read_json('train_v2.1.json')
dev = pd.read_json('dev_v2.1.json')
for row in train.iterrows():
query_id = row[1]['query_id']
for passage in row[1]['passages']:
... | 27.108108 | 66 | 0.645065 |
91c7233f9051c291f3a5b9a0dd9f718c8386d971 | 3,025 | py | Python | mmcls/core/evaluation/mean_ap.py | ChaseMonsterAway/mmclassification | 85d26b8eb2fc799599c42ca33831c40707311bd7 | [
"Apache-2.0"
] | null | null | null | mmcls/core/evaluation/mean_ap.py | ChaseMonsterAway/mmclassification | 85d26b8eb2fc799599c42ca33831c40707311bd7 | [
"Apache-2.0"
] | null | null | null | mmcls/core/evaluation/mean_ap.py | ChaseMonsterAway/mmclassification | 85d26b8eb2fc799599c42ca33831c40707311bd7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import logging
import numpy as np
import torch
def average_precision(pred, target):
r"""Calculate the average precision for a single class.
AP summarizes a precision-recall curve as the weighted mean of maximum
precisions obtained for any r'>r, where r is ... | 32.880435 | 99 | 0.626116 |
91c73809b9ccdf129089921c1d8b7293e38e558f | 8,566 | py | Python | vyperlogix/zip/secure.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/zip/secure.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/zip/secure.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | import os,sys
from vyperlogix.enum import Enum
from vyperlogix.misc import _utils
__copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
ht... | 42.83 | 164 | 0.685618 |
91c743c248c7de6a174eb8abb088da96970fcae8 | 4,296 | py | Python | register_face.py | YunYang1994/CodeFun | 36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068 | [
"MIT"
] | 150 | 2019-06-19T03:54:40.000Z | 2019-10-21T07:09:02.000Z | register_face.py | YunYang1994/cv-notebooks | 36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068 | [
"MIT"
] | 7 | 2019-11-26T07:27:42.000Z | 2020-04-02T03:35:29.000Z | register_face.py | YunYang1994/cv-notebooks | 36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068 | [
"MIT"
] | 25 | 2019-11-27T11:07:56.000Z | 2020-03-19T15:44:20.000Z | #! /usr/bin/env python
# coding=utf-8
#================================================================
# Copyright (C) 2020 * Ltd. All rights reserved.
#
# Editor : VIM
# File name : register_face.py
# Author : YunYang1994
# Created date: 2020-02-23 22:09:11
# Description :
#
#=================... | 34.926829 | 100 | 0.547253 |
91c75cf4717db0940c274f8bfc8b4b5c1ec8d04c | 1,403 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/reservedwordslowlevel/rest/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/reservedwordslowlevel/rest/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/ReservedWordsLowLevel/reservedwordslowlevel/rest/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 53.961538 | 94 | 0.738418 |
91c794c4bf46295bea8e9b18b94a4347c7a96c6a | 1,351 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/network_profile.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/network_profile.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/network_profile.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.552632 | 78 | 0.588453 |
91c7de638d9fb83d6e4076dc243952bde8e47d78 | 39,173 | py | Python | silx/gui/data/NXdataWidgets.py | woutdenolf/silx | b590bece15588792a0ff41a71301975a63be8e09 | [
"CC0-1.0",
"MIT"
] | null | null | null | silx/gui/data/NXdataWidgets.py | woutdenolf/silx | b590bece15588792a0ff41a71301975a63be8e09 | [
"CC0-1.0",
"MIT"
] | null | null | null | silx/gui/data/NXdataWidgets.py | woutdenolf/silx | b590bece15588792a0ff41a71301975a63be8e09 | [
"CC0-1.0",
"MIT"
] | null | null | null | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2017-2020 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 36.44 | 91 | 0.604575 |
91c7ef2dc3c44abc0e8260c4dd13c96c91a596bb | 8,674 | py | Python | detection/core/loss/losses.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 1 | 2021-08-12T06:51:29.000Z | 2021-08-12T06:51:29.000Z | detection/core/loss/losses.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 3 | 2021-04-05T08:04:39.000Z | 2021-11-12T19:16:26.000Z | detection/core/loss/losses.py | HirataYurina/cascade-rcnn-tf2.2 | f756b811ab31c9dab2a8f8afe68f46465422f64b | [
"MIT"
] | 1 | 2021-09-06T06:05:31.000Z | 2021-09-06T06:05:31.000Z | # -*- coding:utf-8 -*-
# author:栗山未来ii
# e-mail:1353593259@qq.com
# datetime:1993/12/01
# filename:aaa.py
# software: PyCharm
import tensorflow as tf
import numpy as np
layers = tf.keras.layers
losses = tf.keras.losses
class SmoothL1Loss(layers.Layer):
def __init__(self, rho=1):
super(SmoothL1Loss, self... | 37.713043 | 112 | 0.59442 |
91c83b785c7965f3e20ca0219613c58c25ec6c62 | 2,615 | py | Python | src/odin/odin/cleanup.py | Interactions-AI/odin | 94c593a98a0dc68c12f3062edbff34e7da5c4d8a | [
"Apache-2.0"
] | 4 | 2020-12-15T15:57:14.000Z | 2020-12-16T21:52:23.000Z | src/odin/odin/cleanup.py | Interactions-AI/odin | 94c593a98a0dc68c12f3062edbff34e7da5c4d8a | [
"Apache-2.0"
] | 2 | 2021-03-15T02:49:56.000Z | 2021-03-27T12:42:38.000Z | src/odin/odin/cleanup.py | Interactions-AI/odin | 94c593a98a0dc68c12f3062edbff34e7da5c4d8a | [
"Apache-2.0"
] | 5 | 2020-12-15T19:09:00.000Z | 2021-04-21T20:40:38.000Z | """Cleanup odin jobs
"""
import os
import shutil
import argparse
from collections import namedtuple
from itertools import chain
from typing import List, Optional, Set
from baseline.utils import exporter, read_config_stream
from mead.utils import convert_path
from odin import LOGGER
from odin.k8s import KubernetesTaskM... | 31.890244 | 111 | 0.671511 |
91c85efd8815e94a9b7ffdcc86230cef1821f16a | 46,204 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.662973 | 198 | 0.665375 |
91c85f991f975f97e72d7ad2be677696c5fb85ad | 46 | py | Python | exifpy/version.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | 1 | 2018-01-23T22:48:16.000Z | 2018-01-23T22:48:16.000Z | exifpy/version.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | null | null | null | exifpy/version.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | null | null | null | """
Version number
"""
__version__ = '1.2.1'
| 7.666667 | 21 | 0.586957 |
91c863f4664cd4de919ee9b59fbe02b777457fa0 | 8,111 | py | Python | src/spaceone/inventory/service/cloud_service_type_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/service/cloud_service_type_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/service/cloud_service_type_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | from spaceone.core.service import *
from spaceone.inventory.manager.cloud_service_type_manager import CloudServiceTypeManager
from spaceone.inventory.manager.collection_data_manager import CollectionDataManager
from spaceone.inventory.error import *
@authentication_handler
@authorization_handler
@event_handler
class ... | 37.37788 | 115 | 0.517569 |
91c8765c0c0f948520a2b85c4d55e3bf66da8944 | 4,548 | py | Python | tests/fixtures/bottle_app/app.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 7 | 2020-09-23T15:27:09.000Z | 2022-03-20T19:31:41.000Z | tests/fixtures/bottle_app/app.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 160 | 2020-07-06T17:58:35.000Z | 2022-03-30T13:06:07.000Z | tests/fixtures/bottle_app/app.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 10 | 2020-07-06T18:05:10.000Z | 2022-03-12T21:20:11.000Z | from bottle import Bottle, static_file
from pathlib import Path
STATIC_PATH = Path(__file__).parent / 'static'
app = Bottle()
@app.route('/')
def index():
return """
<html>
<head>
<title>Hello world app</title>
</head>
<body>
<h3>Hello world! This is a home pa... | 49.434783 | 1,940 | 0.566623 |
91c8822353082846348177aa0f18902c02e58ad4 | 464 | py | Python | subt/artf_utils.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | subt/artf_utils.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | subt/artf_utils.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | EXTINGUISHER = 'TYPE_EXTINGUISHER'
BACKPACK = 'TYPE_BACKPACK'
PHONE = 'TYPE_PHONE'
DRILL = 'TYPE_DRILL'
RESCUE_RANDY = 'TYPE_RESCUE_RANDY'
VENT = 'TYPE_VENT'
GAS = 'TYPE_GAS'
HELMET = 'TYPE_HELMET'
ROPE = 'TYPE_ROPE'
CUBE = 'TYPE_CUBE'
NAME2IGN = {
'survivor': RESCUE_RANDY,
'backpack': BACKPACK,
'phone': ... | 19.333333 | 38 | 0.657328 |
91c8899d8f1838fcf9c8b5454d0182516486710d | 5,317 | py | Python | src/pathme/reactome/utils.py | brucetony/PathMe | c7d758ff76f6787a4eb349b95f9c06bf1afb0754 | [
"Apache-2.0"
] | null | null | null | src/pathme/reactome/utils.py | brucetony/PathMe | c7d758ff76f6787a4eb349b95f9c06bf1afb0754 | [
"Apache-2.0"
] | null | null | null | src/pathme/reactome/utils.py | brucetony/PathMe | c7d758ff76f6787a4eb349b95f9c06bf1afb0754 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module has utilities method for parsing, handling WikiPathways RDF and data."""
import logging
import tarfile
from typing import List, Tuple, Union
from bio2bel_chebi import Manager as ChebiManager
from bio2bel_hgnc import Manager as HgncManager
from bio2bel_hgnc.models import HumanGe... | 33.651899 | 109 | 0.642091 |
91c889db3eb267425c0a16101b91647b8fe22bd8 | 92,424 | py | Python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_07_01/operations/_iot_hub_resource_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_07_01/operations/_iot_hub_resource_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2017_07_01/operations/_iot_hub_resource_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.967922 | 254 | 0.674176 |
91c8c816f785f573779fc20c7023835d82f5aded | 3,668 | py | Python | PyQuante/fermi_dirac.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | null | null | null | PyQuante/fermi_dirac.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | null | null | null | PyQuante/fermi_dirac.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | 1 | 2022-01-07T19:20:27.000Z | 2022-01-07T19:20:27.000Z | """\
fermi_dirac.py: Utilities for finite temperature Fermi-Dirac occupations.
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE tha... | 29.344 | 74 | 0.627863 |
91c8dfe404429261803cc8c8c5819be62dc3ac9b | 753 | py | Python | DHT12.py | leszek-wojcik/DIY-Waste-Water-Controller | 224ce296781d2788a8a23ad3b85940fee196c38a | [
"MIT"
] | null | null | null | DHT12.py | leszek-wojcik/DIY-Waste-Water-Controller | 224ce296781d2788a8a23ad3b85940fee196c38a | [
"MIT"
] | null | null | null | DHT12.py | leszek-wojcik/DIY-Waste-Water-Controller | 224ce296781d2788a8a23ad3b85940fee196c38a | [
"MIT"
] | null | null | null | from machine import Pin, I2C
import time
import network
class DHT12:
def __init__(self, i2c, addr=0x5c):
self.i2c = i2c
self.addr = addr
self.buf = bytearray(5)
def measure(self):
buf = self.buf
try:
self.i2c.readfrom_mem_into(self.addr, 0, buf)
i... | 24.290323 | 68 | 0.492696 |
91c8e00e00978fce33900a3a6eb9dcf864a14fdc | 145 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 33 | 2020-02-05T16:18:32.000Z | 2022-03-21T14:08:04.000Z | datadog_checks_dev/datadog_checks/dev/tooling/templates/check/{check_name}/datadog_checks/{check_name}/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 7 | 2020-03-10T13:21:39.000Z | 2021-03-11T07:16:44.000Z | {license_header}from .__about__ import __version__
from .{check_name} import {check_class}
__all__ = [
'__version__',
'{check_class}'
]
| 18.125 | 50 | 0.717241 |
91c926fe6fb4158376ff8090197e2621c209af4f | 387 | py | Python | iris_sdk/models/data/feature_dlda.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/data/feature_dlda.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/data/feature_dlda.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.base_resource import BaseData
from iris_sdk.models.data.address import Address
from iris_sdk.models.data.listing_name import ListingName
from iris_sdk.models.maps.feature_dlda import FeatureDldaMap
class FeatureDlda(FeatureDldaMap, BaseData):
def __init__(self):
... | 32.25 | 60 | 0.788114 |
91c94f63b74b47f38763cbb5c09343b245668e9f | 646 | py | Python | test/runtime/frontend_test/chainer_test/tanh_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | test/runtime/frontend_test/chainer_test/tanh_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | test/runtime/frontend_test/chainer_test/tanh_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | import chainer
import numpy as np
from test.util import generate_kernel_test_case, wrap_template
from webdnn.frontend.chainer.converter import ChainerConverter
@wrap_template
def template(description: str = ""):
vx = chainer.Variable(np.random.rand(2, 5, 6, 8).astype(np.float32))
vy = chainer.functions.tanh(... | 22.275862 | 72 | 0.662539 |
91c9853661ee0a874bffa503e5cdc74fb234e4fe | 656 | py | Python | free-speech-django/app/migrations/0007_generalsetting.py | BerkeleyAutomation/free-speech | 5e046d1f856deb13ff8fd1a68e861d687fdc8705 | [
"MIT"
] | null | null | null | free-speech-django/app/migrations/0007_generalsetting.py | BerkeleyAutomation/free-speech | 5e046d1f856deb13ff8fd1a68e861d687fdc8705 | [
"MIT"
] | null | null | null | free-speech-django/app/migrations/0007_generalsetting.py | BerkeleyAutomation/free-speech | 5e046d1f856deb13ff8fd1a68e861d687fdc8705 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-04 21:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pcari', '0006_auto_20160804_2130'),
]
operations = [
migrations.CreateModel(... | 28.521739 | 131 | 0.60061 |
91c9d70ad86ebca9e2780604f806543b6213e88e | 4,600 | py | Python | var/spack/repos/builtin/packages/openldap/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/openldap/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/openldap/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Openldap(AutotoolsPackage):
"""
OpenLDAP Software is an open source implementation of ... | 42.990654 | 104 | 0.642174 |
91c9ed3fce8ab52b2c7616cb11278e5bc60977d2 | 535 | py | Python | apps/core/models/attachment.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | apps/core/models/attachment.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | apps/core/models/attachment.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | from django.db import models
from ara.db.models import MetaDataModel
class Attachment(MetaDataModel):
class Meta(MetaDataModel.Meta):
verbose_name = '첨부파일'
verbose_name_plural = '첨부파일 목록'
file = models.FileField(
upload_to='files',
verbose_name='링크',
max_length=200,
... | 19.814815 | 39 | 0.609346 |
91ca0816bb51e8d88580e124cc12b43586fa850d | 935 | py | Python | src/test/utils.py | thedemons/pydoc-markdown | 83339893d403caa58c6810973efeb0415b0daa91 | [
"MIT"
] | 333 | 2015-10-27T12:27:41.000Z | 2022-03-23T01:09:22.000Z | src/test/utils.py | thedemons/pydoc-markdown | 83339893d403caa58c6810973efeb0415b0daa91 | [
"MIT"
] | 211 | 2015-08-11T14:31:33.000Z | 2022-03-30T21:21:33.000Z | src/test/utils.py | thedemons/pydoc-markdown | 83339893d403caa58c6810973efeb0415b0daa91 | [
"MIT"
] | 120 | 2016-02-09T00:27:44.000Z | 2022-03-29T10:53:22.000Z |
import re
import typing as t
from pathlib import Path
import yaml
class Case(t.NamedTuple):
filename: Path
config: t.Dict[str, t.Any]
code: str
output: str
def __repr__(self) -> str:
return f'Case(filename={str(self.filename)!r})'
def assert_text_equals(a: str, b: str) -> None:
assert '\n'.join([x... | 28.333333 | 110 | 0.657754 |
91ca17f4172d3695aca0534fce6acfa52ef0e005 | 1,187 | py | Python | pymite/__init__.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | 4 | 2016-09-25T17:25:41.000Z | 2019-12-28T06:25:10.000Z | pymite/__init__.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | null | null | null | pymite/__init__.py | damnit/pymite | 1e9b9bf6aef790af2d8781f9f77c098c54ca0342 | [
"MIT"
] | 2 | 2017-09-23T14:55:59.000Z | 2018-10-28T09:18:14.000Z | # -*- coding: utf-8 -*-
# File: __init__.py
""" adapter factory"""
__author__ = 'Otto Hockel'
__docformat__ = 'plaintext'
from pymite.adapters import (
Tracker, Daily, Users, Projects, Customers, TimeEntries, Services
)
class Mite(object):
""" API Factory that setups and returns the adapters
"""
... | 22.826923 | 69 | 0.658804 |
91ca1965c399bfe468ea610281c9014dacc8f714 | 3,473 | py | Python | pysimt/utils/device.py | welvin21/pysimt | 6250b33dc518b3195da4fc9cc8d32ba7ada958c0 | [
"MIT"
] | 420 | 2017-12-18T11:48:44.000Z | 2022-01-06T09:04:53.000Z | pysimt/utils/device.py | welvin21/pysimt | 6250b33dc518b3195da4fc9cc8d32ba7ada958c0 | [
"MIT"
] | 22 | 2017-12-18T14:31:29.000Z | 2021-07-13T11:37:44.000Z | pysimt/utils/device.py | welvin21/pysimt | 6250b33dc518b3195da4fc9cc8d32ba7ada958c0 | [
"MIT"
] | 66 | 2017-12-18T15:31:38.000Z | 2021-08-05T11:15:17.000Z | import re
import os
import shutil
import subprocess
import torch
DEVICE = None
DEVICE_IDS = None
class DeviceManager:
__errors = {
'BadDeviceFormat': 'Device can be cpu, gpu or [N]gpu, i.e. 2gpu',
'NoDevFiles': 'Make sure you requested a GPU resource from your cluster.',
'NoSMI': 'nvidia... | 34.04902 | 86 | 0.564066 |
91ca2a33e86881724c13748cc991bd6c50ae61e0 | 1,196 | py | Python | tests/test_thread_event_dispatcher.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | null | null | null | tests/test_thread_event_dispatcher.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | 4 | 2021-05-02T17:33:19.000Z | 2021-05-16T18:53:51.000Z | tests/test_thread_event_dispatcher.py | Aesonus/TkLife | 8e8f585be7f522134b9a5746b22185c2394d3d8d | [
"MIT"
] | null | null | null | from _pytest.python_api import raises
from tklife.behaviors import ThreadEvent, ThreadEventDispatcher
import pytest
class Listened(Exception):
pass
class ShouldNotHaveListened(Exception):
pass
class Event(ThreadEvent):
pass
class NotListenedEvent(ThreadEvent):
pass
@pytest.fixture(params=[((), {}),... | 29.9 | 77 | 0.743311 |
91ca384001df1c76322584bfdee5e269fe02a21e | 2,454 | py | Python | draalcore/auth/registration/actions.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2017-04-25T10:54:55.000Z | 2017-04-25T10:54:55.000Z | draalcore/auth/registration/actions.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2022-02-10T06:48:36.000Z | 2022-02-10T06:48:36.000Z | draalcore/auth/registration/actions.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""User registration actions"""
# System imports
from django.conf import settings
from django.db import transaction
from collections import OrderedDict
from django.contrib.auth.models import User
from django.template.loader import render_to_string
# Project imports
from d... | 37.181818 | 101 | 0.723309 |
91ca5d16187bd41203f5eb3c7b13ad8f463b2cc1 | 3,794 | py | Python | kglib/kgcn_data_loader/encoding/standard_encode.py | graknlabs/research | ae3ee07106739efd10f0627058210038ab5956d3 | [
"Apache-2.0"
] | 13 | 2018-09-25T13:29:08.000Z | 2018-12-10T11:04:38.000Z | kglib/kgcn_data_loader/encoding/standard_encode.py | graknlabs/research | ae3ee07106739efd10f0627058210038ab5956d3 | [
"Apache-2.0"
] | 23 | 2018-09-17T20:31:44.000Z | 2018-12-14T11:21:52.000Z | kglib/kgcn_data_loader/encoding/standard_encode.py | graknlabs/research | ae3ee07106739efd10f0627058210038ab5956d3 | [
"Apache-2.0"
] | 1 | 2018-09-25T15:56:32.000Z | 2018-09-25T15:56:32.000Z | #
# Copyright (C) 2021 Vaticle
#
# 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, Versi... | 33.875 | 131 | 0.6932 |
91ca6139ec0c394735fd9b38eabb0a501f9cb9e0 | 1,970 | py | Python | capnpy/testing/compiler/test_evolution.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 1 | 2019-05-29T19:47:53.000Z | 2019-05-29T19:47:53.000Z | capnpy/testing/compiler/test_evolution.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | null | null | null | capnpy/testing/compiler/test_evolution.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 4 | 2018-01-28T23:44:41.000Z | 2019-09-28T17:50:14.000Z | import py
from capnpy.testing.compiler.support import CompilerTest
from capnpy.message import loads, dumps
class TestEvolution(CompilerTest):
def test_add_data_field(self):
schema = """
@0xbf5147cbbecf40c1;
struct Old {
x @0 :Int64;
y @1 :Int64;
... | 28.142857 | 56 | 0.464975 |
91caac929c3e189ab1985bac8f2056c5c200150f | 5,862 | py | Python | tests/test_lexer.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_lexer.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/test_lexer.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests the xonsh lexer."""
from __future__ import unicode_literals, print_function
import os
import sys
from collections import Sequence
sys.path.insert(0, os.path.abspath('..')) # FIXME
from pprint import pformat
import pytest
try:
from ply.lex import LexToken
except ImportError:
f... | 28.318841 | 78 | 0.560901 |
91cac7a4de960f1bc0d13a1454a4b49a1fe187c6 | 164 | py | Python | scripts/userSetup.py | robertjoosten/maya-retarget-blend-shape | 00d5dcfb1f603928c9b1477c4271ab38e1d573d0 | [
"MIT"
] | 6 | 2021-12-18T23:39:26.000Z | 2022-03-24T21:47:39.000Z | scripts/userSetup.py | robertjoosten/maya-retarget-blend-shape | 00d5dcfb1f603928c9b1477c4271ab38e1d573d0 | [
"MIT"
] | null | null | null | scripts/userSetup.py | robertjoosten/maya-retarget-blend-shape | 00d5dcfb1f603928c9b1477c4271ab38e1d573d0 | [
"MIT"
] | 5 | 2021-12-22T02:51:58.000Z | 2022-03-19T06:52:49.000Z | from maya import cmds
def main():
from transfer_blend_shape import install
install.execute()
if not cmds.about(batch=True):
cmds.evalDeferred(main)
| 14.909091 | 44 | 0.72561 |
91cae86b54af00ae182523294a524f99950be851 | 16,818 | py | Python | geoapps/simpegEM1D/Survey.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | geoapps/simpegEM1D/Survey.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | geoapps/simpegEM1D/Survey.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | null | null | null | from geoapps.simpegPF import Maps, Survey, Utils
import numpy as np
import scipy.sparse as sp
from scipy.constants import mu_0
from .EM1DAnalytics import ColeCole
from .DigFilter import (
transFilt,
transFiltImpulse,
transFiltInterp,
transFiltImpulseInterp,
)
from .Waveform import CausalConv
from scipy.... | 32.034286 | 85 | 0.530444 |
91caf7501a90d3dccd699001242245a686a0dc85 | 7,238 | py | Python | xos/tosca/tests/deploymenttest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/tosca/tests/deploymenttest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | 5 | 2020-06-05T17:47:15.000Z | 2021-09-23T23:21:27.000Z | xos/tosca/tests/deploymenttest.py | pan2za/xos | c2a4da2ccaa12360b2718be303b247866aefdfe6 | [
"Apache-2.0"
] | null | null | null | from basetest import BaseToscaTest
from core.models import Deployment, Image, User, DeploymentPrivilege
class DeploymentTest(BaseToscaTest):
tests = ["create_deployment_minimal",
"create_deployment_maximal",
"create_deployment_one_flavor",
"create_deployment_two_flavors",
... | 50.971831 | 108 | 0.582896 |
91cb1b7e5cae0ee8230a659199e82d70bdd2f319 | 101 | py | Python | pypunisher/example_data/__init__.py | topspinj/PyPunisher | e286d3a7992389c3d704a3c85ac0a4daec6b0100 | [
"BSD-3-Clause"
] | 17 | 2018-02-08T22:48:09.000Z | 2021-06-14T15:29:35.000Z | pypunisher/example_data/__init__.py | topspinj/PyPunisher | e286d3a7992389c3d704a3c85ac0a4daec6b0100 | [
"BSD-3-Clause"
] | 33 | 2018-02-14T03:45:34.000Z | 2018-04-30T01:51:48.000Z | pypunisher/example_data/__init__.py | topspinj/PyPunisher | e286d3a7992389c3d704a3c85ac0a4daec6b0100 | [
"BSD-3-Clause"
] | 6 | 2018-03-17T19:07:13.000Z | 2021-05-16T06:12:44.000Z | from pypunisher.example_data._example_data import X_train, X_val, y_train, y_val, true_best_features
| 50.5 | 100 | 0.861386 |
91cb2b53829ea084dfef310bd55cc0d015a9c2f9 | 992 | py | Python | deploy/app.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | deploy/app.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | deploy/app.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | import streamlit as st
import numpy as np
from glob import glob
from pathlib import Path
from matplotlib import pyplot as plt
import cv2
import torch
import utils
from utils import get_results
from utils import get_full_path
from utils import load_images
softmax = torch.nn.Softmax(1)
MAP = utils.MAP_post()
selected_... | 22.044444 | 86 | 0.711694 |
91cb375b9c78c4c9234e7d8dd095fb9d0dd93890 | 47,048 | py | Python | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.218045 | 245 | 0.678095 |
91cbb8881aaf903a5351c0f12025e6a1e3ae5923 | 1,103 | py | Python | bark_ml/behaviors/cont_behavior.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | null | null | null | bark_ml/behaviors/cont_behavior.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | null | null | null | bark_ml/behaviors/cont_behavior.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 fortiss GmbH
#
# Authors: Patrick Hart, Julian Bernhard, Klemens Esterle, and
# Tobias Kessler
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
import numpy as np
from bark.core.models.behavior import BehaviorModel, BehaviorDynamicModel
from bark_ml.commo... | 29.810811 | 73 | 0.707162 |
91cbc8f2146484ea3cb26bc028617787832336a9 | 2,212 | py | Python | tensorbay/opendataset/RP2K/loader.py | Hoteryoung/tensorbay-python-sdk | 53c34dd529c20ec69b34ddd348b5c8e74f4094d0 | [
"MIT"
] | null | null | null | tensorbay/opendataset/RP2K/loader.py | Hoteryoung/tensorbay-python-sdk | 53c34dd529c20ec69b34ddd348b5c8e74f4094d0 | [
"MIT"
] | null | null | null | tensorbay/opendataset/RP2K/loader.py | Hoteryoung/tensorbay-python-sdk | 53c34dd529c20ec69b34ddd348b5c8e74f4094d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copytright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=invalid-name
# pylint: disable=missing-module-docstring
import os
from glob import glob
from typing import Iterable, List
from ...dataset import Data, Dataset
from ...label import Classification
DATASET_NAME = "RP2K"
... | 29.105263 | 82 | 0.59132 |
91cbdd08df09a153544b6c076b9238d328d913ee | 544 | py | Python | terrascript/hcs/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/hcs/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/hcs/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/hcs/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class hcs_agent_helm_config(terrascript.Data):
pass
class hcs_agent_kubernetes_secret(terrascript.Data):
... | 16 | 79 | 0.770221 |
91cbedd3b4248620cded13910ee174e9a4f1e90c | 23,725 | py | Python | datalad/downloaders/providers.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/downloaders/providers.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/downloaders/providers.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | 39.344942 | 121 | 0.600801 |
91cbf4c4972460251227fc26b8b1a74e56d99e9f | 4,877 | py | Python | cogs/meme.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 5 | 2021-09-04T09:08:55.000Z | 2022-02-08T00:28:08.000Z | cogs/meme.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 2 | 2021-10-11T21:44:08.000Z | 2021-11-05T07:41:23.000Z | cogs/meme.py | Brettanda/friday-bot | d103b1c103052b8d6d12f44456fea3823bd22447 | [
"CC0-1.0"
] | 3 | 2021-09-04T09:12:34.000Z | 2021-12-16T20:02:03.000Z | import os
import asyncpraw
from discord.ext import commands
# from interactions import Context as SlashContext, cog_ext
from functions import MessageColors, embed, MyContext
from typing import Union
import random
from typing_extensions import TYPE_CHECKING
if TYPE_CHECKING:
from index import Friday as ... | 34.588652 | 128 | 0.623129 |
91cbfc1610522edf8ae49632e7101c2fad30699e | 14,965 | py | Python | capstone/capapi/views/user_views.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | capstone/capapi/views/user_views.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | 4 | 2021-09-02T20:54:31.000Z | 2022-02-27T14:04:06.000Z | capstone/capapi/views/user_views.py | whitemike889/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from django.conf import settings
from django.contrib.auth.decorators import login_required, user_passes_test
from django.core.exceptions import PermissionDenied
from django.core.mail import send_mail, EmailMessage
from django.db import transaction
from django.http import HttpRespons... | 42.514205 | 144 | 0.670431 |
91cc0dc1fa8f26124ab544f4753c8ddd77837c62 | 548 | py | Python | mails/migrations/0003_auto_20200923_2138.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 1 | 2020-11-17T18:50:44.000Z | 2020-11-17T18:50:44.000Z | mails/migrations/0003_auto_20200923_2138.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 9 | 2020-10-23T18:42:45.000Z | 2022-03-12T00:39:57.000Z | mails/migrations/0003_auto_20200923_2138.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-09-23 21:38
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mails', '0002_emailaddresses'),
]
operations = [
migrations.AlterField(
model_name='emailaddresses... | 27.4 | 173 | 0.669708 |
91cc2d939d73a9ad94a3de0ca87bdc0a6b51c955 | 16,098 | py | Python | statey/task.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | 4 | 2021-02-16T19:34:38.000Z | 2022-01-31T16:44:14.000Z | statey/task.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | statey/task.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | import abc
import dataclasses as dc
import enum
import inspect
import sys
import textwrap as tw
import traceback
from datetime import datetime
from functools import wraps, partial
from typing import (
Tuple,
Any,
Optional,
Callable,
Sequence,
Type as PyType,
Dict,
Coroutine,
)
import ne... | 28.492035 | 99 | 0.63393 |
91cc57eb4571a1c902b260ca237bf80175f688c9 | 9,393 | py | Python | solutionreporttools/common.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 19 | 2015-03-04T21:30:15.000Z | 2021-04-28T10:50:18.000Z | solutionreporttools/common.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 11 | 2015-03-27T20:30:55.000Z | 2017-06-28T15:04:06.000Z | solutionreporttools/common.py | Esri/utilities-solution-data-automation | f693d39240407964c2857992e365e36960ef3431 | [
"Apache-2.0"
] | 17 | 2015-03-13T20:02:07.000Z | 2020-03-21T12:01:41.000Z | import os
import sys
import json
import inspect
import random
import string
import datetime
import time
import traceback
from urlparse import urlparse
import gc
class CommonError(Exception):
""" raised when error occurs in utility module functions """
pass
#----------------------------------------------------... | 28.812883 | 115 | 0.455339 |
91cc61dd93b6fe5b33ee05995f09c02691efa86e | 31,259 | py | Python | appengine/swarming/server/task_to_run_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/swarming/server/task_to_run_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/swarming/server/task_to_run_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | #!/usr/bin/env python
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import datetime
import logging
import os
import random
import sys
import unittest
# Setups environment.
APP_DIR = os.path.d... | 36.73208 | 80 | 0.645414 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.