hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
793fae4d2142a2c8d2de90280e24b42043c11edb | 19,433 | py | Python | nova/virt/hyperv/volumeops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/volumeops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/volumeops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright 2012 Pedro Navarro Perez
# Copyright 2013 Cloudbase Solutions Srl
# 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... | 42.993363 | 79 | 0.629599 |
793fae59e2beb84a5a89d950e46ba393f7a680c4 | 2,678 | py | Python | tests/extmod/vfs_lfs_error.py | codefreax/micropython | 7679e3be96f7e0996faa89678beaf423d7c25999 | [
"MIT"
] | 181 | 2018-01-31T08:22:21.000Z | 2021-12-25T12:46:18.000Z | tests/extmod/vfs_lfs_error.py | cjaikaeo/micropython | ce40abcf21926b35da6c7255215c5062ac2be521 | [
"MIT"
] | 19 | 2018-01-31T10:07:19.000Z | 2021-03-11T07:32:28.000Z | tests/extmod/vfs_lfs_error.py | cjaikaeo/micropython | ce40abcf21926b35da6c7255215c5062ac2be521 | [
"MIT"
] | 87 | 2018-03-22T00:41:48.000Z | 2022-02-05T10:09:59.000Z | # Test for VfsLittle using a RAM device, testing error handling
try:
import uos
uos.VfsLfs1
uos.VfsLfs2
except (ImportError, AttributeError):
print("SKIP")
raise SystemExit
class RAMBlockDevice:
ERASE_BLOCK_SIZE = 1024
def __init__(self, blocks):
self.data = bytearray(blocks * sel... | 22.694915 | 63 | 0.578417 |
793fb0ac845fdbd1b3455d43d1920b71030c768b | 2,100 | py | Python | tests/compat/test_responses_load_cache.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 846 | 2015-01-05T19:19:35.000Z | 2022-03-31T07:11:25.000Z | tests/compat/test_responses_load_cache.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 495 | 2015-01-16T09:28:34.000Z | 2022-03-28T21:59:13.000Z | tests/compat/test_responses_load_cache.py | meggiman/requests-cache | 3d5b77e78013d9c08146b94cbbaa5c9a321b9f75 | [
"BSD-2-Clause"
] | 134 | 2015-01-16T14:01:47.000Z | 2022-03-28T18:18:17.000Z | """Example of using requests-cache with the responses library"""
from contextlib import contextmanager
from os.path import dirname, join
from unittest.mock import patch
import pytest
import requests
from requests.exceptions import ConnectionError
from responses import RequestsMock, Response
from requests_cache import... | 33.333333 | 101 | 0.670476 |
793fb0b4f9631dbc4e2768b0b908a411a998978a | 1,350 | py | Python | src/dependency/parser/javascript.py | allow-cookies/demon | 0a62fdbdfbcb9ab5224be747ddf45c968207b51d | [
"MIT"
] | null | null | null | src/dependency/parser/javascript.py | allow-cookies/demon | 0a62fdbdfbcb9ab5224be747ddf45c968207b51d | [
"MIT"
] | 1 | 2021-03-31T08:12:05.000Z | 2021-03-31T08:12:05.000Z | src/dependency/parser/javascript.py | allow-cookies/demon | 0a62fdbdfbcb9ab5224be747ddf45c968207b51d | [
"MIT"
] | null | null | null | import json
import re
from typing import Generator
from dependency.dto import DependencyDTO
from dependency.parser.base import BaseParser
class PackageLockJsonParser(BaseParser):
_KEY_DEPENDENCIES = "dependencies"
_KEY_VERSION = "version"
_AT = "@"
_EMPTY = ""
@classmethod
def parse(
... | 28.723404 | 84 | 0.6 |
793fb108fde3f384f5eecf9d23dc20baaf268169 | 1,997 | py | Python | scripts/add_chats.py | zeshuaro/off-campus | 5ca0c9c5ea1ef6fd9225414712262f00a41693da | [
"MIT"
] | null | null | null | scripts/add_chats.py | zeshuaro/off-campus | 5ca0c9c5ea1ef6fd9225414712262f00a41693da | [
"MIT"
] | null | null | null | scripts/add_chats.py | zeshuaro/off-campus | 5ca0c9c5ea1ef6fd9225414712262f00a41693da | [
"MIT"
] | null | null | null | import argparse
import datetime as dt
import firebase_admin
from firebase_admin import credentials, firestore
import scrapers
cred = credentials.Certificate("keyfile.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
def main(course_subject, limit, **kwargs):
unis = {
("University of Ne... | 27.356164 | 83 | 0.580871 |
793fb16b8224bfd56c2829ad89dac10a3c1f22ac | 1,590 | py | Python | pgserv/users/views.py | PeanutPencil/Pavlov-Gacha-Django | 378557e76ec3f9485c20eb4db9fcaa950ad12b85 | [
"MIT"
] | null | null | null | pgserv/users/views.py | PeanutPencil/Pavlov-Gacha-Django | 378557e76ec3f9485c20eb4db9fcaa950ad12b85 | [
"MIT"
] | null | null | null | pgserv/users/views.py | PeanutPencil/Pavlov-Gacha-Django | 378557e76ec3f9485c20eb4db9fcaa950ad12b85 | [
"MIT"
] | 1 | 2020-10-22T01:22:00.000Z | 2020-10-22T01:22:00.000Z |
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from users.models import User
from users.serializers import UserSerializer
from django.http import Http404
class UserList(APIView):
def get(self, request):
users = User.objects.all()... | 30.576923 | 78 | 0.668553 |
793fb2125dc99bf686413401095d19f2ac82bedb | 6,222 | py | Python | ResNetFCN_App/resnetfcn_app.py | EnriqueNueve/ResNetFCN | c01b3675ec77089ba9e3a2a8a0fa4b7d1baf95fc | [
"MIT"
] | null | null | null | ResNetFCN_App/resnetfcn_app.py | EnriqueNueve/ResNetFCN | c01b3675ec77089ba9e3a2a8a0fa4b7d1baf95fc | [
"MIT"
] | null | null | null | ResNetFCN_App/resnetfcn_app.py | EnriqueNueve/ResNetFCN | c01b3675ec77089ba9e3a2a8a0fa4b7d1baf95fc | [
"MIT"
] | null | null | null | # python3 resnetfcn_app.py test_pic.jpg
##########################
import os
import numpy as np
import tensorflow as tf
from PIL import Image , ImageOps
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
##########################
# Passed img path
#img_path = "test_pic.jpg"
img_path = os.environ["IMG... | 35.554286 | 108 | 0.575378 |
793fb27d31e68f2109a5d1bdc4e0750ea7aeff09 | 1,475 | py | Python | utils/analyzer.py | smiyawaki0820/aio2-tfidf-baseline | db27b12df8555108973206383f9a4c5a11d946ed | [
"MIT"
] | 4 | 2021-12-06T02:50:51.000Z | 2022-02-19T07:23:47.000Z | utils/analyzer.py | smiyawaki0820/aio2-tfidf-baseline | db27b12df8555108973206383f9a4c5a11d946ed | [
"MIT"
] | null | null | null | utils/analyzer.py | smiyawaki0820/aio2-tfidf-baseline | db27b12df8555108973206383f9a4c5a11d946ed | [
"MIT"
] | 1 | 2022-02-19T07:24:08.000Z | 2022-02-19T07:24:08.000Z | import unicodedata
import ipadic
from fugashi import GenericTagger
from typing import Any, Dict, List, Optional
class JapaneseTextAnalyzer:
def __init__(
self,
do_unicode_normalize: bool = True,
pos_list: Optional[List[str]] = None,
stop_words: Optional[List[str]] = None,
) ->... | 30.102041 | 85 | 0.638644 |
793fb3454038469dce1555e6da52c515b73ba500 | 894 | py | Python | heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | 1 | 2021-03-21T11:37:03.000Z | 2021-03-21T11:37:03.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 34.384615 | 78 | 0.728188 |
793fb374196221dca6a8821330584c0f9bca579e | 6,317 | py | Python | setup.py | lijiayong/cwltool | b9fca03db868fb3ef433b8e4c601bc656623ad8f | [
"Apache-2.0"
] | null | null | null | setup.py | lijiayong/cwltool | b9fca03db868fb3ef433b8e4c601bc656623ad8f | [
"Apache-2.0"
] | 15 | 2021-08-09T15:24:53.000Z | 2022-03-30T20:17:42.000Z | setup.py | lijiayong/cwltool | b9fca03db868fb3ef433b8e4c601bc656623ad8f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Setup for the reference implementation of the CWL standards."""
import os
import sys
import warnings
import setuptools.command.egg_info as egg_info_cmd
from setuptools import setup
if os.name == "nt":
warnings.warn(
"The CWL reference runner (cwltool) no longer supports running "... | 36.097143 | 95 | 0.613582 |
793fb4a6240b031a0e20818b7239425e787466f5 | 888 | py | Python | conanfile.py | uilianries/sequences | 94d78c5b50fda4df8daa785a604601334d7f9610 | [
"MIT"
] | null | null | null | conanfile.py | uilianries/sequences | 94d78c5b50fda4df8daa785a604601334d7f9610 | [
"MIT"
] | null | null | null | conanfile.py | uilianries/sequences | 94d78c5b50fda4df8daa785a604601334d7f9610 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake
class SequencesConan(ConanFile):
name = "sequences"
description = "C++11 header-only library that provides efficient algorithms to generate and work on variadic templates and std::integer_sequence"
homepage = "https://github.... | 28.645161 | 149 | 0.664414 |
793fb4b5d78ba58dea866154c805eb02f9f7a5e5 | 191 | py | Python | iterators_and_generators/possible_permutations.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | iterators_and_generators/possible_permutations.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | iterators_and_generators/possible_permutations.py | lowrybg/PythonOOP | 1ef5023ca76645d5d96b8c4fb9a54d0f431a1947 | [
"MIT"
] | null | null | null | from itertools import permutations
def possible_permutations(my_list):
for p in list(permutations(my_list)):
yield list(p)
[print(n) for n in possible_permutations([1, 2, 3])] | 23.875 | 52 | 0.717277 |
793fb5c60af23d1b5145028e58eb32661df50cb0 | 3,598 | py | Python | nflgame/sched.py | RyanJDick/nflgame | 0261ff8b73fcb05c521483084f8ef051eb6eff87 | [
"Unlicense"
] | null | null | null | nflgame/sched.py | RyanJDick/nflgame | 0261ff8b73fcb05c521483084f8ef051eb6eff87 | [
"Unlicense"
] | 1 | 2020-02-16T14:27:26.000Z | 2020-02-16T14:27:26.000Z | nflgame/sched.py | RyanJDick/nflgame | 0261ff8b73fcb05c521483084f8ef051eb6eff87 | [
"Unlicense"
] | null | null | null | from collections import OrderedDict
import datetime
import json
import os.path
__pdoc__ = {}
_sched_json_file = os.path.join(os.path.dirname(__file__), 'schedule.json')
def calc_desired_weeks(year, phase):
desired_weeks = []
for week in range(5):
desired_weeks.append(tuple([year, 'PRE', week]))
... | 32.414414 | 114 | 0.660645 |
793fb62224354c92ed538b54120e7514d3ef01d0 | 29,326 | py | Python | vunit/test/unit/test_verilog_preprocessor.py | barri/vunit | 5d825c91d4ee8d1efa3190b06bb81852a2a6085d | [
"Artistic-2.0"
] | 1 | 2020-08-30T08:30:02.000Z | 2020-08-30T08:30:02.000Z | vunit/test/unit/test_verilog_preprocessor.py | smgl9/vunit | 9933d9a1ae600cc241894244361282dd7f7227d7 | [
"Artistic-2.0"
] | null | null | null | vunit/test/unit/test_verilog_preprocessor.py | smgl9/vunit | 9933d9a1ae600cc241894244361282dd7f7227d7 | [
"Artistic-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2018, Lars Asplund [email protected]
# pylint: disable=too-many-public-methods
# pyli... | 33.249433 | 104 | 0.592341 |
793fb6edb9bbd5c1868f75cc7074d3428e713e0d | 5,543 | py | Python | topboard_sdk/model/easy_flow/deploy_batch_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | topboard_sdk/model/easy_flow/deploy_batch_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | topboard_sdk/model/easy_flow/deploy_batch_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: deploy_batch.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... | 38.762238 | 575 | 0.76096 |
793fb93c819ac90c2f3bdfcacc2bef5971e3033e | 1,336 | py | Python | netforce_ui/setup.py | nfco/netforce | 35252eecd0a6633ab9d82162e9e3ff57d4da029a | [
"MIT"
] | 27 | 2015-09-30T23:53:30.000Z | 2021-06-07T04:56:25.000Z | netforce_ui/setup.py | nfco/netforce | 35252eecd0a6633ab9d82162e9e3ff57d4da029a | [
"MIT"
] | 191 | 2015-10-08T11:46:30.000Z | 2019-11-14T02:24:36.000Z | netforce_ui/setup.py | nfco/netforce | 35252eecd0a6633ab9d82162e9e3ff57d4da029a | [
"MIT"
] | 32 | 2015-10-01T03:59:43.000Z | 2022-01-13T07:31:05.000Z | #!/usr/bin/env python3
# Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... | 43.096774 | 80 | 0.75524 |
793fb9c10c4e2496f833b1fde884be826bce4f2c | 1,276 | py | Python | example/migrations/0001_initial.py | ruben3185/baseDRF | 5e20f2ca784945f63a5d8fd7cdff0438afc50c88 | [
"MIT"
] | null | null | null | example/migrations/0001_initial.py | ruben3185/baseDRF | 5e20f2ca784945f63a5d8fd7cdff0438afc50c88 | [
"MIT"
] | 5 | 2021-03-19T00:03:09.000Z | 2021-09-22T18:38:21.000Z | example/migrations/0001_initial.py | ruben3185/baseDRF | 5e20f2ca784945f63a5d8fd7cdff0438afc50c88 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-25 02:24
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 38.666667 | 163 | 0.628527 |
793fbab10caf7d6dd242615f525ad88a524edb86 | 63 | py | Python | vpnporthole/__init__.py | sourcesimian/vpn-porthole | de225ce9c730a40a0358f59c09fc5e16330e9dd7 | [
"MIT"
] | 15 | 2016-07-29T17:44:48.000Z | 2021-09-18T14:43:49.000Z | vpnporthole/__init__.py | sourcesimian/vpn-porthole | de225ce9c730a40a0358f59c09fc5e16330e9dd7 | [
"MIT"
] | 2 | 2017-02-16T10:23:07.000Z | 2018-07-24T12:54:36.000Z | vpnporthole/__init__.py | sourcesimian/vpn-porthole | de225ce9c730a40a0358f59c09fc5e16330e9dd7 | [
"MIT"
] | 3 | 2016-06-25T10:47:56.000Z | 2020-02-20T09:11:03.000Z | from vpnporthole.session import Session
__all__ = ['Session']
| 15.75 | 39 | 0.777778 |
793fbad7a7620c28a695de0cf9454b349331452a | 11,063 | py | Python | models/base_model.py | prasad4fun/neural_sequence_labeling | a580ba1b559e915cb5a69ac15b29d383dc1cf2fe | [
"MIT"
] | null | null | null | models/base_model.py | prasad4fun/neural_sequence_labeling | a580ba1b559e915cb5a69ac15b29d383dc1cf2fe | [
"MIT"
] | null | null | null | models/base_model.py | prasad4fun/neural_sequence_labeling | a580ba1b559e915cb5a69ac15b29d383dc1cf2fe | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from tensorflow.contrib.crf import viterbi_decode, crf_log_likelihood
from tensorflow.python.ops.rnn_cell import LSTMCell, GRUCell, MultiRNNCell
from utils import CoNLLeval, load_dataset, get_logger, process_batch_data, align_data
from data.common import word_convert, UNK
impo... | 48.52193 | 119 | 0.62813 |
793fbafd294f5509c4810829139b7c529bf8dc42 | 4,610 | py | Python | src/command_modules/azure-cli-documentdb/azure/cli/command_modules/documentdb/custom.py | henrypan/azure-cli | 8de0ab5216ed3dc700546ae9a3c485710322376b | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-documentdb/azure/cli/command_modules/documentdb/custom.py | henrypan/azure-cli | 8de0ab5216ed3dc700546ae9a3c485710322376b | [
"MIT"
] | 2 | 2021-03-25T21:38:56.000Z | 2021-11-15T17:46:45.000Z | src/command_modules/azure-cli-documentdb/azure/cli/command_modules/documentdb/custom.py | Visual-Studio-China/azure-cli-int | 48c7c7f371a0ecc4ebfd4dcfdc72764beddf5c31 | [
"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.
# --------------------------------------------------------------------... | 40.438596 | 112 | 0.678308 |
793fbcf257a721f25d504940eba6d751200c5792 | 4,103 | py | Python | src/tests/test_notes.py | testdrivenio/fastapi-crud-sync | 3bdc52175cc2250ea7251ae73d91a26c1ee97327 | [
"MIT"
] | 46 | 2020-01-14T16:43:40.000Z | 2022-03-30T08:33:41.000Z | src/tests/test_notes.py | devanl/fastapi-crud | 4a0e1a254c4be1ba136f69f35e1161bad98ac0db | [
"MIT"
] | 1 | 2021-04-21T00:04:13.000Z | 2021-04-21T00:04:13.000Z | src/tests/test_notes.py | devanl/fastapi-crud | 4a0e1a254c4be1ba136f69f35e1161bad98ac0db | [
"MIT"
] | 16 | 2020-02-27T09:42:29.000Z | 2022-01-06T07:55:21.000Z | import json
import pytest
from app.api import crud
def test_create_note(test_app, monkeypatch):
test_data = {"title": "something", "description": "something else", "id": 1}
def mock_post(db_session, payload):
return test_data
monkeypatch.setattr(crud, "post", mock_post)
response = test_ap... | 28.493056 | 83 | 0.656105 |
793fbd69df34b9330fb884a391405aa49fda29fb | 1,270 | py | Python | music21/stream/enums.py | cuthbertLab/music21 | 1be16c255460107c10d7b4bc8eb77f0d115b5eac | [
"MIT"
] | 1,449 | 2015-01-09T15:53:56.000Z | 2022-03-31T18:24:46.000Z | venv/Lib/site-packages/music21/stream/enums.py | alimirzazadeh/wolfGANg | 5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c | [
"MIT"
] | 1,179 | 2015-01-07T17:07:54.000Z | 2022-03-31T16:46:02.000Z | music21/stream/enums.py | cuthbertLab/music21 | 1be16c255460107c10d7b4bc8eb77f0d115b5eac | [
"MIT"
] | 393 | 2015-01-03T20:38:16.000Z | 2022-03-25T16:51:22.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Name: stream/enums.py
# Purpose: enumerations for streams
#
# Authors: Michael Scott Cuthbert
#
# Copyright: Copyright © 2020 Michael Scott Cuthbert and the music21 Project
# License: BSD,... | 28.222222 | 82 | 0.570079 |
793fbdf41b053abb4bfd2a8c388bfc8afba22a8d | 1,197 | py | Python | samples/client/petstore/python/test/test_category.py | deerghayu/swagger-codegen | 1e33403e381be1db91b1427d3f70f7476cb4da67 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/python/test/test_category.py | deerghayu/swagger-codegen | 1e33403e381be1db91b1427d3f70f7476cb4da67 | [
"Apache-2.0"
] | 2 | 2021-10-05T14:41:26.000Z | 2022-03-28T16:07:30.000Z | samples/client/petstore/python/test/test_category.py | deerghayu/swagger-codegen | 1e33403e381be1db91b1427d3f70f7476cb4da67 | [
"Apache-2.0"
] | 5 | 2020-04-01T02:37:35.000Z | 2021-04-07T08:04:07.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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 l... | 24.428571 | 75 | 0.718463 |
793fbe46fb3c743581d99e192778e45c7e8c5a02 | 2,580 | py | Python | app/notify_util.py | banyancheung/lottery-number-tracking | 0dad04300ed6e15f2bf35c52bf6ba1365ac34382 | [
"MIT"
] | 8 | 2020-08-24T02:20:53.000Z | 2022-02-24T09:56:13.000Z | app/notify_util.py | banyancheung/lottery-number-tracking | 0dad04300ed6e15f2bf35c52bf6ba1365ac34382 | [
"MIT"
] | null | null | null | app/notify_util.py | banyancheung/lottery-number-tracking | 0dad04300ed6e15f2bf35c52bf6ba1365ac34382 | [
"MIT"
] | 2 | 2020-08-24T02:46:10.000Z | 2020-11-02T06:55:00.000Z | import base64
import hashlib
import hmac
import json
import smtplib
from email.mime.text import MIMEText
from email.header import Header
import time
import urllib
import requests
def notify(config, origin_content):
for channel, setting in config.items():
content = format_content(channel, origin_content)
... | 31.851852 | 123 | 0.64031 |
793fbf80d60f24705c468334a38466b31c1797ad | 1,342 | py | Python | tests/template_tests/filter_tests/test_autoescape.py | arachnegl/django | c4e796aa1bab70ee66151d24a061af811e08ad08 | [
"BSD-3-Clause"
] | 1 | 2019-01-14T10:58:43.000Z | 2019-01-14T10:58:43.000Z | tests/template_tests/filter_tests/test_autoescape.py | arachnegl/django | c4e796aa1bab70ee66151d24a061af811e08ad08 | [
"BSD-3-Clause"
] | null | null | null | tests/template_tests/filter_tests/test_autoescape.py | arachnegl/django | c4e796aa1bab70ee66151d24a061af811e08ad08 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T08:55:19.000Z | 2020-05-25T08:55:19.000Z | from django.test import SimpleTestCase
from ..utils import setup, SafeClass, UnsafeClass
class AutoescapeStringfilterTests(SimpleTestCase):
"""
Filters decorated with stringfilter still respect is_safe.
"""
@setup({'autoescape-stringfilter01': '{{ unsafe|capfirst }}'})
def test_autoescape_string... | 44.733333 | 105 | 0.695976 |
793fc03da33156c0602b7c9b96b9b664c70652c8 | 2,082 | py | Python | api/infrastructure/fileTXT.py | MayaraMachado/rota_viagem | 8131e63964600e1eb5271f107c6ebcbd10f30346 | [
"MIT"
] | null | null | null | api/infrastructure/fileTXT.py | MayaraMachado/rota_viagem | 8131e63964600e1eb5271f107c6ebcbd10f30346 | [
"MIT"
] | null | null | null | api/infrastructure/fileTXT.py | MayaraMachado/rota_viagem | 8131e63964600e1eb5271f107c6ebcbd10f30346 | [
"MIT"
] | null | null | null | class FileTXT:
'''
Class responsible for managing the reading and writing of the query file.
'''
def __init__(self, file):
'''
Instance and makes the call to read the file.
Args:
----
- file (str) filepath to access
'''
self.lines = []
self.filepath = file
self.valid = self.__read_file()
d... | 20.411765 | 75 | 0.644092 |
793fc1b6a7d7abdb94935dd47f00c7fec5de8b94 | 877 | py | Python | src/download_data.py | shyan0903/522_Ramen | 3f09087fda543568d3d7c3e9759e92a815479cfc | [
"MIT"
] | 2 | 2021-11-28T03:33:45.000Z | 2021-11-28T03:33:52.000Z | src/download_data.py | shyan0903/522_Ramen | 3f09087fda543568d3d7c3e9759e92a815479cfc | [
"MIT"
] | 18 | 2021-11-19T03:29:31.000Z | 2021-12-12T02:15:25.000Z | src/download_data.py | shyan0903/522_Ramen | 3f09087fda543568d3d7c3e9759e92a815479cfc | [
"MIT"
] | 3 | 2021-11-20T07:35:05.000Z | 2021-11-20T23:03:25.000Z | # author: Irene and Anthea Chen
# date: 2021-11-24
"""Download needed dataframe
Usage: download_data.py --url=<url> --out_file=<out_file>
Options:
--url=<url> the url for the data set
--out_file=<out_file> Path (including filename) of where to locally write the file
"""
from docopt imp... | 23.078947 | 85 | 0.645382 |
793fc2230eeaa8f1090349f1c9faa553c18d655d | 2,999 | py | Python | tests/integrational/native_threads/test_state.py | Versature/pubnub-python | a558d212a44ada6fbf2793a32e93685c959b8b22 | [
"MIT"
] | null | null | null | tests/integrational/native_threads/test_state.py | Versature/pubnub-python | a558d212a44ada6fbf2793a32e93685c959b8b22 | [
"MIT"
] | null | null | null | tests/integrational/native_threads/test_state.py | Versature/pubnub-python | a558d212a44ada6fbf2793a32e93685c959b8b22 | [
"MIT"
] | null | null | null | import logging
import threading
import unittest
import pubnub
from pubnub.models.consumer.presence import PNSetStateResult, PNGetStateResult
from pubnub.pubnub import PubNub
from tests.helper import pnconf_copy
from tests.integrational.vcr_helper import pn_vcr
pubnub.set_stream_logger('pubnub', logging.DEBUG)
class... | 35.282353 | 109 | 0.628876 |
793fc27b359019f4f9c3cfdc1bb0915e25881d95 | 10,858 | py | Python | echolect/filtering/filtering.py | ryanvolz/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | 1 | 2022-03-24T22:48:12.000Z | 2022-03-24T22:48:12.000Z | echolect/filtering/filtering.py | scivision/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | 1 | 2015-03-25T20:41:24.000Z | 2015-03-25T20:41:24.000Z | echolect/filtering/filtering.py | scivision/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2014, Ryan Volz
# All rights reserved.
#
# Distributed under the terms of the BSD 3-Clause ("BSD New") license.
#
# The full license is in the LICENSE file, distributed with this software.
#-----------------------------------... | 30.672316 | 80 | 0.596519 |
793fc2a2183f4dc3ea2a2e5fde1195b39a7aaec7 | 2,104 | py | Python | dnacentersdk/models/validators/v1_3_0/jsd_58a3699e489b9529.py | daxm/dnacentersdk | 5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b | [
"MIT"
] | 4 | 2019-08-05T23:08:06.000Z | 2019-09-19T14:16:31.000Z | dnacentersdk/models/validators/v1_3_0/jsd_58a3699e489b9529.py | daxm/dnacentersdk | 5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b | [
"MIT"
] | 1 | 2020-01-11T18:12:14.000Z | 2020-07-13T09:14:55.000Z | dnacentersdk/models/validators/v1_3_0/jsd_58a3699e489b9529.py | daxm/dnacentersdk | 5baa0cb151fb9e72cf7af1ae29e7541d89c3f06b | [
"MIT"
] | 4 | 2020-02-28T15:44:04.000Z | 2020-11-01T19:35:08.000Z | # -*- coding: utf-8 -*-
"""DNA Center Get Credential sub type by credential Id data model.
Copyright (c) 2019 Cisco and/or its affiliates.
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 ... | 35.661017 | 78 | 0.71673 |
793fc3a5a1439856410fabedd68305be87121987 | 409 | py | Python | test/test_tokenizer.py | ArielTriana/battle-sim | 75205bbff62024d28b42fd25ce268440ecc6f009 | [
"MIT"
] | 2 | 2021-11-23T15:47:07.000Z | 2022-03-03T01:38:19.000Z | test/test_tokenizer.py | ArielTriana/battle-sim | 75205bbff62024d28b42fd25ce268440ecc6f009 | [
"MIT"
] | 11 | 2021-11-05T15:47:39.000Z | 2022-02-07T05:05:11.000Z | test/test_tokenizer.py | ArielTriana/battle-sim | 75205bbff62024d28b42fd25ce268440ecc6f009 | [
"MIT"
] | 1 | 2021-12-07T00:00:48.000Z | 2021-12-07T00:00:48.000Z | import pytest
from src.language.tokenizer import Tokenizer
def test_1():
case1 = "number a = 3.34"
tokens = Tokenizer()(case1)
assert len(tokens) == 5
assert tokens[3].lexeme == "3.34"
def test_2():
case2 = "function number fibo(number n) -> {\nif n lte 1 -> {\n return 1 \n} return fibo(n- 1)... | 18.590909 | 114 | 0.596577 |
793fc5736cb4e6d539aa5675230d750e3cc1a963 | 7,454 | py | Python | transformer-xh/main.py | maximzubkov/Transformer-XH | 1712c195b75473ba50779baf92e291b1d29ad248 | [
"MIT"
] | null | null | null | transformer-xh/main.py | maximzubkov/Transformer-XH | 1712c195b75473ba50779baf92e291b1d29ad248 | [
"MIT"
] | null | null | null | transformer-xh/main.py | maximzubkov/Transformer-XH | 1712c195b75473ba50779baf92e291b1d29ad248 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
import argparse
import os
import json
import numpy as np
from model import Model_Hotpot, Model_FEVER
import data
import logging
import random
import torch.nn as nn
import torch.distributed as dist
from tqdm import tqdm
from pytorch... | 39.231579 | 157 | 0.612825 |
793fc5b1b9ea75fe301eb2c7c0a5f703090ee4e2 | 1,294 | py | Python | alchemy/scripts/update_existing_annotation_context.py | edu-gp/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | 2 | 2020-07-17T11:45:05.000Z | 2020-07-17T13:39:14.000Z | alchemy/scripts/update_existing_annotation_context.py | georgianpartners/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | 46 | 2020-09-30T14:40:45.000Z | 2021-02-26T14:31:14.000Z | alchemy/scripts/update_existing_annotation_context.py | edu-gp/annotation_tool | c383cfeca9f5773e540deaad8d06996ecbb95b32 | [
"Apache-2.0"
] | null | null | null | import logging
from alchemy.db.config import DevelopmentConfig
from alchemy.db.model import AnnotationRequest, ClassificationAnnotation, Database, User
if __name__ == "__main__":
logging.root.setLevel(logging.INFO)
db = Database(DevelopmentConfig.SQLALCHEMY_DATABASE_URI)
annotations = (
db.sessio... | 34.052632 | 88 | 0.693199 |
793fc6d1994b86f86b9993b914d736042ab5617d | 12,413 | py | Python | insomniac/action_runners/interact/action_handle_blogger.py | edukessen/Insomniac | 44334aa5991c506282f5a5e6432d602774569eae | [
"MIT"
] | null | null | null | insomniac/action_runners/interact/action_handle_blogger.py | edukessen/Insomniac | 44334aa5991c506282f5a5e6432d602774569eae | [
"MIT"
] | null | null | null | insomniac/action_runners/interact/action_handle_blogger.py | edukessen/Insomniac | 44334aa5991c506282f5a5e6432d602774569eae | [
"MIT"
] | null | null | null | from functools import partial
from insomniac.action_runners.actions_runners_manager import ActionState
from insomniac.actions_impl import interact_with_user, InteractionStrategy
from insomniac.actions_types import LikeAction, FollowAction, InteractAction, GetProfileAction, StoryWatchAction, \
BloggerInteractionTyp... | 51.082305 | 148 | 0.66664 |
793fc8ef05e7ebe219efb57209d7931cd48a6d8d | 15,791 | py | Python | scrapli/ssh_config.py | dmfigol/scrapli | d1f8641a1e3f490dab6bae704f092255efe6655c | [
"MIT"
] | null | null | null | scrapli/ssh_config.py | dmfigol/scrapli | d1f8641a1e3f490dab6bae704f092255efe6655c | [
"MIT"
] | null | null | null | scrapli/ssh_config.py | dmfigol/scrapli | d1f8641a1e3f490dab6bae704f092255efe6655c | [
"MIT"
] | null | null | null | """scrapli.ssh_config"""
import os
import re
import shlex
import sys
from copy import deepcopy
from typing import Dict, Optional
from scrapli.exceptions import ScrapliTypeError
if sys.version_info >= (3, 8):
Match = re.Match
else:
from typing import Match # pragma: no cover
HOST_ATTRS = (
"port",
"... | 33.244211 | 100 | 0.577924 |
793fc923949fa2f76c918e844dcca1f5da124d0e | 1,227 | py | Python | {{cookiecutter.project_slug}}/workspace/app/scripts/backend_pre_start.py | Arya-ai/thresher | 11c7208e1c2ec553192b20dc87af779b673171e1 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/workspace/app/scripts/backend_pre_start.py | Arya-ai/thresher | 11c7208e1c2ec553192b20dc87af779b673171e1 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/workspace/app/scripts/backend_pre_start.py | Arya-ai/thresher | 11c7208e1c2ec553192b20dc87af779b673171e1 | [
"MIT"
] | 1 | 2020-11-10T11:15:55.000Z | 2020-11-10T11:15:55.000Z | import pika
from loguru import logger
from tenacity import retry, stop_after_attempt, wait_fixed
from app.utils.tenacity import custom_before_log, custom_after_log
from app.scripts.healthcheck import db_healthcheck, broker_healthcheck
max_tries = 60 * 5 # 5 minutes
wait_seconds = 1
@retry(
stop=stop_after_att... | 24.54 | 88 | 0.730236 |
793fcadff384346bf9cbea591885cda5b47c3eec | 377 | py | Python | portfolio/blog/migrations/0009_auto_20150224_1648.py | adambeagle/portfoliosite | 634eac1793b4f583e28613a61e5e592cfdcd2e68 | [
"MIT"
] | null | null | null | portfolio/blog/migrations/0009_auto_20150224_1648.py | adambeagle/portfoliosite | 634eac1793b4f583e28613a61e5e592cfdcd2e68 | [
"MIT"
] | null | null | null | portfolio/blog/migrations/0009_auto_20150224_1648.py | adambeagle/portfoliosite | 634eac1793b4f583e28613a61e5e592cfdcd2e68 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0008_auto_20150224_1629'),
]
operations = [
migrations.RenameField(
model_name='tag',
old_na... | 18.85 | 44 | 0.583554 |
793fcb5314a33a26c006d264176476ccfc6004c6 | 919 | py | Python | stubs/micropython-v1_12-pyboard/_thread.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_12-pyboard/_thread.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_12-pyboard/_thread.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: '_thread' on micropython-v1.12-pyboard
"""
# MCU: {'ver': 'v1.12', 'port': 'pyboard', 'arch': 'armv7emsp', 'sysname': 'pyboard', 'release': '1.12.0', 'name': 'micropython', 'mpy': 7685, 'version': '1.12.0', 'machine': 'PYBv1.1 with STM32F405RG', 'build': '', 'nodename': 'pyboard', 'platform': 'pyboard', 'fa... | 20.886364 | 286 | 0.535365 |
793fcc3cf9be089274552ef9f6cae53fe239a5cd | 186 | py | Python | 03/03_P22.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | 03/03_P22.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | 03/03_P22.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | import math
x = int(input())
ans = -1
for a in range(1,int(x/3)):
for b in range(1,x-a):
c = x - (a+b)
if c**2 == a**2 + b**2:
ans = max(ans,c)
print(ans) | 20.666667 | 31 | 0.451613 |
793fce5660795395ee2757952f1b8955b9ef1ef3 | 1,647 | py | Python | jsb_web/leases/urls.py | kojeachon/jsb_web | 93c0d9590adc01a2fa1934b7ef92e8a2d1264042 | [
"MIT"
] | null | null | null | jsb_web/leases/urls.py | kojeachon/jsb_web | 93c0d9590adc01a2fa1934b7ef92e8a2d1264042 | [
"MIT"
] | null | null | null | jsb_web/leases/urls.py | kojeachon/jsb_web | 93c0d9590adc01a2fa1934b7ef92e8a2d1264042 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "leases"
urlpatterns = [
path('', views.index, name='index'),
path('roomcreate/',views.room_create,name='room_create'),
path('create/',views.lease_create,name='lease_create'),
path('list/',views.lease_list,name='lease_list'),
path("roomcr... | 49.909091 | 97 | 0.697632 |
793fce61a55c5a66fe3af6753d117a376039c817 | 10,950 | py | Python | tests/test_retrieval.py | hoytak/treedict | d9fc18834ae87df1ea6b94682f536ab62da2e8f0 | [
"BSD-3-Clause"
] | 13 | 2015-07-01T12:21:10.000Z | 2022-01-14T09:09:05.000Z | tests/test_retrieval.py | hoytak/treedict | d9fc18834ae87df1ea6b94682f536ab62da2e8f0 | [
"BSD-3-Clause"
] | 6 | 2015-01-22T21:49:37.000Z | 2020-07-03T23:24:38.000Z | tests/test_retrieval.py | hoytak/treedict | d9fc18834ae87df1ea6b94682f536ab62da2e8f0 | [
"BSD-3-Clause"
] | 8 | 2016-02-25T22:06:14.000Z | 2022-02-19T20:56:03.000Z | #!/usr/bin/env python
# Copyright (c) 2009-2011, Hoyt Koepke ([email protected])
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyri... | 26.57767 | 83 | 0.567306 |
793fce9019cb6950eb166e098919813588853388 | 56 | py | Python | bridger/tasks.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T00:53:23.000Z | 2020-07-16T07:00:33.000Z | bridger/tasks.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 76 | 2019-12-05T01:15:57.000Z | 2021-09-07T16:47:27.000Z | bridger/tasks.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 1 | 2020-02-05T15:09:47.000Z | 2020-02-05T15:09:47.000Z | from .notifications.tasks import send_mail, send_system
| 28 | 55 | 0.857143 |
793fced048431943fa6da52a33446dbac171c17a | 109,819 | py | Python | tools/ci_build/build.py | waikuen2010/onnxruntime | dbe1b57a71248946ade29c762817699fd1adc3ff | [
"MIT"
] | null | null | null | tools/ci_build/build.py | waikuen2010/onnxruntime | dbe1b57a71248946ade29c762817699fd1adc3ff | [
"MIT"
] | null | null | null | tools/ci_build/build.py | waikuen2010/onnxruntime | dbe1b57a71248946ade29c762817699fd1adc3ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import argparse
import contextlib
import glob
import os
import re
import shlex
import shutil
import subprocess
import sys
import platform
from amd_hipify import amd_hipify
from distutils.version import ... | 46.791223 | 120 | 0.624537 |
793fcf64d7e17d555e8c265819b3c4bec07e230c | 6,743 | py | Python | demo_fit_teapot.py | apoorvjain25/opendr-1 | 5467263c9ef46118399686b56150556bb2a9fcb9 | [
"MIT"
] | 7 | 2019-12-22T08:36:47.000Z | 2020-11-20T15:28:42.000Z | demo_fit_teapot.py | apoorvjain25/opendr-1 | 5467263c9ef46118399686b56150556bb2a9fcb9 | [
"MIT"
] | null | null | null | demo_fit_teapot.py | apoorvjain25/opendr-1 | 5467263c9ef46118399686b56150556bb2a9fcb9 | [
"MIT"
] | 2 | 2019-07-03T08:57:57.000Z | 2020-03-23T11:16:45.000Z | __author__ = 'pol'
import matplotlib.pyplot as plt
import glfw
import generative_models
from utils import *
import OpenGL.GL as GL
from utils import *
plt.ion()
from OpenGL import contextdata
import sys
#__GL_THREADED_OPTIMIZATIONS
#Main script options:r
glModes = ['glfw','mesa']
glMode = glModes[0]
np.random.seed... | 30.511312 | 206 | 0.742844 |
793fcfeda5aedee4df07972fefdcf8715fa9f63c | 421 | py | Python | confirmation/migrations/0010_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 17,004 | 2015-09-25T18:27:24.000Z | 2022-03-31T22:02:32.000Z | confirmation/migrations/0010_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 20,344 | 2015-09-25T19:02:42.000Z | 2022-03-31T23:54:40.000Z | confirmation/migrations/0010_alter_confirmation_expiry_date.py | dumpmemory/zulip | 496273ddbc567330a0022699d6d6eb5c646e5da5 | [
"Apache-2.0"
] | 7,271 | 2015-09-25T18:48:39.000Z | 2022-03-31T21:06:11.000Z | # Generated by Django 3.2.5 on 2021-08-02 19:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("confirmation", "0009_confirmation_expiry_date_backfill"),
]
operations = [
migrations.AlterField(
model_name="confirmation",
... | 22.157895 | 67 | 0.631829 |
793fd02c861f289206ff7c130bc67e5d7521040f | 7,191 | py | Python | pycycle/elements/combustor.py | askprash/pyCycle | e0845d7e320b6cb47367734c26ec3410c9fa5bf7 | [
"Apache-2.0"
] | null | null | null | pycycle/elements/combustor.py | askprash/pyCycle | e0845d7e320b6cb47367734c26ec3410c9fa5bf7 | [
"Apache-2.0"
] | null | null | null | pycycle/elements/combustor.py | askprash/pyCycle | e0845d7e320b6cb47367734c26ec3410c9fa5bf7 | [
"Apache-2.0"
] | null | null | null | """ Class definition for Combustor."""
import numpy as np
import openmdao.api as om
from pycycle.constants import AIR_FUEL_ELEMENTS, AIR_ELEMENTS
from pycycle.thermo.thermo import Thermo
from pycycle.thermo.cea.thermo_add import ThermoAdd
from pycycle.thermo.cea.species_data import Properties, janaf
from pycycle.... | 40.398876 | 214 | 0.564317 |
793fd057b4691ab9593cae9d99d179188d733362 | 6,458 | py | Python | django_simple_api/fields.py | Django-Simple-API/django-simple-api | cbda3b9667b4b00cd01a85a54f2f5b17926dfef6 | [
"MIT"
] | 35 | 2021-02-25T09:57:05.000Z | 2022-02-18T09:12:45.000Z | django_simple_api/fields.py | AberSheeran/django-simple-api | 52c5efbbce930378178625511c7a3d39a1004d79 | [
"MIT"
] | 3 | 2021-02-23T15:14:32.000Z | 2021-12-19T22:42:45.000Z | django_simple_api/fields.py | AberSheeran/django-simple-api | 52c5efbbce930378178625511c7a3d39a1004d79 | [
"MIT"
] | 7 | 2020-12-15T12:44:48.000Z | 2021-02-01T06:34:30.000Z | from typing import Any, Optional
from pydantic.fields import NoArgAnyCallable, Undefined
from ._fields import BodyInfo, CookieInfo, HeaderInfo, PathInfo, QueryInfo
__all__ = ["Path", "Query", "Header", "Cookie", "Body"]
def Path(
default: Any = Undefined,
*,
default_factory: Optional[NoArgAnyCallable] ... | 34.351064 | 102 | 0.67126 |
793fd1885909289761761a7cbc45240a62c5b1ad | 8,556 | py | Python | wavefront_sdk/common/utils.py | susanjlindner/wavefront-sdk-python | c6c55765c059b563295614f2e39430ac597de465 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | wavefront_sdk/common/utils.py | susanjlindner/wavefront-sdk-python | c6c55765c059b563295614f2e39430ac597de465 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | wavefront_sdk/common/utils.py | susanjlindner/wavefront-sdk-python | c6c55765c059b563295614f2e39430ac597de465 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Utils module contains useful function for preparing and processing data.
@author: Hao Song ([email protected])
"""
import re
import io
from gzip import GzipFile
import threading
# pylint: disable=too-few-public-methods
class AtomicCounter(object):
"""An atomic, thread-safe increme... | 31 | 79 | 0.627396 |
793fd1ab7e2382de2a421c546eb3f0e13ce25082 | 21,388 | py | Python | train/trainer/run.py | mickuehl/artificial-podcast | ba3e0558863db989778bdfd8316665a6fe0129a8 | [
"MIT"
] | null | null | null | train/trainer/run.py | mickuehl/artificial-podcast | ba3e0558863db989778bdfd8316665a6fe0129a8 | [
"MIT"
] | null | null | null | train/trainer/run.py | mickuehl/artificial-podcast | ba3e0558863db989778bdfd8316665a6fe0129a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
import math
import os
import sys
from dataclasses import dataclass, field
from typing import Optional
from datasets import load_dataset
import transformers
from transformers import (
CONFIG_MAPPING,
MODEL_FOR_CAUSAL_LM_MAPPING,
AutoConfig,
AutoModelForCausalLM,
... | 42.776 | 152 | 0.670516 |
793fd3a6e376629495bf687dd8f8a0e936cf896c | 17,274 | py | Python | custom_components/unifiprotect/sensor.py | xp/unifiprotect | 6c63dab52db5c11ea0bae948f54c7aa3c07b828b | [
"MIT"
] | null | null | null | custom_components/unifiprotect/sensor.py | xp/unifiprotect | 6c63dab52db5c11ea0bae948f54c7aa3c07b828b | [
"MIT"
] | null | null | null | custom_components/unifiprotect/sensor.py | xp/unifiprotect | 6c63dab52db5c11ea0bae948f54c7aa3c07b828b | [
"MIT"
] | null | null | null | """This component provides sensors for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
import logging
from typing import Any
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
Sens... | 34.071006 | 90 | 0.708 |
793fd451119f4447e83bf9343dec06062b75bb71 | 143 | py | Python | src/samstatic_flask/config.py | city10th/samstatic_flask | f8a8934f724d85ab2eb7ae680aa7d14747377a94 | [
"MIT"
] | null | null | null | src/samstatic_flask/config.py | city10th/samstatic_flask | f8a8934f724d85ab2eb7ae680aa7d14747377a94 | [
"MIT"
] | null | null | null | src/samstatic_flask/config.py | city10th/samstatic_flask | f8a8934f724d85ab2eb7ae680aa7d14747377a94 | [
"MIT"
] | null | null | null | from enum import Enum
class Option(str, Enum):
DEACTIVE = 'DEACTIVE'
ALL = 'ALL'
ALLOWED = 'ALLOWED'
DISALLOWED = 'DISALLOWED' | 20.428571 | 29 | 0.643357 |
793fd4d27dccea538610516cb505bd3ea81e61f8 | 7,220 | py | Python | misc/cvpr2020_challenge/train_baselines.py | ioanacroi/collaborative-experts | 063e85abe7127cce4c32b6953b20a8d0b7cc7635 | [
"Apache-2.0"
] | 237 | 2019-07-31T16:04:35.000Z | 2022-03-28T14:33:32.000Z | misc/cvpr2020_challenge/train_baselines.py | caijincen712/CE | ffd6c0bc8dc3c0375e40982bf5dce2c35359f1b6 | [
"Apache-2.0"
] | 26 | 2019-08-11T09:19:34.000Z | 2022-03-28T14:15:27.000Z | misc/cvpr2020_challenge/train_baselines.py | caijincen712/CE | ffd6c0bc8dc3c0375e40982bf5dce2c35359f1b6 | [
"Apache-2.0"
] | 46 | 2019-08-05T10:18:08.000Z | 2022-03-27T16:12:56.000Z | """Simple baselines for the CVPR2020 video pentathlon challenge
%run -i misc/cvpr2020_challenge/train_baselines.py --mini_train --train_single_epoch
ipy misc/cvpr2020_challenge/train_baselines.py -- --yaspify
"""
import sys
import json
import argparse
from typing import Dict, List
from pathlib import Path
from datet... | 34.380952 | 89 | 0.637535 |
793fd4e654cd8d0c5cec88831a29444362d6642d | 3,708 | py | Python | pscheduler-test-latency/tests/spec-to-cli_test.py | igarny/pscheduler | 0ab6e68bb3adb808e1116bab0eb7438bf4c31e2c | [
"Apache-2.0"
] | 47 | 2016-09-28T14:19:10.000Z | 2022-03-21T13:26:47.000Z | pscheduler-test-latency/tests/spec-to-cli_test.py | igarny/pscheduler | 0ab6e68bb3adb808e1116bab0eb7438bf4c31e2c | [
"Apache-2.0"
] | 993 | 2016-07-07T19:30:32.000Z | 2022-03-21T10:25:52.000Z | pscheduler-test-latency/tests/spec-to-cli_test.py | mfeit-internet2/pscheduler-dev | d2cd4065a6fce88628b0ca63edc7a69f2672dad2 | [
"Apache-2.0"
] | 36 | 2016-09-15T09:39:45.000Z | 2021-06-23T15:05:13.000Z | """
tests for the spec-to-cli command
"""
import pscheduler
import unittest
class CliToSpecTest(pscheduler.TestSpecToCliUnitTest):
name = 'latency'
def test_srcdst_opts(self):
#dest-only
expected_args = {
'--dest': '10.0.0.1'
}
self.assert_spec_to_cli('{"schema... | 29.903226 | 105 | 0.424757 |
793fd5f00182b17808a289e4bf2ae9dc48a9346d | 7,910 | py | Python | tests/models/commondb/measurement/measurement_integration_test.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 4 | 2018-08-26T09:11:36.000Z | 2019-05-24T12:01:02.000Z | tests/models/commondb/measurement/measurement_integration_test.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 52 | 2018-08-24T12:51:22.000Z | 2020-12-28T04:59:42.000Z | tests/models/commondb/measurement/measurement_integration_test.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 1 | 2018-10-11T07:57:55.000Z | 2018-10-11T07:57:55.000Z | # pylint: skip-file
# type: ignore
# -*- coding: utf-8 -*-
#
# tests.models.commondb.measurement.measurement_integration_test.py is part of The
# RAMSTK Project
#
# All rights reserved.
# Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com
"""Test class for testing Measure... | 36.62037 | 88 | 0.686726 |
793fd67c6f9aa26ae717d7e944d871e174fb9186 | 3,800 | py | Python | tests/test_docker_swarm_action.py | rycus86/webhook-proxy | d8471c7fbced3cf5823b6ff1b85e056fe5011a0f | [
"MIT"
] | 18 | 2018-03-12T14:07:09.000Z | 2021-05-29T21:47:29.000Z | tests/test_docker_swarm_action.py | rycus86/webhook-proxy | d8471c7fbced3cf5823b6ff1b85e056fe5011a0f | [
"MIT"
] | 3 | 2018-07-07T14:39:54.000Z | 2019-04-19T21:06:39.000Z | tests/test_docker_swarm_action.py | rycus86/webhook-proxy | d8471c7fbced3cf5823b6ff1b85e056fe5011a0f | [
"MIT"
] | 6 | 2018-07-07T14:32:13.000Z | 2021-04-18T10:10:07.000Z | from unittest_helper import ActionTestBase
from actions.action_docker_swarm import DockerSwarmAction
class DockerSwarmActionTest(ActionTestBase):
def setUp(self):
self.mock_client = MockClient()
DockerSwarmAction.client = self.mock_client
def test_restart(self):
self._invoke({'docker-... | 30.4 | 92 | 0.526842 |
793fd715869eb0561b00dc2731effff0ef291dc4 | 11,163 | py | Python | tests/patterns/test_patterns_Ppar_send.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | tests/patterns/test_patterns_Ppar_send.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | tests/patterns/test_patterns_Ppar_send.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import pytest
import uqbar.strings
import supriya.patterns
pattern_01 = supriya.patterns.Ppar(
[
supriya.patterns.Pbind(
amplitude=1.0,
duration=1.0,
frequency=supriya.patterns.Pseq([1001, 1002, 1003], 1),
)
]
)
pattern_02 = supriya.patterns.Ppar(
[
... | 26.020979 | 76 | 0.430171 |
793fd9750b4af7e7b1a515937f9dd18adfa88fbb | 10,990 | py | Python | Boatwright_et_al.,2018/assembly_and_qc_scripts/identify_duplicates_fasta_files.py | BBarbazukLab/papers | fc77bcae17d475da99d758407be3ff7f9b298c3d | [
"MIT"
] | 3 | 2018-09-18T15:22:25.000Z | 2019-07-10T17:57:42.000Z | Boatwright_et_al.,2018/assembly_and_qc_scripts/identify_duplicates_fasta_files.py | BBarbazukLab/papers | fc77bcae17d475da99d758407be3ff7f9b298c3d | [
"MIT"
] | null | null | null | Boatwright_et_al.,2018/assembly_and_qc_scripts/identify_duplicates_fasta_files.py | BBarbazukLab/papers | fc77bcae17d475da99d758407be3ff7f9b298c3d | [
"MIT"
] | 4 | 2018-12-01T15:05:15.000Z | 2019-12-17T13:43:55.000Z | #!/usr/bin/env python
import cProfile
import argparse
import logging
from Bio import SeqIO
import collections
import re
import math
import os
import itertools
def getOptions():
"""Function to pull in command line arguments"""
parser = argparse.ArgumentParser(description='Tool for identifying duplicates and cre... | 40.553506 | 173 | 0.638217 |
793fd9c23598e3aa3a6e0132ea296c3aa5ae4f6f | 3,162 | py | Python | MaxLatestVersion/session.py | getlove555/getbotline | 639e157495849e12ac7dd4bae6012841cf511892 | [
"MIT"
] | 6 | 2020-05-23T21:47:52.000Z | 2021-03-30T00:19:08.000Z | MaxLatestVersion/session.py | getlove555/getbotline | 639e157495849e12ac7dd4bae6012841cf511892 | [
"MIT"
] | 4 | 2020-08-01T10:10:14.000Z | 2021-01-03T00:55:05.000Z | MaxLatestVersion/session.py | LOUREN03/lourenelle | 5448a8634d438f35df98e43ad135f232cf74d2b1 | [
"MIT"
] | 20 | 2020-05-11T08:53:30.000Z | 2021-07-16T09:50:20.000Z | # -*- coding: utf-8 -*-
from .transport import THttpClient
from thrift.protocol import TCompactProtocol
from TEAM_BOT_MAX import AuthService, TalkService, ChannelService, CallService, SquareService, ShopService, LiffService
class Session:
def __init__(self, url, headers, path='', customThrift=False):
self... | 33.284211 | 119 | 0.66888 |
793fdae2f6f13efbacdcab8c4d2ddb3686884ff7 | 847 | py | Python | examples/mesh_slice.py | almarklein/visvis2 | 728a4b7434879d3606f32836eda3971ed73905f8 | [
"BSD-2-Clause"
] | 7 | 2019-12-20T14:15:53.000Z | 2020-05-03T17:43:02.000Z | examples/mesh_slice.py | almarklein/visvis2 | 728a4b7434879d3606f32836eda3971ed73905f8 | [
"BSD-2-Clause"
] | 30 | 2020-02-10T08:59:30.000Z | 2020-06-16T21:21:33.000Z | examples/mesh_slice.py | almarklein/visvis2 | 728a4b7434879d3606f32836eda3971ed73905f8 | [
"BSD-2-Clause"
] | null | null | null | """
Example showing off the mesh slice material.
"""
from wgpu.gui.auto import WgpuCanvas, run
import pygfx as gfx
canvas = WgpuCanvas()
renderer = gfx.renderers.WgpuRenderer(canvas)
scene = gfx.Scene()
geometry = gfx.torus_knot_geometry(1, 0.3, 128, 16)
material1 = gfx.MeshPhongMaterial(color=(0.5, 0.5, 0.5, 1.0))... | 21.175 | 86 | 0.678867 |
793fdb89d0677662c004f6e9880c893623cc6304 | 13,728 | py | Python | python/paddle/tensor/__init__.py | IcarusWizard/Paddle | c07b632cd4c7faac3150e8454d5800643faff4c9 | [
"Apache-2.0"
] | 1 | 2021-12-27T02:39:31.000Z | 2021-12-27T02:39:31.000Z | python/paddle/tensor/__init__.py | IcarusWizard/Paddle | c07b632cd4c7faac3150e8454d5800643faff4c9 | [
"Apache-2.0"
] | null | null | null | python/paddle/tensor/__init__.py | IcarusWizard/Paddle | c07b632cd4c7faac3150e8454d5800643faff4c9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 32.608076 | 74 | 0.617424 |
793fdc0cd101b7e4abb6d5b783fbac54f4a95683 | 1,762 | py | Python | setup.py | harper25/pipenv-pipes | ece06e3b9260d70ea7036811565cf862ee53f777 | [
"MIT"
] | 128 | 2018-05-03T07:08:15.000Z | 2022-02-01T17:26:29.000Z | setup.py | harper25/pipenv-pipes | ece06e3b9260d70ea7036811565cf862ee53f777 | [
"MIT"
] | 27 | 2018-05-03T00:38:02.000Z | 2021-06-01T22:15:42.000Z | setup.py | harper25/pipenv-pipes | ece06e3b9260d70ea7036811565cf862ee53f777 | [
"MIT"
] | 11 | 2018-05-03T07:40:35.000Z | 2021-12-13T05:24:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
import os
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0', #... | 25.536232 | 61 | 0.609535 |
793fdee07a839e5c59c136fb3e8cdb39b3823a48 | 2,679 | py | Python | SLpackage/private/pacbio/pythonpkgs/kineticstools/lib/python2.7/site-packages/kineticsTools/BasicLdaEnricher.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 5 | 2022-02-20T07:10:02.000Z | 2022-03-18T17:47:53.000Z | SLpackage/private/pacbio/pythonpkgs/kineticstools/lib/python2.7/site-packages/kineticsTools/BasicLdaEnricher.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | SLpackage/private/pacbio/pythonpkgs/kineticstools/lib/python2.7/site-packages/kineticsTools/BasicLdaEnricher.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
# Basic LDA Enricher class
from math import sqrt
import math
import scipy.stats as s
import array as a
from scipy.optimize import fminbound
from scipy.special import gammaln as gamln
from numpy import log, pi, log10, e, log1p, exp
import numpy as np
from .MultiSiteCommon import... | 38.271429 | 167 | 0.639418 |
793fdf552bde99568787bb29a29c9af30933f25e | 1,124 | py | Python | ecommerce/templatetags/general_tags.py | diptimoymandal/django-ecommerce | eb30ee51561feec0a614d964e3b7b1a9ceb2af4a | [
"MIT"
] | null | null | null | ecommerce/templatetags/general_tags.py | diptimoymandal/django-ecommerce | eb30ee51561feec0a614d964e3b7b1a9ceb2af4a | [
"MIT"
] | null | null | null | ecommerce/templatetags/general_tags.py | diptimoymandal/django-ecommerce | eb30ee51561feec0a614d964e3b7b1a9ceb2af4a | [
"MIT"
] | null | null | null | from django import template
from django.utils.safestring import mark_safe
from django.template.exceptions import TemplateSyntaxError
register = template.Library()
company = {
'name': 'Nawoka',
'address': 'Lille',
'domain': 'nawoka.fr',
'email': '[email protected]',
'telephone': '',
'ser... | 26.139535 | 97 | 0.570285 |
793fe02ba87907e731140ed462f00dc1b12570c2 | 848 | py | Python | tests/test_op.py | nmandery/h3ronpy | 58602a294bbb916f16c2080fb13aef0e5bd569a2 | [
"MIT"
] | 9 | 2021-11-02T00:41:28.000Z | 2022-03-10T20:08:16.000Z | tests/test_op.py | nmandery/h3ronpy | 58602a294bbb916f16c2080fb13aef0e5bd569a2 | [
"MIT"
] | 4 | 2021-09-01T16:16:27.000Z | 2022-02-17T11:08:53.000Z | tests/test_op.py | nmandery/h3ronpy | 58602a294bbb916f16c2080fb13aef0e5bd569a2 | [
"MIT"
] | null | null | null | import h3.api.numpy_int as h3
import numpy as np
from h3ronpy.op import kring_distances_agg, kring_distances
def test_kring_distances_agg():
h3indexes = np.array([h3.geo_to_h3(10.2, 45.5, 8), h3.geo_to_h3(10.3, 45.1, 8)], dtype=np.uint64)
k_max = 4
df = kring_distances_agg(h3indexes, k_max, aggregation_m... | 31.407407 | 101 | 0.654481 |
793fe16238699f0330f6f43aa51bb6283b7bb71d | 2,800 | py | Python | daemon/wakeserver/network.py | opiopan/wakeserver | 31ecba34dbe62c9db4745b007996e5bf662e08b7 | [
"MIT"
] | 1 | 2019-05-22T06:58:19.000Z | 2019-05-22T06:58:19.000Z | daemon/wakeserver/network.py | opiopan/wakeserver | 31ecba34dbe62c9db4745b007996e5bf662e08b7 | [
"MIT"
] | null | null | null | daemon/wakeserver/network.py | opiopan/wakeserver | 31ecba34dbe62c9db4745b007996e5bf662e08b7 | [
"MIT"
] | 1 | 2017-06-02T02:44:39.000Z | 2017-06-02T02:44:39.000Z | import os
import sys
import time
import json
import socket
import subprocess
import requests
import monitoring
MASTER_SERVICE = '_wakeserver._tcp'
SLAVE_SERVICE = '_wakeserver_slave._tcp'
LISTSERVICE = '/var/www/wakeserver/bin/listservice'
HOSTNAME = socket.gethostname() + '.local'
MASTER_PORT = ':8080'
SLAVE_PORT = ... | 27.45098 | 76 | 0.604286 |
793fe1f40bc61c6b1598840561520ba04c056031 | 2,068 | py | Python | KaiRoS/utils.py | rentruewang/kairos | e9fa82d6ba51dcd9bb2ff44fe63c81f9c616a78a | [
"MIT"
] | 1 | 2021-04-08T14:35:21.000Z | 2021-04-08T14:35:21.000Z | KaiRoS/utils.py | rentruewang/KaiRoS | e9fa82d6ba51dcd9bb2ff44fe63c81f9c616a78a | [
"MIT"
] | null | null | null | KaiRoS/utils.py | rentruewang/KaiRoS | e9fa82d6ba51dcd9bb2ff44fe63c81f9c616a78a | [
"MIT"
] | null | null | null | import os
import sys
import termios
import tty
from datetime import datetime, timedelta
from os import path
import requests
from requests.exceptions import ConnectionError
def print_help():
print(
"""
usage: kairos [h] [n] [f]
optional arguments:
h, -h, help, --help
show this help messag... | 24.329412 | 89 | 0.612669 |
793fe350ea27b70e5491d166ba85a305efd37729 | 2,509 | py | Python | bitex/api/WSS/gdax.py | no777/bitex | 68042a02419b7032a37f090d1c0a192d9bb34f4c | [
"MIT"
] | null | null | null | bitex/api/WSS/gdax.py | no777/bitex | 68042a02419b7032a37f090d1c0a192d9bb34f4c | [
"MIT"
] | null | null | null | bitex/api/WSS/gdax.py | no777/bitex | 68042a02419b7032a37f090d1c0a192d9bb34f4c | [
"MIT"
] | null | null | null | # Import Built-Ins
import logging
import json
import threading
import time
# Import Third-Party
from websocket import create_connection, WebSocketTimeoutException
import requests
# Import Homebrew
from bitex.api.WSS.base import WSSAPI
from datetime import datetime
# Init Logging Facilities
log = logging.getLogger(__na... | 32.584416 | 78 | 0.534874 |
793fe38ec2eda9ae0f1fa4f47302a7de484f81af | 8,381 | py | Python | cachier/core.py | fx-kirin/cachier | 0cbe7efcd1e7dfa7d4df7245cc90d4263cc75e86 | [
"MIT"
] | null | null | null | cachier/core.py | fx-kirin/cachier | 0cbe7efcd1e7dfa7d4df7245cc90d4263cc75e86 | [
"MIT"
] | null | null | null | cachier/core.py | fx-kirin/cachier | 0cbe7efcd1e7dfa7d4df7245cc90d4263cc75e86 | [
"MIT"
] | null | null | null | """Persistent, stale-free memoization decorators for Python."""
# This file is part of Cachier.
# https://github.com/shaypal5/cachier
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2016, Shay Palachy <[email protected]>
# python 2 compatibility
from __future__ imp... | 38.800926 | 78 | 0.577258 |
793fe3e852c6e1b0f9d58d4e1c54ad17f4435b59 | 1,356 | py | Python | CalibTracker/SiStripCommon/python/theBigNtupleMC_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | CalibTracker/SiStripCommon/python/theBigNtupleMC_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | CalibTracker/SiStripCommon/python/theBigNtupleMC_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowClustersProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowTrackClustersProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowRechitClustersProducer_cfi... | 42.375 | 74 | 0.65118 |
793fe4c1a39c93ff7b03e71fb83a4355e1337f67 | 7,445 | py | Python | bot/cogs/utils.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | 1 | 2022-01-01T17:33:48.000Z | 2022-01-01T17:33:48.000Z | bot/cogs/utils.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | null | null | null | bot/cogs/utils.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | 1 | 2020-11-01T19:57:00.000Z | 2020-11-01T19:57:00.000Z | import logging
import re
import unicodedata
from asyncio import TimeoutError, sleep
from email.parser import HeaderParser
from io import StringIO
from typing import Tuple
from dateutil import relativedelta
from discord import Colour, Embed, Message, Role
from discord.ext.commands import Bot, Cog, Context, command
fro... | 40.906593 | 117 | 0.593553 |
793fe52bbf404e4b39983c50a6fe64148ac6370d | 8,304 | py | Python | nicos_mlz/toftof/devices/chopper/base.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/toftof/devices/chopper/base.py | ebadkamil/nicos | 0355a970d627aae170c93292f08f95759c97f3b5 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 4 | 2019-11-08T10:18:16.000Z | 2021-01-13T13:07:29.000Z | nicos_mlz/toftof/devices/chopper/base.py | ISISComputingGroup/nicos | 94cb4d172815919481f8c6ee686f21ebb76f2068 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 35.186441 | 79 | 0.594292 |
793fe551c7aa87a13f1e22df6b123b977f101d52 | 2,325 | py | Python | Simulated Annealing/simulated_annealing_subplots.py | armandwayoff/Graph-Optimization | 9a7472d023935a49e270f1d1d7191af26ca6ffe9 | [
"MIT"
] | 1 | 2021-12-07T18:03:27.000Z | 2021-12-07T18:03:27.000Z | Simulated Annealing/simulated_annealing_subplots.py | armandwayoff/Graph-Optimization | 9a7472d023935a49e270f1d1d7191af26ca6ffe9 | [
"MIT"
] | null | null | null | Simulated Annealing/simulated_annealing_subplots.py | armandwayoff/Graph-Optimization | 9a7472d023935a49e270f1d1d7191af26ca6ffe9 | [
"MIT"
] | null | null | null | # inspired by https://www.youtube.com/watch?v=NPE3zncXA5s
import matplotlib.pyplot as plt
import networkx as nx
from math import *
from random import *
import time
class Vertex:
def __init__(self, x, y):
self.x = x
self.y = y
def dist(x1, y1, x2, y2):
return sqrt((x1 - x2) ** 2 + (y1 - y2) ... | 25 | 105 | 0.656344 |
793fe5a37b44a8bf92994abaef516b81f199a6e6 | 582 | py | Python | idm/my_signals/farm.py | sadfucking/IrCB-Duty | 67cce59900118412b1276c8c7f554500234cc899 | [
"MIT"
] | 18 | 2020-07-25T17:44:16.000Z | 2022-03-09T08:10:12.000Z | idm/my_signals/farm.py | sadfucking/IrCB-Duty | 67cce59900118412b1276c8c7f554500234cc899 | [
"MIT"
] | 6 | 2020-10-07T17:57:40.000Z | 2022-01-29T17:16:17.000Z | idm/my_signals/farm.py | sadfucking/IrCB-Duty | 67cce59900118412b1276c8c7f554500234cc899 | [
"MIT"
] | 36 | 2020-07-27T07:10:45.000Z | 2022-03-30T19:19:28.000Z | from idm.objects import dp, MySignalEvent
from time import sleep
farm_data = {
"owner_id": -174105461,
"post_id": 6713149
}
@dp.longpoll_event_register('ферма')
@dp.my_signal_event_register('ферма')
def farming(event: MySignalEvent) -> str:
comment_id = event.api('wall.createComment', message='ферма', **... | 29.1 | 92 | 0.671821 |
793fe735000ac7111e1fde876fef76f0b3061cdb | 28,016 | py | Python | models/00_settings.py | apocsantos/eden | 8b71af6b4dc72e2c4d656dbe1bb3943426705422 | [
"MIT"
] | 1 | 2017-03-15T23:29:41.000Z | 2017-03-15T23:29:41.000Z | models/00_settings.py | apocsantos/eden | 8b71af6b4dc72e2c4d656dbe1bb3943426705422 | [
"MIT"
] | null | null | null | models/00_settings.py | apocsantos/eden | 8b71af6b4dc72e2c4d656dbe1bb3943426705422 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Global settings:
Those which are typically edited during a deployment are in
000_config.py & their results parsed into here. Deployers
shouldn't typically need to edit any settings here.
"""
# Keep all our configuration options off the main global variables
# Use response... | 33.794934 | 233 | 0.605725 |
793fe76a5263318e3964bd750cd5999b0e40bb93 | 34,556 | py | Python | src/datasets/download/streaming_download_manager.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | src/datasets/download/streaming_download_manager.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | src/datasets/download/streaming_download_manager.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | import glob
import io
import os
import posixpath
import re
import tarfile
import time
from asyncio import TimeoutError
from io import BytesIO
from itertools import chain
from pathlib import Path, PurePath, PurePosixPath
from typing import Callable, Generator, Iterable, List, Optional, Tuple, Union
from xml.etree import... | 37.601741 | 152 | 0.646545 |
793fe8daae05d403567e1534f4bbf7f432800eb9 | 1,464 | py | Python | main.py | cto-ai/query-mysql | 830e86f2b20d08842cae6285e4d77e446838a0e3 | [
"MIT"
] | 2 | 2020-05-25T18:47:45.000Z | 2020-05-25T22:23:00.000Z | main.py | cto-ai/query-mysql | 830e86f2b20d08842cae6285e4d77e446838a0e3 | [
"MIT"
] | null | null | null | main.py | cto-ai/query-mysql | 830e86f2b20d08842cae6285e4d77e446838a0e3 | [
"MIT"
] | 1 | 2020-03-24T21:11:14.000Z | 2020-03-24T21:11:14.000Z | import mysql.connector
from cto_ai import ux, prompt
import src.login as login
from src.logos import logo_print
from src.op_cursor import op_cursor
def main():
"""
Prompts user for a MySQL database and allows them to print any data they query for
"""
logo_print()
db_creds = login.Db_credentials... | 22.875 | 101 | 0.590847 |
793fea85413be1ae1b3eecee0375c5623e7a141c | 395 | py | Python | nicos_jcns/jcnsse/setups/notifiers.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_jcns/jcnsse/setups/notifiers.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_jcns/jcnsse/setups/notifiers.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Email and SMS notifiers'
group = 'lowlevel'
devices = dict(
emailer = device('nicos.devices.notifiers.Mailer',
mailserver = 'mailhost.frm2.tum.de',
sender = '[email protected]',
copies = [],
subject = 'SE',
),
smser = device('nicos.devices.notifiers.SMSe... | 23.235294 | 54 | 0.577215 |
793fecbec44626a24adb3f3c80cc7fc6361a6dc5 | 431 | py | Python | test/conftest.py | eggplants/rdflib | 1fdf40cd957d68753348d1430cbb37e80dbce999 | [
"BSD-3-Clause"
] | 1 | 2022-03-02T10:25:44.000Z | 2022-03-02T10:25:44.000Z | test/conftest.py | eggplants/rdflib | 1fdf40cd957d68753348d1430cbb37e80dbce999 | [
"BSD-3-Clause"
] | 6 | 2021-11-01T20:13:25.000Z | 2022-03-24T02:01:58.000Z | test/conftest.py | ashleysommer/rdflib | 03c5e79298b35f29087ff82002becaaba0e3a656 | [
"BSD-3-Clause"
] | 1 | 2022-03-15T22:05:24.000Z | 2022-03-15T22:05:24.000Z | import pytest
from rdflib import Graph
from .data import CONSISTENT_DATA_DIR
from .earl import EarlReporter
pytest_plugins = [EarlReporter.__module__]
# This is here so that asserts from these modules are formatted for human
# readibility.
pytest.register_assert_rewrite("test.testutils")
@pytest.fixture(scope="se... | 23.944444 | 75 | 0.781903 |
793fed3cc8f8beb073ae88ae85b933cf5ef6c7af | 2,960 | py | Python | tests/device/conftest.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | tests/device/conftest.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | tests/device/conftest.py | maxthomas/yubikey-manager | 79bf111093401dbbe18ef7627d45e8c472ba17dd | [
"BSD-2-Clause"
] | null | null | null | from ykman.device import connect_to_device, list_all_devices, read_info
from ykman.pcsc import list_devices
from yubikit.core import TRANSPORT
from yubikit.core.otp import OtpConnection
from yubikit.core.fido import FidoConnection
from yubikit.core.smartcard import SmartCardConnection
from yubikit.management import USB... | 28.461538 | 85 | 0.703041 |
793fed5955ad2d04aa031d1420875c0ab969dca8 | 1,101 | py | Python | markdown_thirdparty.py | FuzzyWuzzie/markdown_thirdparty | 4ba6ab0ee525bd633a35038b4ca36d04c84c8cef | [
"MIT"
] | 2 | 2015-06-01T22:15:38.000Z | 2015-08-24T19:41:35.000Z | markdown_thirdparty.py | hamaluik/markdown_thirdparty | 4ba6ab0ee525bd633a35038b4ca36d04c84c8cef | [
"MIT"
] | 1 | 2015-08-24T19:43:26.000Z | 2015-08-24T19:43:26.000Z | markdown_thirdparty.py | hamaluik/markdown_thirdparty | 4ba6ab0ee525bd633a35038b4ca36d04c84c8cef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Markdown Third Party
============================
This plugin allows you to use various third-party
Markdown extensions to make writing posts in Markdown
easier and better.
"""
from pelican import signals, readers
import os, sys, inspect
class MarkdownThirdParty(readers.MarkdownReader):
... | 31.457143 | 106 | 0.725704 |
793fed6c9a826fa48f09488242425e8119e3bb71 | 814 | py | Python | src/MapReduce3/reducer.py | jonaac/Hadoop-MapReduce | d3dc443210298da218e055f4f37280ede7e63a0d | [
"MIT"
] | 1 | 2021-03-11T22:19:12.000Z | 2021-03-11T22:19:12.000Z | src/MapReduce3/reducer.py | jonaac/MapReduce | d3dc443210298da218e055f4f37280ede7e63a0d | [
"MIT"
] | null | null | null | src/MapReduce3/reducer.py | jonaac/MapReduce | d3dc443210298da218e055f4f37280ede7e63a0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Rami Abou-Nassar
# Jonathan Azpur
# Third Reducer:
# Input from third mapper:
# (word,filename,count dw)
#
# Outputs:
# (word,filename, tfidf)
import sys
import math
currWord = None
currCount = 0
word = None
# input comes from STDIN
for line in sys.stdin:
... | 23.257143 | 56 | 0.587224 |
793fed92e28617d52b7e53147347270a3271ad96 | 2,083 | py | Python | RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 13 | 2015-11-30T15:49:45.000Z | 2022-02-08T16:11:30.000Z | RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 640 | 2015-02-11T18:55:47.000Z | 2022-03-31T14:12:23.000Z | RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 51 | 2015-08-11T21:01:40.000Z | 2022-03-30T07:31:34.000Z | import FWCore.ParameterSet.Config as cms
#------------------
#Hybrid clustering:
#------------------
# Producer for Box Particle Flow Super Clusters
from RecoEcal.EgammaClusterProducers.particleFlowSuperClusterECAL_cff import *
# Producer for energy corrections
#from RecoEcal.EgammaClusterProducers.correctedDynamicHyb... | 44.319149 | 108 | 0.792127 |
793fedb1871b4f3114f9adb7015b86d005ec73e4 | 166 | py | Python | sillysort/__init__.py | renan-eccel/sillysort | 98531bb011f220d0877ba2abfd202d52026a2695 | [
"MIT"
] | null | null | null | sillysort/__init__.py | renan-eccel/sillysort | 98531bb011f220d0877ba2abfd202d52026a2695 | [
"MIT"
] | 310 | 2018-05-14T01:32:25.000Z | 2022-03-28T06:34:20.000Z | sillysort/__init__.py | renan-eccel/sillysort | 98531bb011f220d0877ba2abfd202d52026a2695 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for SillySort."""
__author__ = """Renan Artur Lopes Eccel"""
__email__ = '[email protected]'
__version__ = '0.2.0'
| 20.75 | 42 | 0.650602 |
793fee08f9ee650dc243bc11482e6588d81b7e32 | 21,630 | py | Python | pyaff4/block_hasher.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 34 | 2017-10-21T16:12:58.000Z | 2022-02-18T00:37:08.000Z | pyaff4/block_hasher.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 23 | 2017-11-06T17:01:04.000Z | 2021-12-26T14:09:38.000Z | pyaff4/block_hasher.py | aff4/python-aff4 | 94a3583475c07ad92147f70ff8a19e9e36f12aa9 | [
"Apache-2.0"
] | 17 | 2019-02-11T00:47:02.000Z | 2022-03-14T02:52:04.000Z | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
# Copyright 2016,2017 Schatz Forensic Pty Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except... | 42 | 125 | 0.632455 |
793fee7dfa01a83005f96c2cf3d7808deb9b6bf0 | 7,196 | py | Python | src/morphforgecontrib/simulation/channels/hh_style/neuron/hocmodbuilders/mmwriter_alphabetabeta.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforgecontrib/simulation/channels/hh_style/neuron/hocmodbuilders/mmwriter_alphabetabeta.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforgecontrib/simulation/channels/hh_style/neuron/hocmodbuilders/mmwriter_alphabetabeta.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 48.952381 | 285 | 0.629655 |
793ff00f9884b31c7311a6c25c98f72d4dc26bfd | 2,944 | py | Python | glashammer/bundles/deprecated/auth/__init__.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | 1 | 2016-07-04T15:23:59.000Z | 2016-07-04T15:23:59.000Z | glashammer/bundles/deprecated/auth/__init__.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | null | null | null | glashammer/bundles/deprecated/auth/__init__.py | passy/glashammer-rdrei | 9e56952d70b961d8945707469aad9cfe97c4e7b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
glashammer.bundles.auth
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: 2008 by Glashammer Developers
:license: MIT
"""
import os
from werkzeug.exceptions import NotFound
from wtforms import Form, TextField, PasswordField
from glashammer.utils import render_response, sibpath, emit_ev... | 24.739496 | 78 | 0.654891 |
793ff0519df21a13305f3e162866650ebba443b5 | 49,513 | py | Python | sdks/python/apache_beam/examples/snippets/snippets_test.py | shitanshu-google/beam | 9cd959f61d377874ee1839c2de4bb8f65a948ecc | [
"Apache-2.0"
] | 3 | 2020-08-28T17:47:26.000Z | 2021-08-17T06:38:58.000Z | sdks/python/apache_beam/examples/snippets/snippets_test.py | shitanshu-google/beam | 9cd959f61d377874ee1839c2de4bb8f65a948ecc | [
"Apache-2.0"
] | 9 | 2020-06-03T12:34:25.000Z | 2020-08-11T12:18:22.000Z | sdks/python/apache_beam/examples/snippets/snippets_test.py | shitanshu-google/beam | 9cd959f61d377874ee1839c2de4bb8f65a948ecc | [
"Apache-2.0"
] | 1 | 2021-10-05T20:53:52.000Z | 2021-10-05T20:53:52.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");... | 36.406618 | 80 | 0.648153 |
793ff198e885845b12d8fcaa050e70842be2bf21 | 2,079 | py | Python | steps/step48.py | tokupooh/DeZero | 8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c | [
"MIT"
] | null | null | null | steps/step48.py | tokupooh/DeZero | 8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c | [
"MIT"
] | 3 | 2021-06-08T22:13:02.000Z | 2022-01-13T03:12:07.000Z | steps/step48.py | tokupooh/DeZero | 8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c | [
"MIT"
] | null | null | null | if '__file__' in globals():
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import math
import matplotlib.pyplot as plt
import numpy as np
import dezero
import dezero.functions as F
from dezero import optimizers
from dezero.models import MLP
if __name__ == '__main__':
... | 28.094595 | 75 | 0.580087 |
793ff1a5ee34cf8a33e90b4d63437baf1fa7e47d | 540 | py | Python | backend/app/alembic/versions/3161ae076013_.py | lianjy357/vue-element-admin-fastapi | 70f697af33ca747a154d0de129f4cbd7f9d03f7b | [
"MIT"
] | 10 | 2020-12-16T07:31:29.000Z | 2022-01-27T08:01:22.000Z | backend/app/alembic/versions/3161ae076013_.py | lianjy357/vue-element-admin-fastapi | 70f697af33ca747a154d0de129f4cbd7f9d03f7b | [
"MIT"
] | null | null | null | backend/app/alembic/versions/3161ae076013_.py | lianjy357/vue-element-admin-fastapi | 70f697af33ca747a154d0de129f4cbd7f9d03f7b | [
"MIT"
] | 3 | 2021-03-18T11:38:21.000Z | 2021-09-02T06:23:15.000Z | """
Revision ID: 3161ae076013
Revises: bb6f7651ffa8
Create Date: 2020-07-08 19:34:22.355324
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3161ae076013'
down_revision = 'bb6f7651ffa8'
branch_labels = None
depends_on = None
def upgrade():
# ### commands ... | 18.62069 | 65 | 0.681481 |
793ff2f2dfc226595f91cf53a39cd57f306e4936 | 5,958 | py | Python | docs/conf.py | vindex10/AmpliGraph | 1aa91a4b32081bcaad4e7386032b9ac85deb99d6 | [
"Apache-2.0"
] | 2 | 2019-06-24T23:21:28.000Z | 2020-10-28T02:57:59.000Z | docs/conf.py | rezacsedu/AmpliGraph | 94a5c31187f1267782e95a8d3380ccd1a53221bd | [
"Apache-2.0"
] | null | null | null | docs/conf.py | rezacsedu/AmpliGraph | 94a5c31187f1267782e95a8d3380ccd1a53221bd | [
"Apache-2.0"
] | 1 | 2020-05-09T20:03:02.000Z | 2020-05-09T20:03:02.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ampligraph documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 17 14:10:15 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
#... | 30.397959 | 126 | 0.694025 |
793ff3afcca927ec190ae0fd72aa4ca9cb49f0ee | 649 | py | Python | openprocurement/auctions/insider/views/award_complaint.py | oleksiyVeretiuk/openprocurement.auctions.insider | f380caa9b63dadbfe7bd1f9512e21c486a138457 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/insider/views/award_complaint.py | oleksiyVeretiuk/openprocurement.auctions.insider | f380caa9b63dadbfe7bd1f9512e21c486a138457 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/insider/views/award_complaint.py | oleksiyVeretiuk/openprocurement.auctions.insider | f380caa9b63dadbfe7bd1f9512e21c486a138457 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from openprocurement.auctions.core.utils import (
opresource,
)
from openprocurement.auctions.dgf.views.financial.award_complaint import (
FinancialAuctionAwardComplaintResource,
)
@opresource(name='dgfInsider:Auction Award Complaints',
collection_path='/auctions/{auction_i... | 40.5625 | 86 | 0.751926 |
793ff40e5abbbf730168f203a02195c3564fc386 | 439 | py | Python | timevortex/wsgi.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | timevortex/wsgi.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | timevortex/wsgi.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | """
WSGI config for timevortex project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 25.823529 | 81 | 0.788155 |
793ff44127513a9b0b4c6104c31b17da1b705f47 | 643 | py | Python | tests/integration/test_tcp.py | ozonru/mbtest | 90013cdc2cec07c310a910c037f10f7ba9de9a9f | [
"MIT"
] | 26 | 2018-10-10T16:29:59.000Z | 2021-12-28T00:07:57.000Z | tests/integration/test_tcp.py | ozonru/mbtest | 90013cdc2cec07c310a910c037f10f7ba9de9a9f | [
"MIT"
] | 54 | 2019-02-02T08:16:04.000Z | 2022-03-03T07:16:59.000Z | tests/integration/test_tcp.py | ozonru/mbtest | 90013cdc2cec07c310a910c037f10f7ba9de9a9f | [
"MIT"
] | 14 | 2019-02-01T23:08:07.000Z | 2021-12-16T11:28:30.000Z | # encoding=utf-8
import logging
import socket
from hamcrest import assert_that, is_
from mbtest.imposters import Imposter, Stub, TcpPredicate, TcpResponse
logger = logging.getLogger(__name__)
def test_tcp(mock_server):
imposter = Imposter(
Stub(TcpPredicate(data="request"), TcpResponse(data="*" * 1024)... | 24.730769 | 73 | 0.692068 |
793ff512cea13db13d5459641b66dd4c18dbe98c | 4,011 | py | Python | fabtools/require/system.py | gisce/fabtools | 6324b1da285083b2545c8d441ecb572d00ee8781 | [
"BSD-2-Clause"
] | null | null | null | fabtools/require/system.py | gisce/fabtools | 6324b1da285083b2545c8d441ecb572d00ee8781 | [
"BSD-2-Clause"
] | null | null | null | fabtools/require/system.py | gisce/fabtools | 6324b1da285083b2545c8d441ecb572d00ee8781 | [
"BSD-2-Clause"
] | null | null | null | """
System settings
===============
"""
from re import escape
from fabric.api import settings, warn
from fabric.contrib.files import append, uncomment
from fabtools.files import is_file, watch
from fabtools.system import (
UnsupportedFamily,
distrib_family, distrib_id,
get_hostname, set_hostname,
get... | 28.246479 | 84 | 0.64722 |
793ff748e60fc15c0539f9863fea2d4c3a56d155 | 7,118 | py | Python | pytorch_lightning/loops/base.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"Apache-2.0"
] | 2 | 2021-06-25T08:42:32.000Z | 2021-06-25T08:49:33.000Z | pytorch_lightning/loops/base.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/loops/base.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"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... | 35.412935 | 113 | 0.622647 |
793ff792b3e2b58612a572170b55e70a5da740fd | 224 | py | Python | BOOK/MAIN/05-file-handling/chapter-5-examples/23-b-display-records.py | kabirsrivastava3/python-practice | f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5 | [
"MIT"
] | null | null | null | BOOK/MAIN/05-file-handling/chapter-5-examples/23-b-display-records.py | kabirsrivastava3/python-practice | f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5 | [
"MIT"
] | null | null | null | BOOK/MAIN/05-file-handling/chapter-5-examples/23-b-display-records.py | kabirsrivastava3/python-practice | f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5 | [
"MIT"
] | null | null | null | #read and display the contents of Employee.csv in 23-a
import csv
with open('Employee.csv',"r") as fhObj:
eReader = csv.reader(fhObj)
print("File Employee.csv contains :")
for rec in eReader:
print(rec)
| 24.888889 | 54 | 0.674107 |
793ff793b83179653791c4848ce694322b8c258d | 21,355 | py | Python | src/aiortc/rtcrtpreceiver.py | vibhaa/aiortc | 764d5f63a1eef0367e4c2159e515e7bb87a31f80 | [
"BSD-3-Clause"
] | null | null | null | src/aiortc/rtcrtpreceiver.py | vibhaa/aiortc | 764d5f63a1eef0367e4c2159e515e7bb87a31f80 | [
"BSD-3-Clause"
] | 2 | 2021-11-17T15:12:48.000Z | 2021-12-10T01:12:24.000Z | src/aiortc/rtcrtpreceiver.py | vibhaa/aiortc | 764d5f63a1eef0367e4c2159e515e7bb87a31f80 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import datetime
import logging
import queue
import random
import threading
import time
from dataclasses import dataclass
from typing import Dict, List, Optional, Set
from av.frame import Frame
from . import clock
from .codecs import depayload, get_capabilities, get_decoder, is_rtx
from .exceptions impo... | 34.499192 | 138 | 0.590822 |
793ff796fa9dae652c4388a416e762ce9ec71f5c | 734 | py | Python | dnd5e/migrations/0005_auto_20210106_1318.py | VlasovVitaly/gmfriend | 4efacee2a09061d4a6ccb916438bd09db56a1837 | [
"MIT"
] | null | null | null | dnd5e/migrations/0005_auto_20210106_1318.py | VlasovVitaly/gmfriend | 4efacee2a09061d4a6ccb916438bd09db56a1837 | [
"MIT"
] | 2 | 2021-12-13T15:47:16.000Z | 2021-12-15T17:48:15.000Z | dnd5e/migrations/0005_auto_20210106_1318.py | VlasovVitaly/gmfriend | 4efacee2a09061d4a6ccb916438bd09db56a1837 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-06 13:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dnd5e', '0004_auto_20210106_1258'),
]
operations = [
migrations.AddField(
model_name='character',
name='languages',
... | 30.583333 | 150 | 0.638965 |
793ff809f13638f77d4cde1d359150017bed1877 | 12,216 | py | Python | tests/db.py | zlucifer/DIRBS-Core | 702e93dcefdf0fb5787cb42c2a6bc2574e483057 | [
"Unlicense"
] | 1 | 2019-12-10T10:53:00.000Z | 2019-12-10T10:53:00.000Z | tests/db.py | zlucifer/DIRBS-Core | 702e93dcefdf0fb5787cb42c2a6bc2574e483057 | [
"Unlicense"
] | null | null | null | tests/db.py | zlucifer/DIRBS-Core | 702e93dcefdf0fb5787cb42c2a6bc2574e483057 | [
"Unlicense"
] | null | null | null | """
dirbs-db unit tests.
SPDX-License-Identifier: BSD-4-Clause-Clear
Copyright (c) 2018-2019 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the followin... | 56.294931 | 119 | 0.64612 |
793ff8cef0c118791728620d93c10e919cff3413 | 1,094 | py | Python | tfmtcnn/utils/__init__.py | look4pritam/mtcnn | a8324450e02334e3b4d0f1654c65c772a4bdb953 | [
"MIT"
] | null | null | null | tfmtcnn/utils/__init__.py | look4pritam/mtcnn | a8324450e02334e3b4d0f1654c65c772a4bdb953 | [
"MIT"
] | null | null | null | tfmtcnn/utils/__init__.py | look4pritam/mtcnn | a8324450e02334e3b4d0f1654c65c772a4bdb953 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018
#
# 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 the rights
# to use, copy, modify, merge, publish, dis... | 49.727273 | 80 | 0.776965 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.