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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c03e8090a85c4311fa11c38852d501c7cd2ad73 | 9,106 | py | Python | frontends/etiquette_flask/backend/endpoints/album_endpoints.py | voussoir/etiquette | e982858c28335b11528c52af181abd1bbc71673f | [
"BSD-3-Clause"
] | 20 | 2018-03-20T01:40:13.000Z | 2022-02-11T20:23:41.000Z | frontends/etiquette_flask/backend/endpoints/album_endpoints.py | voussoir/etiquette | e982858c28335b11528c52af181abd1bbc71673f | [
"BSD-3-Clause"
] | null | null | null | frontends/etiquette_flask/backend/endpoints/album_endpoints.py | voussoir/etiquette | e982858c28335b11528c52af181abd1bbc71673f | [
"BSD-3-Clause"
] | 1 | 2018-03-20T13:10:31.000Z | 2018-03-20T13:10:31.000Z | import flask; from flask import request
import os
import urllib.parse
from voussoirkit import flasktools
from voussoirkit import gentools
from voussoirkit import stringtools
import etiquette
from .. import common
site = common.site
session_manager = common.session_manager
# Individual albums ######################... | 36.424 | 100 | 0.682737 |
9392fd1b0e3ddbe1564469276f0fe94464d83b71 | 1,004 | py | Python | utils/model.py | BeEyesana/FSL-PyTorch | cd20996d1d233ba1acb92496982658b5d216e095 | [
"MIT"
] | 4 | 2022-03-24T09:21:25.000Z | 2022-03-26T14:40:06.000Z | utils/model.py | BeEyesana/FSL-PyTorch | cd20996d1d233ba1acb92496982658b5d216e095 | [
"MIT"
] | null | null | null | utils/model.py | BeEyesana/FSL-PyTorch | cd20996d1d233ba1acb92496982658b5d216e095 | [
"MIT"
] | null | null | null | """
code from: https://github.com/tata1661/FSL-Mate/blob/master/PaddleFSL/paddlefsl/utils/model.py
"""
import torch
__all__ = ['classification_acc']
def classification_acc(predict, label):
"""
Calculate classification accuracy: correct_result / sample_number
Args:
predict(torch.Tensor): predi... | 27.135135 | 111 | 0.638446 |
8dc153514771cae5a33eb8ee4763192d435a52f8 | 3,025 | py | Python | xmas.py | hikeonpast/xmas | 2994f5c50a19d621d1c5862e0acdb6f0a45eb3b7 | [
"MIT"
] | null | null | null | xmas.py | hikeonpast/xmas | 2994f5c50a19d621d1c5862e0acdb6f0a45eb3b7 | [
"MIT"
] | null | null | null | xmas.py | hikeonpast/xmas | 2994f5c50a19d621d1c5862e0acdb6f0a45eb3b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
import signal
import sys
import logging
#used for Hue light control
import requests
import json
#static vars for Hue control; URL includes username and ID of target light
hue_hub_url = "http://192.168.1.84/api/XYNHOn3SOzXzZbhLpKBV2xlA5d9G9CeMcKQbt9oh/lights/29/state"
#logging.basic... | 25 | 136 | 0.718347 |
146fb8d24eb34233fe9fd8f162682bcd4771b02c | 1,781 | py | Python | django_file_form/fields.py | maisim/django-file-form | 34b21c7e49d1c49d26c8d8b41da48d2e1251d7ec | [
"Apache-2.0"
] | null | null | null | django_file_form/fields.py | maisim/django-file-form | 34b21c7e49d1c49d26c8d8b41da48d2e1251d7ec | [
"Apache-2.0"
] | null | null | null | django_file_form/fields.py | maisim/django-file-form | 34b21c7e49d1c49d26c8d8b41da48d2e1251d7ec | [
"Apache-2.0"
] | null | null | null | from django.forms import FileField
from django.core import validators
from .widgets import UploadWidget, UploadMultipleWidget
from .models import UploadedFile
from .util import get_list
class UploadedFileField(FileField):
widget = UploadWidget
def get_file_data(self, field_name, form_id):
try:
... | 25.442857 | 75 | 0.614823 |
f58d4911514fb7ce53a8384dc5c7b56dedddbe8b | 781 | py | Python | setup.py | seibert-media/pyxelletter | 58f82f5f30430f143c123ddffebcb36c7cdbd34a | [
"Apache-2.0"
] | 2 | 2015-09-24T10:41:42.000Z | 2022-01-06T12:34:16.000Z | setup.py | seibert-media/pyxelletter | 58f82f5f30430f143c123ddffebcb36c7cdbd34a | [
"Apache-2.0"
] | 1 | 2022-01-06T11:25:48.000Z | 2022-01-06T11:25:48.000Z | setup.py | seibert-media/pyxelletter | 58f82f5f30430f143c123ddffebcb36c7cdbd34a | [
"Apache-2.0"
] | 2 | 2015-09-24T10:19:42.000Z | 2015-09-24T12:52:23.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='pyxelletter',
version='0.7',
install_requires=['requests>=2.20.0'],
packages=['pyxelletter'],
url='https://github.com/seibert-media/pyxelletter',
license='Apache Lice... | 31.24 | 66 | 0.664533 |
e3d7bad37cc641d171bd531565bc47ce7cbe510d | 553 | py | Python | db/create_db.py | MarcosMAlvarez/loan-challenge | e5023ab5094be077e42c5faa405745c2581ec11a | [
"MIT"
] | null | null | null | db/create_db.py | MarcosMAlvarez/loan-challenge | e5023ab5094be077e42c5faa405745c2581ec11a | [
"MIT"
] | null | null | null | db/create_db.py | MarcosMAlvarez/loan-challenge | e5023ab5094be077e42c5faa405745c2581ec11a | [
"MIT"
] | null | null | null | """Create db
Module for database creation.
"""
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import AdminUser, Base
from helpers import session_scope
engine = create_engine("sqlite:///db/loan_challenge_db.db")
Session = sessionmaker(bind=engine)
# Generate database schema
... | 23.041667 | 59 | 0.748644 |
4d197f28f8e8fe24dc7a0f2202671e6a998f0675 | 3,877 | py | Python | Sprawdzanie pesela i generator.py | adamkuder/python_cwiczenia | 32f53ad0548fa45355516b9c0c1fb914fe3ee41a | [
"MIT"
] | null | null | null | Sprawdzanie pesela i generator.py | adamkuder/python_cwiczenia | 32f53ad0548fa45355516b9c0c1fb914fe3ee41a | [
"MIT"
] | null | null | null | Sprawdzanie pesela i generator.py | adamkuder/python_cwiczenia | 32f53ad0548fa45355516b9c0c1fb914fe3ee41a | [
"MIT"
] | null | null | null | from datetime import date
import random
class Pesel():
PESEL_WEIGHTS = (9, 7, 3, 1, 9, 7, 3, 1, 9, 7)
MONTH_CORRECTIONS = {
(81, 92): (80, 1800),
(1, 12): (0, 1900),
(21, 32): (20, 2000),
(41, 52): (40, 2100),
(61, 72): (60, 2200)
}
def __init__(self,pe... | 37.640777 | 92 | 0.510188 |
1572937085c9867145ad11967cad32ebf30b4982 | 23,185 | py | Python | storages/backends/s3boto3.py | chaws/django-storages | 738347ecfcf3e6354888f1100f7b336c729d5082 | [
"BSD-3-Clause"
] | 1 | 2020-10-03T06:22:24.000Z | 2020-10-03T06:22:24.000Z | storages/backends/s3boto3.py | chaws/django-storages | 738347ecfcf3e6354888f1100f7b336c729d5082 | [
"BSD-3-Clause"
] | null | null | null | storages/backends/s3boto3.py | chaws/django-storages | 738347ecfcf3e6354888f1100f7b336c729d5082 | [
"BSD-3-Clause"
] | null | null | null | import io
import mimetypes
import os
import posixpath
import threading
from datetime import datetime, timedelta
from gzip import GzipFile
from tempfile import SpooledTemporaryFile
from urllib.parse import parse_qsl, urlsplit
from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
from django.core.... | 39.29661 | 103 | 0.637179 |
abdf9e87aa3a11a0a27fad057ceaacb2992d253f | 5,694 | py | Python | extra_data/tests/test_keydata.py | European-XFEL/EXtra-data | e0ac5a3485a2e162110cc236f60ac4053b735134 | [
"BSD-3-Clause"
] | 4 | 2019-11-20T11:42:57.000Z | 2022-01-31T13:33:10.000Z | extra_data/tests/test_keydata.py | European-XFEL/EXtra-data | e0ac5a3485a2e162110cc236f60ac4053b735134 | [
"BSD-3-Clause"
] | 213 | 2019-11-22T08:37:11.000Z | 2022-03-30T13:03:13.000Z | extra_data/tests/test_keydata.py | European-XFEL/EXtra-data | e0ac5a3485a2e162110cc236f60ac4053b735134 | [
"BSD-3-Clause"
] | 11 | 2020-01-17T14:52:59.000Z | 2021-10-01T09:09:12.000Z | import numpy as np
import pytest
from extra_data import RunDirectory, H5File
from extra_data.exceptions import TrainIDError
def test_get_keydata(mock_spb_raw_run):
run = RunDirectory(mock_spb_raw_run)
print(run.instrument_sources)
am0 = run['SPB_DET_AGIPD1M-1/DET/0CH0:xtdf', 'image.data']
assert len(a... | 33.104651 | 84 | 0.696347 |
fa7eeb58d6d80bb50211baa3c4f22801dbc6cb58 | 11,154 | py | Python | face100_loader.py | songquanpeng/BigGAN-PyTorch | 092ca48cbc2aafc76cb69396c9f37fe5d307f997 | [
"MIT"
] | null | null | null | face100_loader.py | songquanpeng/BigGAN-PyTorch | 092ca48cbc2aafc76cb69396c9f37fe5d307f997 | [
"MIT"
] | null | null | null | face100_loader.py | songquanpeng/BigGAN-PyTorch | 092ca48cbc2aafc76cb69396c9f37fe5d307f997 | [
"MIT"
] | null | null | null | import torch
from torch.autograd import Variable
import os, errno
import numpy as np
from scipy import linalg
import torchvision
from torchvision import datasets
import torchvision.transforms as transforms
from itertools import repeat, cycle
data_dir = r'D:\Data\facescrub100'
def get_face_loaders(batch_size=64, wor... | 36.933775 | 128 | 0.692846 |
8a6d24d417cb315db89d85c1718151954044232e | 2,466 | py | Python | setup.py | svandiekendialpad/python-arpa | 2284b815866aeb08f65f786da416e78d7937ee1d | [
"MIT"
] | 39 | 2015-07-04T12:29:56.000Z | 2022-02-02T20:49:31.000Z | setup.py | svandiekendialpad/python-arpa | 2284b815866aeb08f65f786da416e78d7937ee1d | [
"MIT"
] | 17 | 2015-10-31T13:36:25.000Z | 2021-04-10T15:16:01.000Z | setup.py | svandiekendialpad/python-arpa | 2284b815866aeb08f65f786da416e78d7937ee1d | [
"MIT"
] | 17 | 2015-08-25T14:27:34.000Z | 2021-10-18T01:13:35.000Z | #!/usr/bin/env python3
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if not ((3, 4) <= sys.version_info < (4, 0)):
print('ERROR: Python 3.4+ is required!')
sys.exit(1)
with open('README.md') as readme_file:
readme = readme_file.read()
with ope... | 35.73913 | 90 | 0.637875 |
8ad8272a82497865fcfec034ff81ea3654034b66 | 4,594 | py | Python | dexp/processing/color/insert.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 16 | 2021-04-21T14:09:19.000Z | 2022-03-22T02:30:59.000Z | dexp/processing/color/insert.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 28 | 2021-04-15T17:43:08.000Z | 2022-03-29T16:08:35.000Z | dexp/processing/color/insert.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 3 | 2022-02-08T17:41:30.000Z | 2022-03-18T15:32:27.000Z | from typing import Sequence, Tuple, Union
from arbol import aprint
from dexp.processing.color.blend import blend_color_images
from dexp.processing.color.border import add_border
from dexp.utils import xpArray
from dexp.utils.backends import Backend
def insert_color_image(
image: xpArray,
inset_image: xpArra... | 34.283582 | 111 | 0.641707 |
aaebc587ae1eadcbe641c4fd1bcb2ff280c5f428 | 2,720 | py | Python | python-client/trustedanalytics/examples/movie_graph_small.py | rmaldrix/DOC | 2c3be80d515fbf46516e16a81b7eaafe1ed2c6d9 | [
"Apache-2.0"
] | null | null | null | python-client/trustedanalytics/examples/movie_graph_small.py | rmaldrix/DOC | 2c3be80d515fbf46516e16a81b7eaafe1ed2c6d9 | [
"Apache-2.0"
] | null | null | null | python-client/trustedanalytics/examples/movie_graph_small.py | rmaldrix/DOC | 2c3be80d515fbf46516e16a81b7eaafe1ed2c6d9 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2015 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 30.909091 | 116 | 0.672059 |
dd8fed08c56f63b9fbc524a3ddef0e93751976b1 | 1,648 | py | Python | src/scratch/store/fighter.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:25:30.000Z | 2019-12-25T10:25:30.000Z | src/scratch/store/fighter.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:27:15.000Z | 2019-12-25T10:27:15.000Z | src/scratch/store/fighter.py | vidalmatheus/MK-Project | 6646020c59367ba0424d73a5861e13bbc0daac1f | [
"MIT"
] | 1 | 2019-12-25T10:50:05.000Z | 2019-12-25T10:50:05.000Z | import engine
"""Usa a classe GameObject como superClasse e veja as classes Animation,AnimationManager e Transform"""
"""criado um condigo pra facilitar os testes renderizados,então pra testar vai ter que criar vc mesmo,
susar a classe Game e Camera pode ajudar"""
class State:
def __init__(self):
self.ani... | 32.313725 | 113 | 0.629854 |
fcf28bb83f91cfe1a8836bf26e75f1c83328bbe3 | 5,069 | py | Python | Protocol/KDF.py | BarryYBL/Cryptos | dcb118d49f3568ed6bbad9919e29c33ce03c2f95 | [
"Apache-2.0"
] | 1 | 2019-12-23T03:35:06.000Z | 2019-12-23T03:35:06.000Z | Protocol/KDF.py | BarryYBL/Cryptos | dcb118d49f3568ed6bbad9919e29c33ce03c2f95 | [
"Apache-2.0"
] | null | null | null | Protocol/KDF.py | BarryYBL/Cryptos | dcb118d49f3568ed6bbad9919e29c33ce03c2f95 | [
"Apache-2.0"
] | null | null | null | #
# KDF.py : a collection of Key Derivation Functions
#
# Part of the Python Cryprography Toolkit
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is... | 40.879032 | 118 | 0.681199 |
a86cf215f42c79a6d5588ff0e20e08dace41b732 | 4,084 | py | Python | rules_default/castervoice/rules/apps/pdf/adobe_acrobat.py | MLH-Fellowship/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 1 | 2021-09-17T06:11:02.000Z | 2021-09-17T06:11:02.000Z | rules_default/castervoice/rules/apps/pdf/adobe_acrobat.py | soma2000-lang/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 5 | 2021-02-03T05:29:41.000Z | 2021-02-08T01:14:11.000Z | rules_default/castervoice/rules/apps/pdf/adobe_acrobat.py | soma2000-lang/LarynxCode | 840fee18c689a357052825607c27fc8e3e56571c | [
"MIT"
] | 4 | 2021-02-03T05:05:00.000Z | 2021-07-14T06:21:10.000Z | from dragonfly import Dictation, Repeat, Pause, MappingRule
from castervoice.lib.actions import Text, Key, Mouse
from castervoice.lib.ctrl.mgr.rule_details import RuleDetails
from castervoice.lib.merge.additions import IntegerRefST
from castervoice.lib.merge.state.short import R
_SHOW_HIDE_MENU = Key("a-v, s")
class... | 37.127273 | 113 | 0.523506 |
2b3e65594f0ef83b474beeb9482479aa283efaf2 | 11,454 | py | Python | tests/bulk_create/tests.py | shinshin86/django | 5cc81cd9eb69f5f7a711412c02039b435c393135 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2020-11-04T06:26:42.000Z | 2021-01-17T19:29:52.000Z | tests/bulk_create/tests.py | MadhuparnaUpadhyay/django | 7409d21a5ee7614db7276f06bfe412b24ff24059 | [
"PSF-2.0",
"BSD-3-Clause"
] | 55 | 2016-02-27T06:02:24.000Z | 2021-11-01T07:53:20.000Z | tests/bulk_create/tests.py | MadhuparnaUpadhyay/django | 7409d21a5ee7614db7276f06bfe412b24ff24059 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-11-04T08:47:02.000Z | 2020-11-04T08:47:02.000Z | from operator import attrgetter
from django.db import connection
from django.db.models import FileField, Value
from django.db.models.functions import Lower
from django.test import (
TestCase, override_settings, skipIfDBFeature, skipUnlessDBFeature,
)
from .models import (
Country, NoFields, NullableFields, Pi... | 43.386364 | 103 | 0.65488 |
3c84325705a2d938e4ea3755660f9e58ef5d4ff7 | 29,597 | py | Python | validation/analysis_questionnaire.py | PeerHerholz/musicgenre_similarities | 10091b8821b0e346cb7620cb4a57dde038bd4a36 | [
"BSD-3-Clause"
] | 2 | 2020-09-02T03:24:29.000Z | 2020-11-03T03:09:11.000Z | validation/analysis_questionnaire.py | PeerHerholz/musicgenre_similarities | 10091b8821b0e346cb7620cb4a57dde038bd4a36 | [
"BSD-3-Clause"
] | 16 | 2018-03-16T16:08:39.000Z | 2020-09-07T18:43:45.000Z | validation/analysis_questionnaire.py | C0C0AN/musicgenre_similarities | 0ca32bc3f9014ac41e508635f44607056763a7fc | [
"BSD-3-Clause"
] | 5 | 2018-01-26T14:49:50.000Z | 2021-11-19T03:46:08.000Z | # analysis_questionnaire.py
# function to read out information, create and save data frames to .csv
# files from results .json files from the music
# genre stimuli questionnaire
def analysis_questionnaire(json_file):
'''inputs should be a participant specific questionnaire file (in .json)
e.g. analysis_que... | 48.440262 | 553 | 0.669527 |
29baa1f5639fb613e06bedb380031d7d9652db0d | 3,526 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/support/serializers.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/support/serializers.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/support/serializers.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Serializers for use in the support app.
"""
import json
from django.urls import reverse
from rest_framework import serializers
from common.djangoapps.student.models import CourseEnrollment, ManualEnrollmentAudit
from lms.djangoapps.program_enrollments.models import ProgramCourseEnrollment, ProgramEnrollment
from ... | 34.23301 | 96 | 0.728304 |
df3867fce7907a5313fd774f16a6b8461b580f70 | 1,487 | py | Python | guillotina/contrib/dyncontent/vocabularies.py | vangheem/guillotina | fb678dd81807fd4c63aa1ef3dae4b9a151e3f274 | [
"BSD-2-Clause"
] | null | null | null | guillotina/contrib/dyncontent/vocabularies.py | vangheem/guillotina | fb678dd81807fd4c63aa1ef3dae4b9a151e3f274 | [
"BSD-2-Clause"
] | 1 | 2021-01-16T01:02:36.000Z | 2021-01-29T17:07:58.000Z | guillotina/contrib/dyncontent/vocabularies.py | vangheem/guillotina | fb678dd81807fd4c63aa1ef3dae4b9a151e3f274 | [
"BSD-2-Clause"
] | null | null | null | from guillotina import app_settings
from guillotina import configure
from guillotina.contrib.dyncontent.exceptions import VocabularySettingNotFound
from guillotina.schema.interfaces import ISource
from zope.interface import implementer
@implementer(ISource)
class AppSettingSource:
def __init__(self, dotted_settin... | 28.056604 | 78 | 0.63887 |
c3066442eccd9cf4c52602d043b0f5ea563a4b18 | 1,049 | py | Python | gbxml/__init__.py | building-energy/gbxml | 039edf6e33cccbb76dcda5fbb871aeb950ad0a87 | [
"MIT"
] | 5 | 2020-04-24T15:59:45.000Z | 2022-02-23T14:40:14.000Z | gbxml/__init__.py | building-energy/gbxml | 039edf6e33cccbb76dcda5fbb871aeb950ad0a87 | [
"MIT"
] | 2 | 2021-07-05T12:09:09.000Z | 2022-02-05T07:05:59.000Z | bspy/gbxml/__init__.py | Moult/bspy | 4609be615efa634ee85ae3a03d1e9330048cd3de | [
"MIT"
] | 1 | 2020-04-24T15:59:48.000Z | 2020-04-24T15:59:48.000Z | #
from .gbxml import Gbxml
from .gbxsd import Gbxsd
#from .graph import Graph
#from .xml_graph import XmlGraph
#from .gbxml_graph import GbxmlGraph
#from .gbxml_to_bim_map import GbxmlToBimMap
#from .bim_graph import BimGraph
#from .bim_to_epjson_map import BimToEpjsonMap
#from .bim_to_idf_map import BimToIdfMap
#fro... | 33.83871 | 50 | 0.843661 |
ad9039951dde4350b0d1d3bb590ce799b1a3faac | 100 | py | Python | tests/test_smoke.py | Kludex/lost-endpoint | 83c43ad2bcc3f02bffc77ef66d9531307cd6f6da | [
"MIT"
] | null | null | null | tests/test_smoke.py | Kludex/lost-endpoint | 83c43ad2bcc3f02bffc77ef66d9531307cd6f6da | [
"MIT"
] | 2 | 2022-02-01T19:03:37.000Z | 2022-02-01T19:03:39.000Z | tests/test_smoke.py | Kludex/lost-endpoint | 83c43ad2bcc3f02bffc77ef66d9531307cd6f6da | [
"MIT"
] | null | null | null | import inspect
import lost_endpoint
def test_smoke():
assert inspect.ismodule(lost_endpoint)
| 12.5 | 42 | 0.79 |
84f693774afab1928520b8f4fb40476c0ff87095 | 16,229 | py | Python | pyextra/gunicorn/util.py | Orbbec-3DPG/openpilot | 27e0adc434906e37fd7674160a0a8c2dd5c3c180 | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | pyextra/gunicorn/util.py | Orbbec-3DPG/openpilot | 27e0adc434906e37fd7674160a0a8c2dd5c3c180 | [
"MIT"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | virtual/lib/python3.6/site-packages/gunicorn/util.py | amiinegal/Awwards | dd667a1ffbd3fa9b90c8282d44d497b3a9d0c1ed | [
"MIT",
"Unlicense"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
from __future__ import print_function
import email.utils
import fcntl
import io
import os
import pkg_resources
import pwd
import random
import socket
import sys
import textwrap
import time
im... | 29.084229 | 90 | 0.583893 |
e59949d7900064cec1441ec2c250e1193bc85166 | 18,663 | py | Python | bot/seasons/season.py | martmists/seasonalbot | d81f6ba86eecea72bf8a980995333af3046e9680 | [
"MIT"
] | null | null | null | bot/seasons/season.py | martmists/seasonalbot | d81f6ba86eecea72bf8a980995333af3046e9680 | [
"MIT"
] | null | null | null | bot/seasons/season.py | martmists/seasonalbot | d81f6ba86eecea72bf8a980995333af3046e9680 | [
"MIT"
] | null | null | null | import asyncio
import contextlib
import datetime
import importlib
import inspect
import logging
import pkgutil
from pathlib import Path
from typing import List, Optional, Type, Union
import async_timeout
import discord
from discord.ext import commands
from bot.constants import Channels, Client, Roles, bot
from bot.de... | 33.809783 | 100 | 0.606816 |
1c93dd4f3dd6facf0131371ef669d813848fd879 | 335 | py | Python | fopp/Chapter 11. Dictionaries/us_medals.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | fopp/Chapter 11. Dictionaries/us_medals.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | fopp/Chapter 11. Dictionaries/us_medals.py | H2u-Hwng/EVC | c650fe7356a333011514cf9025dfd97bf71b1de3 | [
"MIT"
] | null | null | null | US_medals = {"Swimming": 33, "Gymnastics": 6, "Track & Field": 6, "Tennis": 3, "Judo": 2,
"Rowing": 2, "Shooting": 3, "Cycling - Road": 1, "Fencing": 4, "Diving": 2,
"Archery": 2, "Cycling - Track": 1, "Equestrian": 2, "Golf": 1, "Weightlifting": 1}
fencing_value = US_medals["Fencing"]
print(... | 47.857143 | 96 | 0.579104 |
2e504a09093c41cc99eb01b32a6dad6def30b3b4 | 785 | py | Python | test/profiletests.py | AlderDHT/alder | 26a11d482dfe6763e0fed3f5ac0e379396f5d5bc | [
"Apache-2.0"
] | 2 | 2020-10-13T11:16:27.000Z | 2021-12-23T00:48:18.000Z | test/profiletests.py | AlderDHT/alder | 26a11d482dfe6763e0fed3f5ac0e379396f5d5bc | [
"Apache-2.0"
] | null | null | null | test/profiletests.py | AlderDHT/alder | 26a11d482dfe6763e0fed3f5ac0e379396f5d5bc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import python libs
import os
import sys
import unittest
import cProfile
import pstats
import StringIO
ALDER_ROOT = os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
UNIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'unit'))
... | 23.088235 | 89 | 0.707006 |
7c1ff7378508194260bd9a1ad86024d92d3c3b14 | 7,873 | py | Python | src/main/start.py | jasontalon/BMW-YOLOv4-Inference-API-CPU | 847b08e6f88bfa688d7def0d198f38a4ad558a0e | [
"BSD-3-Clause"
] | 127 | 2019-12-11T18:40:17.000Z | 2020-07-17T16:08:16.000Z | src/main/start.py | jasontalon/BMW-YOLOv4-Inference-API-CPU | 847b08e6f88bfa688d7def0d198f38a4ad558a0e | [
"BSD-3-Clause"
] | 1 | 2021-06-03T09:19:36.000Z | 2021-06-03T09:19:36.000Z | src/main/start.py | jasontalon/BMW-YOLOv4-Inference-API-CPU | 847b08e6f88bfa688d7def0d198f38a4ad558a0e | [
"BSD-3-Clause"
] | 48 | 2019-12-15T08:21:50.000Z | 2020-06-17T17:58:43.000Z | import sys
from typing import List
from models import ApiResponse
from inference.errors import Error
from starlette.responses import FileResponse
from starlette.staticfiles import StaticFiles
from starlette.middleware.cors import CORSMiddleware
from deep_learning_service import DeepLearningService
from fastapi import F... | 35.147321 | 120 | 0.740251 |
69ec164562d5211886ac36e621df39882b40a6ad | 27,360 | py | Python | tests/test_validators.py | chsachs/attrs | 7804a68ee3dd2c2a0302d482237c51ce975ef17f | [
"MIT"
] | null | null | null | tests/test_validators.py | chsachs/attrs | 7804a68ee3dd2c2a0302d482237c51ce975ef17f | [
"MIT"
] | null | null | null | tests/test_validators.py | chsachs/attrs | 7804a68ee3dd2c2a0302d482237c51ce975ef17f | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
"""
Tests for `attr.validators`.
"""
from __future__ import absolute_import, division, print_function
import re
import pytest
import attr
from attr import _config, fields, has
from attr import validators as validator_module
from attr._compat import PY2, TYPE
from attr.validators imp... | 26.692683 | 79 | 0.555373 |
b4a3d5216eaa9bd7e02bbbf25286c79f54ded71b | 1,043 | py | Python | src/CAR_FILES/CAR_2016_04_005.py | rx294/Sherlock | 427224369485e97366defd823c1b61cb7c1b641b | [
"Apache-2.0"
] | 1 | 2022-02-03T20:50:13.000Z | 2022-02-03T20:50:13.000Z | src/CAR_FILES/CAR_2016_04_005.py | rx294/Sherlock | 427224369485e97366defd823c1b61cb7c1b641b | [
"Apache-2.0"
] | null | null | null | src/CAR_FILES/CAR_2016_04_005.py | rx294/Sherlock | 427224369485e97366defd823c1b61cb7c1b641b | [
"Apache-2.0"
] | 1 | 2020-10-26T09:00:30.000Z | 2020-10-26T09:00:30.000Z | # CAR_2016_04_005: Remote Desktop Logon
# A remote desktop logon, through RDP, may be typical of a system administrator
# or IT support, but only from select workstations. Monitoring remote desktop
# logons and comparing to known/approved originating systems can detect lateral
# movement of an adversary.
TECHNIQUES =... | 35.965517 | 94 | 0.643337 |
45084a4e8ba7d100dfc1b0fd6fc50653cb947e51 | 2,140 | py | Python | scripts/bond/lr_bond_wf.py | Judene/fts_predictors | de018526579d7bce9f6619cf18fa2a634f29bede | [
"MIT"
] | null | null | null | scripts/bond/lr_bond_wf.py | Judene/fts_predictors | de018526579d7bce9f6619cf18fa2a634f29bede | [
"MIT"
] | null | null | null | scripts/bond/lr_bond_wf.py | Judene/fts_predictors | de018526579d7bce9f6619cf18fa2a634f29bede | [
"MIT"
] | null | null | null | import os
import pathlib
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from src.models.walk_forward_predictor import WalkForwardPredictor
from src.models.lr import LRegression
from src.utils import series_to_supervised
# Get data path or create a directory if it does not exist
# TODO: This ... | 33.968254 | 105 | 0.742991 |
69de8a67c3331199eec6f47464e7e975f936656c | 2,090 | py | Python | sphinx-sources/Examples/Zernike/Shack_HartmannDemo.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 132 | 2017-03-15T15:28:46.000Z | 2022-03-09T00:28:25.000Z | sphinx-sources/Examples/Zernike/Shack_HartmannDemo.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 63 | 2017-01-26T15:46:55.000Z | 2022-01-25T04:50:59.000Z | sphinx-sources/Examples/Zernike/Shack_HartmannDemo.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | 37 | 2017-02-17T16:11:38.000Z | 2022-01-25T18:03:47.000Z | #! python3
import numpy as np
import matplotlib.pyplot as plt
from LightPipes import *
"""
Shack_HartmannDemo.py
Demonstrates a Shack Hartmann sensor.
cc Fred van Goor, May 2020.
"""
wavelength=632.8*nm
size=5*mm
N=2000
x_sep=0.5*mm
y_sep=0.5*mm
size_field=1.0*x_sep
sy=0*mm
f=4*cm
Dlens=0.45*mm
Nfield... | 29.857143 | 150 | 0.674641 |
e12d19e7d41a1a83828a8902b0d3b7351f3ce11d | 761 | py | Python | ckan/__init__.py | nigelbabu/ckan | bfab554772b7530fe18ceca8681c1db55386e547 | [
"Apache-2.0"
] | null | null | null | ckan/__init__.py | nigelbabu/ckan | bfab554772b7530fe18ceca8681c1db55386e547 | [
"Apache-2.0"
] | null | null | null | ckan/__init__.py | nigelbabu/ckan | bfab554772b7530fe18ceca8681c1db55386e547 | [
"Apache-2.0"
] | null | null | null | __version__ = '2.4a'
__description__ = 'CKAN Software'
__long_description__ = \
'''CKAN software provides a hub for datasets. The flagship site running CKAN
is theDataHub.org but it is also used for dozens of other open data websites
run by governments, agencies and citizens.
CKAN provides a place to search for open ... | 36.238095 | 76 | 0.781866 |
df35eef1ae47dacf9dad7474c1369d4996488aa1 | 15,982 | py | Python | utils/sparse.py | daniil-777/graph-matching | 3ae2522d42ea287edc2d5458bccb6b86ed05664e | [
"MIT"
] | 2 | 2020-06-30T11:33:42.000Z | 2020-06-30T11:33:59.000Z | utils/sparse.py | daniil-777/Graph_Matching | 3ae2522d42ea287edc2d5458bccb6b86ed05664e | [
"MIT"
] | 1 | 2021-01-15T18:34:28.000Z | 2021-01-15T18:34:28.000Z | utils/sparse.py | daniil-777/Graph_Matching | 3ae2522d42ea287edc2d5458bccb6b86ed05664e | [
"MIT"
] | null | null | null | import sys
import torch
from torch.autograd import Function
import numpy as np
import scipy.sparse as ssp
from sparse_torch import CSRMatrix3d, CSCMatrix3d
from torch.utils.cpp_extension import load
bilinear_diag = load(name='bilinear_diag', sources=['extension/bilinear_diag/bilinear_diag.cpp',
... | 35.995495 | 119 | 0.607371 |
def2bfe5bfd3b09e7ec6fa049c1831da05de99c6 | 5,013 | py | Python | tests/test_dekad.py | tmistelbauer/poets4SATIDA | 50af86a6cda6414831a73bbedcdd075a49b58f4a | [
"BSD-3-Clause"
] | 1 | 2015-10-13T07:09:56.000Z | 2015-10-13T07:09:56.000Z | tests/test_dekad.py | tmistelbauer/poets4SATIDA | 50af86a6cda6414831a73bbedcdd075a49b58f4a | [
"BSD-3-Clause"
] | null | null | null | tests/test_dekad.py | tmistelbauer/poets4SATIDA | 50af86a6cda6414831a73bbedcdd075a49b58f4a | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2014, Vienna University of Technology (TU Wien), Department
# of Geodesy and Geoinformation (GEO).
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source co... | 37.133333 | 79 | 0.666068 |
b1ecacb18f83c6d8e97538ec8c7779545eaed484 | 21,485 | py | Python | src/transformers/data/processors/glue.py | abhasahay/transformers | 8d22fb3c59d1fa3a596e8edadda00786c2b99efc | [
"Apache-2.0"
] | null | null | null | src/transformers/data/processors/glue.py | abhasahay/transformers | 8d22fb3c59d1fa3a596e8edadda00786c2b99efc | [
"Apache-2.0"
] | null | null | null | src/transformers/data/processors/glue.py | abhasahay/transformers | 8d22fb3c59d1fa3a596e8edadda00786c2b99efc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 35.928094 | 145 | 0.594601 |
ef7d9a663d3e74d3c198f4791806a096fb9fe31f | 170,572 | py | Python | autotest/gdrivers/netcdf.py | Sokigo-GLS/gdal | 595f74bf60dff89fc5df53f9f4c3e40fc835e909 | [
"MIT"
] | 2 | 2018-03-22T22:31:00.000Z | 2021-07-16T01:34:47.000Z | autotest/gdrivers/netcdf.py | Sokigo-GLS/gdal | 595f74bf60dff89fc5df53f9f4c3e40fc835e909 | [
"MIT"
] | null | null | null | autotest/gdrivers/netcdf.py | Sokigo-GLS/gdal | 595f74bf60dff89fc5df53f9f4c3e40fc835e909 | [
"MIT"
] | null | null | null | #!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test NetCDF driver support.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
#############################################################... | 34.45203 | 733 | 0.627436 |
91bcaa57635ddf9377e8e160018ddccc837da892 | 1,523 | py | Python | tests/test_seminar.py | simaki/seminario | 4d12ff2ac776d313f1b55b6dbd42d0080ea27f56 | [
"BSD-3-Clause"
] | 2 | 2019-10-21T07:04:31.000Z | 2019-10-22T02:41:21.000Z | tests/test_seminar.py | simaki/seminario | 4d12ff2ac776d313f1b55b6dbd42d0080ea27f56 | [
"BSD-3-Clause"
] | 6 | 2019-12-25T01:33:37.000Z | 2020-02-08T08:52:13.000Z | tests/test_seminar.py | simaki/seminario | 4d12ff2ac776d313f1b55b6dbd42d0080ea27f56 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from os.path import dirname
from pathlib import Path
import yaml
from seminario import Seminar
from seminario.config import config
tests_path = Path(dirname(__file__))
params_seminardata = [
tests_path / 'cases/seminar/01.yml',
tests_path / 'cases/seminar/02.yml',
tests_path / 'cases/semi... | 25.383333 | 82 | 0.635588 |
98dd936379702b57a71e9d8e2272e3ca819bc945 | 2,715 | py | Python | refitt/apps/refitt/service/stream.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 4 | 2020-09-11T01:15:11.000Z | 2021-05-12T16:46:48.000Z | refitt/apps/refitt/service/stream.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 12 | 2021-03-20T03:24:53.000Z | 2022-02-19T03:20:43.000Z | refitt/apps/refitt/service/stream.py | refitt/ref | 3ccc398e7b95f77549ab77884b87f40abdd3effb | [
"Apache-2.0"
] | 2 | 2021-02-01T23:49:39.000Z | 2021-12-11T19:01:23.000Z | # SPDX-FileCopyrightText: 2019-2021 REFITT Team
# SPDX-License-Identifier: Apache-2.0
"""Subscribe to remote data broker."""
# type annotations
from __future__ import annotations
# standard libs
import os
# external libs
from cmdkit.app import Application
from cmdkit.cli import Interface
# internal libs
from ....... | 29.835165 | 89 | 0.643094 |
ebb285d4d9385a790a3133c2b4ec23826d6f98f6 | 3,382 | py | Python | tests/test_ssd1362.py | morpheus200/luma.oled | 74492ef4ea3374c02d139731855fff7a43c79f7a | [
"MIT"
] | 582 | 2017-01-17T00:01:33.000Z | 2022-03-30T17:46:42.000Z | tests/test_ssd1362.py | morpheus200/luma.oled | 74492ef4ea3374c02d139731855fff7a43c79f7a | [
"MIT"
] | 182 | 2017-01-12T15:01:19.000Z | 2022-03-24T21:06:10.000Z | tests/test_ssd1362.py | morpheus200/luma.oled | 74492ef4ea3374c02d139731855fff7a43c79f7a | [
"MIT"
] | 112 | 2017-01-15T02:29:26.000Z | 2022-03-30T17:36:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014-2020 Richard Hull and contributors
# See LICENSE.rst for details.
from luma.oled.device import ssd1362
from luma.core.render import canvas
from luma.core.framebuffer import full_frame
from baseline_data import get_reference_data, primitives
from helpe... | 32.519231 | 134 | 0.664991 |
06b752e347fa86847fecb954ade308dcc7ab0e89 | 485 | py | Python | ansible/build.py | JoelLefkowitz/arcade | e209bfab7c9bf6b33b535f43283d18520f97857f | [
"MIT"
] | 1 | 2021-08-03T17:34:54.000Z | 2021-08-03T17:34:54.000Z | ansible/build.py | JoelLefkowitz/arcade | e209bfab7c9bf6b33b535f43283d18520f97857f | [
"MIT"
] | null | null | null | ansible/build.py | JoelLefkowitz/arcade | e209bfab7c9bf6b33b535f43283d18520f97857f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from simple_pipes import pipe_call
default_version = "0.1.0_prod"
for (build_dir, build_name) in [
("arcade", "arcade"),
("scores", "scores"),
("db", "scores_db"),
]:
pipe_call(
[
"docker",
"build",
os.path.normpath(
... | 19.4 | 61 | 0.48866 |
90c099baaa0e7fc06c069872e33da2f17013561b | 1,316 | py | Python | CLRS/12-Binary-Search-Trees/12-1-4.py | Zenix27/data-structure-and-algorithms | 7570a65f40c8fbb8a08845be749f507f58ed773f | [
"MIT"
] | 81 | 2020-05-22T14:22:04.000Z | 2021-12-18T10:11:23.000Z | CLRS/12-Binary-Search-Trees/12-1-4.py | Zenix27/data-structure-and-algorithms | 7570a65f40c8fbb8a08845be749f507f58ed773f | [
"MIT"
] | 4 | 2020-08-06T21:08:00.000Z | 2021-03-31T16:07:50.000Z | CLRS/12-Binary-Search-Trees/12-1-4.py | Zenix27/data-structure-and-algorithms | 7570a65f40c8fbb8a08845be749f507f58ed773f | [
"MIT"
] | 37 | 2020-05-22T14:25:21.000Z | 2021-12-30T03:13:13.000Z | """
12.1-4
Give recursive algorithms that perform preorder and postorder tree walks in O(n) time on a tree of nodes.
"""
class Node:
"""Node of the tree"""
def __init__(self, data=None, left=None, right=None):
self.data = data
self.left = left
self.right = right
def postorderTravers... | 21.933333 | 105 | 0.566869 |
fde89e81d51bd3fc12fc4513cb8a442045274cb9 | 27,420 | py | Python | grr/server/grr_response_server/gui/gui_test_lib.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/gui_test_lib.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/gui_test_lib.py | jaegeral/grr | 1f6bcd901fbebf386988a80fc6cb4034cbedfde9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Lint as: python3
"""Helper functionality for gui testing."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import atexit
import binascii
import functools
import logging
import os
import threading
import time
from urllib import par... | 32.838323 | 96 | 0.705252 |
f07920598ab19244dad714855993abe5fb2664a1 | 2,434 | py | Python | onionMongoBot/onionMongoBot/spiders/onionspider.py | keyboardcowboy42/ahmia | a474a30e77f002ddf2be771dbe5ee7371a3c0ec8 | [
"BSD-3-Clause"
] | 176 | 2015-01-12T10:27:28.000Z | 2022-02-01T16:43:12.000Z | onionMongoBot/onionMongoBot/spiders/onionspider.py | keyboardcowboy42/ahmia | a474a30e77f002ddf2be771dbe5ee7371a3c0ec8 | [
"BSD-3-Clause"
] | 17 | 2015-01-05T11:58:51.000Z | 2022-03-02T14:54:14.000Z | onionMongoBot/onionMongoBot/spiders/onionspider.py | keyboardcowboy42/ahmia | a474a30e77f002ddf2be771dbe5ee7371a3c0ec8 | [
"BSD-3-Clause"
] | 80 | 2015-01-07T14:43:36.000Z | 2020-11-09T01:03:51.000Z | # -*- coding: UTF-8 -*-
import re
from urlparse import urlparse
import html2text
import scrapy
from scrapy.conf import settings
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.selector import HtmlXPathSelector
from onionMongoBot.items import Cr... | 34.771429 | 73 | 0.629827 |
9c76eaadba2f1c80d3d269f2aaa0154aadaef36b | 218 | py | Python | calamari_ocr/ocr/__init__.py | jacektl/calamari | 980477aefe4e56f7fc373119c1b38649798d8686 | [
"Apache-2.0"
] | 922 | 2018-07-06T05:18:22.000Z | 2022-03-22T12:38:32.000Z | calamari_ocr/ocr/__init__.py | jacektl/calamari | 980477aefe4e56f7fc373119c1b38649798d8686 | [
"Apache-2.0"
] | 267 | 2018-07-14T22:10:41.000Z | 2022-03-28T18:38:43.000Z | calamari_ocr/ocr/__init__.py | jacektl/calamari | 980477aefe4e56f7fc373119c1b38649798d8686 | [
"Apache-2.0"
] | 227 | 2018-07-06T07:42:16.000Z | 2022-02-27T05:29:59.000Z | from calamari_ocr.ocr.savedmodel.saved_model import SavedCalamariModel
from calamari_ocr.ocr.dataset.codec import Codec
from calamari_ocr.ocr.dataset import *
from calamari_ocr.ocr.training.cross_fold import CrossFold
| 43.6 | 70 | 0.87156 |
e3cf14bfc919faf9aac9370b7e02391bb0235bce | 5,506 | py | Python | project/S17-IO-3012/code/bin/benchmark_replicas_mapreduce.py | cloudmesh/sp17-i524 | 42dd11b914c03c741dad8a8505c3e091dc6ec412 | [
"Apache-2.0"
] | 2 | 2017-01-19T07:25:57.000Z | 2017-04-02T21:02:52.000Z | project/S17-IO-3012/code/bin/benchmark_replicas_mapreduce.py | cloudmesh/sp17-i524 | 42dd11b914c03c741dad8a8505c3e091dc6ec412 | [
"Apache-2.0"
] | 98 | 2017-01-19T04:24:02.000Z | 2017-10-27T11:30:50.000Z | project/S17-IO-3012/code/bin/benchmark_replicas_mapreduce.py | cloudmesh/sp17-i524 | 42dd11b914c03c741dad8a8505c3e091dc6ec412 | [
"Apache-2.0"
] | 294 | 2017-01-09T13:18:39.000Z | 2018-07-13T01:32:24.000Z | import matplotlib.pyplot as plt
import sys
import pandas as pd
def get_parm():
"""retrieves mandatory parameter to program
@param: none
@type: n/a
"""
try:
return sys.argv[1]
except:
print ('Must enter file name as parameter')
exit()
def read_file(filename):
"""... | 38.236111 | 153 | 0.737196 |
db32cf65edfd4a2cebfcbe5f85e437b21dd357bf | 15,670 | py | Python | pscript/parser0.py | Winand/pscript | ecea360e6f4747c3a0c6b3962d4056e32027fc4a | [
"BSD-2-Clause"
] | null | null | null | pscript/parser0.py | Winand/pscript | ecea360e6f4747c3a0c6b3962d4056e32027fc4a | [
"BSD-2-Clause"
] | null | null | null | pscript/parser0.py | Winand/pscript | ecea360e6f4747c3a0c6b3962d4056e32027fc4a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8
"""
Parts of this code (and in the other modules that define the parser
class) are inspired by / taken from the py2js project.
Useful links:
* https://greentreesnakes.readthedocs.org/en/latest/nodes.html
* https://github.com/qsnake/py2js/blob/master/py2js/__init__.py
Main limiting features for b... | 35.452489 | 86 | 0.545692 |
ac59d79b9585623c869095cc137b62d0bdac9819 | 6,741 | py | Python | attendees/occasions/services/gathering_service.py | xjlin0/attendees30 | e9d83fe5bcb235c41d6bf6e9b8cea17dbc487175 | [
"MIT"
] | null | null | null | attendees/occasions/services/gathering_service.py | xjlin0/attendees30 | e9d83fe5bcb235c41d6bf6e9b8cea17dbc487175 | [
"MIT"
] | null | null | null | attendees/occasions/services/gathering_service.py | xjlin0/attendees30 | e9d83fe5bcb235c41d6bf6e9b8cea17dbc487175 | [
"MIT"
] | null | null | null | from django.db.models import Q, F, Func
from django.db.models.expressions import OrderBy
from datetime import datetime, timedelta
from attendees.occasions.models import Gathering, Meet
class GatheringService:
@staticmethod
def by_assembly_meets(assembly_slug, meet_slugs):
return Gathering.objects.fi... | 44.94 | 213 | 0.592642 |
0685e7545f92537474b8b2eec29e23dd6c066008 | 4,271 | py | Python | colonization_project/views.py | NerdPraise/UKUFU-TASK | 3f3018a1d50706fa23fdacd13f644669c10406f0 | [
"MIT"
] | null | null | null | colonization_project/views.py | NerdPraise/UKUFU-TASK | 3f3018a1d50706fa23fdacd13f644669c10406f0 | [
"MIT"
] | null | null | null | colonization_project/views.py | NerdPraise/UKUFU-TASK | 3f3018a1d50706fa23fdacd13f644669c10406f0 | [
"MIT"
] | null | null | null | from os import name, stat
from re import L
from django.http.response import Http404
from rest_framework import status
from rest_framework.response import Response
from rest_framework.generics import ListAPIView, RetrieveAPIView
from rest_framework.views import APIView
from colonization_project.serializers import (
... | 33.108527 | 83 | 0.620698 |
9afe022fbab9bea330791aa6499ea30b39af98ba | 2,682 | py | Python | main.py | lauromoraes/hyperopt_promoter_arc | a5ffac1dcc616629b090c5afe04c12b5b48d01ee | [
"MIT"
] | null | null | null | main.py | lauromoraes/hyperopt_promoter_arc | a5ffac1dcc616629b090c5afe04c12b5b48d01ee | [
"MIT"
] | null | null | null | main.py | lauromoraes/hyperopt_promoter_arc | a5ffac1dcc616629b090c5afe04c12b5b48d01ee | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from Architecture import ArchitectureFactory
from Optmizer import Optmizer
from Validation import Validation
def load_dataset(organism):
from ml_data import SequenceNucsData
print('Load organism: {}'.format(organism))
npath, ppath = './fasta/{}_neg.fa'.format(org... | 31.186047 | 110 | 0.651007 |
26b1545fa957841e8b7fe22b5de95301a6de26a2 | 3,991 | py | Python | tensorflow/python/grappler/item_test.py | snu-project2/TFTizenver | e22147c086f83a7a7da11655acb86203f7747f64 | [
"Apache-2.0"
] | 16 | 2018-01-30T22:16:13.000Z | 2021-07-18T10:00:55.000Z | tensorflow/python/grappler/item_test.py | snu-project2/TFTizenver | e22147c086f83a7a7da11655acb86203f7747f64 | [
"Apache-2.0"
] | 3 | 2018-05-09T11:31:58.000Z | 2021-01-27T12:26:21.000Z | tensorflow/python/grappler/item_test.py | snu-project2/TFTizenver | e22147c086f83a7a7da11655acb86203f7747f64 | [
"Apache-2.0"
] | 11 | 2018-04-02T03:37:08.000Z | 2020-10-20T09:32:12.000Z | # Copyright 2017 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... | 36.281818 | 80 | 0.708093 |
80b99dccaa7f9420d0d5afda24b417381e0d2c36 | 328 | py | Python | python/qisys/__init__.py | PrashantKumar-sudo/qibuild | a16ce425cf25127ceff29507feeeeca37af23351 | [
"BSD-3-Clause"
] | null | null | null | python/qisys/__init__.py | PrashantKumar-sudo/qibuild | a16ce425cf25127ceff29507feeeeca37af23351 | [
"BSD-3-Clause"
] | null | null | null | python/qisys/__init__.py | PrashantKumar-sudo/qibuild | a16ce425cf25127ceff29507feeeeca37af23351 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2019 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" QiSys """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_f... | 36.444444 | 84 | 0.762195 |
9166aa9d1a607fb3085a64ca516167c35cc0db50 | 829 | py | Python | var/spack/repos/builtin/packages/py-backports-shutil-get-terminal-size/package.py | pbrady/spack | 91fc4cf28fa7145e1f855f8c03f30574a550308f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/py-backports-shutil-get-terminal-size/package.py | pbrady/spack | 91fc4cf28fa7145e1f855f8c03f30574a550308f | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/py-backports-shutil-get-terminal-size/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.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 PyBackportsShutilGetTerminalSize(PythonPackage):
"""A backport of the get_terminal_size fu... | 36.043478 | 112 | 0.757539 |
ca679306607ecf157ab36206406620e281504a43 | 906 | py | Python | instrumentation/opentelemetry-instrumentation-celery/setup.py | TimPansino/opentelemetry-python | 51ed4576c611316bd3f74d213501f5ffa3e2a5ca | [
"Apache-2.0"
] | 1 | 2020-03-17T05:37:21.000Z | 2020-03-17T05:37:21.000Z | instrumentation/opentelemetry-instrumentation-celery/setup.py | TimPansino/opentelemetry-python | 51ed4576c611316bd3f74d213501f5ffa3e2a5ca | [
"Apache-2.0"
] | 3 | 2019-08-26T13:06:36.000Z | 2020-02-21T21:44:02.000Z | instrumentation/opentelemetry-instrumentation-celery/setup.py | TimPansino/opentelemetry-python | 51ed4576c611316bd3f74d213501f5ffa3e2a5ca | [
"Apache-2.0"
] | 1 | 2020-10-22T20:13:37.000Z | 2020-10-22T20:13:37.000Z | # Copyright The OpenTelemetry 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 or agreed to in ... | 33.555556 | 79 | 0.757174 |
663efbbf57a0f56f2767f2a83cb6afe46c8d6df1 | 2,417 | py | Python | mistos-backend/src/app/api/com/api_classifier.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | 1 | 2021-03-22T10:57:01.000Z | 2021-03-22T10:57:01.000Z | mistos-backend/src/app/api/com/api_classifier.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | 44 | 2021-02-17T15:07:17.000Z | 2021-04-05T07:07:09.000Z | mistos-backend/src/app/api/com/api_classifier.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | null | null | null | # pylint:disable=no-name-in-module, import-error
import app.api.utils_com as utils_com
from app import crud
from app.api.com.api_request_models import DeleteRequest, UpdateNameRequest
from fastapi import APIRouter
router = APIRouter()
@router.get("/api/classifier/fetch_all_rf", status_code=200)
async def fetch_all_r... | 29.839506 | 79 | 0.753827 |
9970efea63ddc4321eb12151ef8d25819d20a723 | 5,703 | py | Python | test/functional/p2p_invalid_block.py | VeriBlock/b | 1c2dccb1f87251b72049b75cc4db630c4da1b5c9 | [
"MIT"
] | 4 | 2020-05-14T11:49:20.000Z | 2022-01-19T19:54:54.000Z | test/functional/p2p_invalid_block.py | VeriBlock/b | 1c2dccb1f87251b72049b75cc4db630c4da1b5c9 | [
"MIT"
] | 125 | 2020-01-16T11:02:04.000Z | 2022-03-24T12:27:13.000Z | test/functional/p2p_invalid_block.py | VeriBlock/b | 1c2dccb1f87251b72049b75cc4db630c4da1b5c9 | [
"MIT"
] | 9 | 2020-04-06T14:31:16.000Z | 2021-09-30T07:50:29.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid blocks.
In this test we connect to one node over p2p, and test block re... | 41.326087 | 115 | 0.68087 |
06146ace98f411ba77be31e1a87eabab469f5134 | 4,174 | py | Python | hackday_bot/bot.py | bboe/hackday_bot | f405645e74cb67f5dc2241f4e84cbec939627cb7 | [
"BSD-2-Clause"
] | null | null | null | hackday_bot/bot.py | bboe/hackday_bot | f405645e74cb67f5dc2241f4e84cbec939627cb7 | [
"BSD-2-Clause"
] | null | null | null | hackday_bot/bot.py | bboe/hackday_bot | f405645e74cb67f5dc2241f4e84cbec939627cb7 | [
"BSD-2-Clause"
] | null | null | null | """hackday_bot.bot module."""
import json
import logging
import os
import re
import time
from prawcore.exceptions import PrawcoreException
from .members import Members
AVAILABLE_COMMANDS = {
'help': 'Output this help message.',
'interested': ('Indicate interest in this project. If you previously '
... | 37.603604 | 79 | 0.600383 |
2dce876e431b0aaaadf64755a4d7dae3985c4d94 | 26,208 | py | Python | edb/edgeql/ast.py | jamilabreu/edgedb | 6d3f222e4c5d3300f483b4e06e8f747c6381f313 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/ast.py | jamilabreu/edgedb | 6d3f222e4c5d3300f483b4e06e8f747c6381f313 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/ast.py | jamilabreu/edgedb | 6d3f222e4c5d3300f483b4e06e8f747c6381f313 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 19.73494 | 79 | 0.727793 |
97ac81af987030f3e11d97172197076e8adc341b | 815 | py | Python | Test/Models/test_mps.py | rbktech/netket | 847e120cad48f9c92d394e2078370e452f268a3d | [
"Apache-2.0"
] | null | null | null | Test/Models/test_mps.py | rbktech/netket | 847e120cad48f9c92d394e2078370e452f268a3d | [
"Apache-2.0"
] | 8 | 2022-01-17T17:24:53.000Z | 2022-03-28T17:31:04.000Z | Test/Models/test_mps.py | inailuig/netket | ab57a6fb019edb9ac298969950724781f2ae2b22 | [
"Apache-2.0"
] | null | null | null | from functools import partial
from io import StringIO
import pytest
from pytest import approx, raises
import numpy as np
import jax
import jax.numpy as jnp
import netket as nk
from netket import nn as nknn
import flax
from contextlib import redirect_stderr
import tempfile
import re
@pytest.mark.parametrize("diag",... | 22.638889 | 74 | 0.717791 |
65802821d10b5ce575f552e331b5aaec463d7316 | 5,618 | py | Python | deep_patient_cohorts/common/utils.py | Semantic-Health/deep-patient-cohorts | e0f49bd5434bd22a81c09272e727b59e09154a22 | [
"MIT"
] | 2 | 2021-03-31T04:54:01.000Z | 2021-09-30T22:00:13.000Z | deep_patient_cohorts/common/utils.py | Semantic-Health/deep-patient-cohorts | e0f49bd5434bd22a81c09272e727b59e09154a22 | [
"MIT"
] | 64 | 2020-09-08T21:56:28.000Z | 2022-03-24T23:11:39.000Z | deep_patient_cohorts/common/utils.py | Semantic-Health/deep-patient-cohorts | e0f49bd5434bd22a81c09272e727b59e09154a22 | [
"MIT"
] | 3 | 2020-09-12T01:23:46.000Z | 2022-03-03T06:05:35.000Z | import re
from pathlib import Path
from typing import Optional
import pandas as pd
from tqdm import tqdm
POSITIVE = 1
NEGATIVE = -1
ABSTAIN = 0
IS_A_CID = "116680003"
TERM_LISTS = Path(__file__).parent / "term_lists"
# The textual descriptions of every child of the Snowmed Concept "Heart disease" (56265001)
HEART_D... | 39.013889 | 107 | 0.648807 |
4b0f8f4413d89e4e8f02b8dae275eed335a63670 | 5,649 | py | Python | intake/container/dataframe.py | tewf/intake | c9f3618ce6413e51685b9b9e2acd0e29cbb1e4ce | [
"BSD-2-Clause"
] | null | null | null | intake/container/dataframe.py | tewf/intake | c9f3618ce6413e51685b9b9e2acd0e29cbb1e4ce | [
"BSD-2-Clause"
] | null | null | null | intake/container/dataframe.py | tewf/intake | c9f3618ce6413e51685b9b9e2acd0e29cbb1e4ce | [
"BSD-2-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#------------------------------------------------------------------------... | 34.236364 | 80 | 0.584705 |
3c26e768bb1e0d898f421e4009dd60daf8c16324 | 625 | py | Python | manage.py | Tao-Network/shifu | 079e23af9aeba357a064da7f7eeb1d806f489761 | [
"MIT"
] | null | null | null | manage.py | Tao-Network/shifu | 079e23af9aeba357a064da7f7eeb1d806f489761 | [
"MIT"
] | null | null | null | manage.py | Tao-Network/shifu | 079e23af9aeba357a064da7f7eeb1d806f489761 | [
"MIT"
] | 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', 'shifu.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportEr... | 28.409091 | 73 | 0.6816 |
2df5e51f641032e7c02d53181e40e19742b53323 | 7,047 | py | Python | python/ray/rllib/models/catalog.py | rickyHong/Ray-repl | 24b93b11231fe627c4b4527535ae0c83a99485f8 | [
"Apache-2.0"
] | 1 | 2020-06-25T18:17:10.000Z | 2020-06-25T18:17:10.000Z | python/ray/rllib/models/catalog.py | rickyHong/Ray-Population-Based-Training-repl | 195a42f2fa4ab39d1e2260e6860d88c529023655 | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/models/catalog.py | rickyHong/Ray-Population-Based-Training-repl | 195a42f2fa4ab39d1e2260e6860d88c529023655 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gym
from ray.rllib.models.action_dist import (
Categorical, Deterministic, DiagGaussian)
from ray.rllib.models.preprocessors import (
NoPreprocessor, AtariRamPreprocessor, AtariPixelPreprocessor... | 36.512953 | 81 | 0.65574 |
8f7510e9b6e8acbda5a0ab01354029e42166a906 | 3,497 | py | Python | bindings/python/ensmallen/datasets/string/oryzasativaindicagroup.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/oryzasativaindicagroup.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/oryzasativaindicagroup.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 Oryza sativa Indica Group.
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--prot... | 33.304762 | 223 | 0.678296 |
021ce639f1f0d24c958ec39248beb25fba33fac3 | 2,261 | py | Python | UServer/utils/utils.py | soybean217/lora-python | 9c4324f81bae8b20f6c353447189f724a5cf54c6 | [
"MIT"
] | null | null | null | UServer/utils/utils.py | soybean217/lora-python | 9c4324f81bae8b20f6c353447189f724a5cf54c6 | [
"MIT"
] | null | null | null | UServer/utils/utils.py | soybean217/lora-python | 9c4324f81bae8b20f6c353447189f724a5cf54c6 | [
"MIT"
] | null | null | null | from binascii import a2b_base64, hexlify, unhexlify
from base64 import urlsafe_b64decode
from datetime import datetime
import pytz
def is_primitive(data):
return isinstance(data, (int, bool, float, str))
def validate_number(data):
try:
return float(data)
except ValueError:
return False
... | 26.6 | 79 | 0.639098 |
08ae0b34a7a0e4620ed520879ece7b1976e45849 | 263 | py | Python | day01/test4.py | liuweidongg/dejin | 12240b9d27347d6e041338869591aa7133bf80cd | [
"Apache-2.0"
] | 1 | 2018-09-27T02:01:38.000Z | 2018-09-27T02:01:38.000Z | day01/test4.py | liuweidongg/dejin | 12240b9d27347d6e041338869591aa7133bf80cd | [
"Apache-2.0"
] | null | null | null | day01/test4.py | liuweidongg/dejin | 12240b9d27347d6e041338869591aa7133bf80cd | [
"Apache-2.0"
] | null | null | null | shuiliang =eval(raw_input("Enter the amount of water in kilograms:"))
chuwen = eval(raw_input("Enter the initial temperature:"))
zhongwen = eval(raw_input("Enter the final temperature:"))
Q = shuiliang * (zhongwen - chuwen)*4184
print("The energy needed is :",Q)
| 43.833333 | 69 | 0.741445 |
4398b7067db999bb1ec472a4fe7dcd35f4781689 | 8,176 | py | Python | twisted/logger/_format.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | null | null | null | twisted/logger/_format.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | 1 | 2016-10-10T23:49:15.000Z | 2016-10-10T23:49:15.000Z | twisted/logger/_format.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | 1 | 2020-12-18T11:13:15.000Z | 2020-12-18T11:13:15.000Z | # -*- test-case-name: twisted.logger.test.test_format -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tools for formatting logging events.
"""
from datetime import datetime as DateTime
from twisted.python.compat import unicode
from twisted.python.failure import Failure
from twisted.py... | 28.992908 | 79 | 0.602128 |
ff419c155ef0f88257f395b6c83c16dc0f8ac35a | 3,215 | py | Python | functions/__main__.py | msb/minecraft-functions | d9fa2d73a9038c29e4be0aa03e4286a33d0eda46 | [
"MIT"
] | null | null | null | functions/__main__.py | msb/minecraft-functions | d9fa2d73a9038c29e4be0aa03e4286a33d0eda46 | [
"MIT"
] | null | null | null | functions/__main__.py | msb/minecraft-functions | d9fa2d73a9038c29e4be0aa03e4286a33d0eda46 | [
"MIT"
] | null | null | null | """
Script to create a set of minecraft functions depending on the generator selected and the
configuration supplied.
Usage:
minecraftfunctions structure java <nbt-file> <function-file> [<config-url>...]
minecraftfunctions structure bedrock <path-to-save> <path-to-functions> <config-url>...
minecraftfuncti... | 33.489583 | 98 | 0.702644 |
043193d7935ba02d37f7b9b6a21b172ff4f15d71 | 4,675 | py | Python | datasets/lrw_dataset.py | swpang/lipreading-snu | ebdbb15d2f5558c3fdbaf3ecdb22397e8b31f465 | [
"FTL"
] | 2 | 2022-03-13T03:51:04.000Z | 2022-03-13T04:04:03.000Z | datasets/lrw_dataset.py | swpang/lipreading-snu | ebdbb15d2f5558c3fdbaf3ecdb22397e8b31f465 | [
"FTL"
] | null | null | null | datasets/lrw_dataset.py | swpang/lipreading-snu | ebdbb15d2f5558c3fdbaf3ecdb22397e8b31f465 | [
"FTL"
] | 1 | 2022-03-13T03:45:09.000Z | 2022-03-13T03:45:09.000Z | import torch
import numpy as np
import os
import glob
import librosa
import random
from collections import defaultdict
from datasets.base_dataset import BaseDataset
from utils.dataloaders import get_preprocessing_pipelines
from utils.util import read_txt_lines
class LRWDataset(BaseDataset):
# dataloade... | 43.287037 | 118 | 0.580963 |
bfe919063afba8a61268d38332c9fa5f3fc09ee8 | 1,523 | py | Python | src/zenml/pipelines/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | 1 | 2022-03-11T10:15:22.000Z | 2022-03-11T10:15:22.000Z | src/zenml/pipelines/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | src/zenml/pipelines/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 49.129032 | 217 | 0.781353 |
ae597a8b970aafd3429874d5d7780ed065a49c7c | 933 | py | Python | hw4/spectral_clustering/kmeans.py | Cjkkkk/data_mining_homework | 649dc3144444611d7c8ccaf6109050f53b5c611c | [
"MIT"
] | 2 | 2019-08-31T09:15:21.000Z | 2020-02-03T09:01:04.000Z | hw4/spectral_clustering/kmeans.py | Cjkkkk/data_mining_homework | 649dc3144444611d7c8ccaf6109050f53b5c611c | [
"MIT"
] | null | null | null | hw4/spectral_clustering/kmeans.py | Cjkkkk/data_mining_homework | 649dc3144444611d7c8ccaf6109050f53b5c611c | [
"MIT"
] | null | null | null | import numpy as np
def kmeans(x, k):
'''
A Fast implementation of K-Means clustering algorithm
Input: x - data point features, n-by-p maxtirx.
k - the number of clusters
OUTPUT: idx - cluster label
'''
x = x.astype(float)
n = x.shape[0]
ctrs = x[np.random.pe... | 27.441176 | 67 | 0.557342 |
553de1352686f45e47a919029fe9bb6807956539 | 4,340 | py | Python | codegen/generator/code_generator.py | Tooni/CAScript-Artifact | 165e86b3dfc81549ffbbfffc4509f74ab3f71540 | [
"MIT"
] | null | null | null | codegen/generator/code_generator.py | Tooni/CAScript-Artifact | 165e86b3dfc81549ffbbfffc4509f74ab3f71540 | [
"MIT"
] | null | null | null | codegen/generator/code_generator.py | Tooni/CAScript-Artifact | 165e86b3dfc81549ffbbfffc4509f74ab3f71540 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
import os
from pathlib import Path
import shutil
import subprocess
from sys import stdout
import typing
from codegen.automata import Endpoint
from codegen.utils import logger, TemplateGenerator
def _get_prettifier_command(*, path: str) -> typing.List[str]:
"""Generate prettifi... | 33.643411 | 131 | 0.639401 |
05ba64817c7ed2bafadb7094f495bce6696e61bc | 585 | py | Python | sdk/python/kfp/v2/compiler_cli_tests/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | sdk/python/kfp/v2/compiler_cli_tests/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | sdk/python/kfp/v2/compiler_cli_tests/__init__.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2020 The Kubeflow 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 or agreed to in... | 41.785714 | 74 | 0.764103 |
3608ade172405dfe37b4665e9dada8fcde0bb6af | 20,407 | py | Python | demo_of_transfer_learning_autoscale_x.py | hkaneko1985/transfer_learning | 56020909c81f46973e24e9e03e7dcbb7120eb593 | [
"MIT"
] | 2 | 2020-04-14T04:35:32.000Z | 2021-12-13T06:53:43.000Z | demo_of_transfer_learning_autoscale_x.py | hkaneko1985/transfer_learning | 56020909c81f46973e24e9e03e7dcbb7120eb593 | [
"MIT"
] | null | null | null | demo_of_transfer_learning_autoscale_x.py | hkaneko1985/transfer_learning | 56020909c81f46973e24e9e03e7dcbb7120eb593 | [
"MIT"
] | 2 | 2020-04-14T04:35:36.000Z | 2021-11-21T03:16:02.000Z | # -*- coding: utf-8 -*-
"""
@author: hkaneko
"""
import math
import matplotlib.figure as figure
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn import model_selection, svm
from sklearn.cross_decomposition import PLSRegression
from sklearn.ensemble import RandomForestRe... | 59.322674 | 143 | 0.672661 |
942a85b5e7f81543ef2a04f422e3812b4a04e273 | 136 | py | Python | test/fixtures/project_b/setup.py | timoludwig/bumpver | 1fb7e84e9146535c9acf4288056fb8cc09dc43af | [
"MIT"
] | 50 | 2021-01-05T02:18:24.000Z | 2022-03-03T14:45:46.000Z | test/fixtures/project_b/setup.py | timoludwig/bumpver | 1fb7e84e9146535c9acf4288056fb8cc09dc43af | [
"MIT"
] | 22 | 2021-01-17T15:21:05.000Z | 2022-03-11T12:57:43.000Z | test/fixtures/project_b/setup.py | timoludwig/bumpver | 1fb7e84e9146535c9acf4288056fb8cc09dc43af | [
"MIT"
] | 7 | 2021-01-17T15:32:08.000Z | 2022-02-12T12:47:39.000Z | import setuptools
setuptools.setup(
name="mylib",
license="MIT",
version="201307.456b0",
keywords="awesome library",
)
| 15.111111 | 31 | 0.661765 |
57c4dea16fab01d6f0f61a159ccea8a2e6cb805c | 4,952 | py | Python | yolo3/utils.py | saakur/keras-yolo3 | 1023645e7bcfcc5a75f7766692b42901d7433b7c | [
"MIT"
] | null | null | null | yolo3/utils.py | saakur/keras-yolo3 | 1023645e7bcfcc5a75f7766692b42901d7433b7c | [
"MIT"
] | null | null | null | yolo3/utils.py | saakur/keras-yolo3 | 1023645e7bcfcc5a75f7766692b42901d7433b7c | [
"MIT"
] | null | null | null | """Miscellaneous utility functions."""
from functools import reduce
from PIL import Image
import numpy as np
from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
def compose(*funcs):
"""Compose arbitrarily many functions, evaluated left to right.
Reference: https://mathieularose.com/function-composition-in-... | 33.013333 | 160 | 0.544628 |
e982ee5a476b7aa89dfd0e72bfc352a6c4068c7f | 961 | py | Python | spm/bin/write_run_scripts_dr7_chabrier.py | AndresSixtos/pyeBOSS | 4750908c8bc409633bef8f790133e3a1f3f0c9e4 | [
"CC0-1.0"
] | 1 | 2017-05-23T13:03:27.000Z | 2017-05-23T13:03:27.000Z | spm/bin/write_run_scripts_dr7_chabrier.py | AndresSixtos/pyeBOSS | 4750908c8bc409633bef8f790133e3a1f3f0c9e4 | [
"CC0-1.0"
] | null | null | null | spm/bin/write_run_scripts_dr7_chabrier.py | AndresSixtos/pyeBOSS | 4750908c8bc409633bef8f790133e3a1f3f0c9e4 | [
"CC0-1.0"
] | 2 | 2017-09-26T11:17:30.000Z | 2021-09-14T06:09:18.000Z | import os
from os.path import join
import numpy as n
def writeScript(rootName, plate):
f=open(rootName+".sh",'w')
f.write("#!/bin/bash \n")
f.write("#PBS -l walltime=260:00:00 \n")
f.write("#PBS -o "+plate+".o.$PBS_JOBID \n")
f.write("#PBS -e "+plate+".e$PBS_JOBID \n")
f.write("#PBS -M comparat@mpe.mpg.de \n")
f... | 40.041667 | 110 | 0.688866 |
83980702ab33caffc06d59cec6b3327a87ca3bdc | 821 | py | Python | test_dashvisor/test_backends.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | 36 | 2015-01-06T11:02:02.000Z | 2022-01-13T02:58:30.000Z | test_dashvisor/test_backends.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | 3 | 2015-03-21T03:11:17.000Z | 2017-09-16T15:59:49.000Z | test_dashvisor/test_backends.py | alexsilva/django-dashvisor | 0126b894b5d52a601fedde92a3833b4d1d882160 | [
"ISC"
] | 20 | 2015-01-10T19:22:26.000Z | 2021-01-19T13:18:13.000Z | from nose import tools
from dashvisor.backends import file
from test_dashvisor.cases import SupervisorTestCase
class TestFileBackend(SupervisorTestCase):
def setUp(self):
self.backend = file.Backend()
def test_servers_are_loaded(self):
tools.assert_equals(
self.backend.servers.k... | 25.65625 | 75 | 0.565164 |
70045f5902368ccd4b08845c105ccced5f76ae3f | 666 | py | Python | addint/models.py | JorgeScp/performance | b7de0498fdcf346ad0b44558ff62f4bf9cc1a986 | [
"MIT"
] | 1 | 2022-01-05T19:52:35.000Z | 2022-01-05T19:52:35.000Z | addint/models.py | JorgeScp/performance | b7de0498fdcf346ad0b44558ff62f4bf9cc1a986 | [
"MIT"
] | null | null | null | addint/models.py | JorgeScp/performance | b7de0498fdcf346ad0b44558ff62f4bf9cc1a986 | [
"MIT"
] | null | null | null | from django.db import models
from django.conf import settings
from django.conf import settings
# Create your models here.
class AddInt(models.Model):
employee = models.ForeignKey(
settings.AUTH_USER_MODEL,
blank=True,
null=True,
on_delete=models.CASCADE,
)
dated = mode... | 24.666667 | 55 | 0.660661 |
f1091553334286ecf713822266a7b6f816bc8c63 | 463 | py | Python | web/gitcommit.py | mrscorpion/MSEasyReader | 68179352d641c6f138dd79b594f8376c94611345 | [
"MIT"
] | 519 | 2016-05-19T16:51:51.000Z | 2021-10-09T15:20:02.000Z | web/gitcommit.py | mrscorpion/MSEasyReader | 68179352d641c6f138dd79b594f8376c94611345 | [
"MIT"
] | 8 | 2016-05-12T15:44:28.000Z | 2016-11-01T16:13:16.000Z | web/gitcommit.py | everettjf/iOSBlog | 258a9977fb6aba35857f885c68b8672f798b9b26 | [
"MIT"
] | 77 | 2016-05-13T07:36:35.000Z | 2021-04-21T05:34:19.000Z | import os
import datetime
from envconfig import target_json_dir,target_markdown_dir
# Git
def commit_and_push(dir):
print(dir)
os.system('cd %s;git pull' % dir)
os.system('cd %s;git add .' % dir)
os.system('cd %s;git commit -m autocommit%s' % (dir, datetime.datetime.now().isoformat()))
os.system(... | 25.722222 | 94 | 0.704104 |
29ad475bf87b14d319a4795e34dbd3ed91c83a1c | 1,568 | py | Python | utils/aliyunsdk/aliyunsms.py | shiqianlong/xfz | 3474794e9585eae42362cbcdc67836498f452571 | [
"BSL-1.0"
] | null | null | null | utils/aliyunsdk/aliyunsms.py | shiqianlong/xfz | 3474794e9585eae42362cbcdc67836498f452571 | [
"BSL-1.0"
] | null | null | null | utils/aliyunsdk/aliyunsms.py | shiqianlong/xfz | 3474794e9585eae42362cbcdc67836498f452571 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from django.conf import settings
from utils.aliyunsdk.aliyunsdkdysmsapi.request.v20170525 import SendSmsRequest
from utils.aliyunsdk.aliyunsdkdysmsapi.request.v20170525 import QuerySendDetailsRequest
from aliyunsdkcore.client import AcsClient
import uuid
from aliyunsdkcore.profile imp... | 26.133333 | 87 | 0.785077 |
0072a1e4f97573504fe3115c4be586829a871341 | 55,298 | py | Python | rasa/shared/core/domain.py | intech/rasa | 1b1ec9ea32becb56c636076f32107a1918e7d16f | [
"Apache-2.0"
] | 1 | 2020-11-21T01:27:46.000Z | 2020-11-21T01:27:46.000Z | rasa/shared/core/domain.py | forn-qsz/rasa | 6fe5ad8027e19a5280488966a09af2247a182e2b | [
"Apache-2.0"
] | null | null | null | rasa/shared/core/domain.py | forn-qsz/rasa | 6fe5ad8027e19a5280488966a09af2247a182e2b | [
"Apache-2.0"
] | 1 | 2020-11-21T01:26:43.000Z | 2020-11-21T01:26:43.000Z | import copy
import collections
import json
import logging
import os
from typing import (
Any,
Dict,
List,
NamedTuple,
Optional,
Set,
Text,
Tuple,
Union,
NoReturn,
TYPE_CHECKING,
)
from pathlib import Path
import rasa.shared.constants
import rasa.shared.core.constants
from ra... | 38.162871 | 101 | 0.61429 |
fd2b144f685399d2d24f02bbc9c1f268d02d6448 | 1,572 | py | Python | tests/test_clip_based/test_clip_based_fscore.py | fgnt/sed_scores_eval | 475b83fdfcccd66508769dc14b8eb4d74740240b | [
"MIT"
] | 7 | 2021-11-17T16:09:56.000Z | 2022-03-07T22:11:42.000Z | tests/test_clip_based/test_clip_based_fscore.py | fgnt/sed_scores_eval | 475b83fdfcccd66508769dc14b8eb4d74740240b | [
"MIT"
] | 1 | 2022-03-16T17:17:19.000Z | 2022-03-16T17:32:59.000Z | tests/test_clip_based/test_clip_based_fscore.py | fgnt/sed_scores_eval | 475b83fdfcccd66508769dc14b8eb4d74740240b | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from sed_scores_eval import clip_based, io, package_dir
from sed_scores_eval.base_modules.precision_recall import fscore_from_sed_eval_metrics
@pytest.mark.parametrize("dataset", ["validation", "eval"])
@pytest.mark.parametrize(
"threshold",
[
.5,
{
... | 33.446809 | 86 | 0.637405 |
ea7698bf329688c59d12f0d5e6ac639472cd9ba5 | 1,682 | py | Python | sdks/python/apache_beam/examples/snippets/transforms/elementwise/kvswap_test.py | noah-goodrich/beam | 5a851b734f53206c20efe08d93d15760bbc15b0c | [
"Apache-2.0"
] | 1 | 2019-06-28T13:01:00.000Z | 2019-06-28T13:01:00.000Z | sdks/python/apache_beam/examples/snippets/transforms/elementwise/kvswap_test.py | noah-goodrich/beam | 5a851b734f53206c20efe08d93d15760bbc15b0c | [
"Apache-2.0"
] | 5 | 2019-05-21T12:50:11.000Z | 2019-07-18T10:11:28.000Z | sdks/python/apache_beam/examples/snippets/transforms/elementwise/kvswap_test.py | noah-goodrich/beam | 5a851b734f53206c20efe08d93d15760bbc15b0c | [
"Apache-2.0"
] | 1 | 2021-03-21T23:28:23.000Z | 2021-03-21T23:28:23.000Z | # coding=utf-8
#
# 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");... | 29.508772 | 99 | 0.741974 |
b516f992a8635120b574890c8299ab209df94e08 | 130 | py | Python | first_site/polls/admin.py | babu-thomas/django-tutorial | 9f650f50ec481ffbac051760f5117ba8ce3b7101 | [
"MIT"
] | null | null | null | first_site/polls/admin.py | babu-thomas/django-tutorial | 9f650f50ec481ffbac051760f5117ba8ce3b7101 | [
"MIT"
] | null | null | null | first_site/polls/admin.py | babu-thomas/django-tutorial | 9f650f50ec481ffbac051760f5117ba8ce3b7101 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Question, Choice
admin.site.register(Question)
admin.site.register(Choice)
| 18.571429 | 36 | 0.815385 |
21445d89f16f78c3d6269344c9b10c805c616b13 | 524 | py | Python | src/args.py | pokurt/qr-Pyrogram-session | 106b126d38bb1bffe7b7908f96ae85f2da949021 | [
"MIT"
] | 14 | 2021-08-24T03:17:13.000Z | 2021-11-08T09:57:57.000Z | src/args.py | pokurt/qr-Pyrogram-session | 106b126d38bb1bffe7b7908f96ae85f2da949021 | [
"MIT"
] | null | null | null | src/args.py | pokurt/qr-Pyrogram-session | 106b126d38bb1bffe7b7908f96ae85f2da949021 | [
"MIT"
] | 4 | 2021-08-24T03:19:53.000Z | 2021-11-03T08:14:01.000Z | args = [
{
'short_name': '-s',
'long_name': '--session_name',
'help': 'any name you want to give to your pyrogram.Client',
'type': str
},
{
'short_name': '-v',
'long_name': '--app_version',
'help': 'a string classify as version to give to your pyrogram... | 24.952381 | 79 | 0.492366 |
975891f0e25920c9318e05abd1b68906a60290d6 | 8,892 | py | Python | src/spring-cloud/azext_spring_cloud/commands.py | msazurestackworkloads/azure-cli-extensions | 88b6eebc92489e41403ac4e8ba1179306cd16bdf | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/commands.py | msazurestackworkloads/azure-cli-extensions | 88b6eebc92489e41403ac4e8ba1179306cd16bdf | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/commands.py | msazurestackworkloads/azure-cli-extensions | 88b6eebc92489e41403ac4e8ba1179306cd16bdf | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 61.75 | 132 | 0.680612 |
caf6d23dda64fbd4a3a2d2dd4661009a3eab2a54 | 1,049 | py | Python | datamining/SentimentAnalysis/sentiment_analysis.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | 3 | 2018-01-04T00:46:12.000Z | 2022-01-01T21:41:16.000Z | datamining/SentimentAnalysis/sentiment_analysis.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | null | null | null | datamining/SentimentAnalysis/sentiment_analysis.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | 1 | 2022-01-01T21:39:15.000Z | 2022-01-01T21:39:15.000Z | import numpy as np
import math
from nltk.sentiment.vader import SentimentIntensityAnalyzer as SIA
def analyse_text(text, keywords):
sia = SIA()
sentiment_out = 0
no_keyword_counter = 0
for keyword in keywords:
if keyword in text:
sentiment = sia.polarity_scores(text)
... | 25.585366 | 71 | 0.660629 |
a6de733f8f949da4e4927acd9ac86cd6f3d17661 | 6,684 | py | Python | L1Trigger/Phase2L1Taus/test/test-L1PFTaus.py | thesps/cmssw | ad5315934948ce96699b29cc1d5b03a59f99634f | [
"Apache-2.0"
] | null | null | null | L1Trigger/Phase2L1Taus/test/test-L1PFTaus.py | thesps/cmssw | ad5315934948ce96699b29cc1d5b03a59f99634f | [
"Apache-2.0"
] | null | null | null | L1Trigger/Phase2L1Taus/test/test-L1PFTaus.py | thesps/cmssw | ad5315934948ce96699b29cc1d5b03a59f99634f | [
"Apache-2.0"
] | null | null | null | # Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: step2 --python_filename=rerun_step2_L1_onMCL1_FEVTHLTDEBUG.py --no_exec -s L1 --datatier GEN-SIM-DIGI-RAW -n 1 --era Phase2_timing --eventc... | 55.7 | 492 | 0.799521 |
46dcea9c60165f352d9ef5cef27dbe2824143e62 | 300 | py | Python | test/create_test_env.py | MadaooQuake/cboMP3 | b6eff897e2d66ef6b5f28c4917cc4bd70454125d | [
"MIT"
] | null | null | null | test/create_test_env.py | MadaooQuake/cboMP3 | b6eff897e2d66ef6b5f28c4917cc4bd70454125d | [
"MIT"
] | null | null | null | test/create_test_env.py | MadaooQuake/cboMP3 | b6eff897e2d66ef6b5f28c4917cc4bd70454125d | [
"MIT"
] | null | null | null | import numpy
import struct
import os
class createEnv:
def create_test_dir(self):
os.mkdir('test_tmp')
os.chdir('test_tmp')
def create_audio_file(self):
sampling_rate = 44100
frequency = 440
sample = 44100/440
interval = numpy.arange(sample) | 18.75 | 39 | 0.633333 |
dca740695b304812f145dcade59bad71792bd095 | 1,470 | py | Python | train/train.py | huabao97/YoloUnet-table-detectcut | f6695fe211fe009c42e1919b0472d768d8e5ba31 | [
"MIT"
] | 6 | 2021-04-14T12:14:15.000Z | 2021-12-01T07:26:45.000Z | train/train.py | jtliutw/YoloUnet-table-detectcut | 67a9bf2386f6f9b87357332e51ad75cd44c7a5d3 | [
"MIT"
] | 2 | 2021-09-09T03:03:28.000Z | 2022-01-07T09:38:35.000Z | train/train.py | jtliutw/YoloUnet-table-detectcut | 67a9bf2386f6f9b87357332e51ad75cd44c7a5d3 | [
"MIT"
] | 4 | 2021-05-27T06:30:01.000Z | 2022-03-14T03:13:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 9 23:11:51 2020
@author: chineseocr
"""
import sys
sys.path.append('.')
from table_line import model
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.callbacks import ModelCheckpoint,ReduceLROnPlateau
from sklearn.model_selection i... | 37.692308 | 122 | 0.688435 |
c9624e84adb1dacd5ef9322f2b98a464b921b43e | 24,596 | py | Python | zerver/tests/test_service_bot_system.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zerver/tests/test_service_bot_system.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-06-06T00:51:42.000Z | 2022-02-10T21:38:40.000Z | zerver/tests/test_service_bot_system.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import mock
from typing import Any, Union, Mapping, Callable
from django.conf import settings
from django.test import override_settings
from zerver.lib.actions import (
do_create_user,
get_service_bot_events,
)
from zerver.lib.bot_lib import StateHandler, EmbeddedBotHandler, \
Emb... | 44.883212 | 130 | 0.612579 |
29710fdf7b620c1bb368876660ae5d4f205c9299 | 5,406 | py | Python | acrv_apc_2017_perception/src/refinenet/cores/symbols/net_symbols.py | myalfred03/team_acrv_2017 | 9d3a28b4069262291fd28990676b69e90b06ac3a | [
"BSD-3-Clause"
] | 25 | 2017-11-24T19:04:51.000Z | 2020-08-27T06:25:49.000Z | acrv_apc_2017_perception/src/refinenet/cores/symbols/net_symbols.py | myalfred03/team_acrv_2017 | 9d3a28b4069262291fd28990676b69e90b06ac3a | [
"BSD-3-Clause"
] | 3 | 2018-10-03T06:44:06.000Z | 2018-11-07T14:53:58.000Z | acrv_apc_2017_perception/src/refinenet/cores/symbols/net_symbols.py | myalfred03/team_acrv_2017 | 9d3a28b4069262291fd28990676b69e90b06ac3a | [
"BSD-3-Clause"
] | 16 | 2017-12-24T14:19:08.000Z | 2021-07-14T13:34:51.000Z | import mxnet as mx
import numpy as np
def _attr_scope_lr(lr_type, lr_owner):
assert lr_type in ('alex', 'alex10', 'torch', 'psp')
# weight (lr_mult, wd_mult); bias;
# 1, 1; 2, 0;
if lr_type == 'alex':
if lr_owner == 'weight':
return mx.AttrScope()
elif lr_owner == 'bias':
... | 33.57764 | 146 | 0.50444 |
1957a5b7628b9846c2d904b1b79aeb7ac9de1da6 | 6,004 | py | Python | tests/modules/test_metrics.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 21 | 2021-09-29T17:19:29.000Z | 2022-03-14T23:24:51.000Z | tests/modules/test_metrics.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 1 | 2022-03-14T00:53:26.000Z | 2022-03-15T16:08:16.000Z | tests/modules/test_metrics.py | facebookresearch/worldsheet | 13175f8f5e10b13436546ebf1600dc21005124d0 | [
"BSD-3-Clause"
] | 2 | 2021-11-06T01:35:39.000Z | 2021-11-27T02:53:49.000Z | # 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 os
import unittest
import mmf.modules.metrics as metrics
import torch
from mmf.common.registry import regis... | 34.906977 | 86 | 0.608927 |
9ec61d95f12a55b74067549bee66ccb1fcb63bd9 | 94,070 | py | Python | src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_commands.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_commands.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_commands.py | akashsinghal/azure-cli | 8ab2f7604a834de790bdea849b3e83f2466428b9 | [
"MIT"
] | 1 | 2020-07-31T17:22:13.000Z | 2020-07-31T17:22:13.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 49.458465 | 220 | 0.600032 |
7449ee66a097e16a4ac1789b6ac542479d5e5d9d | 7,992 | py | Python | global/PlayInteractively.py | mullikine/StyleCLIP | d5cd9f04effd82d73c9e9b544ff471893d8702fb | [
"MIT"
] | 1 | 2021-04-14T05:15:45.000Z | 2021-04-14T05:15:45.000Z | global/PlayInteractively.py | mullikine/StyleCLIP | d5cd9f04effd82d73c9e9b544ff471893d8702fb | [
"MIT"
] | null | null | null | global/PlayInteractively.py | mullikine/StyleCLIP | d5cd9f04effd82d73c9e9b544ff471893d8702fb | [
"MIT"
] | 1 | 2021-04-26T21:54:36.000Z | 2021-04-26T21:54:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 11 22:20:55 2020
@author: wuzongze
"""
import sys
#sys.path=['', '/usr/local/tensorflow/avx-avx2-gpu/1.14.0/python3.7/site-packages', '/usr/local/torch/1.3/lib/python3.7/site-packages', '/usr/local/matlab/2018b/lib/python3.7/site-packages', '/cs/la... | 31.968 | 741 | 0.600726 |
8e47a5cea446fb14845ad3c11ce0f3bcb6ed30a7 | 4,096 | py | Python | scripts/load_many_NN.py | JLans/jl_spectra_2_structure | d62fc7c210e0bf8cbac019cc923732b5ff33a761 | [
"MIT"
] | null | null | null | scripts/load_many_NN.py | JLans/jl_spectra_2_structure | d62fc7c210e0bf8cbac019cc923732b5ff33a761 | [
"MIT"
] | null | null | null | scripts/load_many_NN.py | JLans/jl_spectra_2_structure | d62fc7c210e0bf8cbac019cc923732b5ff33a761 | [
"MIT"
] | 2 | 2021-01-29T14:28:10.000Z | 2021-12-06T10:10:05.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 25 11:46:31 2017
@author: lansford
"""
from __future__ import absolute_import, division, print_function
import os
import numpy as np
#import matplotlib.pyplot as plt
from jl_spectra_2_structure.cross_validation import LOAD_CROSS_VALIDATION
from jl_spectra_2_structure.plo... | 48.188235 | 124 | 0.739014 |
f53a187d733bc62c4e9a28195e187ca51686df66 | 1,544 | py | Python | framework/bcrypt/__init__.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | framework/bcrypt/__init__.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | 1 | 2019-08-16T13:45:12.000Z | 2019-08-16T13:45:12.000Z | framework/bcrypt/__init__.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | # Adapted from:
# Name: Flask-Bcrypt
# Version: 0.3.2
# Summary: Bcrypt support for hashing passwords
# Home-page: https://github.com/maxcountryman/flask-bcrypt
# Author: Max Countryman
# Author-email: maxc@me.com
# License: BSD
import bcrypt
_log_rounds = [12]
def generate_password_hash(password, rou... | 23.393939 | 77 | 0.647668 |
8232eda7180934b0b41d0676107859184a9ac749 | 4,979 | py | Python | PROJ/LEVY/Step_Options/Script_StepOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/Step_Options/Script_StepOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | null | null | null | PROJ/LEVY/Step_Options/Script_StepOptions.py | mattslezak-shell/PROJ_Option_Pricing_Matlab | 6105bd00ba3471802180c122fdf81e90833a91c4 | [
"MIT"
] | 1 | 2022-01-07T15:31:45.000Z | 2022-01-07T15:31:45.000Z | # Generated with SMOP 0.41-beta
try:
from smop.libsmop import *
except ImportError:
raise ImportError('File compiled with `smop3`, please install `smop3` to run it.') from None
# Script_StepOptions.m
##################################################################
### STEP OPTION PRICER
#######... | 31.713376 | 125 | 0.519381 |
2014dcef735acb8643e9d25a454497183dab3818 | 170 | py | Python | tasks/apps.py | salomvary/minitask | 93bef893b938e162daec5599e1d40ce823908190 | [
"MIT"
] | 3 | 2021-01-04T07:32:52.000Z | 2022-03-02T20:07:41.000Z | tasks/apps.py | salomvary/minitask | 93bef893b938e162daec5599e1d40ce823908190 | [
"MIT"
] | null | null | null | tasks/apps.py | salomvary/minitask | 93bef893b938e162daec5599e1d40ce823908190 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class TasksConfig(AppConfig):
name = "tasks"
verbose_name = _("tasks")
| 21.25 | 54 | 0.752941 |
81f1aaadd0e850c875963d3cc4a1c89953e0b941 | 149 | py | Python | slides/birdhouse-architecture/myplot.py | Zeitsperre/birdhouse-docs | 1789c524ea19de38c0ebd920fe9817323e86e565 | [
"Apache-2.0"
] | null | null | null | slides/birdhouse-architecture/myplot.py | Zeitsperre/birdhouse-docs | 1789c524ea19de38c0ebd920fe9817323e86e565 | [
"Apache-2.0"
] | null | null | null | slides/birdhouse-architecture/myplot.py | Zeitsperre/birdhouse-docs | 1789c524ea19de38c0ebd920fe9817323e86e565 | [
"Apache-2.0"
] | null | null | null | def myplot(nc_file, variable):
"""
nc_file application/netcdf
variable string
"""
# plot variable of nc_file
return plot.png
| 18.625 | 30 | 0.644295 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.