hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796427a7fbe7521206d7d154093ea2e245c11b07 | 814 | py | Python | vault/tests/utils.py | mchelen-gov/integrations-core | 81281600b3cc7025a7a32148c59620c9592a564f | [
"BSD-3-Clause"
] | 1 | 2021-01-28T01:45:37.000Z | 2021-01-28T01:45:37.000Z | vault/tests/utils.py | mchelen-gov/integrations-core | 81281600b3cc7025a7a32148c59620c9592a564f | [
"BSD-3-Clause"
] | 3 | 2021-01-27T04:56:40.000Z | 2021-02-26T06:29:22.000Z | vault/tests/utils.py | mchelen-gov/integrations-core | 81281600b3cc7025a7a32148c59620c9592a564f | [
"BSD-3-Clause"
] | 1 | 2021-04-07T16:58:27.000Z | 2021-04-07T16:58:27.000Z | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import json
from datadog_checks.dev.env import deserialize_data, get_env_vars, serialize_data, set_env_vars
def get_client_token_path():
return deserialize_data(get_env_vars().get('client_token_path... | 27.133333 | 95 | 0.692875 |
796427d16f66f8c0db7b0df5b8eeb18177da16f4 | 34,111 | py | Python | hata/discord/embed/embed.py | catzoo/hata | 49a55f4e02f4f8b5f3adcebc51952b612b4acb73 | [
"0BSD"
] | null | null | null | hata/discord/embed/embed.py | catzoo/hata | 49a55f4e02f4f8b5f3adcebc51952b612b4acb73 | [
"0BSD"
] | null | null | null | hata/discord/embed/embed.py | catzoo/hata | 49a55f4e02f4f8b5f3adcebc51952b612b4acb73 | [
"0BSD"
] | null | null | null | __all__ = ('Embed', )
from ...backend.utils import copy_docs
from ..utils import timestamp_to_datetime, datetime_to_timestamp
from .embed_base import EmbedBase, EmbedFooter, EmbedImage, EmbedThumbnail, EmbedVideo, EmbedProvider, EmbedAuthor, \
EmbedField
RICH_EMBED_FIELDS = frozenset((
'author',
'fields... | 26.442636 | 117 | 0.494914 |
796429115b084a1f83139beba8547e1715cc545e | 678 | py | Python | build/lib/tests/testAll.py | pir2/python-omniture | d23b00f3382416f9d7667d90bdffc6d6b3456a53 | [
"MIT"
] | 105 | 2015-02-04T22:27:37.000Z | 2022-02-06T12:25:10.000Z | build/lib/tests/testAll.py | pir2/python-omniture | d23b00f3382416f9d7667d90bdffc6d6b3456a53 | [
"MIT"
] | 69 | 2015-03-18T15:35:13.000Z | 2020-08-25T13:18:43.000Z | build/lib/tests/testAll.py | pir2/python-omniture | d23b00f3382416f9d7667d90bdffc6d6b3456a53 | [
"MIT"
] | 66 | 2015-05-15T13:34:40.000Z | 2021-02-24T15:42:57.000Z | from __future__ import absolute_import
import unittest
from omniture.tests import AccountTest
from .testQuery import QueryTest
from .testReports import ReportTest
from .testElement import ElementTest
import sys
def test_suite():
""" Test Suite for omnitue module """
test_suite = unittest.TestSuite()
te... | 24.214286 | 55 | 0.783186 |
7964295832a6e7a71002f383d0078b69da348a4d | 28,763 | py | Python | tests/wallet/simple_sync/test_simple_sync_protocol.py | HiveProject2021/chives-light-wallet | 0c7c36bfc703b26ce3c938027de643dc90e4191f | [
"Apache-2.0"
] | 7 | 2021-12-26T11:05:19.000Z | 2022-02-24T10:42:45.000Z | tests/wallet/simple_sync/test_simple_sync_protocol.py | HiveProject2021/chives-light-wallet | 0c7c36bfc703b26ce3c938027de643dc90e4191f | [
"Apache-2.0"
] | 8 | 2021-12-14T17:27:29.000Z | 2022-03-29T18:18:22.000Z | tests/wallet/simple_sync/test_simple_sync_protocol.py | HiveProject2021/chives-light-wallet | 0c7c36bfc703b26ce3c938027de643dc90e4191f | [
"Apache-2.0"
] | 1 | 2021-12-09T23:51:12.000Z | 2021-12-09T23:51:12.000Z | # flake8: noqa: F811, F401
import asyncio
from typing import List, Optional
import pytest
from clvm.casts import int_to_bytes
from colorlog import logging
from chives.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward
from chives.protocols import wallet_protocol, full_node_protocol
fro... | 45.511076 | 118 | 0.709975 |
79642a9b0a314567c06fc4b7372c7bbdd554430d | 183 | py | Python | projects/admin.py | DustinHolden/challenge | 7c62acb965600a9532aef35eb02545872cf39cc7 | [
"MIT"
] | null | null | null | projects/admin.py | DustinHolden/challenge | 7c62acb965600a9532aef35eb02545872cf39cc7 | [
"MIT"
] | null | null | null | projects/admin.py | DustinHolden/challenge | 7c62acb965600a9532aef35eb02545872cf39cc7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Project
@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
list_display = ('title', 'start_date', 'end_date',)
| 20.333333 | 55 | 0.754098 |
79642b8eb3d707d6e409b5f9b8904e073fcf3fb4 | 2,302 | py | Python | tests/trinity/_utils/test_xdg_paths.py | gitter-badger/trinity-2 | 76276d586f5a365acdf79d8b7e823b607ea419a9 | [
"MIT"
] | null | null | null | tests/trinity/_utils/test_xdg_paths.py | gitter-badger/trinity-2 | 76276d586f5a365acdf79d8b7e823b607ea419a9 | [
"MIT"
] | null | null | null | tests/trinity/_utils/test_xdg_paths.py | gitter-badger/trinity-2 | 76276d586f5a365acdf79d8b7e823b607ea419a9 | [
"MIT"
] | 2 | 2019-09-05T01:31:56.000Z | 2019-09-17T09:09:16.000Z | import pytest
from trinity.exceptions import (
AmbigiousFileSystem
)
from trinity._utils.xdg import (
get_xdg_trinity_root,
get_xdg_cache_home,
get_xdg_config_home,
get_xdg_data_home,
)
# These envs may all exist and we need to ensure to monkeypatch kill them
# for each test run, and then only s... | 32.885714 | 89 | 0.640313 |
79642ba930f3fb1e8ab572e362f64cbe0f5110e9 | 96,723 | py | Python | da/compiler/parser.py | edgarsit/distalgo | 87a53b537c2ae9d974fb2f5f7ba95eaa92a9806e | [
"MIT"
] | null | null | null | da/compiler/parser.py | edgarsit/distalgo | 87a53b537c2ae9d974fb2f5f7ba95eaa92a9806e | [
"MIT"
] | null | null | null | da/compiler/parser.py | edgarsit/distalgo | 87a53b537c2ae9d974fb2f5f7ba95eaa92a9806e | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2017 Bo Lin
# Copyright (c) 2010-2017 Yanhong Annie Liu
# Copyright (c) 2010-2017 Stony Brook University
# Copyright (c) 2010-2017 The Research Foundation of SUNY
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
#... | 39.803704 | 102 | 0.558533 |
79642c66411f548c702f2efe3463604e753ab5f9 | 15,745 | py | Python | experiment.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | experiment.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | experiment.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | 1 | 2022-02-11T23:22:41.000Z | 2022-02-11T23:22:41.000Z | import math
import torch
from torch import optim
from models import BaseVAE
from models.types_ import *
from utils import data_loader
import pytorch_lightning as pl
from torchvision import transforms
import torchvision.utils as vutils
from torchvision.datasets import CelebA
from torch.utils.data import DataLoader
from ... | 52.30897 | 297 | 0.543157 |
79642c7112111b85604f3979eef73654369de71f | 20,545 | py | Python | pymongo/uri_parser.py | mongodb/mongo-python-driver | d77c20497b2bec8da8203279fd427f74a91370c9 | [
"Apache-2.0"
] | 2,593 | 2015-01-02T10:53:55.000Z | 2022-03-28T15:42:47.000Z | pymongo/uri_parser.py | mongodb/mongo-python-driver | d77c20497b2bec8da8203279fd427f74a91370c9 | [
"Apache-2.0"
] | 356 | 2015-02-05T15:57:18.000Z | 2022-03-31T19:12:30.000Z | pymongo/uri_parser.py | mongodb/mongo-python-driver | d77c20497b2bec8da8203279fd427f74a91370c9 | [
"Apache-2.0"
] | 774 | 2015-01-05T09:30:07.000Z | 2022-03-30T03:36:25.000Z | # Copyright 2011-present MongoDB, 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... | 37.422587 | 79 | 0.61173 |
79642e5f7c6d3c03dbba042cb57308ea07d9ad5e | 1,103 | py | Python | tests/test_jjsql.py | jackschultz/dbactor | 57ca01bb257d92b32d6003b56cec69e930b6ea73 | [
"MIT"
] | 2 | 2021-11-18T09:35:42.000Z | 2021-11-18T14:46:30.000Z | tests/test_jjsql.py | jackschultz/dbactor | 57ca01bb257d92b32d6003b56cec69e930b6ea73 | [
"MIT"
] | null | null | null | tests/test_jjsql.py | jackschultz/dbactor | 57ca01bb257d92b32d6003b56cec69e930b6ea73 | [
"MIT"
] | null | null | null | import testing.postgresql
import pytest
from dbactor import DBJinjaSqlActor
create_products_str = 'CREATE TABLE products(id int4, name varchar(256), cost int4)'
public_table_list_qstr = "SELECT * FROM information_schema.tables where table_schema='public';"
product_insert_qstr = '''
INSERT INTO "public"."products" (... | 31.514286 | 95 | 0.687217 |
79642f230ab31df275cacecf33c7ab9b5aefba97 | 4,898 | py | Python | cinder/tests/functional/test_volumes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/functional/test_volumes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/functional/test_volumes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Justin Santa Barbara
# 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 requ... | 38.566929 | 79 | 0.665374 |
79642f893a45057eeea2b494b3a59fe707f214fe | 765 | py | Python | easymode/tests/testcases/testl10n.py | TGoldR/internationalize | 802e918b41835a7d5406f33cebaff1bdf486649b | [
"MIT"
] | null | null | null | easymode/tests/testcases/testl10n.py | TGoldR/internationalize | 802e918b41835a7d5406f33cebaff1bdf486649b | [
"MIT"
] | null | null | null | easymode/tests/testcases/testl10n.py | TGoldR/internationalize | 802e918b41835a7d5406f33cebaff1bdf486649b | [
"MIT"
] | null | null | null | from django.core.urlresolvers import reverse
from django.test import TestCase
from easymode.tests.testcases import initdb
__all__ = ('TestSuperRecusionLoop',)
@initdb
class TestSuperRecusionLoop(TestCase):
fixtures = ['managererrormodel', 'auth-user', 'auth-group',]
def test_recursion_error_by_sup... | 31.875 | 80 | 0.686275 |
7964303a9a5019d3442369233f589fff93041e05 | 1,267 | py | Python | envelopes/__init__.py | siyaoyao/envelopes | 8ad190a55d0d8b805b6ae545b896e719467253b7 | [
"MIT"
] | 202 | 2015-01-04T10:40:04.000Z | 2022-03-17T16:58:22.000Z | envelopes/__init__.py | siyaoyao/envelopes | 8ad190a55d0d8b805b6ae545b896e719467253b7 | [
"MIT"
] | 12 | 2015-04-29T08:12:36.000Z | 2021-06-03T01:34:33.000Z | envelopes/__init__.py | siyaoyao/envelopes | 8ad190a55d0d8b805b6ae545b896e719467253b7 | [
"MIT"
] | 48 | 2015-01-04T10:39:52.000Z | 2022-02-28T03:25:16.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Tomasz Wójcik <tomek@bthlabs.pl>
#
# 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
# ... | 36.2 | 79 | 0.756906 |
796430656a0df352cee8d8a56dfb8a3d37754acb | 74 | py | Python | test/__init__.py | lotabout/pymark | 66ef5b516b2f0bb57018c6a0a5acc497a23f669c | [
"MIT"
] | 1 | 2017-01-08T08:07:30.000Z | 2017-01-08T08:07:30.000Z | test/__init__.py | lotabout/pymark | 66ef5b516b2f0bb57018c6a0a5acc497a23f669c | [
"MIT"
] | null | null | null | test/__init__.py | lotabout/pymark | 66ef5b516b2f0bb57018c6a0a5acc497a23f669c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .test_pymkd import *
| 14.8 | 25 | 0.621622 |
7964315961b6c22cea8e4723efff11182c6f413e | 2,046 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/runtime/models/qn_asearch_result.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/runtime/models/qn_asearch_result.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/runtime/models/qn_asearch_result.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 37.2 | 86 | 0.589932 |
796431dafb1e0291be245c158ab112fdd3a0a5c4 | 2,614 | py | Python | Python/7 - Tuples/Pilhas e Filas.py | SimaDinisVC/GPSI-Course-at-ESEN | 531f571fdad1688ea95b3e186262cfd4a264453b | [
"MIT"
] | 3 | 2021-11-25T17:52:38.000Z | 2021-11-30T06:48:15.000Z | Python/7 - Tuples/Pilhas e Filas.py | SimaDinisVC/GPSI-Course-at-ESEN | 531f571fdad1688ea95b3e186262cfd4a264453b | [
"MIT"
] | null | null | null | Python/7 - Tuples/Pilhas e Filas.py | SimaDinisVC/GPSI-Course-at-ESEN | 531f571fdad1688ea95b3e186262cfd4a264453b | [
"MIT"
] | null | null | null | def menu():
print("----- PILHA -----")
print("1 - Remover um elemento da pilha")
print("2 - Insere um elemento na pilha")
print("3 - Devolve o último elemento da pilha sem o retirar")
print("4 - Devolve o total de elementos na pilha")
print("----- FILA -----")
print("5 - Remover um elemento... | 28.107527 | 100 | 0.557383 |
7964324f26b61a6491058960f87d948b07769686 | 1,457 | py | Python | dlstorage/tieredsystem/tiered_file.py | j2zhao/deeplens-storage | 52089314510fad54209ea27cf97abff1941b52d0 | [
"MIT"
] | 1 | 2020-02-07T03:24:04.000Z | 2020-02-07T03:24:04.000Z | dlstorage/tieredsystem/tiered_file.py | j2zhao/deeplens-storage | 52089314510fad54209ea27cf97abff1941b52d0 | [
"MIT"
] | null | null | null | dlstorage/tieredsystem/tiered_file.py | j2zhao/deeplens-storage | 52089314510fad54209ea27cf97abff1941b52d0 | [
"MIT"
] | null | null | null | """This file is part of DeepLens which is released under MIT License and
is copyrighted by the University of Chicago. This project is developed by
the database group (chidata).
tiered_file.py contains basic functions for dealing with .ref directories.
.ref directories contain a reference text file which states the d... | 24.694915 | 74 | 0.666438 |
79643428cb427494c7a630c53ee865f7bedfd84f | 547 | py | Python | algorithm/model_manage.py | saintube/rails_sample_app | ccbd7b7c1cb0b7d2a34eac5e61e2eeed1fe1c85b | [
"MIT"
] | 1 | 2019-09-23T03:33:34.000Z | 2019-09-23T03:33:34.000Z | algorithm/model_manage.py | saintube/rails_sample_app | ccbd7b7c1cb0b7d2a34eac5e61e2eeed1fe1c85b | [
"MIT"
] | 2 | 2019-01-21T13:30:52.000Z | 2020-03-04T12:47:09.000Z | algorithm/model_manage.py | saintube/rails_sample_app | ccbd7b7c1cb0b7d2a34eac5e61e2eeed1fe1c85b | [
"MIT"
] | 1 | 2018-12-17T05:44:08.000Z | 2018-12-17T05:44:08.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Dec 23 15:22:34 2018
@author: WangWenming
"""
from sklearn.externals import joblib
class TrainData(object):
default_path = './model/train_data.pkl'
@staticmethod
def save(model, filename=None):
joblib.dump(model, filename if filename else TrainData.defau... | 28.789474 | 123 | 0.681901 |
796434c5cd94d1ac0fc6a6a95ff113ec95ad501d | 28,645 | py | Python | tests/components/unifi/test_switch.py | rubicon/core | 9027ee7828c122dd06f1f1ce5a64de5f06321740 | [
"Apache-2.0"
] | 6 | 2017-11-15T09:56:41.000Z | 2021-01-24T15:12:09.000Z | tests/components/unifi/test_switch.py | rubicon/core | 9027ee7828c122dd06f1f1ce5a64de5f06321740 | [
"Apache-2.0"
] | 87 | 2020-07-15T13:43:35.000Z | 2022-03-23T07:43:10.000Z | tests/components/unifi/test_switch.py | rubicon/core | 9027ee7828c122dd06f1f1ce5a64de5f06321740 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """UniFi switch platform tests."""
from copy import deepcopy
from unittest.mock import patch
from aiounifi.controller import MESSAGE_CLIENT_REMOVED, MESSAGE_EVENT
from homeassistant import config_entries, core
from homeassistant.components.device_tracker import DOMAIN as TRACKER_DOMAIN
from homeassistant.components.s... | 29.259448 | 103 | 0.597452 |
796434c698f1cbab9037a9e5fe90bc20d851cc5e | 846 | py | Python | example/car/forms.py | COEXCZ/django-adminfilter | d66f6a3c5294156c01db1cf1927942f7cb31119a | [
"0BSD"
] | 3 | 2015-11-17T15:32:02.000Z | 2021-08-06T16:16:04.000Z | example/car/forms.py | COEXCZ/django-adminfilter | d66f6a3c5294156c01db1cf1927942f7cb31119a | [
"0BSD"
] | null | null | null | example/car/forms.py | COEXCZ/django-adminfilter | d66f6a3c5294156c01db1cf1927942f7cb31119a | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db.models.fields import BLANK_CHOICE_DASH
import adminfilter
from choices import BRANDS, COLORS, FUEL_TYPES
import query
class CarFilterForm(adminfilter.FilterForm):
""" Car FilterForm for admin """
brand = adminfilter.ChoiceField(q='brand', choices=tuple(BLANK_CHOICE_DA... | 38.454545 | 98 | 0.760047 |
796436153a641aa80956ff2d3a1f04b6ee25cc10 | 975 | py | Python | Validation/HcalRecHits/python/hcalRecHitsValidationSequence_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | Validation/HcalRecHits/python/hcalRecHitsValidationSequence_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 26 | 2018-10-30T12:47:58.000Z | 2022-03-29T08:39:00.000Z | Validation/HcalRecHits/python/hcalRecHitsValidationSequence_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
from Validation.HcalRecHits.HcalRecHitParam_cfi import *
import Validation.HcalRecHits.HcalRecHitParam_cfi
RecHitsValidation = Validation.HcalRecHits.HcalRecHitParam_cfi.hcalRecoAnalyzer.clone()
NoiseRatesValidation = Validation.HcalRecHits.HcalRecHitParam_cfi.hcalNois... | 51.315789 | 123 | 0.871795 |
796437e28867099ca9097bd097c3d393ce9bf805 | 10,946 | py | Python | tests/test_chillerelectriceir.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 19 | 2015-12-08T23:33:51.000Z | 2022-01-31T04:41:10.000Z | tests/test_chillerelectriceir.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 2 | 2019-10-04T10:57:00.000Z | 2021-10-01T06:46:17.000Z | tests/test_chillerelectriceir.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 7 | 2015-11-04T02:25:01.000Z | 2021-12-08T03:14:28.000Z | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.plant_heating_and_cooling_equipment import ChillerElectricEir
log = logging.getLogger(__name__)
class TestChillerElectricEir(unittest.TestCase):
def setUp(self):
se... | 65.939759 | 214 | 0.801754 |
79643827d350ee754232649f5a0558fe288f075a | 5,069 | py | Python | dataduit/dataset/io/read/location/local/records/read.py | JackBurdick/dataduit | b6fdc00c4638e4c41cf4fd824ddedcc19ce8ac8a | [
"Apache-2.0"
] | null | null | null | dataduit/dataset/io/read/location/local/records/read.py | JackBurdick/dataduit | b6fdc00c4638e4c41cf4fd824ddedcc19ce8ac8a | [
"Apache-2.0"
] | null | null | null | dataduit/dataset/io/read/location/local/records/read.py | JackBurdick/dataduit | b6fdc00c4638e4c41cf4fd824ddedcc19ce8ac8a | [
"Apache-2.0"
] | null | null | null | import pathlib
import tensorflow as tf
import tensorflow_datasets as tfds
from dataduit.log.dataduit_logging import config_logger
from dataduit.dataset.io.read.location.local.records.parse import return_parse_feature
def read_tf_from_dir(config_dict):
logger = config_logger(config_dict["meta"]["logging"], "downl... | 34.482993 | 145 | 0.641744 |
7964398ef913cdf06c35996b4d333b6bdd95096a | 5,024 | py | Python | elements_sdk/models/production_mini.py | elements-storage/elements-sdk-python | 39c365fe079dcd5928c5fe1bbaa67389bd5a3d81 | [
"MIT"
] | 6 | 2020-11-16T23:15:18.000Z | 2022-03-14T03:56:12.000Z | elements_sdk/models/production_mini.py | elements-storage/elements-sdk-python | 39c365fe079dcd5928c5fe1bbaa67389bd5a3d81 | [
"MIT"
] | 1 | 2021-07-28T13:03:49.000Z | 2021-08-25T12:24:01.000Z | elements_sdk/models/production_mini.py | elements-storage/elements-sdk-python | 39c365fe079dcd5928c5fe1bbaa67389bd5a3d81 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
ELEMENTS API
The version of the OpenAPI document: 2
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from elements_sdk.configuration import Configuration
class ProductionMini(object):
"""NOTE: This class is auto generated by Op... | 28.384181 | 115 | 0.575637 |
79643b28b623b45c41da243c40f556686af98719 | 105 | py | Python | rfix/rfixuser/admin.py | rasmadeus/rfix | 379d3e70ada56b907589b0e69851ded59b5f72d1 | [
"MIT"
] | null | null | null | rfix/rfixuser/admin.py | rasmadeus/rfix | 379d3e70ada56b907589b0e69851ded59b5f72d1 | [
"MIT"
] | null | null | null | rfix/rfixuser/admin.py | rasmadeus/rfix | 379d3e70ada56b907589b0e69851ded59b5f72d1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from rfix.rfixuser import models
admin.site.register(models.RfixUser)
| 17.5 | 36 | 0.828571 |
79643bc06f0ca2e6fd7684c2b81ba8d4fefb203c | 4,785 | py | Python | pretrain_bert.py | JoeyOhman/Megatron-LM | 85fc412ce46c554f02309ec8a0b410d9ed790bc4 | [
"MIT"
] | null | null | null | pretrain_bert.py | JoeyOhman/Megatron-LM | 85fc412ce46c554f02309ec8a0b410d9ed790bc4 | [
"MIT"
] | null | null | null | pretrain_bert.py | JoeyOhman/Megatron-LM | 85fc412ce46c554f02309ec8a0b410d9ed790bc4 | [
"MIT"
] | 1 | 2022-02-08T14:21:49.000Z | 2022-02-08T14:21:49.000Z | # coding=utf-8
# Copyright (c) 2020, NVIDIA 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 re... | 32.114094 | 82 | 0.687356 |
79643c43b539c7e4556a06e467008edb64569aee | 683 | py | Python | leetcode_python/tests/test_vallid_parentheses.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/tests/test_vallid_parentheses.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/tests/test_vallid_parentheses.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | import unittest
from leetcode_python.src.algorithms.string.vallid_parentheses import ValidParentheses
class TestValidParentheses(unittest.TestCase):
def test_is_valid(self):
parentheses = ValidParentheses()
self.assertTrue(parentheses.is_valid("[({})]"))
def test_is_valid2(self):
pa... | 29.695652 | 85 | 0.692533 |
79643e9974a288c2f73ed8adf22e82451b5f5787 | 3,356 | py | Python | wavemap/write.py | rec/wavemap | 236583b8a7ba4a6ae3c6c5821868ee29875c6a4f | [
"MIT"
] | 1 | 2021-09-12T08:15:51.000Z | 2021-09-12T08:15:51.000Z | wavemap/write.py | rec/wavemap | 236583b8a7ba4a6ae3c6c5821868ee29875c6a4f | [
"MIT"
] | 1 | 2021-01-23T15:22:15.000Z | 2021-01-23T15:22:15.000Z | wavemap/write.py | rec/wavemap | 236583b8a7ba4a6ae3c6c5821868ee29875c6a4f | [
"MIT"
] | null | null | null | from . import docs
from . import raw
from .structure import wave
from .structure.wave import PCM, NON_PCM, FMT_PCM, FMT_NON_PCM
from typing import Callable, Optional, Type, Union
import numpy as np
CHUNK_HEADER = 8
DEFAULT_SAMPLE_RATE = 44100
class WriteMap(raw.RawMap):
""""Memory-map a new wave file into a new ... | 29.182609 | 79 | 0.579559 |
79643e999b304e91395064c0af4e5589b88764d0 | 5,478 | py | Python | implant.py | Soldie/twittor-C-C | bca493f515d52c2bde90b8a401fdf54265916b16 | [
"MIT"
] | 798 | 2015-09-09T07:57:51.000Z | 2022-03-28T07:07:12.000Z | implant.py | n00py/twittor | bca493f515d52c2bde90b8a401fdf54265916b16 | [
"MIT"
] | 4 | 2017-11-22T17:07:33.000Z | 2021-02-19T10:01:29.000Z | implant.py | n00py/twittor | bca493f515d52c2bde90b8a401fdf54265916b16 | [
"MIT"
] | 246 | 2015-09-09T20:06:25.000Z | 2022-03-31T13:42:26.000Z | from tweepy import Stream
from tweepy import OAuthHandler
from tweepy import API
from tweepy.streaming import StreamListener
from uuid import getnode as get_mac
import ctypes
import json
import threading
import subprocess
import base64
import platform
api = None
# These values are appropriately filled in the code
CO... | 26.592233 | 119 | 0.603687 |
7964402e7c6c2568f6643bde86b97b05936afe2f | 4,233 | py | Python | uroboros-diversification/src/ail.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | 3 | 2020-12-11T06:15:17.000Z | 2021-04-24T07:09:03.000Z | uroboros-diversification/src/ail.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | null | null | null | uroboros-diversification/src/ail.py | whj0401/RLOBF | 2755eb5e21e4f2445a7791a1159962e80a5739ca | [
"MIT"
] | 2 | 2021-03-10T17:46:33.000Z | 2021-03-31T08:00:27.000Z | """
Processing skeleton
"""
from termcolor import colored
from analysis.analysis_process import Analysis
# diversifications
from diversification.bb_opaque_diversify import *
from diversification.bb_reorder_diversify import *
from diversification.func_inline_diversify import *
from diversification.bb_branchfunc_divers... | 30.453237 | 92 | 0.592724 |
79644050e85415cc97af9d09648cb9aae954a990 | 545 | py | Python | recipes/opus/all/test_package/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/opus/all/test_package/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/opus/all/test_package/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | from conans import ConanFile, CMake, tools
import os
class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if not tools.cross_build... | 28.684211 | 86 | 0.620183 |
7964405969ed646d7774d6d1c0f6a2b26c09b153 | 280 | py | Python | simulation/lpdm_event/lpdm_capacity_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 2 | 2019-01-05T02:33:38.000Z | 2020-04-22T16:57:50.000Z | simulation/lpdm_event/lpdm_capacity_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-04-17T18:13:08.000Z | 2021-04-23T22:40:23.000Z | simulation/lpdm_event/lpdm_capacity_event.py | LBNL-ETA/LPDM | 3384a784b97e49cd7a801b758717a7107a51119f | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-01-31T08:37:44.000Z | 2019-01-31T08:37:44.000Z | from lpdm_base_event import LpdmBaseEvent
class LpdmCapacityEvent(LpdmBaseEvent):
def __init__(self, source_device_id, target_device_id, time, value):
LpdmBaseEvent.__init__(self, source_device_id, target_device_id, time, value)
self.event_type = "capacity"
| 35 | 85 | 0.775 |
7964409646b996020a3f6477424ad8bf666da66e | 1,239 | py | Python | 7-Line Strip/line_strip.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | 7-Line Strip/line_strip.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | 7-Line Strip/line_strip.py | ayengec/OpenGL_with_Python | 858748115aa02f8c7de0f79c2ef23990e00074b4 | [
"Unlicense"
] | null | null | null | # ayengec
# OpenGL with Python
# github.com/ayengec
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
def draw_line_strip():
glEnable(GL_LINE_SMOOTH)
glViewport(0, 0, 1024, 768)
glClearColor(0,0,0,0)
glPointSize(30.0)
glColor4ub(255, 127, 0, 255)
glLineWidth(4.0)
... | 28.159091 | 165 | 0.682002 |
796440c37a5e55e4e30f6f68b360b066b25086a2 | 1,189 | py | Python | hw1/practice.py | Josh-Hegewald/uci-statnlp | c489dcb1ed391b56a6a266f02b1ed214ca7f544f | [
"Apache-2.0"
] | null | null | null | hw1/practice.py | Josh-Hegewald/uci-statnlp | c489dcb1ed391b56a6a266f02b1ed214ca7f544f | [
"Apache-2.0"
] | null | null | null | hw1/practice.py | Josh-Hegewald/uci-statnlp | c489dcb1ed391b56a6a266f02b1ed214ca7f544f | [
"Apache-2.0"
] | null | null | null |
list_1 = ["practicing practices practiced", "I love to see the temple. I'm going there someday."]
from nltk.stem import WordNetLemmatizer
import nltk
wordnet_lemmatizer = WordNetLemmatizer()
new_list = []
for i in range(len(list_1)):
tokenization = nltk.word_tokenize(str(list_1[i]))
temp = []
for w in enumerate(t... | 25.297872 | 97 | 0.769554 |
796440e7574c7b900b022ce24c0b2e1c4c1e0685 | 647 | py | Python | leetcode/0048_rotate_image.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | 3 | 2018-05-10T09:56:49.000Z | 2020-11-07T18:09:42.000Z | leetcode/0048_rotate_image.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | leetcode/0048_rotate_image.py | jacquerie/leetcode | a05e6b832eb0e0740aaff7b2eb3109038ad404bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Solution:
def rotate(self, matrix):
n = len(matrix)
for i in range(n):
for j in range(i + 1):
matrix[i][j], matrix[j][i] = matrix[j][i], matrix[i][j]
for i in range(n):
for j in range(n // 2):
matrix[i]... | 20.21875 | 87 | 0.420402 |
79644194554037a53ff81cf71f0302ac1e01a6f5 | 24,833 | py | Python | google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-hub | 09e7c033fea2e07a6c865ac633ec14b3d07edf7a | [
"Apache-2.0"
] | 3 | 2021-06-04T06:10:44.000Z | 2021-12-30T02:19:30.000Z | google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-hub | 09e7c033fea2e07a6c865ac633ec14b3d07edf7a | [
"Apache-2.0"
] | 43 | 2021-03-16T14:10:35.000Z | 2022-03-07T16:07:33.000Z | google/cloud/gkehub_v1/services/gke_hub/transports/grpc_asyncio.py | LaudateCorpus1/python-gke-hub | 09e7c033fea2e07a6c865ac633ec14b3d07edf7a | [
"Apache-2.0"
] | 3 | 2021-03-15T20:46:05.000Z | 2022-01-29T08:11:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.815517 | 96 | 0.638908 |
796441b0f77bb5eac8ce0d309c9e501a375434b7 | 357 | py | Python | trustlab/apps.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | 1 | 2020-11-12T16:17:12.000Z | 2020-11-12T16:17:12.000Z | trustlab/apps.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | null | null | null | trustlab/apps.py | ValentinSiegert/aTLAS | a2e7521447f81add83a0c958d61846a1cbfbbe9c | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TrustlabConfig(AppConfig):
name = 'trustlab'
# TODO: Handle corner cases i.e. restricting ready method running multiple times. (See AppConfig doc)
def ready(self):
Supervisor = self.get_model('Supervisor')
Supervisor.objects.all().delete()
p... | 29.75 | 105 | 0.703081 |
79644363fd1c57fe99686d69d1979ff2f1b50d7b | 397 | py | Python | 12468/uva12468.py | marceloaamancio/acm_uva | 06c5fc6e19320a7311e3ea794e8285b05b939eba | [
"MIT"
] | 2 | 2020-06-07T09:39:15.000Z | 2021-09-27T08:52:26.000Z | 12468/uva12468.py | marceloaamancio/acm_uva | 06c5fc6e19320a7311e3ea794e8285b05b939eba | [
"MIT"
] | null | null | null | 12468/uva12468.py | marceloaamancio/acm_uva | 06c5fc6e19320a7311e3ea794e8285b05b939eba | [
"MIT"
] | null | null | null | # UVA12468 - Zapping - Accepted
# goo.gl/8PhKV9
# @author: Marcelo Adriano Amancio
# 'If it weren't for electricity, we'd all be watching television by candlelight.' -- George Gobel
from sys import stdin
if __name__ == '__main__':
while True:
a,b = [int(x) for x in stdin.readline().split()]
if ... | 22.055556 | 98 | 0.609572 |
7964437e386ceab380d25faee57bf36ef77b5bf6 | 6,676 | py | Python | skopt/optimizer/gbrt.py | iaroslav-ai/scikit-optimize | 19b25cf103232b410bc814c10701d9dac7361993 | [
"BSD-3-Clause"
] | null | null | null | skopt/optimizer/gbrt.py | iaroslav-ai/scikit-optimize | 19b25cf103232b410bc814c10701d9dac7361993 | [
"BSD-3-Clause"
] | null | null | null | skopt/optimizer/gbrt.py | iaroslav-ai/scikit-optimize | 19b25cf103232b410bc814c10701d9dac7361993 | [
"BSD-3-Clause"
] | null | null | null |
from sklearn.utils import check_random_state
from .base import base_minimize
from ..utils import cook_estimator
def gbrt_minimize(func, dimensions, base_estimator=None,
n_calls=100, n_random_starts=10,
acq_func="EI", acq_optimizer="auto",
x0=None, y0=None, rando... | 43.350649 | 94 | 0.645596 |
7964447b9fea90cd19a0d8979db10264820e5f8f | 5,979 | py | Python | lib/python2.7/site-packages/matplotlib/tests/test_path.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 1 | 2017-12-05T15:35:47.000Z | 2017-12-05T15:35:47.000Z | lib/python2.7/site-packages/matplotlib/tests/test_path.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | lib/python2.7/site-packages/matplotlib/tests/test_path.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import copy
import six
import numpy as np
from numpy.testing import assert_array_equal
from matplotlib.path import Path
from matplotlib.patches import Polygon
from nose.tools import assert_raises, assert_equ... | 29.59901 | 77 | 0.589396 |
7964469672bdcd2a4d4834cc9d7a656bd4d3818e | 1,716 | py | Python | Satistics-basics/code.py | pawan-shewale/ga-learner-dsmp-repo | 7b7b36363434ffe8508ac83b6c04e94e35c92a5a | [
"MIT"
] | null | null | null | Satistics-basics/code.py | pawan-shewale/ga-learner-dsmp-repo | 7b7b36363434ffe8508ac83b6c04e94e35c92a5a | [
"MIT"
] | null | null | null | Satistics-basics/code.py | pawan-shewale/ga-learner-dsmp-repo | 7b7b36363434ffe8508ac83b6c04e94e35c92a5a | [
"MIT"
] | null | null | null | # --------------
#Header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#path of the data file- path
data = pd.read_csv(path)
data['Gender'].replace('-','Agender',inplace=True)
gender_count = data.Gender.value_counts()
gender_count.plot(kind='bar',legend='best')
#Code ... | 18.255319 | 68 | 0.667832 |
796446afbd734b589659f854689f33b35c4cb4ad | 2,158 | py | Python | examples/demo_examples/demo_ppo_bonus.py | mmcenta/rlberry | 23c9984618da77695abb04bca9336e47f9f610ba | [
"MIT"
] | null | null | null | examples/demo_examples/demo_ppo_bonus.py | mmcenta/rlberry | 23c9984618da77695abb04bca9336e47f9f610ba | [
"MIT"
] | null | null | null | examples/demo_examples/demo_ppo_bonus.py | mmcenta/rlberry | 23c9984618da77695abb04bca9336e47f9f610ba | [
"MIT"
] | null | null | null | """
=====================
Demo: demo_ppo_bonus
=====================
"""
import numpy as np
from rlberry.envs.benchmarks.ball_exploration.ball2d import get_benchmark_env
from rlberry.agents.experimental.torch.ppo import PPOAgent
from rlberry.manager import AgentManager, plot_writer_data, evaluate_agents
from rlberry... | 22.247423 | 77 | 0.636701 |
796447058932f5b6a393a71f54b4b67a545d9974 | 34,420 | py | Python | axolotl/d3m_grpc/server.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/d3m_grpc/server.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/d3m_grpc/server.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | import argparse
import json
import logging
import os
import pathlib
import time
import warnings
from concurrent import futures
import ray
import os
import uuid
import google.protobuf.timestamp_pb2 as p_timestamp
import grpc
from d3m import utils as d3m_utils, index as d3m_index
from d3m.metadata import problem as prob... | 40.25731 | 133 | 0.657263 |
7964473b130008e3fbac933ba5f33053a9efd538 | 5,466 | py | Python | tests/test_docs/helper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | tests/test_docs/helper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | tests/test_docs/helper.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 33.127273 | 86 | 0.647091 |
796447a176587fc20637bbe1c2a87bd2c80af28e | 2,224 | py | Python | aiomusiccast/features.py | vigonotion/aiomusiccast | 1c66808c19f9e56d3bc1a0da261135a61460ea54 | [
"MIT"
] | 3 | 2021-07-14T07:40:39.000Z | 2022-02-22T09:24:49.000Z | aiomusiccast/features.py | vigonotion/aiomusiccast | 1c66808c19f9e56d3bc1a0da261135a61460ea54 | [
"MIT"
] | 6 | 2021-07-12T16:22:52.000Z | 2021-11-16T22:28:11.000Z | aiomusiccast/features.py | vigonotion/aiomusiccast | 1c66808c19f9e56d3bc1a0da261135a61460ea54 | [
"MIT"
] | 1 | 2022-03-25T08:00:46.000Z | 2022-03-25T08:00:46.000Z | # list of supported features, directly indicated by musiccast
from enum import Flag, auto
class Feature(Flag):
pass
class DeviceFeature(Feature):
NONE = 0
WIRED_LAN = auto()
WIRELESS_LAN = auto()
WIRELESS_DIRECT = auto()
EXTEND_1_BAND = auto()
DFS_OPTION = auto()
NETWORK_STANDBY =... | 23.166667 | 61 | 0.630396 |
7964483825d009d926887de010cc1d2707ded829 | 5,515 | py | Python | search/search.py | dragoon/edX-AI-course | db0969117654e0e1dd86d5b5867bbb8b608ddc59 | [
"MIT"
] | 1 | 2015-12-29T08:03:14.000Z | 2015-12-29T08:03:14.000Z | search/search.py | dragoon/edX-AI-course | db0969117654e0e1dd86d5b5867bbb8b608ddc59 | [
"MIT"
] | null | null | null | search/search.py | dragoon/edX-AI-course | db0969117654e0e1dd86d5b5867bbb8b608ddc59 | [
"MIT"
] | null | null | null | # search.py
# ---------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# At... | 33.023952 | 106 | 0.658386 |
796449725b8829f9f536cc5d94613ff365906e3d | 6,965 | py | Python | localstack/services/sqs/sqs_listener.py | agentraymond232/localstack | 11ec0214bf5bc01fe05f3f98ff0a69a03de5bd91 | [
"Apache-2.0"
] | null | null | null | localstack/services/sqs/sqs_listener.py | agentraymond232/localstack | 11ec0214bf5bc01fe05f3f98ff0a69a03de5bd91 | [
"Apache-2.0"
] | null | null | null | localstack/services/sqs/sqs_listener.py | agentraymond232/localstack | 11ec0214bf5bc01fe05f3f98ff0a69a03de5bd91 | [
"Apache-2.0"
] | null | null | null | import re
import uuid
import xmltodict
from six.moves.urllib import parse as urlparse
from six.moves.urllib.parse import urlencode
from requests.models import Request, Response
from localstack import config
from localstack.config import HOSTNAME_EXTERNAL, SQS_PORT_EXTERNAL
from localstack.utils.common import to_str, md... | 48.034483 | 108 | 0.590524 |
7964497537b0d0bb2101e9021cb590f820672e88 | 40,069 | py | Python | deploy/tests/test_proxies/test_gateway/test_schemas.py | polyaxon/polyaxon-deploy | 2133371ed36ad52aa954efddba235c47a418f492 | [
"Apache-2.0"
] | 6 | 2019-01-05T17:47:20.000Z | 2020-03-04T13:47:42.000Z | deploy/tests/test_proxies/test_gateway/test_schemas.py | polyaxon/polyaxon-deploy | 2133371ed36ad52aa954efddba235c47a418f492 | [
"Apache-2.0"
] | 5 | 2019-07-29T13:03:37.000Z | 2019-08-23T20:39:01.000Z | deploy/tests/test_proxies/test_gateway/test_schemas.py | polyaxon/polyaxon-deploy | 2133371ed36ad52aa954efddba235c47a418f492 | [
"Apache-2.0"
] | 6 | 2019-05-30T14:09:33.000Z | 2021-12-03T07:11:40.000Z | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 34.751951 | 238 | 0.671592 |
796449b39ad7a7ae34b620ae079e703585902fc5 | 15,518 | py | Python | great_expectations/core/usage_statistics/usage_statistics.py | isichei/great_expectations | b408f2e61f95a2d0f233902cedfb4b2807b814ad | [
"Apache-2.0"
] | 1 | 2020-10-22T19:54:10.000Z | 2020-10-22T19:54:10.000Z | great_expectations/core/usage_statistics/usage_statistics.py | isichei/great_expectations | b408f2e61f95a2d0f233902cedfb4b2807b814ad | [
"Apache-2.0"
] | null | null | null | great_expectations/core/usage_statistics/usage_statistics.py | isichei/great_expectations | b408f2e61f95a2d0f233902cedfb4b2807b814ad | [
"Apache-2.0"
] | null | null | null | import atexit
import datetime
import json
import logging
import platform
import signal
import sys
import threading
from functools import wraps
from queue import Queue
import jsonschema
import requests
from great_expectations import __version__ as ge_version
from great_expectations.core import nested_update
from great... | 37.483092 | 139 | 0.653177 |
796449bd1f7d563c6082d6868270a105c9f0212c | 44,145 | py | Python | bento/outputs/mk.py | ARM-software/bento-linker | b6cbdb6b7b35ebd96fcac070e5045919acdb65bf | [
"BSD-3-Clause"
] | 20 | 2021-01-21T08:23:34.000Z | 2021-12-10T07:45:58.000Z | bento/outputs/mk.py | QPC-database/bento-linker | b6cbdb6b7b35ebd96fcac070e5045919acdb65bf | [
"BSD-3-Clause"
] | 1 | 2021-04-26T14:44:46.000Z | 2021-09-04T22:13:26.000Z | bento/outputs/mk.py | QPC-database/bento-linker | b6cbdb6b7b35ebd96fcac070e5045919acdb65bf | [
"BSD-3-Clause"
] | 6 | 2021-01-24T09:29:10.000Z | 2021-11-22T16:43:35.000Z | #
# Makefile outputer
#
# Copyright (c) 2020, Arm Limited. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
from .. import outputs
import textwrap
import re
import os
import itertools as it
import collections as co
CPUS = co.defaultdict(
lambda: 'cortex-m4'
)
FPUS = co.defaultdict(
lambda: '',
... | 43.026316 | 80 | 0.519107 |
79644aa5a3b032acc08903da2d207730a7d7eeb4 | 447 | py | Python | packages/python/plotly/plotly/validators/bar/textfont/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/textfont/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/bar/textfont/_color.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="bar.textfont", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 34.384615 | 82 | 0.657718 |
79644b5fa57243071d49052d3b10687eff97e797 | 5,575 | py | Python | pypureclient/flasharray/FA_2_9/models/snapshot.py | ashahid-ps/py-pure-client | 2e3565d37b2a41db69308769f6f485d08a7c46c3 | [
"BSD-2-Clause"
] | null | null | null | pypureclient/flasharray/FA_2_9/models/snapshot.py | ashahid-ps/py-pure-client | 2e3565d37b2a41db69308769f6f485d08a7c46c3 | [
"BSD-2-Clause"
] | null | null | null | pypureclient/flasharray/FA_2_9/models/snapshot.py | ashahid-ps/py-pure-client | 2e3565d37b2a41db69308769f6f485d08a7c46c3 | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.9
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 37.668919 | 490 | 0.596951 |
79644c46bb8f0307f3545cbc96559086a894e99a | 271 | py | Python | accelerometer/__init__.py | angerhang/biobankAccelerometerAnalysis | 5e1751d63c73617caba5e7af46bac1e08d7be6c1 | [
"BSD-2-Clause"
] | 1 | 2020-10-01T10:44:08.000Z | 2020-10-01T10:44:08.000Z | accelerometer/__init__.py | angerhang/biobankAccelerometerAnalysis | 5e1751d63c73617caba5e7af46bac1e08d7be6c1 | [
"BSD-2-Clause"
] | null | null | null | accelerometer/__init__.py | angerhang/biobankAccelerometerAnalysis | 5e1751d63c73617caba5e7af46bac1e08d7be6c1 | [
"BSD-2-Clause"
] | null | null | null | name = "accelerometer"
__version__ = "3.2.0"
__author__ = "Aiden Doherty, Shing Chan, Rosemary Walmsley, Hang Yuan"
__email__ = "aiden.doherty@ndph.ox.ac.uk, shing.chan@ndph.ox.ac.uk, rosemary.walmsley@gtc.ox.ac.uk, hang.yuan@keble.ox.ac.uk"
__license__ = "2-Clause BSD"
| 45.166667 | 125 | 0.741697 |
79644d966b2931e29727d118d123a27ae75b76d8 | 8,151 | py | Python | demo/top_down_detection00.py | filipkro/mmpose | b4b6eda3fe3c2470ab0e44936f4bf7f82db6d3e4 | [
"Apache-2.0"
] | null | null | null | demo/top_down_detection00.py | filipkro/mmpose | b4b6eda3fe3c2470ab0e44936f4bf7f82db6d3e4 | [
"Apache-2.0"
] | null | null | null | demo/top_down_detection00.py | filipkro/mmpose | b4b6eda3fe3c2470ab0e44936f4bf7f82db6d3e4 | [
"Apache-2.0"
] | null | null | null | import os
from argparse import ArgumentParser
import cv2
from mmdet.apis import inference_detector, init_detector, show_result_pyplot
from mmpose.apis import (inference_top_down_pose_model, init_pose_model,
vis_pose_result)
import time
import numpy as np
def box_check(img, device='cpu'):
... | 33.54321 | 79 | 0.545332 |
79644da478d6ad7ee7c708c1f80ccf83a7cf6c48 | 10,967 | py | Python | genet/utils/simplification.py | arup-group/genet | 24bfbee31da6d7951598adb29ddf17d3a08ed5e6 | [
"MIT"
] | 22 | 2020-12-22T11:11:44.000Z | 2022-03-07T16:25:35.000Z | genet/utils/simplification.py | tkahng/genet | d5c29ed9e44408b60f55d8de889d7430debc9f04 | [
"MIT"
] | 27 | 2020-12-22T09:45:35.000Z | 2022-03-03T14:52:24.000Z | genet/utils/simplification.py | tkahng/genet | d5c29ed9e44408b60f55d8de889d7430debc9f04 | [
"MIT"
] | 7 | 2021-01-02T10:00:05.000Z | 2022-01-06T03:53:43.000Z | import logging
from math import ceil
from statistics import median
from shapely.geometry import LineString, Point
import genet.utils.parallel as parallel
# rip and monkey patch of a few functions from osmnx.simplification to customise graph simplification
def _process_path(indexed_edge_groups_to_simplify):
li... | 40.319853 | 119 | 0.63609 |
79644e04eb522cb129c1c564e1dd64fd22a08381 | 907 | py | Python | test/test_StashPop.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 15 | 2019-11-13T20:59:53.000Z | 2020-12-15T05:21:21.000Z | test/test_StashPop.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 50 | 2019-10-12T16:57:11.000Z | 2019-10-27T21:03:22.000Z | test/test_StashPop.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 1 | 2019-11-14T03:20:21.000Z | 2019-11-14T03:20:21.000Z | import unittest
from unittest.mock import MagicMock
from git_gopher.Fzf import Fzf
from git_gopher.CommandRunner import CommandRunner
from git_gopher.GitDataGetter import GitDataGetter
from git_gopher.HistoryCommandRunner import HistoryCommandRunner
from git_gopher.StashPop import StashPop
class TestStashPop(unittest.... | 34.884615 | 86 | 0.76075 |
79644f3ec8950e8cd8ca27ac8ce4211983c3b8c5 | 3,260 | py | Python | fias/models/address.py | moodpulse/django-fias | dfa8f3086d15d78c83ed39e2408d8f1adf264094 | [
"BSD-3-Clause"
] | null | null | null | fias/models/address.py | moodpulse/django-fias | dfa8f3086d15d78c83ed39e2408d8f1adf264094 | [
"BSD-3-Clause"
] | null | null | null | fias/models/address.py | moodpulse/django-fias | dfa8f3086d15d78c83ed39e2408d8f1adf264094 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, absolute_import
from django.db import models
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from fias.models.addrobj import AddrObj
from fias.fields import AddressField, ChainedAreaField
__all__ = ['FIASAdd... | 28.596491 | 105 | 0.640184 |
79644fdccaaf783be0495d516860462178ef2272 | 1,312 | py | Python | ch6/Stores.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch6/Stores.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | null | null | null | ch6/Stores.py | antallen/PythonMaterial | c582fb1610610feb72002f43a3758d5c58d6da85 | [
"MIT"
] | 1 | 2021-07-23T09:59:15.000Z | 2021-07-23T09:59:15.000Z | import csv
class Stores:
def __init__(self):
self.__id = []
self.__name = []
self.__owner = []
self.__prize = []
with open('stores.csv', newline='',encoding='utf-8') as csvfile:
rows = csv.DictReader(csvfile)
for row in rows:
self.__i... | 34.526316 | 94 | 0.570884 |
79645018b31e315a8a4ee56aba6ff4053b179dae | 256 | py | Python | output/models/nist_data/atomic/long/schema_instance/nistschema_sv_iv_atomic_long_min_inclusive_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/long/schema_instance/nistschema_sv_iv_atomic_long_min_inclusive_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/long/schema_instance/nistschema_sv_iv_atomic_long_min_inclusive_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.long.schema_instance.nistschema_sv_iv_atomic_long_min_inclusive_1_xsd.nistschema_sv_iv_atomic_long_min_inclusive_1 import NistschemaSvIvAtomicLongMinInclusive1
__all__ = [
"NistschemaSvIvAtomicLongMinInclusive1",
]
| 42.666667 | 195 | 0.894531 |
7964513b071a0bd366e183e5ffccb2b149890461 | 484 | py | Python | authors/apps/articles/migrations/0017_auto_20190430_1134.py | andela/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 1 | 2019-12-25T18:59:34.000Z | 2019-12-25T18:59:34.000Z | authors/apps/articles/migrations/0017_auto_20190430_1134.py | katherine95/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 26 | 2019-04-23T11:20:35.000Z | 2022-03-11T23:45:54.000Z | authors/apps/articles/migrations/0017_auto_20190430_1134.py | katherine95/ah-the-jedi-backend | ba429dfcec577bd6d52052673c1c413835f65988 | [
"BSD-3-Clause"
] | 8 | 2019-05-21T06:54:34.000Z | 2019-11-18T19:45:22.000Z | # Generated by Django 2.1 on 2019-04-30 11:34
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0016_auto_20190430_1123'),
]
operations = [
migrations.AlterField(
model_name='articlemo... | 24.2 | 114 | 0.646694 |
7964517d612cb2ad45935180aff5623b4bf3a6fb | 460 | py | Python | plotly/validators/parcoords/line/colorbar/titlefont/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/parcoords/line/colorbar/titlefont/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/parcoords/line/colorbar/titlefont/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='color',
parent_name='parcoords.line.colorbar.titlefont',
**kwargs
):
super(ColorValidator, self).__init__(
plotly_name=pl... | 24.210526 | 66 | 0.606522 |
796451949a2dc4d9b1508db78416549e78bb39d2 | 22 | py | Python | src/discord_bot_maker/__init__.py | dehadeaaryan/discord-bot-maker | cfd833252b8c434ed8ab94386c165c289d7e473e | [
"MIT"
] | 1 | 2022-03-13T00:20:41.000Z | 2022-03-13T00:20:41.000Z | src/discord_bot_maker/__init__.py | dehadeaaryan/discord-bot-maker | cfd833252b8c434ed8ab94386c165c289d7e473e | [
"MIT"
] | null | null | null | src/discord_bot_maker/__init__.py | dehadeaaryan/discord-bot-maker | cfd833252b8c434ed8ab94386c165c289d7e473e | [
"MIT"
] | null | null | null | from .dbot import DBot | 22 | 22 | 0.818182 |
7964519fd4a74d94ba69e2909e68313d3262a588 | 1,634 | py | Python | fragbuilder/basilisk_lib/Mocapy/__init__.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | 8 | 2015-04-11T17:43:13.000Z | 2021-12-02T10:18:45.000Z | fragbuilder/basilisk_lib/Mocapy/__init__.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | null | null | null | fragbuilder/basilisk_lib/Mocapy/__init__.py | berquist/fragbuilder | bb17bb1e20e6d6cc2770281228b222b1a54f1cf6 | [
"BSD-2-Clause"
] | 6 | 2015-04-01T07:18:26.000Z | 2021-04-24T11:11:18.000Z | # Mocapy: A parallelized Dynamic Bayesian Network toolkit
#
# Copyright (C) 2004 Thomas Hamelryck
#
# This library is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License... | 32.039216 | 84 | 0.746022 |
796451b0d1e74fc4a7b0c55a3e83eae2468f44ee | 39 | py | Python | config/staging.py | Aneureka/njuapi | f45f703e20451f12d0900c5c38b93cdd6e9b672c | [
"MIT"
] | 6 | 2017-09-16T13:50:28.000Z | 2019-10-24T03:06:49.000Z | config/staging.py | Aneureka/njuapi | f45f703e20451f12d0900c5c38b93cdd6e9b672c | [
"MIT"
] | null | null | null | config/staging.py | Aneureka/njuapi | f45f703e20451f12d0900c5c38b93cdd6e9b672c | [
"MIT"
] | 1 | 2017-09-16T13:58:35.000Z | 2017-09-16T13:58:35.000Z | # use for test production environment
| 13 | 37 | 0.794872 |
796452cfcae98de00aaa39c5813a1753dec88397 | 16,414 | py | Python | hummingbot/strategy/random_loop_trade/random_loop_trade_config_map.py | huuhait/hummingbot-peatio | 669170d13f742a3c941c3c6bfe91464a4de03cb8 | [
"Apache-2.0"
] | 11 | 2020-09-15T08:21:59.000Z | 2022-03-19T05:06:59.000Z | hummingbot/strategy/random_loop_trade/random_loop_trade_config_map.py | TheHolyRoger/hummingbot | a0c8282261d819101bf3ecff98e2dd416ea9df4b | [
"Apache-2.0"
] | null | null | null | hummingbot/strategy/random_loop_trade/random_loop_trade_config_map.py | TheHolyRoger/hummingbot | a0c8282261d819101bf3ecff98e2dd416ea9df4b | [
"Apache-2.0"
] | 5 | 2020-09-18T12:59:31.000Z | 2021-06-27T01:46:16.000Z | from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
validate_exchange,
validate_market_trading_pair,
validate_bool,
validate_decimal,
)
from hummingbot.client.settings import (
required_exchanges,
EXAMPLE_PAIRS,
)
from typing import ... | 48.997015 | 120 | 0.622396 |
79645312fda291dae5abb1374c211d392c03b410 | 850 | py | Python | xlsxwriter/test/drawing/test_write_a_graphic_frame_locks.py | yxwlr995/-Python-Pandas-XlsxWriter | cd28c1b968795b67f3013c49a0e02ffda5898163 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/drawing/test_write_a_graphic_frame_locks.py | yxwlr995/-Python-Pandas-XlsxWriter | cd28c1b968795b67f3013c49a0e02ffda5898163 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/drawing/test_write_a_graphic_frame_locks.py | yxwlr995/-Python-Pandas-XlsxWriter | cd28c1b968795b67f3013c49a0e02ffda5898163 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-04-12T16:44:58.000Z | 2020-04-12T16:44:58.000Z | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
from ..compatibility import StringIO
from ...drawing import Drawing
class TestWriteAgraphicFrameLocks(unittest.TestCase):
"""
... | 22.972973 | 79 | 0.605882 |
7964537167394cd55cb68e35a2cc078c9c7b0706 | 3,725 | py | Python | tests/test_sample_trivago.py | engsoares/mars-gym | 52032e3209fc9f0abd803222bbfc43186e72610b | [
"MIT"
] | 46 | 2020-09-24T00:34:14.000Z | 2022-02-24T01:52:16.000Z | tests/test_sample_trivago.py | deeplearningbrasil/mars-gym | 52032e3209fc9f0abd803222bbfc43186e72610b | [
"MIT"
] | null | null | null | tests/test_sample_trivago.py | deeplearningbrasil/mars-gym | 52032e3209fc9f0abd803222bbfc43186e72610b | [
"MIT"
] | 6 | 2020-10-01T07:11:15.000Z | 2021-09-06T16:48:18.000Z | import sys, os
os.environ["OUTPUT_PATH"] = "tests/output"
import unittest
from unittest.mock import patch
import pandas as pd
from unittest.mock import Mock
from mars_gym.data import utils
import luigi
from samples.trivago_rio.data import (
PrepareMetaData,
PrepareHistoryInteractionData,
PrepareTrivagoD... | 35.817308 | 348 | 0.680268 |
796453ec9e720c64622af727aed9ae86cceb8032 | 5,364 | py | Python | homeassistant/components/mqtt/debug_info.py | olbjan/home-assistant-1 | 1adb45f74e96fc5eff137a3727647a7e428e123c | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/mqtt/debug_info.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/mqtt/debug_info.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Helper to handle a set of topics to subscribe to."""
from collections import deque
from functools import wraps
import logging
from typing import Any
from homeassistant.helpers.typing import HomeAssistantType
from .const import ATTR_DISCOVERY_PAYLOAD, ATTR_DISCOVERY_TOPIC
from .models import MessageCallbackType
_L... | 34.384615 | 88 | 0.661633 |
796454d01b59bb458802347dcd99022a1454cda2 | 96 | py | Python | src/ui/clear.py | oppsec/magenta | 8943bab612109047ad3799a8a6b1a5dcce7daebe | [
"MIT"
] | 3 | 2021-06-14T18:05:59.000Z | 2021-06-30T14:09:10.000Z | src/ui/clear.py | oppsec/magenta | 8943bab612109047ad3799a8a6b1a5dcce7daebe | [
"MIT"
] | null | null | null | src/ui/clear.py | oppsec/magenta | 8943bab612109047ad3799a8a6b1a5dcce7daebe | [
"MIT"
] | null | null | null | from os import system, name
def clear() -> None:
system('cls' if name == 'nt' else 'clear') | 24 | 46 | 0.625 |
7964553a6ac4b5992b0eef37fa99125a203e41bd | 6,860 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/antivirus_scan_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/antivirus_scan_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/antivirus_scan_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class AntivirusScanItem(object):... | 32.358491 | 126 | 0.590525 |
796458bdb1fe7e4c5d519a3b0a9cd4c9b15aebbe | 2,305 | py | Python | tensor2tensor/models/resnet_test.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 12,921 | 2017-06-15T17:11:46.000Z | 2022-03-31T15:22:11.000Z | tensor2tensor/models/resnet_test.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 1,635 | 2017-06-18T15:29:27.000Z | 2022-03-19T20:35:23.000Z | tensor2tensor/models/resnet_test.py | jaseweir/tensor2tensor | 2a33b152d7835af66a6d20afe7961751047e28dd | [
"Apache-2.0"
] | 3,521 | 2017-06-15T18:25:42.000Z | 2022-03-31T05:47:55.000Z | # coding=utf-8
# Copyright 2021 The Tensor2Tensor 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... | 32.928571 | 78 | 0.694577 |
79645a869ac8d866b69f2c718db7fc2339f97d38 | 3,951 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_read_settings_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_read_settings_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2020-03-06T05:57:16.000Z | 2020-03-06T05:57:16.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_s3_read_settings_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 50.012658 | 294 | 0.697545 |
79645b16b0d8a5a55d149997a5ca8a9e1ed1e296 | 7,799 | py | Python | examples/pybullet/gym/pybullet_envs/minitaur/agents/ppo/utility.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 51 | 2018-11-11T12:47:38.000Z | 2022-03-06T08:39:43.000Z | examples/pybullet/gym/pybullet_envs/minitaur/agents/ppo/utility.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 2 | 2019-11-15T03:21:45.000Z | 2020-09-10T11:53:58.000Z | examples/pybullet/gym/pybullet_envs/minitaur/agents/ppo/utility.py | frk2/bullet3 | 225d823e4dc3f952c6c39920c3f87390383e0602 | [
"Zlib"
] | 14 | 2018-12-12T09:12:14.000Z | 2021-10-17T14:30:25.000Z | # Copyright 2017 The TensorFlow Agents 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 ag... | 34.973094 | 77 | 0.685857 |
79645c4577bc8be62cdcfb8e3802aa0a411b0e59 | 33,068 | py | Python | test/test_bulk_loader.py | jvanmalder/redisgraph-bulk-loader | 008c058f73454cfcf88291864d185645303d3ee7 | [
"BSD-3-Clause"
] | null | null | null | test/test_bulk_loader.py | jvanmalder/redisgraph-bulk-loader | 008c058f73454cfcf88291864d185645303d3ee7 | [
"BSD-3-Clause"
] | null | null | null | test/test_bulk_loader.py | jvanmalder/redisgraph-bulk-loader | 008c058f73454cfcf88291864d185645303d3ee7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import csv
import redis
import unittest
from redisgraph import Graph
from click.testing import CliRunner
from redisgraph_bulk_loader.bulk_insert import bulk_insert
# Globals for validating example graph
person_count = ""
country_count = ""
knows_count = ""
visited_count = ... | 45.927778 | 148 | 0.535563 |
79645d9c3d52453d39004e11e176edbf09a445cc | 3,256 | py | Python | main_project/settings.py | ananthuthayyil/Handwriting-Recognition | 89a94ee36596ade5cb2ecc77a39c7de0f8e03aa8 | [
"Apache-2.0"
] | null | null | null | main_project/settings.py | ananthuthayyil/Handwriting-Recognition | 89a94ee36596ade5cb2ecc77a39c7de0f8e03aa8 | [
"Apache-2.0"
] | null | null | null | main_project/settings.py | ananthuthayyil/Handwriting-Recognition | 89a94ee36596ade5cb2ecc77a39c7de0f8e03aa8 | [
"Apache-2.0"
] | null | null | null | """
Django settings for main_project project.
Generated by 'django-admin startproject' using Django 2.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
""... | 26.688525 | 92 | 0.672604 |
79645f571735077cc68c5f0e8841803934c1addc | 162,363 | py | Python | openff/toolkit/tests/test_toolkits.py | mattwthompson/openforcefield | 1a201f16abbc27bbeec858ec840481e749a6f08c | [
"MIT"
] | null | null | null | openff/toolkit/tests/test_toolkits.py | mattwthompson/openforcefield | 1a201f16abbc27bbeec858ec840481e749a6f08c | [
"MIT"
] | 8 | 2021-07-20T07:05:30.000Z | 2022-03-01T07:07:02.000Z | openff/toolkit/tests/test_toolkits.py | mattwthompson/openforcefield | 1a201f16abbc27bbeec858ec840481e749a6f08c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# =============================================================================================
# MODULE DOCSTRING
# =============================================================================================
"""
Tests for cheminformatics toolkit wrappers
"""
# ==============================... | 41.429701 | 178 | 0.633796 |
79645f5b2a986a5e64169d98d5f0a64a5e639c38 | 1,387 | py | Python | tools/SDKTool/src/common/tool_timer.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/common/tool_timer.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/common/tool_timer.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 25.685185 | 111 | 0.64672 |
79645f5b4226c1034dc3f2a4740fa3d53c737a12 | 3,324 | py | Python | Face.py | Abd-Elrazek/FaceRecognition | ed4102dba4ca57027a1423c598f97b6ff15d9a6f | [
"MIT"
] | 2 | 2018-08-21T04:59:48.000Z | 2019-04-16T08:13:43.000Z | Face.py | Abd-Elrazek/FaceRecognition | ed4102dba4ca57027a1423c598f97b6ff15d9a6f | [
"MIT"
] | null | null | null | Face.py | Abd-Elrazek/FaceRecognition | ed4102dba4ca57027a1423c598f97b6ff15d9a6f | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
import cv2, pickle, random
#Creat a face Recognizer
recognizer = cv2.face.LBPHFaceRecognizer_create()
#List of Videos
videos = ["Crush","OverMyHead.mp4"]
#Load the haarcascade frontalface Classifier
face = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
#eye = cv2.Ca... | 30.495413 | 90 | 0.599579 |
796461c339d53505c593b964d5150eac84d5f300 | 2,187 | py | Python | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/project_first_app/migrations/0001_initial.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/project_first_app/migrations/0001_initial.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/project_first_app/migrations/0001_initial.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2021-12-28 07:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Car',
fields=[
... | 39.763636 | 120 | 0.564243 |
796462485b50f9412021be29bebb28d614592877 | 4,754 | py | Python | spider/process/CommentProcess.py | SmacUL/NewsRecommend | ea694c194a9cef5124f20a4e7eb464b4210ec925 | [
"MIT"
] | 46 | 2020-01-07T11:26:22.000Z | 2022-03-19T02:45:04.000Z | spider/process/CommentProcess.py | SmacUL/NewsRecommend | ea694c194a9cef5124f20a4e7eb464b4210ec925 | [
"MIT"
] | 5 | 2019-11-11T06:22:58.000Z | 2021-09-19T17:07:57.000Z | spider/process/CommentProcess.py | SmacUL/NewsRecommend | ea694c194a9cef5124f20a4e7eb464b4210ec925 | [
"MIT"
] | 15 | 2020-04-13T10:44:53.000Z | 2022-03-19T02:45:07.000Z | import util.Request as Request
import util.Time as Time
import model.CommentModel as ComMod
import logging
class CommentProcess:
""" 评论数据的获取与填充
# 20-17-04 依据新的 SQL 修改
"""
def get_coms_json(self, art_brief_json):
""" 获取评论列表
# 20-04-17 代码检查 OK
# 20-04-28 将单次获取评论的数量从 10 变成了 ... | 33.716312 | 162 | 0.423433 |
796462517fff852bbe214f8ce1f952f82c0777de | 16,239 | py | Python | requests_html.py | wsqy/requests-html | 2aad96cead9ceac9f0b7eb2c6422365702446fff | [
"MIT"
] | 1 | 2019-04-16T19:51:12.000Z | 2019-04-16T19:51:12.000Z | requests_html.py | tashby/requests-html | 2aad96cead9ceac9f0b7eb2c6422365702446fff | [
"MIT"
] | null | null | null | requests_html.py | tashby/requests-html | 2aad96cead9ceac9f0b7eb2c6422365702446fff | [
"MIT"
] | null | null | null | import sys
import asyncio
from urllib.parse import urlparse, urlunparse
from concurrent.futures._base import TimeoutError
from typing import Set, Union, List, MutableMapping, Optional
import pyppeteer
import requests
from pyquery import PyQuery
from fake_useragent import UserAgent
from lxml import etree
from lxml.htm... | 33.621118 | 175 | 0.605702 |
796462b29d90467e5a781fcd870dcc965c29ec2d | 2,644 | py | Python | JoinMe/server/user.py | Brucechen13/freeprograms | 260f80cb6350da04a27a8ffccca3fdb0d9e0ad98 | [
"MIT"
] | null | null | null | JoinMe/server/user.py | Brucechen13/freeprograms | 260f80cb6350da04a27a8ffccca3fdb0d9e0ad98 | [
"MIT"
] | null | null | null | JoinMe/server/user.py | Brucechen13/freeprograms | 260f80cb6350da04a27a8ffccca3fdb0d9e0ad98 | [
"MIT"
] | null | null | null | import pymysql
import json
#User表结构 id, phone, password, username, gender,age,address,career
class User:
def __init__(self, conn):
self._conn = conn
def parseUser(self, row):
user = {}
user['id'] = str(row[0])
user['phone'] = row[1]
user['password'] = row[2]
... | 37.771429 | 113 | 0.501135 |
796463b0651ddd2ed2ef0f426fbe9269f85d90a7 | 3,425 | py | Python | tests/test_encoding/test_count_frequency_encoder.py | indymnv/feature_engine | df996b718ef9335dd4b593087b3d6177a919ccf5 | [
"BSD-3-Clause"
] | 1 | 2020-10-22T21:49:38.000Z | 2020-10-22T21:49:38.000Z | tests/test_encoding/test_count_frequency_encoder.py | indymnv/feature_engine | df996b718ef9335dd4b593087b3d6177a919ccf5 | [
"BSD-3-Clause"
] | 3 | 2020-10-27T16:27:49.000Z | 2020-11-13T13:22:08.000Z | tests/test_encoding/test_count_frequency_encoder.py | indymnv/feature_engine | df996b718ef9335dd4b593087b3d6177a919ccf5 | [
"BSD-3-Clause"
] | 1 | 2020-11-16T21:58:05.000Z | 2020-11-16T21:58:05.000Z | import pandas as pd
import pytest
from sklearn.exceptions import NotFittedError
from feature_engine.encoding import CountFrequencyEncoder
def test_encode_1_variable_with_counts(df_enc):
# test case 1: 1 variable, counts
encoder = CountFrequencyEncoder(encoding_method="count", variables=["var_A"])
X = enc... | 23.141892 | 84 | 0.579854 |
796463d420b0f9517f139756701b8769580ee632 | 15,252 | py | Python | UNIOA/Opt_X.py | Huilin-Li/UNIOA | 0f2527eac955a7193406775e5b71fab35f064422 | [
"MIT"
] | null | null | null | UNIOA/Opt_X.py | Huilin-Li/UNIOA | 0f2527eac955a7193406775e5b71fab35f064422 | [
"MIT"
] | null | null | null | UNIOA/Opt_X.py | Huilin-Li/UNIOA | 0f2527eac955a7193406775e5b71fab35f064422 | [
"MIT"
] | null | null | null | from sklearn.metrics import pairwise_distances
from .LevyFlight import Levy
import numpy as np
from numba import jit, prange
class Opt_X:
@staticmethod
def your():
pass
# <editor-fold desc="2 defs for ba: ba, ba_but_asyncE">
@staticmethod
def ba(old_X, new_Y, old_x_g, old_z1, old_z2, w3, l... | 37.752475 | 97 | 0.490296 |
7964668d992b296e9804a037340e001c6d7c56f4 | 5,603 | py | Python | sirius/docker.py | by46/sirius | 135c58f043a497f4c81ea254ea6cf6a87d637757 | [
"MIT"
] | null | null | null | sirius/docker.py | by46/sirius | 135c58f043a497f4c81ea254ea6cf6a87d637757 | [
"MIT"
] | null | null | null | sirius/docker.py | by46/sirius | 135c58f043a497f4c81ea254ea6cf6a87d637757 | [
"MIT"
] | null | null | null | from __future__ import print_function
import httplib
import json
import os
from distutils.version import LooseVersion
from itertools import chain
from itertools import imap
import requests
from fabric.api import local
from git import Repo
from negowl import ContainerNotFound
from negowl import factory
... | 34.58642 | 118 | 0.634838 |
796467df6f7351cdcad360fcdbb345ae98329ec5 | 74 | py | Python | challenge_0/python/DTCitron/src/main.py | rchicoli/2017-challenges | 44f0b672e5dea34de1dde131b6df837d462f8e29 | [
"Apache-2.0"
] | 271 | 2017-01-01T22:58:36.000Z | 2021-11-28T23:05:29.000Z | challenge_0/python/DTCitron/src/main.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 283 | 2017-01-01T23:26:05.000Z | 2018-03-23T00:48:55.000Z | challenge_0/python/DTCitron/src/main.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 311 | 2017-01-01T22:59:23.000Z | 2021-09-23T00:29:12.000Z | def main():
print 'Hello World!'
if __name__=='__main__':
main()
| 12.333333 | 24 | 0.594595 |
79646806282075ffc57bf184e1aaa35dbfe2e7b0 | 17,459 | py | Python | response_operations_ui/views/reporting_units.py | ONSdigital/response-operations-ui | 1ec70c89e443fdfba620af328a4a13ce67459aa8 | [
"MIT"
] | 3 | 2018-03-06T12:33:11.000Z | 2021-03-09T09:20:55.000Z | response_operations_ui/views/reporting_units.py | ONSdigital/response-operations-ui | 1ec70c89e443fdfba620af328a4a13ce67459aa8 | [
"MIT"
] | 519 | 2017-11-30T16:32:24.000Z | 2022-03-28T13:37:57.000Z | response_operations_ui/views/reporting_units.py | ONSdigital/response-operations-ui | 1ec70c89e443fdfba620af328a4a13ce67459aa8 | [
"MIT"
] | 2 | 2020-01-21T20:27:32.000Z | 2021-04-11T07:45:16.000Z | import logging
from datetime import datetime, timezone
from flask import Blueprint
from flask import current_app as app
from flask import flash, redirect, render_template, request, url_for
from flask_login import login_required
from flask_paginate import Pagination
from iso8601 import parse_date
from structlog import ... | 41.08 | 120 | 0.725643 |
79646879b4c8d277e057b00b5e9da82cdb8f73f8 | 1,208 | py | Python | src/Cracker.py | josueal1/targetAttacks | 3ccf69fcab241887b6c8ab9563f8f1d0b3a1caf7 | [
"MIT"
] | 1 | 2019-10-17T22:28:11.000Z | 2019-10-17T22:28:11.000Z | src/Cracker.py | josueal1/targetAttacks | 3ccf69fcab241887b6c8ab9563f8f1d0b3a1caf7 | [
"MIT"
] | 1 | 2020-12-24T04:37:31.000Z | 2020-12-24T04:37:31.000Z | src/Cracker.py | josueal1/targetAttacks | 3ccf69fcab241887b6c8ab9563f8f1d0b3a1caf7 | [
"MIT"
] | null | null | null | # Cracker.py
# Josue Lopez
""" This module is intended to receive a file name and parse through a log of HTTP requests,
in order to idenitify if a hacker has attempted to use an SQL injection to hack a database.
"""
from collections import defaultdict
from src.httpResponse import httpResponse as httpResponse
class... | 26.26087 | 93 | 0.64404 |
79646958da9d3726df2f29b409a054102bf12a77 | 2,047 | py | Python | mysqljson/__main__.py | wokuang/mysql-to-json | 8f403f0d708408a4abfb0b47095cb3d9adb8d373 | [
"BSD-2-Clause"
] | null | null | null | mysqljson/__main__.py | wokuang/mysql-to-json | 8f403f0d708408a4abfb0b47095cb3d9adb8d373 | [
"BSD-2-Clause"
] | null | null | null | mysqljson/__main__.py | wokuang/mysql-to-json | 8f403f0d708408a4abfb0b47095cb3d9adb8d373 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
mysql-to-json
Connects to a MySQL database and exports selected data to JSON.
copyright 2018 Seth Black
"""
import argparse
import getpass
import json
import MySQLdb
import sys
def cursor_to_dict(cursor):
data = cursor.fetchone()
if data is None:
return None
desc = cu... | 25.911392 | 113 | 0.623351 |
79646a2a058a5bca83bf0ed6d7fba8d97f47b677 | 1,741 | py | Python | cvraft/cli.py | cvraft/cvraft | e2340e4776f7334fa330cd0e8b2231654d861e75 | [
"MIT"
] | null | null | null | cvraft/cli.py | cvraft/cvraft | e2340e4776f7334fa330cd0e8b2231654d861e75 | [
"MIT"
] | null | null | null | cvraft/cli.py | cvraft/cvraft | e2340e4776f7334fa330cd0e8b2231654d861e75 | [
"MIT"
] | null | null | null | import typer
import markdown
import frontmatter
import http.server
import socketserver
from functools import partial
from pathlib import Path
from jinja2 import Environment, PackageLoader, select_autoescape
from bs4 import BeautifulSoup
from distutils.dir_util import copy_tree
BUILD_DIR = "build"
STATIC_DIR = "stati... | 30.017241 | 113 | 0.704193 |
79646a34acca322b9b6336851c7ce341f9b161b0 | 1,074 | py | Python | app/__init__.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | app/__init__.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | app/__init__.py | abdirahman-ahmednoor/pitcher | 83c9f3caf033e422aafb781afbff186dbf3980f1 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from config import config_options
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, login_manager
from flask_uploads import UploadSet, configure_uploads, IMAGES
from flask_mail import Mail
db = SQLAlchemy()
mail = Mail()
bootstra... | 29.027027 | 62 | 0.783985 |
79646a7ee662ef36518e91059eb35ef4536ccfb7 | 1,513 | py | Python | openapi-python-client/test/test_linkable_dto.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/test/test_linkable_dto.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/test/test_linkable_dto.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Camunda BPM REST API
OpenApi Spec for Camunda BPM REST API. # noqa: E501
The version of the OpenAPI document: 7.13.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import openapi_client
from openapi_clie... | 26.086207 | 80 | 0.609385 |
79646a86451e28f16475b0d8a704cc34e14851a0 | 17,601 | py | Python | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/aio/operations/_role_assignments_operations.py | JianpingChen/azure-sdk-for-python | 3072fc8c0366287fbaea1b02493a50259c3248a2 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 47.959128 | 144 | 0.675587 |
79646ae6c119410a79a006dcde3f92c35798a640 | 2,917 | py | Python | misc/numba_matrix.py | Fusion-Goettingen/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | 40 | 2018-07-30T13:07:23.000Z | 2021-08-30T05:53:29.000Z | misc/numba_matrix.py | GitRooky/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | null | null | null | misc/numba_matrix.py | GitRooky/ExtendedTargetTrackingToolbox | 945ede661e9258a8f1ca8abc00e25727fedf3ac7 | [
"MIT"
] | 21 | 2018-10-03T11:50:00.000Z | 2022-01-11T06:41:24.000Z | __author__ = "Jens Honer"
__copyright__ = "Copyright 2018, Jens Honer Tracking Toolbox"
__email__ = "-"
__license__ = "mit"
__version__ = "1.0"
__status__ = "Prototype"
import numpy as np
from numba import guvectorize
from numba import float32, float64
@guvectorize([(float64[:], float64[:, :], float64[:]),
... | 29.765306 | 62 | 0.468289 |
79646b9035d90d2923d17caee2e46da97b14b0e1 | 831 | py | Python | setup.py | ampledata/pypirc | c10397a4cf82e40591a075bcc79a5ececcaef4a4 | [
"Apache-2.0"
] | 3 | 2015-03-22T15:09:13.000Z | 2016-09-24T01:51:27.000Z | setup.py | ampledata/pypirc | c10397a4cf82e40591a075bcc79a5ececcaef4a4 | [
"Apache-2.0"
] | 1 | 2018-11-08T08:45:25.000Z | 2018-11-08T08:45:25.000Z | setup.py | ampledata/pypirc | c10397a4cf82e40591a075bcc79a5ececcaef4a4 | [
"Apache-2.0"
] | 1 | 2018-07-23T04:53:28.000Z | 2018-07-23T04:53:28.000Z | #!/usr/bin/env python
"""PyPiRC"""
__author__ = 'Greg Albrecht <gba@splunk.com>'
__copyright__ = 'Copyright 2012 Splunk, Inc.'
__license__ = 'Apache License 2.0'
import setuptools
def read_readme():
"""Reads in README file for use in setuptools."""
with open('README.rst') as rmf:
rmf.read()
setupt... | 25.96875 | 66 | 0.665463 |
79646b9127bc78ce705486947c90d14b39ae3105 | 461 | py | Python | lib/model/faster_rcnn/faster_rcnn.py | Yuol96/faster-rcnn-pytorch | dd49d30502b464ab9d6af6bfccf981c6c1c3da26 | [
"MIT"
] | null | null | null | lib/model/faster_rcnn/faster_rcnn.py | Yuol96/faster-rcnn-pytorch | dd49d30502b464ab9d6af6bfccf981c6c1c3da26 | [
"MIT"
] | null | null | null | lib/model/faster_rcnn/faster_rcnn.py | Yuol96/faster-rcnn-pytorch | dd49d30502b464ab9d6af6bfccf981c6c1c3da26 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class FasterRCNN(nn.Module):
def __init__(self, classes, class_agnostic):
super(FasterRCNN, self).__init__()
self.classes = classes
self.class_agnostic = class_agnostic
self.RCNN_base = self._build_RCNN_base()
self.RCNN_rpn =
def _build_RCNN_base(self):
raise NotImp... | 19.208333 | 45 | 0.746204 |
79646b9bba68c45825aafab8d3091d05d3d353ec | 989 | py | Python | BlackVision/Applications/ProjectManagerPrototype/SceneAccessor.py | black-vision-engine/bv-engine | 85089d41bb22afeaa9de070646e12aa1777ecedf | [
"MIT"
] | 1 | 2022-01-28T11:43:47.000Z | 2022-01-28T11:43:47.000Z | BlackVision/Applications/ProjectManagerPrototype/SceneAccessor.py | black-vision-engine/bv-engine | 85089d41bb22afeaa9de070646e12aa1777ecedf | [
"MIT"
] | null | null | null | BlackVision/Applications/ProjectManagerPrototype/SceneAccessor.py | black-vision-engine/bv-engine | 85089d41bb22afeaa9de070646e12aa1777ecedf | [
"MIT"
] | null | null | null | from abc import abstractmethod
class SceneAccessor:
def __init__(self, projectManager):
self.projectManager = projectManager
@abstractmethod
def getScene(self, path):
pass
@abstractmethod
def createScene(self, name, path):
pass
@abstractmethod
def a... | 21.977778 | 68 | 0.637007 |
79646c79faa4ac7e3b7d167d3864a7e6e00c443e | 594 | py | Python | mayan/apps/document_comments/permissions.py | camerondphillips/MAYAN | b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f | [
"Apache-2.0"
] | null | null | null | mayan/apps/document_comments/permissions.py | camerondphillips/MAYAN | b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f | [
"Apache-2.0"
] | 1 | 2022-03-12T01:03:39.000Z | 2022-03-12T01:03:39.000Z | mayan/apps/document_comments/permissions.py | camerondphillips/MAYAN | b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from permissions.models import PermissionNamespace, Permission
comments_namespace = PermissionNamespace('comments', _('Comments'))
PERMISSION_COMMENT_CREATE = Permission.objects.register(comments_namespa... | 49.5 | 119 | 0.8367 |
79646c87bc4101bcdc27ae6e5c9b0dab5a599aef | 4,089 | py | Python | tablepyxl/tablepyxl.py | WenmuZhou/tablepyxl | 3cb2a9e12b543bf46777b55bf64857281669fe98 | [
"MIT"
] | null | null | null | tablepyxl/tablepyxl.py | WenmuZhou/tablepyxl | 3cb2a9e12b543bf46777b55bf64857281669fe98 | [
"MIT"
] | null | null | null | tablepyxl/tablepyxl.py | WenmuZhou/tablepyxl | 3cb2a9e12b543bf46777b55bf64857281669fe98 | [
"MIT"
] | 1 | 2021-08-04T04:23:10.000Z | 2021-08-04T04:23:10.000Z | # Do imports like python3 so our package works for 2 and 3
from __future__ import absolute_import
from lxml import html
from openpyxl.cell.cell import MergedCell
from openpyxl import Workbook
from openpyxl.utils import get_column_letter
from premailer import Premailer
from tablepyxl.style import Table
def string_to_... | 34.652542 | 117 | 0.648325 |
79646d7cbc0561c21b1df52de1b75be263500fd0 | 5,621 | py | Python | olderVersions/INCMACHINE0.0.5.py | Rednewspaper/The-Incredible-Machine | 622105a351725a37f73332eea0d6d8302d70e8c0 | [
"Unlicense"
] | null | null | null | olderVersions/INCMACHINE0.0.5.py | Rednewspaper/The-Incredible-Machine | 622105a351725a37f73332eea0d6d8302d70e8c0 | [
"Unlicense"
] | null | null | null | olderVersions/INCMACHINE0.0.5.py | Rednewspaper/The-Incredible-Machine | 622105a351725a37f73332eea0d6d8302d70e8c0 | [
"Unlicense"
] | null | null | null | import dispy
import hashlib
import os
def countNodes():
os.system('nmap -p 61591 192.168.1.0/24 | grep open > newresult.txt')
data = open('newresult.txt', 'r')
count=0
for x in data:
if "open" in x:
count=count+1
data.close()
os.remove('newresult.txt'... | 32.491329 | 144 | 0.568404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.