hexsha stringlengths 40 40 | size int64 4 996k | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 996k | avg_line_length float64 1.33 58.2k | max_line_length int64 2 323k | alphanum_fraction float64 0 0.97 | content_no_comment stringlengths 0 946k | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79088a8c887039e1eda9eff891c06f98b9e50b1a | 2,930 | py | Python | configs/eftnet/R2_ttf53_whh_3lr_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/eftnet/R2_ttf53_whh_3lr_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/eftnet/R2_ttf53_whh_3lr_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CenterNet',
pretrained='./pretrain/darknet53.pth',
backbone=dict(
type='DarknetV3',
layers=[1, 2, 8, 8, 4],
inplanes=[3, 32, 64, 128, 256, 512],
planes=[32, 64, 128, 256, 512, 1024],
norm_cfg=dict(type='BN'),
out_indices=(1... | 29.59596 | 86 | 0.63959 |
model = dict(
type='CenterNet',
pretrained='./pretrain/darknet53.pth',
backbone=dict(
type='DarknetV3',
layers=[1, 2, 8, 8, 4],
inplanes=[3, 32, 64, 128, 256, 512],
planes=[32, 64, 128, 256, 512, 1024],
norm_cfg=dict(type='BN'),
out_indices=(1, 2, 3, 4),
... | true | true |
79088b9c085896c740bddf2abb2d9a0921a98fba | 2,146 | py | Python | samples.py | lovpuss/xmind2testcase2021 | 1d01e6ebd4889373aba94e32a0948347f87aef06 | [
"MIT"
] | null | null | null | samples.py | lovpuss/xmind2testcase2021 | 1d01e6ebd4889373aba94e32a0948347f87aef06 | [
"MIT"
] | null | null | null | samples.py | lovpuss/xmind2testcase2021 | 1d01e6ebd4889373aba94e32a0948347f87aef06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
import json
import xmind
import logging
from xmind2testcase2021.zentao import xmind_to_zentao_csv_file
from xmind2testcase2021.testlink import xmind_to_testlink_xml_file
from xmind2testcase2021.utils import xmind_testcase_to_json_file
from xmind2testcase2021.utils import xmi... | 39.740741 | 95 | 0.741379 |
import json
import xmind
import logging
from xmind2testcase2021.zentao import xmind_to_zentao_csv_file
from xmind2testcase2021.testlink import xmind_to_testlink_xml_file
from xmind2testcase2021.utils import xmind_testcase_to_json_file
from xmind2testcase2021.utils import xmind_testsuite_to_json_file
from xmind2testca... | true | true |
79088de94df4279e83bd716206278a21dad0cc77 | 84 | py | Python | src/search_a_song_page.py | AlexCaranha/QueryByHumming | 17c4f9c9994d3be657bdd5d858d47f1800bf2209 | [
"MIT"
] | 1 | 2022-02-08T03:15:24.000Z | 2022-02-08T03:15:24.000Z | src/search_a_song_page.py | AlexCaranha/QueryByHumming | 17c4f9c9994d3be657bdd5d858d47f1800bf2209 | [
"MIT"
] | null | null | null | src/search_a_song_page.py | AlexCaranha/QueryByHumming | 17c4f9c9994d3be657bdd5d858d47f1800bf2209 | [
"MIT"
] | null | null | null | import streamlit as st
def render():
st.write("You are in Search a song page")
| 16.8 | 45 | 0.690476 | import streamlit as st
def render():
st.write("You are in Search a song page")
| true | true |
79088ece85377829fc095f0bd9b65f077e6f6124 | 5,982 | py | Python | nginx_conf_gen.py | alex-v-yakimov/nginx-conf | 75c752a602eb2946775c3346a8e79154450fc315 | [
"BSD-2-Clause"
] | null | null | null | nginx_conf_gen.py | alex-v-yakimov/nginx-conf | 75c752a602eb2946775c3346a8e79154450fc315 | [
"BSD-2-Clause"
] | null | null | null | nginx_conf_gen.py | alex-v-yakimov/nginx-conf | 75c752a602eb2946775c3346a8e79154450fc315 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
import sys
import json
import getopt
import os
import jsonschema
import subprocess
if os.geteuid() != 0:
print('You must be a root user')
sys.exit(72)
json_file = ''
nginx_conf = '/etc/nginx/nginx.conf'
schema_file = ''
test = False
#------Parse command-line options------
def usage():
prin... | 32.51087 | 121 | 0.57322 |
import sys
import json
import getopt
import os
import jsonschema
import subprocess
if os.geteuid() != 0:
print('You must be a root user')
sys.exit(72)
json_file = ''
nginx_conf = '/etc/nginx/nginx.conf'
schema_file = ''
test = False
def usage():
print ('Usage: ' + sys.argv[0] + ' -j json_file [-c nginx_ co... | true | true |
79088f0901ba7bed69e591f39b9713f34e924bce | 2,303 | py | Python | build/lib/django_simple_file_handler/migrations/0003_auto_20180525_1035.py | jonathanrickard/django-simple-file-handler | f714b93b941b3a677a8fd2a2eb425afaaa0a2d62 | [
"MIT"
] | 5 | 2020-09-17T16:41:01.000Z | 2021-05-21T22:42:56.000Z | build/lib/django_simple_file_handler/migrations/0003_auto_20180525_1035.py | jonathanrickard/django-simple-file-handler | f714b93b941b3a677a8fd2a2eb425afaaa0a2d62 | [
"MIT"
] | null | null | null | build/lib/django_simple_file_handler/migrations/0003_auto_20180525_1035.py | jonathanrickard/django-simple-file-handler | f714b93b941b3a677a8fd2a2eb425afaaa0a2d62 | [
"MIT"
] | 1 | 2021-01-09T13:04:38.000Z | 2021-01-09T13:04:38.000Z | from django.db import migrations, models
import django_simple_file_handler.models
class Migration(migrations.Migration):
dependencies = [
('django_simple_file_handler', '0002_auto_20180521_1545'),
]
operations = [
migrations.AlterField(
model_name='privatedocument',
... | 43.45283 | 143 | 0.671733 | from django.db import migrations, models
import django_simple_file_handler.models
class Migration(migrations.Migration):
dependencies = [
('django_simple_file_handler', '0002_auto_20180521_1545'),
]
operations = [
migrations.AlterField(
model_name='privatedocument',
... | true | true |
7908903b26156a0c8cd61f18feb0978d6c51870c | 13,671 | py | Python | nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | 2 | 2020-08-24T18:04:22.000Z | 2020-08-24T18:04:47.000Z | nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | nitro/resource/config/lb/lbvserver_appfwpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 33.182039 | 308 | 0.58657 |
from nitro.resource.base.base_resource import base_resource
from nitro.resource.base.base_resource import base_response
from nitro.service.options import options
from nitro.exception.nitro_exception import nitro_exception
from nitro.util.nitro_util import nitro_util
class lbvserver_appfwpolicy_binding... | true | true |
790890ee5574aa74994ad5ba300aad26e29c846a | 6,873 | py | Python | container_data/.config/qBittorrent/plugins/nova3/engines/leetx.py | Kira9204/wireguard-qbittorrent | 54110194fb1051b49d7e39a6754e9a699b18d33e | [
"MIT"
] | null | null | null | container_data/.config/qBittorrent/plugins/nova3/engines/leetx.py | Kira9204/wireguard-qbittorrent | 54110194fb1051b49d7e39a6754e9a699b18d33e | [
"MIT"
] | null | null | null | container_data/.config/qBittorrent/plugins/nova3/engines/leetx.py | Kira9204/wireguard-qbittorrent | 54110194fb1051b49d7e39a6754e9a699b18d33e | [
"MIT"
] | null | null | null | #VERSION: 2.3
#AUTHORS: Vikas Yadav (https://github.com/v1k45 | http://v1k45.com)
#CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | 41.654545 | 94 | 0.60614 |
import re
from html.parser import HTMLParser
from helpers import retrieve_url
from novaprinter import prettyPrinter
class leetx(object):
url = "https://1337x.to"
name = "1337x"
supported_categories = {
'all': 'All',
'movies': 'Movies',
'tv': 'TV',
... | true | true |
79089183a173182f1b58d41a9740c57cf59c543c | 946 | py | Python | turf/boolean_within/tests/test_boolean_within.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | 5 | 2020-04-12T15:15:51.000Z | 2020-04-20T14:40:53.000Z | turf/boolean_within/tests/test_boolean_within.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | 36 | 2020-04-09T16:49:05.000Z | 2020-06-01T14:39:37.000Z | turf/boolean_within/tests/test_boolean_within.py | diogomatoschaves/pyturf | 966e0c37389f7ad398431498f16e7cc9b510cd56 | [
"MIT"
] | null | null | null | import pytest
import os
from turf.boolean_within import boolean_within
from turf.utils.test_setup import get_fixtures
current_path = os.path.dirname(os.path.realpath(__file__))
fixtures = get_fixtures(
current_path,
keys=["true", "false"],
)
class TestBooleanPointOnLine:
@pytest.mark.parametrize(
... | 23.65 | 58 | 0.639535 | import pytest
import os
from turf.boolean_within import boolean_within
from turf.utils.test_setup import get_fixtures
current_path = os.path.dirname(os.path.realpath(__file__))
fixtures = get_fixtures(
current_path,
keys=["true", "false"],
)
class TestBooleanPointOnLine:
@pytest.mark.parametrize(
... | true | true |
7908919fd9c2722e099a3815953cf94ccddb5d9a | 439 | py | Python | array/twosum.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/twosum.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/twosum.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
lookup = dict(((v, i) for i, v in enumerate(nums)))
return next(( (i+1, lookup.get(target-v)+1)
for i, v in enumerate(nums)
... | 29.266667 | 59 | 0.498861 | class Solution:
def twoSum(self, nums, target):
lookup = dict(((v, i) for i, v in enumerate(nums)))
return next(( (i+1, lookup.get(target-v)+1)
for i, v in enumerate(nums)
if lookup.get(target-v, i) != i), None)
a = Solution()
print(a.twoSum([2, 11, 7, 15],9))... | true | true |
790891a39404f5ebac8886e67eb42917dbac546a | 8,091 | py | Python | frontend/update.py | daavofficial/pyLaunch | 7119dbe64152a8bffe9e0f8b70ebb9ca89ce4e9a | [
"MIT"
] | 1 | 2022-01-06T15:11:29.000Z | 2022-01-06T15:11:29.000Z | frontend/update.py | daavofficial/pyLaunch | 7119dbe64152a8bffe9e0f8b70ebb9ca89ce4e9a | [
"MIT"
] | null | null | null | frontend/update.py | daavofficial/pyLaunch | 7119dbe64152a8bffe9e0f8b70ebb9ca89ce4e9a | [
"MIT"
] | null | null | null | import os
import re
import shutil
import sys
import urllib.error
import urllib.parse
import urllib.request
from zipfile import ZipFile
import helpers.config as config
from helpers.logger import Logger
class Updater:
__instance = None
@staticmethod
def Get():
if Updater.__instance is None:
... | 44.213115 | 269 | 0.602645 | import os
import re
import shutil
import sys
import urllib.error
import urllib.parse
import urllib.request
from zipfile import ZipFile
import helpers.config as config
from helpers.logger import Logger
class Updater:
__instance = None
@staticmethod
def Get():
if Updater.__instance is None:
... | true | true |
790891b078152a84f9a96300dd432c6aa253964b | 24,653 | py | Python | sdk/python/feast/on_demand_feature_view.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/on_demand_feature_view.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/on_demand_feature_view.py | aurobindoc/feast | 72f155882c95f21573b31a613edf066bdb55f630 | [
"Apache-2.0"
] | null | null | null | import copy
import functools
import warnings
from types import MethodType
from typing import Dict, List, Optional, Type, Union
import dill
import pandas as pd
from feast.base_feature_view import BaseFeatureView
from feast.data_source import RequestSource
from feast.errors import RegistryInferenceFailure, SpecifiedFea... | 42.14188 | 111 | 0.612461 | import copy
import functools
import warnings
from types import MethodType
from typing import Dict, List, Optional, Type, Union
import dill
import pandas as pd
from feast.base_feature_view import BaseFeatureView
from feast.data_source import RequestSource
from feast.errors import RegistryInferenceFailure, SpecifiedFea... | true | true |
79089232b5368ff1978581e4108556255ea57c67 | 3,794 | py | Python | backend/settings.py | jesusmaherrera/django-nuxtjs | f8d9500fb236c4cd938e9a6bbaf8063e545dd6fe | [
"MIT"
] | null | null | null | backend/settings.py | jesusmaherrera/django-nuxtjs | f8d9500fb236c4cd938e9a6bbaf8063e545dd6fe | [
"MIT"
] | null | null | null | backend/settings.py | jesusmaherrera/django-nuxtjs | f8d9500fb236c4cd938e9a6bbaf8063e545dd6fe | [
"MIT"
] | null | null | null | """
Django settings for backend project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib... | 27.1 | 100 | 0.707433 |
from pathlib import Path
from datetime import timedelta
import os
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = '2(iwreobf4b(-=h_p=^!obgxdgn3_*s!17=_3wc4dun9_y^q+c'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib... | true | true |
790892d7dd0cd652cb37f1aeebff79a3c0d23795 | 5,852 | py | Python | pytorch-pretrained-bert/src/gen_pt_squad.py | lianapanatau/BERT-for-RRC-ABSA | d31d81d5f9dce594a23f256199988fc2a11ce016 | [
"Apache-2.0"
] | 425 | 2019-03-31T02:22:29.000Z | 2022-03-26T06:55:34.000Z | pytorch-pretrained-bert/src/gen_pt_squad.py | lianapanatau/BERT-for-RRC-ABSA | d31d81d5f9dce594a23f256199988fc2a11ce016 | [
"Apache-2.0"
] | 23 | 2019-04-27T09:26:08.000Z | 2021-11-10T10:18:30.000Z | pytorch-pretrained-bert/src/gen_pt_squad.py | lianapanatau/BERT-for-RRC-ABSA | d31d81d5f9dce594a23f256199988fc2a11ce016 | [
"Apache-2.0"
] | 86 | 2019-04-09T06:41:29.000Z | 2022-03-14T02:11:56.000Z | # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team and authors from University of Illinois at Chicago.
# Copyright (c) 2018, 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... | 42.100719 | 134 | 0.641319 |
import os
import logging
import argparse
import random
import json
from tqdm import tqdm, trange
import numpy as np
import torch
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
from pytorch_pretrained_bert.tokenization import BertTokenizer
import squad_data_ut... | true | true |
790892ec8c9e4b914f99286d9ace57de42933776 | 4,932 | py | Python | src/fairsharing_client/api.py | cthoyt/fairsharing-client | c5a7a7caeb488b5fe3693057e2fd4a3ad4e792e0 | [
"MIT"
] | null | null | null | src/fairsharing_client/api.py | cthoyt/fairsharing-client | c5a7a7caeb488b5fe3693057e2fd4a3ad4e792e0 | [
"MIT"
] | null | null | null | src/fairsharing_client/api.py | cthoyt/fairsharing-client | c5a7a7caeb488b5fe3693057e2fd4a3ad4e792e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Access to FAIRsharing via its API.
.. seealso:: https://beta.fairsharing.org/API_doc
"""
from typing import Any, Iterable, Mapping, MutableMapping, Optional
import pystow
import requests
import yaml
from tqdm import tqdm
__all__ = [
"ensure_fairsharing",
"load_fairsharing",
"... | 31.414013 | 98 | 0.59854 |
from typing import Any, Iterable, Mapping, MutableMapping, Optional
import pystow
import requests
import yaml
from tqdm import tqdm
__all__ = [
"ensure_fairsharing",
"load_fairsharing",
"FairsharingClient",
]
PATH = pystow.join("bio", "fairsharing", name="fairsharing.yaml")
def load_fairsharing(forc... | true | true |
790893c4293b9fc10e5e43e98250c6d68c96c7fc | 429 | py | Python | shrike/compliant_logging/constants.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 27 | 2021-05-27T00:01:24.000Z | 2022-01-30T19:55:24.000Z | shrike/compliant_logging/constants.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 284 | 2021-05-12T22:26:41.000Z | 2022-02-23T21:18:34.000Z | shrike/compliant_logging/constants.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 5 | 2021-06-02T04:51:47.000Z | 2021-12-20T17:07:41.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Constant values used by this library.
"""
from enum import Enum
class DataCategory(Enum):
"""
Enumeration of data categories in compliant machine learning.
Values:
- PRIVATE: data which is private. Researchers may not view... | 19.5 | 68 | 0.687646 |
from enum import Enum
class DataCategory(Enum):
PRIVATE = 1
PUBLIC = 2
| true | true |
7908940a5dc50383e71178011fbc5ed2d2d03c8a | 410 | py | Python | indicadordepassagem.py | renarfreitas/Coursera | 64b766175eb26aef4a4a68b7d25309c7aa0f136b | [
"MIT"
] | null | null | null | indicadordepassagem.py | renarfreitas/Coursera | 64b766175eb26aef4a4a68b7d25309c7aa0f136b | [
"MIT"
] | null | null | null | indicadordepassagem.py | renarfreitas/Coursera | 64b766175eb26aef4a4a68b7d25309c7aa0f136b | [
"MIT"
] | null | null | null | decrescente = True
anterior = int(input("Digite o primeiro número da sequência: "))
valor = 1
while valor != 0 and decrescente:
valor = int(input("Digite o próximo número da sequência: "))
if valor > anterior:
decrescente = False
anterior = valor
if decrescente:
print("A sequência está em o... | 25.625 | 65 | 0.673171 | decrescente = True
anterior = int(input("Digite o primeiro número da sequência: "))
valor = 1
while valor != 0 and decrescente:
valor = int(input("Digite o próximo número da sequência: "))
if valor > anterior:
decrescente = False
anterior = valor
if decrescente:
print("A sequência está em o... | true | true |
79089504bee02d9e3eeed70d880013a27c3afe44 | 434 | py | Python | prpr/config.py | salmiakki/prpr | 2a50c1aa9e3799ec915e56323bb9fce15727d530 | [
"MIT"
] | 2 | 2021-05-09T20:24:36.000Z | 2021-05-12T09:01:07.000Z | prpr/config.py | salmiakki/prpr | 2a50c1aa9e3799ec915e56323bb9fce15727d530 | [
"MIT"
] | 35 | 2021-05-15T12:26:44.000Z | 2021-08-30T10:06:47.000Z | prpr/config.py | salmiakki/prpr | 2a50c1aa9e3799ec915e56323bb9fce15727d530 | [
"MIT"
] | null | null | null | from pathlib import Path
import yaml
from loguru import logger
CONFIG_FILENAME = ".prpr.yaml"
def get_config():
config_path = Path.home() / CONFIG_FILENAME
if not config_path.exists():
logger.error(f"{CONFIG_FILENAME} not found in your home directory 😿")
exit(1)
logger.debug(f"Reading c... | 25.529412 | 77 | 0.693548 | from pathlib import Path
import yaml
from loguru import logger
CONFIG_FILENAME = ".prpr.yaml"
def get_config():
config_path = Path.home() / CONFIG_FILENAME
if not config_path.exists():
logger.error(f"{CONFIG_FILENAME} not found in your home directory 😿")
exit(1)
logger.debug(f"Reading c... | true | true |
7908958cd40a79eff1a370dfe566122bbf36b6ca | 540 | py | Python | hospital/manage.py | thirdgroup/Hospital | 4d8c84600a56eccfcdbf9482927ce2f36ee59f96 | [
"Apache-2.0"
] | null | null | null | hospital/manage.py | thirdgroup/Hospital | 4d8c84600a56eccfcdbf9482927ce2f36ee59f96 | [
"Apache-2.0"
] | null | null | null | hospital/manage.py | thirdgroup/Hospital | 4d8c84600a56eccfcdbf9482927ce2f36ee59f96 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hospital.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are... | 33.75 | 73 | 0.687037 |
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hospital.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's instal... | true | true |
7908958fba0447951654d7fcc10551322a175cac | 4,364 | py | Python | src/batou/lib/mercurial.py | risclog-solution/batou | 2d149371ef78e4ca8368c3a9067452cd54318314 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-12-23T18:26:46.000Z | 2020-12-23T18:26:46.000Z | src/batou/lib/mercurial.py | risclog-solution/batou | 2d149371ef78e4ca8368c3a9067452cd54318314 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/batou/lib/mercurial.py | risclog-solution/batou | 2d149371ef78e4ca8368c3a9067452cd54318314 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from batou import UpdateNeeded, output
from batou.component import Component
from batou.lib.file import Directory
from batou.utils import CmdExecutionError
import os.path
import re
class Clone(Component):
namevar = "url"
target = "."
revision = None
branch = None
vcs_update = True
_revision_... | 32.81203 | 79 | 0.528873 | from batou import UpdateNeeded, output
from batou.component import Component
from batou.lib.file import Directory
from batou.utils import CmdExecutionError
import os.path
import re
class Clone(Component):
namevar = "url"
target = "."
revision = None
branch = None
vcs_update = True
_revision_... | true | true |
790895a9c0092fc422fdfecdb2af9ea102909e34 | 86,459 | py | Python | ThirdParty/AutobahnPython/autobahn/wamp/message.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T07:23:36.000Z | 2021-12-02T07:23:36.000Z | ThirdParty/AutobahnPython/autobahn/wamp/message.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/AutobahnPython/autobahn/wamp/message.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T07:29:15.000Z | 2021-12-02T07:29:15.000Z | ###############################################################################
##
## Copyright (C) 2013-2014 Tavendo GmbH
##
## 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
##
## h... | 31.212635 | 360 | 0.633132 | self.authprovider = authprovider
@staticmethod
def parse(wmsg):
E_TYPE)
if len(wmsg) != 3:
raise ProtocolError("invalid message length {0} for WELCOME".format(len(wmsg)))
session = check_or_raise_id(wmsg[1], "'session' in WELCOME")
details = check_or_raise_extra(wmsg[2], "'... | true | true |
790895e4939cccce765f2b1f8913f2bb504aaf99 | 456 | py | Python | iceAndFire01.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | 1 | 2022-01-05T16:07:46.000Z | 2022-01-05T16:07:46.000Z | iceAndFire01.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | null | null | null | iceAndFire01.py | QPThree/python-mycode | 9823fa89eee3019287200f1af8a01efd181fcc79 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Alta3 Research - Exploring OpenAPIs with requests"""
# documentation for this API is at
# https://anapioficeandfire.com/Documentation
import requests
AOIF = "https://www.anapioficeandfire.com/api"
def main():
## Send HTTPS GET to the API of ICE and Fire
gotresp = requests.get(AOIF)
... | 20.727273 | 55 | 0.686404 |
import requests
AOIF = "https://www.anapioficeandfire.com/api"
def main():
n()
if __name__ == "__main__":
main()
| true | true |
7908964aca83bd9faccdda451901c3ffcc1c3467 | 6,705 | py | Python | gpkit/constraints/relax.py | giserh/gpkit | 71b953fcac8f67f148b67b54b6e8cd4182dc0b3b | [
"MIT"
] | null | null | null | gpkit/constraints/relax.py | giserh/gpkit | 71b953fcac8f67f148b67b54b6e8cd4182dc0b3b | [
"MIT"
] | null | null | null | gpkit/constraints/relax.py | giserh/gpkit | 71b953fcac8f67f148b67b54b6e8cd4182dc0b3b | [
"MIT"
] | null | null | null | """Models for assessing primal feasibility"""
from __future__ import unicode_literals
from .set import ConstraintSet
from ..nomials import Variable, VectorVariable, parse_subs, NomialArray
from ..keydict import KeyDict
from .. import NamedVariables, SignomialsEnabled
class ConstraintsRelaxedEqually(ConstraintSet):
... | 40.391566 | 79 | 0.633557 | from __future__ import unicode_literals
from .set import ConstraintSet
from ..nomials import Variable, VectorVariable, parse_subs, NomialArray
from ..keydict import KeyDict
from .. import NamedVariables, SignomialsEnabled
class ConstraintsRelaxedEqually(ConstraintSet):
def __init__(self, constraints):
if... | true | true |
79089679a0eafa7ae301e31dcaa235328902ee39 | 10,695 | py | Python | examples/rsc_baseline.py | ZhaoChuyang/dgreid | ee1d7af74b796f2f194307ab023e43ecc3d3d525 | [
"MIT"
] | null | null | null | examples/rsc_baseline.py | ZhaoChuyang/dgreid | ee1d7af74b796f2f194307ab023e43ecc3d3d525 | [
"MIT"
] | null | null | null | examples/rsc_baseline.py | ZhaoChuyang/dgreid | ee1d7af74b796f2f194307ab023e43ecc3d3d525 | [
"MIT"
] | null | null | null | from __future__ import print_function, absolute_import
import argparse
import os.path as osp
import random
import numpy as np
import sys
import collections
import copy
import time
from datetime import timedelta
from sklearn.cluster import DBSCAN, KMeans
from sklearn.preprocessing import normalize
import torch
from to... | 39.464945 | 120 | 0.651426 | from __future__ import print_function, absolute_import
import argparse
import os.path as osp
import random
import numpy as np
import sys
import collections
import copy
import time
from datetime import timedelta
from sklearn.cluster import DBSCAN, KMeans
from sklearn.preprocessing import normalize
import torch
from to... | true | true |
7908969220dacc01da99a5a8d394b71fba41cd69 | 50,606 | py | Python | env/lib/python3.5/site-packages/numpy/core/multiarray.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 366 | 2019-04-07T20:34:48.000Z | 2022-03-29T07:35:38.000Z | venv/lib/python3.7/site-packages/numpy/core/multiarray.py | haideraltahan/CropMe | 75a111b9d3b2c50c6f2a9a36d21432053f02284d | [
"MIT"
] | 16 | 2020-03-24T17:30:37.000Z | 2022-03-11T23:57:41.000Z | venv/lib/python3.7/site-packages/numpy/core/multiarray.py | haideraltahan/CropMe | 75a111b9d3b2c50c6f2a9a36d21432053f02284d | [
"MIT"
] | 61 | 2019-04-08T00:58:14.000Z | 2022-03-20T23:04:28.000Z | """
Create the numpy.core.multiarray namespace for backward compatibility. In v1.16
the multiarray and umath c-extension modules were merged into a single
_multiarray_umath extension module. So we replicate the old namespace
by importing from the extension module.
"""
import functools
import warnings
from . import o... | 32.274235 | 128 | 0.619571 |
import functools
import warnings
from . import overrides
from . import _multiarray_umath
import numpy as np
from numpy.core._multiarray_umath import *
from numpy.core._multiarray_umath import (
_fastCopyAndTranspose, _flagdict, _insert, _reconstruct, _vec_string,
_ARRAY_API, _monotonicity
)
__all__ = [
... | true | true |
790896f07b7775e6ad5dbd899a45e2d39ea6a7de | 323 | py | Python | EjemploMetodos.py | gcardosov/PythonAprendeOrg | 0cad81f0a584c98389ca729a337d30581780e520 | [
"MIT"
] | 1 | 2018-03-07T05:26:12.000Z | 2018-03-07T05:26:12.000Z | EjemploMetodos.py | gcardosov/PythonAprendeOrg | 0cad81f0a584c98389ca729a337d30581780e520 | [
"MIT"
] | null | null | null | EjemploMetodos.py | gcardosov/PythonAprendeOrg | 0cad81f0a584c98389ca729a337d30581780e520 | [
"MIT"
] | null | null | null | class Persona:
def __init__(self):
self.edad = 18
self.nombre = "juan"
print "Se ha creado a", self.nombre, "de", self.edad
def hablar(self,palabras ="No se que decir"):
print self.nombre,': ', palabras
juan = Persona()
juan.hablar()
juan.hablar("Hola estoy hablando"... | 24.846154 | 61 | 0.591331 | class Persona:
def __init__(self):
self.edad = 18
self.nombre = "juan"
print "Se ha creado a", self.nombre, "de", self.edad
def hablar(self,palabras ="No se que decir"):
print self.nombre,': ', palabras
juan = Persona()
juan.hablar()
juan.hablar("Hola estoy hablando"... | false | true |
790898575f1f55937fa301c7f45fbe8da8be78a9 | 308 | py | Python | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/01_First-Steps-in-Coding/00.Book-Exercise-2.1-11-USD-to-BGN.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/01_First-Steps-in-Coding/00.Book-Exercise-2.1-11-USD-to-BGN.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/01_First-Steps-in-Coding/00.Book-Exercise-2.1-11-USD-to-BGN.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | # console converter - USD to BGN
# Write a program for converting US dollars (USD) into Bulgarian levs (BGN).
# Round the result to 2 digits after the decimal point. Use a fixed exchange rate between the dollar and the lev: 1 USD = 1.79549 BGN.
USD = float(input())
BGN = round(USD * 1.79549, 2)
print(BGN)
| 38.5 | 134 | 0.724026 |
USD = float(input())
BGN = round(USD * 1.79549, 2)
print(BGN)
| true | true |
79089951aca1c889b3b8d866cd00f096803323ad | 12,371 | py | Python | opytimizer/optimizers/social/qsa.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 528 | 2018-10-01T20:00:09.000Z | 2022-03-27T11:15:31.000Z | opytimizer/optimizers/social/qsa.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 17 | 2019-10-30T00:47:03.000Z | 2022-03-21T11:39:28.000Z | opytimizer/optimizers/social/qsa.py | anukaal/opytimizer | 5f1ccc0da80e6a4cabd99578fa24cf4f6466f9b9 | [
"Apache-2.0"
] | 35 | 2018-10-01T20:03:23.000Z | 2022-03-20T03:54:15.000Z | """Queuing Search Algorithm.
"""
import copy
import numpy as np
import opytimizer.math.random as r
import opytimizer.utils.constant as c
import opytimizer.utils.logging as l
from opytimizer.core import Optimizer
logger = l.get_logger(__name__)
class QSA(Optimizer):
"""A QSA class, inherited from Optimizer.
... | 35.446991 | 100 | 0.546035 |
import copy
import numpy as np
import opytimizer.math.random as r
import opytimizer.utils.constant as c
import opytimizer.utils.logging as l
from opytimizer.core import Optimizer
logger = l.get_logger(__name__)
class QSA(Optimizer):
def __init__(self, params=None):
logger.info('Overriding class: Opt... | true | true |
7908996791bbdb38adfbaea47b80c5dbaabad36f | 18,627 | py | Python | edu54book/edu54bookSizeAuto.py | Clonexy700/edu54book | 2a83f178947ddaf72ae6f94b502dfcf390ea9fe3 | [
"Unlicense"
] | 1 | 2019-12-24T08:44:32.000Z | 2019-12-24T08:44:32.000Z | edu54book/edu54bookSizeAuto.py | Clonexy700/edu54book | 2a83f178947ddaf72ae6f94b502dfcf390ea9fe3 | [
"Unlicense"
] | null | null | null | edu54book/edu54bookSizeAuto.py | Clonexy700/edu54book | 2a83f178947ddaf72ae6f94b502dfcf390ea9fe3 | [
"Unlicense"
] | null | null | null | from tkinter import *
from tkinter import ttk
import time
import time
window = Tk()
mygreen = "lightblue"
myred = "blue"
style = ttk.Style()
style.theme_create( "dedoff", parent="alt", settings={
"TNotebook": {"configure": {"tabmargins": [2, 5, 2, 0] } },
"TNotebook.Tab": {
"configure": ... | 51.31405 | 251 | 0.628872 | from tkinter import *
from tkinter import ttk
import time
import time
window = Tk()
mygreen = "lightblue"
myred = "blue"
style = ttk.Style()
style.theme_create( "dedoff", parent="alt", settings={
"TNotebook": {"configure": {"tabmargins": [2, 5, 2, 0] } },
"TNotebook.Tab": {
"configure": ... | true | true |
790899861c6261cce46a4e7489c43a8740801311 | 1,994 | py | Python | draft/truefx/truefx_tick.py | movermeyer/pandas_datareaders_unofficial | 458dcf473d070cd7686d53d4a9b479cbe0ab9218 | [
"BSD-3-Clause"
] | 18 | 2015-02-05T01:42:51.000Z | 2020-12-27T19:24:25.000Z | draft/truefx/truefx_tick.py | movermeyer/pandas_datareaders_unofficial | 458dcf473d070cd7686d53d4a9b479cbe0ab9218 | [
"BSD-3-Clause"
] | 1 | 2016-04-05T04:10:40.000Z | 2016-04-05T04:13:40.000Z | draft/truefx/truefx_tick.py | femtotrader/pandas_datareaders | 458dcf473d070cd7686d53d4a9b479cbe0ab9218 | [
"BSD-3-Clause"
] | 13 | 2015-09-10T19:39:51.000Z | 2022-01-06T17:08:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests_cache
import datetime
import pandas as pd
from datetime import timedelta
import pandas as pd
from pandas.io.common import ZipFile
from pandas.compat import BytesIO, StringIO, PY2
def main():
expire_after = timedelta(days=1)
if PY2:
filenam... | 34.37931 | 182 | 0.622869 |
import requests_cache
import datetime
import pandas as pd
from datetime import timedelta
import pandas as pd
from pandas.io.common import ZipFile
from pandas.compat import BytesIO, StringIO, PY2
def main():
expire_after = timedelta(days=1)
if PY2:
filename = 'cache_py2'
else:
filena... | true | true |
790899bab73f32e8386e72703c630a3a89c361df | 3,230 | py | Python | interactive-deep-colorization/ui/gui_gamut.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | 2 | 2018-08-10T13:15:11.000Z | 2022-01-15T02:04:18.000Z | interactive-deep-colorization/ui/gui_gamut.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | null | null | null | interactive-deep-colorization/ui/gui_gamut.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | 1 | 2022-02-06T16:00:10.000Z | 2022-02-06T16:00:10.000Z | import cv2
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from data import lab_gamut
import numpy as np
class GUIGamut(QWidget):
def __init__(self, gamut_size=110):
QWidget.__init__(self)
self.gamut_size = gamut_size
self.win_size = gamut_size * 2 # divided by 4
self.setFixe... | 32.626263 | 96 | 0.581734 | import cv2
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from data import lab_gamut
import numpy as np
class GUIGamut(QWidget):
def __init__(self, gamut_size=110):
QWidget.__init__(self)
self.gamut_size = gamut_size
self.win_size = gamut_size * 2
self.setFixedSize(self.win... | true | true |
79089b500417b5aa682b8baa543fb69d9e51b953 | 5,092 | py | Python | metadata_service/api/task.py | ferras/metaflow-service-clone | cc9b4fb83a7e886cd16535f73b9e24dbd21bef0c | [
"Apache-2.0"
] | null | null | null | metadata_service/api/task.py | ferras/metaflow-service-clone | cc9b4fb83a7e886cd16535f73b9e24dbd21bef0c | [
"Apache-2.0"
] | null | null | null | metadata_service/api/task.py | ferras/metaflow-service-clone | cc9b4fb83a7e886cd16535f73b9e24dbd21bef0c | [
"Apache-2.0"
] | null | null | null | from ..data.models import TaskRow
from ..data.postgres_async_db import AsyncPostgresDB
from .utils import read_body, format_response, handle_exceptions
import asyncio
class TaskApi(object):
_task_table = None
lock = asyncio.Lock()
def __init__(self, app):
app.router.add_route(
"GET",
... | 29.264368 | 86 | 0.530244 | from ..data.models import TaskRow
from ..data.postgres_async_db import AsyncPostgresDB
from .utils import read_body, format_response, handle_exceptions
import asyncio
class TaskApi(object):
_task_table = None
lock = asyncio.Lock()
def __init__(self, app):
app.router.add_route(
"GET",
... | true | true |
79089b7cb89d9cfa6870b713e23141a000877f3c | 15,864 | py | Python | release/scripts/startup/bl_ui/properties_physics_cloth.py | gunslingster/CSC581-assignement1 | 39012146e142bf400c7140d90ecfd27c45b589ca | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-08-07T11:35:09.000Z | 2021-07-21T01:55:42.000Z | release/scripts/startup/bl_ui/properties_physics_cloth.py | mmtt1998819/blender | c9c3bf983321990a6960c422e002a372c35a6f76 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/startup/bl_ui/properties_physics_cloth.py | mmtt1998819/blender | c9c3bf983321990a6960c422e002a372c35a6f76 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2020-08-03T13:03:29.000Z | 2021-08-07T22:10:26.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 32.709278 | 107 | 0.67026 | subdir = "cloth"
preset_operator = "script.execute_preset"
preset_add_operator = "cloth.preset_add"
class PhysicButtonsPanel:
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@classmethod
def poll(cls, context):
ob = context.object
return (ob a... | true | true |
79089c07c18527cb1cb83c62b7ba01481c8aeb49 | 2,224 | py | Python | samples/cli/accelbyte_py_sdk_cli/platform/_download.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | samples/cli/accelbyte_py_sdk_cli/platform/_download.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | samples/cli/accelbyte_py_sdk_cli/platform/_download.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# justice-platform-service (4.10.0)
# pylint: disable=duplicate-co... | 30.054054 | 88 | 0.718525 |
import json
import yaml
from typing import Optional
import click
from .._utils import login_as as login_as_internal
from .._utils import to_dict
from accelbyte_py_sdk.api.platform import download as download_internal
@click.command()
@click.argument("campaign_id", type=str)
@click.option("--... | true | true |
79089c89ffe201243369a9272a47ebeb11af1757 | 11,334 | py | Python | pushservice/src/PushServiceBase.py | TwolDE2/enigma2-plugins | 06685a5ce6a65a8724d3b32c8f7906714650ca2c | [
"OLDAP-2.3"
] | 30 | 2015-05-08T22:10:00.000Z | 2022-03-13T22:09:31.000Z | pushservice/src/PushServiceBase.py | TwolDE2/enigma2-plugins | 06685a5ce6a65a8724d3b32c8f7906714650ca2c | [
"OLDAP-2.3"
] | 124 | 2015-04-27T21:30:48.000Z | 2022-03-29T10:21:39.000Z | pushservice/src/PushServiceBase.py | TwolDE2/enigma2-plugins | 06685a5ce6a65a8724d3b32c8f7906714650ca2c | [
"OLDAP-2.3"
] | 193 | 2015-01-10T09:21:26.000Z | 2022-03-21T08:19:33.000Z | from __future__ import print_function
from __future__ import absolute_import
#######################################################################
#
# Push Service for Enigma-2
# Coded by betonme (c) 2012 <glaserfrank(at)gmail.com>
# Support: http://www.i-have-a-dreambox.com/wbb2/thread.php?threadid=167779
#... | 29.21134 | 121 | 0.689342 | from __future__ import print_function
from __future__ import absolute_import
ers = self.controllers
self.pushcallbacks = {}
self.pusherrbacks = {}
# Loop over all Controllers
if controllers:
for controller in controllers:
if controller.getEnable():
print(_("PushService running: ") + str(controller.... | true | true |
79089ec0e4b0cce14e46bce0073b27b819f6e4ee | 315 | py | Python | soccer_trajectories/setup.py | sadmanca/soccerbot | 5e60eacb51ff1b063ae8c1caf7eb01053add43eb | [
"BSD-3-Clause"
] | 56 | 2016-12-25T22:29:00.000Z | 2022-01-06T04:42:00.000Z | soccer_trajectories/setup.py | utra-robosoccer/soccerbot | f5e95b00356e42cdd143ab26f67f23c9cd8afd5a | [
"BSD-3-Clause"
] | 244 | 2021-04-05T03:22:25.000Z | 2022-03-31T16:47:36.000Z | soccer_trajectories/setup.py | sadmanca/soccerbot | 5e60eacb51ff1b063ae8c1caf7eb01053add43eb | [
"BSD-3-Clause"
] | 7 | 2017-01-24T23:38:07.000Z | 2022-01-19T16:58:08.000Z | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from setuptools import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['soccer_trajectories'],
package_dir={'': 'src'},
)
setup(**setup_args)
| 24.230769 | 61 | 0.768254 | import generate_distutils_setup
setup_args = generate_distutils_setup(
packages=['soccer_trajectories'],
package_dir={'': 'src'},
)
setup(**setup_args)
| true | true |
79089ee1b2be195532da5e3548198c73c7cd9335 | 3,503 | py | Python | RFACA/foldx/foldx_scan.py | JinyuanSun/my_bio_script | ceb84e2e32c38b0889956f12c380354d23b28dc1 | [
"MIT"
] | null | null | null | RFACA/foldx/foldx_scan.py | JinyuanSun/my_bio_script | ceb84e2e32c38b0889956f12c380354d23b28dc1 | [
"MIT"
] | null | null | null | RFACA/foldx/foldx_scan.py | JinyuanSun/my_bio_script | ceb84e2e32c38b0889956f12c380354d23b28dc1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#By Sun Jinyuan and Cui Yinglu, 2021
foldx_exe = "/user/sunjinyuan/soft/foldx"
def getparser():
parser = argparse.ArgumentParser(description=
'To run Foldx PositionScan with multiple threads, make sure' +
' that you have... | 36.489583 | 109 | 0.549814 |
foldx_exe = "/user/sunjinyuan/soft/foldx"
def getparser():
parser = argparse.ArgumentParser(description=
'To run Foldx PositionScan with multiple threads, make sure' +
' that you have the foldx and your pdb in the same floder')
pars... | false | true |
7908a28e2527cddfde07bba72841ff0141914230 | 342 | py | Python | hyperflex_recommend/enpity/User.py | serviceoutsource/ML-AI | 7b86f185b637a31026dba5502069ec8e42618ddb | [
"MIT"
] | null | null | null | hyperflex_recommend/enpity/User.py | serviceoutsource/ML-AI | 7b86f185b637a31026dba5502069ec8e42618ddb | [
"MIT"
] | null | null | null | hyperflex_recommend/enpity/User.py | serviceoutsource/ML-AI | 7b86f185b637a31026dba5502069ec8e42618ddb | [
"MIT"
] | null | null | null | class User(object):
"""
"""
def __init__(self, user_id, user_name, user_cereal, user_midday, user_dinner):
self.user_id = user_id
self.user_name = user_name
self.user_cereal = user_cereal
self.user_midday = user_midday
self.user_dinner = user_dinner
if __name__ ==... | 21.375 | 82 | 0.640351 | class User(object):
def __init__(self, user_id, user_name, user_cereal, user_midday, user_dinner):
self.user_id = user_id
self.user_name = user_name
self.user_cereal = user_cereal
self.user_midday = user_midday
self.user_dinner = user_dinner
if __name__ == '__main__':
... | true | true |
7908a299d956bca84b66ca1a5bbe40f2f6eb6d4e | 577 | py | Python | apple/wallet/settings/settings_objects.py | grayfallstown/apple-blockchain | 018041f158ac375f92c67b99f7ff163273407b6c | [
"Apache-2.0"
] | 15 | 2021-07-20T15:22:07.000Z | 2022-02-09T04:28:46.000Z | apple/wallet/settings/settings_objects.py | grayfallstown/apple-blockchain | 018041f158ac375f92c67b99f7ff163273407b6c | [
"Apache-2.0"
] | 17 | 2021-07-20T13:58:30.000Z | 2021-10-10T04:24:29.000Z | apple/wallet/settings/settings_objects.py | grayfallstown/apple-blockchain | 018041f158ac375f92c67b99f7ff163273407b6c | [
"Apache-2.0"
] | 4 | 2021-08-18T16:22:11.000Z | 2022-03-15T08:24:01.000Z | from dataclasses import dataclass
from apple.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class BackupInitialized(Streamable):
"""
Stores user decision regarding import of backup info
"""
user_initialized: bool # Stores if user made a selection in UI. (Skip vs I... | 33.941176 | 92 | 0.755633 | from dataclasses import dataclass
from apple.util.streamable import Streamable, streamable
@dataclass(frozen=True)
@streamable
class BackupInitialized(Streamable):
user_initialized: bool
user_skipped: bool
backup_info_imported: bool
new_wallet: bool
| true | true |
7908a43481e0d18c695c99a4c7c7c1ebc9306c70 | 17,715 | py | Python | plaster/main.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | null | null | null | plaster/main.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | 22 | 2020-06-22T19:27:50.000Z | 2021-09-30T20:02:31.000Z | plaster/main.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | 2 | 2020-06-16T17:38:46.000Z | 2021-08-06T09:37:22.000Z | #!/usr/bin/env python -u
"""
All commands that can be run in this project are available through this unified interface.
This should be run with the ./plaster.sh helper to get into the correct context.
"""
import tempfile
import numpy as np
import time
import os
import sys
import pandas as pd
import json
from pathlib im... | 31.690519 | 130 | 0.556816 |
import tempfile
import numpy as np
import time
import os
import sys
import pandas as pd
import json
from pathlib import Path
from munch import Munch
from plumbum import colors
from plumbum import FG, TF, cli, local
from plaster.tools.zlog.zlog import important
from plaster.run.sigproc_v2 import synth
from plaster.tool... | true | true |
7908a4da11350dcc729f2f370f826d6e172bbe48 | 780 | py | Python | RandomWords.py | Makemeproud/BitcoinGenerator | 10e2864a2254635153c757beece028c85a31e1ca | [
"Apache-2.0"
] | null | null | null | RandomWords.py | Makemeproud/BitcoinGenerator | 10e2864a2254635153c757beece028c85a31e1ca | [
"Apache-2.0"
] | null | null | null | RandomWords.py | Makemeproud/BitcoinGenerator | 10e2864a2254635153c757beece028c85a31e1ca | [
"Apache-2.0"
] | 1 | 2022-02-27T14:57:19.000Z | 2022-02-27T14:57:19.000Z | #!/usr/bin/env python
'''
Pull random words from http://world.std.com/~reinhold/diceware.wordlist.asc
Written 2013 Hal Canary.
Dedicated to the public domain.
'''
import random,math,sys,os
useDevRandom = True
dicewareWordlist = '~/Downloads/diceware.wordlist.asc'
with open(os.path.expanduser(dicewareWordlist)) as f:
... | 28.888889 | 75 | 0.723077 |
import random,math,sys,os
useDevRandom = True
dicewareWordlist = '~/Downloads/diceware.wordlist.asc'
with open(os.path.expanduser(dicewareWordlist)) as f:
WordList = [line.split()[1]
for nu,line in enumerate(f) if 2 <= nu < 7778]
def GetRandom():
if useDevRandom:
with open('/dev/random', 'rb') as f:
random.... | true | true |
7908a58e9deb3412d473d4b3179c30a4123c16cc | 1,236 | py | Python | Python_OO/Exercicio.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | Python_OO/Exercicio.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | Python_OO/Exercicio.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | class Pessoa:
def __init__(self,nome,idade,cpf,salario):
self.nome = nome
self.idade = idade
self.cpf = cpf
self.salario = salario
def Aumento(self):
return self.salario *0.05
class Gerente(Pessoa):
def __init__(self,nome,idade,cpf,salario,senha):
... | 20.949153 | 63 | 0.61165 | class Pessoa:
def __init__(self,nome,idade,cpf,salario):
self.nome = nome
self.idade = idade
self.cpf = cpf
self.salario = salario
def Aumento(self):
return self.salario *0.05
class Gerente(Pessoa):
def __init__(self,nome,idade,cpf,salario,senha):
... | true | true |
7908a5d98b2e78810c7b93a99ad02c8535a66efd | 400 | py | Python | polrev/areas/widgets/congressional_district_widgets.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 1 | 2021-12-10T05:54:16.000Z | 2021-12-10T05:54:16.000Z | polrev/areas/widgets/congressional_district_widgets.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | null | null | null | polrev/areas/widgets/congressional_district_widgets.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | null | null | null | from django.utils.translation import gettext_lazy as _
from generic_chooser.widgets import AdminChooser, LinkedFieldMixin
from areas.models import CongressionalDistrict
class CongressionalDistrictChooser(LinkedFieldMixin, AdminChooser):
#icon = 'user'
model = CongressionalDistrict
page_title = _("Choose ... | 36.363636 | 67 | 0.8175 | from django.utils.translation import gettext_lazy as _
from generic_chooser.widgets import AdminChooser, LinkedFieldMixin
from areas.models import CongressionalDistrict
class CongressionalDistrictChooser(LinkedFieldMixin, AdminChooser):
model = CongressionalDistrict
page_title = _("Choose a district")
... | true | true |
7908a6550b0c0adbf7a047f819a435542bde8f9f | 6,642 | py | Python | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 9 | 2020-03-17T10:38:28.000Z | 2022-03-10T20:05:11.000Z | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | null | null | null | acore/classifier_power_multid_truth.py | zhao-david/ACORE-LFI | 91de88b77f0be110e42ed91bbb7a50b7ca83319a | [
"MIT"
] | 1 | 2020-10-15T19:44:12.000Z | 2020-10-15T19:44:12.000Z | from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
import numpy as np
import argparse
import pandas as pd
from tqdm.auto import tqdm
from datetime import datetime
import seaborn as sns
import matplotlib.pyplot as plt
from utils.functions import compute_exact_tau, compute_exact_tau... | 47.784173 | 119 | 0.647094 | from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
import numpy as np
import argparse
import pandas as pd
from tqdm.auto import tqdm
from datetime import datetime
import seaborn as sns
import matplotlib.pyplot as plt
from utils.functions import compute_exact_tau, compute_exact_tau... | true | true |
7908a673912cd234d35fbc0b6329a275be8f4d08 | 1,235 | py | Python | setup.py | nbari/zunzuncito | 5cd24b4f39f2ca76eeacdeae0bde99f65e2eac8e | [
"BSD-3-Clause"
] | 2 | 2020-01-18T15:49:07.000Z | 2020-01-18T16:01:12.000Z | setup.py | nbari/zunzuncito | 5cd24b4f39f2ca76eeacdeae0bde99f65e2eac8e | [
"BSD-3-Clause"
] | null | null | null | setup.py | nbari/zunzuncito | 5cd24b4f39f2ca76eeacdeae0bde99f65e2eac8e | [
"BSD-3-Clause"
] | null | null | null | import imp
from os import path
from setuptools import setup
VERSION = imp.load_source(
'version',
path.join('.',
'zunzuncito',
'version.py'))
VERSION = VERSION.__version__
readme = open('README.rst', 'r')
setup(
name='zunzuncito',
version=VERSION,
author='Nicolas Embr... | 29.404762 | 78 | 0.622672 | import imp
from os import path
from setuptools import setup
VERSION = imp.load_source(
'version',
path.join('.',
'zunzuncito',
'version.py'))
VERSION = VERSION.__version__
readme = open('README.rst', 'r')
setup(
name='zunzuncito',
version=VERSION,
author='Nicolas Embr... | true | true |
7908a785d7acb0b0445712820c06ae8719506e8a | 1,912 | py | Python | L1Trigger/RegionalCaloTrigger/test/rctInputTest_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/RegionalCaloTrigger/test/rctInputTest_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/RegionalCaloTrigger/test/rctInputTest_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | # The following comments couldn't be translated into the new config version:
# untracked PSet maxEvents = {untracked int32 input = 2}
#include "Configuration/ReleaseValidation/data/Services.cff"
# include "Configuration/StandardSequences/data/FakeConditions.cff"
# untracked PSet options = {
# include "FWC... | 32.965517 | 89 | 0.789749 |
# untracked PSet maxEvents = {untracked int32 input = 2}
#include "Configuration/ReleaseValidation/data/Services.cff"
# include "Configuration/StandardSequences/data/FakeConditions.cff"
# untracked PSet options = {
# include "FWCore/Framework/test/cmsExceptionsFatalOption.cff"
# untracked bool mak... | true | true |
7908a85796979a0f88ff5fe3ea6e8f74ab606d4a | 12,874 | py | Python | tensorflow_datasets/audio/nsynth.py | kmh4321/datasets | 286d7a8a5eb3e073f18f8fee4f774bafc23fb445 | [
"Apache-2.0"
] | 14 | 2019-03-30T02:11:29.000Z | 2021-11-16T12:06:32.000Z | tensorflow_datasets/audio/nsynth.py | kmh4321/datasets | 286d7a8a5eb3e073f18f8fee4f774bafc23fb445 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/audio/nsynth.py | kmh4321/datasets | 286d7a8a5eb3e073f18f8fee4f774bafc23fb445 | [
"Apache-2.0"
] | 10 | 2019-03-31T08:35:29.000Z | 2021-09-01T06:28:43.000Z | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | 36.573864 | 139 | 0.645332 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import os
import numpy as np
import tensorflow as tf
import tensorflow_datasets.public_api as tfds
_DESCRIPTION = """\
The NSynth Dataset is an audio dataset containing ~300k musica... | true | true |
7908a929017732d32e10da50f0c1cf6c5e398a86 | 392 | py | Python | Module 2/Chapter 4/Chapter 4/probe_req.py | kongjiexi/Python-Penetration-Testing-for-Developers | 8cfecc3e968e7b063b4f4053dd4e05ea281e81be | [
"MIT"
] | 34 | 2016-11-16T15:37:47.000Z | 2022-01-15T06:19:27.000Z | Module 2/Chapter 4/Chapter 4/probe_req.py | kongjiexi/Python-Penetration-Testing-for-Developers-Code | 8cfecc3e968e7b063b4f4053dd4e05ea281e81be | [
"MIT"
] | null | null | null | Module 2/Chapter 4/Chapter 4/probe_req.py | kongjiexi/Python-Penetration-Testing-for-Developers-Code | 8cfecc3e968e7b063b4f4053dd4e05ea281e81be | [
"MIT"
] | 35 | 2016-10-30T10:13:04.000Z | 2022-03-26T21:36:49.000Z | from scapy.all import *
interface ='mon0'
probe_req = []
ap_name = raw_input("Please enter the AP name ")
def probesniff(fm):
if fm.haslayer(Dot11ProbeReq):
client_name = fm.info
if client_name == ap_name :
if fm.addr2 not in probe_req:
print "New Probe Request: ", client_name
print "MAC ", fm.addr2
... | 26.133333 | 48 | 0.704082 | from scapy.all import *
interface ='mon0'
probe_req = []
ap_name = raw_input("Please enter the AP name ")
def probesniff(fm):
if fm.haslayer(Dot11ProbeReq):
client_name = fm.info
if client_name == ap_name :
if fm.addr2 not in probe_req:
print "New Probe Request: ", client_name
print "MAC ", fm.addr2
... | false | true |
7908a996941ee66bcb318dac42d7d598b81247e9 | 1,311 | py | Python | build_definitions/openldap.py | d-uspenskiy/yugabyte-db-thirdparty | 1cd96069797c6ae4a680fc75806c31f3411c4dab | [
"CC-BY-3.0"
] | null | null | null | build_definitions/openldap.py | d-uspenskiy/yugabyte-db-thirdparty | 1cd96069797c6ae4a680fc75806c31f3411c4dab | [
"CC-BY-3.0"
] | null | null | null | build_definitions/openldap.py | d-uspenskiy/yugabyte-db-thirdparty | 1cd96069797c6ae4a680fc75806c31f3411c4dab | [
"CC-BY-3.0"
] | null | null | null | #
# Copyright (c) YugaByte, 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 writing, so... | 35.432432 | 99 | 0.694889 |
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from build_definitions import *
class OpenLDAPDependency(Dependency):
def __init__(self):
super(OpenLDAPDependency, self).__init__(
'openldap',
'2_4_54',
... | true | true |
7908a9f23999ebd26148d524c16c927e4a8bf221 | 391 | py | Python | setup.py | VisionSystemsInc/terra | a5312f38d5927683b42f2f659174d188db567249 | [
"MIT"
] | null | null | null | setup.py | VisionSystemsInc/terra | a5312f38d5927683b42f2f659174d188db567249 | [
"MIT"
] | 38 | 2019-10-17T18:47:56.000Z | 2021-12-07T16:17:44.000Z | setup.py | VisionSystemsInc/terra | a5312f38d5927683b42f2f659174d188db567249 | [
"MIT"
] | 2 | 2019-10-08T22:00:50.000Z | 2019-10-23T18:59:24.000Z | from distutils.core import setup
extra_requires = {
'celery': ["celery[redis]"],
'flower': ["flower"]
}
setup(name="terra",
packages=["terra"],
description="Terra",
extra_requires=extra_requires,
install_requires=[
"pyyaml",
"jstyleson",
# I use signal and task from... | 19.55 | 59 | 0.578005 | from distutils.core import setup
extra_requires = {
'celery': ["celery[redis]"],
'flower': ["flower"]
}
setup(name="terra",
packages=["terra"],
description="Terra",
extra_requires=extra_requires,
install_requires=[
"pyyaml",
"jstyleson",
"celery",
"... | true | true |
7908aa62796accdf12f544b8ee7c009158c78b66 | 3,878 | py | Python | mysite/guestbook/guestbook.py | wcl6005/testgit | d747a73eb4a6c4e3594f453f35d7b22f73985482 | [
"Apache-2.0"
] | null | null | null | mysite/guestbook/guestbook.py | wcl6005/testgit | d747a73eb4a6c4e3594f453f35d7b22f73985482 | [
"Apache-2.0"
] | null | null | null | mysite/guestbook/guestbook.py | wcl6005/testgit | d747a73eb4a6c4e3594f453f35d7b22f73985482 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 留言板
# 1、新建目录下一定要有__init__.py文件,否则不能被其它文件引用、不能沿路径读写文件。from ... 。
# 2、urls.py中,设置第一级路由名ask。 在.../mysite/mysite/urls.py中 url(r'^ask/', include('account.ask.urls')),
# 3、admin.py中,设置数据库显示。在.../mysite/account/admin.py中 @admin.register(Technologyask) ...
# 4、templates中,增加模板文件目录/ask
import datetime... | 43.088889 | 114 | 0.690304 |
import datetime
import os
import json
from django.shortcuts import render
from django.http.response import HttpResponseRedirect,HttpResponse
from . models import Guestbook,Reply
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from myAPI.pageAPI import djang... | true | true |
7908ab9717e321ad87ee34f4588cc083f1bd359b | 12,701 | py | Python | server/src/experiments/ud_xilinx/watertank_simulation.py | romainrossi/weblabdeusto | 494f1cd291d03dcf1d2e8f3e36d3dbe2348b167f | [
"BSD-2-Clause"
] | 15 | 2015-03-12T12:15:41.000Z | 2021-12-20T17:53:24.000Z | server/src/experiments/ud_xilinx/watertank_simulation.py | romainrossi/weblabdeusto | 494f1cd291d03dcf1d2e8f3e36d3dbe2348b167f | [
"BSD-2-Clause"
] | 44 | 2015-01-07T09:22:05.000Z | 2017-01-31T22:44:21.000Z | server/src/experiments/ud_xilinx/watertank_simulation.py | romainrossi/weblabdeusto | 494f1cd291d03dcf1d2e8f3e36d3dbe2348b167f | [
"BSD-2-Clause"
] | 22 | 2015-01-13T13:55:48.000Z | 2021-12-16T17:07:00.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# list... | 34.988981 | 123 | 0.596016 |
import threading
import time
import json
class Watertank(object):
def __init__(self, tank_capacity, inputs, outputs, water_level):
self.initialize(tank_capacity, inputs, outputs, water_level)
def initialize(self, tank_capacity, inputs, outputs, water_level):
self.tank_capacit... | true | true |
7908ab996e67d75b3c62fc83428b21438d8c51b3 | 21,609 | py | Python | src/pip/_internal/index/collector.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | null | null | null | src/pip/_internal/index/collector.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | 1 | 2021-10-04T12:25:25.000Z | 2021-10-05T07:30:54.000Z | src/pip/_internal/index/collector.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | 1 | 2020-06-01T19:13:16.000Z | 2020-06-01T19:13:16.000Z | """
The main purpose of this module is to expose LinkCollector.collect_links().
"""
import cgi
import functools
import itertools
import logging
import mimetypes
import os
import re
from collections import OrderedDict
from pip._vendor import html5lib, requests
from pip._vendor.distlib.compat import unescape
from pip._... | 32.59276 | 79 | 0.630941 |
import cgi
import functools
import itertools
import logging
import mimetypes
import os
import re
from collections import OrderedDict
from pip._vendor import html5lib, requests
from pip._vendor.distlib.compat import unescape
from pip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
from pip._vendor.s... | true | true |
7908acbd34bf9d70ea1f3bd2c829d2b691ffd526 | 3,289 | py | Python | catwalk/cicd/build_steps.py | LeapBeyond/catwalk | 49bafe146112b519653ff3417a0974afaec124a2 | [
"Apache-2.0"
] | 1 | 2020-09-11T01:16:11.000Z | 2020-09-11T01:16:11.000Z | catwalk/cicd/build_steps.py | LeapBeyond/catwalk | 49bafe146112b519653ff3417a0974afaec124a2 | [
"Apache-2.0"
] | 6 | 2020-05-14T11:15:13.000Z | 2021-07-14T15:49:20.000Z | catwalk/cicd/build_steps.py | LeapBeyond/catwalk | 49bafe146112b519653ff3417a0974afaec124a2 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#
# Copyright 2019 Leap Beyond Emerging Technologies B.V. (unless otherwise stated)
#
# 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... | 31.932039 | 95 | 0.652174 | true | true | |
7908ace045f6e0a0f8aecd2c5983686e5a9e79ba | 2,869 | py | Python | trab2/probOneR.py | RafaelPedruzzi/IA-2019-2 | 7d99a8f02ec826403bd48c6eba574d802e558c36 | [
"MIT"
] | null | null | null | trab2/probOneR.py | RafaelPedruzzi/IA-2019-2 | 7d99a8f02ec826403bd48c6eba574d802e558c36 | [
"MIT"
] | null | null | null | trab2/probOneR.py | RafaelPedruzzi/IA-2019-2 | 7d99a8f02ec826403bd48c6eba574d802e558c36 | [
"MIT"
] | null | null | null | ## -------------------------------------------------------- ##
# Trab 2 IA 2019-2
#
# Rafael Belmock Pedruzzi
#
# probOneR.py: implementation of the probabilistic OneR classifier.
#
# Python version: 3.7.4
## -------------------------------------------------------- ##
import numpy as np
from sklearn.base impor... | 30.521277 | 107 | 0.606832 | X_y, check_array, check_is_fitted
from sklearn.utils.multiclass import unique_labels
from sklearn.metrics import euclidean_distances
from sklearn.preprocessing import KBinsDiscretizer
from sklearn.metrics.cluster import contingency_matrix
from sklearn.metrics import confusion_matrix
from itertools import product, zip_l... | true | true |
7908ad23e68529ddbb7cb39f7a16a4e6ec525a17 | 1,301 | py | Python | var/spack/repos/builtin/packages/volk/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/volk/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/volk/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Volk(CMakePackage):
"""VOLK is the Vector-Optimized Library of Kernels. It is a
library that contains kerne... | 41.967742 | 95 | 0.734051 |
class Volk(CMakePackage):
homepage = "https://github.com/gnuradio/volk"
url = "https://github.com/gnuradio/volk/archive/v2.3.0.tar.gz"
maintainers = ['aweits']
version('2.3.0', sha256='f42c928f561b128acfe4adb21227e4a62a3f6ab8103592fc3233765ff326d5fc')
depends_on('python@3.4:', type=('... | true | true |
7908ad6d7302df6f93d2d5efba7ad9338cdd8e22 | 1,344 | py | Python | lecture3/bootcamp3/script.py | wendazhou/cds-bootcamp | d3289cf56fc47759afe5bac091f446e9b60037ce | [
"MIT"
] | 6 | 2021-09-02T18:36:11.000Z | 2021-09-24T19:56:38.000Z | lecture3/bootcamp3/script.py | wendazhou/cds-bootcamp | d3289cf56fc47759afe5bac091f446e9b60037ce | [
"MIT"
] | null | null | null | lecture3/bootcamp3/script.py | wendazhou/cds-bootcamp | d3289cf56fc47759afe5bac091f446e9b60037ce | [
"MIT"
] | 8 | 2021-09-02T23:46:30.000Z | 2021-09-27T09:54:48.000Z | import dataclasses
import os
from typing import List
import hydra
@dataclasses.dataclass
class ModelConfig:
"""Configuration for the model.
Note that `block_sizes` must be specified using the `dataclasses.field`
function, as you are not allowed to supply default values for mutable fields.
Instead, t... | 28.595745 | 84 | 0.72247 | import dataclasses
import os
from typing import List
import hydra
@dataclasses.dataclass
class ModelConfig:
architecture: str = 'lenet'
hidden_size: int = 20
block_sizes: List[int] = dataclasses.field(default_factory=lambda: [10, 10, 10])
@dataclasses.dataclass
class TrainingConfig:
model: ModelCon... | true | true |
7908ae400c8e9322b407af8a00b4200db700094f | 3,328 | py | Python | antipetros_discordbot/utility/gidsql/db_action_base.py | official-antistasi-community/Antipetros_Discord_Bot | 1b5c8b61c09e61cdff671e259f0478d343a50c8d | [
"MIT"
] | null | null | null | antipetros_discordbot/utility/gidsql/db_action_base.py | official-antistasi-community/Antipetros_Discord_Bot | 1b5c8b61c09e61cdff671e259f0478d343a50c8d | [
"MIT"
] | null | null | null | antipetros_discordbot/utility/gidsql/db_action_base.py | official-antistasi-community/Antipetros_Discord_Bot | 1b5c8b61c09e61cdff671e259f0478d343a50c8d | [
"MIT"
] | 1 | 2021-02-12T01:10:51.000Z | 2021-02-12T01:10:51.000Z | # region [Imports]
# * Standard Library Imports ---------------------------------------------------------------------------->
import os
import logging
import sqlite3 as sqlite
from pprint import pformat
# * Gid Imports ----------------------------------------------------------------------------------------->
import g... | 26.624 | 106 | 0.578425 |
import os
import logging
import sqlite3 as sqlite
from pprint import pformat
import gidlogger as glog
__updated__ = '2020-11-26 17:04:37'
log = logging.getLogger('gidsql')
glog.import_notification(log, __name__)
class GidSqliteActionBase:
def __init__(self, in_db_loc, in_pragmas=None):
... | true | true |
7908ae9467417ce8d704aefc099c2686a5ebe876 | 6,332 | py | Python | nnunet/training/network_training/nnUNet_variants/architectural_variants/nnUNetTrainerV2_ResencUNet.py | Jiawei-Yang/TumorCP | 6053c75642fcbc0fb0424320ab3d758f24883b0e | [
"Apache-2.0"
] | 12 | 2021-07-22T15:08:13.000Z | 2022-03-10T08:15:56.000Z | nnunet/training/network_training/nnUNet_variants/architectural_variants/nnUNetTrainerV2_ResencUNet.py | Jiawei-Yang/TumorCP | 6053c75642fcbc0fb0424320ab3d758f24883b0e | [
"Apache-2.0"
] | 1 | 2022-03-07T13:21:42.000Z | 2022-03-07T13:21:42.000Z | nnunet/training/network_training/nnUNet_variants/architectural_variants/nnUNetTrainerV2_ResencUNet.py | Jiawei-Yang/TumorCP | 6053c75642fcbc0fb0424320ab3d758f24883b0e | [
"Apache-2.0"
] | 3 | 2021-11-26T06:26:24.000Z | 2022-02-14T01:23:44.000Z | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 59.735849 | 134 | 0.609128 |
from typing import Tuple
import numpy as np
import torch
from nnunet.network_architecture.generic_modular_residual_UNet import FabiansUNet, get_default_network_config
from nnunet.network_architecture.initialization import InitWeights_He
from nnunet.training.network_training.nnUNetTrainer import nnUNetTrai... | true | true |
7908af2d88b02dcacbcf31e7a2ec4c34bc3b05fd | 1,733 | py | Python | 1614 Maximum Nesting Depth of the Parentheses.py | AtharvRedij/leetcode-solutions | 7194d202302989d53c241b12c9befb06923b1510 | [
"MIT"
] | null | null | null | 1614 Maximum Nesting Depth of the Parentheses.py | AtharvRedij/leetcode-solutions | 7194d202302989d53c241b12c9befb06923b1510 | [
"MIT"
] | null | null | null | 1614 Maximum Nesting Depth of the Parentheses.py | AtharvRedij/leetcode-solutions | 7194d202302989d53c241b12c9befb06923b1510 | [
"MIT"
] | 1 | 2021-03-06T06:15:48.000Z | 2021-03-06T06:15:48.000Z | '''
URL: https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/
Difficulty: Easy
Description: Maximum Nesting Depth of the Parentheses
A string is a valid parentheses string (denoted VPS) if it meets one of the following:
It is an empty string "", or a single character not equal to "(" or ")",
It c... | 25.115942 | 118 | 0.58569 |
class Solution:
def maxDepth(self, s):
maxD = -float('inf')
currD = 0
for ch in s:
if ch not in ["(", ")"]:
continue
if ch == "(":
currD += 1
else:
maxD = max(maxD, currD)
currD -= 1
... | true | true |
7908af463e548ffa8196ab21addce3f67eb3bfdb | 2,105 | py | Python | examples/slack/query.py | q0w/snug | a9de335b48d96190a2bfe5e606830c4a60cb5705 | [
"MIT"
] | 123 | 2018-01-23T17:29:29.000Z | 2022-02-11T06:57:57.000Z | examples/slack/query.py | q0w/snug | a9de335b48d96190a2bfe5e606830c4a60cb5705 | [
"MIT"
] | 274 | 2018-01-25T07:17:55.000Z | 2022-01-20T07:37:10.000Z | examples/slack/query.py | q0w/snug | a9de335b48d96190a2bfe5e606830c4a60cb5705 | [
"MIT"
] | 5 | 2017-11-26T21:31:12.000Z | 2021-11-28T10:19:57.000Z | """common logic for all queries"""
import json
from functools import partial, singledispatch
from operator import itemgetter
import snug
from gentools import (compose, map_yield, map_send, oneyield, reusable,
map_return)
from .load import registry
API_URL = 'https://slack.com/api/'
class ApiE... | 26.987179 | 71 | 0.663183 | import json
from functools import partial, singledispatch
from operator import itemgetter
import snug
from gentools import (compose, map_yield, map_send, oneyield, reusable,
map_return)
from .load import registry
API_URL = 'https://slack.com/api/'
class ApiError(Exception):
pass
def _pa... | true | true |
7908afa6a715b32c06a856b1922c85e7ed8995bb | 2,774 | py | Python | test/test_neopixel.py | fovallesp/esp32-python | 95f7377e575618d1638caa2e041b5fb715d7ae90 | [
"MIT"
] | 53 | 2019-08-24T14:04:21.000Z | 2022-01-16T11:00:58.000Z | test/test_neopixel.py | fovallesp/esp32-python | 95f7377e575618d1638caa2e041b5fb715d7ae90 | [
"MIT"
] | 1 | 2020-03-28T12:03:42.000Z | 2020-12-12T08:26:42.000Z | test/test_neopixel.py | fovallesp/esp32-python | 95f7377e575618d1638caa2e041b5fb715d7ae90 | [
"MIT"
] | 8 | 2019-11-08T09:15:02.000Z | 2022-01-14T20:27:48.000Z | import time
import neopixel
from resetMachine import *
@pytest.fixture()
def tenPixelStrand():
pin = machine.Pin(5)
return neopixel.NeoPixel(pin, n=10)
black = (0, 0, 0)
red = (255, 0, 0)
green = (0, 255, 0)
class TestNeoPixel:
pin = machine.Pin(5)
def test_canSetPixelColor(self, resetMachine, t... | 29.827957 | 78 | 0.658616 | import time
import neopixel
from resetMachine import *
@pytest.fixture()
def tenPixelStrand():
pin = machine.Pin(5)
return neopixel.NeoPixel(pin, n=10)
black = (0, 0, 0)
red = (255, 0, 0)
green = (0, 255, 0)
class TestNeoPixel:
pin = machine.Pin(5)
def test_canSetPixelColor(self, resetMachine, t... | true | true |
7908b019cd0b882a4564f6bbc9a04bd6d1644d17 | 865 | py | Python | setup/nvidia/nvml-test.py | forwardmeasure/kubeflow | 7cfa52569c15f1716ce1dadb4352bdee9c9463a5 | [
"MIT"
] | null | null | null | setup/nvidia/nvml-test.py | forwardmeasure/kubeflow | 7cfa52569c15f1716ce1dadb4352bdee9c9463a5 | [
"MIT"
] | null | null | null | setup/nvidia/nvml-test.py | forwardmeasure/kubeflow | 7cfa52569c15f1716ce1dadb4352bdee9c9463a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pip install nvidia-ml-py3 --user
import pynvml
try:
pynvml.nvmlInit()
except pynvml.NVMLError as error:
print(error)
# Driver Not Loaded 驱动加载失败(没装驱动或者驱动有问题)
# Insufficent Permission 没有以管理员权限运行 pynvml.NVMLError_DriverNotLoaded: Driver Not Loaded
... | 25.441176 | 92 | 0.746821 |
import pynvml
try:
pynvml.nvmlInit()
except pynvml.NVMLError as error:
print(error)
exit()
try:
print(pynvml.nvmlDeviceGetCount())
except pynvml.NVMLError as error:
print(error)
print(pynvml.nvmlDeviceGetCount())
print(pynvml.nvmlSystemGetDriverVersion())
GPU_ID = 0
handle = pynv... | true | true |
7908b0333fbc448eeab2aadb5dfc1e4dfccde4d4 | 16,823 | py | Python | django/contrib/admin/templatetags/admin_list.py | vpoulailleau/django | 02365d3f38a64a5c2f3e932f23925a381d5bb151 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/contrib/admin/templatetags/admin_list.py | vpoulailleau/django | 02365d3f38a64a5c2f3e932f23925a381d5bb151 | [
"PSF-2.0",
"BSD-3-Clause"
] | 11 | 2020-03-24T15:46:05.000Z | 2022-03-11T23:20:58.000Z | django/contrib/admin/templatetags/admin_list.py | vpoulailleau/django | 02365d3f38a64a5c2f3e932f23925a381d5bb151 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import datetime
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field, display_for_value, label_for_field, lookup_field,
)
from django.contrib.admin.views.main import (
ALL_VAR, ORDER_VAR, PAGE_VAR, SEARCH_VAR,
)
from django.co... | 38.496568 | 110 | 0.569875 | import datetime
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field, display_for_value, label_for_field, lookup_field,
)
from django.contrib.admin.views.main import (
ALL_VAR, ORDER_VAR, PAGE_VAR, SEARCH_VAR,
)
from django.co... | true | true |
7908b03619f96fddb6b69d3f8632e4174da1158f | 3,927 | py | Python | ganjoor/spiders/hojviri/kashfol-mahjoob/scrapyshkmbab39.py | amirmasoud/ganjoor-crawler | a86fe379955ce854765086ab7ba0a78513d052bd | [
"MIT"
] | null | null | null | ganjoor/spiders/hojviri/kashfol-mahjoob/scrapyshkmbab39.py | amirmasoud/ganjoor-crawler | a86fe379955ce854765086ab7ba0a78513d052bd | [
"MIT"
] | null | null | null | ganjoor/spiders/hojviri/kashfol-mahjoob/scrapyshkmbab39.py | amirmasoud/ganjoor-crawler | a86fe379955ce854765086ab7ba0a78513d052bd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
class scrapyshkmbab39Spider(scrapy.Spider):
name = "scrapyshkmbab39"
allowed_domains = ["ganjoor.net"]
if 1 == 1:
start_urls = ["https://ganjoor.net/hojviri/kashfol-mahjoob/kmbab39/sh"]
else:
start_urls = ["https://ganjoor.net/hojviri/kashfol-mahjoo... | 59.5 | 215 | 0.466514 |
import scrapy
class scrapyshkmbab39Spider(scrapy.Spider):
name = "scrapyshkmbab39"
allowed_domains = ["ganjoor.net"]
if 1 == 1:
start_urls = ["https://ganjoor.net/hojviri/kashfol-mahjoob/kmbab39/sh"]
else:
start_urls = ["https://ganjoor.net/hojviri/kashfol-mahjoob/kmbab39/sh" + "1"]
... | true | true |
7908b0bf375437c6d5f508a3ec2a505cbe0e3908 | 17,094 | py | Python | chip/mchp/util/pack_ec.py | coreboot/chrome-ec | 61044db105bc854167efe83815acb3fcb55deb85 | [
"BSD-3-Clause"
] | 46 | 2017-02-12T20:48:45.000Z | 2022-03-01T15:53:39.000Z | chip/mchp/util/pack_ec.py | coreboot/chrome-ec | 61044db105bc854167efe83815acb3fcb55deb85 | [
"BSD-3-Clause"
] | 1 | 2022-01-08T23:28:01.000Z | 2022-01-09T00:43:16.000Z | chip/mchp/util/pack_ec.py | coreboot/chrome-ec | 61044db105bc854167efe83815acb3fcb55deb85 | [
"BSD-3-Clause"
] | 46 | 2016-02-07T18:43:27.000Z | 2022-01-03T02:30:51.000Z | #!/usr/bin/env python3
# Copyright 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
# pylint: disable=bad-indentation,docstring-section-... | 31.832402 | 103 | 0.663449 |
import argparse
import hashlib
import os
import struct
import subprocess
import tempfile
import zlib
LFW_SIZE = 0x1000
LOAD_ADDR = 0x0E0000
LOAD_ADDR_RW = 0xE1000
HEADER_SIZE = 0x40
SPI_CLOCK_LIST = [48, 24, 16, 12]
SPI_READ_CMD_LIST = [0x3, 0xb, 0x3b, 0x6b]
CRC_TABLE = [0x00, 0x07, 0x0e, 0x09, 0x... | true | true |
7908b0ee2182802ddd9ac057999a6f20f2de2801 | 4,652 | py | Python | Secao7_ColecoesPython/Conjutos.py | PauloFTeixeira/curso_python | 9040c7dcc5262620f6330bb9637710bb8899bc6b | [
"MIT"
] | null | null | null | Secao7_ColecoesPython/Conjutos.py | PauloFTeixeira/curso_python | 9040c7dcc5262620f6330bb9637710bb8899bc6b | [
"MIT"
] | null | null | null | Secao7_ColecoesPython/Conjutos.py | PauloFTeixeira/curso_python | 9040c7dcc5262620f6330bb9637710bb8899bc6b | [
"MIT"
] | null | null | null | """
Conjuntos são chamados de set's
- Set não possui duplicidade
- Set não possui valor ordenado
- Não são acessados via indice, ou seja, não são indexados
Bons para armazenar elementos são ordenação, sem se preocupar com chaves, valores e itens duplicados.
Set's são referenciados por {}
Diferença de set e dict
- Dic... | 31.863014 | 117 | 0.479364 | true | true | |
7908b1c81568977039d30ef691044a3d153df351 | 10,516 | py | Python | akanda/horizon/api/neutron_extensions_client.py | dreamhost/akanda-horizon | c2a3771f620245d31e7c84ba38bbf440f5161fb6 | [
"Apache-2.0"
] | 1 | 2015-02-23T16:59:55.000Z | 2015-02-23T16:59:55.000Z | akanda/horizon/api/neutron_extensions_client.py | dreamhost/akanda-horizon | c2a3771f620245d31e7c84ba38bbf440f5161fb6 | [
"Apache-2.0"
] | null | null | null | akanda/horizon/api/neutron_extensions_client.py | dreamhost/akanda-horizon | c2a3771f620245d31e7c84ba38bbf440f5161fb6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 DreamHost, 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... | 29.790368 | 77 | 0.641308 |
import logging
from openstack_dashboard.api import nova
from openstack_dashboard.api import neutron
from openstack_dashboard.api.neutron import neutronclient
from neutronclient.common.exceptions import PortNotFoundClient
from akanda.horizon.common import (
NEW_PROTOCOL_CHOICES_DICT, POLICY_CHOI... | true | true |
7908b4873b7bca07cf5be458f286da8312e2397c | 4,083 | py | Python | tests/test_json.py | NextChance/redbeat | 847b69fdfed0bd19a2a9b9a55c71dc0aa83ae7ea | [
"Apache-2.0"
] | null | null | null | tests/test_json.py | NextChance/redbeat | 847b69fdfed0bd19a2a9b9a55c71dc0aa83ae7ea | [
"Apache-2.0"
] | null | null | null | tests/test_json.py | NextChance/redbeat | 847b69fdfed0bd19a2a9b9a55c71dc0aa83ae7ea | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import json
from unittest import TestCase
from celery.schedules import schedule, crontab
try: # celery 3.x
from celery.utils.timeutils import timezone
except ImportError: # celery 4.x
from celery.utils.time import timezone
from redbeat.decoder import RedBeatJSONDecoder, RedBeat... | 26.006369 | 104 | 0.546657 | from datetime import datetime
import json
from unittest import TestCase
from celery.schedules import schedule, crontab
try:
from celery.utils.timeutils import timezone
except ImportError:
from celery.utils.time import timezone
from redbeat.decoder import RedBeatJSONDecoder, RedBeatJSONEncoder
from redbeat... | true | true |
7908b561a7b7a380037443834aedfc664f8a7a7c | 2,969 | py | Python | src/firebaseops.py | txsmith/p1-sensor | 6d9ae0a5d8f0e17a720781c4594453ccd848df30 | [
"MIT"
] | null | null | null | src/firebaseops.py | txsmith/p1-sensor | 6d9ae0a5d8f0e17a720781c4594453ccd848df30 | [
"MIT"
] | null | null | null | src/firebaseops.py | txsmith/p1-sensor | 6d9ae0a5d8f0e17a720781c4594453ccd848df30 | [
"MIT"
] | null | null | null |
import logging
import pyrebase
from requests.exceptions import HTTPError
class Node:
def __init__(self, nodeName):
self._nodeName = nodeName
self._next = None
def child(self, nodeName):
if self._next == None:
self._next = Node(nodeName)
else:
self._nex... | 24.336066 | 74 | 0.584035 |
import logging
import pyrebase
from requests.exceptions import HTTPError
class Node:
def __init__(self, nodeName):
self._nodeName = nodeName
self._next = None
def child(self, nodeName):
if self._next == None:
self._next = Node(nodeName)
else:
self._nex... | true | true |
7908b5ecc794b157f3dbd63b63ab3a5f1b181d73 | 29,531 | py | Python | discord/utils.py | b4skyx/enhanced-discord.py | 75a23351c4a484a3511c0b653965d229aa26833c | [
"MIT"
] | 1,126 | 2021-08-28T12:09:26.000Z | 2022-03-31T16:37:54.000Z | discord/utils.py | b4skyx/enhanced-discord.py | 75a23351c4a484a3511c0b653965d229aa26833c | [
"MIT"
] | 89 | 2021-08-28T14:46:11.000Z | 2022-03-04T11:19:11.000Z | discord/utils.py | b4skyx/enhanced-discord.py | 75a23351c4a484a3511c0b653965d229aa26833c | [
"MIT"
] | 111 | 2021-08-28T02:04:22.000Z | 2022-03-05T17:48:31.000Z | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merg... | 28.867058 | 118 | 0.61085 | from __future__ import annotations
import array
import asyncio
import collections.abc
from typing import (
Any,
AsyncIterator,
Callable,
Dict,
ForwardRef,
Generic,
Iterable,
Iterator,
List,
Literal,
Mapping,
Optional,
Protocol,
Sequence,
Tuple,
Type,
... | true | true |
7908b605ad945b6b9a393ebe29c3f6c6c4c027fc | 12,833 | py | Python | Community/AssetManagement/lumeta_workflow_page.py | npatellumeta/gateway-workflows | c0800181aaece295e734e151c457ce5d7245ca6f | [
"Apache-2.0"
] | null | null | null | Community/AssetManagement/lumeta_workflow_page.py | npatellumeta/gateway-workflows | c0800181aaece295e734e151c457ce5d7245ca6f | [
"Apache-2.0"
] | null | null | null | Community/AssetManagement/lumeta_workflow_page.py | npatellumeta/gateway-workflows | c0800181aaece295e734e151c457ce5d7245ca6f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 BlueCat Networks. All rights reserved.
import ipaddress
from flask import request, g, abort, jsonify
from bluecat.api_exception import PortalException, APIException
from bluecat import route, util
from main_app import app
# application config
# Define global variable to hold handle to API object
api... | 41.13141 | 129 | 0.623003 |
import ipaddress
from flask import request, g, abort, jsonify
from bluecat.api_exception import PortalException, APIException
from bluecat import route, util
from main_app import app
api = None
@route(app, '/lumeta/getnetworklist', methods=['GET', 'PUT', 'POST'])
@util.rest_workflow_permission_required('lumet... | true | true |
7908b660b7e7a7290576ce10a318d7140ce3f0d3 | 1,849 | py | Python | pypbbot/affairs/builtin.py | PHIKN1GHT/pypbbot_archived | 8ab70830509c43b0babc53c9972d0a73481bdaa2 | [
"MIT"
] | null | null | null | pypbbot/affairs/builtin.py | PHIKN1GHT/pypbbot_archived | 8ab70830509c43b0babc53c9972d0a73481bdaa2 | [
"MIT"
] | null | null | null | pypbbot/affairs/builtin.py | PHIKN1GHT/pypbbot_archived | 8ab70830509c43b0babc53c9972d0a73481bdaa2 | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing
if typing.TYPE_CHECKING:
from typing import Optional, Union, Any, Dict
from pypbbot.driver import AffairDriver
from pypbbot.typing import Event
from pypbbot.utils import Clips
from pypbbot.protocol import GroupMessageEvent, PrivateMessageEvent
from ... | 31.87931 | 123 | 0.685776 | from __future__ import annotations
import typing
if typing.TYPE_CHECKING:
from typing import Optional, Union, Any, Dict
from pypbbot.driver import AffairDriver
from pypbbot.typing import Event
from pypbbot.utils import Clips
from pypbbot.protocol import GroupMessageEvent, PrivateMessageEvent
from ... | true | true |
7908b6624e084b51ff962a274290a758fa4a1469 | 18,069 | py | Python | odoo-13.0/addons/account/tests/account_test_savepoint.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account/tests/account_test_savepoint.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/account/tests/account_test_savepoint.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import fields
from odoo.tests.common import Form, SavepointCase
from odoo.tests import tagged
from contextlib import contextmanager
from unittest.mock import patch
import datetime
@tagged('post_install', '-at_install')
class AccountTestInvoicingCommon(SavepointCase):
@classmet... | 44.178484 | 136 | 0.532293 |
from odoo import fields
from odoo.tests.common import Form, SavepointCase
from odoo.tests import tagged
from contextlib import contextmanager
from unittest.mock import patch
import datetime
@tagged('post_install', '-at_install')
class AccountTestInvoicingCommon(SavepointCase):
@classmethod
def copy_accoun... | true | true |
7908b7c4069057a87abf6c324be528370b648b1a | 25,168 | py | Python | diofant/polys/numberfields.py | diofant/diofant | 0677d240eb5de697f851c6c844fefc8039754edc | [
"BSD-3-Clause"
] | 57 | 2016-09-13T23:16:26.000Z | 2022-03-29T06:45:51.000Z | diofant/polys/numberfields.py | diofant/diofant | 0677d240eb5de697f851c6c844fefc8039754edc | [
"BSD-3-Clause"
] | 402 | 2016-05-11T11:11:47.000Z | 2022-03-31T14:27:02.000Z | diofant/polys/numberfields.py | diofant/diofant | 0677d240eb5de697f851c6c844fefc8039754edc | [
"BSD-3-Clause"
] | 20 | 2016-05-11T08:17:37.000Z | 2021-09-10T09:15:51.000Z | """Computational algebraic field theory."""
import functools
import math
import mpmath
from ..config import query
from ..core import (Add, Dummy, E, GoldenRatio, I, Integer, Mul, Rational,
cacheit, pi)
from ..core.exprtools import Factors
from ..core.function import _mexpand, count_ops
from ..cor... | 30.618005 | 88 | 0.54458 |
import functools
import math
import mpmath
from ..config import query
from ..core import (Add, Dummy, E, GoldenRatio, I, Integer, Mul, Rational,
cacheit, pi)
from ..core.exprtools import Factors
from ..core.function import _mexpand, count_ops
from ..core.sympify import sympify
from ..domains impo... | true | true |
7908b8000df007a8b6e108b0cdc6294cd6f99470 | 1,158 | py | Python | .idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/feedback_on_exception_test_4/test.py | ariawahyuw/Coffee-Machine | eafb5943aebed35124bff8e7989b6129c6a5b906 | [
"Apache-2.0"
] | null | null | null | .idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/feedback_on_exception_test_4/test.py | ariawahyuw/Coffee-Machine | eafb5943aebed35124bff8e7989b6129c6a5b906 | [
"Apache-2.0"
] | 1 | 2022-02-10T13:32:31.000Z | 2022-02-10T13:32:31.000Z | .idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/feedback_on_exception_test_4/test.py | ariawahyuw/Coffee-Machine | eafb5943aebed35124bff8e7989b6129c6a5b906 | [
"Apache-2.0"
] | null | null | null | import unittest
import textwrap
from typing import Any, List
from hstest.check_result import CheckResult
from hstest.stage_test import StageTest
from hstest.test_case import TestCase
class FeedbackOnExceptionTest4(StageTest):
def generate(self) -> List[TestCase]:
return [
TestCase(feedback_o... | 27.571429 | 65 | 0.606218 | import unittest
import textwrap
from typing import Any, List
from hstest.check_result import CheckResult
from hstest.stage_test import StageTest
from hstest.test_case import TestCase
class FeedbackOnExceptionTest4(StageTest):
def generate(self) -> List[TestCase]:
return [
TestCase(feedback_o... | true | true |
7908b85deac4d7cb6a9b5644c1a18390db2bba6a | 4,067 | py | Python | setup.py | cglazner/pyro | f6a690e55c13cbef789d231b6c8ea71b22bd0bbb | [
"MIT"
] | 1 | 2021-06-17T13:47:40.000Z | 2021-06-17T13:47:40.000Z | setup.py | cll27/pyro | 8279d69225ecc8ff07ba65aa2a9101720c926e86 | [
"MIT"
] | null | null | null | setup.py | cll27/pyro | 8279d69225ecc8ff07ba65aa2a9101720c926e86 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import subprocess
import sys
from setuptools import find_packages, setup
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
VERSION = """
# This file is auto-generated with the version information during setup.py installation.
__versi... | 31.284615 | 99 | 0.601672 | from __future__ import absolute_import, division, print_function
import os
import subprocess
import sys
from setuptools import find_packages, setup
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
VERSION = """
# This file is auto-generated with the version information during setup.py installation.
__versi... | true | true |
7908bc71001894c0e07b02b3cbd50c62d3c4f09d | 926 | py | Python | runners/scenario_runner.py | cgeller/WorldOnRails | d8aa9f7ae67a6b7b71a2fc5ba86bb2a44f221bef | [
"MIT"
] | 108 | 2021-05-04T02:13:04.000Z | 2022-03-24T02:11:55.000Z | runners/scenario_runner.py | cgeller/WorldOnRails | d8aa9f7ae67a6b7b71a2fc5ba86bb2a44f221bef | [
"MIT"
] | 45 | 2021-05-10T13:32:51.000Z | 2022-03-23T07:23:19.000Z | runners/scenario_runner.py | cgeller/WorldOnRails | d8aa9f7ae67a6b7b71a2fc5ba86bb2a44f221bef | [
"MIT"
] | 22 | 2021-05-04T16:38:17.000Z | 2022-03-25T16:40:00.000Z | import ray
from copy import deepcopy
from leaderboard.leaderboard_evaluator import LeaderboardEvaluator
from leaderboard.utils.statistics_manager import StatisticsManager
@ray.remote(num_cpus=1./8, num_gpus=1./4, max_restarts=100, max_task_retries=-1)
class ScenarioRunner():
def __init__(self, args, scenario_class... | 34.296296 | 149 | 0.695464 | import ray
from copy import deepcopy
from leaderboard.leaderboard_evaluator import LeaderboardEvaluator
from leaderboard.utils.statistics_manager import StatisticsManager
@ray.remote(num_cpus=1./8, num_gpus=1./4, max_restarts=100, max_task_retries=-1)
class ScenarioRunner():
def __init__(self, args, scenario_class... | true | true |
7908bc8a3329f40cac7ca19d569c48fa7a4ffa38 | 18,537 | py | Python | models/official/amoeba_net/amoeba_net.py | priumoraes/tpu | c7fbe70f00956e802c23c9e831d7482613968fa7 | [
"Apache-2.0"
] | 5 | 2019-03-04T02:24:19.000Z | 2020-12-17T16:04:22.000Z | models/official/amoeba_net/amoeba_net.py | priumoraes/tpu | c7fbe70f00956e802c23c9e831d7482613968fa7 | [
"Apache-2.0"
] | 1 | 2019-08-20T04:44:50.000Z | 2019-08-20T04:44:50.000Z | models/official/amoeba_net/amoeba_net.py | priumoraes/tpu | c7fbe70f00956e802c23c9e831d7482613968fa7 | [
"Apache-2.0"
] | 2 | 2019-02-28T12:22:39.000Z | 2020-01-07T06:05:54.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.579655 | 125 | 0.710579 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import io
import itertools
import math
import os
from absl import app
from absl import flags
import absl.logging as _logging
import numpy as np
from PIL import Image
import tensorflow as tf
im... | true | true |
7908bccf46311ce8d6596059d053fe7388c9c69c | 3,880 | py | Python | research/cognitive_mapping_and_planning/datasets/factory.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | research/cognitive_mapping_and_planning/datasets/factory.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | research/cognitive_mapping_and_planning/datasets/factory.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.954955 | 91 | 0.620619 |
import os
import glob
import logging
from research.cognitive_mapping_and_planning.render import swiftshader_renderer as renderer
from research.cognitive_mapping_and_planning.src import file_utils as fu
from research.cognitive_mapping_and_planning.src import utils as utils
def get_dataset(dataset_name)... | true | true |
7908bd45052c18dbdf5a736bf51d3796cd76a240 | 3,011 | py | Python | Explosion.py | P3D-Space-Tech-Demo/Section2SpaceflightDocking | d47c18f6e53a92564130f0fa1b70d72cfb1f6229 | [
"BSD-3-Clause"
] | null | null | null | Explosion.py | P3D-Space-Tech-Demo/Section2SpaceflightDocking | d47c18f6e53a92564130f0fa1b70d72cfb1f6229 | [
"BSD-3-Clause"
] | 1 | 2021-05-19T22:50:41.000Z | 2021-06-02T03:00:04.000Z | Explosion.py | P3D-Space-Tech-Demo/Section2SpaceflightDocking | d47c18f6e53a92564130f0fa1b70d72cfb1f6229 | [
"BSD-3-Clause"
] | null | null | null |
from panda3d.core import CardMaker, Shader, Vec3, Vec2, NodePath, ColorBlendAttrib
from Section2SpaceflightDocking.Common import Common
import random
class Explosion():
cardMaker = None
@staticmethod
def getCard():
if Explosion.cardMaker is None:
Explosion.cardMaker = CardMaker("exp... | 41.246575 | 176 | 0.698107 |
from panda3d.core import CardMaker, Shader, Vec3, Vec2, NodePath, ColorBlendAttrib
from Section2SpaceflightDocking.Common import Common
import random
class Explosion():
cardMaker = None
@staticmethod
def getCard():
if Explosion.cardMaker is None:
Explosion.cardMaker = CardMaker("exp... | true | true |
7908bdaabbc44f574748fef5f0a7c7b097a203cb | 4,452 | py | Python | ocd_backend/items/nabeeldbank.py | fransward/open-cultuur-data | 38db2476ad0c5c1328315d418ae92d6abe3a5f0b | [
"CC-BY-4.0"
] | 1 | 2019-02-07T14:32:29.000Z | 2019-02-07T14:32:29.000Z | ocd_backend/items/nabeeldbank.py | fransward/open-cultuur-data | 38db2476ad0c5c1328315d418ae92d6abe3a5f0b | [
"CC-BY-4.0"
] | null | null | null | ocd_backend/items/nabeeldbank.py | fransward/open-cultuur-data | 38db2476ad0c5c1328315d418ae92d6abe3a5f0b | [
"CC-BY-4.0"
] | null | null | null | import re
from datetime import datetime
from ocd_backend.items import BaseItem
class NationaalArchiefBeeldbankItem(BaseItem):
R_IMG_RES = re.compile(r'http://.+/thumb/(?P<width>\d+)x(?P<height>\d+)/.+$')
def _get_text_or_none(self, xpath_expression):
node = self.original_item.find(xpath_expression, ... | 35.616 | 102 | 0.591195 | import re
from datetime import datetime
from ocd_backend.items import BaseItem
class NationaalArchiefBeeldbankItem(BaseItem):
R_IMG_RES = re.compile(r'http://.+/thumb/(?P<width>\d+)x(?P<height>\d+)/.+$')
def _get_text_or_none(self, xpath_expression):
node = self.original_item.find(xpath_expression, ... | true | true |
7908bdf8227c02f4c6de44c83bc393fb992675d5 | 1,507 | py | Python | model-optimizer/extensions/middle/UselessMerge.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | 1 | 2019-03-22T06:35:55.000Z | 2019-03-22T06:35:55.000Z | model-optimizer/extensions/middle/UselessMerge.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/middle/UselessMerge.py | undeadinu/dldt | fbc7a4a710c24def8ab199926a7da90a0394b87d | [
"Apache-2.0"
] | 1 | 2019-06-11T06:20:42.000Z | 2019-06-11T06:20:42.000Z | """
Copyright (c) 2018 Intel 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 to in wri... | 33.488889 | 83 | 0.68215 |
import logging as log
import networkx as nx
from extensions.middle.ConstSwitchResolver import ConstSwitchEraser
from mo.graph.graph import erase_node
from mo.middle.replacement import MiddleReplacementPattern
class UselessMergeEraser(MiddleReplacementPattern):
enabled = True
def run_after(self):
r... | true | true |
7908be606af3c926cc44177dfe378baed611cd0e | 968 | py | Python | factorial-trailing-digits/factorial_trailing_digits.py | fatihcansu/kripton | e680d9fd24a632167f5a8ac71924ef636dcd567c | [
"Unlicense"
] | 13 | 2021-01-24T20:03:35.000Z | 2022-03-15T00:49:10.000Z | factorial-trailing-digits/factorial_trailing_digits.py | fatihcansu/kripton | e680d9fd24a632167f5a8ac71924ef636dcd567c | [
"Unlicense"
] | null | null | null | factorial-trailing-digits/factorial_trailing_digits.py | fatihcansu/kripton | e680d9fd24a632167f5a8ac71924ef636dcd567c | [
"Unlicense"
] | 8 | 2021-01-18T21:10:27.000Z | 2021-03-27T11:31:17.000Z | #!/usr/bin/python3
import time
def count_5s(number):
counter = 0
while (number % 5 == 0):
counter += 1
number /= 5
return counter
def last_5_digits(number):
number = number % (10 ** 5)
return number
def factorial(number):
borrowed_2s = 0
product = 1
for i in range(1... | 19.36 | 79 | 0.528926 |
import time
def count_5s(number):
counter = 0
while (number % 5 == 0):
counter += 1
number /= 5
return counter
def last_5_digits(number):
number = number % (10 ** 5)
return number
def factorial(number):
borrowed_2s = 0
product = 1
for i in range(1, number+1):
... | true | true |
7908beb61d6899428df3e5cc3721d73773615b6c | 3,650 | py | Python | homeassistant/components/openweathermap/weather.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | homeassistant/components/openweathermap/weather.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 60 | 2020-08-03T07:32:56.000Z | 2022-03-31T06:02:07.000Z | homeassistant/components/openweathermap/weather.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Support for the OpenWeatherMap (OWM) service."""
from homeassistant.components.weather import WeatherEntity
from homeassistant.const import TEMP_CELSIUS
from .const import (
ATTR_API_CONDITION,
ATTR_API_FORECAST,
ATTR_API_HUMIDITY,
ATTR_API_PRESSURE,
ATTR_API_TEMPERATURE,
ATTR_API_WIND_BEARI... | 29.435484 | 83 | 0.682466 | from homeassistant.components.weather import WeatherEntity
from homeassistant.const import TEMP_CELSIUS
from .const import (
ATTR_API_CONDITION,
ATTR_API_FORECAST,
ATTR_API_HUMIDITY,
ATTR_API_PRESSURE,
ATTR_API_TEMPERATURE,
ATTR_API_WIND_BEARING,
ATTR_API_WIND_SPEED,
ATTRIBUTION,
DO... | true | true |
7908bf65e9b0e527a64b8fcbb431d3b737eee5bc | 183 | py | Python | pysperf/solver_library.py | ZedongPeng/pysperf | 9d8536c56aee8508ffa142369b1ab7e3d88baaac | [
"BSD-2-Clause"
] | null | null | null | pysperf/solver_library.py | ZedongPeng/pysperf | 9d8536c56aee8508ffa142369b1ab7e3d88baaac | [
"BSD-2-Clause"
] | null | null | null | pysperf/solver_library.py | ZedongPeng/pysperf | 9d8536c56aee8508ffa142369b1ab7e3d88baaac | [
"BSD-2-Clause"
] | 2 | 2020-05-21T22:15:51.000Z | 2020-06-02T23:02:08.000Z | """
This file imports `__all__` from the solvers directory, thus populating the solver registry.
"""
from pysperf.solvers import *
from .config import solvers
__all__ = ['solvers']
| 20.333333 | 92 | 0.748634 |
from pysperf.solvers import *
from .config import solvers
__all__ = ['solvers']
| true | true |
7908c07a4c1962513a9720bd6148b210668899a2 | 15,601 | py | Python | mechlib/amech_io/parser/run.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechlib/amech_io/parser/run.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechlib/amech_io/parser/run.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 8 | 2019-12-18T20:09:46.000Z | 2020-11-14T16:37:28.000Z | """ Parses the `run.dat` input file for MechDriver that specifices all
of calculations to run for a given session of the code.
Specifcally, looks for and parses several subsections:
(1) `input` block: various input
(2) `pes' block: idxs denoting what PESs in mech file to run
(3) `spc` b... | 35.137387 | 79 | 0.581629 |
import sys
import automol
import ioformat
from mechlib.amech_io.printer import error_message
from mechlib.amech_io.parser._keywrd import defaults_from_val_dct
from mechlib.amech_io.parser._keywrd import defaults_from_key_val_dcts
from mechlib.amech_io.parser._keywrd import check_dct1
from mechlib.amech_io.parser._keyw... | true | true |
7908c33ec88b3c62a7ab532f0fbc23129d85ce34 | 8,070 | py | Python | Homework_1/Python/homework_1_by_kirbs.py | freeernest/edX-Learning-From-Data-Solutions | 5cbcf0885b5fdb00c3658d230fc7bb7e20b5cf44 | [
"Apache-2.0"
] | 79 | 2015-01-27T11:09:24.000Z | 2022-02-05T12:01:35.000Z | Homework_1/Python/homework_1_by_kirbs.py | freeernest/edX-Learning-From-Data-Solutions | 5cbcf0885b5fdb00c3658d230fc7bb7e20b5cf44 | [
"Apache-2.0"
] | 1 | 2018-08-25T05:45:11.000Z | 2018-12-04T14:44:32.000Z | Homework_1/Python/homework_1_by_kirbs.py | freeernest/edX-Learning-From-Data-Solutions | 5cbcf0885b5fdb00c3658d230fc7bb7e20b5cf44 | [
"Apache-2.0"
] | 40 | 2015-04-06T18:43:34.000Z | 2021-03-28T18:08:40.000Z | #! /usr/bin/python
#
# This is the answer code for the course "Learning from Data" on edX.org
# https://www.edx.org/course/caltechx/cs1156x/learning-data/1120
#
# The software is intended for course usage, no guarantee whatsoever.
# Date: 10/4/2013
# Created by: kirbs
# See notes at bottom for further details.
... | 41.173469 | 129 | 0.584634 |
import sys
import os
import random
import pylab
import scipy
import numpy as np
| false | true |
7908c7b459778572fc6997cfc908d7851bb9cdc7 | 2,354 | py | Python | spidermon/templates.py | zanachka/spidermon | d2840b6bbb6ba6d8a0ef633deac66588d243e615 | [
"BSD-3-Clause"
] | 405 | 2019-01-10T13:06:09.000Z | 2022-03-30T20:14:58.000Z | spidermon/templates.py | zanachka/spidermon | d2840b6bbb6ba6d8a0ef633deac66588d243e615 | [
"BSD-3-Clause"
] | 226 | 2019-01-04T13:31:17.000Z | 2022-03-28T21:06:10.000Z | spidermon/templates.py | zanachka/spidermon | d2840b6bbb6ba6d8a0ef633deac66588d243e615 | [
"BSD-3-Clause"
] | 87 | 2019-01-07T10:23:26.000Z | 2022-02-22T04:38:04.000Z | import datetime
import inspect
import os
import pprint as pretty_print
import jinja2
from jinja2 import Environment, FileSystemLoader
DEFAULT_TEMPLATE_FOLDERS = ["templates"]
def get_log_errors(logs):
return [e for e in logs.list() if e["level"] >= 40]
def make_list(obj):
return list(obj)
def pprint(obj... | 26.449438 | 83 | 0.661852 | import datetime
import inspect
import os
import pprint as pretty_print
import jinja2
from jinja2 import Environment, FileSystemLoader
DEFAULT_TEMPLATE_FOLDERS = ["templates"]
def get_log_errors(logs):
return [e for e in logs.list() if e["level"] >= 40]
def make_list(obj):
return list(obj)
def pprint(obj... | true | true |
7908c9281579a5ac2ed1d6c8228dd301d5d7fa73 | 1,621 | py | Python | selenium/find_elements/app_main_menu.py | aminzin-1990/software-testing-repository | 72c9ac49b8ec805e0a80f59bbc581c8324ef5abe | [
"Apache-2.0"
] | null | null | null | selenium/find_elements/app_main_menu.py | aminzin-1990/software-testing-repository | 72c9ac49b8ec805e0a80f59bbc581c8324ef5abe | [
"Apache-2.0"
] | null | null | null | selenium/find_elements/app_main_menu.py | aminzin-1990/software-testing-repository | 72c9ac49b8ec805e0a80f59bbc581c8324ef5abe | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
import time
url = "http://localhost/litecart/admin/"
browser = webdriver.Chrome()
browser.implicitly_wait(1)
without_title = 0
try:
browser.get(url)
# логинемся
login = browser.find_element_by_css_selector("[name='username']")
login.send_keys("admin")
password = ... | 30.018519 | 106 | 0.650833 | from selenium import webdriver
import time
url = "http://localhost/litecart/admin/"
browser = webdriver.Chrome()
browser.implicitly_wait(1)
without_title = 0
try:
browser.get(url)
login = browser.find_element_by_css_selector("[name='username']")
login.send_keys("admin")
password = browser.fin... | true | true |
7908c9a3be5742ab6ae458177c4da0a5715cdafd | 500 | py | Python | cms/test_utils/project/customuserapp/admin.py | samirasnoun/django_cms_gallery_image | 7792aa06a60877d86c022e73b60d0d669e79cb74 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T10:28:46.000Z | 2019-04-15T10:28:46.000Z | cms/test_utils/project/customuserapp/admin.py | samirasnoun/django_cms_gallery_image | 7792aa06a60877d86c022e73b60d0d669e79cb74 | [
"BSD-3-Clause"
] | null | null | null | cms/test_utils/project/customuserapp/admin.py | samirasnoun/django_cms_gallery_image | 7792aa06a60877d86c022e73b60d0d669e79cb74 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as OriginalUserAdmin
from django.contrib.auth.models import User as OriginalUser
from cms.utils.compat.dj import get_user_model
if getattr(OriginalUser._meta, 'swapped', False):
class UserAdmin(OriginalUserAdm... | 35.714286 | 73 | 0.74 |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as OriginalUserAdmin
from django.contrib.auth.models import User as OriginalUser
from cms.utils.compat.dj import get_user_model
if getattr(OriginalUser._meta, 'swapped', False):
class UserAdmin(OriginalUserAdmin):
list_displ... | true | true |
7908ca117a897c828c0175daa906cd87d1f78cc8 | 7,702 | py | Python | nodes/core/hardware/nrgpio.py | meeki007/node-red | c685a310560ae9af4b28e14ed466ec788a66984c | [
"Apache-2.0"
] | 72 | 2016-03-24T15:47:19.000Z | 2021-12-01T02:12:32.000Z | nodes/core/hardware/nrgpio.py | meeki007/node-red | c685a310560ae9af4b28e14ed466ec788a66984c | [
"Apache-2.0"
] | 20 | 2017-01-21T04:23:28.000Z | 2020-01-23T12:54:44.000Z | nodes/core/hardware/nrgpio.py | meeki007/node-red | c685a310560ae9af4b28e14ed466ec788a66984c | [
"Apache-2.0"
] | 14 | 2017-04-07T18:33:05.000Z | 2022-02-04T12:48:01.000Z | #!/usr/bin/python
#
# Copyright JS Foundation and other contributors, http://js.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
# http://www.apache.org/licenses/LICENSE-2.0
# Unles... | 32.091667 | 108 | 0.497923 |
import RPi.GPIO as GPIO
import struct
import sys
import os
import subprocess
from time import sleep
try:
raw_input
except NameError:
raw_input = input
bounce = 25
if len(sys.argv) > 2:
cmd = sys.argv[1].lower()
pin = int(sys.argv[2])
GPIO.setmode(GPIO.BOARD)
GPIO.s... | true | true |
7908ca9bfb67407af5dbd9e8c80c852686aa4121 | 2,695 | py | Python | tests/dumpsmach_test.py | zexiangliu/tulip-control | 789a593696a03c291a553a0350fcebf3368a16da | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:13:50.000Z | 2020-02-13T14:13:50.000Z | tests/dumpsmach_test.py | arw12625/tulip-control | eebe65c942d9b5b080a88e72f33a725b51bd52c5 | [
"BSD-3-Clause"
] | null | null | null | tests/dumpsmach_test.py | arw12625/tulip-control | eebe65c942d9b5b080a88e72f33a725b51bd52c5 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T16:32:39.000Z | 2019-07-09T16:32:39.000Z | #!/usr/bin/env python
"""Tests for the export mechanisms of tulip.dumpsmach."""
from __future__ import print_function
import logging
import networkx as nx
from nose.tools import assert_raises
from tulip import spec, synth, dumpsmach
logging.getLogger('tulip').setLevel('ERROR')
logging.getLogger('astutils').setLeve... | 32.46988 | 83 | 0.547681 |
from __future__ import print_function
import logging
import networkx as nx
from nose.tools import assert_raises
from tulip import spec, synth, dumpsmach
logging.getLogger('tulip').setLevel('ERROR')
logging.getLogger('astutils').setLevel('ERROR')
logging.getLogger('omega').setLevel('ERROR')
class basic_test(obje... | true | true |
7908caa4c581577ad0c130e7ce6fab5638920619 | 3,685 | py | Python | pygimli/viewer/mpl/matrixview.py | JuliusHen/gimli | a5c5779261acfe5a53015c9ee6f7c9ed2dd6c57f | [
"Apache-2.0"
] | 224 | 2015-02-20T21:36:24.000Z | 2022-03-30T07:27:43.000Z | pygimli/viewer/mpl/matrixview.py | JuliusHen/gimli | a5c5779261acfe5a53015c9ee6f7c9ed2dd6c57f | [
"Apache-2.0"
] | 341 | 2015-05-21T14:39:51.000Z | 2022-03-31T01:54:07.000Z | pygimli/viewer/mpl/matrixview.py | JuliusHen/gimli | a5c5779261acfe5a53015c9ee6f7c9ed2dd6c57f | [
"Apache-2.0"
] | 107 | 2015-01-24T14:40:21.000Z | 2022-02-25T12:12:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Functions to draw various pygimli matrices with matplotlib."""
import numpy as np
import matplotlib.pyplot as plt
import pygimli as pg
def drawSparseMatrix(ax, mat, **kwargs):
"""Draw a view of a matrix into the axes.
Parameters
----------
ax : mpl a... | 28.789063 | 110 | 0.538128 |
import numpy as np
import matplotlib.pyplot as plt
import pygimli as pg
def drawSparseMatrix(ax, mat, **kwargs):
row = kwargs.pop('rowOffset', 0)
col = kwargs.pop('colOffset', 0)
color = kwargs.pop('color', None)
mat = pg.utils.sparseMatrix2coo(mat)
mat.row += row
mat.col += col
gci =... | true | true |
7908cb22148a76d380356d13fac1855f31d12772 | 52,064 | py | Python | third_party/ridayesh_run_tag.py | rohanshah13/cloud-emea-copy | 12acebc809080e5898ead86a412b17a5272759c2 | [
"Apache-2.0"
] | null | null | null | third_party/ridayesh_run_tag.py | rohanshah13/cloud-emea-copy | 12acebc809080e5898ead86a412b17a5272759c2 | [
"Apache-2.0"
] | null | null | null | third_party/ridayesh_run_tag.py | rohanshah13/cloud-emea-copy | 12acebc809080e5898ead86a412b17a5272759c2 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors,
# The HuggingFace Inc. team, and The XTREME Benchmark Authors.
# Copyright (c) 2018, 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 th... | 46.527256 | 259 | 0.688153 |
from __future__ import absolute_import, division, print_function
import argparse
import glob
import logging
import os
import random
from dataclasses import dataclass, field
from typing import Optional
import json
import numpy as np
import scipy
import torch
from seqeval.metrics import precision_score... | true | true |
7908cbff6c3f0f0fbcecfce553790dc0729ea028 | 5,490 | py | Python | google/ads/google_ads/v6/proto/resources/paid_organic_search_term_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/resources/paid_organic_search_term_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/resources/paid_organic_search_term_view_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v6/resources/paid_organic_search_term_view.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | 58.404255 | 1,006 | 0.816393 |
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default()
from google.api import field_behavior_pb2 as google_dot_... | true | true |
7908cf43b0d0f159ff836966761ee283b6c86bac | 2,526 | py | Python | erinn/python/models/DFN.py | swcjack6931677/ERINN | a4f3d0ad213515bc86e2a18575537d6affd472ac | [
"MIT"
] | null | null | null | erinn/python/models/DFN.py | swcjack6931677/ERINN | a4f3d0ad213515bc86e2a18575537d6affd472ac | [
"MIT"
] | null | null | null | erinn/python/models/DFN.py | swcjack6931677/ERINN | a4f3d0ad213515bc86e2a18575537d6affd472ac | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
from tensorflow.python.keras.layers import Input, Dense
from tensorflow.python.keras.layers.normalization import BatchNormalization
from tensorflow.python.keras.models import Model
# 第一種架構: 深度前饋網路(deep feedforward network)
# 也叫做前饋神經網路(feedforward neura... | 36.085714 | 75 | 0.672605 | from __future__ import absolute_import, division, print_function
from tensorflow.python.keras.layers import Input, Dense
from tensorflow.python.keras.layers.normalization import BatchNormalization
from tensorflow.python.keras.models import Model
def get_dfn(output_size, img_height, img_width, show=True):
mode... | true | true |
7908cf8049fa01d83e2ee5e22890bd4d7dd8b2d5 | 90,465 | py | Python | certbot/tests/main_test.py | queilawithaQ/certbot | 64df1fb32796fd083abd910b2ac81deaa7077c55 | [
"Apache-2.0"
] | 1 | 2021-06-16T04:49:46.000Z | 2021-06-16T04:49:46.000Z | certbot/tests/main_test.py | levancao798/certbot | 32247b3c89cb44b87f764a21e6deda9168431dec | [
"Apache-2.0"
] | null | null | null | certbot/tests/main_test.py | levancao798/certbot | 32247b3c89cb44b87f764a21e6deda9168431dec | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
"""Tests for certbot._internal.main."""
# pylint: disable=too-many-lines
import datetime
from importlib import reload as reload_module
import io
import itertools
import json
import shutil
import sys
import tempfile
import traceback
import unittest
from typing import List
import josepy as jose
import pyt... | 48.66326 | 103 | 0.659459 |
import datetime
from importlib import reload as reload_module
import io
import itertools
import json
import shutil
import sys
import tempfile
import traceback
import unittest
from typing import List
import josepy as jose
import pytz
from certbot import crypto_util
from certbot import errors
from certbot import inte... | true | true |
7908cff36e5246ae97dc46db575d03d36ff29e4a | 3,622 | py | Python | devp2p/tests/test_crypto.py | anshulkusa/pyquarkchain | af80b6fdd331c69ce1bc801caf7c2cdd1e82a435 | [
"MIT"
] | 2 | 2018-10-22T10:52:56.000Z | 2018-12-16T06:47:58.000Z | devp2p/tests/test_crypto.py | anshulkusa/pyquarkchain | af80b6fdd331c69ce1bc801caf7c2cdd1e82a435 | [
"MIT"
] | null | null | null | devp2p/tests/test_crypto.py | anshulkusa/pyquarkchain | af80b6fdd331c69ce1bc801caf7c2cdd1e82a435 | [
"MIT"
] | 2 | 2018-10-25T04:46:09.000Z | 2020-06-08T21:24:42.000Z | # -*- coding: utf-8 -*-
from devp2p import crypto
from quarkchain.rlp.utils import decode_hex
import random
import pytest
def get_ecc(secret=b''):
return crypto.ECCx(raw_privkey=crypto.mk_privkey(secret))
def test_valid_ecc():
for i in range(100):
e = get_ecc()
assert len(e.raw_pubkey) == 64... | 30.694915 | 162 | 0.717835 |
from devp2p import crypto
from quarkchain.rlp.utils import decode_hex
import random
import pytest
def get_ecc(secret=b''):
return crypto.ECCx(raw_privkey=crypto.mk_privkey(secret))
def test_valid_ecc():
for i in range(100):
e = get_ecc()
assert len(e.raw_pubkey) == 64
assert e.is_va... | true | true |
7908d0d264a16291805144397c065b26fa2f7b36 | 17,246 | py | Python | quex/engine/state_machine/transformation/state_split.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/engine/state_machine/transformation/state_split.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | quex/engine/state_machine/transformation/state_split.py | smmckay/quex-mirror | 7d75ed560e9f3a591935e59243188676eecb112a | [
"MIT"
] | null | null | null | """State-Split Transformation
-----------------------------
(C) Frank-Rene Schaefer
The 'State-Split' is a procedure transforms a state machine that triggers on
some 'pure' values (e.g. Unicode Characters) into a state machine that triggers
on the code unit sequences (e.g. UTF8 Code Units) that correspond to the
origi... | 43.550505 | 91 | 0.606923 | """State-Split Transformation
-----------------------------
(C) Frank-Rene Schaefer
The 'State-Split' is a procedure transforms a state machine that triggers on
some 'pure' values (e.g. Unicode Characters) into a state machine that triggers
on the code unit sequences (e.g. UTF8 Code Units) that correspond to the
origi... | false | true |
7908d2573074e550da58f0b678637c9c8a53bac2 | 2,436 | py | Python | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | 8 | 2020-10-09T13:43:51.000Z | 2022-01-17T06:18:52.000Z | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | src/visualization_simulator/src/ui/ui_birdview.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'birdview.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtG... | 43.5 | 75 | 0.71798 |
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_birdview(object):
def setupUi(self, birdview):
birdview.setObjectName("birdview")
birdview.resize(552, 551)
self.verticalLayout = QtWidgets.QVBoxLayout(birdview)
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.