hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c4ef34765e81a312523257e87f5ab76933d8997 | 2,245 | py | Python | apps/orders/models.py | LinkanDawang/FreshMallDemo | 5b8e2d2e8e137f609e8ac1e29ea013bb3ef34edb | [
"Apache-2.0"
] | null | null | null | apps/orders/models.py | LinkanDawang/FreshMallDemo | 5b8e2d2e8e137f609e8ac1e29ea013bb3ef34edb | [
"Apache-2.0"
] | 5 | 2020-06-05T18:27:41.000Z | 2022-01-13T00:48:03.000Z | apps/orders/models.py | LinkanDawang/dailyfresh | 4f0360d5e4eeda4737234942248715b77d9e3b12 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from utils.models import BaseModel
from users.models import User, Address
from goods.models import GoodsSKU
# Create your models here.
class OrderInfo(BaseModel):
"""订单信息"""
PAY_METHOD = ['1', '2']
PAY_METHOD_CHOICES = (
(1, "货到付款"),
(2, "支付宝"),
)
OR... | 28.782051 | 104 | 0.620045 | 2,280 | 0.929474 | 0 | 0 | 0 | 0 | 0 | 0 | 547 | 0.222992 |
9c4f72bb8eb3058809660eadcee54f1e16cab76f | 18,201 | py | Python | event/arguments/prepare/event_vocab.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | null | null | null | event/arguments/prepare/event_vocab.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | null | null | null | event/arguments/prepare/event_vocab.py | hunterhector/DDSemantics | 883ef1015bd21d9b8575d8000faf3b506a09f21c | [
"Apache-2.0"
] | 2 | 2018-06-24T17:40:31.000Z | 2020-07-30T19:19:55.000Z | from collections import defaultdict, Counter
import os
import gzip
import json
import pickle
from json.decoder import JSONDecodeError
import logging
from typing import Dict
import pdb
from event import util
from event.arguments.prepare.slot_processor import get_simple_dep, is_propbank_dep
logger = logging.getLogger(_... | 31.598958 | 86 | 0.538652 | 13,005 | 0.714521 | 0 | 0 | 1,894 | 0.10406 | 0 | 0 | 3,743 | 0.205648 |
9c4f8c513227a59417c089b50d394e43f128a12b | 478 | py | Python | 20.py | dexinl/kids_math | 48f6c37e221bbd2484ad19861c61e5ed7d3aa09e | [
"Apache-2.0"
] | null | null | null | 20.py | dexinl/kids_math | 48f6c37e221bbd2484ad19861c61e5ed7d3aa09e | [
"Apache-2.0"
] | null | null | null | 20.py | dexinl/kids_math | 48f6c37e221bbd2484ad19861c61e5ed7d3aa09e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import random
count = 20
test_set = []
while count:
a = random.randrange(3,20)
b = random.randrange(3,20)
if a > b and a - b > 1:
if (b, a-b) not in test_set:
test_set.append((b, a-b))
count -= 1
elif b > a and b - a > 1:
if (a, b-a) not in te... | 19.12 | 37 | 0.479079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.073222 |
9c51e7ffa104c06ed45deeaa7e32faf7f56f41a1 | 4,570 | py | Python | autovirt/equipment/domain/equipment.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | autovirt/equipment/domain/equipment.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | autovirt/equipment/domain/equipment.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | from enum import Enum
from functools import reduce
from math import ceil
from typing import Optional, Tuple
from autovirt import utils
from autovirt.exception import AutovirtError
from autovirt.structs import UnitEquipment, RepairOffer
logger = utils.get_logger()
# maximum allowed equipment price
PRICE_MAX = 100000
... | 34.104478 | 92 | 0.679212 | 84 | 0.018381 | 0 | 0 | 0 | 0 | 0 | 0 | 769 | 0.168271 |
9c520307c63d7fc118bc65c38c0ef12159f02949 | 594 | py | Python | day09/part2.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | day09/part2.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | day09/part2.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
with open("input.txt") as f:
content = f.read().strip()
def ulen(content):
ans = 0
i = 0
while i < len(content):
if content[i] == "(":
end = content[i:].find(")") + i
instr = content[i+1:end]
chars, times = map(int, content... | 21.214286 | 64 | 0.481481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.070707 |
9c520e00d9b073d8aaafcc2b263b654b36c5fc45 | 17,397 | py | Python | cirq-core/cirq/contrib/quimb/mps_simulator_test.py | Nexuscompute/Cirq | 640ef8f82d6a56ec95361388ce7976e096cca906 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/contrib/quimb/mps_simulator_test.py | Nexuscompute/Cirq | 640ef8f82d6a56ec95361388ce7976e096cca906 | [
"Apache-2.0"
] | 4 | 2022-01-16T14:12:15.000Z | 2022-02-24T03:58:46.000Z | cirq-core/cirq/contrib/quimb/mps_simulator_test.py | Nexuscompute/Cirq | 640ef8f82d6a56ec95361388ce7976e096cca906 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=wrong-or-nonexistent-copyright-notice
import itertools
import math
import numpy as np
import pytest
import sympy
import cirq
import cirq.contrib.quimb as ccq
import cirq.testing
from cirq import value
def assert_same_output_as_dense(circuit, qubit_order, initial_state=0, grouping=None):
mps_si... | 34.724551 | 100 | 0.647755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 765 | 0.043973 |
9c5339840ef805187717d24fa9d11f6cf4589f50 | 6,574 | py | Python | e2e_tests/tests/config.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | e2e_tests/tests/config.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | e2e_tests/tests/config.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
from typing import Any, Dict
from determined.common import util
MASTER_SCHEME = "http"
MASTER_IP = "localhost"
MASTER_PORT = "8080"
DET_VERSION = None
DEFAULT_MAX_WAIT_SECS = 1800
MAX_TASK_SCHEDULED_SECS = 30
MAX_TRIAL_BUILD_SECS = 90
DEFAULT_TF1_CPU_IMAGE = "determinedai/environm... | 32.068293 | 100 | 0.702616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,354 | 0.205963 |
9c53aaaab36a01f9660d76573d43ecd12a07d0cb | 7,340 | py | Python | src/greenbudget/app/subaccount/serializers.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | src/greenbudget/app/subaccount/serializers.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | src/greenbudget/app/subaccount/serializers.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | from django.contrib.contenttypes.models import ContentType
from rest_framework import serializers, exceptions
from greenbudget.lib.rest_framework_utils.fields import ModelChoiceField
from greenbudget.lib.rest_framework_utils.serializers import (
EnhancedModelSerializer)
from greenbudget.app.budget.models import B... | 35.631068 | 80 | 0.674523 | 5,954 | 0.811172 | 0 | 0 | 0 | 0 | 0 | 0 | 673 | 0.091689 |
9c554c033e4e1ae5351bb05f507b9e976ca41041 | 13,152 | py | Python | modules/dbnd/src/dbnd/_core/tracking/managers/callable_tracking.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | modules/dbnd/src/dbnd/_core/tracking/managers/callable_tracking.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | modules/dbnd/src/dbnd/_core/tracking/managers/callable_tracking.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import contextlib
import logging
import typing
from typing import Any, Dict, Tuple
import attr
from dbnd._core.configuration import get_dbnd_project_config
from dbnd._core.constants import (
RESULT_PARAM,
DbndTargetOperationStatus,
DbndTargetOperationType,
TaskRunState,
)
from dbnd._core.current impo... | 38.568915 | 113 | 0.633744 | 6,919 | 0.52608 | 5,213 | 0.396366 | 5,725 | 0.435295 | 0 | 0 | 2,972 | 0.225973 |
9c56d5b6165d77a3d76bfb27f03c0f747558ff24 | 5,534 | py | Python | api.py | Benardi/redis-basics | 614a15afe47780886bb6088f4ae45c6a7cbc6e22 | [
"MIT"
] | null | null | null | api.py | Benardi/redis-basics | 614a15afe47780886bb6088f4ae45c6a7cbc6e22 | [
"MIT"
] | null | null | null | api.py | Benardi/redis-basics | 614a15afe47780886bb6088f4ae45c6a7cbc6e22 | [
"MIT"
] | null | null | null | import os
import logging
from json import loads, dumps
from datetime import timedelta
from argparse import ArgumentParser
from redis import Redis
from flask import Response, Flask, request
app = Flask(__name__)
log = logging.getLogger(__name__)
parser = ArgumentParser()
parser.add_argument("-a", "--address",
... | 30.744444 | 85 | 0.632815 | 0 | 0 | 0 | 0 | 3,647 | 0.659017 | 0 | 0 | 961 | 0.173654 |
9c5842107ba44f69dd4be13f1db7dd944439eb70 | 6,071 | py | Python | zhihu_spider/ZhihuSpider/spiders/zhihu.py | Ki-Seki/gadgets | 6e031e1f6536a15b48e3beb80ba8bf31d2a3db7a | [
"MIT"
] | 1 | 2022-02-24T12:48:47.000Z | 2022-02-24T12:48:47.000Z | zhihu_spider/ZhihuSpider/spiders/zhihu.py | Ki-Seki/gadgets | 6e031e1f6536a15b48e3beb80ba8bf31d2a3db7a | [
"MIT"
] | null | null | null | zhihu_spider/ZhihuSpider/spiders/zhihu.py | Ki-Seki/gadgets | 6e031e1f6536a15b48e3beb80ba8bf31d2a3db7a | [
"MIT"
] | 1 | 2022-02-24T12:51:20.000Z | 2022-02-24T12:51:20.000Z | """
启动此 spider 前需要手动启动 Chrome,cmd 命令如下:
cd 进入 Chrome 可执行文件 所在的目录
执行:chrome.exe --remote-debugging-port=9222
此时在浏览器窗口地址栏访问:http://127.0.0.1:9222/json,如果页面出现 json 数据,则表明手动启动成功
启动此 spider 后,注意与命令行交互!
在 settings 当中要做的:
# ROBOTSTXT_OBEY = False # 如果不关闭,parse 方法无法执行
# COOKIES_ENABLED = True # 以便 Request 值在传递时自动传递 cookies... | 46.7 | 813 | 0.680119 | 5,776 | 0.863249 | 4,457 | 0.666119 | 0 | 0 | 0 | 0 | 3,759 | 0.561799 |
9c5b28789209abf7074e8e365fb1d2e93079992e | 2,109 | py | Python | tests/test_bindiff.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 6,132 | 2015-08-06T23:24:47.000Z | 2022-03-31T21:49:34.000Z | tests/test_bindiff.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 2,272 | 2015-08-10T08:40:07.000Z | 2022-03-31T23:46:44.000Z | tests/test_bindiff.py | Kyle-Kyle/angr | 345b2131a7a67e3a6ffc7d9fd475146a3e12f837 | [
"BSD-2-Clause"
] | 1,155 | 2015-08-06T23:37:39.000Z | 2022-03-31T05:54:11.000Z | import nose
import angr
import logging
l = logging.getLogger("angr.tests.test_bindiff")
import os
test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests')
# todo make a better test
def test_bindiff_x86_64():
binary_path_1 = os.path.join(test_location, 'x86_64', '... | 39.055556 | 106 | 0.719772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.160266 |
9c5b6f7b1147d0bfa29ae31ca75143f0f85b1910 | 523 | py | Python | main/handle_file.py | nucluster/us_states | 26cca38990b9afb6a2b8cc4d1365409428793c6d | [
"MIT"
] | null | null | null | main/handle_file.py | nucluster/us_states | 26cca38990b9afb6a2b8cc4d1365409428793c6d | [
"MIT"
] | null | null | null | main/handle_file.py | nucluster/us_states | 26cca38990b9afb6a2b8cc4d1365409428793c6d | [
"MIT"
] | null | null | null | from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
# def handle_uploaded_file(f):
# with open('screenshot.png', 'wb') as destination:
# # for chunk in f.chunks():
# # destination.write(chunk)
# destination.write(f)
with open(
BASE_DIR/'media'/'Greater_coat... | 21.791667 | 74 | 0.659656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.634799 |
9c5ca9cec48517b47b0e018883a0875e922d1924 | 4,921 | py | Python | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python3
#
# Copyright 2018 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 ... | 27.960227 | 104 | 0.710018 | 0 | 0 | 0 | 0 | 1,501 | 0.305019 | 2,908 | 0.590937 | 1,243 | 0.252591 |
9c5de31d5758cb655e6faea3c4a14331feb71111 | 4,960 | py | Python | examples/multi_physics/piezo_elasticity.py | BubuLK/sfepy | 3e8e2082c26d574dc334fe3a0e0eeb723f7a6657 | [
"BSD-3-Clause"
] | null | null | null | examples/multi_physics/piezo_elasticity.py | BubuLK/sfepy | 3e8e2082c26d574dc334fe3a0e0eeb723f7a6657 | [
"BSD-3-Clause"
] | null | null | null | examples/multi_physics/piezo_elasticity.py | BubuLK/sfepy | 3e8e2082c26d574dc334fe3a0e0eeb723f7a6657 | [
"BSD-3-Clause"
] | null | null | null | r"""
Piezo-elasticity problem - linear elastic material with piezoelectric
effects.
Find :math:`\ul{u}`, :math:`\phi` such that:
.. math::
- \omega^2 \int_{Y} \rho\ \ul{v} \cdot \ul{u}
+ \int_{Y} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{Y_2} g_{kij}\ e_{ij}(\ul{v}) \nabla_k \phi
= 0
\;, \qu... | 29.349112 | 78 | 0.563105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,422 | 0.488306 |
9c5f1cf8cb3617f22a594d7ff47f26bbe868fb45 | 326 | py | Python | 01-logica-de-programacao-e-algoritmos/Aula 06/01 Tuplas/1.2 Desempacotamento de parametros em funcoes/ex01.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | 01-logica-de-programacao-e-algoritmos/Aula 06/01 Tuplas/1.2 Desempacotamento de parametros em funcoes/ex01.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | 01-logica-de-programacao-e-algoritmos/Aula 06/01 Tuplas/1.2 Desempacotamento de parametros em funcoes/ex01.py | rafaelbarretomg/Uninter | 1f84b0103263177122663e991db3a8aeb106a959 | [
"MIT"
] | null | null | null | # Desempacotamento de parametros em funcoes
# somando valores de uma tupla
def soma(*num):
soma = 0
print('Tupla: {}' .format(num))
for i in num:
soma += i
return soma
# Programa principal
print('Resultado: {}\n' .format(soma(1, 2)))
print('Resultado: {}\n' .format(soma(1, 2, 3, 4, 5, 6, 7, 8,... | 23.285714 | 65 | 0.604294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.423313 |
9c60736edd01d240f5a84615880cdfb0c36592cb | 2,876 | py | Python | services/model.py | theallknowng/eKheti | 85e74f26bde7454293617ba727002c5c81402140 | [
"MIT"
] | 1 | 2020-04-14T20:29:09.000Z | 2020-04-14T20:29:09.000Z | services/model.py | theallknowng/eKheti | 85e74f26bde7454293617ba727002c5c81402140 | [
"MIT"
] | 5 | 2020-09-26T01:11:17.000Z | 2022-02-10T02:01:36.000Z | services/model.py | theallknowng/eKheti | 85e74f26bde7454293617ba727002c5c81402140 | [
"MIT"
] | null | null | null | import pandas
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasClassifier
from keras.utils import np_utils
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
from sklearn.preprocessing import LabelEncoder
from skle... | 54.264151 | 594 | 0.719402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,919 | 0.667246 |
9c614378ccffafbcb6378e7da9d99a24c5b8ad0b | 1,848 | py | Python | tests/sentry/api/endpoints/test_project_details.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/endpoints/test_project_details.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/endpoints/test_project_details.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import reverse
from sentry.models import Project
from sentry.testutils import APITestCase
class ProjectDetailsTest(APITestCase):
def test_simple(self):
project = self.project # force creation
self.login_as(user=self.user)
url = reverse('sentry-api-0-project-d... | 33 | 88 | 0.65368 | 1,719 | 0.930195 | 0 | 0 | 0 | 0 | 0 | 0 | 258 | 0.13961 |
9c6258f2e73dfc4619740d301b9ae33bb12c5202 | 29,732 | py | Python | tests/test_table.py | databook1/python-pptx | 87ca6bf34f9ced17cc4f3c94cf141069429e7583 | [
"MIT"
] | null | null | null | tests/test_table.py | databook1/python-pptx | 87ca6bf34f9ced17cc4f3c94cf141069429e7583 | [
"MIT"
] | 12 | 2021-01-22T16:53:51.000Z | 2022-02-23T13:57:43.000Z | tests/test_table.py | databook1/python-pptx | 87ca6bf34f9ced17cc4f3c94cf141069429e7583 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""Unit-test suite for `pptx.table` module."""
import pytest
from pptx.dml.fill import FillFormat
from pptx.dml.border import BorderFormat
from pptx.enum.text import MSO_ANCHOR
from pptx.oxml.ns import qn
from pptx.oxml.table import CT_Table, CT_TableCell, TcRange
from pptx.shapes.graphfrm import G... | 35.995157 | 88 | 0.61227 | 29,053 | 0.976965 | 0 | 0 | 14,410 | 0.484565 | 0 | 0 | 4,929 | 0.165748 |
9c62aef1446638f9fa0188683ca923feaaa75706 | 408 | py | Python | imread/tests/test_bmp.py | luispedro/imread | 7960b744623fe03e6d968893a539bca969715860 | [
"MIT"
] | 51 | 2015-01-09T14:07:37.000Z | 2022-03-03T13:54:30.000Z | imread/tests/test_bmp.py | luispedro/imread | 7960b744623fe03e6d968893a539bca969715860 | [
"MIT"
] | 16 | 2015-08-09T13:40:44.000Z | 2020-04-14T10:01:41.000Z | imread/tests/test_bmp.py | luispedro/imread | 7960b744623fe03e6d968893a539bca969715860 | [
"MIT"
] | 15 | 2015-05-22T10:41:52.000Z | 2021-05-03T11:11:59.000Z | import numpy as np
from imread import imread
from . import file_path
def test_read():
im = imread(file_path('star1.bmp'))
assert np.any(im)
assert im.shape == (128, 128, 3)
def test_indexed():
im = imread(file_path('py-installer-indexed.bmp'))
assert np.any(im)
assert im.shape == (352, 162, 3)... | 24 | 54 | 0.622549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.090686 |
9c6344071efa98707250768a8a8a6346ceb89a33 | 6,612 | py | Python | bl60x_flash/main.py | v3l0c1r4pt0r/bl60x-flash | 065770004629c3e5bf98057677e7a6ca566e9c4a | [
"MIT"
] | null | null | null | bl60x_flash/main.py | v3l0c1r4pt0r/bl60x-flash | 065770004629c3e5bf98057677e7a6ca566e9c4a | [
"MIT"
] | null | null | null | bl60x_flash/main.py | v3l0c1r4pt0r/bl60x-flash | 065770004629c3e5bf98057677e7a6ca566e9c4a | [
"MIT"
] | null | null | null | from serial import Serial
from tqdm import tqdm
import binascii
import hashlib
import struct
import time
import sys
import os
def if_read(ser, data_len):
data = bytearray(0)
received = 0
while received < data_len:
tmp = ser.read(data_len - received)
if len(tmp) == 0:
... | 28.25641 | 86 | 0.613581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 727 | 0.109952 |
9c638d8e037fbbc9a02c2c027a243f97a22ca4ba | 19,638 | py | Python | lang/py/test/test_avro_builder.py | zerofox-oss/yelp-avro | 913f95a4c34386d0fe9aff843b1a8ea362a1a2c5 | [
"Apache-2.0"
] | null | null | null | lang/py/test/test_avro_builder.py | zerofox-oss/yelp-avro | 913f95a4c34386d0fe9aff843b1a8ea362a1a2c5 | [
"Apache-2.0"
] | 1 | 2021-08-02T17:22:28.000Z | 2021-08-02T17:22:28.000Z | lang/py/test/test_avro_builder.py | riskive/yelp-avro | 5a8835505d1f788585834b0a87940d30b76be3fb | [
"Apache-2.0"
] | 1 | 2020-05-06T22:01:07.000Z | 2020-05-06T22:01:07.000Z | # -*- coding: utf-8 -*-
import unittest
from avro import avro_builder
from avro import schema
class TestAvroSchemaBuilder(unittest.TestCase):
def setUp(self):
self.builder = avro_builder.AvroSchemaBuilder()
def tearDown(self):
del self.builder
@property
def name(self):
retu... | 33.626712 | 81 | 0.595936 | 19,491 | 0.992515 | 658 | 0.033506 | 1,245 | 0.063397 | 0 | 0 | 1,411 | 0.07185 |
9c63d06a1b4ade87729c096ceb91bf4dea5b367b | 467 | py | Python | monte_py/__init__.py | domluna/fun_with_ffi | 9fc197b11a3470395db517657d624f0a3aa06958 | [
"MIT"
] | 1 | 2018-07-16T22:10:58.000Z | 2018-07-16T22:10:58.000Z | monte_py/__init__.py | domluna/fun_with_ffi | 9fc197b11a3470395db517657d624f0a3aa06958 | [
"MIT"
] | null | null | null | monte_py/__init__.py | domluna/fun_with_ffi | 9fc197b11a3470395db517657d624f0a3aa06958 | [
"MIT"
] | null | null | null | import random
def estimate_pi(sims, needles):
trials = []
for _ in xrange(sims):
trials.append(simulate_pi(needles))
mean = sum(trials) / sims
return mean
# use a unit square
def simulate_pi(needles):
hits = 0 # how many hits we hit the circle
for _ in xrange(needles):
x = ran... | 23.35 | 46 | 0.573876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.111349 |
9c6424690b87c4502fb44bc4e25fa64fa727a995 | 36,577 | py | Python | tools/mpy_ld.py | UVA-DSI/circuitpython | 35ee4add63a604320d2fbd4e30baef2b5675f9a7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 1 | 2021-10-20T12:21:44.000Z | 2021-10-20T12:21:44.000Z | tools/mpy_ld.py | UVA-DSI/circuitpython | 35ee4add63a604320d2fbd4e30baef2b5675f9a7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | null | null | null | tools/mpy_ld.py | UVA-DSI/circuitpython | 35ee4add63a604320d2fbd4e30baef2b5675f9a7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# This file is part of the MicroPython project, http://micropython.org/
#
# The MIT License (MIT)
#
# Copyright (c) 2019 Damien P. George
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 33.618566 | 109 | 0.576893 | 3,841 | 0.105011 | 0 | 0 | 178 | 0.004866 | 0 | 0 | 8,139 | 0.222517 |
9c64d6e1ca9f65ffe83cf4a6cb96b5de160e7309 | 2,289 | py | Python | ui_mant_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui_mant_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui_mant_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | from PyQt4 import QtGui
from ui_mant_libros_new import NewLibrosWindow
from ui_mant_libros_edit import EditLibrosWindow
from ui_mant_libros_id_edit import GetIdEditWindow
# Debug only
import inspect
class MenuLibros(QtGui.QWidget):
"""
Ventana-menu para editar Libros
"""
def __init__(self):
... | 26.929412 | 69 | 0.671035 | 1,930 | 0.843163 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.134557 |
9c64e0be4c2600978945ef57f08d4ac03e9f96cf | 6,583 | py | Python | env/gym_poker_ai/envs/tests/holdem_calc/holdem_argparser.py | MrStonkus/PokerAi | 9c43c3a7a9c3ac01f4ee9e3f1f95f0786c35de99 | [
"MIT"
] | null | null | null | env/gym_poker_ai/envs/tests/holdem_calc/holdem_argparser.py | MrStonkus/PokerAi | 9c43c3a7a9c3ac01f4ee9e3f1f95f0786c35de99 | [
"MIT"
] | 1 | 2020-05-09T20:27:33.000Z | 2020-05-09T20:27:33.000Z | env/gym_poker_ai/envs/tests/holdem_calc/holdem_argparser.py | MrStonkus/PokerAi | 9c43c3a7a9c3ac01f4ee9e3f1f95f0786c35de99 | [
"MIT"
] | null | null | null | import argparse
import re
import holdem_calc.holdem_functions as holdem_functions
# Wrapper class which holds the arguments for library calls
# Mocks actual argparse object
class LibArgs:
def __init__(self, board, exact, num, input_file, hole_cards):
self.board = board
self.cards = hole_cards
... | 33.93299 | 78 | 0.628285 | 220 | 0.033419 | 0 | 0 | 0 | 0 | 0 | 0 | 2,191 | 0.332827 |
9c651d14eff8b0f1392964eb0805b7871c20c731 | 8,318 | py | Python | qbay/controllers.py | KarlDorogy/Cisc-327-Course-Project-Group-20 | 0e2c003f78bbdd932381a7a8cbc3aa757da18b24 | [
"MIT"
] | null | null | null | qbay/controllers.py | KarlDorogy/Cisc-327-Course-Project-Group-20 | 0e2c003f78bbdd932381a7a8cbc3aa757da18b24 | [
"MIT"
] | null | null | null | qbay/controllers.py | KarlDorogy/Cisc-327-Course-Project-Group-20 | 0e2c003f78bbdd932381a7a8cbc3aa757da18b24 | [
"MIT"
] | null | null | null | from flask import render_template, request, session, redirect
from qbay.models import *
from datetime import date
from qbay import app
def authenticate(inner_function):
"""
:param inner_function: any python function that accepts a user object
Wrap any python function and check the current session to see ... | 34.658333 | 76 | 0.648593 | 0 | 0 | 0 | 0 | 7,021 | 0.844073 | 0 | 0 | 3,360 | 0.403943 |
9c6678445c5b8ffd9879e0f6a21e874c128e214d | 6,998 | py | Python | gbfs/serializers.py | stadtulm/cykel | b292d958330279654c49beafc3f95a0067274472 | [
"MIT"
] | 80 | 2019-08-20T17:41:31.000Z | 2021-05-31T19:20:28.000Z | gbfs/serializers.py | transportkollektiv/cykel | b292d958330279654c49beafc3f95a0067274472 | [
"MIT"
] | 19 | 2019-08-24T15:17:33.000Z | 2021-09-22T17:58:03.000Z | gbfs/serializers.py | stadtulm/cykel | b292d958330279654c49beafc3f95a0067274472 | [
"MIT"
] | 12 | 2019-08-21T17:55:14.000Z | 2021-04-07T18:53:52.000Z | from datetime import timedelta
from django.utils.timezone import now
from preferences import preferences
from rest_framework import fields, serializers
from bikesharing.models import Bike, Station, VehicleType
from cykel.serializers import EnumFieldSerializer
class TimestampSerializer(fields.CharField):
def to_... | 36.447917 | 84 | 0.642612 | 6,718 | 0.959989 | 0 | 0 | 0 | 0 | 0 | 0 | 1,268 | 0.181195 |
9c672aa16a64502ad882d71db5ffef21757f9d6f | 1,095 | py | Python | anime_downloader/extractors/vidstream.py | ngomile/anime-downloader | 14d9cebe8aa4eb9d906b937d7c19fedfa737d184 | [
"Unlicense"
] | 2 | 2020-08-10T12:34:42.000Z | 2020-11-19T08:13:48.000Z | anime_downloader/extractors/vidstream.py | ngomile/anime-downloader | 14d9cebe8aa4eb9d906b937d7c19fedfa737d184 | [
"Unlicense"
] | null | null | null | anime_downloader/extractors/vidstream.py | ngomile/anime-downloader | 14d9cebe8aa4eb9d906b937d7c19fedfa737d184 | [
"Unlicense"
] | null | null | null | import logging
import re
from anime_downloader.extractors.base_extractor import BaseExtractor
from anime_downloader.sites import helpers
logger = logging.getLogger(__name__)
class VidStream(BaseExtractor):
def _get_data(self):
QUALITIES = {
"360":[],
"480":[],
"720":[],
"10... | 31.285714 | 160 | 0.552511 | 918 | 0.838356 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.181735 |
9c67ab6dcf7da8380a3c1b1759e1c7f496809cce | 2,799 | py | Python | gui/sum_v1/views.py | time-crunched/nlp-toolbox | b732abd0b2c6b265971efe04a4d70ebe20d2ee8f | [
"MIT"
] | null | null | null | gui/sum_v1/views.py | time-crunched/nlp-toolbox | b732abd0b2c6b265971efe04a4d70ebe20d2ee8f | [
"MIT"
] | 3 | 2020-06-05T18:58:57.000Z | 2021-06-10T20:50:13.000Z | gui/sum_v1/views.py | time-crunched/nlp-toolbox | b732abd0b2c6b265971efe04a4d70ebe20d2ee8f | [
"MIT"
] | 1 | 2019-12-01T16:56:41.000Z | 2019-12-01T16:56:41.000Z | import time
import os
from django.shortcuts import render, redirect
from django.http import JsonResponse
from django.views import View
from django.conf import settings
from .forms import File_uploadForm
from .models import File_upload, SummaryRes
from sim_v1.textsummary import TEXTSummary
summary_document_dir = os.... | 29.15625 | 133 | 0.679171 | 845 | 0.301894 | 0 | 0 | 0 | 0 | 0 | 0 | 469 | 0.16756 |
9c67af820f4a5f09ac6dce61683f07d3e73f1273 | 1,290 | py | Python | homeassistant/components/websocket_api/__init__.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 4 | 2019-01-10T14:47:54.000Z | 2021-04-22T02:06:27.000Z | homeassistant/components/websocket_api/__init__.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/websocket_api/__init__.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 1 | 2019-08-13T11:54:30.000Z | 2019-08-13T11:54:30.000Z | """
Websocket based API for Home Assistant.
For more details about this component, please refer to the documentation at
https://developers.home-assistant.io/docs/external_api_websocket.html
"""
from homeassistant.core import callback
from homeassistant.loader import bind_hass
from . import commands, connection, const... | 30 | 75 | 0.784496 | 0 | 0 | 0 | 0 | 266 | 0.206202 | 186 | 0.144186 | 377 | 0.292248 |
9c68432891ca359406f39890007723907fdc1968 | 4,181 | py | Python | test_app/settings.py | Lenders-Cooperative/Django-DocuSign | 676d966065f6e1e64e1f0db9b7691b9f0c5d73a5 | [
"BSD-3-Clause"
] | null | null | null | test_app/settings.py | Lenders-Cooperative/Django-DocuSign | 676d966065f6e1e64e1f0db9b7691b9f0c5d73a5 | [
"BSD-3-Clause"
] | null | null | null | test_app/settings.py | Lenders-Cooperative/Django-DocuSign | 676d966065f6e1e64e1f0db9b7691b9f0c5d73a5 | [
"BSD-3-Clause"
] | 2 | 2021-12-03T19:40:35.000Z | 2021-12-03T19:47:59.000Z | #
# Created on Tue Dec 21 2021
#
# Copyright (c) 2021 Lenders Cooperative, a division of Summit Technology Group, Inc.
#
"""
Django settings for test_app project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
... | 27.326797 | 91 | 0.708443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,903 | 0.694331 |
9c68e55390ec5a85f2cfdfcd46e61487ba6ce000 | 9,871 | py | Python | tests/unit/ppr/test_search_query.py | doug-lovett/test-schemas-dl | a05e87b983f2c3559c081dd65aff05e2c67e6186 | [
"Apache-2.0"
] | null | null | null | tests/unit/ppr/test_search_query.py | doug-lovett/test-schemas-dl | a05e87b983f2c3559c081dd65aff05e2c67e6186 | [
"Apache-2.0"
] | null | null | null | tests/unit/ppr/test_search_query.py | doug-lovett/test-schemas-dl | a05e87b983f2c3559c081dd65aff05e2c67e6186 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2020 Province of British Columbia
#
# 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 agr... | 28.042614 | 95 | 0.668524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,005 | 0.405693 |
9c69f20de39f2f2cbc5461ca8a9902a34b2bc1f3 | 165 | py | Python | devopsipy/decorators.py | kharnam/devopsipy | c3379b1dd5f66e71c826045afde1702030e495d4 | [
"MIT"
] | null | null | null | devopsipy/decorators.py | kharnam/devopsipy | c3379b1dd5f66e71c826045afde1702030e495d4 | [
"MIT"
] | 2 | 2018-10-31T01:43:42.000Z | 2018-10-31T02:05:55.000Z | devopsipy/decorators.py | kharnam/devopsipy | c3379b1dd5f66e71c826045afde1702030e495d4 | [
"MIT"
] | null | null | null | """
Module to contain Pywork decorators
"""
__author__ = 'sergey kharnam'
import re
import time
import itertools
import logging
log = logging.getLogger(__name__)
| 12.692308 | 35 | 0.769697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.357576 |
9c6a899bfa0fce8fa48384ca11c89371d3bdbbc4 | 10,449 | py | Python | tests/test_decorators.py | stephenfin/django-rest-framework | 9d001cd84c1239d708b1528587c183ef30e38c31 | [
"BSD-3-Clause"
] | 1 | 2019-01-11T13:56:41.000Z | 2019-01-11T13:56:41.000Z | tests/test_decorators.py | stephenfin/django-rest-framework | 9d001cd84c1239d708b1528587c183ef30e38c31 | [
"BSD-3-Clause"
] | null | null | null | tests/test_decorators.py | stephenfin/django-rest-framework | 9d001cd84c1239d708b1528587c183ef30e38c31 | [
"BSD-3-Clause"
] | 1 | 2019-06-29T12:46:16.000Z | 2019-06-29T12:46:16.000Z | from __future__ import unicode_literals
import pytest
from django.test import TestCase
from rest_framework import status
from rest_framework.authentication import BasicAuthentication
from rest_framework.decorators import (
action, api_view, authentication_classes, detail_route, list_route,
parser_classes, per... | 31.954128 | 92 | 0.624175 | 9,669 | 0.925352 | 0 | 0 | 2,797 | 0.267681 | 0 | 0 | 1,790 | 0.171308 |
9c6c043e7e279ee40586854016feb8a49ecc6e3c | 661 | py | Python | tamilmorse/morse_encode.py | CRE2525/open-tamil | ffc02509f7b8a6a17644c85799a475a8ba623954 | [
"MIT"
] | 1 | 2021-08-03T19:35:18.000Z | 2021-08-03T19:35:18.000Z | tamilmorse/morse_encode.py | CRE2525/open-tamil | ffc02509f7b8a6a17644c85799a475a8ba623954 | [
"MIT"
] | null | null | null | tamilmorse/morse_encode.py | CRE2525/open-tamil | ffc02509f7b8a6a17644c85799a475a8ba623954 | [
"MIT"
] | null | null | null | ## -*- coding: utf-8 -*-
#(C) 2018 Muthiah Annamalai
# This file is part of Open-Tamil project
# You may use or distribute this file under terms of MIT license
import codecs
import json
import tamil
import sys
import os
#e.g. python morse_encode.py கலைஞர்
CURRDIR = os.path.dirname(os.path.realpath(__file__))
def enco... | 30.045455 | 95 | 0.688351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.401189 |
9c6c3991eeee7dfdd77baaa787b34e6799b4425e | 1,355 | py | Python | Leetcode/Python/_1721.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | Leetcode/Python/_1721.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | Leetcode/Python/_1721.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def swapNodes(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:
temp = head
array = []
while temp:
a... | 27.653061 | 81 | 0.500369 | 1,020 | 0.752768 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.215498 |
9c6d0e66968fb03790c987f71d690038a6f4abfa | 3,029 | py | Python | contrib/functional_tests/functional/test_reorg.py | electrumsv/electrumsv | a2d9027ccec338cadfca778888e6ef7f077b1651 | [
"MIT"
] | 136 | 2019-01-10T15:49:09.000Z | 2022-02-20T04:46:39.000Z | contrib/functional_tests/functional/test_reorg.py | electrumsv/electrumsv | a2d9027ccec338cadfca778888e6ef7f077b1651 | [
"MIT"
] | 790 | 2019-01-07T01:53:35.000Z | 2022-03-30T23:04:28.000Z | contrib/functional_tests/functional/test_reorg.py | electrumsv/electrumsv | a2d9027ccec338cadfca778888e6ef7f077b1651 | [
"MIT"
] | 65 | 2019-01-10T23:55:30.000Z | 2021-12-19T06:47:13.000Z | """
Warning - this will reset all components back to a blank state before running the simulation
Runs node1, electrumx1 and electrumsv1 and loads the default wallet on the daemon (so that newly
submitted blocks will be synchronized by ElectrumSV
reorged txid: 'a1fa9460ca105c1396cd338f7fa202bf79a9d244d730e91e19f6302a0... | 35.22093 | 96 | 0.678772 | 1,834 | 0.60548 | 0 | 0 | 1,800 | 0.594256 | 2,016 | 0.665566 | 983 | 0.32453 |
9c6e78ca230293ad0a6075105e0e0da44e90fcbd | 25,892 | py | Python | Pyrado/pyrado/environments/mujoco/wam_bic.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/environments/mujoco/wam_bic.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/environments/mujoco/wam_bic.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 1 | 2020-11-24T15:25:26.000Z | 2020-11-24T15:25:26.000Z | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# 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 ... | 49.037879 | 120 | 0.632551 | 22,799 | 0.880542 | 0 | 0 | 4,623 | 0.178549 | 0 | 0 | 10,723 | 0.414143 |
9c6edb66b25f5b7d6f691984d70d7a69bf328bdb | 469 | py | Python | pyRasp.py | ToninoTarsi/pyRasp | a46bb1dc38c7547b60e24189ecf34310da770042 | [
"MIT"
] | null | null | null | pyRasp.py | ToninoTarsi/pyRasp | a46bb1dc38c7547b60e24189ecf34310da770042 | [
"MIT"
] | null | null | null | pyRasp.py | ToninoTarsi/pyRasp | a46bb1dc38c7547b60e24189ecf34310da770042 | [
"MIT"
] | null | null | null | # pyRasp
# Copyright (c) Tonino Tarsi 2020. Licensed under MIT.
# requirement :
# Python 3
# pip install pyyaml
# pip install request
# pip install f90nml
from downloadGFSA import downloadGFSA
from prepare_wps import prepare_wps
from ungrib import ungrib
from metgrid import metgrid
from prepare_wrf import prepare_w... | 16.75 | 54 | 0.784648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.319829 |
9c6f5eebc67f2c098afe70ef549d9f14b27bc659 | 1,572 | py | Python | app/strategies/ema_bb_alligator_strategy.py | namuan/crypto-rider | f5b47ada60a7cef07e66609e2e92993619c6bfbe | [
"MIT"
] | 1 | 2022-01-18T19:06:20.000Z | 2022-01-18T19:06:20.000Z | app/strategies/ema_bb_alligator_strategy.py | namuan/crypto-rider | f5b47ada60a7cef07e66609e2e92993619c6bfbe | [
"MIT"
] | null | null | null | app/strategies/ema_bb_alligator_strategy.py | namuan/crypto-rider | f5b47ada60a7cef07e66609e2e92993619c6bfbe | [
"MIT"
] | null | null | null | import pandas as pd
import ta
from app.common import reshape_data
from app.strategies.base_strategy import BaseStrategy
pd.set_option("display.max_columns", None)
pd.set_option("display.width", None)
class EMABBAlligatorStrategy(BaseStrategy):
BUY_SIGNAL = "buy_signal"
SELL_SIGNAL = "sell_signal"
def c... | 29.111111 | 83 | 0.564885 | 1,367 | 0.869593 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.14313 |
9c6f86bf35dea92442e86d8e34f3dfcb1923875e | 1,336 | py | Python | BasicScripts/basics.py | TomasBelskis/PythonAutomation | dd2e30abb214e37d84a8952deb834074abdc84a2 | [
"MIT"
] | null | null | null | BasicScripts/basics.py | TomasBelskis/PythonAutomation | dd2e30abb214e37d84a8952deb834074abdc84a2 | [
"MIT"
] | null | null | null | BasicScripts/basics.py | TomasBelskis/PythonAutomation | dd2e30abb214e37d84a8952deb834074abdc84a2 | [
"MIT"
] | null | null | null | # Python Basics
# String concatenaton
added_strings = str(32) + "_342"
# Getting input
input_from_user = input()
# Basic print function
print(input_from_user)
# Mixing boolean and comparison operations
if (4 < 5) and (5 < 6):
print("True")
# Basic if & if else flow
if name == 'Alice':
print('Hi, Alice.')... | 19.940299 | 66 | 0.624251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 601 | 0.44985 |
9c6fcb64c497c5bc80d5ed65052770cfc9db0316 | 156 | py | Python | env.example.py | wilcoln/klazor | 8f3c40a03a7e61c07eceb6cdbe4d1bb05693727e | [
"MIT"
] | 8 | 2020-01-18T09:33:51.000Z | 2020-01-19T10:47:51.000Z | env.example.py | wilcoln/klazor | 8f3c40a03a7e61c07eceb6cdbe4d1bb05693727e | [
"MIT"
] | 8 | 2019-08-09T03:54:44.000Z | 2022-02-12T16:55:51.000Z | env.example.py | wilcoln/klazor | 8f3c40a03a7e61c07eceb6cdbe4d1bb05693727e | [
"MIT"
] | null | null | null | DATABASE_OPTIONS = {
'database': 'klazor',
'user': 'root',
'password': '',
'charset': 'utf8mb4',
}
HOSTS = ['127.0.0.1', '67.209.115.211']
| 17.333333 | 39 | 0.525641 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.557692 |
9c70026f65fce93a4cf97730e00fb2afc1c7f5b5 | 818 | py | Python | misc/_local_settings.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | 4 | 2018-08-06T19:18:03.000Z | 2019-09-26T14:52:01.000Z | misc/_local_settings.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | 2 | 2018-08-06T19:17:57.000Z | 2020-02-12T22:59:40.000Z | misc/_local_settings.py | lzantal/djskell | cef71bab8a4dd163b632128666c315e228cc8f0f | [
"MIT"
] | null | null | null | """
Django settings.
Generated by 'django-admin startproject' using Django 2.2.4.
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/
"""
#DEBUG = False
DEBUG = True
SERV... | 24.058824 | 64 | 0.640587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 629 | 0.768949 |
9c70e9c29dfd2bb44316e8313ac9366ffff8c24e | 204 | py | Python | contacts/forms.py | pedrohd21/Agenda-Django | c48a90d76094523fd2060ff735faefbf3c2f808d | [
"MIT"
] | 1 | 2021-04-21T00:07:03.000Z | 2021-04-21T00:07:03.000Z | contacts/forms.py | pedrohd21/Agenda | c48a90d76094523fd2060ff735faefbf3c2f808d | [
"MIT"
] | null | null | null | contacts/forms.py | pedrohd21/Agenda | c48a90d76094523fd2060ff735faefbf3c2f808d | [
"MIT"
] | null | null | null | from django import forms
from .models import Contact
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = ('name', 'number', 'email', 'category', 'description')
| 20.4 | 71 | 0.661765 | 147 | 0.720588 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.215686 |
9c723e762bff7b4ab80b6f5113e4e550464fb8ae | 1,276 | py | Python | awx/api/urls/ad_hoc_command.py | ziegenberg/awx | a3e29317c5d4220fffe28370ec73c73802255246 | [
"Apache-2.0"
] | null | null | null | awx/api/urls/ad_hoc_command.py | ziegenberg/awx | a3e29317c5d4220fffe28370ec73c73802255246 | [
"Apache-2.0"
] | 2 | 2022-02-10T11:57:21.000Z | 2022-02-27T22:43:44.000Z | awx/api/urls/ad_hoc_command.py | ziegenberg/awx | a3e29317c5d4220fffe28370ec73c73802255246 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
from django.urls import re_path
from awx.api.views import (
AdHocCommandList,
AdHocCommandDetail,
AdHocCommandCancel,
AdHocCommandRelaunch,
AdHocCommandAdHocCommandEventsList,
AdHocCommandActivityStreamList,
AdHocCommandNotification... | 42.533333 | 137 | 0.724922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.389498 |
9c73c8f40881c066eecdb84a89d42263b576a7ce | 110 | py | Python | note5/package_test5.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | note5/package_test5.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | note5/package_test5.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | #test.py
from time_tools import *
# print(compareTimestamp(111,222))
time.showNowTime()
# now time is XX:XX:XX | 22 | 34 | 0.754545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.581818 |
9c7497307c0cb4f07fda11674de8080bc75940ac | 3,265 | py | Python | fgarcade/sprites.py | fabiommendes/fgarcade | 2bfdb3ca18cb8260048ccfc9e84524987c322221 | [
"MIT"
] | 2 | 2019-04-20T00:07:16.000Z | 2019-04-24T01:25:38.000Z | fgarcade/sprites.py | fabiommendes/fgarcade | 2bfdb3ca18cb8260048ccfc9e84524987c322221 | [
"MIT"
] | null | null | null | fgarcade/sprites.py | fabiommendes/fgarcade | 2bfdb3ca18cb8260048ccfc9e84524987c322221 | [
"MIT"
] | 7 | 2019-06-18T17:59:41.000Z | 2019-07-02T21:37:21.000Z | import arcade
from arcade import FACE_RIGHT, FACE_DOWN, FACE_UP, FACE_LEFT
class AnimatedWalkingSprite(arcade.Sprite):
def __init__(self, scale: float = 1,
image_x: float = 0, image_y: float = 0,
center_x: float = 0, center_y: float = 0, *,
stand_left, stand_righ... | 40.8125 | 79 | 0.618989 | 3,188 | 0.976417 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.01317 |
9c76b7443d1cefb8613a32ec558f3e2d259300ab | 2,089 | py | Python | src/mafUtility.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | 1 | 2021-12-08T19:21:07.000Z | 2021-12-08T19:21:07.000Z | src/mafUtility.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | null | null | null | src/mafUtility.py | gh-schen/SiriusEpiClassifier | 617e0243a95fe1014acfeca25ff6f6ba617d366f | [
"Apache-2.0"
] | null | null | null | from numpy.core.fromnumeric import transpose
from sklearn import linear_model
from scipy.special import logit
from scipy import stats
from copy import deepcopy
from numpy import random, concatenate, quantile, matmul, transpose
import logging
class singleRegModel():
"""
data struct for running a single regress... | 31.179104 | 87 | 0.650551 | 1,838 | 0.879847 | 0 | 0 | 0 | 0 | 0 | 0 | 404 | 0.193394 |
9c77b39243b7ae9ea7813df0033b58ce3c06fb82 | 4,553 | py | Python | examples/linreg.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 12 | 2019-09-21T13:52:09.000Z | 2022-02-14T06:48:46.000Z | examples/linreg.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 1 | 2020-01-22T12:34:52.000Z | 2020-01-26T21:14:11.000Z | examples/linreg.py | hanyas/sds | 3c195fb9cbd88a9284287d62c0eacb6afc4598a7 | [
"MIT"
] | 5 | 2019-09-18T15:11:26.000Z | 2021-12-10T14:04:53.000Z | import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from sklearn.linear_model import ARDRegression, LinearRegression
# Parameters of the example
np.random.seed(0)
n_samples, n_features = 100, 100
# Create Gaussian data
X = np.random.randn(n_samples, n_features)
# Create weights with a precision... | 39.591304 | 100 | 0.691852 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 580 | 0.127389 |
9c77f77e66dc427bbe7624fc776b41c3d875169f | 7,516 | py | Python | optimal/tompkins/examples/dask_scheduling_problem_nonetcontention.py | KarizCache/serverless | c5735afee29e104f3909f3b0140e993d461a5420 | [
"MIT"
] | null | null | null | optimal/tompkins/examples/dask_scheduling_problem_nonetcontention.py | KarizCache/serverless | c5735afee29e104f3909f3b0140e993d461a5420 | [
"MIT"
] | null | null | null | optimal/tompkins/examples/dask_scheduling_problem_nonetcontention.py | KarizCache/serverless | c5735afee29e104f3909f3b0140e993d461a5420 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
import json
import re
import ast
import json
from graphviz import Digraph
import pandas as pd
# color the graph
import graph_tool.all as gt
import copy
import matplotlib.colors as mcolors
import sys
import utils
from tompkins.ilp import schedule, jobs_when_where
from collections import d... | 32.678261 | 125 | 0.548696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,135 | 0.284061 |
9c78abbbec293aaefd5d026abd3db6d7960279d4 | 8,563 | py | Python | tests/apitests/python/test_robot_account.py | gerhardgossen/harbor | 1d03b8727acb9a3935bf45cd76b61f87c68e2a08 | [
"Apache-2.0"
] | 1 | 2020-07-31T15:00:54.000Z | 2020-07-31T15:00:54.000Z | tests/apitests/python/test_robot_account.py | gerhardgossen/harbor | 1d03b8727acb9a3935bf45cd76b61f87c68e2a08 | [
"Apache-2.0"
] | 10 | 2021-05-31T00:06:59.000Z | 2022-02-11T12:34:16.000Z | tests/apitests/python/test_robot_account.py | gerhardgossen/harbor | 1d03b8727acb9a3935bf45cd76b61f87c68e2a08 | [
"Apache-2.0"
] | 1 | 2020-07-12T16:51:07.000Z | 2020-07-12T16:51:07.000Z | from __future__ import absolute_import
import unittest
from testutils import ADMIN_CLIENT
from testutils import TEARDOWN
from library.user import User
from library.project import Project
from library.repository import Repository
from library.repository import pull_harbor_image
from library.repository import push_imag... | 64.871212 | 215 | 0.73911 | 8,100 | 0.94593 | 0 | 0 | 1,346 | 0.157188 | 0 | 0 | 3,089 | 0.360738 |
9c79f89ccfffa309abd3d78c50d5bebd47df7780 | 3,675 | py | Python | slackchannel2pdf/locales.py | ErikKalkoken/slackchannel2pdf | 2848dfaaffbf9a5255c6dbe87dcc1e90d062b820 | [
"MIT"
] | 52 | 2019-08-05T21:58:53.000Z | 2022-03-21T22:36:22.000Z | slackchannel2pdf/locales.py | ErikKalkoken/slackchannel2pdf | 2848dfaaffbf9a5255c6dbe87dcc1e90d062b820 | [
"MIT"
] | 10 | 2020-04-11T21:30:53.000Z | 2022-03-12T07:14:06.000Z | slackchannel2pdf/locales.py | ErikKalkoken/slackchannel2pdf | 2848dfaaffbf9a5255c6dbe87dcc1e90d062b820 | [
"MIT"
] | 10 | 2020-01-30T07:52:09.000Z | 2022-02-03T03:44:41.000Z | import datetime as dt
import logging
from babel import Locale, UnknownLocaleError
from babel.dates import format_datetime, format_time, format_date
import pytz
from tzlocal import get_localzone
from . import settings
logger = logging.getLogger(__name__)
class LocaleHelper:
"""Helpers for converting date & tim... | 36.386139 | 88 | 0.633741 | 3,414 | 0.92898 | 0 | 0 | 1,587 | 0.431837 | 0 | 0 | 777 | 0.211429 |
9c7a5adb483cec8b62999237b4fa84739552c994 | 2,414 | py | Python | databoard/databoard/default_config.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | databoard/databoard/default_config.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | databoard/databoard/default_config.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | import os
class Config(object):
# FLASK GENERAL CONFIG PARAMETERS
SECRET_KEY = os.getenv('DATABOARD_SECRET_KEY', 'abcdefghijkl')
# abs max upload file size, to throw 413, before saving it
WTF_CSRF_ENABLED = True
LOG_FILENAME = None # if None, output to screen
MAX_CONTENT_LENGTH = 1024 * 1024 ... | 30.948718 | 70 | 0.681856 | 2,317 | 0.959818 | 0 | 0 | 0 | 0 | 0 | 0 | 993 | 0.41135 |
9c7c266f5c66aa6fb93fbd1ac553f14737d31adf | 1,193 | py | Python | python_developer_tools/cv/bases/pool/AvgPool2d.py | carlsummer/python_developer_tools | a8c4365b7cc601cda55648cdfd8c0cb1faae132f | [
"Apache-2.0"
] | 32 | 2021-06-21T04:49:48.000Z | 2022-03-29T05:46:59.000Z | python_developer_tools/cv/bases/pool/AvgPool2d.py | carlsummer/python_developer_tools | a8c4365b7cc601cda55648cdfd8c0cb1faae132f | [
"Apache-2.0"
] | 1 | 2021-11-12T03:45:55.000Z | 2021-11-12T03:45:55.000Z | python_developer_tools/cv/bases/pool/AvgPool2d.py | carlsummer/python_developer_tools | a8c4365b7cc601cda55648cdfd8c0cb1faae132f | [
"Apache-2.0"
] | 10 | 2021-06-03T08:05:05.000Z | 2021-12-13T03:10:42.000Z | # !/usr/bin/env python
# -- coding: utf-8 --
# @Author zengxiaohui
# Datatime:8/31/2021 1:37 PM
# @File:GlobalAvgPool2d
import torch.nn as nn
from python_developer_tools.cv.bases.activates.swish import h_swish
class GlobalAvgPool2d(nn.Module):
""" Fast implementation of global average pooling from
TResNe... | 31.394737 | 93 | 0.619447 | 978 | 0.819782 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.312657 |
9c7c4de6be5e48f9c89afdf0a57351e2ebf01e66 | 28,531 | py | Python | expyfun/_utils.py | nordme/expyfun | e644bba8cbfb6edd2a076099536417d4854d64af | [
"BSD-3-Clause"
] | 2 | 2015-12-31T07:56:16.000Z | 2016-08-22T17:23:02.000Z | expyfun/_utils.py | nordme/expyfun | e644bba8cbfb6edd2a076099536417d4854d64af | [
"BSD-3-Clause"
] | 6 | 2015-02-18T04:25:46.000Z | 2017-01-25T01:00:35.000Z | expyfun/_utils.py | nordme/expyfun | e644bba8cbfb6edd2a076099536417d4854d64af | [
"BSD-3-Clause"
] | 1 | 2015-12-31T07:56:20.000Z | 2015-12-31T07:56:20.000Z | """Some utility functions"""
# Authors: Eric Larson <[email protected]>
#
# License: BSD (3-clause)
import warnings
import operator
from copy import deepcopy
import subprocess
import importlib
import os
import os.path as op
import inspect
import sys
import tempfile
import ssl
from shutil import rmtree
import atexit
imp... | 31.45645 | 79 | 0.598156 | 4,016 | 0.140759 | 0 | 0 | 1,148 | 0.040237 | 0 | 0 | 12,177 | 0.426799 |
9c7c6f724eb34b62e9ef21f46c99bd86675f4bf5 | 295 | py | Python | mixin.py | delimatorres/foodbasket | 2f043d713337581be2165259cdbba4e4a24b656b | [
"Apache-2.0"
] | null | null | null | mixin.py | delimatorres/foodbasket | 2f043d713337581be2165259cdbba4e4a24b656b | [
"Apache-2.0"
] | null | null | null | mixin.py | delimatorres/foodbasket | 2f043d713337581be2165259cdbba4e4a24b656b | [
"Apache-2.0"
] | null | null | null | import signal
class KillableProcess(object):
def __init__(self):
self.interrupt = False
signal.signal(signal.SIGTERM, self._signal_handler)
signal.signal(signal.SIGINT, self._signal_handler)
def _signal_handler(self, sign, frame):
self.interrupt = True | 26.818182 | 59 | 0.698305 | 279 | 0.945763 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c7c76de33634fbc8775661a36b44e7120b4b1f1 | 68 | py | Python | test5.py | liubaishuo-github/peening-post-processor | 61f4c2d2385469bc1e9d1b7a692b72eb6afd7f75 | [
"MIT"
] | null | null | null | test5.py | liubaishuo-github/peening-post-processor | 61f4c2d2385469bc1e9d1b7a692b72eb6afd7f75 | [
"MIT"
] | null | null | null | test5.py | liubaishuo-github/peening-post-processor | 61f4c2d2385469bc1e9d1b7a692b72eb6afd7f75 | [
"MIT"
] | null | null | null | def HAHA():
return 1,2,3
a = HAHA()
print(a)
print(a[0])
| 9.714286 | 17 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c7d50b1d9dc52a93f5eb0bc5220367d727e498d | 9,079 | py | Python | torch/_fx/graph_module.py | jsun94/nimble | e5c899a69677818b1becc58100577441e15ede13 | [
"BSD-3-Clause"
] | 206 | 2020-11-28T22:56:38.000Z | 2022-03-27T02:33:04.000Z | torch/_fx/graph_module.py | jsun94/nimble | e5c899a69677818b1becc58100577441e15ede13 | [
"BSD-3-Clause"
] | 19 | 2020-12-09T23:13:14.000Z | 2022-01-24T23:24:08.000Z | torch/_fx/graph_module.py | jsun94/nimble | e5c899a69677818b1becc58100577441e15ede13 | [
"BSD-3-Clause"
] | 28 | 2020-11-29T15:25:12.000Z | 2022-01-20T02:16:27.000Z | import torch
import torch.overrides
import linecache
from typing import Type, Dict, List, Any, Union
from .graph import Graph
import copy
# normal exec loses the source code, however we can patch
# the linecache module to still recover it.
# using exec_with_source will add it to our local cache
# and then tools like T... | 41.268182 | 107 | 0.651614 | 5,244 | 0.577597 | 0 | 0 | 470 | 0.051768 | 0 | 0 | 4,534 | 0.499394 |
9c7db6d021abe53926601b1834856be78ee60324 | 8,949 | py | Python | RequestHandler.py | robot0nfire/behem0th | 3931f2a9a2f00b95d82ccb3c5e7c13b3fbb5f4d7 | [
"MIT"
] | 2 | 2016-09-08T18:38:35.000Z | 2016-09-14T11:05:34.000Z | RequestHandler.py | robot0nfire/behem0th | 3931f2a9a2f00b95d82ccb3c5e7c13b3fbb5f4d7 | [
"MIT"
] | 1 | 2016-09-29T17:36:49.000Z | 2016-09-29T17:36:49.000Z | RequestHandler.py | robot0nfire/behem0th | 3931f2a9a2f00b95d82ccb3c5e7c13b3fbb5f4d7 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2016 Christoph Heiss <[email protected]>
#
# 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, m... | 24.927577 | 91 | 0.684769 | 6,581 | 0.735389 | 847 | 0.094647 | 0 | 0 | 0 | 0 | 3,655 | 0.408426 |
9c7dd63e969ee9cd5df33ca5c30412f39a0774ab | 366 | py | Python | tests/utils/test_metrics.py | haochuanwei/hover | 53eb38c718e44445b18a97e391b7f90270802b04 | [
"MIT"
] | 251 | 2020-11-22T15:02:30.000Z | 2022-03-23T23:29:28.000Z | tests/utils/test_metrics.py | MaxCodeXTC/hover | feeb0e0c59295a3c883823ccef918dfe388b603c | [
"MIT"
] | 22 | 2020-12-03T07:50:27.000Z | 2022-02-26T01:43:41.000Z | tests/utils/test_metrics.py | MaxCodeXTC/hover | feeb0e0c59295a3c883823ccef918dfe388b603c | [
"MIT"
] | 14 | 2020-11-18T06:46:02.000Z | 2022-03-03T08:14:18.000Z | from hover.utils.metrics import classification_accuracy
import numpy as np
def test_classification_accuracy():
true = np.array([1, 2, 3, 4, 5, 6, 7, 7])
pred = np.array([1, 2, 3, 4, 5, 6, 7, 8])
accl = classification_accuracy(true, pred)
accr = classification_accuracy(pred, true)
assert np.allclose... | 33.272727 | 55 | 0.677596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c7e8f9016c9cbf4f8f05d18b1e14e707c0c6a3e | 27,504 | py | Python | scripts/blenderseed.package.py | rgirish28/blenderseed | fee897620d0348f4ea1f5722e1a82c3682ca0178 | [
"MIT"
] | null | null | null | scripts/blenderseed.package.py | rgirish28/blenderseed | fee897620d0348f4ea1f5722e1a82c3682ca0178 | [
"MIT"
] | null | null | null | scripts/blenderseed.package.py | rgirish28/blenderseed | fee897620d0348f4ea1f5722e1a82c3682ca0178 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2017-2018 Esteban Tovagliari, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to ... | 37.98895 | 148 | 0.597186 | 20,206 | 0.734657 | 0 | 0 | 0 | 0 | 0 | 0 | 9,027 | 0.328207 |
9c7f2a0eaaf692b24bd48b78aa80933467348c66 | 80 | py | Python | uts/uts_17_aut_py/2/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/uts_17_aut_py/2/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | uts/uts_17_aut_py/2/A.py | viad00/code_olymp | 90f20f9fd075e8967d02baf7554fcf24f4ae089c | [
"MIT"
] | null | null | null | ser = int(input())
mas = list(map(int, input().split()))
mas.sort()
print(*mas)
| 16 | 37 | 0.6125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c7f69a036f4358b44b78abe3f34ed429e5fbfef | 1,420 | py | Python | wagtailkatex/wagtail_hooks.py | ongchi/wagtail-katex | c64b491e765e6b87a90d7cd8602153826ee9fe07 | [
"Apache-2.0"
] | null | null | null | wagtailkatex/wagtail_hooks.py | ongchi/wagtail-katex | c64b491e765e6b87a90d7cd8602153826ee9fe07 | [
"Apache-2.0"
] | null | null | null | wagtailkatex/wagtail_hooks.py | ongchi/wagtail-katex | c64b491e765e6b87a90d7cd8602153826ee9fe07 | [
"Apache-2.0"
] | null | null | null | from django.utils.translation import gettext
from wagtail.admin.rich_text.editors.draftail import features as draftail_features
from wagtail.core import hooks
from .richtext import KaTeXEntityElementHandler, katex_entity_decorator
@hooks.register('register_rich_text_features')
def register_katex_features(features):... | 32.272727 | 90 | 0.607042 | 0 | 0 | 0 | 0 | 1,184 | 0.833803 | 0 | 0 | 508 | 0.357746 |
9c7f78a252c83665660e04bc5a8e1cea157db269 | 1,415 | py | Python | esque_wire/protocol/serializers/api/elect_preferred_leaders_request.py | real-digital/esque-wire | eb02c49f38b89ad5e5d25aad15fb4ad795e52807 | [
"MIT"
] | null | null | null | esque_wire/protocol/serializers/api/elect_preferred_leaders_request.py | real-digital/esque-wire | eb02c49f38b89ad5e5d25aad15fb4ad795e52807 | [
"MIT"
] | 7 | 2019-11-26T08:19:49.000Z | 2021-03-15T14:27:47.000Z | esque_wire/protocol/serializers/api/elect_preferred_leaders_request.py | real-digital/esque-wire | eb02c49f38b89ad5e5d25aad15fb4ad795e52807 | [
"MIT"
] | null | null | null | ###############################################################
# Autogenerated module. Please don't modify. #
# Edit according file in protocol_generator/templates instead #
###############################################################
from typing import Dict
from ...structs.api.elect_preferred_le... | 41.617647 | 109 | 0.733569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.214134 |
9c7f9627f318b3e1570c92823a8ee10c19ec9aa5 | 8,991 | py | Python | test/tests/bootstrap/test_api20_windows_bootstrap.py | arunrordell/RackHD | 079c21f45cb38f538c502363aa1ff86dbcac3169 | [
"Apache-2.0"
] | 451 | 2015-11-09T13:19:25.000Z | 2022-03-16T08:00:16.000Z | test/tests/bootstrap/test_api20_windows_bootstrap.py | arunrordell/RackHD | 079c21f45cb38f538c502363aa1ff86dbcac3169 | [
"Apache-2.0"
] | 824 | 2015-11-10T15:25:50.000Z | 2018-04-09T09:59:49.000Z | test/tests/bootstrap/test_api20_windows_bootstrap.py | arunrordell/RackHD | 079c21f45cb38f538c502363aa1ff86dbcac3169 | [
"Apache-2.0"
] | 221 | 2015-11-10T23:00:46.000Z | 2022-03-16T08:00:22.000Z | '''
Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
This script tests arbitrary payload of the RackHD API 2.0 OS bootstrap workflows.
The default case is running a minimum payload Windows OS install.
Other Windows-type OS install cases can be specified by creating a payload file and specifiying it u... | 45.872449 | 127 | 0.587031 | 3,774 | 0.419753 | 0 | 0 | 3,791 | 0.421644 | 0 | 0 | 4,210 | 0.468246 |
9c806e8f0ae3b3c96a9df2eadcd9d67e2ad3e5fe | 602 | py | Python | random_number.py | till-h/alexa | 47891eb97fff375500a032b23fef7a2681b50735 | [
"MIT"
] | null | null | null | random_number.py | till-h/alexa | 47891eb97fff375500a032b23fef7a2681b50735 | [
"MIT"
] | null | null | null | random_number.py | till-h/alexa | 47891eb97fff375500a032b23fef7a2681b50735 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
from flask_ask import Ask, statement
import random
app = Flask(__name__)
ask = Ask(app, '/')
@ask.intent('RandomNumber', convert={'lowerLimit': int, 'upperLimit': int})
def hello(lowerLimit, upperLimit):
if lowerLimit == None:
lowerLimit = 0
if upperLimit == None:
upperL... | 31.684211 | 101 | 0.749169 | 0 | 0 | 0 | 0 | 414 | 0.687708 | 0 | 0 | 91 | 0.151163 |
9c81af124f83929d36674b85f7157b8a2ef4f4b9 | 9,686 | py | Python | model/losses.py | askerlee/rift | d4dbf42b82f1f83dfab18f8da8fe3a1d0a716fa2 | [
"MIT"
] | 11 | 2022-02-14T08:31:04.000Z | 2022-03-29T08:20:17.000Z | model/losses.py | askerlee/rift | d4dbf42b82f1f83dfab18f8da8fe3a1d0a716fa2 | [
"MIT"
] | 3 | 2022-02-14T11:19:15.000Z | 2022-03-19T05:11:25.000Z | model/losses.py | askerlee/rift | d4dbf42b82f1f83dfab18f8da8fe3a1d0a716fa2 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
from model.laplacian import LapLoss
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class EPE(nn.Module):
def __init__(self):
super(EPE, self).__init__()
de... | 39.696721 | 134 | 0.601693 | 4,172 | 0.428337 | 0 | 0 | 0 | 0 | 0 | 0 | 2,067 | 0.212218 |
9c820bdf9b7f916cd742cf712e94425ee24e76e1 | 5,847 | py | Python | project/python/swarm_simulation.py | righetti/swarmrobotics | f8f6bf72c3aae1f432f3306aebb48fd32a6dd2a7 | [
"BSD-3-Clause"
] | 8 | 2019-09-14T11:55:49.000Z | 2022-02-05T23:06:33.000Z | project/python/swarm_simulation.py | righetti/swarmrobotics | f8f6bf72c3aae1f432f3306aebb48fd32a6dd2a7 | [
"BSD-3-Clause"
] | null | null | null | project/python/swarm_simulation.py | righetti/swarmrobotics | f8f6bf72c3aae1f432f3306aebb48fd32a6dd2a7 | [
"BSD-3-Clause"
] | 7 | 2019-09-16T02:42:41.000Z | 2021-09-07T03:26:22.000Z | import numpy as np
import pybullet as p
import itertools
from robot import Robot
class World():
def __init__(self):
# create the physics simulator
self.physicsClient = p.connect(p.GUI)
p.setGravity(0,0,-9.81)
self.max_communication_distance = 2.0
# We will int... | 43.634328 | 96 | 0.540277 | 5,750 | 0.98341 | 0 | 0 | 0 | 0 | 0 | 0 | 2,554 | 0.436805 |
9c82ce7669d0a4f2d3645ab5502b497296602411 | 31,437 | py | Python | boto/ec2/elb/__init__.py | wt/boto | 83d5b256c8333307233e1ec7c1e21696e8d32437 | [
"MIT"
] | 15 | 2015-03-25T05:24:11.000Z | 2021-12-18T04:24:06.000Z | boto/ec2/elb/__init__.py | wt/boto | 83d5b256c8333307233e1ec7c1e21696e8d32437 | [
"MIT"
] | null | null | null | boto/ec2/elb/__init__.py | wt/boto | 83d5b256c8333307233e1ec7c1e21696e8d32437 | [
"MIT"
] | 10 | 2015-04-26T17:56:37.000Z | 2020-09-24T14:01:53.000Z | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 wi... | 42.946721 | 91 | 0.633426 | 28,948 | 0.920826 | 0 | 0 | 0 | 0 | 0 | 0 | 19,070 | 0.60661 |
9c836060b9b7e80140ebb8a9cc363bc2e1d5ff72 | 9,677 | py | Python | basis_set_exchange/cli/bse_cli.py | atomse/basis_set_exchange | 7ffd64082c14d2f61eb43f1c2d44792e8b0e394e | [
"BSD-3-Clause"
] | null | null | null | basis_set_exchange/cli/bse_cli.py | atomse/basis_set_exchange | 7ffd64082c14d2f61eb43f1c2d44792e8b0e394e | [
"BSD-3-Clause"
] | null | null | null | basis_set_exchange/cli/bse_cli.py | atomse/basis_set_exchange | 7ffd64082c14d2f61eb43f1c2d44792e8b0e394e | [
"BSD-3-Clause"
] | null | null | null | '''
Command line interface for the basis set exchange
'''
import argparse
import argcomplete
from .. import version
from .bse_handlers import bse_cli_handle_subcmd
from .check import cli_check_normalize_args
from .complete import (cli_case_insensitive_validator,
cli_family_completer, cli_role_co... | 59.368098 | 160 | 0.673349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,604 | 0.579105 |
9c8366ee191973d219cc50c6458365ebe9053724 | 376 | py | Python | Backjoon/1929.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | 3 | 2022-03-29T04:56:50.000Z | 2022-03-30T08:06:42.000Z | Backjoon/1929.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | null | null | null | Backjoon/1929.py | hanjungwoo1/CodingTest | 0112488d04dd53cea1c869439341fb602e699f2a | [
"MIT"
] | null | null | null | """
입력 예시
3 16
출력 예시
3
5
7
11
13
"""
import math
left, right = map(int, input().split())
array = [True for i in range(right+1)]
array[1] = 0
for i in range(2, int(math.sqrt(right)) + 1):
if array[i] == True:
j = 2
while i * j <= right:
array[i * j] = False
j += 1
for i in... | 13.925926 | 45 | 0.505319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.135204 |
92bb5127dacf316c62cd64b3874b283309deffd5 | 42,452 | py | Python | tensorflow/tools/quantization/quantize_graph_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 374 | 2018-12-02T06:59:44.000Z | 2022-03-15T10:34:00.000Z | tensorflow/tools/quantization/quantize_graph_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 157 | 2018-12-02T07:37:39.000Z | 2022-03-16T09:49:11.000Z | tensorflow/tools/quantization/quantize_graph_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 141 | 2018-12-12T11:57:59.000Z | 2022-02-28T13:12:58.000Z | # Copyright 2015 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... | 43.900724 | 80 | 0.692123 | 34,694 | 0.817252 | 0 | 0 | 0 | 0 | 0 | 0 | 6,207 | 0.146212 |
92bbcd24bf10bc66f379878a7b6917a00a8a96a4 | 2,698 | py | Python | layerserver/migrations/0001_initial.py | aroiginfraplan/giscube-admin | b7f3131b0186f847f3902df97f982cb288b16a49 | [
"BSD-3-Clause"
] | 5 | 2018-06-07T12:54:35.000Z | 2022-01-14T10:38:38.000Z | layerserver/migrations/0001_initial.py | aroiginfraplan/giscube-admin | b7f3131b0186f847f3902df97f982cb288b16a49 | [
"BSD-3-Clause"
] | 140 | 2018-06-18T10:27:28.000Z | 2022-03-23T09:53:15.000Z | layerserver/migrations/0001_initial.py | aroiginfraplan/giscube-admin | b7f3131b0186f847f3902df97f982cb288b16a49 | [
"BSD-3-Clause"
] | 1 | 2021-04-13T11:20:54.000Z | 2021-04-13T11:20:54.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-04-26 09:14
import colorfield.fields
from django.db import migrations, models
import django.db.models.deletion
import giscube.utils
class Migration(migrations.Migration):
initial = True
dependencies = [
('giscube', '0002_update'),
]... | 52.901961 | 182 | 0.610823 | 2,499 | 0.926242 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.210526 |
92bc543d24e721550df8b06cf7b80bb7637df99c | 910 | py | Python | SETTINGS.py | pirica/fortnite-leaks-image-generator | c23633862fd7d2286700f932e5dab41decd2ff72 | [
"CC0-1.0"
] | 5 | 2020-10-07T23:53:30.000Z | 2021-09-18T17:50:11.000Z | SETTINGS.py | pirica/fortnite-leaks-image-generator | c23633862fd7d2286700f932e5dab41decd2ff72 | [
"CC0-1.0"
] | null | null | null | SETTINGS.py | pirica/fortnite-leaks-image-generator | c23633862fd7d2286700f932e5dab41decd2ff72 | [
"CC0-1.0"
] | 5 | 2020-12-13T16:49:41.000Z | 2021-09-18T17:50:14.000Z | backgroundurl = "https://storage.needpix.com/rsynced_images/colored-background.jpg" # <- Need to be a Image URL!!!
lang = "en" # <- language code
displayset = True # <- Display the Set of the Item
raritytext = True # <- Display the Rarity of the Item
typeconfig = {
"BannerToken": True,
"AthenaBackpack":... | 28.4375 | 115 | 0.66044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.632967 |
92bc6a8a2905baaef24ea73868b39d5f28b0a445 | 592 | py | Python | src/healthvaultlib/tests/testbase.py | rajeevs1992/pyhealthvault | 2b6fa7c1687300bcc2e501368883fbb13dc80495 | [
"MIT"
] | 1 | 2015-12-19T09:09:15.000Z | 2015-12-19T09:09:15.000Z | src/healthvaultlib/tests/testbase.py | rajeevs1992/pyhealthvault | 2b6fa7c1687300bcc2e501368883fbb13dc80495 | [
"MIT"
] | 6 | 2015-12-19T07:53:44.000Z | 2021-12-13T19:35:10.000Z | src/healthvaultlib/tests/testbase.py | rajeevs1992/pyhealthvault | 2b6fa7c1687300bcc2e501368883fbb13dc80495 | [
"MIT"
] | 2 | 2018-02-20T08:34:50.000Z | 2018-03-28T14:29:52.000Z | import unittest
import settings
from healthvaultlib.helpers.connection import Connection
class TestBase(unittest.TestCase):
def setUp(self):
self.connection = self.get_connection()
def get_connection(self):
conn = Connection(settings.HV_APPID, settings.HV_SERVICE_SERVER)
conn... | 31.157895 | 90 | 0.72973 | 500 | 0.844595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92bcea551d4afd1053bbca8f841cc813051b6539 | 484 | py | Python | apps/extensions/migrations/0012_imports_path_urlfield_to_charfield.py | StepicOrg/stepik-apps | 5825bc9b2444ad4690681964d1bed172706f8796 | [
"Apache-2.0"
] | 5 | 2017-03-17T10:01:25.000Z | 2018-03-23T05:56:25.000Z | apps/extensions/migrations/0012_imports_path_urlfield_to_charfield.py | StepicOrg/stepik-apps | 5825bc9b2444ad4690681964d1bed172706f8796 | [
"Apache-2.0"
] | 4 | 2020-06-05T17:34:05.000Z | 2021-04-19T12:58:48.000Z | apps/extensions/migrations/0012_imports_path_urlfield_to_charfield.py | StepicOrg/stepik-apps | 5825bc9b2444ad4690681964d1bed172706f8796 | [
"Apache-2.0"
] | 2 | 2017-03-21T13:01:28.000Z | 2017-04-27T14:33:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-06-09 03:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extensions', '0011_auto_20170502_0908'),
]
operations = [
migrations.AlterF... | 23.047619 | 71 | 0.630165 | 326 | 0.673554 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.295455 |
92bcfabb83b949d7b865d6edb058159c8c815b8b | 628 | py | Python | regtests/bench/thread_collision.py | secureosv/pythia | 459f9e2bc0bb2da57e9fa8326697d9ef3386883a | [
"BSD-3-Clause"
] | 17 | 2015-12-13T23:11:31.000Z | 2020-07-19T00:40:18.000Z | regtests/bench/thread_collision.py | secureosv/pythia | 459f9e2bc0bb2da57e9fa8326697d9ef3386883a | [
"BSD-3-Clause"
] | 8 | 2016-02-22T19:42:56.000Z | 2016-07-13T10:58:04.000Z | regtests/bench/thread_collision.py | secureosv/pythia | 459f9e2bc0bb2da57e9fa8326697d9ef3386883a | [
"BSD-3-Clause"
] | 3 | 2016-04-11T20:34:31.000Z | 2021-03-12T10:33:02.000Z | '''
multi-threading (python3 version)
https://docs.python.org/3/library/threading.html
'''
from time import clock
import threading
THREADS=2
lock = threading.Lock()
A = 0
B = 0
C = 0
def test_globals():
global A, B, C
for i in range(1024*1024):
lock.acquire()
A += 1
B += 2
C = A + B
lock.release()
def... | 14.604651 | 54 | 0.630573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.202229 |
92bd6cd2780084175f5bca66b4d32f6768777683 | 2,270 | py | Python | game/board.py | scooler/checkers | 90bfe8702c6005c767a8673caed6e7e2f0ce5879 | [
"MIT"
] | null | null | null | game/board.py | scooler/checkers | 90bfe8702c6005c767a8673caed6e7e2f0ce5879 | [
"MIT"
] | null | null | null | game/board.py | scooler/checkers | 90bfe8702c6005c767a8673caed6e7e2f0ce5879 | [
"MIT"
] | null | null | null | import numpy as np
class Board:
"""
0 - black
1 - white
"""
def __init__(self):
board = [
[0, 1] * 4,
[1, 0] * 4
] * 4
players_board = [
[0, 1] * 4, # player 1
[1, 0] * 4
] + [[0] * 8] * 4 + [ # 4 rows of nothing
[0, 2] * 4, # player 2
[2, 0] * 4
]
se... | 28.024691 | 93 | 0.574009 | 2,249 | 0.990749 | 0 | 0 | 0 | 0 | 0 | 0 | 1,645 | 0.72467 |
92bdca03049e78f08b91682f83e48976672f9a1b | 456 | py | Python | utils/get_season_things_price.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | null | null | null | utils/get_season_things_price.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | 2 | 2021-11-24T18:20:00.000Z | 2021-11-24T18:31:55.000Z | utils/get_season_things_price.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | 4 | 2021-11-24T16:40:28.000Z | 2021-11-28T10:40:57.000Z | def get_season_things_price(thing, amount, price):
if thing == 'wheel':
wheel_price = price[thing]['month'] * amount
return f'Стоимость составит {wheel_price}/месяц'
else:
other_thing_price_week = price[thing]['week'] * amount
other_thing_price_month = price[thing]['month'] * a... | 41.454545 | 75 | 0.662281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.432485 |
92bed45f1cd8f2bc90c85f74109f48fc3d320089 | 5,261 | py | Python | zge/engine.py | zhester/zge | 246096a8c1fd26472091aac747a3fffda58f3072 | [
"BSD-2-Clause"
] | null | null | null | zge/engine.py | zhester/zge | 246096a8c1fd26472091aac747a3fffda58f3072 | [
"BSD-2-Clause"
] | null | null | null | zge/engine.py | zhester/zge | 246096a8c1fd26472091aac747a3fffda58f3072 | [
"BSD-2-Clause"
] | null | null | null | """
Zoe Game Engine Core Implementation
===================================
Requirements
------------
[pygame](http://www.pygame.org/)
"""
# core packages
# third-party packages
import pygame
# local package
import layer
__version__ = '0.0.0'
#===================================================================... | 27.118557 | 78 | 0.472914 | 4,928 | 0.936704 | 0 | 0 | 0 | 0 | 0 | 0 | 2,116 | 0.402205 |
92c00c62a4d73688ee5500b37708447cbeae1913 | 557 | py | Python | Authentication/migrations/0004_auto_20201115_1105.py | CHESyrian/Estebyan | 015c0a8e95d033af04ba949942da79a4f5a90488 | [
"MIT"
] | null | null | null | Authentication/migrations/0004_auto_20201115_1105.py | CHESyrian/Estebyan | 015c0a8e95d033af04ba949942da79a4f5a90488 | [
"MIT"
] | null | null | null | Authentication/migrations/0004_auto_20201115_1105.py | CHESyrian/Estebyan | 015c0a8e95d033af04ba949942da79a4f5a90488 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-11-15 09:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Authentication', '0003_auto_20201113_2210'),
]
operations = [
migrations.AlterField(
model_name='profiles',
name='Qu... | 23.208333 | 54 | 0.587074 | 464 | 0.833034 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.238779 |
92c32d549db39666405ca82ccd8b1e761fbef653 | 455 | py | Python | dashboard/urls.py | EdisonBr/MockDados | c625cba7b93a8f31609549241c5aa71932e26b2d | [
"MIT"
] | null | null | null | dashboard/urls.py | EdisonBr/MockDados | c625cba7b93a8f31609549241c5aa71932e26b2d | [
"MIT"
] | 4 | 2021-03-30T13:49:39.000Z | 2021-06-10T19:40:02.000Z | dashboard/urls.py | smart320/MockDados | c625cba7b93a8f31609549241c5aa71932e26b2d | [
"MIT"
] | 1 | 2020-07-27T02:08:29.000Z | 2020-07-27T02:08:29.000Z |
from django.urls import path, re_path
from django.views.generic.base import TemplateView
from .views import dashboard_cost, dashboard_energy, MotorDataListView
app_name = 'dashboard'
urlpatterns = [
path('', MotorDataListView.as_view(), name='dashboard_custom'),
#path('', dashboard_custom, name='dashboar... | 28.4375 | 71 | 0.745055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.29011 |
92c39bcd73eb7b9f3010061b7c3106141036133d | 111 | py | Python | Coursera/Python for Everybody Specialization/Python for everybody basics/hourly rate.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | 1 | 2021-02-19T22:33:55.000Z | 2021-02-19T22:33:55.000Z | Coursera/Python for Everybody Specialization/Python for everybody basics/hourly rate.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | null | null | null | Coursera/Python for Everybody Specialization/Python for everybody basics/hourly rate.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | null | null | null | hrs = input("Enter Hours:")
rate = input("Enter rate:")
pay = float(hrs) * float(rate)
print("Pay: " +str(pay)) | 27.75 | 30 | 0.630631 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.306306 |
92c3f1ad626b115da6ffe9d3c9d13ac69cd2a64e | 18,742 | py | Python | litex_boards/platforms/xilinx_kcu105.py | smunaut/litex-boards | caac75c7dbcba68d9f4fb948107cb5d6ff60e05f | [
"BSD-2-Clause"
] | 177 | 2019-06-13T09:54:49.000Z | 2022-03-29T02:25:13.000Z | litex_boards/platforms/xilinx_kcu105.py | smunaut/litex-boards | caac75c7dbcba68d9f4fb948107cb5d6ff60e05f | [
"BSD-2-Clause"
] | 347 | 2019-06-12T17:47:45.000Z | 2022-03-30T21:59:01.000Z | litex_boards/platforms/xilinx_kcu105.py | smunaut/litex-boards | caac75c7dbcba68d9f4fb948107cb5d6ff60e05f | [
"BSD-2-Clause"
] | 202 | 2019-06-11T15:01:26.000Z | 2022-03-31T16:25:19.000Z | #
# This file is part of LiteX-Boards.
#
# Copyright (c) 2017-2019 Florent Kermarrec <[email protected]>
# SPDX-License-Identifier: BSD-2-Clause
from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
# IOs -----------------------------------------------------... | 34.836431 | 100 | 0.442642 | 818 | 0.043645 | 0 | 0 | 0 | 0 | 0 | 0 | 7,896 | 0.4213 |
92c62cbe56cec51196d1580ada73d616cb7c64b7 | 1,543 | py | Python | code/advent_of_code_day3.py | erinleeryan/2020adventofcode | 69f21d3458f57d8fcf006c451416e0509a66cd7a | [
"Unlicense"
] | null | null | null | code/advent_of_code_day3.py | erinleeryan/2020adventofcode | 69f21d3458f57d8fcf006c451416e0509a66cd7a | [
"Unlicense"
] | null | null | null | code/advent_of_code_day3.py | erinleeryan/2020adventofcode | 69f21d3458f57d8fcf006c451416e0509a66cd7a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import math
# In[2]:
fileObj = open('../data/advent_of_code_input_day_three.txt', "r") #opens the file in read mode.
items = fileObj. read(). splitlines() #puts the file into an array.
# In[3]:
#print (items)
def split(line):
return lis... | 20.302632 | 106 | 0.700583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.130266 |
92c68dfb6fa34afab6acdb9718f1d8ef9da011d5 | 670 | py | Python | input_handler.py | Wyverns010/Body-Keypoints-Detection | 980445da5e87c898a00a8ef1c9e1e143d09d4643 | [
"Apache-2.0"
] | 1 | 2021-06-06T07:08:27.000Z | 2021-06-06T07:08:27.000Z | input_handler.py | Wyverns010/Body-Keypoints-Detection | 980445da5e87c898a00a8ef1c9e1e143d09d4643 | [
"Apache-2.0"
] | null | null | null | input_handler.py | Wyverns010/Body-Keypoints-Detection | 980445da5e87c898a00a8ef1c9e1e143d09d4643 | [
"Apache-2.0"
] | null | null | null | import os
import traceback
class InputHandler:
IMAGES_PARENT_FOLDER = './images'
def __init__(self):
filesList = []
def listFiles(self,path=''):
if path != '':
self.IMAGES_PARENT_FOLDER = path
try:
self.listFiles = [os.path.join(self.IMAGES_PAREN... | 25.769231 | 135 | 0.60597 | 561 | 0.837313 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.035821 |
92c83bb936e6892d8eb39bcbfcb76fe95e1f5577 | 1,281 | py | Python | docker/autoconfig.py | misc0110/bepasty-server | 662179671220d680fed57aa90894ffebf57dd4c7 | [
"BSD-2-Clause"
] | null | null | null | docker/autoconfig.py | misc0110/bepasty-server | 662179671220d680fed57aa90894ffebf57dd4c7 | [
"BSD-2-Clause"
] | null | null | null | docker/autoconfig.py | misc0110/bepasty-server | 662179671220d680fed57aa90894ffebf57dd4c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
import os
import sys
SITENAME = os.environ.get("BEPASTY_SITENAME", None)
if SITENAME is None:
print("\n\nEnvironment variable BEPASTY_SITENAME must be set.")
sys.exit(1)
SECRET_KEY = os.environ.get("BEPASTY_SECRET_KEY", None)
if SECRET_KEY is None:
print("\n\nEnvironment variable BEPAST... | 30.5 | 87 | 0.753318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 483 | 0.377049 |
92c8fb39f9443d549d8e36137c05b64ee86a7a00 | 13,786 | py | Python | pysh/transforms/alpha/bangexpr.py | drslump/pysh | 673cdf2b5ea95dc3209cb294bb91cb2f298bb888 | [
"MIT"
] | 3 | 2018-07-09T04:39:24.000Z | 2020-11-27T05:44:56.000Z | pysh/transforms/alpha/bangexpr.py | drslump/pysh | 673cdf2b5ea95dc3209cb294bb91cb2f298bb888 | [
"MIT"
] | null | null | null | pysh/transforms/alpha/bangexpr.py | drslump/pysh | 673cdf2b5ea95dc3209cb294bb91cb2f298bb888 | [
"MIT"
] | 1 | 2018-08-02T21:57:11.000Z | 2018-08-02T21:57:11.000Z | from io import StringIO
import re
import tokenize
import os
from collections import deque, ChainMap
from functools import lru_cache
from enum import Enum
import pysh
from pysh.path import PathWrapper, Path
from typing import List, Callable, Iterator, Tuple, NamedTuple, Deque, Union, Any
TBangTransformer = Callable[ [... | 31.260771 | 153 | 0.533585 | 8,229 | 0.59691 | 5,701 | 0.413535 | 1,012 | 0.073408 | 0 | 0 | 2,660 | 0.192949 |
92ca0cfb3a6ca200081a09f8a2c36869b58c22cb | 2,449 | py | Python | example/bayesian-methods/data_loader.py | Vikas-kum/incubator-mxnet | ba02bf2fe2da423caa59ddb3fd5e433b90b730bf | [
"Apache-2.0"
] | 54 | 2018-11-27T06:00:52.000Z | 2022-03-24T09:41:01.000Z | example/bayesian-methods/data_loader.py | Vikas-kum/incubator-mxnet | ba02bf2fe2da423caa59ddb3fd5e433b90b730bf | [
"Apache-2.0"
] | 27 | 2017-07-04T17:45:51.000Z | 2019-09-12T06:56:27.000Z | example/bayesian-methods/data_loader.py | Vikas-kum/incubator-mxnet | ba02bf2fe2da423caa59ddb3fd5e433b90b730bf | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.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 u... | 40.147541 | 95 | 0.683953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.408738 |
92ca255eec01c1e82a3ad0136582786783c1c0bd | 4,743 | py | Python | start.py | mickeyckm/nanodegree-freshtomatoes | 12776f7e46d6c42a4755a0b81e60eb1a5a65de08 | [
"MIT"
] | 1 | 2016-10-13T05:25:36.000Z | 2016-10-13T05:25:36.000Z | start.py | mickeyckm/freshtomatoes | 12776f7e46d6c42a4755a0b81e60eb1a5a65de08 | [
"MIT"
] | null | null | null | start.py | mickeyckm/freshtomatoes | 12776f7e46d6c42a4755a0b81e60eb1a5a65de08 | [
"MIT"
] | null | null | null | import os
import tmdbsimple as tmdb
import media
import fresh_tomatoes as ft
movies = []
if os.environ.get('TMDB_API', False):
# Retrieve API KEY
tmdb.API_KEY = os.environ['TMDB_API']
# TMDB Movie Ids
movie_ids = [271110, 297761, 246655, 278154, 135397, 188927]
# Get Configuration
configurat... | 43.916667 | 78 | 0.59688 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,312 | 0.487455 |
92cab9ec692aa8897ecccca29c25b34c478b66a7 | 8,798 | py | Python | qiskit_metal/_gui/elements_ui.py | sarafs1926/qiskit-metal | cf2ce8125ebe8f21b6d1b85362466fd57db2cada | [
"Apache-2.0"
] | 1 | 2022-01-27T07:11:49.000Z | 2022-01-27T07:11:49.000Z | qiskit_metal/_gui/elements_ui.py | sarafs1926/qiskit-metal | cf2ce8125ebe8f21b6d1b85362466fd57db2cada | [
"Apache-2.0"
] | null | null | null | qiskit_metal/_gui/elements_ui.py | sarafs1926/qiskit-metal | cf2ce8125ebe8f21b6d1b85362466fd57db2cada | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './elements_ui.ui',
# licensing of './elements_ui.ui' applies.
#
# Created: Wed Jun 16 14:29:03 2021
# by: pyside2-uic running on PySide2 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui... | 49.988636 | 100 | 0.639236 | 8,429 | 0.958059 | 0 | 0 | 0 | 0 | 0 | 0 | 986 | 0.112071 |
92cb45afbfe997d9e2fe7ab0970f2d0910fc5659 | 148 | py | Python | Python/function.py | manishaverma1012/programs | dd77546219eab2f2ee81dd0d599b78ebd8f95957 | [
"MIT"
] | null | null | null | Python/function.py | manishaverma1012/programs | dd77546219eab2f2ee81dd0d599b78ebd8f95957 | [
"MIT"
] | null | null | null | Python/function.py | manishaverma1012/programs | dd77546219eab2f2ee81dd0d599b78ebd8f95957 | [
"MIT"
] | null | null | null | def cube(number):
return number*number*number
digit = input(" the cube of which digit do you want >")
result = cube(int(digit))
print(result)
| 18.5 | 56 | 0.702703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.27027 |
92cd8cee441a839cf57967c393c922a1fab007b8 | 1,203 | py | Python | tests/test_runner.py | elifesciences/proofreader-python | 89d807253e17a1731c7ce15f7dd382e49c1c835a | [
"MIT"
] | 1 | 2018-06-26T21:49:31.000Z | 2018-06-26T21:49:31.000Z | tests/test_runner.py | elifesciences/proofreader-python | 89d807253e17a1731c7ce15f7dd382e49c1c835a | [
"MIT"
] | 8 | 2017-12-05T08:34:25.000Z | 2018-04-30T08:58:18.000Z | tests/test_runner.py | elifesciences/proofreader-python | 89d807253e17a1731c7ce15f7dd382e49c1c835a | [
"MIT"
] | null | null | null | try:
from unittest.mock import patch
except ImportError: # pragma: no cover
from mock import patch
from proofreader.runner import run, _run_command
def test_it_will_return_1_exit_code_on_failure(bad_py_file):
try:
run(targets=[bad_py_file.strpath])
except SystemExit as exception:
ass... | 28.642857 | 83 | 0.729842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.049044 |
92ce1ba4b6776bf939e55fcd9a49ebf0d28494b0 | 1,266 | py | Python | tanim/core/container/container.py | wofeicaoge/Tanim | 8ef17834a4ba51092f28c0d5becec25aecd01a62 | [
"MIT"
] | null | null | null | tanim/core/container/container.py | wofeicaoge/Tanim | 8ef17834a4ba51092f28c0d5becec25aecd01a62 | [
"MIT"
] | 5 | 2020-04-13T15:31:37.000Z | 2022-03-12T00:23:27.000Z | tanim/core/container/container.py | wofeicaoge/Tanim | 8ef17834a4ba51092f28c0d5becec25aecd01a62 | [
"MIT"
] | null | null | null | from tanim.utils.config_ops import digest_config
from tanim.utils.iterables import list_update
# Currently, this is only used by both Scene and Mobject.
# Still, we abstract its functionality here, albeit purely nominally.
# All actual implementation has to be handled by derived classes for now.
class Container(obj... | 32.461538 | 76 | 0.657188 | 961 | 0.759084 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.21564 |
92ce6473bab7c8882ecd1ab85554b02e243b4587 | 5,076 | py | Python | article.py | ZACHSTRIVES/AUCSS-StaffPlatform | f2d6597853e85b06f057292025d83edbb4184361 | [
"MIT"
] | 3 | 2020-10-01T08:46:12.000Z | 2021-01-25T11:32:16.000Z | article.py | ZACHSTRIVES/AUCSS-StaffPlatform | f2d6597853e85b06f057292025d83edbb4184361 | [
"MIT"
] | null | null | null | article.py | ZACHSTRIVES/AUCSS-StaffPlatform | f2d6597853e85b06f057292025d83edbb4184361 | [
"MIT"
] | 1 | 2020-09-24T11:20:23.000Z | 2020-09-24T11:20:23.000Z | from config import *
def fetch_all_article():
try:
cur = db.cursor()
sql = "SELECT * FROM article WHERE article_status='N'"
db.ping(reconnect=True)
cur.execute(sql)
result = cur.fetchall()
db.commit()
cur.close()
return result
except Exception as... | 25.766497 | 121 | 0.573483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 851 | 0.167652 |
92cea7421504e38a8678084f761b6c6af9dcfff2 | 1,231 | py | Python | 12-Querying-Data-II/just_filtering.py | dwang-ischool/w205 | ebcdf684dc653951691faaa2787896a2d2406539 | [
"Apache-2.0"
] | 23 | 2018-10-21T17:47:56.000Z | 2022-03-06T04:50:27.000Z | 12a/just_filtering.py | FuriousGeorge19/W205-Course-Content | f51046d7507fba9ba9f7521cda437d7dad803e5b | [
"Apache-2.0"
] | null | null | null | 12a/just_filtering.py | FuriousGeorge19/W205-Course-Content | f51046d7507fba9ba9f7521cda437d7dad803e5b | [
"Apache-2.0"
] | 9 | 2020-03-16T08:52:58.000Z | 2022-02-09T09:31:51.000Z | #!/usr/bin/env python
"""Extract events from kafka and write them to hdfs
"""
import json
from pyspark.sql import SparkSession, Row
from pyspark.sql.functions import udf
@udf('boolean')
def is_purchase(event_as_json):
event = json.loads(event_as_json)
if event['event_type'] == 'purchase_sword':
return... | 25.122449 | 73 | 0.613323 | 0 | 0 | 0 | 0 | 170 | 0.138099 | 0 | 0 | 296 | 0.240455 |
92cec8b3278d323143a4d7cc2f5e6ab7db12785e | 434 | py | Python | test.py | navjotk/pysz | 6d75aa4fe24713ed893a2301c143006dace6fd77 | [
"MIT"
] | 3 | 2020-03-14T04:43:00.000Z | 2022-02-02T15:22:48.000Z | test.py | navjotk/pysz | 6d75aa4fe24713ed893a2301c143006dace6fd77 | [
"MIT"
] | null | null | null | test.py | navjotk/pysz | 6d75aa4fe24713ed893a2301c143006dace6fd77 | [
"MIT"
] | null | null | null | import numpy as np
from pysz import compress, decompress
def test_compress_decompress():
a = np.linspace(0, 100, num=1000000).reshape((100, 100, 100)).astype(np.float32)
tolerance = 0.0001
compressed = compress(a, tolerance=tolerance)
recovered = decompress(compressed, a.shape, a.dtype)
asse... | 25.529412 | 84 | 0.71659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92cf711f3ee4d4acd21a60efb873e479a2b9db00 | 447 | py | Python | sparkdq/outliers/params/KSigmaParams.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | 1 | 2021-02-08T07:49:54.000Z | 2021-02-08T07:49:54.000Z | sparkdq/outliers/params/KSigmaParams.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | null | null | null | sparkdq/outliers/params/KSigmaParams.py | PasaLab/SparkDQ | 16d50210747ef7de03cf36d689ce26ff7445f63a | [
"Apache-2.0"
] | null | null | null | import json
from sparkdq.outliers.params.OutlierSolverParams import OutlierSolverParams
from sparkdq.outliers.OutlierSolver import OutlierSolver
class KSigmaParams(OutlierSolverParams):
def __init__(self, deviation=1.5):
self.deviation = deviation
def model(self):
return OutlierSolver.kSigm... | 23.526316 | 75 | 0.736018 | 298 | 0.666667 | 0 | 0 | 119 | 0.266219 | 0 | 0 | 11 | 0.024609 |
92d067e85ffe42672816ef3e9eaff85647966d45 | 1,312 | py | Python | webhooks/sentry/alerta_sentry.py | dunzoit/alerta-contrib | 57dd47d5bb0c994fce036ae1eea2c3a88ef352c4 | [
"MIT"
] | null | null | null | webhooks/sentry/alerta_sentry.py | dunzoit/alerta-contrib | 57dd47d5bb0c994fce036ae1eea2c3a88ef352c4 | [
"MIT"
] | null | null | null | webhooks/sentry/alerta_sentry.py | dunzoit/alerta-contrib | 57dd47d5bb0c994fce036ae1eea2c3a88ef352c4 | [
"MIT"
] | null | null | null |
from alerta.models.alert import Alert
from alerta.webhooks import WebhookBase
class SentryWebhook(WebhookBase):
def incoming(self, query_string, payload):
# For Sentry v9
# Defaults to value before Sentry v9
if 'request' in payload.get('event'):
key = 'request'
else:... | 32 | 108 | 0.529726 | 1,230 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 343 | 0.261433 |