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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1275a9d9a2662a16f8876605938a53b08b79da8b | 4,746 | py | Python | python/cuml/test/test_incremental_pca.py | trivialfis/cuml | ae7e4442a3dccdf6c360bd7d20248c69cd706fb2 | [
"Apache-2.0"
] | 1 | 2021-01-01T10:52:18.000Z | 2021-01-01T10:52:18.000Z | python/cuml/test/test_incremental_pca.py | trivialfis/cuml | ae7e4442a3dccdf6c360bd7d20248c69cd706fb2 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_incremental_pca.py | trivialfis/cuml | ae7e4442a3dccdf6c360bd7d20248c69cd706fb2 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 32.506849 | 77 | 0.65571 |
e89a01a3b34ede6ea83e6eeab540ed7bc7e40400 | 447 | py | Python | sorting/selection_sort.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | sorting/selection_sort.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | sorting/selection_sort.py | EashanKaushik/Data-Structures | e5bd391e029cb47e650d5665647ff57590b9b343 | [
"MIT"
] | null | null | null | # time Complexity: O(n^2)
# space Complexity: O(1)
def selection_sort(arr):
for index in range(len(arr)):
min_index = index
for inner_index in range(index+1, len(arr)):
if arr[min_index] > arr[inner_index]:
min_index = inner_index
arr[index], arr[min_index] = ... | 21.285714 | 63 | 0.595078 |
9af87b10652ffc74afdf1ef78424e82f082f8f2b | 2,729 | py | Python | harvester/cli.py | MITLibraries/oai-pmh-harvester | 6cb606460ca2f3542c4e5ec06e76d21b801ad7c4 | [
"Apache-2.0"
] | 4 | 2020-03-18T17:58:29.000Z | 2021-08-16T14:30:34.000Z | harvester/cli.py | MITLibraries/oai-pmh-harvester | 6cb606460ca2f3542c4e5ec06e76d21b801ad7c4 | [
"Apache-2.0"
] | 389 | 2019-06-12T14:43:49.000Z | 2021-08-03T13:45:52.000Z | harvester/cli.py | MITLibraries/oai-pmh-harvester | 6cb606460ca2f3542c4e5ec06e76d21b801ad7c4 | [
"Apache-2.0"
] | 1 | 2020-10-21T18:19:37.000Z | 2020-10-21T18:19:37.000Z | #!/usr/bin/env python
from datetime import date, timedelta
import logging
import sys
import click
from sickle import Sickle
from sickle.iterator import OAIItemIterator
from sickle.oaiexceptions import NoRecordsMatch
from smart_open import open
yesterday = (date.today() - timedelta(days=1)).strftime('%Y-%m-%d')
tomor... | 31.367816 | 78 | 0.616343 |
d6d58b40d870ee1859442151835848833b26439c | 11,315 | py | Python | nn/sclstm.py | abhishek2024/Chatbot-RNNLG | 61ac6fd1304c9dcf29ea894452e685652718f6f8 | [
"Apache-2.0"
] | 553 | 2016-08-27T08:21:04.000Z | 2022-02-16T16:24:38.000Z | nn/sclstm.py | abhishek2024/Chatbot-RNNLG | 61ac6fd1304c9dcf29ea894452e685652718f6f8 | [
"Apache-2.0"
] | 6 | 2016-09-08T11:42:50.000Z | 2019-07-05T15:14:54.000Z | nn/sclstm.py | abhishek2024/Chatbot-RNNLG | 61ac6fd1304c9dcf29ea894452e685652718f6f8 | [
"Apache-2.0"
] | 150 | 2016-08-27T12:53:16.000Z | 2020-10-31T07:50:40.000Z | ######################################################################
######################################################################
# Copyright Tsung-Hsien Wen, Cambridge Dialogue Systems Group, 2016 #
######################################################################
####################################... | 40.266904 | 78 | 0.527 |
5341544d774edf2756d0b9b20bf0890c6583d63a | 564 | py | Python | python/test/test_TwoProductFMA.py | hanyohanyo820/EFT | 04917a816f6d5d425907083439c150607c9cde22 | [
"MIT"
] | null | null | null | python/test/test_TwoProductFMA.py | hanyohanyo820/EFT | 04917a816f6d5d425907083439c150607c9cde22 | [
"MIT"
] | null | null | null | python/test/test_TwoProductFMA.py | hanyohanyo820/EFT | 04917a816f6d5d425907083439c150607c9cde22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import os
import sys
sys.path.append(os.pardir)
from EFT import TwoProductFMA
eps = 2**-53
def test_TwoProductFMA_1():
[x, y] = TwoProductFMA(1.0 + 2*eps, 1.0 + 2*eps)
# (1+epse)(1+epse) = 1 + 4eps + 4eps^2
# 1 + 2eps is approximate result, eps^2 is error.
assert... | 24.521739 | 51 | 0.611702 |
9ff50c0c090164f5d379637d143d0a710486da2b | 1,116 | py | Python | var/spack/repos/builtin/packages/libnfnetlink/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-03-05T10:54:32.000Z | 2021-03-05T14:14:52.000Z | var/spack/repos/builtin/packages/libnfnetlink/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | var/spack/repos/builtin/packages/libnfnetlink/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-07-19T20:31:27.000Z | 2021-07-19T21:14:14.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libnfnetlink(AutotoolsPackage):
"""libnfnetlink is a userspace library that provides some ... | 42.923077 | 96 | 0.756272 |
c1c85d143394ae8354a2305787c07d9a3a97f0bb | 9,345 | py | Python | compose/container.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 2 | 2020-05-04T02:09:57.000Z | 2022-02-28T22:15:51.000Z | compose/container.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 38 | 2021-07-19T21:08:06.000Z | 2022-03-28T21:11:05.000Z | compose/container.py | galeksandrp/compose | 73f8cf9132018429783e65bde66f8f961637e418 | [
"Apache-2.0"
] | 1 | 2021-06-06T17:47:08.000Z | 2021-06-06T17:47:08.000Z | from functools import reduce
from docker.errors import ImageNotFound
from .const import LABEL_CONTAINER_NUMBER
from .const import LABEL_ONE_OFF
from .const import LABEL_PROJECT
from .const import LABEL_SERVICE
from .const import LABEL_SLUG
from .const import LABEL_VERSION
from .utils import truncate_id
from .version ... | 28.931889 | 102 | 0.610166 |
837db709a57dc414694e5f0dfc68875b01d4a53b | 19,785 | py | Python | django/contrib/auth/tests/test_forms.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2019-02-10T19:33:27.000Z | 2019-02-10T19:33:27.000Z | django/contrib/auth/tests/test_forms.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_forms.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2020-05-03T20:42:29.000Z | 2020-05-03T20:42:29.000Z | from __future__ import unicode_literals
import os
import re
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, Password... | 38.870334 | 143 | 0.641951 |
de470c34b2f65ff1ff59cb801b870bae235ab3f4 | 1,526 | py | Python | src/geo_testing/test_scripts/psgs_big_hard.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 70 | 2015-01-21T12:24:50.000Z | 2022-03-16T02:10:45.000Z | src/geo_testing/test_scripts/psgs_big_hard.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 8 | 2015-04-22T13:14:30.000Z | 2021-11-23T12:16:32.000Z | src/geo_testing/test_scripts/psgs_big_hard.py | hpgl/hpgl | 72d8c4113c242295de740513093f5779c94ba84a | [
"BSD-3-Clause"
] | 18 | 2015-02-15T18:04:31.000Z | 2021-01-16T08:54:32.000Z | #
#
# Copyright 2009 HPGL Team
#
# This file is part of HPGL (High Perfomance Geostatistics Library).
#
# HPGL 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, version 2 of the License.
#
# HPGL is ... | 33.173913 | 229 | 0.697248 |
d9f1212a70913d1fc865118a2b080ded5977d3db | 10,371 | py | Python | tests/test_utility/test_sigmaclip.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 9 | 2015-04-30T22:10:14.000Z | 2020-06-09T01:24:20.000Z | tests/test_utility/test_sigmaclip.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 218 | 2015-01-08T11:10:57.000Z | 2021-11-25T05:52:42.000Z | tests/test_utility/test_sigmaclip.py | ajstewart/tkp | 2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f | [
"BSD-2-Clause"
] | 14 | 2015-03-11T11:21:58.000Z | 2020-06-16T09:15:57.000Z | import numpy
import unittest
from tkp.utility import sigmaclip
class TestSigma(unittest.TestCase):
"""Verify calculation of standard deviation"""
def setUp(self):
self.data = numpy.array([22., 24., 23., 31., 22., 21., 22.])
self.errors = numpy.array([2., 2., 2., 10., 1.5, 2.5, 1.5])
... | 49.151659 | 114 | 0.56928 |
70963951d73ce9c9881b5597b9fcd94133d98a61 | 4,138 | py | Python | app/api/v1/routes/util.py | ergo-pad/ergopad-api | 7e151adc1542c3bb0cb91bcb7252fb51e2aeba4e | [
"MIT"
] | null | null | null | app/api/v1/routes/util.py | ergo-pad/ergopad-api | 7e151adc1542c3bb0cb91bcb7252fb51e2aeba4e | [
"MIT"
] | 23 | 2022-03-09T11:31:32.000Z | 2022-03-31T08:53:27.000Z | app/api/v1/routes/util.py | ergo-pad/ergopad-api | 7e151adc1542c3bb0cb91bcb7252fb51e2aeba4e | [
"MIT"
] | 2 | 2022-02-16T03:40:05.000Z | 2022-02-16T22:40:15.000Z | import inspect
import logging
import requests
import ssl
from starlette.responses import JSONResponse
from fastapi import APIRouter, Request, Depends, status
from typing import Optional
from pydantic import BaseModel
from smtplib import SMTP
from config import Config, Network # api specific config
from core.auth impo... | 33.104 | 125 | 0.651039 |
0643f3bef7446b0105574ba8b3eab2e066d1e439 | 28,956 | py | Python | src/the_tale/the_tale/collections/tests/test_request_collections.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/collections/tests/test_request_collections.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/collections/tests/test_request_collections.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
class BaseRequestTests(utils_testcase.TestCase):
def setUp(self):
super(BaseRequestTests, self).setUp()
game_logic.create_test_map()
self.account_1 = self.accounts_factory.create_account()
self.account_2 = self.accounts_factory.create_a... | 50.622378 | 194 | 0.554117 |
d94ab8a312563a66ef7006607ba6bf6c3fa3ffa9 | 14,224 | py | Python | fastreid/modeling/backbones/resnet_mixstyle.py | wlgcqh/fast-reid | 484b0749cc4470c9b4ae9eb75f8c98ad5d5e3630 | [
"Apache-2.0"
] | null | null | null | fastreid/modeling/backbones/resnet_mixstyle.py | wlgcqh/fast-reid | 484b0749cc4470c9b4ae9eb75f8c98ad5d5e3630 | [
"Apache-2.0"
] | null | null | null | fastreid/modeling/backbones/resnet_mixstyle.py | wlgcqh/fast-reid | 484b0749cc4470c9b4ae9eb75f8c98ad5d5e3630 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""
@author: liaoxingyu
@contact: sherlockliao01@gmail.com
"""
import logging
import math
import torch
from torch import nn
from fastreid.layers import (
IBN,
SELayer,
Non_local,
get_norm,
)
from fastreid.utils.checkpoint import get_missing_parameters_message, get_unexpected_parame... | 32.474886 | 103 | 0.519966 |
17f75bc3e090537e9172c97ab894177d41ceca85 | 6,042 | py | Python | thinc/tests/layers/test_layers_api.py | BioGeek/thinc | a17cd74d5272e7bedfc781c6a978fc3e4dd306c4 | [
"MIT"
] | null | null | null | thinc/tests/layers/test_layers_api.py | BioGeek/thinc | a17cd74d5272e7bedfc781c6a978fc3e4dd306c4 | [
"MIT"
] | null | null | null | thinc/tests/layers/test_layers_api.py | BioGeek/thinc | a17cd74d5272e7bedfc781c6a978fc3e4dd306c4 | [
"MIT"
] | null | null | null | from thinc.api import registry, with_padded, Dropout, get_current_ops
from thinc.model import DATA_VALIDATION
from thinc.types import Ragged, Padded
from thinc.util import has_torch
import numpy
import pytest
class FakeDoc:
def to_array(self, attr_ids):
return attr_ids
class FakeSpan:
doc = FakeDoc(... | 37.7625 | 181 | 0.621648 |
a18ddc057bfc1f3793db5587115e7f2678216a33 | 6,629 | py | Python | Table/views.py | KarryBanana/-_ckr-zfy | 926160fc23e18b10189cd17861b81448b770c50d | [
"MIT"
] | null | null | null | Table/views.py | KarryBanana/-_ckr-zfy | 926160fc23e18b10189cd17861b81448b770c50d | [
"MIT"
] | null | null | null | Table/views.py | KarryBanana/-_ckr-zfy | 926160fc23e18b10189cd17861b81448b770c50d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import JsonResponse
from django.contrib.auth.models import User
from django.utils import timezone
from .models import CollectList, File
from django.core import serializers
from django.db.models import Q
# Create your views here.
def index(request):
return JsonR... | 31.268868 | 83 | 0.581083 |
a298bb6a2c08054d6c5d10ec86ab165de4f1b2b0 | 881 | py | Python | attrs/migrations/0001_initial.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | null | null | null | attrs/migrations/0001_initial.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | null | null | null | attrs/migrations/0001_initial.py | zostera/django-attrs | c1f1b4bb4bfb9cf836423cd5c7f121d61322a86b | [
"BSD-3-Clause"
] | 1 | 2019-12-01T22:14:45.000Z | 2019-12-01T22:14:45.000Z | # Generated by Django 2.1.3 on 2018-11-26 03:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Unit",
fields=[
(
"id",
... | 25.171429 | 83 | 0.404086 |
b53c49a0684a49d18c044416a303ef5d4fa39f84 | 3,061 | py | Python | smt/surrogate_models/tests/test_krg.py | Laurentww/smt | f124c01ffa78c04b80221dded278a20123dac742 | [
"BSD-3-Clause"
] | 354 | 2017-08-15T22:12:58.000Z | 2022-03-31T08:34:19.000Z | smt/surrogate_models/tests/test_krg.py | enjoyneer87/smt | 4a4df255b9259965439120091007f9852f41523e | [
"BSD-3-Clause"
] | 258 | 2017-08-11T15:08:40.000Z | 2022-03-30T09:54:26.000Z | smt/surrogate_models/tests/test_krg.py | enjoyneer87/smt | 4a4df255b9259965439120091007f9852f41523e | [
"BSD-3-Clause"
] | 184 | 2017-08-11T14:55:17.000Z | 2022-03-17T11:22:50.000Z | """
Author: Remi Lafage <<remi.lafage@onera.fr>>
This package is distributed under New BSD license.
"""
import unittest
import numpy as np
from smt.surrogate_models import KRG
from smt.problems import Sphere
from smt.sampling_methods import FullFactorial, LHS
class TestKRG(unittest.TestCase):
def test_predict_o... | 29.718447 | 81 | 0.600131 |
7503f1642e0120a6ac8464f9aea12d4a7c7048de | 28,100 | py | Python | kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/packaging/language/maven_artifact.py | jkroepke/homelab | ffdd849e39b52972870f5552e734fd74cb1254a1 | [
"Apache-2.0"
] | 5 | 2020-12-16T21:42:09.000Z | 2022-03-28T16:04:32.000Z | kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/packaging/language/maven_artifact.py | jkroepke/kubernetes-the-hard-way | 70fd096a04addec0777744c9731a4e3fbdc40c8f | [
"Apache-2.0"
] | null | null | null | kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/packaging/language/maven_artifact.py | jkroepke/kubernetes-the-hard-way | 70fd096a04addec0777744c9731a4e3fbdc40c8f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com>
#
# Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact
# as a reference and starting point.
#
# GNU General Public License v3.0+ (see COPYING or https://www... | 41.815476 | 159 | 0.636833 |
b931fafd866855edc080fa6cc7c5cb717e04484f | 1,835 | py | Python | hyperglyph/__init__.py | hyperglyph/hyperglyph-python | afa205b3837e5f97e7e164fa0173f24b6ea94679 | [
"MIT"
] | 3 | 2015-08-12T13:46:35.000Z | 2017-03-20T20:47:15.000Z | py/hyperglyph/__init__.py | tef/glyph-rpc | cd8f605fef8c7d03255d825a9dbfbcde0e587e06 | [
"MIT"
] | null | null | null | py/hyperglyph/__init__.py | tef/glyph-rpc | cd8f605fef8c7d03255d825a9dbfbcde0e587e06 | [
"MIT"
] | null | null | null | """ hyperglyph - duck typed ipc """
"""
Copyright (c) 2012 Thomas Figg (tef)
Copyright (c) 2011-2012 Hanzo Archives Ltd
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, includi... | 41.704545 | 97 | 0.767302 |
0e1ee08702081ec958edaf86657f1a102d166493 | 1,954 | py | Python | examples/boltzmann_wealth_model_network/wealth_model/server.py | demophoon/mesa | 86d64c512b973e14c6eabe73b8e1e02f71dc223e | [
"Apache-2.0"
] | null | null | null | examples/boltzmann_wealth_model_network/wealth_model/server.py | demophoon/mesa | 86d64c512b973e14c6eabe73b8e1e02f71dc223e | [
"Apache-2.0"
] | null | null | null | examples/boltzmann_wealth_model_network/wealth_model/server.py | demophoon/mesa | 86d64c512b973e14c6eabe73b8e1e02f71dc223e | [
"Apache-2.0"
] | null | null | null | from mesa.visualization.ModularVisualization import ModularServer
from mesa.visualization.UserParam import UserSettableParameter
from mesa.visualization.modules import ChartModule
from mesa.visualization.modules import NetworkModule
from .model import MoneyModel
def network_portrayal(G):
# The model ensures there... | 42.478261 | 108 | 0.539918 |
a04ba5d7352b1ddf104f47d66e406b05e039212e | 54,550 | py | Python | mrcnn/chm_layer_2.py | kbardool/mrcnn3 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | 2 | 2019-07-22T11:23:09.000Z | 2019-07-22T11:23:10.000Z | mrcnn/chm_layer_2.py | kbardool/Contextual-Inference-V2 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | null | null | null | mrcnn/chm_layer_2.py | kbardool/Contextual-Inference-V2 | f4cbb1e34de97ab08558b56fb7362647436edbd7 | [
"MIT"
] | 1 | 2019-02-01T06:52:18.000Z | 2019-02-01T06:52:18.000Z | """
Mask R-CNN
Contextual Heatmap Layer for Training Mode - Version 1
Copyright (c) 2018 K.Bardool
Licensed under the MIT License (see LICENSE for details)
Written by Kevin Bardool
"""
import os, sys, glob, random, math, datetime, itertools, logging, pprint, copy
import numpy as np
# from scipy.stats import multiv... | 53.219512 | 161 | 0.543996 |
94e96341a0ba8a7c97d2a12358529b9d8a3b3eaf | 2,007 | py | Python | 1.3.BayesianInference/exercises/srcs/5/mixture_model_2.py | mihaighidoveanu/machine-learning-examples | e5a7ab71e52ae2809115eb7d7c943b46ebf394f3 | [
"MIT"
] | null | null | null | 1.3.BayesianInference/exercises/srcs/5/mixture_model_2.py | mihaighidoveanu/machine-learning-examples | e5a7ab71e52ae2809115eb7d7c943b46ebf394f3 | [
"MIT"
] | null | null | null | 1.3.BayesianInference/exercises/srcs/5/mixture_model_2.py | mihaighidoveanu/machine-learning-examples | e5a7ab71e52ae2809115eb7d7c943b46ebf394f3 | [
"MIT"
] | 1 | 2021-05-02T13:12:21.000Z | 2021-05-02T13:12:21.000Z | import numpy as np
import pymc as pm
from matplotlib import pyplot as plt
data = np.loadtxt("mixture_data.csv", delimiter=",")
p = pm.Uniform("p", 0, 1)
assignment = pm.Categorical("assignment", [p, 1 - p], size=data.shape[0])
stds = pm.Uniform("stds", 0, 100, size=2)
taus = 1.0 / stds ** 2
centers = pm... | 29.514706 | 76 | 0.666667 |
32d9a90004d30dd97aae20b845b03c6c332853fb | 8,192 | py | Python | models/WTM.py | AyaRamazanova/Neural_Topic_Models | a3161b6d6be19ec706a084cd1b6cb0ecbed10c34 | [
"Apache-2.0"
] | null | null | null | models/WTM.py | AyaRamazanova/Neural_Topic_Models | a3161b6d6be19ec706a084cd1b6cb0ecbed10c34 | [
"Apache-2.0"
] | null | null | null | models/WTM.py | AyaRamazanova/Neural_Topic_Models | a3161b6d6be19ec706a084cd1b6cb0ecbed10c34 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : WTM.py
@Time : 2020/10/06 17:13:43
@Author : Leilan Zhang
@Version : 1.0
@Contact : zhangleilan@gmail.com
@Desc : None
'''
import os
import re
import time
import pickle
import torch
import torch.nn as nn
import torch.nn.functional as F
... | 41.795918 | 183 | 0.597534 |
a5e05308e204e59b022f4ede330cbb19c3b4b516 | 1,235 | py | Python | CellProfiler/cellprofiler/gui/workspace_view/_workspace_view_mask_row.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | CellProfiler/cellprofiler/gui/workspace_view/_workspace_view_mask_row.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | CellProfiler/cellprofiler/gui/workspace_view/_workspace_view_mask_row.py | aidotse/Team-rahma.ai | 66857731e1ca2472e0783e37ba472b55a7ac9cd4 | [
"MIT"
] | null | null | null | from ._workspace_view_row import WorkspaceViewRow
from ..artist import MODE_HIDE
from ..artist import MODE_LINES
from ..artist import MaskData
from ..utilities.workspace_view import bind_data_class
class WorkspaceViewMaskRow(WorkspaceViewRow):
"""A row of controls for controlling masks"""
def __init__(self, ... | 38.59375 | 88 | 0.711741 |
4331226bd86651f79c15ffd870319c51478021cc | 810 | py | Python | lexicon/tests/providers/test_exoscale.py | tlusser-inv/lexicon | 700d9912fb4628414dae1f7b9783837eb8d796e0 | [
"MIT"
] | 1 | 2020-06-16T12:48:21.000Z | 2020-06-16T12:48:21.000Z | lexicon/tests/providers/test_exoscale.py | tlusser-inv/lexicon | 700d9912fb4628414dae1f7b9783837eb8d796e0 | [
"MIT"
] | null | null | null | lexicon/tests/providers/test_exoscale.py | tlusser-inv/lexicon | 700d9912fb4628414dae1f7b9783837eb8d796e0 | [
"MIT"
] | 1 | 2019-11-04T17:12:53.000Z | 2019-11-04T17:12:53.000Z | """
To set enable live testing against the Exoscale API.
* create an account
* subscribe to DNS (with 1 domain)
* create a domain called "lexicontest.com"
Set the following environment variables.
export LEXICON_EXOSCALE_KEY=EXO...
export LEXICON_EXOSCALE_SECRET=xxx
"""
from unittest import TestCase
from le... | 27.931034 | 71 | 0.761728 |
07118e6748679c91514d4674c10488628137fcb6 | 9,996 | py | Python | contrib/spendfrom/spendfrom.py | anandsinha095/coin | 9a1aa71a71e4a17e82f114d30472cf2450f1070c | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | anandsinha095/coin | 9a1aa71a71e4a17e82f114d30472cf2450f1070c | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | anandsinha095/coin | 9a1aa71a71e4a17e82f114d30472cf2450f1070c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Use the raw transactions API to spend JDCs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a jdcoind or jdcoin-Q... | 37.298507 | 111 | 0.631152 |
64ea894594eeb16b3fd299e80db737b317283b09 | 29,743 | py | Python | build-support/bin/generate_travis_yml.py | gatesn/pants | 94b4faef7675dd0a77cdad0878df0639986866ff | [
"Apache-2.0"
] | null | null | null | build-support/bin/generate_travis_yml.py | gatesn/pants | 94b4faef7675dd0a77cdad0878df0639986866ff | [
"Apache-2.0"
] | null | null | null | build-support/bin/generate_travis_yml.py | gatesn/pants | 94b4faef7675dd0a77cdad0878df0639986866ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from enum import Enum
from textwrap import dedent
from typing import Any, Dict, Iterable, List, Optional
import yaml
HEADER = dedent(
"""\
# GENERATED, DO NOT EDIT!
# To chan... | 36.139733 | 109 | 0.557913 |
7fffde0d7562974460c389d46c0cd661b638bc11 | 3,867 | bzl | Python | tools/java_single_jar.bzl | erka/tink | 78b908124efbb34acc4de3ae11b41112cb41adb2 | [
"Apache-2.0"
] | 1 | 2019-11-05T10:58:12.000Z | 2019-11-05T10:58:12.000Z | tools/java_single_jar.bzl | erka/tink | 78b908124efbb34acc4de3ae11b41112cb41adb2 | [
"Apache-2.0"
] | 1 | 2019-09-27T04:25:22.000Z | 2019-09-27T04:25:22.000Z | tools/java_single_jar.bzl | erka/tink | 78b908124efbb34acc4de3ae11b41112cb41adb2 | [
"Apache-2.0"
] | 1 | 2021-06-07T13:28:14.000Z | 2021-06-07T13:28:14.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 35.477064 | 91 | 0.624774 |
c6fb05181e6890d52eb4fee527b723ba62cd9e23 | 1,968 | py | Python | slim/datasets/dataset_factory.py | ryanchyshyn/smartscale | c240789b32d96235ae57ed0cdb6e304f1b467dd7 | [
"Apache-2.0"
] | null | null | null | slim/datasets/dataset_factory.py | ryanchyshyn/smartscale | c240789b32d96235ae57ed0cdb6e304f1b467dd7 | [
"Apache-2.0"
] | null | null | null | slim/datasets/dataset_factory.py | ryanchyshyn/smartscale | c240789b32d96235ae57ed0cdb6e304f1b467dd7 | [
"Apache-2.0"
] | null | null | null | # 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... | 32.8 | 80 | 0.70935 |
5c98958f3a5219ddc5f817dadd6614a45f53b345 | 1,763 | py | Python | functions/extract_image_log_data.py | aruss175/experimentsinimagelogs | 73dfedb8bbdd708a5677a8178cd324004f468aff | [
"MIT"
] | 9 | 2019-09-19T07:59:14.000Z | 2021-02-23T23:21:48.000Z | functions/extract_image_log_data.py | aruss175/experimentsinimagelogs | 73dfedb8bbdd708a5677a8178cd324004f468aff | [
"MIT"
] | null | null | null | functions/extract_image_log_data.py | aruss175/experimentsinimagelogs | 73dfedb8bbdd708a5677a8178cd324004f468aff | [
"MIT"
] | 3 | 2019-10-17T01:56:22.000Z | 2020-10-12T22:01:07.000Z |
# python 3.6.8
# DLISIO v0.1.12
# Function purpose: This will take the list of filepaths and find the specific curves of interest. THey will be written to a
# list of dataframes and exported to csv by well.
import dlisio
def getimagedata(filepath_list, exportfolderpath = "...\\FORCE Data\\"):
curves_L = []
... | 37.510638 | 126 | 0.500284 |
b80031fad6c27c27c6ceb0b571ae9af9ac4e945f | 204 | py | Python | azamuku/tests/utils/test_cases.py | astoliarov/azamuku | 21a315e3ecc78075f23eb266fc1659e524bae6e1 | [
"MIT"
] | 2 | 2018-12-18T22:54:44.000Z | 2019-06-06T13:20:11.000Z | azamuku/tests/utils/test_cases.py | astoliarov/azamuku | 21a315e3ecc78075f23eb266fc1659e524bae6e1 | [
"MIT"
] | null | null | null | azamuku/tests/utils/test_cases.py | astoliarov/azamuku | 21a315e3ecc78075f23eb266fc1659e524bae6e1 | [
"MIT"
] | null | null | null | # coding: utf-8
from unittest import TestCase
from .utils import attr
@attr("unit")
class BaseUnitTestCase(TestCase):
pass
@attr("integration")
class BaseIntegrationTestCase(TestCase):
pass
| 12.75 | 40 | 0.740196 |
cd07a3361df01262e71cabc25edec2a89a80c64d | 7,081 | py | Python | test/spin_test.py | asb5468/gwpopulation | 5cd44c20120892a8f6a98b7ff8909b9c18a2f4a9 | [
"MIT"
] | 15 | 2019-02-06T04:18:47.000Z | 2022-03-23T15:42:46.000Z | test/spin_test.py | asb5468/gwpopulation | 5cd44c20120892a8f6a98b7ff8909b9c18a2f4a9 | [
"MIT"
] | 39 | 2019-03-02T22:31:08.000Z | 2022-03-06T16:57:56.000Z | test/spin_test.py | asb5468/gwpopulation | 5cd44c20120892a8f6a98b7ff8909b9c18a2f4a9 | [
"MIT"
] | 24 | 2019-02-06T04:18:52.000Z | 2022-03-18T16:50:16.000Z | import unittest
from bilby.core.prior import PriorDict, Uniform
from gwpopulation.cupy_utils import trapz, xp
from gwpopulation.utils import truncnorm
from gwpopulation.models import spin
class TestSpinOrientation(unittest.TestCase):
def setUp(self):
self.costilts = xp.linspace(-1, 1, 1000)
self... | 35.582915 | 88 | 0.555006 |
709be51492a6613cefc653cf31384ec8d239cb67 | 2,350 | py | Python | python/hetu/onnx/handler.py | initzhang/Hetu | 447111a358e4dc6df5db9c216bdb3590fff05f84 | [
"Apache-2.0"
] | 82 | 2021-07-20T02:45:54.000Z | 2022-03-14T07:08:45.000Z | python/hetu/onnx/handler.py | initzhang/Hetu | 447111a358e4dc6df5db9c216bdb3590fff05f84 | [
"Apache-2.0"
] | 4 | 2021-11-25T13:39:21.000Z | 2022-03-13T04:14:14.000Z | python/hetu/onnx/handler.py | initzhang/Hetu | 447111a358e4dc6df5db9c216bdb3590fff05f84 | [
"Apache-2.0"
] | 13 | 2021-07-18T14:40:56.000Z | 2022-03-09T06:37:42.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import collections
import inspect
from hetu.onnx import constants
class hetu_op:
_OPSETS = collections.OrderedDict()
_MAPPING = None
def __init__(self, n... | 31.756757 | 92 | 0.603404 |
8a274c676a4974b8e45dca2f1b9fcc5d735fff02 | 87 | py | Python | system/rt1021_fire_evk/PWM.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 18 | 2021-09-15T08:22:36.000Z | 2022-03-24T08:54:13.000Z | system/rt1021_fire_evk/PWM.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 3 | 2022-01-27T06:41:43.000Z | 2022-03-23T09:37:01.000Z | system/rt1021_fire_evk/PWM.py | FredBill1/OpenART | 1e8ed02dbe5e109aafb65d39e7ee18f8875300c9 | [
"Apache-2.0"
] | 5 | 2022-01-05T10:23:45.000Z | 2022-02-24T02:09:53.000Z | from machine import PWM
pwm=PWM(2,3,1000,100)
pwm.freq(2000)
pwm.duty(50)
pwm.deinit()
| 14.5 | 23 | 0.735632 |
b4e34c82016d6ac5e888cfc88c836bed0bf0c301 | 4,710 | py | Python | tarpn/transport/mesh/fragment.py | tarpn/tarpn-node-controller | f5841e9181f24935c507993500d22e9b313c0f23 | [
"MIT"
] | 4 | 2020-07-26T20:33:09.000Z | 2022-02-14T00:17:27.000Z | tarpn/transport/mesh/fragment.py | tarpn/tarpn-node-controller | f5841e9181f24935c507993500d22e9b313c0f23 | [
"MIT"
] | 9 | 2020-08-01T21:29:55.000Z | 2022-01-03T00:45:17.000Z | tarpn/transport/mesh/fragment.py | tarpn/tarpn-node-controller | f5841e9181f24935c507993500d22e9b313c0f23 | [
"MIT"
] | 3 | 2020-08-26T18:37:55.000Z | 2022-02-14T00:18:01.000Z | import operator
import secrets
import struct
import threading
from collections import defaultdict
from io import BytesIO
from typing import Dict, List
from tarpn.log import LoggingMixin
from tarpn.network import L3Protocol, QoS
from tarpn.network.mesh import MeshAddress
from tarpn.network.mesh.header import Fragment, ... | 43.211009 | 121 | 0.650955 |
5c94980574600827fe67ca7973fe5d062960f3d6 | 1,452 | py | Python | aliyun-python-sdk-ivision/aliyunsdkivision/request/v20190308/DeleteProjectRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ivision/aliyunsdkivision/request/v20190308/DeleteProjectRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ivision/aliyunsdkivision/request/v20190308/DeleteProjectRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"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... | 34.571429 | 80 | 0.758953 |
dfba5b4058cdf5e1ab0a0df97333b232a9cce2fa | 15,030 | py | Python | contrib/gitian-build-loader.py | qtumproject/qtum-ledger-loader | 30371a9b82622f35e6cffe00bb47f8d292aa0ecd | [
"MIT"
] | null | null | null | contrib/gitian-build-loader.py | qtumproject/qtum-ledger-loader | 30371a9b82622f35e6cffe00bb47f8d292aa0ecd | [
"MIT"
] | null | null | null | contrib/gitian-build-loader.py | qtumproject/qtum-ledger-loader | 30371a9b82622f35e6cffe00bb47f8d292aa0ecd | [
"MIT"
] | 1 | 2022-01-25T01:49:59.000Z | 2022-01-25T01:49:59.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import argparse
import os
import subprocess
import sys
def setup():
global args, workdir
program... | 57.148289 | 242 | 0.654757 |
79832b3b4d544ce5482f7704b164197becc618e8 | 662 | py | Python | ex053.py | LucasLCarreira/Python | 03bd64837d74315687e567261a149f0176496348 | [
"MIT"
] | 1 | 2020-04-21T19:14:50.000Z | 2020-04-21T19:14:50.000Z | ex053.py | LucasLCarreira/Python | 03bd64837d74315687e567261a149f0176496348 | [
"MIT"
] | null | null | null | ex053.py | LucasLCarreira/Python | 03bd64837d74315687e567261a149f0176496348 | [
"MIT"
] | null | null | null | # Exercício Python 053
# Leia uma frase qualquer e diga se ela é um palíndromo, desconsiderando os espaços
frase = str(input('Digite uma frase: ')).strip().upper()
c = -1
dividido = frase.split()
unido = ''.join(dividido)
comprimento = (len(unido))
for a in range(comprimento):
print(unido[comprimento + c],end='')
... | 28.782609 | 83 | 0.669184 |
6ac16b4f6760b8d14a7740d0d52c0d679e5d173c | 328 | py | Python | src/api/middleware.py | focipy/shorty | 19cd21d7bf7ed64a7eb5d81a42e8fbf7db23b611 | [
"MIT"
] | null | null | null | src/api/middleware.py | focipy/shorty | 19cd21d7bf7ed64a7eb5d81a42e8fbf7db23b611 | [
"MIT"
] | null | null | null | src/api/middleware.py | focipy/shorty | 19cd21d7bf7ed64a7eb5d81a42e8fbf7db23b611 | [
"MIT"
] | null | null | null | import os
from functools import wraps
from flask import g
from redis import Redis
def init_redis(f):
@wraps(f)
def initiate(*args, **kwargs):
if 'redis' not in g:
g.redis = Redis(host=os.environ.get('REDIS_HOST', 'localhost'), port=6379, db=0)
return f(*args, **kwargs)
return i... | 23.428571 | 92 | 0.640244 |
2e69d72813a61483f0b09c44dc6cbe3fc815d794 | 49,530 | py | Python | fbgemm_gpu/test/split_table_batched_embeddings_test.py | r-barnes/FBGEMM | d4f2dccf148bc3423181e0af79a0f3d97102ce2c | [
"BSD-3-Clause"
] | null | null | null | fbgemm_gpu/test/split_table_batched_embeddings_test.py | r-barnes/FBGEMM | d4f2dccf148bc3423181e0af79a0f3d97102ce2c | [
"BSD-3-Clause"
] | null | null | null | fbgemm_gpu/test/split_table_batched_embeddings_test.py | r-barnes/FBGEMM | d4f2dccf148bc3423181e0af79a0f3d97102ce2c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import copy
import unittest
from typing import Any, Callable, List, Optional, Tuple
import... | 37.045625 | 96 | 0.541995 |
6970e8bc76200e6110cf30facb20b8d08186f63a | 530 | py | Python | src/openprocurement/tender/cfaua/procedure/views/chronograph.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 10 | 2020-02-18T01:56:21.000Z | 2022-03-28T00:32:57.000Z | src/openprocurement/tender/cfaua/procedure/views/chronograph.py | quintagroup/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 26 | 2018-07-16T09:30:44.000Z | 2021-02-02T17:51:30.000Z | src/openprocurement/tender/cfaua/procedure/views/chronograph.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 15 | 2019-08-08T10:50:47.000Z | 2022-02-05T14:13:36.000Z | from openprocurement.tender.core.procedure.views.chronograph import TenderChronographResource
from openprocurement.tender.cfaua.procedure.state.tender import CFAUATenderTenderState
from cornice.resource import resource
@resource(
name="closeFrameworkAgreementUA:Tender Chronograph",
path="/tenders/{tender_id}/... | 35.333333 | 93 | 0.833962 |
6eb96932fbf1d41dcfe68f4eb6196575494d68f4 | 8,941 | py | Python | ui1126.py | AisakaJerry/sign-language-evaluator | f32b3f4aaa46c411f4d1e4499d2ea288dda470a5 | [
"MIT"
] | null | null | null | ui1126.py | AisakaJerry/sign-language-evaluator | f32b3f4aaa46c411f4d1e4499d2ea288dda470a5 | [
"MIT"
] | null | null | null | ui1126.py | AisakaJerry/sign-language-evaluator | f32b3f4aaa46c411f4d1e4499d2ea288dda470a5 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter.filedialog import askdirectory, askopenfilename
import cv2
#import evaluate
from PIL import ImageTk,Image
import os
import urllib
import Main_demo
window = Tk()
window.title('Sign Language Helper')
window.geometry('1224x800')
window.configure(background='whitesmoke')
firstTime = True
... | 36.493878 | 136 | 0.690974 |
49634b208dce862bc44150b95c0e5ab233f6e9b2 | 403 | py | Python | fakedata/genfake.py | lanpa/mrbrain | 04f046c38c83648aa6f0f3ea8d5a4fd9ab082a36 | [
"BSD-2-Clause"
] | 3 | 2017-04-20T07:48:07.000Z | 2021-06-17T08:04:17.000Z | fakedata/genfake.py | lanpa/mrbrain | 04f046c38c83648aa6f0f3ea8d5a4fd9ab082a36 | [
"BSD-2-Clause"
] | null | null | null | fakedata/genfake.py | lanpa/mrbrain | 04f046c38c83648aa6f0f3ea8d5a4fd9ab082a36 | [
"BSD-2-Clause"
] | 2 | 2017-11-26T18:21:33.000Z | 2019-11-10T08:33:47.000Z | from PIL import Image
import os
im = Image.new("L",(157, 189))
aoba = 'normalized/widac_aoba_{:05}_t1/'
trgy = 'normalized/widac_trgy_{:05}_t1/'
for i in range(10):
os.makedirs(aoba.format(i))
os.makedirs(trgy.format(i))
for j in range(1, 157):
im.save(os.path.join(aoba.format(i), 'image_{}.jpg'.f... | 28.785714 | 71 | 0.64268 |
3bf9a7964415a6c0182d7a9fbeaed1f491c8bab3 | 6,276 | py | Python | convlab2/e2e/rnn_rollout/avg_rank.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 339 | 2020-03-04T09:43:22.000Z | 2022-03-26T17:27:38.000Z | convlab2/e2e/rnn_rollout/avg_rank.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 122 | 2020-04-12T04:19:06.000Z | 2022-03-23T14:20:57.000Z | convlab2/e2e/rnn_rollout/avg_rank.py | Malavikka/ConvLab-2 | f2a0d251e4fab9e36e9d9f04df6308623d2d780c | [
"Apache-2.0"
] | 138 | 2020-02-18T16:48:04.000Z | 2022-03-26T17:27:43.000Z | # Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""
Script to compute average rank for both supervised models
and models with planning.
"""
import argparse
import sys
import time
im... | 33.031579 | 120 | 0.619822 |
54aa2dc0c8bb7a2856158c36b3eba36f120a0ad9 | 15,600 | py | Python | profiles/tests/test_profiles_graphql_gdpr_api.py | Sukriva/open-city-profile | 8c8df883457b9c79534dc9f7b57d556143362229 | [
"MIT"
] | null | null | null | profiles/tests/test_profiles_graphql_gdpr_api.py | Sukriva/open-city-profile | 8c8df883457b9c79534dc9f7b57d556143362229 | [
"MIT"
] | null | null | null | profiles/tests/test_profiles_graphql_gdpr_api.py | Sukriva/open-city-profile | 8c8df883457b9c79534dc9f7b57d556143362229 | [
"MIT"
] | null | null | null | import copy
import json
import pytest
import requests
from open_city_profile.consts import (
CONNECTED_SERVICE_DELETION_FAILED_ERROR,
CONNECTED_SERVICE_DELETION_NOT_ALLOWED_ERROR,
MISSING_GDPR_API_TOKEN_ERROR,
PROFILE_DOES_NOT_EXIST_ERROR,
)
from open_city_profile.oidc import TunnistamoTokenExchange
f... | 37.772397 | 109 | 0.681026 |
3f7660cb04a133682e5f921fe01def1248a5a892 | 358 | py | Python | security.py | mindsy/mindsy-microservice-register | 44c122f30e0edd41f0c64655ba9bab27e228d8d8 | [
"MIT"
] | null | null | null | security.py | mindsy/mindsy-microservice-register | 44c122f30e0edd41f0c64655ba9bab27e228d8d8 | [
"MIT"
] | 2 | 2019-04-22T15:05:48.000Z | 2019-04-27T18:43:44.000Z | security.py | mindsy/mindsy-microservice-psychologist | 44c122f30e0edd41f0c64655ba9bab27e228d8d8 | [
"MIT"
] | null | null | null | from passlib.context import CryptContext
pwd_context = CryptContext(
schemes=["pbkdf2_sha256"],
default="pbkdf2_sha256",
pbkdf2_sha256__default_rounds=30000
)
def encrypt_password(password):
return pwd_context.encrypt(password)
def check_encrypted_password(password, hashed):
return ... | 21.058824 | 47 | 0.75419 |
e45831cefcffe1c4220f087cc74c5098a97e4c15 | 35,955 | py | Python | mlflow/utils/autologging_utils/safety.py | vikozlov89/mlflow | 40b7367dd4e3bb4424b5a53cccaa1a70218cccc9 | [
"Apache-2.0"
] | 2 | 2021-07-30T17:02:51.000Z | 2021-08-10T20:16:26.000Z | mlflow/utils/autologging_utils/safety.py | vikozlov89/mlflow | 40b7367dd4e3bb4424b5a53cccaa1a70218cccc9 | [
"Apache-2.0"
] | 4 | 2021-07-12T19:13:15.000Z | 2021-07-12T20:09:22.000Z | mlflow/utils/autologging_utils/safety.py | aruanalucena/mlflow | 9bd64dc0ec6a905c5d7a3d6b9855626ff9d2e0aa | [
"Apache-2.0"
] | 1 | 2022-02-16T10:53:54.000Z | 2022-02-16T10:53:54.000Z | import abc
import inspect
import itertools
import functools
import os
import uuid
import warnings
from abc import abstractmethod
from contextlib import contextmanager
import mlflow
import mlflow.utils.autologging_utils
from mlflow.entities.run_status import RunStatus
from mlflow.tracking.client import MlflowClient
fro... | 45.45512 | 99 | 0.633097 |
f919bf4651dbcc1e7325fd53281970da6e68783d | 15,629 | py | Python | manila_ui/dashboards/project/shares/views.py | openstack/manila-ui | 99c0be8e7f4f2a6fd5722abc9d556f1fbdbf1347 | [
"Apache-2.0"
] | 29 | 2015-05-02T16:19:12.000Z | 2022-03-29T06:51:16.000Z | manila_ui/dashboards/project/shares/views.py | openstack/manila-ui | 99c0be8e7f4f2a6fd5722abc9d556f1fbdbf1347 | [
"Apache-2.0"
] | null | null | null | manila_ui/dashboards/project/shares/views.py | openstack/manila-ui | 99c0be8e7f4f2a6fd5722abc9d556f1fbdbf1347 | [
"Apache-2.0"
] | 17 | 2015-09-18T16:00:32.000Z | 2021-10-16T03:17:37.000Z | # Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 37.842615 | 79 | 0.635293 |
f7e8880a323de6dd92565d75d9852c7c0bfe3594 | 14,936 | py | Python | airflow/providers/google/cloud/utils/credentials_provider.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"Apache-2.0"
] | 1 | 2021-03-03T14:13:28.000Z | 2021-03-03T14:13:28.000Z | airflow/providers/google/cloud/utils/credentials_provider.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"Apache-2.0"
] | null | null | null | airflow/providers/google/cloud/utils/credentials_provider.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"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... | 40.697548 | 103 | 0.703736 |
422f3bdb8ccb9848e22528ad87f7032a7a0d95e1 | 880 | py | Python | core/inputs/old/create_json.py | benranderson/fmeca | aedbde0ec20417cace3df01e09f193dd525ba0e2 | [
"MIT"
] | null | null | null | core/inputs/old/create_json.py | benranderson/fmeca | aedbde0ec20417cace3df01e09f193dd525ba0e2 | [
"MIT"
] | 11 | 2017-11-09T22:23:50.000Z | 2017-11-30T16:40:22.000Z | core/inputs/old/create_json.py | benranderson/fmeca | aedbde0ec20417cace3df01e09f193dd525ba0e2 | [
"MIT"
] | 3 | 2017-11-10T09:52:07.000Z | 2022-01-28T11:00:17.000Z | import json
SUBCOMPONENTS = json.load(open('core/inputs/subcomponents.json'))
FAILURE_MODES = json.load(open('core/inputs/failure_modes.json'))
fms = {}
SUBCOMPONENTS_UPDATED = SUBCOMPONENTS
for sc in SUBCOMPONENTS:
for fm in SUBCOMPONENTS[sc]['Failure Modes']:
# print(FAILURE_MODES[sc][fm]['Random/Time... | 31.428571 | 92 | 0.640909 |
36cec4415c0a4cbbe8371e8e71e08252bfc12911 | 5,797 | py | Python | examples/python/opencv.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | examples/python/opencv.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | examples/python/opencv.py | xiaotiansf/tiscamera | 8451449788f7429621240e2bbce065d65c5ac10e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# Copyright 2017 The Imaging Source Europe GmbH
#
# 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... | 34.1 | 139 | 0.700535 |
db75bb9beed77996a533e39e811fd95406166fa9 | 14 | py | Python | Grayscale Image Denoising/denoise.py | Yemen-Romanian/pattern-recognition | cb0ab31e590b071c57c2e89ec85f2383375860e3 | [
"MIT"
] | null | null | null | Grayscale Image Denoising/denoise.py | Yemen-Romanian/pattern-recognition | cb0ab31e590b071c57c2e89ec85f2383375860e3 | [
"MIT"
] | null | null | null | Grayscale Image Denoising/denoise.py | Yemen-Romanian/pattern-recognition | cb0ab31e590b071c57c2e89ec85f2383375860e3 | [
"MIT"
] | null | null | null | import maxflow | 14 | 14 | 0.928571 |
0ea169c04de2e3b0d64fecfe66b4ed335722fe4f | 1,045 | py | Python | query_flight/urls.py | eskemojoe007/sw_web_app | 92e9b6cd3fedcbbeefc9275cdc49db2fdefaa09e | [
"MIT"
] | null | null | null | query_flight/urls.py | eskemojoe007/sw_web_app | 92e9b6cd3fedcbbeefc9275cdc49db2fdefaa09e | [
"MIT"
] | 17 | 2018-06-04T16:02:51.000Z | 2021-06-10T20:26:45.000Z | query_flight/urls.py | eskemojoe007/sw_web_app | 92e9b6cd3fedcbbeefc9275cdc49db2fdefaa09e | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from . import apiviews
from rest_framework.routers import DefaultRouter
app_name = 'query_flight'
# Set up routers
router = DefaultRouter()
router.register('airports', apiviews.AirportViewSet, base_name='airports')
router.register('flights', apiviews.FlightViewSet, bas... | 37.321429 | 93 | 0.710048 |
e20a33335db2406bb04db2777e97eb6c48688a38 | 4,273 | py | Python | tests/e2e/aetest.py | flickerfly/anchore-cli | bdfd0252db8d159191a39b9f7dd360fc8de3d20a | [
"Apache-2.0"
] | null | null | null | tests/e2e/aetest.py | flickerfly/anchore-cli | bdfd0252db8d159191a39b9f7dd360fc8de3d20a | [
"Apache-2.0"
] | 1 | 2021-01-13T22:22:41.000Z | 2021-01-13T22:23:26.000Z | tests/e2e/aetest.py | flickerfly/anchore-cli | bdfd0252db8d159191a39b9f7dd360fc8de3d20a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import subprocess
import json
import time
import sys
analysis_maxtime = 900
common_maxtime = 60
try:
image = str(sys.argv[1])
except:
image = "docker.io/alpine:latest"
try:
precmd = str(sys.argv[2]) + " --json "
except:
precmd = "anchore-cli --json --u admin --p foobar --url http:/... | 26.874214 | 86 | 0.587409 |
dfe97e4dc2eda05e4b69b82d1226303842f4d778 | 2,348 | py | Python | stack/stack/coherentReference.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 4 | 2019-11-19T03:35:35.000Z | 2020-12-07T18:43:11.000Z | stack/stack/coherentReference.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 3 | 2019-06-05T03:35:55.000Z | 2020-04-09T14:16:08.000Z | stack/stack/coherentReference.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 6 | 2019-08-23T22:53:11.000Z | 2021-11-06T15:15:30.000Z | #!/usr/bin/env python
import os
import numpy as np
import sys
import argparse
import stackSetup as SS
import lxml.objectify as OB
def parse():
parser = argparse.ArgumentParser(description='Determine a good reference region for time-series estimation')
parser.add_argument('-d', action='store', default='.',... | 28.634146 | 112 | 0.620954 |
68d59a68fcf00b0d4ad085d11ce3d351462f6096 | 14,918 | py | Python | train_protest.py | undeadyequ/PaddleOCR | 7e31d064ba3054f87fa27cff84784f706248c61e | [
"Apache-2.0"
] | null | null | null | train_protest.py | undeadyequ/PaddleOCR | 7e31d064ba3054f87fa27cff84784f706248c61e | [
"Apache-2.0"
] | null | null | null | train_protest.py | undeadyequ/PaddleOCR | 7e31d064ba3054f87fa27cff84784f706248c61e | [
"Apache-2.0"
] | null | null | null | """
created by: Donghyeon Won
Modified codes from
http://pytorch.org/tutorials/beginner/data_loading_tutorial.html
https://github.com/pytorch/examples/tree/master/imagenet
"""
from __future__ import print_function
import os
import argparse
import numpy as np
import pandas as pd
import time
import shutil
#from ... | 37.01737 | 110 | 0.589355 |
b38ef6400488467d02c9b67da228b854fa601e7d | 132 | py | Python | executors/python-peewee/example/transaction.py | omaraboumrad/djanground | f153aabf68f8d500317d357ceaa558da61380b2a | [
"MIT"
] | 1 | 2017-11-25T20:22:14.000Z | 2017-11-25T20:22:14.000Z | executors/python-peewee/example/transaction.py | omaraboumrad/dryorm | f153aabf68f8d500317d357ceaa558da61380b2a | [
"MIT"
] | 8 | 2017-11-26T21:57:16.000Z | 2017-12-26T08:53:17.000Z | executors/python-peewee/example/transaction.py | omaraboumrad/djanground | f153aabf68f8d500317d357ceaa558da61380b2a | [
"MIT"
] | null | null | null | from models import *
def execute():
Artist.create(name="Newsboys")
artist = Artist.select().get()
print(artist.name)
| 14.666667 | 34 | 0.651515 |
cd0204a198fbef4d0708a6c42d3f5c1a263fefdd | 2,576 | py | Python | izone/urls.py | ldh127/blog | b5ac0bbd3c60ec9609d1c5ccfbfca1129a89a537 | [
"MIT"
] | null | null | null | izone/urls.py | ldh127/blog | b5ac0bbd3c60ec9609d1c5ccfbfca1129a89a537 | [
"MIT"
] | 10 | 2020-02-24T20:17:11.000Z | 2022-03-12T00:14:39.000Z | izone/urls.py | ldh127/blog | b5ac0bbd3c60ec9609d1c5ccfbfca1129a89a537 | [
"MIT"
] | null | null | null | """izone 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-base... | 42.229508 | 113 | 0.725155 |
74ad690c9e1d2eced532aa38365abcf4944eefe2 | 2,103 | py | Python | venv/lib/python3.5/site-packages/scspell/_portable.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/scspell/_portable.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/scspell/_portable.py | prashant0598/CoffeeApp | 4fa006aebf06e12ed34766450ddcfa548ee63307 | [
"MIT"
] | null | null | null | #
# scspell
# Copyright (C) 2009 Paul Pelzl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WA... | 26.620253 | 75 | 0.686163 |
7cf3c312c0626190be1a2b2afc17e8f7681f8242 | 2,905 | py | Python | boto3_type_annotations/boto3_type_annotations/mgh/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 119 | 2018-12-01T18:20:57.000Z | 2022-02-02T10:31:29.000Z | boto3_type_annotations/boto3_type_annotations/mgh/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 15 | 2018-11-16T00:16:44.000Z | 2021-11-13T03:44:18.000Z | boto3_type_annotations/boto3_type_annotations/mgh/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 11 | 2019-05-06T05:26:51.000Z | 2021-09-28T15:27:59.000Z | from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from datetime import datetime
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def associate_created_artifact(self, Progre... | 40.915493 | 184 | 0.722203 |
3b671159f0e4a4aff1d67194dc40003874497734 | 550 | py | Python | alembic/versions/2ba62b0f2a6d_gender_add.py | yisangwu/flask_hwak | ca79ce454241d47a0d262723e02cf4fb1989694c | [
"Apache-2.0"
] | 1 | 2020-04-09T02:43:41.000Z | 2020-04-09T02:43:41.000Z | alembic/versions/2ba62b0f2a6d_gender_add.py | yisangwu/flask_hwak | ca79ce454241d47a0d262723e02cf4fb1989694c | [
"Apache-2.0"
] | null | null | null | alembic/versions/2ba62b0f2a6d_gender_add.py | yisangwu/flask_hwak | ca79ce454241d47a0d262723e02cf4fb1989694c | [
"Apache-2.0"
] | null | null | null | """gender-add
Revision ID: 2ba62b0f2a6d
Revises: 5ed09a7e741b
Create Date: 2018-10-29 17:22:30.310499
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2ba62b0f2a6d'
down_revision = '5ed09a7e741b'
branch_labels = None
depends_on = None
def upgrade():
# ###... | 18.965517 | 65 | 0.685455 |
d65478aefe87e133d18032f70639bf361df0a798 | 183 | py | Python | modules/camera/old_scripts/camera_test.py | wcthompson/mirror-selfies | 1e731e188925d89c10b93c85e551025459a83ecd | [
"MIT"
] | 1 | 2016-11-28T15:59:46.000Z | 2016-11-28T15:59:46.000Z | modules/camera/old_scripts/camera_test.py | wcthompson/mirror-selfies | 1e731e188925d89c10b93c85e551025459a83ecd | [
"MIT"
] | null | null | null | modules/camera/old_scripts/camera_test.py | wcthompson/mirror-selfies | 1e731e188925d89c10b93c85e551025459a83ecd | [
"MIT"
] | null | null | null | from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
for i in range(100):
camera.brightness = i
sleep(0.1)
camera.stop_preview()
| 15.25 | 29 | 0.73224 |
ea6a26915ac74e722765d54961490facdb9980c7 | 2,812 | py | Python | poethepoet/executor/poetry.py | Parnassius/poethepoet | 997cbe7121b0f31756e0217ebfe1de7c5c60687f | [
"MIT"
] | null | null | null | poethepoet/executor/poetry.py | Parnassius/poethepoet | 997cbe7121b0f31756e0217ebfe1de7c5c60687f | [
"MIT"
] | null | null | null | poethepoet/executor/poetry.py | Parnassius/poethepoet | 997cbe7121b0f31756e0217ebfe1de7c5c60687f | [
"MIT"
] | null | null | null | from subprocess import Popen, PIPE
import os
from pathlib import Path
import shutil
import sys
from typing import Dict, Optional, Sequence, Type
from ..virtualenv import Virtualenv
from .base import PoeExecutor
class PoetryExecutor(PoeExecutor):
"""
A poe task executor implementation that executes inside a po... | 33.47619 | 87 | 0.602418 |
5741399b6e0aba587b45d6b2749fa893acdda618 | 671 | py | Python | lazaro/agents/__init__.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | 4 | 2021-05-03T15:48:44.000Z | 2021-05-23T16:05:42.000Z | lazaro/agents/__init__.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | null | null | null | lazaro/agents/__init__.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | null | null | null | import typing
from .a2c import A2cAgent, A2CHyperParams
from .monte_carlo_advantage_actor_critic import MonteCarloA2c
from .dqn import DqnAgent, DqnHyperParams
from .double_dqn import DoubleDqnAgent, DoubleDqnHyperParams
from .double_dueling_dqn import DoubleDuelingDqnAgent, DoubleDuelingDqnHyperParams
from .dueling_dq... | 51.615385 | 124 | 0.865872 |
c6ef56b1bdb80b7f1e000fa715b0a3f07507cf84 | 119 | py | Python | api/tools/api/api.py | Eurkon/api | a51eae901e003ac6b94c04d12f1afeec00108256 | [
"MIT"
] | 5 | 2021-06-15T05:33:01.000Z | 2022-03-14T01:17:38.000Z | api/tools/api/api.py | Eurkon/api | a51eae901e003ac6b94c04d12f1afeec00108256 | [
"MIT"
] | 1 | 2021-06-03T09:22:50.000Z | 2021-06-03T09:22:50.000Z | api/tools/api/api.py | Eurkon/api | a51eae901e003ac6b94c04d12f1afeec00108256 | [
"MIT"
] | 1 | 2021-07-25T15:58:40.000Z | 2021-07-25T15:58:40.000Z | # -*- coding: utf-8 -*-
# @Author : Eurkon
# @Date : 2021/6/15 9:44
from api.tools.api.qrcode import tools_qrcode | 23.8 | 45 | 0.630252 |
1693e9d60f25ab0a79d9ba2bc95fd79e4ee91c16 | 347 | py | Python | functionkit/strict.py | dpk/functionkit | b4e39f655f27a0955fa4c9f2e4cf1944a8327eb9 | [
"CC0-1.0"
] | null | null | null | functionkit/strict.py | dpk/functionkit | b4e39f655f27a0955fa4c9f2e4cf1944a8327eb9 | [
"CC0-1.0"
] | null | null | null | functionkit/strict.py | dpk/functionkit | b4e39f655f27a0955fa4c9f2e4cf1944a8327eb9 | [
"CC0-1.0"
] | null | null | null | from functools import wraps
__all__ = ('strictify', 'listify', 'dictify', 'setify')
def strictify(klass):
def typify(f):
@wraps(f)
def wrapper(*args, **kwargs):
return klass(f(*args, **kwargs))
return wrapper
return typify
listify = strictify(list)
dictify = strictify(dic... | 20.411765 | 55 | 0.628242 |
234e7d04d7c72266dc3dd6d2d91b311178905b9f | 6,832 | py | Python | src/architecture/meta_cell.py | yangsenius/PoseNFS | dd8403633b64936e73a3d8d44d4b34f422d6a6a0 | [
"MIT"
] | 53 | 2019-09-23T09:48:56.000Z | 2022-01-20T16:06:36.000Z | src/architecture/meta_cell.py | yangsenius/Pose-Neural-Fabrics-Search | dd8403633b64936e73a3d8d44d4b34f422d6a6a0 | [
"MIT"
] | 8 | 2019-10-22T07:50:31.000Z | 2021-06-01T14:16:10.000Z | src/architecture/meta_cell.py | yangsenius/Pose-Neural-Fabrics-Search | dd8403633b64936e73a3d8d44d4b34f422d6a6a0 | [
"MIT"
] | 10 | 2019-10-16T12:32:40.000Z | 2021-08-05T08:12:54.000Z | ## author : yangsen (yangsenius@seu.edu.cn)
import torch
import torch.nn as nn
import torch.nn.functional as F
from architecture.operators import OPS , Connections , ReLUConvBN
# Note that:
# In paper, we don't use the previous previous skip connection between cells
# Therefore, we set `prev_prev_skip = False`
prev_... | 35.957895 | 147 | 0.594994 |
af63d655b03344c95045f5427c2a6193dac8367c | 12,789 | py | Python | stdplugins/kang.py | rsoorajs/PornHub | 4a20624162241f002eb5d91d8f716a2b76e5bfd5 | [
"Apache-2.0"
] | null | null | null | stdplugins/kang.py | rsoorajs/PornHub | 4a20624162241f002eb5d91d8f716a2b76e5bfd5 | [
"Apache-2.0"
] | null | null | null | stdplugins/kang.py | rsoorajs/PornHub | 4a20624162241f002eb5d91d8f716a2b76e5bfd5 | [
"Apache-2.0"
] | null | null | null | """Make / Download Telegram Sticker Packs without installing Third Party applications
Available Commands:
.lund [Optional Emoji]
.packinfo
.loda {for zip sticker pack}"""
from telethon import events
from io import BytesIO
from PIL import Image
import asyncio
import datetime
from collections import defaultdict
import ma... | 38.637462 | 142 | 0.629291 |
0c1b8ae9ae4ea12c89a037fd61f0601bc7173d0c | 1,231 | py | Python | binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | 1 | 2021-06-05T06:26:32.000Z | 2021-06-05T06:26:32.000Z | binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | null | null | null | binary-tree-inorder-traversal/binary-tree-inorder-traversal.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def inorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
nodes_val,track=[],[]
... | 38.46875 | 117 | 0.523964 |
7499cab21cbec8a62514ce5f494403d727b30af1 | 11,663 | py | Python | lib/galaxy/tool_util/parser/yaml.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 3 | 2016-09-15T21:04:56.000Z | 2019-04-21T02:48:25.000Z | lib/galaxy/tool_util/parser/yaml.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 209 | 2015-06-17T16:15:20.000Z | 2022-03-21T15:23:07.000Z | lib/galaxy/tool_util/parser/yaml.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 7 | 2016-07-10T16:44:30.000Z | 2020-08-30T19:25:51.000Z | import packaging.version
from galaxy.tool_util.deps import requirements
from galaxy.tool_util.parser.util import (
DEFAULT_DELTA,
DEFAULT_DELTA_FRAC
)
from .interface import (
InputSource,
PageSource,
PagesSource,
ToolSource,
)
from .output_collection_def import dataset_collector_descriptions_f... | 32.853521 | 101 | 0.635257 |
76fedc853bb79201f705eda74936529ba3253bfd | 7,383 | py | Python | www/survey.py | stanford-policylab/mathbot | f41febffaaa78e6e1d09994cd9c34df5185ce251 | [
"MIT"
] | 1 | 2020-10-15T03:14:21.000Z | 2020-10-15T03:14:21.000Z | www/survey.py | stanford-policylab/mathbot | f41febffaaa78e6e1d09994cd9c34df5185ce251 | [
"MIT"
] | null | null | null | www/survey.py | stanford-policylab/mathbot | f41febffaaa78e6e1d09994cd9c34df5185ce251 | [
"MIT"
] | null | null | null | import json
import os
import random
import tempfile
import webbrowser
from jinja2 import Environment, select_autoescape, FileSystemLoader
curr_dir_path = os.path.dirname(os.path.realpath(__file__))
class TemplateWrapper:
def __init__(self, template=None, root_dir=curr_dir_path, content=None):
self.conte... | 42.188571 | 341 | 0.666531 |
9d0bfc251985865ec6277d10d678bce81e8400da | 747 | py | Python | joplin/pages/news_page/migrations/0004_auto_20201102_2138.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 15 | 2018-09-27T07:36:30.000Z | 2021-08-03T16:01:21.000Z | joplin/pages/news_page/migrations/0004_auto_20201102_2138.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 183 | 2017-11-16T23:30:47.000Z | 2020-12-18T21:43:36.000Z | joplin/pages/news_page/migrations/0004_auto_20201102_2138.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 12 | 2017-12-12T22:48:05.000Z | 2021-03-01T18:01:24.000Z | # Generated by Django 2.2.16 on 2020-11-02 21:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('news_page', '0003_auto_20201002_2021'),
]
operations = [
migrations.AlterField(
model_name='ne... | 37.35 | 357 | 0.712182 |
87d2bbd45f3c596b5e88429394e5a432fafad6a5 | 7,486 | py | Python | src/gamesbyexample/floodplane.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | 83 | 2021-03-01T09:16:07.000Z | 2022-01-04T20:52:42.000Z | src/gamesbyexample/floodplane.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | null | null | null | src/gamesbyexample/floodplane.py | asweigart/gamesbyexample | 222bfc3b15ade1cf3bde158ba72a8b7a969ccc5a | [
"Python-2.0"
] | 9 | 2021-03-01T09:16:18.000Z | 2021-11-21T12:22:03.000Z | """Floodplane, by Al Sweigart al@inventwithpython.com
A colorful game where you try to fill the board with a single color. Has
a mode for colorblind players.
Inspired by the "Flood It!" game.
Tags: large, game, bext, terminal"""
__version__ = 0
import random, sys
try:
import bext
except ImportError:
print('Thi... | 33.873303 | 73 | 0.57494 |
58c9d3c6b9a075db3a6ed166ad3ccce2e6bb0333 | 952 | py | Python | monte_carlo_triangle.py | JoaoAreias/Brilliant | f914581012c816ffe4b2023dc0bc1be4df2dae17 | [
"MIT"
] | null | null | null | monte_carlo_triangle.py | JoaoAreias/Brilliant | f914581012c816ffe4b2023dc0bc1be4df2dae17 | [
"MIT"
] | null | null | null | monte_carlo_triangle.py | JoaoAreias/Brilliant | f914581012c816ffe4b2023dc0bc1be4df2dae17 | [
"MIT"
] | null | null | null | """Three points are chosen uniformly at random from the
perimeter of a unit circle. Use Monte Carlo simulation
to compute the probability of the points forming an acute
triangle, what is the probability?
"""
import numpy as np
def point():
theta = 2*np.pi*np.random.rand()
x = np.cos(theta)
y = np.sin(theta)
retur... | 25.052632 | 64 | 0.636555 |
9e1439713d62c7fa84ed320a26a9270bef146f23 | 12,436 | py | Python | vsgen/project.py | dbarsam/pyvsgen | 640191bb018a1ff7d7b7a4982e0d3c1a423ba878 | [
"MIT"
] | 4 | 2016-08-31T04:30:07.000Z | 2018-06-27T10:43:42.000Z | vsgen/project.py | dbarsam/pyvsgen | 640191bb018a1ff7d7b7a4982e0d3c1a423ba878 | [
"MIT"
] | 16 | 2016-03-08T14:14:53.000Z | 2018-05-26T13:02:21.000Z | vsgen/project.py | dbarsam/pyvsgen | 640191bb018a1ff7d7b7a4982e0d3c1a423ba878 | [
"MIT"
] | 3 | 2016-05-29T14:42:43.000Z | 2022-03-02T12:09:31.000Z | # -*- coding: utf-8 -*-
"""
This module provides the neccessary defintions to support a base project file defintion.
"""
import os
import fnmatch
import itertools
import uuid
class VSGProject(object):
"""
VSGProject encapsulates the data and logic needed to act as a base project.
:ivar uuid GUID: ... | 59.219048 | 173 | 0.682293 |
45afab437ee8bbad5ad48831ee02d0480b6e4a1b | 1,758 | py | Python | src/layers/token_manager/python/lib/python3.7/site-packages/token_manager.py | aws-samples/aws-saas-factory-s3-multitenancy | 41fcd7f23f782884a7f697ffab395e0d0158a7e1 | [
"MIT-0"
] | 34 | 2021-03-04T21:52:27.000Z | 2022-03-01T15:53:36.000Z | src/layers/token_manager/python/lib/python3.7/site-packages/token_manager.py | aws-samples/aws-saas-factory-s3-multitenancy | 41fcd7f23f782884a7f697ffab395e0d0158a7e1 | [
"MIT-0"
] | null | null | null | src/layers/token_manager/python/lib/python3.7/site-packages/token_manager.py | aws-samples/aws-saas-factory-s3-multitenancy | 41fcd7f23f782884a7f697ffab395e0d0158a7e1 | [
"MIT-0"
] | 11 | 2020-12-21T12:23:38.000Z | 2022-03-02T20:09:24.000Z | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
"""
Vends token based on header fields (TenantId, UserId)
"""
import packages.jwt as jwt
X_TOKEN = "x-token"
X_TENANT_ID = "x-tenant-id"
X_USER_ID = "x-user-id"
def vend(tenant_id, user_id... | 25.114286 | 68 | 0.600114 |
9389028b7d81e2508973ebe9a499229f0130c842 | 755 | py | Python | test/test_address_tags.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | null | null | null | test/test_address_tags.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | 1 | 2022-02-24T11:21:49.000Z | 2022-02-24T11:21:49.000Z | test/test_address_tags.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | null | null | null | """
GraphSense API
GraphSense API # noqa: E501
The version of the OpenAPI document: 0.5.1
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import graphsense
from graphsense.model.address_tag import AddressTag
globals()['AddressTag'] = AddressTag
from graphsense.model.add... | 19.868421 | 79 | 0.67947 |
bf08fa04647c2e4ae38d399491b32432f543190e | 6,363 | py | Python | tests/test_stream.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | null | null | null | tests/test_stream.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | 1 | 2020-08-18T21:22:15.000Z | 2021-02-01T22:39:16.000Z | tests/test_stream.py | codepr/drain | e2d9f1d3dfcc78ec8504eb2e8eef70b13247d174 | [
"WTFPL"
] | null | null | null | import json
import asyncio
import unittest
import dataclasses
from drain.stream import Stream
from drain.record import Record
@dataclasses.dataclass
class TestRecord(Record):
value: int
def __hash__(self):
return self.value
@dataclasses.dataclass
class TestListRecord(Record):
values: list
... | 25.865854 | 78 | 0.524752 |
604ff882fe1e52265bf97f9f5bb88630d14e91f3 | 344 | py | Python | setup.py | cocoxu/OpenNMT-py | 820ad912dda0b5cbe49c53762374deb6bedd1299 | [
"MIT"
] | null | null | null | setup.py | cocoxu/OpenNMT-py | 820ad912dda0b5cbe49c53762374deb6bedd1299 | [
"MIT"
] | null | null | null | setup.py | cocoxu/OpenNMT-py | 820ad912dda0b5cbe49c53762374deb6bedd1299 | [
"MIT"
] | 1 | 2019-10-27T06:23:05.000Z | 2019-10-27T06:23:05.000Z | #!/usr/bin/env python
from setuptools import setup
setup(name='OpenNMT-py',
description='A python implementation of OpenNMT',
version='0.7.2',
packages=['onmt', 'onmt.encoders', 'onmt.modules', 'onmt.tests',
'onmt.translate', 'onmt.decoders', 'onmt.inputters',
'onmt.... | 28.666667 | 70 | 0.610465 |
2cbcc72bdf1589b625359c91592a1e3982353d87 | 2,232 | py | Python | openpifpaf_posetrack/transforms/pad.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | 9 | 2021-03-04T04:47:27.000Z | 2021-03-30T01:48:55.000Z | openpifpaf_posetrack/transforms/pad.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | 4 | 2021-03-16T03:24:27.000Z | 2021-04-01T19:22:02.000Z | openpifpaf_posetrack/transforms/pad.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | null | null | null | import copy
import logging
import torch
import torchvision
import openpifpaf
LOG = logging.getLogger(__name__)
class Pad(openpifpaf.transforms.Preprocess):
def __init__(self, target_size, max_shift):
if isinstance(target_size, int):
target_size = (target_size, target_size)
self.targ... | 33.818182 | 87 | 0.562276 |
70b15273914529b95493e31894a8c1281820493c | 2,919 | py | Python | third-party/gtd/scripts/run_docker.py | timpowellgit/phrasenode | a4dc105a69785f289a4e7998d078d6727686b94d | [
"Apache-2.0"
] | 81 | 2018-02-21T15:53:38.000Z | 2022-03-20T21:25:49.000Z | third-party/gtd/scripts/run_docker.py | timpowellgit/phrasenode | a4dc105a69785f289a4e7998d078d6727686b94d | [
"Apache-2.0"
] | 14 | 2018-03-09T19:04:43.000Z | 2020-12-06T13:54:40.000Z | third-party/gtd/scripts/run_docker.py | timpowellgit/phrasenode | a4dc105a69785f289a4e7998d078d6727686b94d | [
"Apache-2.0"
] | 38 | 2018-03-09T19:42:32.000Z | 2022-03-15T15:39:51.000Z | #!/u/nlp/packages/anaconda2/bin/python
# THIS SCRIPT SHOULD BE SYMLINKED INTO THE ROOT OF YOUR GIT REPO
# It assumes that config.json can also be found at the root of your repo.
import argparse
import json
import os
from os.path import dirname, abspath, join
import subprocess
arg_parser = argparse.ArgumentParser()
... | 36.949367 | 112 | 0.589928 |
9e4512a9a0dfe7ed6a48d464aece5f29d426eff0 | 4,985 | py | Python | sample_inference.py | TUI-NICR/multi-task-person-perception | 81666eb42be9522fd726448e82e8bbf04138ffa3 | [
"BSD-3-Clause"
] | 4 | 2021-07-28T06:26:07.000Z | 2022-01-24T09:31:34.000Z | sample_inference.py | TUI-NICR/multi-task-person-perception | 81666eb42be9522fd726448e82e8bbf04138ffa3 | [
"BSD-3-Clause"
] | null | null | null | sample_inference.py | TUI-NICR/multi-task-person-perception | 81666eb42be9522fd726448e82e8bbf04138ffa3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. codeauthor:: Dominik Höchemer <dominik.hoechemer@tu-ilmenau.de>
.. codeauthor:: Daniel Seichter <daniel.seichter@tu-ilmenau.de>
"""
import argparse as ap
import json
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
from src.data.postproces... | 34.143836 | 80 | 0.601204 |
cf761c49da56e7efc64cfb870c8e8d43a1f11feb | 24,967 | py | Python | nova/virt/libvirt/imagecache.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/imagecache.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/imagecache.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Michael Still and Canonical 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:... | 38.648607 | 79 | 0.579245 |
88fca09d0c6883cff869bed6db1bad5fdbb0bc3b | 1,181 | py | Python | sdks/python/apache_beam/utils/urns.py | amitsela/beam | a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112 | [
"Apache-2.0"
] | 2 | 2017-02-22T03:35:11.000Z | 2017-04-05T09:38:16.000Z | sdks/python/apache_beam/utils/urns.py | amitsela/beam | a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112 | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/utils/urns.py | amitsela/beam | a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112 | [
"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 us... | 43.740741 | 74 | 0.788315 |
0b20443e0ae70e7b330f1f02b4321d60cbc1b894 | 11,829 | py | Python | beer/models/vae.py | RobinAlgayres/beer | 15ad0dad5a49f98e658e948724e05df347ffe3b8 | [
"MIT"
] | 46 | 2018-02-27T18:15:08.000Z | 2022-02-16T22:10:55.000Z | beer/models/vae.py | RobinAlgayres/beer | 15ad0dad5a49f98e658e948724e05df347ffe3b8 | [
"MIT"
] | 16 | 2018-01-26T14:18:51.000Z | 2021-02-05T09:34:00.000Z | beer/models/vae.py | RobinAlgayres/beer | 15ad0dad5a49f98e658e948724e05df347ffe3b8 | [
"MIT"
] | 26 | 2018-03-12T14:03:26.000Z | 2021-05-24T21:15:01.000Z |
'''Implementation of the Variational Auto-Encoder with arbitrary
prior over the latent space.
'''
import torch
from .bayesmodel import BayesianModel
class VAE(BayesianModel):
'''Variational Auto-Encoder (VAE).'''
def __init__(self, encoder, encoder_problayer, decoder, decoder_problayer,
... | 40.930796 | 79 | 0.612985 |
f5a1bf5dc8f1214e2b0455c88365acae1304d84c | 2,710 | py | Python | tests/env/packages/env_test_msys2-conda-epoch.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | 1 | 2021-04-11T02:02:28.000Z | 2021-04-11T02:02:28.000Z | tests/env/packages/env_test_msys2-conda-epoch.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | null | null | null | tests/env/packages/env_test_msys2-conda-epoch.py | TerraWilly/foxbms-2 | 62288b333fe6da52deae91f74fb15e71060ac99c | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der
# angewandten Forschung e.V. All rights reserved.
#
# BSD 3-Clause License
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the fol... | 37.123288 | 79 | 0.732841 |
766b8a36637b4aee08f33aed68b4a5a2839e6ab6 | 376 | py | Python | DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | DQM/DTMonitorModule/python/dtRunConditionVar_cfi.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
dtRunConditionVar = DQMEDAnalyzer('DTRunConditionVar',
debug = cms.untracked.bool(False),
nMinHitsPhi = cms.untracked.int32(5),
maxAnglePhiSegm = cms.untracked.double(30.),
recoSegments = cms.InputTag('dt4... | 31.333333 | 56 | 0.763298 |
a6c8689239e88194b612110ccd4274f0c771c013 | 6,748 | py | Python | kubernetes_asyncio/client/models/v1_vsphere_virtual_disk_volume_source.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:24:27.000Z | 2020-03-25T01:24:27.000Z | kubernetes_asyncio/client/models/v1_vsphere_virtual_disk_volume_source.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_vsphere_virtual_disk_volume_source.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 33.74 | 197 | 0.63604 |
b738b6765ccbfc273541eeb2191841ddb1add228 | 20,645 | py | Python | tanjun/conversion.py | ashwinvin/Tanjun | e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab | [
"BSD-3-Clause"
] | null | null | null | tanjun/conversion.py | ashwinvin/Tanjun | e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab | [
"BSD-3-Clause"
] | null | null | null | tanjun/conversion.py | ashwinvin/Tanjun | e16e28a3be7b809762e2cdc583ae9fe9edf8a0ab | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# cython: language_level=3
# BSD 3-Clause License
#
# Copyright (c) 2020-2021, Faster Speeding
# 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 sour... | 30.767511 | 114 | 0.661322 |
ee6b6d2135e63a58af43fea98ba66809d62f7f0f | 7,264 | py | Python | doc/source/conf.py | venaturum/pulp | e79521ba42a5dd31e4b9ed113183f429fc39ea17 | [
"MIT"
] | null | null | null | doc/source/conf.py | venaturum/pulp | e79521ba42a5dd31e4b9ed113183f429fc39ea17 | [
"MIT"
] | null | null | null | doc/source/conf.py | venaturum/pulp | e79521ba42a5dd31e4b9ed113183f429fc39ea17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# pulp sphinx documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 2 11:54:01 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | 31.720524 | 80 | 0.720815 |
ccfad470a688dc7b2a1e74171f3d021fdb9fab1e | 149 | py | Python | neighbour/admin.py | kuya-ui/Neighborhood- | e2b70b4c4b67857da5cfe5acb2cac12af3c600ca | [
"MIT"
] | null | null | null | neighbour/admin.py | kuya-ui/Neighborhood- | e2b70b4c4b67857da5cfe5acb2cac12af3c600ca | [
"MIT"
] | null | null | null | neighbour/admin.py | kuya-ui/Neighborhood- | e2b70b4c4b67857da5cfe5acb2cac12af3c600ca | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Profile)
admin.site.register(Neighbourhood)
| 21.285714 | 34 | 0.805369 |
c3ffb5def72ab8fa43f72d0af50d29379e498696 | 843 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/DISABLED/NVX/cross_process_interop.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/DISABLED/NVX/cross_process_interop.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/DISABLED/NVX/cross_process_interop.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''OpenGL extension NVX.cross_process_interop
This module customises the behaviour of the
OpenGL.raw.DISABLED.NVX.cross_process_interop to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NVX/cross_process_interop.txt
'''
f... | 36.652174 | 74 | 0.799526 |
652fb7d90b221c0864445f8e1af4090bfa3e46de | 392 | py | Python | core/urls.py | yaesolKim/tuza_diary | 28544fc973ddf312e7c7ed995b517b48dda92575 | [
"MIT"
] | null | null | null | core/urls.py | yaesolKim/tuza_diary | 28544fc973ddf312e7c7ed995b517b48dda92575 | [
"MIT"
] | null | null | null | core/urls.py | yaesolKim/tuza_diary | 28544fc973ddf312e7c7ed995b517b48dda92575 | [
"MIT"
] | 1 | 2021-03-05T10:07:08.000Z | 2021-03-05T10:07:08.000Z | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from django.contrib import admin
from django.urls import path, include # add this
urlpatterns = [
path('admin/', admin.site.urls), # Django admin route
path("", include("authentication.urls")), # Auth routes - login / register... | 26.133333 | 78 | 0.617347 |
ec336d2631eba60c68d598ec55d580e3f2d412a6 | 3,878 | py | Python | ngcccbase/pycoin_txcons.py | petertodd/ngcccbase | 9e346eebaf4461589e5fdce098c8d0c5793c9461 | [
"MIT"
] | 2 | 2021-10-31T19:08:48.000Z | 2021-10-31T19:09:31.000Z | ngcccbase/pycoin_txcons.py | petertodd/ngcccbase | 9e346eebaf4461589e5fdce098c8d0c5793c9461 | [
"MIT"
] | null | null | null | ngcccbase/pycoin_txcons.py | petertodd/ngcccbase | 9e346eebaf4461589e5fdce098c8d0c5793c9461 | [
"MIT"
] | 1 | 2021-10-31T19:10:02.000Z | 2021-10-31T19:10:02.000Z | """
pycoin_txcons.py
Construct and sign transactions using pycoin library
"""
from pycoin.encoding import bitcoin_address_to_hash160_sec,\
wif_to_tuple_of_secret_exponent_compressed
from pycoin.serialize import b2h, b2h_rev
from pycoin.tx import SecretExponentSolver
from pycoin.tx.Tx import Tx, SIGHASH_ALL
from ... | 36.242991 | 80 | 0.678185 |
53917b16e52909ad7dfbea64cf82fa17acb1aa3f | 8,295 | py | Python | LDAR_Sim/src/economics/cost_mitigation.py | SensorUp/LDAR_Sim | e341998257eb3c74497c950935c02bb81c01eb32 | [
"MIT"
] | 2 | 2021-11-08T13:55:45.000Z | 2021-11-16T16:46:07.000Z | LDAR_Sim/src/economics/cost_mitigation.py | SensorUp/LDAR_Sim | e341998257eb3c74497c950935c02bb81c01eb32 | [
"MIT"
] | 123 | 2021-05-17T15:41:32.000Z | 2022-03-09T16:34:07.000Z | LDAR_Sim/src/economics/cost_mitigation.py | SensorUp/LDAR_Sim | e341998257eb3c74497c950935c02bb81c01eb32 | [
"MIT"
] | 2 | 2021-11-18T17:10:10.000Z | 2022-01-14T21:39:06.000Z | # ------------------------------------------------------------------------------
# Program: The LDAR Simulator (LDAR-Sim)
# File: economics.cost_mitigation
# Purpose: Creates outputs across multiple programs and simulations
#
# Copyright (C) 2018-2021
# Intelligent Methane Monitoring and Management Syste... | 44.358289 | 83 | 0.65003 |
1d0692898d21bde4eb8409c5cc1b07ea36552834 | 29,063 | py | Python | deeplearning.ai/coursera-improving-neural-networks/week1/assignment2/Regularization+-+v2.py | ud3sh/coursework | 2502b3480dd5f9f35743a45ef87097f251f77a14 | [
"Unlicense"
] | 1 | 2016-05-11T12:53:58.000Z | 2016-05-11T12:53:58.000Z | deeplearning.ai/coursera-improving-neural-networks/week1/assignment2/Regularization+-+v2.py | ud3sh/coursework | 2502b3480dd5f9f35743a45ef87097f251f77a14 | [
"Unlicense"
] | null | null | null | deeplearning.ai/coursera-improving-neural-networks/week1/assignment2/Regularization+-+v2.py | ud3sh/coursework | 2502b3480dd5f9f35743a45ef87097f251f77a14 | [
"Unlicense"
] | 1 | 2017-06-30T19:07:38.000Z | 2017-06-30T19:07:38.000Z |
# coding: utf-8
# # Regularization
#
# Welcome to the second assignment of this week. Deep Learning models have so much flexibility and capacity that **overfitting can be a serious problem**, if the training dataset is not big enough. Sure it does well on the training set, but the learned network **doesn't generaliz... | 42.427737 | 481 | 0.649142 |
94603ae496ff92535334da2aaad69ded75c292ed | 4,925 | py | Python | tests/integration/models/reddit/test_modmail.py | cmays90/asyncpraw | d9b61d3849ae47d60281768a08497523a1697de0 | [
"BSD-2-Clause"
] | null | null | null | tests/integration/models/reddit/test_modmail.py | cmays90/asyncpraw | d9b61d3849ae47d60281768a08497523a1697de0 | [
"BSD-2-Clause"
] | null | null | null | tests/integration/models/reddit/test_modmail.py | cmays90/asyncpraw | d9b61d3849ae47d60281768a08497523a1697de0 | [
"BSD-2-Clause"
] | 1 | 2020-12-13T05:10:35.000Z | 2020-12-13T05:10:35.000Z | from datetime import datetime
from asynctest import mock
from asyncpraw.models import ModmailMessage, Subreddit
from ... import IntegrationTest
class TestModmailConversation(IntegrationTest):
@mock.patch("asyncio.sleep", return_value=None)
async def test_archive(self, _):
self.reddit.read_only = Fal... | 41.737288 | 77 | 0.648122 |
30734a163b87fb8e417e90e6d1b49d46199cb588 | 207 | py | Python | nextcertification/nextcertification/doctype/sections/test_sections.py | asoral/nextcertification | 20911b6477314b30ea96b8c3a739af4a9a01d179 | [
"MIT"
] | null | null | null | nextcertification/nextcertification/doctype/sections/test_sections.py | asoral/nextcertification | 20911b6477314b30ea96b8c3a739af4a9a01d179 | [
"MIT"
] | null | null | null | nextcertification/nextcertification/doctype/sections/test_sections.py | asoral/nextcertification | 20911b6477314b30ea96b8c3a739af4a9a01d179 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Sameer and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestSections(unittest.TestCase):
pass
| 18.818182 | 45 | 0.758454 |
7bc2fbb28f0a03608011216b33ad91570a421789 | 1,298 | py | Python | dns/migrations/0038_dnsserver_sync.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | dns/migrations/0038_dnsserver_sync.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | dns/migrations/0038_dnsserver_sync.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# dnsserver sync
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC modules
from... | 37.085714 | 90 | 0.434515 |
fde0ff30b9898b727e73ba601550de2f1d288c98 | 421 | py | Python | linearsearch.py | swaroop9ai9/problemsolving | 48b9092a1671d391c0a7a2615a423fdba7f59b9c | [
"MIT"
] | 1 | 2020-08-05T14:29:50.000Z | 2020-08-05T14:29:50.000Z | linearsearch.py | swaroop9ai9/problemsolving | 48b9092a1671d391c0a7a2615a423fdba7f59b9c | [
"MIT"
] | null | null | null | linearsearch.py | swaroop9ai9/problemsolving | 48b9092a1671d391c0a7a2615a423fdba7f59b9c | [
"MIT"
] | null | null | null | def linear_search(values, search_for):
search_at = 0
search_res = False
# Match the value with each data element
while search_at < len(values) and search_res is False:
if values[search_at] == search_for:
search_res = True
else:
search_at = search_at + 1
return ... | 24.764706 | 58 | 0.638955 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.