hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e61a5a14ba19b34924e2269bb7c47587a6de3485 | 3,271 | py | Python | tests/app/settings.py | arslanhashmi/django-webpack-loader | ebc8e19c58588d262988676afaf98d7087419bd5 | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | tests/app/settings.py | arslanhashmi/django-webpack-loader | ebc8e19c58588d262988676afaf98d7087419bd5 | [
"MIT"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | tests/app/settings.py | arslanhashmi/django-webpack-loader | ebc8e19c58588d262988676afaf98d7087419bd5 | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths in... | 25.161538 | 72 | 0.687252 |
9449d85876dd907000c8ed7ded20a7e188334300 | 83 | py | Python | nes/processors/cpu/instructions/load_store/ldy.py | Hexadorsimal/pynes | dbb3d40c1240fa27f70fa798bcec09188755eec2 | [
"MIT"
] | 1 | 2017-05-13T18:57:09.000Z | 2017-05-13T18:57:09.000Z | nes/processors/cpu/instructions/load_store/ldy.py | Hexadorsimal/py6502 | dbb3d40c1240fa27f70fa798bcec09188755eec2 | [
"MIT"
] | 7 | 2020-10-24T17:16:56.000Z | 2020-11-01T14:10:23.000Z | nes/processors/cpu/instructions/load_store/ldy.py | Hexadorsimal/pynes | dbb3d40c1240fa27f70fa798bcec09188755eec2 | [
"MIT"
] | null | null | null | from .load import LoadInstruction
class Ldy(LoadInstruction):
register = 'y'
| 13.833333 | 33 | 0.73494 |
7934316cb24c06524e9aa42fe1914a13a9b9d4a2 | 9,473 | py | Python | test/system/benchmark/pos/cli.py | gye-ul/poseidonos | bce8fe2cd1f36ede8647446ecc4cf8a9749e6918 | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:08:53.000Z | 2022-03-08T13:08:53.000Z | test/system/benchmark/pos/cli.py | gye-ul/poseidonos | bce8fe2cd1f36ede8647446ecc4cf8a9749e6918 | [
"BSD-3-Clause"
] | null | null | null | test/system/benchmark/pos/cli.py | gye-ul/poseidonos | bce8fe2cd1f36ede8647446ecc4cf8a9749e6918 | [
"BSD-3-Clause"
] | null | null | null | import lib
import subprocess
execute_cli_in_local = False
def set_cli_in_local():
global execute_cli_in_local
execute_cli_in_local = True
return execute_cli_in_local
def prefix_string(id, pw, ip):
prefix = f"sshpass -p {pw} ssh -o StrictHostKeyChecking=no {id}@{ip} sudo nohup"
if (execute_cli_i... | 34.07554 | 195 | 0.597488 |
d0736042a5c52e2fe9b2b03f5f20c1c45f495f9c | 7,590 | py | Python | django_qbe/views.py | versae/qbe | be8b28de5bc67cf527ae5bcb183bffe5a91a41db | [
"MIT"
] | 37 | 2015-01-05T09:28:46.000Z | 2020-10-25T08:35:30.000Z | django_qbe/views.py | versae/qbe | be8b28de5bc67cf527ae5bcb183bffe5a91a41db | [
"MIT"
] | 17 | 2015-01-05T00:54:06.000Z | 2020-12-17T05:00:16.000Z | django_qbe/views.py | versae/qbe | be8b28de5bc67cf527ae5bcb183bffe5a91a41db | [
"MIT"
] | 16 | 2015-01-19T20:16:46.000Z | 2021-10-03T16:48:17.000Z | # -*- coding: utf-8 -*-
import json
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.shortcuts import render, redirect
from django.template.loader import render_to_string
from django.utils.translation import ugette... | 36.666667 | 89 | 0.644401 |
0f3d19424e29f2085ad25fffe7caa84cd4b299d2 | 2,118 | py | Python | app/api/recipes_routes.py | nikhilmenon2/Learn2Cook | 8276c8d42e1476f32916952b105fa434d4c9abcc | [
"PostgreSQL",
"Unlicense",
"MIT"
] | 11 | 2021-02-26T19:11:31.000Z | 2021-03-24T19:23:05.000Z | app/api/recipes_routes.py | nikhilmenon2/Learn2Cook | 8276c8d42e1476f32916952b105fa434d4c9abcc | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | app/api/recipes_routes.py | nikhilmenon2/Learn2Cook | 8276c8d42e1476f32916952b105fa434d4c9abcc | [
"PostgreSQL",
"Unlicense",
"MIT"
] | null | null | null | from flask import Blueprint, jsonify, request, redirect
from app.models import db, Recipe, Review, User, Ingredient, Instruction
import json
recipes_routes = Blueprint('recipes', __name__)
@recipes_routes.route('/<int:recipeId>')
def recipe(recipeId):
recipedata = Recipe.query.filter(Recipe.id == recipeId).one()... | 34.16129 | 136 | 0.693579 |
727f4a575520c5f88bf1d68f5438aeb990756023 | 738 | py | Python | src/tests/application/commands/test_get_target_list.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | 1 | 2019-06-17T17:01:17.000Z | 2019-06-17T17:01:17.000Z | src/tests/application/commands/test_get_target_list.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | 7 | 2021-02-08T20:46:15.000Z | 2021-09-08T02:12:59.000Z | src/tests/application/commands/test_get_target_list.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | null | null | null | import pytest
import json
from application.application_adapter import Application
from tests.application.mockups.search_handler_test_mockup import SearchHandler
from tests.application.mockups.master_test_mockup import Master
app = Application(SearchHandler(), Master())
"""
Component test!
Search Handler should be mo... | 26.357143 | 78 | 0.734417 |
e4671460fc64e6a3f372897f1b0a308585129aa4 | 14,942 | py | Python | handlers/all.py | Pandatele/Banda | 5878eeacf2bd685500b94eaab069326dd57cefc1 | [
"MIT"
] | null | null | null | handlers/all.py | Pandatele/Banda | 5878eeacf2bd685500b94eaab069326dd57cefc1 | [
"MIT"
] | null | null | null | handlers/all.py | Pandatele/Banda | 5878eeacf2bd685500b94eaab069326dd57cefc1 | [
"MIT"
] | null | null | null | from utlis.rank import setrank,isrank,remrank,remsudos,setsudo, GPranks,IDrank
from utlis.send import send_msg, BYusers, GetLink,Name,Glang,getAge
from utlis.locks import st,getOR
from utlis.tg import Bot
from config import *
from pyrogram import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton
import t... | 58.596078 | 296 | 0.655535 |
897986cde8ab80ebfedfd4942a5c888600f1f917 | 6,282 | py | Python | colour/geometry/section.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/geometry/section.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | colour/geometry/section.py | JGoldstone/colour | 6829b363d5f0682bff0f4826995e7ceac189ff28 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Geometry / Hull Section
=======================
Defines various objects to compute hull sections:
- :func:`colour.geometry.hull_section`
"""
import numpy as np
from colour.algebra import linear_conversion
from colour.constants import DEFAULT_FLOAT_DTYPE
from colour.utilities import as_... | 27.432314 | 78 | 0.509233 |
3f22e4d3f8ad91f16562e26ea2219a8e34434a41 | 1,102 | py | Python | tools/gen_sha224_sum.py | dpensi/insights-data-schemas | a60d673ce4053b8554e09b7bd08e518f9546727c | [
"Apache-2.0"
] | 1 | 2020-12-07T09:19:32.000Z | 2020-12-07T09:19:32.000Z | tools/gen_sha224_sum.py | dpensi/insights-data-schemas | a60d673ce4053b8554e09b7bd08e518f9546727c | [
"Apache-2.0"
] | 36 | 2020-12-31T10:02:44.000Z | 2022-02-21T12:09:56.000Z | tools/gen_sha224_sum.py | dpensi/insights-data-schemas | a60d673ce4053b8554e09b7bd08e518f9546727c | [
"Apache-2.0"
] | 6 | 2020-12-07T09:19:35.000Z | 2022-02-01T14:39:22.000Z | #!/usr/bin/env python3
# Copyright © 2021 Pavel Tisnovsky
#
# 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... | 31.485714 | 74 | 0.681488 |
188fdacf2b53c3af62bff719b7275c93bfebb009 | 3,215 | py | Python | main/main/settings.py | ioliveros/django-chart | 8dfdd07fe741d4affaf8ae6d085291c876e0f1bd | [
"MIT"
] | null | null | null | main/main/settings.py | ioliveros/django-chart | 8dfdd07fe741d4affaf8ae6d085291c876e0f1bd | [
"MIT"
] | null | null | null | main/main/settings.py | ioliveros/django-chart | 8dfdd07fe741d4affaf8ae6d085291c876e0f1bd | [
"MIT"
] | null | null | null | """
Django settings for main project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Bu... | 25.927419 | 91 | 0.696423 |
4d12834106db6af5317e61707c4d5041e8ff3437 | 1,018 | py | Python | bac/protocols/ties.py | UCL-CCS/BAC2 | 57f50062f60a806d23be7fe6a44b4a1f4f28c109 | [
"Apache-2.0"
] | 3 | 2018-09-27T16:08:25.000Z | 2021-03-19T04:27:04.000Z | bac/protocols/ties.py | UCL-CCS/BAC2 | 57f50062f60a806d23be7fe6a44b4a1f4f28c109 | [
"Apache-2.0"
] | 15 | 2018-11-27T09:19:31.000Z | 2021-02-13T09:19:37.000Z | bac/protocols/ties.py | UCL-CCS/BAC2 | 57f50062f60a806d23be7fe6a44b4a1f4f28c109 | [
"Apache-2.0"
] | 1 | 2018-10-31T14:56:31.000Z | 2018-10-31T14:56:31.000Z | import bac.simulate.gromacs as gmx
from bac.simulate import Workflow, lambda_window, replica
class TiesGromacsEq(gmx.Simulation):
def __init__(self):
super(TiesGromacsEq, self).__init__()
# Add further customizations...
class TiesGromacsMD(gmx.Simulation):
def __init__(self):
super(T... | 26.789474 | 65 | 0.664047 |
670f890f329c84fc56e22fb1fec995cf6ebcabed | 16,773 | py | Python | hypchat/requests.py | jmartens/HypChat | d38e1a15031fdb11694c9ed971eb3e7e67e70907 | [
"MIT"
] | 78 | 2015-01-24T09:27:25.000Z | 2018-10-08T10:48:42.000Z | hypchat/requests.py | jmartens/HypChat | d38e1a15031fdb11694c9ed971eb3e7e67e70907 | [
"MIT"
] | 31 | 2015-01-13T15:39:50.000Z | 2018-10-07T22:14:23.000Z | hypchat/requests.py | jmartens/HypChat | d38e1a15031fdb11694c9ed971eb3e7e67e70907 | [
"MIT"
] | 52 | 2015-01-12T04:56:32.000Z | 2019-10-21T11:23:51.000Z | from __future__ import absolute_import, division
import requests
class BearerAuth(requests.auth.AuthBase):
def __init__(self, token):
self.token = token
def __call__(self, r):
r.headers['Authorization'] = "Bearer %s" % self.token
return r
def req(method, url, params=None, data=None)... | 38.647465 | 100 | 0.752936 |
8a720c076f350877782fc5b01c13a24a696f8661 | 14,496 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisdcepseudoifaceattpoint1config_dce0066317952a09c055b9f568621953.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisdcepseudoifaceattpoint1config_dce0066317952a09c055b9f568621953.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisdcepseudoifaceattpoint1config_dce0066317952a09c055b9f568621953.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 44.603077 | 216 | 0.654111 |
ffd23b513038f5a3c3d39de6ae25e611a2d6e11e | 591 | py | Python | tools/anim1.py | zhongwei/math | b73f155d319fdf59749832cd57e54b50dcc4c595 | [
"MIT"
] | null | null | null | tools/anim1.py | zhongwei/math | b73f155d319fdf59749832cd57e54b50dcc4c595 | [
"MIT"
] | null | null | null | tools/anim1.py | zhongwei/math | b73f155d319fdf59749832cd57e54b50dcc4c595 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style
from IPython.display import HTML
style.use('fivethirtyeight')
fig = plt.figure()
ax1 = fig.add_subplot(1, 1, 1)
def animate(i):
graph_data = open('example.txt', 'r').read()
lines = graph_data.split('\n')
... | 21.888889 | 61 | 0.614213 |
e40ec2fc2e2a9ad5345c36bd06abd73fb32eee98 | 1,752 | py | Python | django_sms_toolkit/views.py | pascal-financial/django-sms-toolkit | 04018e9515c4a2e58baa10d63a59bab0883aafbd | [
"Apache-2.0"
] | null | null | null | django_sms_toolkit/views.py | pascal-financial/django-sms-toolkit | 04018e9515c4a2e58baa10d63a59bab0883aafbd | [
"Apache-2.0"
] | null | null | null | django_sms_toolkit/views.py | pascal-financial/django-sms-toolkit | 04018e9515c4a2e58baa10d63a59bab0883aafbd | [
"Apache-2.0"
] | null | null | null | from functools import wraps
from django.conf import settings
from django.db import transaction
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from twilio.request_validator import RequestValidator
fro... | 34.352941 | 126 | 0.724315 |
f042d2020859507dc324d323af60417bc5b7c450 | 2,051 | py | Python | nets/TSP_edge_classification/gcn_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 1,809 | 2020-02-28T11:13:52.000Z | 2022-03-31T11:44:58.000Z | nets/TSP_edge_classification/gcn_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 61 | 2020-03-08T21:24:25.000Z | 2022-03-25T21:48:17.000Z | nets/TSP_edge_classification/gcn_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 348 | 2020-03-03T17:00:21.000Z | 2022-03-31T03:09:56.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import dgl
"""
GCN: Graph Convolutional Networks
Thomas N. Kipf, Max Welling, Semi-Supervised Classification with Graph Convolutional Networks (ICLR 2017)
http://arxiv.org/abs/1609.02907
"""
from layers.gcn_layer import GCNLayer
from layer... | 35.362069 | 109 | 0.61531 |
425e276298c0f4b808d519e556a1b17e8220f421 | 22,413 | py | Python | kluctl/kluctl_project/kluctl_project.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | null | null | null | kluctl/kluctl_project/kluctl_project.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | null | null | null | kluctl/kluctl_project/kluctl_project.py | AljoschaP/kluctl | 40007d2767b42c13ef9ed66de9322f374f35151e | [
"Apache-2.0"
] | null | null | null | import contextlib
import dataclasses
import gzip
import hashlib
import logging
import os
import re
import shutil
import tarfile
from contextlib import contextmanager
from pathlib import Path
from tempfile import TemporaryDirectory, NamedTemporaryFile
from typing import ContextManager
import jsonschema
from kluctl.sch... | 41.97191 | 202 | 0.604828 |
e52d3faaf806b9c1fb0864d87e5b37b9db810620 | 391 | py | Python | project_example/project_example/conf/test/__init__.py | chalkchisel/django-salmonella | 0279369dd23cb87215ee350c813828e71e658ce3 | [
"MIT"
] | 1 | 2015-05-15T08:48:09.000Z | 2015-05-15T08:48:09.000Z | project_example/project_example/conf/test/__init__.py | DXist/django-salmonella | afdf3d5b6162fb6d354b7c2483dcaa3b81e671e8 | [
"MIT"
] | null | null | null | project_example/project_example/conf/test/__init__.py | DXist/django-salmonella | afdf3d5b6162fb6d354b7c2483dcaa3b81e671e8 | [
"MIT"
] | null | null | null | from project_example.settings import * # pylint: disable=W0614,W0401
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
ROOT_URLCONF = 'project_example.conf.test.urls'
INSTALLED_APPS += (
'django.contrib.admin'... | 19.55 | 70 | 0.672634 |
418448bef5ba9f8ba33b0f67edc2bb4508b5ef41 | 831 | py | Python | dongtai/utils/http.py | Maskhe/dongtai-core | 1521e1377e997b262a7fe678d64e49fd5065110c | [
"Apache-2.0"
] | 5 | 2021-09-06T09:30:38.000Z | 2022-03-22T02:11:49.000Z | dongtai/utils/http.py | Maskhe/dongtai-core | 1521e1377e997b262a7fe678d64e49fd5065110c | [
"Apache-2.0"
] | 4 | 2021-11-29T08:35:27.000Z | 2021-12-18T06:08:31.000Z | dongtai/utils/http.py | Maskhe/dongtai-core | 1521e1377e997b262a7fe678d64e49fd5065110c | [
"Apache-2.0"
] | 13 | 2021-09-01T07:24:29.000Z | 2022-03-18T08:12:50.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# author: owefsad@huoxian.cn
# datetime: 2021/7/21 下午6:21
# project: dongtai-engine
import base64
import logging
logger = logging.getLogger('dongtai-core')
def build_request(req_method, raw_req_header, uri, query_params, req_data, http_protocol):
decode_req_header = b... | 33.24 | 153 | 0.695548 |
80c112b1f095a51cebdf9f4bd91f9404d06af73a | 22,619 | py | Python | tests/unit/test_mxnet.py | stephenleonard8/sagemaker-python-sdk | fa41f63557a904dea9843748b17fce7499197add | [
"Apache-2.0"
] | null | null | null | tests/unit/test_mxnet.py | stephenleonard8/sagemaker-python-sdk | fa41f63557a904dea9843748b17fce7499197add | [
"Apache-2.0"
] | null | null | null | tests/unit/test_mxnet.py | stephenleonard8/sagemaker-python-sdk | fa41f63557a904dea9843748b17fce7499197add | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 43.666023 | 119 | 0.683452 |
8b7bab5e2e8bb3927a7103bfca42b85fb4384ae9 | 2,667 | py | Python | pype/ftrack/ftrack_server/sub_legacy_server.py | tokejepsen/pype | 8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3 | [
"MIT"
] | null | null | null | pype/ftrack/ftrack_server/sub_legacy_server.py | tokejepsen/pype | 8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3 | [
"MIT"
] | null | null | null | pype/ftrack/ftrack_server/sub_legacy_server.py | tokejepsen/pype | 8f2b2b631cc5d3ad93eeb5ad3bc6110d32466ed3 | [
"MIT"
] | null | null | null | import sys
import time
import datetime
import signal
import threading
from ftrack_server import FtrackServer
import ftrack_api
from pypeapp import Logger
log = Logger().get_logger("Event Server Legacy")
class TimerChecker(threading.Thread):
max_time_out = 35
def __init__(self, server, session):
sel... | 26.67 | 77 | 0.541432 |
8c1ba583510246166132b3f0f172c22b3dd065e0 | 5,057 | py | Python | got3/manager/TweetManager.py | parikshitghosh3/GetOldTweets-python | be43e689d2b882d408c8d660571dc5c48ea15a5e | [
"MIT"
] | null | null | null | got3/manager/TweetManager.py | parikshitghosh3/GetOldTweets-python | be43e689d2b882d408c8d660571dc5c48ea15a5e | [
"MIT"
] | null | null | null | got3/manager/TweetManager.py | parikshitghosh3/GetOldTweets-python | be43e689d2b882d408c8d660571dc5c48ea15a5e | [
"MIT"
] | null | null | null | import urllib.request, urllib.parse, urllib.error,urllib.request,urllib.error,urllib.parse,json,re,datetime,sys,http.cookiejar
from .. import models
from pyquery import PyQuery
class TweetManager:
def __init__(self):
pass
@staticmethod
def getTweets(tweetCriteria, receiveBuffer=None, bufferLength=1... | 34.875862 | 149 | 0.65177 |
bd0c43aa1e3b936f4c213be56ddab16ed77e9130 | 1,726 | py | Python | business_register/migrations/0109_auto_20210601_0835.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | business_register/migrations/0109_auto_20210601_0835.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | business_register/migrations/0109_auto_20210601_0835.py | OlexandrTopuzov/Data_converter | 0ac2319ccaae790af35ab2202724c65d83d32ecc | [
"MIT"
] | null | null | null | # Generated by Django 3.1.8 on 2021-06-01 08:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('business_register', '0108_auto_20210526_1842'),
]
operations = [
migrations.AddField(
model_name='companysanction',
... | 39.227273 | 144 | 0.633835 |
07815318a725c9c0d8cce2ae3fcf6d8e855319e4 | 2,808 | py | Python | indico/legacy/common/xmlGen.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | indico/legacy/common/xmlGen.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | indico/legacy/common/xmlGen.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
# flake8: noqa
from xml.sax import saxutils
from indico.legacy.common.utils import encodeUnicode
from in... | 31.550562 | 115 | 0.583333 |
e7998c06789637facb0ee96f9e9b4dfa01a3ded4 | 17,894 | py | Python | tests/adapters/test_proxy.py | odin-detector/odin-control | 366085b4fc04c620ee2e9e040a883f5d3d70d5a0 | [
"Apache-2.0"
] | 4 | 2018-05-24T13:38:23.000Z | 2021-08-18T08:32:54.000Z | tests/adapters/test_proxy.py | odin-detector/odin-control | 366085b4fc04c620ee2e9e040a883f5d3d70d5a0 | [
"Apache-2.0"
] | 20 | 2018-04-10T09:28:01.000Z | 2022-03-17T11:43:59.000Z | tests/adapters/test_proxy.py | odin-detector/odin-control | 366085b4fc04c620ee2e9e040a883f5d3d70d5a0 | [
"Apache-2.0"
] | 3 | 2017-06-07T13:28:38.000Z | 2019-07-16T10:02:21.000Z | """ Unit tests for the ODIN ProxyAdapter.
Tim Nicholls, STFC Application Engineering Group.
"""
import sys
import threading
import logging
import time
import pytest
from tornado.testing import AsyncHTTPTestCase, bind_unused_port
from tornado.ioloop import IOLoop
from tornado.web import Application, RequestHandler
f... | 39.501104 | 108 | 0.670392 |
7a92f25b1696aa7f1a69ad22fde7342071546c76 | 4,971 | py | Python | widgets/loading_bar.py | Thenujan-0/grub-editor | 0b12e9df2f62759c7297ea361b00eda0a03f41bf | [
"MIT"
] | 1 | 2022-02-18T14:34:37.000Z | 2022-02-18T14:34:37.000Z | widgets/loading_bar.py | Thenujan-0/grub_editor | 0b12e9df2f62759c7297ea361b00eda0a03f41bf | [
"MIT"
] | null | null | null | widgets/loading_bar.py | Thenujan-0/grub_editor | 0b12e9df2f62759c7297ea361b00eda0a03f41bf | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
from PyQt5.QtWidgets import QWidget, QApplication
from PyQt5.QtGui import QPainter, QColor, QFont,QPalette,QPolygonF,QBrush
from PyQt5.QtCore import Qt , QPointF,QRectF,QObject,pyqtSignal,QRunnable,pyqtSlot,QThreadPool,QTimer
import traceback
from time import sleep
class WorkerSignals(... | 28.405714 | 101 | 0.592637 |
42054cf9103465b562ff008e1b7d5e1357a0cc6c | 576 | py | Python | events/migrations/0006_auto_20180924_1643.py | elena/livelobby | b234dc7777abaf1aa815525cf653fa7d3c9c160a | [
"MIT"
] | 4 | 2018-08-05T01:14:03.000Z | 2018-08-06T02:06:05.000Z | events/migrations/0006_auto_20180924_1643.py | elena/livelobby | b234dc7777abaf1aa815525cf653fa7d3c9c160a | [
"MIT"
] | 63 | 2018-08-16T09:56:55.000Z | 2018-10-12T06:01:03.000Z | events/migrations/0006_auto_20180924_1643.py | elena/livelobby | b234dc7777abaf1aa815525cf653fa7d3c9c160a | [
"MIT"
] | 5 | 2018-08-21T06:29:24.000Z | 2018-10-08T01:43:33.000Z | # Generated by Django 2.1 on 2018-09-24 06:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20180830_0317'),
]
operations = [
migrations.AddField(
model_name='event',
name='host_name',
... | 24 | 73 | 0.59375 |
6036ee5aa633dd1ad478f5077bf9e9ab8a25241a | 406 | py | Python | app/core/forms.py | fxavier/sigi | c5e05a5b23cf1b8049023e6de88b9be3d0d9674a | [
"MIT"
] | null | null | null | app/core/forms.py | fxavier/sigi | c5e05a5b23cf1b8049023e6de88b9be3d0d9674a | [
"MIT"
] | null | null | null | app/core/forms.py | fxavier/sigi | c5e05a5b23cf1b8049023e6de88b9be3d0d9674a | [
"MIT"
] | null | null | null | from . models import Relatorio, Igreja, Plataforma
from django import forms
class InsereRelatorioForm(forms.ModelForm):
class Meta:
model = Relatorio
fields = ['igreja',
'data_reuniao',
'familia',
'membros',
'bairro',
... | 22.555556 | 50 | 0.472906 |
2e3408baad3352c7aa1a06de4853121779298957 | 1,097 | py | Python | zipline/utils/calendars/__init__.py | prodipta/zipline | d9755f51293792eef84e4da164e31f99e7806f04 | [
"Apache-2.0"
] | null | null | null | zipline/utils/calendars/__init__.py | prodipta/zipline | d9755f51293792eef84e4da164e31f99e7806f04 | [
"Apache-2.0"
] | null | null | null | zipline/utils/calendars/__init__.py | prodipta/zipline | d9755f51293792eef84e4da164e31f99e7806f04 | [
"Apache-2.0"
] | 1 | 2018-04-27T04:40:12.000Z | 2018-04-27T04:40:12.000Z | #
# Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 29.648649 | 74 | 0.756609 |
0417884b5775efe947b3a42f5963cd6e6be1cb4d | 1,697 | py | Python | software/fpga/ov3/ovplatform/sdram_params.py | twam/ov_ftdi | d6f3ff5502b4743e2228c15f93ad8d028ab9a635 | [
"BSD-2-Clause"
] | 247 | 2015-01-02T06:32:20.000Z | 2022-03-30T14:28:04.000Z | software/fpga/ov3/ovplatform/sdram_params.py | twam/ov_ftdi | d6f3ff5502b4743e2228c15f93ad8d028ab9a635 | [
"BSD-2-Clause"
] | 33 | 2015-11-06T09:09:28.000Z | 2021-05-31T15:47:39.000Z | software/fpga/ov3/ovplatform/sdram_params.py | twam/ov_ftdi | d6f3ff5502b4743e2228c15f93ad8d028ab9a635 | [
"BSD-2-Clause"
] | 77 | 2015-07-01T23:22:23.000Z | 2022-01-16T14:15:56.000Z | from collections import namedtuple
SDRAMParams = namedtuple("SDRAMParams",
('databits', # Width of the SDRAM bus in bits
'rowbits',
'colbits',
'bankbits',
'burst',
'tRESET',
'tCL',
'tRP',
'tRFC',
'tRCD',
'tREFI',
'tWR'
))
SDRAMModelParams = name... | 26.107692 | 86 | 0.642899 |
0e312c85d52842f158ede874bd610dd7ef163dfe | 2,868 | py | Python | openGaussBase/testcase/SQL/DDL/policy/Opengauss_Function_DDL_Policy_Case0026.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DDL/policy/Opengauss_Function_DDL_Policy_Case0026.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DDL/policy/Opengauss_Function_DDL_Policy_Case0026.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 35.85 | 84 | 0.654463 |
4e383c0d8b2cde0365c049972bbf7e4419022912 | 1,511 | py | Python | src/hypercorn/trio/udp_server.py | nonebot/nonecorn | 813408d385f11b6bbdaee63d6b6ace8c87586d25 | [
"MIT"
] | 2 | 2021-11-29T05:56:51.000Z | 2022-02-07T06:27:24.000Z | src/hypercorn/trio/udp_server.py | nonebot/nonecorn | 813408d385f11b6bbdaee63d6b6ace8c87586d25 | [
"MIT"
] | 3 | 2021-11-08T11:58:51.000Z | 2021-12-09T11:29:54.000Z | src/hypercorn/trio/udp_server.py | nonebot/nonecorn | 813408d385f11b6bbdaee63d6b6ace8c87586d25 | [
"MIT"
] | null | null | null | from __future__ import annotations
import trio
from .task_group import TaskGroup
from .worker_context import WorkerContext
from ..config import Config
from ..events import Event, RawData
from ..typing import ASGIFramework
from ..utils import parse_socket_addr
MAX_RECV = 2**16
class UDPServer:
def __init__(
... | 32.148936 | 92 | 0.665784 |
c6c14f7a0b013fc97d1c7573bdd51a316632d7ca | 4,725 | py | Python | musweeper/musweeper/muzero/tree/monte_carlo_test.py | Zikoat/musweeper | 07e3e5e5e5e4edad4d8b1b6bb05aee2f33f8d9cb | [
"MIT"
] | null | null | null | musweeper/musweeper/muzero/tree/monte_carlo_test.py | Zikoat/musweeper | 07e3e5e5e5e4edad4d8b1b6bb05aee2f33f8d9cb | [
"MIT"
] | 13 | 2020-11-30T20:40:56.000Z | 2020-12-18T11:08:16.000Z | musweeper/musweeper/muzero/tree/monte_carlo_test.py | Zikoat/musweeper | 07e3e5e5e5e4edad4d8b1b6bb05aee2f33f8d9cb | [
"MIT"
] | null | null | null | import unittest
from .monte_carlo import *
from .node import *
from ..utils.basic_env import *
from ..model.mock import *
from ..model.muzero import *
class TestMonteCarlo(unittest.TestCase):
def setUp(self):
env = BasicEnv()
max_search_depth = 3
# even if rollout is False, it will do rollout since none of the ... | 34.742647 | 99 | 0.711746 |
a83d9744e2befc106af2e1e2bbe8dc819592738e | 3,336 | py | Python | Python/home_folder_backup.py | mfcallahan/Scripts | 2f1f62ea55ffc42585a80efe9721b57ced2b911b | [
"MIT"
] | null | null | null | Python/home_folder_backup.py | mfcallahan/Scripts | 2f1f62ea55ffc42585a80efe9721b57ced2b911b | [
"MIT"
] | null | null | null | Python/home_folder_backup.py | mfcallahan/Scripts | 2f1f62ea55ffc42585a80efe9721b57ced2b911b | [
"MIT"
] | null | null | null | # Copy all files from a specified source folder to a specified destination folder for backup
# purposes. If a file exists in the destination folder but not the source folder, it is deleted.
# Deploy:
# cp -u home_folder_backup.py /home/matt/Scripts
import os
import logging
from types import SimpleNamespace
from shuti... | 37.909091 | 131 | 0.676559 |
1816621dc4260b448cd4c755f7e900fc7b479a3f | 2,957 | py | Python | internal/twirptest/multiple/multiple2_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | internal/twirptest/multiple/multiple2_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | internal/twirptest/multiple/multiple2_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Code generated by protoc-gen-twirp_python v7.1.1, DO NOT EDIT.
# source: multiple2.proto
try:
import httplib
from urllib2 import Request, HTTPError, urlopen
except ImportError:
import http.client as httplib
from urllib.request import Request, urlopen
from urllib.error import HTTPError
import json... | 34.383721 | 97 | 0.634427 |
967012af20650cfb400f7e8b5da03f41fa96ad9d | 2,660 | py | Python | cornac/data/graph.py | GuoJingyao/cornac | e7529990ec1dfa586c4af3de98e4b3e00a786578 | [
"Apache-2.0"
] | null | null | null | cornac/data/graph.py | GuoJingyao/cornac | e7529990ec1dfa586c4af3de98e4b3e00a786578 | [
"Apache-2.0"
] | null | null | null | cornac/data/graph.py | GuoJingyao/cornac | e7529990ec1dfa586c4af3de98e4b3e00a786578 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Aghiles Salah <asalah@smu.edu.sg>
"""
import scipy.sparse as sp
import numpy as np
from . import FeatureModule
class GraphModule(FeatureModule):
"""Graph module
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.raw_data = kwargs.get(... | 32.439024 | 104 | 0.601128 |
b87ba812ab25f5ec37fb04f9aa565f5c452b4451 | 14,006 | py | Python | demo.py | jsutlxh/frcnn-01 | 67bdc21b0345843571c1a6dc96a422479d370017 | [
"MIT"
] | null | null | null | demo.py | jsutlxh/frcnn-01 | 67bdc21b0345843571c1a6dc96a422479d370017 | [
"MIT"
] | null | null | null | demo.py | jsutlxh/frcnn-01 | 67bdc21b0345843571c1a6dc96a422479d370017 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __... | 36.569191 | 115 | 0.617878 |
29fb10ec159768c96e72ef02512518370fd544fe | 3,914 | py | Python | homeassistant/components/logger/__init__.py | claret-srl/core | 317068a3784648defadead1c2e6e8de29e20b696 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/logger/__init__.py | claret-srl/core | 317068a3784648defadead1c2e6e8de29e20b696 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/logger/__init__.py | claret-srl/core | 317068a3784648defadead1c2e6e8de29e20b696 | [
"Apache-2.0"
] | null | null | null | """Support for setting the level of logging for components."""
import logging
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
DOMAIN = "logger"
SERVICE_SET_DEFAULT_LEVEL = "set_default_level"
SERVICE_SET_LEVEL = "set_level"
LOGSEVERITY = {
"... | 26.993103 | 85 | 0.661472 |
35bee89d015886edfa2d39cb3edc4d129a8111d6 | 1,155 | py | Python | lottery/branch/permute_subnetwork.py | FischerJo/open_lth | f965d5cfac1688918e8931875bc19d07dbc26355 | [
"MIT"
] | null | null | null | lottery/branch/permute_subnetwork.py | FischerJo/open_lth | f965d5cfac1688918e8931875bc19d07dbc26355 | [
"MIT"
] | null | null | null | lottery/branch/permute_subnetwork.py | FischerJo/open_lth | f965d5cfac1688918e8931875bc19d07dbc26355 | [
"MIT"
] | null | null | null | # Copyright (c) Jonas Fischer.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from lottery.branch import base
import models.registry
from pruning.mask import Mask
from pruning.pruned_model import PrunedModel
from training import train
clas... | 30.394737 | 119 | 0.712554 |
333cc416345f505c234f703d5eed6e54d58e9085 | 308 | py | Python | reservations/serializers.py | lmuller14/parkingServer | 63e51e8849ea56468e627cdb777749ce8ef1b294 | [
"Apache-2.0"
] | null | null | null | reservations/serializers.py | lmuller14/parkingServer | 63e51e8849ea56468e627cdb777749ce8ef1b294 | [
"Apache-2.0"
] | null | null | null | reservations/serializers.py | lmuller14/parkingServer | 63e51e8849ea56468e627cdb777749ce8ef1b294 | [
"Apache-2.0"
] | null | null | null | from reservations.models import User
from rest_framework import serializers
# Serializers define the API representation.
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ['id', 'username', 'first_name', 'last_name', 'email', 'is_public']
| 28 | 84 | 0.737013 |
4403b530a521c21f46b1142e3cf4436f998ceb66 | 1,368 | py | Python | integration_test/src/python/integration_test/topology/one_spout_bolt_multi_tasks/one_spout_bolt_multi_tasks.py | takeratta/heron | 7b7c38594186f009741c62d379364b9b45d82b61 | [
"Apache-2.0"
] | 1 | 2021-06-29T07:00:10.000Z | 2021-06-29T07:00:10.000Z | integration_test/src/python/integration_test/topology/one_spout_bolt_multi_tasks/one_spout_bolt_multi_tasks.py | kalimfaria/heron | d59bd016b826006e2af22c7a6452342f5e7d637c | [
"Apache-2.0"
] | null | null | null | integration_test/src/python/integration_test/topology/one_spout_bolt_multi_tasks/one_spout_bolt_multi_tasks.py | kalimfaria/heron | d59bd016b826006e2af22c7a6452342f5e7d637c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# copyright 2016 twitter. 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... | 39.085714 | 81 | 0.758041 |
6f56e9cf9ab2e54edbac1dbe6d4ab714b667f506 | 467 | py | Python | numpy/numarray/random_array.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | numpy/numarray/random_array.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | numpy/numarray/random_array.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import
__all__ = ['ArgumentError', 'F', 'beta', 'binomial', 'chi_square',
'exponential', 'gamma', 'get_seed', 'multinomial',
'multivariate_normal', 'negative_binomial', 'noncentral_F',
'noncentral_chi_square', 'normal', 'permutation', 'poisson'... | 42.454545 | 71 | 0.653105 |
7154761d6381d18414b7b9dd026607519aa0d886 | 43 | py | Python | ABC_A/ABC003_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_A/ABC003_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_A/ABC003_A.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | n = int(input())
print(int((n+1)/2*10000))
| 14.333333 | 25 | 0.581395 |
3e6b0b5e66f939b54253426c74cee77d2484bcef | 24,843 | bzl | Python | nixpkgs/nixpkgs.bzl | sayrer/rules_nixpkgs | 099cb7221ac10aca9aa1064ededdf338b7f6816d | [
"Apache-2.0"
] | null | null | null | nixpkgs/nixpkgs.bzl | sayrer/rules_nixpkgs | 099cb7221ac10aca9aa1064ededdf338b7f6816d | [
"Apache-2.0"
] | null | null | null | nixpkgs/nixpkgs.bzl | sayrer/rules_nixpkgs | 099cb7221ac10aca9aa1064ededdf338b7f6816d | [
"Apache-2.0"
] | null | null | null | """Rules for importing Nixpkgs packages."""
load("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_autoconf_impl")
load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "get_cpu_value")
def _nixpkgs_git_repository_impl(repository_ctx):
repository_ctx.file(
"BUILD",
content = 'filegroup(name = "srcs",... | 36.214286 | 190 | 0.647828 |
7ebd6c97d14ea81fbc31fe03192e876c3d492633 | 992 | py | Python | envipyarclib/test/datatype/float.py | envi-idl/envipyarclib | 90135652510c3d53c5f51177252c1fea2639bf22 | [
"MIT"
] | 1 | 2019-08-03T05:10:18.000Z | 2019-08-03T05:10:18.000Z | envipyarclib/test/datatype/float.py | envi-idl/envipyarclib | 90135652510c3d53c5f51177252c1fea2639bf22 | [
"MIT"
] | null | null | null | envipyarclib/test/datatype/float.py | envi-idl/envipyarclib | 90135652510c3d53c5f51177252c1fea2639bf22 | [
"MIT"
] | 1 | 2020-02-25T14:12:50.000Z | 2020-02-25T14:12:50.000Z | """
"""
import unittest
import arcpy
from numpy import pi
class TestDatatypeFloat(unittest.TestCase):
"""Tests the float task datatype"""
config = None
@classmethod
def setUpClass(cls):
"""Class setup creates a toolbox file wrapper"""
cls.config.setup_toolbox('IDL', 'qa_idltaskengine_... | 29.176471 | 75 | 0.666331 |
0128a638c386dcea09e0175d4c24f0579c2ef2f0 | 7,342 | py | Python | salt/cloud/clouds/saltify.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | 1 | 2018-09-18T05:45:43.000Z | 2018-09-18T05:45:43.000Z | salt/cloud/clouds/saltify.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/saltify.py | dr4Ke/salt | 8ffa4903c9ed10c81e1a6c7b967dc9532f320c0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Saltify Module
==============
The Saltify module is designed to install Salt on a remote machine, virtual or
bare metal, using SSH. This module is useful for provisioning machines which
are already installed, but not Salted.
Use of this module requires no configuration in the main cloud con... | 31.376068 | 83 | 0.633887 |
80bbf67201c91f77e1e9a35fad57331f0b5aeb7b | 10,559 | py | Python | src/toast/todmap/conviqt.py | ziotom78/toast | 66aef04c833a28f0928a0bbc221da45882aae475 | [
"BSD-2-Clause"
] | null | null | null | src/toast/todmap/conviqt.py | ziotom78/toast | 66aef04c833a28f0928a0bbc221da45882aae475 | [
"BSD-2-Clause"
] | null | null | null | src/toast/todmap/conviqt.py | ziotom78/toast | 66aef04c833a28f0928a0bbc221da45882aae475 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2015-2019 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.
from ..mpi import use_mpi
import numpy as np
from .. import qarray as qa
from ..op import Operator
from ..timing import fu... | 32.389571 | 82 | 0.548158 |
0872b8e44d6b585e6b94bc7805cbc4643a4df327 | 1,024 | py | Python | rbac_builder/security/sqla/models/role.py | tukida/rbac_builder | de2f40682af5ab29e082402c310fc6374ea27761 | [
"MIT"
] | null | null | null | rbac_builder/security/sqla/models/role.py | tukida/rbac_builder | de2f40682af5ab29e082402c310fc6374ea27761 | [
"MIT"
] | null | null | null | rbac_builder/security/sqla/models/role.py | tukida/rbac_builder | de2f40682af5ab29e082402c310fc6374ea27761 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, ForeignKey, UniqueConstraint
from sqlalchemy import (
String, Table
)
from sqlalchemy.orm import relationship
from rbac_builder.models import Model
from rbac_builder.utils import generate_uuid
assoc_permissionview_role = Table(
"permission_view_role",
Model.metada... | 33.032258 | 100 | 0.708008 |
1a5ab3d6621a3be1193c48fd2ca805b39bef62c0 | 24 | py | Python | resources/neurons/gmaps/kalliope_new_module_temp_name/__init__.py | lya-corp/lya | 04b32f3191072ed21f20b93397015dbfcf9e7bb3 | [
"MIT"
] | 3 | 2020-06-19T20:08:54.000Z | 2021-06-30T11:25:41.000Z | resources/neurons/gmaps/kalliope_new_module_temp_name/__init__.py | flolep2607/Lya | 669072b6b80ef493591b28ecc29bebd587913af0 | [
"MIT"
] | null | null | null | resources/neurons/gmaps/kalliope_new_module_temp_name/__init__.py | flolep2607/Lya | 669072b6b80ef493591b28ecc29bebd587913af0 | [
"MIT"
] | 1 | 2018-04-04T16:10:22.000Z | 2018-04-04T16:10:22.000Z | from gmaps import Gmaps
| 12 | 23 | 0.833333 |
60904a07782f609ec1bedcdd78581a0576844c86 | 1,918 | py | Python | contrib/devtools/check-doc.py | didys/DividendCash | 74dff59472d63e802b4ecc02ecde610ce6c93f3f | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | didys/DividendCash | 74dff59472d63e802b4ecc02ecde610ce6c93f3f | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | didys/DividendCash | 74dff59472d63e802b4ecc02ecde610ce6c93f3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author: @... | 42.622222 | 307 | 0.691345 |
ee75cfb4dfe3f2de341d9a641b417e98840c55e5 | 17,169 | py | Python | egs/wsj/s5/steps/cleanup/get_ctm_edits.py | HunterJiang/kaldi | 3fe38c82fa0936f7a4ea3347a54e9e00fb2471a8 | [
"Apache-2.0"
] | 319 | 2016-10-24T23:08:04.000Z | 2022-03-08T02:36:51.000Z | egs/wsj/s5/steps/cleanup/get_ctm_edits.py | zwcih/kaldi-ctc | 2c47b99f5efba22cb3989eed1a7757bf5d9927ce | [
"Apache-2.0"
] | 18 | 2017-01-12T12:08:07.000Z | 2020-06-18T07:37:20.000Z | egs/wsj/s5/steps/cleanup/get_ctm_edits.py | zwcih/kaldi-ctc | 2c47b99f5efba22cb3989eed1a7757bf5d9927ce | [
"Apache-2.0"
] | 87 | 2016-10-25T04:39:48.000Z | 2021-12-24T07:47:31.000Z | #!/usr/bin/env python
# Copyright 2016 Vimal Manohar
# 2016 Johns Hopkins University (author: Daniel Povey)
# Apache 2.0
from __future__ import print_function
import sys, operator, argparse
# Modify the CTM to include for each token the information from Levenshtein
# alignment of 'hypothesis' and 'refe... | 48.637394 | 590 | 0.631196 |
a4c16040b3a9802ec6ee8e247a0eec10a727b8fc | 1,046 | py | Python | ga/ga_config.py | YannHyaric/evolutionary-computation | af7778fd1b5d60a1e5630b483b55257adac0bbc6 | [
"MIT"
] | null | null | null | ga/ga_config.py | YannHyaric/evolutionary-computation | af7778fd1b5d60a1e5630b483b55257adac0bbc6 | [
"MIT"
] | null | null | null | ga/ga_config.py | YannHyaric/evolutionary-computation | af7778fd1b5d60a1e5630b483b55257adac0bbc6 | [
"MIT"
] | null | null | null | from ga_copying import *
from ga_local_search import *
from ga_selection import *
from ga_crossover import *
from ga_mutation import *
from ga_gene import *
# ELITISM_COPYING
# PERMISSIVE_COPYING
# NO_COPYING
# SINGLE_POINT_CROSSOVER
# TWO_POINT_CROSSOVER
# THREE_PARENT_CROSSOVER
# UNIFORM_CROSSOVER
# DECIMAL_CROSSOV... | 21.791667 | 61 | 0.746654 |
8cff7aa2986cf7b8bfd3ff018fe413a51db4bf37 | 3,929 | py | Python | training/dataset/label/seeker.py | KipHamiltons/VisualMesh | a3041a63c384965651b5111bb58341ec95fa5a40 | [
"MIT"
] | null | null | null | training/dataset/label/seeker.py | KipHamiltons/VisualMesh | a3041a63c384965651b5111bb58341ec95fa5a40 | [
"MIT"
] | null | null | null | training/dataset/label/seeker.py | KipHamiltons/VisualMesh | a3041a63c384965651b5111bb58341ec95fa5a40 | [
"MIT"
] | null | null | null | # Copyright (C) 2017-2020 Trent Houliston <trent@houliston.me>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, mod... | 45.686047 | 119 | 0.634258 |
d8bdea3433c56a820c1aa6ec25b727224e702f58 | 6,216 | py | Python | roles/installer_checkpoint/callback_plugins/installer_checkpoint.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | null | null | null | roles/installer_checkpoint/callback_plugins/installer_checkpoint.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | null | null | null | roles/installer_checkpoint/callback_plugins/installer_checkpoint.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 1 | 2020-04-17T18:21:08.000Z | 2020-04-17T18:21:08.000Z | """Ansible callback plugin to print a summary completion status of installation
phases.
"""
from datetime import datetime
from ansible.plugins.callback import CallbackBase
from ansible import constants as C
class CallbackModule(CallbackBase):
"""This callback summarizes installation phase status."""
CALLBACK... | 38.85 | 101 | 0.564028 |
df2634895d4438c34e515b74bfb60dba123ad7ed | 5,736 | py | Python | py3status/modules/netdata.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | 1 | 2020-04-07T19:11:36.000Z | 2020-04-07T19:11:36.000Z | py3status/modules/netdata.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | 2 | 2018-03-15T18:44:42.000Z | 2018-03-15T19:22:04.000Z | py3status/modules/netdata.py | boucman/py3status | 84b57304fbf71a466ccb1ed2f2dd039ece6eefb6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Display network speed and bandwidth usage.
Configuration parameters:
cache_timeout: refresh interval for this module (default 2)
format: display format for this module
*(default '{nic} [\?color=down LAN(Kb): {down}↓ {up}↑] '
'[\?color=total T(Mb): {download}↓ {upload... | 32.224719 | 81 | 0.492678 |
6b5aa093c2bcd3984f298803f0d3c86eb6d9819c | 4,563 | py | Python | src/benchmark/test/run_benchmark_job.py | Jeffwan/aws-eks-deep-learning-benchmark | 0448823dff6f4eb5ceec91bb904a2a077831ed9b | [
"Apache-2.0"
] | null | null | null | src/benchmark/test/run_benchmark_job.py | Jeffwan/aws-eks-deep-learning-benchmark | 0448823dff6f4eb5ceec91bb904a2a077831ed9b | [
"Apache-2.0"
] | null | null | null | src/benchmark/test/run_benchmark_job.py | Jeffwan/aws-eks-deep-learning-benchmark | 0448823dff6f4eb5ceec91bb904a2a077831ed9b | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import sys
import os
import time
from benchmark.test import deploy_utils
from kubeflow.testing import util # pylint: disable=no-name-in-module
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"--namespace", default='default', type=str, help=("The namesp... | 40.026316 | 105 | 0.714004 |
0c222e8c023a8c74e8e949fd63661094eb0456af | 26,687 | py | Python | release/scripts/startup/bl_ui/space_dopesheet.py | Scoan/blender | 9314d73d753750d5e20bb2ee1fa6ec3646bd25dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 33 | 2019-06-10T22:59:54.000Z | 2022-03-24T09:16:01.000Z | release/scripts/startup/bl_ui/space_dopesheet.py | Scoan/blender | 9314d73d753750d5e20bb2ee1fa6ec3646bd25dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2019-06-21T21:06:34.000Z | 2021-06-26T21:58:45.000Z | release/scripts/startup/bl_ui/space_dopesheet.py | Scoan/blender | 9314d73d753750d5e20bb2ee1fa6ec3646bd25dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 14 | 2019-06-21T12:14:23.000Z | 2021-08-25T14:57:06.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 34.479328 | 109 | 0.650579 |
1c5fd8d6afe4b1df7dd04041ebd4ee6d06ec4fdc | 4,440 | py | Python | model-optimizer/extensions/front/tf/prelu.py | rgarnov/openvino | a864c2eb85e5649770ee0172080b250efab8c97e | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/tf/prelu.py | rgarnov/openvino | a864c2eb85e5649770ee0172080b250efab8c97e | [
"Apache-2.0"
] | 1 | 2021-07-24T15:22:27.000Z | 2021-07-24T15:22:27.000Z | model-optimizer/extensions/front/tf/prelu.py | rgarnov/openvino | a864c2eb85e5649770ee0172080b250efab8c97e | [
"Apache-2.0"
] | 1 | 2020-08-13T08:33:55.000Z | 2020-08-13T08:33:55.000Z | """
Copyright (C) 2018-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | 43.529412 | 120 | 0.530856 |
e594a2b19e45f2013b0d0c77c25559a34d7e3cd0 | 7,122 | py | Python | scripts/bridge.py | erlichg/TVMLServer | 01a2d644485a2ad2f5465b453a6514bea3a5cde3 | [
"Apache-2.0"
] | 1 | 2019-10-01T18:01:49.000Z | 2019-10-01T18:01:49.000Z | scripts/bridge.py | erlichg/TVMLServer | 01a2d644485a2ad2f5465b453a6514bea3a5cde3 | [
"Apache-2.0"
] | null | null | null | scripts/bridge.py | erlichg/TVMLServer | 01a2d644485a2ad2f5465b453a6514bea3a5cde3 | [
"Apache-2.0"
] | 3 | 2016-08-22T14:48:31.000Z | 2018-10-21T18:31:38.000Z | import importlib, time, sys, json, utils
import multiprocessing, gevent
try:
import setproctitle
except:
pass
def play_stop(b, _id, stop_completion):
res = None
if 'setproctitle' in sys.modules:
setproctitle.setproctitle('python TVMLServer (play wait {})'.format(_id))
now = time.time()
while not b.thread.stop ... | 41.649123 | 222 | 0.693906 |
6f982a31e9085f2f258e0034e52df021cb84c5ae | 315 | py | Python | premium/backend/tests/baserow_premium/conftest.py | ashishdhngr/baserow | b098678d2165eb7c42930ee24dc6753a3cb520c3 | [
"MIT"
] | 1 | 2022-01-24T15:12:02.000Z | 2022-01-24T15:12:02.000Z | premium/backend/tests/baserow_premium/conftest.py | rasata/baserow | c6e1d7842c53f801e1c96b49f1377da2a06afaa9 | [
"MIT"
] | null | null | null | premium/backend/tests/baserow_premium/conftest.py | rasata/baserow | c6e1d7842c53f801e1c96b49f1377da2a06afaa9 | [
"MIT"
] | null | null | null | import pytest
# noinspection PyUnresolvedReferences
from tests.conftest import * # noqa: F403, F401
@pytest.fixture
def premium_data_fixture(data_fixture):
from .fixtures import PremiumFixtures
class PremiumFixtures(PremiumFixtures, data_fixture.__class__):
pass
return PremiumFixtures()
| 19.6875 | 67 | 0.771429 |
e57d57047cc5d5be17a6a004a18dd01dad2ed353 | 15,027 | py | Python | velo_payments/models/payee_address2.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | velo_payments/models/payee_address2.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | velo_payments/models/payee_address2.py | velopaymentsapi/velo-python | 59b39555e9714139b4bf697151cc7d15f6dd510e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Velo Payments APIs
## Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor.... | 46.236923 | 4,651 | 0.651294 |
ee35831beab3ff069ee9425ed176b8bea2eaa471 | 3,017 | py | Python | tests/gmprocess/metrics/imt/arias_test.py | norfordb/groundmotion | 3f714894a34d9d37e1ac236f26b4366e25a05056 | [
"CC0-1.0"
] | null | null | null | tests/gmprocess/metrics/imt/arias_test.py | norfordb/groundmotion | 3f714894a34d9d37e1ac236f26b4366e25a05056 | [
"CC0-1.0"
] | null | null | null | tests/gmprocess/metrics/imt/arias_test.py | norfordb/groundmotion | 3f714894a34d9d37e1ac236f26b4366e25a05056 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# stdlib imports
import os.path
import json
# third party imports
import numpy as np
import pkg_resources
# local imports
from gmprocess.io.read import read_data
from gmprocess.io.test_utils import read_data_dir
from gmprocess.metrics.station_summary import StationSummary
from gmprocess.station... | 34.284091 | 94 | 0.556845 |
6091967ad27cc7b428565790a2378d04d95298f9 | 3,287 | py | Python | StY.py | CommRogue/RogueBot | 77127496dc3a7dd3be64c4d482878fd967235bc8 | [
"MIT"
] | null | null | null | StY.py | CommRogue/RogueBot | 77127496dc3a7dd3be64c4d482878fd967235bc8 | [
"MIT"
] | null | null | null | StY.py | CommRogue/RogueBot | 77127496dc3a7dd3be64c4d482878fd967235bc8 | [
"MIT"
] | null | null | null | from async_spotify import SpotifyApiClient
from async_spotify.authentification import SpotifyAuthorisationToken
from async_spotify.authentification.authorization_flows import ClientCredentialsFlow, AuthorizationCodeFlow
import async_spotify
import youtubesearchpython as yt
import asyncio
from urllib.parse import urlpar... | 43.25 | 120 | 0.675084 |
a74b2a06f739f7af74e40e811091f774d09575ef | 417 | py | Python | hatvp/migrations/0028_auto_20200128_0927.py | WilliamLafarie/hatvp | 76e856ec53e51f5a214a217bb07d15426269e7d7 | [
"MIT"
] | null | null | null | hatvp/migrations/0028_auto_20200128_0927.py | WilliamLafarie/hatvp | 76e856ec53e51f5a214a217bb07d15426269e7d7 | [
"MIT"
] | null | null | null | hatvp/migrations/0028_auto_20200128_0927.py | WilliamLafarie/hatvp | 76e856ec53e51f5a214a217bb07d15426269e7d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0 on 2020-01-28 09:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hatvp', '0027_auto_20200128_0920'),
]
operations = [
migrations.AlterField(
model_name='observations',
name='observati... | 21.947368 | 74 | 0.616307 |
b2de24db13c4da463832763aac3d4bbd28a333aa | 10,574 | py | Python | tests/db/queries/test_stopqueries.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 10 | 2018-10-25T13:07:42.000Z | 2022-02-08T20:49:07.000Z | tests/db/queries/test_stopqueries.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 80 | 2019-04-06T23:01:44.000Z | 2022-02-05T23:35:54.000Z | tests/db/queries/test_stopqueries.py | jamespfennell/realtimerail | 352dd7d185d3501d28276476e1390d3288735690 | [
"MIT"
] | 3 | 2021-05-07T16:43:39.000Z | 2021-07-15T18:06:07.000Z | import datetime
import pytest
from transiter.db import models
from transiter.db.queries import stopqueries
@pytest.fixture
def transfers(add_model, system_1, stop_1_1, stop_1_2, stop_1_3, feed_1_1_update_1):
return [
add_model(
models.Transfer(
from_stop=stop_1_1,
... | 27.536458 | 88 | 0.632968 |
c6c74f79c3a14249e6f2e3004e96c48d48734652 | 892 | py | Python | websecurityscanner/google/cloud/websecurityscanner.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | null | null | null | websecurityscanner/google/cloud/websecurityscanner.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 40 | 2019-07-16T10:04:48.000Z | 2020-01-20T09:04:59.000Z | websecurityscanner/google/cloud/websecurityscanner.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 2 | 2019-07-18T00:05:31.000Z | 2019-11-27T14:17:22.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 34.307692 | 75 | 0.78139 |
903b5cce5eda7b1e03a60a9ceca277f833462de3 | 742 | py | Python | plot.py | NathanYee/POE-Lab3 | 8fa373334373b52f8b97977464f3293daa55ff06 | [
"MIT"
] | null | null | null | plot.py | NathanYee/POE-Lab3 | 8fa373334373b52f8b97977464f3293daa55ff06 | [
"MIT"
] | null | null | null | plot.py | NathanYee/POE-Lab3 | 8fa373334373b52f8b97977464f3293daa55ff06 | [
"MIT"
] | null | null | null | import serial
import time
import csv
# Creating a serial object
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=2)
# Sleep for 1 second to wait for the serial to init
time.sleep(1)
sleft = []
sright = []
mleft = []
mright = []
for d in range(0,800):
try:
val = int(ser.readline().strip())
except:
val = 0
fi... | 17.666667 | 61 | 0.640162 |
a8b239598a5cec31bc41e623ffc8bee37af86532 | 1,983 | py | Python | tools/test.py | jie311/vedadet | aaf3b3bc3c7944aba1cc28138165d403023a9152 | [
"Apache-2.0"
] | 424 | 2020-10-19T03:56:49.000Z | 2022-03-28T02:47:39.000Z | tools/test.py | jie311/vedadet | aaf3b3bc3c7944aba1cc28138165d403023a9152 | [
"Apache-2.0"
] | 72 | 2020-11-27T17:10:00.000Z | 2022-03-17T02:40:53.000Z | tools/test.py | jie311/vedadet | aaf3b3bc3c7944aba1cc28138165d403023a9152 | [
"Apache-2.0"
] | 116 | 2020-11-03T02:31:17.000Z | 2022-03-08T08:20:48.000Z | import argparse
import torch
from vedacore.fileio import dump
from vedacore.misc import Config, ProgressBar, load_weights
from vedacore.parallel import MMDataParallel
from vedadet.datasets import build_dataloader, build_dataset
from vedadet.engines import build_engine
def parse_args():
parser = argparse.Argumen... | 26.44 | 76 | 0.69289 |
1797a7e2389d8bffd292cad42e2888eb7bf7cea5 | 2,781 | py | Python | v3/disentangled training/fit.py | biboamy/instrument-disentangle | bdf6e7d36ce36e6abe0249712cc9b853e77e7a36 | [
"MIT"
] | 19 | 2019-05-28T01:11:03.000Z | 2021-12-31T01:38:47.000Z | v3/disentangled training/fit.py | biboamy/instrument-disentangle | bdf6e7d36ce36e6abe0249712cc9b853e77e7a36 | [
"MIT"
] | 3 | 2020-03-27T03:34:37.000Z | 2020-10-04T11:32:17.000Z | v3/disentangled training/fit.py | biboamy/instrument-disentangle | bdf6e7d36ce36e6abe0249712cc9b853e77e7a36 | [
"MIT"
] | 6 | 2019-08-23T09:58:25.000Z | 2022-02-09T09:35:10.000Z | import torch, time, sys
import torch.nn.functional as F
from torch.autograd import Variable
import torch.optim as optim
from lib import *
class Trainer:
def __init__(self, model, lr, epoch, save_fn, avg, std):
self.epoch = epoch
self.model = model
self.lr = lr
self.save_fn = save_fn... | 46.35 | 168 | 0.539374 |
e9fea9e6efe560f56d7d564ee656545fa5c821c3 | 1,967 | py | Python | kubernetes/test/test_apiregistration_v1_api.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 1 | 2018-07-06T01:43:47.000Z | 2018-07-06T01:43:47.000Z | kubernetes/test/test_apiregistration_v1_api.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apiregistration_v1_api.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 2 | 2021-07-09T08:49:05.000Z | 2021-08-03T18:08:36.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 18.045872 | 105 | 0.601932 |
648caf19bd366549d29f95574f5de587b674203b | 393 | py | Python | pokelist/wsgi.py | gerbot150/pokelist-backend | 8228660447ed15c9ea5126e9ab61d1d57bd5adaf | [
"MIT"
] | null | null | null | pokelist/wsgi.py | gerbot150/pokelist-backend | 8228660447ed15c9ea5126e9ab61d1d57bd5adaf | [
"MIT"
] | null | null | null | pokelist/wsgi.py | gerbot150/pokelist-backend | 8228660447ed15c9ea5126e9ab61d1d57bd5adaf | [
"MIT"
] | null | null | null | """
WSGI config for pokelist project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
a0d4032ee4367abebe2139261644bbd937d77f49 | 243 | py | Python | src/os_tornado/exceptions.py | cfhamlet/os-tornado | a1ac204889d561d2db9d646ee49214c39fa546c1 | [
"MIT"
] | 5 | 2018-03-01T12:28:50.000Z | 2020-12-08T19:19:56.000Z | src/os_tornado/exceptions.py | cfhamlet/os-tornado | a1ac204889d561d2db9d646ee49214c39fa546c1 | [
"MIT"
] | 3 | 2017-12-20T05:41:42.000Z | 2018-03-13T05:42:28.000Z | src/os_tornado/exceptions.py | cfhamlet/os-tornado | a1ac204889d561d2db9d646ee49214c39fa546c1 | [
"MIT"
] | null | null | null | """
Core Exceptions
"""
class UsageError(Exception):
"""To indicate a command-line usage error"""
def __init__(self, *a, **kw):
self.print_help = kw.pop('print_help', True)
super(UsageError, self).__init__(*a, **kw)
| 20.25 | 52 | 0.621399 |
9ff0a8a446f3365cbc6bfc4e42811e22a0f5912c | 732 | py | Python | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/gcn_shader.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 87 | 2015-04-09T16:57:27.000Z | 2022-02-21T13:21:12.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/gcn_shader.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 47 | 2015-04-09T21:05:30.000Z | 2021-06-22T15:21:18.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/GL/AMD/gcn_shader.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 16 | 2015-04-09T19:10:22.000Z | 2020-07-19T05:41:06.000Z | '''OpenGL extension AMD.gcn_shader
This module customises the behaviour of the
OpenGL.raw.GL.AMD.gcn_shader to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/AMD/gcn_shader.txt
'''
from OpenGL import platform, constant, arrays
fro... | 31.826087 | 71 | 0.79918 |
38dfc83434734b33cd899ac638b90cdc9a9362b1 | 15,990 | py | Python | utils/process_aiops2020_data_to_original.py | yymgithub/AIOsp-Fault-Diagnosis | d760930fd1c57be23cacc88c5c597d88ee307017 | [
"Apache-2.0"
] | 45 | 2021-05-03T01:39:27.000Z | 2022-02-14T08:04:00.000Z | utils/process_aiops2020_data_to_original.py | yymgithub/AIOsp-Fault-Diagnosis | d760930fd1c57be23cacc88c5c597d88ee307017 | [
"Apache-2.0"
] | null | null | null | utils/process_aiops2020_data_to_original.py | yymgithub/AIOsp-Fault-Diagnosis | d760930fd1c57be23cacc88c5c597d88ee307017 | [
"Apache-2.0"
] | 16 | 2021-03-30T06:10:49.000Z | 2021-05-29T01:07:25.000Z | import pandas as pd
import numpy as np
import csv
import json
def get_original_trace_data():
trace_csf_path = '../data/aiops_data_2020/2020_04_11/调用链指标/trace_csf.csv'
trace_fly_remote_path = '../data/aiops_data_2020/2020_04_11/调用链指标/trace_fly_remote.csv'
trace_jdbc_path = '../data/aiops_data_2020/2020_04_1... | 62.705882 | 5,844 | 0.609443 |
34e1b2b6d5e6539d889172979a165207d0400878 | 11,665 | py | Python | mmdet3d/models/middle_encoders/sparse_unet.py | gopi231091/mmdetection3d | 1b2e64cd75c8d1c238c61a3bc1e3c62a7d403b53 | [
"Apache-2.0"
] | 217 | 2021-12-10T09:44:33.000Z | 2022-03-31T16:17:35.000Z | mmdet3d/models/middle_encoders/sparse_unet.py | gopi231091/mmdetection3d | 1b2e64cd75c8d1c238c61a3bc1e3c62a7d403b53 | [
"Apache-2.0"
] | 22 | 2021-12-29T08:57:31.000Z | 2022-03-31T11:21:53.000Z | mmdet3d/models/middle_encoders/sparse_unet.py | gopi231091/mmdetection3d | 1b2e64cd75c8d1c238c61a3bc1e3c62a7d403b53 | [
"Apache-2.0"
] | 23 | 2021-12-13T06:56:38.000Z | 2022-03-28T02:02:13.000Z | import torch
from mmcv.runner import BaseModule, auto_fp16
from mmdet3d.ops import SparseBasicBlock, make_sparse_convmodule
from mmdet3d.ops import spconv as spconv
from ..builder import MIDDLE_ENCODERS
@MIDDLE_ENCODERS.register_module()
class SparseUNet(BaseModule):
r"""SparseUNet for PartA^2.
See the `pap... | 39.812287 | 79 | 0.521817 |
521e8d2bf296b0d26cf1d6cbc28ce41a0dcdd6e7 | 139 | py | Python | abc/022/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/022/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/022/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N, S, T = map(int, input().split())
W = 0
ans = 0
for i in range(N):
W += int(input())
if S <= W <= T:
ans += 1
print(ans)
| 15.444444 | 35 | 0.453237 |
784d86613127b04e5e5985b4363c6392e4421c5f | 6,900 | py | Python | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | cloudbase/neutron | 50f31386cf6976225e5f0cdba81cdadec2a30872 | [
"Apache-2.0"
] | 1 | 2017-09-10T09:57:35.000Z | 2017-09-10T09:57:35.000Z | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | cloudbase/neutron | 50f31386cf6976225e5f0cdba81cdadec2a30872 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | cloudbase/neutron | 50f31386cf6976225e5f0cdba81cdadec2a30872 | [
"Apache-2.0"
] | 1 | 2015-05-05T14:41:11.000Z | 2015-05-05T14:41:11.000Z | # 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 applicable law or agreed to in... | 47.916667 | 78 | 0.622464 |
0a0c0c7d0953ad09b453a398082842fe7ec3c7b0 | 2,154 | py | Python | setup.py | hlpl-ahmida/english-words | b984f2afca823944fd4b5d25703d2f4469fb7323 | [
"MIT"
] | 1 | 2022-01-06T09:28:55.000Z | 2022-01-06T09:28:55.000Z | setup.py | hlpl-lexicon/english-words | b984f2afca823944fd4b5d25703d2f4469fb7323 | [
"MIT"
] | null | null | null | setup.py | hlpl-lexicon/english-words | b984f2afca823944fd4b5d25703d2f4469fb7323 | [
"MIT"
] | 9 | 2022-01-06T09:27:43.000Z | 2022-01-18T13:10:38.000Z | #! /usr/bin/python
from setuptools import setup
import os
import sys
import platform
import configparser
from io import open
# to install type:
# python setup.py install --root=/
LONG_DESCRIPTION=open('README.md','r',encoding='utf8').read()
if sys.version_info[0] < 3:
raise Exception(
'Yo... | 32.149254 | 107 | 0.656917 |
d103f12634e1f7503c6f10c05e5c7c3e46fc2ac8 | 185,344 | py | Python | saleor/tests/fixtures.py | magul/saleor | ab62a427d64ece012ca1126fd1d4eaf1871112aa | [
"CC-BY-4.0"
] | null | null | null | saleor/tests/fixtures.py | magul/saleor | ab62a427d64ece012ca1126fd1d4eaf1871112aa | [
"CC-BY-4.0"
] | null | null | null | saleor/tests/fixtures.py | magul/saleor | ab62a427d64ece012ca1126fd1d4eaf1871112aa | [
"CC-BY-4.0"
] | null | null | null | import datetime
import uuid
from collections import namedtuple
from contextlib import contextmanager
from datetime import timedelta
from decimal import Decimal
from functools import partial
from io import BytesIO
from typing import List, Optional
from unittest.mock import MagicMock, Mock
import graphene
import pytest
... | 31.051097 | 91 | 0.671789 |
2461d95b026463a15acd7bdbedeee0cc20032c2f | 11,670 | py | Python | SymbolTables.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | 1 | 2018-03-12T00:23:37.000Z | 2018-03-12T00:23:37.000Z | SymbolTables.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | null | null | null | SymbolTables.py | LuisHernandez96/Pichon | 7c7a1da6a404eae216b919dc2140ee4ca6624901 | [
"MIT"
] | null | null | null | import pprint
import sys
import constants
import NeededSize as n
from utils import raiseError
import re
from GlobalVars import globals
FUNC = "FUNCTIONS"
ENV = "ENVIRONMENT"
MOV = "MOVEMENT"
RETURN_TYPE = "returnType"
RETURN_SIZE = "returnSize"
VARS = "vars"
DATA_TYPE = "data_type"
DATA_TYPE_STRING = "data_type_string... | 32.873239 | 154 | 0.611311 |
58333a4b0def2255bea3eb64f8a551f8d9b1b78f | 202 | py | Python | app/requests.py | Geerocktricks/Weather_app | a5bf8b6cf3ae875e80ec6460c7ee6e14abb74719 | [
"MIT"
] | 1 | 2019-05-13T08:11:44.000Z | 2019-05-13T08:11:44.000Z | app/requests.py | Geerocktricks/Weather_app | a5bf8b6cf3ae875e80ec6460c7ee6e14abb74719 | [
"MIT"
] | null | null | null | app/requests.py | Geerocktricks/Weather_app | a5bf8b6cf3ae875e80ec6460c7ee6e14abb74719 | [
"MIT"
] | null | null | null | import urllib.request, json
api_key=None
base_url=None
def configure_request(app):
global api_key,base_url
api_key=app.config['WEATHER_API_KEY']
base_url=app.config['WEATHER_API_BASE_URL'] | 22.444444 | 47 | 0.782178 |
eded043ceeb9da0c588a19358b343ebdcb933c78 | 1,334 | py | Python | my_drawing/draw_line.py | josephtl/stanCode-projects | 977db098a96c52f7d78ad8555505dcb53944937c | [
"MIT"
] | null | null | null | my_drawing/draw_line.py | josephtl/stanCode-projects | 977db098a96c52f7d78ad8555505dcb53944937c | [
"MIT"
] | null | null | null | my_drawing/draw_line.py | josephtl/stanCode-projects | 977db098a96c52f7d78ad8555505dcb53944937c | [
"MIT"
] | null | null | null | """
File: draw_line.py
Name: Joseph Liu
-------------------------
This program allows users drawing line by clicking the mouse.
First click represents the starting point, second click represents the ending point.
"""
from campy.graphics.gobjects import GOval, GLine
from campy.graphics.gwindow import GWindow
... | 28.382979 | 107 | 0.673913 |
e67596a712e51c06eb27c8f57eaa62494449166f | 10,509 | py | Python | detectron2/data/datasets/builtin.py | hisiter97/CenterNet2 | 73eba73695af98a4a2b93f5da83df26cabebaa28 | [
"Apache-2.0"
] | null | null | null | detectron2/data/datasets/builtin.py | hisiter97/CenterNet2 | 73eba73695af98a4a2b93f5da83df26cabebaa28 | [
"Apache-2.0"
] | null | null | null | detectron2/data/datasets/builtin.py | hisiter97/CenterNet2 | 73eba73695af98a4a2b93f5da83df26cabebaa28 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates.
"""
This file registers pre-defined datasets at hard-coded paths, and their metadata.
We hard-code metadata for common datasets. This will enable:
1. Consistency check when loading the datasets
2. Use models on these standard datasets directl... | 39.507519 | 98 | 0.670758 |
780762c038505f084705b37b2b18fb21bf3c6167 | 630 | py | Python | adapters/icasa/__init__.py | wini83/domoticz-zigbee2mqtt-plugin | 36ea23e8c347c732c9f55ed0ab438e68caf750ed | [
"MIT"
] | 1 | 2021-01-17T16:53:44.000Z | 2021-01-17T16:53:44.000Z | adapters/icasa/__init__.py | schurgan/zigbee2mqtt-plugin | 41042bc52d34ad503812154a11d7f63aede44c71 | [
"MIT"
] | null | null | null | adapters/icasa/__init__.py | schurgan/zigbee2mqtt-plugin | 41042bc52d34ad503812154a11d7f63aede44c71 | [
"MIT"
] | null | null | null | from adapters.dimmable_bulb_adapter import DimmableBulbAdapter
from adapters.dimmable_ct_bulb_adapter import DimmableCtBulbAdapter
from adapters.icasa.KPD14S import KPD14S
from adapters.icasa.KPD18S import KPD18S
icasa_adapters = {
'ICZB-IW11D': DimmableBulbAdapter, # iCasa Zigbee 3.0 Dimmer
'ICZB-B1FC60/B3F... | 45 | 112 | 0.742857 |
513d0231d8d763ee9ee0833d2fd4fbf8faf53079 | 537 | py | Python | bubble_sort.py | t170815518/CZ1003Introduction_to_ComputationalThinking | 5a36c7d317f99eb0f847aa343683084af838ed3c | [
"MIT"
] | null | null | null | bubble_sort.py | t170815518/CZ1003Introduction_to_ComputationalThinking | 5a36c7d317f99eb0f847aa343683084af838ed3c | [
"MIT"
] | 3 | 2019-10-10T06:17:06.000Z | 2019-10-23T08:04:40.000Z | bubble_sort.py | t170815518/Introduction_to_ComputationalThinking | 5a36c7d317f99eb0f847aa343683084af838ed3c | [
"MIT"
] | null | null | null | def bubble_sort(l):
# to_sort = l, l is changed
to_sort = l.copy()
for i in range(len(to_sort)):
swapped = True
for j in range(len(to_sort)-i-1): # from the beginning
if to_sort[j] > to_sort[j+1]:
to_sort[j], to_sort[j+1] = to_sort[j+1], to_sort[j]
... | 28.263158 | 67 | 0.523277 |
3c63b4609eaf794f366494502d046fcd630d7b5b | 892 | py | Python | norminette/rules/check_general_spacing.py | N0ich/norminette | a19fe6b057591ef3faca469c62d3454242ce3d77 | [
"MIT"
] | 1 | 2021-07-27T13:23:27.000Z | 2021-07-27T13:23:27.000Z | norminette/rules/check_general_spacing.py | N0ich/norminette | a19fe6b057591ef3faca469c62d3454242ce3d77 | [
"MIT"
] | null | null | null | norminette/rules/check_general_spacing.py | N0ich/norminette | a19fe6b057591ef3faca469c62d3454242ce3d77 | [
"MIT"
] | null | null | null | from rules import Rule
from scope import *
class CheckGeneralSpacing(Rule):
def __init__(self):
super().__init__()
self.depends_on = [
"IsDeclaration",
"IsControlStatement",
"IsExpressionStatement",
"IsA... | 31.857143 | 77 | 0.488789 |
5ff22708707a04d40472c3b5097c3b2712d8bb1e | 293 | py | Python | src/app.py | hex22a/magi | 1a0e56ea784c3e50e52caef04a4fcb55458b1faf | [
"MIT"
] | null | null | null | src/app.py | hex22a/magi | 1a0e56ea784c3e50e52caef04a4fcb55458b1faf | [
"MIT"
] | null | null | null | src/app.py | hex22a/magi | 1a0e56ea784c3e50e52caef04a4fcb55458b1faf | [
"MIT"
] | null | null | null | import json
import falcon
class EchoResource:
def on_get(self, req, resp, field):
resp.body = json.dumps({
"magic": 500,
"message": field
})
def create_app():
app = falcon.API()
app.add_route("/{field}", EchoResource())
return app
| 15.421053 | 45 | 0.559727 |
286ee01b9ca200e44e2a0a8ec59eea7ff320ef73 | 6,180 | py | Python | google/cloud/dialogflow/cx/v3/dialogflow-cx-v3-py/google/cloud/dialogflowcx_v3/services/session_entity_types/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/dialogflow/cx/v3/dialogflow-cx-v3-py/google/cloud/dialogflowcx_v3/services/session_entity_types/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/dialogflow/cx/v3/dialogflow-cx-v3-py/google/cloud/dialogflowcx_v3/services/session_entity_types/pagers.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.829787 | 97 | 0.7 |
3670fcf960c792c2693da035d68d682a48e47974 | 33 | py | Python | electrumsv_sdk/builtin_components/merchant_api/__init__.py | electrumsv/electrumsv-sdk | 2d4b9474b2e2fc5518bba10684c5d5130ffb6328 | [
"OML"
] | 4 | 2020-07-06T12:13:14.000Z | 2021-07-29T12:45:27.000Z | electrumsv_sdk/builtin_components/merchant_api/__init__.py | electrumsv/electrumsv-sdk | 2d4b9474b2e2fc5518bba10684c5d5130ffb6328 | [
"OML"
] | 62 | 2020-07-04T04:50:27.000Z | 2021-08-19T21:06:10.000Z | electrumsv_sdk/builtin_components/merchant_api/__init__.py | electrumsv/electrumsv-sdk | 2d4b9474b2e2fc5518bba10684c5d5130ffb6328 | [
"OML"
] | 3 | 2021-01-21T09:22:45.000Z | 2021-06-12T10:16:03.000Z | from .merchant_api import Plugin
| 16.5 | 32 | 0.848485 |
fe14ea37c0b5c62581a18465b197c541fc8ea5b8 | 6,970 | py | Python | tackerclient/tests/unit/vm/test_cli10_vim_k8s_with_bearer_token.py | pineunity/python-tackerclient | b0c5bfbe960b62b21e34f232ece68346fe054906 | [
"Apache-2.0"
] | 20 | 2015-10-18T02:56:36.000Z | 2021-10-12T13:37:58.000Z | tackerclient/tests/unit/vm/test_cli10_vim_k8s_with_bearer_token.py | pineunity/python-tackerclient | b0c5bfbe960b62b21e34f232ece68346fe054906 | [
"Apache-2.0"
] | null | null | null | tackerclient/tests/unit/vm/test_cli10_vim_k8s_with_bearer_token.py | pineunity/python-tackerclient | b0c5bfbe960b62b21e34f232ece68346fe054906 | [
"Apache-2.0"
] | 16 | 2016-03-18T08:37:28.000Z | 2021-07-19T05:28:16.000Z | # Copyright 2015-2016 Brocade Communications Systems Inc
# 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... | 40.760234 | 79 | 0.594692 |
7ed2299c9e73ed86d1c3ef18578a75f38e8f5915 | 3,349 | py | Python | src/cfnlint/rules/parameters/LambdaMemorySize.py | PokaInc/cfn-python-lint | 2cd49b838088a1be1b1a5e5abdff556f264903b4 | [
"MIT-0"
] | null | null | null | src/cfnlint/rules/parameters/LambdaMemorySize.py | PokaInc/cfn-python-lint | 2cd49b838088a1be1b1a5e5abdff556f264903b4 | [
"MIT-0"
] | null | null | null | src/cfnlint/rules/parameters/LambdaMemorySize.py | PokaInc/cfn-python-lint | 2cd49b838088a1be1b1a5e5abdff556f264903b4 | [
"MIT-0"
] | null | null | null | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to ... | 40.841463 | 125 | 0.6596 |
e13510373f05418e3ba9dbb8f3470a80c7650f96 | 555 | py | Python | multitask/multi_thread.py | semoren/learn_python | d3140c3d4cb2bdb674d9c072c4195ebcfe686be3 | [
"Apache-2.0"
] | null | null | null | multitask/multi_thread.py | semoren/learn_python | d3140c3d4cb2bdb674d9c072c4195ebcfe686be3 | [
"Apache-2.0"
] | null | null | null | multitask/multi_thread.py | semoren/learn_python | d3140c3d4cb2bdb674d9c072c4195ebcfe686be3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time, threading
def loop():
print('thread %s is running...' % threading.current_thread().name)
n = 0
while n < 5:
n = n + 1
print('thread %s >>> %s' % (threading.current_thread().name, n))
time.sleep(1)
print('thread %s ended... | 30.833333 | 72 | 0.630631 |
74deeb9501736858f9fb4154c07c724f27f66385 | 3,699 | py | Python | esphome/components/sensor/bmp280.py | psbaltar/esphome | a8d87a1fee5d9ec7bea81cd6e65d8ec7babfbde4 | [
"MIT"
] | 2 | 2020-05-11T09:26:16.000Z | 2021-07-20T03:06:37.000Z | esphome/components/sensor/bmp280.py | psbaltar/esphome | a8d87a1fee5d9ec7bea81cd6e65d8ec7babfbde4 | [
"MIT"
] | null | null | null | esphome/components/sensor/bmp280.py | psbaltar/esphome | a8d87a1fee5d9ec7bea81cd6e65d8ec7babfbde4 | [
"MIT"
] | null | null | null | import voluptuous as vol
from esphome.components import i2c, sensor
import esphome.config_validation as cv
from esphome.const import CONF_ADDRESS, CONF_ID, CONF_IIR_FILTER, CONF_NAME, \
CONF_OVERSAMPLING, CONF_PRESSURE, CONF_TEMPERATURE, CONF_UPDATE_INTERVAL
from esphome.cpp_generator import Pvariable, add
from es... | 44.566265 | 93 | 0.749932 |
01c01a7fd737e6fbfb7f660db0d93d5b9656ca20 | 15,934 | py | Python | userbot/modules/memesreborn.py | ashwinstr/RemixGeng | cb5d2f1ffc6417134fe4eb51c33ca2f46e501d2d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/memesreborn.py | ashwinstr/RemixGeng | cb5d2f1ffc6417134fe4eb51c33ca2f46e501d2d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/memesreborn.py | ashwinstr/RemixGeng | cb5d2f1ffc6417134fe4eb51c33ca2f46e501d2d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2020 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
# custom cmds by @Nitesh_231 for personal use 👀
""" Userbot module for having some fun with people. """
import asyncio... | 42.37766 | 2,008 | 0.608949 |
3744ec482334bcaebe075a58492567816e28a80c | 1,752 | py | Python | tomputils/message/messsagelogger/listener.py | tparker-usgs/tomputils | aac3a133f1be8b1c0d94b07b63bb021aae996099 | [
"CC0-1.0"
] | null | null | null | tomputils/message/messsagelogger/listener.py | tparker-usgs/tomputils | aac3a133f1be8b1c0d94b07b63bb021aae996099 | [
"CC0-1.0"
] | null | null | null | tomputils/message/messsagelogger/listener.py | tparker-usgs/tomputils | aac3a133f1be8b1c0d94b07b63bb021aae996099 | [
"CC0-1.0"
] | 2 | 2018-05-24T19:10:32.000Z | 2020-05-24T22:10:04.000Z | # -*- coding: utf8 -*-
"""
Receive messages from broker.
"""
from datetime import datetime
import os
import struct
import pika
class Listener(object):
def __init__(self, queue):
self.queue = queue
def listen(self):
exchange = os.environ['AVOBROKER_EXCHANGE']
mycred = pika.credentials... | 33.056604 | 76 | 0.620434 |
82ebcd1006f866c172718a4cd0d80692427dee3a | 14,936 | py | Python | theano/configparser.py | MarcCote/Theano | f0d293161a624ccf10c60ee8405a92e7d321151a | [
"BSD-3-Clause"
] | null | null | null | theano/configparser.py | MarcCote/Theano | f0d293161a624ccf10c60ee8405a92e7d321151a | [
"BSD-3-Clause"
] | null | null | null | theano/configparser.py | MarcCote/Theano | f0d293161a624ccf10c60ee8405a92e7d321151a | [
"BSD-3-Clause"
] | null | null | null | # For flag of bool type, we consider the strings 'False', 'false' and '0'
# as False, and the string s'True', 'true', '1' as True.
# We also accept the bool type as its corresponding value!
from __future__ import absolute_import, print_function, division
import logging
import os
import shlex
import sys
import warnings... | 34.574074 | 80 | 0.622791 |
8a4ea4e9480d0de1f6d44dc8e9e5f2b427b5633d | 375 | py | Python | twitterscheduler/forms.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 1 | 2020-08-16T18:52:06.000Z | 2020-08-16T18:52:06.000Z | twitterscheduler/forms.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 3 | 2020-02-12T00:19:59.000Z | 2021-06-10T19:59:54.000Z | twitterscheduler/forms.py | caleblogan/twitter-scheduler | 120ac516e718ac58079fb2e66dc8d49b3e60e7ad | [
"MIT"
] | 1 | 2020-03-08T23:26:45.000Z | 2020-03-08T23:26:45.000Z | from django import forms
from .models import ScheduledTweet, Tweet
class CreateScheduleTweetForm(forms.Form):
time_to_tweet = forms.DateTimeField()
text = forms.CharField(max_length=140, widget=forms.Textarea)
class ScheduledTweetUpdateForm(forms.Form):
time_to_tweet = forms.DateTimeField()
text = ... | 26.785714 | 65 | 0.781333 |
090f84d6ba6f5fe667ae98f6c1a0d2af94eaa916 | 2,046 | py | Python | framework/SupervisedLearning/__init__.py | JiaZhou-PU/raven | a1fd82facb0f02f20770ea4df39d55a999c49017 | [
"Apache-2.0"
] | null | null | null | framework/SupervisedLearning/__init__.py | JiaZhou-PU/raven | a1fd82facb0f02f20770ea4df39d55a999c49017 | [
"Apache-2.0"
] | null | null | null | framework/SupervisedLearning/__init__.py | JiaZhou-PU/raven | a1fd82facb0f02f20770ea4df39d55a999c49017 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 38.603774 | 94 | 0.792766 |
e8042a9b21e67d7e2bc9e6dadc6058b9f499de0a | 725 | py | Python | demo_verify.py | jjhesk/TrustVault | a0e8a9b3f2ae945f6f9f22eecc6a7fd4456cd206 | [
"MIT"
] | null | null | null | demo_verify.py | jjhesk/TrustVault | a0e8a9b3f2ae945f6f9f22eecc6a7fd4456cd206 | [
"MIT"
] | null | null | null | demo_verify.py | jjhesk/TrustVault | a0e8a9b3f2ae945f6f9f22eecc6a7fd4456cd206 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# coding: utf-8
# from web3.auto import w3
from moody import Bolors
from key import ROOT
from codec.BaseVault import BsVault
def Prod() -> BsVault:
# ========================== Of course
j = BsVault(ROOT)
return j
"""
from the request
Address string `json:"wallet_address"`
... | 20.138889 | 47 | 0.678621 |
15862571117ff2512ca82449d82b72b9cc972b3e | 3,677 | py | Python | bias_classification/lib/excel.py | noogel/xyzDeepLearning | 5cfb477b317202b4d09850ae9602bc99cfc9f90c | [
"MIT"
] | null | null | null | bias_classification/lib/excel.py | noogel/xyzDeepLearning | 5cfb477b317202b4d09850ae9602bc99cfc9f90c | [
"MIT"
] | null | null | null | bias_classification/lib/excel.py | noogel/xyzDeepLearning | 5cfb477b317202b4d09850ae9602bc99cfc9f90c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Abstract: excel operation
import os
import random
import string
import datetime
from cStringIO import StringIO
import xlrd
import xlwt
class Excel(object):
'''
excel processing
'''
def __init__(self, home='/tmp', trans=None):
self.home = home... | 30.139344 | 101 | 0.536307 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.