hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04bfbe8a0aeff5f65ed33297c432a971d8ee587d | 8,895 | py | Python | tests/integration/test_fitness_predictor_island_evo.py | nolanstr/bingo_multi_stage | 7a88c4f5c59268d0612664be5864765db2edad51 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_fitness_predictor_island_evo.py | nolanstr/bingo_multi_stage | 7a88c4f5c59268d0612664be5864765db2edad51 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_fitness_predictor_island_evo.py | nolanstr/bingo_multi_stage | 7a88c4f5c59268d0612664be5864765db2edad51 | [
"Apache-2.0"
] | null | null | null | # Ignoring some linting rules in tests
# pylint: disable=redefined-outer-name
# pylint: disable=missing-docstring
import pytest
import numpy as np
from bingo.chromosomes.multiple_values import SinglePointCrossover, \
SinglePointMutation, MultipleValueChromosomeGenerator
from bingo.evolutionary_optimizers.fitness_p... | 38.012821 | 91 | 0.747611 |
101fc0e864a53816f3f704d98c0b8b134c9526b8 | 4,363 | py | Python | ottoscript/triggers.py | qui3xote/ottolib | 02a18051c42170de3718040ef4d0141216adf6f2 | [
"MIT"
] | 2 | 2022-01-09T18:42:55.000Z | 2022-01-30T00:33:57.000Z | ottoscript/triggers.py | qui3xote/ottolib | 02a18051c42170de3718040ef4d0141216adf6f2 | [
"MIT"
] | 2 | 2022-01-08T15:22:06.000Z | 2022-03-04T11:03:43.000Z | ottoscript/triggers.py | qui3xote/ottolib | 02a18051c42170de3718040ef4d0141216adf6f2 | [
"MIT"
] | null | null | null | from itertools import product
from pyparsing import (CaselessKeyword,
Optional,
Group,
)
from .ottobase import OttoBase
from .keywords import FROM, TO, FOR, ON, BEFORE, AFTER, SUNRISE, SUNSET
from .datatypes import Entity, Number, List, String, Var
fr... | 25.816568 | 73 | 0.494385 |
612e55ad8da63f206953e6a1085e6d4c83234c0b | 1,736 | py | Python | tests/test_server.py | NYUDevOpsPayments/payments | c472c4f3102e13420a56284173def3f8de0c4509 | [
"Apache-2.0"
] | null | null | null | tests/test_server.py | NYUDevOpsPayments/payments | c472c4f3102e13420a56284173def3f8de0c4509 | [
"Apache-2.0"
] | 41 | 2018-02-23T00:08:08.000Z | 2018-03-26T22:27:27.000Z | tests/test_server.py | NYUDevOpsPayments/payments | c472c4f3102e13420a56284173def3f8de0c4509 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016, 2017 John J. Rofrano. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 29.931034 | 74 | 0.578917 |
cf78c0537ae494cd16f2a8958dbb8ae2fdc51baf | 6,236 | py | Python | build.py | TinusChen/libPSI | 7fdf02eee3ae5d632b9187b58ffa011300f31c4d | [
"Unlicense"
] | null | null | null | build.py | TinusChen/libPSI | 7fdf02eee3ae5d632b9187b58ffa011300f31c4d | [
"Unlicense"
] | null | null | null | build.py | TinusChen/libPSI | 7fdf02eee3ae5d632b9187b58ffa011300f31c4d | [
"Unlicense"
] | null | null | null | import os
import platform
import sys
import multiprocessing
import subprocess
import glob
# find the ninja generator on windows.
def getGenerator(args):
#osStr = (platform.system())
#
#if osStr == "Windows":
#
# for x in args:
# if x.startswith("-G"):
# break
#
... | 28.87037 | 157 | 0.574727 |
771f8af69b1b57a934b98296a57e9c2a4cb6592a | 13,441 | py | Python | altamisa/isatab/validate_investigation.py | bihealth/altamisa | 2b0ade8dd5baf5b705ff9b27a697b40c889a8f2b | [
"MIT"
] | 2 | 2018-04-14T15:04:01.000Z | 2020-12-08T15:39:09.000Z | altamisa/isatab/validate_investigation.py | bihealth/altamisa | 2b0ade8dd5baf5b705ff9b27a697b40c889a8f2b | [
"MIT"
] | 49 | 2018-02-22T15:58:37.000Z | 2022-03-01T08:50:48.000Z | altamisa/isatab/validate_investigation.py | bihealth/altamisa | 2b0ade8dd5baf5b705ff9b27a697b40c889a8f2b | [
"MIT"
] | 3 | 2019-02-19T21:23:12.000Z | 2019-08-20T14:35:07.000Z | # -*- coding: utf-8 -*-
"""Validation of an ISA investigation
Eventually, all format independent content- and specification-related validations which
don't interrupt model creation definitely (e.g. when parsing from ISA-tab) should go
here. Then, validations can be performed on whole models (e.g. after parsing or befo... | 46.832753 | 100 | 0.616621 |
836a56b4e896362593a1c2b9e89d467f1d3e2218 | 2,588 | py | Python | tools/tcmalloc/print-live-objects.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/tcmalloc/print-live-objects.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | tools/tcmalloc/print-live-objects.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Symbolizes and prints live objects as recorded by tcmalloc's
HeapProfilerDumpLiveObjects.
"""
from __future__ import print_func... | 27.242105 | 79 | 0.618238 |
2c83cdca31604beba0040af1e7e9b8537ff54c1f | 597 | py | Python | blender/arm/logicnode/variable/LN_retain_value.py | Blacophis/Blender-addons | 8e91e5e84c15ed4d9ddc16f85a2bb00178ba0f91 | [
"Zlib"
] | 1 | 2022-03-07T22:04:26.000Z | 2022-03-07T22:04:26.000Z | blender/arm/logicnode/variable/LN_retain_value.py | Blacophis/Blender-addons | 8e91e5e84c15ed4d9ddc16f85a2bb00178ba0f91 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/variable/LN_retain_value.py | Blacophis/Blender-addons | 8e91e5e84c15ed4d9ddc16f85a2bb00178ba0f91 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import *
class RetainValueNode(ArmLogicTreeNode):
"""Retains the input value
@input Retain: Retains the value when exeuted.
@input Value: The value that should be retained.
"""
bl_idname = 'LNRetainValueNode'
bl_label = 'Retain Value'
arm_section = 'set'
ar... | 29.85 | 64 | 0.683417 |
00b1bb37a1a46566ac2cc19741af2f41344b3d77 | 5,528 | py | Python | First course/2nd semester/Python3/pirates 4 lab.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | null | null | null | First course/2nd semester/Python3/pirates 4 lab.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | null | null | null | First course/2nd semester/Python3/pirates 4 lab.py | tekcellat/University | 9a0196a45c9cf33ac58018d636c3e4857eba0330 | [
"MIT"
] | 7 | 2020-12-04T07:26:46.000Z | 2022-03-08T17:47:47.000Z | import pygame
from pygame import *
from math import *
WIN_WIDTH = 900; WIN_HEIGHT = 640
BACKGROUND_COLOR ='#00BFFF'
sea_width = 0
sea_size = Rect((0,round(WIN_HEIGHT*(2/3))),(WIN_WIDTH,WIN_HEIGHT))
island_size = Rect((round(WIN_WIDTH*(1/3)),370),(round(WIN_WIDTH*(1/3)),160))
def rot_center(image, angle... | 44.224 | 132 | 0.535094 |
8566fd859e0452ef686b2904f740766f37ccba40 | 7,015 | py | Python | sympy/solvers/ode/tests/test_single.py | amartinhernan/sympy | 8501526ca26a80ac1b7866a4c1678fcf0045e971 | [
"BSD-3-Clause"
] | null | null | null | sympy/solvers/ode/tests/test_single.py | amartinhernan/sympy | 8501526ca26a80ac1b7866a4c1678fcf0045e971 | [
"BSD-3-Clause"
] | null | null | null | sympy/solvers/ode/tests/test_single.py | amartinhernan/sympy | 8501526ca26a80ac1b7866a4c1678fcf0045e971 | [
"BSD-3-Clause"
] | null | null | null | #
# The main tests for the code in single.py are currently located in
# sympy/solvers/tests/test_ode.py
#
from sympy import (Derivative, diff,
Eq, exp, log, Rational, sin,
symbols, Ei)
from sympy.core import Function, Symbol
from sympy.solvers.ode import dsolve
from sympy.solvers.ode.ode import _remove_redunda... | 37.918919 | 98 | 0.62851 |
c72c70a898dbdf97781c4cdb2d1c74d04453733a | 27,791 | py | Python | components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py | lahirus/stratos | 3a50768a87ccf2668a4c08d36fde00b70260dd07 | [
"Apache-2.0"
] | null | null | null | components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py | lahirus/stratos | 3a50768a87ccf2668a4c08d36fde00b70260dd07 | [
"Apache-2.0"
] | null | null | null | components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py | lahirus/stratos | 3a50768a87ccf2668a4c08d36fde00b70260dd07 | [
"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 u... | 45.633826 | 122 | 0.66759 |
d2b6fad63dc5019ec429152c03b565d16f253ed8 | 1,217 | py | Python | krit/teams/models.py | huroncg/krit-teams | ce96a49de44496c2f86e37dd917c51952fbbdeed | [
"BSD-3-Clause"
] | null | null | null | krit/teams/models.py | huroncg/krit-teams | ce96a49de44496c2f86e37dd917c51952fbbdeed | [
"BSD-3-Clause"
] | null | null | null | krit/teams/models.py | huroncg/krit-teams | ce96a49de44496c2f86e37dd917c51952fbbdeed | [
"BSD-3-Clause"
] | 1 | 2021-02-26T01:38:35.000Z | 2021-02-26T01:38:35.000Z | from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from .conf import settings
def load_model_class(model_path):
dot = model_path.rindex('.')
module_name = model_path[:dot]
class_name = model_path[dot + 1:]
try:
_class = get... | 32.891892 | 81 | 0.691044 |
6b61cf29dd081f5373b969dfc184bdc763f01f03 | 1,279 | py | Python | tests/benchmark.py | teald/vplanet | ab640af7d2bbf80c5ea647d5bf971e2ce2c40631 | [
"MIT"
] | 92 | 2018-08-02T22:41:23.000Z | 2022-01-13T20:59:43.000Z | tests/benchmark.py | teald/vplanet | ab640af7d2bbf80c5ea647d5bf971e2ce2c40631 | [
"MIT"
] | 104 | 2018-08-01T17:28:02.000Z | 2022-03-31T22:23:13.000Z | tests/benchmark.py | teald/vplanet | ab640af7d2bbf80c5ea647d5bf971e2ce2c40631 | [
"MIT"
] | 35 | 2018-06-20T19:32:09.000Z | 2022-01-31T00:58:53.000Z | import vplanet
import numpy as np
import os
import pytest
import functools
import inspect
import astropy.units as u
def recursive_getattr(obj, attr, *args):
_getattr = lambda obj, attr: getattr(obj, attr, *args)
return functools.reduce(_getattr, [obj] + attr.split("."))
class Benchmark:
def test_benchma... | 29.744186 | 80 | 0.649726 |
ae54e350b87574e28fe2bfc9ec1fa97e63c65f22 | 2,633 | py | Python | information/views.py | ajosephau/hivery-coding-challenge | 41d1d35b14448aecd136bf80df64935e6ad2c4aa | [
"MIT"
] | null | null | null | information/views.py | ajosephau/hivery-coding-challenge | 41d1d35b14448aecd136bf80df64935e6ad2c4aa | [
"MIT"
] | 7 | 2022-03-14T12:12:47.000Z | 2022-03-28T12:17:49.000Z | information/views.py | ajosephau/django_coding_challenge | 4912ec9c344ab7e6f2fc6189fb10a5edea9b586d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# fmt: off
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.request import Request
from rest_framework.response import Response
from information.models import Company, Person
from information.serializers import (CompanySerializer,
... | 32.9125 | 95 | 0.673376 |
73409c344403b38b3f4e1a3525333b1a4ac3a95a | 2,107 | py | Python | utils/results_manager.py | eshanking/fears | 8d69af08c5aba9fefdbf962ab568c2ca58276c0d | [
"MIT"
] | null | null | null | utils/results_manager.py | eshanking/fears | 8d69af08c5aba9fefdbf962ab568c2ca58276c0d | [
"MIT"
] | null | null | null | utils/results_manager.py | eshanking/fears | 8d69af08c5aba9fefdbf962ab568c2ca58276c0d | [
"MIT"
] | 1 | 2021-11-09T14:42:01.000Z | 2021-11-09T14:42:01.000Z | import os
import pickle
import pandas as pd
from fears.utils import dir_manager
from fears.classes.experiment_class import Experiment
# from fears.classes.experiment_class import Experiment
def get_experiment_results(suffix=None,exp=None):
"""
Parameters
----------
data_folder : str
Name ... | 28.863014 | 89 | 0.652587 |
b57dcfaf5ff893773de92e39746a83425cf1d37b | 2,682 | py | Python | qpesums-netcdf-tools/qpesums_netcdf_convert.py | Fondus/Fondus-Python-SDK | ce6cfaffe5d978ac728f35b1b4bfcf49f7519576 | [
"Apache-2.0"
] | null | null | null | qpesums-netcdf-tools/qpesums_netcdf_convert.py | Fondus/Fondus-Python-SDK | ce6cfaffe5d978ac728f35b1b4bfcf49f7519576 | [
"Apache-2.0"
] | null | null | null | qpesums-netcdf-tools/qpesums_netcdf_convert.py | Fondus/Fondus-Python-SDK | ce6cfaffe5d978ac728f35b1b4bfcf49f7519576 | [
"Apache-2.0"
] | 1 | 2021-08-05T06:28:36.000Z | 2021-08-05T06:28:36.000Z | import argparse,datetime,math
import geojson
from netCDF4 import Dataset
def get_range(v,low,high):
dim=v.get_dims()[0].size
d=(v[1]-v[0])/2
i0=None
i1=dim
for i in range(0,dim):
if i0 is None and v[i]+d >= low:
i0=i
if v[i]-d <= high:
i1=i
if not i0: i0... | 28.231579 | 103 | 0.643922 |
293fe934bec9b803386fab62ca4499aed85568a3 | 397 | py | Python | config/api_router.py | ruankranz/blog | d83adc9035bb71f839e8e1c74a036f99be7f9d18 | [
"MIT"
] | null | null | null | config/api_router.py | ruankranz/blog | d83adc9035bb71f839e8e1c74a036f99be7f9d18 | [
"MIT"
] | 1 | 2021-05-11T12:43:52.000Z | 2021-05-11T12:43:52.000Z | config/api_router.py | ruankranz/blog | d83adc9035bb71f839e8e1c74a036f99be7f9d18 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from krankit.users.api.views import UserViewSet
from krankit.blog.api.views import PostViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users", UserViewSet)
router... | 22.055556 | 62 | 0.788413 |
0a9bf4d555291bd7c0f7ca0922337e9ba0d3a40a | 9,371 | py | Python | csbdeep/scripts/care_predict.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | 1 | 2020-12-10T16:52:16.000Z | 2020-12-10T16:52:16.000Z | csbdeep/scripts/care_predict.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | null | null | null | csbdeep/scripts/care_predict.py | Takuya1031/CSBDeep | 75877938b329173fb33cc19b2d96a773ed000b62 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function, unicode_literals, absolute_import, division
import argparse
import sys
from pprint import pprint
import numpy as np
from tqdm import tqdm
from csbdeep.io import save_tiff_imagej_compatible
from csbdeep.utils import _raise, axes_check_and_normalize
from cs... | 52.943503 | 295 | 0.585316 |
682d261222ce1db16a4f77133fdfeaadd2f3cce8 | 26,606 | py | Python | test/aqua/test_svm_classical.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | test/aqua/test_svm_classical.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | test/aqua/test_svm_classical.py | Sahar2/qiskit-aqua | a228fbe6b9613cff43e47796a7e4843deba2b051 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 59.521253 | 120 | 0.31211 |
4f59b98f7077940bdb461e47c637fb543f989369 | 467 | py | Python | data/scripts/templates/object/mobile/shared_dressed_commoner_naboo_moncal_female_01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_dressed_commoner_naboo_moncal_female_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_dressed_commoner_naboo_moncal_female_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_commoner_naboo_moncal_female_01.iff"
result.attribute_... | 27.470588 | 85 | 0.743041 |
0f11d4e036bc8e12f68d9c251b7c58f8e92cc043 | 7,044 | py | Python | wiutils/preprocessors.py | PEM-Humboldt/wildlife-insights-utils | 90f0a3641830cee15ff933433b649d3ccec8c516 | [
"MIT"
] | null | null | null | wiutils/preprocessors.py | PEM-Humboldt/wildlife-insights-utils | 90f0a3641830cee15ff933433b649d3ccec8c516 | [
"MIT"
] | null | null | null | wiutils/preprocessors.py | PEM-Humboldt/wildlife-insights-utils | 90f0a3641830cee15ff933433b649d3ccec8c516 | [
"MIT"
] | null | null | null | """
Functions to preprocess information before uploading it to WI.
"""
import datetime
import pathlib
from typing import Union
import cv2
import ffmpeg
import pandas as pd
from PIL import Image, ExifTags
def _get_exif_code(tag: str) -> int:
"""
Gets the exif code for a specific tag.
Parameters
-----... | 31.72973 | 89 | 0.638984 |
346ceca58e9695150a073e2140c238f7ab479d9d | 10,147 | py | Python | src/modeling/meta_arch/layers/wrappers.py | deeplearning-wisc/stud | b667a369e368181ef6e913c32f26e574bead9b56 | [
"Apache-2.0"
] | 22 | 2022-03-09T03:13:10.000Z | 2022-03-31T02:45:50.000Z | src/modeling/meta_arch/layers/wrappers.py | deeplearning-wisc/stud | b667a369e368181ef6e913c32f26e574bead9b56 | [
"Apache-2.0"
] | 1 | 2022-03-22T12:27:38.000Z | 2022-03-22T22:45:46.000Z | src/modeling/meta_arch/layers/wrappers.py | deeplearning-wisc/stud | b667a369e368181ef6e913c32f26e574bead9b56 | [
"Apache-2.0"
] | 2 | 2022-03-21T02:32:53.000Z | 2022-03-22T18:43:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Descripttion: https://github.com/sxhxliang/detectron2_backbone
# version: 0.0.1
# Author: Shihua Liang (sxhx.liang@gmail.com)
# FilePath: /detectron2_backbone/detectron2_backbone/layers/wrappers.py
# Create: 2020-... | 40.106719 | 117 | 0.56736 |
8b2300dce4a1d13ce89bb104d2af5e77393fa305 | 19,809 | py | Python | main.py | wzzheng/DCML | 01a7220bac7ebb1e70416ef663f3ba7cee9e8bf5 | [
"MIT"
] | 11 | 2021-06-15T08:47:10.000Z | 2022-03-30T02:31:25.000Z | main.py | wzzheng/DCML | 01a7220bac7ebb1e70416ef663f3ba7cee9e8bf5 | [
"MIT"
] | 2 | 2021-08-09T05:05:21.000Z | 2021-09-03T13:56:23.000Z | main.py | wzzheng/DCML | 01a7220bac7ebb1e70416ef663f3ba7cee9e8bf5 | [
"MIT"
] | 2 | 2021-06-21T08:59:30.000Z | 2022-01-01T19:22:04.000Z | """==================================================================================================="""
################### LIBRARIES ###################
### Basic Libraries
import warnings
warnings.filterwarnings("ignore")
import os, sys, numpy as np, argparse, imp, datetime, pandas as pd, copy
import time, pickle ... | 45.960557 | 193 | 0.608511 |
89d1c2bec768efcc5ba03f5166353ddd0cdb399d | 88 | py | Python | scikits/__init__.py | pierregm/scikits.timeseries-sandbox | 9937aa30ee393d847607ad27fd42c08aebe97417 | [
"eGenix"
] | 10 | 2015-07-06T12:19:25.000Z | 2021-11-12T16:28:21.000Z | scikits/__init__.py | pierregm/scikits.timeseries | 05cbb314612ce516160270d59c933c420ef860ea | [
"eGenix"
] | 1 | 2018-05-28T15:16:47.000Z | 2020-03-24T17:10:35.000Z | scikits/__init__.py | pierregm/scikits.timeseries | 05cbb314612ce516160270d59c933c420ef860ea | [
"eGenix"
] | 6 | 2015-05-01T03:00:43.000Z | 2020-10-22T21:33:14.000Z | # Activate namespace packages.
__import__('pkg_resources').declare_namespace(__name__)
| 22 | 55 | 0.829545 |
b1f9d61539878e8b296163da564cff82a47c936d | 2,046 | py | Python | subsurface/structs/structured_elements.py | andieie/subsurface | 96d3cc4a0ef6eb549d1ea9d32b71a1380a1383e7 | [
"Apache-2.0"
] | null | null | null | subsurface/structs/structured_elements.py | andieie/subsurface | 96d3cc4a0ef6eb549d1ea9d32b71a1380a1383e7 | [
"Apache-2.0"
] | null | null | null | subsurface/structs/structured_elements.py | andieie/subsurface | 96d3cc4a0ef6eb549d1ea9d32b71a1380a1383e7 | [
"Apache-2.0"
] | null | null | null | """For regularly gridded datasets like rasters and tensor meshes.
"""
import numpy as np
from .base_structures import StructuredData
class OctreeMesh:
"""
TODO: implement as Dom discussed with data frames to track the levels.
"""
def __init__(self, data: StructuredData):
raise NotImplemente... | 26.921053 | 81 | 0.65738 |
8d0fe903e3b62c9ada1e1c3e9650c29fbd96c8f0 | 21,836 | py | Python | official/transformer/model/beam_search.py | KSomi/models | cc6c45ca6b701426d35bbbab104ad32a2e80a3cf | [
"Apache-2.0"
] | 5 | 2020-04-08T16:12:27.000Z | 2021-05-14T14:05:06.000Z | official/transformer/model/beam_search.py | KSomi/models | cc6c45ca6b701426d35bbbab104ad32a2e80a3cf | [
"Apache-2.0"
] | 2 | 2019-01-09T11:58:51.000Z | 2019-08-05T02:32:49.000Z | official/transformer/model/beam_search.py | KSomi/models | cc6c45ca6b701426d35bbbab104ad32a2e80a3cf | [
"Apache-2.0"
] | 3 | 2020-11-24T06:57:08.000Z | 2021-08-06T06:40:56.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.139706 | 90 | 0.72179 |
48daa0b20683a5113d619e0090c5d602915443c3 | 946 | py | Python | trac/versioncontrol/web_ui/tests/__init__.py | lelit/trac | ee8f811a29321f3c0fc8b8235d143e0ffcd6d013 | [
"BSD-3-Clause"
] | null | null | null | trac/versioncontrol/web_ui/tests/__init__.py | lelit/trac | ee8f811a29321f3c0fc8b8235d143e0ffcd6d013 | [
"BSD-3-Clause"
] | null | null | null | trac/versioncontrol/web_ui/tests/__init__.py | lelit/trac | ee8f811a29321f3c0fc8b8235d143e0ffcd6d013 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2014 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.com/license.html.
#
# This software consists ... | 29.5625 | 77 | 0.697674 |
501ac67cf5072479665059bd32045b5781d0c97c | 2,096 | py | Python | back-end/www/tests/topic_tests.py | TUD-KInD/COCTEAU | 8ea4f546397feaaf22b4e9958b509324b5b332aa | [
"MIT"
] | null | null | null | back-end/www/tests/topic_tests.py | TUD-KInD/COCTEAU | 8ea4f546397feaaf22b4e9958b509324b5b332aa | [
"MIT"
] | 1 | 2021-11-15T11:40:04.000Z | 2021-11-15T11:40:04.000Z | back-end/www/tests/topic_tests.py | TUD-KInD/COCTEAU | 8ea4f546397feaaf22b4e9958b509324b5b332aa | [
"MIT"
] | 2 | 2021-07-14T13:07:22.000Z | 2022-01-25T23:58:06.000Z | from basic_tests import BasicTest
from models.model_operations import topic_operations
from models.model import db
import unittest
class TopicTest(BasicTest):
"""Test case for topics."""
def setUp(self):
db.create_all()
def test_create_topic(self):
title = "this is a topic title"
... | 27.946667 | 92 | 0.679866 |
07c1ac0cf29bec030e400a556c0d395e587f2805 | 1,270 | py | Python | app/coreo/tests/test_models.py | rathore287/recipe-api | 2ee88b6774522ecacf20861dd2752198f71dfc9c | [
"MIT"
] | null | null | null | app/coreo/tests/test_models.py | rathore287/recipe-api | 2ee88b6774522ecacf20861dd2752198f71dfc9c | [
"MIT"
] | null | null | null | app/coreo/tests/test_models.py | rathore287/recipe-api | 2ee88b6774522ecacf20861dd2752198f71dfc9c | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
class ModelTests(TestCase):
def test_create_user_email_successful(self):
""" Test for creating user with email successfully"""
email= "harshraj.rathore@gmail.com"
password = "password@123"
user = get_u... | 33.421053 | 69 | 0.646457 |
6455c11567e13944bec1c55fcd4e992efb81c67c | 154 | py | Python | api/tools/learn/jialuo.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null | api/tools/learn/jialuo.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null | api/tools/learn/jialuo.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null |
speed_open = [0,5.2,11.4,18.4,26.2,35.2,45.6,57.8,72,89.2,110.2,136.4,170]
speed_close = [0,1,8.2,16.6,26.6,37.6,51.4,68.2,89.2,116,152]
# speed_all = | 25.666667 | 74 | 0.616883 |
7ca7c672651b1cd0421991cd75e7d7f44dbf87e2 | 659 | py | Python | ots/manage.py | hasibarrafiul/Travel-Guide-WebApp | f160ce1c4ef95b6e08abcaebf2c702bfdecacd6f | [
"MIT"
] | 3 | 2021-12-01T15:56:42.000Z | 2021-12-23T15:49:48.000Z | ots/manage.py | rashikbuksh/Optimal-Transportation-System | 18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882 | [
"MIT"
] | 8 | 2021-11-11T10:43:35.000Z | 2022-01-08T23:27:33.000Z | ots/manage.py | rashikbuksh/Optimal-Transportation-System | 18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882 | [
"MIT"
] | 3 | 2021-11-20T18:35:59.000Z | 2022-02-15T13:35:47.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ots.settings')
try:
from django.core.management import execute_from_command_line
except ImportEr... | 28.652174 | 73 | 0.676783 |
2661a66bc1d87bc059e66bc7599803f6fb927c55 | 3,095 | py | Python | tests/test_examples.py | Willtor/deepsparse | e994c2ca479d675cdfc16958502d92952dfe3aee | [
"Apache-2.0"
] | 460 | 2021-02-04T17:51:41.000Z | 2022-03-31T14:50:16.000Z | tests/test_examples.py | markurtz/deepsparse | 5a5557f4bf9026545116b22b36dcb7d506e8a070 | [
"Apache-2.0"
] | 69 | 2021-02-09T04:35:05.000Z | 2022-03-31T04:15:16.000Z | tests/test_examples.py | markurtz/deepsparse | 5a5557f4bf9026545116b22b36dcb7d506e8a070 | [
"Apache-2.0"
] | 36 | 2021-02-04T22:20:38.000Z | 2022-03-18T02:32:15.000Z | # Copyright (c) 2021 - present / Neuralmagic, 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 b... | 22.591241 | 80 | 0.575121 |
e0c43c1ee93a6b0c27411c3a3e9caf11b7067ebe | 2,655 | py | Python | cogs/react.py | SQCS-TW/SQCS_bot | 9851bea5a71bbe0606e28686aa4a14c078453f91 | [
"MIT"
] | null | null | null | cogs/react.py | SQCS-TW/SQCS_bot | 9851bea5a71bbe0606e28686aa4a14c078453f91 | [
"MIT"
] | null | null | null | cogs/react.py | SQCS-TW/SQCS_bot | 9851bea5a71bbe0606e28686aa4a14c078453f91 | [
"MIT"
] | null | null | null | from core.classes import Cog_Extension, JsonApi
from discord.ext import commands
import core.functions as func
import time
from core.setup import rsp, fluctlight_client
import asyncio
class React(Cog_Extension):
@commands.Cog.listener()
async def on_member_join(self, member):
nts = JsonApi().get_json... | 29.831461 | 104 | 0.551412 |
6491938a2d4e1f3060c808fd9057a5a714753448 | 4,270 | py | Python | py/sophus/quaternion.py | brentyi/Sophus | d6a9b043d42f4b322c63cc72f058afa70e324fd2 | [
"MIT"
] | 2,111 | 2019-01-29T07:01:32.000Z | 2022-03-29T06:48:14.000Z | py/sophus/quaternion.py | brentyi/Sophus | d6a9b043d42f4b322c63cc72f058afa70e324fd2 | [
"MIT"
] | 262 | 2015-01-03T19:00:20.000Z | 2022-03-30T20:33:47.000Z | py/sophus/quaternion.py | brentyi/Sophus | d6a9b043d42f4b322c63cc72f058afa70e324fd2 | [
"MIT"
] | 502 | 2015-01-14T00:38:41.000Z | 2022-03-31T16:09:46.000Z | """ run with: python3 -m sophus.quaternion """
import sophus
import sympy
import sys
import unittest
class Quaternion:
""" Quaternion class """
def __init__(self, real, vec):
""" Quaternion consists of a real scalar, and an imaginary 3-vector """
assert isinstance(vec, sympy.Matrix)
... | 31.397059 | 79 | 0.527166 |
f8fe78cd180117568bb7ee08ca3a79e0d0e0c3fd | 1,983 | py | Python | Chess3/MoveImpl.py | LLCoolDave/Chess3 | 076740e5d67b6aba0ae077c8e7a3bc24690803f2 | [
"MIT"
] | null | null | null | Chess3/MoveImpl.py | LLCoolDave/Chess3 | 076740e5d67b6aba0ae077c8e7a3bc24690803f2 | [
"MIT"
] | null | null | null | Chess3/MoveImpl.py | LLCoolDave/Chess3 | 076740e5d67b6aba0ae077c8e7a3bc24690803f2 | [
"MIT"
] | null | null | null | class Coordinate(object):
def __init__(self, row, column):
if 0 <= row < 8 and 0 <= column < 8:
self.row = row
self.column = column
else:
raise ArithmeticError('Coordinate invalid')
def __eq__(self, other):
return self.row == other.row and self.colum... | 31.983871 | 147 | 0.617751 |
e83aa5c71a74b8b347670dc8f39df8d9de34145e | 14,497 | bzl | Python | third_party/clif.bzl | fabbondanza/deepvariant | c0820eb6b185c612555a80febf89d761c383fafd | [
"BSD-3-Clause"
] | 1 | 2020-04-30T07:07:55.000Z | 2020-04-30T07:07:55.000Z | third_party/clif.bzl | fabbondanza/deepvariant | c0820eb6b185c612555a80febf89d761c383fafd | [
"BSD-3-Clause"
] | null | null | null | third_party/clif.bzl | fabbondanza/deepvariant | c0820eb6b185c612555a80febf89d761c383fafd | [
"BSD-3-Clause"
] | null | null | null | """Provide bazel rules for OSS CLIF."""
# Label for our OSS CLIF binary pyclif.
CLIF_PYCLIF = "@clif//:pyclif"
# Label for our OSS CLIF protobuf compiler.
CLIF_PROTO = "@clif//:proto"
# Label for our OSS CLIF C++ runtime headers and sources.
CLIF_CPP_RUNTIME = "@clif//:cpp_runtime"
# The CLIF generated code only co... | 34.191038 | 82 | 0.62544 |
49aa6f68a0966f75619ce1157e5cf5adc6bcb9bd | 11,048 | py | Python | homeassistant/components/elkm1/alarm_control_panel.py | UrbanDave/core | 054ea77b45cbcb58db842b49f0629d493073cc1a | [
"Apache-2.0"
] | 3 | 2019-10-02T04:40:26.000Z | 2020-02-16T13:19:08.000Z | homeassistant/components/elkm1/alarm_control_panel.py | UrbanDave/core | 054ea77b45cbcb58db842b49f0629d493073cc1a | [
"Apache-2.0"
] | 25 | 2021-10-02T10:01:14.000Z | 2022-03-31T06:11:49.000Z | homeassistant/components/elkm1/alarm_control_panel.py | UrbanDave/core | 054ea77b45cbcb58db842b49f0629d493073cc1a | [
"Apache-2.0"
] | 1 | 2021-12-10T10:33:28.000Z | 2021-12-10T10:33:28.000Z | """Each ElkM1 area will be created as a separate alarm_control_panel."""
from __future__ import annotations
from typing import Any
from elkm1_lib.areas import Area
from elkm1_lib.const import AlarmState, ArmedStatus, ArmLevel, ArmUpState
from elkm1_lib.elements import Element
from elkm1_lib.elk import Elk
from elkm1_... | 38.901408 | 85 | 0.68483 |
debfcf781a6bd11d14f27ca6dfaceca12a814f02 | 351 | py | Python | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeReadPropertyPythonTest.shouldCheckNumberValue.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 27 | 2015-02-15T22:01:39.000Z | 2022-03-02T05:41:29.000Z | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeReadPropertyPythonTest.shouldCheckNumberValue.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 101 | 2015-06-05T06:53:56.000Z | 2022-02-28T19:32:44.000Z | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeReadPropertyPythonTest.shouldCheckNumberValue.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 25 | 2015-05-26T21:28:42.000Z | 2021-07-06T10:04:01.000Z | node = S(input, "application/json")
property1 = node.prop("order")
property2 = node.prop("id")
property3 = node.prop("customers")
property4 = node.prop("orderDetails")
property5 = node.prop("active")
value1 = property1.isNumber()
value2 = property2.isNumber()
value3 = property3.isNumber()
value4 = property4.isNumber(... | 27 | 37 | 0.737892 |
6ee81ce2714243b7e9f5f46c7d63f5c591991d1f | 2,699 | py | Python | djaesy/urls.py | alan-fernandes/django-djaesy | bc95d65af8ad08a8bbe7275dbccabec581f4f2ac | [
"MIT"
] | null | null | null | djaesy/urls.py | alan-fernandes/django-djaesy | bc95d65af8ad08a8bbe7275dbccabec581f4f2ac | [
"MIT"
] | null | null | null | djaesy/urls.py | alan-fernandes/django-djaesy | bc95d65af8ad08a8bbe7275dbccabec581f4f2ac | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls import i18n
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import LogoutView
from django.urls import path, include, re_path
from djaesy.base_views import MapListView, BaseView
from djaesy.login_views import Login, ResetPas... | 51.903846 | 125 | 0.767692 |
5a5cc8ca210a1566ac6b88aaf0e5470559d8b696 | 2,511 | py | Python | python/v1/bidders/endpoints/get_endpoints.py | Manny27nyc/authorized-buyers-rtb-api-samples | 8074695ddf773223d6c22ed2e1914f96b2c43049 | [
"Apache-2.0"
] | 4 | 2021-01-21T04:17:50.000Z | 2021-12-26T19:34:18.000Z | python/v1/bidders/endpoints/get_endpoints.py | Manny27nyc/authorized-buyers-rtb-api-samples | 8074695ddf773223d6c22ed2e1914f96b2c43049 | [
"Apache-2.0"
] | 2 | 2021-03-04T09:19:23.000Z | 2021-06-02T21:20:02.000Z | python/v1/bidders/endpoints/get_endpoints.py | Manny27nyc/authorized-buyers-rtb-api-samples | 8074695ddf773223d6c22ed2e1914f96b2c43049 | [
"Apache-2.0"
] | 5 | 2020-12-24T10:53:04.000Z | 2021-12-08T08:27:49.000Z | #!/usr/bin/python
#
# Copyright 2021 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 b... | 32.192308 | 79 | 0.719235 |
e4b766f9e5c9245ff768f1757a9d30b298ac576c | 1,889 | py | Python | source/engine/engine.py | Borrk/DeepLearning-Engine | 54f6cdb8a76e76d9f439f8562652f545e4dbc02e | [
"MIT"
] | null | null | null | source/engine/engine.py | Borrk/DeepLearning-Engine | 54f6cdb8a76e76d9f439f8562652f545e4dbc02e | [
"MIT"
] | null | null | null | source/engine/engine.py | Borrk/DeepLearning-Engine | 54f6cdb8a76e76d9f439f8562652f545e4dbc02e | [
"MIT"
] | null | null | null | import json
import os
import glob
import importlib
from utils.step_loader import *
class ai_engine(object):
""" the engine """
global_cache={}
steps = []
def __init__(self ):
self.global_cache['error_type'] = None
self.global_cache['error_msg'] = ''
def load_steps( self, con... | 26.605634 | 95 | 0.56432 |
f9d2488f4b156f7eecf300cdf6ccdd9e28a7edd0 | 520 | py | Python | svm/pad_na.py | kundajelab/bias_correction | 521678ea8739473f793b0ce85e22e622d13df6fe | [
"MIT"
] | null | null | null | svm/pad_na.py | kundajelab/bias_correction | 521678ea8739473f793b0ce85e22e622d13df6fe | [
"MIT"
] | null | null | null | svm/pad_na.py | kundajelab/bias_correction | 521678ea8739473f793b0ce85e22e622d13df6fe | [
"MIT"
] | null | null | null | import sys
task=sys.argv[1]
fold=sys.argv[2]
out_prefix="/srv/scratch/annashch/5_cell_lines_bias_correction/svm"
data=open(out_prefix+"/"+task+"/"+"svm_predictions_svmtrainset_genometestset"+"/"+"labels."+fold+".bed",'r').read().strip().split('\n')
outf=open(out_prefix+"/"+task+"/"+"svm_predictions_svmtrainset_genomet... | 37.142857 | 135 | 0.669231 |
5bcaf36c6748ebd5d7fa17147f8fde6a519cc662 | 6,069 | py | Python | debandshit/debanders.py | LightArrowsEXE/debandshit | 960c83828a60ee6c1fa28ad6c834eba50275aefc | [
"MIT"
] | 6 | 2020-05-02T06:31:21.000Z | 2020-11-02T14:19:10.000Z | debandshit/debanders.py | LightArrowsEXE/vs-debandshit | 960c83828a60ee6c1fa28ad6c834eba50275aefc | [
"MIT"
] | 1 | 2020-05-02T21:13:31.000Z | 2020-05-02T21:13:31.000Z | debandshit/debanders.py | LightArrowsEXE/vs-debandshit | 960c83828a60ee6c1fa28ad6c834eba50275aefc | [
"MIT"
] | 1 | 2020-05-02T20:22:31.000Z | 2020-05-02T20:22:31.000Z | """
Various functions used for debanding.
This used to be the `debandshit` module written by Z4ST1N,
with some functions that were rarely (if ever) used removed because I can't reasonably maintain them.
"""
from typing import Any, Dict, List, Optional, Union
import vapoursynth as vs
from vsutil import dep... | 34.87931 | 115 | 0.647718 |
32d24f0d41af43ecbaaadc4e3497f56ee6a4ef7c | 416 | py | Python | testproject/core/urls.py | ravillarreal/django-channels-jwt-auth-middleware | b53fc009ce7dd867eca436f18e0ad03c0f0c80be | [
"MIT"
] | 9 | 2021-01-21T16:26:48.000Z | 2021-09-20T01:47:58.000Z | testproject/core/urls.py | ravillarreal/django-channels-jwt-auth-middleware | b53fc009ce7dd867eca436f18e0ad03c0f0c80be | [
"MIT"
] | null | null | null | testproject/core/urls.py | ravillarreal/django-channels-jwt-auth-middleware | b53fc009ce7dd867eca436f18e0ad03c0f0c80be | [
"MIT"
] | 5 | 2021-04-11T09:40:44.000Z | 2021-06-09T08:05:48.000Z | from django.contrib import admin
from django.urls import path, include
def api_url(base_url=''):
api_base_url = 'api/v1'
if not base_url:
return api_base_url + '/'
return f'{api_base_url}/{base_url}/'
urlpatterns = [
path('admin/', admin.site.urls),
path(api_url('auth'), include('dj_rest... | 24.470588 | 78 | 0.675481 |
7cbeffff05e02994c97ccb03528afb299a45528d | 36,600 | py | Python | pynetdicom/events.py | Jesse-Back/pynetdicom | 68a12acdbdfb05a2f3c8fd93f25429550cce0347 | [
"MIT"
] | 274 | 2019-01-04T01:45:13.000Z | 2022-03-29T13:59:46.000Z | pynetdicom/events.py | Jesse-Back/pynetdicom | 68a12acdbdfb05a2f3c8fd93f25429550cce0347 | [
"MIT"
] | 386 | 2018-12-28T10:46:44.000Z | 2022-03-26T00:57:10.000Z | pynetdicom/events.py | Jesse-Back/pynetdicom | 68a12acdbdfb05a2f3c8fd93f25429550cce0347 | [
"MIT"
] | 100 | 2019-01-18T13:43:42.000Z | 2022-03-23T13:35:39.000Z | """Module used to support events and event handling, not to be confused with
the state machine events.
"""
from datetime import datetime
import inspect
import logging
from pathlib import Path
import sys
from typing import (
Union, Callable, Any, Tuple, List, NamedTuple, Optional, TYPE_CHECKING,
Dict, cast, Ite... | 35.057471 | 119 | 0.64388 |
8b055b861f87f803831b724a06760f33c718778f | 114 | py | Python | folderly/localize.py | beesperester/python-folderly | fb0b81fb350544ab31e803381f9711d5ed7835cc | [
"MIT"
] | null | null | null | folderly/localize.py | beesperester/python-folderly | fb0b81fb350544ab31e803381f9711d5ed7835cc | [
"MIT"
] | null | null | null | folderly/localize.py | beesperester/python-folderly | fb0b81fb350544ab31e803381f9711d5ed7835cc | [
"MIT"
] | null | null | null | """ Localize module. """
TEXT_FOLLOWING_PATHS_WILL_BE_ADDED = "The following paths will be added to the package." | 38 | 88 | 0.77193 |
aba26f17f32afaca979ad265ed3fda20e3d62a08 | 63 | py | Python | run.py | Wrytarian/DocSurfer | 150eb99def20b483fa79528428c429e6fdfd1325 | [
"Apache-2.0"
] | null | null | null | run.py | Wrytarian/DocSurfer | 150eb99def20b483fa79528428c429e6fdfd1325 | [
"Apache-2.0"
] | null | null | null | run.py | Wrytarian/DocSurfer | 150eb99def20b483fa79528428c429e6fdfd1325 | [
"Apache-2.0"
] | null | null | null | from src import app
if __name__ == "__main__":
app.run()
| 10.5 | 26 | 0.634921 |
cd944da7366718c2e9981578451387c3f20ebecd | 7,415 | py | Python | test/test_scatter_gather_ops.py | steffenerickson/pytorch | 0b656c4c69ce77ecd9aace486e471917e4660746 | [
"Intel"
] | 2 | 2022-02-14T13:56:03.000Z | 2022-02-14T13:56:05.000Z | test/test_scatter_gather_ops.py | steffenerickson/pytorch | 0b656c4c69ce77ecd9aace486e471917e4660746 | [
"Intel"
] | 1 | 2022-02-03T12:43:23.000Z | 2022-02-03T12:47:53.000Z | test/test_scatter_gather_ops.py | steffenerickson/pytorch | 0b656c4c69ce77ecd9aace486e471917e4660746 | [
"Intel"
] | 2 | 2019-07-23T14:37:31.000Z | 2019-07-23T14:47:13.000Z | # -*- coding: utf-8 -*-
# Owner(s): ["module: scatter & gather ops"]
import random
import torch
from torch.testing import make_tensor
from torch.testing._internal.common_utils import \
(run_tests, TestCase,)
from torch.testing._internal.common_device_type import \
(instantiate_device_type_tests, dtypes, dtyp... | 43.87574 | 111 | 0.598651 |
f6979295cb99476524582924383fb4efff8a2732 | 2,553 | py | Python | core/dbt/task/deps.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 1 | 2020-11-18T21:25:53.000Z | 2020-11-18T21:25:53.000Z | core/dbt/task/deps.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 50 | 2021-11-02T06:20:50.000Z | 2022-03-31T06:23:16.000Z | core/dbt/task/deps.py | joellabes/dbt | 1060035838650a30e86989cbf2693db7720ff002 | [
"Apache-2.0"
] | 1 | 2021-02-01T17:54:24.000Z | 2021-02-01T17:54:24.000Z | import dbt.utils
import dbt.deprecations
import dbt.exceptions
from dbt.config import UnsetProfileConfig
from dbt.config.renderer import DbtProjectYamlRenderer
from dbt.context.target import generate_target_context
from dbt.deps.base import downloads_directory
from dbt.deps.resolver import resolve_packages
from dbt.l... | 33.592105 | 75 | 0.631414 |
b7c8dadccc4c73a9db593b8f6745709e72ed05ab | 790 | py | Python | fractal.py | nayanshah/python | 250d5dfe7d48a15d53288d7a9f371ff7c66de57c | [
"MIT"
] | null | null | null | fractal.py | nayanshah/python | 250d5dfe7d48a15d53288d7a9f371ff7c66de57c | [
"MIT"
] | null | null | null | fractal.py | nayanshah/python | 250d5dfe7d48a15d53288d7a9f371ff7c66de57c | [
"MIT"
] | 1 | 2020-05-21T15:13:36.000Z | 2020-05-21T15:13:36.000Z | from turtle import *
# Fractals
def draw_fractal(length, angle, level, initial_state, target, replacement, target2, replacement2):
state = initial_state
for counter in range(level):
state2 = ''
for character in state:
if character == target:
state2 += replacemen... | 25.483871 | 98 | 0.517722 |
f87524caf1ad69b26d0535377722f22372e8dc14 | 746 | py | Python | bot/conversation/convers_main.py | IgV52/bot | 0c825d558f498269b65413b5772d8cf2a2318b9e | [
"MIT"
] | null | null | null | bot/conversation/convers_main.py | IgV52/bot | 0c825d558f498269b65413b5772d8cf2a2318b9e | [
"MIT"
] | null | null | null | bot/conversation/convers_main.py | IgV52/bot | 0c825d558f498269b65413b5772d8cf2a2318b9e | [
"MIT"
] | null | null | null | from telegram.ext import CommandHandler, MessageHandler, Filters, ConversationHandler
from bot.conversation.talk.conv_talk import conv_talk
from bot.conversation.poll.conv_poll import conv_poll
from bot.conversation.conv_handler import start, dialogue_dontknow, reg
from bot.conversation.select import selection_handlers... | 49.733333 | 85 | 0.727882 |
e16ee5996de34d3091c933b380742a6c7bcc05af | 3,682 | py | Python | script/gen_requirements_all.py | entatix/home-assistant | 0f8d599c829a49c8e35d5d6dc08588810fe1fbe8 | [
"MIT"
] | 4 | 2017-03-22T21:16:45.000Z | 2021-06-11T05:08:14.000Z | script/gen_requirements_all.py | entatix/home-assistant | 0f8d599c829a49c8e35d5d6dc08588810fe1fbe8 | [
"MIT"
] | null | null | null | script/gen_requirements_all.py | entatix/home-assistant | 0f8d599c829a49c8e35d5d6dc08588810fe1fbe8 | [
"MIT"
] | 4 | 2016-11-27T01:59:49.000Z | 2018-03-11T07:17:25.000Z | #!/usr/bin/env python3
"""Generate an updated requirements_all.txt."""
import importlib
import os
import pkgutil
import re
import sys
COMMENT_REQUIREMENTS = (
'RPi.GPIO',
'rpi-rf',
'Adafruit_Python_DHT',
'fritzconnection',
'pybluez',
'bluepy',
'python-lirc',
'gattlib',
'pyuserinput'... | 25.748252 | 76 | 0.595872 |
2e67d6c4c8e179ffc6ce5098a2f8634ace278be9 | 2,342 | py | Python | mac/google-cloud-sdk/lib/surface/compute/routes/delete.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/surface/compute/routes/delete.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | mac/google-cloud-sdk/lib/surface/compute/routes/delete.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2014 Google LLC. 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 requir... | 31.648649 | 74 | 0.741674 |
ddbc7ac3c77aece4aa680c141cfbfcf4ad82812b | 43,468 | py | Python | Improving Deep Neural Networks/2-Optimization_methods.py | Vishal-V/deeplearning.ai | 0ff5d4b18c488491634be910de722f798c07de89 | [
"MIT"
] | 92 | 2018-09-19T15:58:30.000Z | 2022-03-05T05:19:40.000Z | Improving Deep Neural Networks/2-Optimization_methods.py | Vishal-V/deeplearning.ai | 0ff5d4b18c488491634be910de722f798c07de89 | [
"MIT"
] | 4 | 2018-09-10T15:08:24.000Z | 2021-02-02T21:51:03.000Z | Improving Deep Neural Networks/Optimization_methods.py | Vishal-V/100-Days-of-ML-Code | 677d8d6a19ae63d3aa2ddd74e9ce8ae7a06b71df | [
"MIT"
] | 59 | 2018-11-29T20:07:15.000Z | 2022-03-31T12:34:57.000Z |
# coding: utf-8
# # Optimization Methods
#
# Until now, you've always used Gradient Descent to update the parameters and minimize the cost. In this notebook, you will learn more advanced optimization methods that can speed up learning and perhaps even get you to a better final value for the cost function. Having a g... | 39.195672 | 504 | 0.595288 |
f135c05f8c60e445ac31343b7d537d03e18ba5ea | 5,635 | py | Python | auto_tinder_api.py | hc5aleksandrov/autotinder | 35a36bfe1ad5e09ce953ef7668d4b7d0584d74b1 | [
"MIT"
] | null | null | null | auto_tinder_api.py | hc5aleksandrov/autotinder | 35a36bfe1ad5e09ce953ef7668d4b7d0584d74b1 | [
"MIT"
] | null | null | null | auto_tinder_api.py | hc5aleksandrov/autotinder | 35a36bfe1ad5e09ce953ef7668d4b7d0584d74b1 | [
"MIT"
] | null | null | null | import requests
import datetime
from geopy.geocoders import Nominatim
#from time import sleep
#from random import random
from likeliness_classifier import Classifier
import person_detector
import tensorflow as tf
#import time
import time
import random
from tinder_py.tinder.tinder import TinderClient
TINDER_URL = "h... | 40.25 | 127 | 0.506477 |
f998cdff92fb2f8e2356f1492a1476a67533a346 | 461 | py | Python | 2_guess_number_computer/guess-number-main.py | rodrigoc-silva/python-little-projects | 61c0727ed6556325135e00be8194aa69c37db37f | [
"MIT"
] | null | null | null | 2_guess_number_computer/guess-number-main.py | rodrigoc-silva/python-little-projects | 61c0727ed6556325135e00be8194aa69c37db37f | [
"MIT"
] | null | null | null | 2_guess_number_computer/guess-number-main.py | rodrigoc-silva/python-little-projects | 61c0727ed6556325135e00be8194aa69c37db37f | [
"MIT"
] | null | null | null | import random
def guess(x):
random_number = random.randint(1, x)
guess = 0
while guess != random_number:
guess = int(input(f"Guess a number between 1 and {x}: "))
if guess < random_number:
print('Sorry, guess again. Too low.')
elif guess > random_number:
prin... | 27.117647 | 76 | 0.596529 |
c1c1c6266391d3bfe6e77592e13cab29f4e1587d | 2,587 | py | Python | config/settings/local.py | myeongseob91/cppcgram | e3c7127ff6067fb412063df59891225728c31e29 | [
"MIT"
] | null | null | null | config/settings/local.py | myeongseob91/cppcgram | e3c7127ff6067fb412063df59891225728c31e29 | [
"MIT"
] | 18 | 2020-06-05T18:49:24.000Z | 2022-03-08T22:50:46.000Z | config/settings/local.py | myeongseob91/cppcgram | e3c7127ff6067fb412063df59891225728c31e29 | [
"MIT"
] | null | null | null | from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env('DJANGO_SECRET_KEY', de... | 39.8 | 113 | 0.581368 |
cc0aa1a60eb7dda3cf1a6cb2f6928de2eecc61f3 | 4,309 | py | Python | tests/multi_objective/test_study.py | eecshope/optuna | b2daf0d9d032db03b7be49fc4856c78ac7d406e1 | [
"MIT"
] | null | null | null | tests/multi_objective/test_study.py | eecshope/optuna | b2daf0d9d032db03b7be49fc4856c78ac7d406e1 | [
"MIT"
] | null | null | null | tests/multi_objective/test_study.py | eecshope/optuna | b2daf0d9d032db03b7be49fc4856c78ac7d406e1 | [
"MIT"
] | null | null | null | from typing import List
import uuid
import pytest
import optuna
from optuna.study import StudyDirection
from optuna.testing.storage import StorageSupplier
def test_create_study() -> None:
study = optuna.multi_objective.create_study(["maximize"])
assert study.n_objectives == 1
assert study.directions == ... | 35.03252 | 98 | 0.672546 |
4946a2e8f511ebec8b61c3be5cdb7c0ec84b29ea | 18,317 | py | Python | PTTLibrary/i18n.py | buck5060/PTTLibrary | fa97ed1bfc2d51608534c106642b3f9eedfce1f8 | [
"MIT"
] | null | null | null | PTTLibrary/i18n.py | buck5060/PTTLibrary | fa97ed1bfc2d51608534c106642b3f9eedfce1f8 | [
"MIT"
] | null | null | null | PTTLibrary/i18n.py | buck5060/PTTLibrary | fa97ed1bfc2d51608534c106642b3f9eedfce1f8 | [
"MIT"
] | null | null | null |
try:
from . import Util
except ModuleNotFoundError:
import Util
class Language(object):
Chinese = 1
English = 2
MinValue = Chinese
MaxValue = English
LanguageList = [
Language.Chinese,
Language.English,
]
def SpecificLoad(inputLanguage, LangList):
global LanguageList
if... | 20.511758 | 71 | 0.57968 |
4f12dea1028c305cf8026c2e4b27f8832e46c90e | 19,217 | py | Python | install/gcp/installer/forseti_server_installer.py | mcunha/forseti-security | cbf25f6173c1a25d4e43a9738eca73f927361cb8 | [
"Apache-2.0"
] | null | null | null | install/gcp/installer/forseti_server_installer.py | mcunha/forseti-security | cbf25f6173c1a25d4e43a9738eca73f927361cb8 | [
"Apache-2.0"
] | null | null | null | install/gcp/installer/forseti_server_installer.py | mcunha/forseti-security | cbf25f6173c1a25d4e43a9738eca73f927361cb8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 a... | 40.035417 | 80 | 0.619816 |
e6dda082dc58382563d5cf1afe19ad020a4afe1c | 716 | py | Python | examples/fire.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | examples/fire.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | examples/fire.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z | # vim:ts=4:sw=4:expandtab
'''Example of event firing.
'''
import time
import random
from diesel import (quickstart, quickstop, sleep,
fire, wait, log, loglevels,
set_log_level)
set_log_level(loglevels.DEBUG)
def gunner():
x = 1
while True:
fire('bam', x)
... | 22.375 | 87 | 0.511173 |
c6c6221ddf7aeb49e095eb6825c446d6d64076a2 | 943 | py | Python | Desafios/desafio-53.py | marielitonmb/Curso-Python3 | 26215c47c4d1eadf940b8024305b7e9ff600883b | [
"MIT"
] | null | null | null | Desafios/desafio-53.py | marielitonmb/Curso-Python3 | 26215c47c4d1eadf940b8024305b7e9ff600883b | [
"MIT"
] | null | null | null | Desafios/desafio-53.py | marielitonmb/Curso-Python3 | 26215c47c4d1eadf940b8024305b7e9ff600883b | [
"MIT"
] | null | null | null | # Aula 13 - Desafio 53: Detector de palindromo
# Ler uma frase qualquer e dizer se eh um palindromo, desconsiderando os espaços
# Ex: "apos a sopa", "a sacada da casa", "a torre da derrota", "o lobo ama o bolo"
frase = input('Digite uma frase: ').lower().strip()
frase = frase.replace(' ', '')
frase_inv = frase[::-1]
... | 29.46875 | 82 | 0.654295 |
cfdbd9542d475c890b06e5259d58ea5125f9c7ed | 4,216 | py | Python | tests/test_cursor_fetchall.py | adh/ctds | 8c8b562341fb9635e3d89013ff06ffc6b1397abb | [
"MIT"
] | 78 | 2016-03-14T18:02:05.000Z | 2021-11-26T23:23:06.000Z | tests/test_cursor_fetchall.py | adh/ctds | 8c8b562341fb9635e3d89013ff06ffc6b1397abb | [
"MIT"
] | 64 | 2016-10-18T17:54:08.000Z | 2021-09-30T11:01:02.000Z | tests/test_cursor_fetchall.py | adh/ctds | 8c8b562341fb9635e3d89013ff06ffc6b1397abb | [
"MIT"
] | 17 | 2016-07-21T20:22:12.000Z | 2020-11-07T01:25:26.000Z | import ctds
from .base import TestExternalDatabase
class TestCursorFetchAll(TestExternalDatabase):
'''Unit tests related to the Cursor.fetchall() method.
'''
def test___doc__(self):
self.assertEqual(
ctds.Cursor.fetchall.__doc__,
'''\
fetchall()
Fetch all (remaining) rows ... | 40.152381 | 95 | 0.514943 |
1fc61fcaa344c7f5b3a6ecfb05dd652688724193 | 12,377 | py | Python | qemu/tests/qemu-iotests/testrunner.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 44 | 2022-03-16T08:32:31.000Z | 2022-03-31T16:02:35.000Z | qemu/tests/qemu-iotests/testrunner.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 1 | 2022-03-29T02:30:28.000Z | 2022-03-30T03:40:46.000Z | qemu/tests/qemu-iotests/testrunner.py | hyunjoy/scripts | 01114d3627730d695b5ebe61093c719744432ffa | [
"Apache-2.0"
] | 18 | 2022-03-19T04:41:04.000Z | 2022-03-31T03:32:12.000Z | # Class for actually running tests.
#
# Copyright (c) 2020-2021 Virtuozzo International GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your opti... | 33.271505 | 79 | 0.540196 |
bad77ea1b879af57391959a0a3e22c8e51226d71 | 23,183 | py | Python | service/energy_compute.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | 1 | 2021-11-15T19:07:13.000Z | 2021-11-15T19:07:13.000Z | service/energy_compute.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | service/energy_compute.py | drunkcoding/model-inference | 02d2240bc7052fa32223a80fa63625fe681db102 | [
"MIT"
] | null | null | null | from typing import Iterable
from tqdm import tqdm
import sys
import os
import threading
import requests
import numpy as np
import pandas as pd
import re
import subprocess
import io
from collections import deque
import multiprocessing as mp
import mysql.connector
import time
from operator import itemgetter
from respons... | 36.110592 | 139 | 0.475305 |
8df53aaefbc6653e9b5cf787d11685229be2875d | 901 | py | Python | head_first_design_patterns/factory/simple_factory/main.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | head_first_design_patterns/factory/simple_factory/main.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | head_first_design_patterns/factory/simple_factory/main.py | incolumepy-cursos/poop | e4ac26b8d2a8c263a93fd9642fab52aafda53d80 | [
"MIT"
] | null | null | null | """
Notes:
- store is created based on factory who controls which pizzas are available
- Our client class (PizzaStore) doesn't need to know the creation of
concrete objects, that is, it dependence is of the abstract Pizza type
- pass the flavour (str) to a fabric and wait for a pizza
- simple factor... | 30.033333 | 79 | 0.744728 |
d0d1aea9164d02e6a0d1cdf5d21b2b11795df970 | 526 | py | Python | downloader/cache.py | zhongxinghong/LeetCode | dfb2c9ced49f40937002bd09918057becf02901d | [
"MIT"
] | 4 | 2020-08-09T14:22:46.000Z | 2020-10-15T09:05:15.000Z | downloader/cache.py | zhongxinghong/LeetCode | dfb2c9ced49f40937002bd09918057becf02901d | [
"MIT"
] | null | null | null | downloader/cache.py | zhongxinghong/LeetCode | dfb2c9ced49f40937002bd09918057becf02901d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File: cache.py
# Created Date: 2020-08-07
# Author: Rabbit
# --------------------------------
# Copyright (c) 2020 Rabbit
import time
class LeetCodeClientCache(object):
def __init__(self, cookies, expires=3600 * 24 * 7):
self._cookies = cookies
sel... | 21.916667 | 55 | 0.602662 |
a4a9d78cac1351250f6f71b55d34c284cd914fa4 | 11,003 | py | Python | robot_intelligence_student/ars_msf_state_estimator_student/source/ars_msf_state_estimator_ros.py | Moado/Robotics-ROS | c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0 | [
"MIT"
] | 1 | 2020-10-15T20:49:10.000Z | 2020-10-15T20:49:10.000Z | source/ars_msf_state_estimator_ros.py | joselusl/ars_msf_state_estimator_student | 1fe2796b37061c83c99b20872c10db245ba2d0fd | [
"BSD-3-Clause"
] | null | null | null | source/ars_msf_state_estimator_ros.py | joselusl/ars_msf_state_estimator_student | 1fe2796b37061c83c99b20872c10db245ba2d0fd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import numpy as np
from numpy import *
import os
# ROS
import rospy
import rospkg
import std_msgs.msg
from std_msgs.msg import Header
import geometry_msgs.msg
from geometry_msgs.msg import Point
from geometry_msgs.msg import PointStamped
from geometry_msgs.msg import Quaternion
from geom... | 25.17849 | 132 | 0.751341 |
d4cf87fe2697bc579218c452197ad564e1215df2 | 1,713 | py | Python | dblib/dbUpdate.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | 4 | 2016-11-29T16:09:54.000Z | 2021-11-12T10:34:49.000Z | dblib/dbUpdate.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | null | null | null | dblib/dbUpdate.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | 1 | 2021-11-12T10:34:49.000Z | 2021-11-12T10:34:49.000Z | import pymongo
import multiprocessing
import multiprocessing.connection
import time
SIZE = 128
NUM_NODES = 3
def recv_data(sock,dataQueue,cQueue):
connect = sock.accept()
cQueue.put("listen")
data = connect.recv()
dataQueue.put(data)
connect.close()
print("received data")
exit(0)
def db_s... | 27.190476 | 117 | 0.572096 |
b370c45e01e7bfb6e0491b4cd3e70c6f646c1667 | 77 | py | Python | openwisp_network_topology/management/commands/update_topology.py | DaffyTheDuck/openwisp-network-topology | a8c9212f0d9cca76f83b41af0e3fc89330f408bb | [
"BSD-3-Clause"
] | 105 | 2017-06-14T06:06:16.000Z | 2022-03-29T18:50:38.000Z | openwisp_network_topology/management/commands/update_topology.py | DaffyTheDuck/openwisp-network-topology | a8c9212f0d9cca76f83b41af0e3fc89330f408bb | [
"BSD-3-Clause"
] | 127 | 2017-06-02T08:19:13.000Z | 2022-03-18T00:26:13.000Z | openwisp_network_topology/management/commands/update_topology.py | ManishShah120/openwisp-network-topology | 0ed720eff1eb733a00cdbfc83292f16fe7d56e12 | [
"BSD-3-Clause"
] | 62 | 2017-06-21T10:28:10.000Z | 2022-03-31T22:06:09.000Z | from . import BaseUpdateCommand
class Command(BaseUpdateCommand):
pass
| 12.833333 | 33 | 0.779221 |
48c276f5e53c24058590b50a794d100208b336f8 | 2,178 | py | Python | examples/market_maker/on_chain_market_maker.v.py | rohithpr/vyper | f05ff1b3d91be3f6b5b9afb843ed4e2e6fcabf77 | [
"MIT"
] | null | null | null | examples/market_maker/on_chain_market_maker.v.py | rohithpr/vyper | f05ff1b3d91be3f6b5b9afb843ed4e2e6fcabf77 | [
"MIT"
] | null | null | null | examples/market_maker/on_chain_market_maker.v.py | rohithpr/vyper | f05ff1b3d91be3f6b5b9afb843ed4e2e6fcabf77 | [
"MIT"
] | null | null | null | units: {
currency_value: "a currency"
}
total_eth_qty: public(wei_value)
total_token_qty: public(uint256(currency_value))
# Constant set in `initiate` that's used to calculate
# the amount of ether/tokens that are exchanged
invariant: public(uint256(wei * currency_value))
token_address: address(ERC20)
owner: publi... | 38.892857 | 104 | 0.77686 |
fcb97bd400bd67d926b7315ba309a39ba1218971 | 2,114 | py | Python | sjb/graph.py | brenton/aos-cd-jobs | 34e427bb7091c52791bc93a34f062e57dc005082 | [
"Apache-2.0"
] | 45 | 2017-05-09T15:49:06.000Z | 2021-11-07T19:48:35.000Z | sjb/graph.py | brenton/aos-cd-jobs | 34e427bb7091c52791bc93a34f062e57dc005082 | [
"Apache-2.0"
] | 1,313 | 2017-01-19T13:40:43.000Z | 2022-03-30T14:25:44.000Z | sjb/graph.py | brenton/aos-cd-jobs | 34e427bb7091c52791bc93a34f062e57dc005082 | [
"Apache-2.0"
] | 165 | 2017-01-17T22:19:04.000Z | 2022-03-02T12:15:13.000Z | from __future__ import print_function
from os import listdir
from os.path import isfile, join
import yaml
import json
def getGraphvizDotFormat(graph):
nodes = graph.nodes()
edges = graph.edges()
content = "digraph {\n"
for u in nodes:
if u in edges:
for v in edges[u]:
content += "\"%s\" -> \"%s\";\n" % ... | 21.571429 | 81 | 0.66036 |
a36907e5163eeed0454b24e80b58be258e660c11 | 9,142 | py | Python | gluon/packages/dal/pydal/representers/__init__.py | guadaltech/web2py-ruben | 45e0f4f316774e707a3075f23e3f8b9fed00c387 | [
"BSD-3-Clause"
] | null | null | null | gluon/packages/dal/pydal/representers/__init__.py | guadaltech/web2py-ruben | 45e0f4f316774e707a3075f23e3f8b9fed00c387 | [
"BSD-3-Clause"
] | null | null | null | gluon/packages/dal/pydal/representers/__init__.py | guadaltech/web2py-ruben | 45e0f4f316774e707a3075f23e3f8b9fed00c387 | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict
from .._compat import PY2, with_metaclass, iteritems, to_unicode, to_bytes, \
string_types
from .._gae import gae
from ..helpers._internals import Dispatcher
from ..helpers.regex import REGEX_TYPE
representers = Dispatcher("representer")
class for_type(object):
... | 34.11194 | 78 | 0.620324 |
6f54ea7a9bb4cbb98b6a652dd8fae11258f3e677 | 264 | py | Python | avalanche/evaluation/metrics/__init__.py | lrzpellegrini/avalanche_pre_public | 522019a55ce08b92c1ec74b508a8ea6ae8751dfd | [
"MIT"
] | 12 | 2021-04-16T15:49:59.000Z | 2022-02-27T18:04:58.000Z | avalanche/evaluation/metrics/__init__.py | lrzpellegrini/avalanche_pre_public | 522019a55ce08b92c1ec74b508a8ea6ae8751dfd | [
"MIT"
] | null | null | null | avalanche/evaluation/metrics/__init__.py | lrzpellegrini/avalanche_pre_public | 522019a55ce08b92c1ec74b508a8ea6ae8751dfd | [
"MIT"
] | 2 | 2021-06-22T04:11:52.000Z | 2021-11-12T03:27:18.000Z | from .mean import *
from .accuracy import *
from .confusion_matrix import *
from .cpu_usage import *
from .disk_usage import *
from .forgetting import *
from .gpu_usage import *
from .loss import *
from .mac import *
from .ram_usage import *
from .timing import *
| 22 | 31 | 0.75 |
6e8b15878b8d8b90a79f6557b61b5d99716eb6e6 | 3,281 | py | Python | sign.py | FOULAB/foubot-modules | 87423c4f4036b1e5d31d33e54a1a0b82f30e27ba | [
"BSD-3-Clause"
] | 2 | 2019-10-04T23:12:20.000Z | 2019-10-21T23:43:45.000Z | sign.py | FOULAB/foubot-modules | 87423c4f4036b1e5d31d33e54a1a0b82f30e27ba | [
"BSD-3-Clause"
] | 3 | 2016-02-10T03:21:57.000Z | 2019-07-22T15:31:03.000Z | sign.py | FOULAB/foubot-modules | 87423c4f4036b1e5d31d33e54a1a0b82f30e27ba | [
"BSD-3-Clause"
] | 2 | 2016-12-03T04:47:11.000Z | 2019-10-21T23:43:46.000Z | from ibid.plugins import Processor, match, periodic, handler
import ibid.source.irc
import ibid
from ledsign import LEDSign
import subprocess
import datetime
features = {'sign': {
'description': u'Displays messages on the Foulab LED sign.',
'categories': ('message',),
}}
lab_channel = u"##foulab"
#Monkey patch t... | 32.166667 | 287 | 0.613228 |
90f4af7e3ea6291dff145d4e87024f95729c330d | 187 | py | Python | pltform/swami/five_thirty_eight.py | crashka/bfp | 211a224628659d7b69e30ff108b6d92ea76fbef1 | [
"MIT"
] | null | null | null | pltform/swami/five_thirty_eight.py | crashka/bfp | 211a224628659d7b69e30ff108b6d92ea76fbef1 | [
"MIT"
] | null | null | null | pltform/swami/five_thirty_eight.py | crashka/bfp | 211a224628659d7b69e30ff108b6d92ea76fbef1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .ext_data import SwamiExtData
class SwamiFiveThirtyEight(SwamiExtData):
"""History of predictions from the fivethirtyeight.com website
"""
pass
| 20.777778 | 66 | 0.71123 |
6555497d3b1d02c8c5a3ee7456d0aa919ce8ab21 | 6,075 | py | Python | mogptk/gpr/parameter.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | mogptk/gpr/parameter.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | mogptk/gpr/parameter.py | vishalbelsare/mogptk | 4f7001fbfacea778bd62a1e4e6c5b404c473e313 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as functional
from .config import config
class Transform:
def forward(self, x):
# unconstrained to constrained space
raise NotImplementedError()
def inverse(self, y):
# constrained to unconstrained space
raise NotImplementedError()
... | 38.207547 | 123 | 0.579753 |
e4e6a26046f32847e9c7df01bb03509bf3b76bda | 7,747 | py | Python | old/app/main.py | lucycore/hlby_web | c50c361656501196bc620aaaa5c075278001c350 | [
"MIT"
] | null | null | null | old/app/main.py | lucycore/hlby_web | c50c361656501196bc620aaaa5c075278001c350 | [
"MIT"
] | null | null | null | old/app/main.py | lucycore/hlby_web | c50c361656501196bc620aaaa5c075278001c350 | [
"MIT"
] | null | null | null | import os
from urllib.parse import unquote
from flask import Flask, render_template, session, redirect, url_for, flash,request, g
from flask_bootstrap import Bootstrap
from flask_moment import Moment
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField,PasswordField
from wtforms.validators impor... | 24.285266 | 292 | 0.599329 |
ac1b76a28bb9fe94bdc92c469edcc4d2c0a02346 | 13,417 | py | Python | python/pywatchman_aio/__init__.py | pataquets/watchman | 8e52efce212e87f485370bc25693802b8a999089 | [
"Apache-2.0"
] | null | null | null | python/pywatchman_aio/__init__.py | pataquets/watchman | 8e52efce212e87f485370bc25693802b8a999089 | [
"Apache-2.0"
] | null | null | null | python/pywatchman_aio/__init__.py | pataquets/watchman | 8e52efce212e87f485370bc25693802b8a999089 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2014-present Facebook, Inc.
# 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 of source code must retain the above copyright notice,
# th... | 33.967089 | 87 | 0.64858 |
60ae69176cfd0478e9c9f974bd61deafbe16736b | 61,334 | py | Python | lib/sqlalchemy/orm/strategy_options.py | cctvadmin/sqlalchemy | 0d5508d77653b37368ff9de22307c154cc90cf71 | [
"MIT"
] | 1 | 2021-05-14T01:38:21.000Z | 2021-05-14T01:38:21.000Z | lib/sqlalchemy/orm/strategy_options.py | cctvadmin/sqlalchemy | 0d5508d77653b37368ff9de22307c154cc90cf71 | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/strategy_options.py | cctvadmin/sqlalchemy | 0d5508d77653b37368ff9de22307c154cc90cf71 | [
"MIT"
] | null | null | null | # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
"""
from . import util as orm_util
from .attributes import QueryableAttribute
from .base import ... | 33.792837 | 84 | 0.594157 |
a055e5cbee1508d2e487a18048e270d5707d81ff | 273 | py | Python | tests/artificial/transf_Quantization/trend_PolyTrend/cycle_0/ar_12/test_artificial_1024_Quantization_PolyTrend_0_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Quantization/trend_PolyTrend/cycle_0/ar_12/test_artificial_1024_Quantization_PolyTrend_0_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Quantization/trend_PolyTrend/cycle_0/ar_12/test_artificial_1024_Quantization_PolyTrend_0_12_0.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 0, transform = "Quantization", sigma = 0.0, exog_count = 0, ar_order = 12); | 39 | 168 | 0.736264 |
761a87db27080fe6922d1454cb1a54a1e7cfff7e | 740 | py | Python | nomadgram/users/signals.py | juyoungpark718/juyoungram | 24182afb4d3076ba9a8614846368781883f255fa | [
"MIT"
] | null | null | null | nomadgram/users/signals.py | juyoungpark718/juyoungram | 24182afb4d3076ba9a8614846368781883f255fa | [
"MIT"
] | 12 | 2021-03-02T01:12:10.000Z | 2022-03-03T23:07:52.000Z | nomadgram/users/signals.py | juyoungpark718/juyoungram | 24182afb4d3076ba9a8614846368781883f255fa | [
"MIT"
] | null | null | null | from allauth.account.signals import user_signed_up
from django.dispatch import receiver
from io import BytesIO
from urllib.request import urlopen
from django.core.files import File
@receiver(user_signed_up)
def user_signed_up(request, user, **kwargs):
if len(user.socialaccount_set.all()) > 0:
soci... | 37 | 63 | 0.695946 |
96a831aee422d5aa9171604c431e642108469686 | 567 | py | Python | setup.py | cthurber/tweetpurge | c18c2e65edfea49076d3cb3df97fef9f27911a93 | [
"BSD-2-Clause"
] | null | null | null | setup.py | cthurber/tweetpurge | c18c2e65edfea49076d3cb3df97fef9f27911a93 | [
"BSD-2-Clause"
] | null | null | null | setup.py | cthurber/tweetpurge | c18c2e65edfea49076d3cb3df97fef9f27911a93 | [
"BSD-2-Clause"
] | null | null | null | import os,sys
if os.path.isfile('.apikey') == False:
consumerKey = input("Consumer Key: ")
consumerSecret = input("Consumer Secret: ")
accessToken = input("Access Token: ")
accessTokenSecret = input("Access Token Secret: ")
printArray = [consumerKey,consumerSecret,accessToken,accessTokenSecret]
with open(".apike... | 31.5 | 72 | 0.707231 |
c35f4d92bc4e82ba7dd7378a71bb2a38671ccd44 | 372 | py | Python | insights/parsers/tests/test_ksmstate.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 1 | 2020-02-19T06:36:22.000Z | 2020-02-19T06:36:22.000Z | insights/parsers/tests/test_ksmstate.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 10 | 2018-04-16T15:38:04.000Z | 2018-05-15T18:43:02.000Z | insights/parsers/tests/test_ksmstate.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | null | null | null | from insights.parsers import ksmstate
from insights.tests import context_wrap
KSMSTATE0 = "0"
KSMSTATE1 = "1"
def test_is_running_0():
ksm_info = ksmstate.is_running(context_wrap(KSMSTATE0))
assert ksm_info.get('running') is False
def test_is_running_1():
ksm_info = ksmstate.is_running(context_wrap(KSM... | 23.25 | 59 | 0.760753 |
87d7ac98945dfaeaa8aef0e50928282ac73e8067 | 2,614 | py | Python | donno/converters/joplin.py | leetschau/donno | d7f5651df997966c249f6350f59ed3321ffd128d | [
"MIT"
] | null | null | null | donno/converters/joplin.py | leetschau/donno | d7f5651df997966c249f6350f59ed3321ffd128d | [
"MIT"
] | null | null | null | donno/converters/joplin.py | leetschau/donno | d7f5651df997966c249f6350f59ed3321ffd128d | [
"MIT"
] | null | null | null | from pathlib import Path
from datetime import datetime
import json
import re
import sh
from donno.config import get_attr
configs = get_attr()
def f2dict(fp: str) -> dict:
with open(fp) as f:
res = json.load(f)
return res
def get_slug(notebook: dict, nbs: list) -> str:
if len(notebook['parent_i... | 32.271605 | 79 | 0.494262 |
e5423cee00d430015cac0c19e4add669086390f5 | 1,819 | py | Python | featureskagg.py | fanteastick/ML-SKI | e440e2b4c43a42b2823d99bc3c7ab7c11da868a0 | [
"Apache-2.0"
] | 2 | 2018-11-05T06:38:46.000Z | 2019-08-09T18:43:41.000Z | featureskagg.py | fanteastick/ML-SKI | e440e2b4c43a42b2823d99bc3c7ab7c11da868a0 | [
"Apache-2.0"
] | null | null | null | featureskagg.py | fanteastick/ML-SKI | e440e2b4c43a42b2823d99bc3c7ab7c11da868a0 | [
"Apache-2.0"
] | null | null | null | #importing
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import re
import numpy as np
from sklearn import tree
from sklearn.model_selection import GridSearchCV
sns.set()
df_train = pd.read_csv('train.csv')
df_test = pd.read_csv('test.csv')
#store target variable of training data in safe p... | 27.560606 | 140 | 0.698736 |
df1471fa0aa10248802b161fa0964f2bd552447b | 8,351 | py | Python | ultrasync/common.py | chatziko/ultrasync | 1bb2ee265a62e6f3da0889b73467e4a602dc71f2 | [
"MIT"
] | 8 | 2020-01-15T18:23:17.000Z | 2021-10-30T22:04:41.000Z | ultrasync/common.py | chatziko/ultrasync | 1bb2ee265a62e6f3da0889b73467e4a602dc71f2 | [
"MIT"
] | 10 | 2020-11-13T23:46:21.000Z | 2022-03-04T21:53:29.000Z | ultrasync/common.py | chatziko/ultrasync | 1bb2ee265a62e6f3da0889b73467e4a602dc71f2 | [
"MIT"
] | 2 | 2020-06-12T11:16:17.000Z | 2022-02-22T09:26:38.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2020 Chris Caron <lead2gold@gmail.com>
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# 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... | 24.854167 | 79 | 0.66052 |
7cb2256ccf21ab27084ce7486182f7f6ad17fbac | 336 | py | Python | s41.py | glcrazier/LeetCodePlay | cf951a079d458e02000d170529cb1e3b049da023 | [
"MIT"
] | 1 | 2018-02-20T13:56:02.000Z | 2018-02-20T13:56:02.000Z | s41.py | glcrazier/LeetCodePlay | cf951a079d458e02000d170529cb1e3b049da023 | [
"MIT"
] | null | null | null | s41.py | glcrazier/LeetCodePlay | cf951a079d458e02000d170529cb1e3b049da023 | [
"MIT"
] | null | null | null | from solution import Solution
if __name__ == '__main__':
sol = Solution()
print sol.firstMissingPositive([1,2,0])
print sol.firstMissingPositive([3,4,-1,1])
print sol.firstMissingPositive([])
print sol.firstMissingPositive([1])
print sol.firstMissingPositive([2])
print sol.firstMissingPosit... | 28 | 46 | 0.696429 |
232c61e0a6ebd976f72f3e0a8b5b3a1ac70345ec | 3,232 | py | Python | app_PyQtArnold_RenderTest/Core/app_PyQtArnold_core.py | fidelm02/CS_TestsDec | 10ac9a72c214fd4e48fd3e2f0a85bee6227ba287 | [
"Unlicense"
] | null | null | null | app_PyQtArnold_RenderTest/Core/app_PyQtArnold_core.py | fidelm02/CS_TestsDec | 10ac9a72c214fd4e48fd3e2f0a85bee6227ba287 | [
"Unlicense"
] | null | null | null | app_PyQtArnold_RenderTest/Core/app_PyQtArnold_core.py | fidelm02/CS_TestsDec | 10ac9a72c214fd4e48fd3e2f0a85bee6227ba287 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Methods that has nos direct relation
with the ui
"""
import os
from PyQt4 import QtGui, QtCore
from arnold import *
class CoreFunctions(QtCore.QThread):
renderSignal = QtCore.pyqtSignal()
def __init__(self):
QtCore.QThread.__init__(self)
self.r = self.g = self.b = ... | 29.117117 | 64 | 0.589109 |
a357777ac9ad9e3679452b0a3067689833ac37da | 1,956 | py | Python | robosuite-utils/robosuit-tests/test5.py | jdj2261/robosuite | c708fbb69459b74bdfebb3d9e1b8ab3ad3480a19 | [
"MIT"
] | null | null | null | robosuite-utils/robosuit-tests/test5.py | jdj2261/robosuite | c708fbb69459b74bdfebb3d9e1b8ab3ad3480a19 | [
"MIT"
] | null | null | null | robosuite-utils/robosuit-tests/test5.py | jdj2261/robosuite | c708fbb69459b74bdfebb3d9e1b8ab3ad3480a19 | [
"MIT"
] | null | null | null | from robosuite import load_controller_config
from robosuite.models import MujocoWorldBase
from robosuite.models.arenas.table_arena import TableArena
from robosuite.models.robots import Panda
from robosuite.models.base import MujocoXML
from robosuite.utils import SimulationError
from robosuite.robots import SingleArm
fr... | 30.5625 | 80 | 0.683538 |
bb37e719415f89ec61b2e640d352adbc4f070bbf | 7,153 | py | Python | qpid_bow/asyncio.py | forgetsemicolon/qpid-bow | eed751b7d6b26ebfb3d7cb2c79c4ab38dcf503ef | [
"MIT"
] | 10 | 2018-06-25T11:48:01.000Z | 2022-01-24T01:56:30.000Z | qpid_bow/asyncio.py | forgetsemicolon/qpid-bow | eed751b7d6b26ebfb3d7cb2c79c4ab38dcf503ef | [
"MIT"
] | 10 | 2018-06-25T10:36:26.000Z | 2020-10-03T00:49:00.000Z | qpid_bow/asyncio.py | forgetsemicolon/qpid-bow | eed751b7d6b26ebfb3d7cb2c79c4ab38dcf503ef | [
"MIT"
] | 8 | 2018-06-25T09:06:00.000Z | 2021-05-04T23:47:41.000Z | import asyncio
import time
from logging import getLogger
from typing import List, Union
from proton import Connection, Receiver, Sender, Session, Url
from proton.reactor import Container as BaseContainer, LinkOption
from proton.handlers import IOHandler
logger = getLogger()
class AsyncioReactorHandler:
"""Qpid... | 34.723301 | 101 | 0.635677 |
9c6d027b05857838c2ccb545f3e6ed70c1c8697e | 14,234 | py | Python | homeassistant/components/wled/light.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/wled/light.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | 52 | 2020-07-14T14:12:26.000Z | 2022-03-31T06:24:02.000Z | homeassistant/components/wled/light.py | fanta759/core | fcdb54d8780900fb85e6c20d5382cfd13b69a0b3 | [
"Apache-2.0"
] | 1 | 2018-08-03T20:06:38.000Z | 2018-08-03T20:06:38.000Z | """Support for LED lights."""
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_HS_COLOR,
ATTR_TRANSITION,
ATTR_WHITE_VALUE... | 33.179487 | 87 | 0.63805 |
141e1075fc2bb679e4853866a1b4b2a915f781bc | 1,323 | py | Python | flaim/users/views.py | bfssi-forest-dussault/flaime | 7c898f07e0d7c16b63a59d2c0c56290e32a2df47 | [
"MIT"
] | null | null | null | flaim/users/views.py | bfssi-forest-dussault/flaime | 7c898f07e0d7c16b63a59d2c0c56290e32a2df47 | [
"MIT"
] | 11 | 2020-11-09T19:55:58.000Z | 2022-02-13T19:43:03.000Z | flaim/users/views.py | BFSSI-Bioinformatics-Lab/flaime | 1feedf3974114c16724bfbd235ce4637983a3f5e | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import DetailView, RedirectView, UpdateView
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
User = get_user_mode... | 25.442308 | 89 | 0.734694 |
eafa165ac0da2b150f3e2e7b21353f3b78d03a2e | 9,364 | py | Python | pyglet-hg/tools/epydoc/epydoc/__init__.py | sangh/LaserShow | abc95e465e3455dc220cc602dd58358c84666f29 | [
"BSD-3-Clause"
] | 2 | 2017-05-10T08:27:22.000Z | 2019-10-05T14:55:00.000Z | tools/epydoc/epydoc/__init__.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | null | null | null | tools/epydoc/epydoc/__init__.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | null | null | null | # epydoc
#
# Copyright (C) 2005 Edward Loper
# Author: Edward Loper <edloper@loper.org>
# URL: <http://epydoc.sf.net>
#
# $Id: __init__.py 1558 2007-02-27 05:28:35Z edloper $
"""
Automatic Python reference documentation generator. Epydoc processes
Python modules and docstrings to generate formatted API documentation,... | 41.070175 | 76 | 0.595258 |
4a9adcf48382d0cc69399e83c7fe685435c5031d | 6,541 | py | Python | tensorflow/contrib/session_bundle/gc.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/session_bundle/gc.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/session_bundle/gc.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.142857 | 80 | 0.668552 |
ee5567d49c2618fd75068e0e77a8c17500c82e9a | 534 | py | Python | tests/contrib/contrib_template_test.py | isabella232/uis-rnn | 91764ceaad832be651f3d64a809a183e133154d6 | [
"Apache-2.0"
] | 1,454 | 2018-10-23T09:37:57.000Z | 2022-03-17T12:53:24.000Z | tests/contrib/contrib_template_test.py | isabella232/uis-rnn | 91764ceaad832be651f3d64a809a183e133154d6 | [
"Apache-2.0"
] | 87 | 2018-11-14T15:35:15.000Z | 2021-07-26T05:08:34.000Z | tests/contrib/contrib_template_test.py | isabella232/uis-rnn | 91764ceaad832be651f3d64a809a183e133154d6 | [
"Apache-2.0"
] | 325 | 2018-10-30T21:36:42.000Z | 2022-03-29T12:43:46.000Z | # Contributor information:
# Name: First Last
# GitHub account: username
# Email: username@abcd.edu
# Organization: ABCD University
"""This is a template for community contributions."""
import unittest
from uisrnn.contrib import contrib_template
class TestExampleFunction(unittest.TestCase):
"""Tests for ex... | 26.7 | 56 | 0.747191 |
dcbfc6c46c434efb2bb9162515670ccb48b6d216 | 1,147 | py | Python | holidata/holidays/hr-HR.py | xeals/holidata | c99a56b63b1cb9dc5f4f79f3de83ba3865215250 | [
"MIT"
] | 32 | 2019-04-12T08:01:34.000Z | 2022-02-28T04:41:50.000Z | holidata/holidays/hr-HR.py | xeals/holidata | c99a56b63b1cb9dc5f4f79f3de83ba3865215250 | [
"MIT"
] | 74 | 2019-07-09T16:35:20.000Z | 2022-03-09T16:41:34.000Z | holidata/holidays/hr-HR.py | xeals/holidata | c99a56b63b1cb9dc5f4f79f3de83ba3865215250 | [
"MIT"
] | 20 | 2019-01-28T07:41:02.000Z | 2022-02-16T02:38:57.000Z | # coding=utf-8
from dateutil.easter import EASTER_WESTERN
from holidata.utils import SmartDayArrow
from .holidays import Locale, Holiday
class hr_HR(Locale):
"""
01-01: [NF] Nova Godina
01-06: [NRF] Sveta tri kralja
05-01: [NF] Praznik rada
05-30: [NF] Dan državnosti
06-22: [NF] Dan antifašis... | 29.410256 | 105 | 0.624237 |
2ecb5499a1710a5d1fa06edf17ad1955579ee5d1 | 7,008 | py | Python | mmsr/train.py | yumingj/C2-Matching | fa171ca6707c6f16a5d04194ce866ea70bb21d2b | [
"Apache-2.0"
] | 111 | 2021-05-31T17:15:41.000Z | 2022-03-30T03:06:31.000Z | mmsr/train.py | yumingj/C2-Matching | fa171ca6707c6f16a5d04194ce866ea70bb21d2b | [
"Apache-2.0"
] | 20 | 2021-06-02T03:03:25.000Z | 2022-03-28T03:49:08.000Z | mmsr/train.py | yumingj/C2-Matching | fa171ca6707c6f16a5d04194ce866ea70bb21d2b | [
"Apache-2.0"
] | 21 | 2021-06-04T05:49:41.000Z | 2022-03-18T12:45:24.000Z | import argparse
import logging
import math
import os.path as osp
import random
import time
import torch
from mmcv.runner import get_time_str, init_dist
from mmsr.data import create_dataloader, create_dataset
from mmsr.data.data_sampler import DistIterSampler
from mmsr.models import create_model
from mmsr.utils import... | 36.884211 | 80 | 0.602169 |
3e89f0d720db88316524dfd76c357c7cbdcea5b7 | 1,033 | py | Python | main/models.py | bensteinberg/dostuff | bb71c73674160906b557967f1a8d3f18507dc943 | [
"MIT"
] | 3 | 2021-08-10T17:58:23.000Z | 2021-11-17T09:52:38.000Z | main/models.py | bensteinberg/dostuff | bb71c73674160906b557967f1a8d3f18507dc943 | [
"MIT"
] | 11 | 2020-02-26T21:12:55.000Z | 2021-06-02T16:10:07.000Z | main/models.py | harvard-lil/dostuff | 8100b111f4042aefe94ea09239e1afbed3e5babc | [
"MIT"
] | 1 | 2019-01-18T21:36:41.000Z | 2019-01-18T21:36:41.000Z | from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.crypto import get_random_string
from jsonfield import JSONField
from rest_framework.authtoken.models import Toke... | 35.62069 | 87 | 0.759923 |
1530c0a05984a874484c59ee7615ff10d594bf3c | 8,553 | py | Python | lib/galaxy_test/base/rules_test_data.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy_test/base/rules_test_data.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | lib/galaxy_test/base/rules_test_data.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | def check_example_1(hdca, dataset_populator):
assert hdca["collection_type"] == "list"
assert hdca["element_count"] == 2
first_dce = hdca["elements"][0]
first_hda = first_dce["object"]
assert first_hda["hid"] > 3
def check_example_2(hdca, dataset_populator):
assert hdca["collection_type"] == ... | 29.493103 | 108 | 0.483573 |
eac726bc73cb1fc99d01c9af90bcc4d84c6d8437 | 2,880 | py | Python | setup.py | inkwork/fb-reporter | 0b153f248e49ffd994cba5f3d92377df7dc17b8f | [
"Apache-2.0"
] | null | null | null | setup.py | inkwork/fb-reporter | 0b153f248e49ffd994cba5f3d92377df7dc17b8f | [
"Apache-2.0"
] | 10 | 2019-02-01T15:05:39.000Z | 2019-02-06T18:02:54.000Z | setup.py | inkwork/fb-reporter | 0b153f248e49ffd994cba5f3d92377df7dc17b8f | [
"Apache-2.0"
] | null | null | null | import io
import os
import sys
from setuptools import setup, find_packages
# Package meta-data.
NAME = "fontelemetry"
DESCRIPTION = "A library and toolset for typeface software development reporting."
LICENSE = "Apache License v2.0"
URL = "https://github.com/googlefonts/fontelemetry"
EMAIL = "dcrossland@google.com"
AU... | 31.304348 | 109 | 0.627431 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.