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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a03299a06f58630d130af9efe6c97f5e3da7f48 | 3,220 | py | Python | Test/RTI_2007-03-23.py | jswoboda/GeoDataPython | c3e29541327ec754eb5a2a9e8dd94bf1abee3328 | [
"MIT"
] | 7 | 2016-07-30T09:36:38.000Z | 2020-08-13T08:40:23.000Z | Test/RTI_2007-03-23.py | jswoboda/GeoDataPython | c3e29541327ec754eb5a2a9e8dd94bf1abee3328 | [
"MIT"
] | 5 | 2015-06-12T01:22:49.000Z | 2018-04-20T18:26:26.000Z | Test/RTI_2007-03-23.py | jswoboda/GeoDataPython | c3e29541327ec754eb5a2a9e8dd94bf1abee3328 | [
"MIT"
] | 5 | 2016-04-12T19:53:04.000Z | 2020-06-04T21:01:48.000Z | #!/usr/bin/env python3
"""
load isr data vs time and altitude
"""
from __future__ import division,absolute_import
from matplotlib.pyplot import subplots, show,figure,draw,pause
from dateutil.parser import parse
from pytz import UTC
from datetime import datetime
from scipy.spatial import cKDTree
import numpy as np
impor... | 36.590909 | 117 | 0.628571 |
1a032bd86a6a2db4d5b16a5ce204929b45ec789f | 4,820 | py | Python | src/graph_transpiler/webdnn/frontend/chainer/functions/activation.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/frontend/chainer/functions/activation.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/frontend/chainer/functions/activation.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | import chainer
from webdnn.frontend.chainer.converter import ChainerConverter
from webdnn.frontend.constraints import unify
from webdnn.graph.axis import Axis
from webdnn.graph.operators.clipped_relu import ClippedRelu
from webdnn.graph.operators.concat import Concat
from webdnn.graph.operators.elu import Elu
from web... | 36.515152 | 106 | 0.753112 |
1a0342bdb46282b033533dac73f70a5944a70f27 | 7,282 | py | Python | fsdet/modeling/encoder/build.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | fsdet/modeling/encoder/build.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | fsdet/modeling/encoder/build.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | from detectron2.utils.events import get_event_storage
from torch import nn
import torch
from fsdet.layers.dynamic_convolutions import AttentionLayerWoGP
from torch.cuda import get_arch_list
def build_latent_encoder(cfg, rpn_shape):
rpn_features = cfg.MODEL.RPN.IN_FEATURES
rpn_shape = [rpn_shape[f] for f in rpn_featu... | 41.141243 | 136 | 0.726723 |
1a0356fa7fb65e5f4572820f3da57c02705d94ee | 821 | py | Python | active_directory/tests/test_active_directory.py | blaines/integrations-core | ff54d2d864bf37eea3a021d316e42742d499e3ca | [
"BSD-3-Clause"
] | null | null | null | active_directory/tests/test_active_directory.py | blaines/integrations-core | ff54d2d864bf37eea3a021d316e42742d499e3ca | [
"BSD-3-Clause"
] | null | null | null | active_directory/tests/test_active_directory.py | blaines/integrations-core | ff54d2d864bf37eea3a021d316e42742d499e3ca | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import pytest
from datadog_test_libs.win.pdh_mocks import initialize_pdh_tests, pdh_mocks_fixture # noqa: F401
from datadog_checks.active_directory import ActiveDirectoryCheck
from datadog_checks.active_direct... | 32.84 | 97 | 0.788063 |
1a0375d1789ab8d5f8419bb222c11e623ec32af4 | 2,112 | py | Python | documents/conf.py | HajimeKawahara/gpkron | 4bb13dd13fc40921ec5d3120998647d29a80fbc5 | [
"MIT"
] | null | null | null | documents/conf.py | HajimeKawahara/gpkron | 4bb13dd13fc40921ec5d3120998647d29a80fbc5 | [
"MIT"
] | null | null | null | documents/conf.py | HajimeKawahara/gpkron | 4bb13dd13fc40921ec5d3120998647d29a80fbc5 | [
"MIT"
] | null | null | null | # 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:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 37.052632 | 88 | 0.672348 |
1a039877cd4c685a00134930149139bb239fa7e3 | 764 | py | Python | tests/validate_jwt.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | tests/validate_jwt.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | tests/validate_jwt.py | normanargueta/Opentok-Python-SDK | 2908af4648778cf01e06b6f7f0f8832924e28f94 | [
"MIT"
] | null | null | null | from six import u
from expects import *
from jose import jwt
import time
def validate_jwt_header(self, jsonwebtoken):
claims = jwt.decode(jsonwebtoken, self.api_secret, algorithms=[u('HS256')])
expect(claims).to(have_key(u('iss')))
expect(claims[u('iss')]).to(equal(self.api_key))
expect(claims).to(have... | 42.444444 | 94 | 0.680628 |
1a03bb58ef7e00a22e209f7957fafd77d5df5c8f | 3,340 | py | Python | group3/code/train.py | wuxmax/Deep-Text-Complexity-Metric-Challenge | 4ea357ec08e499a9323cea8a6235dcb30af6563b | [
"MIT"
] | null | null | null | group3/code/train.py | wuxmax/Deep-Text-Complexity-Metric-Challenge | 4ea357ec08e499a9323cea8a6235dcb30af6563b | [
"MIT"
] | null | null | null | group3/code/train.py | wuxmax/Deep-Text-Complexity-Metric-Challenge | 4ea357ec08e499a9323cea8a6235dcb30af6563b | [
"MIT"
] | 1 | 2021-09-21T11:26:25.000Z | 2021-09-21T11:26:25.000Z | from typing import Tuple
import torch
from torch.utils.data import Subset, random_split
from transformers import BertForSequenceClassification, Trainer, TrainingArguments
from data import SentenceComplexityDataset, SentenceComplexityFinetuningDataset, get_dataset
from utils import get_cli_args
from config import BASE... | 37.954545 | 106 | 0.697305 |
1a03d56184befb13b49ae1305432109ec46fd051 | 24,071 | py | Python | cms_articles/models/article.py | misli/django-cms-articles | 4241be63053bc52e9a578725b2258c46a579fb26 | [
"BSD-3-Clause"
] | 9 | 2016-04-18T15:59:50.000Z | 2019-09-12T07:11:15.000Z | cms_articles/models/article.py | misli/django-cms-articles | 4241be63053bc52e9a578725b2258c46a579fb26 | [
"BSD-3-Clause"
] | 6 | 2019-01-22T17:53:48.000Z | 2020-07-19T17:35:31.000Z | cms_articles/models/article.py | misli/django-cms-articles | 4241be63053bc52e9a578725b2258c46a579fb26 | [
"BSD-3-Clause"
] | 4 | 2017-02-10T17:19:30.000Z | 2020-02-02T16:58:20.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import OrderedDict
from cms import constants
from cms.exceptions import (
LanguageError, PublicIsUnmodifiable, PublicVersionNeeded,
)
from cms.models import Page
from cms.utils import i18n
from cms.utils.copy_plugins import copy_plug... | 37.907087 | 120 | 0.63886 |
1a03d6ad09a3397a1a52c8f31a9271d9dcccb15a | 22,681 | py | Python | testrepository/tests/commands/test_run.py | astitva3107/testrepository | 76a5b9b1b8269c1c5ddcd11bdbfeb8eefa28c687 | [
"Apache-2.0"
] | 14 | 2015-03-31T16:30:51.000Z | 2022-01-06T02:54:42.000Z | testrepository/tests/commands/test_run.py | astitva3107/testrepository | 76a5b9b1b8269c1c5ddcd11bdbfeb8eefa28c687 | [
"Apache-2.0"
] | 32 | 2015-01-14T01:46:29.000Z | 2021-12-27T00:01:14.000Z | testrepository/tests/commands/test_run.py | astitva3107/testrepository | 76a5b9b1b8269c1c5ddcd11bdbfeb8eefa28c687 | [
"Apache-2.0"
] | 35 | 2015-03-04T04:33:01.000Z | 2022-02-22T04:31:24.000Z | #
# Copyright (c) 2010 Testrepository Contributors
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two lic... | 41.238182 | 90 | 0.609541 |
1a03ed347a657ca6834b2ff827718dd6e99b3440 | 4,048 | py | Python | document_library/views.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 6 | 2016-11-27T13:16:08.000Z | 2021-07-14T02:38:00.000Z | document_library/views.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 1 | 2017-09-20T22:31:24.000Z | 2020-12-08T17:00:58.000Z | document_library/views.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 3 | 2017-01-11T05:37:40.000Z | 2021-01-09T12:12:23.000Z | """Views for the ``document_library`` app."""
from datetime import date
from django.contrib.auth.decorators import login_required
from django.db import connection, models
from django.http import Http404
from django.utils.decorators import method_decorator
from django.views.generic import DetailView, ListView
from dat... | 36.468468 | 79 | 0.634387 |
1a04172f478597ab05570994c339158c71487653 | 2,855 | py | Python | tests/test_cassettes/async/test_async_tape_cassette_behavior.py | stjordanis/playback | 7e8ea29f764a52753aef4e3334fd9bcf7826e082 | [
"BSD-3-Clause"
] | 85 | 2021-03-10T15:11:09.000Z | 2022-03-07T13:03:48.000Z | tests/test_cassettes/async/test_async_tape_cassette_behavior.py | stjordanis/playback | 7e8ea29f764a52753aef4e3334fd9bcf7826e082 | [
"BSD-3-Clause"
] | 35 | 2021-02-03T12:48:18.000Z | 2021-11-14T11:48:46.000Z | tests/test_cassettes/async/test_async_tape_cassette_behavior.py | stjordanis/playback | 7e8ea29f764a52753aef4e3334fd9bcf7826e082 | [
"BSD-3-Clause"
] | 6 | 2021-02-03T14:19:49.000Z | 2021-08-11T06:43:35.000Z | import unittest
from playback.tape_cassettes.asynchronous.async_record_only_tape_cassette import AsyncRecordOnlyTapeCassette
from tests.mocks.delayed_in_memory_tape_cassette import DelayedInMemoryTapeCassette
from playback.utils.timing_utils import Timed
class TestAsyncTapeCassette(unittest.TestCase):
def test_... | 41.376812 | 108 | 0.697023 |
1a04299b7cc5e5d072c988db42d3dac060feef7d | 77,719 | py | Python | marketing-analytics/predicting/future-customer-value-segments/dataflow.py | lancergr/cloud-for-marketing | ce532177a25dcfe00b5ccfffeae9bd79cbdfc8fe | [
"Apache-2.0"
] | null | null | null | marketing-analytics/predicting/future-customer-value-segments/dataflow.py | lancergr/cloud-for-marketing | ce532177a25dcfe00b5ccfffeae9bd79cbdfc8fe | [
"Apache-2.0"
] | null | null | null | marketing-analytics/predicting/future-customer-value-segments/dataflow.py | lancergr/cloud-for-marketing | ce532177a25dcfe00b5ccfffeae9bd79cbdfc8fe | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.266449 | 80 | 0.642108 |
1a042fb7d91153499581c5ce31b02e04266f0274 | 2,033 | py | Python | CadVlan/Equipment/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/Equipment/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/Equipment/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | 29.463768 | 74 | 0.72848 |
1a0441b37918b1ce19ced609c13dd68e007a8d37 | 7,174 | py | Python | .config/qtile/custom_configs/core.py | RafaelLuz/dotfiles | cc47b2f719597cc75c4773a5dd59a883bc2955ca | [
"MIT"
] | null | null | null | .config/qtile/custom_configs/core.py | RafaelLuz/dotfiles | cc47b2f719597cc75c4773a5dd59a883bc2955ca | [
"MIT"
] | null | null | null | .config/qtile/custom_configs/core.py | RafaelLuz/dotfiles | cc47b2f719597cc75c4773a5dd59a883bc2955ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Author: Rafael R. L. Benevides
Date: 3/5/22
"""
from abc import ABCMeta, abstractmethod
from typing import List, Dict
from libqtile import layout
from libqtile.config import Match, Group, Key, Screen, Mouse
from libqtile.utils import guess_terminal
from libqtile.layout.base import Layo... | 28.468254 | 89 | 0.523 |
1a0441d031ca26457e32467568dfde7d3902b5e1 | 4,570 | py | Python | ovh/config.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 237 | 2015-01-07T23:14:37.000Z | 2022-03-08T21:23:49.000Z | ovh/config.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 84 | 2015-03-05T11:09:35.000Z | 2022-03-15T12:18:18.000Z | ovh/config.py | lalmeras/python-ovh | e18b704dff7db3afb130fb74f28722ad535f894f | [
"BSD-3-Clause"
] | 79 | 2015-01-25T19:00:51.000Z | 2022-03-28T09:26:03.000Z | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2013-2018, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, t... | 36.269841 | 80 | 0.719694 |
1a045e23ab9e03028bb2254995e161721de4e617 | 26 | py | Python | bitcrc_python/__init__.py | devast8a/bitcrc_python | efab94740240fdddcfd8634ce58829e6bf59e74c | [
"MIT"
] | null | null | null | bitcrc_python/__init__.py | devast8a/bitcrc_python | efab94740240fdddcfd8634ce58829e6bf59e74c | [
"MIT"
] | 2 | 2016-02-27T03:46:04.000Z | 2016-02-27T03:48:00.000Z | bitcrc_python/__init__.py | devast8a/bitcrc_python | efab94740240fdddcfd8634ce58829e6bf59e74c | [
"MIT"
] | null | null | null | from BitCrc import BitCrc
| 13 | 25 | 0.846154 |
1a0467604dcc38eadad24c4e95174e64b9815ce2 | 58,625 | py | Python | ivy/core/device.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 161 | 2021-01-20T22:11:13.000Z | 2022-01-09T09:46:33.000Z | ivy/core/device.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 4 | 2021-11-10T17:04:36.000Z | 2021-11-26T06:40:43.000Z | ivy/core/device.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 8 | 2021-02-17T20:56:33.000Z | 2022-01-09T16:45:40.000Z | """
Collection of device Ivy functions.
"""
# global
import os
import gc
import abc
import math
import time
import queue
import psutil
import inspect
import logging
import nvidia_smi
# noinspection PyUnresolvedReferences
try:
nvidia_smi.nvmlInit()
except nvidia_smi.NVMLError_LibraryNotFound:
pass
from typing ... | 39.319249 | 120 | 0.658354 |
1a047e7d6633d53db327e9971ef6e82184aefc34 | 6,591 | py | Python | tests/tendermint/test_core.py | Bilel2038/bigchaindb | b1c34523edc96ea1f0acdf4c1d3a7a5ef36e0116 | [
"Apache-2.0"
] | null | null | null | tests/tendermint/test_core.py | Bilel2038/bigchaindb | b1c34523edc96ea1f0acdf4c1d3a7a5ef36e0116 | [
"Apache-2.0"
] | null | null | null | tests/tendermint/test_core.py | Bilel2038/bigchaindb | b1c34523edc96ea1f0acdf4c1d3a7a5ef36e0116 | [
"Apache-2.0"
] | null | null | null | import json
import pytest
from abci.types_pb2 import (
RequestBeginBlock,
RequestEndBlock
)
from bigchaindb.core import CodeTypeOk, CodeTypeError
pytestmark = [pytest.mark.tendermint, pytest.mark.bdb]
def encode_tx_to_bytes(transaction):
return json.dumps(transaction.to_dict()).encode('utf8')
def te... | 30.513889 | 105 | 0.658019 |
1a0481f096655b25ca371c5248084eb0942df859 | 10,218 | py | Python | tests/test_migrate_command.py | joehybird/django-north | b18c744689a8e7464ad005bc208d7d8c95a49bcc | [
"MIT"
] | null | null | null | tests/test_migrate_command.py | joehybird/django-north | b18c744689a8e7464ad005bc208d7d8c95a49bcc | [
"MIT"
] | null | null | null | tests/test_migrate_command.py | joehybird/django-north | b18c744689a8e7464ad005bc208d7d8c95a49bcc | [
"MIT"
] | null | null | null | import os.path
from django.core.management import call_command
from django.db import connection
from django.db import DEFAULT_DB_ALIAS
import pytest
from django_north.management.commands import migrate
@pytest.mark.parametrize("manage", [True, False, None])
def test_migrate(mocker, settings, manage):
if manage... | 33.722772 | 78 | 0.595518 |
1a04b2f731a84729242885718e4c8edf2bab5e60 | 189 | py | Python | 0x03-python-data_structures/2-replace_in_list.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | 1 | 2019-05-21T09:34:41.000Z | 2019-05-21T09:34:41.000Z | 0x03-python-data_structures/2-replace_in_list.py | Rmolimock/holbertonschool-higher_level_programming | cf0421cbb6463b3960dc581badf7d4bbe1622b7d | [
"MIT"
] | null | null | null | 0x03-python-data_structures/2-replace_in_list.py | Rmolimock/holbertonschool-higher_level_programming | cf0421cbb6463b3960dc581badf7d4bbe1622b7d | [
"MIT"
] | 4 | 2018-05-01T05:04:15.000Z | 2020-04-28T22:22:54.000Z | #!/usr/bin/python3
def replace_in_list(my_list, idx, element):
if idx < 0 or idx >= len(my_list):
return my_list
else:
my_list[idx] = element
return my_list
| 23.625 | 43 | 0.613757 |
1a04d05447a3b62d241a4f2402c22cac15b98b3b | 2,336 | py | Python | opentuner/resultsdb/connect.py | ucb-sejits/opentuner | f78187f0010e7fa1f7969a1230518a4cfa12dedb | [
"MIT"
] | 39 | 2021-03-26T02:03:18.000Z | 2022-03-23T17:39:17.000Z | opentuner/resultsdb/connect.py | ucb-sejits/opentuner | f78187f0010e7fa1f7969a1230518a4cfa12dedb | [
"MIT"
] | 7 | 2020-05-12T22:38:04.000Z | 2021-12-29T05:07:25.000Z | opentuner/resultsdb/connect.py | ucb-sejits/opentuner | f78187f0010e7fa1f7969a1230518a4cfa12dedb | [
"MIT"
] | 6 | 2021-08-30T13:41:32.000Z | 2022-03-23T20:32:30.000Z | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from models import Base, _Meta
import logging
import time
from pprint import pprint
log = logging.getLogger(__name__)
DB_VERSION = "0.0"
if False: # profiling of queries
import atexit
from sqlalchemy import event
from... | 34.865672 | 130 | 0.6875 |
1a04edec27e4aebcaf6e5abef3c5bc80a2d78683 | 3,415 | py | Python | test/test_components.py | ranking-agent/query_planner | cbe6fd8b7f627658845851b06c73b239746a60f0 | [
"MIT"
] | null | null | null | test/test_components.py | ranking-agent/query_planner | cbe6fd8b7f627658845851b06c73b239746a60f0 | [
"MIT"
] | null | null | null | test/test_components.py | ranking-agent/query_planner | cbe6fd8b7f627658845851b06c73b239746a60f0 | [
"MIT"
] | null | null | null | import networkx as nx
from src.query_graph import convert_to_networkx
from src.generate_plan import decompose
def test_onehop():
query_graph = {
"nodes": {
"n01":
{
"categories":['biolink:X']
},
"n02":
{
... | 29.95614 | 93 | 0.543192 |
1a04ef536f7071bdbf885bf60e5740e6975fea7a | 17,559 | py | Python | cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/coprhd/helpers/commoncoprhdapi.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # 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/licenses/LICENSE-2.0
#
# Unless requir... | 33.573614 | 79 | 0.573381 |
1a050df856e75283e221977ee201b46042e7b888 | 8,930 | py | Python | tests/mock_requests_backend.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 1,324 | 2016-03-10T04:57:52.000Z | 2022-03-31T15:14:58.000Z | tests/mock_requests_backend.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 208 | 2016-03-10T03:40:59.000Z | 2022-03-22T23:16:08.000Z | tests/mock_requests_backend.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 129 | 2016-03-10T09:24:52.000Z | 2022-02-07T05:37:24.000Z | import json
from io import BytesIO
from unittest.mock import patch
from django.core import mail
from django.test import SimpleTestCase
import requests
from anymail.exceptions import AnymailAPIError
from .utils import AnymailTestMixin
UNSET = object()
class RequestsBackendMockAPITestCase(AnymailTestMixin, SimpleTe... | 41.534884 | 113 | 0.652968 |
1a0538f32bd05690ee2cfe5ee9cac38c2539154a | 11,788 | py | Python | deployfish/aws/systems_manager.py | corymhall/deployfish | 0f4c47f371da5b513cc67bbfee54a5c4ef56e900 | [
"MIT"
] | null | null | null | deployfish/aws/systems_manager.py | corymhall/deployfish | 0f4c47f371da5b513cc67bbfee54a5c4ef56e900 | [
"MIT"
] | 1 | 2018-10-03T17:02:39.000Z | 2018-10-03T17:02:39.000Z | deployfish/aws/systems_manager.py | corymhall/deployfish | 0f4c47f371da5b513cc67bbfee54a5c4ef56e900 | [
"MIT"
] | null | null | null | import re
from deployfish.aws import get_boto3_session
class KeyPrefixMixin(object):
@property
def name_prefix(self):
return "{}.{}.".format(self.cluster, self.service)
class Parameter(KeyPrefixMixin):
"""
This class represents a parameter in the AWS Systems Manager Parameter Store.
""... | 30.53886 | 107 | 0.544876 |
1a053c77ea2fcf74d8c116179c077c4ebbc9c868 | 3,915 | py | Python | boundaries/views.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | 2 | 2016-07-05T06:10:21.000Z | 2016-10-20T17:55:13.000Z | boundaries/views.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | null | null | null | boundaries/views.py | JoshData/represent-boundaries | 0a77bad99758bc77140c6c6def4f8d5e68810367 | [
"MIT"
] | 2 | 2016-07-05T06:10:25.000Z | 2020-03-04T02:22:24.000Z | from django.contrib.gis.db import models
from django.http import Http404
from boundaries.base_views import (ModelListView, ModelDetailView,
ModelGeoListView, ModelGeoDetailView,
BadRequest)
from boundaries.models import BoundarySet, Boundary, app_se... | 35.590909 | 107 | 0.627842 |
1a05535e77f2c1ef18bcd5d438093fc5e78c6bed | 3,434 | gyp | Python | chrome/installer/upgrade_test.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | chrome/installer/upgrade_test.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | chrome/installer/upgrade_test.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2011 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.
{
'variables': {
'chromium_code': 1,
'branding_dir': '../app/theme/<(branding_path_component)',
'version_py': '<(DEPTH)/build/util/version.... | 35.402062 | 79 | 0.545428 |
1a0566a554d4991a0c16db41e45886679b0941ee | 4,152 | py | Python | tests/linear_solve_test.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | tests/linear_solve_test.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | tests/linear_solve_test.py | mblondel/jaxopt | b76db8d8015cddc4afb5e2e0e45d6918373e7652 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 27.865772 | 74 | 0.666185 |
1a0566cc5ff4591cdbe2f51dd234f590d519b1e9 | 915 | py | Python | setup.py | trainormg/python-broadlink | e751d296d573042d425418638980c71657945c38 | [
"MIT"
] | null | null | null | setup.py | trainormg/python-broadlink | e751d296d573042d425418638980c71657945c38 | [
"MIT"
] | null | null | null | setup.py | trainormg/python-broadlink | e751d296d573042d425418638980c71657945c38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages
import sys
import warnings
try:
import pyaes
dynamic_requires = ["pyaes==1.6.0"]
except ImportError as e:
dynamic_requires = ['pycrypto==2.6.1']
version = 0.5
setup(
name='python3-broadlink',
vers... | 24.72973 | 70 | 0.653552 |
1a057806f5e148e971e039c0f6d06993f3f528b7 | 22,274 | py | Python | tests/python/proton_tests/ssl.py | jdanekrh/qpid-proton-j | 1a5e1936944c11bae64244a3223e3be98b2d6d18 | [
"Apache-2.0"
] | null | null | null | tests/python/proton_tests/ssl.py | jdanekrh/qpid-proton-j | 1a5e1936944c11bae64244a3223e3be98b2d6d18 | [
"Apache-2.0"
] | null | null | null | tests/python/proton_tests/ssl.py | jdanekrh/qpid-proton-j | 1a5e1936944c11bae64244a3223e3be98b2d6d18 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
#
# 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, Ver... | 44.726908 | 92 | 0.624809 |
1a058e0e240fdf804aa19eb8a9b37c1f733024b7 | 5,657 | py | Python | alipay/aop/api/domain/CarRentalStoreInfo.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/domain/CarRentalStoreInfo.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/domain/CarRentalStoreInfo.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.constant.ParamConstants import *
from alipay.aop.api.domain.BusinessHoursInfo import BusinessHoursInfo
from alipay.aop.api.domain.StoreAddressInfo import StoreAddressInfo
from alipay.aop.api.domain.ExtraInfo import ExtraInfo
class CarRenta... | 34.078313 | 87 | 0.609334 |
1a05cabafbe4c64a57a7ce0d70e631a277cceff1 | 1,793 | py | Python | rfml/nn/F/energy.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 61 | 2019-11-19T03:53:54.000Z | 2022-03-26T15:57:47.000Z | rfml/nn/F/energy.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 2 | 2020-12-08T10:07:21.000Z | 2021-02-24T00:29:15.000Z | rfml/nn/F/energy.py | AlexeyReshetnyak/rfml | 99ae3af822a037eb2757d6efadd25eb35a50c2b2 | [
"BSD-3-Clause"
] | 30 | 2019-12-03T13:43:22.000Z | 2022-03-26T15:57:59.000Z | """Calculate the average energy (per symbol if provided) for each example.
"""
__author__ = "Bryse Flowers <brysef@vt.edu>"
# External Includes
import torch
def energy(x: torch.Tensor, sps: float = 1.0):
"""Calculate the average energy (per symbol if provided) for each example.
This function assumes that th... | 30.389831 | 88 | 0.59063 |
1a05ee670223b700c568ed58dca4fdbb02aff8db | 111,705 | py | Python | d2l/tensorflow/d2l/torch.py | nilesh-patil/dive-into-deeplearning | d1d20885652e640a92cd82dfb6627fcdb519c51d | [
"MIT"
] | 1 | 2022-01-13T23:36:05.000Z | 2022-01-13T23:36:05.000Z | d2l/tensorflow/d2l/torch.py | nilesh-patil/dive-into-deeplearning | d1d20885652e640a92cd82dfb6627fcdb519c51d | [
"MIT"
] | 9 | 2022-01-13T19:34:34.000Z | 2022-01-14T19:41:18.000Z | d2l/tensorflow/d2l/torch.py | nilesh-patil/dive-into-deeplearning | d1d20885652e640a92cd82dfb6627fcdb519c51d | [
"MIT"
] | null | null | null | DATA_HUB = dict()
DATA_URL = 'http://d2l-data.s3-accelerate.amazonaws.com/'
import collections
import hashlib
import inspect
import math
import os
import random
import re
import shutil
import sys
import tarfile
import time
import zipfile
from collections import defaultdict
import pandas as pd
import requests
from IPyt... | 40.649563 | 99 | 0.625836 |
1a05f0013e673289027c509767a1911608200895 | 5,484 | py | Python | examples/lbfgs/driver.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 2 | 2019-10-08T13:31:08.000Z | 2019-10-22T18:34:52.000Z | examples/lbfgs/driver.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 5 | 2018-01-04T22:54:34.000Z | 2018-02-06T23:48:20.000Z | examples/lbfgs/driver.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ray
import numpy as np
import scipy.optimize
import tensorflow as tf
import os
from tensorflow.examples.tutorials.mnist import input_data
class LinearModel(object):
"""Simple class for a one layer... | 38.893617 | 79 | 0.648796 |
1a0623e479a53bf03d6a35a695bfc224479e9009 | 187 | py | Python | tensorflow/basic.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | tensorflow/basic.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | tensorflow/basic.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | import tensorflow as tf
w = tf.constant(2.0)
x = tf.placeholder(tf.float32)
b = tf.ones(1)
y = tf.add(tf.math.multiply(w,x), b)
sess = tf.Session()
print(sess.run(y, feed_dict={x:3})) | 17 | 36 | 0.663102 |
1a064014c343b1554ed68593a37244c58c662976 | 8,320 | py | Python | discord/voice/client.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | discord/voice/client.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | discord/voice/client.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2021-present VincentRPS
# 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 t... | 31.634981 | 97 | 0.63125 |
1a068c39699a7a305a92a4231b073856b455bfac | 1,573 | py | Python | tests/test_framework.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 1 | 2017-08-24T00:46:47.000Z | 2017-08-24T00:46:47.000Z | tests/test_framework.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 177 | 2017-04-10T23:03:27.000Z | 2022-03-28T22:07:54.000Z | tests/test_framework.py | HEP-DL/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | null | null | null | """
Tests classes in dl_data_validation_toolset.framework.base_test
"""
from dl_data_validation_toolset.framework import base_unittest
from dl_data_validation_toolset.framework.base_test import BaseTest
#from dl_data_validation_toolset.framework.report import FileReport
class MyTestCase(BaseTest):
"""
Dummy ... | 26.661017 | 69 | 0.669421 |
1a06b1e7b3fc7de47ec2c5622f378e48b5ad2581 | 884 | py | Python | 01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/01-Stu_Trading_Functions/Solved/jarvis.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/01-Stu_Trading_Functions/Solved/jarvis.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/15-Algorithmic-Trading/2/Activities/01-Stu_Trading_Functions/Solved/jarvis.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | def initialize(cash=None):
"""Initialize the dashboard, data storage, and account balances."""
return
def build_dashboard():
"""Build the dashboard."""
return
def fetch_data():
"""Fetches the latest prices."""
return
def generate_signals():
"""Generates trading signals for a given data... | 16.37037 | 71 | 0.653846 |
1a06bdc02a2c81025b31a3111b18365ee9065fb9 | 22,889 | py | Python | pcdsdevices/state.py | pcdshub/pcdsdevices | ba67769fb35b0baa8ca494b8e65dbf294e9b09c7 | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-06-17T20:08:54.000Z | 2022-01-11T17:55:21.000Z | pcdsdevices/state.py | pcdshub/pcdsdevices | ba67769fb35b0baa8ca494b8e65dbf294e9b09c7 | [
"BSD-3-Clause-LBNL"
] | 757 | 2017-12-21T23:16:41.000Z | 2022-03-31T22:56:06.000Z | pcdsdevices/state.py | pcdshub/pcdsdevices | ba67769fb35b0baa8ca494b8e65dbf294e9b09c7 | [
"BSD-3-Clause-LBNL"
] | 38 | 2018-01-26T00:01:35.000Z | 2022-02-17T00:48:55.000Z | """
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... | 36.331746 | 79 | 0.613089 |
1a06cc1094e0d864275f7240e4a100e558caff36 | 1,025 | py | Python | grip/settings.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | 1 | 2016-12-22T07:04:04.000Z | 2016-12-22T07:04:04.000Z | grip/settings.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | null | null | null | grip/settings.py | slitayem/grip | 351e32501d0a84c4841ef7b0eaf50e799f161bfe | [
"MIT"
] | null | null | null | """\
Default Configuration
Do NOT change the values here for risk of accidentally committing them.
Override them using command-line arguments or with a settings_local.py in
this directory or in ~/.grip/settings.py instead.
"""
HOST = 'localhost'
PORT = 5000
DEBUG = True
DEBUG_GRIP = False
# Note: For security co... | 29.285714 | 119 | 0.661463 |
1a06d11ef3af38563994d8e4a3cdd966b743aff4 | 14,106 | py | Python | dnplab/dnpIO/topspin.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 4 | 2020-09-23T08:09:33.000Z | 2022-02-10T22:02:11.000Z | dnplab/dnpIO/topspin.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 126 | 2020-09-16T22:25:59.000Z | 2022-03-29T17:15:27.000Z | dnplab/dnpIO/topspin.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 5 | 2020-09-24T20:57:31.000Z | 2021-08-19T01:52:16.000Z | import numpy as _np
import re as _re
from .. import dnpdata as _dnpdata
import os as _os
_dspfvs_table_10 = {
2: 44.7500,
3: 33.5000,
4: 66.6250,
6: 59.0833,
8: 68.5625,
12: 60.3750,
16: 69.5313,
24: 61.0208,
32: 70.0156,
48: 61.3438,
64: 70.2578,
96: 61.5052,
128:... | 27.767717 | 188 | 0.496739 |
1a06eed9699da2e43863c9c7c745310e11933cd7 | 8,111 | py | Python | code/lib/geometry.py | seismology-hamburg/matched_field_processing | 68c8bdb9267a19131c6ada9b6536ad63de93f480 | [
"MIT"
] | 9 | 2020-10-13T15:56:20.000Z | 2022-03-22T14:32:44.000Z | code/lib/geometry.py | seismology-hamburg/matched_field_processing | 68c8bdb9267a19131c6ada9b6536ad63de93f480 | [
"MIT"
] | 1 | 2021-09-24T08:10:31.000Z | 2021-10-11T15:48:09.000Z | code/lib/geometry.py | seismology-hamburg/matched_field_processing | 68c8bdb9267a19131c6ada9b6536ad63de93f480 | [
"MIT"
] | 4 | 2021-10-02T14:30:31.000Z | 2022-03-07T02:31:30.000Z | import logging
import numpy as np
from tqdm import tqdm
from .misc import chunks
from .synth import get_real_station_locations_worldwide, get_synth_stations
def generate_global_grid(settings: dict) -> tuple:
"""
Generate the grid geometry.
Returns coordinates of n grid_points as [[x0,y0,z0], [x1,y1,z1],... | 31.683594 | 96 | 0.640735 |
1a072001ad81f0cac1940d9c424e96f325b519f4 | 9,490 | py | Python | datar/dplyr/join.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | null | null | null | datar/dplyr/join.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | null | null | null | datar/dplyr/join.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | null | null | null | """Mutating joins"""
from typing import Iterable, Mapping, Union
import pandas
from pandas import DataFrame, Series, Categorical
from pandas.core.dtypes.common import is_categorical_dtype
from pipda import register_verb
from pipda.utils import CallingEnvs
from ..core.contexts import Context
from ..core.types import S... | 26.657303 | 80 | 0.569968 |
1a074b11c2013f4a4d00f5ee39f085d4ead0cfe0 | 12,024 | py | Python | pegasusio/data_aggregation.py | lilab-bcb/pegasusio | 3160e7d3f3ff949770214a499482b2088c2ed839 | [
"BSD-3-Clause"
] | null | null | null | pegasusio/data_aggregation.py | lilab-bcb/pegasusio | 3160e7d3f3ff949770214a499482b2088c2ed839 | [
"BSD-3-Clause"
] | null | null | null | pegasusio/data_aggregation.py | lilab-bcb/pegasusio | 3160e7d3f3ff949770214a499482b2088c2ed839 | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
import pandas as pd
from subprocess import check_call
from typing import List, Tuple, Dict, Set, Union, Optional
from pegasusio import timer
from pegasusio import MultimodalData, AggrData
from pegasusio import infer_file_type, read_input
import logging
logger = logging.getLogger(__name__)... | 48.289157 | 555 | 0.658433 |
1a0788a13572cc04b3b61f6c8b6719f364a7b135 | 49,739 | py | Python | whoville/cloudbreak/apis/v1rdsconfigs_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/apis/v1rdsconfigs_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/apis/v1rdsconfigs_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 42.044801 | 984 | 0.569231 |
1a07ada70762884ea7489bc94596e3dd3e018ba1 | 4,327 | py | Python | test/NarrativeIndexer_server_test.py | scanon/NarrativeIndexer | 1ca63b425273e1100e644f4b7147fc26b4080bde | [
"MIT"
] | null | null | null | test/NarrativeIndexer_server_test.py | scanon/NarrativeIndexer | 1ca63b425273e1100e644f4b7147fc26b4080bde | [
"MIT"
] | null | null | null | test/NarrativeIndexer_server_test.py | scanon/NarrativeIndexer | 1ca63b425273e1100e644f4b7147fc26b4080bde | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
import os # noqa: F401
import json # noqa: F401
import time
from random import randint
from os import environ
try:
from ConfigParser import ConfigParser # py2
except:
from configparser import ConfigParser # py3
from pprint import pprint # noqa: F401
from Workspace... | 35.178862 | 82 | 0.599723 |
1a07b3bf2b28376236dac89a3fb7d03da9155502 | 4,938 | py | Python | examples/python/rc2.py | evmaus/z3 | 73083977e2e7e552e731fec0818d8a2ae2925f07 | [
"MIT"
] | null | null | null | examples/python/rc2.py | evmaus/z3 | 73083977e2e7e552e731fec0818d8a2ae2925f07 | [
"MIT"
] | null | null | null | examples/python/rc2.py | evmaus/z3 | 73083977e2e7e552e731fec0818d8a2ae2925f07 | [
"MIT"
] | null | null | null | # RC2 algorithm
# basic version with some optimizations
# - process soft constraints in order of highest values first.
# - extract multiple cores, not just one
# - use built-in cardinality constraints, cheap core minimization.
#
# See also https://github.com/pysathq/pysat and papers in CP 2014, JSAT 2015.
from z3 imp... | 30.481481 | 92 | 0.535034 |
1a07c76865cfe1cbdb011084e87c4c55a6734e3f | 148 | py | Python | toolz_library/__init__.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | toolz_library/__init__.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | toolz_library/__init__.py | WallaceLiu/python_learn | ea8c4c20856a25491c756f74b3b572463ea7d7ea | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@time : 2021/9/11 下午12:15
@author : liuning
@file : __init__.py.py
@description : ...
""" | 21.142857 | 35 | 0.452703 |
1a07cda126446a15be0bac09113ae098d8de1c59 | 224 | py | Python | botx/shared.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/shared.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/shared.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Shared config for pydantic dataclasses."""
from pydantic import BaseConfig
class BotXDataclassConfig(BaseConfig):
"""Config for pydantic dataclasses that allows custom types."""
arbitrary_types_allowed = True
| 22.4 | 67 | 0.767857 |
1a07dce1706cb6d3fdf95f03a4c1e171f0054831 | 47 | py | Python | mountaintools/cairio/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/cairio/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/cairio/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | from .cairioclient import CairioClient, client
| 23.5 | 46 | 0.851064 |
1a07e043dd9922c1ccb5166f259e9fcfd62ccdcd | 35,072 | py | Python | hybrid_ranking/matchzoo/inputs/list_generator.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 22 | 2019-09-23T20:14:54.000Z | 2022-02-24T20:49:35.000Z | hybrid_ranking/matchzoo/inputs/list_generator.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 2 | 2019-08-31T08:41:14.000Z | 2020-10-03T21:10:34.000Z | hybrid_ranking/matchzoo/inputs/list_generator.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 3 | 2019-11-07T03:03:53.000Z | 2020-10-23T15:50:44.000Z | # -*- coding: utf-8 -*-
import sys
import random
import numpy as np
from utils.rank_io import *
from layers import DynamicMaxPooling
import scipy.sparse as sp
class ListBasicGenerator(object):
def __init__(self, config={}):
self.__name = 'ListBasicGenerator'
self.config = config
self.batch... | 47.717007 | 265 | 0.54026 |
1a080d17205844d300bc0ad07b92b0f0d784ef38 | 7,521 | py | Python | S1_NRB/metadata/mapping.py | SAR-ARD/S1_NRB | c43bff1c693a357c90d40d8dd547b6f208884542 | [
"MIT"
] | 2 | 2022-03-03T12:18:29.000Z | 2022-03-10T12:43:54.000Z | S1_NRB/metadata/mapping.py | SAR-ARD/S1_NRB | c43bff1c693a357c90d40d8dd547b6f208884542 | [
"MIT"
] | 2 | 2022-03-09T11:49:54.000Z | 2022-03-18T08:55:46.000Z | S1_NRB/metadata/mapping.py | SAR-ARD/S1_NRB | c43bff1c693a357c90d40d8dd547b6f208884542 | [
"MIT"
] | 1 | 2022-03-01T15:39:56.000Z | 2022-03-01T15:39:56.000Z | NRB_PATTERN = r'^(?P<sensor>S1[AB])_' \
r'(?P<mode>IW|EW|S[1-6])_' \
r'(?P<product>NRB)_' \
r'(?P<resolution>_)' \
r'(?P<processingLevel>1)' \
r'(?P<category>S)' \
r'(?P<pols>SH|SV|DH|DV)_' \
r'(?P<start>[0-9]{8}T[0-9]{6})... | 49.807947 | 137 | 0.401011 |
1a080fae24c7ca90d71878ce64584fd65c80c113 | 4,707 | py | Python | alipay/aop/api/domain/VenueOrderTradeInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/VenueOrderTradeInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/VenueOrderTradeInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class VenueOrderTradeInfo(object):
def __init__(self):
self._amount = None
self._desc = None
self._id = None
self._operation_time = None
self._partner_id = None
... | 29.236025 | 85 | 0.569577 |
1a0842d4b0c231ea505f76e117b6ceb756b60a7a | 28,242 | py | Python | synapse/storage/data_stores/main/end_to_end_keys.py | juhovan/synapse | 57feeab364325374b14ff67ac97c288983cc5cde | [
"Apache-2.0"
] | null | null | null | synapse/storage/data_stores/main/end_to_end_keys.py | juhovan/synapse | 57feeab364325374b14ff67ac97c288983cc5cde | [
"Apache-2.0"
] | null | null | null | synapse/storage/data_stores/main/end_to_end_keys.py | juhovan/synapse | 57feeab364325374b14ff67ac97c288983cc5cde | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2019 New Vector Ltd
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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... | 39.225 | 95 | 0.572374 |
1a085413afe0bff191408f9ebb91142329c55c5a | 7,423 | py | Python | bin/des_deep_stamp.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | 1 | 2019-10-23T11:04:15.000Z | 2019-10-23T11:04:15.000Z | bin/des_deep_stamp.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | bin/des_deep_stamp.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | #!/home/wiseman/anaconda3/bin/python
# -*- coding: utf-8 -*-
'''Script to find the photometry for a certain supernova'''
# exectuable to run through the entire stack process
import numpy as np
import pandas as pd
import logging
import argparse
from time import gmtime, strftime
from astropy.coordinates import SkyCoord
f... | 41.937853 | 141 | 0.582649 |
1a08571bf2cb403c7a370a4c6faad415b06c1b22 | 1,955 | py | Python | email_auth/interfaces/rest/test/serializers/test_email_verification_serializer.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 1 | 2020-06-05T23:29:24.000Z | 2020-06-05T23:29:24.000Z | email_auth/interfaces/rest/test/serializers/test_email_verification_serializer.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 40 | 2019-08-30T23:08:10.000Z | 2019-12-08T13:58:19.000Z | email_auth/interfaces/rest/test/serializers/test_email_verification_serializer.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | null | null | null | from unittest import mock
import pytest
from email_auth import models
pytest.importorskip("rest_framework")
# Imports that require "rest_framework"
from rest_framework.exceptions import ValidationError # noqa
from email_auth.interfaces.rest import serializers # noqa
@mock.patch("email_auth.models.EmailVerifica... | 29.621212 | 72 | 0.747826 |
1a088cd7bfe3fd84696f2674e65e433c5aea0299 | 496 | py | Python | biobb_cmip/test/unitests/test_cmip/test_titration.py | bioexcel/biobb_cmip | ee732a67e7e9a7d924ca2c8ec56b69f3e367861a | [
"Apache-2.0"
] | null | null | null | biobb_cmip/test/unitests/test_cmip/test_titration.py | bioexcel/biobb_cmip | ee732a67e7e9a7d924ca2c8ec56b69f3e367861a | [
"Apache-2.0"
] | 9 | 2021-05-14T10:10:02.000Z | 2022-01-19T14:35:20.000Z | biobb_cmip/test/unitests/test_cmip/test_titration.py | bioexcel/biobb_cmip | ee732a67e7e9a7d924ca2c8ec56b69f3e367861a | [
"Apache-2.0"
] | null | null | null | from biobb_common.tools import test_fixtures as fx
from biobb_cmip.cmip.titration import titration
class TestTitration():
def setUp(self):
fx.test_setup(self, 'titration')
def tearDown(self):
#pass
fx.test_teardown(self)
def test_titration(self):
titration(properties=self... | 29.176471 | 89 | 0.701613 |
1a08a982deb1f6a9af05c988686285ab223ea904 | 12,643 | py | Python | production/pygsl-0.9.5/testing/tools/write_ufunc_evaluators.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/testing/tools/write_ufunc_evaluators.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/testing/tools/write_ufunc_evaluators.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | """
"""
import sys
import string
from cStringIO import StringIO
class UFuncType:
"""
"""
def __init__(self):
self.type = None
self.fake_type = None
def SetType(self, type):
self.type = type
def SetFake(self, type):
self.fake_type = type
def GetCast(self... | 32.335038 | 122 | 0.443487 |
1a08ac9d4c4d297f4f8d317ef18d1a84fb1d7f0e | 10,268 | py | Python | tests/tf/test_dataset.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | tests/tf/test_dataset.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | tests/tf/test_dataset.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 32.391167 | 99 | 0.600409 |
1a08f2ca6b5fd703f9ee0ee5edbcf4a872fd0581 | 140,118 | py | Python | tests/test_algorithm.py | idiane/zipline | c89e95790594edff211fe3eeb215ad1fe05acfea | [
"Apache-2.0"
] | null | null | null | tests/test_algorithm.py | idiane/zipline | c89e95790594edff211fe3eeb215ad1fe05acfea | [
"Apache-2.0"
] | null | null | null | tests/test_algorithm.py | idiane/zipline | c89e95790594edff211fe3eeb215ad1fe05acfea | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2014 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 35.161355 | 79 | 0.562476 |
1a08facef5e5c2bc3749d02f2b91b5f9c9bd0316 | 648 | py | Python | source/scripts/remove_unlabeled_images.py | FrancescoSaverioZuppichini/Smash-Bros-Melee | 4ca6f67240bfe60e86a82409c4056aaa25a5a860 | [
"MIT"
] | null | null | null | source/scripts/remove_unlabeled_images.py | FrancescoSaverioZuppichini/Smash-Bros-Melee | 4ca6f67240bfe60e86a82409c4056aaa25a5a860 | [
"MIT"
] | null | null | null | source/scripts/remove_unlabeled_images.py | FrancescoSaverioZuppichini/Smash-Bros-Melee | 4ca6f67240bfe60e86a82409c4056aaa25a5a860 | [
"MIT"
] | null | null | null | from pathlib import Path
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--root',
type=str,
default='train',
help='dir that contains the images.')
args = parser.parse_args()
root = Path(args.root)
images = root.glob('*.jpg... | 24.923077 | 57 | 0.615741 |
1a09360d29e026f9092fa567bca6786acada1730 | 5,960 | py | Python | connections.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 4 | 2015-05-02T09:57:49.000Z | 2021-08-21T14:46:37.000Z | connections.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | null | null | null | connections.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 2 | 2021-08-21T19:37:50.000Z | 2022-01-22T20:28:46.000Z | from AA import *
from Watcher import *
import win32com.client, os, time, win32gui, threading
INIT_WAIT = 0.5
SAFE_WAIT = 0.5
SPIN_DELAY = 0.2
ANSWER = 9
# create an instance of WSH Shell
ws_shell = win32com.client.Dispatch("WScript.Shell")
# press some keys
def SendKeys(keys, shift=False):
'''
Inject a key press... | 28.113208 | 86 | 0.652685 |
1a094a999f8088b46e23ad474438f02ea90d49ff | 4,887 | py | Python | bandwidth/voice/bxml/verbs/gather.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/voice/bxml/verbs/gather.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/voice/bxml/verbs/gather.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | """
gather.py
Representation of Bandwidth's gather BXML verb
@copyright Bandwidth INC
"""
from lxml import etree
from .base_verb import AbstractBxmlVerb
from .speak_sentence import SSML_REGEX
import re
GATHER_TAG = "Gather"
class Gather(AbstractBxmlVerb):
def __init__(self, gather_url=None, gather_method=N... | 46.990385 | 114 | 0.695109 |
1a09769b90027c14ac3dacaaf1dd376d3d4b66dd | 255 | py | Python | symm/__init__.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | symm/__init__.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | symm/__init__.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
from pyscf.symm import param
from pyscf.symm import geom
from pyscf.symm import basis
from pyscf.symm import cg
from pyscf.symm.geom import *
from pyscf.symm.basis import *
from pyscf.symm.addons import *
| 19.615385 | 43 | 0.768627 |
1a099b85929684c0b5700364b05c69357202c50d | 3,952 | py | Python | alipay/aop/api/domain/AlipayCommerceOperationGamemarketingBenefitVerifyModel.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/domain/AlipayCommerceOperationGamemarketingBenefitVerifyModel.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/domain/AlipayCommerceOperationGamemarketingBenefitVerifyModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.ExtInfoMap import ExtInfoMap
class AlipayCommerceOperationGamemarketingBenefitVerifyModel(object):
def __init__(self):
self._activity_code = None
self._benefi... | 34.973451 | 101 | 0.62753 |
1a099c3c85b327c2179e9f7b600f47268fc10030 | 10,948 | py | Python | src/logml/feature_importance/feature_importance_model.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null | src/logml/feature_importance/feature_importance_model.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | 56 | 2019-09-10T19:00:38.000Z | 2022-02-10T00:35:57.000Z | src/logml/feature_importance/feature_importance_model.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import scipy
import seaborn as sns
from ..core.files import MlFiles
from ..core.scatter_gather import scatter, scatter_all, gather
from ..util.etc import array_to_str
class FeatureImportanceModel(MlFiles):
"""
Estimate feature importance ... | 46.194093 | 245 | 0.644136 |
1a099e9070af9596fa6571954e453f528990ca03 | 1,759 | py | Python | sorbic/utils/traverse.py | s0undt3ch/sorbic | feeb135165044b1f046164bcf9369d5720e5ce5d | [
"Apache-2.0"
] | 2 | 2020-10-13T11:16:27.000Z | 2021-12-23T00:48:18.000Z | alder/aid/traverse.py | AlderDHT/alder | 26a11d482dfe6763e0fed3f5ac0e379396f5d5bc | [
"Apache-2.0"
] | null | null | null | alder/aid/traverse.py | AlderDHT/alder | 26a11d482dfe6763e0fed3f5ac0e379396f5d5bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Traversal algorithms, used to traverse data stuctures such as can be found in
datbase documents
'''
DEFAULT_TARGET_DELIM = ':'
def traverse_dict_and_list(data, key, default=None, delimiter=DEFAULT_TARGET_DELIM):
'''
Traverse a dict or list using a colon-delimited (or otherwise deli... | 36.645833 | 84 | 0.530984 |
1a09a8f27f2d1a5e9f14607c2e3da3b2ce70bed8 | 5,558 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_max31855.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_max31855.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_max31855.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2017 Radomir Dopieralski for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
``adafruit_max31855``
===========================
This is a CircuitPython driver for the Maxim Integrated MAX31855 thermocouple
amplifier module.
* Author(s): Radomir Dopieralski
Implementation Notes
----... | 32.887574 | 93 | 0.543001 |
1a09aaa9e9d157b76bb9c97209f91769a6afb1db | 1,759 | py | Python | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | wlanpi_commands/speedtest.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | null | null | null | from .command import Command
import os
import subprocess
from utils.emojis import graph, hour_glass
class Speedtest(Command):
def __init__(self, telegram_object, conf_obj):
super().__init__(telegram_object, conf_obj)
self.command_name = "speedtest"
def run(self, args_list):
... | 34.490196 | 181 | 0.630472 |
1a09b69c6612db2fd34f1197485d9346d8d4e7de | 103,690 | py | Python | nova/virt/xenapi/vm_utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/virt/xenapi/vm_utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/virt/xenapi/vm_utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012 OpenStack Foundation
#
# 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
#
# ... | 37.815463 | 79 | 0.616993 |
1a09cace27a867c6ec60c936660390fdcf7dd237 | 785 | py | Python | violas_client/lbrtypes/transaction/module.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/transaction/module.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/transaction/module.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from violas_client.canoser import Struct, Uint8
from violas_client.move_core_types.account_address import AccountAddress as Address
from violas_client.lbrtypes.bytecode import get_code, CodeType
class Module(Struct):
_fields = [
("code", bytes)
]
def get_code(self):
return self.code.hex()
... | 32.708333 | 83 | 0.686624 |
1a09cec26a1aefdd6982430cd5dcf766a3eb198a | 3,990 | py | Python | owtf/scripts/ssl/reporter.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/scripts/ssl/reporter.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/scripts/ssl/reporter.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import json
import os
import sys
import traceback
from template import RESULTS
if not os.path.isfile(sys.argv[1]):
sys.exit(-1)
with open(str(sys.argv[1]), 'r') as data_file:
data = json.load(data_file)
org_name = str(sys.argv[1]).split('.json',... | 39.9 | 112 | 0.593484 |
1a09f727e11d5d090d5d95a317db4b6b5e18031b | 12,167 | py | Python | test/api/AI/test_search_context.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | test/api/AI/test_search_context.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | test/api/AI/test_search_context.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="test_search_context.py">
# Copyright (c) 2019 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtain... | 41.955172 | 163 | 0.619709 |
1a09fedc7b494a2b500e7d773592c9d0b6f892fa | 7,281 | py | Python | dposlib/ark/v2/__init__.py | Moustikitos/dpos | 3f53fb269c75a9b2dcc116590901131a38b2f5a3 | [
"MIT"
] | 5 | 2019-02-15T21:20:58.000Z | 2022-02-08T22:01:54.000Z | dposlib/ark/v2/__init__.py | Moustikitos/dpos | 3f53fb269c75a9b2dcc116590901131a38b2f5a3 | [
"MIT"
] | 1 | 2019-02-15T13:58:39.000Z | 2019-02-20T21:38:21.000Z | dposlib/ark/v2/__init__.py | Moustikitos/dpos | 3f53fb269c75a9b2dcc116590901131a38b2f5a3 | [
"MIT"
] | 5 | 2018-07-27T20:44:58.000Z | 2022-03-22T05:59:03.000Z | # -*- coding: utf-8 -*-
import io
import os
import sys
import pytz
import pprint
from datetime import datetime
from importlib import import_module
from dposlib import rest, cfg, PY3, HOME, FROZEN
from dposlib.ark import crypto
from dposlib.ark.v2 import api
from dposlib.ark.tx import Transaction
from ... | 30.982979 | 80 | 0.579865 |
1a0a09cdf6c1a2b19b2f5660e9aa71c173c26630 | 1,876 | py | Python | two1/bitserv/django/migrations/0001_initial.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 415 | 2016-06-10T00:46:55.000Z | 2021-10-16T00:56:06.000Z | two1/bitserv/django/migrations/0001_initial.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-06-11T13:48:59.000Z | 2021-01-05T11:19:30.000Z | two1/bitserv/django/migrations/0001_initial.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 109 | 2016-06-11T05:17:05.000Z | 2021-12-22T11:02:22.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='BlockchainTransaction',
fields=[
('id', models.... | 39.083333 | 114 | 0.552772 |
1a0a5289bdaf532a7b95e133bc747aa93f8e78c7 | 6,503 | py | Python | hivwholeseq/patients/get_time_to_boundary.py | neherlab/hivwholeseq | 978ce4060362e4973f92b122ed5340a5314d7844 | [
"MIT"
] | 3 | 2016-09-13T12:15:47.000Z | 2021-07-03T01:28:56.000Z | hivwholeseq/patients/get_time_to_boundary.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | null | null | null | hivwholeseq/patients/get_time_to_boundary.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | 3 | 2016-01-17T03:43:46.000Z | 2020-03-25T07:00:11.000Z | # vim: fdm=marker
'''
author: Fabio Zanini
date: 12/11/14
content: Measure the time for polymorphisms to reach the boundary (fixation
or loss), we might use it to estimate coalescence time.
'''
# Modules
import os
import argparse
from itertools import izip
import numpy as np
from matplotlib imp... | 37.373563 | 96 | 0.492849 |
1a0a59ead77bc7b529e7ac6484514b7f95ffb30b | 4,110 | py | Python | Tools/scons/scons-local/SCons/Tool/linkloc.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/linkloc.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Tool/linkloc.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | """SCons.Tool.linkloc
Tool specification for the LinkLoc linker for the Phar Lap ETS embedded
operating system.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2017 The S... | 36.052632 | 116 | 0.677129 |
1a0a81156421deefd7aa93cc56b5f4522dce2546 | 286 | py | Python | grab/util/misc.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | grab/util/misc.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | grab/util/misc.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | import re
RE_TOKEN1 = re.compile(r'(.)([A-Z][a-z]+)')
RE_TOKEN2 = re.compile(r'([a-z0-9])([A-Z])')
def camel_case_to_underscore(name):
"""Converts camel_case into CamelCase"""
res = RE_TOKEN1.sub(r'\1_\2', name)
res = RE_TOKEN2.sub(r'\1_\2', res)
return res.lower()
| 22 | 44 | 0.618881 |
1a0aa375a6f9c06ec9cf7b6e06848b6cc4974cbf | 387 | py | Python | setup.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | 1 | 2015-11-05T19:20:27.000Z | 2015-11-05T19:20:27.000Z | setup.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | setup.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
import sys
install_requires = [
# protobuf 2.6 doesn't support python 3.
'protobuf==3.0.0-alpha-1',
'requests',
]
if sys.version_info < (3, 4):
install_requires.append('enum34')
setup(
name='cockroach',
packages=['cockroach', 'cockroach.proto'],
install_requir... | 20.368421 | 46 | 0.671835 |
1a0aa60609216e3d39ec0e7af680f39011e7d6ce | 27,874 | py | Python | tensorflow/python/keras/engine/saving_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/engine/saving_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/engine/saving_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2018 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... | 35.418043 | 80 | 0.640992 |
1a0aaeb8828b3bf176c66f9860bc9a16c881784d | 5,386 | py | Python | maskrcnn_benchmark/engine/trainer.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 7 | 2020-05-07T00:27:30.000Z | 2022-01-23T08:17:46.000Z | maskrcnn_benchmark/engine/trainer.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/engine/trainer.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 3 | 2020-05-07T00:28:08.000Z | 2021-08-12T13:03:57.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import collections
import datetime
import logging
import os
import time
import torch
import torch.distributed as dist
from maskrcnn_benchmark.utils.comm import get_world_size
from maskrcnn_benchmark.utils.metric_logger import MetricLogger
from ma... | 35.906667 | 109 | 0.6101 |
1a0ab07d8a1814121d8c7e3656a4dfabbf4463fa | 18,042 | py | Python | kinto/core/permission/postgresql/__init__.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 4,618 | 2015-08-06T18:17:02.000Z | 2022-03-31T10:03:07.000Z | kinto/core/permission/postgresql/__init__.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 1,578 | 2015-07-30T09:47:41.000Z | 2022-03-31T13:12:50.000Z | kinto/core/permission/postgresql/__init__.py | vincentfretin/kinto | 34ff8093ab708eae55fc4eefa237fb420e808a6a | [
"Apache-2.0"
] | 546 | 2015-07-30T10:31:35.000Z | 2022-03-31T12:44:32.000Z | import logging
import os
from collections import OrderedDict
from kinto.core.permission import PermissionBase
from kinto.core.storage.postgresql.client import create_from_config
from kinto.core.storage.postgresql.migrator import MigratorMixin
logger = logging.getLogger(__name__)
HERE = os.path.dirname(__file__)
cl... | 37.27686 | 93 | 0.601485 |
1a0abf1dcd5175a92f6b8129bb8a8fa57ffc9173 | 139 | py | Python | setup.py | snook9/pdf_extractor | 7a4c37db5026bb1789c5df5a76bc50718288bc1f | [
"MIT"
] | 1 | 2021-11-05T07:55:56.000Z | 2021-11-05T07:55:56.000Z | setup.py | snook9/pdf_extractor | 7a4c37db5026bb1789c5df5a76bc50718288bc1f | [
"MIT"
] | 8 | 2021-11-05T20:19:22.000Z | 2021-12-22T15:15:37.000Z | setup.py | snook9/pdf_extractor | 7a4c37db5026bb1789c5df5a76bc50718288bc1f | [
"MIT"
] | null | null | null | # Name: PdfExporter
# Authors: Jonathan CASSAING
# Tool for parsing and extracting PDF file content
from setuptools import setup
setup()
| 17.375 | 50 | 0.784173 |
1a0acc3af25b4d2c716021dbcbbec43d6a43f653 | 3,842 | py | Python | python/l0895.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | python/l0895.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | python/l0895.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | """
Implement FreqStack, a class which simulates the operation of a stack-like data structure.
FreqStack has two functions:
push(int x), which pushes an integer x onto the stack.
pop(), which removes and returns the most frequent element in the stack.
If there is a tie for most frequent element, the element closest t... | 23.570552 | 113 | 0.595003 |
1a0adfbe220a3864f4950f4039042a1f680080c7 | 4,812 | py | Python | fabric_cf/actor/test/core/plugins/ansible_handler_processor_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/actor/test/core/plugins/ansible_handler_processor_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/test/core/plugins/ansible_handler_processor_test.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 44.555556 | 115 | 0.746883 |
1a0b02233e13d55659ba0325c66a711eb6e5e7df | 832 | py | Python | parcel_delivery/urls.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | null | null | null | parcel_delivery/urls.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | null | null | null | parcel_delivery/urls.py | zawad2221/courier_delivery | f96c41a60943946f9f7e0837d017215aa8cd02dd | [
"MIT"
] | null | null | null | """parcel_delivery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cla... | 34.666667 | 77 | 0.71274 |
1a0b372cfe8e9c8c4a62cd0b8aabd47c47cb861c | 3,748 | py | Python | river/base/transformer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/base/transformer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/base/transformer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import abc
import pandas as pd
from river import base
class Transformer(base.Estimator):
"""A transformer."""
@property
def _supervised(self):
return False
def learn_one(self, x: dict, **kwargs) -> "Transformer":
"""Update with a set of features `x`.
A lot of transformers ... | 25.496599 | 98 | 0.594184 |
1a0b6a8c8c01c3962e8fe8d9baa6aea0031bc024 | 5,693 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/chat_banned_rights.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/chat_banned_rights.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/chat_banned_rights.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... | 48.245763 | 522 | 0.635166 |
1a0b9236488752a7108a200814a31a258a5a75b7 | 4,797 | py | Python | artemis/general/nondeterminism_hunting.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 235 | 2016-08-26T14:18:51.000Z | 2022-03-13T10:54:39.000Z | artemis/general/nondeterminism_hunting.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 112 | 2016-04-30T11:48:38.000Z | 2021-01-12T20:17:32.000Z | artemis/general/nondeterminism_hunting.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 31 | 2016-11-05T19:09:19.000Z | 2021-09-13T07:35:40.000Z | from artemis.fileman.local_dir import get_artemis_data_path
import os
import pickle
import numpy as np
from six.moves import input
from artemis.general.hashing import fixed_hash_eq
def assert_variable_matches_between_runs(var, var_name, show='max_diff'):
"""
This function allows you to check that a variable i... | 32.412162 | 184 | 0.671461 |
1a0ba5bfd2f77375a7ebe3140c436bbd8aa849ef | 1,749 | py | Python | geo_knowledge_hub/records/ext.py | florianfranz/knowledge_hub | dc47e37d4014b3ad64064945647a3e4fae2f851e | [
"MIT"
] | null | null | null | geo_knowledge_hub/records/ext.py | florianfranz/knowledge_hub | dc47e37d4014b3ad64064945647a3e4fae2f851e | [
"MIT"
] | null | null | null | geo_knowledge_hub/records/ext.py | florianfranz/knowledge_hub | dc47e37d4014b3ad64064945647a3e4fae2f851e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 GEO.
#
# GEO Knowledge Hub is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Flask extension for GEO Knowledge Hub."""
from __future__ import absolute_import, print_function
from . impo... | 34.98 | 77 | 0.596913 |
1a0bb3e2dcfcd9db993d1f26e7c98084c07fe42c | 3,225 | py | Python | deepsim_btree/test/test_deepsim_btree/composites/test_rand_sequence.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | 1 | 2022-03-25T07:20:49.000Z | 2022-03-25T07:20:49.000Z | deepsim_btree/test/test_deepsim_btree/composites/test_rand_sequence.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | deepsim_btree/test/test_deepsim_btree/composites/test_rand_sequence.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | #################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | 42.434211 | 81 | 0.553488 |
1a0bee05ccd259070f86377ef5764ca7842db68f | 6,817 | py | Python | lily/svm.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | lily/svm.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | lily/svm.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | from numpy import mat, zeros, multiply, shape, nonzero
from optimizer import Optimizer
import random
import logging
logging.basicConfig(level=logging.WARNING, format="%(funcName)s\t%(message)s")
"""
Sequential Minimal Optimization
Breaks large optimzation problems into smaller problems.
The smaller problems can easi... | 29.899123 | 79 | 0.570192 |
1a0c1867bd92046759880deae1400735ece54848 | 3,691 | py | Python | classes/migrations/0001_initial.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | classes/migrations/0001_initial.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | 3 | 2021-06-05T00:01:48.000Z | 2021-09-22T19:39:12.000Z | classes/migrations/0001_initial.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-11-25 14:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import multiselectfield.db.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('master', '0005_auto_20201125_1314'),
... | 51.985915 | 205 | 0.622325 |
1a0c2bd3635be7393d1892016f1c6bfc32e161e5 | 273 | py | Python | nilearn/_utils/__init__.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null | nilearn/_utils/__init__.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null | nilearn/_utils/__init__.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null |
from .niimg_conversions import (check_niimg, check_niimg_3d, concat_niimgs,
check_niimg_4d)
from .niimg import new_img_like, _repr_niimgs, copy_img
from .numpy_conversions import as_ndarray
from .cache_mixin import CacheMixin
from .logger import _compose_err_msg
| 21 | 75 | 0.827839 |
1a0c53c1760385bcec0d323b58ad107b2bdfd1b7 | 2,301 | py | Python | examples/mcscf/31-cr2_scan/cr2-scan.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | examples/mcscf/31-cr2_scan/cr2-scan.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | examples/mcscf/31-cr2_scan/cr2-scan.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import numpy
from pyscf import gto
from pyscf import scf
from pyscf import mcscf
'''
Scan Cr2 molecule singlet state dissociation curve.
Simliar to the example mcscf/30-hf_scan, we need control the CASSCF initial
guess using functions project_init_guess and sort_mo. In this example,
sort_mo fun... | 29.5 | 83 | 0.587571 |
1a0cc339a045fa301fdd3fd71a58dbd5c4f5c809 | 52,816 | py | Python | scripts/old_scripts/STEP5_ESSAY_1_Long_Table_Prep.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | scripts/old_scripts/STEP5_ESSAY_1_Long_Table_Prep.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | scripts/old_scripts/STEP5_ESSAY_1_Long_Table_Prep.py | nz44/phd_dissertation | cad5220db27e2e4230f2be2b63140a0e2fc877cc | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import copy
from pathlib import Path
import pickle
pd.set_option('display.max_colwidth', -1)
pd.options.display.max_rows = 999
import numpy as np
import math
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from sklearn import preprocessing
import statsmode... | 55.016667 | 150 | 0.505907 |
1a0cef1cba12805d7058ff3c44d45fca08850358 | 37,746 | py | Python | nglview/player.py | stefdoerr/nglview | 671016d4277fb969c9c99cf626dd2db9e2d72514 | [
"MIT"
] | null | null | null | nglview/player.py | stefdoerr/nglview | 671016d4277fb969c9c99cf626dd2db9e2d72514 | [
"MIT"
] | null | null | null | nglview/player.py | stefdoerr/nglview | 671016d4277fb969c9c99cf626dd2db9e2d72514 | [
"MIT"
] | 1 | 2021-11-19T02:03:46.000Z | 2021-11-19T02:03:46.000Z | # TODO: reorg
# simplify code
from __future__ import absolute_import
import time
import json
from IPython.display import display, Javascript
from ipywidgets import (DOMWidget,
Box, HBox, VBox, Checkbox,
ColorPicker, IntSlider, FloatSlider,
Dropdown... | 41.479121 | 123 | 0.607932 |
1a0cfd6ed384657098e6b7a5c088e0bb036c7128 | 2,551 | py | Python | sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.472973 | 91 | 0.608781 |
1a0d2897b2cbab5a4ac2f95a4f2d7249c3c1587d | 136 | py | Python | ch04_trees_graphs/binary_tree.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | ch04_trees_graphs/binary_tree.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | ch04_trees_graphs/binary_tree.py | appletreeisyellow/cracking-the-coding-interview | dc04c1c1e75a58bd543a298520f4595425f38104 | [
"MIT"
] | null | null | null | class BinaryNode:
def __init__(self, value, left=None, right=None):
self.value = value
self.left = left
self.right = right | 27.2 | 51 | 0.676471 |
1a0d293e6311c4efd2241f36d4852a8362941bd1 | 6,640 | py | Python | simple_mediapipe/calculator.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | simple_mediapipe/calculator.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | simple_mediapipe/calculator.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | from .registration import CALCULATOR
from logzero import logger
import copy
from threading import Lock
from .collection import Collection
class CalculatorNode:
_static_id = 0
def __init__(self, graph, config):
calculator_module = CALCULATOR.get(config.calculator)
self.calculator_base = calcu... | 35.698925 | 126 | 0.621084 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.