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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38b792bac492c38926329fca6bdf2977b333889f | 3,676 | py | Python | Ground_Station/GUI/dev/login_functions.py | jswitt/FlightSoftware | af7e03976db98527b7072a8a35ba7b9769b59d4f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2017-09-06T14:50:37.000Z | 2020-02-03T20:54:23.000Z | Ground_Station/GUI/dev/login_functions.py | jswitt/FlightSoftware | af7e03976db98527b7072a8a35ba7b9769b59d4f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | Ground_Station/GUI/dev/login_functions.py | jswitt/FlightSoftware | af7e03976db98527b7072a8a35ba7b9769b59d4f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 4 | 2016-10-02T17:52:25.000Z | 2021-03-19T22:26:10.000Z | #############################################################
#
# Property of Eagle Eye.
#
# Authors:
# Jared Danner
#
#############################################################
from tkinter import *
import globals as g
class Login_Terminal():
def __init__(self):
"""
Initialization function for t... | 31.418803 | 93 | 0.696409 |
38b7943643bba92a57fc45046d4085abd01ecff2 | 8,704 | py | Python | models/Unet.py | Tevien/dtor | bb2954074d4a299c129d44afd722084980b792b5 | [
"MIT"
] | null | null | null | models/Unet.py | Tevien/dtor | bb2954074d4a299c129d44afd722084980b792b5 | [
"MIT"
] | 1 | 2021-03-12T10:57:24.000Z | 2021-03-12T10:57:24.000Z | models/Unet.py | Tevien/dtor | bb2954074d4a299c129d44afd722084980b792b5 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class SEBlock(nn.Module):
def __init__(self, in_channels, out_channels, net_mode='2d'):
super(SEBlock, self).__init__()
if net_mode == '2d':
self.gap = nn.AdaptiveAvgPool2d(1)
conv = nn.Conv2d
elif net_mode == '3d':
se... | 30.975089 | 115 | 0.576517 |
38b7f39999c9075c46aee2a6108faef4e1c87598 | 4,583 | py | Python | tests/test_pca.py | vishalbelsare/prince | bd5b29fafe853579c9d41e954caa4504d585665d | [
"MIT"
] | 749 | 2017-08-18T09:42:38.000Z | 2022-03-31T03:36:21.000Z | tests/test_pca.py | vishalbelsare/prince | bd5b29fafe853579c9d41e954caa4504d585665d | [
"MIT"
] | 115 | 2017-08-21T10:48:54.000Z | 2022-03-17T16:38:52.000Z | tests/test_pca.py | vishalbelsare/prince | bd5b29fafe853579c9d41e954caa4504d585665d | [
"MIT"
] | 136 | 2017-09-01T06:36:45.000Z | 2022-02-18T15:32:10.000Z | import unittest
import matplotlib as mpl
import numpy as np
import pandas as pd
from sklearn import datasets
from sklearn import decomposition
from sklearn.utils import estimator_checks
import prince
class TestPCA(unittest.TestCase):
def setUp(self):
X, _ = datasets.load_iris(return_X_y=True)
c... | 33.948148 | 98 | 0.668558 |
38b7f9689019eae90983ba2bcf7db4813ae8836c | 4,873 | py | Python | tests/framework/unit_tests/Optimizers/testFitnessBased.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | 159 | 2017-03-24T21:07:06.000Z | 2022-03-20T13:44:40.000Z | tests/framework/unit_tests/Optimizers/testFitnessBased.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | 1,667 | 2017-03-27T14:41:22.000Z | 2022-03-31T19:50:06.000Z | tests/framework/unit_tests/Optimizers/testFitnessBased.py | wanghy-anl/raven | ef1372364a2776385931763f2b28fdf2930c77b9 | [
"Apache-2.0"
] | 95 | 2017-03-24T21:05:03.000Z | 2022-03-08T17:30:22.000Z | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 36.096296 | 194 | 0.645598 |
38b815da8e64a2d3571492c8c0c3a7f1f5a7264f | 4,315 | py | Python | std/pytorch/01-low/46.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | std/pytorch/01-low/46.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | std/pytorch/01-low/46.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | import os
import torch
import torchvision
import torchvision.transforms as transforms
from torch.utils.tensorboard import SummaryWriter
from datetime import datetime
transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))])
training_set = torchvision.datasets.FashionMNIST(
".d... | 28.576159 | 116 | 0.657937 |
38b83d03608176bef9603ee273210a14d80bf29b | 1,753 | py | Python | tests/st/ops/test_fused_bn_follow_relu.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/test_fused_bn_follow_relu.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/test_fused_bn_follow_relu.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.06 | 92 | 0.659441 |
38b84af8dfdac443e254c5dcddbd5e19efe755fb | 9,702 | py | Python | collections/ansible_collections/redhat/satellite/plugins/modules/partition_table.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | null | null | null | collections/ansible_collections/redhat/satellite/plugins/modules/partition_table.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | null | null | null | collections/ansible_collections/redhat/satellite/plugins/modules/partition_table.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | 2 | 2021-03-30T14:26:02.000Z | 2021-04-01T18:17:29.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017 Matthias Dellweg & Bernhard Hopfenmüller (ATIX AG)
#
# 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 3 of the License, or
# (a... | 32.666667 | 144 | 0.664502 |
38b87eda5467a38b31ff4e02d55afbd39ce60375 | 65,058 | py | Python | elfinder/volumes/base.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | null | null | null | elfinder/volumes/base.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | null | null | null | elfinder/volumes/base.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | 1 | 2019-07-18T09:27:09.000Z | 2019-07-18T09:27:09.000Z | import os, re, datetime, time, sys, mimetypes
from PIL import Image
from base64 import b64encode, b64decode
from string import maketrans
from hashlib import md5
from django.core.cache import cache
from django.utils.translation import ugettext as _
from elfinder.exceptions import ElfinderErrorMessages, FileNotFoundError... | 32.907436 | 146 | 0.525347 |
38b8e0c4f19ee39b0c91db54f00d2cadee7b1920 | 1,696 | py | Python | pyrediseasyio/io/boolean_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | pyrediseasyio/io/boolean_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | pyrediseasyio/io/boolean_io.py | washad/PyRedisEasyIO | 30d566760aa622ae6e8fcc1fa4abdc79b6bda614 | [
"MIT"
] | null | null | null | from pyrediseasyio.io.single_io import SingleIO
from str2bool import str2bool
import gettext
_ = gettext.gettext
class BooleanIO(SingleIO):
def __init__(self, name: str, addr: str = None, default: bool = False, **kwargs):
"""
:param name: A human readable name to give to the IO
:param ... | 31.407407 | 115 | 0.632665 |
38b9540e6679980dc1353e70a4841d238ee7c4f7 | 14,456 | py | Python | lib/rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 187 | 2017-11-07T10:19:34.000Z | 2022-03-13T11:59:40.000Z | lib/rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 2,592 | 2017-10-25T06:57:46.000Z | 2022-03-31T22:53:51.000Z | lib/rucio/daemons/replicarecoverer/suspicious_replica_recoverer.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 322 | 2017-10-10T06:36:36.000Z | 2022-03-31T17:13:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2019-2021 CERN
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 51.628571 | 210 | 0.641533 |
38b96d977ec052d3524fc7ba53e5946ce1448c4f | 10,233 | py | Python | evaluateSSL.py | drkostas/SemiSeg-Contrastive | af6b133400368911ef77f401b7673894fe6aa05c | [
"Apache-2.0"
] | null | null | null | evaluateSSL.py | drkostas/SemiSeg-Contrastive | af6b133400368911ef77f401b7673894fe6aa05c | [
"Apache-2.0"
] | null | null | null | evaluateSSL.py | drkostas/SemiSeg-Contrastive | af6b133400368911ef77f401b7673894fe6aa05c | [
"Apache-2.0"
] | null | null | null | '''
Code taken from https://github.com/WilhelmT/ClassMix
Slightly modified
'''
import argparse
from data.augmentations import *
from utils.metric import ConfusionMatrix
from multiprocessing import Pool
import os
from torch.autograd import Variable
from torch.utils import data
import torch
from data import get_data_pa... | 37.076087 | 121 | 0.552722 |
38b96f68cff6c6df89d348787de10cc27ef0e1fa | 204,214 | py | Python | atom/nucleus/python/nucleus_api/api/utils_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/utils_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/utils_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and pyt... | 41.99342 | 158 | 0.619801 |
38b989e506794203df0d2e508db0ecd31479a150 | 3,455 | py | Python | scalpel/any_io/selenium_spider.py | lewoudar/scalpel | 455a3ff766c91d02f33957ea17f1cfbec141ab60 | [
"Apache-2.0"
] | 15 | 2020-11-02T21:11:03.000Z | 2022-03-10T14:17:46.000Z | scalpel/any_io/selenium_spider.py | lewoudar/scalpel | 455a3ff766c91d02f33957ea17f1cfbec141ab60 | [
"Apache-2.0"
] | 4 | 2020-11-01T17:54:15.000Z | 2022-03-04T21:42:41.000Z | scalpel/any_io/selenium_spider.py | lewoudar/scalpel | 455a3ff766c91d02f33957ea17f1cfbec141ab60 | [
"Apache-2.0"
] | 2 | 2021-05-01T06:59:12.000Z | 2021-11-25T07:01:02.000Z | import logging
import attr
from rfc3986 import uri_reference
from scalpel.core.selenium import SeleniumDriverMixin
from .mixins import SeleniumGetMixin
from .response import SeleniumResponse
from .static_spider import StaticSpider
logger = logging.getLogger('scalpel')
# usually mixins are put are the beginning but... | 37.967033 | 120 | 0.680463 |
38b98d7e525a67954ce7685843b92e7a24c43c7b | 107 | py | Python | cointegrations/apps.py | skwongg/coins | fe9840cdee6bdf10854d5312e6fc52154c081dfc | [
"MIT"
] | 1 | 2018-03-06T01:59:57.000Z | 2018-03-06T01:59:57.000Z | cointegrations/apps.py | skwongg/coins | fe9840cdee6bdf10854d5312e6fc52154c081dfc | [
"MIT"
] | 2 | 2020-06-05T17:07:09.000Z | 2021-06-10T18:10:16.000Z | cointegrations/apps.py | skwongg/coins | fe9840cdee6bdf10854d5312e6fc52154c081dfc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CointegrationslsConfig(AppConfig):
name = 'cointegrationsls'
| 17.833333 | 40 | 0.794393 |
38b99303a15e2e2b7a603d16a06dc21f9bb4f0bc | 24,853 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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 ... | 31.740741 | 106 | 0.598801 |
38b9efe3e42a4e849ae9a2cde2a83b77600458b8 | 22,162 | py | Python | Lib/site-packages/socketio/asyncio_client.py | IgorLekal/toka | 560503cf64d778b9ed73a636da92c99fa13a354b | [
"MIT"
] | 1 | 2021-04-05T06:47:09.000Z | 2021-04-05T06:47:09.000Z | socketio/asyncio_client.py | saha0073/python-socketio | aae49c253e66be53f5f7acd9c18a713fe441f03b | [
"MIT"
] | 1 | 2020-11-29T20:27:13.000Z | 2020-11-29T20:27:13.000Z | socketio/asyncio_client.py | saha0073/python-socketio | aae49c253e66be53f5f7acd9c18a713fe441f03b | [
"MIT"
] | 2 | 2020-11-28T19:41:07.000Z | 2020-11-29T19:42:22.000Z | import asyncio
import logging
import random
import engineio
import six
from . import client
from . import exceptions
from . import packet
default_logger = logging.getLogger('socketio.client')
class AsyncClient(client.Client):
"""A Socket.IO client for asyncio.
This class implements a fully compliant Socke... | 44.771717 | 79 | 0.581581 |
38b9f0b15d470187026164631e3891a5002e88f4 | 311 | py | Python | terrascript/resource/poseidon/matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/poseidon/matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/poseidon/matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/poseidon/matchbox.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:21:34 UTC)
import terrascript
class matchbox_group(terrascript.Resource):
pass
class matchbox_profile(terrascript.Resource):
pass
__all__ = [
"matchbox_group",
"matchbox_profile",
]
| 17.277778 | 73 | 0.752412 |
38b9fe9776476a1721183a98674def0f00cce596 | 4,749 | py | Python | snakemake/satija/src/generate_cell_sets.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-09T17:55:04.000Z | 2022-02-25T14:54:01.000Z | snakemake/satija/src/generate_cell_sets.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 32 | 2020-01-09T20:40:26.000Z | 2020-12-18T16:39:41.000Z | snakemake/satija/src/generate_cell_sets.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-18T14:50:11.000Z | 2021-10-06T12:49:24.000Z | from constants import COLUMNS, CL_ROOT_ID
from utils import (
load_cl_obo_graph,
init_cell_sets_tree,
dict_to_tree,
sort_paths_up_cell_ontology,
get_paths_up_cell_ontology,
fill_in_dict_from_path,
remove_any_from_dict_levels,
)
def generate_leiden_cluster_cell_sets(df):
"""
Generat... | 31.039216 | 76 | 0.631923 |
38ba0c9f5e3fa5b510b600ed2e81a8dfdb715c40 | 1,630 | py | Python | sites/verkkouutiset.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | null | null | null | sites/verkkouutiset.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 14 | 2016-10-14T15:09:42.000Z | 2017-03-01T14:29:29.000Z | sites/verkkouutiset.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 1 | 2020-11-18T13:06:48.000Z | 2020-11-18T13:06:48.000Z | # -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import processor
from datetime import datetime
def parse( url ):
r = requests.get( url )
if r.status_code == 404:
return processor.create_dictionary('', url, r.status_code, [u''], [u''], u'', u'', u'', u'', [u''], [u''])
r.encoding = 'UTF-8'... | 37.906977 | 142 | 0.690798 |
38ba1d6d1bdb1e2f057b3fdd1e50361edd32d5ef | 1,158 | py | Python | feincms/contrib/preview/views.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 325 | 2015-01-07T08:20:09.000Z | 2022-03-22T02:55:13.000Z | feincms/contrib/preview/views.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 148 | 2015-01-09T06:19:35.000Z | 2022-01-07T15:36:35.000Z | feincms/contrib/preview/views.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 109 | 2015-01-13T09:30:20.000Z | 2022-01-03T09:24:07.000Z | from __future__ import absolute_import, unicode_literals
from django.http import Http404
from django.shortcuts import get_object_or_404
from feincms.views import Handler
class PreviewHandler(Handler):
"""
Preview handler
The methods used in this handler should not be considered official API.
*** E... | 32.166667 | 82 | 0.684801 |
38ba2b1a84276cbb94c80f28549687780895c73f | 1,527 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/const.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/const.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/const.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
PostGIS to GDAL conversion constant definitions
"""
# Lookup to convert pixel type values from GDAL to PostGIS
GDAL_TO_POSTGIS = [None, 4, 6, 5, 8, 7, 10, 11, None, None, None, None]
# Lookup to convert pixel type values from PostGIS to GDAL
POSTGIS_TO_GDAL = [1, 1, 1, 3, 1, 3, 2, 5, 4, None, 6, 7, None, No... | 34.704545 | 74 | 0.639817 |
38ba4698663a3f279f57ccfe65c613bac8ea8f47 | 433 | py | Python | AlgoTalks/Logic/Easy/park_lighting.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | AlgoTalks/Logic/Easy/park_lighting.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | AlgoTalks/Logic/Easy/park_lighting.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
Problem link:
"""
from sys import stdin,stdout
def input(): return stdin.readline().strip()
# def print(s): stdout.write(str(s)+'\n')
def solve():
n, m = map(int,input().split())
if n%2 == 0:
print((n//2)*m)
elif m%2 == 0:
print((m//2)*n)
else:
count = (n//2)*m + ... | 17.32 | 44 | 0.491917 |
38ba590b66d1a5b75e8e9b40b5a30fcc41d56b97 | 1,379 | py | Python | bonneville/modules/ret.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/ret.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/ret.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Module to integrate with the returner system and retrieve data sent to a salt returner
'''
# Import bonneville libs
import bonneville.loader
def get_jid(returner, jid):
'''
Return the information for a specified job id
CLI Example:
.. code-block:: bash
salt '*' ... | 21.546875 | 86 | 0.656998 |
38ba8781f6088ce51b9ead8413b16180fa598c05 | 2,607 | py | Python | requests_cache/backends/storage/mongodict.py | madsfjeder/requests-cache | 4bca0dda8d085571b7d3b045e2754cfafbcc3725 | [
"BSD-2-Clause"
] | 1 | 2021-07-07T09:08:08.000Z | 2021-07-07T09:08:08.000Z | requests_cache/backends/storage/mongodict.py | madsfjeder/requests-cache | 4bca0dda8d085571b7d3b045e2754cfafbcc3725 | [
"BSD-2-Clause"
] | null | null | null | requests_cache/backends/storage/mongodict.py | madsfjeder/requests-cache | 4bca0dda8d085571b7d3b045e2754cfafbcc3725 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
requests_cache.backends.mongodict
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dictionary-like objects for saving large data sets to ``mongodb`` database
"""
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMa... | 29.965517 | 90 | 0.622171 |
38ba8ca03f56afc8713717111e5f9eccdbbb7156 | 7,262 | py | Python | sasrec_understanding/model.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | sasrec_understanding/model.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | sasrec_understanding/model.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | from modules import *
import pdb
class Model():
def __init__(self, usernum, itemnum, args, reuse=None):
self.is_training = tf.placeholder(tf.bool, shape=())
self.u = tf.placeholder(tf.int32, shape=(None))
self.input_seq = tf.placeholder(tf.int32, shape=(None, args.maxlen))
self.pos ... | 47.155844 | 195 | 0.5168 |
38baaa5f54d54d3ca2182ce6229d2ad532ffd127 | 90,079 | py | Python | skgstat/Variogram.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | null | null | null | skgstat/Variogram.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | null | null | null | skgstat/Variogram.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | null | null | null | """
Variogram class
"""
import copy
import warnings
import numpy as np
from pandas import DataFrame
from scipy.optimize import curve_fit, minimize, OptimizeWarning
from scipy.spatial.distance import pdist, squareform
from scipy import stats, sparse
from sklearn.isotonic import IsotonicRegression
from skgstat import e... | 33.008062 | 110 | 0.567913 |
38babff256334972f34afc928e09854a1577a216 | 2,272 | py | Python | src/lib/kerberos/kerberos_test_infra_utils.py | dshcherb/charm-kerberos-test-infra | 7b8946ccd9f47d80c38985113327775dc51fc0ef | [
"Apache-2.0"
] | null | null | null | src/lib/kerberos/kerberos_test_infra_utils.py | dshcherb/charm-kerberos-test-infra | 7b8946ccd9f47d80c38985113327775dc51fc0ef | [
"Apache-2.0"
] | null | null | null | src/lib/kerberos/kerberos_test_infra_utils.py | dshcherb/charm-kerberos-test-infra | 7b8946ccd9f47d80c38985113327775dc51fc0ef | [
"Apache-2.0"
] | null | null | null | import socket
import subprocess
import charmhelpers.core as core
import charmhelpers.core.host as ch_host
from charmhelpers.core.hookenv import (
config,
network_get,
)
def debconf_set_selections(line):
subprocess.run("debconf-set-selections",
input=line.encode('utf-8'),
... | 24.170213 | 79 | 0.606074 |
38bad32a9f3035aff361e1f1baf3af2873850492 | 9,288 | py | Python | tests/snuba/api/endpoints/test_discover_saved_queries.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_discover_saved_queries.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_discover_saved_queries.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.testutils import APITestCase, SnubaTestCase
from django.core.urlresolvers import reverse
from sentry.discover.models import DiscoverSavedQuery
class DiscoverSavedQueryBase(APITestCase, SnubaTestCase):
def setUp(self):
super(DiscoverSavedQueryBase, self)... | 39.523404 | 88 | 0.502799 |
38bad5613559f861929197c067a59cf9089e2279 | 686 | py | Python | tests/playbook/test_num_parameters.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | 1 | 2020-04-24T16:09:14.000Z | 2020-04-24T16:09:14.000Z | tests/playbook/test_num_parameters.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | tests/playbook/test_num_parameters.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | import pytest
from ansiblemetrics.playbook.num_parameters import NumParameters
script_0_1 = '---\n-host: localhost'
script_0_2 = '- oasis_roles.rhsm\n- oasis_roles.molecule_openstack_ci\n- oasis_roles.molecule_docker_ci'
script_3 = '- name: Create two hard links\n\tfile:\n\t\tsrc: \'/tmp/{{ item.src }}\'\n\t\tdest: \'... | 34.3 | 114 | 0.667638 |
38bb29d855ad49de05e1c6a548540cad0bcce069 | 19,150 | py | Python | tests/Lieke_tests/LiekeInterface.py | lokiysh/stroopwafel | 24df62e0e34499aa80e55437ba524a760ff27f6c | [
"MIT"
] | null | null | null | tests/Lieke_tests/LiekeInterface.py | lokiysh/stroopwafel | 24df62e0e34499aa80e55437ba524a760ff27f6c | [
"MIT"
] | 6 | 2020-10-28T22:58:32.000Z | 2021-08-25T05:37:02.000Z | tests/Lieke_tests/LiekeInterface.py | lokiysh/stroopwafel | 24df62e0e34499aa80e55437ba524a760ff27f6c | [
"MIT"
] | 1 | 2021-11-09T02:40:34.000Z | 2021-11-09T02:40:34.000Z | #!/usr/bin/env python
import os
import pandas as pd
import shutil
import time
import numpy as np
import sys
sys.path.append('../') #Only required in the test directory for testing purposes
from stroopwafel import sw, classes, prior, sampler, distributions, constants, utils
import argparse
parser=argparse.ArgumentPars... | 57.507508 | 195 | 0.712063 |
38bb4cf50638ad6b9e2c423128e5ad064434ded7 | 28,239 | py | Python | asv/runner.py | prisae/asv | 57c386d7cc27f91ecd8daf1ad2e0413f2efdd39c | [
"BSD-3-Clause"
] | 2 | 2019-08-18T11:05:25.000Z | 2019-11-17T02:07:18.000Z | asv/runner.py | prisae/asv | 57c386d7cc27f91ecd8daf1ad2e0413f2efdd39c | [
"BSD-3-Clause"
] | 1 | 2019-02-19T17:11:38.000Z | 2019-02-19T17:11:38.000Z | asv/runner.py | prisae/asv | 57c386d7cc27f91ecd8daf1ad2e0413f2efdd39c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import io
import json
import os
import sys
import re
import time
import tempfile
import itertools
import datetime
import ... | 32.608545 | 100 | 0.56854 |
38bb59ec13d9202a6b3235db08f2e432509e8564 | 650 | py | Python | tests/tests_with_server_and_cached_results/test_live_server.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | tests/tests_with_server_and_cached_results/test_live_server.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | tests/tests_with_server_and_cached_results/test_live_server.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | import pytest
import requests
@pytest.mark.record_mode("no")
def test_login_with_requests(config):
s = requests.Session()
s.post(
config["aquarium_url"] + "/sessions.json",
json={"session": {"login": config["login"], "password": config["password"]}},
)
user = s.post(
config[... | 23.214286 | 85 | 0.632308 |
38bb6bc37bae6d9a7590e4956cd6f0f48b0bb10a | 131 | py | Python | ingestion_server/ingestion_server/constants/media_types.py | GowthamChowdary/openverse-api | a319d2794b09ffa417b921763301ba4e7486c474 | [
"MIT"
] | 36 | 2021-05-06T20:53:54.000Z | 2022-03-04T11:38:42.000Z | ingestion_server/ingestion_server/constants/media_types.py | GowthamChowdary/openverse-api | a319d2794b09ffa417b921763301ba4e7486c474 | [
"MIT"
] | 330 | 2021-05-11T04:54:45.000Z | 2022-03-31T12:53:42.000Z | ingestion_server/ingestion_server/constants/media_types.py | GowthamChowdary/openverse-api | a319d2794b09ffa417b921763301ba4e7486c474 | [
"MIT"
] | 19 | 2021-06-29T10:16:49.000Z | 2022-03-23T12:04:54.000Z | """
Also see `api/constants/media_types.py`
"""
AUDIO_TYPE = "audio"
IMAGE_TYPE = "image"
MEDIA_TYPES = [AUDIO_TYPE, IMAGE_TYPE]
| 14.555556 | 39 | 0.709924 |
38bbab7a7ce302ba479a7f914d43f191e0f76120 | 399 | py | Python | config/wsgi.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | 7 | 2020-02-20T13:24:40.000Z | 2022-01-28T19:36:04.000Z | config/wsgi.py | techlib/czechelib-stats | ca132e326af0924740a525710474870b1fb5fd37 | [
"MIT"
] | 15 | 2020-04-28T13:09:02.000Z | 2021-11-03T15:21:24.000Z | config/wsgi.py | techlib/czechelib-stats | ca132e326af0924740a525710474870b1fb5fd37 | [
"MIT"
] | 4 | 2020-02-20T13:48:30.000Z | 2021-03-19T00:33:34.000Z | """
WSGI config for Celus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTING... | 23.470588 | 78 | 0.786967 |
38bbafadba5030bb28df776ea3350516ffc84a54 | 9,491 | py | Python | leetcode_python/Tree/merge-two-binary-trees.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Tree/merge-two-binary-trees.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Tree/merge-two-binary-trees.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# IDEA : DFS
class Solution:
def mergeTrees(self, t1, t2):
return self.dfs(t1,t2)
def dfs(self, t1, t2):
if t1 and t2:
newT = TreeNode(t1.val + t2.val)
newT.left = self.mergeTrees(t1.left, t2.left)
newT.right = self.mergeTrees(t1.right, t2.right)
... | 29.475155 | 114 | 0.504583 |
38bbcd8bc8863b5a9ac13cee1bea141dd50a55ad | 8,537 | py | Python | Selenium_PhantomJS/source/setuptools/command/test.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 7 | 2016-09-21T19:21:13.000Z | 2019-09-26T02:26:19.000Z | venv/lib/python3.5/site-packages/setuptools/command/test.py | remkohdev/python-flask-d3js-newssentiment | 006e1083b6a307fda55b176eadb810aa08bd8b63 | [
"Apache-2.0"
] | 24 | 2016-10-06T23:37:43.000Z | 2017-02-18T21:36:37.000Z | venv/lib/python3.5/site-packages/setuptools/command/test.py | remkohdev/python-flask-d3js-newssentiment | 006e1083b6a307fda55b176eadb810aa08bd8b63 | [
"Apache-2.0"
] | 4 | 2016-09-27T17:07:38.000Z | 2018-05-05T03:18:19.000Z | import os
import operator
import sys
import contextlib
import itertools
from distutils.errors import DistutilsOptionError
from unittest import TestLoader
from setuptools.extern import six
from setuptools.extern.six.moves import map, filter
from pkg_resources import (resource_listdir, resource_exists, normalize_path,
... | 34.148 | 79 | 0.601968 |
38bbced5a3a920e8f373204ad2ed91178ecd7d2b | 1,210 | py | Python | src/sqlfluff/core/rules/std/L048.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/rules/std/L048.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/rules/std/L048.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | 1 | 2021-03-07T21:49:52.000Z | 2021-03-07T21:49:52.000Z | """Implementation of Rule L048."""
from typing import Tuple, List
from sqlfluff.core.rules.doc_decorators import document_fix_compatible
from sqlfluff.core.rules.std.L006 import Rule_L006
@document_fix_compatible
class Rule_L048(Rule_L006):
"""Quoted literals should be surrounded by a single whitespace.
|... | 24.2 | 78 | 0.642975 |
38bbd3bcada8bdabb7728181f84895da96ee9111 | 19,900 | py | Python | pex/vendor/_vendored/pip/pip/_internal/index/collector.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:28:35.000Z | 2020-06-27T23:28:35.000Z | pex/vendor/_vendored/pip/pip/_internal/index/collector.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 7 | 2019-12-27T07:56:50.000Z | 2022-01-25T03:41:39.000Z | pex/vendor/_vendored/pip/pip/_internal/index/collector.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-02-14T16:53:19.000Z | 2020-02-14T16:53:19.000Z | """
The main purpose of this module is to expose LinkCollector.collect_links().
"""
import cgi
import itertools
import logging
import mimetypes
import os
from collections import OrderedDict
from pip._vendor import html5lib, requests
from pip._vendor.distlib.compat import unescape
from pip._vendor.requests.exceptions ... | 32.252836 | 79 | 0.621859 |
38bbdaa3960784c0b552b7fb8942ba28a2b1c19d | 994 | py | Python | src2/state/state_desing_pattern_1/sum_skip.py | unica-isde/isde | a9603d8b8d1a347447cec483108132aa1e8457eb | [
"Apache-2.0"
] | 7 | 2021-01-20T09:11:53.000Z | 2022-03-15T12:19:06.000Z | src2/state/state_desing_pattern_1/sum_skip.py | unica-isde/isde | a9603d8b8d1a347447cec483108132aa1e8457eb | [
"Apache-2.0"
] | null | null | null | src2/state/state_desing_pattern_1/sum_skip.py | unica-isde/isde | a9603d8b8d1a347447cec483108132aa1e8457eb | [
"Apache-2.0"
] | 10 | 2020-11-01T09:47:02.000Z | 2021-11-02T12:59:50.000Z | import state as st
class SumSkip: # THIS IS THE 'CONTEXT'
def __init__(self):
self.state = st.StateSum()
self.sum_val = 0
def process_input(self, v):
self.state.process_input(self, v)
def set_state(self, new_state):
self.state = new_state
def sum(self, v):
... | 22.088889 | 108 | 0.532193 |
38bbe50047aa85e107c6b4b2305157a2622efa2a | 512 | py | Python | styleChange.py | ldzhangyu/cyclegan | 0d7860181289d58373c907286027ea48ce2ffeca | [
"BSD-3-Clause"
] | null | null | null | styleChange.py | ldzhangyu/cyclegan | 0d7860181289d58373c907286027ea48ce2ffeca | [
"BSD-3-Clause"
] | 1 | 2021-07-13T02:21:35.000Z | 2021-07-13T02:21:35.000Z | styleChange.py | ldzhangyu/cyclegan | 0d7860181289d58373c907286027ea48ce2ffeca | [
"BSD-3-Clause"
] | null | null | null | import turicreate as tc
# Load the style and content images
styles = tc.load_images('style/')
content = tc.load_images('content/')
# Create a StyleTransfer model
model = tc.style_transfer.create(styles, content)
# Load some test images
test_images = tc.load_images('test/')
# Stylize the test images
stylized_images ... | 25.6 | 52 | 0.773438 |
38bc1a77f74017fb2959e164bdd2d82be66548bf | 129 | py | Python | safetynet-flask-server/utils.py | duo-labs/chain-of-fools | 1fbeefb9484b2a99ee3c7412be96ba2834414d91 | [
"BSD-3-Clause"
] | 12 | 2019-12-04T14:04:37.000Z | 2021-11-08T10:27:46.000Z | safetynet-flask-server/utils.py | duo-labs/chain-of-fools | 1fbeefb9484b2a99ee3c7412be96ba2834414d91 | [
"BSD-3-Clause"
] | null | null | null | safetynet-flask-server/utils.py | duo-labs/chain-of-fools | 1fbeefb9484b2a99ee3c7412be96ba2834414d91 | [
"BSD-3-Clause"
] | 4 | 2020-03-11T14:01:52.000Z | 2021-07-15T21:47:20.000Z | import base64
def dec_b64(value):
value = str(value)
return base64.urlsafe_b64decode(value + '=' * (4 - len(value) % 4)) | 25.8 | 71 | 0.651163 |
38bc1c67004178b323626184dd526f4b9ce2937f | 1,505 | py | Python | notebooks/cuIndicator/viz/coppock_curve.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | null | null | null | notebooks/cuIndicator/viz/coppock_curve.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | null | null | null | notebooks/cuIndicator/viz/coppock_curve.py | goosen78/gQuant | cc0bff4ac524ccfbe8097acd647a8b3fad5fe578 | [
"Apache-2.0"
] | null | null | null | import ipywidgets as widgets
from bqplot.colorschemes import CATEGORY20
from bqplot import Axis, Figure, LinearScale, Lines
import os
from gquant.dataframe_flow.task import load_modules
load_modules(os.getenv('MODULEPATH')+'/rapids_modules/')
from rapids_modules.cuindicator import coppock_curve as indicator_fun # noqa... | 33.444444 | 83 | 0.699668 |
38bc378110621aaa3e6881aeee4c7154d8e48603 | 12,970 | py | Python | interact.py | AIBrainOrganization/DialoGPT | d7826657ebf629800ad116195521d68bde58bbd0 | [
"MIT"
] | null | null | null | interact.py | AIBrainOrganization/DialoGPT | d7826657ebf629800ad116195521d68bde58bbd0 | [
"MIT"
] | null | null | null | interact.py | AIBrainOrganization/DialoGPT | d7826657ebf629800ad116195521d68bde58bbd0 | [
"MIT"
] | null | null | null | import torch
import argparse
import numpy as np
from config import device_f, device_r, num_samples
from config import top_k, top_p, ALPHA, BETA
from kogpt2.pytorch_kogpt2 import get_kogpt2_model
from kogpt2.model.torch_gpt2 import GPT2Config
from gluonnlp.data import SentencepieceTokenizer
from kogpt2.utils import get... | 32.425 | 79 | 0.608096 |
38bc647b5b0ba45cbfe7a18abbfc073d8c85f260 | 2,683 | py | Python | asyncmongo/backends/glib3_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | asyncmongo/backends/glib3_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | asyncmongo/backends/glib3_backend.py | bufferx/asyncmongo | c68ba72a79507e21f28c5525e1f6954cc68db4cf | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
#
# Copyright 2010 bit.ly
#
# 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... | 29.811111 | 77 | 0.631383 |
38bc6a4f2b7ae6766ac26a9f686a4fd061e3e006 | 2,214 | py | Python | app/quote/views.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | app/quote/views.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | app/quote/views.py | aakash-sheth/django-rest-api | 5dcd5eb03c5efccd7011fd6417b50e2ceacff243 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework import viewsets, mixins,generics
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated, AllowAny
from rest_framework.response import Response
from rest_framework import status
from core.models imp... | 36.9 | 102 | 0.680217 |
38bc7c8f33856a4d0adfacf03c0220c9a8a227f4 | 3,412 | py | Python | cacti/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | cacti/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | cacti/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.198347 | 92 | 0.630715 |
38bcaaf03b83b76c604c38f5057d6adf63c8b22b | 15,127 | py | Python | nyoka/object_detection/retinanet.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | nyoka/object_detection/retinanet.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:16:45.000Z | 2022-02-10T05:28:52.000Z | nyoka/object_detection/retinanet.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import sys
import os
import warnings
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
sys.path.append(BASE_DIR)
warnings.formatwarning = lambda msg, *args, **kwargs: str(msg)+'\n'
import numpy as np
from nyoka import PMML44 as pml
from nyoka.keras import keras_model_to_pmm... | 40.124668 | 143 | 0.618827 |
38bccb60bbee1f5db0c7b1d4664ef37708ccda5a | 2,516 | py | Python | artellapipe/widgets/exceptions.py | ArtellaPipe/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | 7 | 2019-10-28T05:18:30.000Z | 2020-08-21T05:36:52.000Z | artellapipe/widgets/exceptions.py | tpoveda/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | 4 | 2020-01-22T02:41:54.000Z | 2020-03-17T10:49:12.000Z | artellapipe/widgets/exceptions.py | tpoveda/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains exceptions related widgets
"""
from __future__ import print_function, division, absolute_import
__author__ = "Tomas Poveda"
__license__ = "MIT"
__maintainer__ = "Tomas Poveda"
__email__ = "tpovedatd@gmail.com"
from Qt.QtGui import *
from Qt.QtW... | 36.463768 | 101 | 0.717806 |
38bcd3e14dcb36a1532f85c25c9a838cbdbeee56 | 3,012 | py | Python | src/scripts/format_organisms.py | WormLabCaltech/alaska | 968475b77718263b7af2fd098b23c3e7cfa40546 | [
"MIT"
] | 6 | 2019-01-23T04:04:17.000Z | 2021-02-17T04:11:49.000Z | src/scripts/format_organisms.py | WormLabCaltech/alaska | 968475b77718263b7af2fd098b23c3e7cfa40546 | [
"MIT"
] | 22 | 2018-10-30T03:28:53.000Z | 2020-01-28T07:56:57.000Z | src/scripts/format_organisms.py | WormLabCaltech/alaska | 968475b77718263b7af2fd098b23c3e7cfa40546 | [
"MIT"
] | null | null | null | '''
This script renames all the cdna, dna, and annotation files in subdirectories.
It also calls bigBedTobed to convert .bb files to .bed files.
'''
import os
import subprocess as sp
def convert_bb_to_bed(bb, bed):
'''
Converts a .bb file to a .bed file using bigBedTobed.
'''
print('Converting {} to {... | 31.375 | 81 | 0.608566 |
38bce7490c30762d1a50ac6f8397844bc1592171 | 6,343 | py | Python | scripts/ccpp_prebuild_config_SCM.py | gold2718/ccpp-framework | 66f1a069b6b15748e08adbe940b8ceb9b39619ab | [
"Apache-2.0"
] | null | null | null | scripts/ccpp_prebuild_config_SCM.py | gold2718/ccpp-framework | 66f1a069b6b15748e08adbe940b8ceb9b39619ab | [
"Apache-2.0"
] | 39 | 2019-01-25T21:50:33.000Z | 2021-09-03T16:57:43.000Z | scripts/ccpp_prebuild_config_SCM.py | gold2718/ccpp-framework | 66f1a069b6b15748e08adbe940b8ceb9b39619ab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# CCPP prebuild config for GMTB Single Column Model (SCM) v2.0
###############################################################################
# Definitions #
########################################################################... | 40.922581 | 109 | 0.6519 |
38bd0940e66b5138a3ae33ee06d02f31e922c68c | 3,491 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_auto_rest_swagger_bat_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_auto_rest_swagger_bat_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/bodystringversiontolerant/_auto_rest_swagger_bat_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 ... | 38.788889 | 102 | 0.66428 |
38bd1387a629c44d9e7efd81174bc262f9ea798b | 1,710 | py | Python | sdk/keyvault/azure-security-keyvault/tests/async_test_case.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-security-keyvault/tests/async_test_case.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-security-keyvault/tests/async_test_case.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import as... | 38 | 116 | 0.601754 |
38bd384783c3d93d722e19a003298a43ced45305 | 1,716 | py | Python | modeling/layers/id_to_token_test.py | yekeren/WSSGG | 4d20dadffe7584ac2c7f26419960512380b8d06e | [
"Apache-2.0"
] | 33 | 2021-04-14T01:27:34.000Z | 2022-03-30T03:32:00.000Z | modeling/layers/id_to_token_test.py | yekeren/WSSGG | 4d20dadffe7584ac2c7f26419960512380b8d06e | [
"Apache-2.0"
] | null | null | null | modeling/layers/id_to_token_test.py | yekeren/WSSGG | 4d20dadffe7584ac2c7f26419960512380b8d06e | [
"Apache-2.0"
] | 6 | 2021-04-14T14:43:19.000Z | 2022-01-01T14:36:11.000Z | # Copyright 2020 Keren Ye, University of Pittsburgh
#
# 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... | 33.647059 | 80 | 0.657925 |
38bd6b7a9baeed2675cb5be32d3d552b6c8bfd99 | 3,239 | py | Python | nova/cmd/spicehtml5proxy.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/cmd/spicehtml5proxy.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/cmd/spicehtml5proxy.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright (c) 2012 OpenStack Foundation
# 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 ... | 36.393258 | 78 | 0.602964 |
38bd82aae682c9a4ab832305ec32c689810d220d | 44 | py | Python | djangocms_versioning/exceptions.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/exceptions.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/exceptions.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null |
class ConditionFailed(Exception):
pass
| 11 | 33 | 0.75 |
38bdbc6eb1868715249e4b2a0270e7fea3b89d31 | 569 | py | Python | taskbackend/taskconfig.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 4 | 2019-12-19T17:17:42.000Z | 2021-12-11T23:12:45.000Z | taskbackend/taskconfig.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | 32 | 2020-03-19T15:56:05.000Z | 2021-12-23T12:46:06.000Z | taskbackend/taskconfig.py | eark-project/access_dipcreator | b1f9034d309dfdb676cbba92c9c4722bf576aba2 | [
"MIT"
] | null | null | null | class TaskConfig(object):
expected_status = 'status!=-1'
success_status = 0
error_status = 0
def __init__(self, exp, sxs, err):
"""
Constructor
@type expected_status: String
@param expected_status: Expected status
@type success_status: Integer
... | 33.470588 | 52 | 0.588752 |
38bdd8bbab4f3abc14a9562c7fead04c9f8dc10d | 1,406 | py | Python | config/asgi.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | null | null | null | config/asgi.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | 31 | 2021-03-08T21:30:47.000Z | 2022-03-01T12:09:09.000Z | config/asgi.py | rwblair/expfactory-deploy | 509b74fc16b70234b448a727c4fe7759fb6057c8 | [
"MIT"
] | null | null | null | """
ASGI config for Expfactory Deploy 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/dev/howto/deployment/asgi/
"""
import os
import sys
from pathlib import Path
from django.core.asgi import get_asgi_ap... | 34.292683 | 85 | 0.775249 |
38be2cd6b838669d776145a2044d213bd958014e | 718 | py | Python | src/rubrix/sdk/__init__.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/__init__.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/__init__.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 37.789474 | 75 | 0.746518 |
38be474ae7c5f1a653eaaf897a9080451d0e1c1e | 10,866 | py | Python | models/beamsearch.py | Edward-Sun/11731 | 8426f961572951ac0cf882b62efb9a852d7371fc | [
"Apache-2.0"
] | 4 | 2019-09-28T09:21:20.000Z | 2019-09-29T16:13:29.000Z | models/beamsearch.py | Edward-Sun/Transformer-TPU | 8426f961572951ac0cf882b62efb9a852d7371fc | [
"Apache-2.0"
] | 1 | 2019-09-27T21:18:29.000Z | 2019-09-27T21:20:08.000Z | models/beamsearch.py | Edward-Sun/Transformer-TPU | 8426f961572951ac0cf882b62efb9a852d7371fc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2017-2019 The THUMT Authors
"""
Beam Search
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import tensorflow as tf
from collections import namedtuple
from tensorflow.python.util import nest
class BeamSearchStat... | 32.827795 | 79 | 0.683232 |
38be5df238b2c25fb1c4a0617b652fb85303ede7 | 19,193 | py | Python | cinder/volume/drivers/netapp/utils.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 1 | 2019-01-22T05:37:38.000Z | 2019-01-22T05:37:38.000Z | cinder/volume/drivers/netapp/utils.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/volume/drivers/netapp/utils.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright (c) 2012 NetApp, Inc. All rights reserved.
# Copyright (c) 2014 Navneet Singh. All rights reserved.
# Copyright (c) 2014 Clinton Knight. All rights reserved.
# Copyright (c) 2015 Tom Barron. All rights reserved.
# Copyright (c) 2016 Michael Price. All rights reserved.
#
# Licensed under the Apache L... | 33.731107 | 79 | 0.64039 |
38be60aafd2fdf390ffb4d1918a621549d4f8639 | 2,637 | py | Python | elasticsearch/index_operations.py | Conengmo/collectiegroesbeek | 9baaec47c7a6a07d0110dc43ed91a6b4fd767ba0 | [
"MIT"
] | null | null | null | elasticsearch/index_operations.py | Conengmo/collectiegroesbeek | 9baaec47c7a6a07d0110dc43ed91a6b4fd767ba0 | [
"MIT"
] | null | null | null | elasticsearch/index_operations.py | Conengmo/collectiegroesbeek | 9baaec47c7a6a07d0110dc43ed91a6b4fd767ba0 | [
"MIT"
] | null | null | null | """
Run this script to delete all existing data and recreate the indices.
If there was no data to begin with, it will just create the indices.
"""
import requests
from posixpath import join as urljoin
address = 'http://localhost:9200'
def print_res_status(res):
if res.status_code == 200:
print('Success.... | 31.771084 | 92 | 0.673113 |
38be8258ed0531b516216601c79112501e56c5f9 | 8,718 | py | Python | geomloss/examples/sinkhorn_multiscale/plot_optimal_transport_cluster.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | null | null | null | geomloss/examples/sinkhorn_multiscale/plot_optimal_transport_cluster.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | 1 | 2021-07-15T12:43:21.000Z | 2021-07-15T12:43:21.000Z | geomloss/examples/sinkhorn_multiscale/plot_optimal_transport_cluster.py | ismedina/geomloss | bbd6289a139174effedb6855e1e992eb77772c67 | [
"MIT"
] | null | null | null | """
3) Optimal Transport in high dimension
=======================================
Let's use a custom clustering scheme to generalize the
**multiscale** Sinkhorn algorithm to high-dimensional settings.
"""
##############################################
# Setup
# ---------------------
#
# Standard imports:
import nu... | 32.288889 | 98 | 0.634664 |
38be87c1341ab7129d712558a8e1e8ff6e25330a | 380 | py | Python | setup.py | allanbatista/b2flow-python-tools | 00e349a3cea005e5f96355698e22cccbb143bf73 | [
"MIT"
] | null | null | null | setup.py | allanbatista/b2flow-python-tools | 00e349a3cea005e5f96355698e22cccbb143bf73 | [
"MIT"
] | null | null | null | setup.py | allanbatista/b2flow-python-tools | 00e349a3cea005e5f96355698e22cccbb143bf73 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='b2flow-python-tools',
version='0.0.1',
packages=['b2flow', 'b2flow.python', 'b2flow.python.tools'],
url='',
license='MIT',
author='Allan Batista',
author_email='allan@allanbatista.com.br',
description='',
install_requires=[
'boto3',
... | 20 | 64 | 0.573684 |
38be8976924ba2658d78fb1c35906ceac70e1b47 | 5,796 | py | Python | tests/python/pants_test/backend/jvm/test_jar_dependency_utils.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/test_jar_dependency_utils.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/test_jar_dependency_utils.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from pants.java.jar.jar_dependency_utils import M2Coordinate, ResolvedJa... | 42.933333 | 112 | 0.72136 |
38beaca17a45c37a65dc82d64f9ca315ac7dd8e1 | 1,857 | py | Python | alipay/aop/api/response/AlipayMerchantStoreShopcodeCreateResponse.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/AlipayMerchantStoreShopcodeCreateResponse.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/AlipayMerchantStoreShopcodeCreateResponse.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
class AlipayMerchantStoreShopcodeCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayMerchantStoreShopcodeCreateResponse, self).__init__()
self._apply_id = None... | 28.136364 | 114 | 0.659666 |
38beb20b3b4918a78aee9790c6814b2670eca660 | 11,103 | py | Python | nemo/collections/asr/data/vocabs.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 2 | 2021-09-21T07:36:20.000Z | 2022-02-05T15:29:04.000Z | nemo/collections/asr/data/vocabs.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/data/vocabs.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 12 | 2021-06-20T08:56:10.000Z | 2022-03-16T19:07:10.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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... | 31.453258 | 110 | 0.546069 |
38bed17e04bb13b547e8489dd31168d2403a178d | 38,944 | py | Python | src/libnmea_navsat_driver/driver.py | boschresearch/nmea_navsat_driver | 70753e8afc2d7740ba4ff3265022bed108cc6769 | [
"BSD-3-Clause"
] | null | null | null | src/libnmea_navsat_driver/driver.py | boschresearch/nmea_navsat_driver | 70753e8afc2d7740ba4ff3265022bed108cc6769 | [
"BSD-3-Clause"
] | 1 | 2021-03-03T17:21:28.000Z | 2021-03-03T17:21:28.000Z | src/libnmea_navsat_driver/driver.py | boschresearch/nmea_navsat_driver | 70753e8afc2d7740ba4ff3265022bed108cc6769 | [
"BSD-3-Clause"
] | 3 | 2020-06-01T18:27:13.000Z | 2020-12-20T18:35:12.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2013, Eric Perko
# Copyright (c) 2015-2021, Robert Bosch GmbH
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions ... | 46.087574 | 116 | 0.574928 |
38befac66890bf8d01f0dc68001df009609ff1a9 | 1,829 | py | Python | workspace/commands/diff.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 3 | 2018-08-22T20:52:32.000Z | 2020-12-01T21:22:46.000Z | workspace/commands/diff.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 3 | 2019-04-10T02:30:39.000Z | 2020-06-02T01:58:26.000Z | workspace/commands/diff.py | sohinik/workspace-tools | 3cc8aac5b7a0df9221dcf9359d94cc5074579020 | [
"MIT"
] | 4 | 2019-04-08T20:00:22.000Z | 2020-06-01T18:25:49.000Z | from __future__ import absolute_import
import logging
import os
from workspace.commands import AbstractCommand
from workspace.commands.helpers import ProductPager
from workspace.scm import diff_repo, repos, product_name, current_branch, parent_branch
from workspace.utils import log_exception
log = logging.getLogger(_... | 35.173077 | 101 | 0.629306 |
38bf064cc84128a14cbdef4dda582a7e39c4afe0 | 713 | py | Python | setup.py | kmdouglass/DEFCoN | c69f0668f453151af0e088bc66529385dc1c8c17 | [
"BSD-3-Clause"
] | 9 | 2018-04-14T16:03:27.000Z | 2021-02-11T09:31:49.000Z | setup.py | kmdouglass/DEFCoN | c69f0668f453151af0e088bc66529385dc1c8c17 | [
"BSD-3-Clause"
] | null | null | null | setup.py | kmdouglass/DEFCoN | c69f0668f453151af0e088bc66529385dc1c8c17 | [
"BSD-3-Clause"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='DEFCoN',
version='0.1.0',
packages=['defcon'],
url='https://github.com/LEB-EPFL/DEFCoN',
license='BSD3',
author='Baptiste Ottino, Kyle M. Douglass',
author_email='kyle.douglass@epfl.c... | 27.423077 | 66 | 0.521739 |
38bf2661140528dcfdb6e6eac0859b539b870e8e | 488 | py | Python | Review.py | biubiutang/LARA-1 | 23cca626a864f92d02d98b67d80941eef4ccc0ef | [
"MIT"
] | 4 | 2019-10-22T03:15:18.000Z | 2021-03-07T05:06:35.000Z | Review.py | biubiutang/LARA-1 | 23cca626a864f92d02d98b67d80941eef4ccc0ef | [
"MIT"
] | null | null | null | Review.py | biubiutang/LARA-1 | 23cca626a864f92d02d98b67d80941eef4ccc0ef | [
"MIT"
] | 3 | 2020-08-08T16:11:00.000Z | 2021-03-07T05:06:38.000Z |
# coding: utf-8
# In[25]:
from collections import defaultdict
class Review:
def __init__(self):
self.sentences = [] #list of objects of class Sentence
self.reviewId = ""
self.ratings = {} #true ratings provided by the user
def __str__(self):
retStr = ""
for se... | 24.4 | 66 | 0.567623 |
38bf2a51071d5624ce327126adac587921e881f8 | 4,201 | py | Python | redbox/request/classes/request.py | cytopia/prometheus-redbox_exporter | cfef30d9b705cc0176b74c7a527709a27937ce25 | [
"MIT"
] | 3 | 2021-02-27T13:40:32.000Z | 2021-03-18T18:44:07.000Z | redbox/request/classes/request.py | cytopia/prometheus-redbox_exporter | cfef30d9b705cc0176b74c7a527709a27937ce25 | [
"MIT"
] | null | null | null | redbox/request/classes/request.py | cytopia/prometheus-redbox_exporter | cfef30d9b705cc0176b74c7a527709a27937ce25 | [
"MIT"
] | null | null | null | """Abstract class definition."""
from typing import List, Dict
import re
from abc import ABC
from abc import abstractmethod
from ..types import DsTarget
from ..types import DsResponse
from ..conditions import evaluate_response
class Request(ABC):
"""Abstract class to be implemented by all Request handlers."""
... | 37.176991 | 90 | 0.44418 |
38bf378fb54aa5403f59dbafcadba7b4a91a5a97 | 4,737 | py | Python | tests/django_property_filter/filters/test_property_iso_date_time_from_to_range_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 17 | 2020-07-21T10:54:20.000Z | 2021-11-28T12:02:59.000Z | tests/django_property_filter/filters/test_property_iso_date_time_from_to_range_filter.py | ericziethen/django-property-filter | 164e31e189eda7ca0fdedb832edc436cfe50de47 | [
"MIT"
] | 210 | 2020-05-28T04:51:23.000Z | 2022-03-25T10:43:53.000Z | tests/django_property_filter/filters/test_property_iso_date_time_from_to_range_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 3 | 2020-11-25T11:21:20.000Z | 2022-02-17T11:55:49.000Z |
import datetime
import pytest
from django_filters import FilterSet, IsoDateTimeFromToRangeFilter
from django_property_filter import PropertyFilterSet, PropertyIsoDateTimeFromToRangeFilter
from property_filter.models import IsoDateTimeFromToRangeFilterModel
@pytest.mark.parametrize('lookup', PropertyIsoDateTimeFr... | 48.835052 | 205 | 0.74562 |
38bf66268d79e0e83c3d88db4c1866f699af474e | 13,613 | py | Python | backend/backend/services/audit_gen/key_account.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | backend/backend/services/audit_gen/key_account.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | backend/backend/services/audit_gen/key_account.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import logging
import uuid
from datetime import datetime
from typing import List, Sequence
import grpc
import sqlalchemy.orm
from common.constants import (
ADMIN_UUID,
CURRENCY_TO_BLOCKCHAIN,
PAGINATION_LIMIT,
SECP256K1_ALTERNATIVE_GENERATOR,
)
from common.utils.datetime import get_current_datetime
fro... | 40.038235 | 119 | 0.652024 |
38bfb452447b9edd113cc5bc4c71de51d615fb74 | 394 | py | Python | terrascript/provider/sumologic.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/sumologic.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/sumologic.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/sumologic.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:28:04 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.provider.sumologic
#
# instead of
#
# >>> import terrascript.provider.SumoLogic.sumologic
#
# This is only available for 'official' and 'pa... | 26.266667 | 73 | 0.753807 |
38bfbfb19df73ae5dfe35e879d3dce2e7396a8c0 | 2,324 | py | Python | src/oscar/apps/order/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/order/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/order/models.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from oscar.apps.address.abstract_models import (
AbstractBillingAddress, AbstractShippingAddress)
from oscar.apps.order.abstract_models import * # noqa
from oscar.core.loading import is_model_registered
__all__ = ['PaymentEventQuantity', 'ShippingEventQuantity']
if not is_model_registered('order', 'Orde... | 23.714286 | 60 | 0.697504 |
38bfe397b161b19ddbbb20cf8d17b37a922f2b91 | 10,315 | py | Python | neutrino/tools.py | joshuavictorchen/neutrino | 378081346787a66c186be2ef64338418ebf6321f | [
"MIT"
] | 1 | 2021-11-28T03:00:31.000Z | 2021-11-28T03:00:31.000Z | neutrino/tools.py | joshuavictorchen/neutrino | 378081346787a66c186be2ef64338418ebf6321f | [
"MIT"
] | null | null | null | neutrino/tools.py | joshuavictorchen/neutrino | 378081346787a66c186be2ef64338418ebf6321f | [
"MIT"
] | null | null | null | import neutrino.config as c
import os
import shutil
import sys
import yaml
from datetime import datetime, timezone, timedelta
from dateutil.parser import isoparse
def print_recursive_dict(data, indent_spaces=3, indent_step=2, recursion=False):
"""Prints a formatted nested dictionary to the console.
.. code-b... | 35.325342 | 167 | 0.6635 |
38bff313a465d2d4644f2faa29e1be4a0074973b | 427 | py | Python | news/migrations/0008_post_pinned.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 1 | 2020-11-17T18:50:44.000Z | 2020-11-17T18:50:44.000Z | news/migrations/0008_post_pinned.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 9 | 2020-10-23T18:42:45.000Z | 2022-03-12T00:39:57.000Z | news/migrations/0008_post_pinned.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-10-03 17:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('news', '0007_facebookpost_content'),
]
operations = [
migrations.AddField(
model_name='post',
name='pinned',
... | 22.473684 | 96 | 0.615925 |
38c023856f97fdbf171edae07561db310c490e87 | 3,107 | py | Python | pre_commit/store.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | pre_commit/store.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | pre_commit/store.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import io
import logging
import os
import os.path
import tempfile
from cached_property import cached_property
from plumbum import local
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
from pre_commit.util import clean_path_on_failure
from pre_commit.util im... | 30.460784 | 78 | 0.647892 |
38c05036fecf09cac9be852461a486b367dcdecb | 4,556 | py | Python | bin/ZmqBinListener.py | lionelyoung/OTMql4Zmq | 3297bda2b04407acf28164ea0fcc57090d45ad23 | [
"MIT"
] | 97 | 2015-04-07T07:45:37.000Z | 2021-11-14T17:39:42.000Z | bin/ZmqBinListener.py | Roledenez/OTMql4Zmq | 130bab038b4a3fa3d1dd1b40004fa480734c2698 | [
"MIT"
] | 21 | 2015-04-02T17:41:05.000Z | 2017-07-18T15:04:42.000Z | bin/ZmqBinListener.py | Roledenez/OTMql4Zmq | 130bab038b4a3fa3d1dd1b40004fa480734c2698 | [
"MIT"
] | 47 | 2015-04-07T07:46:06.000Z | 2021-07-12T08:52:05.000Z | # -*-mode: python; py-indent-offset: 4; tab-width: 8; coding: utf-8; encoding: utf-8-dos -*-
# This Python script requires pyzmq
# http://pypi.python.org/packages/source/p/pyzmq/
import sys
import traceback
import time
import zmq
from OTMql427.ZmqListener import ZmqMixin
from OTLibLog import vError, vWarn, vInfo, v... | 35.046154 | 92 | 0.518437 |
38c05fe00b5b40893f8f7dff80716bd930b4dcd1 | 6,465 | py | Python | posthog/models/team.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2021-04-09T09:13:23.000Z | 2021-04-09T09:13:23.000Z | posthog/models/team.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2022-02-15T00:47:35.000Z | 2022-02-15T00:47:35.000Z | posthog/models/team.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2021-09-08T19:45:03.000Z | 2021-09-08T19:45:03.000Z | import re
from typing import Any, Dict, List, Optional
import pytz
from django.contrib.postgres.fields import ArrayField
from django.core.validators import MinLengthValidator
from django.db import models
from django.dispatch.dispatcher import receiver
from posthog.helpers.dashboard_templates import create_dashboard_f... | 44.586207 | 120 | 0.707038 |
38c06b3db81d1a764b3ed0892be14b4cdacedcaa | 4,010 | py | Python | alipay/aop/api/request/AlipayOpenMiniAmpeCollectrightQueryRequest.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/request/AlipayOpenMiniAmpeCollectrightQueryRequest.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/request/AlipayOpenMiniAmpeCollectrightQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniAmpeCollectrightQueryModel import AlipayOpenMiniAmpeCollectrightQueryModel
class AlipayOpenMiniAmpeCollectrightQueryRe... | 27.655172 | 148 | 0.64788 |
38c0775205f5c31d3b1cb1ad1ab9083390a07d45 | 28,848 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/aio/operations/_registries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/aio/operations/_registries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/aio/operations/_registries_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 ... | 45.501577 | 306 | 0.683271 |
38c0c2e80c300d719586fee2b091d8e5a57ab5e0 | 2,512 | py | Python | python/cuML/pca/pca_random_test.py | just4jc/cuml | bd7824bff0a60634b11c1f036dd41cc7f8c05bc1 | [
"Apache-2.0"
] | 1 | 2019-02-14T05:32:35.000Z | 2019-02-14T05:32:35.000Z | python/cuML/pca/pca_random_test.py | just4jc/cuml | bd7824bff0a60634b11c1f036dd41cc7f8c05bc1 | [
"Apache-2.0"
] | 1 | 2020-02-20T06:08:23.000Z | 2020-02-20T06:08:23.000Z | python/cuML/pca/pca_random_test.py | just4jc/cuml | bd7824bff0a60634b11c1f036dd41cc7f8c05bc1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 27.604396 | 99 | 0.769506 |
38c0c829d68a0c2a4d4da81120a7985453e88fd2 | 559 | py | Python | practice/weekly-contest-150/last-string.py | yangtau/algorithms-practice | 58974b6e661101686eeab357dcf6821cf7b51064 | [
"MIT"
] | 1 | 2019-03-24T17:57:34.000Z | 2019-03-24T17:57:34.000Z | practice/weekly-contest-150/last-string.py | yangtau/algorithms-practice | 58974b6e661101686eeab357dcf6821cf7b51064 | [
"MIT"
] | null | null | null | practice/weekly-contest-150/last-string.py | yangtau/algorithms-practice | 58974b6e661101686eeab357dcf6821cf7b51064 | [
"MIT"
] | null | null | null | class Solution:
def lastSubstring(self, s: str) -> str:
s_len = len(s)
c = max(s)
xs = [i for i in range(s_len) if c == s[i]]
if len(xs) == s_len:
return s
off = 1
while len(xs) != 1:
max_i = xs[0]
for i in xs:
max_i... | 32.882353 | 70 | 0.416816 |
38c0d23720772b90a4928adc45279a092fe4ae5d | 1,288 | py | Python | examples/ex1.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | 1 | 2018-02-22T19:13:24.000Z | 2018-02-22T19:13:24.000Z | examples/ex1.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | null | null | null | examples/ex1.py | abyellow/abin-tight-binding | 538aef632937b1840d5ffd184f162858637b01f5 | [
"MIT"
] | 1 | 2017-09-14T17:25:09.000Z | 2017-09-14T17:25:09.000Z | import sys
sys.path.append('/home/abin/abin/research/abin-tight-binding/')
from time import time
import numpy as np
import matplotlib.pyplot as plt
import abintb.hf as hf
if __name__=='__main__':
tau = 1.
deltau = .5
m_max = 0
E0 = 1.
freq = 3.
phase = 2
k_num = 100
option = 0
import argparse
pa = arg... | 21.114754 | 94 | 0.626553 |
38c0f7169acfe8579163172dfa8bcb2175a6b981 | 3,483 | py | Python | embiggen/edge_label_prediction/edge_label_prediction_sklearn/decision_tree_edge_label_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/edge_label_prediction/edge_label_prediction_sklearn/decision_tree_edge_label_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/edge_label_prediction/edge_label_prediction_sklearn/decision_tree_edge_label_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Submodule wrapping Decision Tree for edge label prediction."""
from typing import Dict, Any
from sklearn.tree import DecisionTreeClassifier
from embiggen.edge_label_prediction.edge_label_prediction_sklearn.sklearn_edge_label_prediction_adapter import SklearnEdgeLabelPredictionAdapter
class DecisionTreeEdgeLabelPre... | 37.858696 | 144 | 0.638243 |
38c110e5dbb03083eef124352616678ebdad3ad2 | 11,173 | py | Python | improver_tests/generate_ancillaries/test_GenerateOrographyBandAncils.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/generate_ancillaries/test_GenerateOrographyBandAncils.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/generate_ancillaries/test_GenerateOrographyBandAncils.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 41.381481 | 88 | 0.65354 |
38c11522d7e7f6e8db84b4f545b59ab29aa72456 | 2,149 | py | Python | pkg/workloads/cortex/lib/type/tracker.py | wingkwong/cortex | be0ebebef68c4bad83d947b2325325b71ef2940f | [
"Apache-2.0"
] | 1 | 2020-02-23T21:43:17.000Z | 2020-02-23T21:43:17.000Z | pkg/workloads/cortex/lib/type/tracker.py | wingkwong/cortex | be0ebebef68c4bad83d947b2325325b71ef2940f | [
"Apache-2.0"
] | 10 | 2020-02-03T21:38:08.000Z | 2020-02-14T18:44:13.000Z | pkg/workloads/cortex/lib/type/tracker.py | wingkwong/cortex | be0ebebef68c4bad83d947b2325325b71ef2940f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Cortex Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 40.54717 | 122 | 0.582597 |
38c11b98f8961b29c9e3b771558ec03299ee0a73 | 283 | py | Python | Python/Coursera/Universidad Austral/1. Introducción a la programación con Python/semana 3/fibonacci.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | Python/Coursera/Universidad Austral/1. Introducción a la programación con Python/semana 3/fibonacci.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | Python/Coursera/Universidad Austral/1. Introducción a la programación con Python/semana 3/fibonacci.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | # fib(n) = fib(n-1) + fib(n-2)
def fib(num):
"""Resuelve la sucesión de Fibonacci"""
anterior,actual=0,1
for x in range(0,num//2):
aux = anterior + actual
print(anterior, actual)
anterior = aux
actual += anterior
return anterior,actual
print(fib(35), sep='-', end='') | 18.866667 | 40 | 0.639576 |
38c12b571ff566a57391ac91bfc4afe4aa255e62 | 10,001 | py | Python | docs/conf.py | OlafHaag/NeuroPsyResearchAnalysis | 83d750310ee2467979d503d2fb4b6011ead9e9fc | [
"MIT"
] | null | null | null | docs/conf.py | OlafHaag/NeuroPsyResearchAnalysis | 83d750310ee2467979d503d2fb4b6011ead9e9fc | [
"MIT"
] | null | null | null | docs/conf.py | OlafHaag/NeuroPsyResearchAnalysis | 83d750310ee2467979d503d2fb4b6011ead9e9fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
impo... | 33.448161 | 85 | 0.70463 |
38c133f0065b5444863a7372fb629843f2e105c2 | 4,031 | py | Python | cms/models/permissionmodels.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | null | null | null | cms/models/permissionmodels.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 9 | 2015-06-25T10:31:12.000Z | 2022-03-12T00:41:22.000Z | cms/models/permissionmodels.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 1 | 2017-08-22T07:00:30.000Z | 2017-08-22T07:00:30.000Z | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from cms.models import Page, ACCESS_CHOICES, ACCESS_PAGE_AND_DESCENDANTS
from cms.models.managers import BasicPag... | 37.324074 | 156 | 0.693872 |
38c16123c3347d6d10a2e974047af9c5719273d2 | 218 | py | Python | src/methods/__init__.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 7 | 2020-11-16T16:50:37.000Z | 2021-09-08T16:56:32.000Z | src/methods/__init__.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | null | null | null | src/methods/__init__.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 3 | 2020-07-03T04:14:55.000Z | 2021-03-14T21:51:22.000Z | from ._k_medoids import KMedoids
from .ConstrainedKMeans.src import ConstrainedKMeans
from .constrained_leiden import constrained_leiden
from .nearest_neighbors import knn_auto
from .knn_noise_filter import knn_filter
| 36.333333 | 52 | 0.880734 |
38c1936741c578c35be51b847aa31856e3807896 | 4,282 | py | Python | xonsh/winutils.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/winutils.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/winutils.py | jianlingzhong/xonsh | 42e2d792117ceeb0ab7ec8f92fb1177b21388f84 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
This file is based on the code from https://github.com/JustAMan/pyWinClobber/blob/master/win32elevate.py
Copyright (c) 2013 by JustAMan at GitHub
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 Softwa... | 29.531034 | 104 | 0.704344 |
38c1997d394d7d11099e2519805decb664e26bdf | 4,037 | py | Python | userbot/modules/ping.py | amibotdisini/PocongUserbot | 1bbefe68f25dbcb969bc5517026253bb68331fca | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2022-03-07T21:26:35.000Z | 2022-03-07T21:26:35.000Z | userbot/modules/ping.py | amibotdisini/PocongUserbot | 1bbefe68f25dbcb969bc5517026253bb68331fca | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/ping.py | amibotdisini/PocongUserbot | 1bbefe68f25dbcb969bc5517026253bb68331fca | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | import random
import time
from time import sleep
from datetime import datetime
from speedtest import Speedtest
from userbot import CMD_HANDLER as cmd
from userbot import CMD_HELP, StartTime, bot, DEVS
from userbot.events import register
from userbot.utils import edit_or_reply, humanbytes, poci_cmd
absen = ... | 29.253623 | 86 | 0.54595 |
38c1b24392571187757b4c28c5c29bd9f38ee9df | 3,113 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/addresses/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/addresses/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/addresses/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2014 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... | 30.821782 | 76 | 0.728558 |
38c1b4c1f4c5fd7c736195b46d039811b4a9491a | 16,953 | py | Python | tests/test_vtapi3_domains.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 8 | 2020-01-10T00:19:06.000Z | 2022-01-12T18:13:27.000Z | tests/test_vtapi3_domains.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 2 | 2020-02-07T22:01:55.000Z | 2020-02-11T19:52:48.000Z | tests/test_vtapi3_domains.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 3 | 2020-01-10T00:19:18.000Z | 2020-12-08T17:13:41.000Z | """
VirusTotalAPIDomains class testing module.
Author: Evgeny Drobotun (c) 2020
License: MIT (https://github.com/drobotun/virustotalapi3/blob/master/LICENSE)
"""
import unittest
import errno
from unittest import mock
import requests
from vtapi3 import VirusTotalAPIDomains, VirusTotalAPIError
def get_mock_r... | 43.580977 | 104 | 0.726656 |
38c1d16e366d48bfd1fae4b369d3c08d7ac85727 | 25,294 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_applications_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/v2019_03_01/operations/_gallery_applications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_applications_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 ... | 43.837088 | 224 | 0.679687 |
38c1d605c3a6cd295e1a6bba4e66307ebd8816b6 | 263 | py | Python | pyplan/pyplan/external_link/dashboard/admin.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 17 | 2019-12-04T19:22:19.000Z | 2021-07-28T11:17:05.000Z | pyplan/pyplan/external_link/dashboard/admin.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 9 | 2019-12-13T15:34:43.000Z | 2022-02-10T11:43:00.000Z | pyplan/pyplan/external_link/dashboard/admin.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 5 | 2019-12-04T15:57:06.000Z | 2021-08-20T19:59:26.000Z | from django.contrib import admin
from .models import DashboardExternalLink
@admin.register(DashboardExternalLink)
class DashboardExternalLinkAdmin(admin.ModelAdmin):
list_display = ('id', 'model_path', 'is_active', 'owner', 'dashboard', 'common_instance')
| 29.222222 | 93 | 0.787072 |
38c1fa76f30712c948014d22b4bdfe776b2e7ee8 | 272,525 | py | Python | tests/lax_numpy_test.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | null | null | null | tests/lax_numpy_test.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | 6 | 2022-01-03T08:14:15.000Z | 2022-02-14T08:13:40.000Z | tests/lax_numpy_test.py | SCiarella/jax | a7c9b6d11fa833c748d72b3ccc11baeed9c0248c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 45.557506 | 136 | 0.643189 |
38c20dc87ed0a0ae3c6c3893f2b151ef9351dc0f | 1,877 | py | Python | native/bitcoin/signmessage.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/bitcoin/signmessage.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/bitcoin/signmessage.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | # Copyright (C) 2013-2015 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... | 31.283333 | 80 | 0.719766 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.