hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
87d492ad79ab7c40cf3c50a41825cf7c13977632 | 720 | py | Python | test.py | glasses-n-contacts/imessage-analyzer | 9c3a933683c21fb4f1e52d0055d9cd89c886b46f | [
"MIT"
] | 5 | 2018-05-20T06:07:36.000Z | 2018-09-24T14:14:48.000Z | test.py | glasses-n-contacts/imessage-analyzer | 9c3a933683c21fb4f1e52d0055d9cd89c886b46f | [
"MIT"
] | 3 | 2018-05-18T05:39:27.000Z | 2018-06-14T14:51:12.000Z | test.py | glasses-n-contacts/imessage-analyzer | 9c3a933683c21fb4f1e52d0055d9cd89c886b46f | [
"MIT"
] | null | null | null | import nltk
import random
from nltk.corpus import movie_reviews
def find_features(document):
words = set(document)
features = {}
for w in word_features:
features[w] = (w in words)
return features
documents = [(list(movie_reviews.words(fileid)), category)
for category in movie_re... | 22.5 | 79 | 0.705556 |
cbfd818f77967d7f959ffee11caf6978dfd8feea | 3,449 | py | Python | hdfs_namenode/datadog_checks/hdfs_namenode/config_models/instance.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | hdfs_namenode/datadog_checks/hdfs_namenode/config_models/instance.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | hdfs_namenode/datadog_checks/hdfs_namenode/config_models/instance.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x va... | 30.254386 | 110 | 0.722818 |
7bd96baa1a57decf5a762c598ac47e12c23ee21b | 1,040 | py | Python | setup.py | RealCyGuy/random-mitype | 100a1da4fac63d9f4b8c6810fd7186f24db12c19 | [
"MIT"
] | null | null | null | setup.py | RealCyGuy/random-mitype | 100a1da4fac63d9f4b8c6810fd7186f24db12c19 | [
"MIT"
] | null | null | null | setup.py | RealCyGuy/random-mitype | 100a1da4fac63d9f4b8c6810fd7186f24db12c19 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as f:
long_description = f.read()
# exec(open("random_mitype/version.py").read())
setup(
name="random_mitype",
version="0.1.3",
packages=find_packages(),
include_package_data=True,
description="Generate random typing test... | 32.5 | 92 | 0.650962 |
868188d60fd58d03b3ff27af06f52428d63f38c9 | 7,960 | py | Python | tensorflow_hub/keras_layer.py | park0866/hub | 54a242de6e148d0836c4a58308b07bbe79c274b6 | [
"Apache-2.0"
] | 1 | 2019-04-25T09:29:35.000Z | 2019-04-25T09:29:35.000Z | tensorflow_hub/keras_layer.py | AnalystSubranjit/hub | c2ff9d4ae06fe600633694f81b859aead189754c | [
"Apache-2.0"
] | null | null | null | tensorflow_hub/keras_layer.py | AnalystSubranjit/hub | c2ff9d4ae06fe600633694f81b859aead189754c | [
"Apache-2.0"
] | 1 | 2019-06-04T08:48:12.000Z | 2019-06-04T08:48:12.000Z | # Copyright 2019 The TensorFlow Hub 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 app... | 41.675393 | 80 | 0.693844 |
9f22b270a1bbffd4ebc8ac3baf6d76324c08b284 | 982 | py | Python | python/custreamz/setup.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 239 | 2018-10-10T09:55:22.000Z | 2018-10-28T20:47:23.000Z | python/custreamz/setup.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 25 | 2018-10-10T14:46:32.000Z | 2018-10-28T22:16:14.000Z | python/custreamz/setup.py | Ahsantw/cudf | e099688d5ca7dd20104930485a829881a68c522a | [
"Apache-2.0"
] | 19 | 2018-10-10T12:42:51.000Z | 2018-10-26T16:33:22.000Z | # Copyright (c) 2020-2022, NVIDIA CORPORATION.
from setuptools import find_packages, setup
import versioneer
install_requires = ["cudf_kafka", "cudf"]
setup(
name="custreamz",
version=versioneer.get_version(),
description="cuStreamz - GPU Accelerated Streaming",
url="https://github.com/rapidsai/cudf... | 30.6875 | 65 | 0.653768 |
128b707f51ad8ce2e249a6747b2ebda1c2899e7e | 6,362 | py | Python | validate.py | sremedios/nifti_image_generator | ffd476fa3d12a2cfb12250d903efd2277dc3426b | [
"MIT"
] | 6 | 2019-07-11T18:00:19.000Z | 2022-01-27T22:50:57.000Z | validate.py | sremedios/nifti_image_generator | ffd476fa3d12a2cfb12250d903efd2277dc3426b | [
"MIT"
] | 1 | 2019-02-26T14:20:32.000Z | 2019-02-26T14:20:32.000Z | validate.py | sremedios/nifti_image_generator | ffd476fa3d12a2cfb12250d903efd2277dc3426b | [
"MIT"
] | 7 | 2019-01-07T19:30:51.000Z | 2021-05-17T19:23:23.000Z | '''
Samuel Remedios
NIH CC CNRM
Predict contrast of an image.
'''
import os
import sys
from tqdm import tqdm
import time
import shutil
import json
from operator import itemgetter
from datetime import datetime
import numpy as np
from sklearn.utils import shuffle
from utils.load_data import load_data, load_image, load_... | 34.576087 | 139 | 0.537881 |
42f8dcdc22cc1848bc6cbb3935aed936af95e074 | 5,750 | py | Python | qa/rpc-tests/test_framework/socks5.py | arthurgarcia/cruzeta | 53f1bf16704afbb2ad2e78bfb1c9ed0b722ba7ed | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/socks5.py | arthurgarcia/cruzeta | 53f1bf16704afbb2ad2e78bfb1c9ed0b722ba7ed | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/socks5.py | arthurgarcia/cruzeta | 53f1bf16704afbb2ad2e78bfb1c9ed0b722ba7ed | [
"MIT"
] | null | null | null | # Copyright (c) 2015 The Bitcoin Core developers
# Copyright (c) 2017-2018 The CruZeta developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Dummy Socks5 server for testing.
'''
from __future__ import print_function, divis... | 35.493827 | 125 | 0.574435 |
90cbddb3ef2859242eadd416e33109a9f0d66b6d | 3,208 | py | Python | kpe/BertKPE/bertkpe/networks/Roberta2Tag.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 32 | 2020-03-26T17:03:54.000Z | 2021-09-10T08:30:48.000Z | kpe/BertKPE/bertkpe/networks/Roberta2Tag.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 1 | 2020-04-06T16:35:12.000Z | 2020-04-13T07:08:14.000Z | kpe/BertKPE/bertkpe/networks/Roberta2Tag.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 6 | 2020-03-28T05:07:22.000Z | 2021-03-04T01:46:00.000Z | import torch
import logging
import numpy as np
from torch import nn
import torch.nn.functional as F
from torch.nn import CrossEntropyLoss
from ..transformers import RobertaForTokenClassification
logger = logging.getLogger()
class RobertaForSeqTagging(RobertaForTokenClassification):
def forward(self, input_ids, ... | 39.604938 | 100 | 0.525873 |
c53de294624ca76064953734c3d429a4be9be00c | 4,021 | py | Python | mainwin.py | mmahnic/libreoffice-review | 658722cbb0e14e574e4867cfd0ea06a000bc4989 | [
"MIT"
] | 2 | 2018-12-11T19:02:38.000Z | 2019-09-12T06:21:58.000Z | mainwin.py | mmahnic/git-libreoffice-review | 658722cbb0e14e574e4867cfd0ea06a000bc4989 | [
"MIT"
] | null | null | null | mainwin.py | mmahnic/git-libreoffice-review | 658722cbb0e14e574e4867cfd0ea06a000bc4989 | [
"MIT"
] | null | null | null | import os, re
import gitjobs
import mainwin_ui_support as support
import textreport
from generator import DiffGeneratorSettings, DiffGenerator, OverviewGenerator
from odt import OdtGenerator
from tktext import TkTextGenerator
from settings import globalSettings, APPTITLE
def setupSupport():
"""Replace the globals ... | 30.462121 | 84 | 0.654812 |
2646b2c12ecfe4c10d1164ec6c74806e16e9413a | 907 | py | Python | rviz/src/test/send_polygon.py | romi2002/rviz | 8b2fcc1838e079d0e365894abd7cfd7b255b8d8b | [
"BSD-3-Clause-Clear"
] | 9 | 2017-12-17T07:43:15.000Z | 2021-10-10T15:03:39.000Z | rviz/src/test/send_polygon.py | romi2002/rviz | 8b2fcc1838e079d0e365894abd7cfd7b255b8d8b | [
"BSD-3-Clause-Clear"
] | 2 | 2019-02-12T21:55:08.000Z | 2019-02-20T01:01:24.000Z | rviz/src/test/send_polygon.py | romi2002/rviz | 8b2fcc1838e079d0e365894abd7cfd7b255b8d8b | [
"BSD-3-Clause-Clear"
] | 9 | 2018-09-09T20:48:17.000Z | 2021-03-11T11:22:52.000Z | #!/usr/bin/env python
import roslib; roslib.load_manifest('rviz')
from geometry_msgs.msg import PolygonStamped
from geometry_msgs.msg import Point32
import math
import rospy
topic = 'test_polygon'
publisher = rospy.Publisher(topic, PolygonStamped)
rospy.init_node('send_polygon')
t = 0
while not rospy.is_shutdown():... | 23.25641 | 65 | 0.647189 |
b0aaf7380acacebcdfdc3606adbd3211bfa9837a | 28,459 | py | Python | BERT_NER_copy2.py | zjsuper/cancerber_ner | e84e70ea08c267310ebd7acdf127d5357bfd63a4 | [
"Apache-2.0"
] | null | null | null | BERT_NER_copy2.py | zjsuper/cancerber_ner | e84e70ea08c267310ebd7acdf127d5357bfd63a4 | [
"Apache-2.0"
] | null | null | null | BERT_NER_copy2.py | zjsuper/cancerber_ner | e84e70ea08c267310ebd7acdf127d5357bfd63a4 | [
"Apache-2.0"
] | null | null | null | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
# Copyright 2018 The Google AI Language Team Authors.
# Copyright 2019 The BioNLP-HZAU Kaiyin Zhou
# Time:2019/04/08
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import... | 40.539886 | 309 | 0.628167 |
0ae3c9a212fa13441a6eb86078deb45ac3a9be2e | 546 | py | Python | backend-services/Models/byteToAudio.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 3 | 2019-12-01T23:09:12.000Z | 2020-12-22T03:02:37.000Z | backend-services/Models/byteToAudio.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 5 | 2020-03-05T17:17:12.000Z | 2020-06-16T07:02:27.000Z | backend-services/Models/byteToAudio.py | Off-Top-App/off-top-python | af51a7da0e52d6ad978835cb05986d7c2a917861 | [
"bzip2-1.0.6"
] | 1 | 2020-05-18T12:57:14.000Z | 2020-05-18T12:57:14.000Z |
import scipy.io.wavfile
import numpy as np
import soundfile as sf
# scipy writes the bytes to audio file using numpyarray. Here 16 denotes sample rate (samples/sec)
# opened a file containg byte strings and then converted them to a numpyarray and to .wav file
def convert_bytes_to_audio():
f = open("test.txt","r"... | 27.3 | 98 | 0.716117 |
a8e57319beb6f7b2f1e471080bebb96136d420ad | 4,395 | py | Python | metrics_v2/handler/alerts_test.py | yeqingli/ml-testing-accelerators | 5bf6322e5eca258317dcdaef26c070d988b055a0 | [
"Apache-2.0"
] | 36 | 2020-03-04T15:22:44.000Z | 2022-03-31T19:00:58.000Z | metrics_v2/handler/alerts_test.py | yeqingli/ml-testing-accelerators | 5bf6322e5eca258317dcdaef26c070d988b055a0 | [
"Apache-2.0"
] | 144 | 2020-03-05T21:22:21.000Z | 2022-03-31T19:31:25.000Z | metrics_v2/handler/alerts_test.py | ultrons/ml-testing-accelerators | d33a18e1782875dfe647c149553d54cc0c5e88cd | [
"Apache-2.0"
] | 30 | 2020-03-10T17:56:40.000Z | 2022-03-31T19:10:25.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.241071 | 406 | 0.732878 |
cc42e1bcd70bfe5fd717b0039e288701aad4dfcf | 2,184 | py | Python | src/utils/train_utils.py | RayWilliam46/FineTune-DistilBERT | 09cbed8f58ba65cb75610f72a2196e88e0dabc59 | [
"Apache-2.0"
] | 13 | 2021-05-06T17:31:26.000Z | 2022-03-28T04:55:37.000Z | src/utils/train_utils.py | RayWilliam46/FineTune-DistilBERT | 09cbed8f58ba65cb75610f72a2196e88e0dabc59 | [
"Apache-2.0"
] | null | null | null | src/utils/train_utils.py | RayWilliam46/FineTune-DistilBERT | 09cbed8f58ba65cb75610f72a2196e88e0dabc59 | [
"Apache-2.0"
] | 7 | 2021-07-06T18:46:54.000Z | 2022-03-28T04:55:47.000Z | def batch_encode(tokenizer, texts, batch_size=256, max_length=params['MAX_LENGTH']):
"""""""""
A function that encodes a batch of texts and returns the texts'
corresponding encodings and attention masks that are ready to be fed
into a pre-trained transformer model.
Input:
- tokenizer: ... | 45.5 | 131 | 0.592033 |
4dfaded092c5c406695432d03d27fad6f3a2d560 | 23,065 | py | Python | miseq_portal/miseq_viewer/models.py | BFSSI-Bioinformatics-Lab/miseq_portal | 79a0dea0e35a07d86e044acc39c9407cdc128428 | [
"MIT"
] | null | null | null | miseq_portal/miseq_viewer/models.py | BFSSI-Bioinformatics-Lab/miseq_portal | 79a0dea0e35a07d86e044acc39c9407cdc128428 | [
"MIT"
] | null | null | null | miseq_portal/miseq_viewer/models.py | BFSSI-Bioinformatics-Lab/miseq_portal | 79a0dea0e35a07d86e044acc39c9407cdc128428 | [
"MIT"
] | null | null | null | import logging
from pathlib import Path
from typing import Optional
import pandas as pd
from dataclasses import dataclass
from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
from config.settings.base import MEDIA_ROOT
from miseq_portal.core.models import Tim... | 39.027073 | 120 | 0.693041 |
9b999268e54b2b40f8961017c9663bc71bd01c02 | 1,240 | py | Python | django_project/virtualornithology/timelines/views.py | carnby/aurora | f31e3de28694fd5763643d90ee91e99a55d4ec97 | [
"MIT"
] | 8 | 2016-02-25T13:48:10.000Z | 2020-06-06T07:23:30.000Z | django_project/virtualornithology/timelines/views.py | carnby/aurora | f31e3de28694fd5763643d90ee91e99a55d4ec97 | [
"MIT"
] | null | null | null | django_project/virtualornithology/timelines/views.py | carnby/aurora | f31e3de28694fd5763643d90ee91e99a55d4ec97 | [
"MIT"
] | 2 | 2016-03-07T11:54:59.000Z | 2020-06-06T07:23:31.000Z | from django.shortcuts import render, render_to_response, redirect
from django.template import RequestContext
from user_agents import parse as agentparse
from virtualornithology.birds.views import check_referer
from virtualornithology.interactions.views import prepare_session
from .models import Timeline
def last_time... | 37.575758 | 140 | 0.754839 |
7e3b56e040b826b250ca9f3d052f9474f3b23628 | 6,089 | py | Python | modules.py | ifoyooo/ml-network | 15028fdfdf74540ae96ede4bb7c0f6fd62feb5e2 | [
"MIT"
] | null | null | null | modules.py | ifoyooo/ml-network | 15028fdfdf74540ae96ede4bb7c0f6fd62feb5e2 | [
"MIT"
] | null | null | null | modules.py | ifoyooo/ml-network | 15028fdfdf74540ae96ede4bb7c0f6fd62feb5e2 | [
"MIT"
] | null | null | null | '''
完成网络层
'''
import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.optim import lr_scheduler
import torch.nn.functional as F
import numpy as np
#不变层。
__all__ = ['Identity','Embedding', 'LSTMEncoder', 'MLAttention', 'AttentionWeights', 'FastMLAttention', 'MLLinear']
class Identity(... | 41.141892 | 118 | 0.645262 |
6b6660922a612ff2150e02971c2f1863a23dc52f | 84 | py | Python | ejercicios_python/Clase08/practica8-6.py | hcgalvan/UNSAM-Python-programming | c4b3f5ae0702dc03ea6010cb8051c7eec6aef42f | [
"MIT"
] | null | null | null | ejercicios_python/Clase08/practica8-6.py | hcgalvan/UNSAM-Python-programming | c4b3f5ae0702dc03ea6010cb8051c7eec6aef42f | [
"MIT"
] | null | null | null | ejercicios_python/Clase08/practica8-6.py | hcgalvan/UNSAM-Python-programming | c4b3f5ae0702dc03ea6010cb8051c7eec6aef42f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 21 18:12:59 2021
@author: User
"""
| 10.5 | 35 | 0.559524 |
5e3475e829103f36719c3d5b86748ae52b34c9b6 | 93 | py | Python | Katna/__init__.py | viddik13/katna | 12256602a5fd24368ffffe2c1a82a46a49215c15 | [
"MIT"
] | 125 | 2019-08-22T06:53:55.000Z | 2022-03-24T05:53:41.000Z | Katna/__init__.py | viddik13/katna | 12256602a5fd24368ffffe2c1a82a46a49215c15 | [
"MIT"
] | 19 | 2020-02-13T07:14:59.000Z | 2021-12-01T15:13:33.000Z | Katna/__init__.py | viddik13/katna | 12256602a5fd24368ffffe2c1a82a46a49215c15 | [
"MIT"
] | 28 | 2019-09-03T07:00:29.000Z | 2021-12-30T04:20:14.000Z | from Katna.video import Video
from Katna.image import Image
from .version import __version__
| 23.25 | 32 | 0.83871 |
183dc74c777b7056734435310b1269d124c0e995 | 346 | py | Python | src/sentry/analytics/events/sentry_app_token_exchanged.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/analytics/events/sentry_app_token_exchanged.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/analytics/events/sentry_app_token_exchanged.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry import analytics
class SentryAppTokenExchangedEvent(analytics.Event):
type = "sentry_app.token_exchanged"
attributes = (
analytics.Attribute("sentry_app_installation_id"),
analytics.Attribute("exchange_type"),
)
analytics.register(Sent... | 21.625 | 58 | 0.768786 |
7b43ffee87d181efff419e361a959387756b244b | 3,662 | py | Python | adapters/actuators/roboteq_command_wrapper_examples.py | diydsp/thirtybirds3.0 | 8d57c73f1c6597a3a5dddaaaca07511eaa2adaf8 | [
"MIT"
] | 2 | 2020-05-13T02:53:02.000Z | 2021-03-21T05:54:53.000Z | adapters/actuators/roboteq_command_wrapper_examples.py | diydsp/thirtybirds3.0 | 8d57c73f1c6597a3a5dddaaaca07511eaa2adaf8 | [
"MIT"
] | null | null | null | adapters/actuators/roboteq_command_wrapper_examples.py | diydsp/thirtybirds3.0 | 8d57c73f1c6597a3a5dddaaaca07511eaa2adaf8 | [
"MIT"
] | 1 | 2021-05-06T18:42:41.000Z | 2021-05-06T18:42:41.000Z |
import queue
import threading
import roboteq_macro_functions as roboteq
config = {
"boards":{
"300:1058:3014688:1429493507:540422710":{},
"300:1058:2031663:1429493506:540422710":{},
},
"motors":{
"pitch_slider":{
"mcu_id":"300:1058:2031663:1429493506:540422710",
... | 32.122807 | 84 | 0.67941 |
09688f44b7a3643d913c596d88fae688a06c9e46 | 3,600 | py | Python | tests/test_rand_spatial_crop_samplesd.py | charliebudd/MONAI | 9f4da6acded249bba24c85eaee4ece256ed45815 | [
"Apache-2.0"
] | 1 | 2021-04-13T08:10:28.000Z | 2021-04-13T08:10:28.000Z | tests/test_rand_spatial_crop_samplesd.py | mxochicale/MONAI | d72f61ea9f73821602f507b5e80a97c3c6937e05 | [
"Apache-2.0"
] | null | null | null | tests/test_rand_spatial_crop_samplesd.py | mxochicale/MONAI | d72f61ea9f73821602f507b5e80a97c3c6937e05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 43.902439 | 117 | 0.501667 |
5e87f94accd112fb3e23987a2637352462addc61 | 416 | py | Python | Python/BasicPracticeProblems/Simple_Questions/Area.py | smainc/ProgrammingConcepts | f45fe38f2c9c5b95c3f17f26d19a1059cac6063c | [
"MIT"
] | null | null | null | Python/BasicPracticeProblems/Simple_Questions/Area.py | smainc/ProgrammingConcepts | f45fe38f2c9c5b95c3f17f26d19a1059cac6063c | [
"MIT"
] | null | null | null | Python/BasicPracticeProblems/Simple_Questions/Area.py | smainc/ProgrammingConcepts | f45fe38f2c9c5b95c3f17f26d19a1059cac6063c | [
"MIT"
] | null | null | null | def areaOfCircle(radius): # area of circle = pi * r^2
return 3.14 * radius ** 2 # ** is the power operator
def circumferenceOfCircle(radius): # circumference of circle = 2 * pi * r
return 2 * 3.14 * radius
radius = float(input('Enter the radius of the circle: '))
print('The area of the circle is:', ar... | 46.222222 | 75 | 0.689904 |
187ebbec9349e86c84d45a1c0257448fe0cdb201 | 7,990 | py | Python | sdk/python/pulumi_azure_nextgen/labservices/v20181015/get_user.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/labservices/v20181015/get_user.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/labservices/v20181015/get_user.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 36.651376 | 235 | 0.647184 |
fc857d018095843ba15b6d03216227c9d0c381af | 2,578 | py | Python | resolwe_bio/tests/workflows/test_shrna.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/workflows/test_shrna.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | resolwe_bio/tests/workflows/test_shrna.py | HudoGriz/resolwe-bio | 4f7363cfa7d9d5a43f1a70ef36c69be3faed7fea | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring
from resolwe.test import tag_process
from resolwe.flow.models import Data
from resolwe_bio.utils.test import KBBioProcessTestCase
class SHRNATestCase(KBBioProcessTestCase):
@tag_process('workflow-trim-align-quant')
def test_run_trim_align_quant(self):
with self.prep... | 42.966667 | 116 | 0.551202 |
569959ae1b7bf2a0ce23e9e86eb44d65f783e697 | 3,437 | py | Python | machine-learning/ml-projects/stereo-scan-v2/models/double-scan-v3/unet_normal.py | olaals/masteroppgave2 | 9fc181325b6e3ef74d81cdb323d3e47a79bb889e | [
"MIT"
] | null | null | null | machine-learning/ml-projects/stereo-scan-v2/models/double-scan-v3/unet_normal.py | olaals/masteroppgave2 | 9fc181325b6e3ef74d81cdb323d3e47a79bb889e | [
"MIT"
] | null | null | null | machine-learning/ml-projects/stereo-scan-v2/models/double-scan-v3/unet_normal.py | olaals/masteroppgave2 | 9fc181325b6e3ef74d81cdb323d3e47a79bb889e | [
"MIT"
] | 2 | 2021-09-17T12:26:04.000Z | 2021-09-27T12:59:55.000Z | import torch
from torch import nn
import numpy as np
class Unet2D(nn.Module):
def __init__(self, in_channels, out_channels, channel_ratio=1):
super().__init__()
ch = np.array([32, 64, 128, 256, 512])
ch = channel_ratio*ch
ch = ch.round().astype(int)
self.ch = ch
... | 34.717172 | 131 | 0.606052 |
4a37e769b72f3424982a7c3b313779f523250b9d | 501 | py | Python | beautiful_fields/validators.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | beautiful_fields/validators.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | beautiful_fields/validators.py | Excentrics/beautiful-fields | 7117cde6ac5646a5d65e166706b94898946a92b7 | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from phonenumbers import parse
from phonenumbers.phonenumberutil import NumberParseException
from beautiful_fields.phonenumber import PhoneNumber, to_python
def validate_international_phone... | 38.538462 | 75 | 0.808383 |
a6fc2919689a7d758b431220895f212e3de49cb9 | 1,534 | py | Python | airflow/providers/redis/sensors/redis_key.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | 4 | 2020-02-16T18:13:54.000Z | 2021-01-01T03:22:19.000Z | airflow/providers/redis/sensors/redis_key.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | 14 | 2019-11-22T09:24:20.000Z | 2021-07-09T06:06:59.000Z | airflow/providers/redis/sensors/redis_key.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:05.000Z | 2022-02-16T21:53:10.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.35 | 74 | 0.740548 |
6c13e302cc54cacfb97a59024624c088e7ec3337 | 21,261 | py | Python | bleak/backends/dotnet/client.py | kupiakos/bleak | 11e7adf1ae1774b22667fcc4e6533ad69597951a | [
"MIT"
] | null | null | null | bleak/backends/dotnet/client.py | kupiakos/bleak | 11e7adf1ae1774b22667fcc4e6533ad69597951a | [
"MIT"
] | 4 | 2019-12-06T13:36:16.000Z | 2022-02-14T09:34:48.000Z | bleak/backends/dotnet/client.py | kupiakos/bleak | 11e7adf1ae1774b22667fcc4e6533ad69597951a | [
"MIT"
] | 4 | 2020-01-15T10:45:55.000Z | 2022-02-07T09:07:53.000Z | # -*- coding: utf-8 -*-
"""
BLE Client for Windows 10 systems.
Created on 2017-12-05 by hbldh <henrik.blidh@nedomkull.com>
"""
import logging
import asyncio
from asyncio.events import AbstractEventLoop
from functools import wraps
from typing import Callable, Any
from bleak.exc import BleakError, BleakDotNetTaskError... | 37.16958 | 119 | 0.615493 |
5df0dd5e295594e022a6e36b6fb433dc353513fe | 4,895 | py | Python | portfolio/Python/scrapy/shoemetro/shoesteal.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/shoemetro/shoesteal.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/shoemetro/shoesteal.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | 5 | 2016-03-22T07:40:46.000Z | 2021-05-30T16:12:21.000Z | import csv
import os
import copy
import shutil
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse, FormRequest
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from scrapy.http.cookies import CookieJar
... | 53.206522 | 152 | 0.561798 |
4ca0fdc0281f2aa15086db9c56ef3cf1040ffbc4 | 1,956 | py | Python | pycmo/bin/agent.py | duyminh1998/pycmo | d863794e207414b4356c8c538db586176e45b91f | [
"MIT"
] | 7 | 2021-09-29T04:08:02.000Z | 2022-03-11T01:48:12.000Z | pycmo/bin/agent.py | duyminh1998/pycmo | d863794e207414b4356c8c538db586176e45b91f | [
"MIT"
] | 5 | 2021-08-19T19:25:10.000Z | 2022-03-03T13:39:26.000Z | pycmo/bin/agent.py | duyminh1998/pycmo | d863794e207414b4356c8c538db586176e45b91f | [
"MIT"
] | 4 | 2022-02-26T07:59:00.000Z | 2022-03-11T01:48:18.000Z | # Author: Minh Hua
# Date: 08/22/2021
# Purpose: Run an agent.
from pycmo.lib.run_loop import *
from pycmo.agents.random_agent import RandomAgent
from pycmo.agents.rule_based_agent import RuleBasedAgent
from pycmo.agents.scripted_agent import ScriptedAgent
from pycmo.configs import config
import argparse
def main(pla... | 39.918367 | 157 | 0.701943 |
9b8c2285ebd9452e2eda21e8f133b2d8a1e2c4ab | 991 | py | Python | lib/surface/network_services/tls_routes/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/network_services/tls_routes/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/network_services/tls_routes/__init__.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.392857 | 74 | 0.773966 |
6e9338281b0a1bb50df028dc4c8412e1bd9781cb | 1,263 | py | Python | allauth/socialaccount/providers/other/hubic/provider.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/other/hubic/provider.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/other/hubic/provider.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | import requests
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.core.oauth2.provider import OAuth2Provider
class HubicAccount(ProviderAccount):
pass
class HubicProvider(OAuth2Provider):
id = 'hubic'
name = 'Hubic'
account_class = HubicAccount
... | 31.575 | 122 | 0.673001 |
cfa2fde71703b900ec93f9a863075934a2c1a83b | 2,056 | py | Python | Bugscan_exploits-master/exp_list/exp-1985.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-1985.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-1985.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#author:小光
#refer:http://www.wooyun.org/bugs/wooyun-2015-0143430
import re
def assign(service, arg):
if service == "hanweb":
return True, arg
def audit(arg):
getdata1 = 'vipchat/VerifyCodeServlet?var=clusterid'
code, head, res, errcode... | 32.634921 | 141 | 0.660992 |
93641abec37afd128cb255528447afb6eb9d2aae | 1,432 | py | Python | setup.py | mgesoftware/mge-graphql | 25fb74ef29b5c792a51793ab66b0f4175fb5b324 | [
"BSD-3-Clause"
] | 2 | 2022-01-26T02:22:50.000Z | 2022-02-03T22:38:52.000Z | setup.py | mgesoftware/mge-graphql | 25fb74ef29b5c792a51793ab66b0f4175fb5b324 | [
"BSD-3-Clause"
] | null | null | null | setup.py | mgesoftware/mge-graphql | 25fb74ef29b5c792a51793ab66b0f4175fb5b324 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='mge_graphql',
version='1.1.0',
license='BSD 3-Clause "New" or "Revised"',
author="Alexandru Plesoiu",
author_email='alexandru@mgesoftware.com',
des... | 39.777778 | 119 | 0.653631 |
8f7351e35c901f78b267fed6a9e1782ab6f3c95e | 1,008 | py | Python | optalg/line_search/bisection_wolfe.py | ShkalikovOleh/OptAlg | 03399eee50203dcba834a4d9ab48751142a6de2b | [
"MIT"
] | null | null | null | optalg/line_search/bisection_wolfe.py | ShkalikovOleh/OptAlg | 03399eee50203dcba834a4d9ab48751142a6de2b | [
"MIT"
] | 3 | 2021-01-31T09:34:50.000Z | 2021-02-21T09:01:42.000Z | optalg/line_search/bisection_wolfe.py | ShkalikovOleh/OptAlg | 03399eee50203dcba834a4d9ab48751142a6de2b | [
"MIT"
] | 1 | 2022-03-31T14:02:20.000Z | 2022-03-31T14:02:20.000Z | import numpy as np
from typing import Callable
from autograd import grad as agrad
from .line_searcher import LineSearcher
class BisectionWolfe(LineSearcher):
"""
Bisection method that either computes a step size
satisfying the weak Wolfe conditions or sends
the function values to -inf
"""
def... | 25.846154 | 68 | 0.488095 |
561966b11e493fcd88de8d147d3eb87d50b1c979 | 12,886 | py | Python | otp/namepanel/NameTumbler.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | otp/namepanel/NameTumbler.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | otp/namepanel/NameTumbler.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import *
from direct.showbase import DirectObject
import random
from direct.task import Task
from direct.gui.DirectGui import *
import string
from direct.gui import OnscreenText
class NameTumbler(DirectFrame):
def __init__(self, nameList, category):
DirectFrame.__init__(self, pare... | 82.076433 | 739 | 0.287211 |
491fb72d1bd76826e7f1d45841bef0b9517e09e7 | 3,568 | py | Python | flask_monitoringdashboard/core/config/parser.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | null | null | null | flask_monitoringdashboard/core/config/parser.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | null | null | null | flask_monitoringdashboard/core/config/parser.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | 1 | 2020-11-21T01:25:51.000Z | 2020-11-21T01:25:51.000Z | """
Helper functions for parsing the arguments from the config file
"""
import ast
import os
from flask_monitoringdashboard.core.logger import log
def parse_version(parser, header, version):
"""
Parse the version given in the config-file.
If both GIT and VERSION are used, the GIT argument is used.
... | 37.557895 | 97 | 0.677971 |
4c935e9c346140de9b820e43097e9d12ccb38216 | 38,444 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_assets.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_assets.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/test_assets.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | import os
import time
from dagster_graphql.client.query import (
LAUNCH_PIPELINE_EXECUTION_MUTATION,
LAUNCH_PIPELINE_REEXECUTION_MUTATION,
)
from dagster_graphql.test.utils import (
execute_dagster_graphql,
infer_job_or_pipeline_selector,
infer_pipeline_selector,
infer_repository_selector,
)
f... | 36.753346 | 99 | 0.601966 |
354e36ed619b6cf028203a1a33deb14ad56fbb0d | 36,275 | py | Python | libpy/durable/engine.py | pauljurczak/rules | 72070f4d686142dcc44ee26a6cad0e8c531f9d24 | [
"MIT"
] | 1,045 | 2015-01-05T16:11:45.000Z | 2022-03-31T10:48:53.000Z | libpy/durable/engine.py | subhasis-dev/rules | 2b1020d5f73785ea0e944fc8f9641056e0d9ef59 | [
"MIT"
] | 370 | 2015-02-08T20:11:01.000Z | 2022-02-09T18:59:10.000Z | libpy/durable/engine.py | subhasis-dev/rules | 2b1020d5f73785ea0e944fc8f9641056e0d9ef59 | [
"MIT"
] | 222 | 2015-03-19T18:17:46.000Z | 2022-03-06T00:54:30.000Z | import json
import copy
import durable_rules_engine
import threading
import inspect
import random
import time
import datetime
import os
import sys
import traceback
from . import logger
def _unix_now():
dt = datetime.datetime.now()
epoch = datetime.datetime.utcfromtimestamp(0)
delta = dt - epoch
return... | 37.55176 | 161 | 0.564576 |
94141393796c6fb66523e0bde45d8a2ac773d4d4 | 25,947 | py | Python | arguments.py | puraminy/GLM | f18acd842507341a5cbcf0f39095ecc635018eb9 | [
"MIT"
] | null | null | null | arguments.py | puraminy/GLM | f18acd842507341a5cbcf0f39095ecc635018eb9 | [
"MIT"
] | null | null | null | arguments.py | puraminy/GLM | f18acd842507341a5cbcf0f39095ecc635018eb9 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 54.510504 | 119 | 0.623425 |
3b717949342d62f8e8a3732b0649509a69e6232e | 1,763 | py | Python | tools/create_version_h.py | linear-rpc/linear-cpp | 9f3b2a924a11848829f00e325b5449db0a4c6e30 | [
"MIT"
] | 19 | 2015-09-02T03:25:55.000Z | 2021-03-07T15:02:33.000Z | tools/create_version_h.py | linear-rpc/linear-cpp | 9f3b2a924a11848829f00e325b5449db0a4c6e30 | [
"MIT"
] | 2 | 2015-12-11T12:03:11.000Z | 2017-09-13T09:03:33.000Z | tools/create_version_h.py | linear-rpc/linear-cpp | 9f3b2a924a11848829f00e325b5449db0a4c6e30 | [
"MIT"
] | 6 | 2015-11-25T08:55:51.000Z | 2021-03-07T15:02:36.000Z | #!/usr/bin/env python
from create_header import do_replace
import optparse
import re
import string
import subprocess
import sys
# for creating version.h
GET_COMMIT_ID = 'git log --pretty=format:%H -1'
VERSION_ID_KEY = '@LINEAR_VERSION_ID@'
COMMIT_ID_KEY = '@LINEAR_COMMIT_ID@'
_usage = 'usage: %prog [options]'
def ... | 28.901639 | 80 | 0.609189 |
9de477417b3c368883b0c5f60886bb5d8d891b7f | 2,101 | py | Python | agsadmin/rest_admin/system/Directories.py | christopherblanchfield/agsadmin | 989cb3795aacf285ccf74ee51b0de26bf2f48bc3 | [
"BSD-3-Clause"
] | 2 | 2015-12-07T05:53:29.000Z | 2020-09-13T18:12:15.000Z | agsadmin/rest_admin/system/Directories.py | christopherblanchfield/agsadmin | 989cb3795aacf285ccf74ee51b0de26bf2f48bc3 | [
"BSD-3-Clause"
] | 4 | 2015-03-09T05:59:14.000Z | 2018-01-09T00:12:56.000Z | agsadmin/rest_admin/system/Directories.py | christopherblanchfield/agsadmin | 989cb3795aacf285ccf74ee51b0de26bf2f48bc3 | [
"BSD-3-Clause"
] | 5 | 2015-03-09T01:05:24.000Z | 2019-09-09T23:01:21.000Z | from __future__ import (absolute_import, division, print_function, unicode_literals)
from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str,
super, zip)
from ..._endpoint_base import EndpointBase
from ..._utils import send_session_requ... | 35.610169 | 144 | 0.630652 |
d237784cbcc411dccc301df26927cab8d1c83520 | 7,150 | py | Python | ansible_collections/community/general/plugins/modules/gitlab_protected_branch.py | zenmerlin/ansible-workstation-configs | a44f7816344a3d82e94050ff7c3a8edb9c054b37 | [
"MIT"
] | 1 | 2022-02-24T18:15:56.000Z | 2022-02-24T18:15:56.000Z | ansible_collections/community/general/plugins/modules/source_control/gitlab/gitlab_protected_branch.py | zenmerlin/ansible-workstation-configs | a44f7816344a3d82e94050ff7c3a8edb9c054b37 | [
"MIT"
] | null | null | null | ansible_collections/community/general/plugins/modules/source_control/gitlab/gitlab_protected_branch.py | zenmerlin/ansible-workstation-configs | a44f7816344a3d82e94050ff7c3a8edb9c054b37 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Werner Dijkerman (ikben@werner-dijkerman.nl)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
module: g... | 35.572139 | 145 | 0.694406 |
13c3e3500903f58c77433f01fef8647f066216d4 | 2,272 | py | Python | btshowmetainfo.py | crossbrowsertesting/BitTornado | 30b8da65ec620573351838e0281b3c9c9dc0982b | [
"MIT"
] | 1 | 2020-06-01T06:16:03.000Z | 2020-06-01T06:16:03.000Z | btshowmetainfo.py | crossbrowsertesting/BitTornado | 30b8da65ec620573351838e0281b3c9c9dc0982b | [
"MIT"
] | null | null | null | btshowmetainfo.py | crossbrowsertesting/BitTornado | 30b8da65ec620573351838e0281b3c9c9dc0982b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Written by Henry 'Pi' James and Loring Holden
# modified for multitracker display by John Hoffman
# see LICENSE.txt for license information
import sys
import os
import hashlib
from BitTornado.Meta.Info import MetaInfo
from BitTornado.Meta.bencode import bencode
NAME, EXT = os.path.splitext(o... | 35.5 | 76 | 0.590669 |
9d3341955b8d7e2cea618950d95e99490b6f62e9 | 3,377 | py | Python | quizz/quizz/settings.py | paramsiddharth/Quiz-App | 29b6a6ba05da22137bd9e82dc48665d8cb382c83 | [
"MIT"
] | null | null | null | quizz/quizz/settings.py | paramsiddharth/Quiz-App | 29b6a6ba05da22137bd9e82dc48665d8cb382c83 | [
"MIT"
] | null | null | null | quizz/quizz/settings.py | paramsiddharth/Quiz-App | 29b6a6ba05da22137bd9e82dc48665d8cb382c83 | [
"MIT"
] | 1 | 2021-09-15T11:52:03.000Z | 2021-09-15T11:52:03.000Z | """
Django settings for quizz project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# B... | 25.976923 | 91 | 0.694699 |
0c5dabb6eeb0aa0401df078b53794c42299dedfa | 7,807 | py | Python | homeassistant/components/mailbox/__init__.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 1 | 2019-04-22T06:05:09.000Z | 2019-04-22T06:05:09.000Z | homeassistant/components/mailbox/__init__.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mailbox/__init__.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 1 | 2021-09-20T01:52:31.000Z | 2021-09-20T01:52:31.000Z | """
Provides functionality for mailboxes.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/mailbox/
"""
import asyncio
from contextlib import suppress
from datetime import timedelta
import logging
from aiohttp import web
from aiohttp.web_exceptions impor... | 30.377432 | 78 | 0.654669 |
96f4e809e791f6ecb7a441d95cbedd7403d63fd4 | 4,022 | py | Python | dscribe/setup.py | rartino/hands-on-2 | 8f31b978f295a761dc0a7ae093184b3dbfa7e199 | [
"MIT"
] | null | null | null | dscribe/setup.py | rartino/hands-on-2 | 8f31b978f295a761dc0a7ae093184b3dbfa7e199 | [
"MIT"
] | null | null | null | dscribe/setup.py | rartino/hands-on-2 | 8f31b978f295a761dc0a7ae093184b3dbfa7e199 | [
"MIT"
] | 1 | 2021-09-18T21:26:30.000Z | 2021-09-18T21:26:30.000Z | import sys
# Check python version
if sys.version_info[:2] < (3, 0):
raise RuntimeError("Python version >= 3.0 required.")
import platform
from distutils.ccompiler import new_compiler
from distutils.sysconfig import customize_compiler
from setuptools import setup, find_packages, Extension
from subprocess import ge... | 37.240741 | 139 | 0.636251 |
0e66e4eafe407b5c9328759272e60f4b2ef32cc7 | 1,922 | py | Python | bts/tests.py | chkgk/otree_bayesian_truth_serum | 793d79d29b9776e5b87569c381ea2d166ab1a60b | [
"MIT"
] | 1 | 2020-10-27T19:06:30.000Z | 2020-10-27T19:06:30.000Z | bts/tests.py | chkgk/otree_bayesian_truth_serum | 793d79d29b9776e5b87569c381ea2d166ab1a60b | [
"MIT"
] | null | null | null | bts/tests.py | chkgk/otree_bayesian_truth_serum | 793d79d29b9776e5b87569c381ea2d166ab1a60b | [
"MIT"
] | null | null | null | from otree.api import Currency as c, currency_range, SubmissionMustFail
from . import pages
from ._builtin import Bot
from .models import Constants
class PlayerBot(Bot):
def play_round(self):
submissions = {
1: {'question': 2, 'prediction1': 0.1, 'prediction2': 0.2, 'prediction3': 0.3, 'predic... | 49.282051 | 123 | 0.615505 |
ed8f30040358c15f9701b64005e35573a9b32a99 | 1,100 | py | Python | test/test_tofts.py | physimals/fabber_models_dce | e65e9e13ca912cda2fa64169c885bc77e1cc5bb2 | [
"Apache-2.0"
] | null | null | null | test/test_tofts.py | physimals/fabber_models_dce | e65e9e13ca912cda2fa64169c885bc77e1cc5bb2 | [
"Apache-2.0"
] | null | null | null | test/test_tofts.py | physimals/fabber_models_dce | e65e9e13ca912cda2fa64169c885bc77e1cc5bb2 | [
"Apache-2.0"
] | 2 | 2020-07-22T12:27:20.000Z | 2020-08-26T08:01:57.000Z | #!/bin/env python
import os, sys
import traceback
import math
from fabber import self_test, FabberException
TEST_DATA = {
"dce_tofts" : [
{
"convergence" : "trialmode",
"max-trials" : 20,
"max-iterations" : 30,
"aif" : "orton",
"delt" : 0.1,
... | 22.44898 | 83 | 0.461818 |
85a8cd0495ba88a050bf4610cbe538811a284cf2 | 13,355 | py | Python | Lib/tkinter/test/test_tkinter/test_images.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 1,872 | 2015-01-02T18:56:47.000Z | 2022-03-31T07:34:39.000Z | Lib/tkinter/test/test_tkinter/test_images.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 675 | 2015-02-27T09:01:01.000Z | 2022-03-31T14:03:25.000Z | Lib/tkinter/test/test_tkinter/test_images.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | import unittest
import tkinter
from test import support
from tkinter.test.support import AbstractTkTest, requires_tcl
support.requires('gui')
class MiscTest(AbstractTkTest, unittest.TestCase):
def test_image_types(self):
image_types = self.root.image_types()
self.assertIsInstance(image_types, tu... | 40.716463 | 80 | 0.594908 |
748ed28868581a95b707b4d1a4f4d1ceb756396d | 401 | py | Python | arcade_solutions/intro/alternating_sums.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/intro/alternating_sums.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | arcade_solutions/intro/alternating_sums.py | nickaigi/automatic-dollop | eb8222475c7871c1d5710242c5aed8c70ea0d2c8 | [
"Unlicense"
] | null | null | null | def alternating_sums(a):
even, odd = [], []
for i in range(len(a)):
if i % 2 == 0:
even.append(a[i])
else:
odd.append(a[i])
return [sum(even), sum(odd)]
def alternating_sums_short(a):
return [
sum(a[::2]), sum(a[1::2])
]
if __name__ == '__main__':
... | 21.105263 | 33 | 0.511222 |
2d2901dd594ece7bdea77f11d64a1007ab5076ff | 1,077 | py | Python | moonmining/tests/testdata/load_eveuniverse.py | buahaha/aa-moonmining | 475888fed7b6f4ad3120ccd03148f2b4b84b0a71 | [
"MIT"
] | null | null | null | moonmining/tests/testdata/load_eveuniverse.py | buahaha/aa-moonmining | 475888fed7b6f4ad3120ccd03148f2b4b84b0a71 | [
"MIT"
] | null | null | null | moonmining/tests/testdata/load_eveuniverse.py | buahaha/aa-moonmining | 475888fed7b6f4ad3120ccd03148f2b4b84b0a71 | [
"MIT"
] | null | null | null | import json
from eveuniverse.models import EveMoon, EveType
from eveuniverse.tools.testdata import load_testdata_from_dict
from . import test_data_filename
def _load_eveuniverse_from_file():
with open(test_data_filename(), "r", encoding="utf-8") as f:
data = json.load(f)
return data
eveuniverse_t... | 27.615385 | 75 | 0.67688 |
366d9afddfe618079c44af729f140591ca273fdc | 1,445 | py | Python | reto-04/PalyPalillo/src/configurator.py | rburgosm/reto-python | d2da1456be159c22604fbf4ed7e5f815cb676b74 | [
"MIT"
] | 18 | 2022-02-14T19:15:21.000Z | 2022-03-29T12:56:18.000Z | reto-04/PalyPalillo/src/configurator.py | rburgosm/reto-python | d2da1456be159c22604fbf4ed7e5f815cb676b74 | [
"MIT"
] | 22 | 2022-03-05T23:48:04.000Z | 2022-03-31T04:33:58.000Z | reto-04/PalyPalillo/src/configurator.py | rburgosm/reto-python | d2da1456be159c22604fbf4ed7e5f815cb676b74 | [
"MIT"
] | 21 | 2022-02-16T17:52:05.000Z | 2022-03-28T20:13:46.000Z | import os
from pathlib import Path
import toml
class Configurator:
def __init__(self, path, config):
self.path=path
self.config=config
self.check_conf()
def getconfig(self):
if 'XDG_CONFIG_HOME' in os.environ:
return os.environ['XDG_CONFIG_HOME']
else:
... | 32.111111 | 85 | 0.577855 |
54f5d8d6c2b32e3ecbd75c6b3209123f02ba7e61 | 9,052 | py | Python | themes/qutebrowser/themes/default/base16-atelier-seaside-light.config.py | base16-fork/base16-fork | 79856b7e6195dde0874a9e6d191101ac6c5c74f5 | [
"MIT"
] | 95 | 2018-05-28T18:06:48.000Z | 2022-03-14T21:36:05.000Z | themes/qutebrowser/themes/default/base16-atelier-seaside-light.config.py | base16-fork/base16-fork | 79856b7e6195dde0874a9e6d191101ac6c5c74f5 | [
"MIT"
] | 18 | 2018-08-26T00:57:20.000Z | 2022-02-19T08:29:29.000Z | themes/qutebrowser/themes/default/base16-atelier-seaside-light.config.py | base16-fork/base16-fork | 79856b7e6195dde0874a9e6d191101ac6c5c74f5 | [
"MIT"
] | 20 | 2018-06-21T12:41:47.000Z | 2022-03-04T22:06:20.000Z | # base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova
# Atelier Seaside Light scheme by Bram de Haan (http://atelierbramdehaan.nl)
base00 = "#f4fbf4"
base01 = "#cfe8cf"
base02 = "#8ca68c"
base03 = "#809980"
base04 = "#687d68"
base05 = "#5e6e5e"
base06 = "#242924"
b... | 30.07309 | 95 | 0.771653 |
fd7d4212c83460c6473874a7a44dd022d5a3bb9c | 62 | py | Python | __init__.py | a-maumau/notificator | 79f9ca62476c5e0c45ebd16beb8ef82f8541a80e | [
"MIT"
] | 1 | 2018-01-31T00:54:44.000Z | 2018-01-31T00:54:44.000Z | __init__.py | a-maumau/notificator | 79f9ca62476c5e0c45ebd16beb8ef82f8541a80e | [
"MIT"
] | null | null | null | __init__.py | a-maumau/notificator | 79f9ca62476c5e0c45ebd16beb8ef82f8541a80e | [
"MIT"
] | null | null | null | __all__ = ['notificator']
from .notificator import Notificator | 31 | 36 | 0.806452 |
3b87b97a7e7468b6c663bdd2085ad5943de04bac | 911 | py | Python | profiles_api/permissions.py | AitorPo/profiles-rest-api | 66f6505957dbf728707325836ef5b2e88d067e72 | [
"MIT"
] | null | null | null | profiles_api/permissions.py | AitorPo/profiles-rest-api | 66f6505957dbf728707325836ef5b2e88d067e72 | [
"MIT"
] | null | null | null | profiles_api/permissions.py | AitorPo/profiles-rest-api | 66f6505957dbf728707325836ef5b2e88d067e72 | [
"MIT"
] | null | null | null | from rest_framework import permissions
# This file checks if the user has permissions (or is authenticated) for doing some operations
# by comparing user's id whose made the request with obj's id in the db
class UpdateOwnProfile(permissions.BasePermission):
"""Allow users to edit their own profile"""
def has_... | 36.44 | 94 | 0.709111 |
6780dc479aea20404282ecf090627c416281ad90 | 1,219 | py | Python | p_library/migrations/0001_initial.py | StalingradTeam/my_lib_with_media | 7bbe45c9615c87bea24ae48b4e126506548dda29 | [
"MIT"
] | null | null | null | p_library/migrations/0001_initial.py | StalingradTeam/my_lib_with_media | 7bbe45c9615c87bea24ae48b4e126506548dda29 | [
"MIT"
] | null | null | null | p_library/migrations/0001_initial.py | StalingradTeam/my_lib_with_media | 7bbe45c9615c87bea24ae48b4e126506548dda29 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-12-09 13:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',
f... | 34.828571 | 115 | 0.545529 |
e90e858d8d12886bef76b2dc8381cfe4868dbaa1 | 21,638 | py | Python | qa/rpc-tests/test_framework/util.py | SAFE-anwang/safe | a1b358ac333895b85b28e6b1d7835bf4257aae6e | [
"MIT"
] | 58 | 2018-02-04T20:50:42.000Z | 2021-02-09T07:23:56.000Z | qa/rpc-tests/test_framework/util.py | SAFE-anwang/safe | a1b358ac333895b85b28e6b1d7835bf4257aae6e | [
"MIT"
] | 3 | 2018-02-06T06:06:24.000Z | 2018-12-20T13:38:44.000Z | qa/rpc-tests/test_framework/util.py | CryptoCoinLab/safe | d835b91c94d0c2c89b80f7f58576ea916b35d874 | [
"MIT"
] | 47 | 2018-01-24T01:02:52.000Z | 2020-07-20T20:55:03.000Z | # Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2014-2017 The Dash Core developers
# Copyright (c) 2018-2018 The Safe Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helpful routines ... | 35.298532 | 153 | 0.651955 |
838f54a67018fa736881bc23f38e3f525f678258 | 1,126 | py | Python | Ene-Jun-2018/Luis Carielo/Práctica 5/hardwood.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ene-Jun-2018/Luis Carielo/Práctica 5/hardwood.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | Ene-Jun-2018/Luis Carielo/Práctica 5/hardwood.py | Andremm303/DAS_Sistemas | 0163505737e2b24365ea8b4e8135773a6801add4 | [
"MIT"
] | null | null | null | #variable que guardará los árboles
trees = {}
#variable que guardará el número de casos
num_casos = int(input())
#variable que guarda los renglones vacíos
vacio = input()
#ciclo para recorrer los casos
for x in range(num_casos):
#limpiar la lista cada que haga un bucle el for
trees.clear()
cien_porciento =... | 26.186047 | 76 | 0.627886 |
86f577b50b6fe57170cd853cecab67388689ca6e | 2,222 | py | Python | get_keys.py | chungchris/cloud-system-reconfiguration-tool | d3a564703c449ffe3d2c1c087a124599b43eed9e | [
"MIT"
] | null | null | null | get_keys.py | chungchris/cloud-system-reconfiguration-tool | d3a564703c449ffe3d2c1c087a124599b43eed9e | [
"MIT"
] | null | null | null | get_keys.py | chungchris/cloud-system-reconfiguration-tool | d3a564703c449ffe3d2c1c087a124599b43eed9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
## Chris @ DCSLAB, NCTU
## get_keys.py
## Get the provider list through specified xml file or GUI
###########################################################################
from optparse import OptionParser
from thre... | 32.676471 | 128 | 0.644464 |
a37ef94e9983e45cadb693b70f371a023fb038c4 | 1,992 | py | Python | source/tornado-botocore-1.0.2/setup.py | bananabandy/serverless-image-handler | 8821add16e49198d21d6bfd8ba2d5191a153f3bc | [
"BSD-2-Clause"
] | null | null | null | source/tornado-botocore-1.0.2/setup.py | bananabandy/serverless-image-handler | 8821add16e49198d21d6bfd8ba2d5191a153f3bc | [
"BSD-2-Clause"
] | null | null | null | source/tornado-botocore-1.0.2/setup.py | bananabandy/serverless-image-handler | 8821add16e49198d21d6bfd8ba2d5191a153f3bc | [
"BSD-2-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Python setup file for the nicedit app.
In order to register your app at pypi.python.org, create an account at
pypi.python.org and login, then register your new app like so:
python setup.py register
If your name is still free, you can now make your first release but first you
should ... | 29.294118 | 96 | 0.734438 |
5fe4978670aef5bbe16d0ed063f7c853208daf61 | 10,181 | py | Python | sparkly/session.py | Tubular/sparkly | 015dbc830648e20ffeb6bf95a94a760c1fb94b6d | [
"Apache-2.0"
] | 31 | 2016-12-03T06:54:54.000Z | 2018-09-08T01:03:57.000Z | sparkly/session.py | Tubular/sparkly | 015dbc830648e20ffeb6bf95a94a760c1fb94b6d | [
"Apache-2.0"
] | 23 | 2016-12-02T18:41:10.000Z | 2018-06-08T23:54:34.000Z | sparkly/session.py | Tubular/sparkly | 015dbc830648e20ffeb6bf95a94a760c1fb94b6d | [
"Apache-2.0"
] | 4 | 2016-12-31T19:15:21.000Z | 2018-02-12T04:44:59.000Z | #
# Copyright 2017 Tubular Labs, 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 ... | 39.769531 | 96 | 0.641587 |
38af4d7dfba0ed5e621a98678bf64c55e1c03659 | 1,095 | py | Python | inv/urls.py | darkdrei/Inventario | dc2dcc830be5a49ba602c242d8c7d5d9c24c7b5c | [
"MIT"
] | null | null | null | inv/urls.py | darkdrei/Inventario | dc2dcc830be5a49ba602c242d8c7d5d9c24c7b5c | [
"MIT"
] | null | null | null | inv/urls.py | darkdrei/Inventario | dc2dcc830be5a49ba602c242d8c7d5d9c24c7b5c | [
"MIT"
] | null | null | null | """inv URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | 40.555556 | 79 | 0.696804 |
d7418792f301404647fb7d9756f2146066167389 | 11,591 | py | Python | modin/pandas/test/test_general.py | pratheekrebala/modin | 97c47fbc986b0df24dabf6fa60700b2774824a1d | [
"Apache-2.0"
] | null | null | null | modin/pandas/test/test_general.py | pratheekrebala/modin | 97c47fbc986b0df24dabf6fa60700b2774824a1d | [
"Apache-2.0"
] | null | null | null | modin/pandas/test/test_general.py | pratheekrebala/modin | 97c47fbc986b0df24dabf6fa60700b2774824a1d | [
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 33.891813 | 88 | 0.607368 |
2d408f3e27534696deb37b85a52ab8bec0443f6d | 1,929 | py | Python | src/api/jobnavi/tests/data_makeup/test_check_allowed.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/api/jobnavi/tests/data_makeup/test_check_allowed.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/api/jobnavi/tests/data_makeup/test_check_allowed.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... | 52.135135 | 111 | 0.749093 |
41ed2b32801e2a7ff83e52c9e56d2fb6bd25c604 | 25,073 | py | Python | molsysmt/item/mmtf_MMTFDecoder/get.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/item/mmtf_MMTFDecoder/get.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/item/mmtf_MMTFDecoder/get.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | #######################################################################################
########### THE FOLLOWING LINES NEED TO BE CUSTOMIZED FOR EVERY CLASS ################
#######################################################################################
from molsysmt._private.execfile import execfile
from mol... | 29.019676 | 96 | 0.735931 |
3d141e0fca65fd5e413ac94969748a1535ee58a2 | 20,620 | py | Python | tests/integration_tests/test_chainermn.py | miyamamoto/optuna | 855f4ba5c6414eba20c03fed4bc9d4344979971b | [
"MIT"
] | 2 | 2020-05-04T11:26:02.000Z | 2020-07-18T12:59:58.000Z | tests/integration_tests/test_chainermn.py | miyamamoto/optuna | 855f4ba5c6414eba20c03fed4bc9d4344979971b | [
"MIT"
] | null | null | null | tests/integration_tests/test_chainermn.py | miyamamoto/optuna | 855f4ba5c6414eba20c03fed4bc9d4344979971b | [
"MIT"
] | null | null | null | import gc
import os
import pytest
from optuna import create_study
from optuna import distributions
from optuna import integration
from optuna.integration import ChainerMNStudy
from optuna import pruners
from optuna.storages import InMemoryStorage
from optuna.storages import RDBStorage
from optuna.structs import TrialP... | 38.25603 | 95 | 0.652716 |
8d6e4161a99ed716b7819f25ea6d91c7f3bf2f53 | 25,401 | py | Python | nonebot/command/__init__.py | MilkiceForks/nonebot | c13173dd2a37c5edb7ed79eb3c69aa7fce7a8e1d | [
"MIT"
] | null | null | null | nonebot/command/__init__.py | MilkiceForks/nonebot | c13173dd2a37c5edb7ed79eb3c69aa7fce7a8e1d | [
"MIT"
] | null | null | null | nonebot/command/__init__.py | MilkiceForks/nonebot | c13173dd2a37c5edb7ed79eb3c69aa7fce7a8e1d | [
"MIT"
] | null | null | null | import asyncio
import re
import shlex
from datetime import datetime
from typing import (
Tuple, Union, Callable, Iterable, Any, Optional, List, Dict,
Awaitable
)
from nonebot import NoneBot, permission as perm
from nonebot.command.argfilter import ValidateError
from nonebot.helpers import context_id, send, ren... | 36.339056 | 82 | 0.606512 |
5676c868fa4ac9207478c95d249379bd3b01a36d | 3,955 | py | Python | pystachio_smt/simulation.py | ejh516/pystachio-smt | 1a2f11140830b871963d47b94995268e84e5c1ec | [
"MIT"
] | 8 | 2021-05-05T12:17:21.000Z | 2022-03-04T14:38:36.000Z | pystachio_smt/simulation.py | awollman/pystachio-smt | 37f87e0a4b562c1465ab90d26a77998e8dd340fb | [
"MIT"
] | 1 | 2021-05-05T12:14:01.000Z | 2021-05-10T12:33:06.000Z | pystachio_smt/simulation.py | awollman/pystachio-smt | 37f87e0a4b562c1465ab90d26a77998e8dd340fb | [
"MIT"
] | 2 | 2021-08-18T19:33:05.000Z | 2022-03-21T10:55:52.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2020 Edward Higgins <ed.higgins@york.ac.uk>
#
# Distributed under terms of the MIT license.
""" SIMULATION - Dataset simulation module
Description:
simulation.py contains the code for the simulation task, which simulates
pseudo-e... | 35.630631 | 109 | 0.642478 |
31b533efe29437aebb403192cc4c2b8c32cbf3fd | 765 | py | Python | Lib/site-packages/nbformat/v4/__init__.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/nbformat/v4/__init__.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/nbformat/v4/__init__.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """The main API for the v4 notebook format."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
__all__ = [
"nbformat",
"nbformat_minor",
"nbformat_schema",
"new_code_cell",
"new_markdown_cell",
"new_notebook",
"new_output",
"output_f... | 19.125 | 58 | 0.682353 |
d5a099526c96afe31c17dc2cb24200379e605be6 | 2,163 | py | Python | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | 1 | 2021-06-23T03:03:30.000Z | 2021-06-23T03:03:30.000Z | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | null | null | null | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from potts import Potts_CTBN
class Glauber_CTBN(Potts_CTBN):
"""CTBN with Glauber dynamics."""
def __init__(self, **kwargs):
"""
Parameters
----------
beta : float
Inverse Glauber temperature.
tau: float
... | 23.010638 | 100 | 0.590846 |
21b37bc665204875af5bf23733782a5e969c4bf2 | 5,166 | py | Python | app/user/tests/test_user.py | ashok-kavungal/python-recipieAPI | bc509250754f9cd45509b8663338b59a237fea21 | [
"MIT"
] | 1 | 2020-07-07T09:01:31.000Z | 2020-07-07T09:01:31.000Z | app/user/tests/test_user.py | ashok-kavungal/python-recipieAPI | bc509250754f9cd45509b8663338b59a237fea21 | [
"MIT"
] | null | null | null | app/user/tests/test_user.py | ashok-kavungal/python-recipieAPI | bc509250754f9cd45509b8663338b59a237fea21 | [
"MIT"
] | 1 | 2020-10-29T08:05:02.000Z | 2020-10-29T08:05:02.000Z | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse('user:token')
ME_URL = reverse('user:me') #give acces to profile for... | 36.9 | 98 | 0.66144 |
57b41facee42e1849e183f9bb3265e254c4b0aae | 8,015 | py | Python | tests/integration/scheduler/test_error.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | 1 | 2016-08-21T21:19:12.000Z | 2016-08-21T21:19:12.000Z | tests/integration/scheduler/test_error.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | 2 | 2019-03-06T20:43:44.000Z | 2019-04-10T23:56:02.000Z | tests/integration/scheduler/test_error.py | yosnoop/salt | e0ab000ffa3dd197408f08e0b37bf54a87d04090 | [
"Apache-2.0"
] | 1 | 2020-04-10T20:18:40.000Z | 2020-04-10T20:18:40.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import copy
import logging
import os
import dateutil.parser as dateutil_parser
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.mixins import SaltReturnAssertsMixin
# Import Salt Testing Libs
f... | 30.591603 | 112 | 0.571678 |
b80bed2535b1b8cbbfdd4f7f0e0628d0ab2cccb9 | 6,878 | py | Python | src/hanlendar/gui/widget/noteswidget.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | src/hanlendar/gui/widget/noteswidget.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | src/hanlendar/gui/widget/noteswidget.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# 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
# t... | 33.067308 | 91 | 0.623873 |
adda04337e4c06bb524ea87f03283dd7f74ef81f | 1,406 | py | Python | examples/reporting/scalar_reporting.py | harrywang/clearml | d72a42b89feba761115103c51b73897f04ae61d7 | [
"Apache-2.0"
] | null | null | null | examples/reporting/scalar_reporting.py | harrywang/clearml | d72a42b89feba761115103c51b73897f04ae61d7 | [
"Apache-2.0"
] | null | null | null | examples/reporting/scalar_reporting.py | harrywang/clearml | d72a42b89feba761115103c51b73897f04ae61d7 | [
"Apache-2.0"
] | null | null | null | # ClearML - Example of manual graphs and statistics reporting
#
from clearml import Task, Logger
def report_scalars(logger):
# type: (Logger) -> ()
"""
reporting scalars to scalars section
:param logger: The task.logger to use for sending the scalars
"""
# report two scalar series on the same ... | 30.565217 | 92 | 0.668563 |
a91c4c3593e40f1a7ad2903be5f27fbe66bb6544 | 629 | py | Python | Python_lxf/Python_Basic_Operation/IO_Operate/StringIO_BytesIO.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 2 | 2019-01-24T15:06:59.000Z | 2019-01-25T07:34:45.000Z | Python_lxf/Python_Basic_Operation/IO_Operate/StringIO_BytesIO.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-12-23T09:45:11.000Z | 2019-12-23T09:45:11.000Z | Python_lxf/Python_Basic_Operation/IO_Operate/StringIO_BytesIO.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-07-18T14:21:35.000Z | 2019-07-18T14:21:35.000Z | # StringIO and BytesIO
# StringIO 就是在内存中读写str.
# 要把str写入StringIO, 先创建一个StringIO,
# 然后, 像文件一样写入
from io import StringIO
f = StringIO()
print(f.write('hello'))
print(f.getvalue())
print(f.write(', world!'))
print(f.getvalue())
# 要读取StringIO, 可以用一个str初始化StringIO
from io import StringIO
f = StringIO('Hello!\nHi\nGoodbye!... | 20.290323 | 56 | 0.715421 |
e86eecadc6f12086c9b9c9f21819fe1b979e1a46 | 1,991 | py | Python | data/test_data_file.py | SCECcode/albacore | 127f46d0f1d4953d980a92b4a7268e50231c24aa | [
"BSD-3-Clause"
] | null | null | null | data/test_data_file.py | SCECcode/albacore | 127f46d0f1d4953d980a92b4a7268e50231c24aa | [
"BSD-3-Clause"
] | null | null | null | data/test_data_file.py | SCECcode/albacore | 127f46d0f1d4953d980a92b4a7268e50231c24aa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
##
# Retrieve the data files and retrieve the content
# ./make_data_file.py > ii
# ./test_data_file.py > oo
# cat ii oo | sort | uniq -c |sort > zz
# should be 2x of every valid entries in the model
#
import getopt
import sys
import subprocess
import struct
import numpy as np
import pdb
di... | 23.151163 | 124 | 0.589653 |
910e5959981ab006a0ac8d64896d95b9b000ab64 | 16,556 | py | Python | Orbit.py | mtlam/Lab_Orbit | c43e681f5f2f00d4435b08695a7f2ab33acc6f2b | [
"BSD-3-Clause"
] | null | null | null | Orbit.py | mtlam/Lab_Orbit | c43e681f5f2f00d4435b08695a7f2ab33acc6f2b | [
"BSD-3-Clause"
] | null | null | null | Orbit.py | mtlam/Lab_Orbit | c43e681f5f2f00d4435b08695a7f2ab33acc6f2b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 21 17:49:21 2013
@author: Amit Vishwas
Minor edits by Michael Lam
"""
import numpy as np
from matplotlib import pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
#import mpl_toolkits.mplot3d.art3d as art3d
from matplotlib.patches import Ellipse
from m... | 35.758099 | 158 | 0.533341 |
1bfd647c274e0e89f2e962d26bc5810fdb277675 | 4,336 | py | Python | third_party/buildbot_8_4p1/buildbot/status/web/olpb.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | third_party/buildbot_8_4p1/buildbot/status/web/olpb.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | null | null | null | third_party/buildbot_8_4p1/buildbot/status/web/olpb.py | bopopescu/build | 4e95fd33456e552bfaf7d94f7d04b19273d1c534 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T11:05:06.000Z | 2020-07-23T11:05:06.000Z | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 36.436975 | 101 | 0.639299 |
e2a4251f83d34811bb309a83ae0689f531f48482 | 37,550 | py | Python | src/transformers/pipelines/base.py | deklanw/transformers | 38580455dea435acd4a261e788d237d3421d65b2 | [
"Apache-2.0"
] | 35 | 2021-08-30T09:31:41.000Z | 2021-12-21T11:30:49.000Z | src/transformers/pipelines/base.py | Hecim1984/transformers | 8e908c8c74f556a82534f4cf1e7a1b4f7b55d24c | [
"Apache-2.0"
] | 9 | 2021-06-08T22:35:33.000Z | 2021-10-04T08:53:44.000Z | src/transformers/pipelines/base.py | Hecim1984/transformers | 8e908c8c74f556a82534f4cf1e7a1b4f7b55d24c | [
"Apache-2.0"
] | 2 | 2021-08-31T09:09:59.000Z | 2021-09-10T07:59:03.000Z | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 40.594595 | 139 | 0.639574 |
994cbd62fe70dafe86f2c176beb4a43b3dcde109 | 522 | py | Python | cimcb/utils/dict_95ci.py | CIMCB/cimcb | 5d30f80423ed94e1068871b30e465b38d451581a | [
"MIT"
] | 5 | 2020-05-26T23:45:40.000Z | 2022-01-13T00:40:14.000Z | cimcb/utils/dict_95ci.py | CIMCB/cimcb | 5d30f80423ed94e1068871b30e465b38d451581a | [
"MIT"
] | 3 | 2020-10-20T09:03:18.000Z | 2021-11-01T14:22:05.000Z | cimcb/utils/dict_95ci.py | KevinMMendez/cimcb | fe831253b122ed0ff9e33cbd160ef721abee1e38 | [
"MIT"
] | 4 | 2020-10-12T07:17:43.000Z | 2022-03-28T06:28:44.000Z | import numpy as np
def dict_95ci(dict_list):
median_dict = {}
for key in dict_list.keys():
value = dict_list[key]
value_arr = np.array(value)
if np.isnan(value_arr).any() == True:
median_dict[key] = np.nan
else:
append_low = np.percentile(value_arr, 2.5)... | 30.705882 | 67 | 0.603448 |
638f46044f4281332db5ee4faab6d40bb48a4e8e | 4,693 | py | Python | classification/models/vgg_face_dag.py | ilyakava/ACGAN-PyTorch | a2ac29d4d297e091a9c6a80281767f796b390be2 | [
"MIT"
] | null | null | null | classification/models/vgg_face_dag.py | ilyakava/ACGAN-PyTorch | a2ac29d4d297e091a9c6a80281767f796b390be2 | [
"MIT"
] | null | null | null | classification/models/vgg_face_dag.py | ilyakava/ACGAN-PyTorch | a2ac29d4d297e091a9c6a80281767f796b390be2 | [
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
class Vgg_face_dag(nn.Module):
def __init__(self):
super(Vgg_face_dag, self).__init__()
self.meta = {'mean': [129.186279296875, 104.76238250732422, 93.59396362304688],
'std': [1, 1, 1],
'imageSize': [224, 224, 3]}
... | 44.273585 | 108 | 0.591732 |
105c1d6ba3c985271fb082fd2ccf25a149f053f0 | 774 | py | Python | tests/parse/test_yaml_parse.py | northwestwitch/mutacc | 1999bb9d75a78a543d2cec4df601387c89827a85 | [
"MIT"
] | 1 | 2021-12-16T19:29:23.000Z | 2021-12-16T19:29:23.000Z | tests/parse/test_yaml_parse.py | northwestwitch/mutacc | 1999bb9d75a78a543d2cec4df601387c89827a85 | [
"MIT"
] | 59 | 2018-11-27T16:19:28.000Z | 2021-12-01T16:42:31.000Z | tests/parse/test_yaml_parse.py | adrosenbaum/mutacc | 1999bb9d75a78a543d2cec4df601387c89827a85 | [
"MIT"
] | 1 | 2021-12-01T07:15:10.000Z | 2021-12-01T07:15:10.000Z | import pytest
from yaml import YAMLError
from ped_parser.exceptions import PedigreeError
from mutacc.parse.yaml_parse import yaml_parse, YAMLFieldsError
INVALID_YAML = "tests/fixtures/case_invalid_yaml.yaml"
INVALID_KEYS = "tests/fixtures/case_invalid_keys.yaml"
INVALID_KEYS2 = "tests/fixtures/case_invalid_keys2.yam... | 26.689655 | 63 | 0.773902 |
004b7acda5c8a403228679a30c7c01e1fee7f13f | 11,523 | py | Python | sdk/python/pulumi_azure_native/apimanagement/api_release.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/api_release.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/api_release.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__a... | 44.662791 | 1,458 | 0.653389 |
254d3c8b87ee67dabc7d5bb699a60bae95e1835d | 2,435 | py | Python | landlab/components/stream_power/examples/fastscape_sp_driver.py | joeljgeo/landlab | 1d2651c76a8a36a7a132f139638192df1823f8fb | [
"MIT"
] | null | null | null | landlab/components/stream_power/examples/fastscape_sp_driver.py | joeljgeo/landlab | 1d2651c76a8a36a7a132f139638192df1823f8fb | [
"MIT"
] | null | null | null | landlab/components/stream_power/examples/fastscape_sp_driver.py | joeljgeo/landlab | 1d2651c76a8a36a7a132f139638192df1823f8fb | [
"MIT"
] | null | null | null | '''
simple_sp_driver.py
A simple driver implementing Braun-Willett flow routing and then a
fastscape stream power component.
DEJH, 09/15/14
'''
from __future__ import print_function
from landlab.components import FlowAccumulator, StreamPowerEroder, FastscapeEroder
from landlab.plot.imshow import imshow_node_grid
imp... | 29.337349 | 114 | 0.747433 |
fb9c625aa72cfbf496254168c81fcc2655c3aa6a | 401 | py | Python | gestionStock/asgi.py | skyrred/Gestion | c38c4d1fa229f5b0e0ef2667ff98864a28dc3241 | [
"Apache-2.0"
] | null | null | null | gestionStock/asgi.py | skyrred/Gestion | c38c4d1fa229f5b0e0ef2667ff98864a28dc3241 | [
"Apache-2.0"
] | null | null | null | gestionStock/asgi.py | skyrred/Gestion | c38c4d1fa229f5b0e0ef2667ff98864a28dc3241 | [
"Apache-2.0"
] | null | null | null | """
ASGI config for gestionStock project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
e9c8a9c210f7c585c12eb9d810416986adae0b36 | 4,741 | py | Python | vaizlabs/settings/base.py | vaizguy/vaizlabs-heroku | c4b55c7aea06e840b3b46570856fb1d1ed21f28c | [
"CC-BY-4.0"
] | null | null | null | vaizlabs/settings/base.py | vaizguy/vaizlabs-heroku | c4b55c7aea06e840b3b46570856fb1d1ed21f28c | [
"CC-BY-4.0"
] | 6 | 2020-02-12T00:00:36.000Z | 2022-03-11T23:17:40.000Z | vaizlabs/settings/base.py | vaizguy/vaizlabs-heroku | c4b55c7aea06e840b3b46570856fb1d1ed21f28c | [
"CC-BY-4.0"
] | null | null | null | """
Django settings for vaizlabs project on Heroku. For more info, see:
https://github.com/heroku/heroku-django-template
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/setting... | 30.197452 | 91 | 0.69479 |
6cc44711bc0c4aa044c939b5c3a697ac39d07f97 | 3,540 | py | Python | examples/benchmarks/bragg/bragg_empy.py | joamatab/emepy | 6b3119a4355ff70d7cfd3fdf18224920c22be937 | [
"MIT"
] | null | null | null | examples/benchmarks/bragg/bragg_empy.py | joamatab/emepy | 6b3119a4355ff70d7cfd3fdf18224920c22be937 | [
"MIT"
] | null | null | null | examples/benchmarks/bragg/bragg_empy.py | joamatab/emepy | 6b3119a4355ff70d7cfd3fdf18224920c22be937 | [
"MIT"
] | null | null | null | from emepy.fd import MSEMpy # Requires Lumerical API
from emepy.eme import Layer, EME
import numpy as np
from matplotlib import pyplot as plt
import argparse
def bragg_empy(args):
num_periods = args.num_periods # Number of Periods for Bragg Grating
length = args.length # Length of each segment of BG, Peri... | 39.333333 | 120 | 0.669492 |
9ce44a639ef7100739e74369e48170c2779383e7 | 4,694 | py | Python | iam_syncr/amazon/buckets.py | realestate-com-au/iam_syncr | 874d9ad39d54775116f5ee5237983e149c664067 | [
"MIT"
] | 2 | 2015-04-01T01:03:59.000Z | 2015-07-17T07:31:15.000Z | iam_syncr/amazon/buckets.py | realestate-com-au/iam_syncr | 874d9ad39d54775116f5ee5237983e149c664067 | [
"MIT"
] | null | null | null | iam_syncr/amazon/buckets.py | realestate-com-au/iam_syncr | 874d9ad39d54775116f5ee5237983e149c664067 | [
"MIT"
] | null | null | null | from iam_syncr.amazon.documents import AmazonDocuments
from iam_syncr.amazon.common import AmazonMixin
from iam_syncr.errors import BadPolicy
from boto.s3.tagging import TagSet, Tags
from itertools import chain
import logging
import boto
log = logging.getLogger("iam_syncr.amazon.buckets")
class AmazonBuckets(AmazonM... | 42.288288 | 191 | 0.623562 |
11bfef780b844f8910d39d0452df8ed47b73c658 | 1,008 | py | Python | project/settings/base/secutiry.py | vo0doO/pydj-persweb | efcd6b7090230f7c0b9ec056008f6d1d9e876ed9 | [
"CC0-1.0"
] | null | null | null | project/settings/base/secutiry.py | vo0doO/pydj-persweb | efcd6b7090230f7c0b9ec056008f6d1d9e876ed9 | [
"CC0-1.0"
] | 4 | 2020-05-06T17:22:00.000Z | 2021-12-13T20:43:30.000Z | project/settings/base/secutiry.py | vo0doO/pydj-persweb | efcd6b7090230f7c0b9ec056008f6d1d9e876ed9 | [
"CC0-1.0"
] | null | null | null | # ПРЕДУПРЕЖДЕНИЕ О БЕЗОПАСНОСТИ: держите секретный ключ, используемый в производстве, в секрете!
# SECRET_KEY предоставляется через переменную окружения в OpenShift
# Безопасное значение, когда DJANGO_SECRET_KEY не может быть установлен
import os
SECRET_KEY = os.getenv(
'DJANGO_SECRET_KEY',
# безопасное значен... | 32.516129 | 104 | 0.735119 |
38261777503fc5e83b01917cd5c134255462eb9e | 6,078 | py | Python | src/sparsetorch/plotter.py | timotheehornek/sparsetorch | 212c4e38dc352af15eea9e72f011c974fd43eb53 | [
"MIT"
] | null | null | null | src/sparsetorch/plotter.py | timotheehornek/sparsetorch | 212c4e38dc352af15eea9e72f011c974fd43eb53 | [
"MIT"
] | null | null | null | src/sparsetorch/plotter.py | timotheehornek/sparsetorch | 212c4e38dc352af15eea9e72f011c974fd43eb53 | [
"MIT"
] | null | null | null | """This sub-module contains basic plotting capability for 1D and 2D functions and is mainly intended for demonstration purposes.
The module is used in the examples provided with the package."""
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np
import torch
from sparsetorch.utils import get_... | 33.213115 | 128 | 0.627015 |
2b053fceac08b0e1bf525b0309174cccf6876b8c | 879 | py | Python | myproject/users/tests/test_drf_views.py | tasmiaorni/cookiecutterOrni | fcf1991858c711ccb68a07a2a17a6b1c3519c46f | [
"MIT"
] | null | null | null | myproject/users/tests/test_drf_views.py | tasmiaorni/cookiecutterOrni | fcf1991858c711ccb68a07a2a17a6b1c3519c46f | [
"MIT"
] | null | null | null | myproject/users/tests/test_drf_views.py | tasmiaorni/cookiecutterOrni | fcf1991858c711ccb68a07a2a17a6b1c3519c46f | [
"MIT"
] | null | null | null | import pytest
from django.test import RequestFactory
from myproject.users.api.views import UserViewSet
from myproject.users.models import User
pytestmark = pytest.mark.django_db
class TestUserViewSet:
def test_get_queryset(self, user: User, rf: RequestFactory):
view = UserViewSet()
request = rf.... | 25.114286 | 67 | 0.617747 |
4df7e70e36bda93eaf4e5398b274fd33da924683 | 15,785 | py | Python | src/sage/algebras/group_algebra.py | drvinceknight/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | 2 | 2015-08-11T05:05:47.000Z | 2019-05-15T17:27:25.000Z | src/sage/algebras/group_algebra.py | kaushik94/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | null | null | null | src/sage/algebras/group_algebra.py | kaushik94/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | 1 | 2020-07-24T12:04:03.000Z | 2020-07-24T12:04:03.000Z | r"""
Class for group algebras of arbitrary groups (over a general commutative base
ring).
NOTE:
-- It seems to be impossible to make this fit nicely with Sage's coercion
model. The problem is that (for example) if G is the additive group (ZZ,+),
and R = ZZ[G] is its group ring, then the integer 2 can be co... | 38.406326 | 139 | 0.562813 |
f4d715feccbc3e58cc6ee2ad6e71708d49e6f5b0 | 4,325 | py | Python | openshift/test/test_v1_egress_network_policy_peer.py | TristanCacqueray/openshift-restclient-python | 7758cde7a8094acb279904f15c29e5fe3e9f7d33 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_egress_network_policy_peer.py | TristanCacqueray/openshift-restclient-python | 7758cde7a8094acb279904f15c29e5fe3e9f7d33 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_egress_network_policy_peer.py | TristanCacqueray/openshift-restclient-python | 7758cde7a8094acb279904f15c29e5fe3e9f7d33 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | 96.111111 | 3,375 | 0.790751 |
31a52f7db32d826940e929bbb88d69651aa9ed19 | 330 | py | Python | rover_19_fake_odometry/scripts/odometry_wheel.py | onurnurtaan/rover_19 | dbfd092e58f9d3ba8eec82c68a53382caa993a3b | [
"BSD-2-Clause"
] | 4 | 2019-02-15T12:54:17.000Z | 2021-03-07T14:30:47.000Z | rover_19_fake_odometry/scripts/odometry_wheel.py | onurnurtaan/rover_19 | dbfd092e58f9d3ba8eec82c68a53382caa993a3b | [
"BSD-2-Clause"
] | 1 | 2019-01-25T11:43:17.000Z | 2019-01-25T11:43:17.000Z | rover_19_fake_odometry/scripts/odometry_wheel.py | onurnurtaan/rover_19 | dbfd092e58f9d3ba8eec82c68a53382caa993a3b | [
"BSD-2-Clause"
] | 2 | 2019-01-22T15:06:43.000Z | 2019-01-25T11:38:08.000Z | #!/usr/bin/env python
import rospy
from nav_msgs import Odometry
if __name__ == '__main__':
rospy.init_node('odometry_wheel_publisher')
pub = rospy.Publisher("/number", Odometry, queue_size=10)
rate = rospy.Rate(1)
while not rospy.is_shutdown():
msg = Odometry()
msg.data = 2
pub.publish(msg)
rate.... | 13.2 | 58 | 0.69697 |
f82593a0e4d78d4438d933c3eabfb0a402ac6bf5 | 2,178 | py | Python | IMLearn/model_selection/cross_validate.py | nogazoh/IML.HUJI | 034af86b441f57354fb279aea95099e3a4f4aad2 | [
"MIT"
] | null | null | null | IMLearn/model_selection/cross_validate.py | nogazoh/IML.HUJI | 034af86b441f57354fb279aea95099e3a4f4aad2 | [
"MIT"
] | null | null | null | IMLearn/model_selection/cross_validate.py | nogazoh/IML.HUJI | 034af86b441f57354fb279aea95099e3a4f4aad2 | [
"MIT"
] | null | null | null | from __future__ import annotations
from copy import deepcopy
from typing import Tuple, Callable
import numpy as np
from IMLearn import BaseEstimator
def cross_validate(estimator: BaseEstimator, X: np.ndarray, y: np.ndarray,
scoring: Callable[[np.ndarray, np.ndarray, ...], float], cv: int = 5) -> Tu... | 32.507463 | 112 | 0.661616 |
e31620649b9221e15295bd9ca2a20dc650227d43 | 18,683 | py | Python | tokumx/datadog_checks/tokumx/vendor/pymongo/topology_description.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 663 | 2016-08-23T05:23:45.000Z | 2022-03-29T00:37:23.000Z | tokumx/datadog_checks/tokumx/vendor/pymongo/topology_description.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 6,642 | 2016-06-09T16:29:20.000Z | 2022-03-31T22:24:09.000Z | tokumx/datadog_checks/tokumx/vendor/pymongo/topology_description.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1,222 | 2017-01-27T15:51:38.000Z | 2022-03-31T18:17:51.000Z | # Copyright 2014-2016 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 37.440882 | 85 | 0.644543 |
6fbe7dba9fb7ddd362b5d65c5a33d20340c1f425 | 4,226 | py | Python | lib/ansible/plugins/action/ios.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | lib/ansible/plugins/action/ios.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | lib/ansible/plugins/action/ios.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | 43.122449 | 125 | 0.67629 |
90f3fb2fe140e5adf4d3783596d3a4678a2ad0f0 | 1,000 | py | Python | desafio051.py | Darlingcris/Desafios-Python | 43dd1c9ee336482834007c515e7cf327a7c84d44 | [
"MIT"
] | null | null | null | desafio051.py | Darlingcris/Desafios-Python | 43dd1c9ee336482834007c515e7cf327a7c84d44 | [
"MIT"
] | null | null | null | desafio051.py | Darlingcris/Desafios-Python | 43dd1c9ee336482834007c515e7cf327a7c84d44 | [
"MIT"
] | null | null | null | #desenvolva um programa que leia o primeiro
#termo e a razao de uma PA. No final, Mostre
#os 10 primeiro termos dessa progressao.
#OBS: PA= (1,100,10) o primeiro n=1 a razao=10
primeiroTermo=int(input("Digite o primeiro termo da sua PA: "))
razao=int(input("Digite a razao da sua PA: "))
pa=int(input("Qual a posiçao v... | 30.30303 | 65 | 0.683 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.