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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
791f971844bcf2e95eda601163fa5d7db35842ec | 40,593 | py | Python | sopel/bot.py | kwaaak/sopel | 03c3ea025b70ecf5433dc5ffab9677b7682269fe | [
"EFL-2.0"
] | null | null | null | sopel/bot.py | kwaaak/sopel | 03c3ea025b70ecf5433dc5ffab9677b7682269fe | [
"EFL-2.0"
] | null | null | null | sopel/bot.py | kwaaak/sopel | 03c3ea025b70ecf5433dc5ffab9677b7682269fe | [
"EFL-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>
# Copyright 2012-2015, Elsie Powell, http://embolalia.com
# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>
#
# Licensed under the Eiffel Forum License 2.
from __future__ import uni... | 38.223164 | 106 | 0.587786 |
791fe15417f746257b8f1955633f45f4382a9d41 | 14,764 | py | Python | app/objects/c_operation.py | Th3FirstAvenger/caldera | a452188c5a7fa6c38e1d9197781d04960b3d3438 | [
"Apache-2.0"
] | null | null | null | app/objects/c_operation.py | Th3FirstAvenger/caldera | a452188c5a7fa6c38e1d9197781d04960b3d3438 | [
"Apache-2.0"
] | null | null | null | app/objects/c_operation.py | Th3FirstAvenger/caldera | a452188c5a7fa6c38e1d9197781d04960b3d3438 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import re
import uuid
from collections import defaultdict
from copy import deepcopy
from datetime import datetime
from enum import Enum
from importlib import import_module
from random import randint
import marshmallow as ma
from app.objects.c_adversary import AdversarySchema
from app.obj... | 44.739394 | 173 | 0.609252 |
791fe636c9ce15f6b408542338f6440712de4d37 | 89 | py | Python | cl4py/__init__.py | crosenblatt/cl4py | 4ab72db138bf584b471698f892e8c8c2c4e5d174 | [
"MIT"
] | 72 | 2018-05-17T11:28:53.000Z | 2022-03-21T20:05:09.000Z | cl4py/__init__.py | crosenblatt/cl4py | 4ab72db138bf584b471698f892e8c8c2c4e5d174 | [
"MIT"
] | 21 | 2018-12-19T13:02:56.000Z | 2022-02-17T23:36:03.000Z | cl4py/__init__.py | crosenblatt/cl4py | 4ab72db138bf584b471698f892e8c8c2c4e5d174 | [
"MIT"
] | 8 | 2019-02-19T22:39:05.000Z | 2022-03-25T16:43:49.000Z | from .data import List, DottedList, Quote, Cons, Symbol, Keyword
from .lisp import Lisp
| 22.25 | 64 | 0.764045 |
79200a78ba9db83e4f2f7eb457e8144749cb2027 | 24,663 | py | Python | Optical/optical_modeling.py | Dillon-Z-Dong/VT1210 | 8870043a1e9a665087103d42fade541d95f4c1b1 | [
"MIT"
] | null | null | null | Optical/optical_modeling.py | Dillon-Z-Dong/VT1210 | 8870043a1e9a665087103d42fade541d95f4c1b1 | [
"MIT"
] | null | null | null | Optical/optical_modeling.py | Dillon-Z-Dong/VT1210 | 8870043a1e9a665087103d42fade541d95f4c1b1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import minimize
import emcee
import corner
from IPython.display import display, Math
from matplotlib import rc
import matplotlib
from collections import OrderedDict
spec_C477 = pd.read_csv('lrisC0477_g1.spec',sep='\s+',skipr... | 51.596234 | 469 | 0.617889 |
79200e8aaf4e47691249c1abc48eadedb7d7a137 | 329 | py | Python | tags/factories.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 187 | 2018-03-08T11:18:11.000Z | 2021-12-26T13:29:02.000Z | tags/factories.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 67 | 2018-03-09T14:56:47.000Z | 2021-06-24T08:52:40.000Z | tags/factories.py | bllli/Django-China-API | 79a5d85fe88ba7784d08d370b8e7519f7274f208 | [
"MIT"
] | 52 | 2018-03-08T11:18:12.000Z | 2021-08-02T16:07:04.000Z | # factories that automatically create user data
import factory
from users.factories import UserFactory
from .models import Tag
class TagFactory(factory.DjangoModelFactory):
class Meta:
model = Tag
name = factory.Sequence(lambda n: 'tag%s' % n)
creator = factory.SubFactory(UserFactory, username=... | 21.933333 | 63 | 0.738602 |
7920136fedc2b0cf46094ce9b145f1b0d46b6b97 | 5,010 | py | Python | axonius_api_client/cli/grp_assets/cmd_get_fields.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/cli/grp_assets/cmd_get_fields.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/cli/grp_assets/cmd_get_fields.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
import re
from ...constants.fields import AGG_ADAPTER_NAME
from ...parsers.tables import tablize
from ...tools import json_dump
from ..context import CONTEXT_SETTINGS, click
from ..options import AUTH, add_options
OPTIONS = [
*AUTH,
... | 26.230366 | 93 | 0.547505 |
79201759e624e15a63a6cd70e18b3e5d7105cf9c | 2,704 | py | Python | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.628571 | 95 | 0.721893 |
7920394927f9a612c348fcf39557d948a43e3bde | 2,612 | py | Python | docs/source/conf.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | docs/source/conf.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | docs/source/conf.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path se... | 33.063291 | 79 | 0.659265 |
792049d967125a87764b2abd1e57b241cd78dae6 | 832 | py | Python | docker_boot.py | Sjors/patron | a496097ad0821b677c8e710e8aceb587928be31c | [
"MIT"
] | 114 | 2018-12-30T20:43:37.000Z | 2022-03-21T18:57:47.000Z | docker_boot.py | Sjors/patron | a496097ad0821b677c8e710e8aceb587928be31c | [
"MIT"
] | 17 | 2019-04-25T20:20:57.000Z | 2022-03-29T21:48:35.000Z | docker_boot.py | Sjors/patron | a496097ad0821b677c8e710e8aceb587928be31c | [
"MIT"
] | 17 | 2019-01-02T06:37:11.000Z | 2022-03-29T22:22:40.000Z | import os
import requests
import time
'''
Some configuration options are loaded from the database,
however the database cannot be loaded until after Flask app creation.
Therefore, some config has to be done by registering the config
functions with @app.before_first_request decorator in the app
factory. The script in t... | 26.83871 | 74 | 0.671875 |
79206f62f5c9ed529a584abd74b02b805e79526f | 8,447 | py | Python | cinderclient/tests/unit/v3/test_volumes.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | cinderclient/tests/unit/v3/test_volumes.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | cinderclient/tests/unit/v3/test_volumes.py | deepanshhu/python-cinderclient | 2c0f74c708fd09c5ae813255aaa671073f2fe250 | [
"Apache-1.1"
] | null | null | null | # Copyright 2016 FUJITSU LIMITED
# Copyright (c) 2016 EMC Corporation
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licen... | 45.413978 | 79 | 0.581508 |
79209dc12e579e9eecb2cb88cb88349229a771f5 | 139 | py | Python | fideslib/oauth/jwt.py | ethyca/fideslib | 4e302f996707840463afbfecdc4bfcd72624ef62 | [
"Apache-2.0"
] | null | null | null | fideslib/oauth/jwt.py | ethyca/fideslib | 4e302f996707840463afbfecdc4bfcd72624ef62 | [
"Apache-2.0"
] | 1 | 2022-01-27T17:18:39.000Z | 2022-02-15T23:26:24.000Z | fideslib/oauth/jwt.py | ethyca/fideslib | 4e302f996707840463afbfecdc4bfcd72624ef62 | [
"Apache-2.0"
] | null | null | null | """
Keys included in JSON web token payloads.
"""
JWE_ISSUED_AT = "iat"
JWE_PAYLOAD_CLIENT_ID = "client-id"
JWE_PAYLOAD_SCOPES = "scopes"
| 17.375 | 41 | 0.741007 |
7920a26344c0acd98b1161d833ae006fd905dd01 | 7,149 | py | Python | scripts/artifacts/knowCappact.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | 1 | 2020-10-06T20:28:03.000Z | 2020-10-06T20:28:03.000Z | scripts/artifacts/knowCappact.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | scripts/artifacts/knowCappact.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | import glob
import os
import pathlib
import plistlib
import sqlite3
import scripts.artifacts.artGlobals #use to get iOS version -> iOSversion = scripts.artifacts.artGlobals.versionf
from packaging import version #use to search per version number
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapf... | 51.431655 | 317 | 0.619947 |
7920a28bfb0b2986df81027fb7d5255976a856dd | 4,028 | py | Python | alipay/aop/api/request/AlipayOpenOperationBizfeeActivityApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenOperationBizfeeActivityApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenOperationBizfeeActivityApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenOperationBizfeeActivityApplyModel import AlipayOpenOperationBizfeeActivityApplyModel
class AlipayOpenOperationBizfeeActivi... | 27.77931 | 148 | 0.649454 |
7920c25d50f2e1bfff6cbecdb8726325f9e9fbe1 | 26,441 | py | Python | xd_xd/aa/road_networks/skeletonize.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 27 | 2020-03-04T05:54:48.000Z | 2022-01-05T07:07:44.000Z | xd_xd/aa/road_networks/skeletonize.py | CosmiQ/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 1 | 2020-07-14T10:35:50.000Z | 2020-07-14T10:35:50.000Z | xd_xd/aa/road_networks/skeletonize.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 7 | 2020-03-07T21:42:57.000Z | 2022-01-07T10:49:50.000Z | # -*- coding: utf-8 -*-
from logging import getLogger
from pathlib import Path
import os
import json
import time
import random
import argparse
import logging
from itertools import tee
from collections import OrderedDict #, defaultdict
from multiprocessing import Pool, cpu_count
from scipy.spatial.distance import (
... | 31.895054 | 116 | 0.56957 |
7920c83534274b0df158b5dfcbf417921f440bc0 | 4,448 | py | Python | diesel/pipeline.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | diesel/pipeline.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | diesel/pipeline.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z | # vim:ts=4:sw=4:expandtab
'''An outgoing pipeline that can handle
strings or files.
'''
try:
import cStringIO
except ImportError:
raise ImportError, "cStringIO is required"
from bisect import bisect_right
_obj_SIO = cStringIO.StringIO
_type_SIO = cStringIO.OutputType
def make_SIO(d):
t = _obj_SIO()
t.... | 27.8 | 92 | 0.560477 |
79214374e88987a960407f6c5154659aaaeb674a | 7,459 | py | Python | niapy/tests/test_hde.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/tests/test_hde.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 1 | 2021-08-13T07:52:40.000Z | 2021-08-16T08:52:20.000Z | niapy/tests/test_hde.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 2 | 2021-08-08T08:29:53.000Z | 2021-08-12T15:31:55.000Z | # encoding=utf8
from niapy.algorithms.modified import DifferentialEvolutionMTS, DifferentialEvolutionMTSv1, \
MultiStrategyDifferentialEvolutionMTS, MultiStrategyDifferentialEvolutionMTSv1, \
DynNpMultiStrategyDifferentialEvolutionMTS, DynNpMultiStrategyDifferentialEvolutionMTSv1, \
DynNpDifferentialEvoluti... | 54.445255 | 128 | 0.751173 |
79216891b403e8e4667e7e711077373e1b029268 | 31,488 | py | Python | pytorch/test/jit/test_save_load.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/jit/test_save_load.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/jit/test_save_load.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | import os
import io
import sys
import random
import torch
from itertools import product as product
from torch import Tensor
from typing import NamedTuple
# Make the helper files in test/ importable
pytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(pytorch_test_dir)
from to... | 35.904219 | 129 | 0.579491 |
79216c8cd3d246b41ea092301ac77ca3a89e6259 | 3,866 | py | Python | openpnm/phases/GenericPhase.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2020-06-08T19:48:00.000Z | 2020-06-08T19:48:00.000Z | openpnm/phases/GenericPhase.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | openpnm/phases/GenericPhase.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | from openpnm.core import Base, ModelsMixin
from openpnm.utils import Workspace, logging, Docorator
from numpy import ones
import openpnm.models as mods
docstr = Docorator()
logger = logging.getLogger(__name__)
ws = Workspace()
@docstr.get_sectionsf('GenericPhase', sections=['Parameters'])
@docstr.dedent
class Generic... | 38.277228 | 89 | 0.532333 |
7921739189d0c29796a23e34a0d4daaa4ea9060d | 8,365 | py | Python | gnocchi/archive_policy.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | gnocchi/archive_policy.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | gnocchi/archive_policy.py | ISCAS-VDI/gnocchi-base | c5ed96a6fb8d925702f410c1382eb36bd991443b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2014-2015 eNovance
#
# 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... | 34.282787 | 79 | 0.580036 |
79217ca02d1b054ff40d72c545da4b224da37e06 | 9,269 | py | Python | util/timit/old/timit_preprocess_mfcc40_spikegram32.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | util/timit/old/timit_preprocess_mfcc40_spikegram32.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | util/timit/old/timit_preprocess_mfcc40_spikegram32.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | # reference : https://github.com/Faur/TIMIT
# https://github.com/jameslyons/python_speech_features/issues/53
import os
import sys
import timeit; program_start_time = timeit.default_timer()
import random; random.seed(int(timeit.default_timer()))
from six.moves import cPickle
import numpy as np
import librosa
# a py... | 32.409091 | 128 | 0.627036 |
79219ad075715c2c3d97176488a00ddd25e6209f | 1,571 | py | Python | code/feature_extraction/cap_words_count.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | 1 | 2021-10-04T11:49:51.000Z | 2021-10-04T11:49:51.000Z | code/feature_extraction/cap_words_count.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | null | null | null | code/feature_extraction/cap_words_count.py | jlinkemeyer/MLinPractice | ef96888ef0565b84fece4283fe8dd8dc809c5e99 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Feature that counts the number of capitalized words within a tweet.
Created on Fri Oct 8 12:51:27 2021
@author: jlinkemeyer
"""
import numpy as np
from code.feature_extraction.feature_extractor import FeatureExtractor
from code.util import TOKEN_DELIMITER, ALL_CAPS... | 36.534884 | 122 | 0.67091 |
7921ab938a021ad93c8b1088ca0493a6e4cc44e6 | 1,727 | py | Python | day19.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | day19.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | day19.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | import string
import re
TEST_INPUT = """H => HO
H => OH
O => HH
HOH""".splitlines()
PART_TWO_TEST = """e => H
e => O
H => HO
H => OH
O => HH
HOHOHO""".splitlines()
def parse_input(puzzle: list[str]) -> tuple[tuple[re.Pattern, str], str]:
assert not puzzle[-2]
input_molecule = puzzle[-1].strip()
reacti... | 26.569231 | 77 | 0.628836 |
7921e6c7bfcac95cc314924d8e0b1cda4e824184 | 2,050 | py | Python | src/core/utils.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | src/core/utils.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | 48 | 2017-04-21T17:35:23.000Z | 2020-08-29T04:19:35.000Z | src/core/utils.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | # coding: utf-8
u"""Funciones útiles comunes a cerebro."""
# app: cmi
# module: core.utils
# date: lunes, 28 de mayo de 2018 - 14:07
# description: Funciones, clases y objetos comunes
# pylint: disable=W0613,R0201,R0903
from datetime import date
from workdays import networkdays
from django import ... | 29.285714 | 79 | 0.634146 |
7921f3b59a0ae652d16fc90ccc1850f04eab1571 | 2,900 | py | Python | resolwe_bio/processes/slamdunk/alleyoop_snpeval.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/processes/slamdunk/alleyoop_snpeval.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/processes/slamdunk/alleyoop_snpeval.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | """Run Alleyoop snpeval tool on Slamdunk results."""
import os
from plumbum import TEE
from resolwe.process import (
Cmd,
DataField,
FileField,
IntegerField,
Process,
StringField,
)
class AlleyoopSnpEval(Process):
"""Run Alleyoop snpeval."""
slug = "alleyoop-snpeval"
process_typ... | 29 | 91 | 0.566897 |
7921f5bcec23c3c7e6c4de8f1da6f12efceaf5ea | 1,162 | py | Python | src/oscar/apps/dashboard/pages/app.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/dashboard/pages/app.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/dashboard/pages/app.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from oscar.core.application import DashboardApplication
from oscar.core.loading import get_class
class FlatPageManagementApplication(DashboardApplication):
name = None
default_permissions = ['is_staff', ]
list_view = get_class('dashboard.pages.views', 'PageList... | 36.3125 | 79 | 0.63167 |
7922179d65b61718a5180895e17d8a3602c4cfd3 | 1,456 | py | Python | app/modules/iris/param.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 16 | 2020-03-26T13:21:15.000Z | 2021-07-25T18:49:05.000Z | app/modules/iris/param.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 13 | 2020-03-24T18:19:48.000Z | 2022-03-12T00:18:59.000Z | app/modules/iris/param.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 14 | 2020-03-31T01:02:38.000Z | 2021-09-17T01:10:36.000Z | """
IRIS Module Request Parameter
PROJECT: BaoAI Backend
AUTHOR: henry <703264459@qq.com>
WEBSITE: http://www.baoai.co
COPYRIGHT: Copyright © 2016-2020 广州源宝网络有限公司 Guangzhou Yuanbao Network Co., Ltd. ( http://www.ybao.org )
LICENSE: Apache-2.0
CREATEDATE: 2019-08-23 16:18:40
"""
from flask_marshmallow import base_fie... | 36.4 | 152 | 0.780907 |
79226baa773b6e75c232fdb5f27b5bf3304d58f0 | 431 | py | Python | lyaf_optdepth/cli.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/cli.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/cli.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Console script for lyaf_optdepth."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for lyaf_optdepth."""
click.echo("Replace this message by putting your code into "
"lyaf_optdepth.cli.main")
click.echo("See click documentation a... | 22.684211 | 68 | 0.651972 |
79227dd253ddf544bcfd0139349c7cdf17b8d0f8 | 9,017 | py | Python | gobbli/augment/bert/src/augment_text.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 1 | 2019-10-17T17:43:26.000Z | 2019-10-17T17:43:26.000Z | gobbli/augment/bert/src/augment_text.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | null | null | null | gobbli/augment/bert/src/augment_text.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 1 | 2019-10-17T17:43:27.000Z | 2019-10-17T17:43:27.000Z | import argparse
import torch
import torch.nn.functional as F
from pytorch_transformers import BertConfig, BertForMaskedLM, BertTokenizer
def batch_list(l, batch_size):
for i in range(0, len(l), batch_size):
yield l[i : i + batch_size]
def encode_batch(batch, tokenizer, config):
# Truncate input bas... | 39.204348 | 95 | 0.521903 |
79228b9d3334d55884550ae943231b731a070806 | 361 | py | Python | djangosite/snippets/forms.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | djangosite/snippets/forms.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | djangosite/snippets/forms.py | chris-nowlin/SurfGeckos | b84b38baa7d3250b0ff16146a93415ce3509bf98 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from .models import SiteQuery, SiteContaminant
class SiteQueryForm(ModelForm):
class Meta:
model = SiteQuery
fields = ['site_id',
'address',
'name',
'land_use',
'groundwater_use',
... | 24.066667 | 46 | 0.493075 |
79229946993e63f0ce02f55945ea3dd96e489cbb | 354 | py | Python | chapter6/variables2.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/variables2.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/variables2.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | strikeout = 'K'
className = "This is CS50."
age = 30
anotherAge = 63
pi = 3.14
morePi = 3.1415962
fun = True
print("strikeout: {}".format(strikeout))
print("className: {}".format(className))
print("age: {}".format(age))
print("anotherAge: {}".format(anotherAge))
print("pi: {}".format(pi))
print("morePi: {}".format(mor... | 23.6 | 42 | 0.658192 |
792299987fdaaec6f620ee7767dd97d487cc8d93 | 3,183 | py | Python | api_tests/registrations/filters/test_filters.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api_tests/registrations/filters/test_filters.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api_tests/registrations/filters/test_filters.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa
import pytest
from osf.models import Node
from osf_tests.factories import (
AuthUserFactory,
NodeFactory,
ProjectFactory,
RegistrationFactory,
)
class RegistrationListFilteringMixin(object):
def setUp(self):
super(Registra... | 41.881579 | 99 | 0.666981 |
79229fcb1f674c9b72d9c4276bad78034eabd994 | 16,335 | py | Python | pay-api/tests/unit/services/test_payment_transaction.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_payment_transaction.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_payment_transaction.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 42.874016 | 116 | 0.775574 |
7922b498bc0a5f2bbdec479834bb7a9d4c479268 | 201 | py | Python | iris_sdk/models/maps/feature_lidb.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/feature_lidb.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/feature_lidb.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class FeatureLidbMap(BaseMap):
status = None
subscriber_information = None
use_type = None
visibility = None
| 18.272727 | 49 | 0.726368 |
7922bc205825ee60a318a18c9d71e1df22e8f4cb | 3,036 | py | Python | tests/readers/tds_test.py | practo/Tableau-Py | eb2e354be8558af8ee438afbfc73e010a6b0421d | [
"MIT"
] | null | null | null | tests/readers/tds_test.py | practo/Tableau-Py | eb2e354be8558af8ee438afbfc73e010a6b0421d | [
"MIT"
] | 15 | 2016-12-22T19:05:44.000Z | 2021-12-13T19:35:47.000Z | tests/readers/tds_test.py | practo/Tableau-Py | eb2e354be8558af8ee438afbfc73e010a6b0421d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit Test Cases for TDSReader"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
import yaml
import config
from tableaupy.readers import TDSReader
from tests.readers.base_test import ReaderBaseTest
class TestTD... | 26.631579 | 75 | 0.626812 |
79230dfd06bf3721508d86cf9e8020ec47b746aa | 2,946 | py | Python | projects/adaptive_learning/train.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | projects/adaptive_learning/train.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | projects/adaptive_learning/train.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""... | 30.061224 | 95 | 0.671419 |
79232ad218a1589d36817b952060fc0b981af255 | 157 | py | Python | old/numpy-examples.py | TonySoloProjects/lake_analyses | 08a07306b4da3b85e3445732999cb0742ca03e87 | [
"FTL"
] | null | null | null | old/numpy-examples.py | TonySoloProjects/lake_analyses | 08a07306b4da3b85e3445732999cb0742ca03e87 | [
"FTL"
] | null | null | null | old/numpy-examples.py | TonySoloProjects/lake_analyses | 08a07306b4da3b85e3445732999cb0742ca03e87 | [
"FTL"
] | null | null | null | # fun with numpy
import numpy as np
def f(x,y):
print(f'x=\n{x}')
print(f'y=\n{y}')
return x+y
z = np.fromfunction(f,(4,3))
print(f'z=\n{z}')
| 13.083333 | 28 | 0.547771 |
792350b8c452e9736a86927fd1681c48d39c9673 | 120 | py | Python | rllib/agents/maddpg/__init__.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | rllib/agents/maddpg/__init__.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | rllib/agents/maddpg/__init__.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | from ray.rllib.agents.maddpg.maddpg import MADDPGTrainer, DEFAULT_CONFIG
__all__ = ["MADDPGTrainer", "DEFAULT_CONFIG"]
| 30 | 72 | 0.808333 |
7923765b99d822c40a5f8d1d2c70c919ae928fe5 | 367 | py | Python | src/CryptoPlus/Cipher/__init__.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 64 | 2015-01-15T10:41:41.000Z | 2022-01-10T23:51:42.000Z | src/CryptoPlus/Cipher/__init__.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 5 | 2016-01-05T17:48:22.000Z | 2018-02-22T04:32:17.000Z | src/CryptoPlus/Cipher/__init__.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 53 | 2015-04-14T00:17:02.000Z | 2022-03-12T05:32:05.000Z | from Crypto.Cipher import ARC4, XOR
__all__ = ["AES","python_AES","python_DES","python_DES3","DES","DES3","Blowfish","python_Blowfish","python_Twofish","python_Serpent","python_Rijndael","ARC4","ARC2","CAST","XOR","python_PRESENT"]
try:
import Crypto.Cipher.IDEA
__all__.append("IDEA")
__all__.... | 33.363636 | 195 | 0.683924 |
79237f7e6a3aaf1c84743f0ccbf3d2fd4d82f39c | 748 | py | Python | test/algo/__init__.py | Microsoft/nni | b99e26833287c901f6d808d07ea6882014b05f58 | [
"MIT"
] | 2,305 | 2018-09-07T12:42:26.000Z | 2019-05-06T20:14:24.000Z | test/algo/__init__.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 379 | 2018-09-10T10:19:50.000Z | 2019-05-06T18:04:46.000Z | test/algo/__init__.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 314 | 2018-09-08T05:36:08.000Z | 2019-05-06T08:48:51.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Extra tests for "algorithms", complementary to UT.
If the test satisfies one of the following conditions, it should be put here:
1. The test could take a while to finish.
2. The test doesn't work on the free agent. It needs accelerators lik... | 37.4 | 109 | 0.768717 |
792395571c55f60ffb203c1fd890f1fdc22eed88 | 3,945 | py | Python | AN24_05.py | carterjgreen/undergrad-thesis | b6cd0270ab06eb889bd409f585f44953b1994887 | [
"BSD-3-Clause"
] | null | null | null | AN24_05.py | carterjgreen/undergrad-thesis | b6cd0270ab06eb889bd409f585f44953b1994887 | [
"BSD-3-Clause"
] | null | null | null | AN24_05.py | carterjgreen/undergrad-thesis | b6cd0270ab06eb889bd409f585f44953b1994887 | [
"BSD-3-Clause"
] | null | null | null | # AN77_05 -- Mimo processing
import Class.Adf24Tx2Rx4 as Adf24Tx2Rx4
import Class.RadarProc as RadarProc
import time as time
import matplotlib.pyplot as plt
from numpy import *
# (1) Connect to DemoRad
# (2) Enable Supply
# (3) Configure RX
# (4) Configure TX
# (5) Start Measurements
# (6) Configure signal proc... | 33.151261 | 75 | 0.302915 |
79239d365544b6221520fbe693b4a88bfc6148ed | 1,537 | py | Python | bflib/characters/races/goblin.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/characters/races/goblin.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/characters/races/goblin.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from datetime import timedelta
import bflib.items.weapons.ranged.bows
from bflib import languages, restrictions, units
from bflib.characters import abilityscores, specialabilities
from bflib.characters.races.base import Race
class Goblin(Race):
name = "Goblin"
average_height = units.Feet(3)
average_weigh... | 38.425 | 80 | 0.738452 |
7923b3e282aa55a398584e63bb8d39e070530c44 | 976 | py | Python | setup.py | ei-grad/muffin-classy | af54694e5a3b952ec1aebd7c9f4c709f011e2234 | [
"BSD-3-Clause"
] | 1 | 2015-10-28T21:53:46.000Z | 2015-10-28T21:53:46.000Z | setup.py | ei-grad/muffin-classy | af54694e5a3b952ec1aebd7c9f4c709f011e2234 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ei-grad/muffin-classy | af54694e5a3b952ec1aebd7c9f4c709f011e2234 | [
"BSD-3-Clause"
] | null | null | null | """
Muffin-Classy
-------------
Class based views for Muffin
"""
from setuptools import setup
setup(
name='Muffin-Classy',
version='0.0.0-0',
url='https://github.com/ei-grad/muffin-classy',
license='BSD',
author='Andrew Grigorev',
author_email='andrew@ei-grad.ru',
description='Class based ... | 26.378378 | 70 | 0.616803 |
7923ca34a37ff69248cffa4f5607fc66fdfc981c | 1,698 | py | Python | eg_uma/.ipynb_checkpoints/find_line-checkpoint.py | davidjwilson/pceb | 259cf4b18b51b7163d6ce84ab150c5f65f8cfdec | [
"MIT"
] | null | null | null | eg_uma/.ipynb_checkpoints/find_line-checkpoint.py | davidjwilson/pceb | 259cf4b18b51b7163d6ce84ab150c5f65f8cfdec | [
"MIT"
] | null | null | null | eg_uma/.ipynb_checkpoints/find_line-checkpoint.py | davidjwilson/pceb | 259cf4b18b51b7163d6ce84ab150c5f65f8cfdec | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import astropy.io.fits as fits
import glob
from astropy.table import Table
from astropy.io import ascii
from astropy.convolution import convolve, Box1DKernel
import astropy.units as u
x1 = []
def on_key(event):
global x1
if event.key == 'w':
x1.append... | 32.037736 | 121 | 0.644287 |
7923e23e6f20dd7163d1054269fbd30e6c333a4e | 826 | py | Python | brody_lab_to_nwb/interfaces/customsortingextractor.py | catalystneuro/brody-lab-to-nwb | bb792591eae988b2dec1a3a608979832da8f884d | [
"MIT"
] | null | null | null | brody_lab_to_nwb/interfaces/customsortingextractor.py | catalystneuro/brody-lab-to-nwb | bb792591eae988b2dec1a3a608979832da8f884d | [
"MIT"
] | 10 | 2021-05-24T22:17:27.000Z | 2022-03-30T05:42:02.000Z | brody_lab_to_nwb/interfaces/customsortingextractor.py | catalystneuro/brody-lab-to-nwb | bb792591eae988b2dec1a3a608979832da8f884d | [
"MIT"
] | null | null | null | import numpy as np
import spikeextractors as se
class CustomSortingExtractor(se.SortingExtractor):
extractor_name = "custom"
is_writable = False
def __init__(self):
super().__init__()
self._units = {}
self.is_dumpable = False
def set_sampling_frequency(self, sampling_frequen... | 28.482759 | 78 | 0.684019 |
792409175f3dfbc0b246c23c2da27efb93911aab | 1,987 | py | Python | datawinners/accountmanagement/tests/test_registration_backend.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/accountmanagement/tests/test_registration_backend.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/accountmanagement/tests/test_registration_backend.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import Mock
from datawinners.accountmanagement.registration_backend import RegistrationBackend
class TestRegistrationBackend(unittest.TestCase):
def setUp(self):
self.backend = RegistrationBackend()
self.request = Mock()
SUBSCRIBED_ORGANIZATION_PARAMS = {'organizat... | 49.675 | 103 | 0.579768 |
79240e25e575a2a05cd47f105207911f117e9ee5 | 1,702 | py | Python | analytics/models.py | AyanChoudhary/cccatalog-api | 9a6c691872b52048a8a92632e1674eaac61d4cb8 | [
"MIT"
] | 1 | 2020-09-12T13:42:04.000Z | 2020-09-12T13:42:04.000Z | analytics/models.py | senyor/cccatalog-api | a18f75fccdd7345beff820dff4ee69604cd53748 | [
"MIT"
] | 116 | 2020-09-21T06:25:38.000Z | 2022-03-28T10:26:43.000Z | analytics/models.py | senyor/cccatalog-api | a18f75fccdd7345beff820dff4ee69604cd53748 | [
"MIT"
] | null | null | null | import enum
from sqlalchemy import Integer, Column, Enum, String, DateTime, Boolean
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.sql import func
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class EventMixin(object):
id = Column(Integer, primary_key=True)
... | 26.184615 | 78 | 0.716804 |
79241240368cadbdc826fd00e4c2851954b52323 | 407 | py | Python | tests/fixtures/project_django/demo_project/wsgi.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 7 | 2020-09-23T15:27:09.000Z | 2022-03-20T19:31:41.000Z | tests/fixtures/project_django/demo_project/wsgi.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 160 | 2020-07-06T17:58:35.000Z | 2022-03-30T13:06:07.000Z | tests/fixtures/project_django/demo_project/wsgi.py | nappex/freezeyt | 67ead4552ae402cedfcf4ee8ec76fb8a07850724 | [
"MIT"
] | 10 | 2020-07-06T18:05:10.000Z | 2022-03-12T21:20:11.000Z | """
WSGI config for demo_project project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault(
'DJ... | 21.421053 | 78 | 0.77887 |
792412cb889b69ab11b894531bf9d8b69dd0f302 | 1,840 | py | Python | python/phonenumbers/data/region_SR.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_SR.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_SR.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. SR metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_SR = PhoneMetadata(id='SR', country_code=597, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[2-8]\\d{5,6}', possible_number_pattern=... | 92 | 162 | 0.736413 |
79242394f7fa74a6130b1cf7e469bb7302818139 | 2,577 | py | Python | homeassistant/components/wirelesstag/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/wirelesstag/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/wirelesstag/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Switch implementation for Wireless Sensor Tags (wirelesstag.net)."""
import logging
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_MONITORED_CONDITIONS
import homeassistant.helpers.config_validation as cv
from . import DOMAIN... | 30.678571 | 78 | 0.684905 |
79242bb8fdba8534e85076c15db7ebbb90fbb007 | 5,587 | py | Python | src/houdini_package_runner/runners/pylint/runner.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | 3 | 2022-02-06T23:31:17.000Z | 2022-02-07T11:10:03.000Z | src/houdini_package_runner/runners/pylint/runner.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | src/houdini_package_runner/runners/pylint/runner.py | captainhammy/houdini_package_runner | 40f8b60ebe32c64fd9b37328a9a5eefacd1c6ebd | [
"MIT"
] | null | null | null | """This module contains the definition for a pylint HoudiniPackageRunner."""
# =============================================================================
# IMPORTS
# =============================================================================
# Future
from __future__ import annotations
# Standard Library
import ... | 30.36413 | 96 | 0.576696 |
7924300b51133f6bb670cd2320d6729f5b5d2e3a | 343 | py | Python | cryptoxlib/clients/hitbtc/enums.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 90 | 2020-04-09T18:34:49.000Z | 2022-03-09T14:29:32.000Z | cryptoxlib/clients/hitbtc/enums.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 44 | 2020-04-03T17:02:20.000Z | 2022-01-29T14:51:51.000Z | cryptoxlib/clients/hitbtc/enums.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 28 | 2020-04-25T21:34:53.000Z | 2022-03-31T07:20:07.000Z | import enum
class OrderSide(enum.Enum):
BUY = "buy"
SELL = "sell"
class OrderType(enum.Enum):
MARKET = "market"
LIMIT = "limit"
STOP_LIMIT = "stopLimit"
class TimeInForce(enum.Enum):
GOOD_TILL_CANCELLED = "GTC"
IMMEDIATE_OR_CANCELLED = "IOC"
FILL_OR_KILL = "FOK"
DAY = "Day"
... | 17.15 | 34 | 0.635569 |
79246404e8b45cff0dc67979f087b9da1a636a95 | 7,835 | py | Python | lib/coloraide/spaces/srgb/css.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 253 | 2015-03-04T06:48:43.000Z | 2022-03-25T14:22:17.000Z | lib/coloraide/spaces/srgb/css.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 197 | 2015-03-04T21:40:47.000Z | 2022-03-25T17:04:36.000Z | lib/coloraide/spaces/srgb/css.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 32 | 2015-03-21T03:28:01.000Z | 2021-09-06T07:20:51.000Z | """SRGB color class."""
import re
from . import color_names
from . import base
from .. import _parse
from ... import util
RE_COMPRESS = re.compile(r'(?i)^#({hex})\1({hex})\2({hex})\3(?:({hex})\4)?$'.format(**_parse.COLOR_PARTS))
class SRGB(base.SRGB):
"""SRGB class."""
DEF_VALUE = "rgb(0 0 0 / 1)"
START... | 38.219512 | 117 | 0.471347 |
79248acdfae559c8bcfdff7be8cbe68ef081491d | 482 | py | Python | Easy/1827 Minimum Operations to Make the Array Increasing.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1827 Minimum Operations to Make the Array Increasing.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1827 Minimum Operations to Make the Array Increasing.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing/
class Solution:
def minOperations(self, nums: List[int]) -> int:
operations = 0
index = nums[0]
for i in range(1, len(nums)):
if index >= nums[i]:
operatio... | 25.368421 | 80 | 0.46888 |
7924996f8b4171743dba29cb4adbd41492772166 | 1,401 | py | Python | src/login/bklogin/bkaccount/manager.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/login/bklogin/bkaccount/manager.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/login/bklogin/bkaccount/manager.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS
Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 37.864865 | 115 | 0.685225 |
7924b559274377e323d969dc8c4671cde5b9147e | 26,688 | py | Python | tests/test_common.py | harmannkibue/Flask-Security-Patch | 5a0d4443fda88dfa95428ac640939244dfacd223 | [
"MIT"
] | 2 | 2021-02-28T15:26:17.000Z | 2021-03-01T13:30:25.000Z | tests/test_common.py | harmannkibue/Flask-Security-Patch | 5a0d4443fda88dfa95428ac640939244dfacd223 | [
"MIT"
] | null | null | null | tests/test_common.py | harmannkibue/Flask-Security-Patch | 5a0d4443fda88dfa95428ac640939244dfacd223 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_common
~~~~~~~~~~~
Test common functionality
:copyright: (c) 2019 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""
import base64
import json
import pytest
from flask import Blueprint
from utils import (
authenticate,
json... | 34.436129 | 88 | 0.699228 |
7924d05e2997ba93a56c8d028e180f1dfb1497d3 | 5,259 | py | Python | lib/python3.8/site-packages/elasticsearch/connection/http_requests.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | lib/python3.8/site-packages/elasticsearch/connection/http_requests.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | lib/python3.8/site-packages/elasticsearch/connection/http_requests.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | import time
import warnings
try:
import requests
REQUESTS_AVAILABLE = True
except ImportError:
REQUESTS_AVAILABLE = False
from .base import Connection
from ..exceptions import (
ConnectionError,
ImproperlyConfigured,
ConnectionTimeout,
SSLError,
)
from ..compat import urlencode, string_ty... | 32.86875 | 88 | 0.576916 |
7924e8703102ab322d667e8931ae83a10a9a5f9c | 13,697 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/httpinfrastructurelowlevel/rest/http_retry/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/httpinfrastructurelowlevel/rest/http_retry/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/HttpLowLevel/httpinfrastructurelowlevel/rest/http_retry/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.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 ... | 42.669782 | 113 | 0.693144 |
7925056c4ad0c61a16a3c3bfdc4d18af9b4683de | 263,580 | py | Python | resources/python/aws_cdk/aws_ssm/__init__.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | resources/python/aws_cdk/aws_ssm/__init__.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | resources/python/aws_cdk/aws_ssm/__init__.py | oneillryan93/bot-man | f644a02b0e819d92502799a561ac6272201b46ee | [
"MIT"
] | null | null | null | """
## AWS Systems Manager Construct Library
<!--BEGIN STABILITY BANNER-->---


---
<!--END STABI... | 43.725946 | 506 | 0.667296 |
79250a352212ef9f324476658ae315af1606be9d | 470 | py | Python | setup.py | timgates42/bayesian-belief-networks | 23c3e3ce1c7f99d83efb79f9b7798af2a1537e1c | [
"Apache-2.0"
] | 734 | 2015-01-05T21:25:01.000Z | 2022-03-16T12:12:20.000Z | setup.py | timgates42/bayesian-belief-networks | 23c3e3ce1c7f99d83efb79f9b7798af2a1537e1c | [
"Apache-2.0"
] | 11 | 2015-01-20T16:22:48.000Z | 2021-05-12T13:01:11.000Z | setup.py | timgates42/bayesian-belief-networks | 23c3e3ce1c7f99d83efb79f9b7798af2a1537e1c | [
"Apache-2.0"
] | 222 | 2015-01-06T09:28:53.000Z | 2022-03-04T10:38:32.000Z | from distutils.core import setup
setup(
name='Bayesian',
version='0.1.7',
author='Neville Newey',
author_email='nn@theneweys.org',
packages=['bayesian', 'bayesian.test', 'bayesian.examples',
'bayesian.examples.bbns',
'bayesian.examples.factor_graphs'],
license='LICEN... | 29.375 | 65 | 0.657447 |
7925107838532855b7d23f6ce117af60f273fd11 | 2,545 | py | Python | util/collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/collection.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | import time
import os
import psutil
from ReadWriteMemory import ReadWriteMemory
import mouse
import pyscreeze
import maps
from map import Map
from maps import *
from tower import Tower, Point
from towers import *
class Collector:
play_button = (820, 940)
expert_map_button = (1340, 980)
easy_button = (6... | 23.564815 | 89 | 0.576424 |
79252ab20316a11f0cd630a66eb3802f5b9bd200 | 3,107 | py | Python | dbAccess.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 3 | 2017-12-09T10:58:59.000Z | 2019-05-22T15:32:44.000Z | dbAccess.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 26 | 2018-02-22T05:55:45.000Z | 2019-04-21T02:37:18.000Z | dbAccess.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 1 | 2018-03-01T17:40:20.000Z | 2018-03-01T17:40:20.000Z | #!/usr/bin/env python3
# defines a class for accessing the pymm PREMIS databse
import os
import sys
import getpass
# nonstandard libraries:
try:
import mysql.connector
except ImportError:
print("Try installing mysql connector/python again.")
sys.exit()
# local modules:
try:
from pymmFunctions import read_config
ex... | 28.245455 | 130 | 0.695204 |
7925523b36391a4cf553cdf8abd27b19b3a10d9f | 3,304 | py | Python | pysces/kraken/controllers/kraken_intersect.py | bgoli/pysces | 94e4734824e8f0eb9cfa9489e853afd4c9a37d23 | [
"BSD-3-Clause"
] | null | null | null | pysces/kraken/controllers/kraken_intersect.py | bgoli/pysces | 94e4734824e8f0eb9cfa9489e853afd4c9a37d23 | [
"BSD-3-Clause"
] | null | null | null | pysces/kraken/controllers/kraken_intersect.py | bgoli/pysces | 94e4734824e8f0eb9cfa9489e853afd4c9a37d23 | [
"BSD-3-Clause"
] | null | null | null | """
PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net)
Copyright (C) 2004-2020 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved,
Brett G. Olivier (bgoli@users.sourceforge.net)
Triple-J Group for Molecular Cell Physiology
Stellenbosch University, South Africa.
Permission to us... | 37.123596 | 120 | 0.728814 |
792565fee2c44f6ac26cc993cf6112b27256a4a2 | 455 | py | Python | django_comments_xtd/conf/defaults.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | django_comments_xtd/conf/defaults.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | django_comments_xtd/conf/defaults.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
COMMENT_MAX_LENGTH = 3000
# Extra key to salt the XtdCommentForm
COMMENTS_XTD_SALT = b""
# Whether comment posts should be confirmed by email
COMMENTS_XTD_CONFIRM_EMAIL = True
# Maximum Thread Level
COMMENTS_XTD_MAX_THREAD_LEVEL = 0
# Maximum Thread Level per app.model basis... | 23.947368 | 52 | 0.810989 |
7925660f3823d054bb42e7eef9070f8c44cad64c | 4,816 | py | Python | tencentcloud/privatedns/v20201028/errorcodes.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/privatedns/v20201028/errorcodes.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/privatedns/v20201028/errorcodes.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 26.607735 | 95 | 0.830357 |
79257a1841d3d263ab963340715f8e13617cefd5 | 822 | py | Python | test/test_LensModel/test_Profiles/test_base_profile.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | test/test_LensModel/test_Profiles/test_base_profile.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | test/test_LensModel/test_Profiles/test_base_profile.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
import unittest
class TestBaseProfile(object):
def setup(self):
pass
def test_base_functions(self):
base = LensProfileBase()
base.set_static()
base.set_dynamic()
class TestRaise(unittest.TestCase):
... | 25.6875 | 71 | 0.641119 |
7925aed0c1ca834e1dc7b7760b21e1c6e0af8f43 | 605 | py | Python | book.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | 5 | 2015-12-16T03:37:28.000Z | 2016-10-07T00:58:46.000Z | book.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | 1 | 2016-01-30T14:51:37.000Z | 2016-02-01T10:45:16.000Z | book.py | qqbuby/redmine_book | 2b92ece9e6fd5f3003164151eebfd7143e47d776 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- encoding:utf-8 -*-
import random
from redmine_book import book
def main():
'''The entry point to create a time entry.'''
url = 'http://redmine.citicsinfo.com/redmine/' # API URL
key = '1a1a1a1a1a1a1a1aa1a1a1a1a1a1' # API访问键
time_entry = {
'issue_id': 31080,
... | 19.516129 | 61 | 0.528926 |
7925ca3bb934ea778b2d9c31c209206b0b17b9cc | 1,654 | py | Python | 01-Lesson-Plans/03-Python-Pandas/1/Activities/12-functions-02/Solved/functions-02.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/03-Python-Pandas/1/Activities/12-functions-02/Solved/functions-02.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/03-Python-Pandas/1/Activities/12-functions-02/Solved/functions-02.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | # Define a function "warble" that takes in a string as an argument, adds " arglebargle" to the end of it, and returns the result.
def warble(string_param):
return(f"{string_param} arglebargle")
# Print the result of calling your "warble" function with the argument "hello".
print(warble("hello"))
# Define a functi... | 43.526316 | 261 | 0.748489 |
7925e355478d32b86e58e94400bbcbdfd92a2625 | 3,265 | py | Python | vnpy/component/cta_policy.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | vnpy/component/cta_policy.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | vnpy/component/cta_policy.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | # encoding: UTF-8
import os
import json
from datetime import datetime
from collections import OrderedDict
from vnpy.component.base import CtaComponent
from vnpy.trader.utility import get_folder_path
TNS_STATUS_OBSERVATE = 'observate'
TNS_STATUS_READY = 'ready'
TNS_STATUS_ORDERING = 'ordering'
TNS_STATUS_OPENED = 'ope... | 29.414414 | 113 | 0.556202 |
792614cd488d85928bd1dcb63f6081bc7d035a2e | 1,909 | py | Python | consoles/__init__.py | FlantasticDan/scorebox-consoles | 886deb22822a1bdc63b6b93c8d2cc0008654ff95 | [
"MIT"
] | 3 | 2021-08-12T20:02:13.000Z | 2021-11-02T16:07:10.000Z | consoles/__init__.py | FlantasticDan/scorebox-consoles | 886deb22822a1bdc63b6b93c8d2cc0008654ff95 | [
"MIT"
] | null | null | null | consoles/__init__.py | FlantasticDan/scorebox-consoles | 886deb22822a1bdc63b6b93c8d2cc0008654ff95 | [
"MIT"
] | null | null | null | from multiprocessing.connection import Connection
from typing import Dict
import serial
from threading import Thread
from multiprocessing import Process, Pipe
class SerialConnection:
'''Low Level Serial Connection to Scoreboard.'''
def __init__(self, port: str, baudrate: int, parity) -> None:
self.port... | 42.422222 | 114 | 0.678366 |
7926313b3272f82a8a2c6e18e339dc0df6bff884 | 475 | py | Python | src/model/supplementary/sampling.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | 1 | 2020-05-25T10:24:58.000Z | 2020-05-25T10:24:58.000Z | src/model/supplementary/sampling.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | 1 | 2017-12-18T02:16:44.000Z | 2017-12-18T02:16:44.000Z | src/model/supplementary/sampling.py | dhruvtapasvi/implementation | 964980f431517f4548a87172a05107cdf700fb84 | [
"MIT"
] | null | null | null | from keras.backend import random_normal, exp, shape
unitStdDev = 1.0
def samplingConstructor(latentRepresentationDimension):
def sampling(args):
latentRepresentationMean, latentRepresentationLogVariance = args
epsilon = random_normal(shape=(shape(latentRepresentationMean)[0], latentRepresentatio... | 33.928571 | 134 | 0.781053 |
79263c5b13046a5dd5aba54869df0bf6e18577cc | 1,987 | py | Python | Math/math_pkg/scripts/J_computations.py | marcodemutti/SofAr-project | 6e807072f8567490cf5b4ebcf81d37ab5e8a4109 | [
"Apache-2.0"
] | 1 | 2021-10-04T18:24:21.000Z | 2021-10-04T18:24:21.000Z | Math/math_pkg/scripts/J_computations.py | marcodemutti/SofAr-project | 6e807072f8567490cf5b4ebcf81d37ab5e8a4109 | [
"Apache-2.0"
] | 1 | 2020-09-16T19:57:43.000Z | 2020-09-16T19:57:43.000Z | Math/math_pkg/scripts/J_computations.py | andreabradpitto/SofAr-project | 6e807072f8567490cf5b4ebcf81d37ab5e8a4109 | [
"Apache-2.0"
] | 3 | 2020-10-29T14:07:58.000Z | 2020-11-26T11:22:25.000Z | import numpy as np
def geometric_vectors(T_abs):
"""!
Computes the vectors needed to compute geometric jacobian.
@param Tabs: the transformation matrices from joint to 0 frame in current configuration
@return geom_v: geometric vectors exctracted from Tabs that allow to compute the jacobian.
"""
r = []
k ... | 29.656716 | 156 | 0.550075 |
7926684b0c579f5809af2b515e3e149d29472d66 | 1,277 | py | Python | pyzoo/zoo/models/textmatching/text_matcher.py | cynthia-liu/analytics-zoo | 48344a49fd9257ba0c414903dcbc8f52a587bd30 | [
"Apache-2.0"
] | 2 | 2018-06-08T01:14:48.000Z | 2019-08-28T22:24:14.000Z | pyzoo/zoo/models/textmatching/text_matcher.py | st186/analytics-zoo | b8358abcadb65438be321a75e8002327f02bbe6a | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/models/textmatching/text_matcher.py | st186/analytics-zoo | b8358abcadb65438be321a75e8002327f02bbe6a | [
"Apache-2.0"
] | 1 | 2018-06-26T08:16:42.000Z | 2018-06-26T08:16:42.000Z | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.74359 | 84 | 0.720439 |
79268123cf07b50f5d4cc206e1cea7df96d20750 | 5,883 | py | Python | parsl/executors/high_throughput/zmq_pipes.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/executors/high_throughput/zmq_pipes.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/executors/high_throughput/zmq_pipes.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | 1 | 2022-03-09T10:51:12.000Z | 2022-03-09T10:51:12.000Z | #!/usr/bin/env python3
import zmq
import time
import pickle
import logging
import threading
logger = logging.getLogger(__name__)
class CommandClient(object):
""" CommandClient
"""
def __init__(self, ip_address, port_range):
"""
Parameters
----------
ip_address: str
... | 36.314815 | 99 | 0.584056 |
7926838d591b56ed878ffe5c670faf8406f31b4a | 2,270 | py | Python | gemd/entity/object/measurement_spec.py | CitrineInformatics/gemd-python | 4f80045c1b481269c7451f6a205755c22093eb74 | [
"Apache-2.0"
] | 7 | 2020-04-02T11:11:09.000Z | 2022-02-05T23:19:51.000Z | gemd/entity/object/measurement_spec.py | CitrineInformatics/gemd-python | 4f80045c1b481269c7451f6a205755c22093eb74 | [
"Apache-2.0"
] | 24 | 2020-04-22T16:55:09.000Z | 2022-03-30T20:44:39.000Z | gemd/entity/object/measurement_spec.py | CitrineInformatics/gemd-python | 4f80045c1b481269c7451f6a205755c22093eb74 | [
"Apache-2.0"
] | 3 | 2020-05-08T00:50:02.000Z | 2020-12-19T00:48:56.000Z | from gemd.entity.object.base_object import BaseObject
from gemd.entity.object.has_parameters import HasParameters
from gemd.entity.object.has_conditions import HasConditions
from gemd.entity.object.has_template import HasTemplate
class MeasurementSpec(BaseObject, HasParameters, HasConditions, HasTemplate):
"""
... | 44.509804 | 94 | 0.715859 |
7926c6c120957ce84bc6c55b4e792bd56313cc46 | 1,654 | py | Python | setup.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 11 | 2015-03-24T12:17:17.000Z | 2021-01-27T15:49:06.000Z | setup.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 2 | 2018-11-04T15:18:29.000Z | 2020-06-19T07:41:19.000Z | setup.py | kmike/morphine | 30f06f348042fa67687f315151d00c0ed41c5c38 | [
"MIT"
] | 3 | 2015-11-04T19:00:55.000Z | 2017-05-11T13:26:57.000Z | #!/usr/bin/env python
from setuptools import setup
setup(
name = 'morphine',
version = '0.0',
author = 'Mikhail Korobov',
author_email = 'kmike84@gmail.com',
url = 'https://github.com/kmike/morphine/',
description = 'Disambiguation engine for pymorphy2',
long_description = open('README.rst'... | 33.755102 | 73 | 0.547158 |
7926df205a56690ac91eb944c50b63855e7e044b | 2,066 | py | Python | topi/python/topi/nn/upsampling.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | topi/python/topi/nn/upsampling.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | topi/python/topi/nn/upsampling.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # 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.245614 | 86 | 0.693127 |
7926f8e05df5f4ed052f8001b940d0c991577e3e | 23,839 | py | Python | moon/controller_round1.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | moon/controller_round1.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | moon/controller_round1.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | """
Space Robotics Challenge 2
"""
import math
import heapq
import numpy as np
from datetime import timedelta
from functools import partial
from shapely.geometry import Point, Polygon
from collections import defaultdict
from osgar.bus import BusShutdownException
from osgar.lib import quaternion
from osgar.lib.quate... | 48.257085 | 214 | 0.574017 |
7926fa8bf5e599ba3f722140b72ca857735c32e9 | 10,637 | py | Python | src/rubrix/server/tasks/token_classification/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/token_classification/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/token_classification/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 29.96338 | 115 | 0.632039 |
79271ec08046ab9376b0a89d48ad3ecef328e0c2 | 5,428 | py | Python | sconscontrib/SCons/Tool/kotlin/__init__.py | isabella232/scons-contrib | 25814a96f35fa2a7c60abd2d20e014f0490f7f51 | [
"MIT"
] | 14 | 2019-02-28T11:53:35.000Z | 2022-01-11T03:04:53.000Z | sconscontrib/SCons/Tool/kotlin/__init__.py | mwichmann/scons-contrib | 941fe78c6788a688265e7731f61bfb1e77914405 | [
"MIT"
] | 12 | 2020-02-27T14:27:30.000Z | 2022-03-19T00:10:51.000Z | sconscontrib/SCons/Tool/kotlin/__init__.py | isabella232/scons-contrib | 25814a96f35fa2a7c60abd2d20e014f0490f7f51 | [
"MIT"
] | 8 | 2018-06-19T03:40:09.000Z | 2022-03-23T17:33:18.000Z | # MIT License
#
# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, ... | 29.026738 | 91 | 0.674097 |
7927249ce8c474ecf8bfbfbb8f360632cc469188 | 1,749 | py | Python | examples/tower_test.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | 1 | 2021-12-24T01:43:14.000Z | 2021-12-24T01:43:14.000Z | examples/tower_test.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | examples/tower_test.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | import gym
import panda_gym
import numpy as np
def policy(obs, timestep):
goal = obs['desired_goal']
goal1_pos = goal[:3]
# goal2_pos = goal[3:]
obs = obs['observation']
robot1_obs = obs[:7]
robot2_obs = obs[7:14]
task_obs = obs[14:]
obj1_pos = task_obs[:3]
# obj2_pos = task_obs[12:... | 32.388889 | 75 | 0.578616 |
79272584ebed1077df66e0cd98dc0dcded1bd3cf | 577 | py | Python | tests/fixtures/badstuff.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 73 | 2017-11-26T13:43:53.000Z | 2022-02-25T02:52:54.000Z | tests/fixtures/badstuff.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 191 | 2017-10-09T14:33:12.000Z | 2022-03-23T16:23:06.000Z | tests/fixtures/badstuff.py | dimaka-wix/chaostoolkit-lib | e5d88ab33ea08baaf06f59564392971c249887d1 | [
"Apache-2.0"
] | 48 | 2017-12-05T16:39:01.000Z | 2022-02-14T12:01:30.000Z | from itertools import count
from chaoslib.exceptions import InterruptExecution
__all__ = ["interrupt_me", "raise_exception", "check_under_treshold", "count_generator"]
def interrupt_me():
raise InterruptExecution()
def raise_exception():
raise Exception("oops")
g = None
def count_generator():
glob... | 15.594595 | 88 | 0.668977 |
79272f71a0b05c2026ed58eb7df53b97945f7fc4 | 1,740 | py | Python | examples/hesaffnet/hesaffnet.py | Childhoo/Chen_Matcher | ca89a4774a083d10177186020c35f60c3e8b7b37 | [
"MIT"
] | null | null | null | examples/hesaffnet/hesaffnet.py | Childhoo/Chen_Matcher | ca89a4774a083d10177186020c35f60c3e8b7b37 | [
"MIT"
] | null | null | null | examples/hesaffnet/hesaffnet.py | Childhoo/Chen_Matcher | ca89a4774a083d10177186020c35f60c3e8b7b37 | [
"MIT"
] | null | null | null | #!/usr/bin/python2 -utt
# -*- coding: utf-8 -*-
import torch
import torch.nn as nn
import numpy as np
import sys
import os
import time
from PIL import Image
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
import torch.optim as optim
from tqdm import tqdm
import math
import torch.nn.functional ... | 28.52459 | 137 | 0.749425 |
7927320e22b5ae7e03eaafdfaf4daa94ff3d568b | 188 | py | Python | 561.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | 561.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | 561.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | class Solution:
def arrayPairSum(self, nums: List[int]) -> int:
nums.sort()
ans = sum([i for i in nums[::2]])
return ans
# ---------- 420ms, 16.4MB ---------- # | 31.333333 | 51 | 0.484043 |
792744c473f6b87ddd830353fc46ea0c1b5089fd | 10,797 | py | Python | cp93pytools/diskdict.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | cp93pytools/diskdict.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | cp93pytools/diskdict.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | from __future__ import annotations
from collections import deque, Counter, OrderedDict
import json
from json import encoder
import sqlite3
from types import FunctionType
from typing import Any, Callable, Dict, Generic, List, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union
DictEncoder = Tuple[Type, Callable[[A... | 35.284314 | 111 | 0.583032 |
79274ed0bc99c0927d9548c7966e43dfc6df1f7b | 11,389 | py | Python | tests/test_http_request.py | matthiask/daphne | cc6af549a61d0529182ef7370515547eedfb26fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_http_request.py | matthiask/daphne | cc6af549a61d0529182ef7370515547eedfb26fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_http_request.py | matthiask/daphne | cc6af549a61d0529182ef7370515547eedfb26fd | [
"BSD-3-Clause"
] | null | null | null | # coding: utf8
import collections
from urllib import parse
from hypothesis import assume, given, settings
import http_strategies
from http_base import DaphneTestCase
class TestHTTPRequest(DaphneTestCase):
"""
Tests the HTTP request handling.
"""
def assert_valid_http_scope(
self,
s... | 41.717949 | 102 | 0.637282 |
79276afd4e0cccf2fe043f279e0cc3eba94d0b85 | 8,431 | py | Python | google-cloud-sdk/.install/.backup/lib/third_party/containerregistry/client/v2_2/v2_compat_.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/third_party/containerregistry/client/v2_2/v2_compat_.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/third_party/containerregistry/client/v2_2/v2_compat_.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | """This package provides compatibility interfaces for v1/v2."""
import cStringIO
import gzip
import hashlib
import json
from containerregistry.client.v2 import docker_image as v2_image
from containerregistry.client.v2 import util as v2_util
from containerregistry.client.v2_2 import docker_http
from containerregistr... | 29.582456 | 80 | 0.653778 |
79277b1c9a36ab21b8b718e93aa6e1979fd9d969 | 5,048 | py | Python | examples/federated-learning/run.py | yanndupis/tf-encrypted | cfaea3ba87520f73979ed4e4f397eba3beb0a535 | [
"Apache-2.0"
] | null | null | null | examples/federated-learning/run.py | yanndupis/tf-encrypted | cfaea3ba87520f73979ed4e4f397eba3beb0a535 | [
"Apache-2.0"
] | null | null | null | examples/federated-learning/run.py | yanndupis/tf-encrypted | cfaea3ba87520f73979ed4e4f397eba3beb0a535 | [
"Apache-2.0"
] | null | null | null | import sys
import tensorflow as tf
import tf_encrypted as tfe
from convert import decode
if len(sys.argv) > 1:
# config file was specified
config_file = sys.argv[1]
config = tfe.RemoteConfig.load(config_file)
tfe.set_config(config)
tfe.set_protocol(tfe.protocol.Pond())
session_target = sys.argv[... | 31.160494 | 107 | 0.636094 |
79277dced42aef2ee6a769978b97b7be5ba246de | 6,232 | py | Python | squirrel_maze/resources/menus.py | princeodd47/squirrel-maze | 4abca698ba7b11aa0fd239c49e63a7bc90bd9dfe | [
"MIT"
] | 1 | 2021-05-27T01:23:51.000Z | 2021-05-27T01:23:51.000Z | squirrel_maze/resources/menus.py | princeodd47/squirrel-maze | 4abca698ba7b11aa0fd239c49e63a7bc90bd9dfe | [
"MIT"
] | 2 | 2019-03-30T20:18:43.000Z | 2021-06-28T02:38:03.000Z | squirrel_maze/resources/menus.py | princeodd47/squirrel-maze | 4abca698ba7b11aa0fd239c49e63a7bc90bd9dfe | [
"MIT"
] | 1 | 2019-03-28T12:40:34.000Z | 2019-03-28T12:40:34.000Z | from __future__ import print_function, unicode_literals
import sys
from typing import List
from art import tprint
from PyInquirer import style_from_dict, Token, prompt
from squirrel_maze.resources.actor import Actor
from squirrel_maze.resources import action as sm_action
from squirrel_maze.resources import combat as... | 26.519149 | 93 | 0.573331 |
79278034186456beba4a9136997f2d0764316e52 | 156 | py | Python | writing_file.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | writing_file.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | writing_file.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | file = open("newfile.txt", "w")
file.write("This has been writtern to a file")
file.close()
file = open("newfile.txt", "r")
print(file.read())
file.close() | 22.285714 | 46 | 0.666667 |
79279b0863aebc96d0b54946f2d720b7690d79f8 | 5,621 | py | Python | models/transformers/__init__.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | 8 | 2022-02-23T08:41:26.000Z | 2022-03-14T11:42:51.000Z | models/transformers/__init__.py | Oahihs/BERT-NER-Pytorch | 4bae5795df64eab35a75f9bbb0cfdb9fb4cb4583 | [
"MIT"
] | 2 | 2021-08-10T13:42:34.000Z | 2021-11-21T08:34:15.000Z | models/transformers/__init__.py | Oahihs/BERT-NER-Pytorch | 4bae5795df64eab35a75f9bbb0cfdb9fb4cb4583 | [
"MIT"
] | 2 | 2022-03-09T01:50:40.000Z | 2022-03-21T09:23:09.000Z | __version__ = "2.1.1"
# Work around to update TensorFlow's absl.logging threshold which alters the
# default Python logging output behavior when present.
# see: https://github.com/abseil/abseil-py/issues/99
# and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493
try:
import absl.logging... | 58.552083 | 109 | 0.743106 |
7927af2f4cf4dc1d3c6b87b9be9a19869cf541de | 1,515 | py | Python | getimage.py | shintoo/DailyImage | 98790671ab927c8116247c99d209b93f9f0dd654 | [
"MIT"
] | null | null | null | getimage.py | shintoo/DailyImage | 98790671ab927c8116247c99d209b93f9f0dd654 | [
"MIT"
] | null | null | null | getimage.py | shintoo/DailyImage | 98790671ab927c8116247c99d209b93f9f0dd654 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# getimage.py - this file is part of dailyimage
# Retrieve an image from a google image search
import sys # argv
import re # finding images
import requests # downloading results and images
import bs4 # finding images
def get_image(query):
'''
function get_im... | 26.578947 | 72 | 0.608581 |
7927b325b77144232cff02d1d1d095a81233720f | 15,413 | py | Python | ThirdParty/Twisted/twisted/mail/maildir.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | ThirdParty/Twisted/twisted/mail/maildir.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/mail/maildir.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # -*- test-case-name: twisted.mail.test.test_mail -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Maildir-style mailbox support
"""
import os
import stat
import socket
from zope.interface import implements
try:
import cStringIO as StringIO
except ImportError:
import StringIO... | 29.697495 | 105 | 0.584442 |
7927caae5dadbf334a3560404ce4eb9428fb7394 | 441 | py | Python | zerver/migrations/0010_delete_streamcolor.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/migrations/0010_delete_streamcolor.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | zerver/migrations/0010_delete_streamcolor.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-06-10T15:12:52.000Z | 2021-06-10T15:12:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0009_add_missing_migrations'),
]
operations = [
migrations.RemoveField(
model_name='streamcolor',
... | 20.045455 | 50 | 0.594104 |
79281b6988ff3bd16cb1132c6a5fa6a0681dc600 | 3,681 | py | Python | supriya/commands/SynthNewRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/commands/SynthNewRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/commands/SynthNewRequest.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | from supriya import AddAction
from supriya.commands.Request import Request
from supriya.enums import RequestId
from supriya.realtime.nodes import Node, Synth
class SynthNewRequest(Request):
"""
A /s_new request.
::
>>> import supriya.commands
>>> import supriya.realtime
>>> reque... | 27.886364 | 87 | 0.604455 |
792866c9abcf7814125598869f40b7b4e24baf42 | 7,441 | py | Python | pycalc/MAVProxy/modules/mavproxy_map/GAreader.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | pycalc/MAVProxy/modules/mavproxy_map/GAreader.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | 8 | 2021-01-28T19:26:22.000Z | 2022-03-24T18:07:24.000Z | pycalc/MAVProxy/modules/mavproxy_map/GAreader.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
'''
Module to read DTM files published by Geoscience Australia
Written by Stephen Dade (stephen_dade@hotmail.com
'''
import os
import sys
import numpy
class ERMap:
'''Class to read GA files'''
def __init__(self):
self.header = None
self.data = None
self.startlon... | 36.47549 | 110 | 0.609864 |
7928741b52404055415afe61cbe06fcd9d526e7c | 3,068 | py | Python | set_tags/set_instance_tags.py | zaro0508/cfn-cr-synapse-tagger | c9f6f71aa2e9111f6e184c046b7851e7883feba5 | [
"Apache-2.0"
] | null | null | null | set_tags/set_instance_tags.py | zaro0508/cfn-cr-synapse-tagger | c9f6f71aa2e9111f6e184c046b7851e7883feba5 | [
"Apache-2.0"
] | null | null | null | set_tags/set_instance_tags.py | zaro0508/cfn-cr-synapse-tagger | c9f6f71aa2e9111f6e184c046b7851e7883feba5 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import set_tags.utils as utils
from crhelper import CfnResource
MISSING_INSTANCE_ID_ERROR_MESSAGE = 'InstanceId parameter is required'
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
helper = CfnResource(
json_logging=False, log_level='DEBUG', boto_level='CRITICAL')
def ... | 28.943396 | 86 | 0.744785 |
792881a507515a3a5d2f8ffda105c94b4cc935f3 | 4,663 | py | Python | codes/projects/test_continuous_parameter/utils_project/training_routine_vae_full_model_aware.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/utils_project/training_routine_vae_full_model_aware.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/utils_project/training_routine_vae_full_model_aware.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | '''Training routine for the case where posterior model possesses a full
covariance and the parameter-to-observable map is learned
In preparation for prediction and plotting, this script will:
1) Specify which GPU to use for optimization
2) Form the batches for the training, validation and testing sets
3) S... | 42.390909 | 95 | 0.651941 |
79288d8dc8c6290fee8d1dfd1a9729da90b31dda | 3,169 | py | Python | localstack/services/es/es_starter.py | varju/localstack | 6a2a26fbc5043f30e76b92456643339f6abf034d | [
"Apache-2.0"
] | 4 | 2019-01-12T22:48:24.000Z | 2019-12-10T06:56:17.000Z | localstack/services/es/es_starter.py | varju/localstack | 6a2a26fbc5043f30e76b92456643339f6abf034d | [
"Apache-2.0"
] | 101 | 2019-11-26T07:05:59.000Z | 2021-08-03T05:41:12.000Z | localstack/services/es/es_starter.py | varju/localstack | 6a2a26fbc5043f30e76b92456643339f6abf034d | [
"Apache-2.0"
] | 6 | 2019-07-10T10:27:54.000Z | 2021-04-08T09:59:54.000Z | import os
import six
import logging
import traceback
from localstack import config
from localstack.services import install
from localstack.utils.aws import aws_stack
from localstack.constants import DEFAULT_PORT_ELASTICSEARCH_BACKEND, LOCALSTACK_ROOT_FOLDER
from localstack.utils.common import run, is_root, mkdir, chmod... | 41.155844 | 112 | 0.707794 |
7928fa3f7e68d6c6763b8492cfc12c7c483b5f0c | 434 | py | Python | python/cuXfilter/layouts/__init__.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | 2 | 2019-03-06T02:10:05.000Z | 2020-05-06T06:33:02.000Z | python/cuXfilter/layouts/__init__.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | python/cuXfilter/layouts/__init__.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | from .chart_views import chart_view
from .layouts import (
Layout0 as layout_0,
Layout1 as layout_1,
Layout2 as layout_2,
Layout3 as layout_3,
Layout4 as layout_4,
Layout5 as layout_5,
Layout6 as layout_6,
Layout7 as layout_7,
Layout8 as layout_8,
Layout9 as layout_9,
Layout1... | 25.529412 | 43 | 0.714286 |
79290084e967b70bd8a4fe3a66d259f1a21beeaa | 1,873 | py | Python | visual_automata/colors.py | ManuelALH/ProyectoTeoriaComputacionDFA | f989c71934f2d31f25c31f60ed1aab9e8e0a971a | [
"MIT"
] | 45 | 2021-03-19T14:14:16.000Z | 2022-03-29T11:20:53.000Z | visual_automata/colors.py | ManuelALH/ProyectoTeoriaComputacionDFA | f989c71934f2d31f25c31f60ed1aab9e8e0a971a | [
"MIT"
] | 2 | 2021-04-16T15:11:08.000Z | 2021-04-16T15:23:31.000Z | visual_automata/colors.py | ManuelALH/ProyectoTeoriaComputacionDFA | f989c71934f2d31f25c31f60ed1aab9e8e0a971a | [
"MIT"
] | 2 | 2021-03-24T11:01:54.000Z | 2021-04-24T03:10:49.000Z | from colormath.color_conversions import convert_color
from colormath.color_objects import sRGBColor
from typing import Generator
import numpy as np
def create_palette(
start_rgb: sRGBColor, end_rgb: sRGBColor, n: int, colorspace: sRGBColor
) -> list:
"""
Generates color palette based on start and end colo... | 28.815385 | 77 | 0.658836 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.