hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f9f99acea0cf4c4d3ac547649f288185a2df30a | 504 | py | Python | Bugscan_exploits-master/exp_list/exp-56.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-56.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-56.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #!/usr/bin/env python
import re
def assign(service, arg):
if service != "cmstop":
return
return True, arg
def audit(arg):
url = arg
code, head, res, errcode, _ = curl.curl(url + 'cmstop/apps/system/view/template/edit.php')
if code == 200:
m = re.search(' in <b>([^<]+)</b> on line <... | 24 | 94 | 0.565476 |
03c5074d60cd9870a3a0a35ff084ca20071797c8 | 58,451 | py | Python | hs_swat_modelinstance/tests/test_swat_modelinstance_metadata.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_swat_modelinstance/tests/test_swat_modelinstance_metadata.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_swat_modelinstance/tests/test_swat_modelinstance_metadata.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | import os
import tempfile
import shutil
from xml.etree import ElementTree as ET
from django.test import TransactionTestCase
from django.core.files.uploadedfile import UploadedFile
from django.contrib.auth.models import Group
from django.core.exceptions import ValidationError
from django.db.utils import Inte... | 60.383264 | 101 | 0.608339 |
24fd616bce91b5923128ee42fa606b4e7bb0c33d | 2,152 | py | Python | setup.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | setup.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | setup.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import glob
import os
import torch
from setuptools import find_packages
from setuptools import setup
from torch.utils.cpp_extension import CUDA_HOME
from torch.utils.cpp_extension import CppExtension
from torch.ut... | 27.240506 | 101 | 0.629647 |
5fd248df2fb3c9abf7b2efdb2e75e3bd3f9afa03 | 1,011 | py | Python | ChoreographyHive/choreography/choreography.py | VirxEC/RLBotChoreography | 579aa3590868a2e9fd99cd1f9dd32a4c3058c55e | [
"MIT"
] | null | null | null | ChoreographyHive/choreography/choreography.py | VirxEC/RLBotChoreography | 579aa3590868a2e9fd99cd1f9dd32a4c3058c55e | [
"MIT"
] | null | null | null | ChoreographyHive/choreography/choreography.py | VirxEC/RLBotChoreography | 579aa3590868a2e9fd99cd1f9dd32a4c3058c55e | [
"MIT"
] | null | null | null | from typing import Set, List
from rlbot.utils.structures.game_data_struct import GameTickPacket
from choreography.drone import Drone
class Choreography:
def __init__(self):
self.sequence = []
self.sequence_index = 0
self.odd_tick = -1
self.finished = False
def step(self, pa... | 25.275 | 66 | 0.614243 |
5f34555b412d918119aee5978e0e2ac64afdd583 | 80 | py | Python | codeforces/cdf324_2b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | codeforces/cdf324_2b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | codeforces/cdf324_2b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | N = int(input())
mod = 10**9+7
print((pow(3, 3*N, mod) - pow(7, N, mod)) % mod)
| 20 | 48 | 0.5125 |
62fab0b6013d77af44a6474cb42e246cb4870065 | 19,069 | py | Python | pytests/tuqquery/upgrade_n1qlrbac.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/upgrade_n1qlrbac.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/upgrade_n1qlrbac.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | import logging
from couchbase_helper.documentgenerator import BlobGenerator
from couchbase_helper.tuq_helper import N1QLHelper
from newupgradebasetest import NewUpgradeBaseTest
from pytests.tuqquery.n1ql_rbac_2 import RbacN1QL
from remote.remote_util import RemoteMachineShellConnection
log = logging.getLogger(__name__... | 56.250737 | 179 | 0.648907 |
fadcfbc51697026fad916ef357867bfaa37c0e6a | 14,975 | py | Python | sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/monitoring/scheduled_query_rules_alert.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 48.778502 | 233 | 0.654424 |
e233d499f70a55e11ec7e1fcc43b40b3647b6c10 | 12,257 | py | Python | derive/derivative.py | ProfessorLinstar/Derivative-Progarm | ef1275a4ccd0958d67d07cf2e82032684f3d60ad | [
"MIT"
] | null | null | null | derive/derivative.py | ProfessorLinstar/Derivative-Progarm | ef1275a4ccd0958d67d07cf2e82032684f3d60ad | [
"MIT"
] | null | null | null | derive/derivative.py | ProfessorLinstar/Derivative-Progarm | ef1275a4ccd0958d67d07cf2e82032684f3d60ad | [
"MIT"
] | null | null | null | def derive(inputFunction,derVar):
from functions.callFunctions import Calls
from functions.separateFunctions import Separate
from functions.parenthesesFunctions import ParInfo
from functions.storeFunctions import Store
commands="*/^NSCTdvt"
#Separate by +'s outside of largest parentheses
dvO... | 49.825203 | 173 | 0.49384 |
f62340ccf30eb86c8695c921df23298a1f30cecd | 64,147 | py | Python | plaidml2/bridge/keras/backend_test.py | VonRosenchild/plaidml | 762d5fff6467b43a15623f927502892ce8df91a4 | [
"Apache-2.0"
] | 1 | 2019-09-11T11:18:50.000Z | 2019-09-11T11:18:50.000Z | plaidml2/bridge/keras/backend_test.py | HubBucket-Team/plaidml | 762d5fff6467b43a15623f927502892ce8df91a4 | [
"Apache-2.0"
] | null | null | null | plaidml2/bridge/keras/backend_test.py | HubBucket-Team/plaidml | 762d5fff6467b43a15623f927502892ce8df91a4 | [
"Apache-2.0"
] | 1 | 2019-09-11T11:18:52.000Z | 2019-09-11T11:18:52.000Z | # Copyright 2018 Intel Corporation.
import argparse
import functools
import logging
import operator
import os
import sys
import unittest
from collections import OrderedDict
# Make sure we win the race with TF to load libstdc++...
import plaidml2
from plaidml2.ffi import Error as pml2_ffi_Error
import numpy as np
imp... | 36.530182 | 149 | 0.502705 |
6fe72bcd810b3d49a4e4a48847c79c0f7a747203 | 6,768 | py | Python | demo-tornado/views.py | nirn/python3-saml | c660f6f639a783c66f05c003bc2a04ba6b162048 | [
"MIT"
] | null | null | null | demo-tornado/views.py | nirn/python3-saml | c660f6f639a783c66f05c003bc2a04ba6b162048 | [
"MIT"
] | 2 | 2019-08-14T16:01:13.000Z | 2021-06-21T14:23:03.000Z | demo-tornado/views.py | peopledoc/python3-saml | 6b414775c3617f3711e8959fa849ed564ea6f585 | [
"MIT"
] | null | null | null | import tornado.ioloop
import tornado.web
import Settings
import tornado.httpserver
import tornado.httputil
from onelogin.saml2.auth import OneLogin_Saml2_Auth
from onelogin.saml2.utils import OneLogin_Saml2_Utils
# Global session info
session = {}
class Application(tornado.web.Application):
def __init__(self):
... | 37.810056 | 179 | 0.612884 |
32adc34d06b23ba89a120d88f294b2efe5b5a5a2 | 8,750 | py | Python | python/smqtk/bin/compute_many_descriptors.py | cdeepakroy/SMQTK | ef5cec7399e9766f95ff06fe122471a51fc4b2d8 | [
"BSD-3-Clause"
] | null | null | null | python/smqtk/bin/compute_many_descriptors.py | cdeepakroy/SMQTK | ef5cec7399e9766f95ff06fe122471a51fc4b2d8 | [
"BSD-3-Clause"
] | null | null | null | python/smqtk/bin/compute_many_descriptors.py | cdeepakroy/SMQTK | ef5cec7399e9766f95ff06fe122471a51fc4b2d8 | [
"BSD-3-Clause"
] | null | null | null | """
Descriptor computation helper utility. Checks data content type with respect
to the configured descriptor generator to skip content that does not match
the accepted types. Optionally, we can additionally filter out image content
whose image bytes we cannot load via ``PIL.Image.open``.
"""
import collections
import ... | 38.209607 | 84 | 0.584343 |
9e8822c5605b9a442ac0d8fce1ba069c9f1dfcd1 | 1,534 | py | Python | pedido/serializers.py | helpthx/simple-ci | d5139377feb678808d4eeb69c1f700afd1d199e1 | [
"Apache-2.0"
] | null | null | null | pedido/serializers.py | helpthx/simple-ci | d5139377feb678808d4eeb69c1f700afd1d199e1 | [
"Apache-2.0"
] | 6 | 2021-03-19T09:28:58.000Z | 2022-02-10T11:24:50.000Z | pedido/serializers.py | helpthx/simple-ci | d5139377feb678808d4eeb69c1f700afd1d199e1 | [
"Apache-2.0"
] | null | null | null | from django.db import transaction
from rest_framework import serializers
from django.conf import settings
from produto.models import Produtos
from .models import Pedidos, OPCS_STATUS_PEDIDO
class PedidosSerializer(serializers.ModelSerializer):
class Meta:
model = Pedidos
fields = '__all__'
clas... | 28.943396 | 78 | 0.705346 |
d02d8631b5ffc020f84393528e1bcffb5edce304 | 13,830 | py | Python | metadata-ingestion/setup.py | jbencina/datahub | bb0943f2e5362754b2df4760c75a3bd6b7620220 | [
"Apache-2.0"
] | 1 | 2022-01-12T03:16:08.000Z | 2022-01-12T03:16:08.000Z | metadata-ingestion/setup.py | jbencina/datahub | bb0943f2e5362754b2df4760c75a3bd6b7620220 | [
"Apache-2.0"
] | 2 | 2021-12-09T17:18:32.000Z | 2022-03-23T14:37:06.000Z | metadata-ingestion/setup.py | jbencina/datahub | bb0943f2e5362754b2df4760c75a3bd6b7620220 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from typing import Dict, Set
import setuptools
is_py37_or_newer = sys.version_info >= (3, 7)
package_metadata: dict = {}
with open("./src/datahub/__init__.py") as fp:
exec(fp.read(), package_metadata)
def get_long_description():
root = os.path.dirname(__file__)
with open(os.path.j... | 35.461538 | 123 | 0.634129 |
790c3b46e34aae8a0d1f2c0f61445f788fda2fe1 | 405 | py | Python | mysite/ViralScreener/migrations/0009_auto_20200326_0339.py | memtech3/Viral-Screener | 1940a7e097a9f5b7eb78f001c0a9623b398c020e | [
"MIT"
] | 1 | 2020-03-25T22:23:35.000Z | 2020-03-25T22:23:35.000Z | mysite/ViralScreener/migrations/0009_auto_20200326_0339.py | memtech3/Viral-Screener | 1940a7e097a9f5b7eb78f001c0a9623b398c020e | [
"MIT"
] | 7 | 2020-03-23T04:51:55.000Z | 2020-03-25T22:23:14.000Z | mysite/ViralScreener/migrations/0009_auto_20200326_0339.py | memtech3/Viral-Screener | 1940a7e097a9f5b7eb78f001c0a9623b398c020e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-26 03:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ViralScreener', '0008_auto_20200326_0338'),
]
operations = [
migrations.AlterField(
model_name='employeescreeningresponses',
... | 21.315789 | 53 | 0.619753 |
960d88f9e5e077aa901482e7822b8963747ade83 | 28,903 | py | Python | xonsh/xonfig.py | sebix/xonsh | 99bdf5600af446ac4e3ba4067111fc309569b8b7 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-12-29T17:42:08.000Z | 2021-12-29T17:42:08.000Z | xonsh/xonfig.py | sebix/xonsh | 99bdf5600af446ac4e3ba4067111fc309569b8b7 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xonsh/xonfig.py | sebix/xonsh | 99bdf5600af446ac4e3ba4067111fc309569b8b7 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """The xonsh configuration (xonfig) utility."""
import os
import re
import ast
import sys
import json
import shutil
import random
import pprint
import tempfile
import textwrap
import itertools
import contextlib
import collections
import typing as tp
from xonsh.ply import ply
import xonsh.wizard as wiz
from xonsh impo... | 31.831498 | 137 | 0.594644 |
eaaef01a8e037b42f2a9bec69339cfd51160e5a3 | 46,622 | py | Python | eval.py | glhr/yolact | 5e573ce940a76a54ef58fd0d3d7891f61816c1bc | [
"MIT"
] | null | null | null | eval.py | glhr/yolact | 5e573ce940a76a54ef58fd0d3d7891f61816c1bc | [
"MIT"
] | null | null | null | eval.py | glhr/yolact | 5e573ce940a76a54ef58fd0d3d7891f61816c1bc | [
"MIT"
] | null | null | null | from data import COCODetection, get_label_map, MEANS, COLORS
from yolact import Yolact
from utils.augmentations import BaseTransform, FastBaseTransform, Resize
from utils.functions import MovingAverage, ProgressBar
from layers.box_utils import jaccard, center_size, mask_iou
from utils import timer
from utils.functions ... | 42.077617 | 159 | 0.591909 |
544e4478674aaa2ab419fa0c7987ea82d4da25ef | 434 | py | Python | setup.py | harttraveller/optolib | 38af0fa5e998ade55c5db257afa8c2cdf30849cf | [
"MIT"
] | null | null | null | setup.py | harttraveller/optolib | 38af0fa5e998ade55c5db257afa8c2cdf30849cf | [
"MIT"
] | null | null | null | setup.py | harttraveller/optolib | 38af0fa5e998ade55c5db257afa8c2cdf30849cf | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='optolib',
version='0.1.0',
description='A Python package to model options strategy payoffs',
url='https://github.com/harttraveller/optolib',
author='Hart Traveller',
author_email='hartktraveller@gmail.com',
license='MIT License',
packages=['opt... | 33.384615 | 104 | 0.698157 |
1cf9e8b8cf21d42e81f2dafefc2105b9db7e32af | 11,031 | py | Python | allennlp/training/checkpointer.py | XinzheL/allennlp | 6f222919aba1799f320ef507b08bce8a84e4af3f | [
"Apache-2.0"
] | 2 | 2020-08-29T20:29:38.000Z | 2022-03-28T02:58:42.000Z | allennlp/training/checkpointer.py | XinzheL/allennlp | 6f222919aba1799f320ef507b08bce8a84e4af3f | [
"Apache-2.0"
] | 67 | 2020-12-01T13:17:18.000Z | 2022-03-29T13:05:49.000Z | allennlp/training/checkpointer.py | XinzheL/allennlp | 6f222919aba1799f320ef507b08bce8a84e4af3f | [
"Apache-2.0"
] | 3 | 2020-09-22T17:35:53.000Z | 2022-02-08T01:03:03.000Z | from typing import Union, Dict, Any, List, Tuple, Optional
import logging
import os
import re
import shutil
import time
import torch
import allennlp
from allennlp.common import Registrable
from allennlp.nn import util as nn_util
from allennlp.training import util as training_util
logger = logging.getLogger(__name__... | 45.9625 | 115 | 0.638292 |
e4fe72b1240536969af902534a837da059dd0feb | 18,385 | py | Python | larch/wxlib/parameter.py | kbuc/xraylarch | 3abb0d6bdc65cf2747a03dd114d98df317c0ac9f | [
"BSD-2-Clause"
] | 90 | 2015-01-10T21:57:25.000Z | 2022-03-29T15:21:52.000Z | larch/wxlib/parameter.py | maurov/xraylarch | b76f2ce29b6d183f69a7586ea8daccbe0a89ace3 | [
"BSD-2-Clause"
] | 225 | 2015-01-09T19:08:47.000Z | 2022-03-31T15:55:54.000Z | larch/wxlib/parameter.py | maurov/xraylarch | b76f2ce29b6d183f69a7586ea8daccbe0a89ace3 | [
"BSD-2-Clause"
] | 51 | 2015-03-13T10:03:28.000Z | 2022-03-17T07:54:38.000Z | #!/usr/bin/env python
"""
General-Purpose Parameter widget
shows Float TextCtrl for value, Choice fixed/variable/constrained
and icon button to bring up dialog for full settings,
including max/min value and constraint expression
"""
import numpy as np
import ast
import wx
from wx.lib.embeddedimage import PyEmbed... | 38.064182 | 91 | 0.562687 |
273bd9fc330ffe2f24bd53461670afbe4d246694 | 1,172 | py | Python | search_simulator.py | lavaman131/Disaster-Relief-Project | a0261197b5c082c846709b1ee83682c69ca1d197 | [
"MIT"
] | 1 | 2021-08-09T18:27:29.000Z | 2021-08-09T18:27:29.000Z | search_simulator.py | lavaman131/Disaster-Relief-Project | a0261197b5c082c846709b1ee83682c69ca1d197 | [
"MIT"
] | null | null | null | search_simulator.py | lavaman131/Disaster-Relief-Project | a0261197b5c082c846709b1ee83682c69ca1d197 | [
"MIT"
] | null | null | null | def random_waypoints(aircraft_name, area, num_points, lat=37.6213, long=-122.379, alt=10.668, rewind=True):
if rewind:
root.Rewind()
temp_lat, temp_long = lat, long
root.ExecuteCommand(f'AddWaypoint */Aircraft/{aircraft_name} DetTimeAccFromVel {temp_lat} {temp_long} {alt} 1.0')
... | 45.076923 | 119 | 0.593857 |
6134d4b2e2e73573459b4b109174393e1e8997f6 | 13,423 | py | Python | tests/test_tokenizer.py | Ashiq5/dnspython | 5449af5318d88bada34f661247f3bcb16f58f057 | [
"ISC"
] | 1,666 | 2015-01-02T17:46:14.000Z | 2022-03-30T07:27:32.000Z | tests/test_tokenizer.py | felixonmars/dnspython | 2691834df42aab74914883fdf26109aeb62ec647 | [
"ISC"
] | 591 | 2015-01-16T12:19:49.000Z | 2022-03-30T21:32:11.000Z | tests/test_tokenizer.py | felixonmars/dnspython | 2691834df42aab74914883fdf26109aeb62ec647 | [
"ISC"
] | 481 | 2015-01-14T04:14:43.000Z | 2022-03-30T19:28:52.000Z | # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and ... | 36.977961 | 80 | 0.616181 |
e7dc61ad58c4ab6787f5d42795f484fb4286bcfe | 32,070 | py | Python | ls/lib/python3.8/site-packages/isort/main.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | 1 | 2020-08-31T16:53:18.000Z | 2020-08-31T16:53:18.000Z | ls/lib/python3.8/site-packages/isort/main.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | ls/lib/python3.8/site-packages/isort/main.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | """Tool for sorting imports alphabetically, and automatically separated into sections."""
import argparse
import functools
import json
import os
import sys
from io import TextIOWrapper
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator, List, Optional, Sequence, Set
from warnings import warn
fro... | 34.55819 | 100 | 0.592641 |
7a91c0a658c4766c892629b20787ec96cd5afff0 | 1,938 | py | Python | apps/atoms/atoms.py | cocteautwins/SIRIUS-develop | 8ab09ca7cc69e9a7dc76475b7b562b20d56deea3 | [
"BSD-2-Clause"
] | null | null | null | apps/atoms/atoms.py | cocteautwins/SIRIUS-develop | 8ab09ca7cc69e9a7dc76475b7b562b20d56deea3 | [
"BSD-2-Clause"
] | null | null | null | apps/atoms/atoms.py | cocteautwins/SIRIUS-develop | 8ab09ca7cc69e9a7dc76475b7b562b20d56deea3 | [
"BSD-2-Clause"
] | null | null | null | import json
import os, stat, re
import sys
fin = open("atoms.in", "r")
fout = open("run.x", "w")
atoms = {}
while True:
line = fin.readline()
if not line: break
if line.find("atom") == 0:
line = fin.readline()
s1 = line.split()
zn = int(s1[0])
line = fin.readline... | 25.168831 | 88 | 0.458204 |
060cde4357030a93f7176b6b70f445c6dfc4e6bb | 3,318 | py | Python | scripts/openimu_driver.py | LukaszChl/ros_openimu | 1bcf547fa42ee7c7dcc856c1d4eb5702d301b059 | [
"Apache-2.0"
] | null | null | null | scripts/openimu_driver.py | LukaszChl/ros_openimu | 1bcf547fa42ee7c7dcc856c1d4eb5702d301b059 | [
"Apache-2.0"
] | null | null | null | scripts/openimu_driver.py | LukaszChl/ros_openimu | 1bcf547fa42ee7c7dcc856c1d4eb5702d301b059 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import rospy
import sys
import math
from time import time
from sensor_msgs.msg import Imu, MagneticField
try:
from ros_openimu.src.aceinna.tools import OpenIMU
except: # pylint: disable=bare-except
temp = (sys.path[0])
temp2 = temp[0:(len(temp)-7)]
sys.path.append(temp2 + 'src'... | 31.903846 | 72 | 0.626582 |
67ccb4d853eb388b36ee8e2bd2e7f25f56792714 | 1,824 | py | Python | superset/db_engines/hive.py | ailurus1991/incubator-superset | e112e4417cb7386fe161c5ff2fe0f1b5d05c3a17 | [
"Apache-2.0"
] | null | null | null | superset/db_engines/hive.py | ailurus1991/incubator-superset | e112e4417cb7386fe161c5ff2fe0f1b5d05c3a17 | [
"Apache-2.0"
] | null | null | null | superset/db_engines/hive.py | ailurus1991/incubator-superset | e112e4417cb7386fe161c5ff2fe0f1b5d05c3a17 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pyhive import hive
from TCLIService import ttypes
from thrift import Thrift
# TODO: contribute back to pyhive.
def fetch_logs(self, max_rows=1024,
o... | 37.22449 | 79 | 0.648575 |
8a232e3d821700a92739596d0905e97d47fd9f95 | 1,315 | py | Python | awards/urls.py | ChegeDaniella/awards | 9b2bd27b089a87bbd7595b51395fdc7cfedda349 | [
"MIT"
] | null | null | null | awards/urls.py | ChegeDaniella/awards | 9b2bd27b089a87bbd7595b51395fdc7cfedda349 | [
"MIT"
] | 4 | 2021-03-30T13:32:53.000Z | 2021-09-08T02:08:19.000Z | awards/urls.py | ChegeDaniella/awards | 9b2bd27b089a87bbd7595b51395fdc7cfedda349 | [
"MIT"
] | null | null | null | """awards URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 39.848485 | 101 | 0.71635 |
b61a1d3c7d431e0703cc8b9503f8454aa956f7eb | 13,265 | py | Python | atom/nucleus/python/nucleus_api/models/insurance_discount.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/insurance_discount.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/insurance_discount.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Atom API
The Hydrogen Atom API # noqa: E501
OpenAPI spec version: 1.7.0
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InsuranceDiscount(object):
... | 28.163482 | 277 | 0.600829 |
ba01f534a5b4cfd263bd840a27086f2648fa2373 | 447 | py | Python | utils/compute_accuracy.py | listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks | dbc6a48ab5e0bf4361be459a45598523f2344371 | [
"MIT"
] | 1 | 2022-02-04T10:39:54.000Z | 2022-02-04T10:39:54.000Z | utils/compute_accuracy.py | listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks | dbc6a48ab5e0bf4361be459a45598523f2344371 | [
"MIT"
] | null | null | null | utils/compute_accuracy.py | listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks | dbc6a48ab5e0bf4361be459a45598523f2344371 | [
"MIT"
] | null | null | null | from chainer.dataset import concat_examples
import chainer.functions as F
class Accuracy:
def __init__(self, iter, model):
self.iteration = iter.next()
self.model = model
@property
def accuracy(self):
image_test, target_test = concat_examples(self.iteration, -1)
pre... | 29.8 | 69 | 0.680089 |
0c429af30607889991c695091a170ed3e076eb04 | 399 | py | Python | countries/migrations/0002_alter_country_overseas_region.py | uktrade/contractor-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | null | null | null | countries/migrations/0002_alter_country_overseas_region.py | uktrade/contractor-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | 1 | 2022-02-18T09:17:41.000Z | 2022-02-18T09:17:41.000Z | countries/migrations/0002_alter_country_overseas_region.py | uktrade/resourcing-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.11 on 2022-01-07 14:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("countries", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="country",
name="overseas_region",
... | 21 | 61 | 0.60401 |
f176bc7f2ab13abf33197d62017cf3b287d0b8b0 | 1,611 | py | Python | 2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/00-Exam-Prep/00-Exams/02_Final_Exam/Problem-3.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/00-Exam-Prep/00-Exams/02_Final_Exam/Problem-3.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/00-Exam-Prep/00-Exams/02_Final_Exam/Problem-3.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | capacity = int(input())
users_dict = {}
command = input()
while not command == "Statistics":
command = command.split("=")
action = command[0]
if action == "Add":
username = command[1]
sent_messages = int(command[2])
received_messages = int(command[3])
if username not in ... | 28.767857 | 91 | 0.604593 |
f46b1edd156a5f7c18a55b892cde29972802d997 | 2,595 | py | Python | api/im2txt/build_vocab.py | Aytuar/librephotos | 1d888fd9f49fcb82cce43412b87f9f9736ad5f47 | [
"MIT"
] | 1 | 2021-06-16T01:14:45.000Z | 2021-06-16T01:14:45.000Z | api/im2txt/build_vocab.py | Aytuar/librephotos | 1d888fd9f49fcb82cce43412b87f9f9736ad5f47 | [
"MIT"
] | null | null | null | api/im2txt/build_vocab.py | Aytuar/librephotos | 1d888fd9f49fcb82cce43412b87f9f9736ad5f47 | [
"MIT"
] | null | null | null | # import argparse
import pickle
from collections import Counter
import nltk
from pycocotools.coco import COCO
from tqdm import tqdm
caption_path = 'api/im2txt/data/annotations/captions_train2014.json'
vocab_path = 'api/im2txt/data/vocab.pkl'
threshold = 4
class Vocabulary(object):
"""Simple vocabulary wrapper."... | 31.646341 | 81 | 0.619653 |
94c4ff1fe52bf32516ea0aab3930b6cb6c7c8424 | 25 | py | Python | mevscan/amm/__init__.py | sambacha/mevscan-py | 3667345e3f95948ee6b114fc2aaf00a481eff191 | [
"Apache-2.0"
] | 1 | 2021-04-19T06:51:11.000Z | 2021-04-19T06:51:11.000Z | mevscan/amm/__init__.py | sambacha/mevscan-py | 3667345e3f95948ee6b114fc2aaf00a481eff191 | [
"Apache-2.0"
] | null | null | null | mevscan/amm/__init__.py | sambacha/mevscan-py | 3667345e3f95948ee6b114fc2aaf00a481eff191 | [
"Apache-2.0"
] | null | null | null | from .swaps import Swaps
| 12.5 | 24 | 0.8 |
988a6a02ee20f3233744975d8c31e7f7afb9b1f9 | 5,195 | py | Python | pcmdi_metrics/driver/model.py | tomvothecoder/pcmdi_metrics | 34cdd56a78859db6417cbc7018c8ae8bbf2f09b5 | [
"BSD-3-Clause"
] | 47 | 2015-03-18T22:44:51.000Z | 2022-01-30T04:35:05.000Z | pcmdi_metrics/driver/model.py | tomvothecoder/pcmdi_metrics | 34cdd56a78859db6417cbc7018c8ae8bbf2f09b5 | [
"BSD-3-Clause"
] | 524 | 2015-01-01T04:00:34.000Z | 2022-03-31T15:06:46.000Z | pcmdi_metrics/driver/model.py | tomvothecoder/pcmdi_metrics | 34cdd56a78859db6417cbc7018c8ae8bbf2f09b5 | [
"BSD-3-Clause"
] | 30 | 2015-06-05T17:19:43.000Z | 2021-11-02T15:22:21.000Z | import os
import logging
import MV2
import cdutil
import cdms2
from pcmdi_metrics.io.base import Base
import pcmdi_metrics.driver.dataset
from pcmdi_metrics import LOG_LEVEL
class Model(pcmdi_metrics.driver.dataset.DataSet):
''' Handles all the computation (setting masking, target grid, etc)
and some file I/O... | 44.401709 | 118 | 0.617324 |
7468e83d677b2db535a0125147fa8810382fcfec | 715 | py | Python | scraper/scraper/celery.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | 1 | 2017-03-04T06:41:03.000Z | 2017-03-04T06:41:03.000Z | scraper/scraper/celery.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | null | null | null | scraper/scraper/celery.py | ikeikeikeike/panglao-scraper | e7a4919c40c457ea73e89782e8b2dd3213129bcf | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'scraper.settings')
app = Celery('scraper')
# Using a string here means the worker don't have to serialize
# ... | 31.086957 | 67 | 0.776224 |
6da11266e879443741c5f7bdef00ec26204b7da8 | 5,566 | py | Python | woke/tests/test_svm_cli.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 7 | 2022-01-28T06:50:00.000Z | 2022-02-14T11:34:32.000Z | woke/tests/test_svm_cli.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 30 | 2022-01-26T17:54:48.000Z | 2022-03-21T12:33:53.000Z | woke/tests/test_svm_cli.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | null | null | null | import re
import shutil
from pathlib import Path
import pytest
from click.testing import CliRunner
from woke.a_config import WokeConfig
from woke.b_svm import SolcVersionManager
from woke.c_regex_parsing.solidity_version import SolidityVersion
from woke.x_cli.__main__ import main
PYTEST_WOKE_ROOT_PATH = (Path.home(... | 33.130952 | 87 | 0.670679 |
997ae3deb9d96ad55845ae088a5b1f48958d4173 | 1,334 | py | Python | readability_transformers/features/lf/Discourse/EnDF.py | OneTheta/readability-transformers | 3c122c98a90c67add8eafad16563b269d5e3124a | [
"Apache-2.0"
] | 1 | 2022-01-26T10:55:59.000Z | 2022-01-26T10:55:59.000Z | readability_transformers/features/lf/Discourse/EnDF.py | OneTheta/readability-transformers | 3c122c98a90c67add8eafad16563b269d5e3124a | [
"Apache-2.0"
] | null | null | null | readability_transformers/features/lf/Discourse/EnDF.py | OneTheta/readability-transformers | 3c122c98a90c67add8eafad16563b269d5e3124a | [
"Apache-2.0"
] | 2 | 2021-10-14T22:53:57.000Z | 2022-01-26T10:53:32.000Z | # -*- coding: UTF-8 -*-
"""
Software: LingFeat - Comprehensive Linguistic Features for Readability Assessment
Page: EnDF.py (Entity Density Features)
License: CC-BY-SA 4.0
Original Author: Bruce W. Lee (이웅성) @brucewlee
Affiliation 1: LXPER AI, Seoul, South Korea
Affiliation 2: University of Pennsylvania, PA, USA
Contr... | 31.761905 | 215 | 0.631184 |
ba464f6949d92bd221d0ba285931eb5998eef163 | 891 | py | Python | bert_dataset.py | NTDXYG/EL-CodeBert | 62a2364db567f8887a339c40e2c7f7807bedfd50 | [
"MIT"
] | 1 | 2022-03-12T06:59:11.000Z | 2022-03-12T06:59:11.000Z | bert_dataset.py | NTDXYG/EL-CodeBert | 62a2364db567f8887a339c40e2c7f7807bedfd50 | [
"MIT"
] | null | null | null | bert_dataset.py | NTDXYG/EL-CodeBert | 62a2364db567f8887a339c40e2c7f7807bedfd50 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
class CustomDataset(Dataset):
def __init__(self, texts, targets, tokenizer, max_len=512):
self.texts = texts
self.targets = targets
self.tokenizer = tokenizer
self.max_len = max_len
def __len__(self):
return len(self.texts)
def __getitem__(... | 24.75 | 61 | 0.653199 |
5190ba77d7dbe6891aad2097f2d9f3716b1adf37 | 16,041 | py | Python | optimization/rgbd/step5_run_RGBD_opt.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 442 | 2020-10-13T03:40:48.000Z | 2022-03-31T05:00:28.000Z | optimization/rgbd/step5_run_RGBD_opt.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 33 | 2020-10-15T14:50:27.000Z | 2022-03-18T11:27:50.000Z | optimization/rgbd/step5_run_RGBD_opt.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 99 | 2020-10-14T09:40:53.000Z | 2022-03-21T06:51:39.000Z | """
This file is part of the repo: https://github.com/tencent-ailab/hifi3dface
If you find the code useful, please cite our paper:
"High-Fidelity 3D Digital Human Head Creation from RGB-D Selfies."
ACM Transactions on Graphics 2021
Code: https://github.com/tencent-ailab/hifi3dface
Copyright (c) [2020-2021] [Tencent... | 34.720779 | 88 | 0.58257 |
8297f16f6081829029064600ad617044591bc256 | 6,015 | py | Python | python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py | ZHUI/Paddle | 32ae8e81322ed380a89157fcb632c229e2c64979 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 44.227941 | 102 | 0.719202 |
05cb604c87fea6779300d4d37db8a6a66707877e | 2,908 | py | Python | JPS_Chatbot/jps-chatbot/UI/source/Wikidata_Query/fuzzysearch_wiki.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 21 | 2021-03-08T01:58:25.000Z | 2022-03-09T15:46:16.000Z | JPS_Chatbot/jps-chatbot/UI/source/Wikidata_Query/fuzzysearch_wiki.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 63 | 2021-05-04T15:05:30.000Z | 2022-03-23T14:32:29.000Z | JPS_Chatbot/jps-chatbot/UI/source/Wikidata_Query/fuzzysearch_wiki.py | cambridge-cares/TheWorldAvatar | baf08ddc090414c6d01e48c74b408f2192461e9e | [
"MIT"
] | 15 | 2021-03-08T07:52:03.000Z | 2022-03-29T04:46:20.000Z | from rapidfuzz import process, fuzz
from .load_dicts import FORMULA_URI_DICT, SMILES_URI_DICT, NAME_URI_DICT, \
FORMULA_KEYS, NAME_KEYS, SMILES_KEYS, ATTRIBUTE_URI_DICT, \
ATTRIBUTE_KEYS, CLASS_URI_DICT, CLASS_KEYS, process_species, process_species_reversed
def find_nearest_match(entity_value, entity_type):
... | 33.425287 | 89 | 0.666437 |
6c9d134d92999b4bddb3c13afbc4b7445b4d1746 | 212 | py | Python | Leetcode/0916. Word Subsets/0916.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/0916. Word Subsets/0916.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | Leetcode/0916. Word Subsets/0916.py | Next-Gen-UI/Code-Dynamics | a9b9d5e3f27e870b3e030c75a1060d88292de01c | [
"MIT"
] | null | null | null | class Solution:
def wordSubsets(self, A: List[str], B: List[str]) -> List[str]:
count = Counter()
for b in B:
count = count | Counter(b)
return [a for a in A if Counter(a) & count == count]
| 23.555556 | 65 | 0.589623 |
91ba721da932f9af5f921b9c147c7e9b5cc6b23f | 5,363 | py | Python | sacred/observers/slack.py | uatach/sacred | fd3753f4b4010bee26566d723bdba56d0697b061 | [
"MIT"
] | 16 | 2021-07-18T12:54:40.000Z | 2022-03-01T02:04:53.000Z | sacred/observers/slack.py | C24IO/sacred | fd3753f4b4010bee26566d723bdba56d0697b061 | [
"MIT"
] | 5 | 2016-10-22T15:46:11.000Z | 2017-06-29T11:19:11.000Z | sacred/observers/slack.py | C24IO/sacred | fd3753f4b4010bee26566d723bdba56d0697b061 | [
"MIT"
] | 8 | 2019-10-08T21:37:31.000Z | 2021-11-19T13:17:23.000Z | #!/usr/bin/env python
# coding=utf-8
from __future__ import division, print_function, unicode_literals
from sacred.observers.base import RunObserver
from sacred.config.config_files import load_config_file
import json
DEFAULT_SLACK_PRIORITY = 10
# http://stackoverflow.com/questions/538666/python-format-timedelta-to... | 34.6 | 79 | 0.571136 |
4d778d099ea4acf06220f541505a64db79202340 | 2,131 | py | Python | core/confdb/syntax/media/streams/overlays/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | core/confdb/syntax/media/streams/overlays/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | core/confdb/syntax/media/streams/overlays/base.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# ConfDB media streams <name> overlays syntax
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------... | 32.784615 | 98 | 0.240732 |
f041caf32a5c31b6d5c690f5df276441becff4ee | 2,246 | py | Python | tests/unit/test_environment.py | Jitsusama/lets-do-dns | faff4bf45e9a4be438e15afbe5caa249fe1e5210 | [
"Apache-2.0"
] | 8 | 2017-05-07T12:17:16.000Z | 2018-07-02T23:35:16.000Z | tests/unit/test_environment.py | Jitsusama/lets-do-dns | faff4bf45e9a4be438e15afbe5caa249fe1e5210 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_environment.py | Jitsusama/lets-do-dns | faff4bf45e9a4be438e15afbe5caa249fe1e5210 | [
"Apache-2.0"
] | null | null | null | """Tests the lets_do_dns.environment.py module."""
import pytest
from lets_do_dns.errors import InputError
from lets_do_dns.environment import Environment
@pytest.mark.parametrize(
'environment',
[{},
{'DO_DOMAIN': 'b', 'CERTBOT_DOMAIN': 'c', 'CERTBOT_VALIDATION': 'd'},
{'DO_APIKEY': 'a', 'CERTBOT... | 33.522388 | 75 | 0.645147 |
7aef154e2c71613566268a347a9cbf0fb2319251 | 5,922 | py | Python | uploadlibrary/UploadBot.py | Commonists/MassUploadLibrary | fa094952c5b87259743b5783aa31015bfc519b1f | [
"MIT"
] | 3 | 2015-01-16T14:49:56.000Z | 2018-01-23T21:07:02.000Z | uploadlibrary/UploadBot.py | Commonists/MassUploadLibrary | fa094952c5b87259743b5783aa31015bfc519b1f | [
"MIT"
] | null | null | null | uploadlibrary/UploadBot.py | Commonists/MassUploadLibrary | fa094952c5b87259743b5783aa31015bfc519b1f | [
"MIT"
] | null | null | null | import re
import pywikibot
import pywikibot.textlib as textlib
from scripts.upload import UploadRobot
from scripts.data_ingestion import DataIngestionBot
from argparse import ArgumentParser
def UploadBotArgumentParser():
"""Create an ArgumentParser object."""
parser = ArgumentParser(description="Process metada... | 37.481013 | 91 | 0.572611 |
09e78255eab9ab9b8549c4d062a9e3fc1b5575f5 | 3,078 | py | Python | lib/roi_data/minibatch.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | lib/roi_data/minibatch.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | 1 | 2021-03-01T09:16:15.000Z | 2021-03-01T09:34:49.000Z | lib/roi_data/minibatch.py | Min-Sheng/CA_FSIS_Cell | c24750d860a9417b30819c05613282cd74dc517f | [
"MIT"
] | null | null | null | import numpy as np
import cv2
from scipy.misc import imread
from core.config import cfg
import utils.blob as blob_utils
import roi_data.rpn
import roi_data.fast_rcnn
def get_minibatch_blob_names(is_training=True):
"""Return blob names in the order in which they are read by the data loader.
"""
# data blob... | 36.211765 | 80 | 0.641001 |
46d4a24ffb67ee001dad8f282ef0df514ae9e1b6 | 1,790 | py | Python | model-optimizer/extensions/back/LeakyReLUMutation.py | itikhono/openvino | 3a9db885bf8ffc38d31c15d1f687f6abb5c67c3b | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/back/LeakyReLUMutation.py | itikhono/openvino | 3a9db885bf8ffc38d31c15d1f687f6abb5c67c3b | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/back/LeakyReLUMutation.py | itikhono/openvino | 3a9db885bf8ffc38d31c15d1f687f6abb5c67c3b | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2018-2020 Intel 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 i... | 35.098039 | 116 | 0.712849 |
11ad3789b3506201ac02697ca7b52df4328fe712 | 3,877 | py | Python | custom/inddex/ucr/data_providers/gaps_report_by_item_data.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | custom/inddex/ucr/data_providers/gaps_report_by_item_data.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | custom/inddex/ucr/data_providers/gaps_report_by_item_data.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | from memoized import memoized
from custom.inddex.ucr.data_providers.mixins import GapsReportByItemData
class GapsReportByItemSummaryData(GapsReportByItemData):
title = 'Gaps By Item Summary'
slug = 'gaps_by_item_summary'
headers_in_order = [
'food_code', 'food_name', 'fao_who_gift_food_group_code... | 38.77 | 120 | 0.62471 |
9c1c6b5ba49ac07a200af6797f7d5fa6c7cc7896 | 611 | py | Python | src/data/combine_text_data.py | brandonmalexander/btc_prediction | f5ed6292ca300f0d62f2ee2f1a9c46e55e731e79 | [
"MIT"
] | null | null | null | src/data/combine_text_data.py | brandonmalexander/btc_prediction | f5ed6292ca300f0d62f2ee2f1a9c46e55e731e79 | [
"MIT"
] | null | null | null | src/data/combine_text_data.py | brandonmalexander/btc_prediction | f5ed6292ca300f0d62f2ee2f1a9c46e55e731e79 | [
"MIT"
] | null | null | null | import pandas as pd
def combine_chunks(path1, path2):
df1 = pd.read_csv(filepath_or_buffer=path1, infer_datetime_format=True)
df1 = df1.set_index(df1.columns[0])
df2 = pd.read_csv(filepath_or_buffer=path2, infer_datetime_format=True)
df2 = df2.set_index(df2.columns[0])
combined = df1.append(df2)
... | 26.565217 | 87 | 0.764321 |
07c4699ef956fa7d696723a99822df0f970dfbec | 221 | py | Python | personal_portfolio/administrator/views.py | numbstudent/ghvms | 6d5f93c76498e0fa167b0ce7dfed53764242626f | [
"MIT"
] | null | null | null | personal_portfolio/administrator/views.py | numbstudent/ghvms | 6d5f93c76498e0fa167b0ce7dfed53764242626f | [
"MIT"
] | null | null | null | personal_portfolio/administrator/views.py | numbstudent/ghvms | 6d5f93c76498e0fa167b0ce7dfed53764242626f | [
"MIT"
] | null | null | null | from django.shortcuts import render
from vendor import models as vm
# Create your views here.
def mainmenu(request):
#data = vm.
data = "<h1>ayam</h1>"
return render(request, 'mainpage.html', {'hai': data})
| 22.1 | 58 | 0.678733 |
a7480f8b02005bd706fd79a2d64bd58d5d417334 | 11,250 | py | Python | models/seed_resnet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | 2 | 2022-01-22T03:57:21.000Z | 2022-01-30T20:44:32.000Z | models/seed_resnet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | null | null | null | models/seed_resnet.py | VITA-Group/Peek-a-Boo | 9290d4e5e3aee0dff994e1a664ec91bd6ec93176 | [
"MIT"
] | 2 | 2022-01-30T12:26:56.000Z | 2022-03-14T12:42:06.000Z | '''ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from .seed_conv import SeedConv2d
from ma... | 53.827751 | 191 | 0.6808 |
4443c5294686d57d58c51792df907f0b9bdc80bf | 1,905 | py | Python | vendor-local/lib/python/celery/tests/concurrency/test_threads.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 1 | 2015-07-13T03:29:04.000Z | 2015-07-13T03:29:04.000Z | vendor-local/lib/python/celery/tests/concurrency/test_threads.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2015-03-03T23:02:19.000Z | 2019-03-30T04:45:51.000Z | vendor-local/lib/python/celery/tests/concurrency/test_threads.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2016-04-15T11:43:05.000Z | 2016-04-15T11:43:15.000Z | from __future__ import absolute_import
from __future__ import with_statement
from mock import Mock
from celery.concurrency.threads import NullDict, TaskPool, apply_target
from celery.tests.utils import Case, mask_modules, mock_module
class test_NullDict(Case):
def test_setitem(self):
x = NullDict()
... | 29.765625 | 76 | 0.585827 |
3d12c6f4484edf84720bb278d4ee5badfd8d6101 | 27,654 | py | Python | Stitcher.py | Keep-Passion/ImageStitch | e67b3864a356fcca58d29d554744a4f6413571b6 | [
"MIT"
] | 101 | 2019-09-03T03:19:52.000Z | 2022-02-28T13:28:43.000Z | Stitcher.py | RONINGOD/ImageStitch | e67b3864a356fcca58d29d554744a4f6413571b6 | [
"MIT"
] | 21 | 2020-02-03T15:23:42.000Z | 2022-01-22T13:39:00.000Z | Stitcher.py | RONINGOD/ImageStitch | e67b3864a356fcca58d29d554744a4f6413571b6 | [
"MIT"
] | 33 | 2019-09-14T15:42:20.000Z | 2022-02-04T12:31:00.000Z | import numpy as np
import cv2
# from scipy.stats import mode
import time
import os
import glob
import copy
# import skimage.measure
# from numba import jit
import ImageUtility as Utility
import ImageFusion
import time
class ImageFeature():
# 用来保存串行全局拼接中的第二张图像的特征点和描述子,为后续加速拼接使用,避免重复计算
isBreak = True # 判断是... | 52.177358 | 1,096 | 0.567549 |
fb526b81ca182d3e05e5f252c7483cab49a620cd | 4,942 | py | Python | parserACMRefs.py | namnatulco/paper-finder | 92a23883a9cb7492936be6fa9b072267c95b4ba9 | [
"MIT"
] | 2 | 2017-06-13T21:13:27.000Z | 2017-07-22T10:03:42.000Z | parserACMRefs.py | namnatulco/paper-finder | 92a23883a9cb7492936be6fa9b072267c95b4ba9 | [
"MIT"
] | null | null | null | parserACMRefs.py | namnatulco/paper-finder | 92a23883a9cb7492936be6fa9b072267c95b4ba9 | [
"MIT"
] | null | null | null | """
This is the specific Parser implementation for the ACM Digital Library.
Format last tested: ... (early September 2013?)
URI spec:
A direct link to an ACM DL page. The parser will convert the link to set the preferred
layout to 'flat', if not already set, while reading.
File spec:
The URI or File should point to o... | 41.183333 | 239 | 0.6121 |
3e880888a2568428e6e2bd49a1619062b4333eed | 636 | py | Python | aot/model/controller/cinematics.py | jaycheungchunman/age-of-triggers | f2a75685a0b0cc9e26132d4f52b6ed2c4798f6b4 | [
"MIT"
] | 15 | 2016-02-08T19:35:46.000Z | 2021-11-24T06:52:04.000Z | agescx/controller/cinematics.py | heinezen/agescx | 32e1b11c7c4205a63a156b0014ec7143c0d0c13b | [
"MIT"
] | 1 | 2016-01-03T02:54:46.000Z | 2016-01-03T02:54:46.000Z | agescx/controller/cinematics.py | heinezen/agescx | 32e1b11c7c4205a63a156b0014ec7143c0d0c13b | [
"MIT"
] | 5 | 2016-10-05T03:55:29.000Z | 2021-05-14T10:15:57.000Z | class Cinematics:
"""Cinematics
Attributes:
intro (str): intro video filename
defeat (str): defeat video filename
victory (str): victory video filename
Todo:
add more functions
"""
def __init__(self):
"""Initialize cinematics section"""
self.intro ... | 24.461538 | 53 | 0.555031 |
355f3dc0e96910853d723848c4754955a0ce31b4 | 10,330 | py | Python | tests/components/test_init.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 2 | 2020-08-29T07:24:56.000Z | 2020-10-27T21:47:35.000Z | tests/components/test_init.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 6 | 2021-02-08T20:25:50.000Z | 2022-03-11T23:27:53.000Z | tests/components/test_init.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 3 | 2018-09-14T07:34:09.000Z | 2018-09-29T12:57:10.000Z | """The tests for Core components."""
# pylint: disable=protected-access
import unittest
from unittest.mock import patch, Mock
import yaml
import homeassistant.core as ha
from homeassistant import config
from homeassistant.const import (
STATE_ON, STATE_OFF, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE)
impor... | 35.743945 | 78 | 0.654889 |
e7dfbe98edace88444f062c1705058996b54ca75 | 1,001 | py | Python | tf2_ros_py/setup.py | KeisukeShima/geometry2 | 9ff7dadb7462c606e5996a296f6ef4fe4e41cbc7 | [
"BSD-3-Clause"
] | 53 | 2018-03-07T04:06:15.000Z | 2022-03-23T19:58:57.000Z | tf2_ros_py/setup.py | KeisukeShima/geometry2 | 9ff7dadb7462c606e5996a296f6ef4fe4e41cbc7 | [
"BSD-3-Clause"
] | 452 | 2017-03-22T20:09:00.000Z | 2022-03-31T23:56:20.000Z | tf2_ros_py/setup.py | KeisukeShima/geometry2 | 9ff7dadb7462c606e5996a296f6ef4fe4e41cbc7 | [
"BSD-3-Clause"
] | 131 | 2017-04-21T16:41:37.000Z | 2022-03-23T13:39:00.000Z | from setuptools import find_packages
from setuptools import setup
package_name = 'tf2_ros_py'
setup(
name=package_name,
version='0.20.0',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('sh... | 29.441176 | 80 | 0.649351 |
9dbf8b35c3ed05542464533ebeeb3aa324e823a0 | 4,688 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_operations.py | kazrael2119/azure-sdk-for-python | 485dd7b1b5ac41c1a5b9991e402b4035b55f437a | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_operations.py | kazrael2119/azure-sdk-for-python | 485dd7b1b5ac41c1a5b9991e402b4035b55f437a | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_06_01/aio/operations/_operations.py | kazrael2119/azure-sdk-for-python | 485dd7b1b5ac41c1a5b9991e402b4035b55f437a | [
"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 ... | 42.618182 | 133 | 0.668302 |
6701db6bb3be27e8295f540662ac37c4873f8d2f | 196 | py | Python | graphs/dijkstra/priority-queue-impl-adjacency-map/vertex.py | icamarkov/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python | 616aa3141b7ce22e533253fbe76c390617512710 | [
"MIT"
] | 81 | 2019-06-15T01:22:23.000Z | 2022-03-30T08:35:14.000Z | graphs/minimum-spanning-tree/prims-algorithm/vertex.py | UsmanNiazi/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python | ad9fc70388b8930cbcd4bb2a24c7fc20cfea551e | [
"MIT"
] | 1 | 2019-09-12T06:56:07.000Z | 2019-09-16T15:30:52.000Z | graphs/minimum-spanning-tree/prims-algorithm/vertex.py | UsmanNiazi/Problem-Solving-with-Algorithms-and-Data-Structures-using-Python | ad9fc70388b8930cbcd4bb2a24c7fc20cfea551e | [
"MIT"
] | 28 | 2019-05-13T01:52:24.000Z | 2022-02-18T15:23:48.000Z | class Vertex:
def __init__(self, label: str = None, weight: int = float("inf"), key: int = None):
self.label: str = label
self.weight: int = weight
self.key: int = key
| 32.666667 | 87 | 0.581633 |
ebee0d00ad7908f518c2838f544151afbb92c110 | 1,349 | py | Python | central_erros/api/views.py | MarioGN/aceleradev-python-central-de-erros | 02da65a2dd40c943be42d2e8c91797aaa09eb2f4 | [
"MIT"
] | 1 | 2020-06-09T21:25:34.000Z | 2020-06-09T21:25:34.000Z | central_erros/api/views.py | MarioGN/aceleradev-python-central-de-erros | 02da65a2dd40c943be42d2e8c91797aaa09eb2f4 | [
"MIT"
] | 3 | 2021-03-30T13:38:57.000Z | 2021-09-22T19:09:21.000Z | central_erros/api/views.py | MarioGN/aceleradev-python-central-de-erros | 02da65a2dd40c943be42d2e8c91797aaa09eb2f4 | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404
from rest_framework.generics import ListCreateAPIView, RetrieveDestroyAPIView, RetrieveUpdateDestroyAPIView
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.response import Response
from rest_framework.permissions import IsAut... | 36.459459 | 107 | 0.801334 |
c236c4485b77172ba766b882b539b063d081bdf2 | 11,641 | py | Python | torchvision/models/googlenet.py | gbxu/vision | b9f963d7b0af8b4c7e904d16493c5fb0b30bd457 | [
"BSD-3-Clause"
] | null | null | null | torchvision/models/googlenet.py | gbxu/vision | b9f963d7b0af8b4c7e904d16493c5fb0b30bd457 | [
"BSD-3-Clause"
] | null | null | null | torchvision/models/googlenet.py | gbxu/vision | b9f963d7b0af8b4c7e904d16493c5fb0b30bd457 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from .._internally_replaced_utils import load_state_dict_from_url
from typing import Optional, Tuple, List, Callable, Any
__all__ = ['GoogLeNet', 'googlenet', "GoogLeNetOutputs... | 37.073248 | 119 | 0.594622 |
42a67c53ee21a7924f489332c0c3b77f2fe01e17 | 829 | py | Python | Codeforces/C_Swap_Letters.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | Codeforces/C_Swap_Letters.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | Codeforces/C_Swap_Letters.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | from collections import deque
n=int(input())
s=list(input())
t=list(input())
a=deque([])
b=deque([])
diff=0
x=[]
for i in range(n):
if s[i]!=t[i]:
diff+=1
x.append(i)
if diff%2!=0:
print(-1)
elif diff==2:
print(2)
print(x[0]+1,x[0]+1)
print(x[0]+1,x[1]+1)
else:
for i in range(0,n... | 22.405405 | 54 | 0.464415 |
9572117a7a387ae5dce78dfe4f197c8827971582 | 63 | py | Python | Calc Tool/Equation.py | jacobgnewman/Denote | 219f50fc8183e6dde3194cf738d77ee90641cf4e | [
"MIT"
] | null | null | null | Calc Tool/Equation.py | jacobgnewman/Denote | 219f50fc8183e6dde3194cf738d77ee90641cf4e | [
"MIT"
] | null | null | null | Calc Tool/Equation.py | jacobgnewman/Denote | 219f50fc8183e6dde3194cf738d77ee90641cf4e | [
"MIT"
] | null | null | null | class classname(object):
"""
docstring
"""
pass | 12.6 | 24 | 0.52381 |
706754aa47389be0fda79b8fc4df7ea16d1fbea0 | 4,396 | py | Python | tensorflow_probability/python/sts/__init__.py | bolcom/probability | 4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7 | [
"Apache-2.0"
] | 1 | 2019-10-10T06:15:42.000Z | 2019-10-10T06:15:42.000Z | tensorflow_probability/python/sts/__init__.py | bolcom/probability | 4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/sts/__init__.py | bolcom/probability | 4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7 | [
"Apache-2.0"
] | 1 | 2020-05-27T19:42:06.000Z | 2020-05-27T19:42:06.000Z | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 49.954545 | 109 | 0.834395 |
9e24bcb84cf2df3d28aaa313371ea72439d8eab1 | 1,784 | py | Python | app/core/models.py | travtex/recipe-app-api | 1ecbf5216bcb4a3bc22892c44e7975bffa8936b9 | [
"MIT"
] | null | null | null | app/core/models.py | travtex/recipe-app-api | 1ecbf5216bcb4a3bc22892c44e7975bffa8936b9 | [
"MIT"
] | null | null | null | app/core/models.py | travtex/recipe-app-api | 1ecbf5216bcb4a3bc22892c44e7975bffa8936b9 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields):
"""Creates an... | 28.31746 | 76 | 0.662556 |
5f69c68c3452b23c9eb283aca3ee3c03b251d77f | 2,955 | py | Python | openstack_dashboard/dashboards/logmanagement/overview/views.py | vanduc95/Horizon-Openstack | 580f8edfb318040be20aa9837933a1e0b01edfad | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/logmanagement/overview/views.py | vanduc95/Horizon-Openstack | 580f8edfb318040be20aa9837933a1e0b01edfad | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/logmanagement/overview/views.py | vanduc95/Horizon-Openstack | 580f8edfb318040be20aa9837933a1e0b01edfad | [
"Apache-2.0"
] | null | null | null | from horizon import tables
import json
from .tables import LogsTable
from openstack_dashboard import api
from horizon import exceptions
class Log:
def __init__(self, log_id, time, pid, level, name, content):
self.id = log_id
self.time = time
self.pid = pid
self.level = level
self.name = name
self.conten... | 52.767857 | 220 | 0.578342 |
66996fa6ede3ef9ae03957774c0ba868a1d581e0 | 120 | py | Python | sm_widgets/models/__init__.py | binh-vu/sm-gui | dd5faa09b7570762aa63bf9f2ff88081cf132db4 | [
"MIT"
] | null | null | null | sm_widgets/models/__init__.py | binh-vu/sm-gui | dd5faa09b7570762aa63bf9f2ff88081cf132db4 | [
"MIT"
] | null | null | null | sm_widgets/models/__init__.py | binh-vu/sm-gui | dd5faa09b7570762aa63bf9f2ff88081cf132db4 | [
"MIT"
] | null | null | null | from .entity import Entity, Value, Statement
from .ontology import OntClass, OntProperty
from .table import Table, Link
| 30 | 44 | 0.808333 |
cd62417b0ba7fecc9a9d23a041a81b701aa8e5d1 | 10,625 | py | Python | Pyrado/scripts/plotting/plot_domain_grid_1d.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/scripts/plotting/plot_domain_grid_1d.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/scripts/plotting/plot_domain_grid_1d.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 1 | 2020-11-24T15:25:26.000Z | 2020-11-24T15:25:26.000Z | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 37.15035 | 118 | 0.6528 |
9f2015c24ac2b7433b0bd7e252cfd323e7ab8625 | 11,365 | py | Python | lib/airflow/airflow/utils/cli.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | 79 | 2021-10-15T07:32:27.000Z | 2022-03-28T04:10:19.000Z | lib/airflow/airflow/utils/cli.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | 153 | 2021-10-15T05:23:46.000Z | 2022-02-23T06:07:10.000Z | lib/airflow/airflow/utils/cli.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | 23 | 2021-10-15T02:36:37.000Z | 2022-03-17T02:59:27.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 35.295031 | 106 | 0.677519 |
ba649dd05f6ef18414d601d0b157b14153eca7b8 | 2,078 | py | Python | examples/Redfish/ex19_reset_ilo.py | moecloud/ILO4 | 44fbdf5affa3ecbd1c49718f04d336eaea9cae00 | [
"Apache-2.0"
] | null | null | null | examples/Redfish/ex19_reset_ilo.py | moecloud/ILO4 | 44fbdf5affa3ecbd1c49718f04d336eaea9cae00 | [
"Apache-2.0"
] | null | null | null | examples/Redfish/ex19_reset_ilo.py | moecloud/ILO4 | 44fbdf5affa3ecbd1c49718f04d336eaea9cae00 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Hewlett Packard Enterprise Development LP
#
# 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 requ... | 38.481481 | 79 | 0.670837 |
f195f2c870deb25b041e11e9c2aebd1436ed3c02 | 3,481 | py | Python | FrenetSerretMeanShape/optimization_utils.py | perrinechassat/FrenetSerretMeanShape | 3e43d719fd09198172f0c2701fb6032d4a1e4dd4 | [
"BSD-3-Clause"
] | 4 | 2021-11-12T15:12:42.000Z | 2022-03-12T07:17:15.000Z | FrenetSerretMeanShape/optimization_utils.py | perrinechassat/FrenetSerretMeanShape | 3e43d719fd09198172f0c2701fb6032d4a1e4dd4 | [
"BSD-3-Clause"
] | null | null | null | FrenetSerretMeanShape/optimization_utils.py | perrinechassat/FrenetSerretMeanShape | 3e43d719fd09198172f0c2701fb6032d4a1e4dd4 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from trajectory import *
from maths_utils import *
from frenet_path import *
from trajectory import *
from model_curvatures import *
import matplotlib.pyplot as plt
from sklearn.model_selection import KFold
from skopt import gp_minimize
from skopt.plots import plot_convergence
from skfda.representati... | 34.465347 | 94 | 0.633151 |
e88581b14cf296b61b2304fe8fde84fc845d52a1 | 8,385 | py | Python | plugin.video.tamilgun/jsunpack.py | arafathster/kodiworks | 8f66814c1ebe0cc4019a81f15d19882eb633d5e2 | [
"Apache-2.0"
] | 105 | 2015-11-28T00:03:11.000Z | 2021-05-05T20:47:42.000Z | plugin.video.tamilgun/jsunpack.py | arafathster/kodiworks | 8f66814c1ebe0cc4019a81f15d19882eb633d5e2 | [
"Apache-2.0"
] | 918 | 2015-11-28T14:12:40.000Z | 2022-03-23T20:24:49.000Z | plugin.video.tamilgun/jsunpack.py | arafathster/kodiworks | 8f66814c1ebe0cc4019a81f15d19882eb633d5e2 | [
"Apache-2.0"
] | 111 | 2015-12-01T14:06:10.000Z | 2020-08-01T10:44:39.000Z | """
urlresolver XBMC Addon
Copyright (C) 2013 Bstrdsmkr
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
(at your option) any later version.... | 62.111111 | 1,737 | 0.599046 |
c60e503d431c130a2638489d9e6b832122a50016 | 2,691 | py | Python | rplugin/python3/denite/source/project.py | skt041959/denite-extra | a9f0c086ae653ea0d92773288770e766f559e058 | [
"MIT"
] | 40 | 2018-03-18T09:24:39.000Z | 2021-09-06T10:01:37.000Z | rplugin/python3/denite/source/project.py | skt041959/denite-extra | a9f0c086ae653ea0d92773288770e766f559e058 | [
"MIT"
] | 5 | 2018-05-07T03:19:22.000Z | 2020-03-09T09:11:36.000Z | rplugin/python3/denite/source/project.py | skt041959/denite-extra | a9f0c086ae653ea0d92773288770e766f559e058 | [
"MIT"
] | 3 | 2017-10-25T13:00:23.000Z | 2017-12-09T07:19:26.000Z | # ============================================================================
# FILE: project.py
# AUTHOR: Qiming Zhao <chemzqm@gmail.com>
# License: MIT license
# ============================================================================
# pylint: disable=E0401,C0411
import os
from .base import Base
from denite imp... | 36.863014 | 88 | 0.564474 |
1e99a58991c7cd672d47b13e049965ce947e57c3 | 5,251 | py | Python | pyLSV2/low_level_com.py | kekec14/pyLSV2 | 9280e04364816bdadd5d20282d76c52a133a96e1 | [
"MIT"
] | null | null | null | pyLSV2/low_level_com.py | kekec14/pyLSV2 | 9280e04364816bdadd5d20282d76c52a133a96e1 | [
"MIT"
] | null | null | null | pyLSV2/low_level_com.py | kekec14/pyLSV2 | 9280e04364816bdadd5d20282d76c52a133a96e1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""low level communication functions for LSV2"""
import logging
import socket
import struct
class LLLSV2Com():
"""Implementation of the low level communication functions for sending and
receiving LSV2 telegrams via TCP"""
DEFAULT_PORT = 19000 # Default po... | 36.978873 | 110 | 0.597029 |
17df9ddeb79701a4a07a3e2f111d83991e3685c8 | 2,887 | py | Python | synmark/__main__.py | DRRDietrich/synapse | bc203c962f4c18bb41b0abf3d3e59957137d6530 | [
"Apache-2.0"
] | 1 | 2020-11-07T03:29:01.000Z | 2020-11-07T03:29:01.000Z | synmark/__main__.py | DRRDietrich/synapse | bc203c962f4c18bb41b0abf3d3e59957137d6530 | [
"Apache-2.0"
] | 1 | 2020-02-10T10:03:31.000Z | 2020-02-10T10:03:31.000Z | synmark/__main__.py | DRRDietrich/synapse | bc203c962f4c18bb41b0abf3d3e59957137d6530 | [
"Apache-2.0"
] | 1 | 2020-05-11T08:36:02.000Z | 2020-05-11T08:36:02.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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 require... | 28.584158 | 87 | 0.647385 |
eeea150d79ad2e5f785434c3ec5c5e720ee9426d | 9,424 | py | Python | comodit_client/api/exporter.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | 1 | 2015-01-20T17:24:34.000Z | 2015-01-20T17:24:34.000Z | comodit_client/api/exporter.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | null | null | null | comodit_client/api/exporter.py | AymericDuvivier/comodit-client | cd92b43240181ab7178545e48ca854ee6bc86bfc | [
"MIT"
] | 24 | 2016-09-07T15:28:00.000Z | 2021-12-08T16:03:16.000Z | # coding: utf-8
"""
Provides the exporter tool. The exporter can be used to export ComodIT entities
to local directories.
"""
from __future__ import print_function
from builtins import object
import os
from comodit_client.api.collection import EntityNotFoundException
from comodit_client.api.exceptions import PythonAp... | 32.273973 | 106 | 0.602823 |
96359b34cd7db8284ddc402c33c022d31a1ba9e3 | 31,305 | py | Python | qupulse/_program/tabor.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | qupulse/_program/tabor.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | qupulse/_program/tabor.py | zea2/qupulse | 49a930bfe95f3f0c878daab5e52fd0c8aa8a4ff6 | [
"MIT"
] | null | null | null | import sys
from typing import NamedTuple, Optional, List, Generator, Tuple, Sequence, Mapping, Union, Dict, FrozenSet, cast
from enum import Enum
import operator
from collections import OrderedDict
import itertools
import numbers
import numpy as np
from qupulse.utils.types import ChannelID, TimeType
from qupulse.hard... | 43.001374 | 126 | 0.619102 |
9ac7141dd829eaf7d300bba1b20cbe692489f823 | 4,866 | py | Python | python_high_pro/syntax1.py | pingszi/PythonDemo | 119827001ad6e66b97922919a1cb319a7d627146 | [
"Apache-2.0"
] | 1 | 2019-05-21T09:07:29.000Z | 2019-05-21T09:07:29.000Z | python_high_pro/syntax1.py | pingszi/PythonDemo | 119827001ad6e66b97922919a1cb319a7d627146 | [
"Apache-2.0"
] | null | null | null | python_high_pro/syntax1.py | pingszi/PythonDemo | 119827001ad6e66b97922919a1cb319a7d627146 | [
"Apache-2.0"
] | null | null | null | # **语法-类级别以下
def test1():
""""""
# **用带星号的表达式获取单个变量中的多个元素
a, b, *c = "foo", "bar", "100", "200"
print(a)
print(c)
# **嵌套解包
(a, b), (c, d) = (1, 2), (3, 4)
print(a)
print(d)
def test2():
"""集体set()"""
# **在一个set()或frozenset()中能包含另一个不可变的frozenset()
s = set([frozenset([... | 21.723214 | 90 | 0.513975 |
9e5f23951a1cf5b4bfb71d985bbea3e4cf13ab30 | 11,361 | py | Python | function_scheduling_distributed_framework/__init__.py | lokibin1010/distributed_framework | a0fc8c058a37a7739a2c62f990014137e07762a3 | [
"Apache-2.0"
] | 1 | 2021-04-16T09:55:19.000Z | 2021-04-16T09:55:19.000Z | function_scheduling_distributed_framework/__init__.py | lokibin1010/distributed_framework | a0fc8c058a37a7739a2c62f990014137e07762a3 | [
"Apache-2.0"
] | null | null | null | function_scheduling_distributed_framework/__init__.py | lokibin1010/distributed_framework | a0fc8c058a37a7739a2c62f990014137e07762a3 | [
"Apache-2.0"
] | null | null | null | from functools import update_wrapper, wraps
from multiprocessing import Process
from typing import List
import copy
# noinspection PyUnresolvedReferences
import apscheduler
from function_scheduling_distributed_framework.set_frame_config import patch_frame_config, show_frame_config
# import frame_config
from function_sc... | 47.535565 | 141 | 0.750374 |
a79e8dd5da87f184f5f7b5bd79b779a817b5272b | 18,107 | py | Python | Client.py | duytruong-23/socket | f32a8057cca4ad5af136dd376150105c52eef1b2 | [
"MIT"
] | null | null | null | Client.py | duytruong-23/socket | f32a8057cca4ad5af136dd376150105c52eef1b2 | [
"MIT"
] | null | null | null | Client.py | duytruong-23/socket | f32a8057cca4ad5af136dd376150105c52eef1b2 | [
"MIT"
] | null | null | null | import socket
import pickle
import datetime
from threading import Thread
import tkinter
from tkinter import PhotoImage, StringVar, Text, ttk
from tkinter.constants import CENTER, LEFT
PORT = 65432
FORMAT = "utf8"
LOGIN = "Log in"
SIGNUP = "Sign up"
TRUE = "True"
FALSE = "False"
POINTLESS_MESSAGE = "Socke... | 45.154613 | 213 | 0.660849 |
d349b2e027845edec810f31a3b3c8731cbb9a8ba | 248 | py | Python | src/pybel/struct/query/__init__.py | aman527/pybel | 362274cac32e3703c2ad9c6398adbac7bf8d39a6 | [
"MIT"
] | 103 | 2016-10-25T05:51:26.000Z | 2022-03-23T02:21:12.000Z | src/pybel/struct/query/__init__.py | Edgencio/pybel | 6861346855e9ace4ddb7e64d1309daf6f630ba2e | [
"MIT"
] | 444 | 2016-10-22T13:09:10.000Z | 2022-03-21T12:01:39.000Z | src/pybel/struct/query/__init__.py | Edgencio/pybel | 6861346855e9ace4ddb7e64d1309daf6f630ba2e | [
"MIT"
] | 38 | 2017-01-06T03:32:38.000Z | 2022-03-19T11:27:30.000Z | # -*- coding: utf-8 -*-
"""Query builder for PyBEL."""
from .exc import *
from .query import Query
from .seeding import SEED_DATA, SEED_METHOD, Seeding
from .selection import get_subgraph
__all__ = [k for k in locals() if not k.startswith('_')]
| 22.545455 | 56 | 0.705645 |
dd61eca564a2e8c9fa3070687f646e6a630f4069 | 1,015 | py | Python | src/eventlog/migrations/0010_auto_20190903_1614.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | src/eventlog/migrations/0010_auto_20190903_1614.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | src/eventlog/migrations/0010_auto_20190903_1614.py | klown/clusive | 3c89dae967dfe190c2cdf269915c6ace968d1bfb | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-03 16:14
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('roster', '0016_auto_20190823_2029'),
('eventlog', '0009_event_membership'),
]
operations = [
... | 30.757576 | 112 | 0.623645 |
b329c1ee35236a43f68e97cf3d31fc93609bdbbc | 1,340 | py | Python | rllib/optimizers/rollout.py | hershg/ray | a1744f67fe954d8408c5b84e28ecccc130157f8e | [
"Apache-2.0"
] | 2 | 2019-06-17T12:38:24.000Z | 2020-11-11T07:52:26.000Z | rllib/optimizers/rollout.py | hershg/ray | a1744f67fe954d8408c5b84e28ecccc130157f8e | [
"Apache-2.0"
] | 3 | 2018-08-15T19:19:25.000Z | 2021-06-30T01:54:46.000Z | rllib/optimizers/rollout.py | hershg/ray | a1744f67fe954d8408c5b84e28ecccc130157f8e | [
"Apache-2.0"
] | 2 | 2017-10-31T23:20:07.000Z | 2019-11-13T20:16:03.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import ray
from ray.rllib.policy.sample_batch import SampleBatch
from ray.rllib.utils.memory import ray_get_and_free
logger = logging.getLogger(__name__)
def collect_samples(agents, sample_ba... | 32.682927 | 75 | 0.722388 |
2734c40f8f6834191b2e06a89f9a988a598ecbc9 | 540 | py | Python | song.py | smartwe/bot | efc370cccac7be7ff77a9f9bacd5052b3a20b4b3 | [
"MIT"
] | null | null | null | song.py | smartwe/bot | efc370cccac7be7ff77a9f9bacd5052b3a20b4b3 | [
"MIT"
] | null | null | null | song.py | smartwe/bot | efc370cccac7be7ff77a9f9bacd5052b3a20b4b3 | [
"MIT"
] | null | null | null | from pytube import YouTube
import os
import glob
#유튜브 전용 인스턴스 생성
url = "https://www.youtube.com/watch?v=9L_WDQuG9Ds"
yt = YouTube(url)
print(yt.title)
print(yt.streams.filter(only_audio=True, file_extension='mp4').all())
# 특정영상 다운로드
yt.streams.filter(only_audio=True, file_extension='mp4').first().download("song")
... | 21.6 | 81 | 0.651852 |
5030a66afd58f93cafde838fd4d3ce28a5ec6816 | 1,709 | py | Python | engine/models.py | rafin/playlists | f23bf128d9b7fe93bd64064afaff90f03d4d1f34 | [
"MIT"
] | 11 | 2018-06-21T11:53:22.000Z | 2021-12-30T06:54:24.000Z | engine/models.py | rafin/plotify | f23bf128d9b7fe93bd64064afaff90f03d4d1f34 | [
"MIT"
] | 10 | 2017-01-04T23:42:17.000Z | 2021-06-10T18:54:36.000Z | engine/models.py | rafin/playlists | f23bf128d9b7fe93bd64064afaff90f03d4d1f34 | [
"MIT"
] | 1 | 2020-03-11T02:43:32.000Z | 2020-03-11T02:43:32.000Z | from __future__ import unicode_literals
from django.db import models
class Song(models.Model):
sid = models.CharField(default='', max_length = 40)
title = models.CharField(default='', max_length = 100)
artist = models.CharField(default='', max_length = 100)
danceability = models.DecimalField(max_digit... | 39.744186 | 74 | 0.719134 |
b6ec3e385773f21f0952705cbb9bddab3fe51fee | 6,167 | py | Python | test/unit/testplan/test_plan_base.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | test/unit/testplan/test_plan_base.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | test/unit/testplan/test_plan_base.py | apretori-tic/testplan | d3926d328e46c88d12a9c2568d4918f8aa44f26e | [
"Apache-2.0"
] | null | null | null | """TODO."""
import os
import uuid
from testplan import Testplan, TestplanResult
from testplan.common.entity import (Resource, ResourceStatus,
Runnable, RunnableResult)
from testplan.common.utils.exceptions import should_raise
from testplan.common.utils.path import default_runpath
f... | 31.78866 | 92 | 0.648451 |
1280c6e8bfa2a26641560d98caf551cc9f50d57b | 26,174 | py | Python | BinaryDist.py | dshean/BinaryBuilder | f6c4d52d286c6ee9d6bdcdc8eb169e593ab1af11 | [
"Apache-2.0"
] | null | null | null | BinaryDist.py | dshean/BinaryBuilder | f6c4d52d286c6ee9d6bdcdc8eb169e593ab1af11 | [
"Apache-2.0"
] | null | null | null | BinaryDist.py | dshean/BinaryBuilder | f6c4d52d286c6ee9d6bdcdc8eb169e593ab1af11 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os.path as P
import logging
import itertools, shutil, re, errno, sys, os, stat
from os import makedirs, remove, listdir, chmod, symlink, readlink, link
from collections import namedtuple
from BinaryBuilder import get_platform, run, hash_file, binary_builder_prefix,\
list_recursively
f... | 39.065672 | 150 | 0.57496 |
91675daf7db6c91fc68a61a8d2e8da496eb6b31d | 582 | py | Python | python/asr_bgm_aksk_demo.py | MeekoI/ais-sdk | 76240abc49795e914988f3cafb6d08f60dbdcb4c | [
"Apache-2.0"
] | null | null | null | python/asr_bgm_aksk_demo.py | MeekoI/ais-sdk | 76240abc49795e914988f3cafb6d08f60dbdcb4c | [
"Apache-2.0"
] | null | null | null | python/asr_bgm_aksk_demo.py | MeekoI/ais-sdk | 76240abc49795e914988f3cafb6d08f60dbdcb4c | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from ais_sdk.asr_bgm import asr_bgm_aksk
from ais_sdk.utils import init_global_env
if __name__ == '__main__':
#
# access asr, asr_bgm,post data by ak,sk
#
app_key = '*************'
app_secret = '************'
init_global_env(region='cn-north-1')
# The OBS link needs ... | 36.375 | 116 | 0.680412 |
39e6b9c9a0f8a03ca504f65f1a3b03b66a3fc23a | 756 | py | Python | astropy/utils/tests/test_collections.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | 3 | 2018-03-20T15:09:16.000Z | 2021-05-27T11:17:33.000Z | astropy/utils/tests/test_collections.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | null | null | null | astropy/utils/tests/test_collections.py | REMeyer/astropy | 28c49fb618538a01812e586cd07bccdf0591a6c6 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ...tests.helper import raises
from .. import collections
@raises(TypeError)
def test_homogeneous_list():
l = collections.HomogeneousLi... | 21 | 66 | 0.701058 |
2db581b435a7e95186530eff15e06b54e1621e5b | 1,899 | py | Python | modules/models/dfclenet5.py | janko-petkovic/retinet | f4c5e0f2447b97d160192a59875be91c99357857 | [
"Apache-2.0"
] | null | null | null | modules/models/dfclenet5.py | janko-petkovic/retinet | f4c5e0f2447b97d160192a59875be91c99357857 | [
"Apache-2.0"
] | null | null | null | modules/models/dfclenet5.py | janko-petkovic/retinet | f4c5e0f2447b97d160192a59875be91c99357857 | [
"Apache-2.0"
] | 1 | 2022-02-06T15:56:29.000Z | 2022-02-06T15:56:29.000Z | # Fully connected version of LeNet 5: the c3 layer does not follow
# the connection matrix from the article but is just a straighforward
# Conv2d with 6in and 16 out. Everybody on the internet uses this but
# i don't know why they call it LeNet5, im probably dumb.
#
# DFC_LeNet_5(in_channels : int)
import torch
impor... | 20.641304 | 73 | 0.624013 |
d501f46f1c1b54c9233087aa33fd65a972c36487 | 973 | py | Python | tests/test_discretisation/test_check_estimator_discretisers.py | noahjgreen295/feature_engine | 77248ade812f03bb1b9c0c129320f0c0baad61ed | [
"BSD-3-Clause"
] | null | null | null | tests/test_discretisation/test_check_estimator_discretisers.py | noahjgreen295/feature_engine | 77248ade812f03bb1b9c0c129320f0c0baad61ed | [
"BSD-3-Clause"
] | null | null | null | tests/test_discretisation/test_check_estimator_discretisers.py | noahjgreen295/feature_engine | 77248ade812f03bb1b9c0c129320f0c0baad61ed | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from sklearn.utils.estimator_checks import check_estimator
from feature_engine.discretisation import (
ArbitraryDiscretiser,
DecisionTreeDiscretiser,
EqualFrequencyDiscretiser,
EqualWidthDiscretiser,
)
from tests.estimator_checks.estimator_checks import check_feature_en... | 31.387097 | 82 | 0.793422 |
85962974bf3835c34171a7c259247a956e8d5c15 | 1,925 | py | Python | python/qpid_dispatch_internal/compat/subproc.py | kishorkunal-raj/qpid-dispatch | f629b448dc1ae92d46c31f3c8d7bf317412b9e22 | [
"Apache-2.0"
] | 1 | 2019-03-17T04:08:43.000Z | 2019-03-17T04:08:43.000Z | python/qpid_dispatch_internal/compat/subproc.py | kishorkunal-raj/qpid-dispatch | f629b448dc1ae92d46c31f3c8d7bf317412b9e22 | [
"Apache-2.0"
] | 121 | 2020-09-16T06:03:53.000Z | 2022-03-30T13:03:23.000Z | python/qpid_dispatch_internal/compat/subproc.py | irinabov/debian-qpid-dispatch | 42fb2ffb65f8e8c8d616633c0b4308d6531a281d | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.285714 | 126 | 0.724156 |
e0cc8202455c4d2d02b9bd78ce3691d871c6309e | 86,566 | py | Python | astropy/time/tests/test_basic.py | manodeep/astropy | 2e51f949adc1f5cd0ec6bedc7483f27d4cc75983 | [
"BSD-3-Clause"
] | 1 | 2020-03-27T04:13:08.000Z | 2020-03-27T04:13:08.000Z | astropy/time/tests/test_basic.py | manodeep/astropy | 2e51f949adc1f5cd0ec6bedc7483f27d4cc75983 | [
"BSD-3-Clause"
] | null | null | null | astropy/time/tests/test_basic.py | manodeep/astropy | 2e51f949adc1f5cd0ec6bedc7483f27d4cc75983 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import copy
import functools
import datetime
from copy import deepcopy
from decimal import Decimal, localcontext
import numpy as np
from numpy.testing import assert_allclose
from astropy.tests.helper import catch_warnings, pytest
from astropy.... | 38.405501 | 100 | 0.586385 |
ef2556465d7921b0a3beeadee65a4325d7621bc1 | 3,995 | py | Python | spotlipy.py | iticus/spotlipy | 15d88f70738f7c8f1c274c64ecbb28447b4db920 | [
"MIT"
] | 1 | 2016-06-21T22:06:10.000Z | 2016-06-21T22:06:10.000Z | spotlipy.py | iticus/spotlipy | 15d88f70738f7c8f1c274c64ecbb28447b4db920 | [
"MIT"
] | null | null | null | spotlipy.py | iticus/spotlipy | 15d88f70738f7c8f1c274c64ecbb28447b4db920 | [
"MIT"
] | null | null | null | '''
Created on Jun 20, 2016
@author: ionut
'''
import argparse
import logging
import spotify_api
import time
import database
import radiosearch
import settings
logger = logging.getLogger('spotlipy')
logger.info('starting spotlipy application')
def radio_search():
month = settings.MONTH
date = settings.DAT... | 34.439655 | 122 | 0.613767 |
6c304129fccc8f839e4e6d96e380d91a3edf065b | 1,045 | py | Python | backend/urls.py | shengcanxu/yamaxun | 2876e6203304a7bb8b09e42b841fce87d55ce046 | [
"Unlicense"
] | null | null | null | backend/urls.py | shengcanxu/yamaxun | 2876e6203304a7bb8b09e42b841fce87d55ce046 | [
"Unlicense"
] | null | null | null | backend/urls.py | shengcanxu/yamaxun | 2876e6203304a7bb8b09e42b841fce87d55ce046 | [
"Unlicense"
] | null | null | null | """backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | 32.65625 | 79 | 0.711005 |
1956335f5ac6392f94c7a3413cbf883c1daa8dff | 3,887 | py | Python | ve/unit/test_covergroup_options.py | fvutils/py-vsc | e30ffae1b750d8182d102b1fe5b1cfdce017a092 | [
"Apache-2.0"
] | 54 | 2020-03-28T17:54:00.000Z | 2022-03-27T08:53:13.000Z | ve/unit/test_covergroup_options.py | fvutils/py-vsc | e30ffae1b750d8182d102b1fe5b1cfdce017a092 | [
"Apache-2.0"
] | 124 | 2020-04-10T03:06:03.000Z | 2022-03-24T18:35:46.000Z | ve/unit/test_covergroup_options.py | fvutils/py-vsc | e30ffae1b750d8182d102b1fe5b1cfdce017a092 | [
"Apache-2.0"
] | 17 | 2020-04-09T21:47:58.000Z | 2022-02-23T19:37:37.000Z | '''
Created on Apr 11, 2020
@author: ballance
'''
from vsc_test_case import VscTestCase
import vsc
class TestCovergroupOptions(VscTestCase):
def test_comment(self):
@vsc.covergroup
class my_cg(object):
def __init__(self, a, b):
... | 32.123967 | 93 | 0.47929 |
b9c947a4000ce22dc861a18994a9f3474953a171 | 288 | py | Python | src/turing/server/imcol_turing/turing_tests/models.py | duartegalvao/Image-Colorization-with-Deep-Learning | 33d5257f57c55d61e79d49b97f4cb0aa9b933e98 | [
"MIT"
] | 2 | 2019-05-29T12:04:44.000Z | 2019-12-18T09:22:36.000Z | src/turing/server/imcol_turing/turing_tests/models.py | duartegalvao/Image-Colorization-with-Deep-Learning | 33d5257f57c55d61e79d49b97f4cb0aa9b933e98 | [
"MIT"
] | null | null | null | src/turing/server/imcol_turing/turing_tests/models.py | duartegalvao/Image-Colorization-with-Deep-Learning | 33d5257f57c55d61e79d49b97f4cb0aa9b933e98 | [
"MIT"
] | 3 | 2019-05-20T05:19:34.000Z | 2019-12-14T00:48:01.000Z | from django.db import models
class TuringTest(models.Model):
image = models.IntegerField()
set = models.IntegerField()
is_true = models.BooleanField()
is_correct = models.BooleanField()
time = models.DurationField()
ip_address = models.CharField(max_length=128)
| 26.181818 | 49 | 0.722222 |
05978b507f0bd591f1362c876b2f1fab63f3a12a | 1,968 | py | Python | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveRecordVodConfigsRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveRecordVodConfigsRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveRecordVodConfigsRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.8 | 89 | 0.75813 |
d90f844c0ec80d5cff6b76e183e8eb49eb9759e5 | 1,300 | py | Python | data/fetch_20newsgroups.py | igvasilev/text-classification-baseline | f49133e2fce7ca9555586d3b0f5b44ed6f6aeb50 | [
"MIT"
] | null | null | null | data/fetch_20newsgroups.py | igvasilev/text-classification-baseline | f49133e2fce7ca9555586d3b0f5b44ed6f6aeb50 | [
"MIT"
] | null | null | null | data/fetch_20newsgroups.py | igvasilev/text-classification-baseline | f49133e2fce7ca9555586d3b0f5b44ed6f6aeb50 | [
"MIT"
] | null | null | null | import os
import pandas as pd
from sklearn.datasets import fetch_20newsgroups
from sklearn.utils import Bunch
def make_df_from_bunch(bunch: Bunch) -> pd.DataFrame:
"""
Make pd.DataFrame from 20newsgroups bunch.
:param Bunch bunch: 20newsgroups bunch.
:return: 20newsgroups DataFrame.
:rtype: pd.D... | 28.26087 | 110 | 0.698462 |
45f987ae909cf8e4aa868bfadfba340e4f334f7f | 2,189 | py | Python | dynamodb_stream_router/conditions/lexer.py | ateoto/dynamodb-stream-router | 5625a6ee8ce2e37a92025c0913cc16894f7ccc8b | [
"Apache-2.0"
] | null | null | null | dynamodb_stream_router/conditions/lexer.py | ateoto/dynamodb-stream-router | 5625a6ee8ce2e37a92025c0913cc16894f7ccc8b | [
"Apache-2.0"
] | 1 | 2021-12-01T21:29:07.000Z | 2021-12-01T23:05:59.000Z | dynamodb_stream_router/conditions/lexer.py | ateoto/dynamodb-stream-router | 5625a6ee8ce2e37a92025c0913cc16894f7ccc8b | [
"Apache-2.0"
] | 1 | 2021-11-30T19:22:12.000Z | 2021-11-30T19:22:12.000Z | # pyright: reportUndefinedVariable=false
from sly import Lexer
from ..exceptions import SyntaxError
class ExpressionLexer(Lexer):
# Set of token names.
tokens = {
VALUE,
INT,
FLOAT,
BETWEEN,
AND,
OR,
NOT,
IN,
EQ,
NE,
GT,
... | 22.111111 | 96 | 0.485153 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.