hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796765f1508bea2826a64e14671c5e6de19594c5 | 198 | py | Python | ecsnl/users/tests/test_models.py | dark-codr/ecsnl | 9539fbe3af1ef4440c56922d110b9f609cadf2a5 | [
"MIT"
] | null | null | null | ecsnl/users/tests/test_models.py | dark-codr/ecsnl | 9539fbe3af1ef4440c56922d110b9f609cadf2a5 | [
"MIT"
] | null | null | null | ecsnl/users/tests/test_models.py | dark-codr/ecsnl | 9539fbe3af1ef4440c56922d110b9f609cadf2a5 | [
"MIT"
] | null | null | null | import pytest
from ecsnl.users.models import User
pytestmark = pytest.mark.django_db
def test_user_get_absolute_url(user: User):
assert user.get_absolute_url() == f"/users/{user.username}/"
| 19.8 | 64 | 0.767677 |
7967660098019d61a43fb31fa651adaa8b989ac6 | 344 | py | Python | posthog/tasks/delete_old_plugin_logs.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 7,409 | 2020-02-09T23:18:10.000Z | 2022-03-31T22:36:25.000Z | posthog/tasks/delete_old_plugin_logs.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 5,709 | 2020-02-09T23:26:13.000Z | 2022-03-31T20:20:01.000Z | posthog/tasks/delete_old_plugin_logs.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 647 | 2020-02-13T17:50:55.000Z | 2022-03-31T11:24:19.000Z | from django.utils import timezone
from posthog.models import PluginLogEntry
TTL_WEEKS = 1
def delete_old_plugin_logs() -> None:
"""Plugin log entries have an in-DB TTL in ClickHouse, for Postgres we need a periodic task."""
PluginLogEntry.objects.filter(timestamp__lte=timezone.now() - timezone.timedelta(wee... | 31.272727 | 111 | 0.770349 |
7967661f5c7519ec17efb436e00281a8389f9053 | 4,996 | py | Python | qa/rpc-tests/wallet-hd.py | combode/combode | 84664ec178de2b67fa127b561d843c9fbcd7a03d | [
"MIT"
] | 5 | 2021-01-03T05:53:09.000Z | 2021-09-15T09:18:48.000Z | qa/rpc-tests/wallet-hd.py | combode/combode | 84664ec178de2b67fa127b561d843c9fbcd7a03d | [
"MIT"
] | 1 | 2021-06-13T10:03:27.000Z | 2022-01-06T08:42:52.000Z | qa/rpc-tests/wallet-hd.py | combode/combode | 84664ec178de2b67fa127b561d843c9fbcd7a03d | [
"MIT"
] | 1 | 2021-02-07T05:29:08.000Z | 2021-02-07T05:29:08.000Z | #!/usr/bin/env python2
# coding=utf-8
# ^^^^^^^^^^^^ TODO remove when supporting only Python3
# Copyright (c) 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.
"""Test Hierarchical Deterministic walle... | 43.824561 | 108 | 0.638911 |
79676716a50c8b6586a96b1e331da1a09e48c20c | 36,498 | py | Python | contentcuration/contentcuration/viewsets/contentnode.py | vkWeb/studio | a990119ddf0c243521efd8814291bc76ca012eb6 | [
"MIT"
] | null | null | null | contentcuration/contentcuration/viewsets/contentnode.py | vkWeb/studio | a990119ddf0c243521efd8814291bc76ca012eb6 | [
"MIT"
] | null | null | null | contentcuration/contentcuration/viewsets/contentnode.py | vkWeb/studio | a990119ddf0c243521efd8814291bc76ca012eb6 | [
"MIT"
] | null | null | null | import json
from functools import partial
from functools import reduce
from django.conf import settings
from django.db import IntegrityError
from django.db import models
from django.db.models import Exists
from django.db.models import F
from django.db.models import IntegerField as DjangoIntegerField
from django.db.mod... | 36.461538 | 127 | 0.618993 |
7967673625f8ec36976a62e6f195db6453eb9feb | 1,235 | py | Python | sqlalchemy_solr/solrdbapi/api_exceptions.py | roeeiit1/sqlalchemy-prometheus | ccd6404eab54a8aed147ed5a5d2134faeff41f99 | [
"MIT"
] | 8 | 2019-12-08T21:05:24.000Z | 2021-08-22T14:41:50.000Z | sqlalchemy_solr/solrdbapi/api_exceptions.py | roeeiit1/sqlalchemy-prometheus | ccd6404eab54a8aed147ed5a5d2134faeff41f99 | [
"MIT"
] | 6 | 2020-03-30T22:20:44.000Z | 2021-05-22T03:56:12.000Z | sqlalchemy_solr/solrdbapi/api_exceptions.py | roeeiit1/sqlalchemy-prometheus | ccd6404eab54a8aed147ed5a5d2134faeff41f99 | [
"MIT"
] | 4 | 2020-09-01T23:13:53.000Z | 2021-08-22T14:41:53.000Z | class Error(Exception): # noqa: B903
def __init__(self, message, httperror):
self.message = message
self.httperror = httperror
class AuthError(Error):
def __str__(self):
return repr(
"{msg} {type} {err}".format(
msg=self.message,
type="Authe... | 22.87037 | 64 | 0.531174 |
79676816f9209fdf7137450d6ce158660721aa61 | 4,159 | py | Python | nova_solaris/solariszones/volume_api.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | nova_solaris/solariszones/volume_api.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | nova_solaris/solariszones/volume_api.py | guillermomolina/nova-solaris | 2195f506b20e7f4a157fe9dcc9cd7a556d32a68c | [
"Apache-1.1"
] | null | null | null | # Copyright 2021, Guillermo Adrian Molina.
# Copyright (c) 2013, 2017, Oracle and/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. You may obtain
# a copy of the License at
#
# ... | 39.990385 | 78 | 0.672277 |
79676930a85d244af5766a71ae1982da8162d4bf | 3,749 | py | Python | thrift/lib/py3lite/client/test/sync_client_test.py | nathanawmk/fbthrift | 557cab1738eac15a00075a62389b50a3b6d900fc | [
"Apache-2.0"
] | null | null | null | thrift/lib/py3lite/client/test/sync_client_test.py | nathanawmk/fbthrift | 557cab1738eac15a00075a62389b50a3b6d900fc | [
"Apache-2.0"
] | null | null | null | thrift/lib/py3lite/client/test/sync_client_test.py | nathanawmk/fbthrift | 557cab1738eac15a00075a62389b50a3b6d900fc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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.091954 | 78 | 0.665244 |
79676b0d68927adc6f9d3450c6eb8653bd4733a4 | 171 | py | Python | swig/setup.py | anupamme/c-programs | 2b81380784587d237b0b9742a1758909fe7d01e4 | [
"Apache-2.0"
] | null | null | null | swig/setup.py | anupamme/c-programs | 2b81380784587d237b0b9742a1758909fe7d01e4 | [
"Apache-2.0"
] | null | null | null | swig/setup.py | anupamme/c-programs | 2b81380784587d237b0b9742a1758909fe7d01e4 | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup, Extension
extension_mod = Extension("_swigdemo", ["_swigdemo_module.cc", "hello.c"])
setup(name="swigdemo", ext_modules=[extension_mod])
| 42.75 | 74 | 0.777778 |
79676b3ad028765cdf259cf83e34ef73537b912a | 2,665 | py | Python | em_site/apps/users/views.py | RohanJnr/enlighten-me--SpaceJam | 3e49701489fe0400d947ef5104a4beb264ab0d2c | [
"MIT"
] | null | null | null | em_site/apps/users/views.py | RohanJnr/enlighten-me--SpaceJam | 3e49701489fe0400d947ef5104a4beb264ab0d2c | [
"MIT"
] | null | null | null | em_site/apps/users/views.py | RohanJnr/enlighten-me--SpaceJam | 3e49701489fe0400d947ef5104a4beb264ab0d2c | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.contrib.auth import get_user_model, authenticate, login, logout
from django.shortcuts import render, get_object_or_404, redirect
from django.views.generic import View
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Profile
U... | 31.72619 | 77 | 0.622139 |
79676b416a5c91c0adf8066d5e99955d580c1cb3 | 4,600 | py | Python | tests/test_retrieve.py | pavertomato/healthcare-api-dicomweb-cli-1 | 1037e0611dfaaf8a0373eb5c569a5391553a0ed0 | [
"Apache-2.0"
] | null | null | null | tests/test_retrieve.py | pavertomato/healthcare-api-dicomweb-cli-1 | 1037e0611dfaaf8a0373eb5c569a5391553a0ed0 | [
"Apache-2.0"
] | null | null | null | tests/test_retrieve.py | pavertomato/healthcare-api-dicomweb-cli-1 | 1037e0611dfaaf8a0373eb5c569a5391553a0ed0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Retrieve method tests
"""
import os
import shutil
import unittest
import httpretty
import pytest_check as check
from dcmweb import dcmweb
URL = "https://dicom.com/"
RETRIEVE_CASES = {"": ["1/2/3.dcm", "1/2/4.dcm", "3/2/1.dcm"],
"studies/1": ["1/2/3.dcm"],
... | 34.848485 | 109 | 0.551739 |
79676b6c0301f049e7d474eb0efbb947daa4f51c | 1,252 | py | Python | Tree/BinaryTree/Check_Full_BinaryTree.py | Amanjakhetiya/Data_Structures_Algorithms_In_Python | fb4487b3ec9e4485df44d24a887e5c92ea7afaee | [
"MIT"
] | 195 | 2019-06-06T16:28:59.000Z | 2022-03-20T10:55:12.000Z | Tree/BinaryTree/Check_Full_BinaryTree.py | Amanjakhetiya/Data_Structures_Algorithms_In_Python | fb4487b3ec9e4485df44d24a887e5c92ea7afaee | [
"MIT"
] | null | null | null | Tree/BinaryTree/Check_Full_BinaryTree.py | Amanjakhetiya/Data_Structures_Algorithms_In_Python | fb4487b3ec9e4485df44d24a887e5c92ea7afaee | [
"MIT"
] | 90 | 2019-06-06T07:28:23.000Z | 2022-03-09T10:03:51.000Z | # Check whether a binary tree is a full binary tree or not
class Node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def check_full_bt(root):
# If tree is empty
if root is None:
return True
# if both child are None
if root.left is ... | 25.55102 | 75 | 0.634185 |
79676b8bb299c2f3963efeb6edd564214f4fd416 | 91 | py | Python | centiapp/apps.py | iam-feysal/Centigram | e9f928b4b0732f32ac9f9446b5b7cc55dcd56e35 | [
"Unlicense"
] | 1 | 2018-10-09T21:37:11.000Z | 2018-10-09T21:37:11.000Z | centiapp/apps.py | iam-feysal/Centigram | e9f928b4b0732f32ac9f9446b5b7cc55dcd56e35 | [
"Unlicense"
] | 4 | 2021-03-18T21:10:48.000Z | 2021-09-08T00:32:27.000Z | centiapp/apps.py | iam-feysal/Centigram | e9f928b4b0732f32ac9f9446b5b7cc55dcd56e35 | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
class CentiappConfig(AppConfig):
name = 'centiapp'
| 15.166667 | 33 | 0.758242 |
79676bbbd863839a8cf6f744834ae678b285c08d | 4,081 | py | Python | chainer/functions/util/forget.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | 2 | 2018-02-05T07:25:48.000Z | 2018-08-28T20:29:45.000Z | chainer/functions/util/forget.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | null | null | null | chainer/functions/util/forget.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | 1 | 2018-08-23T01:34:57.000Z | 2018-08-23T01:34:57.000Z | from chainer import cuda
from chainer import function
from chainer import variable
class _DummyFunction(function.Function):
def __init__(self, grads):
self.grads = grads
def forward(self, inputs):
xp = cuda.get_array_module(*inputs)
return xp.array(0),
def backward(self, inputs,... | 33.727273 | 79 | 0.611615 |
79676cbfcd99bcdd897dd5b2a41f21006e9f798f | 7,170 | py | Python | tests/util/test_package.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | tests/util/test_package.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | tests/util/test_package.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """Test Home Assistant package util methods."""
import asyncio
import logging
import os
import sys
from subprocess import PIPE
from unittest.mock import MagicMock, call, patch
import pkg_resources
import pytest
import homeassistant.util.package as package
RESOURCE_DIR = os.path.abspath(
os.path.join(os.path.dir... | 28.339921 | 80 | 0.647978 |
79676ced88b13a9c1edea39c2e034cdd664995fe | 7,935 | py | Python | btb_manager_telegram/utils.py | haivle/BTB-manager-telegram | c0f71c5a98a3d128ad03578930932737dc580ed1 | [
"MIT"
] | 3 | 2021-09-24T10:49:23.000Z | 2021-11-18T13:38:17.000Z | btb_manager_telegram/utils.py | haivle/BTB-manager-telegram | c0f71c5a98a3d128ad03578930932737dc580ed1 | [
"MIT"
] | null | null | null | btb_manager_telegram/utils.py | haivle/BTB-manager-telegram | c0f71c5a98a3d128ad03578930932737dc580ed1 | [
"MIT"
] | 2 | 2021-11-03T17:57:07.000Z | 2022-02-01T11:55:54.000Z | import json
import os
import subprocess
from time import sleep
from typing import List, Optional
import psutil
import telegram
import yaml
from telegram import Bot
from btb_manager_telegram import logger, scheduler, settings
def setup_root_path_constant():
if settings.ROOT_PATH is None:
logger.info("No ... | 31.74 | 117 | 0.596723 |
79676cf00459e05c17d032bff60a3a33a429dd84 | 2,165 | py | Python | tools/tiny-test-fw/Utility/GitlabCIJob.py | Fluepke/esp-idf | c1c49b635a6c59b4ca0c4a285e490545241e7a73 | [
"Apache-2.0"
] | 1 | 2018-04-24T13:08:57.000Z | 2018-04-24T13:08:57.000Z | tools/tiny-test-fw/Utility/GitlabCIJob.py | Fluepke/esp-idf | c1c49b635a6c59b4ca0c4a285e490545241e7a73 | [
"Apache-2.0"
] | null | null | null | tools/tiny-test-fw/Utility/GitlabCIJob.py | Fluepke/esp-idf | c1c49b635a6c59b4ca0c4a285e490545241e7a73 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
#
# 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 ... | 29.256757 | 83 | 0.599538 |
79676d2e31cbedda43d5dcaccf888af7e473206e | 1,283 | py | Python | custom_components/ipx800v5/button.py | Aohzan/ipx800v5 | 2aeaa6e7f5f9cb19469d334fc13ce6aab19441b6 | [
"Apache-2.0"
] | 2 | 2021-12-03T23:53:22.000Z | 2022-01-20T10:53:05.000Z | custom_components/ipx800v5/button.py | Aohzan/ipx800v5 | 2aeaa6e7f5f9cb19469d334fc13ce6aab19441b6 | [
"Apache-2.0"
] | 3 | 2021-12-06T21:28:54.000Z | 2022-01-20T10:16:30.000Z | custom_components/ipx800v5/button.py | Aohzan/ipx800v5 | 2aeaa6e7f5f9cb19469d334fc13ce6aab19441b6 | [
"Apache-2.0"
] | null | null | null | """Support for IPX800 V5 button."""
import logging
from pypx800v5.const import IPX
from homeassistant.components.button import ButtonEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .con... | 30.547619 | 79 | 0.746687 |
79676d9d355abfcb195ca6ad123483d2e3249a04 | 5,034 | py | Python | apps/product_catalog/app.py | prayeole/eks-app-mesh-polyglot-demo | 8006c40f24b58fb0370a9a7700c6fae6a10254a8 | [
"MIT-0"
] | 17 | 2021-02-18T17:39:49.000Z | 2022-01-21T21:05:49.000Z | apps/product_catalog/app.py | prayeole/eks-app-mesh-polyglot-demo | 8006c40f24b58fb0370a9a7700c6fae6a10254a8 | [
"MIT-0"
] | 10 | 2021-07-12T00:12:55.000Z | 2022-02-18T08:30:08.000Z | apps/product_catalog/app.py | prayeole/eks-app-mesh-polyglot-demo | 8006c40f24b58fb0370a9a7700c6fae6a10254a8 | [
"MIT-0"
] | 31 | 2021-02-25T15:08:52.000Z | 2022-03-21T17:26:15.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import werkzeug
werkzeug.cached_property = werkzeug.utils.cached_property
from flask import Flask, request, url_for
from flask_restplus import Api, Resource, fields
from flask_cors import CORS
import requests
import os... | 37.849624 | 107 | 0.639452 |
79676e4321879d9c6c00a76cae15314bc6b9f4f2 | 643 | py | Python | backend/manage.py | crowdbotics-apps/my-incredible-app-29251 | ce45f4714e5059f251ede6c5ef582f688600d32b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/my-incredible-app-29251 | ce45f4714e5059f251ede6c5ef582f688600d32b | [
"FTL",
"AML",
"RSA-MD"
] | 5 | 2021-07-28T16:39:46.000Z | 2021-07-28T16:55:28.000Z | backend/manage.py | crowdbotics-apps/my-incredible-app-29251 | ce45f4714e5059f251ede6c5ef582f688600d32b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_incredible_app_29251.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.227273 | 87 | 0.690513 |
79677000dee9837f44af99d8fdcfe8cce8fc2326 | 3,170 | py | Python | production/avotes-parser-core/tests/test_abi.py | lidofinance/AVotesParser | be8df15b79f4005f26733ba5eed2de714bcfd731 | [
"MIT"
] | null | null | null | production/avotes-parser-core/tests/test_abi.py | lidofinance/AVotesParser | be8df15b79f4005f26733ba5eed2de714bcfd731 | [
"MIT"
] | null | null | null | production/avotes-parser-core/tests/test_abi.py | lidofinance/AVotesParser | be8df15b79f4005f26733ba5eed2de714bcfd731 | [
"MIT"
] | null | null | null | """Tests of getting ABI from different sources."""
import os
from collections import namedtuple
import pytest
from avotes_parser.core import decode_function_call
from avotes_parser.core.ABI import get_cached_combined
from avotes_parser.core.ABI.storage import CachedStorage, ABIKey
CUR_DIR = os.path.dirname(os.path.a... | 28.303571 | 70 | 0.683281 |
7967714ea3ec8e670478517dcacf7af30acb0175 | 1,189 | py | Python | xlsxwriter/test/comparison/test_set_start_page01.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_set_start_page01.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_set_start_page01.py | totdiao/XlsxWriter | 3d65858d8933bddb8262d500bcc2005f28fde645 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 25.297872 | 82 | 0.615643 |
7967715e9045ef77d18a2478c419456e5759abcb | 176,069 | py | Python | tamil/txt2unicode/encode2utf8.py | msathia/open-tamil | 8e98a584dcf56ac8fe7529464114151f7357c746 | [
"MIT"
] | 1 | 2020-05-20T13:54:24.000Z | 2020-05-20T13:54:24.000Z | tamil/txt2unicode/encode2utf8.py | AasaiAlangaram/open-tamil | 6679c60148f0dddc287a892b8c9aaf8a159e99f0 | [
"MIT"
] | null | null | null | tamil/txt2unicode/encode2utf8.py | AasaiAlangaram/open-tamil | 6679c60148f0dddc287a892b8c9aaf8a159e99f0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
# #
# (C) 2014 Arulalan.T <arulalant@gmail.com> #
# ... | 17.175788 | 83 | 0.152418 |
796771796e8742d281aa3c037fc7ed925689c6aa | 324 | py | Python | fastapi-master-api/app/api/router.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | 1 | 2021-12-25T09:19:25.000Z | 2021-12-25T09:19:25.000Z | fastapi-master-api/app/api/router.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | null | null | null | fastapi-master-api/app/api/router.py | SionAbes/fullstack-porfolio | 6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9 | [
"MIT"
] | null | null | null | from app.api import adapters, auth, machines, metrics, users
from fastapi import APIRouter
api_router = APIRouter()
api_router.include_router(adapters.router)
api_router.include_router(auth.router)
api_router.include_router(machines.router)
api_router.include_router(metrics.router)
api_router.include_router(users.rout... | 32.4 | 60 | 0.848765 |
796771efa89abd82e6d1fb2474f41897ae981fda | 2,001 | py | Python | setup.py | aymgal/hierArc | a52cb6f2ad1d7a8cbd08c215ef7d5189fa329269 | [
"BSD-3-Clause"
] | null | null | null | setup.py | aymgal/hierArc | a52cb6f2ad1d7a8cbd08c215ef7d5189fa329269 | [
"BSD-3-Clause"
] | null | null | null | setup.py | aymgal/hierArc | a52cb6f2ad1d7a8cbd08c215ef7d5189fa329269 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
import os
import sys
from setuptools.command.test import test as TestCommand
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
... | 29.426471 | 134 | 0.667666 |
796772d73fd3db4697b07e72b19fbd62cd2d4858 | 8,418 | py | Python | python-etcd-0.4.5/src/etcd/auth.py | ZhangFly/MUISeverSourceCode | aef1a2447e508f26924a554828023adc374c5adb | [
"Apache-2.0"
] | 6 | 2015-09-22T10:22:20.000Z | 2015-09-22T16:33:27.000Z | src/etcd/auth.py | akuzminsky/python-etcd | 0d0145f5e835aa032c97a0a5e09c4c68b7a03f66 | [
"MIT"
] | 10 | 2015-04-16T08:27:42.000Z | 2015-07-17T08:14:18.000Z | src/etcd/auth.py | akuzminsky/python-etcd | 0d0145f5e835aa032c97a0a5e09c4c68b7a03f66 | [
"MIT"
] | 6 | 2015-09-07T14:33:47.000Z | 2022-03-16T16:27:36.000Z | import json
import logging
import etcd
_log = logging.getLogger(__name__)
class EtcdAuthBase(object):
entity = 'example'
def __init__(self, client, name):
self.client = client
self.name = name
self.uri = "{}/auth/{}s/{}".format(self.client.version_prefix,
... | 32.882813 | 80 | 0.536826 |
79677348e19df6a227789875552765bdd17a95bd | 38,092 | py | Python | bin/detail/toolchain_table.py | rrbpalm/polly | ce5e1f1582be7ef7f9c6a31962a8842b40f107c8 | [
"BSD-2-Clause"
] | null | null | null | bin/detail/toolchain_table.py | rrbpalm/polly | ce5e1f1582be7ef7f9c6a31962a8842b40f107c8 | [
"BSD-2-Clause"
] | null | null | null | bin/detail/toolchain_table.py | rrbpalm/polly | ce5e1f1582be7ef7f9c6a31962a8842b40f107c8 | [
"BSD-2-Clause"
] | 1 | 2021-11-17T05:36:27.000Z | 2021-11-17T05:36:27.000Z | # Copyright (c) 2014, Ruslan Baratov & Luca Martini
# Copyright (c) 2014, Michele Caini
# Copyright (c) 2017, Robert Nitsch
# Copyright (c) 2018, David Hirvonen
# Copyright (c) 2018, Richard Hodges
# All rights reserved.
import os
import platform
class Toolchain:
def __init__(
self,
name,
generato... | 53.275524 | 130 | 0.639216 |
79677349efd37f7dff572697a36663c5387089d5 | 9,693 | py | Python | fanficfare/adapters/adapter_scarvesandcoffeenet.py | smutandrea/FanFicFare | 56e91c1f73bd2444d7cf7adea9975b169692657d | [
"Apache-2.0"
] | 1 | 2020-08-27T03:49:02.000Z | 2020-08-27T03:49:02.000Z | fanficfare/adapters/adapter_scarvesandcoffeenet.py | Hypernoc/FanFicFare | 869ed37137c82cd71ec589f36bc2001528d5e76c | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_scarvesandcoffeenet.py | Hypernoc/FanFicFare | 869ed37137c82cd71ec589f36bc2001528d5e76c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2012 Fanficdownloader team, 2018 FanFicFare team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 39.888889 | 157 | 0.595069 |
796773b19de5c3568fa6c601dccc4f086de8ff38 | 4,116 | py | Python | chroma_core/management/commands/print-settings.py | intel-hpdd/-intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 52 | 2018-09-13T03:26:23.000Z | 2022-03-25T16:51:37.000Z | chroma_core/management/commands/print-settings.py | intel-hpdd/-intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 1,264 | 2018-06-15T19:50:57.000Z | 2022-03-28T08:19:04.000Z | chroma_core/management/commands/print-settings.py | whamcloud/intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 27 | 2018-06-18T08:51:59.000Z | 2022-03-16T15:35:34.000Z | # Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import settings
import glob
import json
import os
from django.db import connection
from django.core.management.commands.runserver import Command as BaseCommand
class Co... | 44.258065 | 90 | 0.655005 |
7967751025e326440d8fb77bb4145920983142ba | 724 | py | Python | FILE_RENAME_TOOL/main.py | akshattrivedi/awesome-python-projects | de4a652c48442be40a6c09f4b6d7e134ea0056f0 | [
"MIT"
] | 7 | 2020-12-25T19:56:25.000Z | 2021-11-07T04:04:52.000Z | FILE_RENAME_TOOL/main.py | akshattrivedi/awesome-python-projects | de4a652c48442be40a6c09f4b6d7e134ea0056f0 | [
"MIT"
] | null | null | null | FILE_RENAME_TOOL/main.py | akshattrivedi/awesome-python-projects | de4a652c48442be40a6c09f4b6d7e134ea0056f0 | [
"MIT"
] | 1 | 2022-02-20T17:51:01.000Z | 2022-02-20T17:51:01.000Z | #!/usr/bin/env python3
import os
import sys
########## PREFIX TOBE USED BY NEW FILES ###########
prefix = input("Enter the Prefix- you want to use for each file e.g. nucleus: nucleus-1.jpg, nucleus-2.jpg,... \n")
########## DO NOT CHANGE BELOW, UNTIL YOU ARE A DEVELOPER ;) ############
for count, file in enume... | 28.96 | 115 | 0.59116 |
79677529125c1c86aff936df037af6c7623aebbb | 4,622 | py | Python | python/example_code/sts/sts_temporary_credentials/test/test_assume_role.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 5,166 | 2016-09-02T08:48:38.000Z | 2022-03-31T19:12:43.000Z | python/example_code/sts/sts_temporary_credentials/test/test_assume_role.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 1,186 | 2016-09-28T23:05:19.000Z | 2022-03-31T18:07:47.000Z | python/example_code/sts/sts_temporary_credentials/test/test_assume_role.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 4,003 | 2016-08-29T19:51:40.000Z | 2022-03-31T16:40:02.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Unit tests for AWS Security Token Service (AWS STS) usage functions.
"""
import json
import unittest.mock
import pytest
import requests
import boto3
from botocore.exceptions import ClientError
import assume... | 39.169492 | 87 | 0.742752 |
7967752dca5967faaf1f39d264c9e5510e79907b | 525 | py | Python | scripts/exercicios/ex042.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | scripts/exercicios/ex042.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | scripts/exercicios/ex042.py | RuanBarretodosSantos/python | 4142ccd71c4ffb4bb6a10d61c85f612758f5bb41 | [
"MIT"
] | null | null | null | r1 = float(input('Primeiro segmento: '))
r2 = float(input('Segundo segmento: '))
r3 = float(input('Terceiro segmento: '))
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2:
if r1 == r2 == r3:
print('Os segmentos acima PODEM FORMAR um trangulo EQUILÁTERO!')
elif r1 != r2 == r3 and r2 != r1 == r3 and r3 !... | 43.75 | 72 | 0.611429 |
7967757a66e6a3e5d29ecf0dd50b5cb0da44efb8 | 3,592 | py | Python | games/xworld3d/tasks/XWorld3DNavTargetNear.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | games/xworld3d/tasks/XWorld3DNavTargetNear.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | games/xworld3d/tasks/XWorld3DNavTargetNear.py | emailweixu/XWorld | 3c5f2180e2152f5d96dde1c1a27c96af07525a4c | [
"Apache-2.0"
] | null | null | null | import random
from xworld3d_task import XWorld3DTask
from maze2d import print_env
"""
This file implements an xworld teaching task.
The task class contains several stage functions.
Each stage function must return three outputs:
next_stage - the name of the next stage function
reward - the reward of the current... | 32.071429 | 90 | 0.583797 |
796777a650b0cf991242639ff1abc8f6f6a8d1bc | 425 | py | Python | src/DungeonsDragons/Game/AreaOfEffect.py | DieAntonie/eventstore-python | 1f162a466bcfdf6138248b6a89b4b6df1ce67c6c | [
"BSD-3-Clause"
] | 1 | 2021-10-02T20:59:57.000Z | 2021-10-02T20:59:57.000Z | src/DungeonsDragons/Game/AreaOfEffect.py | DieAntonie/eventstore-python | 1f162a466bcfdf6138248b6a89b4b6df1ce67c6c | [
"BSD-3-Clause"
] | 2 | 2020-03-24T16:36:16.000Z | 2020-03-24T16:51:03.000Z | src/DungeonsDragons/Game/AreaOfEffect.py | DieAntonie/eventstore-python | 1f162a466bcfdf6138248b6a89b4b6df1ce67c6c | [
"BSD-3-Clause"
] | null | null | null |
class AreaOfEffect(object):
pass
class Cone(AreaOfEffect):
def __init__(self, length):
pass
class Cube(AreaOfEffect):
def __init__(self, length):
pass
class Cylinder(AreaOfEffect):
def __init__(self, radius, height):
pass
class Line(AreaOfEffect):
def __init__(self,... | 14.166667 | 39 | 0.644706 |
796777faaf1b2819023230c5641868e0c7e55fe6 | 451 | py | Python | HW3/cloudmesh_rebecca/cloudmesh_rebecca/command_rebecca.py | futuresystems/465-rebecca-appelbaum | 42db017aabb4c58438fd06a38d34e0ffe86b5400 | [
"Apache-2.0"
] | null | null | null | HW3/cloudmesh_rebecca/cloudmesh_rebecca/command_rebecca.py | futuresystems/465-rebecca-appelbaum | 42db017aabb4c58438fd06a38d34e0ffe86b5400 | [
"Apache-2.0"
] | null | null | null | HW3/cloudmesh_rebecca/cloudmesh_rebecca/command_rebecca.py | futuresystems/465-rebecca-appelbaum | 42db017aabb4c58438fd06a38d34e0ffe86b5400 | [
"Apache-2.0"
] | null | null | null | from cloudmesh_base.Shell import Shell
class command_rebecca(object):
@classmethod
def status(cls, host):
msg = "Unknown host"
try:
#msg = Shell.ping("-c", "1", host)
print "It worked!!"
except:
pass
if "1 packets transmitted, 1 packets received" i... | 22.55 | 62 | 0.538803 |
79677871d0a7582e7572fa77f31f453ff0781c53 | 2,149 | py | Python | pythran/dist.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | 1 | 2018-03-24T00:33:03.000Z | 2018-03-24T00:33:03.000Z | pythran/dist.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | null | null | null | pythran/dist.py | cclauss/pythran | 6f9fc994d34fc0ed328a199ee6fec8499049a7f8 | [
"BSD-3-Clause"
] | null | null | null | '''
This modules contains a distutils extension mechanism for Pythran
* PythranExtension: is used as distutils's Extension
'''
import pythran.config as cfg
import pythran.toolchain as tc
from numpy.distutils.extension import Extension
import os.path
import os
class PythranExtension(Extension):
'''
Desc... | 34.111111 | 77 | 0.590507 |
7967787a92323ed2e6cce8f69561806dcf700ef0 | 6,775 | py | Python | cs15211/OpentheLock.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2021-07-05T01:53:30.000Z | 2021-07-05T01:53:30.000Z | cs15211/OpentheLock.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | null | null | null | cs15211/OpentheLock.py | JulyKikuAkita/PythonPrac | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | [
"Apache-2.0"
] | 1 | 2018-01-08T07:14:08.000Z | 2018-01-08T07:14:08.000Z | __source__ = 'https://leetcode.com/problems/open-the-lock/'
# Time: O()
# Space: O()
#
# Description: Leetcode # 752. Open the Lock
#
# You have a lock in front of you with 4 circular wheels.
# Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'.
# The wheels can rotate freely and wrap around: fo... | 32.261905 | 104 | 0.533284 |
7967787a9683a9ca3fb12d8c9b6393985dbc055d | 9,802 | py | Python | imgviz/draw.py | aligholami/imgviz | 8f96b2b1af58bffae86e2ed56bc9985dfb92e470 | [
"MIT"
] | null | null | null | imgviz/draw.py | aligholami/imgviz | 8f96b2b1af58bffae86e2ed56bc9985dfb92e470 | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/imgviz/draw.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | import collections
import os.path as osp
import numpy as np
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
from . import color as color_module
def triangle(src, center, size, fill=None, outline=None):
"""Draw triangle on numpy array with Pillow.
Parameters
----------
src: numpy.ndarray
... | 24.083538 | 79 | 0.555397 |
7967791b571350c6260b9d3f24387e5fa92f1dcf | 3,509 | py | Python | neural_clbf/training/train_inverted_pendulum.py | saxenam06/neural_clbf | 1f2a43b579330172a03f284a5673b00f0899c755 | [
"BSD-3-Clause"
] | null | null | null | neural_clbf/training/train_inverted_pendulum.py | saxenam06/neural_clbf | 1f2a43b579330172a03f284a5673b00f0899c755 | [
"BSD-3-Clause"
] | null | null | null | neural_clbf/training/train_inverted_pendulum.py | saxenam06/neural_clbf | 1f2a43b579330172a03f284a5673b00f0899c755 | [
"BSD-3-Clause"
] | null | null | null | from argparse import ArgumentParser
import torch
import torch.multiprocessing
import pytorch_lightning as pl
from pytorch_lightning import loggers as pl_loggers
import numpy as np
from neural_clbf.controllers import NeuralCLBFController
from neural_clbf.datamodules.episodic_datamodule import (
EpisodicDataModule,... | 26.583333 | 83 | 0.639213 |
79677adc976f8e18b3806a200e4c201cf15a423e | 1,066 | py | Python | tilecutter/utils.py | brendan-ward/raster-tilecutter | 4d7d48d3cf90ea6c43836bb00b9836fce5f20ca7 | [
"MIT"
] | 4 | 2020-03-04T00:58:36.000Z | 2022-03-31T11:28:46.000Z | tilecutter/utils.py | brendan-ward/raster-tilecutter | 4d7d48d3cf90ea6c43836bb00b9836fce5f20ca7 | [
"MIT"
] | null | null | null | tilecutter/utils.py | brendan-ward/raster-tilecutter | 4d7d48d3cf90ea6c43836bb00b9836fce5f20ca7 | [
"MIT"
] | 1 | 2022-03-30T22:16:29.000Z | 2022-03-30T22:16:29.000Z | def get_dtype(max_value):
"""
Calculate the appropriate dtype that will contain the max value
Parameters
----------
max_value : number
max encoded value
Returns
-------
numpy dtype string
"""
if max_value <= 255:
return "uint8"
if max_value <= 65535:
... | 21.32 | 78 | 0.596623 |
79677b514d45f0a0f3bffe5f19a72999ded1631b | 32,602 | py | Python | scipy/optimize/tests/test_minpack.py | mwtoews/scipy | 3edebe0cb4831ffd52cbd4a5b5550fa16789e441 | [
"BSD-3-Clause"
] | null | null | null | scipy/optimize/tests/test_minpack.py | mwtoews/scipy | 3edebe0cb4831ffd52cbd4a5b5550fa16789e441 | [
"BSD-3-Clause"
] | null | null | null | scipy/optimize/tests/test_minpack.py | mwtoews/scipy | 3edebe0cb4831ffd52cbd4a5b5550fa16789e441 | [
"BSD-3-Clause"
] | null | null | null | """
Unit tests for optimization routines from minpack.py.
"""
from __future__ import division, print_function, absolute_import
import warnings
from numpy.testing import (assert_, assert_almost_equal, assert_array_equal,
assert_array_almost_equal, assert_allclose)
from pytest import raises a... | 37.216895 | 113 | 0.555886 |
79677bca1cf3a7ec9fb15e0f484181dda27d084a | 8,710 | py | Python | test/functional/wallet_signer.py | dmuralov/particl-core | ac4dc00b7cd6293329ff4bf3acaa65636238910a | [
"MIT"
] | null | null | null | test/functional/wallet_signer.py | dmuralov/particl-core | ac4dc00b7cd6293329ff4bf3acaa65636238910a | [
"MIT"
] | null | null | null | test/functional/wallet_signer.py | dmuralov/particl-core | ac4dc00b7cd6293329ff4bf3acaa65636238910a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test external signer.
Verify that a bitcoind node can use an external signer command
See also rpc_sign... | 45.842105 | 226 | 0.661653 |
79677c524299a769c716b175a2f8065776e0f73a | 390 | py | Python | Flask/NationalEducationRadio/NationalEducationRadio/models/form/CaptionForm.py | Jessieluu/WIRL_national_education_radio | edb8b63c25bc7bd5a9a7d074173f02913971f8a7 | [
"MIT"
] | null | null | null | Flask/NationalEducationRadio/NationalEducationRadio/models/form/CaptionForm.py | Jessieluu/WIRL_national_education_radio | edb8b63c25bc7bd5a9a7d074173f02913971f8a7 | [
"MIT"
] | null | null | null | Flask/NationalEducationRadio/NationalEducationRadio/models/form/CaptionForm.py | Jessieluu/WIRL_national_education_radio | edb8b63c25bc7bd5a9a7d074173f02913971f8a7 | [
"MIT"
] | null | null | null | from flask.ext.wtf import Form
from wtforms import StringField, HiddenField
from wtforms.validators import DataRequired
from wtforms.widgets import TextArea
class CaptionForm(Form):
"""
傳送關鍵字用的表單
"""
caption_id = HiddenField(validators=[DataRequired(message="不能沒有 ID ")])
caption_content = String... | 26 | 97 | 0.75641 |
79677c661461851f8438ea6751eebd872e2c8db2 | 3,051 | py | Python | prepare.py | wingcon/openstack-gitlab-executor | 92a9d2276b522c51cb0a4b58627aa621cc7e64e4 | [
"MIT"
] | null | null | null | prepare.py | wingcon/openstack-gitlab-executor | 92a9d2276b522c51cb0a4b58627aa621cc7e64e4 | [
"MIT"
] | null | null | null | prepare.py | wingcon/openstack-gitlab-executor | 92a9d2276b522c51cb0a4b58627aa621cc7e64e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import traceback
import openstack
import paramiko
from tenacity import retry
from tenacity import stop_after_attempt
from tenacity import wait_fixed
import env
def provision_server(conn: openstack.connection.Connection) -> openstack.compute.v2.server.Server:
image = conn.compute... | 32.115789 | 98 | 0.637168 |
79677c67ce72bbe2adfa34c29af0fc8a7cb5725e | 956 | py | Python | doc/_source/codes/scheme_D1Q22_shallow_water.py | Mopolino8/pylbm | b457ccdf1e7a1009807bd1136a276886f81a9e7d | [
"BSD-3-Clause"
] | null | null | null | doc/_source/codes/scheme_D1Q22_shallow_water.py | Mopolino8/pylbm | b457ccdf1e7a1009807bd1136a276886f81a9e7d | [
"BSD-3-Clause"
] | null | null | null | doc/_source/codes/scheme_D1Q22_shallow_water.py | Mopolino8/pylbm | b457ccdf1e7a1009807bd1136a276886f81a9e7d | [
"BSD-3-Clause"
] | 1 | 2019-11-24T17:13:26.000Z | 2019-11-24T17:13:26.000Z |
# Authors:
# Loic Gouarin <loic.gouarin@polytechnique.edu>
# Benjamin Graille <benjamin.graille@math.u-psud.fr>
#
# License: BSD 3 clause
"""
Example of a double D1Q2 for shallow water
"""
import sympy as sp
import pylbm
# parameters
h, q, X, LA, g = sp.symbols('h, q, X, LA, g')
la = 2. # veloci... | 22.761905 | 56 | 0.50523 |
79677cdc4efb9f35d5c53f1dbedd53db3438d2e5 | 2,487 | py | Python | emwiki/accounts/forms.py | Furushiima/emwiki | 7d1dda94186c260cf555b2e716fb133f5aee859c | [
"MIT"
] | 2 | 2021-12-20T16:37:24.000Z | 2021-12-21T00:43:17.000Z | emwiki/accounts/forms.py | Furushiima/emwiki | 7d1dda94186c260cf555b2e716fb133f5aee859c | [
"MIT"
] | null | null | null | emwiki/accounts/forms.py | Furushiima/emwiki | 7d1dda94186c260cf555b2e716fb133f5aee859c | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.forms import (
AuthenticationForm, UserCreationForm, PasswordChangeForm,
PasswordResetForm, SetPasswordForm
)
from accounts.models import User
class MyUserCreationForm(UserCreationForm):
email = forms.EmailField(label='Email', required=True)
class Me... | 28.586207 | 66 | 0.629674 |
79677d5fa7d4daabaf9406bf36723b54f509ae62 | 21,756 | py | Python | te/GET_AND_RUN_DOCKER_IMAGE.py | priyadarshitathagat/te-ns | 8ef414a0eafe59b6ec4521ec3c31df8d964acc98 | [
"BSD-2-Clause"
] | 43 | 2020-11-12T12:54:53.000Z | 2022-03-22T20:11:02.000Z | te/GET_AND_RUN_DOCKER_IMAGE.py | priyadarshitathagat/te-ns | 8ef414a0eafe59b6ec4521ec3c31df8d964acc98 | [
"BSD-2-Clause"
] | 30 | 2020-11-12T12:44:08.000Z | 2022-03-24T08:53:32.000Z | te/GET_AND_RUN_DOCKER_IMAGE.py | priyadarshitathagat/te-ns | 8ef414a0eafe59b6ec4521ec3c31df8d964acc98 | [
"BSD-2-Clause"
] | 4 | 2021-05-10T11:34:01.000Z | 2021-12-06T21:54:46.000Z | #**********************************************************************************************
# Traffic Emulator for Network Services
# Copyright 2020 VMware, Inc
# The BSD-2 license (the "License") set forth below applies to all parts of
# the Traffic Emulator for Network Services project. You may not use this file
... | 45.514644 | 132 | 0.561041 |
79677debdfa2fbf60d79475438ca8c26a83542d9 | 120 | py | Python | examples/test_crosswords.py | bhshp/muwgs | ef1b0c15872dc1321ab09fda721f8db1a1ac56be | [
"MIT"
] | null | null | null | examples/test_crosswords.py | bhshp/muwgs | ef1b0c15872dc1321ab09fda721f8db1a1ac56be | [
"MIT"
] | null | null | null | examples/test_crosswords.py | bhshp/muwgs | ef1b0c15872dc1321ab09fda721f8db1a1ac56be | [
"MIT"
] | null | null | null | from muwgs.application.crosswords import crosswords
from sys import path
path.append('..')
print(crosswords('b*eed'))
| 17.142857 | 51 | 0.766667 |
79677ebe697733a7be43c59aa92d88e03f9b9531 | 332 | py | Python | Cuadruplo.py | luispc111/Groot-Compiler | 7217ee06e64bc3945376b9e1940c85557cc54e2e | [
"MIT"
] | null | null | null | Cuadruplo.py | luispc111/Groot-Compiler | 7217ee06e64bc3945376b9e1940c85557cc54e2e | [
"MIT"
] | null | null | null | Cuadruplo.py | luispc111/Groot-Compiler | 7217ee06e64bc3945376b9e1940c85557cc54e2e | [
"MIT"
] | null | null | null | class Cuadruplo:
# Constructor
def __init__(self, operador, operando_i, operando_d, res):
self.operador = operador
self.operando_i = operando_i
self.operando_d = operando_d
self.res = res
# Retorna un cuadruplo
def getCuadruplo(self):
return [self.operador, self.operando_i, self.operando_d... | 25.538462 | 70 | 0.71988 |
79677f31059d392c1b62957eccc4f5f8aa062873 | 922 | py | Python | photography/plot_serial_numbers.py | RomanKosobrodov/serial-numbers-production-years | 69be5eb53dc6e0713ae7c7e948a2121c0afc80d4 | [
"MIT"
] | null | null | null | photography/plot_serial_numbers.py | RomanKosobrodov/serial-numbers-production-years | 69be5eb53dc6e0713ae7c7e948a2121c0afc80d4 | [
"MIT"
] | null | null | null | photography/plot_serial_numbers.py | RomanKosobrodov/serial-numbers-production-years | 69be5eb53dc6e0713ae7c7e948a2121c0afc80d4 | [
"MIT"
] | null | null | null | from photography.serial_numbers import SERIAL_NUMBERS
import matplotlib.pyplot as plt
import numpy as np
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Plot serial numbers vs. production years")
parser.add_argument("manufacturer", help="Manufacturer", type=str)
arg... | 32.928571 | 92 | 0.669197 |
796781aeb47dba1af2466a1d899569b3e4459e90 | 945 | py | Python | docassemble_webapp/docassemble/webapp/translations.py | cschwarz007/docassemble | 0aa10d6012aa501879385bc446b2f977c5bffd83 | [
"MIT"
] | 568 | 2016-01-08T19:05:06.000Z | 2022-03-30T19:44:47.000Z | docassemble_webapp/docassemble/webapp/translations.py | hsarji/docassemble | 8f9f1766e7b8e9857efb1b94046e669d2f95cc29 | [
"MIT"
] | 348 | 2016-01-25T02:17:36.000Z | 2022-03-27T21:22:43.000Z | docassemble_webapp/docassemble/webapp/translations.py | hsarji/docassemble | 8f9f1766e7b8e9857efb1b94046e669d2f95cc29 | [
"MIT"
] | 262 | 2016-01-14T23:09:50.000Z | 2022-03-23T15:06:08.000Z | from flask import session, request
from flask_login import current_user
from docassemble.base.functions import set_language, parse_accept_language
from docassemble.base.config import daconfig
DEFAULT_LANGUAGE = daconfig.get('language', 'en')
def setup_translation():
language = None
if current_user.is_authentic... | 36.346154 | 77 | 0.660317 |
796781ec7d406d2f3414a46812fc467d031ea2dd | 223 | py | Python | lib/__init__.py | kostyaby/fc-helper | 727b4418a832cad73fbf3a76b07973ec7dd8f49f | [
"MIT"
] | null | null | null | lib/__init__.py | kostyaby/fc-helper | 727b4418a832cad73fbf3a76b07973ec7dd8f49f | [
"MIT"
] | null | null | null | lib/__init__.py | kostyaby/fc-helper | 727b4418a832cad73fbf3a76b07973ec7dd8f49f | [
"MIT"
] | null | null | null | from constant import *
from clock import *
from sorting_strategies import *
from tracked_directory import *
from tracked_entity import *
from config import *
from database import *
from blender import *
from mover import *
| 22.3 | 32 | 0.798206 |
7967831c9800846f3a1facfcdd35a7042df4f3e1 | 2,223 | py | Python | ocrcopy/ocrcopy.py | jasonfyw/ocr-copy | cb79553f0b323759dd411d1fa5e0379c8ae31ff5 | [
"MIT"
] | 1 | 2022-03-03T14:27:26.000Z | 2022-03-03T14:27:26.000Z | ocrcopy/ocrcopy.py | jasonfyw/ocr-copy | cb79553f0b323759dd411d1fa5e0379c8ae31ff5 | [
"MIT"
] | null | null | null | ocrcopy/ocrcopy.py | jasonfyw/ocr-copy | cb79553f0b323759dd411d1fa5e0379c8ae31ff5 | [
"MIT"
] | null | null | null | from pynput import mouse
import pyscreenshot
import pytesseract
import pyperclip
import numpy as np
from PIL import ImageOps, ImageEnhance
"""
Handles the backend stuff
"""
class OCRCopy():
def __init__(self, langs):
self.langs = langs
# start a mouse listener
self.x1, self.x2, self.y1, s... | 29.25 | 96 | 0.569051 |
7967848cbcadfbf899052a58dfc8d9a3eb14b5ee | 424 | py | Python | examples/example1.py | tvanderbruggen/SciCpp | 09408506c8d0b49ca5dadb8cd1f3cb4db41c8c46 | [
"MIT"
] | 2 | 2021-08-02T09:03:30.000Z | 2022-02-17T11:58:05.000Z | examples/example1.py | tvanderbruggen/SciCpp | 09408506c8d0b49ca5dadb8cd1f3cb4db41c8c46 | [
"MIT"
] | null | null | null | examples/example1.py | tvanderbruggen/SciCpp | 09408506c8d0b49ca5dadb8cd1f3cb4db41c8c46 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
# Copyright (c) 2019-2021 Thomas Vanderbruggen <th.vanderbruggen@gmail.com>
import numpy as np
if __name__ == "__main__":
a = np.linspace(0.0, 10.0, 100)
print(a)
print("Mean {}".format(np.mean(a)))
print("Var {}\n".format(np.var(a)))
v = np.linspace(0.0, 10.0, ... | 26.5 | 75 | 0.610849 |
79678501798fab8f49698479653478bb48b55036 | 5,677 | py | Python | doc/conf.py | umihai1/github_publish | 7a364d6ec46e98d33c71bd5c563019b8e9270ee3 | [
"MIT"
] | 1 | 2020-01-17T09:30:57.000Z | 2020-01-17T09:30:57.000Z | doc/conf.py | umihai1/github_publish | 7a364d6ec46e98d33c71bd5c563019b8e9270ee3 | [
"MIT"
] | 1 | 2020-11-26T17:28:58.000Z | 2021-04-12T12:30:25.000Z | doc/conf.py | umihai1/github_publish | 7a364d6ec46e98d33c71bd5c563019b8e9270ee3 | [
"MIT"
] | 2 | 2017-12-18T20:38:51.000Z | 2020-01-20T14:27:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# github_publish documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 12 06:05:15 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... | 31.364641 | 124 | 0.692972 |
7967851305986b979e3c7a7d7bcb6ca7d4252bb4 | 26,945 | py | Python | src/sage/categories/finite_coxeter_groups.py | fredstro/sage | c936d2cda81ec7ec3552a3bdb29c994b40d1bb24 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/finite_coxeter_groups.py | fredstro/sage | c936d2cda81ec7ec3552a3bdb29c994b40d1bb24 | [
"BSL-1.0"
] | null | null | null | src/sage/categories/finite_coxeter_groups.py | fredstro/sage | c936d2cda81ec7ec3552a3bdb29c994b40d1bb24 | [
"BSL-1.0"
] | null | null | null | r"""
Finite Coxeter Groups
"""
#*****************************************************************************
# Copyright (C) 2009 Nicolas M. Thiery <nthiery at users.sf.net>
# Copyright (C) 2009 Nicolas Borie <nicolas dot borie at math.u-psud.fr>
#
# Distributed under the terms of the GNU General Public Licen... | 38.603152 | 120 | 0.471665 |
796785532cbd2992d59d9e17659b5e9e6a89c0ad | 17,817 | py | Python | utils/prune_utils.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 1,414 | 2019-11-11T14:18:42.000Z | 2022-03-30T15:14:43.000Z | utils/prune_utils.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 171 | 2019-11-27T01:27:52.000Z | 2022-02-23T10:14:20.000Z | utils/prune_utils.py | qianyuqian-DeepLearning/YoloV3-prune-layer | 5b4a4d6346d980b36235eae5335003f2c43a28cf | [
"Apache-2.0"
] | 423 | 2019-11-12T00:24:52.000Z | 2022-03-31T10:34:34.000Z | import torch
from terminaltables import AsciiTable
from copy import deepcopy
import numpy as np
import torch.nn.functional as F
def get_sr_flag(epoch, sr):
# return epoch >= 5 and sr
return sr
def parse_module_defs(module_defs):
CBL_idx = []
Conv_idx = []
ignore_idx = set()
... | 38.481641 | 127 | 0.567155 |
796786c3340b57ff91f2697ec30fae0ea4ceb3dc | 3,113 | py | Python | src/cakephp_theme/cakephp_theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | src/cakephp_theme/cakephp_theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | src/cakephp_theme/cakephp_theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'Sphinx-Themes template'
copyright = '2018, sphinx-themes.org'
author = 'sphinx-themes.org'
# The short X.Y version
version = ''
# Th... | 30.519608 | 78 | 0.686155 |
796787b52138932b747cecae9c22ec529c87f453 | 2,748 | py | Python | vpiepy/optics_utils.py | twguest/VPIEPY | 5c4aa2e4ca036c04f57abb92c7be610602159afb | [
"MIT"
] | null | null | null | vpiepy/optics_utils.py | twguest/VPIEPY | 5c4aa2e4ca036c04f57abb92c7be610602159afb | [
"MIT"
] | null | null | null | vpiepy/optics_utils.py | twguest/VPIEPY | 5c4aa2e4ca036c04f57abb92c7be610602159afb | [
"MIT"
] | null | null | null | import numpy as np
import scipy as sp
def randomise_amplitude(pix, minval, maxval):
absrange = maxval - minval
return np.random.rand(pix, pix) * absrange + minval
def randomise_phase(pix, minval, maxval):
phaserange = maxval - minval
return np.random.rand(pix, pix) * phaserange + minval
def make_s... | 30.197802 | 141 | 0.656114 |
796788a49bcf2c5ec7f4347d8b678b6e675001b3 | 5,337 | py | Python | tests/test_processor.py | mzabrams/fars-cleaner | 789a8c735654fc8a88fb4b5e20d1292eb1ead204 | [
"BSD-3-Clause"
] | 1 | 2021-04-26T17:04:36.000Z | 2021-04-26T17:04:36.000Z | tests/test_processor.py | mzabrams/fars-cleaner | 789a8c735654fc8a88fb4b5e20d1292eb1ead204 | [
"BSD-3-Clause"
] | null | null | null | tests/test_processor.py | mzabrams/fars-cleaner | 789a8c735654fc8a88fb4b5e20d1292eb1ead204 | [
"BSD-3-Clause"
] | null | null | null | from fars_cleaner import FARSProcessor
import fars_cleaner.extra_info as ei
import pandas as pd
from hypothesis import given
from hypothesis import strategies as st
from hypothesis.extra.pandas import column, data_frames
@given(
data_frames(
columns=[
column(
name='HOUR',
eleme... | 27.65285 | 76 | 0.482481 |
7967890ac05333bc399386a44f53878ed3bbff7a | 21,218 | py | Python | tests/test_Geometry.py | CharlesHahn/DL-PeptideBuilder | 098c873a2e428f9a48b1bee2e1a21dd92806d119 | [
"MIT"
] | 1 | 2021-12-24T14:35:24.000Z | 2021-12-24T14:35:24.000Z | tests/test_Geometry.py | CharlesHahn/DL-PeptideBuilder | 098c873a2e428f9a48b1bee2e1a21dd92806d119 | [
"MIT"
] | null | null | null | tests/test_Geometry.py | CharlesHahn/DL-PeptideBuilder | 098c873a2e428f9a48b1bee2e1a21dd92806d119 | [
"MIT"
] | 1 | 2021-12-20T13:48:02.000Z | 2021-12-20T13:48:02.000Z | from PeptideConstructor.Geometry import (
AlaGeo,
ArgGeo,
AsnGeo,
AspGeo,
CysGeo,
GlnGeo,
GluGeo,
GlyGeo,
HisGeo,
IleGeo,
LeuGeo,
LysGeo,
MetGeo,
PheGeo,
ProGeo,
SerGeo,
ThrGeo,
TrpGeo,
TyrGeo,
ValGeo,
)
from PeptideConstructor import Geome... | 31.906767 | 45 | 0.667688 |
79678a1b09bf8bc6540586e584fb9058ef7316d0 | 245 | py | Python | openverse-api/test/constants.py | taka1226/openverse-api | 754b7bd820b80019b3de76b781f4e98b783757d1 | [
"MIT"
] | 1 | 2022-01-29T05:33:37.000Z | 2022-01-29T05:33:37.000Z | openverse-api/test/constants.py | wenxuefeng3930/openverse-api | 5fedb5e20db71bf58c09004f10f966cedb8a6e89 | [
"MIT"
] | null | null | null | openverse-api/test/constants.py | wenxuefeng3930/openverse-api | 5fedb5e20db71bf58c09004f10f966cedb8a6e89 | [
"MIT"
] | null | null | null | import os
API_URL = os.getenv('INTEGRATION_TEST_URL', 'http://localhost:8000')
KNOWN_ENVS = {
'http://localhost:8000': 'LOCAL',
'https://api.openverse.engineering': 'PRODUCTION',
'https://api-dev.openverse.engineering': 'TESTING'
} | 27.222222 | 68 | 0.685714 |
79678ca6d905d28a0c8790d29e7929de75867c9d | 6,988 | py | Python | INTERACTION.py | DeokyongKim/APTP2022 | 261f9f754aff31f6e6289140ce054e78e0ae21cb | [
"MIT"
] | null | null | null | INTERACTION.py | DeokyongKim/APTP2022 | 261f9f754aff31f6e6289140ce054e78e0ae21cb | [
"MIT"
] | null | null | null | INTERACTION.py | DeokyongKim/APTP2022 | 261f9f754aff31f6e6289140ce054e78e0ae21cb | [
"MIT"
] | 7 | 2022-03-30T08:25:50.000Z | 2022-03-30T13:38:21.000Z | from GUI import Screen, pygame, sys, color
class Interaction(Screen):
"""
Responsibility on Interaction with User
"""
def __init__(self, screen_size, table, table_size, cell_size, cell_border):
super().__init__(screen_size, table, table_size, cell_size, cell_border)
def MouseClick(self, ... | 41.349112 | 121 | 0.40913 |
79678cacae8f111aaab4962c52e9018be055248f | 6,686 | py | Python | manila_tempest_tests/tests/api/test_share_type_availability_zones.py | sapcc/manila-tempest-plugin | 0ac95412b1b0555775b4d45f51c27af2fa84724a | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/test_share_type_availability_zones.py | sapcc/manila-tempest-plugin | 0ac95412b1b0555775b4d45f51c27af2fa84724a | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/test_share_type_availability_zones.py | sapcc/manila-tempest-plugin | 0ac95412b1b0555775b4d45f51c27af2fa84724a | [
"Apache-2.0"
] | 1 | 2021-12-22T13:14:59.000Z | 2021-12-22T13:14:59.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 46.430556 | 79 | 0.681274 |
79678cff06a2a81f64ffd42224b0c6787622a8cb | 14,263 | py | Python | common/op_params.py | sejongjoa/openpilot_083 | ff8277b6b51241af6b9ba37dcf55dcb6bfcc9d18 | [
"MIT"
] | 9 | 2021-03-21T09:00:35.000Z | 2021-07-09T15:39:29.000Z | common/op_params.py | sejongjoa/openpilot_083 | ff8277b6b51241af6b9ba37dcf55dcb6bfcc9d18 | [
"MIT"
] | null | null | null | common/op_params.py | sejongjoa/openpilot_083 | ff8277b6b51241af6b9ba37dcf55dcb6bfcc9d18 | [
"MIT"
] | 35 | 2021-03-18T23:28:11.000Z | 2021-06-24T17:36:22.000Z | #!/usr/bin/env python3
import os
import json
from common.colors import opParams_error as error
from common.colors import opParams_warning as warning
try:
from common.realtime import sec_since_boot
except ImportError:
import time
sec_since_boot = time.time
warning("Using python time.time() instead of faster sec_... | 60.693617 | 206 | 0.63507 |
79678d6d91049a9df6a5dcac3ad41a295d14f987 | 1,342 | py | Python | tests/test_fake_base.py | ianchen-tw/trio-monitor | b0776e9806497393af260336cb7ea35cd82ef0c4 | [
"MIT"
] | 9 | 2021-07-05T07:08:43.000Z | 2022-02-28T04:17:41.000Z | tests/test_fake_base.py | ianchen-tw/trio-vis | b0776e9806497393af260336cb7ea35cd82ef0c4 | [
"MIT"
] | null | null | null | tests/test_fake_base.py | ianchen-tw/trio-vis | b0776e9806497393af260336cb7ea35cd82ef0c4 | [
"MIT"
] | null | null | null | import pytest
from trio_vis.trio_fake import FakeNode
@pytest.fixture
def tree_line() -> FakeNode:
"""n0 -> n1 -> n2"""
n0 = FakeNode(name="n0")
n1 = FakeNode(name="n1")
n2 = FakeNode(name="n2")
n0.tree_add(n1, parent_name="n0")
n0.tree_add(n2, parent_name="n1")
return n0
def test_node_... | 26.84 | 63 | 0.682563 |
79678f038dbe9b28ae65413d4cdba51bde31b0c8 | 4,039 | py | Python | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/RSegment_angle.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/RSegment_angle.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/RSegment_angle.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import (QApplication, QGraphicsView,
QGraphicsPixmapItem, QGraphicsScene, QGraphicsPolygonItem,
QGraphicsEllipseItem, QGraphicsLineItem, QOpenGLWidget)
from PyQt5.QtGui import QPainter, QPixmap, QPo... | 33.658333 | 112 | 0.598663 |
7967900de1b6fd414d62502b160533c52713a9f9 | 23,426 | py | Python | tests/test_box_Box.py | glotzerlab/freud-test | acbccc38bbcc984d84758048f1fdefc4252ce3d3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_box_Box.py | glotzerlab/freud-test | acbccc38bbcc984d84758048f1fdefc4252ce3d3 | [
"BSD-3-Clause"
] | null | null | null | tests/test_box_Box.py | glotzerlab/freud-test | acbccc38bbcc984d84758048f1fdefc4252ce3d3 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from collections import namedtuple
import matplotlib
import numpy as np
import numpy.testing as npt
import pytest
import freud
matplotlib.use("agg")
class TestBox:
def test_construct(self):
"""Test correct behavior for various constructor signatures"""
with pytest.raises(ValueEr... | 36.660407 | 88 | 0.544907 |
7967904a491e8650554b6ad01c6402ecbe807ae4 | 12,859 | py | Python | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/show_details_of_domain_name_certificate_v2_response.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/show_details_of_domain_name_certificate_v2_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/show_details_of_domain_name_certificate_v2_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ShowDetailsOfDomainNameCertificateV2Response(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
... | 29.56092 | 243 | 0.635353 |
7967904c21083809b412cf1d907dfc6346771e2c | 833 | py | Python | short_reads_pipeline/tools/deepargClass.py | antkak/deeparg-keras | 0f3b640249d22a0c5aea7e8ad9c9af0b667d2176 | [
"MIT"
] | null | null | null | short_reads_pipeline/tools/deepargClass.py | antkak/deeparg-keras | 0f3b640249d22a0c5aea7e8ad9c9af0b667d2176 | [
"MIT"
] | null | null | null | short_reads_pipeline/tools/deepargClass.py | antkak/deeparg-keras | 0f3b640249d22a0c5aea7e8ad9c9af0b667d2176 | [
"MIT"
] | null | null | null | import os
import sys
def run(R, data, path_to_deeparg='/deeparg/'):
# print sys.path
try:
cmd = " ".join(
['python '+path_to_deeparg+'deepARG.py',
'--align',
'--type nucl',
'--reads',
'--input', R,
'--output', R+'.deeparg',
... | 28.724138 | 126 | 0.510204 |
796790f63d67115a0003b143a868c59bddf78b6a | 7,947 | py | Python | property_violations/property_violations.py | codeforkansascity/Fair-Foreclosures | 791e80c0e488b5306ed28bc31e696061f9b65d60 | [
"MIT"
] | 2 | 2018-08-06T18:46:06.000Z | 2018-08-12T22:47:29.000Z | property_violations/property_violations.py | codeforkansascity/Fair-Foreclosures | 791e80c0e488b5306ed28bc31e696061f9b65d60 | [
"MIT"
] | 14 | 2018-08-05T20:16:15.000Z | 2018-09-23T20:32:53.000Z | property_violations/property_violations.py | codeforkansascity/Fair-Foreclosures | 791e80c0e488b5306ed28bc31e696061f9b65d60 | [
"MIT"
] | 1 | 2020-01-03T04:33:02.000Z | 2020-01-03T04:33:02.000Z | from city_ordinance import CityOrdinance
from dateutil.parser import parse
from sodapy import Socrata
class PropertyViolationException(Exception):
"""An exception that may be raised by the PropertyViolation class."""
pass
class Coordinates:
"""A pair of latitude/longitude coordinates."""
def __init__... | 33.251046 | 87 | 0.586762 |
796791c0d511c7b81268fcdc53439a585f8744cc | 4,089 | py | Python | transfer_learn.py | aarkwright/arkml | a2f3d9bea5298233187d9c82457ed9e83cd37ceb | [
"MIT"
] | 1 | 2019-06-20T05:17:13.000Z | 2019-06-20T05:17:13.000Z | transfer_learn.py | aarkwright/arkml | a2f3d9bea5298233187d9c82457ed9e83cd37ceb | [
"MIT"
] | null | null | null | transfer_learn.py | aarkwright/arkml | a2f3d9bea5298233187d9c82457ed9e83cd37ceb | [
"MIT"
] | 1 | 2019-06-20T05:17:24.000Z | 2019-06-20T05:17:24.000Z | import glob
import matplotlib.pyplot as plt
from tensorflow.keras.applications.inception_v3 import InceptionV3, preprocess_input
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from keras.optimizers import SGD
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Glob... | 28.2 | 108 | 0.763756 |
796792b492a3685131e25317c41e694ca1550c77 | 6,762 | py | Python | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py | mariojonke/opentelemetry-python-contrib | c100b21fa40727709bb31cf4e2b67b737a09ea2c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py | mariojonke/opentelemetry-python-contrib | c100b21fa40727709bb31cf4e2b67b737a09ea2c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py | mariojonke/opentelemetry-python-contrib | c100b21fa40727709bb31cf4e2b67b737a09ea2c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 30.876712 | 80 | 0.692251 |
79679419f6aab3458cd6b1da32d7da63f32f0fb5 | 5,576 | py | Python | pogom/pgoapi/protos/POGOProtos/Networking/Responses/DiskEncounterResponse_pb2.py | tier4fusion/pogom-updated | 31c4db3dfc85b19abb39c2e43f5efa530c65159e | [
"MIT"
] | 463 | 2016-07-17T12:30:48.000Z | 2021-12-25T11:25:12.000Z | pogom/pgoapi/protos/POGOProtos/Networking/Responses/DiskEncounterResponse_pb2.py | tier4fusion/pogom-updated | 31c4db3dfc85b19abb39c2e43f5efa530c65159e | [
"MIT"
] | 103 | 2016-07-17T15:22:07.000Z | 2021-06-14T08:52:02.000Z | pogom/pgoapi/protos/POGOProtos/Networking/Responses/DiskEncounterResponse_pb2.py | tier4fusion/pogom-updated | 31c4db3dfc85b19abb39c2e43f5efa530c65159e | [
"MIT"
] | 226 | 2016-07-17T15:44:26.000Z | 2021-10-03T02:26:32.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Networking/Responses/DiskEncounterResponse.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
fr... | 42.892308 | 796 | 0.791607 |
79679454c21ee22e1a44905878e14b503b6180ff | 744 | py | Python | photos/migrations/0009_auto_20191006_2113.py | Mugisha-Beline/my-gallery | 36aa676c0df72ad879aedcee925cfdb7fa445e9b | [
"MIT"
] | null | null | null | photos/migrations/0009_auto_20191006_2113.py | Mugisha-Beline/my-gallery | 36aa676c0df72ad879aedcee925cfdb7fa445e9b | [
"MIT"
] | null | null | null | photos/migrations/0009_auto_20191006_2113.py | Mugisha-Beline/my-gallery | 36aa676c0df72ad879aedcee925cfdb7fa445e9b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-10-06 18:13
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('photos', '0008_auto_20191006_2113'),
]
operations... | 28.615385 | 103 | 0.634409 |
796794fd6419c52fa9352bcc1021e51829703264 | 2,943 | py | Python | sites/lapinkansa.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | null | null | null | sites/lapinkansa.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 14 | 2016-10-14T15:09:42.000Z | 2017-03-01T14:29:29.000Z | sites/lapinkansa.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 1 | 2020-11-18T13:06:48.000Z | 2020-11-18T13:06:48.000Z | # -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import processor
from datetime import datetime
def parse( url ):
r = requests.get( url )
if r.status_code == 404:
return processor.create_dictionary('', url, r.status_code, [u''], [u''], u'', u'', u'', u'', [u''], [u''])
r.encoding = 'UTF-8'... | 39.24 | 145 | 0.681957 |
79679537b738cae093f93be0d4dc2def0f3013ee | 3,442 | py | Python | tests/func_sim/test_func_sim.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 15 | 2019-05-14T10:12:23.000Z | 2022-03-29T15:29:52.000Z | tests/func_sim/test_func_sim.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 19 | 2020-01-22T21:44:33.000Z | 2021-06-05T02:10:41.000Z | tests/func_sim/test_func_sim.py | sgherbst/msdsl | e38d5ecdb88b3574bda62f22a4f91ce3e4173d12 | [
"MIT"
] | 5 | 2019-10-21T09:53:17.000Z | 2021-08-10T17:32:20.000Z | # general imports
from pathlib import Path
import numpy as np
import importlib
# AHA imports
import magma as m
# msdsl imports
from ..common import *
from msdsl import MixedSignalModel, VerilogGenerator
BUILD_DIR = Path(__file__).resolve().parent / 'build'
DOMAIN = np.pi
RANGE = 1.0
def pytest_generate_tests(metafu... | 27.536 | 95 | 0.639744 |
79679582bdc6fbc5ded4b1ea459d67638c6df580 | 32,874 | py | Python | RC-49/RC-49_128x128/CcGAN-improved/main.py | asatk/improved_CcGAN | 29a58e6e2a03e56c2ad80ae1a2ebbd0710e026f3 | [
"MIT"
] | 1 | 2022-02-26T00:07:37.000Z | 2022-02-26T00:07:37.000Z | RC-49/RC-49_128x128/CcGAN-improved/main.py | asatk/improved_CcGAN | 29a58e6e2a03e56c2ad80ae1a2ebbd0710e026f3 | [
"MIT"
] | null | null | null | RC-49/RC-49_128x128/CcGAN-improved/main.py | asatk/improved_CcGAN | 29a58e6e2a03e56c2ad80ae1a2ebbd0710e026f3 | [
"MIT"
] | null | null | null | print("\n===================================================================================================")
import argparse
import copy
import gc
import numpy as np
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import matplotlib as mpl
import h5py
import os
import random
from tqdm import tqdm
import tor... | 48.774481 | 324 | 0.671017 |
796796abdb9dc4732f73a803f57089730aa091d7 | 415 | py | Python | setup.py | cjmay/babygdcli | e6fefc97a1df6bd66bbdca1493dbaddcb5ff001a | [
"BSD-2-Clause"
] | null | null | null | setup.py | cjmay/babygdcli | e6fefc97a1df6bd66bbdca1493dbaddcb5ff001a | [
"BSD-2-Clause"
] | 1 | 2018-08-21T19:42:50.000Z | 2018-08-21T19:42:50.000Z | setup.py | cjmay/babygdcli | e6fefc97a1df6bd66bbdca1493dbaddcb5ff001a | [
"BSD-2-Clause"
] | null | null | null | from setuptools import setup
from glob import glob
__version__ = '0.2b11'
setup(
name='babygdcli',
version=__version__,
description='little Google Drive CLI',
py_modules=[
'babygdcli',
],
scripts=glob('scripts/*'),
install_requires=[
'google-api-python-client>=1.6.2',
... | 18.043478 | 45 | 0.616867 |
796798acde24b1210de7535e82cb344e28b7700a | 884 | py | Python | bookmark.py | ChrisDavison/scripts | ebbe52626aac041f37a1143607dc0cc74515a198 | [
"MIT"
] | null | null | null | bookmark.py | ChrisDavison/scripts | ebbe52626aac041f37a1143607dc0cc74515a198 | [
"MIT"
] | null | null | null | bookmark.py | ChrisDavison/scripts | ebbe52626aac041f37a1143607dc0cc74515a198 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from datetime import date
from os.path import expanduser
import sys
import requests
from bs4 import BeautifulSoup
def make_bookmark(url: str):
"""
Make a plaintext bookmark, getting title from webpage.
"""
response = requests.get(url).text
title = BeautifulSoup(response, 'h... | 23.891892 | 73 | 0.624434 |
796798ed93460d1716d811dc6b8f0371a5990def | 148 | py | Python | project/db/serializers/forgot_password_serializer.py | sunday-ucheawaji/API- | 07fb4b596cfe8e85b8575a8e70a8c886d3ab627a | [
"MIT"
] | null | null | null | project/db/serializers/forgot_password_serializer.py | sunday-ucheawaji/API- | 07fb4b596cfe8e85b8575a8e70a8c886d3ab627a | [
"MIT"
] | null | null | null | project/db/serializers/forgot_password_serializer.py | sunday-ucheawaji/API- | 07fb4b596cfe8e85b8575a8e70a8c886d3ab627a | [
"MIT"
] | 1 | 2022-02-09T14:13:20.000Z | 2022-02-09T14:13:20.000Z | from rest_framework import serializers
class ForgotPasswordSerializer(serializers.Serializer):
email = serializers.EmailField(required=True)
| 21.142857 | 55 | 0.831081 |
796798fc9a93e3c02856deb38b58381fe9e6c9c4 | 422 | py | Python | config/settings/test_taskflow.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 13 | 2019-11-27T19:12:15.000Z | 2021-12-01T21:32:18.000Z | config/settings/test_taskflow.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 60 | 2019-03-27T14:43:19.000Z | 2022-03-22T09:12:53.000Z | config/settings/test_taskflow.py | bihealth/digestiflow-server | 298c53f95dbf56e7be0d0b8bcceacabc21257d5f | [
"MIT"
] | 3 | 2020-11-09T07:08:42.000Z | 2022-02-09T11:37:54.000Z | """
Taskflow test settings
- Used to run tests against a SODAR Taskflow instance
"""
from .test import * # noqa
# Taskflow backend settings
TASKFLOW_TARGETS = ["irods", "sodar"]
TASKFLOW_BACKEND_HOST = env.str("TASKFLOW_BACKEND_HOST", "http://0.0.0.0")
TASKFLOW_BACKEND_PORT = env.int("TASKFLOW_BACKEND_PORT", 5005)... | 24.823529 | 81 | 0.753555 |
796799d8d5acc24633f602d7afabc8a40ef6e0e7 | 1,655 | py | Python | datagen.py | basaashokkumar/5G-cellsites-Distribution | 2a9d6846432a86703c15acb143d607fcedabac37 | [
"MIT"
] | null | null | null | datagen.py | basaashokkumar/5G-cellsites-Distribution | 2a9d6846432a86703c15acb143d607fcedabac37 | [
"MIT"
] | null | null | null | datagen.py | basaashokkumar/5G-cellsites-Distribution | 2a9d6846432a86703c15acb143d607fcedabac37 | [
"MIT"
] | null | null | null | import csv
import itertools
import numpy as np
import matplotlib.pyplot as plt
def read_hotspots(hotspots_filepath):
with open(hotspots_filepath) as hotspots_datafile:
datapoint_reader = csv.reader(hotspots_datafile)
hotspots = [list(map(float, datapoint)) for datapoint in datapoint_reader]
re... | 35.212766 | 82 | 0.674924 |
79679a2b54ba3d4d80cf02f94fdb24d6188dea11 | 31,102 | py | Python | src/openprocurement/tender/competitivedialogue/tests/stage2/award.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 10 | 2020-02-18T01:56:21.000Z | 2022-03-28T00:32:57.000Z | src/openprocurement/tender/competitivedialogue/tests/stage2/award.py | quintagroup/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 26 | 2018-07-16T09:30:44.000Z | 2021-02-02T17:51:30.000Z | src/openprocurement/tender/competitivedialogue/tests/stage2/award.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 15 | 2019-08-08T10:50:47.000Z | 2022-02-05T14:13:36.000Z | # -*- coding: utf-8 -*-
import unittest
from copy import deepcopy
from openprocurement.api.tests.base import snitch
from openprocurement.tender.belowthreshold.tests.base import test_draft_complaint
from openprocurement.tender.belowthreshold.tests.award import (
TenderAwardComplaintResourceTestMixin,
TenderAwa... | 43.317549 | 119 | 0.66179 |
79679bef924f16554dce5967b4de22c999271039 | 880 | py | Python | pontoon/administration/urls.py | Acidburn0zzz/pontoon | 069d4c7732ace9d4ef39c0b81d0cd33b51b64811 | [
"BSD-3-Clause"
] | null | null | null | pontoon/administration/urls.py | Acidburn0zzz/pontoon | 069d4c7732ace9d4ef39c0b81d0cd33b51b64811 | [
"BSD-3-Clause"
] | null | null | null | pontoon/administration/urls.py | Acidburn0zzz/pontoon | 069d4c7732ace9d4ef39c0b81d0cd33b51b64811 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls.defaults import *
import views
urlpatterns = patterns(
'',
# Admin Home
url(r'^$', views.admin,
name='pontoon.admin'),
# Add new project
url(r'^project/$', views.manage_project,
name='pontoon.admin.project.new'),
# Edit project
url(r'^project/(?P<sl... | 24.444444 | 57 | 0.626136 |
79679df7b5c301458bf1b0cff5825e8698b47527 | 2,838 | py | Python | user/migrations/0001_initial.py | ThePokerFaCcCe/teamwork | e6d3cfa7821ddba7a122b740e7f5dabb2b1eb316 | [
"MIT"
] | null | null | null | user/migrations/0001_initial.py | ThePokerFaCcCe/teamwork | e6d3cfa7821ddba7a122b740e7f5dabb2b1eb316 | [
"MIT"
] | null | null | null | user/migrations/0001_initial.py | ThePokerFaCcCe/teamwork | e6d3cfa7821ddba7a122b740e7f5dabb2b1eb316 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-15 14:27
import django.contrib.auth.models
from django.db import migrations, models
import django.utils.timezone
import user.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
... | 63.066667 | 335 | 0.663848 |
7967a18348c33ac1e1f0a4a46953d33af6783ef5 | 9,131 | py | Python | BackBLAST.py | LeeBergstrand/BackBLAST_Reciprocal_BLAST | ee70ff9b8e1a7be55e828567280b22718bd3cb5d | [
"MIT"
] | 10 | 2018-06-16T12:34:23.000Z | 2021-10-04T07:41:40.000Z | BackBLAST.py | LeeBergstrand/BackBLAST_Reciprocal_BLAST | ee70ff9b8e1a7be55e828567280b22718bd3cb5d | [
"MIT"
] | 35 | 2017-11-01T04:27:38.000Z | 2021-10-08T03:22:34.000Z | BackBLAST.py | LeeBergstrand/BackBLAST_Reciprocal_BLAST | ee70ff9b8e1a7be55e828567280b22718bd3cb5d | [
"MIT"
] | 7 | 2015-08-11T20:01:22.000Z | 2019-12-17T22:57:54.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------------------------
# Created by: Lee Bergstrand
# Description: A Biopython program that takes a list of query proteins and uses local BLASTp to search
# for highly similar proteins within a local blast database (... | 42.469767 | 119 | 0.635637 |
7967a437b010a43736cbb172364779433f7bd84e | 2,285 | py | Python | tests/models/symbol/enhanced_ib_statistics_returned_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | tests/models/symbol/enhanced_ib_statistics_returned_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | tests/models/symbol/enhanced_ib_statistics_returned_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions... | 60.131579 | 845 | 0.783807 |
7967a55ccf076f69c17d333301ce343a0203b860 | 2,757 | py | Python | elasticapm/context/base.py | namoshizun/apm-agent-python | 057a1a26ce91f9a735eafffc7d2b6e56d73749c4 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/context/base.py | namoshizun/apm-agent-python | 057a1a26ce91f9a735eafffc7d2b6e56d73749c4 | [
"BSD-3-Clause"
] | 1 | 2019-11-11T23:41:34.000Z | 2019-11-12T17:47:01.000Z | elasticapm/context/base.py | bmorelli25/apm-agent-python | 504e468833f97b85898654faa4bc49f0697cd1a1 | [
"BSD-3-Clause"
] | 1 | 2022-03-20T11:36:25.000Z | 2022-03-20T11:36:25.000Z | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 38.291667 | 81 | 0.712006 |
7967a5b715cc9f61b346620037c0655ab6372fd2 | 2,012 | py | Python | src/coaches/trainer/trainer_thinker.py | philipholler/RocoCup_Soccer_P6 | 7b9addf665cb5b3a8d501b1ff9c064d501cf5aba | [
"Unlicense"
] | 5 | 2020-09-09T08:37:30.000Z | 2021-02-04T14:00:50.000Z | src/coaches/trainer/trainer_thinker.py | philipholler/RocoCup_Soccer_P6 | 7b9addf665cb5b3a8d501b1ff9c064d501cf5aba | [
"Unlicense"
] | null | null | null | src/coaches/trainer/trainer_thinker.py | philipholler/RocoCup_Soccer_P6 | 7b9addf665cb5b3a8d501b1ff9c064d501cf5aba | [
"Unlicense"
] | 1 | 2021-02-04T14:34:07.000Z | 2021-02-04T14:34:07.000Z | import queue
import threading
import time
from random import random, randint
import client_connection
import parsing
from coaches.world_objects_coach import WorldViewCoach
from coaches.trainer.scenarios import passing_strat
class TrainerThinker(threading.Thread):
def __init__(self):
super().__init__()
... | 30.953846 | 123 | 0.616302 |
7967a6386b605fcb29b3b71e8fb4405e41d1e1b5 | 795 | py | Python | practica3/7.py | danipozo/practicas-mnii | f4afe725316c694a4cd06e2ce3c0019f4f68652f | [
"MIT"
] | 1 | 2018-03-13T18:10:38.000Z | 2018-03-13T18:10:38.000Z | practica3/7.py | danipozo/practicas-mnii | f4afe725316c694a4cd06e2ce3c0019f4f68652f | [
"MIT"
] | null | null | null | practica3/7.py | danipozo/practicas-mnii | f4afe725316c694a4cd06e2ce3c0019f4f68652f | [
"MIT"
] | 1 | 2018-03-13T22:35:02.000Z | 2018-03-13T22:35:02.000Z | import numpy as num
import scipy as sci
from decimal import *
from numpy.polynomial import polynomial as pol
def pMedio(f,a,b,n,y_0):
h=Decimal((b-a))/Decimal(n)
vals = []
vals.append(y_0)
print ("Indice\t | t | Aproximado(u) ")
print ("0\t | 0 |\t"+str(y_0))
vals.append(euler1(f,a,b,n,y_0... | 20.921053 | 53 | 0.532075 |
7967a760c0bbeb640d281e319f22cad9411a5705 | 4,432 | py | Python | sdk/cosmos/azure-cosmos/test/multimaster_tests.py | willsmythe/azure-sdk-for-python | 23a45e20bc6cff1ee8101380c0b1e7987e3e2476 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cosmos/azure-cosmos/test/multimaster_tests.py | willsmythe/azure-sdk-for-python | 23a45e20bc6cff1ee8101380c0b1e7987e3e2476 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/cosmos/azure-cosmos/test/multimaster_tests.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | import json
import os.path
import unittest
import uuid
import pytest
import azure.cosmos.cosmos_client as cosmos_client
import azure.cosmos.documents as documents
import azure.cosmos.errors as errors
import azure.cosmos.base as base
import azure.cosmos.constants as constants
import azure.cosmos.retry_options as retry_o... | 42.209524 | 127 | 0.708258 |
7967a7a70f82f0d9914ce8f25331b8dacdb3ab54 | 24,213 | py | Python | detectron2/data/build.py | node21challenge/rank3_node21_detection | bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6 | [
"Apache-2.0"
] | null | null | null | detectron2/data/build.py | node21challenge/rank3_node21_detection | bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6 | [
"Apache-2.0"
] | null | null | null | detectron2/data/build.py | node21challenge/rank3_node21_detection | bac22d4aef5e83481c3ff1db3f8f0891ce05f8d6 | [
"Apache-2.0"
] | 1 | 2022-02-13T14:58:24.000Z | 2022-02-13T14:58:24.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
import itertools
import logging
import numpy as np
import operator
import pickle
from typing import Any, Callable, Dict, List, Optional, Union
import torch
import torch.utils.data as torchdata
from tabulate import tabulate
from termcolor import colored
from detectron2... | 38.433333 | 104 | 0.673068 |
7967a81cafb99a331248dda74c5af5e11777633e | 12,310 | py | Python | src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py | DanielAtKrypton/virtualenv | 6dffcf2ae7b5b55098cf3c8326472f988277cb70 | [
"MIT"
] | null | null | null | src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py | DanielAtKrypton/virtualenv | 6dffcf2ae7b5b55098cf3c8326472f988277cb70 | [
"MIT"
] | 5 | 2021-03-19T11:01:43.000Z | 2022-02-10T12:02:58.000Z | src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py | DanielAtKrypton/virtualenv | 6dffcf2ae7b5b55098cf3c8326472f988277cb70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""The Apple Framework builds require their own customization"""
import logging
import os
import struct
import subprocess
from abc import ABCMeta, abstractmethod
from textwrap import dedent
from six import add_metaclass
from virtualenv.create.via_global_ref.builtin.ref import ExePathRefToDest,... | 41.308725 | 120 | 0.622989 |
7967a9593bffae47616820f20860e78c8a7b2573 | 14,679 | py | Python | modules/tools/record_play/rtk_player.py | zhouyao4321/apollo | fe34840f78dc0e9c92850a805eede0ac2e512295 | [
"Apache-2.0"
] | 1 | 2020-04-24T06:14:14.000Z | 2020-04-24T06:14:14.000Z | modules/tools/record_play/rtk_player.py | Geonhee-LEE/apollo | 3ceaec8843ffe0fb8e821089b2e4708eaf1fa455 | [
"Apache-2.0"
] | 2 | 2018-09-10T03:13:39.000Z | 2018-10-15T16:31:14.000Z | modules/tools/record_play/rtk_player.py | Geonhee-LEE/apollo | 3ceaec8843ffe0fb8e821089b2e4708eaf1fa455 | [
"Apache-2.0"
] | 3 | 2018-02-03T04:56:22.000Z | 2018-09-14T10:50:53.000Z | #!/usr/bin/env python3
###############################################################################
# Copyright 2017 The Apollo 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... | 38.226563 | 107 | 0.594318 |
7967ab2da3a611b23e633086f7052ad50e0357ae | 1,774 | py | Python | test/programytest/spelling/test_extension_textblob.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | test/programytest/spelling/test_extension_textblob.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | test/programytest/spelling/test_extension_textblob.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | import unittest
from programy.bot import Bot
from programy.config.bot.bot import BotConfiguration
from programy.spelling.extension import SpellingExtension
from programytest.client import TestClient
class SentimentExtensionTests(unittest.TestCase):
def setUp(self):
self._client = TestClient()
... | 34.115385 | 98 | 0.726607 |
7967ac6b24dc46f9fc92d984687701447948bda4 | 7,670 | py | Python | creacion_de_aplicaciones/pyqt5_iris/app/gui/actualizar_ultimo.py | soytupadrrre/Master_Python_Eip | c4774209d7dd15584233fe5d4cc01b1434c9316b | [
"MIT"
] | null | null | null | creacion_de_aplicaciones/pyqt5_iris/app/gui/actualizar_ultimo.py | soytupadrrre/Master_Python_Eip | c4774209d7dd15584233fe5d4cc01b1434c9316b | [
"MIT"
] | null | null | null | creacion_de_aplicaciones/pyqt5_iris/app/gui/actualizar_ultimo.py | soytupadrrre/Master_Python_Eip | c4774209d7dd15584233fe5d4cc01b1434c9316b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\app\gui\template\actualizar_ultimo.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
f... | 46.204819 | 186 | 0.681226 |
7967aca243df3a096b36c26bce8d56fb414edcb6 | 1,587 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/NetworkInterfacePermission.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/NetworkInterfacePermission.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/vpc/models/NetworkInterfacePermission.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 41.763158 | 158 | 0.746062 |
7967ad854549562439baf657fe049b089f92cdd0 | 396 | py | Python | interviewbit/courses/programming/linked_list/base.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | null | null | null | interviewbit/courses/programming/linked_list/base.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | null | null | null | interviewbit/courses/programming/linked_list/base.py | avi3tal/knowledgebase | fd30805aa94332a6c14c9d8631c7044673fb3e2c | [
"MIT"
] | 1 | 2021-11-19T13:45:59.000Z | 2021-11-19T13:45:59.000Z | from typing import Optional
# Linked list example in Python
# Node class
class Node:
# Function to initialize the node object
def __init__(self, v):
self.val = v # Assign value
self.next = None # Initialize next as null
# Linked List class
class ListNode:
# Function to initialize the L... | 22 | 51 | 0.674242 |
7967af61fa094f3035bb12f79a5557fd3a0057be | 6,992 | py | Python | dceu2019/src/dceu2019/settings/base.py | rmahmood19/2019.djangocon.eu | 139ec95c39ec66cab085c4e694578e35b6bdb4b6 | [
"MIT"
] | null | null | null | dceu2019/src/dceu2019/settings/base.py | rmahmood19/2019.djangocon.eu | 139ec95c39ec66cab085c4e694578e35b6bdb4b6 | [
"MIT"
] | null | null | null | dceu2019/src/dceu2019/settings/base.py | rmahmood19/2019.djangocon.eu | 139ec95c39ec66cab085c4e694578e35b6bdb4b6 | [
"MIT"
] | null | null | null | """
Django settings for dceu2019 project.
Generated by 'django-admin startproject' using Django 2.0.9.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import pathl... | 30.938053 | 115 | 0.662328 |
7967af945546f876321ae5e0cd0b500a22b2f0e4 | 7,670 | py | Python | fos/core/actor.py | ibrahemesam/Fos | f2f284a2c7bdc24dafafebb8aa3141ebf225e451 | [
"BSD-3-Clause"
] | null | null | null | fos/core/actor.py | ibrahemesam/Fos | f2f284a2c7bdc24dafafebb8aa3141ebf225e451 | [
"BSD-3-Clause"
] | null | null | null | fos/core/actor.py | ibrahemesam/Fos | f2f284a2c7bdc24dafafebb8aa3141ebf225e451 | [
"BSD-3-Clause"
] | 1 | 2021-07-11T00:16:46.000Z | 2021-07-11T00:16:46.000Z | import numpy as np
from fos.actor.primitives import AABBPrimitive
from fos.lib.pyglet.gl import GLfloat
from fos.lib.pyglet.gl import *
class Actor(object):
""" Define a visualization object in Fos """
def __init__(self,
affine = None,
aabb = None,
force... | 32.09205 | 100 | 0.54485 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.