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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ec3d3afdc62f7fedb3c502ecf2fe5c80ab5e4b3 | 1,188 | py | Python | django/core/mail/backends/console.py | dolfly/django | a971d19bab9bfc33d301669b319b4766bf6d94f6 | [
"BSD-3-Clause"
] | 1 | 2015-11-08T11:42:08.000Z | 2015-11-08T11:42:08.000Z | django/core/mail/backends/console.py | dolfly/django | a971d19bab9bfc33d301669b319b4766bf6d94f6 | [
"BSD-3-Clause"
] | null | null | null | django/core/mail/backends/console.py | dolfly/django | a971d19bab9bfc33d301669b319b4766bf6d94f6 | [
"BSD-3-Clause"
] | null | null | null | """
Email backend that writes messages to console instead of sending them.
"""
import sys
import threading
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
def __init__(self, *args, **kwargs):
self.stream = kwargs.pop('stream', sys.stdout)
self._loc... | 33.942857 | 77 | 0.560606 |
eb1a86266b924f8cd14adae3a02e5e1e0686e9f6 | 1,071 | py | Python | questionnaires/migrations/0018_auto_20210929_1126.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 20 | 2021-04-29T12:36:25.000Z | 2022-03-27T12:17:41.000Z | questionnaires/migrations/0018_auto_20210929_1126.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 892 | 2021-02-02T13:56:06.000Z | 2022-03-31T11:25:44.000Z | questionnaires/migrations/0018_auto_20210929_1126.py | ChrisMarsh82/iogt | 8141421a79b73bd038880a3be92fa6809adced13 | [
"BSD-2-Clause"
] | 28 | 2021-02-19T19:28:37.000Z | 2022-03-11T11:46:00.000Z | # Generated by Django 3.1.13 on 2021-09-29 11:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questionnaires', '0017_auto_20210901_1844'),
]
operations = [
migrations.AlterField(
model_name='pollformfield',
na... | 36.931034 | 162 | 0.64239 |
a747a03155804de39e8e01967d7213cc35d8297e | 2,702 | py | Python | wagtail/wagtailredirects/models.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/models.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailredirects/models.py | seddonym/wagtail-tableblock | aea3ce67a0800285b20b93018b7c0a8679e479b7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.six.moves.urllib.parse import urlparse
from django.utils.translation import ugettext_lazy as _
class Redirect(models.Model):
old_path = models.CharField(verbose_name=_("redirect from"), max_length=255, db_index=True)
site ... | 31.418605 | 118 | 0.633605 |
fab083cb35c21a17c51c7e72f52eb1d0f8db5ad2 | 3,397 | py | Python | server.py | Dew-bench/service-broker | 5f4de5ae92a46ef285ef4e58e2fd9744aca72ff2 | [
"Unlicense"
] | null | null | null | server.py | Dew-bench/service-broker | 5f4de5ae92a46ef285ef4e58e2fd9744aca72ff2 | [
"Unlicense"
] | null | null | null | server.py | Dew-bench/service-broker | 5f4de5ae92a46ef285ef4e58e2fd9744aca72ff2 | [
"Unlicense"
] | null | null | null | from flask import Flask, request
import socket
import json
import requests
app = Flask(__name__)
CONSUMERS = {}
PROVIDERS = {}
SERVICES = {}
PROVIDER_SETTINGS = {} # TODO
PROVIDER_URL = ""
######################################
@app.route('/')
def hello_world():
return 'Service broker'
@app.route('/api/ip')
... | 24.264286 | 81 | 0.564616 |
afce703cfdcd5c911f2e36badc9f0a58dcb97c77 | 10,133 | py | Python | cvnets/models/classification/mobilevit.py | apple/ml-cvnets | 84d992f413e52c0468f86d23196efd9dad885e6f | [
"AML"
] | 209 | 2021-10-30T08:32:10.000Z | 2022-03-31T16:18:03.000Z | cvnets/models/classification/mobilevit.py | apple/ml-cvnets | 84d992f413e52c0468f86d23196efd9dad885e6f | [
"AML"
] | 12 | 2021-12-04T10:47:11.000Z | 2022-03-31T15:39:40.000Z | cvnets/models/classification/mobilevit.py | apple/ml-cvnets | 84d992f413e52c0468f86d23196efd9dad885e6f | [
"AML"
] | 50 | 2021-11-01T08:15:02.000Z | 2022-03-29T08:17:34.000Z | #
# For licensing see accompanying LICENSE file.
# Copyright (C) 2022 Apple Inc. All Rights Reserved.
#
from torch import nn
import argparse
from typing import Dict, Tuple, Optional
from utils import logger
from . import register_cls_models
from .base_cls import BaseEncoder
from .config.mobilevit import get_configur... | 33.442244 | 104 | 0.566861 |
44f2ce8a09c1728070aee4416554f8de70a92af9 | 2,161 | py | Python | src/models/CCIG/data/sentence_score.py | stillyuyi/ArticlePairMatching | f9cf63ad4c398d377f3d0291f552fb99f81020ef | [
"BSD-3-Clause"
] | 227 | 2019-05-22T14:10:55.000Z | 2022-03-31T07:39:31.000Z | src/models/CCIG/data/sentence_score.py | stillyuyi/ArticlePairMatching | f9cf63ad4c398d377f3d0291f552fb99f81020ef | [
"BSD-3-Clause"
] | 35 | 2019-06-18T07:39:28.000Z | 2021-11-19T03:51:07.000Z | src/models/CCIG/data/sentence_score.py | stillyuyi/ArticlePairMatching | f9cf63ad4c398d377f3d0291f552fb99f81020ef | [
"BSD-3-Clause"
] | 62 | 2019-06-14T07:10:30.000Z | 2022-02-04T19:59:32.000Z | # coding=utf-8
"""
This file contains functions that assign a sentence
in a document a weight score.
"""
import math
from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer
import networkx as nx
from config import *
from util.tfidf_utils import *
def tfidf(sentence, idf_dict):
tfidf_dict = g... | 29.202703 | 86 | 0.694586 |
ac982cf60c36562419f704f3048b6ed47dc24e14 | 3,655 | py | Python | Market/market_DL.py | Alan-Du/Commodity_Tracker | fc7d4c92535424be7dc82f47dd513332b4b772c9 | [
"Unlicense"
] | 1 | 2020-04-12T22:32:01.000Z | 2020-04-12T22:32:01.000Z | Market/market_DL.py | Alan-Du/Commodity_Tracker | fc7d4c92535424be7dc82f47dd513332b4b772c9 | [
"Unlicense"
] | null | null | null | Market/market_DL.py | Alan-Du/Commodity_Tracker | fc7d4c92535424be7dc82f47dd513332b4b772c9 | [
"Unlicense"
] | 1 | 2021-06-11T09:19:12.000Z | 2021-06-11T09:19:12.000Z | """
Created on Sun Sep 22 08:24:36 2019
@author: shaolun du
@contact: Shaolun.du@gmail.com
Structure outline:
HTML page with pandas read html parser
"""
import requests
import pandas as pd
from Market.exc_parser import exc_parser
from Market.gen_process_params import gen_proc_params
class DL_parser(e... | 46.265823 | 244 | 0.533242 |
d789521bd0d81779168834374e73aaa5d9121452 | 1,991 | py | Python | videoanalyst/data/dataset/dataset_impl/trackingnet.py | yutliu/betterSAT | fb983f43b12352f9ee6ae40b4e0954f6ba502fb8 | [
"MIT"
] | 2 | 2020-07-30T08:26:08.000Z | 2020-11-24T07:40:46.000Z | videoanalyst/data/dataset/dataset_impl/trackingnet.py | shartoo/video_analyst | db7c1b323f26ec19533a4b19804cf2c8a52643e5 | [
"MIT"
] | null | null | null | videoanalyst/data/dataset/dataset_impl/trackingnet.py | shartoo/video_analyst | db7c1b323f26ec19533a4b19804cf2c8a52643e5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os.path as osp
from typing import Dict
import cv2
import numpy as np
from loguru import logger
from yacs.config import CfgNode
from videoanalyst.data.dataset.dataset_base import TRACK_DATASETS, DatasetBase
from videoanalyst.evaluation.got_benchmark.datasets import TrackingNet
from video... | 28.442857 | 78 | 0.657459 |
a2a5c572ace96a2050c5e738be099b29e5352570 | 18,473 | py | Python | core/pycopia/OS/Linux/event.py | kdart/pycopia3 | 8a7c820f096245411eabbb72345e4f30a35988b6 | [
"Apache-2.0"
] | 3 | 2018-11-26T15:00:20.000Z | 2022-01-28T23:17:58.000Z | core/pycopia/OS/Linux/event.py | kdart/pycopia3 | 8a7c820f096245411eabbb72345e4f30a35988b6 | [
"Apache-2.0"
] | null | null | null | core/pycopia/OS/Linux/event.py | kdart/pycopia3 | 8a7c820f096245411eabbb72345e4f30a35988b6 | [
"Apache-2.0"
] | 1 | 2018-11-26T15:00:21.000Z | 2018-11-26T15:00:21.000Z | #!/usr/bin/python3.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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... | 20.897059 | 87 | 0.660153 |
9243936cf817ba3cd57272a64abf95c98d36356e | 20,689 | py | Python | yt/frontends/flash/data_structures.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/flash/data_structures.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | 31 | 2017-04-19T21:07:18.000Z | 2017-04-20T01:08:43.000Z | yt/frontends/flash/data_structures.py | Xarthisius/yt | 321643c3abff64a6f132d98d0747f3558f7552a3 | [
"BSD-3-Clause-Clear"
] | null | null | null | import os
import weakref
import numpy as np
from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch
from yt.data_objects.static_output import Dataset, ParticleFile, validate_index_order
from yt.funcs import mylog, setdefaultattr
from yt.geometry.grid_geometry_handler import GridIndex
from yt.geometry.par... | 38.03125 | 88 | 0.548649 |
61eebe20a08fe467ba98f06fdd75ab35ae20588a | 100 | py | Python | src/associations/admin.py | codacy-badger/hbscorez | 215e4d2617ac9be91bb9d561bbfc552349cd4781 | [
"MIT"
] | 12 | 2018-03-20T21:38:53.000Z | 2021-10-31T10:00:12.000Z | src/associations/admin.py | codacy-badger/hbscorez | 215e4d2617ac9be91bb9d561bbfc552349cd4781 | [
"MIT"
] | 79 | 2018-03-18T14:26:47.000Z | 2022-03-01T15:51:40.000Z | src/associations/admin.py | codacy-badger/hbscorez | 215e4d2617ac9be91bb9d561bbfc552349cd4781 | [
"MIT"
] | 4 | 2018-05-18T15:39:56.000Z | 2020-10-29T09:28:41.000Z | from django.contrib import admin
from .models import Association
admin.site.register(Association)
| 16.666667 | 32 | 0.83 |
2cbcdd913913e88463399e07575b6a9bd2e61922 | 21,719 | py | Python | experiments_singlegraph.py | wangshgeo/clusternet | 06904af279b4d98d894f3e33173ece2d62cffa2d | [
"MIT"
] | null | null | null | experiments_singlegraph.py | wangshgeo/clusternet | 06904af279b4d98d894f3e33173ece2d62cffa2d | [
"MIT"
] | null | null | null | experiments_singlegraph.py | wangshgeo/clusternet | 06904af279b4d98d894f3e33173ece2d62cffa2d | [
"MIT"
] | null | null | null | from pygcn import load_data
import torch
import argparse
import numpy as np
import torch.optim as optim
import torch.nn as nn
import sklearn
from kcenter import make_all_dists, greedy_kcenter, gonzalez_kcenter, CenterObjective, make_dists_igraph, rounding
from models import GCNLink, GCNClusterNet, GCNDeep, GCNDeepSigmo... | 43.61245 | 167 | 0.607026 |
8cc92739898e560a182b7af4b9579515e47e8dfd | 110 | py | Python | debug_diverse_data.py | williamdjones/proteinbinding | 853d8c81afb19c6d8de9be7080ae00a54836dda1 | [
"MIT"
] | 1 | 2018-03-14T02:26:17.000Z | 2018-03-14T02:26:17.000Z | debug_diverse_data.py | williamdjones/proteinbinding | 853d8c81afb19c6d8de9be7080ae00a54836dda1 | [
"MIT"
] | 9 | 2017-03-23T15:48:15.000Z | 2017-04-20T16:37:49.000Z | debug_diverse_data.py | williamdjones/protein_binding | 853d8c81afb19c6d8de9be7080ae00a54836dda1 | [
"MIT"
] | null | null | null | import pandas as pd
import os
docking_df = pd.read_csv("data/diverse/docking_features_diverse_subset.csv")
| 15.714286 | 76 | 0.809091 |
6ddec07e10f79c4dbf7b96e57c3594dd8f99f0f9 | 1,313 | py | Python | python/src/main/python/pygw/store/data_store_factory.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/data_store_factory.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/data_store_factory.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 whic... | 38.617647 | 101 | 0.678599 |
4e4feeb853ab1749a6f011e2ea5852f46e743cac | 1,709 | py | Python | app/core/migrations/0001_initial.py | FabianIAM12/recipe-app-api | a529248270db2220a5936fa4c662091048f2c0bf | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | FabianIAM12/recipe-app-api | a529248270db2220a5936fa4c662091048f2c0bf | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | FabianIAM12/recipe-app-api | a529248270db2220a5936fa4c662091048f2c0bf | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-07-05 17:59
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.264706 | 266 | 0.63897 |
8952078bcaa4f85bb92e1fccbf2222a2d363abf3 | 77 | py | Python | a/a.py | bosichong/17python.com | 378754e1288b444ab3657093aa18b7e3f03b5145 | [
"Apache-2.0"
] | 9 | 2017-09-02T05:54:06.000Z | 2019-04-11T02:34:41.000Z | a/a.py | bosichong/17python.com | 378754e1288b444ab3657093aa18b7e3f03b5145 | [
"Apache-2.0"
] | null | null | null | a/a.py | bosichong/17python.com | 378754e1288b444ab3657093aa18b7e3f03b5145 | [
"Apache-2.0"
] | 6 | 2017-10-25T02:47:45.000Z | 2019-12-21T06:35:01.000Z | #codeing=utf-8
M_TEST = 888
def print_text():
print('这a.py下的一个打印文字函数') | 11 | 28 | 0.675325 |
eb14086ff15c64e7bfb89902408e5d51db6bbc70 | 780 | py | Python | vb_baseapp/management/template_structures/models/basemodel.py | vbyazilim/django-vb-baseapp | 83a62a9d7cb349351ea64aeeb616afe9a94cda5d | [
"MIT"
] | null | null | null | vb_baseapp/management/template_structures/models/basemodel.py | vbyazilim/django-vb-baseapp | 83a62a9d7cb349351ea64aeeb616afe9a94cda5d | [
"MIT"
] | 1 | 2021-10-30T16:44:15.000Z | 2021-10-30T16:44:15.000Z | vb_baseapp/management/template_structures/models/basemodel.py | vbyazilim/django-vb-baseapp | 83a62a9d7cb349351ea64aeeb616afe9a94cda5d | [
"MIT"
] | null | null | null | """
CustomBaseModel template for model generator
"""
TEMPLATE_MODEL_BASEMODEL = """import logging
from django.db import models
from django.utils.translation import ugettext_lazy as _
from console import console
from vb_baseapp.models import CustomBaseModel
__all__ = ['{model_name_for_class}']
logger = logging.getL... | 22.941176 | 88 | 0.739744 |
b760623ef755302886e03e31c2a12ee7fc1ecd9a | 13,086 | py | Python | src/tests/execution_logging_test.py | dendisuhubdy/script-server | 3ffb2e6afdc1672a6ed3e56dcc31ff1794785142 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/tests/execution_logging_test.py | dendisuhubdy/script-server | 3ffb2e6afdc1672a6ed3e56dcc31ff1794785142 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/tests/execution_logging_test.py | dendisuhubdy/script-server | 3ffb2e6afdc1672a6ed3e56dcc31ff1794785142 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | import os
import unittest
import uuid
from datetime import datetime, timedelta
from execution.logging import ScriptOutputLogger, ExecutionLoggingService, OUTPUT_STARTED_MARKER, \
PostExecutionInfoProvider, LogNameCreator
from react.observable import Observable
from tests import test_utils
from utils import file_ut... | 35.656676 | 99 | 0.647486 |
dda8e80eb203660b07ebb72b3a805c55d3ea3ac7 | 988 | py | Python | Model.py | yash1996/Emotion-Recognition-by-Facial-features | bda21885244e9aac652445cf6349127783384220 | [
"MIT"
] | 1 | 2018-12-08T10:55:09.000Z | 2018-12-08T10:55:09.000Z | Model.py | yash1996/Emotion-Recognition-by-Facial-features | bda21885244e9aac652445cf6349127783384220 | [
"MIT"
] | null | null | null | Model.py | yash1996/Emotion-Recognition-by-Facial-features | bda21885244e9aac652445cf6349127783384220 | [
"MIT"
] | null | null | null | import keras
import os
from keras.models import model_from_json
import h5py
from keras.models import Sequential, Model
from keras.layers import Dense, LSTM, Activation, Input
from keras.optimizers import adam, rmsprop, adadelta
import numpy as np
from keras.utils import to_categorical
from keras.models import ... | 32.933333 | 56 | 0.742915 |
3f2a695a3b73ff35dcf4fbca9b1923480a560837 | 321 | py | Python | exonum_precheck/__main__.py | popzxc/exonum_precheck | 8a109f44333e9a0f5425fd1cf1796bb6705a3167 | [
"MIT"
] | 1 | 2019-09-10T13:14:32.000Z | 2019-09-10T13:14:32.000Z | exonum_precheck/__main__.py | popzxc/exonum_precheck | 8a109f44333e9a0f5425fd1cf1796bb6705a3167 | [
"MIT"
] | null | null | null | exonum_precheck/__main__.py | popzxc/exonum_precheck | 8a109f44333e9a0f5425fd1cf1796bb6705a3167 | [
"MIT"
] | null | null | null | import argparse
from exonum_precheck import run_check
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="exonum_precheck", description="Exonum deployment precheck script")
parser.add_argument('--jobs', nargs='*', default=['unit-test', 'lints'])
args = parser.parse_args()
run_check(args)... | 32.1 | 109 | 0.728972 |
ebf47ab45dfdb750c1ecffb29d0acb2d0bec2259 | 1,422 | py | Python | var/spack/repos/builtin/packages/rockstar/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/rockstar/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/rockstar/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 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)
import os
from spack import *
class Rockstar(MakefilePackage):
"""The Rockstar Halo Finder"""
homepage = "https... | 29.625 | 82 | 0.647679 |
23ab4e5cf331c09b9454605f124656d3c58735d4 | 4,520 | py | Python | azext_iot/sdk/dps/service/models/device_registration_state.py | jongio/azure-iot-cli-extension | 5e41824688c4d9e4593737a55e8789a6bb1d2411 | [
"MIT"
] | null | null | null | azext_iot/sdk/dps/service/models/device_registration_state.py | jongio/azure-iot-cli-extension | 5e41824688c4d9e4593737a55e8789a6bb1d2411 | [
"MIT"
] | null | null | null | azext_iot/sdk/dps/service/models/device_registration_state.py | jongio/azure-iot-cli-extension | 5e41824688c4d9e4593737a55e8789a6bb1d2411 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.883495 | 92 | 0.647345 |
efd89ab243bfd8d4c0da2f2cfebdcbc740e3927e | 8,603 | py | Python | test/test_emmetNode.py | Ariyn/crawling-script | 0757e1fe71c66cac60331b630f927b8ab6114a97 | [
"MIT"
] | null | null | null | test/test_emmetNode.py | Ariyn/crawling-script | 0757e1fe71c66cac60331b630f927b8ab6114a97 | [
"MIT"
] | 7 | 2016-10-30T17:02:33.000Z | 2018-12-08T18:40:33.000Z | test/test_emmetNode.py | Ariyn/crawling-script | 0757e1fe71c66cac60331b630f927b8ab6114a97 | [
"MIT"
] | null | null | null | import unittest
import unittest.mock as mock
from unittest.mock import MagicMock, mock_open
import os
import logging
import src.EmmetNode as nsp
from src.Emmet import Emmet
from src.HTML import Element, MyHTMLParser
from src.tools import Log
class Tester(unittest.TestCase):
debug = False
scripts = [
"tag1> tag2... | 26.228659 | 92 | 0.63257 |
36c0ad45ad5311287ddf673915e86c817eb95c62 | 3,839 | py | Python | asposewordscloud/models/requests/create_folder_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/create_folder_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/create_folder_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="create_folder_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 39.173469 | 112 | 0.633238 |
708ff3b4c8cf6bbf0a4af25f8bb414886fc3c3b5 | 657 | py | Python | hkm/migrations/0025_userprofile_printer_presets.py | andersinno/kuvaselaamo | aed553a0ba85e82055e0de025ba2d3e3e4f2c9e6 | [
"MIT"
] | 1 | 2017-05-07T10:46:24.000Z | 2017-05-07T10:46:24.000Z | hkm/migrations/0025_userprofile_printer_presets.py | City-of-Helsinki/kuvaselaamo | 3fa9b69e3f5496620852d8b138129d0069339fcd | [
"MIT"
] | 60 | 2016-10-18T11:18:48.000Z | 2022-02-13T20:04:18.000Z | hkm/migrations/0025_userprofile_printer_presets.py | andersinno/kuvaselaamo | aed553a0ba85e82055e0de025ba2d3e3e4f2c9e6 | [
"MIT"
] | 9 | 2017-04-18T13:26:26.000Z | 2020-02-13T20:05:13.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-10-02 09:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hkm', '0024_hkm_museum_user'),
]
operations = [
migrations.AddField(
... | 31.285714 | 251 | 0.643836 |
acb12afe42e431fc310cb2f395337f6c8b4adcdc | 3,960 | py | Python | test/utils.py | chandur626/TeachersPetBot | ad1fd36be5bd3690949d0e3a6e29c9100bf43e15 | [
"MIT"
] | null | null | null | test/utils.py | chandur626/TeachersPetBot | ad1fd36be5bd3690949d0e3a6e29c9100bf43e15 | [
"MIT"
] | 52 | 2021-11-20T19:29:58.000Z | 2021-12-05T04:39:30.000Z | test/utils.py | chandur626/TeachersPetBot | ad1fd36be5bd3690949d0e3a6e29c9100bf43e15 | [
"MIT"
] | null | null | null | import os
import smtplib
from email import encoders
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from dotenv import load_dotenv
import asyncio
from time import sleep
load_dotenv()
DICORD_BOT_NAME = os.getenv('DICORD_BOT_NAME')
class EmailUti... | 39.6 | 173 | 0.629798 |
627d58e4503f19b296d52a4b977014d18343ae5a | 3,510 | py | Python | zuul.d/octavia/amphorae/drivers/haproxy/data_models.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/amphorae/drivers/haproxy/data_models.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/amphorae/drivers/haproxy/data_models.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Rackspace
#
# 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 ... | 31.621622 | 79 | 0.619658 |
d2fd51501c7b3ef81d62f72d84778d72fe0ecc89 | 7,277 | py | Python | plugins/modules/oci_limits_limit_definition_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_limits_limit_definition_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_limits_limit_definition_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 30.57563 | 139 | 0.632266 |
7c5eb134da89a9ce485d00100d4055dca4f99fc3 | 2,741 | py | Python | lib/mm/config.py | ferferga/MMM-NEXT-FacialRecognition | 90159182de2a944b041581e16b707c4551385690 | [
"MIT"
] | null | null | null | lib/mm/config.py | ferferga/MMM-NEXT-FacialRecognition | 90159182de2a944b041581e16b707c4551385690 | [
"MIT"
] | null | null | null | lib/mm/config.py | ferferga/MMM-NEXT-FacialRecognition | 90159182de2a944b041581e16b707c4551385690 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding: utf8
"""MMM-Facial-Recognition-OCV3 - MagicMirror Module
The MIT License (MIT)
Copyright (c) 2018 Mathieu Goulène (MIT License)
Based on work by Paul-Vincent Roll (Copyright 2016) (MIT License)
"""
import os
import json
import sys
import platform
sys.path.append((os.path.abspath(os.path.joi... | 27.41 | 93 | 0.604524 |
786394b47c67b59385315aace07545cc9898841f | 19,668 | py | Python | tensorflow_/tensorflowcv/models/shufflenet.py | huangwenwenlili/imgclsmob | 1505fd61acbed429773f5c7ce286c858fc2278b8 | [
"MIT"
] | 1 | 2021-01-08T04:55:45.000Z | 2021-01-08T04:55:45.000Z | tensorflow_/tensorflowcv/models/shufflenet.py | huangwenwenlili/imgclsmob | 1505fd61acbed429773f5c7ce286c858fc2278b8 | [
"MIT"
] | null | null | null | tensorflow_/tensorflowcv/models/shufflenet.py | huangwenwenlili/imgclsmob | 1505fd61acbed429773f5c7ce286c858fc2278b8 | [
"MIT"
] | null | null | null | """
ShuffleNet, implemented in TensorFlow.
Original paper: 'ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices,'
https://arxiv.org/abs/1707.01083.
"""
__all__ = ['ShuffleNet', 'shufflenet_g1_w1', 'shufflenet_g2_w1', 'shufflenet_g3_w1', 'shufflenet_g4_w1',
'shuffle... | 29.355224 | 120 | 0.604179 |
4f98dcd1e83d700520739875761a33678eeef589 | 3,682 | py | Python | gpflow/expectations/sums.py | antonykamp/GPflow | 1831a5d19a50ff525af0ce931c8b82f6306d8196 | [
"Apache-2.0"
] | 1,724 | 2016-01-21T18:10:26.000Z | 2022-03-22T20:03:57.000Z | gpflow/expectations/sums.py | antonykamp/GPflow | 1831a5d19a50ff525af0ce931c8b82f6306d8196 | [
"Apache-2.0"
] | 1,713 | 2016-02-26T13:09:35.000Z | 2022-03-31T14:39:30.000Z | gpflow/expectations/sums.py | antonykamp/GPflow | 1831a5d19a50ff525af0ce931c8b82f6306d8196 | [
"Apache-2.0"
] | 519 | 2016-02-17T19:04:45.000Z | 2022-03-26T00:13:13.000Z | # Copyright 2017-2020 The GPflow Contributors. 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 appli... | 33.472727 | 99 | 0.670831 |
a6f7fd0476e869140aee2eda369ad3116a08d82f | 5,712 | py | Python | configs/fp16/faster_rcnn_r34_fpn_fp16_1x.py | moshes7/mmdetection | 6e3c30d89e80ada4c84cc06bb6b216584e31cb3e | [
"Apache-2.0"
] | null | null | null | configs/fp16/faster_rcnn_r34_fpn_fp16_1x.py | moshes7/mmdetection | 6e3c30d89e80ada4c84cc06bb6b216584e31cb3e | [
"Apache-2.0"
] | null | null | null | configs/fp16/faster_rcnn_r34_fpn_fp16_1x.py | moshes7/mmdetection | 6e3c30d89e80ada4c84cc06bb6b216584e31cb3e | [
"Apache-2.0"
] | null | null | null | # fp16 settings
fp16 = dict(loss_scale=512.)
# model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet34',
backbone=dict(
type='ResNet',
depth=34,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dic... | 30.222222 | 78 | 0.590861 |
8378b3ccaf0072021284bc1682f6e595ba7ebd05 | 5,964 | py | Python | prototypes/src/contour.py | alexandru-dinu/ir-project | 70f3bed0b89770729a977fa4c8111ba806932bde | [
"MIT"
] | null | null | null | prototypes/src/contour.py | alexandru-dinu/ir-project | 70f3bed0b89770729a977fa4c8111ba806932bde | [
"MIT"
] | 1 | 2019-04-15T12:10:51.000Z | 2019-05-30T14:35:17.000Z | prototypes/src/contour.py | alexandru-dinu/ir-project | 70f3bed0b89770729a977fa4c8111ba806932bde | [
"MIT"
] | null | null | null | import argparse
import warnings
from scipy.interpolate import splev, splprep
from utils import *
warnings.filterwarnings("ignore")
parser = argparse.ArgumentParser()
parser.add_argument("--file", type=str)
parser.add_argument("--interp", type=int, default=20)
parser.add_argument("--save", action="store_true")
args ... | 25.706897 | 84 | 0.55332 |
1263b71e4c6e9d66cb7718d4a83edf2c14d02232 | 67,738 | py | Python | manim/mobject/types/vectorized_mobject.py | janLuke/manim | 18bab2075f7c9987cbba7b173c3b02971b78a560 | [
"MIT"
] | 1 | 2021-07-03T14:18:38.000Z | 2021-07-03T14:18:38.000Z | manim/mobject/types/vectorized_mobject.py | janLuke/manim | 18bab2075f7c9987cbba7b173c3b02971b78a560 | [
"MIT"
] | 3 | 2020-07-14T02:46:11.000Z | 2020-09-09T15:15:55.000Z | manim/mobject/types/vectorized_mobject.py | janLuke/manim | 18bab2075f7c9987cbba7b173c3b02971b78a560 | [
"MIT"
] | null | null | null | """Mobjects that use vector graphics."""
__all__ = [
"VMobject",
"VGroup",
"VDict",
"VectorizedPoint",
"CurvesAsSubmobjects",
"DashedVMobject",
]
import itertools as it
import sys
import typing
from abc import ABCMeta
from typing import Optional, Sequence, Union
import colour
import numpy a... | 34.297722 | 266 | 0.585831 |
514ba03cc63ab809bf94dc1ed018cf092b5aec5b | 6,731 | py | Python | invenio_config/__init__.py | invenio-toaster/invenio-config | ed5d2a30bdfceb030b8364dbdcb2c239bc340969 | [
"MIT"
] | 4 | 2015-10-12T07:26:57.000Z | 2017-10-22T00:30:54.000Z | invenio_config/__init__.py | invenio-toaster/invenio-config | ed5d2a30bdfceb030b8364dbdcb2c239bc340969 | [
"MIT"
] | 28 | 2015-10-12T14:54:50.000Z | 2020-12-03T15:02:17.000Z | invenio_config/__init__.py | invenio-toaster/invenio-config | ed5d2a30bdfceb030b8364dbdcb2c239bc340969 | [
"MIT"
] | 25 | 2015-10-07T16:20:54.000Z | 2021-11-25T09:42:43.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Invenio configuration loader.
Invenio-Config is a *base package* of the Invenio d... | 34.695876 | 79 | 0.756797 |
f8ac8655d090ff92d2b25abc70dca58017a2f82d | 792 | py | Python | app/migrations/0011_auto_20171212_1655.py | nevooronni/RideAlong | 0921c0b77d7fbc4c9595d497648f5b40e2d87000 | [
"MIT"
] | 1 | 2019-01-24T01:02:55.000Z | 2019-01-24T01:02:55.000Z | app/migrations/0011_auto_20171212_1655.py | nevooronni/RideAlong | 0921c0b77d7fbc4c9595d497648f5b40e2d87000 | [
"MIT"
] | null | null | null | app/migrations/0011_auto_20171212_1655.py | nevooronni/RideAlong | 0921c0b77d7fbc4c9595d497648f5b40e2d87000 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2017-12-12 13:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0010_auto_20171211_2354'),
]
operations = [
migrations.AlterField(
model_name='driverprofile',
name='gender',
... | 33 | 173 | 0.579545 |
a60cb361e13aa8af9a1d07f81d10939120a380f7 | 1,085 | py | Python | configexample.py | sergioamorim/backup_manager | f581fd455d25c1b06d31802de013d22be7c1ed64 | [
"MIT"
] | null | null | null | configexample.py | sergioamorim/backup_manager | f581fd455d25c1b06d31802de013d22be7c1ed64 | [
"MIT"
] | null | null | null | configexample.py | sergioamorim/backup_manager | f581fd455d25c1b06d31802de013d22be7c1ed64 | [
"MIT"
] | null | null | null | from paramiko import RSAKey
ssh_client_options = {
'hosts_keys_filename': '/path/to/known_hosts',
}
routerboards = [
{
'name': 'router-identification',
'backup_options': {
'backups_directory': '/path/to/save/the/backup/files/with/trailing/slash/',
'assertion_options': {
'seconds_to_tim... | 27.125 | 107 | 0.645161 |
6fe56dcfbcfff4f3905e153e764bbeeed71f45c4 | 3,974 | py | Python | approvals/migrations/0001_initial.py | xzzy/statdev | b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2 | [
"Apache-2.0"
] | null | null | null | approvals/migrations/0001_initial.py | xzzy/statdev | b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2 | [
"Apache-2.0"
] | 7 | 2017-03-13T02:00:21.000Z | 2018-01-02T04:03:02.000Z | approvals/migrations/0001_initial.py | xzzy/statdev | b2c3eb3ad4d8aab44d0f67fc526da1a69b4d86a2 | [
"Apache-2.0"
] | 2 | 2017-02-16T02:18:21.000Z | 2017-02-16T02:22:02.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-08-06 02:49
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | 66.233333 | 326 | 0.632109 |
24a35c650f2156510cfae50959664263b5147484 | 2,149 | py | Python | zcrmsdk/src/com/zoho/crm/api/territories/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/territories/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/territories/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | try:
from zcrmsdk.src.com.zoho.crm.api.exception import SDKException
from zcrmsdk.src.com.zoho.crm.api.util import Constants
from zcrmsdk.src.com.zoho.crm.api.territories.response_handler import ResponseHandler
except Exception:
from ..exception import SDKException
from ..util import Constants
from .response_hand... | 27.551282 | 100 | 0.741275 |
f07937b21d4b3652d451a10cb90fd13f131b8fbb | 3,995 | py | Python | management_layer/transformation.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | management_layer/transformation.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | management_layer/transformation.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | """
This module defines classes that helps to transform dictionaries.
Their purpose is to simply mapping server to client classes and vice versa.
At a high level the following happens:
```
1. body_dict = request.get_json() # Read the request body as JSON, returning a dict
2. server_model = CreatePolicyServerModel.fr... | 36.651376 | 84 | 0.614018 |
9f9ec788fac4fa80210c7d1b7fc51e71e8cb0db2 | 3,561 | py | Python | src/livecli/plugins/tga.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | 1 | 2019-12-04T11:54:52.000Z | 2019-12-04T11:54:52.000Z | src/livecli/plugins/tga.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | src/livecli/plugins/tga.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import re
from livecli.plugin import Plugin
from livecli.plugin.api import http, validate
from livecli.stream import HLSStream, HTTPStream, RTMPStream
__livecli_docs__ = {
"domains": [
"star.longzhu.tv",
"star.longzhu.com",
],
"geo_blocked": [],
"notes": "",
... | 27.820313 | 91 | 0.570626 |
61c292782fc63d0f9a1c216a95fcfa91d2603252 | 12,138 | py | Python | disk.py | pmackinlay/binaryninja-clipper | dbf67a277398a06f740bccf9aee920f9c6e04a4e | [
"MIT"
] | 5 | 2018-02-23T08:28:33.000Z | 2022-01-10T10:40:25.000Z | disk.py | pmackinlay/binaryninja-clipper | dbf67a277398a06f740bccf9aee920f9c6e04a4e | [
"MIT"
] | 1 | 2019-07-04T20:11:38.000Z | 2019-07-04T20:11:38.000Z | disk.py | pmackinlay/binaryninja-clipper | dbf67a277398a06f740bccf9aee920f9c6e04a4e | [
"MIT"
] | 1 | 2018-04-08T20:43:47.000Z | 2018-04-08T20:43:47.000Z | import struct
import traceback
from binaryninja.platform import Platform
from binaryninja.binaryview import BinaryView
from binaryninja.types import Symbol
from binaryninja.log import log_error, log_info
from binaryninja.enums import (SegmentFlag, SymbolType, SectionSemantics)
from unpack import unpack
# CLIPPER exe... | 55.935484 | 279 | 0.570934 |
9664d2e1b8cc7b74c4a8d92978a0280e44aedb11 | 2,315 | py | Python | xcube/core/gen2/__init__.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 97 | 2018-06-26T13:02:55.000Z | 2022-03-26T21:03:13.000Z | xcube/core/gen2/__init__.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 524 | 2018-11-09T12:00:08.000Z | 2022-03-31T17:00:13.000Z | xcube/core/gen2/__init__.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 15 | 2019-07-09T08:46:03.000Z | 2022-02-07T18:47:34.000Z | # The MIT License (MIT)
# Copyright (c) 2021 by the xcube development team and contributors
#
# 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... | 45.392157 | 81 | 0.825918 |
7e0ea010a22b6a48cc7ae681b1acf0aebdb6b391 | 52,607 | py | Python | research/object_detection/utils/config_util.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/config_util.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/config_util.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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... | 41.357704 | 81 | 0.729485 |
bfa1a160f12e69c398b1015d1dbf25f17e847797 | 2,499 | py | Python | bsp/nrf5x/nrf51822/rtconfig.py | rockonedege/rt-thread | 4fe6c709d0bfe719bed6c927f0144ba373bbda5a | [
"Apache-2.0"
] | 7,482 | 2015-01-01T09:23:08.000Z | 2022-03-31T19:34:05.000Z | bsp/nrf5x/nrf51822/rtconfig.py | ArdaFu/rt-thread | eebb2561ec166e0016187c7b7998ada4f8212b3a | [
"Apache-2.0"
] | 2,543 | 2015-01-09T02:01:34.000Z | 2022-03-31T23:10:14.000Z | bsp/nrf5x/nrf51822/rtconfig.py | ArdaFu/rt-thread | eebb2561ec166e0016187c7b7998ada4f8212b3a | [
"Apache-2.0"
] | 4,645 | 2015-01-06T07:05:31.000Z | 2022-03-31T18:21:50.000Z | import os
# toolchains options
ARCH='arm'
CPU='cortex-m0'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EX... | 26.870968 | 142 | 0.57503 |
17ad4871feefea07c0740a488d99ba8c0d14ba9b | 923 | py | Python | services/discovery/jobs/box/huawei_ndp.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | services/discovery/jobs/box/huawei_ndp.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | services/discovery/jobs/box/huawei_ndp.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# Huawei NDP check
# ---------------------------------------------------------------------
# Copyright (C) 2007-2016 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC modules
fr... | 31.827586 | 80 | 0.503792 |
c38271e0ec98c779f1755c0ae3e7f40538620917 | 2,248 | py | Python | tests/test_analysis_get_calibration_data.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | 16 | 2021-05-22T07:39:53.000Z | 2022-02-23T14:50:38.000Z | tests/test_analysis_get_calibration_data.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | null | null | null | tests/test_analysis_get_calibration_data.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | 3 | 2021-05-28T07:12:14.000Z | 2021-11-28T02:10:48.000Z | import numpy as np
import tvm
import tvm.relay.testing
from tvm import relay
from tvm.relay import transform
from tvm.relay.analysis import get_calibration_data
def check_data_size(mod, data):
assert len(data) == len(mod.functions) - 1
for key, value in mod.functions.items():
if key.name_hint != "mai... | 30.794521 | 85 | 0.601423 |
f927cdaa9a9342d8e13c04314a6033dd7b28485a | 10,631 | py | Python | test/functional-tests/PfwTestCase/Types/tINT16.py | MIPS/external-parameter-framework | 7f346c9058f39a533a2eaadc9ebc4001397c6ff9 | [
"BSD-3-Clause"
] | null | null | null | test/functional-tests/PfwTestCase/Types/tINT16.py | MIPS/external-parameter-framework | 7f346c9058f39a533a2eaadc9ebc4001397c6ff9 | [
"BSD-3-Clause"
] | null | null | null | test/functional-tests/PfwTestCase/Types/tINT16.py | MIPS/external-parameter-framework | 7f346c9058f39a533a2eaadc9ebc4001397c6ff9 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:utf-8 -*
# Copyright (c) 2011-2015, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, thi... | 43.215447 | 122 | 0.541529 |
c5b334b27b40d91c535594a2cca4c022b88d11b9 | 7,627 | py | Python | lib/modules/python/collection/linux/keylogger.py | Gui-Luz/Empire | 6f5eeff5f46dd085e1317cb09b39853a2fce5d13 | [
"BSD-3-Clause"
] | 5,720 | 2017-02-02T13:59:40.000Z | 2022-03-31T09:50:10.000Z | lib/modules/python/collection/linux/keylogger.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 866 | 2017-02-02T10:56:31.000Z | 2020-01-17T07:47:05.000Z | lib/modules/python/collection/linux/keylogger.py | VookiBoo/Empire | 5aae31e7de591282773d2c8498af04ee4e8778f5 | [
"BSD-3-Clause"
] | 2,181 | 2017-02-04T10:28:41.000Z | 2022-03-31T04:36:56.000Z | class Module:
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'Webcam',
# list of one or more authors for the module
... | 87.666667 | 4,547 | 0.814475 |
336917575441f2690e4fc80a9eb5efad81a3f404 | 795 | py | Python | mspray/apps/main/models/weekly_report.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | null | null | null | mspray/apps/main/models/weekly_report.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | 76 | 2018-03-15T09:37:56.000Z | 2019-05-15T12:45:51.000Z | mspray/apps/main/models/weekly_report.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | 1 | 2020-10-31T07:15:22.000Z | 2020-10-31T07:15:22.000Z | # -*- coding=utf-8 -*-
"""
Weekly report model module.
"""
from django.db import models
class WeeklyReport(models.Model):
"""
Weekly report model
"""
week_number = models.PositiveIntegerField()
location = models.ForeignKey('Location', on_delete=models.CASCADE)
structures = models.IntegerField(... | 30.576923 | 73 | 0.704403 |
62807764efaa987d930a2690fa456be8295b37db | 18,388 | py | Python | fairseq/models/wav2vec.py | theorm/fairseq | 7a653108cded5aaa69910e9acc0bf9a628f2257b | [
"MIT"
] | 239 | 2020-05-12T16:07:49.000Z | 2022-03-29T20:07:36.000Z | fairseq/models/wav2vec.py | theorm/fairseq | 7a653108cded5aaa69910e9acc0bf9a628f2257b | [
"MIT"
] | 35 | 2020-11-02T10:53:20.000Z | 2022-03-18T20:58:07.000Z | fairseq/models/wav2vec.py | theorm/fairseq | 7a653108cded5aaa69910e9acc0bf9a628f2257b | [
"MIT"
] | 38 | 2020-11-07T19:23:25.000Z | 2022-03-31T08:56:33.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import sys
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from . import (
BaseFairseqModel, register_mo... | 38.793249 | 119 | 0.596422 |
d737774990b5c16b6c0a1030eb607d172755666f | 670 | py | Python | app/core/management/commands/wait_for_db.py | qwerty1199/recipe-app-api | 36acf8181513548b06bd371221182ac32964a49b | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | qwerty1199/recipe-app-api | 36acf8181513548b06bd371221182ac32964a49b | [
"MIT"
] | null | null | null | app/core/management/commands/wait_for_db.py | qwerty1199/recipe-app-api | 36acf8181513548b06bd371221182ac32964a49b | [
"MIT"
] | null | null | null | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Django command to pause execution until the db is available"""
def handle(self, *args, **options):
self.stdout.write('Waiting f... | 31.904762 | 79 | 0.649254 |
83a377dde5c74806855de4264ebf0c2d557bffa0 | 40,788 | bzl | Python | third_party/gpus/cuda_configure.bzl | shreyanshp/tensorflow | 77867318b3c89e38828e787f3948ccae21bc0693 | [
"Apache-2.0"
] | null | null | null | third_party/gpus/cuda_configure.bzl | shreyanshp/tensorflow | 77867318b3c89e38828e787f3948ccae21bc0693 | [
"Apache-2.0"
] | null | null | null | third_party/gpus/cuda_configure.bzl | shreyanshp/tensorflow | 77867318b3c89e38828e787f3948ccae21bc0693 | [
"Apache-2.0"
] | null | null | null | # -*- Python -*-
"""Repository rule for CUDA autoconfiguration.
`cuda_configure` depends on the following environment variables:
* `TF_NEED_CUDA`: Whether to enable building with CUDA.
* `GCC_HOST_COMPILER_PATH`: The GCC host compiler path
* `TF_CUDA_CLANG`: Whether to use clang as a cuda compiler.
* `CLANG_C... | 38.155285 | 102 | 0.685667 |
c22e7d51fcf664ed54930eb8e3af70acc6a49a2b | 9,552 | py | Python | docs/conf.py | deprecated/nebulio | 8548d9f44117206e9314d676576b24c1bc5e1c76 | [
"MIT"
] | null | null | null | docs/conf.py | deprecated/nebulio | 8548d9f44117206e9314d676576b24c1bc5e1c76 | [
"MIT"
] | null | null | null | docs/conf.py | deprecated/nebulio | 8548d9f44117206e9314d676576b24c1bc5e1c76 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# nebulio documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 4 12:54:36 2014.
from __future__ import print_function
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are presen... | 31.84 | 82 | 0.712207 |
6a64b6e43de0cc5c8260731e12577726d42db5c1 | 3,396 | py | Python | Mission-to-Mars/scrape_mars.py | tamerfa/Mission-to-Mars | 116e8dd63c9f3f2803eec723f50f57909216c7e6 | [
"ADSL"
] | null | null | null | Mission-to-Mars/scrape_mars.py | tamerfa/Mission-to-Mars | 116e8dd63c9f3f2803eec723f50f57909216c7e6 | [
"ADSL"
] | null | null | null | Mission-to-Mars/scrape_mars.py | tamerfa/Mission-to-Mars | 116e8dd63c9f3f2803eec723f50f57909216c7e6 | [
"ADSL"
] | null | null | null | # Importing dependencies
from splinter import Browser
from bs4 import BeautifulSoup as bs
from webdriver_manager.chrome import ChromeDriverManager
import time
import pandas as pd
def scrape():
# Initiate browser
executable_path = {'executable_path':ChromeDriverManager().install()}
browser = Browser('chrome... | 30.594595 | 100 | 0.673145 |
8c4ab07559fc72991a94c3b51d05f7cd777e9186 | 5,799 | py | Python | piqa/utils/complex.py | charltongroves/piqa | 63817eeda165563efe5adfc789295ec7908c0201 | [
"MIT"
] | null | null | null | piqa/utils/complex.py | charltongroves/piqa | 63817eeda165563efe5adfc789295ec7908c0201 | [
"MIT"
] | null | null | null | piqa/utils/complex.py | charltongroves/piqa | 63817eeda165563efe5adfc789295ec7908c0201 | [
"MIT"
] | null | null | null | r"""Differentiable and JITable complex tensor API
"""
import torch
def complex(real: torch.Tensor, imag: torch.Tensor) -> torch.Tensor:
r"""Returns a complex tensor with its real part equal to \(\Re\) and
its imaginary part equal to \(\Im\).
$$ c = \Re + i \Im $$
Args:
real: A tensor \(\Re\... | 23.103586 | 72 | 0.459907 |
82e5834fde2f8a5a129e78d0aef493adfdd8b1ee | 12,116 | py | Python | recipes/Python/580771_Tkinter_file_autocomplete_entry/recipe-580771.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/580771_Tkinter_file_autocomplete_entry/recipe-580771.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/580771_Tkinter_file_autocomplete_entry/recipe-580771.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # Author: Miguel Martinez Lopez
# Version: 0.6
import re
import os
try:
from Tkinter import StringVar, Entry, Frame, Listbox, Button, Scrollbar
from Tkconstants import *
except ImportError:
from tkinter import StringVar, Entry, Frame, Listbox, Button, Scrollbar
from tkinter.constants import *
try:
... | 35.017341 | 208 | 0.569742 |
aeaa135059270c550573096800162fd64d09fe62 | 3,982 | py | Python | mojo/tools/mopy/gn.py | rafaelw/mojo | d3495a129dcbe679e2d5ac729c85a58acf38f8c4 | [
"BSD-3-Clause"
] | 5 | 2015-04-30T00:13:21.000Z | 2019-07-10T02:17:24.000Z | mojo/tools/mopy/gn.py | rafaelw/mojo | d3495a129dcbe679e2d5ac729c85a58acf38f8c4 | [
"BSD-3-Clause"
] | null | null | null | mojo/tools/mopy/gn.py | rafaelw/mojo | d3495a129dcbe679e2d5ac729c85a58acf38f8c4 | [
"BSD-3-Clause"
] | 1 | 2019-05-12T13:53:44.000Z | 2019-05-12T13:53:44.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
GN-related configuration functions, e.g., to produce a Config object from a GN
args.gn file).
"""
import ast
import os.path
import re
from .config imp... | 30.396947 | 80 | 0.672275 |
36a9bb31e79dc2213764822b6aa8753387557b01 | 15,650 | py | Python | venv/Lib/site-packages/pandas/tests/io/parser/test_na_values.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/io/parser/test_na_values.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/io/parser/test_na_values.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | 1 | 2021-04-26T22:41:56.000Z | 2021-04-26T22:41:56.000Z | """
Tests that NA values are properly handled during
parsing for all of the parsers defined in parsers.py
"""
from io import StringIO
import numpy as np
import pytest
from pandas._libs.parsers import STR_NA_VALUES
from pandas import DataFrame, Index, MultiIndex
import pandas._testing as tm
def test_... | 27.504394 | 89 | 0.518211 |
19e9d3a1f9d6e759c4f79a442f626df1c7df3a75 | 8,864 | py | Python | config/settings/production.py | NumanIbnMazid/Django_Skeleton_Default | 4ab147cc91145533f1acc8c364360575e08ca5c8 | [
"MIT"
] | null | null | null | config/settings/production.py | NumanIbnMazid/Django_Skeleton_Default | 4ab147cc91145533f1acc8c364360575e08ca5c8 | [
"MIT"
] | 16 | 2022-01-21T14:40:31.000Z | 2022-03-31T14:27:25.000Z | config/settings/production.py | NumanIbnMazid/Django_Skeleton_Default | 4ab147cc91145533f1acc8c364360575e08ca5c8 | [
"MIT"
] | null | null | null | import logging
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.redis import RedisIntegration
from .base import * # noqa
from .base im... | 42.209524 | 100 | 0.645645 |
6e80902352bfbda435e0751d46f7c89ef34f6fcd | 3,215 | py | Python | pylot/simulation/synchronizer_operator.py | seikurou/pylot | 0e47c3dcaf6f0d4a3937b94846d2e55ef908dfa5 | [
"Apache-2.0"
] | null | null | null | pylot/simulation/synchronizer_operator.py | seikurou/pylot | 0e47c3dcaf6f0d4a3937b94846d2e55ef908dfa5 | [
"Apache-2.0"
] | null | null | null | pylot/simulation/synchronizer_operator.py | seikurou/pylot | 0e47c3dcaf6f0d4a3937b94846d2e55ef908dfa5 | [
"Apache-2.0"
] | null | null | null | import erdos
from erdos import ReadStream, Timestamp, WriteStream
from pylot.control.messages import ControlMessage
from pylot.simulation.utils import get_vehicle_handle, get_world, \
set_simulation_mode
class SynchronizerOperator(erdos.Operator):
"""Sends control messages when it receives a watermark on a s... | 43.445946 | 79 | 0.65381 |
5e1dd8528c9c055522ecd220139310c1728e55c3 | 14,023 | py | Python | samples/client/petstore/python-experimental/tests/test_pet_api.py | malymato/openapi-generator | 47e2c0d027d867de67633bbc9c0a5d7e1054a778 | [
"Apache-2.0"
] | 2 | 2019-12-08T12:00:11.000Z | 2022-01-02T13:47:52.000Z | samples/client/petstore/python-experimental/tests/test_pet_api.py | malymato/openapi-generator | 47e2c0d027d867de67633bbc9c0a5d7e1054a778 | [
"Apache-2.0"
] | 8 | 2021-03-01T21:18:19.000Z | 2022-02-27T07:56:15.000Z | samples/client/petstore/python-experimental/tests/test_pet_api.py | malymato/openapi-generator | 47e2c0d027d867de67633bbc9c0a5d7e1054a778 | [
"Apache-2.0"
] | 1 | 2019-11-26T06:36:44.000Z | 2019-11-26T06:36:44.000Z | # coding: utf-8
# flake8: noqa
"""
Run the tests.
$ docker pull swaggerapi/petstore
$ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
$ pip install nose (optional)
$ cd petstore_api-python
$ nosetests -v
"""
from collections import namedtuple
import js... | 37 | 259 | 0.616131 |
9628136159b638002b4272c62d6618369ccb909d | 46 | py | Python | scPrivacy_code/__init__.py | bm2-lab/scPrivacy | 444c8f3a5e7b890c299cd823359e5414f73d6205 | [
"MIT"
] | 1 | 2022-03-10T02:58:17.000Z | 2022-03-10T02:58:17.000Z | scPrivacy_code/__init__.py | bm2-lab/scPrivacy | 444c8f3a5e7b890c299cd823359e5414f73d6205 | [
"MIT"
] | null | null | null | scPrivacy_code/__init__.py | bm2-lab/scPrivacy | 444c8f3a5e7b890c299cd823359e5414f73d6205 | [
"MIT"
] | null | null | null | from .scPrivacy import *
__version__ = '1.0'
| 11.5 | 24 | 0.695652 |
e7c228ae4f48a2e01a6b6423b12a9c999fa73423 | 15,044 | py | Python | thonny/common.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | thonny/common.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | thonny/common.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Classes used both by front-end and back-end
"""
import os.path
import platform
import site
import sys
import tokenize
from collections import namedtuple
from typing import List, Optional # @UnusedImport
import subprocess
import logging
MESSAGE_MARKER = "\x02"
ValueInfo = namedtuple("Valu... | 28.278195 | 88 | 0.607684 |
f100599cd575f33e481555c826a169d0be5ca67a | 3,317 | py | Python | custom_humus.py | ziniman/aws-rekognition-demo | 5cee9a47531e80c42525dfc134cf89bd40313cc1 | [
"Apache-2.0"
] | 11 | 2018-08-14T17:57:36.000Z | 2021-03-06T14:54:28.000Z | custom_humus.py | ziniman/aws-rekognition-demo | 5cee9a47531e80c42525dfc134cf89bd40313cc1 | [
"Apache-2.0"
] | null | null | null | custom_humus.py | ziniman/aws-rekognition-demo | 5cee9a47531e80c42525dfc134cf89bd40313cc1 | [
"Apache-2.0"
] | 5 | 2018-06-07T20:08:12.000Z | 2021-02-24T09:56:50.000Z | #!/usr/bin/python
#Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#PDX-License-Identifier: MIT-0 (For details, see https://github.com/awsdocs/amazon-rekognition-developer-guide/blob/master/LICENSE-SAMPLECODE.)
import boto3
import io
from PIL import Image, ImageDraw, ExifTags, ImageColor, Imag... | 30.431193 | 143 | 0.617124 |
4076477ef9e73ca8a602e67ed2b9875d30928b6f | 2,348 | py | Python | PreprocessData/all_class_files/TelevisionStation.py | wkid-neu/Schema | 4854720a15894dd814691a55e03329ecbbb6f558 | [
"MIT"
] | 3 | 2021-11-06T12:29:05.000Z | 2022-03-22T12:48:55.000Z | PreprocessData/all_class_files/TelevisionStation.py | DylanNEU/Schema | 4854720a15894dd814691a55e03329ecbbb6f558 | [
"MIT"
] | null | null | null | PreprocessData/all_class_files/TelevisionStation.py | DylanNEU/Schema | 4854720a15894dd814691a55e03329ecbbb6f558 | [
"MIT"
] | 1 | 2021-11-06T12:29:12.000Z | 2021-11-06T12:29:12.000Z | from PreprocessData.all_class_files.LocalBusiness import LocalBusiness
import global_data
class TelevisionStation(LocalBusiness):
def __init__(self, additionalType=None, alternateName=None, description=None, disambiguatingDescription=None, identifier=None, image=None, mainEntityOfPage=None, name=None, potent... | 293.5 | 1,273 | 0.832624 |
428fbea6bcc5942bbf0d4bc9763ab30177e6aa37 | 8,997 | py | Python | localstack/http/router.py | TheRakeshPurohit/localstack | 063e07827934a7c7ff00e6d7cf6e243bcce0eb99 | [
"Apache-2.0"
] | null | null | null | localstack/http/router.py | TheRakeshPurohit/localstack | 063e07827934a7c7ff00e6d7cf6e243bcce0eb99 | [
"Apache-2.0"
] | null | null | null | localstack/http/router.py | TheRakeshPurohit/localstack | 063e07827934a7c7ff00e6d7cf6e243bcce0eb99 | [
"Apache-2.0"
] | null | null | null | import functools
import inspect
import threading
from typing import (
Any,
Callable,
Dict,
Generic,
Iterable,
List,
Mapping,
NamedTuple,
Optional,
Protocol,
Type,
TypeVar,
)
from werkzeug.routing import BaseConverter, Map, Rule, RuleFactory
from localstack.utils.common ... | 33.696629 | 119 | 0.642214 |
f4ad5d40a98c476cc27350aa4c7bf886ff5dfcd4 | 1,122 | py | Python | sol/test_lexer.py | ianpreston/sol | 469fff7f7aff8469e7a2731fbf4b06de0db78836 | [
"MIT"
] | null | null | null | sol/test_lexer.py | ianpreston/sol | 469fff7f7aff8469e7a2731fbf4b06de0db78836 | [
"MIT"
] | null | null | null | sol/test_lexer.py | ianpreston/sol | 469fff7f7aff8469e7a2731fbf4b06de0db78836 | [
"MIT"
] | null | null | null | from sol.lexer import Lexer, Token, TokenType
def test_assignment():
source = 'x := Object.clone'
lexer = Lexer(source)
tokens = lexer.iter_match_tokens()
tokens = list(tokens)
assert tokens == [
Token(TokenType.IDENT, 'x'),
Token(TokenType.OPER, ':='),
Token(TokenType.ID... | 22.897959 | 47 | 0.582888 |
bd4135af844412519a6f855555c6e21968751b6a | 4,202 | py | Python | tests/test_prompt.py | nobody-65534/click-constrained-option | db9d3cbcf551b888cf4f38717d864a9c1e4568a9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_prompt.py | nobody-65534/click-constrained-option | db9d3cbcf551b888cf4f38717d864a9c1e4568a9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_prompt.py | nobody-65534/click-constrained-option | db9d3cbcf551b888cf4f38717d864a9c1e4568a9 | [
"BSD-3-Clause"
] | null | null | null | import re
import unittest
import click
from click.testing import CliRunner
from click_constrained_option import ConstrainedOption
class TestPrompt(unittest.TestCase):
def test_prompt_func(self):
@click.command()
@click.option("--a")
@click.option("--b", cls=ConstrainedOption, prompt_func... | 33.616 | 126 | 0.554736 |
7034cbd365315f9239fbd832974a75f4c1eaca8d | 1,345 | py | Python | electrum_cintamani/scripts/bip39_recovery.py | sgmua8/electrum-dash | f7e6059fb07994867af3eebd1cd0c9789a0615d3 | [
"MIT"
] | null | null | null | electrum_cintamani/scripts/bip39_recovery.py | sgmua8/electrum-dash | f7e6059fb07994867af3eebd1cd0c9789a0615d3 | [
"MIT"
] | null | null | null | electrum_cintamani/scripts/bip39_recovery.py | sgmua8/electrum-dash | f7e6059fb07994867af3eebd1cd0c9789a0615d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import asyncio
from electrum_cintamani.util import json_encode, print_msg, create_and_start_event_loop, log_exceptions
from electrum_cintamani.simple_config import SimpleConfig
from electrum_cintamani.network import Network
from electrum_cintamani.keystore import bip39_to_seed
from e... | 32.804878 | 103 | 0.758364 |
fc19e20a5cb2dd172edd230c3f5a337eef9adf86 | 3,656 | py | Python | setup.py | ddc67cd/sanic | 150d75b7c6aa2346436f0eb895048c53976c98d4 | [
"MIT"
] | null | null | null | setup.py | ddc67cd/sanic | 150d75b7c6aa2346436f0eb895048c53976c98d4 | [
"MIT"
] | null | null | null | setup.py | ddc67cd/sanic | 150d75b7c6aa2346436f0eb895048c53976c98d4 | [
"MIT"
] | null | null | null | """
Sanic
"""
import codecs
import os
import re
import sys
from distutils.util import strtobool
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
"""
Provide a Test runner to be used from setup.py to run unit tests
"""
user_options = [("... | 24.052632 | 89 | 0.623359 |
17801e9e466202eeec71ada65ca49688ba648bb1 | 969 | py | Python | tanager_feeder/dialogs/new_dir_dialog.py | westernmarslab/tanager-feeder | 59bc4d5deca474e2c915ea49aaba791f247de41f | [
"MIT"
] | null | null | null | tanager_feeder/dialogs/new_dir_dialog.py | westernmarslab/tanager-feeder | 59bc4d5deca474e2c915ea49aaba791f247de41f | [
"MIT"
] | null | null | null | tanager_feeder/dialogs/new_dir_dialog.py | westernmarslab/tanager-feeder | 59bc4d5deca474e2c915ea49aaba791f247de41f | [
"MIT"
] | 1 | 2021-04-23T00:03:46.000Z | 2021-04-23T00:03:46.000Z | from tkinter import Entry
from tanager_feeder.dialogs.dialog import Dialog
class NewDirDialog(Dialog):
def __init__(self, controller, fexplorer, label="New directory name: ", title="New Directoy"):
super().__init__(
controller, label=label, title=title, buttons={"ok": {self.get: []}, "cancel":... | 35.888889 | 111 | 0.618163 |
a2aea9bde1b97b40d6b686cf8b8ff209ffe48660 | 15,224 | py | Python | autotest/gdrivers/hdf5.py | oss-qm/gdal | bec8aaf79c337fc6ac3a6f18d66b320e48904854 | [
"MIT"
] | null | null | null | autotest/gdrivers/hdf5.py | oss-qm/gdal | bec8aaf79c337fc6ac3a6f18d66b320e48904854 | [
"MIT"
] | null | null | null | autotest/gdrivers/hdf5.py | oss-qm/gdal | bec8aaf79c337fc6ac3a6f18d66b320e48904854 | [
"MIT"
] | null | null | null | #!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test read functionality for HDF5 driver.
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
##########################... | 33.459341 | 213 | 0.583684 |
46dbc192eccdafd16e79757e75b47589e023a62b | 601 | py | Python | plotly/validators/scatterpolar/marker/colorbar/_showexponent.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterpolar/marker/colorbar/_showexponent.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterpolar/marker/colorbar/_showexponent.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name='showexponent',
parent_name='scatterpolar.marker.colorbar',
**kwargs
):
super(ShowexponentValidator, self).__init__(
... | 30.05 | 78 | 0.613977 |
6a5f0cfc0d314d4b3cd2e0ecea86581feac805e8 | 1,615 | py | Python | ftpConn.py | mastix/mqtt-ftp-downloader | 0a7d1bec3831d690a90620948a668547f2f06a66 | [
"MIT"
] | null | null | null | ftpConn.py | mastix/mqtt-ftp-downloader | 0a7d1bec3831d690a90620948a668547f2f06a66 | [
"MIT"
] | null | null | null | ftpConn.py | mastix/mqtt-ftp-downloader | 0a7d1bec3831d690a90620948a668547f2f06a66 | [
"MIT"
] | 1 | 2018-05-19T21:30:01.000Z | 2018-05-19T21:30:01.000Z | """
Script: ftpConn.py
Author: Sascha Sambale
Date: June 21st, 2016
Purpose: Accesses an FTP Server to download a given file from a given path.
"""
import ftplib
import logging
import tempfile
class FTPConnection(object):
def __init__(self):
self.logger = logging.getLogger('ftpDownloader')
... | 32.959184 | 98 | 0.611765 |
21ec3b67b28fe035bda6d06ef18c104618a96616 | 92 | py | Python | ramlgnarok_test_app/raml_test/apps.py | pkucmus/ramlgnarok | 620f062d4f8421c8c1a70dfdabb54fb08912e3cc | [
"MIT"
] | null | null | null | ramlgnarok_test_app/raml_test/apps.py | pkucmus/ramlgnarok | 620f062d4f8421c8c1a70dfdabb54fb08912e3cc | [
"MIT"
] | null | null | null | ramlgnarok_test_app/raml_test/apps.py | pkucmus/ramlgnarok | 620f062d4f8421c8c1a70dfdabb54fb08912e3cc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RamlTestConfig(AppConfig):
name = 'raml_test'
| 15.333333 | 33 | 0.76087 |
5ef6553aee61b81b4686b35be205dc561f3680fd | 21,393 | py | Python | rpython/jit/backend/arm/callbuilder.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | rpython/jit/backend/arm/callbuilder.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | rpython/jit/backend/arm/callbuilder.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | from rpython.rlib.clibffi import FFI_DEFAULT_ABI
from rpython.rlib.objectmodel import we_are_translated
from rpython.jit.metainterp.history import INT, FLOAT, REF
from rpython.jit.backend.arm.arch import WORD
from rpython.jit.backend.arm import registers as r
from rpython.jit.backend.arm import conditions as c
from rpy... | 42.112205 | 91 | 0.557986 |
58cc66384450fe06963dd83c09796e8a5b958d63 | 1,571 | py | Python | files_and_folders/backupper/bk.py | Xanderamon/python-IT-automation | d07c41a3b3102214631cb35bd73d2a2d315c89dc | [
"MIT"
] | null | null | null | files_and_folders/backupper/bk.py | Xanderamon/python-IT-automation | d07c41a3b3102214631cb35bd73d2a2d315c89dc | [
"MIT"
] | null | null | null | files_and_folders/backupper/bk.py | Xanderamon/python-IT-automation | d07c41a3b3102214631cb35bd73d2a2d315c89dc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import multiprocessing
import subprocess
#In this test /src/ and /dest/ are in the same folder of the script
source = os.path.join(os.getcwd(),"src")
destination = os.path.join(os.getcwd(),"dest")
def get_pathlist(folder):
pathlist = []
#No need for the FULL path of the dir/f... | 33.425532 | 80 | 0.630172 |
f2b05a1d36df99e204c9873cfbe89878cb7e1370 | 838 | py | Python | cms/apps/pages/tests/test_admin_destructive.py | cresset-group/cms | 727b81e40dd1196e85c240e728a7824121163d4d | [
"BSD-3-Clause"
] | 13 | 2015-03-13T21:32:16.000Z | 2020-08-07T08:09:02.000Z | cms/apps/pages/tests/test_admin_destructive.py | cresset-group/cms | 727b81e40dd1196e85c240e728a7824121163d4d | [
"BSD-3-Clause"
] | 131 | 2015-04-04T11:27:14.000Z | 2020-10-16T13:39:16.000Z | cms/apps/pages/tests/test_admin_destructive.py | cresset-group/cms | 727b81e40dd1196e85c240e728a7824121163d4d | [
"BSD-3-Clause"
] | 16 | 2015-06-05T12:56:28.000Z | 2021-01-06T15:15:53.000Z | import sys
from django.conf import settings
from django.contrib import admin
from django.test import TestCase
from ..models import Country, CountryGroup, Page
class TestArticleAdminBase(TestCase):
def test_article_admin(self):
self.assertNotIn(Country, admin.site._registry)
self.assertNotIn(Cou... | 28.896552 | 81 | 0.686158 |
540668a27b948a35e360e525034587d9fcaa1c6d | 111 | py | Python | mocasin/gui/__init__.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | 1 | 2022-03-13T19:27:50.000Z | 2022-03-13T19:27:50.000Z | mocasin/tgff/tgffParser/__init__.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | null | null | null | mocasin/tgff/tgffParser/__init__.py | tud-ccc/mocasin | 6cf0a169e24d65d0fc859398f181dd500f928340 | [
"0BSD"
] | null | null | null | # Copyright (C) 2019 TU Dresden
# Licensed under the ISC license (see LICENSE.txt)
#
# Authors: Felix Teweleit
| 22.2 | 50 | 0.738739 |
274bedadf55aa20c412461ba9d4fc9bb02da6a03 | 8,417 | py | Python | special_case.py | zhiguo-ding/CRNOMA_DDPG | 8f7acca0a8b2c176e50c262cb006a0f4a8af37a1 | [
"MIT"
] | 24 | 2020-12-03T07:54:54.000Z | 2022-03-27T10:44:16.000Z | special_case.py | 3025066980/CRNOMA_DDPG | 8f7acca0a8b2c176e50c262cb006a0f4a8af37a1 | [
"MIT"
] | null | null | null | special_case.py | 3025066980/CRNOMA_DDPG | 8f7acca0a8b2c176e50c262cb006a0f4a8af37a1 | [
"MIT"
] | 16 | 2020-12-03T13:36:12.000Z | 2022-03-30T10:49:11.000Z | """
Note: This is based on Mofan's codes from: https://morvanzhou.github.io/tutorials/
Using:
tensorflow 1.0
This code is used to generate the figures for random fading without average (a snapshot).
Simply change K
"""
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import numpy as np
import time
from envir... | 38.43379 | 178 | 0.634668 |
bcbb8189e5466f03064f9ba612c54c028e53d20f | 30,924 | py | Python | pypy/module/micronumpy/concrete.py | SeraphRoy/PyPy-Functional | e825dce7f7c484fa666566974a93ed5d59fb73be | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/micronumpy/concrete.py | SeraphRoy/PyPy-Functional | e825dce7f7c484fa666566974a93ed5d59fb73be | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/micronumpy/concrete.py | SeraphRoy/PyPy-Functional | e825dce7f7c484fa666566974a93ed5d59fb73be | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from pypy.interpreter.error import oefmt
from rpython.rlib import jit, rgc
from rpython.rlib.rarithmetic import ovfcheck
from rpython.rlib.listsort import make_timsort_class
from rpython.rlib.buffer import Buffer
from rpython.rlib.debug import make_sure_not_resized
from rpython.rlib.rstring import StringBuilder
from rp... | 41.453083 | 124 | 0.603835 |
9b2660421489a2dcf90a9f11b247b832641c0bb9 | 2,224 | py | Python | src/build_infrastructure/android/app.py | ammarkarachi/amplify-ci-support | f3ebefa2e64eba64b7bb05aad51e1e91f0c74112 | [
"Apache-2.0"
] | 1 | 2021-07-07T10:50:45.000Z | 2021-07-07T10:50:45.000Z | src/build_infrastructure/android/app.py | yuth/amplify-ci-support | eab10558f1880bf9565dfa1aaf50d47de48de667 | [
"Apache-2.0"
] | null | null | null | src/build_infrastructure/android/app.py | yuth/amplify-ci-support | eab10558f1880bf9565dfa1aaf50d47de48de667 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
from aws_cdk import (
core,
aws_codepipeline_actions
)
from stacks.build_pipeline_stack import AmplifyAndroidCodePipeline
from stacks.account_bootstrap_stack import AccountBootstrap
from stacks.maven_release_stack import MavenReleaseStack
app = core.App()
TARGET_REGION = app.... | 34.75 | 153 | 0.724371 |
0d3e7c8f37ed185b15e388634718a6248ca4ce54 | 5,423 | py | Python | MagniPy/Workflow/grism_lenses/lens2033_satlocobs.py | dangilman/MagniPy | 820b82ea0f6559c895f11c92d93de475a92d38b0 | [
"MIT"
] | 2 | 2020-02-20T02:27:16.000Z | 2020-02-20T08:38:23.000Z | MagniPy/Workflow/grism_lenses/lens2033_satlocobs.py | dangilman/MagniPy | 820b82ea0f6559c895f11c92d93de475a92d38b0 | [
"MIT"
] | 1 | 2021-11-15T17:50:20.000Z | 2021-11-15T17:50:20.000Z | MagniPy/Workflow/grism_lenses/lens2033_satlocobs.py | dangilman/MagniPy | 820b82ea0f6559c895f11c92d93de475a92d38b0 | [
"MIT"
] | null | null | null | import numpy as np
from MagniPy.lensdata import Data
from MagniPy.LensBuild.defaults import get_default_SIE_random, get_default_SIE
from MagniPy.util import approx_theta_E
from MagniPy.Workflow.grism_lenses.quad import Quad
class WFI2033_satlocobs(Quad):
x = np.array([-0.751, -0.039, 1.445, -0.668])
y = np.ar... | 38.460993 | 114 | 0.619214 |
fbc61746c687428060bb7d3bebd8185288369433 | 8,148 | py | Python | contrib/devtools/update-translations.py | zero24x/ltx | 045dd208b875bdf891f1f1a09249beaed6c55b0f | [
"MIT"
] | 2 | 2019-08-06T13:47:40.000Z | 2020-05-06T21:57:31.000Z | contrib/devtools/update-translations.py | litex-dev/Litexcoin | 9ddc29de3d76993edc43a72d6be6fb8c8b7adff8 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | litex-dev/Litexcoin | 9ddc29de3d76993edc43a72d6be6fb8c8b7adff8 | [
"MIT"
] | 3 | 2019-10-16T19:08:49.000Z | 2020-05-08T01:16:11.000Z | #!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | 38.616114 | 124 | 0.633775 |
ff93d470b1e0aa6f3095869d96cfb037be94fe75 | 1,978 | py | Python | rllab/config.py | jackwilkinson255/mbmpo_master | e9e0eaf542c7895764dcb0bfee28752818124ff2 | [
"MIT"
] | 28 | 2018-11-15T14:14:23.000Z | 2022-01-10T01:53:43.000Z | rllab/config.py | hongzimao/model_ensemble_meta_learning | 8b1351df94dfe530efaff1118022315c8d877774 | [
"MIT"
] | 3 | 2019-05-05T23:39:01.000Z | 2021-06-15T15:28:06.000Z | rllab/config.py | hongzimao/model_ensemble_meta_learning | 8b1351df94dfe530efaff1118022315c8d877774 | [
"MIT"
] | 14 | 2018-11-15T16:47:02.000Z | 2021-05-28T14:58:01.000Z | import os.path as osp
import os
PROJECT_PATH = osp.abspath(osp.join(osp.dirname(__file__), '..'))
LOG_DIR = PROJECT_PATH + "/data"
USE_TF = False
DOCKER_IMAGE = "DOCKER_IMAGE"
DOCKERFILE_PATH = "/path/to/Dockerfile"
KUBE_PREFIX = "rllab_"
DOCKER_LOG_DIR = "/tmp/expt"
POD_DIR = PROJECT_PATH + "/.pods"
AWS_S3_PA... | 21.736264 | 121 | 0.704247 |
aabd1c96726a91821d1e508d0192cad891c0d054 | 1,443 | py | Python | clients/python/generated/test/test_inline_object2.py | ub1k24/swagger-aem | c9ae0cf8b57d27658527982d6d6653790d3acf80 | [
"Apache-2.0"
] | 39 | 2016-10-02T06:45:12.000Z | 2021-09-08T20:39:53.000Z | clients/python/generated/test/test_inline_object2.py | ub1k24/swagger-aem | c9ae0cf8b57d27658527982d6d6653790d3acf80 | [
"Apache-2.0"
] | 35 | 2016-11-02T05:06:34.000Z | 2021-09-03T06:03:08.000Z | clients/python/generated/test/test_inline_object2.py | ub1k24/swagger-aem | c9ae0cf8b57d27658527982d6d6653790d3acf80 | [
"Apache-2.0"
] | 23 | 2016-11-07T04:14:42.000Z | 2021-02-15T09:49:13.000Z | # coding: utf-8
"""
Adobe Experience Manager (AEM) API
Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API # noqa: E501
The version of the OpenAPI document: 3.4.0-pre.0
Contact: opensource@shinesolutions.com
Generated by: https://openapi-generator.tech
"""
from __fut... | 26.722222 | 96 | 0.67429 |
d4097900d3898f5f10b17f62888eca6963bb958a | 1,676 | py | Python | exabel_data_sdk/tests/client/api/test_entity_api.py | aksestok/python-sdk | 520a3d9822ffa9a023262b379ea3b3d19cb10853 | [
"MIT"
] | null | null | null | exabel_data_sdk/tests/client/api/test_entity_api.py | aksestok/python-sdk | 520a3d9822ffa9a023262b379ea3b3d19cb10853 | [
"MIT"
] | null | null | null | exabel_data_sdk/tests/client/api/test_entity_api.py | aksestok/python-sdk | 520a3d9822ffa9a023262b379ea3b3d19cb10853 | [
"MIT"
] | null | null | null | import unittest
from exabel_data_sdk.client.api.data_classes.entity import Entity
from exabel_data_sdk.client.api.entity_api import EntityApi
from exabel_data_sdk.tests.client.api.mock_entity_api import MockEntityApi
class TestEntityApi(unittest.TestCase):
def test_upsert(self):
for assume_exists in (Tru... | 42.974359 | 78 | 0.648568 |
b902705c8f6e93393788099063b26598ccbb0c02 | 5,742 | py | Python | main.py | incredible-smurf/xjtu_healthy_for_graduates | 3c09d9626b01ef97a7146d5649e58b024a6bea25 | [
"MIT"
] | null | null | null | main.py | incredible-smurf/xjtu_healthy_for_graduates | 3c09d9626b01ef97a7146d5649e58b024a6bea25 | [
"MIT"
] | null | null | null | main.py | incredible-smurf/xjtu_healthy_for_graduates | 3c09d9626b01ef97a7146d5649e58b024a6bea25 | [
"MIT"
] | null | null | null | #coding=utf-8
import logging
import os
import random
import time
from dotenv import load_dotenv
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import... | 34.590361 | 160 | 0.653605 |
3ee91d056507eea2b793da59df8f6109f0e43d79 | 3,949 | py | Python | uh.collegescheduler.com/corecurriculum/sectionattributes/src/sectionattributes.py | cougargrades/json | 42f0c46f8c69a2c7f8c531775f744a782ae825a8 | [
"MIT"
] | null | null | null | uh.collegescheduler.com/corecurriculum/sectionattributes/src/sectionattributes.py | cougargrades/json | 42f0c46f8c69a2c7f8c531775f744a782ae825a8 | [
"MIT"
] | null | null | null | uh.collegescheduler.com/corecurriculum/sectionattributes/src/sectionattributes.py | cougargrades/json | 42f0c46f8c69a2c7f8c531775f744a782ae825a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import requests
import json
from halo import Halo
parser = argparse.ArgumentParser(description='Scrapes UH CollegeScheduler API to enumerate all courses by section attributes.')
parser.add_argument('apiUrl', metavar='API_URL', type=str,
help='The API URL used... | 35.258929 | 127 | 0.62902 |
a01efdf105fb89ca1c8a5c32a5f43d981fbba61d | 3,372 | py | Python | src/cogent3/phylo/least_squares.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/phylo/least_squares.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/phylo/least_squares.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import numpy
from numpy.linalg import solve as solve_linear_equations
from .tree_space import TreeEvaluator, ancestry2tree
from .util import (
distance_dict_and_names_to_1D,
distance_dict_to_1D,
triangular_order,
)
__author__ = "Peter Maxwell"
__copyright__ = "Copyright 2007-2019, ... | 33.386139 | 82 | 0.628114 |
066fbe5b26bae836883f037e60b9232393167605 | 3,159 | py | Python | src/data/download/TH_disease.py | juliazam/healthcare_ASEAN | 3cc451f723124f18b2d11c79ff80a6c5a9354c6e | [
"MIT"
] | 25 | 2016-04-24T14:00:36.000Z | 2021-01-07T07:26:00.000Z | src/data/download/TH_disease.py | shikhakhanna19/healthcare_ASEAN | 3f89ec67fde825bf3b6275cee0e8f13812533c1e | [
"MIT"
] | 25 | 2016-06-24T07:04:39.000Z | 2020-10-03T23:01:41.000Z | src/data/download/TH_disease.py | shikhakhanna19/healthcare_ASEAN | 3f89ec67fde825bf3b6275cee0e8f13812533c1e | [
"MIT"
] | 112 | 2016-06-24T01:41:00.000Z | 2020-10-03T00:33:22.000Z | # -*- coding: utf-8 -*-
"""Download historical RTF data from Thailand's Bureau of Epidemiology."""
from bs4 import BeautifulSoup
import re
import sys
import os
import logging
import requests
BASE_URL = 'http://www.boe.moph.go.th/boedb/surdata'
PAGE_URL = BASE_URL + '/disease.php?dcontent=old&ds={}'
DISEASE_CODES = {'M... | 35.1 | 81 | 0.63881 |
385a2439e27e28a49e8e1c7d19541ab9545dadac | 16,937 | py | Python | python/pyspark/ml/wrapper.py | yangwwei/spark | dc153f525c8c895b9ceac8dfb3516b601c86a462 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2022-02-15T04:39:56.000Z | 2022-02-15T04:39:56.000Z | python/pyspark/ml/wrapper.py | yangwwei/spark | dc153f525c8c895b9ceac8dfb3516b601c86a462 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2022-01-21T23:55:04.000Z | 2022-02-24T20:00:18.000Z | python/pyspark/ml/wrapper.py | yangwwei/spark | dc153f525c8c895b9ceac8dfb3516b601c86a462 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2022-03-09T08:50:07.000Z | 2022-03-09T08:50:07.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 us... | 36.502155 | 100 | 0.635355 |
7f941fca30c1a0a3d5339d17399d5f6b02ee7591 | 1,648 | py | Python | package/spack-makedepend/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-makedepend/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-makedepend/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 43.368421 | 82 | 0.677184 |
2a7cffa5bdde7eb035b96c0139d4982abce2f926 | 4,146 | py | Python | readthedocs/projects/version_handling.py | nikhilgondane/RTD | f7926c45386f793f797f927363daed6a559a0a96 | [
"MIT"
] | 1 | 2021-02-23T23:32:35.000Z | 2021-02-23T23:32:35.000Z | readthedocs/projects/version_handling.py | nikhilgondane/RTD | f7926c45386f793f797f927363daed6a559a0a96 | [
"MIT"
] | null | null | null | readthedocs/projects/version_handling.py | nikhilgondane/RTD | f7926c45386f793f797f927363daed6a559a0a96 | [
"MIT"
] | 6 | 2019-02-13T16:08:41.000Z | 2020-03-12T14:17:14.000Z | # -*- coding: utf-8 -*-
"""Project version handling."""
from __future__ import (
absolute_import, division, print_function, unicode_literals)
import unicodedata
import six
from packaging.version import InvalidVersion, Version
from readthedocs.builds.constants import (
LATEST_VERBOSE_NAME, STABLE_VERBOSE_NAME... | 30.940299 | 80 | 0.678003 |
e506913b0c22a84006e647058636fe08a7cb894b | 1,178 | py | Python | official/nlp/tasks/__init__.py | KiryanovKD/models | e17080247e3c9b3301680f61b8f4815c22509e7e | [
"Apache-2.0"
] | 4 | 2019-11-02T14:47:46.000Z | 2022-01-14T10:43:02.000Z | official/nlp/tasks/__init__.py | KiryanovKD/models | e17080247e3c9b3301680f61b8f4815c22509e7e | [
"Apache-2.0"
] | 6 | 2021-10-05T18:53:55.000Z | 2022-03-29T21:37:00.000Z | official/nlp/tasks/__init__.py | KiryanovKD/models | e17080247e3c9b3301680f61b8f4815c22509e7e | [
"Apache-2.0"
] | 2 | 2021-11-30T21:50:03.000Z | 2022-03-27T01:27:31.000Z | # Copyright 2021 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... | 51.217391 | 99 | 0.816638 |
69ab7e50b0f60af7c79a4e1da9dafbfb7bd41af7 | 10,170 | py | Python | sdk/python/pulumi_azure_native/compute/v20210701/get_virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20210701/get_virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20210701/get_virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"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
fro... | 43.836207 | 297 | 0.682104 |
83859def4b5902c74a467c5a41907327a46060b4 | 1,931 | py | Python | app/sortPlayers.py | velociraptordino/CapitalsProject | bfbaeafd81b8a89dba0e992ec54e3e2b314b30e3 | [
"MIT"
] | null | null | null | app/sortPlayers.py | velociraptordino/CapitalsProject | bfbaeafd81b8a89dba0e992ec54e3e2b314b30e3 | [
"MIT"
] | 1 | 2021-06-02T00:46:48.000Z | 2021-06-02T00:46:48.000Z | app/sortPlayers.py | velociraptordino/CapitalsProject | bfbaeafd81b8a89dba0e992ec54e3e2b314b30e3 | [
"MIT"
] | null | null | null | """
File: sort.py
Editor: Tiffany Nguyen
Date: December 7, 2019
Section: 01
Email: tn4@umbc.edu
Description: This file contains the function getPlayers() which reads in
the player database into a list data structure and returns it
Program Assumptions:
- Data including first name, last name, special, number, position, ... | 37.134615 | 79 | 0.673744 |
208415751659cccaa6d79590ae25cc890a35ae86 | 12,244 | py | Python | src/shape_learning/shape_learner_manager.py | chili-epfl/shape_learning | dbebefce21f25a8ab5fa3525e463e53bbc5d65f2 | [
"ISC"
] | 2 | 2015-04-23T18:38:33.000Z | 2015-05-02T21:31:56.000Z | src/shape_learning/shape_learner_manager.py | chili-epfl/shape_learning | dbebefce21f25a8ab5fa3525e463e53bbc5d65f2 | [
"ISC"
] | null | null | null | src/shape_learning/shape_learner_manager.py | chili-epfl/shape_learning | dbebefce21f25a8ab5fa3525e463e53bbc5d65f2 | [
"ISC"
] | 4 | 2015-01-12T12:52:54.000Z | 2018-07-05T01:22:03.000Z | #!/usr/bin/env python
"""
Manages a collection of shape_learners, with long-term memory about the
history of previous collections seen. An example is managing shape_learners
which represent letters, and the collections represent words.
"""
import logging; shapeLogger = logging.getLogger("shape_logger")
import os.pa... | 45.857678 | 167 | 0.669797 |
0107de134100c76d2b0ef4d22f40669dbeb4ff06 | 11,276 | py | Python | scenegraph/exp-official/taskographyv2medium1_DecStar-agl-fb/taskographyv2medium1_DecStar-agl-fb_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | 1 | 2022-01-30T22:06:57.000Z | 2022-01-30T22:06:57.000Z | scenegraph/exp-official/taskographyv2medium1_DecStar-agl-fb/taskographyv2medium1_DecStar-agl-fb_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | null | null | null | scenegraph/exp-official/taskographyv2medium1_DecStar-agl-fb/taskographyv2medium1_DecStar-agl-fb_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | null | null | null | STATS = [
{
"num_node_expansions": 24,
"plan_cost": 20,
"plan_length": 20,
"search_time": 0.8,
"total_time": 1.81
},
{
"num_node_expansions": 22,
"plan_cost": 18,
"plan_length": 18,
"search_time": 0.73,
"total_time": 1.72
},... | 22.109804 | 34 | 0.462043 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.