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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797a407a46590d37a55cde77ffd40a5c8019db40 | 1,818 | py | Python | fastapi_users/db/mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | fastapi_users/db/mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | fastapi_users/db/mongodb.py | nullhack/fastapi-users | e850871e7935c460e9c169385dd7d42b45e0320c | [
"MIT"
] | null | null | null | from typing import Optional, Type
from motor.motor_asyncio import AsyncIOMotorCollection
from pydantic import UUID4
from fastapi_users.db.base import BaseUserDatabase
from fastapi_users.models import UD
class MongoDBUserDatabase(BaseUserDatabase[UD]):
"""
Database adapter for MongoDB.
:param user_db_mo... | 34.301887 | 86 | 0.671067 |
797a41cbf20bc96b04ca4088aa11ed459f1d0f8a | 3,760 | py | Python | tests/integration_tests/count_contacts.py | atruszkowska/ABM-COVID-Mobility | fadf0280c72e63e6959d5673877c009832e84dd4 | [
"MIT"
] | null | null | null | tests/integration_tests/count_contacts.py | atruszkowska/ABM-COVID-Mobility | fadf0280c72e63e6959d5673877c009832e84dd4 | [
"MIT"
] | null | null | null | tests/integration_tests/count_contacts.py | atruszkowska/ABM-COVID-Mobility | fadf0280c72e63e6959d5673877c009832e84dd4 | [
"MIT"
] | 1 | 2021-04-21T11:47:36.000Z | 2021-04-21T11:47:36.000Z | #
# Script for counting average contact number based on the input
#
# Contacts at every location
households = []
ret_homes = []
schools = []
workplaces = []
hospitals = []
# Hardcoded contact limits
max_rh = 40
max_sch = 50
max_hsp = 30
max_wrk = 20
# Read and initialize
with open('test_data/NR_households.txt', 'r... | 23.797468 | 63 | 0.63617 |
797a425a665f9dbaf32d6eb57e75abfcff08121e | 1,149 | py | Python | Day 34 - Quizzler App/quiz_brain.py | vanquirius/100-days-of-code-python | 5e2903534b26a765568fb6258e18ecc6ca3bde12 | [
"MIT"
] | null | null | null | Day 34 - Quizzler App/quiz_brain.py | vanquirius/100-days-of-code-python | 5e2903534b26a765568fb6258e18ecc6ca3bde12 | [
"MIT"
] | null | null | null | Day 34 - Quizzler App/quiz_brain.py | vanquirius/100-days-of-code-python | 5e2903534b26a765568fb6258e18ecc6ca3bde12 | [
"MIT"
] | null | null | null | # coding=utf-8
# Marcelo Ambrosio de Goes
# marcelogoes@gmail.com
# 2022-03-20
# 100 Days of Code: The Complete Python Pro Bootcamp for 2022
# Day 34 - Quizzler App
import html
class QuizBrain:
def __init__(self, q_list):
self.question_number = 0
self.score = 0
self.question_list = q_lis... | 28.725 | 76 | 0.64752 |
797a4312790b98d159e8e2108fb98657b507fd0a | 803 | py | Python | scripts/preprocess/ucf_split_train_test.py | pointoflight/VideoGPT | 85f19d8cb0d251238f295f0294e69b9299c13e21 | [
"MIT"
] | 396 | 2021-04-11T01:21:23.000Z | 2022-03-29T05:20:34.000Z | scripts/preprocess/ucf_split_train_test.py | pointoflight/VideoGPT | 85f19d8cb0d251238f295f0294e69b9299c13e21 | [
"MIT"
] | 28 | 2021-04-21T19:51:18.000Z | 2022-03-08T16:55:24.000Z | scripts/preprocess/ucf_split_train_test.py | pointoflight/VideoGPT | 85f19d8cb0d251238f295f0294e69b9299c13e21 | [
"MIT"
] | 49 | 2021-04-11T01:23:36.000Z | 2022-03-31T16:36:23.000Z | import sys
import os
import os.path as osp
import shutil
root = sys.argv[1]
fold = int(sys.argv[2])
assert fold in [1, 2, 3]
def move_files(files, split):
split_dir = osp.join(root, split)
os.makedirs(split_dir, exist_ok=True)
for filename in files:
folder = osp.join(split_dir, osp.dirname(filenam... | 32.12 | 87 | 0.67995 |
797a4342d7a947066b52baf763aee7eecf537296 | 948 | py | Python | django_categories/management/commands/add_category_fields.py | artemudovyk-konstankino/django-categories | ed53496b836edad3ad3a7924b21fd6f1d73f12d1 | [
"Apache-2.0"
] | null | null | null | django_categories/management/commands/add_category_fields.py | artemudovyk-konstankino/django-categories | ed53496b836edad3ad3a7924b21fd6f1d73f12d1 | [
"Apache-2.0"
] | null | null | null | django_categories/management/commands/add_category_fields.py | artemudovyk-konstankino/django-categories | ed53496b836edad3ad3a7924b21fd6f1d73f12d1 | [
"Apache-2.0"
] | null | null | null | """The add_category_fields command."""
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""
Alter one or more models' tables with the registered attributes.
"""
help = "Alter the tables for all registered models, or just specified models"
args = "[appname ...]"
... | 29.625 | 81 | 0.632911 |
797a43c084426c334b3414a22f3586d43c6279ba | 511 | py | Python | setup.py | roy2220/mdmail | bf9c0fa563a833eb7c1f73cc0f70f9117f45323a | [
"MIT"
] | null | null | null | setup.py | roy2220/mdmail | bf9c0fa563a833eb7c1f73cc0f70f9117f45323a | [
"MIT"
] | null | null | null | setup.py | roy2220/mdmail | bf9c0fa563a833eb7c1f73cc0f70f9117f45323a | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name="mdmail",
version="0.3.0",
description="A CLI tool to send mails written in Markdown",
packages=["mdmail"],
package_dir={"mdmail": "src/mdmail"},
package_data={
"mdmail": [
"github-markdown-css/github-markdown.css",
]
... | 21.291667 | 63 | 0.545988 |
797a43f100b82e55b3f8e3b166db2a52036475e6 | 3,567 | py | Python | Integrations/python/deephaven/lang/constants.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 55 | 2021-05-11T16:01:59.000Z | 2022-03-30T14:30:33.000Z | Integrations/python/deephaven/lang/constants.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | Integrations/python/deephaven/lang/constants.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 29 | 2021-05-10T11:33:16.000Z | 2022-03-30T21:01:54.000Z | """
Deephanven Python language constants.
**The contents of this module are intended only for internal Deephaven use and may change at any time.**
"""
import numpy as np
import numba as nb
from enum import Enum
# TODO: a proper configuration method
debugMode = False #: The debug mode. Set to True to get ast dump... | 35.67 | 120 | 0.686852 |
797a445385fbe762e9deeafc1e6c7d8bf80d4c84 | 2,105 | py | Python | tests/test_database.py | brunolcarli/quentin | 492404ebf41bea3f0c8636a21e3a89cbbd01e47d | [
"CC-BY-4.0"
] | null | null | null | tests/test_database.py | brunolcarli/quentin | 492404ebf41bea3f0c8636a21e3a89cbbd01e47d | [
"CC-BY-4.0"
] | null | null | null | tests/test_database.py | brunolcarli/quentin | 492404ebf41bea3f0c8636a21e3a89cbbd01e47d | [
"CC-BY-4.0"
] | null | null | null | import json
import mysql.connector
from core.db_handler import Database
from core.util import FileTransformer
from quentin.settings import MYSQL_CONFIG
from datetime import datetime
class TestDabaseFunctionality:
"""
Test the database handler and operations.
"""
# Setup
connection = mysql.connecto... | 30.071429 | 85 | 0.626603 |
797a45071a58862aa0ef8f005fde4c237f93fd73 | 7,571 | py | Python | gpiozero/exc.py | codecademy-engineering/gpiozero | 52edc30fd5d0b6dfe4582a9271fdd52ce075266d | [
"BSD-3-Clause"
] | 743 | 2019-07-31T02:57:08.000Z | 2022-03-31T08:48:30.000Z | gpiozero/exc.py | codecademy-engineering/gpiozero | 52edc30fd5d0b6dfe4582a9271fdd52ce075266d | [
"BSD-3-Clause"
] | 259 | 2019-07-29T14:26:40.000Z | 2022-03-27T00:17:56.000Z | gpiozero/exc.py | codecademy-engineering/gpiozero | 52edc30fd5d0b6dfe4582a9271fdd52ce075266d | [
"BSD-3-Clause"
] | 127 | 2019-08-03T19:30:18.000Z | 2022-02-24T14:33:50.000Z | # vim: set fileencoding=utf-8:
#
# GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins
#
# Copyright (c) 2016-2021 Dave Jones <dave@waveform.org.uk>
# Copyright (c) 2019-2020 Ben Nuttall <ben@bennuttall.com>
# Copyright (c) 2019 Kosovan Sofiia <sofiia.kosovan@gmail.com>
# Copyright (c) 2016 Andrew Schelle... | 38.825641 | 114 | 0.789064 |
797a4637df25036a9d299a35a1ff1dd5da002d61 | 8,713 | py | Python | ppdet/data/source/voc.py | hyjie-ts/Deep-Learning | 4cf1cc40f10aef2c3919bec9f7de11bf9eff8031 | [
"Apache-2.0"
] | 10 | 2020-11-24T12:32:37.000Z | 2021-09-06T08:41:04.000Z | ppdet/data/source/voc.py | hyjie-ts/Deep-Learning | 4cf1cc40f10aef2c3919bec9f7de11bf9eff8031 | [
"Apache-2.0"
] | null | null | null | ppdet/data/source/voc.py | hyjie-ts/Deep-Learning | 4cf1cc40f10aef2c3919bec9f7de11bf9eff8031 | [
"Apache-2.0"
] | 2 | 2021-01-25T06:02:48.000Z | 2021-11-10T10:14:25.000Z | # Copyright (c) 2019 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 appli... | 38.048035 | 80 | 0.496614 |
797a47b1bc142b45633773346b785fbc391a1231 | 4,181 | py | Python | peck/info_and_paths.py | jgbarsness/journal_mngr | 831bee79037eea3dba712c6f475e6e9db41fbb9e | [
"MIT"
] | 1 | 2020-12-14T18:35:51.000Z | 2020-12-14T18:35:51.000Z | peck/info_and_paths.py | jgbarsness/journal_mngr | 831bee79037eea3dba712c6f475e6e9db41fbb9e | [
"MIT"
] | 3 | 2020-10-05T22:58:46.000Z | 2020-12-17T21:15:26.000Z | peck/info_and_paths.py | jgbarsness/journal_mngr | 831bee79037eea3dba712c6f475e6e9db41fbb9e | [
"MIT"
] | null | null | null | from os import path
from pathlib import Path
from peck.config_parser import ConParser
# ascii coloring
END = '\033[0m'
PURPLE = '\033[35m'
CYAN = '\033[36m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
RED = '\033[91m'
# name of the directory
DIR_NAME = Path.home() / 'pck'
VERSION = 'v2.4.4'
HELP = 'usage:\nfull: \'peck [... | 39.074766 | 103 | 0.664434 |
797a4829f64f977ee848b98f4ef553a440feb001 | 1,388 | py | Python | setup.py | SaiWebApps/PySynonymsCrawler | e7adfa15ec23bac07cd79b2e5d72071b7ebdbdf7 | [
"MIT"
] | 3 | 2016-11-09T19:59:41.000Z | 2019-11-26T03:07:36.000Z | setup.py | SaiWebApps/PySynonymsCrawler | e7adfa15ec23bac07cd79b2e5d72071b7ebdbdf7 | [
"MIT"
] | 1 | 2021-04-24T03:55:52.000Z | 2021-04-24T03:55:52.000Z | setup.py | SaiWebApps/PySynonymsCrawler | e7adfa15ec23bac07cd79b2e5d72071b7ebdbdf7 | [
"MIT"
] | 1 | 2019-09-11T14:23:43.000Z | 2019-09-11T14:23:43.000Z | from setuptools import setup, find_packages
from os import path
import pypandoc
# Constants
README_FILE = 'README.md'
THIS_DIR_ABS_PATH = path.abspath(path.dirname(__file__))
README_ABS_PATH = path.join(THIS_DIR_ABS_PATH, README_FILE)
VERSION = '1.0.0'
# Load README file's contents into "readmeContents."
try:
read... | 27.76 | 86 | 0.73415 |
797a49addbbb4717bdf3dddb5a02fe6c9359314b | 1,246 | py | Python | PythonLab/project/v3/sjsrv.py | Leejieune/HelloPython3 | 040202fd2e20401bf5f9a4f1ed0a9e0455b4ff91 | [
"Apache-2.0"
] | null | null | null | PythonLab/project/v3/sjsrv.py | Leejieune/HelloPython3 | 040202fd2e20401bf5f9a4f1ed0a9e0455b4ff91 | [
"Apache-2.0"
] | null | null | null | PythonLab/project/v3/sjsrv.py | Leejieune/HelloPython3 | 040202fd2e20401bf5f9a4f1ed0a9e0455b4ff91 | [
"Apache-2.0"
] | null | null | null | class SungJukService:
sjdb=[] #성적 데이터를 저장하는 리스트
#[(no,n,k,e,m,t,a,g,r),(
#성적처리 - 총점/평균/학점 계산
def computeSungJuk(self,sj):
grd_list='가가가가가가양미우수수'
sj.tot=sj.kor+sj.eng+sj.mat
sj.avg=sj.tot/3
sj.grd=grd_list[int(sj.avg/10)]
#성적 데이터 추가
def addSungJuk(self,sj)... | 23.961538 | 59 | 0.535313 |
797a49f0e459742dd1d9926558256fe349c7e0a4 | 1,645 | py | Python | libs/python/test/test_create_attribute_value_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | libs/python/test/test_create_attribute_value_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | libs/python/test/test_create_attribute_value_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SQE API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
impor... | 29.375 | 124 | 0.681459 |
797a49fa3710861076d91be45cc6c6c9302bc836 | 1,526 | py | Python | WEEKS/CD_Sata-Structures/_MISC/algorithms/linkedlist/delete_node.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/algorithms/linkedlist/delete_node.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/algorithms/linkedlist/delete_node.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | ##-------------------------------------------------------------------
"""
Write a function to delete a node (except the tail)
in a singly linked list, given only access to that node.
Supposed the linked list is 1 -> 2 -> 3 -> 4 and
you are given the third node with value 3,
the linked list should become 1 -> 2 -> 4 af... | 23.476923 | 70 | 0.540629 |
797a4d80f512c83806ff278e33065cad04913231 | 7,953 | py | Python | libcxx/docs/conf.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | libcxx/docs/conf.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 11 | 2019-10-17T21:11:52.000Z | 2022-02-17T20:10:00.000Z | libcxx/docs/conf.py | elizabethandrews/llvm | 308498236c1c4778fdcba0bfbb556adf8aa333ea | [
"Apache-2.0"
] | 24 | 2019-10-03T11:22:11.000Z | 2022-01-25T09:59:30.000Z | # -*- coding: utf-8 -*-
#
# libc++ documentation build configuration file.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are comment... | 31.559524 | 80 | 0.708915 |
797a4e2267bdd19437e55277ef00286a3c40a304 | 35,476 | py | Python | controllers/docs.py | monotasker/Online-Critical-Pseudepigrapha | 456ef828834aeaedda8204a6107729f277063b9f | [
"W3C"
] | 1 | 2021-04-08T20:26:38.000Z | 2021-04-08T20:26:38.000Z | controllers/docs.py | OnlineCriticalPseudepigrapha/Online-Critical-Pseudepigrapha | 456ef828834aeaedda8204a6107729f277063b9f | [
"W3C"
] | 18 | 2018-05-11T17:08:48.000Z | 2018-06-29T20:15:37.000Z | controllers/docs.py | monotasker/Online-Critical-Pseudepigrapha | 456ef828834aeaedda8204a6107729f277063b9f | [
"W3C"
] | 1 | 2020-03-24T16:10:42.000Z | 2020-03-24T16:10:42.000Z | # -*- coding: utf-8 -*-
from collections import OrderedDict
from kitchen.text.converters import to_unicode
import os
from parse import Book, ElementDoesNotExist, NotAllowedManuscript
import cPickle
from plugin_utils import flatten
from pprint import pprint
import re
import traceback
if 0:
from gluon import curren... | 44.124378 | 120 | 0.539266 |
797a4ecd5fda029a47db75b6b2a37c09b6a465ab | 7,463 | py | Python | tests/test_nesting_legacy.py | agharbi6/transitions | f55ced6058353b19f58d06affa4033112999950d | [
"MIT"
] | null | null | null | tests/test_nesting_legacy.py | agharbi6/transitions | f55ced6058353b19f58d06affa4033112999950d | [
"MIT"
] | null | null | null | tests/test_nesting_legacy.py | agharbi6/transitions | f55ced6058353b19f58d06affa4033112999950d | [
"MIT"
] | null | null | null | from .test_nesting import TestNestedTransitions, TestSeparatorsBase, Stuff, default_separator, test_states
from .test_reuse import TestReuse as TestReuse, TestReuseSeparatorBase
from .test_reuse import test_states as reuse_states
from .test_enum import TestNestedStateEnums
from transitions.extensions.nesting_legacy imp... | 35.538095 | 113 | 0.652419 |
797a4ef63030ab812dfd566d4e755ed2d407bbc8 | 26,693 | py | Python | nova/tests/unit/test_fixtures.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-06-10T17:08:14.000Z | 2021-06-10T17:08:14.000Z | nova/tests/unit/test_fixtures.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/test_fixtures.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 t... | 39.959581 | 79 | 0.63822 |
797a4f460f739c1c6c47645d783de5bd703378c2 | 16,856 | py | Python | qiskit/transpiler/passes/optimization/template_matching/forward_match.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | qiskit/transpiler/passes/optimization/template_matching/forward_match.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 4 | 2020-11-27T09:34:13.000Z | 2021-04-30T21:13:41.000Z | qiskit/transpiler/passes/optimization/template_matching/forward_match.py | godspeed5/qiskit-terra | a5d87c3e4a663ab962704585fba0caef15061246 | [
"Apache-2.0"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 39.109049 | 100 | 0.60299 |
797a4fa1c093ac1182c92f170ecd83e7b7c77b16 | 1,636 | py | Python | pavo_cristatus/interaction_sequence_generators/rebuild_all_interaction_sequence_generator.py | MATTHEWFRAZER/pavo_cristatus | a4b96c0eb6c454fbe38d2092e29f63457a4ee955 | [
"MIT"
] | null | null | null | pavo_cristatus/interaction_sequence_generators/rebuild_all_interaction_sequence_generator.py | MATTHEWFRAZER/pavo_cristatus | a4b96c0eb6c454fbe38d2092e29f63457a4ee955 | [
"MIT"
] | null | null | null | pavo_cristatus/interaction_sequence_generators/rebuild_all_interaction_sequence_generator.py | MATTHEWFRAZER/pavo_cristatus | a4b96c0eb6c454fbe38d2092e29f63457a4ee955 | [
"MIT"
] | null | null | null | from pavo_cristatus.interactions.pavo_cristatus_result_monad.bindee_definition import BindeeDefinition
from pavo_cristatus.interaction_sequence_generators.utilities import get_type_check
__all__ = ["rebuild_all_interaction_sequence_generator"]
def rebuild_all_interaction_sequence_generator(annotated_project_loader_in... | 71.130435 | 103 | 0.783619 |
797a4fed2f1caadf6076ca3f8e50004e598b7958 | 46,836 | py | Python | tests/test_plugin.py | dr-bonez/lightning | fc8672061fb10508accb3ddfc51527cfc624b25a | [
"MIT"
] | null | null | null | tests/test_plugin.py | dr-bonez/lightning | fc8672061fb10508accb3ddfc51527cfc624b25a | [
"MIT"
] | null | null | null | tests/test_plugin.py | dr-bonez/lightning | fc8672061fb10508accb3ddfc51527cfc624b25a | [
"MIT"
] | null | null | null | from collections import OrderedDict
from fixtures import * # noqa: F401,F403
from flaky import flaky # noqa: F401
from hashlib import sha256
from pyln.client import RpcError, Millisatoshi
from pyln.proto import Invoice
from utils import (
DEVELOPER, only_one, sync_blockheight, TIMEOUT, wait_for, TEST_NETWORK,
... | 38.932668 | 135 | 0.661073 |
797a50ac9f3f28b9281d459904c0cd14afb560fd | 466 | py | Python | tests/test_midi_file_event.py | yokaze/crest-python | c246b16ade6fd706f0e18aae797660064bddd555 | [
"MIT"
] | null | null | null | tests/test_midi_file_event.py | yokaze/crest-python | c246b16ade6fd706f0e18aae797660064bddd555 | [
"MIT"
] | null | null | null | tests/test_midi_file_event.py | yokaze/crest-python | c246b16ade6fd706f0e18aae797660064bddd555 | [
"MIT"
] | null | null | null | #
# test_midi_file_event.py
# crest-python
#
# Copyright (C) 2017 Rue Yokaze
# Distributed under the MIT License.
#
import crest_loader
import unittest
from crest.filing.midi.track import MidiFileEvent
class TestMidiFileEvent(unittest.TestCase):
def test(self):
evt = MidiFileEvent(100, [1, 2, 3, 4... | 21.181818 | 51 | 0.678112 |
797a50fdddad8ec2e84efdccc371c4edfcd2e221 | 6,626 | py | Python | pychemy/chem_structure.py | benjiec/pychemy | 0b496b158ad48defc61a9688c91ce676e1f6a8a4 | [
"MIT"
] | 7 | 2015-04-16T21:46:50.000Z | 2020-09-20T13:49:37.000Z | pychemy/chem_structure.py | timgc/pychemy | d45450ad11c93a3e06d80f8f2bd72777b77a1272 | [
"MIT"
] | 6 | 2015-01-20T15:21:41.000Z | 2017-04-12T19:03:15.000Z | pychemy/chem_structure.py | timgc/pychemy | d45450ad11c93a3e06d80f8f2bd72777b77a1272 | [
"MIT"
] | 6 | 2015-01-15T14:36:11.000Z | 2017-07-21T13:38:17.000Z | from elements import ELEMENTS
import networkx as nx
from collections import OrderedDict
import openbabel
import matplotlib.pyplot as plt
class chem_graph():
def __init__(self, OBMol = None, graph = None, is_fragment = False, parent = None):
G = None
if OBMol:
G = chem_graph.graph_from_OBMol(OBMol)
... | 29.061404 | 100 | 0.547389 |
797a52df18858b8b4cdaf8cdda168a6fbfb0e576 | 138 | py | Python | amgut/handlers/nojs.py | adamrp/american-gut-web | 405de19be239bafe1eb44d0474483573de9d8847 | [
"BSD-3-Clause"
] | null | null | null | amgut/handlers/nojs.py | adamrp/american-gut-web | 405de19be239bafe1eb44d0474483573de9d8847 | [
"BSD-3-Clause"
] | null | null | null | amgut/handlers/nojs.py | adamrp/american-gut-web | 405de19be239bafe1eb44d0474483573de9d8847 | [
"BSD-3-Clause"
] | null | null | null | from amgut.handlers.base_handlers import BaseHandler
class NoJSHandler(BaseHandler):
def get(self):
self.render('nojs.html')
| 23 | 52 | 0.73913 |
797a5399e66ac6a19b47542d4e845cc4890a8c50 | 840 | py | Python | scripts/test/misc/test.py | diegob94/copperv | cc8225fa17683e3536ad5598ec0b99ea1a705df9 | [
"Apache-2.0"
] | null | null | null | scripts/test/misc/test.py | diegob94/copperv | cc8225fa17683e3536ad5598ec0b99ea1a705df9 | [
"Apache-2.0"
] | null | null | null | scripts/test/misc/test.py | diegob94/copperv | cc8225fa17683e3536ad5598ec0b99ea1a705df9 | [
"Apache-2.0"
] | 1 | 2021-09-08T00:51:40.000Z | 2021-09-08T00:51:40.000Z | import sys
sys.path.append('./')
from pathlib import Path
from scripts.build_tools import as_list, flatten, stringify
print(as_list('hola'))
print(as_list(lambda x: 'hola'))
print(as_list(['hola','hola1']))
print(flatten([['hola'],['hola1',[['aaa'],['bbb']]]]))
print(stringify([[Path('/home/diegob/miniconda3/envs/cop... | 60 | 344 | 0.714286 |
797a53ad7d0bb1b972cc8f5a5b7b143eee89869b | 1,547 | py | Python | samples/generated_samples/dialogflow_generated_dialogflow_v2beta1_conversations_complete_conversation_sync.py | rkdfc93/python-dialogflow | a59cff0298ef18674c0b4133ef0a6ab82e288920 | [
"Apache-2.0"
] | 171 | 2018-09-19T21:16:18.000Z | 2020-12-07T17:41:10.000Z | samples/generated_samples/dialogflow_generated_dialogflow_v2beta1_conversations_complete_conversation_sync.py | rkdfc93/python-dialogflow | a59cff0298ef18674c0b4133ef0a6ab82e288920 | [
"Apache-2.0"
] | 150 | 2018-09-25T14:04:28.000Z | 2020-12-09T21:45:43.000Z | samples/generated_samples/dialogflow_generated_dialogflow_v2beta1_conversations_complete_conversation_sync.py | rkdfc93/python-dialogflow | a59cff0298ef18674c0b4133ef0a6ab82e288920 | [
"Apache-2.0"
] | 75 | 2018-09-22T14:12:18.000Z | 2020-12-08T07:12:12.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 33.630435 | 89 | 0.774402 |
797a55e3673de3b50f12fae1ea8d2e1ecfc2cfd1 | 407 | py | Python | blizzard/spaceship_landing_strip.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | blizzard/spaceship_landing_strip.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | blizzard/spaceship_landing_strip.py | NigrumAquila/py_checkio | df437c2c3ad325d84714665000e3299a70e91f32 | [
"MIT"
] | null | null | null | def checkio(landing_map):
W,H = len(landing_map[0]),len(landing_map)
bestArea = 0
for C1 in range(W):
for C2 in range(C1,W):
for R1 in range(H):
for R2 in range(R1,H):
if all(landing_map[R][C] in "GS" for R in range(R1,R2+1) for C in range(C1,C2+1)):
... | 40.7 | 102 | 0.525799 |
797a563d3e49601cc2102d28101e97ec5ad6fbaf | 6,817 | py | Python | data/p3BR/R2/benchmark/startQiskit_Class273.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_Class273.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_Class273.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=57
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 31.560185 | 140 | 0.637377 |
797a57b5790be288f794bd39d06cf81484a2bdf5 | 9,149 | py | Python | cgmm_classifier_task.py | diningphil/CGMM-ICML2018 | c6da2ac267edae0a0326818c6b4f4a6c141a053f | [
"BSD-3-Clause"
] | 1 | 2018-05-17T03:38:42.000Z | 2018-05-17T03:38:42.000Z | cgmm_classifier_task.py | diningphil/CGMM-ICML2018 | c6da2ac267edae0a0326818c6b4f4a6c141a053f | [
"BSD-3-Clause"
] | null | null | null | cgmm_classifier_task.py | diningphil/CGMM-ICML2018 | c6da2ac267edae0a0326818c6b4f4a6c141a053f | [
"BSD-3-Clause"
] | null | null | null | import os
import torch
from cgmm_incremental_task import CGMMTask
from pydgn.experiment.util import s2c
from pydgn.static import LOSS, SCORE
from torch_geometric.data import Data
from torch_geometric.loader import DataLoader
# This works with graph classification only
class ClassifierCGMMTask(CGMMTask):
def run... | 56.475309 | 146 | 0.664991 |
797a5a364a517a7918c127b72d83460fe6d4fe15 | 12,533 | py | Python | gui/qt/utxo_list.py | cybercore-tech/Electron-Cash-SLP | 0e25e605c32799f9c1de997c9e82e1679a37eca3 | [
"MIT"
] | null | null | null | gui/qt/utxo_list.py | cybercore-tech/Electron-Cash-SLP | 0e25e605c32799f9c1de997c9e82e1679a37eca3 | [
"MIT"
] | null | null | null | gui/qt/utxo_list.py | cybercore-tech/Electron-Cash-SLP | 0e25e605c32799f9c1de997c9e82e1679a37eca3 | [
"MIT"
] | 1 | 2021-01-09T13:17:35.000Z | 2021-01-09T13:17:35.000Z | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... | 51.576132 | 186 | 0.619644 |
797a5ac7028205fc65fae98c6184f5d09c85d1e1 | 27,884 | py | Python | Python/python3_version/klampt/plan/motionplanning.py | pzr1988/Klampt | d5a334e73f1f24ba4c606e03f49915b353799a57 | [
"BSD-3-Clause"
] | 1 | 2020-07-03T20:38:20.000Z | 2020-07-03T20:38:20.000Z | Python/python3_version/klampt/plan/motionplanning.py | tcrapse/Klampt | d5a334e73f1f24ba4c606e03f49915b353799a57 | [
"BSD-3-Clause"
] | null | null | null | Python/python3_version/klampt/plan/motionplanning.py | tcrapse/Klampt | d5a334e73f1f24ba4c606e03f49915b353799a57 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
"""Python interface to C++ motion planing routines"""
from sys import version_info
if version_info >= (2, 6, 0):... | 29.506878 | 133 | 0.637068 |
797a5d7a86487d9bb4f3e1e65ad6f95b554cff15 | 33 | py | Python | billomapy/__init__.py | seibert-media/billomapy | 7b19f5bad9364e2d3a44f686f03727310abe178d | [
"Apache-2.0"
] | null | null | null | billomapy/__init__.py | seibert-media/billomapy | 7b19f5bad9364e2d3a44f686f03727310abe178d | [
"Apache-2.0"
] | null | null | null | billomapy/__init__.py | seibert-media/billomapy | 7b19f5bad9364e2d3a44f686f03727310abe178d | [
"Apache-2.0"
] | null | null | null | from .billomapy import Billomapy
| 16.5 | 32 | 0.848485 |
797a5e8b178c36e0f8fe763541b795ab4ea26da1 | 517 | py | Python | codes/admin.py | akiross/novecode | fbf43c45825cb1aae5686786a5ce538e359c48d1 | [
"MIT"
] | null | null | null | codes/admin.py | akiross/novecode | fbf43c45825cb1aae5686786a5ce538e359c48d1 | [
"MIT"
] | 1 | 2015-12-16T15:29:28.000Z | 2015-12-16T15:29:28.000Z | codes/admin.py | akiross/novecode | fbf43c45825cb1aae5686786a5ce538e359c48d1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Snippet, Source, SnippetSource, Exercise, Answer, IOTest
class SnippetInLine(admin.TabularInline):
model = SnippetSource
extra = 2
class SourceAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ('filename', 'author', 'date')}),
]
inlines = [SnippetInL... | 24.619048 | 76 | 0.767892 |
797a5edf85c44b86a4e1f2ea650300dfc15a8aa2 | 100 | py | Python | file_metadata/apps.py | megalois/back-end-portfolio | eaa7c6fdcf94801963f2fc37ceb8cd4b3656b121 | [
"MIT"
] | null | null | null | file_metadata/apps.py | megalois/back-end-portfolio | eaa7c6fdcf94801963f2fc37ceb8cd4b3656b121 | [
"MIT"
] | null | null | null | file_metadata/apps.py | megalois/back-end-portfolio | eaa7c6fdcf94801963f2fc37ceb8cd4b3656b121 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class FileMetadataConfig(AppConfig):
name = 'file_metadata'
| 16.666667 | 36 | 0.78 |
797a601dfe07c9fa320defab3a1e338cbbd22b29 | 7,417 | py | Python | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | 7 | 2021-08-17T05:38:15.000Z | 2021-12-28T13:08:14.000Z | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | null | null | null | binja_xtensa/__init__.py | zackorndorff/binja-xtensa | b2a9ef3c84ab21047e88e7fe41d9fc8fd6e4c5d4 | [
"MIT"
] | null | null | null | """
Binary Ninja Xtensa (and ESP8266) support
This package offers several features:
Xtensa (little-endian):
* correct length decoding for nearly all instructions
* correct mnemonic decoding for nearly all instructions
* fully correct disassembly for most instructions you'll see. In some places
there... | 38.630208 | 96 | 0.646488 |
797a6052a06832e5615ccbdb75f19148590f21ce | 2,532 | py | Python | src/python2/request/permission_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 7 | 2019-07-17T06:59:53.000Z | 2021-05-13T15:23:37.000Z | src/python2/permission_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | null | null | null | src/python2/permission_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 2 | 2020-06-30T13:06:59.000Z | 2021-06-03T09:47:35.000Z | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from .permission_request im... | 35.166667 | 151 | 0.64376 |
797a6052eee3c5762bf04291db0b1a20d4603f3d | 32,040 | py | Python | tests/parser/features/test_logging.py | abdullathedruid/vyper | 02b1b207f453b704cf1c491741bc85be9168a373 | [
"Apache-2.0"
] | 2 | 2022-02-08T16:17:10.000Z | 2022-03-06T11:01:46.000Z | tests/parser/features/test_logging.py | abdullathedruid/vyper | 02b1b207f453b704cf1c491741bc85be9168a373 | [
"Apache-2.0"
] | 4 | 2018-12-06T23:21:02.000Z | 2022-02-07T15:28:01.000Z | tests/parser/features/test_logging.py | charles-cooper/vyper | bbbd8618f8427d416d6751214dd560872f8848f3 | [
"Apache-2.0"
] | null | null | null | from decimal import Decimal
import eth_abi
import pytest
from vyper.exceptions import (
ArgumentException,
EventDeclarationException,
InvalidType,
NamespaceCollision,
TypeMismatch,
UndeclaredDefinition,
)
from vyper.utils import keccak256
pytestmark = pytest.mark.usefixtures("memory_mocker")
... | 26.457473 | 116 | 0.633677 |
797a60c6534744da03490139335e5812f1e07c27 | 25,036 | py | Python | auditing/db/Models.py | fumamatar/laf | e81b89aa6697234c7a905230bbfd8eb5f02d5d45 | [
"BSD-3-Clause"
] | null | null | null | auditing/db/Models.py | fumamatar/laf | e81b89aa6697234c7a905230bbfd8eb5f02d5d45 | [
"BSD-3-Clause"
] | null | null | null | auditing/db/Models.py | fumamatar/laf | e81b89aa6697234c7a905230bbfd8eb5f02d5d45 | [
"BSD-3-Clause"
] | null | null | null | from sqlalchemy import Column, DateTime, String, Integer, BigInteger, SmallInteger, Float, Boolean, ForeignKey, func, asc, desc, func, LargeBinary
from auditing.db import session, Base, engine
from sqlalchemy.dialects import postgresql, sqlite
BigIntegerType = BigInteger()
BigIntegerType = BigIntegerType.with_variant(... | 41.450331 | 239 | 0.693841 |
797a60d20f60e92e0be68ff9fd62033b06287ec9 | 39 | py | Python | pymtl3_net/ocnlib/cl/__init__.py | cornell-brg/ocn-posh | 7f8bfd800627364cfc37dc5d6a36333ee2e48c99 | [
"BSD-3-Clause"
] | 3 | 2019-06-07T13:27:06.000Z | 2019-07-16T19:00:23.000Z | pymtl3_net/ocnlib/cl/__init__.py | cornell-brg/ocn-posh | 7f8bfd800627364cfc37dc5d6a36333ee2e48c99 | [
"BSD-3-Clause"
] | 12 | 2019-07-23T02:29:31.000Z | 2019-07-25T11:07:00.000Z | pymtl3_net/ocnlib/cl/__init__.py | cornell-brg/posh-ocn | 7f8bfd800627364cfc37dc5d6a36333ee2e48c99 | [
"BSD-3-Clause"
] | null | null | null | from .BoundaryUnit import BoundaryUnit
| 19.5 | 38 | 0.871795 |
797a611e8f6625f5f5dfa4079f824527f90e2b3c | 819 | py | Python | setup.py | pkgw/pyavm | 88604e080fb79e4495d0ad1ec15bdc90fb4f5c5d | [
"MIT"
] | 9 | 2015-10-22T17:32:25.000Z | 2021-05-13T08:54:57.000Z | setup.py | pkgw/pyavm | 88604e080fb79e4495d0ad1ec15bdc90fb4f5c5d | [
"MIT"
] | 14 | 2015-12-27T17:58:15.000Z | 2021-11-05T17:22:58.000Z | setup.py | pkgw/pyavm | 88604e080fb79e4495d0ad1ec15bdc90fb4f5c5d | [
"MIT"
] | 5 | 2015-08-05T13:31:14.000Z | 2020-10-07T21:05:11.000Z | #!/usr/bin/env python
from setuptools import setup
from pyavm import __version__
with open('README.rst') as f:
LONG_DESCRIPTION = f.read()
setup(name='PyAVM',
version=__version__,
description='Simple pure-python AVM meta-data handling',
author='Thomas Robitaille',
author_email='thomas.ro... | 29.25 | 93 | 0.628816 |
797a61782af315df24ba345b88df2482b549ad94 | 284 | py | Python | scripts/make_dname2.py | xulesc/mc_mcpsc | 4ee25377e2f2a256809192dd5fecf5e071a110b6 | [
"MIT"
] | null | null | null | scripts/make_dname2.py | xulesc/mc_mcpsc | 4ee25377e2f2a256809192dd5fecf5e071a110b6 | [
"MIT"
] | null | null | null | scripts/make_dname2.py | xulesc/mc_mcpsc | 4ee25377e2f2a256809192dd5fecf5e071a110b6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
INFILE = 'pdb40d_j.fa'
OUTFILE = 'dname2'
of = open(OUTFILE,'w')
for line in open(INFILE,'r'):
if line[0] != '>':
continue
data = line.replace('>','').replace('\n','').split(' ')
# print data
of.write('%s\t%s\n' %(data[0][1:5], data[1][0]))
of.close()
| 18.933333 | 57 | 0.556338 |
797a6320d5790eada8d196132a9897ec44d148cd | 252 | py | Python | digitalocean/Account.py | SuleAlOthman/digitalocean | 005e18ebdc4c4d8175641d60af97640531b190a1 | [
"MIT"
] | 2 | 2021-02-12T16:09:06.000Z | 2021-11-18T14:12:32.000Z | digitalocean/Account.py | sulealothman/digitalocean | 005e18ebdc4c4d8175641d60af97640531b190a1 | [
"MIT"
] | null | null | null | digitalocean/Account.py | sulealothman/digitalocean | 005e18ebdc4c4d8175641d60af97640531b190a1 | [
"MIT"
] | null | null | null | from .reqmethods import Req, Arrange
class Account(Req, Arrange):
slug = 'account'
def __init__(self, token):
self.setToken(token)
def account(self):
data = self.get(self.slug)
if 'id' in data:
return data
return self.arrangeData(data)
| 19.384615 | 36 | 0.706349 |
797a656754e494f78c37f41b19ac5457a7dffc7c | 26,820 | py | Python | pcdsdevices/state.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/state.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/state.py | vespos/pcdsdevices | 7c4728df62ea58b6491d1cb36bb39d27d6dd9fca | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Module to define positioners that move between discrete named states.
"""
from __future__ import annotations
import copy
import functools
import logging
from typing import ClassVar, List, Optional
from ophyd.device import Component as Cpt
from ophyd.device import Device, required_for_connection
from ophyd.positio... | 35.19685 | 79 | 0.620917 |
797a669e6d74151e0b791a945a7b463636371d00 | 9,350 | py | Python | code/cifar_net.py | seba-1511/specialists | 9888e639707142db80aafe6ae7bf25f572d34505 | [
"Apache-2.0"
] | 1 | 2016-05-31T07:54:31.000Z | 2016-05-31T07:54:31.000Z | code/cifar_net.py | seba-1511/specialists | 9888e639707142db80aafe6ae7bf25f572d34505 | [
"Apache-2.0"
] | null | null | null | code/cifar_net.py | seba-1511/specialists | 9888e639707142db80aafe6ae7bf25f572d34505 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from neon.layers import (
Affine,
Conv,
Pooling,
Linear,
Dropout,
BatchNorm,
Activation,
Convolution,
Bias,
)
from neon.models import Model
from neon.optimizers import GradientDescentMomentum, Schedule, MultiOptimizer
from neon.layers im... | 41.008772 | 145 | 0.643957 |
797a66ed64e69b7cceac411aa7c191a29795fa30 | 11,797 | py | Python | wechatpy/work/client/api/tag.py | lau-jay/wechatpy | 974fba6649252f7bf9adf83c75decd5d485f311a | [
"MIT"
] | 821 | 2016-09-16T03:05:37.000Z | 2022-03-30T07:18:06.000Z | wechatpy/work/client/api/tag.py | lau-jay/wechatpy | 974fba6649252f7bf9adf83c75decd5d485f311a | [
"MIT"
] | 160 | 2017-08-28T03:32:56.000Z | 2022-03-31T09:16:10.000Z | wechatpy/work/client/api/tag.py | lau-jay/wechatpy | 974fba6649252f7bf9adf83c75decd5d485f311a | [
"MIT"
] | 168 | 2016-05-30T16:40:07.000Z | 2022-03-25T15:17:18.000Z | # -*- coding: utf-8 -*-
from typing import Optional, List, Dict, Any
from wechatpy.client.api.base import BaseWeChatAPI
class WeChatTag(BaseWeChatAPI):
"""
标签管理
https://work.weixin.qq.com/api/doc#90000/90135/90209
"""
@staticmethod
def _validate_tag_id(tag_id):
if tag_id < 0:
... | 32.057065 | 107 | 0.368738 |
797a672c8cf99ed4ccc35b43fccfc6dc009f0241 | 10,748 | py | Python | nni/retiarii/nn/pytorch/nn.py | tczhangzhi/nni | 6f272049af26cfd5c50aef019dc66b8682be92de | [
"MIT"
] | 2 | 2021-09-14T21:29:09.000Z | 2021-11-17T09:52:40.000Z | nni/retiarii/nn/pytorch/nn.py | LoganLxb/nni | 85c0d841a6a15d64f32d8237e29616227fd03425 | [
"MIT"
] | null | null | null | nni/retiarii/nn/pytorch/nn.py | LoganLxb/nni | 85c0d841a6a15d64f32d8237e29616227fd03425 | [
"MIT"
] | 1 | 2021-09-14T21:29:11.000Z | 2021-09-14T21:29:11.000Z | import logging
from typing import Any, List
import torch
import torch.nn as nn
from ...utils import add_record, blackbox_module, uid, version_larger_equal
_logger = logging.getLogger(__name__)
# NOTE: support pytorch version >= 1.5.0
__all__ = [
'LayerChoice', 'InputChoice', 'Placeholder',
'Module', 'Seque... | 41.984375 | 113 | 0.75642 |
797a6762d2e3b03c3b6250ba6f76dcf7c91c5bc5 | 206 | py | Python | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 1 | 2021-08-24T12:11:34.000Z | 2021-08-24T12:11:34.000Z | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | null | null | null | colors.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 2 | 2022-02-02T23:49:52.000Z | 2022-03-13T21:05:15.000Z | class colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
MAGENTA = '\033[1;35m'
CYAN = '\033[1;36m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
| 20.6 | 26 | 0.509709 |
797a67ccbd3ab91ee6dd4b5a10704c48ea8a83ce | 1,321 | py | Python | tests/test_model.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | 9 | 2020-01-21T13:34:49.000Z | 2022-03-18T02:34:30.000Z | tests/test_model.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | 6 | 2020-05-02T07:03:26.000Z | 2022-03-11T23:48:38.000Z | tests/test_model.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | 3 | 2019-08-03T00:06:19.000Z | 2020-05-07T00:37:19.000Z | from codeprep.preprocess.placeholders import placeholders
from fastai.text import Vocab
from langmodels.model import _create_term_vocab
cpe = placeholders['compound_word_end']
def test_simple_vocab():
input_vocab = Vocab(['a', f'b{cpe}', 'c', 'd', f'e{cpe}'])
actual_vocab, actual_first_non_term_index = _cre... | 28.106383 | 79 | 0.722937 |
797a67ef51c3e6d683bd29af5ec0dbd663034633 | 3,336 | py | Python | src/deploy/auto_common/ipmi.py | kamlesh6808/JetPack | 54871b307cc7385939dd89f9bb5e9ed9bb3036fe | [
"Apache-2.0"
] | 31 | 2017-11-14T02:21:18.000Z | 2022-02-16T07:28:54.000Z | src/deploy/auto_common/ipmi.py | kamlesh6808/JetPack | 54871b307cc7385939dd89f9bb5e9ed9bb3036fe | [
"Apache-2.0"
] | 324 | 2018-01-10T16:52:25.000Z | 2021-09-23T19:02:50.000Z | src/deploy/auto_common/ipmi.py | kamlesh6808/JetPack | 54871b307cc7385939dd89f9bb5e9ed9bb3036fe | [
"Apache-2.0"
] | 215 | 2017-11-01T15:50:16.000Z | 2022-02-16T07:28:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2021 Dell Inc. or its subsidiaries.
#
# 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 ... | 33.69697 | 75 | 0.602518 |
797a681d2683a448a69212fa74e2dcf9d1716f16 | 2,791 | py | Python | ISR/models/discriminator.py | AlexBlack2202/image-super-resolution | 637ff0e2eec091545f89e24f6430b9a31c8cae00 | [
"Apache-2.0"
] | 9 | 2019-08-09T17:42:22.000Z | 2021-10-01T17:39:18.000Z | ISR/models/discriminator.py | AlexBlack2202/image-super-resolution | 637ff0e2eec091545f89e24f6430b9a31c8cae00 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:17:19.000Z | 2022-02-10T06:21:29.000Z | ISR/models/discriminator.py | AlexBlack2202/image-super-resolution | 637ff0e2eec091545f89e24f6430b9a31c8cae00 | [
"Apache-2.0"
] | 7 | 2019-11-20T03:58:27.000Z | 2020-05-29T22:15:21.000Z | from keras.layers import concatenate, Flatten, Input, Activation, Dense, Conv2D, BatchNormalization
from keras.layers.advanced_activations import LeakyReLU
from keras.models import Model
from keras.optimizers import Adam
class Discriminator:
"""
Implementation of the discriminator network for the adversarial
... | 37.716216 | 99 | 0.621641 |
797a6826eb04a17968e223f107506aa2a16e9b99 | 22,870 | py | Python | innovaccer/lib/python3.6/site-packages/bs4/__init__.py | abhi98khandelwal/Next-episode-date | 3eb37c3fef0a59d2e6e8da02b14d249a23160711 | [
"MIT"
] | 16 | 2019-05-06T10:19:45.000Z | 2021-08-14T15:48:31.000Z | innovaccer/lib/python3.6/site-packages/bs4/__init__.py | abhi98khandelwal/Next-episode-date | 3eb37c3fef0a59d2e6e8da02b14d249a23160711 | [
"MIT"
] | 28 | 2020-10-09T10:50:49.000Z | 2022-01-13T01:34:33.000Z | innovaccer/lib/python3.6/site-packages/bs4/__init__.py | abhi98khandelwal/Next-episode-date | 3eb37c3fef0a59d2e6e8da02b14d249a23160711 | [
"MIT"
] | 10 | 2020-01-07T01:51:21.000Z | 2022-03-22T08:13:25.000Z | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides methods and Pythonic idioms that make it easy to navigate,
search,... | 39.094017 | 536 | 0.596939 |
797a69338479a750be2ba94c4488ed05de3446cd | 28 | py | Python | TEST3D/GUI/0011303_page_solver/cleanup.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 31 | 2015-04-01T15:59:36.000Z | 2022-03-18T20:21:47.000Z | TEST3D/GUI/0011304_page_solver/cleanup.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 3 | 2015-02-06T19:30:24.000Z | 2017-05-25T14:14:31.000Z | TEST3D/GUI/0011304_page_solver/cleanup.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 7 | 2015-01-23T15:19:22.000Z | 2021-06-09T09:03:59.000Z | removefile('solverpage.log') | 28 | 28 | 0.821429 |
797a6a562cf78c512e023e6e64ffbc83851adced | 574 | py | Python | tests/tf/image_factory.py | PhillHenry/MyTF | 978e38ab0948a8ae780b96a8bcd54bbcdd99f988 | [
"MIT"
] | null | null | null | tests/tf/image_factory.py | PhillHenry/MyTF | 978e38ab0948a8ae780b96a8bcd54bbcdd99f988 | [
"MIT"
] | 3 | 2020-09-26T00:06:26.000Z | 2022-02-10T00:15:44.000Z | tests/tf/image_factory.py | PhillHenry/MyTF | 978e38ab0948a8ae780b96a8bcd54bbcdd99f988 | [
"MIT"
] | null | null | null | from data import training
from tf import anns
class ImageClassifierFactory:
n_samples = 10
i = 42
j = 101
stride = 2
ksize = 2
n_pts = int((i * j) / 20)
class_ratio = int(n_samples / 20)
test_data = training.create_data(n_samples, j, i, class_ratio, n_pts, n_pts * 0.0001)
traini... | 24.956522 | 102 | 0.681185 |
797a6a67478fa7d4bd0778193ce0c9a7af54a006 | 4,034 | py | Python | balloon_learning_environment/env/balloon/altitude_safety.py | taodav/balloon-learning-environment | 4beb45f52ab7127a4c051df25894738420e8e691 | [
"Apache-2.0"
] | null | null | null | balloon_learning_environment/env/balloon/altitude_safety.py | taodav/balloon-learning-environment | 4beb45f52ab7127a4c051df25894738420e8e691 | [
"Apache-2.0"
] | null | null | null | balloon_learning_environment/env/balloon/altitude_safety.py | taodav/balloon-learning-environment | 4beb45f52ab7127a4c051df25894738420e8e691 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Balloon Learning Environment 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 require... | 36.017857 | 77 | 0.742687 |
797a6ab06dcd7eeca6b5e0d365f85c6f42e4995e | 2,917 | py | Python | src/cart/cart.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/cart/cart.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/cart/cart.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | from decimal import Decimal
from django.conf import settings
from course.models import Course
from coupons.models import Coupon
class Cart(object):
def __init__(self, request):
"""
Initialize the cart.
"""
self.session = request.session
cart = self.session.get(settings.CART... | 30.072165 | 84 | 0.580734 |
797a6af2303cc28025156a667bd507a8394aa1cc | 8,046 | py | Python | tests/edalize_common.py | rasmus-madsen/edalize | 5da227a8d2438b337bebad76fe1a2878a8f911b5 | [
"BSD-2-Clause"
] | null | null | null | tests/edalize_common.py | rasmus-madsen/edalize | 5da227a8d2438b337bebad76fe1a2878a8f911b5 | [
"BSD-2-Clause"
] | null | null | null | tests/edalize_common.py | rasmus-madsen/edalize | 5da227a8d2438b337bebad76fe1a2878a8f911b5 | [
"BSD-2-Clause"
] | null | null | null | from collections import OrderedDict
import os.path
import shutil
import pytest
from edalize import get_edatool
tests_dir = os.path.dirname(__file__)
class TestFixture:
'''A fixture that makes an edalize backend with work_root directory
Create this object using the make_edalize_test factory fixture. This ... | 36.080717 | 84 | 0.597937 |
797a6c3c9c706826d731a8f03f2abc737ccf24e8 | 13,668 | py | Python | lib_pypy/pypy_tools/build_cffi_imports.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | lib_pypy/pypy_tools/build_cffi_imports.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | lib_pypy/pypy_tools/build_cffi_imports.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from __future__ import print_function
import sys, shutil, os, tempfile, hashlib, collections
import sysconfig
from os.path import join
try:
import _multiprocessing
except ImportError:
# The only function we need from multiprocessing is cpu_count(), which is
# written in the pure Python part of multiprocess... | 41.045045 | 95 | 0.597893 |
797a6e37357b7e237d3b01135df7171e27a9cb1a | 6,914 | py | Python | utilities.py | guanrongLi/GNN_graph_classification | 227e0128fea0d8da9dad9bae32a95b553530c763 | [
"MIT"
] | null | null | null | utilities.py | guanrongLi/GNN_graph_classification | 227e0128fea0d8da9dad9bae32a95b553530c763 | [
"MIT"
] | null | null | null | utilities.py | guanrongLi/GNN_graph_classification | 227e0128fea0d8da9dad9bae32a95b553530c763 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# This file contains several utility functions for reproducing results
# of the WWL paper
#
# October 2019, M. Togninalli
# -----------------------------------------------------------------------------
import numpy as np
import os
from sci... | 35.823834 | 113 | 0.621927 |
797a6e397f98806aed19b4a0704abb2c2dc6991d | 404 | py | Python | tests/test_components/test_amplifier/test_amplifier_init.py | fronzbot/python-rfdesigner | 3e78722f030efc327a68945b6a09d7cdbf42734d | [
"Apache-2.0"
] | 1 | 2022-01-28T17:50:08.000Z | 2022-01-28T17:50:08.000Z | tests/test_components/test_amplifier/test_amplifier_init.py | fronzbot/python-rfdesigner | 3e78722f030efc327a68945b6a09d7cdbf42734d | [
"Apache-2.0"
] | 3 | 2020-06-02T17:23:12.000Z | 2020-06-02T22:29:04.000Z | tests/test_components/test_amplifier/test_amplifier_init.py | fronzbot/python-rfdesigner | 3e78722f030efc327a68945b6a09d7cdbf42734d | [
"Apache-2.0"
] | null | null | null | """Test class for the amplifier."""
import math
import unittest
from rfdesigner.components.amplifier import Amplifier
class TestAmplifier(unittest.TestCase):
"""Test the Amplifier class."""
def test_bandwidth_default(self):
"""Test the default bandwidth properties."""
amp = Amplifier()
... | 25.25 | 53 | 0.69802 |
797a6e79239c2f174db1d65b2e284e99fc59768a | 2,221 | py | Python | attacut/models/__init__.py | huak95/attacut | 100333931023cd009daeddec0cba4cdfce3d0b68 | [
"MIT"
] | 54 | 2019-08-28T20:44:02.000Z | 2022-03-10T08:58:35.000Z | attacut/models/__init__.py | huak95/attacut | 100333931023cd009daeddec0cba4cdfce3d0b68 | [
"MIT"
] | 23 | 2019-08-29T06:08:48.000Z | 2021-08-08T18:30:01.000Z | attacut/models/__init__.py | huak95/attacut | 100333931023cd009daeddec0cba4cdfce3d0b68 | [
"MIT"
] | 15 | 2019-08-30T02:59:56.000Z | 2022-03-06T04:27:36.000Z | # -*- coding: utf-8 -*-
import importlib
import re
import torch
import torch.nn as nn
import attacut
from attacut import logger
log = logger.get_logger(__name__)
def get_device():
if torch.cuda.is_available():
return "cuda"
else:
return "cpu"
class ConvolutionBatchNorm(nn.Module):
def... | 24.406593 | 77 | 0.604232 |
797a6f73ec2902be5d2a2a713da8baa0218bdb12 | 2,131 | py | Python | lisc/data/utils.py | ryanhammonds/lisc | 56714291855164c8059486da44d8e239e5e920d6 | [
"Apache-2.0"
] | 1 | 2020-05-11T18:36:16.000Z | 2020-05-11T18:36:16.000Z | lisc/data/utils.py | ryanhammonds/lisc | 56714291855164c8059486da44d8e239e5e920d6 | [
"Apache-2.0"
] | null | null | null | lisc/data/utils.py | ryanhammonds/lisc | 56714291855164c8059486da44d8e239e5e920d6 | [
"Apache-2.0"
] | null | null | null | """Utilities for data management and data object for LISC."""
from collections import Counter
from nltk import word_tokenize
from nltk.corpus import stopwords
###################################################################################################
##########################################################... | 20.892157 | 99 | 0.546222 |
797a7035e2388fd10b6474440a0b7fb7e2fdde24 | 29 | py | Python | login.py | mhjmei/test15 | 1d6dcf0ed4b4849bd6bd82a33530d278cf990d63 | [
"MIT"
] | null | null | null | login.py | mhjmei/test15 | 1d6dcf0ed4b4849bd6bd82a33530d278cf990d63 | [
"MIT"
] | null | null | null | login.py | mhjmei/test15 | 1d6dcf0ed4b4849bd6bd82a33530d278cf990d63 | [
"MIT"
] | null | null | null | zs modify the file
a=1
b=10
| 5.8 | 18 | 0.689655 |
797a72a10666b8be91f520cb75375e946d509749 | 65 | py | Python | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 6 | 2018-06-09T18:54:37.000Z | 2020-09-24T12:38:46.000Z | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 1 | 2020-05-28T17:41:44.000Z | 2020-07-03T13:17:47.000Z | sksound/tests/__init__.py | DominicD-823543/scikit-sound | be0429a1ebe98efc2bfc55bcaa0966421c937c0c | [
"BSD-3-Clause"
] | 3 | 2019-09-23T18:24:17.000Z | 2021-04-06T16:36:23.000Z | import sys
import os
sys.path.insert(0, os.path.abspath('..'))
| 10.833333 | 41 | 0.676923 |
797a732711cbbeeae85812f02d96164e4c90d1b2 | 422 | py | Python | questioner/demo.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | 9 | 2019-02-26T08:09:18.000Z | 2020-05-15T21:14:36.000Z | questioner/demo.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | 1 | 2021-11-15T17:48:18.000Z | 2021-11-15T17:48:18.000Z | questioner/demo.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | null | null | null | from .cli import Cli
def demo():
with Cli() as c:
c.yes_or_no('Are you hurt')
c.choose_many(
'What symptoms do you have?',
['pain', 'nausea', 'anxiety'],
)
c.give_an_int(
'How would you rate this experience (1-5)', 1, 5
)
c.cho... | 19.181818 | 74 | 0.504739 |
797a742aedabf8c46ef2d1ea9c02f1e6cf77a1ba | 903 | py | Python | examples/optimization.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | null | null | null | examples/optimization.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | 5 | 2020-09-26T01:27:24.000Z | 2022-02-10T02:13:49.000Z | examples/optimization.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import strawberryfields as sf
from strawberryfields.ops import *
import tensorflow as tf
# initialize engine and program objects
eng = sf.Engine(backend="tf", backend_options={"cutoff_dim": 7})
circuit = sf.Program(1)
alpha = tf.Variable(0.1)
with circuit.context as q:
Dgate(alpha) | q[0]
r... | 29.129032 | 64 | 0.743079 |
797a7432644fd84bcb1607435d8367129f2f2700 | 3,092 | py | Python | sdks/python/apache_beam/runners/direct/util.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | 2 | 2018-07-27T08:48:24.000Z | 2018-10-22T06:31:04.000Z | sdks/python/apache_beam/runners/direct/util.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | 2 | 2018-05-21T10:35:40.000Z | 2018-05-21T10:46:10.000Z | sdks/python/apache_beam/runners/direct/util.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 40.684211 | 78 | 0.731889 |
797a74f1ac31de719bf2d5b76d546d2462cfa7ea | 1,500 | py | Python | greatbigcrane/preferences/forms.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | 3 | 2015-11-19T21:35:22.000Z | 2016-07-17T18:07:07.000Z | greatbigcrane/preferences/forms.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | null | null | null | greatbigcrane/preferences/forms.py | pnomolos/greatbigcrane | db0763706e1e8ca1f2bd769aa79c99681f1a967e | [
"Apache-2.0"
] | null | null | null | """
Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm
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 agre... | 41.666667 | 78 | 0.722667 |
797a757cecad3988c2c42590f7db5986d17a5a7c | 18,450 | py | Python | catacycle/_version.py | brettrhenderson/Catacycle | e8bb7f754ec9532a19b65bc3d9f53271d72bcfa6 | [
"MIT"
] | 1 | 2019-11-07T09:37:46.000Z | 2019-11-07T09:37:46.000Z | catacycle/_version.py | brettrhenderson/Catacycle | e8bb7f754ec9532a19b65bc3d9f53271d72bcfa6 | [
"MIT"
] | 21 | 2020-06-11T21:45:53.000Z | 2021-07-12T21:00:20.000Z | catacycle/_version.py | brettrhenderson/Catacycle | e8bb7f754ec9532a19b65bc3d9f53271d72bcfa6 | [
"MIT"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.412668 | 79 | 0.584553 |
797a75b67f08fe812b7d2155a20d4ff6325c35f6 | 13,656 | py | Python | python/GafferTest/NumericPlugTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/NumericPlugTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/NumericPlugTest.py | goddardl/gaffer | be7fca3a70d3cafab3c1ae800b4548cd248f80a1 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | 27.476861 | 86 | 0.658392 |
797a76d34a774d4a6f4332961afa90210d2f666b | 3,658 | py | Python | code/preprocessing/prepro_impresso.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | null | null | null | code/preprocessing/prepro_impresso.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | 2 | 2021-04-20T13:30:09.000Z | 2021-05-03T14:24:06.000Z | code/preprocessing/prepro_impresso.py | EMBEDDIA/multilingual_entity_linking | 9042259dd72ae85d94a460a981e9716df4eac203 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import preprocessing.util as util
def process_wiki(in_filepath, out_filepath, language):
# _, wiki_id_name_map = util.load_wiki_name_id_map(lowercase=False)
#_, wiki_id_name_map = util.entity_name_id_map_from_dump()
entityNameIdMap = util.EntityNameIdMap()
entityNameIdMap.init... | 52.257143 | 179 | 0.615637 |
797a76dda2c0f77f629f23906744dee88e34365d | 7,071 | py | Python | tests/sentry/web/frontend/tests.py | jaysoffian/sentry | 80b4d3d89b8a51a0573d1aca9243255b34f0a852 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/web/frontend/tests.py | jaysoffian/sentry | 80b4d3d89b8a51a0573d1aca9243255b34f0a852 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/web/frontend/tests.py | jaysoffian/sentry | 80b4d3d89b8a51a0573d1aca9243255b34f0a852 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from exam import fixture
from sentry.constants import MEMBER_USER
from sentry.models import OrganizationMember, User
from sentry.testutils import TestCase
class EnvStatusTest(TestCase):
@fixture
def ... | 31.013158 | 136 | 0.661575 |
797a7708f57c65ec59032da0918f0ff2ca883413 | 5,814 | py | Python | pdm/models/markers.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | 1 | 2022-03-02T19:43:46.000Z | 2022-03-02T19:43:46.000Z | pdm/models/markers.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | 1 | 2022-03-20T07:36:27.000Z | 2022-03-20T07:36:27.000Z | pdm/models/markers.py | houbie/pdm | 0a3f1733d440a5957d7e9685db9a5b6591a0c677 | [
"MIT"
] | null | null | null | import copy
import itertools
import operator
from functools import reduce
from typing import Any, List, Optional, Set, Tuple, Union
from pip._vendor.packaging.markers import Marker as PackageMarker
from pdm.models.specifiers import PySpecSet
from pdm.utils import join_list_with
class Marker(PackageMarker):
"""A... | 35.668712 | 88 | 0.565015 |
797a7783569631b4c06867ec6189bd213636bc00 | 34,498 | py | Python | pygsheets/worksheet.py | endast/pygsheets | a86599a0457903934f0795994996e16959e2a556 | [
"MIT"
] | 1 | 2021-07-06T23:38:04.000Z | 2021-07-06T23:38:04.000Z | pygsheets/worksheet.py | endast/pygsheets | a86599a0457903934f0795994996e16959e2a556 | [
"MIT"
] | null | null | null | pygsheets/worksheet.py | endast/pygsheets | a86599a0457903934f0795994996e16959e2a556 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-.
"""
pygsheets.worksheet
~~~~~~~~~~~~~~~~~~~
This module contains worksheet model
"""
import datetime
import re
from .cell import Cell
from .datarange import DataRange
from .exceptions import (IncorrectCellLabel, CellNotFound, InvalidArgumentValue, RangeNotFound)
from .utils import numerici... | 39.652874 | 120 | 0.577744 |
797a779d3088ede11d4d4ea71d290aa458076cbc | 2,437 | py | Python | snoop/queues.py | hoover/snoop | bd49b081418a8a01a1e469ab17759a4c5b20d850 | [
"MIT"
] | 5 | 2017-01-03T00:52:03.000Z | 2019-10-27T03:32:35.000Z | snoop/queues.py | hoover/snoop | bd49b081418a8a01a1e469ab17759a4c5b20d850 | [
"MIT"
] | 25 | 2016-08-21T11:26:44.000Z | 2018-03-13T12:19:20.000Z | snoop/queues.py | hoover/snoop | bd49b081418a8a01a1e469ab17759a4c5b20d850 | [
"MIT"
] | 6 | 2016-09-27T13:03:45.000Z | 2019-10-27T03:32:30.000Z | from contextlib import contextmanager
from django.db import transaction, IntegrityError
from . import models
def put(queue, data, verbose=False):
try:
models.Job.objects.create(queue=queue, data=data)
except IntegrityError:
if verbose: print('job already exists, skipping:', queue, data)
def it... | 26.78022 | 74 | 0.483381 |
797a780dd124ec6070cd40ae1e3dd1abb8e7f393 | 33,759 | py | Python | livesettings/values.py | trydesignlab/django-livesettings3 | b6e85df05eaceb797c3aa86c2b4f38e2e4bc1ec1 | [
"BSD-3-Clause"
] | 14 | 2016-02-04T09:57:04.000Z | 2021-09-28T14:21:51.000Z | livesettings/values.py | trydesignlab/django-livesettings3 | b6e85df05eaceb797c3aa86c2b4f38e2e4bc1ec1 | [
"BSD-3-Clause"
] | 9 | 2016-02-09T08:33:27.000Z | 2022-03-23T05:24:13.000Z | livesettings/values.py | trydesignlab/django-livesettings3 | b6e85df05eaceb797c3aa86c2b4f38e2e4bc1ec1 | [
"BSD-3-Clause"
] | 15 | 2016-08-17T10:37:50.000Z | 2022-03-23T04:47:13.000Z | """Taken and modified from the dbsettings project.
http://code.google.com/p/django-values/
"""
from decimal import Decimal
import os
from livesettings.forms import LocalizedMultipleChoiceField, LocalizedChoiceField
from livesettings.widgets import ImageInput
try:
from collections import OrderedDict as SortedDict... | 34.273096 | 185 | 0.594923 |
797a7937c61fec1348619e747f23525354cce433 | 3,366 | py | Python | examples/prune_tune/src/mask_sequence_generator.py | ishine/neurst | 2ba322393fcfed4261b33f4a657e12bbe321baaa | [
"Apache-2.0"
] | 208 | 2020-11-12T03:56:41.000Z | 2022-03-27T07:01:27.000Z | examples/prune_tune/src/mask_sequence_generator.py | ishine/neurst | 2ba322393fcfed4261b33f4a657e12bbe321baaa | [
"Apache-2.0"
] | 16 | 2021-02-20T07:57:03.000Z | 2022-01-27T07:36:31.000Z | examples/prune_tune/src/mask_sequence_generator.py | ishine/neurst | 2ba322393fcfed4261b33f4a657e12bbe321baaa | [
"Apache-2.0"
] | 33 | 2020-11-12T04:44:50.000Z | 2022-03-23T09:22:29.000Z | # Copyright 2020 ByteDance Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 39.6 | 95 | 0.683304 |
797a7957ee1582a9f764fcfd230393974bfa5c48 | 5,210 | py | Python | examples/elf_header_parser.py | Valmarelox/auto_struct | ec06fc426d468d4d01f300add3081df9eda87f41 | [
"MIT"
] | 7 | 2020-09-03T20:54:13.000Z | 2022-03-09T01:21:07.000Z | examples/elf_header_parser.py | Valmarelox/auto_struct | ec06fc426d468d4d01f300add3081df9eda87f41 | [
"MIT"
] | null | null | null | examples/elf_header_parser.py | Valmarelox/auto_struct | ec06fc426d468d4d01f300add3081df9eda87f41 | [
"MIT"
] | null | null | null | from itertools import count
from mmap import mmap, ACCESS_READ
from auto_struct import *
from dataclasses import dataclass
class ElfMagic(Array(uint8_t, 4)):
def __init__(self, *values):
super(ElfMagic, self).__init__(*values)
assert self == b'\x7fELF', 'Wrong elf magic {0}'.format(values)
de... | 23.258929 | 76 | 0.641651 |
797a798d4263914840182a0e3dacbe016c39aa3f | 361 | py | Python | rxrx/utils.py | raijinspecial/rxrx1-utils | 3a3523b675c15737ad9bd2dbc19541164eb7997d | [
"Apache-2.0"
] | 44 | 2019-06-28T07:50:53.000Z | 2022-03-22T22:59:30.000Z | rxrx/utils.py | raijinspecial/rxrx1-utils | 3a3523b675c15737ad9bd2dbc19541164eb7997d | [
"Apache-2.0"
] | 10 | 2019-06-29T07:24:56.000Z | 2022-02-10T00:18:24.000Z | rxrx/utils.py | raijinspecial/rxrx1-utils | 3a3523b675c15737ad9bd2dbc19541164eb7997d | [
"Apache-2.0"
] | 40 | 2019-06-27T20:34:10.000Z | 2021-09-12T16:45:01.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
def listlike(v):
return isinstance(v, (np.ndarray, list, tuple))
def wrap(v):
if listlike(v):
return v
else:
return [v]
def select_keys(dictionary, keys):
... | 18.05 | 51 | 0.698061 |
797a7a1e24ef1becffed02ae5fea3428ea517d64 | 501 | py | Python | week_1/tests/lab4_p5.py | brown-ccv/workshop-python-2020 | e522527a077f68c4a0b11da9eb615a9f57d21b6d | [
"MIT"
] | 2 | 2020-11-20T07:43:40.000Z | 2021-05-14T14:40:41.000Z | week_1/tests/lab4_p5.py | brown-ccv/workshop-python-2020 | e522527a077f68c4a0b11da9eb615a9f57d21b6d | [
"MIT"
] | null | null | null | week_1/tests/lab4_p5.py | brown-ccv/workshop-python-2020 | e522527a077f68c4a0b11da9eb615a9f57d21b6d | [
"MIT"
] | 2 | 2020-06-18T20:35:40.000Z | 2020-09-27T02:54:31.000Z | test = {
'name': '4.5',
'suites': [
{
'cases': [
{
'code': r"""
>>> # It looks like you don't have a variable
>>> # named check_juan_bool. Maybe there's a typo?
>>> 'check_juan_bool' in vars()
True
"""
},
{
'code... | 20.875 | 60 | 0.389222 |
797a7a9a215f700b21c753ba9c3a2e3cb0394cf9 | 2,630 | py | Python | tests/nightly/gpu/test_transresnet_multimodal.py | takatoy/ParlAI | 58aa4e0bf068b6bdd28b705da22b7a0269e32714 | [
"MIT"
] | 1 | 2019-07-23T22:56:45.000Z | 2019-07-23T22:56:45.000Z | tests/nightly/gpu/test_transresnet_multimodal.py | takatoy/ParlAI | 58aa4e0bf068b6bdd28b705da22b7a0269e32714 | [
"MIT"
] | null | null | null | tests/nightly/gpu/test_transresnet_multimodal.py | takatoy/ParlAI | 58aa4e0bf068b6bdd28b705da22b7a0269e32714 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Test for Transresnet Multimodal Pretrained Model.
"""
import unittest
import parlai.scripts.display_data as display_d... | 27.978723 | 83 | 0.554373 |
797a7b52d131282ed27f89ec6224571920691a98 | 2,010 | py | Python | Table Structure Recognition/main.py | infinity73/CascadeTabNet | 5f7d0cc3a7db8287c7313c26bb068d056811587c | [
"MIT"
] | null | null | null | Table Structure Recognition/main.py | infinity73/CascadeTabNet | 5f7d0cc3a7db8287c7313c26bb068d056811587c | [
"MIT"
] | null | null | null | Table Structure Recognition/main.py | infinity73/CascadeTabNet | 5f7d0cc3a7db8287c7313c26bb068d056811587c | [
"MIT"
] | null | null | null | from border import border
from mmdet.apis import inference_detector, show_result, init_detector
import cv2
from Functions.blessFunc import borderless
import lxml.etree as etree
import glob
import matplotlib.pyplot as plt
############ To Do ############
image_path = '/content/CascadeTabNet/Demo/images/*.png'
... | 32.419355 | 85 | 0.586567 |
797a7b7292656ad7d3654150c3c1934731065b16 | 6,599 | py | Python | test_jhmdb.py | Yuexiaoxi10/Key-Frame-Proposal-Network-for-Efficient-Pose-Estimation-in-Videos | 5e9a0d6b6edfc9ebacaa6f85c91b1d8494a285f0 | [
"MIT"
] | 46 | 2020-07-17T07:09:47.000Z | 2022-01-18T14:21:53.000Z | test_jhmdb.py | Yuexiaoxi10/Key-Frame-Proposal-Network-for-Efficient-Pose-Estimation-in-Videos | 5e9a0d6b6edfc9ebacaa6f85c91b1d8494a285f0 | [
"MIT"
] | 5 | 2020-07-17T06:54:13.000Z | 2022-02-26T05:30:25.000Z | test_jhmdb.py | Yuexiaoxi10/Key-Frame-Proposal-Network-for-Efficient-Pose-Estimation-in-Videos | 5e9a0d6b6edfc9ebacaa6f85c91b1d8494a285f0 | [
"MIT"
] | 6 | 2020-09-22T06:57:40.000Z | 2022-03-03T03:09:51.000Z | import time
from torch.utils.data import DataLoader, Dataset
from torch.optim import lr_scheduler
import torch.nn as nn
from modelZoo.DyanOF import creatRealDictionary
from modelZoo.networks import keyframeProposalNet, load_preTrained_model
from utils import *
from JHMDB_dloader import *
import scipy.io
from eval_PCK... | 35.67027 | 145 | 0.631308 |
797a7b894fc36080637682199b22e189f1b42adf | 19,688 | py | Python | tests/components/mqtt/test_number.py | learn-home-automation/core | c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7 | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | tests/components/mqtt/test_number.py | learn-home-automation/core | c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7 | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/mqtt/test_number.py | learn-home-automation/core | c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7 | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """The tests for mqtt number component."""
import json
from unittest.mock import patch
import pytest
from homeassistant.components import number
from homeassistant.components.mqtt.number import (
CONF_MAX,
CONF_MIN,
MQTT_NUMBER_ATTRIBUTES_BLOCKED,
)
from homeassistant.components.number import (
ATTR_M... | 30.618974 | 95 | 0.648314 |
797a7c11dbf9f3d044687e93ba9f9fe4df3a8357 | 123,514 | py | Python | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 384 | 2017-02-21T18:38:04.000Z | 2022-02-22T07:30:25.000Z | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 15 | 2017-03-01T20:18:43.000Z | 2020-05-07T10:33:51.000Z | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | DEVESHTARASIA/tensorflow | d3edb8c60ed4fd831d62833ed22f5c23486c561c | [
"Apache-2.0"
] | 81 | 2017-02-21T19:31:19.000Z | 2022-02-22T07:30:24.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.445484 | 80 | 0.629103 |
797a7c7a1f52b3749e1f0dacfbe83a0d3128d966 | 2,436 | py | Python | kornia/feature/__init__.py | theRealSuperMario/kornia | 2b32cd9ee79a76e2a6e308b27e4eba3c242d5f55 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/feature/__init__.py | theRealSuperMario/kornia | 2b32cd9ee79a76e2a6e308b27e4eba3c242d5f55 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/feature/__init__.py | theRealSuperMario/kornia | 2b32cd9ee79a76e2a6e308b27e4eba3c242d5f55 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from .responses import (CornerHarris,
CornerGFTT,
BlobHessian,
BlobDoG,
harris_response,
gftt_response,
hessian_response,
dog_response)
from .nms import... | 30.074074 | 76 | 0.617816 |
797a7c94c9204dca45473510b6dbf77de40b5873 | 5,377 | py | Python | sdk/python/pulumi_azure_native/cache/v20180301/get_linked_server.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20180301/get_linked_server.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20180301/get_linked_server.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 36.578231 | 163 | 0.665055 |
797a7cc492e19b938f2970e0561caf9d84399a82 | 243 | py | Python | output/models/nist_data/list_pkg/id/schema_instance/nistschema_sv_iv_list_id_length_5_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/id/schema_instance/nistschema_sv_iv_list_id_length_5_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/id/schema_instance/nistschema_sv_iv_list_id_length_5_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.list_pkg.id.schema_instance.nistschema_sv_iv_list_id_length_5_xsd.nistschema_sv_iv_list_id_length_5 import (
NistschemaSvIvListIdLength5,
Out,
)
__all__ = [
"NistschemaSvIvListIdLength5",
"Out",
]
| 24.3 | 137 | 0.794239 |
797a7d31aa3cbb45dbbd0c1167cc8142e580e77b | 7,874 | py | Python | platform/iphone/detect.py | Jay2645/godot | d8bb3d7fed36d8268330d9375d782749c7aa02dc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-19T14:13:55.000Z | 2019-01-19T14:13:55.000Z | platform/iphone/detect.py | Jay2645/godot | d8bb3d7fed36d8268330d9375d782749c7aa02dc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null | platform/iphone/detect.py | Jay2645/godot | d8bb3d7fed36d8268330d9375d782749c7aa02dc | [
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null | import os
import string
import sys
from methods import detect_darwin_sdk_path
def is_active():
return True
def get_name():
return "iOS"
def can_build():
if sys.platform == 'darwin' or ("OSXCROSS_IOS" in os.environ):
return True
return False
def get_opts():
from SCons.Variables impor... | 42.562162 | 491 | 0.582296 |
797a7d6f385f638b0a708f209f02be9f6e44182b | 39,231 | py | Python | pysnmp/MERU-CONFIG-WLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/MERU-CONFIG-WLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/MERU-CONFIG-WLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module MERU-CONFIG-WLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MERU-CONFIG-WLAN-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:01:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 125.338658 | 6,526 | 0.773444 |
797a7e62d83a0d899bc2ac898093cea8a298fb46 | 463 | py | Python | pythonequipmentdrivers/errors.py | admleman/PythonEquipmentDrivers | 1e1fbf96ae372757ad90339af5863ab64daef2a0 | [
"MIT"
] | 6 | 2021-02-01T14:23:22.000Z | 2021-12-31T12:26:07.000Z | pythonequipmentdrivers/errors.py | admleman/PythonEquipmentDrivers | 1e1fbf96ae372757ad90339af5863ab64daef2a0 | [
"MIT"
] | 5 | 2020-08-17T12:59:06.000Z | 2022-03-24T02:19:31.000Z | pythonequipmentdrivers/errors.py | TedKus/PythonEquipmentDrivers | d758a6fb0f7d505d46b24fcd55170e90d2a06cd0 | [
"MIT"
] | 3 | 2020-12-30T17:25:55.000Z | 2021-07-27T13:52:44.000Z |
class UnsupportedResourceError(Exception):
def __init__(self, message="Device is not supported", *args):
super().__init__(message, *args)
class ResourceConnectionError(Exception):
def __init__(self, message="Could not connect to device", *args):
super().__init__(message, *args)
class Enviro... | 30.866667 | 73 | 0.717063 |
797a7e97858ff600d6b90647165f026ea18073f9 | 108 | py | Python | bifrost_cge_mlst/__main__.py | ssi-dk/bifrost-cge_mlst | 45f390a049d60edeae0a862f48259aeca082397a | [
"MIT"
] | null | null | null | bifrost_cge_mlst/__main__.py | ssi-dk/bifrost-cge_mlst | 45f390a049d60edeae0a862f48259aeca082397a | [
"MIT"
] | 1 | 2020-08-21T07:14:36.000Z | 2020-08-21T07:14:36.000Z | bifrost_cge_mlst/__main__.py | ssi-dk/bifrost-cge_mlst | 45f390a049d60edeae0a862f48259aeca082397a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from bifrost_cge_mlst import launcher
if __name__ == '__main__':
launcher.main() | 21.6 | 37 | 0.740741 |
797a7eb5f9d9c3b1e87bdcdd22b835fe6fde9a2f | 4,153 | py | Python | colour/algebra/tests/test_common.py | gutenzwerg/colour | 299eceb57483213e2544d532a6d3727887e49426 | [
"BSD-3-Clause"
] | 3 | 2021-03-25T05:05:28.000Z | 2021-12-12T15:58:12.000Z | colour/algebra/tests/test_common.py | jedypod/colour | 24c98dc6e8ac041f8a823a9fce83857faaebc367 | [
"BSD-3-Clause"
] | null | null | null | colour/algebra/tests/test_common.py | jedypod/colour | 24c98dc6e8ac041f8a823a9fce83857faaebc367 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines unit tests for :mod:`colour.algebra.common` module.
"""
import numpy as np
import unittest
from colour.algebra import (is_spow_enabled, set_spow_enable, spow_enable,
spow, smoothstep_function)
__author__ = 'Colour Developers'
__copyright__ = 'Copyright ... | 26.793548 | 78 | 0.614736 |
797a7f4ca7394a821272410672e13871ec6cd128 | 10,221 | py | Python | virt/ansible-2.7.0/lib/python2.7/site-packages/ansible/modules/network/aci/aci_epg.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.7.0/lib/python2.7/site-packages/ansible/modules/network/aci/aci_epg.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-2.7.0/lib/python2.7/site-packages/ansible/modules/network/aci/aci_epg.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 27.624324 | 141 | 0.619705 |
797a7f5e8fac75303f2403683553766d613668ea | 1,459 | py | Python | soccer/gameplay/plays/testing/test_block_and_kicker.py | kasohrab/robocup-software | 73c92878baf960844b5a4b34c72804093f1ea459 | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/plays/testing/test_block_and_kicker.py | kasohrab/robocup-software | 73c92878baf960844b5a4b34c72804093f1ea459 | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/plays/testing/test_block_and_kicker.py | kasohrab/robocup-software | 73c92878baf960844b5a4b34c72804093f1ea459 | [
"Apache-2.0"
] | null | null | null | import play
import behavior
import constants
import tactics.coordinated_block
import skills.pivot_kick
import robocup
import main
## Runs our Defense tactic and a pivot kicker than tries to score on our blocking tactic
class TestBlockAndKicker(play.Play):
def __init__(self):
super().__init__(continuous=Tr... | 29.77551 | 88 | 0.668951 |
797a7f6c78aacb510afd20c63b279cd5fea4ca1f | 2,965 | py | Python | pdf2email.py | alexey-ernest/pdf-to-email | 5605af8c2bab282f0712dadee718bd53a9b968ae | [
"MIT"
] | null | null | null | pdf2email.py | alexey-ernest/pdf-to-email | 5605af8c2bab282f0712dadee718bd53a9b968ae | [
"MIT"
] | null | null | null | pdf2email.py | alexey-ernest/pdf-to-email | 5605af8c2bab282f0712dadee718bd53a9b968ae | [
"MIT"
] | null | null | null | """
pdf2email.py: extracts all email addresses from pdf files.
pdfminer package required: pip install pdfminer.
"""
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from pdfminer... | 29.949495 | 94 | 0.577066 |
797a7f81e29485dcc19a7da9fd087d02856b3edb | 24,435 | py | Python | tasa_website/views.py | tasa-berkeley/tasa_website | 316abf02effcd69de5e5746bceb86752140ed874 | [
"BSD-2-Clause"
] | 1 | 2021-02-17T01:59:29.000Z | 2021-02-17T01:59:29.000Z | tasa_website/views.py | tasa-berkeley/tasa_website | 316abf02effcd69de5e5746bceb86752140ed874 | [
"BSD-2-Clause"
] | 7 | 2020-04-29T08:33:52.000Z | 2022-03-11T23:47:29.000Z | tasa_website/views.py | tasa-berkeley/tasa_website | 316abf02effcd69de5e5746bceb86752140ed874 | [
"BSD-2-Clause"
] | 2 | 2021-02-22T19:18:43.000Z | 2021-03-13T01:02:37.000Z | from googleapiclient import discovery
from httplib2 import Http
from oauth2client import file, client, tools
import json
import os
import random
import re
import requests
import string
import sqlite3
import time
import urllib
import yaml
import collections
import io
import csv
import zipfile
from flask import Flask
f... | 37.708333 | 129 | 0.641334 |
797a8065c6784693650f66eb32cb57ad7951a47c | 1,382 | py | Python | aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/GetAppApiGatewayGroupRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/GetAppApiGatewayGroupRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/GetAppApiGatewayGroupRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.368421 | 84 | 0.758321 |
797a8128b381780d05a681353e11aba22ec88bd2 | 7,828 | py | Python | SimG4CMS/Calo/test/python/monopoleStepppingAction_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | SimG4CMS/Calo/test/python/monopoleStepppingAction_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | SimG4CMS/Calo/test/python/monopoleStepppingAction_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("PROD")
process.load("SimG4CMS.Calo.pythiapdt_cfi")
process.load('Configuration.StandardSequences.Generator_cff')
process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
process.load("Geometry.CMSCommonData.cmsSimIdealGeometryXML_cfi")
process.load... | 42.543478 | 96 | 0.653168 |
797a81462da862d5d716bd106d45ee2de633d1a7 | 1,043 | py | Python | finitewave/cpuwave3D/tracker/variable_3d_tracker.py | ArsOkenov/Finitewave | 14274d74be824a395b47a5c53ba18188798ab70d | [
"MIT"
] | null | null | null | finitewave/cpuwave3D/tracker/variable_3d_tracker.py | ArsOkenov/Finitewave | 14274d74be824a395b47a5c53ba18188798ab70d | [
"MIT"
] | null | null | null | finitewave/cpuwave3D/tracker/variable_3d_tracker.py | ArsOkenov/Finitewave | 14274d74be824a395b47a5c53ba18188798ab70d | [
"MIT"
] | null | null | null | import os
import numpy as np
from finitewave.core.tracker import Tracker
class Variable3DTracker(Tracker):
def __init__(self):
Tracker.__init__(self)
self.var_list = []
self.cell_ind = [1, 1, 1]
self.dir_name = "multi_vars"
self.vars = {}
def initialize(self, model):
... | 28.972222 | 79 | 0.528284 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.