hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2dbb56370649de28b957284c8fa10d30af2fe645 | 378 | py | Python | modeling/trans/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 46 | 2018-05-29T08:01:10.000Z | 2022-02-14T21:47:40.000Z | modeling/trans/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | null | null | null | modeling/trans/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 17 | 2018-11-14T09:17:00.000Z | 2021-08-06T04:05:07.000Z | # -*- coding: utf-8 -*-
# @Time : 2020/6/17 10:59
# @Author : zhoujun
from .TPS import TPS
__all__ = ['build_trans']
support_trans = ['TPS', 'None']
def build_trans(trans_name, **kwargs):
assert trans_name in support_trans, f'all support head is {support_trans}'
if trans_name == 'None':
return N... | 22.235294 | 78 | 0.642857 |
2dbb564d0d88ddd79291b301ff8f6e9da46b42d9 | 159 | py | Python | pip_upgrade.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | 3 | 2021-03-22T01:54:43.000Z | 2021-03-28T10:48:35.000Z | pip_update_all.py | Ls-Dai/Pytorch_FL_CNN | 59bfd017dc21a4d11e7dafb382cdae3c57086071 | [
"MIT"
] | 3 | 2020-02-11T21:55:44.000Z | 2021-06-10T17:35:37.000Z | pip_update_all.py | Ls-Dai/Pytorch_FL_CNN | 59bfd017dc21a4d11e7dafb382cdae3c57086071 | [
"MIT"
] | null | null | null | import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
| 26.5 | 67 | 0.742138 |
2dbb7c309f7d3da72300e28efe6e7bcaaa39ca87 | 5,258 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.184874 | 135 | 0.668695 |
2dbb86312288604935221fd3646452f447180351 | 11,383 | py | Python | pait/core.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 19 | 2020-08-26T13:46:33.000Z | 2022-02-22T07:48:29.000Z | pait/core.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 1 | 2021-06-06T17:45:54.000Z | 2021-06-06T17:45:54.000Z | pait/core.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 1 | 2022-01-21T20:25:33.000Z | 2022-01-21T20:25:33.000Z | import inspect
from functools import wraps
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar
from pydantic import BaseConfig
from pait.app.base import BaseAppHelper
from pait.g import config, pait_data
from pait.model.core import PaitCoreModel
from pait.model.response import PaitBaseRespons... | 44.992095 | 115 | 0.635421 |
2dbb8abe22405a12427ba69a74fe158e7975746a | 3,922 | py | Python | setup.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | null | null | null | setup.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | 15 | 2020-03-06T13:53:56.000Z | 2020-04-01T09:14:34.000Z | setup.py | zea2/DeviceManager | 5f224c7680692cd9329b5b1421b00a814e3c2bfe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup script for the device manager.
Authors:
Lukas Lankes, Forschungszentrum Jülich GmbH - ZEA-2, l.lankes@fz-juelich.de
"""
import distutils.command.install as orig
import inspect
import os
import re
import subprocess
import sys
from setuptools import setup
from... | 34.403509 | 95 | 0.605048 |
2dbbd2d48c4a8761b382d0b8295c27fa1bdff321 | 3,470 | py | Python | src/gittoolbox/git/git_repo.py | dbradf/git-toolbox | b42de4f283488fd9ad4c809cc3a70762b897b293 | [
"Apache-2.0"
] | null | null | null | src/gittoolbox/git/git_repo.py | dbradf/git-toolbox | b42de4f283488fd9ad4c809cc3a70762b897b293 | [
"Apache-2.0"
] | null | null | null | src/gittoolbox/git/git_repo.py | dbradf/git-toolbox | b42de4f283488fd9ad4c809cc3a70762b897b293 | [
"Apache-2.0"
] | null | null | null | """Git repository representation."""
from __future__ import annotations
from typing import Set
import structlog
from git import Commit, DiffIndex, Repo
LOGGER = structlog.get_logger(__name__)
class GitRepo(object):
"""A git repository."""
def __init__(self, repo: Repo):
"""
Create a new Gi... | 25.328467 | 81 | 0.583285 |
2dbbd95829b33b60d1e059914cc9ac841a1609eb | 6,822 | py | Python | RaiseWikibase/datamodel.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | RaiseWikibase/datamodel.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | RaiseWikibase/datamodel.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | import uuid
def label(language='en', value=''):
"""Create and return a label (dict)"""
return {language: {'language': language, 'value': value}}
def alias(language='en', value=''):
"""Create and return an alias (dict)"""
a = {}
if len(value) == 0:
a[language] = [{'language': language, 'v... | 34.629442 | 114 | 0.481091 |
2dbbeaa7317e46d9c8305ac9d8e602a15997e880 | 7,042 | py | Python | troncli/h_init.py | seancrx/tron-cli | 1507b4c650a1da0785e5515feccca6a9aa375d25 | [
"MIT"
] | null | null | null | troncli/h_init.py | seancrx/tron-cli | 1507b4c650a1da0785e5515feccca6a9aa375d25 | [
"MIT"
] | null | null | null | troncli/h_init.py | seancrx/tron-cli | 1507b4c650a1da0785e5515feccca6a9aa375d25 | [
"MIT"
] | null | null | null | import os
import re
import shutil
import subprocess
from troncli import utils, h_worker
from troncli.constants import *
class Init(object):
"""handler for init dirs and fetch code"""
def __init__(self):
self.root_path = os.getcwd()
self.source_full_jar = 'FullNode.jar'
self.source_so... | 40.94186 | 110 | 0.582221 |
2dbbf73c68ac9482a540f58cc610cdf0dc03659e | 202 | py | Python | basic/variable.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/variable.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/variable.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#测试动态变量
class Test():
def __init__(self,**dic):
self.name = "jon"
for i in dic.keys():
setattr(self,i,dic[i])
t = Test(a=1,b=2,c=3)
print t.a,t.b,t.c | 15.538462 | 26 | 0.579208 |
2dbc217e9004ec7e95554613fec03384356d9c2d | 1,629 | py | Python | generated/python/proto-google-cloud-spanner-admin-database-v1/setup.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 18 | 2016-12-08T20:47:57.000Z | 2022-01-29T19:36:04.000Z | generated/python/proto-google-cloud-spanner-admin-database-v1/setup.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 252 | 2016-09-21T20:51:36.000Z | 2021-03-25T23:02:36.000Z | generated/python/proto-google-cloud-spanner-admin-database-v1/setup.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 37 | 2016-09-19T21:13:16.000Z | 2022-01-29T19:36:07.000Z | """A setup module for the GRPC Cloud Spanner Database Admin API service.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import setuptools
from setuptools import setup, find_packages
install_requires = [
'googleapis-common-protos>=1.5.2, <2.0dev',
'oauth2c... | 31.941176 | 181 | 0.696746 |
2dbc3346674896ef5e29a403ec57a31effb20397 | 1,187 | py | Python | redbrick/common/project.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2020-11-26T04:25:15.000Z | 2020-11-26T04:25:15.000Z | redbrick/common/project.py | redbrick-ai/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 33 | 2021-02-04T17:51:53.000Z | 2022-03-17T07:28:36.000Z | redbrick/common/project.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2021-06-09T10:06:35.000Z | 2021-06-09T10:06:35.000Z | """Interface for getting basic information about a project."""
from typing import Dict, List
from abc import ABC, abstractmethod
class ProjectRepoInterface(ABC):
"""Abstract interface to Project APIs."""
@abstractmethod
def get_project(self, org_id: str, project_id: str) -> Dict:
"""
Get... | 27.604651 | 85 | 0.631845 |
2dbc7da64fd2167278dd8878dc4bb922391b06fe | 24,825 | py | Python | pcdsdevices/state.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/state.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/state.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Module to define positioners that move between discrete named states.
"""
import functools
import logging
from enum import Enum
from ophyd.device import Component as Cpt
from ophyd.device import Device, required_for_connection
from ophyd.positioner import PositionerBase
from ophyd.signal import EpicsSignal
from op... | 37.218891 | 79 | 0.60858 |
2dbcb53914dd6af9abbaf1e51c5f56afba1df8c2 | 2,539 | py | Python | app.py | davidrossouw/simpson-classifier-web-app | 94fdf12705d81122ef54c7d3e0e1889b61739953 | [
"MIT"
] | null | null | null | app.py | davidrossouw/simpson-classifier-web-app | 94fdf12705d81122ef54c7d3e0e1889b61739953 | [
"MIT"
] | 9 | 2020-01-28T22:51:23.000Z | 2022-02-10T00:12:56.000Z | app.py | davidrossouw/simpson-classifier-web-app | 94fdf12705d81122ef54c7d3e0e1889b61739953 | [
"MIT"
] | null | null | null | # Usage: python app.py
from flask import send_from_directory
import os
from flask import Flask, render_template, request, redirect, url_for
from werkzeug import secure_filename
from model import SimpsonClassifier
import time
import uuid
import base64
UPLOAD_FOLDER = 'uploads'
ALLOWED_EXTENSIONS = set(['jpg', 'jpeg', ... | 29.183908 | 112 | 0.652225 |
2dbcc53d066e87637d9feb513a9efc4b2e63751e | 111,057 | py | Python | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 46.56478 | 172 | 0.661165 |
2dbce3b376614f222fa4fda07a3fe5b6a865a6c6 | 657 | py | Python | (2)Data Structures/collection_chainmap_reorder.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/collection_chainmap_reorder.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/collection_chainmap_reorder.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import collections
a = {'a':'A','b':'B', 'c':'D'}
b ={ 'd':'F', 'e':'Z'}
m = collections.ChainMap(a,b)
print('Individual Values')
print('a = {}'.format(m['a']))
print('b = {}'.format(m['b']))
print('c = {}'.format(m['c']))
print('d = {}'.format(m['d']))
print('e = {}'.format(m['d']))
print('Items:')
for k,v in m.i... | 20.53125 | 70 | 0.415525 |
2dbcf15f71380a702a1c45eab49d5d2180c63340 | 8,271 | py | Python | gbk_feature_sequence_to_fasta.py | ba1/BioParsing | 8a0257d4765a7bc86fef7688762abbeaaf3cef07 | [
"MIT"
] | 1 | 2017-06-19T15:15:26.000Z | 2017-06-19T15:15:26.000Z | gbk_feature_sequence_to_fasta.py | ba1/BioParsing | 8a0257d4765a7bc86fef7688762abbeaaf3cef07 | [
"MIT"
] | null | null | null | gbk_feature_sequence_to_fasta.py | ba1/BioParsing | 8a0257d4765a7bc86fef7688762abbeaaf3cef07 | [
"MIT"
] | null | null | null | '''
Created on Jul 6, 2015
@author: bardya
'''
import re
import string
def clearup(s, chars):
return re.sub('[%s]' % chars, '', s).upper()
def fasta_linebreak(s, seqrowlength=70):
fastastring_formatted = []
for line in s.split("\n"):
if not line.startswith(">"):
n = 70
l... | 65.125984 | 111 | 0.816467 |
2dbcf18d06da99c4630b89c47596962543610ffd | 4,578 | py | Python | custom_components/ble_monitor/ble_parser/qingping.py | avidit/home-assistant-config | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | 383 | 2019-11-25T17:13:04.000Z | 2020-11-12T08:47:35.000Z | custom_components/ble_monitor/ble_parser/qingping.py | avidit/homeassistant | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | 142 | 2019-11-25T21:29:27.000Z | 2020-11-12T16:58:01.000Z | custom_components/ble_monitor/ble_parser/qingping.py | avidit/homeassistant | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | 65 | 2019-11-26T11:53:44.000Z | 2020-11-11T16:37:52.000Z | """Parser for Cleargrass or Qingping BLE advertisements"""
import logging
from struct import unpack
from .helpers import (
to_mac,
to_unformatted_mac,
)
_LOGGER = logging.getLogger(__name__)
def parse_qingping(self, data, source_mac, rssi):
"""Qingping parser"""
msg_length = len(data)
if msg_len... | 38.470588 | 97 | 0.519441 |
2dbd528f40117ba92cd87ff86c6dc9463c0a8a26 | 1,517 | py | Python | services/traction/acapy_wrapper/models/create_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/create_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/create_wallet_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class CreateWalletRequest(BaseModel):
"""NOTE: This c... | 37.925 | 96 | 0.743573 |
2dbd57f02479539c3a2e0463a6ad6f719e8bd8f5 | 1,074 | py | Python | src/stk/molecular/key_makers/smiles.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/key_makers/smiles.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/key_makers/smiles.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | """
SMILES
======
"""
from .molecule import MoleculeKeyMaker
from .utilities import get_smiles
class Smiles(MoleculeKeyMaker):
"""
Used to get the SMILES of molecules.
Examples
--------
*Adding SMILES to a Molecule's JSON*
You want to use the isomeric, canonical SMILES from RDKit as part
... | 20.264151 | 69 | 0.595903 |
2dbd60b291bc71aa9b0cb8557adee0d0623dd432 | 3,841 | py | Python | test/unit/test_disco_chaos.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | test/unit/test_disco_chaos.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | 4 | 2016-03-22T17:04:04.000Z | 2016-03-23T18:03:45.000Z | test/unit/test_disco_chaos.py | Angakkuit/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | """
Tests of disco_aws
"""
from unittest import TestCase
from mock import MagicMock, create_autospec
from disco_aws_automation import DiscoChaos, DiscoAWS, DiscoAutoscale
from test.helpers.patch_disco_aws import (get_default_config_dict,
get_mock_config,
... | 42.677778 | 109 | 0.661286 |
2dbd765acfa192459165a7886597e9197693ef5b | 17,355 | py | Python | pycoind/node/basenode.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/node/basenode.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | pycoind/node/basenode.py | TemplarJQ/pycoindAnnotationVersion | d33b4c455c4654e0fde35500d230437210d5325e | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# 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, mod... | 29.717466 | 164 | 0.637165 |
2dbda4656551895a78e60ce8629b6ba8d98756e5 | 5,303 | py | Python | mps_database/models/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/models/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/models/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from sqlalchemy import Column, Integer, String, Float, ForeignKey, Boolean
from sqlalchemy.orm import relationship, backref
from mps_database.models import Base
class Device(Base):
"""
Device class (devices table)
This is a generic class that contains properties common to DigitalDevices
and AnalogDevices.
... | 40.174242 | 97 | 0.71337 |
2dbdce6ae988748ff1673e9448799bdfcb9d5aa3 | 2,516 | py | Python | logcausality/log_db_view.py | cpflat/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 20 | 2016-11-22T03:21:20.000Z | 2021-06-16T02:44:58.000Z | logcausality/log_db_view.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T05:45:34.000Z | 2019-11-01T04:56:01.000Z | logcausality/log_db_view.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 8 | 2015-11-13T03:33:04.000Z | 2021-09-10T09:29:23.000Z | #!/usr/bin/env python
# coding: utf-8
import sys
import optparse
import time
import datetime
import config
import log_db
def view(conf, ltid, ltgid, top_dt, end_dt, host, area, oflag):
ld = log_db.LogData(conf)
for e in ld.iter_lines(ltid = ltid, ltgid = ltgid, top_dt = top_dt,
end_dt = end_dt, ... | 38.707692 | 79 | 0.61089 |
2dbdf0cd42c1b77f89631d57806491bef28fa98e | 1,328 | py | Python | tests/test_validator.py | kedenk/evm-bytecode-tool | 838be9ad1edef3222de1c83bcd2b4955cded0992 | [
"MIT"
] | null | null | null | tests/test_validator.py | kedenk/evm-bytecode-tool | 838be9ad1edef3222de1c83bcd2b4955cded0992 | [
"MIT"
] | null | null | null | tests/test_validator.py | kedenk/evm-bytecode-tool | 838be9ad1edef3222de1c83bcd2b4955cded0992 | [
"MIT"
] | null | null | null | import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import src.validator as val
from src import opcodes
import pytest
opcodes.initSequenceOpcodes()
valid_bytecodes = [
"60013201",
"634563f365600302"
]
invalid_bytecodes = [
"600101",
"60014001"
]
inval... | 20.430769 | 82 | 0.67244 |
2dbdfac69ecfba2d648c8ce0915631913f3f6229 | 18,601 | py | Python | nn/nn_comparators.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | nn/nn_comparators.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | nn/nn_comparators.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | """
A module for computing distances and kernels between neural networks.
--kandasamy@cs.cmu.edu
"""
# pylint: disable=no-member
# pylint: disable=invalid-name
# pylint: disable=abstract-class-little-used
import numpy as np
# Local imports
from gp.kernel import ExpSumOfDistsKernel, SumOfExpSumOfDistsKernel
from n... | 46.972222 | 90 | 0.692543 |
2dbe08a6edc98eb1f453b682495adeaeea05f2ad | 4,199 | py | Python | ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_curiosity.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 1 | 2020-12-23T06:38:13.000Z | 2020-12-23T06:38:13.000Z | ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_curiosity.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/tests/torch/test_reward_providers/test_curiosity.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
from mlagents.torch_utils import torch
from mlagents.trainers.torch.components.reward_providers import (
CuriosityRewardProvider,
create_reward_provider,
)
from mlagents_envs.base_env import BehaviorSpec, ActionSpec
from mlagents.trainers.settings import CuriositySettings, Rewar... | 36.198276 | 86 | 0.723744 |
2dbe5372495507435c542b0df8063a1b395ea392 | 6,113 | py | Python | source/apps/crawl_space/tests/test_crawl.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | null | null | null | source/apps/crawl_space/tests/test_crawl.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | null | null | null | source/apps/crawl_space/tests/test_crawl.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | 1 | 2018-12-18T00:45:06.000Z | 2018-12-18T00:45:06.000Z | from __future__ import unicode_literals
import os
import shutil
# Test
from memex.test_utils.unit_test_utils import UnitTestSkeleton, form_errors, get_object
from django.test import TestCase
from django.core.files.uploadedfile import SimpleUploadedFile
# App
from apps.crawl_space.forms import AddCrawlForm
from apps.... | 33.404372 | 106 | 0.643547 |
2dbe5aef0ce5de3c5c382c4e415015dc70046c98 | 3,813 | py | Python | DonkiDirector/tinydb/middlewares.py | ess-dmsc/do-ess-data-simulator | 37ef0d87ad0152b092e3a636ef8d080db0711aaa | [
"BSD-2-Clause"
] | null | null | null | DonkiDirector/tinydb/middlewares.py | ess-dmsc/do-ess-data-simulator | 37ef0d87ad0152b092e3a636ef8d080db0711aaa | [
"BSD-2-Clause"
] | null | null | null | DonkiDirector/tinydb/middlewares.py | ess-dmsc/do-ess-data-simulator | 37ef0d87ad0152b092e3a636ef8d080db0711aaa | [
"BSD-2-Clause"
] | null | null | null | """
Contains the :class:`base class <tinydb.middlewares.Middleware>` for
middlewares and implementations.
"""
from tinydb import TinyDB
class Middleware(object):
"""
The base class for all Middlewares.
Middlewares hook into the read/write process of TinyDB allowing you to
extend the behav... | 32.589744 | 80 | 0.613952 |
2dbe5c7882ba34f91014f8c7645d89c95ff1e8d5 | 858 | py | Python | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2_Covid_DRO1000_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2_Covid_DRO1000_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainerV2_Covid_DRO1000_IS.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | from nnunet.training.network_training.nnUNetTrainerV2_Covid_DRO1000 import nnUNetTrainerV2_Covid_DRO1000
from nnunet.training.network_training.nnUNetTrainerV2_Covid_DRO import CLIP_IMPORTANCE_WEIGHTS
class nnUNetTrainerV2_Covid_DRO1000_IS(nnUNetTrainerV2_Covid_DRO1000):
def __init__(self, plans_file, fold, output... | 61.285714 | 104 | 0.747086 |
2dbe700bb99d9a6d426cc91a63d51f52b34a63f3 | 3,245 | py | Python | PYTHON/algorithms/hangman.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 125 | 2021-10-01T19:05:26.000Z | 2021-10-03T13:32:42.000Z | PYTHON/algorithms/hangman.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 201 | 2021-10-30T20:40:01.000Z | 2022-03-22T17:26:28.000Z | PYTHON/algorithms/hangman.py | Danish-Belal/CodeCollection | cd3914d3d73542dd5f20755c4b1e42906f443b03 | [
"MIT"
] | 294 | 2021-10-01T18:46:05.000Z | 2021-10-03T14:25:07.000Z | name = input("Enter your NAME :")
print("Welcome",name)
print("*****************")
print ("Try to guess the word in less than 10 minutes :")
import random
def hangman():
word = random.choice(["pugger" , "littlepugger" , "tiger" , "superman" , "thor" , "pokemon" , "avengers" , "savewater" , "earth" , "annable" ]... | 30.613208 | 147 | 0.330663 |
2dbe7ee164e2a59f39c378c1a655df4744ea9bac | 67 | py | Python | ipywidgets_jsonschema/__init__.py | ssciwr/ipywidgets-jsonschema | 4301b0902a4ee0bf7af5b72b85dd5c8a9f4a96db | [
"MIT"
] | null | null | null | ipywidgets_jsonschema/__init__.py | ssciwr/ipywidgets-jsonschema | 4301b0902a4ee0bf7af5b72b85dd5c8a9f4a96db | [
"MIT"
] | 15 | 2022-01-28T10:31:44.000Z | 2022-03-03T12:20:00.000Z | ipywidgets_jsonschema/__init__.py | ssciwr/ipywidgets-jsonschema | 4301b0902a4ee0bf7af5b72b85dd5c8a9f4a96db | [
"MIT"
] | null | null | null | from ipywidgets_jsonschema.form import Form
__version__ = "0.8.1"
| 16.75 | 43 | 0.791045 |
2dbe9130ce8623de24203dc13930d819e55e659e | 2,858 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/start_bot.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/start_bot.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/start_bot.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.755556 | 123 | 0.608467 |
2dbea0a1706fa4b5c05397e7fd0334c828f957cb | 8,726 | py | Python | appengine/monorail/tracker/template_helpers.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/tracker/template_helpers.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/tracker/template_helpers.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Helper functions for issue template servlets"""
from __future__ import print_function
from _... | 38.27193 | 80 | 0.737566 |
2dbea2222f04bf2cda94fccbc69e05d1d557b4ab | 1,664 | py | Python | oscar/bin/enhancer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/bin/enhancer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/bin/enhancer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #!/root/Desktop/django-oscar/oscar/bin/python
#
# The Python Imaging Library
# $Id$
#
# this demo script creates four windows containing an image and a slider.
# drag the slider to modify the image.
#
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from P... | 25.6 | 89 | 0.623197 |
2dbebe64efd27a20c39e0d799c1708ee6fed840f | 5,136 | py | Python | datasets/collate.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | 6 | 2021-03-09T15:18:12.000Z | 2021-12-22T13:59:41.000Z | datasets/collate.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | 4 | 2020-11-27T12:48:23.000Z | 2021-09-29T07:11:14.000Z | datasets/collate.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | 4 | 2020-11-27T11:48:31.000Z | 2021-11-26T08:50:14.000Z | import torch
from torch.nn.utils.rnn import pad_sequence
from .dataset import Triplet, Paper
def pad_and_lens(sequence, padding_value):
seq_lens = torch.tensor([i.size(0) for i in sequence])
sequence = pad_sequence(sequence, batch_first=True, padding_value=padding_value)
return sequence, seq_lens
def p... | 36.685714 | 88 | 0.671534 |
2dbec050a8f1c15968815e341442de9603645f42 | 2,060 | py | Python | ginga/misc/Future.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/misc/Future.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/ginga/misc/Future.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | #
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import threading
from . import Callback
class TimeoutError(Exception):
pass
class Future(Callback.Callbacks):
... | 25.121951 | 76 | 0.615049 |
2dbef3d9fe5f00be77b6cd274b94998875e3632e | 302 | py | Python | tests/test_guard_code.py | James-LG/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | 3 | 2021-02-09T16:03:41.000Z | 2021-07-28T10:40:10.000Z | tests/test_guard_code.py | Tygon/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | 2 | 2021-02-05T22:28:58.000Z | 2021-04-30T21:14:30.000Z | tests/test_guard_code.py | Tygon/SteamGuard | 85e51b5bc306abf68c434e36bba34b747fd29ce1 | [
"MIT"
] | null | null | null | import unittest
from .context import steamguard
from steamguard import guard_code
class GuardCodeTest(unittest.TestCase):
def test_get_code(self):
self.assertEqual(guard_code.get_code("1234567890ABCDEFGHIJKLMNOPab=", 1570662828), "R5FGF")
if __name__ == "__main__":
unittest.main()
| 23.230769 | 99 | 0.764901 |
2dbf1013458604a9912f7eca1c61af9d899e21d8 | 9,668 | py | Python | sympy/concrete/delta.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 319 | 2016-09-22T15:54:48.000Z | 2022-03-18T02:36:58.000Z | sympy/concrete/delta.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 9 | 2016-11-03T21:56:41.000Z | 2020-08-09T19:27:37.000Z | sympy/concrete/delta.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 27 | 2016-10-06T16:05:32.000Z | 2022-03-18T02:37:00.000Z | from __future__ import print_function, division
from sympy.core import Add, Mul, S, Dummy, symbols
from sympy.core.cache import cacheit
from sympy.core.compatibility import default_sort_key
from sympy.functions import KroneckerDelta, Piecewise, piecewise_fold
from sympy.sets import Interval
@cacheit
def _expand_delt... | 30.30721 | 118 | 0.607985 |
2dbf6cbfa3f264cea641002f56ae6159038ce206 | 1,009 | py | Python | data/transcoder_evaluation_gfg/python/MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( str ) :
l = len ( str )
count = 0
res = str [ 0 ]
for i in range ( l ) :
cur_count = 1
... | 24.02381 | 64 | 0.511397 |
2dbf70ef55b9f2c49ebd1a0d266c389875e32257 | 610 | py | Python | exifpy/exceptions.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | 1 | 2018-01-23T22:48:16.000Z | 2018-01-23T22:48:16.000Z | exifpy/exceptions.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | null | null | null | exifpy/exceptions.py | rshk/exif-py | 89551543c7288697957c6d74ea37c06c1da378cc | [
"BSD-3-Clause"
] | null | null | null | """
ExifPy Exceptions
"""
class ExifPyGoodException(Exception):
"""
Exception due to missing data to extract, these doesn't
(usually) mean there was a problem with the library.
"""
pass
class UnsupportedFormat(ExifPyGoodException):
"""
Unsupported file format: not a jpeg/tiff
"""
... | 17.941176 | 59 | 0.660656 |
2dbf919a242e362521f0c521565a82c66c8a914f | 59,392 | py | Python | python/xmlInterface.py | tbmreza/Coqtail | fb636f52fc4f19431b8c35fc9c8687fbea554a53 | [
"MIT"
] | 160 | 2017-09-27T19:21:59.000Z | 2022-03-27T13:48:59.000Z | python/xmlInterface.py | tbmreza/Coqtail | fb636f52fc4f19431b8c35fc9c8687fbea554a53 | [
"MIT"
] | 173 | 2017-08-05T01:16:17.000Z | 2022-03-28T16:44:50.000Z | python/xmlInterface.py | tbmreza/Coqtail | fb636f52fc4f19431b8c35fc9c8687fbea554a53 | [
"MIT"
] | 25 | 2018-09-24T22:01:02.000Z | 2021-12-14T16:36:44.000Z | # -*- coding: utf8 -*-
# Author: Wolf Honore
"""Classes to handle differences in the Coqtop XML interface across versions
and provide a uniform interface.
"""
# xml.dom.minidom only needed for pretty printing. No stubs for xml.dom.minidom
import re
import subprocess
import xml.etree.ElementTree as ET
from abc import A... | 33.198435 | 118 | 0.551253 |
2dbfbe9eb3e32a470ef35e6b5468d0a60abc8f52 | 1,799 | py | Python | src/NBcode/gaussian_naive_bayes.py | adirastogi/carlemon | a9539f2434ef5c55920ef7d3a9162e09b53aed15 | [
"MIT"
] | null | null | null | src/NBcode/gaussian_naive_bayes.py | adirastogi/carlemon | a9539f2434ef5c55920ef7d3a9162e09b53aed15 | [
"MIT"
] | null | null | null | src/NBcode/gaussian_naive_bayes.py | adirastogi/carlemon | a9539f2434ef5c55920ef7d3a9162e09b53aed15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Naive Bayes classifier running code, makes the following assumptions:
# missing values in mueric attributes have been filled in !
# preferably no surprises in the attrtibute data.
import naive_bayes
import read_data
import naive_bayes
import sys
if __name__=='__main__':
disable_numeric ... | 31.561404 | 71 | 0.689272 |
2dbfd371713b5899948c58871bf3e0365285328f | 2,815 | py | Python | qnarre/prep/dataset/amazon_reviews_multi.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/dataset/amazon_reviews_multi.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/dataset/amazon_reviews_multi.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 applicable l... | 32.732558 | 99 | 0.550266 |
2dbfd5e9442b4a955678fa90cce54320a252aa9c | 1,127 | py | Python | setup.py | wklchris/python-sgfutil | 5d1d77ba9d570c09dee2a83ba14bac31598cdc3d | [
"MIT"
] | 2 | 2021-04-22T07:58:59.000Z | 2021-04-25T07:23:06.000Z | setup.py | wklchris/python-sgfutil | 5d1d77ba9d570c09dee2a83ba14bac31598cdc3d | [
"MIT"
] | null | null | null | setup.py | wklchris/python-sgfutil | 5d1d77ba9d570c09dee2a83ba14bac31598cdc3d | [
"MIT"
] | null | null | null | import os, re
from setuptools import setup
with open("ReadMe.md", encoding='utf-8') as f:
mdstr = f.read()
def capture_sgfutil_readme(s):
# Capture paragraph from the ReadMe.md
first_paragraph = re.search('(?<=\n).*?library.*?(?=\n)', s).group()
install_section = re.search('(?<=\n)## Install.*?(?=##)'... | 33.147059 | 91 | 0.645075 |
2dbfec1449d850192428c62a79244092bdbf85fa | 807 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.4375 | 114 | 0.64684 |
2dbfeefdb4668cb718f320b733ee5f2d211beb95 | 4,168 | py | Python | ext_runs/run_delly/run_delly.py | nesilin/evolution_TALL_adults | f36d6ebaeb43376096c14fc9ca20116bc2febae6 | [
"Apache-2.0"
] | null | null | null | ext_runs/run_delly/run_delly.py | nesilin/evolution_TALL_adults | f36d6ebaeb43376096c14fc9ca20116bc2febae6 | [
"Apache-2.0"
] | null | null | null | ext_runs/run_delly/run_delly.py | nesilin/evolution_TALL_adults | f36d6ebaeb43376096c14fc9ca20116bc2febae6 | [
"Apache-2.0"
] | 1 | 2021-03-26T15:38:53.000Z | 2021-03-26T15:38:53.000Z | import sys, os
os.environ["PATH"] = os.path.dirname(sys.executable) + os.pathsep + os.environ["PATH"]
import click
import subprocess
import pandas as pd
@click.command()
@click.option('--output_path',
'-out',
type=click.Path(exists=True),
required = True,
help="O... | 47.908046 | 120 | 0.567418 |
2dc020edf5241135a319b6a2b81863b69ad79323 | 1,096 | py | Python | qnarre/core/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/core/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/core/__init__.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix 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 applicable l... | 24.355556 | 79 | 0.650547 |
2dc04600c354aed0bc492a84f4621b1da12c46ef | 15,763 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/22/train3.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/22/train3.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/22/train3.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 34.873894 | 144 | 0.656728 |
2dc059e6c5d67f6ec659e20cfee1a4be4b30531a | 2,424 | py | Python | tests/st/ops/ascend/vector/test_cross_entropy_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_cross_entropy_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_cross_entropy_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 38.47619 | 120 | 0.67698 |
2dc0ae678f5a94b2081c22a23d61c94a5764d62a | 1,039 | py | Python | coinbase/db/utils.py | jonathanmishler/coinbase | 478ea90cb348180d2a8132784ac060ae1e83659a | [
"MIT"
] | null | null | null | coinbase/db/utils.py | jonathanmishler/coinbase | 478ea90cb348180d2a8132784ac060ae1e83659a | [
"MIT"
] | null | null | null | coinbase/db/utils.py | jonathanmishler/coinbase | 478ea90cb348180d2a8132784ac060ae1e83659a | [
"MIT"
] | null | null | null | from typing import List, Tuple
from psycopg import sql
def insert_str(table_name: str, col_names: list) -> sql.Composed:
"""Creates a INSERT sql.composed statement from the table name and column names"""
sql_str = sql.SQL("INSERT INTO {table} ({cols}) VALUES ({placeholders})").format(
table=sql.Identi... | 43.291667 | 86 | 0.66795 |
2dc0b44fb8d109099015423feb4482f4d9685ff7 | 125 | py | Python | terrascript/data/greg_gajda/po.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/greg_gajda/po.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/greg_gajda/po.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/greg-gajda/po.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:24:56 UTC)
__all__ = []
| 20.833333 | 73 | 0.736 |
2dc0b69ca653e306df1c8d6d31dea8cc94b29a3c | 6,503 | py | Python | modules/aws_dns/tests/test_aws_dns.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 595 | 2021-05-21T22:30:48.000Z | 2022-03-31T15:40:25.000Z | modules/aws_dns/tests/test_aws_dns.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 463 | 2021-05-24T21:32:59.000Z | 2022-03-31T17:12:33.000Z | modules/aws_dns/tests/test_aws_dns.py | run-x/opta | 64606498334f2b1aa79f5a431465eafdf5ca5ed7 | [
"Apache-2.0"
] | 29 | 2021-05-21T22:27:52.000Z | 2022-03-28T16:43:45.000Z | # type: ignore
import os
from pytest_mock import MockFixture
from modules.aws_dns.aws_dns import (
CERTIFICATE_BODY_FILE_NAME,
PRIVATE_KEY_FILE_NAME,
AwsDnsProcessor,
)
from opta.layer import Layer
class TestAwsDnsProcessor:
def test_fetch_private_key(self, mocker: MockFixture):
layer = Laye... | 36.740113 | 90 | 0.549131 |
2dc0d9a26e43a9de0e3cf8e6815db982950d841c | 4,036 | py | Python | tests/test_containers.py | alexveden/yauber-backtester | e49746cd90fe9391bc74d65060f08eb54d736f14 | [
"MIT"
] | null | null | null | tests/test_containers.py | alexveden/yauber-backtester | e49746cd90fe9391bc74d65060f08eb54d736f14 | [
"MIT"
] | null | null | null | tests/test_containers.py | alexveden/yauber-backtester | e49746cd90fe9391bc74d65060f08eb54d736f14 | [
"MIT"
] | 1 | 2018-11-27T16:51:52.000Z | 2018-11-27T16:51:52.000Z | import unittest
from yauber_backtester._containers import MFrame, _unstack, PositionInfo, RowTuple
from yauber_backtester import Backtester, Asset
from .test_backtester import make_rnd_asset, TestStrategy
import pandas as pd
import numpy as np
class ContainersTestCase(unittest.TestCase):
@classmethod
def setU... | 39.184466 | 93 | 0.602577 |
2dc0f968995a7d0511e2c66460c626dbf8d9596f | 145 | py | Python | backend/apps.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | null | null | null | backend/apps.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | 2 | 2021-10-10T17:51:01.000Z | 2021-10-16T16:58:54.000Z | backend/apps.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class SocialConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'backend'
| 20.714286 | 56 | 0.758621 |
2dc14427403f5621de328491056eb81a2efa8616 | 13,384 | py | Python | fakolibri/content/utils/channel_import.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | fakolibri/content/utils/channel_import.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | fakolibri/content/utils/channel_import.py | learningequality/channel2site | 0020c15f404c58e369bbe435950e1a38418313e8 | [
"MIT"
] | null | null | null | import logging as logger
from django.apps import apps
from content.apps import ContentConfig
from content.models import CONTENT_SCHEMA_VERSION, ChannelMetadata, ContentNode, ContentTag, File, Language, License, LocalFile
from .annotation import set_leaf_node_availability_from_local_file_availability
from .channels im... | 42.897436 | 127 | 0.645921 |
2dc152678de695b587cdd8e14a543f20185403a1 | 5,225 | py | Python | harvest/models/slices.py | mouradmourafiq/harvest | fed12f41c40e4575128172dc3ff322ce09b2f3ce | [
"MIT"
] | null | null | null | harvest/models/slices.py | mouradmourafiq/harvest | fed12f41c40e4575128172dc3ff322ce09b2f3ce | [
"MIT"
] | null | null | null | harvest/models/slices.py | mouradmourafiq/harvest | fed12f41c40e4575128172dc3ff322ce09b2f3ce | [
"MIT"
] | 1 | 2019-04-30T17:40:44.000Z | 2019-04-30T17:40:44.000Z | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from .schemas import SliceSchema
from .datasets import Table
class Join(models.Model):
"""
The `Join` represents a table to join on the main table in a `Slice` instance.
"""
INNER_JOIN = 1
... | 34.375 | 98 | 0.608995 |
2dc1b2889fdbf96452757e67eff4e1b32eb22b10 | 9,353 | py | Python | toontown/hood/HoodAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2022-01-06T23:51:18.000Z | 2022-01-06T23:51:18.000Z | toontown/hood/HoodAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/hood/HoodAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify.DirectNotifyGlobal import *
from toontown.building import DistributedBuildingMgrAI
from toontown.dna.DNAParser import DNAStorage, DNAGroup, DNAVisGroup
from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI
from toontown.hood import ZoneUtil
from toontown.safezone import... | 43.705607 | 109 | 0.666631 |
2dc20a9d5e8ea763496aaf0b6c4c1673bba090d5 | 4,022 | py | Python | tests/pyregex/test_valid_hk_number_test.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pyregex/test_valid_hk_number_test.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pyregex/test_valid_hk_number_test.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from pyregex.valid_hk_number import is_valid_HK_phone_number, has_valid_HK_phone_number
class MyTestCase(unittest.TestCase):
def test_is_valid_1(self):
self.assertEqual(is_valid_HK_phone_number("1234 5678"), True)
def test_is_valid_2(self):
self.assertEqual(is_valid_HK_phone_... | 35.910714 | 111 | 0.727747 |
2dc2115abf0384fad0cc37f30968e14c1ecd31ed | 20,234 | py | Python | automol/graph/base/_smiles.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/graph/base/_smiles.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/graph/base/_smiles.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | r""" SMILES (Simplified Molecular Input Line Entry System) functions
BEFORE ADDING ANYTHING, SEE IMPORT HIERARCHY IN __init__.py!!!!
Protocol for encoding resonance single bond stereo into the SMILES string:
Resonance single bond stereo is specified exactly the same way as double
bond stereo, using directio... | 39.67451 | 79 | 0.632994 |
2dc2143c47b1b9bbbbccef52d0d2c4bbbddfeed1 | 5,499 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_boardtest/boardtest_i2c.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_boardtest/boardtest_i2c.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_boardtest/boardtest_i2c.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2018 Shawn Hymel for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_boardtest.boardtest_i2c`
====================================================
Performs random writes and reads to I2C EEPROM.
Run this script as its own main.py to individually run the test, or compile
wi... | 27.222772 | 85 | 0.630296 |
2dc2240d9f4592aaef783e2fa129260a633aabfd | 1,799 | py | Python | test/functional/feature_filelock.py | Garlicwallet/garlicoin2 | 97c0f4a38d2f98a0489dbbf4f0185d7dbd9c6dc1 | [
"MIT"
] | null | null | null | test/functional/feature_filelock.py | Garlicwallet/garlicoin2 | 97c0f4a38d2f98a0489dbbf4f0185d7dbd9c6dc1 | [
"MIT"
] | null | null | null | test/functional/feature_filelock.py | Garlicwallet/garlicoin2 | 97c0f4a38d2f98a0489dbbf4f0185d7dbd9c6dc1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Check that it's not possible to start a second garlicoind instance using the same datadir or wallet."""
impo... | 48.621622 | 177 | 0.721512 |
2dc241c0de0c0860e728fa984f4d8f7491b2ac12 | 3,880 | py | Python | uv_magic_uv/ui/view3d_uv_mapping.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | 1 | 2018-06-18T09:46:10.000Z | 2018-06-18T09:46:10.000Z | uv_magic_uv/ui/view3d_uv_mapping.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | uv_magic_uv/ui/view3d_uv_mapping.py | 1-MillionParanoidTterabytes/blender-addons-master | acc8fc23a38e6e89099c3e5079bea31ce85da06a | [
"Unlicense"
] | null | null | null | # <pep8-80 compliant>
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# ... | 38.8 | 77 | 0.628866 |
2dc250c8a0a5b4b3a2b4f260b6cff697e563b141 | 9,637 | py | Python | tamtam/api/bot.py | uwinx/tamtam.py | 8f990ae3603bd027944e3977bfcb2c2fed65d9c0 | [
"MIT"
] | 31 | 2019-07-13T11:21:38.000Z | 2021-08-06T14:45:36.000Z | tamtam/api/bot.py | uwinx/tamtam.py | 8f990ae3603bd027944e3977bfcb2c2fed65d9c0 | [
"MIT"
] | 7 | 2019-07-13T15:07:36.000Z | 2020-06-01T11:45:13.000Z | tamtam/api/bot.py | uwinx/tamtam.py | 8f990ae3603bd027944e3977bfcb2c2fed65d9c0 | [
"MIT"
] | 8 | 2019-07-13T11:19:46.000Z | 2021-08-07T10:26:44.000Z | import asyncio
import datetime
import typing
import aiohttp
import ujson
from ..helpers import ctx
from ..types import (chat, chat_enums, messages, subscription, updates,
uploads_enums, user)
from ..urls import Urls
from .requests import Requester, UrlType
loop = asyncio.get_event_loop()
async... | 30.115625 | 87 | 0.562416 |
2dc28b69359264c101d7096827e07aed8d1ee334 | 2,286 | py | Python | covid_data_handler.py | JW15GH/Covid-Dashboard-ECM1400 | 15e1689bf3b1ab9902911ccb3257680a226abac4 | [
"MIT"
] | null | null | null | covid_data_handler.py | JW15GH/Covid-Dashboard-ECM1400 | 15e1689bf3b1ab9902911ccb3257680a226abac4 | [
"MIT"
] | null | null | null | covid_data_handler.py | JW15GH/Covid-Dashboard-ECM1400 | 15e1689bf3b1ab9902911ccb3257680a226abac4 | [
"MIT"
] | null | null | null | """Module to handle all covid data functionalities"""
import csv
import sched
import time
import logging
from uk_covid19 import Cov19API
logging.basicConfig(filename='logging.log', encoding='utf-8', level=logging.DEBUG)
def parse_csv_data (csv_filename: str) -> list:
"""Returns a list of with each line of the CS... | 29.307692 | 82 | 0.702975 |
2dc29cfa2a5f5eafd006d0e0fe834aadf07bd9aa | 4,154 | py | Python | rob_kovach/puzzle_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | rob_kovach/puzzle_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | rob_kovach/puzzle_06.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | """
Advent of Code - Day 6: Custom Customs
--- Part 1 ---
As your flight approaches the regional airport where you'll switch to a
much larger plane, customs declaration forms are distributed to the
passengers.
The form asks a series of 26 yes-or-no questions marked a through z.
All you need to do is identify the q... | 26.8 | 112 | 0.674771 |
2dc2b207f9f247939349f95e8a074b0d84af4960 | 1,534 | py | Python | pytreex/block/a2w/cs/concatenatetokens.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 11 | 2015-06-24T08:41:44.000Z | 2021-09-02T21:12:10.000Z | pytreex/block/a2w/cs/concatenatetokens.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 4 | 2016-01-12T19:21:22.000Z | 2019-05-10T14:46:44.000Z | pytreex/block/a2w/cs/concatenatetokens.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | 3 | 2016-01-22T11:54:11.000Z | 2019-04-30T17:09:55.000Z | #!/usr/bin/env python
# coding=utf-8
#
from __future__ import unicode_literals
from pytreex.core.block import Block
from pytreex.core.exception import LoadingException
import re
__author__ = "Ondřej Dušek"
__date__ = "2012"
class ConcatenateTokens(Block):
"""\
Detokenize the sentence, spread whitespace corr... | 31.958333 | 79 | 0.531943 |
2dc2dd811419f44c0f4d5d46b52b3aaec685bf49 | 509 | py | Python | music/migrations/0004_auto_20150103_1706.py | RossLote/cloudplayer | aec24b6ea2fdae365e62c9dfc7f366ef9cc84d73 | [
"MIT"
] | null | null | null | music/migrations/0004_auto_20150103_1706.py | RossLote/cloudplayer | aec24b6ea2fdae365e62c9dfc7f366ef9cc84d73 | [
"MIT"
] | null | null | null | music/migrations/0004_auto_20150103_1706.py | RossLote/cloudplayer | aec24b6ea2fdae365e62c9dfc7f366ef9cc84d73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('music', '0003_auto_20150103_1526'),
]
operations = [
migrations.AlterField(
mod... | 23.136364 | 91 | 0.636542 |
2dc2e16070a5ab1810a693699d57e5838b0fd5c8 | 4,513 | py | Python | metalibm_core/code_generation/complex_generator.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | 2 | 2019-02-18T13:42:04.000Z | 2021-03-12T18:54:53.000Z | metalibm_core/code_generation/complex_generator.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | metalibm_core/code_generation/complex_generator.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 47.010417 | 150 | 0.713051 |
2dc3035880680e464cdf3ed70257a4b7be134c48 | 452 | py | Python | swcms_social/text_pages/views.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | swcms_social/text_pages/views.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | 1 | 2019-06-25T11:17:35.000Z | 2019-06-25T11:17:54.000Z | swcms_social/text_pages/views.py | ivanff/swcms-social | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | from django.views.generic import DetailView
from .models import Pages
class PagesDetailView(DetailView):
template_name = "text_pages/pages_detail.html"
queryset = Pages.objects.filter(is_active=True)
slug_url_kwarg = 'url'
slug_field = 'url'
def dispatch(self, request, *args, **kwargs):
... | 30.133333 | 81 | 0.710177 |
2dc30856b6272471376c3e18c1d9fe14fe73a24a | 36 | py | Python | btd6_memory_info/generated/NinjaKiwi/Common/LocAssetHandle_Resources/loc_asset_handle_resources.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/Common/LocAssetHandle_Resources/loc_asset_handle_resources.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/Common/LocAssetHandle_Resources/loc_asset_handle_resources.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class LocAssetHandle_Resources: pass | 36 | 36 | 0.916667 |
2dc30cdc2a90b1c9f8607d03b46abb3b9891dede | 1,210 | py | Python | my-lib-deploy-0.4/setup.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 2 | 2020-12-21T08:50:46.000Z | 2021-06-29T08:23:54.000Z | my-lib-deploy-0.4/setup.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 2 | 2020-11-30T15:56:37.000Z | 2020-12-27T12:36:21.000Z | my-lib-deploy-0.4/setup.py | jainyk/package-outlier | f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed | [
"MIT"
] | 1 | 2020-11-30T06:17:32.000Z | 2020-11-30T06:17:32.000Z | from setuptools import setup
def readme():
with open('README.md', encoding="utf8") as f:
README = f.read()
return README
setup(name="package_outlier",
version="0.9",
description="This is an outlier detection package",
install_requires=["scipy", "numpy", "pandas","scikit-learn","sta... | 30.25 | 91 | 0.646281 |
2dc321cabcfe8e036a76b4dc5883300b5857c758 | 9,221 | py | Python | atom/nucleus/python/nucleus_api/models/page_portfolio_transaction.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_portfolio_transaction.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_portfolio_transaction.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 27.774096 | 194 | 0.597549 |
2dc346a60fa4d5d176bdc084e8c05c7b34f43e3d | 278 | py | Python | locallibrary/users/apps.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | locallibrary/users/apps.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | locallibrary/users/apps.py | PFdevelopment/locallibrary | 7e061a72d67d1bc89fa792850c7a699fec48dea9 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'locallibrary.users'
verbose_name = "Users"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
pass
| 19.857143 | 37 | 0.600719 |
2dc3782eea58fb0dfca41b109174de6755f43ac1 | 176 | py | Python | abc/060/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/060/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/060/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | A, B, C = map(int, input().split())
S = set()
tmp_A = A
while A % B not in S:
if A % B == C:
print("YES")
exit()
S.add(A % B)
A += tmp_A
print("NO") | 17.6 | 35 | 0.443182 |
2dc397480f16fe69adabbb7109ac06d21848e249 | 866 | py | Python | tests/test_curve.py | mc-gulu-forked/bitsv | 2f89cc1ad0f950231ff925b9aea06a3047a5a941 | [
"MIT"
] | 1 | 2019-08-31T14:14:23.000Z | 2019-08-31T14:14:23.000Z | tests/test_curve.py | mc-gulu-forked/bitsv | 2f89cc1ad0f950231ff925b9aea06a3047a5a941 | [
"MIT"
] | 1 | 2020-01-10T13:16:36.000Z | 2020-01-10T13:16:36.000Z | tests/test_curve.py | mc-gulu-forked/bitsv | 2f89cc1ad0f950231ff925b9aea06a3047a5a941 | [
"MIT"
] | null | null | null | from bitsv.curve import Point, parity, x_to_y
X_CORRECT = 98231826851265556411949131072518137307566044384771278023089249290926817658893
Y_CORRECT = 18202689367598691302416718951920096486924260449729227135214517092930543058138
X_INCORRECT = 84395689074811850896746984745435708062140394031010675730965970759955946040649
Y... | 32.074074 | 91 | 0.78291 |
2dc3c6189f1a2d7fc04be42c3b5793f1f181c20b | 106 | py | Python | plugins/maildeck/maildeck.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | 1 | 2015-11-05T17:32:34.000Z | 2015-11-05T17:32:34.000Z | plugins/maildeck/maildeck.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | null | null | null | plugins/maildeck/maildeck.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | 1 | 2020-04-13T17:46:12.000Z | 2020-04-13T17:46:12.000Z | from mailpile.commands import Command
class maildeckCommand(Command):
HTTP_CALLABLE = ('GET',) | 26.5 | 37 | 0.716981 |
2dc3de3d3ea1e92db7aa9a264da0694813de3c34 | 39,383 | py | Python | letsencrypt/cli.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | letsencrypt/cli.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | letsencrypt/cli.py | mrudtf/letsencrypt | 6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3 | [
"Apache-2.0"
] | null | null | null | """Let's Encrypt command line argument & config processing."""
from __future__ import print_function
import argparse
import glob
import logging
import logging.handlers
import os
import sys
import traceback
import configargparse
import OpenSSL
import six
import letsencrypt
from letsencrypt import constants
from letse... | 43.135816 | 98 | 0.647945 |
2dc405344b6458463b9e8be96b8e977fe6b60c68 | 20,577 | py | Python | SCRAPE/Lib/site-packages/twisted/mail/mail.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/mail/mail.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/mail/mail.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.mail.test.test_mail -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Mail service support.
"""
# System imports
import os
import warnings
from zope.interface import implementer
from twisted.application import internet, service
from twisted.cred.portal imp... | 29.104668 | 79 | 0.599018 |
2dc42276ea4cf930df21142595967545f3baae4d | 1,747 | py | Python | Sklearn_scipy_numpy/source/scipy/__config__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Sklearn_scipy_numpy/source/scipy/__config__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/scipy/__config__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | # This file is generated by /tmp/pip-build-JIErOP/scipy/-c
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
atlas_3_10_blas_info={}
atlas_3_10_blas_threads_info={}
atlas_threads_info={'libraries': ['lapack', 'ptf77blas', 'ptcblas', 'atlas'], 'library_dirs': ['/usr/l... | 51.382353 | 230 | 0.62221 |
2dc4354f862bd1aa029e295076a190c267638101 | 2,615 | py | Python | tests/test_analyzer_ltrace.py | 2over12/archr | ba31e7b5f4b4df515c988155dd2320ee118036c9 | [
"BSD-2-Clause"
] | 58 | 2019-02-20T20:46:28.000Z | 2021-09-30T17:27:46.000Z | tests/test_analyzer_ltrace.py | 2over12/archr | ba31e7b5f4b4df515c988155dd2320ee118036c9 | [
"BSD-2-Clause"
] | 58 | 2019-02-20T20:22:51.000Z | 2022-01-28T21:19:01.000Z | tests/test_analyzer_ltrace.py | 2over12/archr | ba31e7b5f4b4df515c988155dd2320ee118036c9 | [
"BSD-2-Clause"
] | 16 | 2019-02-20T19:44:19.000Z | 2022-03-28T21:41:49.000Z | from time import sleep
import archr
import unittest
from common import build_container
BIN_CAT = "/bin/cat"
CAT_ARGS = ["/etc/passwd"]
LTRACE_ARGS = "-f -e malloc+free+open+read+write+socket+bind+accept-@libc.so* -n 2".split()
class TestAnalyzerLtrace(unittest.TestCase):
@classmethod
def setUpClass(cls):
... | 34.407895 | 125 | 0.642065 |
2dc43da96557af3502ac1fb0582a2b57ad4c4ff1 | 5,464 | py | Python | testing/pyDAE/cstr_NMPC_terminal_prop_sp_change.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 2 | 2019-09-26T20:56:06.000Z | 2019-11-18T21:03:27.000Z | testing/pyDAE/cstr_NMPC_terminal_prop_sp_change.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 6 | 2018-03-19T20:36:49.000Z | 2018-04-13T15:27:29.000Z | testing/pyDAE/cstr_NMPC_terminal_prop_sp_change.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 5 | 2018-10-04T18:51:02.000Z | 2020-07-02T15:31:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
from pyomo.environ import *
from sample_mods.cstr_rodrigo.cstr_c_nmpc import cstr_rodrigo_dae
from nmpc_mhe.pyomo_dae.NMPCGen_pyDAE import NmpcGen_DAE
from nmpc_mhe.aux.utils import load_iguess
from nmpc... | 43.023622 | 111 | 0.591874 |
2dc45888a93c6b3abbc9d65e32b465052bac0551 | 8,850 | py | Python | airflow_client/test/test_dag_state.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_dag_state.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_dag_state.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 239.189189 | 8,173 | 0.757853 |
2dc45cedb9a011c0785d7d2fc50e6457ae0891f8 | 1,614 | py | Python | cursoemvideoPy/Mundo3/aula20_continuacao.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/aula20_continuacao.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | cursoemvideoPy/Mundo3/aula20_continuacao.py | BrCarlini/exPython | 3bed986e5bfa5eae191b6b18306448926aed48fd | [
"MIT"
] | null | null | null | """
Aula - 20
- Interactive Help
- docstrings
- Argumentos/ Parametros opcionais
- Escopo de variáveis
- Retorno de resultados
"""
# Interactive Help
# help(print)
# help(int)
# print(input.__doc__)
######################################################
# Docstrings
def contador(i, f, p):
"""
-> Faz uma c... | 17.543478 | 104 | 0.516109 |
2dc47af27b8464a9a2a961153abd71866ea169cf | 21,422 | py | Python | devel/lib/python2.7/dist-packages/motoman_msgs/srv/_CmdJointTrajectoryEx.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | 1 | 2021-05-19T04:09:29.000Z | 2021-05-19T04:09:29.000Z | devel/lib/python2.7/dist-packages/motoman_msgs/srv/_CmdJointTrajectoryEx.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | null | null | null | devel/lib/python2.7/dist-packages/motoman_msgs/srv/_CmdJointTrajectoryEx.py | Pontiky/yaskawa-hc10-moveit | 2a6031f9404d285aa662636ccc941485b339e7fd | [
"BSD-2-Clause"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from motoman_msgs/CmdJointTrajectoryExRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import genpy
import motoman_msgs.msg
import std_msgs.msg
class... | 36.003361 | 172 | 0.627579 |
2dc4f31f1bf14108bdac93eb20b5640b7962538f | 7,261 | py | Python | generated/python/gapic-google-cloud-error-reporting-v1beta1/test/google/cloud/gapic/errorreporting/v1beta1/test_error_stats_service_client.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 18 | 2016-12-08T20:47:57.000Z | 2022-01-29T19:36:04.000Z | generated/python/gapic-google-cloud-error-reporting-v1beta1/test/google/cloud/gapic/errorreporting/v1beta1/test_error_stats_service_client.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 252 | 2016-09-21T20:51:36.000Z | 2021-03-25T23:02:36.000Z | generated/python/gapic-google-cloud-error-reporting-v1beta1/test/google/cloud/gapic/errorreporting/v1beta1/test_error_stats_service_client.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 37 | 2016-09-19T21:13:16.000Z | 2022-01-29T19:36:07.000Z | # Copyright 2017, Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 38.828877 | 91 | 0.717807 |
2dc534978ebc0bdddce0dbb7af68d06f8fef0e78 | 15,941 | py | Python | sigmapiweb/apps/PartyListV2/api.py | sigmapi-gammaiota/sigmapi-web | 4648112c8ed65694a2d07aa3af9573868cf72b45 | [
"MIT"
] | 8 | 2018-01-19T15:27:24.000Z | 2022-02-04T05:57:01.000Z | sigmapiweb/apps/PartyListV2/api.py | sigmapi-gammaiota/sigmapi-web | 4648112c8ed65694a2d07aa3af9573868cf72b45 | [
"MIT"
] | 71 | 2017-07-17T04:44:35.000Z | 2022-02-19T19:33:24.000Z | sigmapiweb/apps/PartyListV2/api.py | sigmapi-gammaiota/sigmapi-web | 4648112c8ed65694a2d07aa3af9573868cf72b45 | [
"MIT"
] | 6 | 2019-04-12T03:18:12.000Z | 2021-09-28T23:33:12.000Z | """ V2 of the API for the PartyList app. """
import csv
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import User
from django.db.models.functions import Lower
from django.http import JsonResponse, HttpResponse, HttpRequest
from apps.PartyListV2.models i... | 33.349372 | 100 | 0.64149 |
2dc536eaa5277375f33112c43424d66e3d0809cc | 2,383 | py | Python | sc-project/SC101_Assignment4_DP&tkinter/milestone1.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | sc-project/SC101_Assignment4_DP&tkinter/milestone1.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | sc-project/SC101_Assignment4_DP&tkinter/milestone1.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | """
File: Milestone1.py
Name: Allen Lee
-----------------------
This file tests the milestone 1 for
our babyname.py project
"""
import sys
def add_data_for_name(name_data, year, rank, name):
if name in name_data and year in name_data[name]:
if int(rank) < int(name_data[name][year]):
name_dat... | 30.948052 | 107 | 0.479648 |
2dc53c6405797c5601fef30653217bf2fd18a442 | 1,628 | py | Python | km/tools/find_mutation.py | iric-soft/km | d846d1b7c9cc19fcf263e64fe05080f274610d0c | [
"MIT"
] | 9 | 2017-12-18T23:38:19.000Z | 2022-03-18T13:52:56.000Z | km/tools/find_mutation.py | iric-soft/km | d846d1b7c9cc19fcf263e64fe05080f274610d0c | [
"MIT"
] | 11 | 2018-07-10T18:37:48.000Z | 2022-02-28T09:15:01.000Z | km/tools/find_mutation.py | iric-soft/km | d846d1b7c9cc19fcf263e64fe05080f274610d0c | [
"MIT"
] | 5 | 2017-10-27T15:13:31.000Z | 2021-02-10T17:53:13.000Z | # find_mutation ---
#
# Usage: find_mutation <region_fasta or directory> <jellyfish_db>
import os
import sys
import time
import logging as log
from .. utils import MutationFinder as umf
from .. utils import common as uc
from .. utils import Sequence as us
from .. utils.Jellyfish import Jellyfish
# ################... | 26.688525 | 77 | 0.623464 |
2dc56acd86762d00c021f1245fb5032fc07b7820 | 505 | py | Python | devito/types/__init__.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | devito/types/__init__.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | devito/types/__init__.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | # Need only from within Devito
from devito.types.basic import * # noqa
# Needed both within and outside Devito
from devito.types.dimension import * # noqa
from devito.types.utils import * # noqa
from devito.types.caching import _SymbolCache, CacheManager # noqa
# Needed only outside Devito
from devito.types.const... | 33.666667 | 67 | 0.758416 |
2dc583633a3346e06e200367f4b4edd3d9955482 | 669 | py | Python | apps/accounts/email_auth_backend.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 1 | 2020-01-26T16:02:27.000Z | 2020-01-26T16:02:27.000Z | apps/accounts/email_auth_backend.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | null | null | null | apps/accounts/email_auth_backend.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 2 | 2018-09-29T18:53:08.000Z | 2020-01-26T16:02:31.000Z | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
class EmailBackend(ModelBackend):
def authenticate(self, username=None, password=None, **kwargs):
UserModel = get_user_model()
try:
user = UserModel.objects.get(email=username)
... | 27.875 | 67 | 0.629297 |
2dc594669212da0c4577341d02b512df641db863 | 2,069 | py | Python | timemory/gperf/__init__.py | m-gul/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | 1 | 2019-12-06T22:21:13.000Z | 2019-12-06T22:21:13.000Z | timemory/gperf/__init__.py | hbrunie/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | null | null | null | timemory/gperf/__init__.py | hbrunie/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | null | null | null | #!@PYTHON_EXECUTABLE@
# MIT License
#
# Copyright (c) 2019, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
#
# Permission is hereby granted, free of charge, to any person o... | 35.067797 | 80 | 0.765104 |
2dc5dd2e36bd8aa35fe6e162915474fdbd82a6c2 | 586 | py | Python | migrations/versions/0080_fix_rate_start_date.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | migrations/versions/0080_fix_rate_start_date.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | migrations/versions/0080_fix_rate_start_date.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | """empty message
Revision ID: 0080_fix_rate_start_date
Revises: 0079_update_rates
Create Date: 2017-05-03 16:50:11.334116
"""
# revision identifiers, used by Alembic.
revision = "0080_fix_rate_start_date"
down_revision = "0079_update_rates"
import sqlalchemy as sa
from alembic import op
def upgrade():
op.get_... | 23.44 | 110 | 0.728669 |
2dc5e3a0af44bfac9b02cb44998467cc8aaea7b8 | 284 | py | Python | oscar/lib/python2.7/site-packages/faker/providers/phone_number/hi_IN/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/hi_IN/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/hi_IN/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
'+91 ##########',
'+91 ### #######',
'0##-########',
'0##########',
'0#### ######',
)
| 21.846154 | 47 | 0.426056 |
2dc5f431a502874b490827d6e816e2a6f5cdd465 | 11,143 | py | Python | tests/test_user.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | tests/test_user.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | tests/test_user.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | import os
import pytest
import stubs
import config
from user import User
def test_user_init_email_sanitised():
test1 = "anormalemail@example.gov.uk"
assert User(test1).email_address == test1
assert User("ANEMAIL@example.gov.uk").email_address == "anemail@example.gov.uk"
assert User(" anemail@exampl... | 32.677419 | 87 | 0.702324 |
2dc5f551cafb47e0d31cc743269c0355a7e0a65f | 3,491 | py | Python | src/models/LSTM.py | ivan-ivy/ECBM4040-final-project-WSAE-LSTM | 5fa85a169347f905d840adc188f755a70ea5ea0c | [
"MIT"
] | 6 | 2020-01-23T16:25:18.000Z | 2021-04-16T00:37:07.000Z | src/models/LSTM.py | ivan-ivy/ECBM4040-final-project-WSAE-LSTM | 5fa85a169347f905d840adc188f755a70ea5ea0c | [
"MIT"
] | 4 | 2020-09-25T21:02:07.000Z | 2022-02-10T01:33:38.000Z | src/models/LSTM.py | ivan-ivy/ECBM4040-final-project-WSAE-LSTM | 5fa85a169347f905d840adc188f755a70ea5ea0c | [
"MIT"
] | 1 | 2021-11-26T10:59:17.000Z | 2021-11-26T10:59:17.000Z | import numpy as np
import tensorflow as tf
from .metrics import MeanAbsolutePercentageError, TheilU, LinearCorrelation
def build_lstm_model(inputs_shape,
layers=5,
units=[64, 64, 64, 64, 64],
learning_rate=0.05):
"""
Args:
inputs_shape: s... | 32.027523 | 94 | 0.621598 |
2dc5f5ee61fa68f4452fe60de2c71419cf277315 | 3,061 | py | Python | proxy/core/event/dispatcher.py | GDGSNF/proxy.py | 3ee2824217286df3c108beadf3185eee35c28b49 | [
"BSD-3-Clause"
] | null | null | null | proxy/core/event/dispatcher.py | GDGSNF/proxy.py | 3ee2824217286df3c108beadf3185eee35c28b49 | [
"BSD-3-Clause"
] | null | null | null | proxy/core/event/dispatcher.py | GDGSNF/proxy.py | 3ee2824217286df3c108beadf3185eee35c28b49 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 33.637363 | 86 | 0.641294 |
2dc60441cc95333d635d394025f25e529565cb4e | 837 | py | Python | python/vineyard/core/__init__.py | TREiop/v6d | 9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175 | [
"Apache-2.0",
"CC0-1.0"
] | 417 | 2020-10-23T12:35:27.000Z | 2021-04-15T09:37:00.000Z | python/vineyard/core/__init__.py | TREiop/v6d | 9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175 | [
"Apache-2.0",
"CC0-1.0"
] | 160 | 2020-10-27T16:27:12.000Z | 2021-04-19T01:35:29.000Z | python/vineyard/core/__init__.py | TREiop/v6d | 9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175 | [
"Apache-2.0",
"CC0-1.0"
] | 28 | 2020-10-27T15:40:48.000Z | 2021-04-16T08:03:16.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020-2021 Alibaba Group Holding Limited.
#
# 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/LI... | 38.045455 | 74 | 0.775388 |
2dc61ede34d2376e793004c4a22b9cf40b786760 | 9,871 | py | Python | cfg.py | DeepPSP/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | 1 | 2021-12-07T11:44:48.000Z | 2021-12-07T11:44:48.000Z | cfg.py | wenh06/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | null | null | null | cfg.py | wenh06/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | 1 | 2021-05-25T14:56:02.000Z | 2021-05-25T14:56:02.000Z | """
"""
import os
from itertools import repeat
from copy import deepcopy
import pywt
import numpy as np
from easydict import EasyDict as ED
__all__ = [
"BaseCfg",
"PreprocCfg",
"FeatureCfg",
"ModelCfg",
"TrainCfg",
"PlotCfg",
]
_BASE_DIR = os.path.dirname(os.path.abspath(__file__))
BaseCf... | 32.25817 | 112 | 0.70854 |
2dc64b8d04841ec36f3dd40c998c22cc35bab0c2 | 374 | py | Python | controller/l3_router_lazy.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 6 | 2019-04-28T15:27:09.000Z | 2021-05-24T10:43:44.000Z | controller/l3_router_lazy.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | null | null | null | controller/l3_router_lazy.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 1 | 2019-11-12T07:34:50.000Z | 2019-11-12T07:34:50.000Z | #!/usr/bin/env python
from controller.base_controller_twisted import BaseController, main
from controller.l2_lazy import L2SwitchLazy
from controller.arp_lazy import ArpLazy
from controller.ipv4_routing_topo import IPv4Routing
class Router(IPv4Routing, ArpLazy, L2SwitchLazy, BaseController):
pa... | 26.714286 | 67 | 0.764706 |
2dc658f8a6843d5f289589d3febbc951491429b8 | 6,646 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/health_checks/update/https.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/health_checks/update/https.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/health_checks/update/https.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 35.924324 | 80 | 0.68372 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.