hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
97a6cf6795e655146b4d5537a0349de42e7ed105 | 1,282 | py | Python | nehushtan/mysql/MySQLUnionSelection.py | sinri/nehushtan | 6fda496e16a8d443a86c617173d35f31c392beb6 | [
"MIT"
] | null | null | null | nehushtan/mysql/MySQLUnionSelection.py | sinri/nehushtan | 6fda496e16a8d443a86c617173d35f31c392beb6 | [
"MIT"
] | 1 | 2020-11-20T03:10:23.000Z | 2020-11-20T09:30:34.000Z | nehushtan/mysql/MySQLUnionSelection.py | sinri/nehushtan | 6fda496e16a8d443a86c617173d35f31c392beb6 | [
"MIT"
] | 1 | 2021-10-13T10:16:58.000Z | 2021-10-13T10:16:58.000Z | from typing import List, Tuple
from nehushtan.mysql.MySQLKit import MySQLKit
from nehushtan.mysql.MySQLSelectionMixin import MySQLSelectionMixin
from nehushtan.mysql.MySQLTableSelection import MySQLTableSelection
class MySQLUnionSeletion(MySQLSelectionMixin):
"""
Since 0.3.6
"""
def __init__(self):
... | 32.871795 | 91 | 0.648986 |
1543f41abb9451ab5b820a2bb44c068d07be463a | 7,861 | py | Python | electrum/storage.py | dappcenter/electrum-dogecoin | ee29a07b127a4120e785c6941af9313176a3c4f3 | [
"MIT"
] | 3 | 2021-10-03T06:45:36.000Z | 2022-03-29T05:13:52.000Z | electrum/storage.py | 0xAyanami/electrum | 4c3c8b6a36f8b139625d7132d200ffbc742123b0 | [
"MIT"
] | 1 | 2022-03-29T05:20:21.000Z | 2022-03-29T21:31:06.000Z | electrum/storage.py | 0xAyanami/electrum | 4c3c8b6a36f8b139625d7132d200ffbc742123b0 | [
"MIT"
] | 4 | 2021-11-08T20:44:38.000Z | 2022-03-28T20:16:02.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Dogecoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... | 36.906103 | 96 | 0.65984 |
acf77ee8fde96bcd61468787f62e00ea7941d2bc | 24,732 | py | Python | src/smif/data_layer/validate.py | willu47/smif | a5d2e476c157391fd16d4b4c335d1e0664d2a14c | [
"MIT"
] | null | null | null | src/smif/data_layer/validate.py | willu47/smif | a5d2e476c157391fd16d4b4c335d1e0664d2a14c | [
"MIT"
] | null | null | null | src/smif/data_layer/validate.py | willu47/smif | a5d2e476c157391fd16d4b4c335d1e0664d2a14c | [
"MIT"
] | 1 | 2021-03-17T17:50:58.000Z | 2021-03-17T17:50:58.000Z | # -*- coding: utf-8 -*-
"""Validate the correct format and presence of the config data
for the system-of-systems model
"""
import itertools
from smif.exception import (SmifDataError, SmifDataInputError,
SmifValidationError)
VALIDATION_ERRORS = []
def validate_sos_model_format(sos_model):... | 38.463453 | 95 | 0.600235 |
c648910e136535fce92e140dc0c7b7b4968d33f3 | 1,208 | py | Python | apps/goods/tasks.py | kangchihlun/dailyfresh-1 | 564a40115b54907e40a889e2d7df8126edc27add | [
"MIT"
] | 2 | 2020-09-07T00:33:21.000Z | 2020-12-02T05:54:12.000Z | apps/goods/tasks.py | kangchihlun/dailyfresh-1 | 564a40115b54907e40a889e2d7df8126edc27add | [
"MIT"
] | null | null | null | apps/goods/tasks.py | kangchihlun/dailyfresh-1 | 564a40115b54907e40a889e2d7df8126edc27add | [
"MIT"
] | 1 | 2020-09-07T00:32:47.000Z | 2020-09-07T00:32:47.000Z | from __future__ import absolute_import, unicode_literals
from django.core.mail import send_mail
from celery_tasks import celery_app
from django.conf import settings
@celery_app.task()
def generate_static_index_html():
types = GoodsType.objects.all()
goods_banners = IndexGoodsBanner.objects.all().order_by('in... | 37.75 | 104 | 0.72351 |
75d46cd0c3e7e97ba43ed5687b85e05b4a77ba36 | 949 | py | Python | tests/test_gaf_hdr.py | wangwl/goatools | 0d3d4af72cf6abfddc20d57da8131d37572d1096 | [
"BSD-2-Clause"
] | 1 | 2019-02-07T03:35:09.000Z | 2019-02-07T03:35:09.000Z | tests/test_gaf_hdr.py | wangwl/goatools | 0d3d4af72cf6abfddc20d57da8131d37572d1096 | [
"BSD-2-Clause"
] | null | null | null | tests/test_gaf_hdr.py | wangwl/goatools | 0d3d4af72cf6abfddc20d57da8131d37572d1096 | [
"BSD-2-Clause"
] | 1 | 2019-02-12T13:45:42.000Z | 2019-02-12T13:45:42.000Z | """Test returning GO Association File (GAF) header version and date."""
__copyright__ = "Copyright (C) 2016-2017, DV Klopfenstein, H Tang. All rights reserved."
__author__ = "DV Klopfenstein"
import os
import sys
from goatools.base import get_gaf_name
from goatools.associations import get_gaf_hdr
REPO = os.path.join... | 36.5 | 88 | 0.696523 |
e610cd61445e351a68749b3a01f25da55722720d | 823 | py | Python | src/zope/app/security/browser/principalterms.py | zopefoundation/zope.app.security | 9a2f50f662c1055f7dcb37b244748937c98a1238 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/security/browser/principalterms.py | zopefoundation/zope.app.security | 9a2f50f662c1055f7dcb37b244748937c98a1238 | [
"ZPL-2.1"
] | 2 | 2017-04-27T12:56:50.000Z | 2019-07-12T14:49:26.000Z | src/zope/app/security/browser/principalterms.py | zopefoundation/zope.app.security | 9a2f50f662c1055f7dcb37b244748937c98a1238 | [
"ZPL-2.1"
] | 1 | 2015-04-03T08:04:35.000Z | 2015-04-03T08:04:35.000Z | ##############################################################################
#
# Copyright (c) 2009 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 39.190476 | 78 | 0.634265 |
31361a39e43945b097c97ea2e942b15d7f471f30 | 2,932 | py | Python | bin/py3ish.py | pelavarre/pybashish | 03f74356fb0a2a0ef7106f09c059fd9b375ce89a | [
"CNRI-Python"
] | 4 | 2020-07-10T20:16:13.000Z | 2022-02-16T02:11:20.000Z | bin/py3ish.py | pelavarre/pybashish | 03f74356fb0a2a0ef7106f09c059fd9b375ce89a | [
"CNRI-Python"
] | null | null | null | bin/py3ish.py | pelavarre/pybashish | 03f74356fb0a2a0ef7106f09c059fd9b375ce89a | [
"CNRI-Python"
] | 2 | 2020-06-24T20:37:36.000Z | 2020-07-10T20:16:17.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
usage: import py3ish
emulate Python 3 inside of Python 2, well enough for now
"""
# FIXME: help find and review diffs among scattered forks of shared defs
from __future__ import print_function
import argparse
import collections
import inspect
import shlex
import s... | 23.837398 | 90 | 0.652456 |
371cc18a74321749cc5d4e6009a188aedfbb7c76 | 7,494 | py | Python | cm/base/BaseCM/test_hddcdd.py | historeno/enermaps | ad3a97636baa153a56367e374d0fef7f009bf19d | [
"Apache-2.0"
] | null | null | null | cm/base/BaseCM/test_hddcdd.py | historeno/enermaps | ad3a97636baa153a56367e374d0fef7f009bf19d | [
"Apache-2.0"
] | null | null | null | cm/base/BaseCM/test_hddcdd.py | historeno/enermaps | ad3a97636baa153a56367e374d0fef7f009bf19d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
from copy import deepcopy
import geopandas as gpd
import pandas as pd
from BaseCM import cm_hddcdd as hc
GEOJSON = {
"features": [
{
"geometry": {
"coordinates": [
[
... | 30.966942 | 88 | 0.46704 |
8cbde5141e4efc8d4e335e5bf5c2789374ee6a2f | 7,773 | py | Python | mmdet/models/backbones/darknet.py | yypurpose/mmdetection | ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c | [
"Apache-2.0"
] | null | null | null | mmdet/models/backbones/darknet.py | yypurpose/mmdetection | ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c | [
"Apache-2.0"
] | null | null | null | mmdet/models/backbones/darknet.py | yypurpose/mmdetection | ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 Western Digital Corporation or its affiliates.
import logging
import torch.nn as nn
from mmcv.cnn import ConvModule, constant_init, kaiming_init
from mmcv.runner import load_checkpoint
from torch.nn.modules.batchnorm import _BatchNorm
from ..builder import BACKBONES
class ResBlock(... | 38.865 | 80 | 0.566963 |
895cd29263d0e0f90d5c139c78dbd3840eb522fc | 1,173 | py | Python | kws_doa.py | NandroidF12/localisationBruit | 76ddc4934218723fcc87ad1ce17522d85c7d1ffe | [
"Apache-2.0"
] | null | null | null | kws_doa.py | NandroidF12/localisationBruit | 76ddc4934218723fcc87ad1ce17522d85c7d1ffe | [
"Apache-2.0"
] | null | null | null | kws_doa.py | NandroidF12/localisationBruit | 76ddc4934218723fcc87ad1ce17522d85c7d1ffe | [
"Apache-2.0"
] | 1 | 2019-06-13T08:57:06.000Z | 2019-06-13T08:57:06.000Z |
import sys
import numpy as np
import collections
from mic_array_wav import MicArray
from pixel_ring import pixel_ring
from snowboydetect import SnowboyDetect
RATE = 16000
CHANNELS = 4
KWS_FRAMES = 10 # ms
DOA_FRAMES = 800 # ms
detector = SnowboyDetect('snowboy/resources/common.res', 'snowboy/... | 26.066667 | 104 | 0.611253 |
bed8ffa1e73ffa405bfc1005a04f4f722ab41812 | 2,069 | py | Python | api/migrations/0005_auto_20200906_1951.py | sh2MAN/yamdb_final | 17f84bacd832237d88d3389605cf2acdf2a590f5 | [
"BSD-3-Clause"
] | null | null | null | api/migrations/0005_auto_20200906_1951.py | sh2MAN/yamdb_final | 17f84bacd832237d88d3389605cf2acdf2a590f5 | [
"BSD-3-Clause"
] | null | null | null | api/migrations/0005_auto_20200906_1951.py | sh2MAN/yamdb_final | 17f84bacd832237d88d3389605cf2acdf2a590f5 | [
"BSD-3-Clause"
] | 12 | 2021-02-11T16:39:00.000Z | 2022-03-30T19:18:24.000Z | # Generated by Django 3.0.5 on 2020-09-06 19:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0004_auto_20200906_1752'),
]
operations = [
migrations.AlterModelOptions(
name='category... | 34.483333 | 177 | 0.585307 |
3edcf0bfe30afb02025cb8d65ddf9a9f45362d2f | 16,487 | py | Python | pygsti/modelmembers/povms/tensorprodeffect.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | pygsti/modelmembers/povms/tensorprodeffect.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | pygsti/modelmembers/povms/tensorprodeffect.py | colibri-coruscans/pyGSTi | da54f4abf668a28476030528f81afa46a1fbba33 | [
"Apache-2.0"
] | null | null | null | """
The TensorProductPOVMEffect class and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, t... | 45.797222 | 119 | 0.605143 |
78d309b651a7c58dddc98b3c72adb712b2ae762c | 29,897 | py | Python | venv/lib/python3.6/site-packages/gi/overrides/GLib.py | totenhund/DE19_COMP_ASSIGNMENT | 2f2206df1af591097b9b767588215c7dff575461 | [
"MIT"
] | 1 | 2021-06-03T08:25:47.000Z | 2021-06-03T08:25:47.000Z | beeware-venv/lib/python3.8/site-packages/gi/overrides/GLib.py | alongoldenberg/Mamad | bae8e68ac88be7c634bc91048ee45c105f10bf48 | [
"Apache-2.0"
] | null | null | null | beeware-venv/lib/python3.8/site-packages/gi/overrides/GLib.py | alongoldenberg/Mamad | bae8e68ac88be7c634bc91048ee45c105f10bf48 | [
"Apache-2.0"
] | null | null | null | # -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2010 Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
# Copyright (C) 2011, 2012 Canonical Ltd.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
... | 33.935301 | 132 | 0.63508 |
33d46d56f1e3c0fe54e2d3db09ee29e4b4db1881 | 2,716 | py | Python | rpython/jit/metainterp/test/test_float.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | rpython/jit/metainterp/test/test_float.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | rpython/jit/metainterp/test/test_float.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | import math, sys
from rpython.jit.metainterp.test.support import LLJitMixin
from rpython.rlib.rarithmetic import intmask, r_uint
class FloatTests:
def test_simple(self):
def f(a, b, c, d, e):
return (((a + b) - c) * d) / e
res = self.interp_operations(f, [41.5, 2.25, 17.5, 3.0, 2.5])
... | 30.177778 | 75 | 0.559647 |
1a71d63fee320db3481a8529b3198ed885ebf0c6 | 5,524 | py | Python | home/views.py | hell0ut/Balkan | ab0b03376740e1ae78618f76c18092cc99d7f00c | [
"MIT"
] | null | null | null | home/views.py | hell0ut/Balkan | ab0b03376740e1ae78618f76c18092cc99d7f00c | [
"MIT"
] | null | null | null | home/views.py | hell0ut/Balkan | ab0b03376740e1ae78618f76c18092cc99d7f00c | [
"MIT"
] | null | null | null | from base64 import b64encode
from django.shortcuts import render, redirect,reverse
from .models import *
from django.http import JsonResponse,HttpResponse,HttpResponseRedirect
import json
import hashlib
import telebot
import time
from .forms import *
import requests
bot = telebot.TeleBot('1756376023:AAFNHBzVvdcx2rh1f... | 38.361111 | 143 | 0.65496 |
6e00e5d8b8003255a3d448f4329053a59f68e9fb | 7,735 | py | Python | ml4sts/hyperparameters.py | aguirre-lab/sts-ml | 6c0a631c4210853e064bd7de9a0ef5e1fd47ff8a | [
"BSD-3-Clause"
] | null | null | null | ml4sts/hyperparameters.py | aguirre-lab/sts-ml | 6c0a631c4210853e064bd7de9a0ef5e1fd47ff8a | [
"BSD-3-Clause"
] | null | null | null | ml4sts/hyperparameters.py | aguirre-lab/sts-ml | 6c0a631c4210853e064bd7de9a0ef5e1fd47ff8a | [
"BSD-3-Clause"
] | null | null | null | # Imports: standard library
import logging
# Imports: third party
import numpy as np
import pandas as pd
# Imports: ml4sts
from ml4sts.utils import log_dataframe
def _sample_random_hyperparameter(
lower_bound: float = 0.0,
upper_bound: float = 1.0,
scaling: str = "linear",
primitive_type: np.dtype =... | 33.777293 | 88 | 0.593536 |
6ba91b7c6339704c4a5830bab04bad6d0899c90f | 361 | py | Python | dynamicProgramming/53_maximum_subarray.py | weilincheng/LeetCode-practice | 6e105bf381661d9f737d724c2dd42aa9cf9a5588 | [
"MIT"
] | null | null | null | dynamicProgramming/53_maximum_subarray.py | weilincheng/LeetCode-practice | 6e105bf381661d9f737d724c2dd42aa9cf9a5588 | [
"MIT"
] | null | null | null | dynamicProgramming/53_maximum_subarray.py | weilincheng/LeetCode-practice | 6e105bf381661d9f737d724c2dd42aa9cf9a5588 | [
"MIT"
] | null | null | null | class Solution
# O(n) time | O(1) space - where n is the length of the input list
def maxSubArray(self, nums: List[int]) -> int:
maxSum = currentSum = nums[0]
for i in range(1, len(nums)):
currentSum = max(currentSum + nums[i], nums[i])
maxSum = max(currentSum, m... | 36.1 | 70 | 0.551247 |
850a6f3d6ebc39eaa41867327499643c1703e3f9 | 3,815 | py | Python | bitsharesbase/account.py | cmcguojie/cmccion | 64cf1b4714e793297bf79635add2cf8d10dac3fb | [
"MIT"
] | 3 | 2018-05-21T03:45:48.000Z | 2021-03-17T00:11:22.000Z | bitsharesbase/account.py | cmcguojie/cmccion | 64cf1b4714e793297bf79635add2cf8d10dac3fb | [
"MIT"
] | null | null | null | bitsharesbase/account.py | cmcguojie/cmccion | 64cf1b4714e793297bf79635add2cf8d10dac3fb | [
"MIT"
] | 2 | 2018-04-13T18:49:54.000Z | 2018-06-06T11:34:07.000Z | from graphenebase.account import (
PasswordKey as GPHPasswordKey,
BrainKey as GPHBrainKey,
Address as GPHAddress,
PublicKey as GPHPublicKey,
PrivateKey as GPHPrivateKey
)
class PasswordKey(GPHPasswordKey):
""" This class derives a private key given the account name, the
role and a pass... | 33.464912 | 79 | 0.636435 |
9ea197201f082b55379afbe1b1bd7ad6869b5bdb | 766 | py | Python | plugins/postgres/setup.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | 1 | 2020-08-11T08:44:33.000Z | 2020-08-11T08:44:33.000Z | plugins/postgres/setup.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | null | null | null | plugins/postgres/setup.py | ClaySheffler/dbt | 588851ac1cd2ef9856706f14cee573dedbc46d8c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from setuptools import find_packages
from distutils.core import setup
package_name = "dbt-postgres"
package_version = "0.13.0"
description = """The postgres adpter plugin for dbt (data build tool)"""
setup(
name=package_name,
version=package_version,
description=description,
long... | 26.413793 | 72 | 0.659269 |
05c2d48c42245c46a74cf4764d903fed45ce6ff0 | 933 | bzl | Python | build/kotlinx_coroutines/repo.bzl | world-federation-of-advertisers/common-jvm | 38773d0dfe5661a9affb72ef27bd56424dd0fedd | [
"Apache-2.0"
] | 4 | 2021-05-17T17:48:16.000Z | 2021-05-17T18:03:59.000Z | build/kotlinx_coroutines/repo.bzl | VideoAmp/cross-media-measurement | 66fd8f1a81b7d93f23d769f7be76d529b6a8d222 | [
"Apache-2.0"
] | 23 | 2021-07-02T17:10:56.000Z | 2022-03-25T21:45:39.000Z | build/kotlinx_coroutines/repo.bzl | world-federation-of-advertisers/common-jvm | 38773d0dfe5661a9affb72ef27bd56424dd0fedd | [
"Apache-2.0"
] | 1 | 2022-02-21T09:39:05.000Z | 2022-02-21T09:39:05.000Z | # Copyright 2020 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 37.32 | 74 | 0.764202 |
717d0dfa63e1ae20a63a5d6ecc14082e34e53ccc | 25,920 | py | Python | tests/hwsim/run-tests.py | kimocoder/dragonslayer | 818d7761442cfc0dd32fbf220a750d87676d8d31 | [
"Unlicense"
] | 106 | 2019-04-11T03:18:10.000Z | 2022-02-11T10:48:47.000Z | tests/hwsim/run-tests.py | kimocoder/dragonslayer | 818d7761442cfc0dd32fbf220a750d87676d8d31 | [
"Unlicense"
] | 2 | 2019-04-11T14:07:38.000Z | 2020-06-04T14:03:38.000Z | tests/hwsim/run-tests.py | kimocoder/dragonslayer | 818d7761442cfc0dd32fbf220a750d87676d8d31 | [
"Unlicense"
] | 31 | 2019-04-11T05:21:41.000Z | 2021-08-10T17:55:36.000Z | #!/usr/bin/env python3
#
# Test case executor
# Copyright (c) 2013-2019, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import os
import re
import sys
import time
from datetime import datetime
import argparse
import subprocess
import term... | 39.332322 | 174 | 0.526042 |
7befc3849b1b84be67590ddc9fcc8e46eaf55498 | 514 | py | Python | mmdet/models/detectors/htc.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/htc.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/htc.py | mrzhuzhe/mmdetection | c04ca2c2a65500bc248a5d2ab6ace5b15f00064d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from ..builder import DETECTORS
from .cascade_rcnn import CascadeRCNN
@DETECTORS.register_module()
class HybridTaskCascade(CascadeRCNN):
"""Implementation of `HTC <https://arxiv.org/abs/1901.07518>`_"""
def __init__(self, **kwargs):
super(Hybr... | 30.235294 | 70 | 0.690661 |
7949f0e4ee9c10b0a0a3900abf472fcd7e987dda | 16,110 | py | Python | osprofiler/profiler.py | kklimonda/osprofiler | d0d65fd4f9fc762ec09b10f24f9f59c840af0198 | [
"Apache-2.0"
] | null | null | null | osprofiler/profiler.py | kklimonda/osprofiler | d0d65fd4f9fc762ec09b10f24f9f59c840af0198 | [
"Apache-2.0"
] | null | null | null | osprofiler/profiler.py | kklimonda/osprofiler | d0d65fd4f9fc762ec09b10f24f9f59c840af0198 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 36.697039 | 79 | 0.582619 |
71304b1cd665688631741dd4f59ae592efe0fbf9 | 9,790 | py | Python | Peach/Transformers/type.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | Peach/Transformers/type.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | Peach/Transformers/type.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | 1 | 2020-07-26T03:57:45.000Z | 2020-07-26T03:57:45.000Z |
'''
Type transforms (atoi, itoa, etc).
'''
#
# Copyright (c) Michael Eddington
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation... | 24.910941 | 80 | 0.636977 |
f87bf4157ba26dde700415e3961f71152dcefb8b | 608 | py | Python | non-stiff/problem-1-matrix-bounds/plot_naive.py | ooreilly/sbp | 47bf92f3ba3a6146250331a8c657948475f72e7c | [
"MIT"
] | 3 | 2021-09-03T08:55:53.000Z | 2021-11-11T02:51:03.000Z | non-stiff/problem-1-matrix-bounds/plot_naive.py | ooreilly/sbp | 47bf92f3ba3a6146250331a8c657948475f72e7c | [
"MIT"
] | null | null | null | non-stiff/problem-1-matrix-bounds/plot_naive.py | ooreilly/sbp | 47bf92f3ba3a6146250331a8c657948475f72e7c | [
"MIT"
] | 4 | 2017-05-13T08:27:21.000Z | 2021-10-05T08:22:55.000Z | import hdf5storage
import matplotlib.pyplot as plt
import sys
filename = sys.argv[1]
show= int(sys.argv[2])
out = sys.argv[3]
spec = hdf5storage.loadmat(filename)
alpha = spec["alpha"]
Mnorm = spec["Mnorm"]
rd = spec["rd"]
rl = spec["rl"]
sd = spec["sd"]
sl = spec["sl"]
lower = rl * abs(spec["sigma_norm_lower"])
upp... | 21.714286 | 54 | 0.634868 |
bd75f2956ac4286cc941b717889dddbc6ac520b8 | 629 | py | Python | backend/manage.py | crowdbotics-dev/test234-5 | 39e21359830aadfebd86935ca21196f89e10ceb2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-dev/test234-5 | 39e21359830aadfebd86935ca21196f89e10ceb2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-dev/test234-5 | 39e21359830aadfebd86935ca21196f89e10ceb2 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test234_5.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... | 28.590909 | 73 | 0.683625 |
1879328c24e103cdf300be82ed4da64b85bdaeb7 | 1,715 | py | Python | test/python/test_cast.py | conradjones/ngraph-bridge | 042011e6653b3ac0983511cf6604f9881cc6ee4b | [
"Apache-2.0"
] | null | null | null | test/python/test_cast.py | conradjones/ngraph-bridge | 042011e6653b3ac0983511cf6604f9881cc6ee4b | [
"Apache-2.0"
] | null | null | null | test/python/test_cast.py | conradjones/ngraph-bridge | 042011e6653b3ac0983511cf6604f9881cc6ee4b | [
"Apache-2.0"
] | null | null | null | # ==============================================================================
# Copyright 2018-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 32.980769 | 80 | 0.619825 |
403f2c5c3a79940b2ef4c030fa215345f036a34e | 5,322 | py | Python | plugin.video.metalliq/resources/lib/meta/utils/text.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:37:15.000Z | 2019-03-05T09:37:15.000Z | plugin.video.metalliq/resources/lib/meta/utils/text.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | plugin.video.metalliq/resources/lib/meta/utils/text.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | import copy
import urllib
import time
import re
from urlparse import urlparse, parse_qs, urlunparse
# from xml.sax.saxutils import unescape as xml_unescape
ACTION_REGEX = re.compile("(.*?)\((.*)\)")
def page_redux(page):
pages = []
if "|" in page: prepages = page.split("|")
else: prepages = [page]
r... | 26.878788 | 140 | 0.544908 |
20062bdf8905c7a4c1c43a2be908cf13167a062d | 8,209 | py | Python | train.py | rizwandel/yolov3-tf2 | 71208e1a6a77485c01d1bfe7247a244b1c39fa1a | [
"MIT"
] | 10 | 2020-09-26T14:00:37.000Z | 2022-02-17T06:22:35.000Z | train.py | rizwandel/yolov3-tf2 | 71208e1a6a77485c01d1bfe7247a244b1c39fa1a | [
"MIT"
] | null | null | null | train.py | rizwandel/yolov3-tf2 | 71208e1a6a77485c01d1bfe7247a244b1c39fa1a | [
"MIT"
] | 8 | 2020-11-20T01:13:42.000Z | 2021-11-23T07:01:51.000Z | from absl import app, flags, logging
from absl.flags import FLAGS
import tensorflow as tf
import numpy as np
import cv2
from tensorflow.keras.callbacks import (
ReduceLROnPlateau,
EarlyStopping,
ModelCheckpoint,
TensorBoard
)
from yolov3_tf2.models import (
YoloV3, YoloV3Tiny, YoloLoss,
yolo_an... | 41.459596 | 103 | 0.617128 |
8fce5a99a851f54283286fbad18975d38a28609e | 6,334 | py | Python | fashion-example-query/fashion/app.py | jyothishkjames/examples | 2853e2cde70468d0425d1961234a6673c449e0db | [
"Apache-2.0"
] | null | null | null | fashion-example-query/fashion/app.py | jyothishkjames/examples | 2853e2cde70468d0425d1961234a6673c449e0db | [
"Apache-2.0"
] | null | null | null | fashion-example-query/fashion/app.py | jyothishkjames/examples | 2853e2cde70468d0425d1961234a6673c449e0db | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import os
import sys
import urllib.request
import gzip
import numpy as np
import webbrowser
import random
from jina.flow import Flow
from jina.clients.python import ProgressBar
from jina.helper import colored
from ... | 31.512438 | 107 | 0.605778 |
a46d70d9c10c1602ab4ddc634e9d01789cce54a5 | 4,819 | py | Python | pyleecan/Classes/ScalarProductL2.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/ScalarProductL2.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/ScalarProductL2.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File generated according to Generator/ClassesRef/Mesh/Interpolation/ScalarProductL2.csv
# WARNING! All changes made in this file will be lost!
"""Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Mesh/ScalarProductL2
"""
from os import linesep
from sys im... | 36.507576 | 111 | 0.671716 |
f285d97e25cdbd92e8fee0f92b49a6e0d2fc1a36 | 10,317 | py | Python | flexget/terminal.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | flexget/terminal.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | flexget/terminal.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | import contextlib
import sys
import threading
from textwrap import wrap
from colorclass import Color, Windows
from terminaltables import (
AsciiTable,
DoubleTable,
GithubFlavoredMarkdownTable,
PorcelainTable,
SingleTable,
)
from terminaltables.terminal_io import terminal_size
from flexget.options ... | 33.82623 | 116 | 0.631967 |
8053ae18a23c8dd5c3d9bf99c5da3a391d40f31b | 15,427 | py | Python | crazyflie-lib-python/cflib/positioning/motion_commander.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | crazyflie-lib-python/cflib/positioning/motion_commander.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | crazyflie-lib-python/cflib/positioning/motion_commander.py | loujiabin1994/crazyswarm | 893325b63b3b19015fe261bfa989846a1c82dc82 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 2017 Bitcraze AB
#
# Th... | 32.072765 | 79 | 0.625656 |
8cbe9d6ad2acb90980dd1ac9c32ba0ab046f2ba6 | 5,919 | py | Python | exec.py | wellhowtosay/Smbop_mt | f4b0feb9308632cfe31d4dc47efdbae672439bf7 | [
"MIT"
] | null | null | null | exec.py | wellhowtosay/Smbop_mt | f4b0feb9308632cfe31d4dc47efdbae672439bf7 | [
"MIT"
] | null | null | null | exec.py | wellhowtosay/Smbop_mt | f4b0feb9308632cfe31d4dc47efdbae672439bf7 | [
"MIT"
] | null | null | null | import json
import argparse
import contextlib
import sh
import subprocess
import pathlib
from allennlp.commands.train import train_model
from allennlp.common import Params
# from smbop.dataset_readers.spider import SmbopSpiderDatasetReader
from smbop.dataset_readers.cosql import SmbopCoSqlDatasetReader
from smbop.mode... | 39.993243 | 127 | 0.687954 |
13b244e6f8b59a71404f29b92d9a576ab457e2d2 | 1,857 | py | Python | ch08/fetch_prediction_requests.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | 1 | 2020-02-13T05:45:13.000Z | 2020-02-13T05:45:13.000Z | ch08/fetch_prediction_requests.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | null | null | null | ch08/fetch_prediction_requests.py | wikibook/agile-data-science | 7769fc2d6c810e9f1a64e45d3684e9260d99d983 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os, re
import json
import datetime, iso8601
# 몽고DB로 저장
from bson import json_util
import pymongo_spark
pymongo_spark.activate()
# airflow에서 날짜와 기본 경로를 main()으로 전달
def main(iso_date, base_path):
APP_NAME = "fetch_prediction_requests.py"
# SparkSession이 없으면 환경 생성
try:
... | 25.438356 | 80 | 0.7049 |
d8be983f911bbd3f0af9c585e520f829a3ffe85a | 34 | py | Python | starbot/cogs/__init__.py | alexhelms/starbot | 45e2e04290b5ef82f5de66cee4ad3ad4e833673a | [
"MIT"
] | null | null | null | starbot/cogs/__init__.py | alexhelms/starbot | 45e2e04290b5ef82f5de66cee4ad3ad4e833673a | [
"MIT"
] | null | null | null | starbot/cogs/__init__.py | alexhelms/starbot | 45e2e04290b5ef82f5de66cee4ad3ad4e833673a | [
"MIT"
] | null | null | null | from .analysis import AnalysisCog
| 17 | 33 | 0.852941 |
081d7c0aee4281d291ab37d3deae5be4f62f02d9 | 961 | py | Python | setup.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | null | null | null | setup.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | null | null | null | setup.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | null | null | null | from os import walk
from ccal import VERSION
from setuptools import setup
package_data = []
for directory_path, directory_names, file_names in walk("data"):
for file_name in file_names:
package_data.append("{}/{}".format(directory_path, file_name))
setup(
name="ccal",
version=VERSION,
desc... | 27.457143 | 70 | 0.659729 |
9de7f5d39e9e04f5ac01488e889897d685390f31 | 4,345 | py | Python | paasta_tools/paastaapi/models/instance_status_kafkacluster.py | rohangulati/paasta | 4539e39159424bfbdeddcb243ca337bcd1eb1a06 | [
"Apache-2.0"
] | null | null | null | paasta_tools/paastaapi/models/instance_status_kafkacluster.py | rohangulati/paasta | 4539e39159424bfbdeddcb243ca337bcd1eb1a06 | [
"Apache-2.0"
] | null | null | null | paasta_tools/paastaapi/models/instance_status_kafkacluster.py | rohangulati/paasta | 4539e39159424bfbdeddcb243ca337bcd1eb1a06 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Paasta API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from... | 28.774834 | 124 | 0.594476 |
21b28edfb6b67c3981b4c62dd24c5b3d0018724e | 2,991 | py | Python | picard/functor.py | thejohnfreeman/picard | 09b39d6655e1df071ea9f3f63eaf35ddbd2f0e0f | [
"MIT"
] | 3 | 2018-12-28T03:14:49.000Z | 2019-05-24T21:05:13.000Z | picard/functor.py | thejohnfreeman/picard | 09b39d6655e1df071ea9f3f63eaf35ddbd2f0e0f | [
"MIT"
] | null | null | null | picard/functor.py | thejohnfreeman/picard | 09b39d6655e1df071ea9f3f63eaf35ddbd2f0e0f | [
"MIT"
] | null | null | null | """Recursive synchronous fmap for Python."""
import itertools
import typing as t
import typing_extensions as tex
@tex.runtime
class Functor(tex.Protocol):
"""A user-defined functor with a synchronous fmap."""
def _fmap_(self, function) -> 'Functor':
# pylint: disable=no-self-use,unused-argument,pointl... | 33.233333 | 78 | 0.684386 |
d161f64636960dea87355e32ec62a72d831ee554 | 81,572 | py | Python | djangoSIGE/apps/fiscal/views/processador_nf.py | dayvidallan/mercadinho22h | 0f67bdb545978543d72ab4b9b16e1d33ecec6293 | [
"MIT"
] | null | null | null | djangoSIGE/apps/fiscal/views/processador_nf.py | dayvidallan/mercadinho22h | 0f67bdb545978543d72ab4b9b16e1d33ecec6293 | [
"MIT"
] | null | null | null | djangoSIGE/apps/fiscal/views/processador_nf.py | dayvidallan/mercadinho22h | 0f67bdb545978543d72ab4b9b16e1d33ecec6293 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from djangoSIGE.apps.fiscal.models import NotaFiscalSaida, NotaFiscalEntrada, ConfiguracaoNotaFiscal, AutXML, \
ErrosValidacaoNotaFiscal, RespostaSefazNotaFiscal, NaturezaOperacao, GrupoFiscal, \
ICMS, ICMSUFDest, ICMSSN, IPI, PIS, COFINS
from djangoSIGE.configs.settings import MEDIA_RO... | 49.497573 | 250 | 0.581977 |
3d04ce5caeafb7afe6d9e4e607afffaddff2c9c2 | 11,294 | py | Python | ginga/examples/qt/example2_qt.py | ayoub-root/ginga | 51eb46607c001494443e0eb2bded77a07795672e | [
"BSD-3-Clause"
] | 1 | 2019-04-27T01:34:27.000Z | 2019-04-27T01:34:27.000Z | ginga/examples/qt/example2_qt.py | ayoub-root/ginga | 51eb46607c001494443e0eb2bded77a07795672e | [
"BSD-3-Clause"
] | null | null | null | ginga/examples/qt/example2_qt.py | ayoub-root/ginga | 51eb46607c001494443e0eb2bded77a07795672e | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
#
# example2_qt.py -- Simple, configurable FITS viewer.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import sys
from ginga.qtw.QtHelp import QtGui, QtCore
from ginga import AstroImage, colors
from ginga.qtw.ImageViewQt import Ca... | 32.736232 | 100 | 0.595006 |
66f60bb1b0b4b7bc1bb621fd006afa7e9c3c888c | 78 | py | Python | examples/get_appeal_url.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | examples/get_appeal_url.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | examples/get_appeal_url.py | KristN1/cube_appeals | f81503ee665d6a69f3a5b06a69bddb020194f713 | [
"MIT"
] | null | null | null | from cube_appeals import get_appeal_url
print(get_appeal_url.java("Jukaido")) | 26 | 39 | 0.846154 |
9388a95bb76ebb6788d56a446002462e9f840de7 | 1,756 | py | Python | devices/pcon/Web API/Python/GetListOfTasks.py | PRESYSOWNER/AdvancedFamilyCalibrators | 060959ae745ab3c078832722782251d3d52bf191 | [
"Apache-2.0"
] | null | null | null | devices/pcon/Web API/Python/GetListOfTasks.py | PRESYSOWNER/AdvancedFamilyCalibrators | 060959ae745ab3c078832722782251d3d52bf191 | [
"Apache-2.0"
] | null | null | null | devices/pcon/Web API/Python/GetListOfTasks.py | PRESYSOWNER/AdvancedFamilyCalibrators | 060959ae745ab3c078832722782251d3d52bf191 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Presys Instrumentos e Sistemas Ltda.
# 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... | 27.873016 | 76 | 0.734055 |
0f40e9ee78aeff53f928cf0396832b40a96dc650 | 4,037 | py | Python | Taran/code.py | tpreetkour/greyatom-python-for-data-science | 5f8ddeb2ae75cfd2c47f4b2d029d705679afa0e5 | [
"MIT"
] | null | null | null | Taran/code.py | tpreetkour/greyatom-python-for-data-science | 5f8ddeb2ae75cfd2c47f4b2d029d705679afa0e5 | [
"MIT"
] | null | null | null | Taran/code.py | tpreetkour/greyatom-python-for-data-science | 5f8ddeb2ae75cfd2c47f4b2d029d705679afa0e5 | [
"MIT"
] | null | null | null | # --------------
#Code starts here
#Function to read file
def read_file(path):
#Opening of the file located in the path in 'read' mode
file=open(path,'r')
#Reading of the first line of the file and storing it in a variable
sentence=file.readline()
#Closing of the file
file.close(... | 21.821622 | 72 | 0.689621 |
09d9c6e3a8b47353307ccb2b3cf8c178d8770ae7 | 17,339 | py | Python | lib/spack/spack/bootstrap.py | wangyk6636/spack | 4ddc0ff218d5ed0968f6efb0fac855b1b7127375 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/bootstrap.py | wangyk6636/spack | 4ddc0ff218d5ed0968f6efb0fac855b1b7127375 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 10 | 2021-02-23T14:05:37.000Z | 2021-09-14T05:04:37.000Z | lib/spack/spack/bootstrap.py | RemiLacroix-IDRIS/spack | 3e2f890467d448f746244be9d30b2f78aefe0dcb | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # 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 __future__ import print_function
import contextlib
import json
import os
import sys
try:
import sysconfig # nov... | 36.350105 | 85 | 0.629794 |
d52114ac8b79c7e1a342afdb58e46070af598b2d | 3,097 | py | Python | test/txsample_http_client.py | common-workflow-language/avro | 977a9ecc1cbba4c9920c704ba5f5176f6838d9a7 | [
"Apache-2.0"
] | null | null | null | test/txsample_http_client.py | common-workflow-language/avro | 977a9ecc1cbba4c9920c704ba5f5176f6838d9a7 | [
"Apache-2.0"
] | 1 | 2017-08-03T17:39:38.000Z | 2017-08-03T17:39:38.000Z | test/txsample_http_client.py | common-workflow-language/avro | 977a9ecc1cbba4c9920c704ba5f5176f6838d9a7 | [
"Apache-2.0"
] | 1 | 2017-08-02T21:42:18.000Z | 2017-08-02T21:42:18.000Z | #!/usr/bin/env python
# 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
# "L... | 28.412844 | 74 | 0.679044 |
cd58275f77aa04aedd271ebf94859a2125f4ba4c | 51 | py | Python | abc/abc107/abc107a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | abc/abc107/abc107a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | abc/abc107/abc107a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | N, i = map(int, input().split())
print(N - i + 1)
| 12.75 | 32 | 0.509804 |
671e33ade5c09388693f8ec4e4cf581839cd40d5 | 94 | py | Python | Ex_Files_Python_EssT/Exercise Files/Chap02/hello-cwd.py | cinthiatengan/Basic-Python | 9dbc280af2e9af9b79421018be814d0f178d8097 | [
"MIT"
] | 4 | 2019-09-04T05:28:02.000Z | 2020-02-06T11:03:29.000Z | Linkedin_Learning/Python_Essential_Training/Exercise Files/Chap02/hello-cwd.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | Linkedin_Learning/Python_Essential_Training/Exercise Files/Chap02/hello-cwd.py | EvanthiosPapadopoulos/Python3 | ab773fd458e365c1510f98ecac65965234c881e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2009-2017 BHG http://bw.org/
import os
print(os.getcwd())
| 15.666667 | 40 | 0.702128 |
cfd15cd22cdf861c91aa7e4e087ab562475447ea | 2,035 | py | Python | Gap_Statistic.py | reddyprasade/A-Criterion-for-Deciding-the-Number-of-Clusters-in-a-Dataset-Based-on-Data-Depth | e9b8fa4d6b815a4b1893df8376c71d1501457c27 | [
"Apache-2.0"
] | null | null | null | Gap_Statistic.py | reddyprasade/A-Criterion-for-Deciding-the-Number-of-Clusters-in-a-Dataset-Based-on-Data-Depth | e9b8fa4d6b815a4b1893df8376c71d1501457c27 | [
"Apache-2.0"
] | null | null | null | Gap_Statistic.py | reddyprasade/A-Criterion-for-Deciding-the-Number-of-Clusters-in-a-Dataset-Based-on-Data-Depth | e9b8fa4d6b815a4b1893df8376c71d1501457c27 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn import datasets
iris = datasets.load_iris()
cluster_df = iris.data
# Gap Statistic for K means
def optimalK(data, nrefs=3, maxClusters=15):
"""
Calculate... | 35.701754 | 112 | 0.612776 |
6d18afc63797c3e4d9b33e3d407c232448189a6f | 1,329 | py | Python | mmhuman3d/data/datasets/dataset_wrappers.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 472 | 2021-12-03T03:12:55.000Z | 2022-03-31T01:33:13.000Z | mmhuman3d/data/datasets/dataset_wrappers.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 127 | 2021-12-03T05:00:14.000Z | 2022-03-31T13:47:33.000Z | mmhuman3d/data/datasets/dataset_wrappers.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 37 | 2021-12-03T03:23:22.000Z | 2022-03-31T08:41:58.000Z | from torch.utils.data.dataset import ConcatDataset as _ConcatDataset
from torch.utils.data.dataset import Dataset
from .builder import DATASETS
@DATASETS.register_module()
class ConcatDataset(_ConcatDataset):
"""A wrapper of concatenated dataset.
Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but
... | 27.6875 | 78 | 0.688488 |
8e4d526563a86212d32a026b921da663429f43d8 | 4,890 | py | Python | gcs_inventory_loader/cli/listen.py | WahyuMW/gcs-inventory-loader | 60888c1123508e2b59739688cf0b640122f17c0f | [
"Apache-2.0"
] | 29 | 2020-01-08T18:59:57.000Z | 2022-03-29T14:22:15.000Z | gcs_inventory_loader/cli/listen.py | WahyuMW/gcs-inventory-loader | 60888c1123508e2b59739688cf0b640122f17c0f | [
"Apache-2.0"
] | 1 | 2021-08-16T17:43:50.000Z | 2021-08-16T17:43:50.000Z | gcs_inventory_loader/cli/listen.py | WahyuMW/gcs-inventory-loader | 60888c1123508e2b59739688cf0b640122f17c0f | [
"Apache-2.0"
] | 4 | 2020-07-03T03:17:42.000Z | 2021-08-10T16:45:34.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.693431 | 97 | 0.6591 |
43b6b3b0ddfeada302363b359ab85f2def9e6436 | 5,420 | py | Python | music/views.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | null | null | null | music/views.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | 15 | 2020-06-07T07:58:05.000Z | 2022-01-19T16:53:47.000Z | music/views.py | PickBas/meta-social | f6fb0a50c30e240086a75917b705dfdc71dbebf9 | [
"MIT"
] | null | null | null | """
Meta social music views
"""
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from index.views import MetaSocialView
from simple_search import search_filter
from .forms import UploadMusicForm
from user_profile.models import Profile
from us... | 31.882353 | 98 | 0.585978 |
2873d0c169fe49ab6421099c3b48b76cdf5dc2f3 | 9,802 | py | Python | datasets/DOTA_devkit/ResultMerge_multi_process.py | ming71/DAL | 48cd29fdbf5eeea1b5b642bd1f04bbf1863b31e3 | [
"Apache-2.0"
] | 206 | 2020-09-12T06:17:00.000Z | 2022-03-28T08:05:51.000Z | datasets/DOTA_devkit/ResultMerge_multi_process.py | JOOCHANN/DAL | 0f379de70ba01c6c9162f4e980a8bd2491976e9c | [
"Apache-2.0"
] | 47 | 2020-10-21T06:14:18.000Z | 2022-03-16T01:54:28.000Z | datasets/DOTA_devkit/ResultMerge_multi_process.py | JOOCHANN/DAL | 0f379de70ba01c6c9162f4e980a8bd2491976e9c | [
"Apache-2.0"
] | 38 | 2020-10-22T10:39:51.000Z | 2022-03-17T12:36:46.000Z | """
To use the code, users should to config detpath, annopath and imagesetfile
detpath is the path for 15 result files, for the format, you can refer to "http://captain.whu.edu.cn/DOTAweb/tasks.html"
search for PATH_TO_BE_CONFIGURED to config the paths
Note, the evaluation is on the large scale images
"... | 32.03268 | 124 | 0.544991 |
44824a1d584ce797b66e2b003970096ce62f2480 | 429 | py | Python | bot/cogs/ping.py | diegorusso/discordbot | 528ab3738b9fe759d65b73f59de8e9cb64f0ac45 | [
"MIT"
] | null | null | null | bot/cogs/ping.py | diegorusso/discordbot | 528ab3738b9fe759d65b73f59de8e9cb64f0ac45 | [
"MIT"
] | 2 | 2018-02-11T16:39:47.000Z | 2020-08-11T09:34:27.000Z | bot/cogs/ping.py | diegorusso/discordbot | 528ab3738b9fe759d65b73f59de8e9cb64f0ac45 | [
"MIT"
] | 1 | 2018-02-11T19:42:04.000Z | 2018-02-11T19:42:04.000Z | """Ping module."""
from discord.ext import commands
class Ping:
"""Ping class."""
def __init__(self, bot):
"""Init method for Ping."""
self.bot = bot
@commands.command()
async def ping(self):
"""Simple command to test the bot.
:return: Pong!
"""
awai... | 17.16 | 47 | 0.552448 |
fad9703b3d7e40a46adddc10f03f5f6087928fbc | 152 | py | Python | app.py | jeffpace72/sample-flask | 808d4bd6bf8c160e2423a1f9a71275406ec3a85e | [
"MIT"
] | null | null | null | app.py | jeffpace72/sample-flask | 808d4bd6bf8c160e2423a1f9a71275406ec3a85e | [
"MIT"
] | null | null | null | app.py | jeffpace72/sample-flask | 808d4bd6bf8c160e2423a1f9a71275406ec3a85e | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("index.html")
| 15.2 | 40 | 0.730263 |
0992717ff94475aac791df6e56fc3d091396ae63 | 10,974 | py | Python | data/preprocess_wos.py | TownShaw/HiAGM | 26c20362467ab703cde4eb0352809de622deddf0 | [
"MIT"
] | 105 | 2020-06-24T09:22:27.000Z | 2022-03-26T03:10:31.000Z | data/preprocess_wos.py | TownShaw/HiAGM | 26c20362467ab703cde4eb0352809de622deddf0 | [
"MIT"
] | 9 | 2020-07-18T05:38:11.000Z | 2022-02-24T03:36:49.000Z | data/preprocess_wos.py | TownShaw/HiAGM | 26c20362467ab703cde4eb0352809de622deddf0 | [
"MIT"
] | 22 | 2020-06-24T02:43:46.000Z | 2022-03-08T04:12:19.000Z | #!/usr/bin/env python
# coding:utf-8
import os
import json
import numpy as np
from sklearn.model_selection import train_test_split
import re
"""
WoS Reference: https://github.com/kk7nc/HDLTex
"""
FILE_DIR = 'web-of-science-dataset/WebOfScience/Meta-data/Data.txt'
total_len = []
np.random.seed(7)
english_stopwords = ... | 60.629834 | 3,779 | 0.59641 |
7e7dd8f34a07806f8e711e5ae07fa72768ee7e82 | 40,176 | py | Python | nova/tests/objects/test_instance.py | x-ion-de/nova | 2e2174e3831a543d052c75a2715cb6032447f964 | [
"Apache-2.0"
] | null | null | null | nova/tests/objects/test_instance.py | x-ion-de/nova | 2e2174e3831a543d052c75a2715cb6032447f964 | [
"Apache-2.0"
] | null | null | null | nova/tests/objects/test_instance.py | x-ion-de/nova | 2e2174e3831a543d052c75a2715cb6032447f964 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corp.
#
# 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... | 46.126292 | 79 | 0.585623 |
d2399b282b2a47e1bac7e3ee5eb445b5a86e4d5c | 5,299 | py | Python | backend/src/src/config.py | mRcSchwering/prevailing-winds | 5515f05fa7012a47bc665883b30a47f1ab251835 | [
"MIT"
] | 3 | 2021-05-12T12:14:11.000Z | 2021-10-02T13:06:41.000Z | backend/src/src/config.py | mRcSchwering/prevailing-winds | 5515f05fa7012a47bc665883b30a47f1ab251835 | [
"MIT"
] | 14 | 2021-03-18T18:01:03.000Z | 2021-10-03T16:57:11.000Z | backend/src/src/config.py | mRcSchwering/prevailing-winds | 5515f05fa7012a47bc665883b30a47f1ab251835 | [
"MIT"
] | null | null | null | """
Global config env vars > defaults
Environment variables have to be defined in template.yaml
as environment variables for Lambda functions.
"""
import datetime as dt
UTC_NOW = dt.datetime.utcnow()
UTC_NOW_TS = UTC_NOW.timestamp()
# AWS
AWS_REGION = "eu-central-1"
CONTENT_BUCKET_NAME = "prevailing-winds-data"
# C... | 23.762332 | 88 | 0.458577 |
2ebdf2716dbdb6dcfafb1a3bf904d621ec68543a | 1,414 | py | Python | aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DeleteAllTrafficSpecialControlRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DeleteAllTrafficSpecialControlRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DeleteAllTrafficSpecialControlRequest.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... | 39.277778 | 101 | 0.782178 |
68e3b3e5e01fd697465ac023d9b00d2295dac2f9 | 384 | py | Python | libs/python-axolotl/axolotl/ecc/eckeypair.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 4 | 2018-12-14T20:42:52.000Z | 2022-02-15T07:52:44.000Z | libs/python-axolotl/axolotl/ecc/eckeypair.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 1 | 2019-09-19T00:46:55.000Z | 2019-09-19T00:46:55.000Z | libs/python-axolotl/axolotl/ecc/eckeypair.py | akshitpradhan/TomHack | 837226e7b38de1140c19bc2d478eeb9e379ed1fd | [
"MIT"
] | 2 | 2019-01-16T04:02:34.000Z | 2020-02-26T20:46:19.000Z | # -*- coding: utf-8 -*-
class ECKeyPair():
def __init__(self, publicKey, privateKey):
"""
:type publicKey: ECPublicKey
:type privateKey: ECPrivateKey
"""
self.publicKey = publicKey
self.privateKey = privateKey
def getPrivateKey(self):
return self.privat... | 21.333333 | 46 | 0.604167 |
211f4664de673847cfee7b108f5e91259bcdf0bb | 1,667 | py | Python | modules/encrypt.py | alexyy802/chad-the-discord-bot | c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85 | [
"Unlicense",
"MIT"
] | 1 | 2021-12-20T16:15:20.000Z | 2021-12-20T16:15:20.000Z | modules/encrypt.py | alexyy802/chad-the-discord-bot | c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85 | [
"Unlicense",
"MIT"
] | 1 | 2021-10-04T16:00:35.000Z | 2021-10-04T16:00:35.000Z | modules/encrypt.py | alexyy802/chad-the-discord-bot | c1d121fcfa278f5cd0fa0242c4b0c760d1eebb85 | [
"Unlicense",
"MIT"
] | 2 | 2021-10-04T16:16:44.000Z | 2021-11-15T19:19:07.000Z | import random
import os
from dotenv import load_dotenv
load_dotenv()
key = os.getenv('key')
alphabet = os.getenv('alphabet')
def encrypt_text(plaintext):
first_j = False
if plaintext.startswith('j'):
first_j = True
def makeKey(alphabet): # needed only while making new key
alphabet = lis... | 30.87037 | 100 | 0.605279 |
6527efbdbcc3142a9766b5df27460e8b991b2847 | 3,348 | py | Python | sdmdl/sdmdl/data_prep/presence_map.py | naturalis/trait-geo-diverse-angiosperms | 034ce4e807f7a83d31bf7b46435275ba91cfcb00 | [
"MIT"
] | 13 | 2019-11-06T05:43:01.000Z | 2022-03-16T11:47:26.000Z | sdmdl/sdmdl/data_prep/presence_map.py | naturalis/sdmdl | 034ce4e807f7a83d31bf7b46435275ba91cfcb00 | [
"MIT"
] | 249 | 2019-08-21T10:14:25.000Z | 2022-03-24T02:30:58.000Z | sdmdl/sdmdl/data_prep/presence_map.py | naturalis/sdmdl | 034ce4e807f7a83d31bf7b46435275ba91cfcb00 | [
"MIT"
] | 8 | 2019-08-21T11:07:30.000Z | 2021-10-20T02:19:18.000Z | import pandas as pd
import rasterio
import tqdm
import os
# PresenceMap could include functionality on creating the empty map from scratch.
# This would require parameters in the config file for resolution and affine projection / spatial extent
# The empty land map raster can be generated from a simple shapefile (whi... | 49.970149 | 143 | 0.688172 |
0589ea4ea67653c3860c2a854fccb77792ded4cc | 6,839 | py | Python | tests/frontier/blockchain_st_test_helpers.py | muddlebee/execution-specs | f8f051a95ae2b0ff1dc0fd7b69b5aa6a9bbfea9e | [
"CC0-1.0"
] | 102 | 2021-08-19T02:44:03.000Z | 2022-03-27T23:46:00.000Z | tests/frontier/blockchain_st_test_helpers.py | muddlebee/execution-specs | f8f051a95ae2b0ff1dc0fd7b69b5aa6a9bbfea9e | [
"CC0-1.0"
] | 264 | 2021-08-18T14:15:26.000Z | 2022-03-31T12:24:23.000Z | tests/frontier/blockchain_st_test_helpers.py | ultratwo/execution-specs | 55d7fd716fc194b30e37a6e487c191445dfec9bc | [
"CC0-1.0"
] | 30 | 2021-08-20T05:38:34.000Z | 2022-01-19T06:49:29.000Z | import json
import os
from functools import partial
from typing import Any, Dict, List, Tuple, cast
from unittest.mock import call, patch
from ethereum import rlp
from ethereum.base_types import U256, Bytes0
from ethereum.crypto import Hash32
from ethereum.frontier.eth_types import (
Account,
Block,
Bloom,... | 32.107981 | 83 | 0.635912 |
cd6bd29e0de01aed9bc7a1954b3427923b283373 | 19,747 | py | Python | tensorflow/python/kernel_tests/confusion_matrix_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/kernel_tests/confusion_matrix_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/kernel_tests/confusion_matrix_test.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... | 39.025692 | 80 | 0.688358 |
33379bd5fc51677b84f4e4fcea7b780d1b5bb782 | 414 | py | Python | UCourse/exams/migrations/0024_studentexam_is_pass.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | 1 | 2020-08-31T22:40:27.000Z | 2020-08-31T22:40:27.000Z | UCourse/exams/migrations/0024_studentexam_is_pass.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | 13 | 2020-08-05T16:17:09.000Z | 2022-03-12T00:18:42.000Z | UCourse/exams/migrations/0024_studentexam_is_pass.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-09-06 13:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('exams', '0023_auto_20200906_1905'),
]
operations = [
migrations.AddField(
model_name='studentexam',
name='is_pass',
... | 21.789474 | 76 | 0.611111 |
0ca2f9fce3725d6eaf0f606b5c68aab599999f98 | 9,148 | py | Python | faker/providers/address/fr_FR/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 14 | 2020-08-01T21:30:04.000Z | 2022-01-24T19:13:14.000Z | faker/providers/address/fr_FR/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 10 | 2020-03-24T10:47:53.000Z | 2021-04-08T19:51:44.000Z | faker/providers/address/fr_FR/__init__.py | StabbarN/faker | 57882ff73255cb248d8f995b2abfce5cfee45ab3 | [
"MIT"
] | 3 | 2021-04-30T14:04:29.000Z | 2022-03-31T14:34:59.000Z | from .. import Provider as AddressProvider
class Provider(AddressProvider):
city_suffixes = ('Ville', 'Bourg', '-les-Bains',
'-sur-Mer', '-la-Forêt', 'boeuf', 'nec', 'dan')
city_prefixes = ('Saint', 'Sainte')
street_prefixes = ('rue', 'rue', 'chemin', 'avenue', 'boulevard')
city_f... | 51.683616 | 120 | 0.53979 |
c8d232cccfafa62b9a8f0cd59b94f5260a4734af | 21,861 | py | Python | flash/data/process.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | flash/data/process.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | flash/data/process.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 36.133884 | 119 | 0.659439 |
fd2adf158d35cd6be7e202607c434573e27673e8 | 20,949 | py | Python | brian2/tests/test_GSL.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_GSL.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_GSL.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | import functools
import pytest
from brian2 import *
from brian2.core.preferences import PreferenceError
from brian2.codegen.runtime.GSLcython_rt import IntegrationError
from brian2.stateupdaters.base import UnsupportedEquationsException
from brian2.tests.utils import exc_isinstance
max_difference = .1*mV
pytestmar... | 38.368132 | 112 | 0.618407 |
d13d3c60e9cbabdc90f21f3a205d27bf0e37c1c9 | 3,475 | py | Python | bindings/python/ensmallen/datasets/string/bartonellaspwd162.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/bartonellaspwd162.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/bartonellaspwd162.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Bartonella sp. WD16.2.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ... | 33.095238 | 223 | 0.675396 |
d6e14ee164512e5102c654366809f4bb4c7487f5 | 6,200 | py | Python | src/ralph_assets/tests/functional/tests_form_validation.py | kula1922/ralph_assets | 613d9ae716a51cdfc76669f2b1e3391073b77da2 | [
"Apache-2.0"
] | null | null | null | src/ralph_assets/tests/functional/tests_form_validation.py | kula1922/ralph_assets | 613d9ae716a51cdfc76669f2b1e3391073b77da2 | [
"Apache-2.0"
] | null | null | null | src/ralph_assets/tests/functional/tests_form_validation.py | kula1922/ralph_assets | 613d9ae716a51cdfc76669f2b1e3391073b77da2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.test import TestCase
from ralph_assets.models import AssetType, AssetSource, AssetStatus
from ralph_assets.tests.util import (
c... | 35.227273 | 90 | 0.559032 |
9ae56828cf3823823240f69810d434a49217e362 | 7,627 | py | Python | azure-mgmt-consumption/tests/test_mgmt_consumption.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-consumption/tests/test_mgmt_consumption.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure-mgmt-consumption/tests/test_mgmt_consumption.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 58.221374 | 182 | 0.726891 |
e948f097420859fc933992bf06479c6beab031e1 | 1,637 | py | Python | 00prepare/00download_data.py | ko-ya346/python_asr | 251d8a4ff810fbeb5f7b63229139944195ab7cb5 | [
"MIT"
] | null | null | null | 00prepare/00download_data.py | ko-ya346/python_asr | 251d8a4ff810fbeb5f7b63229139944195ab7cb5 | [
"MIT"
] | null | null | null | 00prepare/00download_data.py | ko-ya346/python_asr | 251d8a4ff810fbeb5f7b63229139944195ab7cb5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 本書で取り扱う音声データと,ラベルデータをダウンロードします.
# データは,JSUTコーパスを使用します.
# https://sites.google.com/site/shinnosuketakamichi/publication/jsut
#
# ファイルをダウンロードするためのモジュールをインポート
from urllib.request import urlretrieve
# zipファイルを展開するためのモジュールをインポート
import zipfile
# osモジュールをインポート
import os
import sys
#
# メイン関数
#... | 23.724638 | 82 | 0.690898 |
b9bd374824603dcc14f26eeb24e19c8063291f0c | 3,230 | py | Python | selfdrive/test/test_cpu_usage.py | Fryelock/openpilot | 9a78378b81a66b5ea6c5f0a9c211e24210233327 | [
"MIT"
] | 1 | 2020-08-01T22:20:47.000Z | 2020-08-01T22:20:47.000Z | selfdrive/test/test_cpu_usage.py | Fryelock/openpilot | 9a78378b81a66b5ea6c5f0a9c211e24210233327 | [
"MIT"
] | null | null | null | selfdrive/test/test_cpu_usage.py | Fryelock/openpilot | 9a78378b81a66b5ea6c5f0a9c211e24210233327 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
import threading
import _thread
import signal
import sys
import cereal.messaging as messaging
import selfdrive.manager as manager
def cputime_total(ct):
return ct.cpuUser + ct.cpuSystem + ct.cpuChildrenUser + ct.cpuChildrenSystem
def print_cpu_usage(first_proc, last_proc):
pr... | 31.359223 | 91 | 0.640557 |
a93a1bcda6fca0e419339c9b526442fc67c2e83f | 1,976 | py | Python | pgweb/events/views.py | ChristophBerg/pgweb | bf6e7a81c0a5f329ffd2f7b3e50c4c7c68735ffc | [
"PostgreSQL"
] | 1 | 2020-12-03T21:52:50.000Z | 2020-12-03T21:52:50.000Z | pgweb/events/views.py | ChristophBerg/pgweb | bf6e7a81c0a5f329ffd2f7b3e50c4c7c68735ffc | [
"PostgreSQL"
] | null | null | null | pgweb/events/views.py | ChristophBerg/pgweb | bf6e7a81c0a5f329ffd2f7b3e50c4c7c68735ffc | [
"PostgreSQL"
] | null | null | null | from django.shortcuts import render_to_response, get_object_or_404
from django.http import Http404
from django.contrib.auth.decorators import login_required
from datetime import date
from pgweb.util.decorators import ssl_required
from pgweb.util.contexts import NavContext
from pgweb.util.helpers import simple_form
f... | 35.285714 | 164 | 0.739372 |
aed24df102b3eebc0c64623ac7fe859a50288ccc | 14,775 | py | Python | lusidtools/extract/group_holdings.py | JamesALeedham/lusid-python-tools | 948b2a849f20bb2b3f052a6bab083646a14cebf7 | [
"MIT"
] | 4 | 2020-07-24T10:28:14.000Z | 2021-11-05T10:55:23.000Z | lusidtools/extract/group_holdings.py | JamesALeedham/lusid-python-tools | 948b2a849f20bb2b3f052a6bab083646a14cebf7 | [
"MIT"
] | 185 | 2019-11-21T14:58:38.000Z | 2022-03-04T18:44:22.000Z | lusidtools/extract/group_holdings.py | JamesALeedham/lusid-python-tools | 948b2a849f20bb2b3f052a6bab083646a14cebf7 | [
"MIT"
] | 6 | 2020-01-28T19:31:04.000Z | 2021-04-21T15:50:23.000Z | from lusidtools.cocoon.async_tools import run_in_executor, ThreadPool
import lusid
import asyncio
from functools import reduce
from typing import Dict, List
from lusidtools.cocoon.async_tools import (
start_event_loop_new_thread,
stop_event_loop_new_thread,
)
def _join_holdings(
holdings_to_join: Dict[str... | 36.481481 | 136 | 0.654552 |
ea6140c6e5a27f49fa0268f8b1c409fc200fcf4e | 1,017 | py | Python | examples/neurospin/gaussian_mixture_models.py | fperez/nipy | 559f17150bd9fa8ead4fd088b330d7cf7db7aa79 | [
"BSD-3-Clause"
] | 1 | 2015-05-07T16:53:33.000Z | 2015-05-07T16:53:33.000Z | examples/neurospin/gaussian_mixture_models.py | fperez/nipy | 559f17150bd9fa8ead4fd088b330d7cf7db7aa79 | [
"BSD-3-Clause"
] | null | null | null | examples/neurospin/gaussian_mixture_models.py | fperez/nipy | 559f17150bd9fa8ead4fd088b330d7cf7db7aa79 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Example of a demo that fits a Gaussian Mixture Model (GMM) to a dataset
The possible number of clusters is in the [1,10] range
The proposed algorithm correctly selects a solution with 2 or 3 classes
A... | 29.057143 | 73 | 0.638151 |
cd06ebe248ba20c5f0ac690c8f458aad9e52b53e | 235 | py | Python | translation.py | sanith2005/feedbackbot | fa14ca8cfbcde6405158daf121d280ee1436067a | [
"Apache-2.0"
] | null | null | null | translation.py | sanith2005/feedbackbot | fa14ca8cfbcde6405158daf121d280ee1436067a | [
"Apache-2.0"
] | null | null | null | translation.py | sanith2005/feedbackbot | fa14ca8cfbcde6405158daf121d280ee1436067a | [
"Apache-2.0"
] | null | null | null | from config import Config
class Translation(object):
START = "@myKdrama_bot|@SBS_Studio"
RULES = Config.RULES
LOGIN = """Only for admins for receiving feedbacks"""
ABOUT = """
@myKdrama_bot|@SBS_Studio
"""
| 16.785714 | 59 | 0.651064 |
aa5fe0e5351151ee752c96357230bb3c1bff8992 | 2,476 | py | Python | api/models/predictSER.py | andyAndyA/SERaaS-API-Service | cd64b46601203cdccd59a85645b93d1c1e4ef180 | [
"MIT"
] | 2 | 2021-02-21T16:27:08.000Z | 2021-05-19T00:09:07.000Z | api/models/predictSER.py | andyAndyA/Speech-Emotion-Analytics-API | cd64b46601203cdccd59a85645b93d1c1e4ef180 | [
"MIT"
] | 12 | 2020-01-14T18:46:59.000Z | 2020-02-19T17:58:29.000Z | api/models/predictSER.py | SERaaS/SERaaS-API-Service | cd64b46601203cdccd59a85645b93d1c1e4ef180 | [
"MIT"
] | null | null | null | # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Loads the SciKit-Learn RandomForest Speech Emotion Recognition model and
# formats the input audio file for classification and outputs the prediction
#
# Used to predict correlations between all or separate emotions from an
# audio file (all or seperate -> based ... | 35.884058 | 101 | 0.723748 |
4463a61a43a83c57505e74682b213c48f0395319 | 23,091 | py | Python | tests/test_basetv_sync.py | vlebourl/python-androidtv | 81c5a4c17bbc7ba852a50395f53f65970fbb8ce9 | [
"MIT"
] | null | null | null | tests/test_basetv_sync.py | vlebourl/python-androidtv | 81c5a4c17bbc7ba852a50395f53f65970fbb8ce9 | [
"MIT"
] | null | null | null | tests/test_basetv_sync.py | vlebourl/python-androidtv | 81c5a4c17bbc7ba852a50395f53f65970fbb8ce9 | [
"MIT"
] | null | null | null | import sys
import unittest
try:
from unittest.mock import patch
except ImportError:
from mock import patch
sys.path.insert(0, '..')
from androidtv import constants, ha_state_detection_rules_validator
from androidtv.basetv.basetv_sync import BaseTVSync
from . import patchers
DEVICE_PROPERTIES_OUTPUT1 = """... | 48.408805 | 801 | 0.662682 |
8f79e2da4ebbae3989bf02e9768740f3d049fbce | 22,879 | py | Python | esmvalcore/preprocessor/_area.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | null | null | null | esmvalcore/preprocessor/_area.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 2 | 2022-03-02T16:16:06.000Z | 2022-03-10T12:58:49.000Z | esmvalcore/preprocessor/_area.py | valeriupredoi/ESMValCore | b46b948c47d8579d997b28501f8588f5531aa354 | [
"Apache-2.0"
] | null | null | null | """Area operations on data cubes.
Allows for selecting data subsets using certain latitude and longitude
bounds; selecting geographical regions; constructing area averages; etc.
"""
import logging
import warnings
import fiona
import iris
import numpy as np
import shapely
import shapely.ops
from dask import array as d... | 33.794682 | 79 | 0.594869 |
f8cc55ea46691f92c2f1a70bdc89524c4bfb6bf2 | 5,070 | py | Python | var/spack/repos/builtin/packages/swig/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-16T02:42:57.000Z | 2019-06-06T19:18:50.000Z | var/spack/repos/builtin/packages/swig/package.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"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/swig/package.py | hainest/spack | c592e17d49118f253b552ef6165745ded8ac0ea5 | [
"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)
import os
from spack import *
class Swig(AutotoolsPackage, SourceforgePackage):
"""SWIG is an interface compiler th... | 44.473684 | 103 | 0.673176 |
14431b2bb5165b9ab367968f7cebe172aa5debbe | 5,967 | py | Python | decisionTreerandonForest.py | Vandinimodi1595/Classification | 0db59ac7c83e0dd199ed6b8758de0eea8bccbb79 | [
"MIT"
] | null | null | null | decisionTreerandonForest.py | Vandinimodi1595/Classification | 0db59ac7c83e0dd199ed6b8758de0eea8bccbb79 | [
"MIT"
] | null | null | null | decisionTreerandonForest.py | Vandinimodi1595/Classification | 0db59ac7c83e0dd199ed6b8758de0eea8bccbb79 | [
"MIT"
] | null | null | null | #Decision Tree Classifier vs Random Forest Classifier
import graphviz
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.image as mpimg
import pydotplus
import graphviz
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_... | 33.335196 | 126 | 0.654433 |
61040c1fc91e42171dbf3f0643aa676d91d1921c | 1,798 | py | Python | setup.py | aviral1599/avi-topsis | 5f6c45919dff9e807b4e6118a9cacc8a8c65235f | [
"MIT"
] | null | null | null | setup.py | aviral1599/avi-topsis | 5f6c45919dff9e807b4e6118a9cacc8a8c65235f | [
"MIT"
] | null | null | null | setup.py | aviral1599/avi-topsis | 5f6c45919dff9e807b4e6118a9cacc8a8c65235f | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'Topsis-Aviral-102083032', # How you named your package folder (MyLib)
packages = ['Topsis-Aviral-102083032'], # Chose the same as "name"
version = '0.1', # Start with a small number and increase it with every change you make
license='MIT', # ... | 62 | 146 | 0.656285 |
1a11778a4b9afd46c1e97268d94685d80397b39c | 53,066 | py | Python | modin/pandas/series.py | vb99/modin | 4bfe6986889e09a10a7be218a0d19d2a0dc547f6 | [
"Apache-2.0"
] | null | null | null | modin/pandas/series.py | vb99/modin | 4bfe6986889e09a10a7be218a0d19d2a0dc547f6 | [
"Apache-2.0"
] | null | null | null | modin/pandas/series.py | vb99/modin | 4bfe6986889e09a10a7be218a0d19d2a0dc547f6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas
from pandas.core.common import is_bool_indexer
from pandas.core.dtypes.common import (
is_dict_like,
is_list_like,
is_scalar,
is_string_like,
)
import sys
import warnings
from .base import BasePandasDataset
from .iterator import PartitionIterator
from .utils import _inh... | 32.75679 | 88 | 0.59181 |
505c3c4ee727b43caee605d41eb9f1de257a2846 | 576 | py | Python | regexlib/python_re_test_file/regexlib_1872.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | 1 | 2022-01-24T14:43:23.000Z | 2022-01-24T14:43:23.000Z | regexlib/python_re_test_file/regexlib_1872.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | regexlib/python_re_test_file/regexlib_1872.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | # 1872
# ^(([a-zA-Z]:)|((\\|/){1,2}\w+)\$?)((\\|/)(\w[\w ]*.*))+\.([a-zA-Z0-9]+)$
# EXPONENT
# nums:4
# EXPONENT AttackString:""+"a:\\1."*32+"!1 _SLQ_2"
import re
from time import perf_counter
regex = """^(([a-zA-Z]:)|((\\|/){1,2}\w+)\$?)((\\|/)(\w[\w ]*.*))+\.([a-zA-Z0-9]+)$"""
REGEX = re.compile(regex)
for i in ran... | 30.315789 | 86 | 0.498264 |
084deffd5bce04a749179aad91b67c32c98f251b | 4,562 | py | Python | cubi_tk/sodar/upload_sheet.py | LaborBerlin/cubi-tk | 4aa5306c547c38eb41d5623ff6e4bace828f85b1 | [
"MIT"
] | null | null | null | cubi_tk/sodar/upload_sheet.py | LaborBerlin/cubi-tk | 4aa5306c547c38eb41d5623ff6e4bace828f85b1 | [
"MIT"
] | null | null | null | cubi_tk/sodar/upload_sheet.py | LaborBerlin/cubi-tk | 4aa5306c547c38eb41d5623ff6e4bace828f85b1 | [
"MIT"
] | null | null | null | """``cubi-tk sodar upload-sheet``: upload ISA-tab to SODAR."""
import argparse
import os
import itertools
import typing
from pathlib import Path
import attr
from logzero import logger
from . import api
from .. import isa_support
from ..common import overwrite_helper, load_toml_config
from ..exceptions import Overwri... | 35.364341 | 119 | 0.643139 |
ddc9679cc62e82c21fb0403ccda273e2422e2eb8 | 715 | py | Python | redmine_shell/command/issue/__init__.py | shlomo90/redmine_shell | 546a28ca216cf9d75082b5008089e8263916a876 | [
"MIT"
] | 1 | 2021-11-09T03:44:48.000Z | 2021-11-09T03:44:48.000Z | redmine_shell/command/issue/__init__.py | shlomo90/redmine_shell | 546a28ca216cf9d75082b5008089e8263916a876 | [
"MIT"
] | null | null | null | redmine_shell/command/issue/__init__.py | shlomo90/redmine_shell | 546a28ca216cf9d75082b5008089e8263916a876 | [
"MIT"
] | null | null | null | ''' Issue Commands. '''
from redmine_shell.shell.config import DEBUG
from redmine_shell.shell.command import Command, CommandType
from redmine_shell.command.issue.commands import (ListIssue, CreateIssue,
ReadIssue, UpdateIssue, ListJournal, WeekReportIssue)
COMMAND = [ListIssue("list_issue"), CreateIssue("c... | 28.6 | 78 | 0.72028 |
5284e3c081d7eb1ea18f05dbbcfb49c0c044e6fd | 6,255 | py | Python | courses/dev-depl-windows/ha-sql-server/common/software_status.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | 2 | 2022-01-06T11:52:57.000Z | 2022-01-09T01:53:56.000Z | courses/dev-depl-windows/lb-aspnet/common/software_status.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | courses/dev-depl-windows/lb-aspnet/common/software_status.py | Glairly/introduction_to_tensorflow | aa0a44d9c428a6eb86d1f79d73f54c0861b6358d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 32.076923 | 81 | 0.631335 |
8115b18a0e839920b1ce96dce86b08f26618a6c6 | 1,643 | py | Python | homeassistant/components/ozw/const.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 4 | 2020-07-29T17:47:10.000Z | 2020-09-16T13:39:13.000Z | homeassistant/components/ozw/const.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:47:48.000Z | 2022-03-12T00:34:19.000Z | homeassistant/components/ozw/const.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Constants for the ozw integration."""
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN
from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN
from homeassistant.components.fan import DOMAIN as FAN_DOMAIN
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN... | 28.327586 | 81 | 0.808278 |
2c22cdff440b4fd86afb2377882aaec36d2a8c34 | 410 | py | Python | NumberTheory/PrimeNumbers.py | pritsheth/Algorithms-Python | b8af30cbf95a772c9b9b997a30ff2c8b56a040e0 | [
"MIT"
] | null | null | null | NumberTheory/PrimeNumbers.py | pritsheth/Algorithms-Python | b8af30cbf95a772c9b9b997a30ff2c8b56a040e0 | [
"MIT"
] | null | null | null | NumberTheory/PrimeNumbers.py | pritsheth/Algorithms-Python | b8af30cbf95a772c9b9b997a30ff2c8b56a040e0 | [
"MIT"
] | null | null | null | class PrimeNumbers:
def getAllPrimes(self, n):
sieves = [True] * (n + 1)
for i in range(2, n + 1):
if i * i > n:
break
if sieves[i]:
for j in range(i + i, n + 1, i):
sieves[j] = False
for i in range(2, n + 1):
... | 20.5 | 48 | 0.412195 |
52c95190bcca0c9dcd3345304db3a2a1f1a6272d | 7,896 | py | Python | tensorflow/examples/saved_model/saved_model_half_plus_two.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 44 | 2017-01-26T11:39:36.000Z | 2019-06-28T10:03:19.000Z | tensorflow/examples/saved_model/saved_model_half_plus_two.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 5 | 2017-01-31T00:32:02.000Z | 2017-12-17T14:34:17.000Z | tensorflow/examples/saved_model/saved_model_half_plus_two.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 10 | 2017-03-27T04:15:07.000Z | 2018-07-09T15:03:03.000Z | ## Copyright 2015 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 applic... | 36.725581 | 80 | 0.723531 |
b53a85de38f166c57f3ef6e849e9f2b28fc561cc | 5,894 | py | Python | homeassistant/components/calendar/trigger.py | jeeftor/core | 9bec6493230f6c64d51ba7f45edc7ff94999e5fd | [
"Apache-2.0"
] | null | null | null | homeassistant/components/calendar/trigger.py | jeeftor/core | 9bec6493230f6c64d51ba7f45edc7ff94999e5fd | [
"Apache-2.0"
] | 25 | 2021-10-02T10:01:14.000Z | 2022-03-31T06:11:49.000Z | homeassistant/components/calendar/trigger.py | jeeftor/core | 9bec6493230f6c64d51ba7f45edc7ff94999e5fd | [
"Apache-2.0"
] | null | null | null | """Offer calendar automation rules."""
from __future__ import annotations
import datetime
import logging
from typing import Any
import voluptuous as vol
from homeassistant.components.automation import (
AutomationActionType,
AutomationTriggerInfo,
)
from homeassistant.const import CONF_ENTITY_ID, CONF_EVENT,... | 33.873563 | 87 | 0.664065 |
e5f6ba768d952df9210293af656f9feeefa8f0bc | 1,145 | py | Python | images_tutorial/pillow_tut.py | djsnipa1/python-shit | b14eddd1f6bbf90063829ab85ed4bde7adb54e55 | [
"MIT"
] | 3 | 2020-03-03T22:55:19.000Z | 2021-04-26T02:39:41.000Z | images_tutorial/pillow_tut.py | djsnipa1/python-shit | b14eddd1f6bbf90063829ab85ed4bde7adb54e55 | [
"MIT"
] | 2 | 2020-03-03T22:55:20.000Z | 2020-04-08T12:33:15.000Z | images_tutorial/pillow_tut.py | djsnipa1/python-shit | b14eddd1f6bbf90063829ab85ed4bde7adb54e55 | [
"MIT"
] | null | null | null | from PIL import Image
from matplotlib import pyplot
# from matplotlib import image
import numpy as np
from numpy import asarray
def pillow_tut():
image = Image.open('kolala.jpeg')
print(image.format)
print(image.size)
print(image.mode)
image.show()
def matplotlib_tut():
image = Image.imrea... | 18.770492 | 68 | 0.674236 |
9c4e30fdbf3d852ac18d4cedb858eb2ee701bbfa | 49 | py | Python | ptterm/backends/__init__.py | julio641742/ptterm | ba78356f07afab8031ef364c1213072f947cf87a | [
"BSD-3-Clause"
] | null | null | null | ptterm/backends/__init__.py | julio641742/ptterm | ba78356f07afab8031ef364c1213072f947cf87a | [
"BSD-3-Clause"
] | null | null | null | ptterm/backends/__init__.py | julio641742/ptterm | ba78356f07afab8031ef364c1213072f947cf87a | [
"BSD-3-Clause"
] | null | null | null | from .base import Backend
__all__ = ["Backend"]
| 12.25 | 25 | 0.714286 |
e5389b9fa9ee5ca506690698630583fc12723cda | 2,184 | py | Python | mlxtk/plot/gpop.py | f-koehler/mlxtk | 373aed06ab23ab9b70cd99e160228c50b87e939a | [
"MIT"
] | 2 | 2018-12-21T19:41:10.000Z | 2019-11-25T15:26:27.000Z | mlxtk/plot/gpop.py | f-koehler/mlxtk | 373aed06ab23ab9b70cd99e160228c50b87e939a | [
"MIT"
] | 73 | 2017-12-22T13:30:16.000Z | 2022-02-22T04:21:14.000Z | mlxtk/plot/gpop.py | f-koehler/mlxtk | 373aed06ab23ab9b70cd99e160228c50b87e939a | [
"MIT"
] | null | null | null | from typing import Optional
import matplotlib.colors
import matplotlib.pyplot
import matplotlib.tri
import numpy
try:
import stl
HAS_STL = True
except ModuleNotFoundError:
HAS_STL = False
from mlxtk.tools.gpop import transform_to_momentum_space
def plot_gpop(
ax,
time,
grid,
density,
... | 24 | 88 | 0.587454 |
737a012777d58239e7c6d8215e984ee2a43be110 | 1,376 | py | Python | tests/unit/python/foglamp/tasks/purge/test_purge_main.py | vaibhav-ScaleDB/FogLAMP | 445e7a588f5ec5fcae0360b49fdc4e4de0ea2ec8 | [
"Apache-2.0"
] | 65 | 2017-05-15T21:55:04.000Z | 2022-01-19T01:30:42.000Z | tests/unit/python/foglamp/tasks/purge/test_purge_main.py | vaibhav-ScaleDB/FogLAMP | 445e7a588f5ec5fcae0360b49fdc4e4de0ea2ec8 | [
"Apache-2.0"
] | 576 | 2017-05-22T05:41:07.000Z | 2020-02-13T07:48:58.000Z | tests/unit/python/foglamp/tasks/purge/test_purge_main.py | vaibhav-ScaleDB/FogLAMP | 445e7a588f5ec5fcae0360b49fdc4e4de0ea2ec8 | [
"Apache-2.0"
] | 52 | 2017-05-09T22:45:47.000Z | 2022-03-10T18:49:02.000Z | # -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
""" Test tasks/purge/__main__.py entry point
"""
import pytest
from unittest.mock import patch, MagicMock
from foglamp.tasks import purge
from foglamp.common import logger
from foglamp.common.storage_client.storage_client ... | 29.276596 | 78 | 0.734012 |
0d016ef65da6ea5fb32088bd301e794624677e34 | 1,133 | py | Python | day20/discoverNetworks.py | owaishanif786/penTesting101 | 53c4e34d5c3c71c8d4bd34f58e2f454337a5b0ed | [
"MIT"
] | null | null | null | day20/discoverNetworks.py | owaishanif786/penTesting101 | 53c4e34d5c3c71c8d4bd34f58e2f454337a5b0ed | [
"MIT"
] | null | null | null | day20/discoverNetworks.py | owaishanif786/penTesting101 | 53c4e34d5c3c71c8d4bd34f58e2f454337a5b0ed | [
"MIT"
] | null | null | null | #C:\Python27>python C:\Users\win1001\Desktop\discoverNetworks.py
from _winreg import *
def val2addr(val):
addr = ''
for ch in val:
addr += '%02x '% ord(ch)
addr = addr.strip(" ").replace(" ", ":")[0:17]
return addr
def printNets():
print ("[*] printNets")
net = "SOFTWARE\Micro... | 26.348837 | 89 | 0.50662 |
d0aa3e4f977a50fb264697d79e6d3ea75c127e0f | 21,184 | py | Python | cynetworkx/algorithms/connectivity/edge_kcomponents.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 12 | 2019-07-23T08:07:53.000Z | 2022-03-09T06:13:16.000Z | cynetworkx/algorithms/connectivity/edge_kcomponents.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 7 | 2019-08-30T07:00:00.000Z | 2021-12-30T08:02:56.000Z | cynetworkx/algorithms/connectivity/edge_kcomponents.py | Viech/cynetworkx | 01a37859c67b752392e9e783c949084964eef2cf | [
"BSD-3-Clause"
] | 5 | 2020-10-10T03:40:32.000Z | 2021-11-23T12:28:53.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2004-2018 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Authors: Jon Crall (erotemic@gmail.com)
"""
Algorithms for finding k-edge-connected components and subgrap... | 35.484087 | 89 | 0.614662 |
b7d3bae153cbdf21e7949e1a04540654e64c372e | 2,328 | py | Python | acapy_client/models/connection_static_result.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | null | null | null | acapy_client/models/connection_static_result.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | 10 | 2021-04-05T11:33:30.000Z | 2021-05-12T08:40:47.000Z | acapy_client/models/connection_static_result.py | dbluhm/acapy-client | d92ef607ba2ff1152ec15429f2edb20976991424 | [
"Apache-2.0"
] | 1 | 2021-03-01T18:03:32.000Z | 2021-03-01T18:03:32.000Z | from typing import Any, Dict, List, Type, TypeVar
import attr
from ..models.conn_record import ConnRecord
T = TypeVar("T", bound="ConnectionStaticResult")
@attr.s(auto_attribs=True)
class ConnectionStaticResult:
""" """
mv_verkey: str
my_did: str
my_endpoint: str
record: ConnRecord
their_d... | 26.454545 | 77 | 0.607818 |
7d20b90a10de83175329801330408c5f22e9c702 | 2,721 | py | Python | utils/dataset/voc.py | terenceylchow124/DSRG_PyTorch | 86fab04c96c634b88c70d7301abf8b4059e6bc84 | [
"MIT"
] | 7 | 2021-03-27T12:44:43.000Z | 2022-01-20T06:02:48.000Z | utils/dataset/voc.py | terenceylchow124/DSRG_PyTorch | 86fab04c96c634b88c70d7301abf8b4059e6bc84 | [
"MIT"
] | 1 | 2021-04-26T08:06:06.000Z | 2021-04-29T12:28:02.000Z | utils/dataset/voc.py | terenceylchow124/DSRG_PyTorch | 86fab04c96c634b88c70d7301abf8b4059e6bc84 | [
"MIT"
] | 2 | 2021-06-06T13:17:51.000Z | 2021-06-06T13:19:00.000Z | import os
import cv2
import pickle
import numpy as np
import scipy.ndimage as nd
import torch
from torch.utils.data import Dataset
MODE = ['train', 'val', 'test']
IMG_FOLDER_NAME = "JPEGImages"
# Color mean in order RGB
IMAGE_MEAN_VALUE = [123.0, 104.0, 117.0]
class VOCDataset(Dataset):
def __in... | 36.77027 | 115 | 0.622933 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.