hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5c6045fc499cb03a549480d8c53789f4bceebbe | 3,518 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.191781 | 130 | 0.701251 |
d5c60fc32312869f711f02f5528d7a4082e6e284 | 1,762 | py | Python | src/few_shot/data.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | src/few_shot/data.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | src/few_shot/data.py | miszkur/data-efficient-NLP | 7ad9d988cd17e769ab97802adbdeb6893429af10 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append( '..' )
sys.path.append( '.' )
from data_processing.ev_parser import create_dataset
import numpy as np
import random
class FewShotDataLoader:
def __init__(self, num_classes=8, split='train'):
self.ds = create_dataset(split=split)
self.num_classes = num_classes
self.cre... | 35.959184 | 129 | 0.637911 |
d5c6656b6283ddd7624058069ea8aea654668140 | 12,894 | py | Python | PythonProjects/99-CapstoneProject-202020d_SOLUTION/libs/mqtt_remote_method_calls.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020d_SOLUTION/libs/mqtt_remote_method_calls.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020d_SOLUTION/libs/mqtt_remote_method_calls.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Library for making MQTT remote method calls.
The purpose of the MqttClient class is to allow one computer to call a method on an object
that lives on another computer. So if your PC wanted to call the arm_up method on an
instance of your robot, it could! Example:
# Assuming imports like these
impor... | 41.194888 | 146 | 0.650225 |
d5c675453d4e73627219266241c0b7636d4096af | 5,853 | py | Python | tests/coupled/prescribed/WindTurbine/test_rotor.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | tests/coupled/prescribed/WindTurbine/test_rotor.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | tests/coupled/prescribed/WindTurbine/test_rotor.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import os
import unittest
import shutil
import glob
folder = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
class TestRotor(unittest.TestCase):
"""
NREL 5MW case
J. Jonkman et al. "Definition of a 5-MW Reference Wind Turbine for Offshore System Development", NREL/TP-500-... | 41.807143 | 142 | 0.495131 |
d5c67a7fd1014a5fb5f90eec99069e5ac0c097eb | 4,667 | py | Python | chatrooms/apps/chats/endpoints.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | chatrooms/apps/chats/endpoints.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | chatrooms/apps/chats/endpoints.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | from typing import Optional
from uuid import UUID
from fastapi import APIRouter, Depends, HTTPException, WebSocket, status, Request
from tortoise.exceptions import DoesNotExist
from chatrooms.apps.chats import services as chat_services
from chatrooms.apps.chats.pagination import ChatPagination, ChatOwnPagination, Cha... | 39.888889 | 117 | 0.755732 |
d5c69e4f42262bff0bf6e6866ce420041a1d7c4c | 3,687 | py | Python | delfin/drivers/hpe/hpe_3par/ssh_handler.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | delfin/drivers/hpe/hpe_3par/ssh_handler.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 3 | 2020-05-23T03:24:56.000Z | 2020-06-06T02:24:27.000Z | delfin/drivers/hpe/hpe_3par/ssh_handler.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The SODA Authors.
# Copyright (c) 2016 Huawei Technologies Co., Ltd.
# 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.ap... | 33.825688 | 78 | 0.623 |
d5c6ac8eadc82dca5bfaacd6c7670a8e5fa0f256 | 20,491 | py | Python | igraph/test/basic.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | 2 | 2017-03-07T04:01:59.000Z | 2017-05-02T17:19:29.000Z | igraph/test/basic.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | igraph/test/basic.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | import unittest
from igraph import *
class BasicTests(unittest.TestCase):
def testGraphCreation(self):
g = Graph()
self.assertTrue(isinstance(g, Graph))
self.assertTrue(g.vcount() == 0 and g.ecount() == 0 and g.is_directed() == False)
g=Graph(3, [(0,1), (1,2), (2,0)])
self.... | 42.336777 | 116 | 0.560832 |
d5c6bc799c520d2dd8d911e556cf0f1c6ceb62fd | 2,517 | py | Python | lrs/util/etag.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | lrs/util/etag.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | null | null | null | lrs/util/etag.py | ELSUru/ADL_LRS | aabeb9cf3e56795b148f37d07e1bb2b41e61e470 | [
"Apache-2.0"
] | 3 | 2021-01-14T12:51:24.000Z | 2022-03-15T17:11:11.000Z | import hashlib
from ..exceptions import Conflict, PreconditionFail
IF_MATCH = "HTTP_IF_MATCH"
IF_NONE_MATCH = "HTTP_IF_NONE_MATCH"
def create_tag(resource):
return hashlib.sha1(resource).hexdigest()
def get_etag_info(headers, required=True):
etag = {}
etag[IF_MATCH] = headers.get(IF_MATCH, None)
if... | 38.136364 | 132 | 0.688121 |
d5c6dd3127306ce0be6c8a0c74b6f216c3b9c576 | 22,785 | py | Python | pygeostatistics/cokrige.py | wassemalward/pyGeoStatistics | 25cd4b74855ddb5763d87388502424a9742d37ce | [
"MIT"
] | null | null | null | pygeostatistics/cokrige.py | wassemalward/pyGeoStatistics | 25cd4b74855ddb5763d87388502424a9742d37ce | [
"MIT"
] | null | null | null | pygeostatistics/cokrige.py | wassemalward/pyGeoStatistics | 25cd4b74855ddb5763d87388502424a9742d37ce | [
"MIT"
] | 2 | 2019-04-09T06:06:27.000Z | 2019-06-03T15:08:20.000Z | # -*- coding: utf-8 -*-
"""
A cokriging program for a points or blocks on a regular grid.
Created on Fri Dec 2 2016
"""
from __future__ import division, print_function, absolute_import
import json
from itertools import product
import time
from collections import namedtuple
import numpy as np
from scipy import linalg
i... | 39.216867 | 79 | 0.510555 |
d5c6e085ac80662ea221f35b945c4222b268965c | 5,733 | py | Python | drfdiary/api/tests/test_categories.py | ro6ley/drf-diary | e0f270d8fbd3299703d46f3ad743b75f1831743a | [
"MIT"
] | 1 | 2020-01-27T13:43:33.000Z | 2020-01-27T13:43:33.000Z | drfdiary/api/tests/test_categories.py | ro6ley/drf-diary | e0f270d8fbd3299703d46f3ad743b75f1831743a | [
"MIT"
] | 6 | 2019-09-02T12:49:02.000Z | 2021-06-10T17:36:01.000Z | drfdiary/api/tests/test_categories.py | ro6ley/drf-diary | e0f270d8fbd3299703d46f3ad743b75f1831743a | [
"MIT"
] | null | null | null | import json
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from django.contrib.auth.models import User
from api.models import Category
class CategoryModelTestCase(TestCase):
"""
This class defines the test cases for the Category model
"""
... | 36.515924 | 79 | 0.633351 |
d5c6e171c1a29332623135822cb87d45d0cc7091 | 6,853 | py | Python | twisted/trial/itrial.py | sxamit/twisted | 30f6966329c857c3631c60aeb420d84d7828e01e | [
"MIT",
"Unlicense"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | Lib/site-packages/twisted/trial/itrial.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/twisted/trial/itrial.py | adzhou/Python27 | a7113b69d54a04cc780143241c2f1fe81939ad3a | [
"bzip2-1.0.6"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Interfaces for Trial.
Maintainer: Jonathan Lange
"""
from __future__ import division, absolute_import
import zope.interface as zi
from zope.interface import Attribute
class ITestCase(zi.Interface):
"""
The interface that a test ca... | 26.357692 | 80 | 0.59536 |
d5c7116c5c5fbfbbdc8efc616d09bb2db7c9ed3a | 189 | py | Python | media/urls.py | mateusz800/blog | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | null | null | null | media/urls.py | mateusz800/blog | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | 6 | 2021-03-19T11:06:32.000Z | 2021-04-12T13:11:26.000Z | media/urls.py | mateusz800/stories | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('api/media/photo/upload', views.upload_photo),
path('api/media/user/<int:user_PK>', views.get_user_photos)
]
| 21 | 63 | 0.719577 |
d5c71f11c5d046686ea4edc487d949df0b9e0e3b | 2,635 | py | Python | forecast_combinations_approach.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | forecast_combinations_approach.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | forecast_combinations_approach.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | 2 | 2022-03-20T10:30:38.000Z | 2022-03-22T06:39:14.000Z | # Example code to run the base learners and forecast combinations.
# Note you can define any forecasting model as the base learners for this framework.
import pandas as pd
import os
import constants
from datetime import timedelta
from timeseries_split import TimeSeriesDivide
import run_base_models as base_learners
impo... | 47.053571 | 116 | 0.665275 |
d5c766796fff0719b4116ac525fc161eff708364 | 1,644 | py | Python | docs/user/recipes/line_transect.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 2 | 2018-12-02T11:33:50.000Z | 2021-04-24T11:42:42.000Z | docs/user/recipes/line_transect.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 103 | 2018-03-21T15:00:05.000Z | 2020-06-04T05:40:25.000Z | docs/user/recipes/line_transect.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | null | null | null | import fiona
import numpy
import xarray
import datacube
from datacube.utils import geometry
def transect(data, line, resolution, method='nearest', tolerance=None):
"""
Extract line transect from data along geom
:param xarray.Dataset data: data loaded via `Datacube.load`
:param datacube.utils.Geometr... | 33.55102 | 95 | 0.641119 |
d5c78354ef8dae44da5f4102a03797e96530349a | 20,501 | py | Python | airflow_client/client/model/sla_miss.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/sla_miss.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/sla_miss.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 72.698582 | 8,098 | 0.643773 |
d5c7840b12ea80a15653e881133d1c5cdf883e4b | 9,308 | py | Python | app/questionnaire/questionnaire_store_updater.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/questionnaire/questionnaire_store_updater.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/questionnaire/questionnaire_store_updater.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | from itertools import combinations
from typing import Iterable, List, Optional, Tuple, Union
from app.data_model.answer_store import Answer
from app.data_model.relationship_store import Relationship, RelationshipStore
from app.data_model.progress_store import CompletionStatus
from app.questionnaire.location import Lo... | 40.294372 | 113 | 0.685432 |
d5c793d1224c4425d8525e1c70d71304fa01a31c | 21,775 | py | Python | tests/test_fancy.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 1 | 2019-05-22T07:45:13.000Z | 2019-05-22T07:45:13.000Z | tests/test_fancy.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 19 | 2019-06-20T14:47:09.000Z | 2020-06-12T13:03:50.000Z | tests/test_fancy.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 2 | 2019-06-21T09:13:11.000Z | 2020-04-28T19:34:48.000Z | # -*- coding: utf-8 -*-
"""Test of Fancy module
This module test the various functions present in the Fancy module.
"""
import datetime
import unittest
import unittest.mock
import sys
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_array_equal
import pandas as pd
from pandas.api.typ... | 44.529652 | 100 | 0.567164 |
d5c7aa29d73c15444d3d318375cb07e34d2cdfc6 | 2,021 | py | Python | tests/tests_with_server_and_cached_results/test_aql/test_aql.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | tests/tests_with_server_and_cached_results/test_aql/test_aql.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | tests/tests_with_server_and_cached_results/test_aql/test_aql.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | import json
from glob import glob
from os.path import abspath
from os.path import dirname
from os.path import join
import pytest
from pydent.aql import aql
from pydent.aql import validate_aql
here = abspath(dirname(__file__))
def load(filepath):
with open(filepath, "r") as f:
return json.load(f)
exam... | 26.246753 | 86 | 0.685304 |
d5c7c2cc3a01addd9eedfe66d0e887bf882f21b7 | 2,596 | py | Python | tests/test_TUDPTransport.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 372 | 2017-10-31T21:51:26.000Z | 2022-03-23T10:36:19.000Z | tests/test_TUDPTransport.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 276 | 2017-10-10T11:33:50.000Z | 2022-03-24T16:36:16.000Z | tests/test_TUDPTransport.py | jaegertracing/jaeger-client-python | a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b | [
"Apache-2.0"
] | 157 | 2017-10-09T07:16:41.000Z | 2021-12-29T14:49:26.000Z | # Copyright (c) 2016 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 30.541176 | 74 | 0.677196 |
d5c7cd303614a6abf9f5c48cc4c5377ae49f7942 | 1,143 | py | Python | mauveinternet/markdown/views.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | mauveinternet/markdown/views.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | mauveinternet/markdown/views.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | import re
from django.http import HttpResponse, Http404
from mauveinternet.markdown import get_models, get_model
# This needs to be added to the URL configuration as /admin/markdown/links
# so that the Javascript can find it.
def links(request):
"""Returns a list of the models and instances of that model
that... | 47.625 | 235 | 0.63867 |
d5c7f1862b852dc0e374cf66bb1dcdaafe378612 | 7,879 | py | Python | devel/lib/python2.7/dist-packages/kinova_msgs/msg/_ArmPoseResult.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/kinova_msgs/msg/_ArmPoseResult.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/kinova_msgs/msg/_ArmPoseResult.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from kinova_msgs/ArmPoseResult.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import geometry_msgs.msg
import std_msgs.msg
class ArmPoseResult(genpy.Message):
_md5sum ... | 37.341232 | 236 | 0.645894 |
d5c85a5a84f3793126673d09085308f1f2a6ce66 | 5,505 | py | Python | homeassistant/components/scsgate/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/scsgate/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/scsgate/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for SCSGate switches."""
import logging
from scsgate.messages import ScenarioTriggeredMessage, StateMessage
from scsgate.tasks import ToggleStatusTask
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import ATTR_ENTITY_ID, ATTR_STAT... | 28.671875 | 88 | 0.64069 |
d5c85db75f002294735d96513be6b7f9419f1683 | 2,756 | py | Python | cleverhans/experimental/certification/tests/utils_test.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 21 | 2019-06-07T17:05:30.000Z | 2022-02-07T03:25:15.000Z | cleverhans/experimental/certification/tests/utils_test.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 1 | 2021-03-01T15:06:09.000Z | 2021-03-01T15:06:09.000Z | cleverhans/experimental/certification/tests/utils_test.py | iamgroot42/cleverhans | 53da9cd6daf9d7457800831c3eaa75f729a39145 | [
"MIT"
] | 8 | 2019-06-11T03:06:29.000Z | 2022-01-18T04:18:27.000Z | """Tests for cleverhans.experimental.certification.utils."""
# pylint: disable=missing-docstring
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from scipy.sparse.linalg import eigs
import tensorflow as tf
from tensorflow.contrib import a... | 37.753425 | 96 | 0.711538 |
d5c876ddb503c651045366691bf11e9309cd6d31 | 6,620 | py | Python | pyspeckit/wrappers/fith2co.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/wrappers/fith2co.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pyspeckit/wrappers/fith2co.py | migueldvb/pyspeckit | fa7d875da7c684c8f6aaa3ba206ef3ff2e196652 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
===================
H2CO fitter wrapper
===================
Wrapper to fit formaldehyde spectra.
"""
import pyspeckit
from matplotlib import pyplot
import copy
title_dict = {'oneone':'H$_2$CO 1$_{11}$-1$_{10}$',
'twotwo':'H$_2$CO 2$_{12}$-2$_{11}$',
'threethree':'H$_2$CO 3$_{23}$-3$_{2... | 40.121212 | 94 | 0.549698 |
d5c8871966b1a1ca37e330082758b93c7fb4ee37 | 10,109 | py | Python | infrastructure/api/tests.py | samersultan/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | 2 | 2019-02-22T16:02:19.000Z | 2019-02-23T19:27:34.000Z | infrastructure/api/tests.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | infrastructure/api/tests.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Infrastructure: test api
"""
import simplejson as json
from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from django.contrib.auth.models... | 47.238318 | 159 | 0.645069 |
d5c8bf568fcf482759124971414846efee9ed7f5 | 1,853 | py | Python | python/v2.6/create_placement_strategy.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 103 | 2015-01-11T12:23:46.000Z | 2022-03-31T02:06:12.000Z | python/v2.6/create_placement_strategy.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 32 | 2015-03-03T13:39:35.000Z | 2021-07-16T01:31:06.000Z | python/v2.6/create_placement_strategy.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | 194 | 2015-01-05T22:02:16.000Z | 2022-03-01T17:01:39.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 29.412698 | 78 | 0.729628 |
d5c8c9841145221497931591004f4db55a0e65ee | 1,431 | py | Python | cp-book/ch2/nonlineards/map/_11348_Exhibition.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch2/nonlineards/map/_11348_Exhibition.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch2/nonlineards/map/_11348_Exhibition.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | # Problem name: 11348 Exhibition
# Problem url: https://uva.onlinejudge.org/external/113/11348.pdf
# Author: Andrey Yemelyanov
import sys
import math
def readline():
return sys.stdin.readline().strip()
def main():
K = int(readline())
for t in range(K):
N = int(readline())
person_to_stamps = dict()
for perso... | 30.446809 | 118 | 0.730259 |
d5c8d3079a8f0b458d0dc5a6c53111725eccec62 | 2,174 | py | Python | cbir/search.py | aagnone3/img-cbir | dacfa4e1fead87e326db8760ab5a4761bf59adfb | [
"Apache-2.0"
] | null | null | null | cbir/search.py | aagnone3/img-cbir | dacfa4e1fead87e326db8760ab5a4761bf59adfb | [
"Apache-2.0"
] | null | null | null | cbir/search.py | aagnone3/img-cbir | dacfa4e1fead87e326db8760ab5a4761bf59adfb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import numpy as np
import argparse
import logging
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from index import extract_feat
try:
import cPickle as pickle
except:
import pickle
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
... | 29.378378 | 75 | 0.669273 |
d5c906f60d67015a9d91e03426e468bf1a620e72 | 432 | py | Python | lib/python3.8/site-packages/django_nine/context_processors.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | lib/python3.8/site-packages/django_nine/context_processors.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | lib/python3.8/site-packages/django_nine/context_processors.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | from django_nine import versions as nine_versions
__title__ = 'django_nine.versions'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2015-2019 Artur Barseghyan'
__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later'
__all__ = [
'versions',
]
def versions(request):
"""Get active theme... | 22.736842 | 60 | 0.712963 |
d5c9599405c8a3ef3eb7c1c526fb3dc97500b784 | 19,461 | py | Python | code/YOLO101_1Resolusi_120x80_TrainCDV2_OK1.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | null | null | null | code/YOLO101_1Resolusi_120x80_TrainCDV2_OK1.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | null | null | null | code/YOLO101_1Resolusi_120x80_TrainCDV2_OK1.py | mlcv-lab/mr3dcapsnet | d0b37ca085073257b0c485210ec92a5c6e7d9bb6 | [
"Apache-2.0"
] | 1 | 2021-02-21T16:07:39.000Z | 2021-02-21T16:07:39.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 14 13:24:34 2017
@author: user
"""
#from keras.preprocessing.image import ImageDataGenerator
#from keras.models import Sequential
#from keras.layers.core import Dense, Dropout, Activation, Flatten, SpatialDropout3D, Merge
#from keras.layers.convolutional import... | 35.708257 | 213 | 0.563846 |
d5c97f83067597e03db8102de366621487dddfc0 | 322 | py | Python | pyramid_demo/tuto03/templating/tutorial/views.py | bukun/gorna | 3db74e97e1e4f1b223686a6bb45fa231521cbc1b | [
"MIT"
] | null | null | null | pyramid_demo/tuto03/templating/tutorial/views.py | bukun/gorna | 3db74e97e1e4f1b223686a6bb45fa231521cbc1b | [
"MIT"
] | null | null | null | pyramid_demo/tuto03/templating/tutorial/views.py | bukun/gorna | 3db74e97e1e4f1b223686a6bb45fa231521cbc1b | [
"MIT"
] | null | null | null | from pyramid.view import view_config
# First view, available at http://localhost:6543/
@view_config(route_name='home', renderer='home.pt')
def home(request):
return {'name': 'Home View'}
# /howdy
@view_config(route_name='posts', renderer='home.pt')
def hello(request):
return {'name': 'Hello View... | 24.769231 | 53 | 0.680124 |
d5c99c1307d53d11b2c39ddf42cdb5554072efe5 | 29,010 | py | Python | src/window_main_gui.py | GCaptainNemo/MatLego | 0e8059c107fdfb0b8909e6b60e8af464c9311894 | [
"Apache-2.0"
] | null | null | null | src/window_main_gui.py | GCaptainNemo/MatLego | 0e8059c107fdfb0b8909e6b60e8af464c9311894 | [
"Apache-2.0"
] | null | null | null | src/window_main_gui.py | GCaptainNemo/MatLego | 0e8059c107fdfb0b8909e6b60e8af464c9311894 | [
"Apache-2.0"
] | null | null | null | """
The GUI of matlego 1.5.
"""
from PyQt5 import QtCore, QtGui, QtWidgets
import pyqtgraph.opengl as gl
from PyQt5.QtCore import pyqtSignal
import copy
class mytreewidget(QtWidgets.QTreeWidget):
""" To rewrite the Qtwidgets.QTreeWidget. """
def __init__(self):
super(mytreewidget, se... | 49.252971 | 133 | 0.664288 |
d5c9b0c3fe83ca956b74db70fc828ffac5684cce | 5,793 | py | Python | scripts/download_wind_era5.py | INWE-BOKU/repowering-potential-usa | 2b85dc290a80fdd60c065ebfd84def7b43466449 | [
"MIT"
] | 2 | 2020-11-24T17:30:12.000Z | 2022-01-11T13:07:43.000Z | scripts/download_wind_era5.py | inwe-boku/wind-repowering-usa | 2b85dc290a80fdd60c065ebfd84def7b43466449 | [
"MIT"
] | null | null | null | scripts/download_wind_era5.py | inwe-boku/wind-repowering-usa | 2b85dc290a80fdd60c065ebfd84def7b43466449 | [
"MIT"
] | null | null | null | import os
import logging
import cdsapi
from wind_repower_usa.config import YEARS, MONTHS, EXTERNAL_DIR
from wind_repower_usa.logging_config import setup_logging
from wind_repower_usa.load_data import load_turbines
from wind_repower_usa.calculations import calc_bounding_box_usa
def main():
# API documentation f... | 35.759259 | 123 | 0.587606 |
d5c9d18c56c2dd7e6ba801c1887e919d569a9736 | 6,572 | py | Python | Parsing/recursive_descent_parser.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | Parsing/recursive_descent_parser.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | Parsing/recursive_descent_parser.py | nicole-binder/CS322-NLP | 6ad0a78fe1cb11697484a822ca6975aa9af5f070 | [
"MIT"
] | null | null | null | class RecursiveDescentParser:
"""A recursive-descent parser."""
def __init__(self, grammar, verbose=False):
"""Initialize a RecursiveDescentParser object.
Args:
grammar: A grammar satisfying the requirements given in
Component 4 of Homework 3, plus an additional
... | 48.323529 | 81 | 0.585819 |
d5ca080fa19bff571b50ccae26ec7f23c78e965e | 999 | py | Python | hyou/__init__.py | wbrp/hyou | f6129b2eae77b1e48295a63aeb3f7c173062e974 | [
"Apache-2.0"
] | null | null | null | hyou/__init__.py | wbrp/hyou | f6129b2eae77b1e48295a63aeb3f7c173062e974 | [
"Apache-2.0"
] | 24 | 2017-07-24T07:44:33.000Z | 2022-02-04T12:05:38.000Z | hyou/__init__.py | wbrp/hyou | f6129b2eae77b1e48295a63aeb3f7c173062e974 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Google Inc. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 27 | 74 | 0.742743 |
d5ca0b2f6a36488d25850f3f2da008c71ba5025a | 5,047 | py | Python | scripts/ffcv/create_ffcv_datasets.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | scripts/ffcv/create_ffcv_datasets.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | scripts/ffcv/create_ffcv_datasets.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import subprocess
import sys
import textwrap
from argparse import ArgumentParser
from torch.utils.data import Subset
from torchvision.datasets import CIFAR10, ImageFolder
from composer.core.types import Dataset
from composer.datasets.ffcv_utils import write_ffcv_dataset
log = log... | 37.385185 | 117 | 0.54468 |
d5ca0d2e3be458ff2fa55e836182666d241f7c41 | 9,057 | py | Python | Scrabble15.py | algrant/scrabble15 | 5fdc1e9ad239b261c7147ea459d5a918bebdab9d | [
"MIT"
] | null | null | null | Scrabble15.py | algrant/scrabble15 | 5fdc1e9ad239b261c7147ea459d5a918bebdab9d | [
"MIT"
] | null | null | null | Scrabble15.py | algrant/scrabble15 | 5fdc1e9ad239b261c7147ea459d5a918bebdab9d | [
"MIT"
] | 1 | 2021-02-21T15:57:56.000Z | 2021-02-21T15:57:56.000Z | #!/usr/bin/env python
"""
Finds sets of six fifteen letter words which can fit on a
scrabble board, using the scrabble letter distribution and based on eight
letter words.
Copyright (c) 2011, Al Grant. (modified 2014)
License: MIT
"""
import sys
# Scrabble letter distribution
scrabbleLetters = "aaaaaa... | 34.568702 | 81 | 0.531191 |
d5ca14c34038b30da3214386908f39f06dfbc6a7 | 5,230 | py | Python | setup.py | ksuarz/monary | e8775ef11a8f9f020bacbaa2d8e802da1c0b4c19 | [
"Apache-2.0"
] | 7 | 2015-02-26T15:22:55.000Z | 2021-02-12T13:45:34.000Z | setup.py | ksuarz/monary | e8775ef11a8f9f020bacbaa2d8e802da1c0b4c19 | [
"Apache-2.0"
] | 2 | 2015-07-21T19:41:59.000Z | 2022-03-15T15:49:08.000Z | setup.py | ksuarz/monary | e8775ef11a8f9f020bacbaa2d8e802da1c0b4c19 | [
"Apache-2.0"
] | 3 | 2015-03-16T18:15:39.000Z | 2016-05-03T07:07:31.000Z | # Monary - Copyright 2011-2014 David J. C. Beach
# Please see the included LICENSE.TXT and NOTICE.TXT for licensing information.
import os
import platform
import re
import subprocess
import sys
from distutils.core import Command
from distutils.command.build import build
from distutils.ccompiler import new_compiler
# ... | 35.100671 | 104 | 0.598279 |
d5ca27afb3e0ed9f22d6c3c02c025c60d5f4212e | 315 | py | Python | ncolony/_version.py | ncolony/ncolony | a7aae3b5f47c1ec1389267746ce53a1a436ada3c | [
"MIT"
] | 12 | 2017-11-29T19:32:47.000Z | 2020-07-29T14:09:29.000Z | ncolony/_version.py | ncolony/ncolony | a7aae3b5f47c1ec1389267746ce53a1a436ada3c | [
"MIT"
] | 23 | 2017-10-02T03:29:41.000Z | 2020-06-04T20:28:54.000Z | ncolony/_version.py | ncolony/ncolony | a7aae3b5f47c1ec1389267746ce53a1a436ada3c | [
"MIT"
] | 1 | 2018-02-23T20:59:57.000Z | 2018-02-23T20:59:57.000Z | # Copyright (c) Moshe Zadka
# See LICENSE for details.
"""
Provides ncolony version information.
"""
# This file is auto-generated! Do not edit!
# Use `python -m incremental.update ncolony` to change this file.
from incremental import Version
__version__ = Version('ncolony', 18, 6, 0)
__all__ = ["__version__"]
| 22.5 | 65 | 0.730159 |
d5ca38464843b627ecf3c99c399359b3f433b911 | 27 | py | Python | automaton/lib/data/__init__.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 6 | 2016-01-05T09:14:57.000Z | 2021-05-17T20:46:46.000Z | automaton/lib/data/__init__.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | null | null | null | automaton/lib/data/__init__.py | nemec/Automaton | eea2f89dc10031fba45c80eb63053480dfc3543f | [
"MIT"
] | 1 | 2018-12-18T02:37:24.000Z | 2018-12-18T02:37:24.000Z | from abbreviations import * | 27 | 27 | 0.851852 |
d5ca4ee155b41a61fbc543221613f97473a27b09 | 1,319 | py | Python | robosat_pink/tools/__main__.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | robosat_pink/tools/__main__.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | robosat_pink/tools/__main__.py | HugoPopo/robosat.pink | daa6a0cd6dff68103b9bcc78a8c9a15d8912c42d | [
"MIT"
] | null | null | null | import os
import sys
import argparse
import glob
import shutil
from importlib import import_module
def main():
if not sys.version_info >= (3, 6):
sys.exit("ERROR: rsp needs Python 3.6 or later.")
if not len(sys.argv) > 1:
print("rsp: RoboSat.pink command line tools")
print("")
... | 34.710526 | 117 | 0.652009 |
d5ca6a51befe32ef6a84ff9298dabdf41a7ad4d9 | 5,346 | py | Python | comptontracks/GraphVisualizer_deprecated.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-01-29T07:24:14.000Z | 2022-03-16T10:05:25.000Z | comptontracks/GraphVisualizer_deprecated.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 6 | 2020-07-03T00:31:10.000Z | 2021-09-10T07:45:01.000Z | comptontracks/GraphVisualizer_deprecated.py | marivasq/gamma-ai | 735953e80901afea3e5cdeb2a7b27c9ab5725434 | [
"MIT"
] | 5 | 2019-02-27T22:56:49.000Z | 2019-08-24T19:01:41.000Z | ###################################################################################################
#
# GraphVisualizer.py
#
# Copyright (C) by Rithwik Sudharsan
# All rights reserved.
#
# Please see the file LICENSE in the main repository for the copyright-notice.
#
####################################################... | 44.181818 | 132 | 0.644781 |
d5ca6abaa1fd262f470bf11d42899d3a88e5f95f | 1,557 | py | Python | download_ftp_tree3.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 4 | 2019-09-09T19:47:49.000Z | 2021-12-29T18:12:26.000Z | download_ftp_tree3.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | download_ftp_tree3.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 6 | 2019-12-06T02:27:05.000Z | 2021-12-27T16:32:54.000Z | #!/usr/bin/python
import sys
import ftplib
import os
import time
server = "garner.ucsd.edu"
user = "anonymous"
password = "shlomiziskin@gmail.com"
source = "/pub/solutions/gipsy/trop"
destination = "/home/shlomi/Desktop/DATA/Work_Files/PW_yuval/garner/trop"
interval = 0.05
ftp = ftplib.FTP(server)
ftp.login(user, pa... | 26.389831 | 103 | 0.581246 |
d5ca79189293d506943eee143474225b6d4257af | 23,356 | py | Python | cinder/db/sqlalchemy/migrate_repo/versions/073_cinder_init.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/db/sqlalchemy/migrate_repo/versions/073_cinder_init.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/db/sqlalchemy/migrate_repo/versions/073_cinder_init.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright 2012 OpenStack Foundation
#
# 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 ... | 39.253782 | 79 | 0.59976 |
d5ca8c00693336d5dadecbacd206fec8a9c9cf31 | 1,987 | py | Python | mealy/constants.py | dataiku-research/mealy | 039978fbb4bbda4e89e55ae05a75bdb3560191e2 | [
"Apache-2.0"
] | 12 | 2021-09-17T19:58:09.000Z | 2022-03-22T16:04:05.000Z | mealy/constants.py | dataiku-research/mealy | 039978fbb4bbda4e89e55ae05a75bdb3560191e2 | [
"Apache-2.0"
] | 16 | 2021-02-03T16:29:54.000Z | 2021-05-27T14:15:52.000Z | mealy/constants.py | dataiku/mealy | 52fa90aa2e8dc16cf846d0590fcd7ee710dcd862 | [
"Apache-2.0"
] | null | null | null | from sklearn.impute import SimpleImputer
from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, StandardScaler, PowerTransformer, QuantileTransformer, \
MaxAbsScaler, Binarizer, Normalizer, MinMaxScaler, RobustScaler
class ErrorAnalyzerConstants(object):
WRONG_PREDICTION = "Wrong prediction"
CO... | 44.155556 | 128 | 0.757423 |
d5caa9127743b2e76bdcf8dc231561b1a3f77a1b | 9,631 | py | Python | pgbot/common.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 77 | 2020-11-16T05:26:49.000Z | 2021-03-08T06:27:06.000Z | pgbot/common.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 71 | 2021-03-19T17:51:30.000Z | 2022-02-19T12:42:19.000Z | pgbot/common.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 19 | 2021-03-19T12:48:17.000Z | 2021-12-18T04:41:08.000Z | """
This file is a part of the source code for the PygameCommunityBot.
This project has been licensed under the MIT license.
Copyright (c) 2020-present PygameCommunityDiscord
This file defines some constants and variables used across the whole codebase
"""
import io
import os
from typing import Optional, Union
impor... | 28.921922 | 139 | 0.663586 |
d5caadb7c44a46238e5485062d4b8426e9cfa3d9 | 5,733 | py | Python | doc/conf.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 15 | 2020-08-14T18:44:07.000Z | 2021-12-06T11:18:02.000Z | doc/conf.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 2 | 2020-08-16T02:26:09.000Z | 2021-08-13T01:46:43.000Z | doc/conf.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 3 | 2019-07-16T09:12:29.000Z | 2020-08-28T04:51:15.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.4 | 79 | 0.642595 |
d5cab9493dcec27dfc0848774734cafafb1a6aa2 | 989 | py | Python | py/levels/towers.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 2 | 2020-01-04T23:44:10.000Z | 2020-07-12T17:10:09.000Z | py/levels/towers.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | null | null | null | py/levels/towers.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 1 | 2022-03-16T05:43:33.000Z | 2022-03-16T05:43:33.000Z | # level design by Ben "mrthoughtful" Griffin
# Should take not more than 90 moves.
#-----------------------------------------------------
level_dict["towers"] = {
"scheme": "metal_scheme",
"size": (9,9,15),
"intro": "towers",
"help": (
"$scale(1.5)mission:\nget to the exit!\n\nto get to the exit,\nmove the s... | 29.088235 | 81 | 0.578362 |
d5cacdeba7ec38df31294f32771c4b381ffeeee0 | 47,443 | py | Python | src/analysis/combine.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | src/analysis/combine.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | src/analysis/combine.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import matplotlib.patches as pat
import copy
from matplotlib.ticker import AutoMinorLocator
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.width', None)
pd.set_option('display.max_colwidth'... | 58.355474 | 754 | 0.47946 |
d5cb1df871462d8be638a9748fce067ee1e4c619 | 2,813 | py | Python | integration.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 33 | 2020-07-16T06:31:38.000Z | 2022-03-23T18:34:58.000Z | integration.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 5 | 2020-08-27T08:06:21.000Z | 2022-02-23T12:34:09.000Z | integration.py | shinkansan/2019-UGRP-DPoom | eedee93b47e068f22bf420140d869a43f7551876 | [
"Apache-2.0"
] | 10 | 2020-08-05T15:05:58.000Z | 2021-11-19T10:20:44.000Z | # Auto Drive integration
import threading
import numpy
import rospy
rospy.init_node('robot_mvs', anonymous = False)
import os
import autodrive as ad
import ground_seg as morp
from easygo import easyGo as eg
import os
def _cls():
os.system("cls" if os.name == "nt" else "clear")
pass
slam_launch_command = '''roslaun... | 25.342342 | 98 | 0.674369 |
d5cb3050d5a9a7749b7e7bc189f3c368dd9f6df2 | 5,306 | py | Python | openleveldb/backend/connectorlocal.py | LucaMoschella/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | 6 | 2020-01-22T09:24:45.000Z | 2022-03-30T11:10:48.000Z | openleveldb/backend/connectorlocal.py | LucaMoschella/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | 5 | 2020-01-21T08:24:05.000Z | 2021-04-15T15:34:23.000Z | openleveldb/backend/connectorlocal.py | lucmos/openleveldb | b0061362e2b74aba47790f6164689b8d2fa87a5d | [
"BSD-3-Clause"
] | null | null | null | """
Class that wraps the LevelDB plyvel to support dict-like behaviour,
with automatic serialization to bytes and deserialization from bytes provided
by the serialization module
"""
from pathlib import Path
from typing import Any, Callable, Iterable, Optional, Union
import plyvel
from openleveldb.backend import serial... | 33.371069 | 88 | 0.613456 |
d5cb6455a379aa9b118c9496af57072666a403d2 | 845 | py | Python | igibson_usage/hrl4in_env_usage/using_env.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 1 | 2022-02-03T13:27:19.000Z | 2022-02-03T13:27:19.000Z | igibson_usage/hrl4in_env_usage/using_env.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | igibson_usage/hrl4in_env_usage/using_env.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | import gibson2
from gibson2.envs.parallel_env import ParallelNavEnvironment
from gibson2.envs.locomotor_env import (
NavigateEnv,
NavigateRandomEnv,
InteractiveNavigateEnv,
)
import os
from hrl4in.utils.utils import *
from hrl4in.utils.args import *
import pickle
config_file = "/home/vkmittal14/WORKSPACE/... | 25.606061 | 106 | 0.745562 |
d5cb974c031fa9264f8584b9f106be8c2d47a268 | 735 | py | Python | services/traction/acapy_wrapper/models/cred_rev_record_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/cred_rev_record_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/cred_rev_record_result.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
from acapy_wrapper.models.issuer_cred_rev_record import Iss... | 27.222222 | 96 | 0.760544 |
d5cb9fd28d0c7f7fef2f6a9265903e7c318dff8e | 13,201 | py | Python | frappe/desk/doctype/dashboard_chart/dashboard_chart.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | null | null | null | frappe/desk/doctype/dashboard_chart/dashboard_chart.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | null | null | null | frappe/desk/doctype/dashboard_chart/dashboard_chart.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import datetime
import json
from frappe.utils.dashboard import cache_source
from frappe.utils import nowdate, g... | 31.809639 | 141 | 0.74002 |
d5cba59e14fb2f4e08ae3f07722af96681dd8bb3 | 15,959 | py | Python | cloud9_root/src/tools/gce/expmanager.py | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | 3 | 2019-02-12T04:14:39.000Z | 2020-11-05T08:46:20.000Z | cloud9_root/src/tools/gce/expmanager.py | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | null | null | null | cloud9_root/src/tools/gce/expmanager.py | DanielGuoVT/symsc | 95b705bd1f4d2863d79866c84fc7ee90aba743cb | [
"Apache-2.0"
] | null | null | null | #
# Cloud9 Parallel Symbolic Execution Engine
#
# Copyright (c) 2012, Dependable Systems Laboratory, EPFL
# 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 mu... | 41.34456 | 145 | 0.550598 |
d5cbc831266bbfd4890cae4d4ec65277ad8bc66e | 772 | py | Python | office365/runtime/auth/token_response.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | office365/runtime/auth/token_response.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | office365/runtime/auth/token_response.py | domdinicola/Office365-REST-Python-Client | c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0 | [
"MIT"
] | null | null | null | class TokenResponse(object):
def __init__(self, accessToken=None, tokenType=None, **kwargs):
self.accessToken = accessToken
self.tokenType = tokenType
for key, value in kwargs.items():
setattr(self, key, value)
@property
def is_valid(self):
return self.accessTok... | 30.88 | 74 | 0.591969 |
d5cbd8eaea6c5e3c58d969365c45cf3b27815b0c | 6,173 | py | Python | atom/nucleus/python/test/test_order_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_order_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_order_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 25.936975 | 69 | 0.659971 |
d5cc029b750acd102a2afdc7fb0719be3e5d8cde | 9,483 | py | Python | src/prechecks/graph_creation.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | null | null | null | src/prechecks/graph_creation.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 314 | 2020-02-26T12:37:17.000Z | 2021-08-02T00:32:32.000Z | src/prechecks/graph_creation.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 2 | 2020-11-12T16:07:48.000Z | 2020-11-16T09:14:48.000Z | from collections import namedtuple
from typing import List, Tuple, Optional
import numpy as np
from dijkstar import Graph
from src.kinematics.forward_kinematics import geometric_jacobian
from src.kinematics.joints import BaseJoint
from src.prechecks.trajectory_segment import JointTrajSegment
START_NODE = -1
STOP_NOD... | 44.521127 | 119 | 0.659812 |
d5cc03923ed5720dfa224f9f3a358a15104a2dd1 | 1,159 | py | Python | alipay/aop/api/domain/AlipayBossProdGfsettlePaycontractModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayBossProdGfsettlePaycontractModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayBossProdGfsettlePaycontractModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.PayContractDTO import PayContractDTO
class AlipayBossProdGfsettlePaycontractModifyModel(object):
def __init__(self):
self._paycontract = None
@property
def p... | 25.755556 | 73 | 0.638481 |
d5cc06e1e567976610bc2d3cc40f87f3ddbac691 | 1,580 | py | Python | chaospy/distributions/collection/folded_cauchy.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | null | null | null | chaospy/distributions/collection/folded_cauchy.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | null | null | null | chaospy/distributions/collection/folded_cauchy.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | null | null | null | """Folded Cauchy distribution."""
import numpy
from ..baseclass import Dist
from ..operators.addition import Add
class folded_cauchy(Dist):
"""Folded Cauchy distribution."""
def __init__(self, c=0):
Dist.__init__(self, c=c)
def _pdf(self, x, c):
return 1./(numpy.pi*(1+(x-c)**2)) + 1./(n... | 27.719298 | 72 | 0.568354 |
d5cc5cfe9b6d9142e8df8c60c14d8e75aa56f105 | 418 | py | Python | cm4/abstractclass/ProcessManagerABC.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cm4/abstractclass/ProcessManagerABC.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cm4/abstractclass/ProcessManagerABC.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | import abc
class ProcessManagerABC(metaclass=abc.ABCMeta):
@abc.abstractmethod
def run_command(self):
"""
run command in node
"""
pass
@abc.abstractmethod
def run_script(self):
"""
run script in node
"""
pass
@abc.abstractmethod
... | 16.076923 | 47 | 0.526316 |
d5cc61aa235ed3ba247de67388d69e5ec2b08926 | 316 | py | Python | (1)Text/re_split.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (1)Text/re_split.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (1)Text/re_split.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import re
text = '''Paragraph one
on two lines.
Paragraph two.
Paragraph three.
'''
for num, para in enumerate(re.findall(r'(.+?)\n{2,}',text,flags=re.DOTALL)):
print(num,repr(para))
print()
print('With split:')
for num,para in enumerate(re.split(r'\n{2,}',text)):
print(num,repr(para))
print()
| 16.631579 | 76 | 0.636076 |
d5cc685c8a994e060df5e83a907bae0fc0035f59 | 1,499 | py | Python | cepbp/areas/areas.py | Dirguis/cepbp | be268faf9ec7d32c282368becb12f73cab59de8d | [
"MIT"
] | null | null | null | cepbp/areas/areas.py | Dirguis/cepbp | be268faf9ec7d32c282368becb12f73cab59de8d | [
"MIT"
] | null | null | null | cepbp/areas/areas.py | Dirguis/cepbp | be268faf9ec7d32c282368becb12f73cab59de8d | [
"MIT"
] | null | null | null | import numpy as np
from cepbp.common.pick_dimension import PickDimension
class Areas(PickDimension):
"""
Class, encpsulating all calculations related to areas
"""
def __init__(self, dimension='area'):
PickDimension.__init__(self)
@staticmethod
def rectangle_area(measurements):
... | 24.983333 | 123 | 0.588392 |
d5cc78d697272c8b7f85cbe1fae0a6554cd509d4 | 2,598 | py | Python | trax/models/neural_gpu.py | modyharshit23/trax | 2e6783a4674209b57482ec41e1c533a420aa6fe6 | [
"Apache-2.0"
] | null | null | null | trax/models/neural_gpu.py | modyharshit23/trax | 2e6783a4674209b57482ec41e1c533a420aa6fe6 | [
"Apache-2.0"
] | null | null | null | trax/models/neural_gpu.py | modyharshit23/trax | 2e6783a4674209b57482ec41e1c533a420aa6fe6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Trax 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 a... | 31.301205 | 80 | 0.690916 |
d5cc8574fd4c71fa575774e24b577f3be210dc58 | 8,033 | py | Python | goodok_mlu/utils.py | goodok/ml_utils | 010ae67b1dccfc7b1c7932df4b927fa75e2aca8e | [
"MIT"
] | null | null | null | goodok_mlu/utils.py | goodok/ml_utils | 010ae67b1dccfc7b1c7932df4b927fa75e2aca8e | [
"MIT"
] | null | null | null | goodok_mlu/utils.py | goodok/ml_utils | 010ae67b1dccfc7b1c7932df4b927fa75e2aca8e | [
"MIT"
] | 1 | 2021-03-29T13:15:02.000Z | 2021-03-29T13:15:02.000Z | import os
import sys
import subprocess
import collections
from collections import OrderedDict
import platform
import re
import git
import warnings
import tempfile
import numpy as np
import functools
def dict_flatten(d, parent_key='', sep='_'):
items = []
for k, v in d.items():
new_key = parent_key + s... | 29.642066 | 109 | 0.585335 |
d5cc954f7f716589a02b54e6ef0525e9121f9407 | 8,392 | py | Python | tests/library/matmul_cudatest.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | 1 | 2021-07-26T07:58:06.000Z | 2021-07-26T07:58:06.000Z | tests/library/matmul_cudatest.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | tests/library/matmul_cudatest.py | manuelburger/dace | a55f41dbb2a523229361bd161ba38b37d25af86d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
from dace.config import set_temporary
from dace.library import change_default
from dace.memlet import Memlet
from dace.codegen.exceptions import CompilerConfigurationError, CompilationError
import dace.libraries.blas as blas
import ... | 33.16996 | 80 | 0.521092 |
d5cce23c5588e370d5e7b648d1652e1fe4109b9f | 6,079 | py | Python | feeds/hfeed.py | capjamesg/cinnamon | 82c84e53854987e184198e334d5f23fe86fccf41 | [
"MIT"
] | null | null | null | feeds/hfeed.py | capjamesg/cinnamon | 82c84e53854987e184198e334d5f23fe86fccf41 | [
"MIT"
] | 1 | 2022-02-09T14:58:42.000Z | 2022-02-09T14:58:42.000Z | feeds/hfeed.py | capjamesg/cinnamon | 82c84e53854987e184198e334d5f23fe86fccf41 | [
"MIT"
] | null | null | null | import datetime
import json
import random
import string
import indieweb_utils
from .clean import clean_html_from_entry
from dateutil.parser import parse
from urllib.parse import urlparse as parse_url
def process_hfeed_author(
jf2: dict, url: str, child: dict, hcard: dict, feed_title: str, feed_icon: str
) -> dic... | 32.335106 | 98 | 0.544168 |
d5cd060b6f051b2dd8d469fe5dbce1dace2083dc | 9,601 | py | Python | integration_tests/test_tasks.py | armyninja/cyber | e20db027f44deb3ec1ca7e55e1cb58b5e7348ba5 | [
"MIT"
] | 1 | 2019-03-13T09:21:56.000Z | 2019-03-13T09:21:56.000Z | integration_tests/test_tasks.py | armyninja/cyber | e20db027f44deb3ec1ca7e55e1cb58b5e7348ba5 | [
"MIT"
] | null | null | null | integration_tests/test_tasks.py | armyninja/cyber | e20db027f44deb3ec1ca7e55e1cb58b5e7348ba5 | [
"MIT"
] | null | null | null | import datetime, logging
from celery import Celery
from collections import OrderedDict
from django.test import TestCase
from pivoteer.records import RecordSource, RecordType
from pivoteer.models import IndicatorRecord, IndicatorManager
from pivoteer.tasks import certificate_cen, domain_thc, ip_thc, domain_whois, ip_who... | 45.937799 | 235 | 0.688053 |
d5cd17d65775adb3819dc4d6753dfe76836db0d7 | 967 | py | Python | backend/movie/models.py | suzanpradhan/slicedtv | 0d78dae366cd50647d5c40ec921e97a7a03047b2 | [
"BSD-3-Clause"
] | 1 | 2020-11-22T11:10:31.000Z | 2020-11-22T11:10:31.000Z | backend/movie/models.py | suzanpradhan/slicedtv | 0d78dae366cd50647d5c40ec921e97a7a03047b2 | [
"BSD-3-Clause"
] | 1 | 2020-12-08T05:25:54.000Z | 2020-12-08T05:42:40.000Z | backend/movie/models.py | suzanpradhan/slicedtv | 0d78dae366cd50647d5c40ec921e97a7a03047b2 | [
"BSD-3-Clause"
] | null | null | null | # External Import
from django.db import models
# Internal Import
from slice.models import Cast, Language, Genre, Gallery
class Movie(models.Model):
movie_name= models.CharField(max_length=255)
movie_poster= models.URLField()
genres= models.ManyToManyField(Ge... | 38.68 | 72 | 0.587384 |
d5cd1e2228189a09e78c1f7c3f8abe727ceb7687 | 300,355 | py | Python | src/sage/combinat/permutation.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/permutation.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/permutation.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Permutations
The Permutations module. Use ``Permutation?`` to get information about
the Permutation class, and ``Permutations?`` to get information about
the combinatorial class of permutations.
.. WARNING::
This file defined :class:`Permutation` which depends upon
:class:`Combinat... | 34.326286 | 214 | 0.531298 |
d5cd7791a78f0b1d1474c4285cf2b7bc51bb4e5b | 12,424 | py | Python | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 42.547945 | 244 | 0.667418 |
d5cd87d1c2b67f63f790089f24a3a69cf3821bcc | 2,068 | py | Python | texturizer/traits.py | john-hawkins/Text_Feature_Generator | 201b9255d20c5e4fa3400a0b007b9e3fca62aee5 | [
"MIT"
] | null | null | null | texturizer/traits.py | john-hawkins/Text_Feature_Generator | 201b9255d20c5e4fa3400a0b007b9e3fca62aee5 | [
"MIT"
] | null | null | null | texturizer/traits.py | john-hawkins/Text_Feature_Generator | 201b9255d20c5e4fa3400a0b007b9e3fca62aee5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pkg_resources
import pandas as pd
import numpy as np
import math
import os
import re
from .process import load_word_pattern
"""
texturizer.traits: Personality trait feature flags
This module performs word or phrase matching to generate features
that can be indicative of ... | 32.3125 | 88 | 0.608801 |
d5cdaa0b1c68f39b535fae071612591eb4b87f0e | 1,435 | py | Python | Classes Program/functions.py | QiLinXue/ICS4U | 95d40efb2bac818b696b9eb039554642cd9ab9ec | [
"MIT"
] | 1 | 2018-09-27T22:44:24.000Z | 2018-09-27T22:44:24.000Z | Classes Program/functions.py | QiLinXue/ICS4U | 95d40efb2bac818b696b9eb039554642cd9ab9ec | [
"MIT"
] | 4 | 2018-09-29T17:30:58.000Z | 2018-11-20T00:32:34.000Z | Classes Program/functions.py | QiLinXue/ICS4U | 95d40efb2bac818b696b9eb039554642cd9ab9ec | [
"MIT"
] | null | null | null | '''
Functions File which contains graphical functions that can
draw rectangles, circles, and display text similar to Processing
documentation
'''
from __init__ import *
# Functions Start
def rect(x, y, length, width):
"""
Function to draw a rectangle
Parameters
----------
x : int
The x position of the bottom... | 18.164557 | 71 | 0.645993 |
d5cdb981af3a662adbc4a5b411b3d44d3aee517f | 10,385 | py | Python | data.py | keke185321/emotions | f7cef86c20880b99469c9a35b071d6062e56ac40 | [
"MIT"
] | 58 | 2017-04-04T18:59:36.000Z | 2022-02-16T14:54:09.000Z | data.py | keke185321/emotions | f7cef86c20880b99469c9a35b071d6062e56ac40 | [
"MIT"
] | 4 | 2017-06-28T13:56:04.000Z | 2021-07-02T03:42:21.000Z | data.py | keke185321/emotions | f7cef86c20880b99469c9a35b071d6062e56ac40 | [
"MIT"
] | 26 | 2017-08-22T14:41:28.000Z | 2022-03-08T05:41:03.000Z | #!/usr/bin/env python
#
# This file is part of the Emotions project. The complete source code is
# available at https://github.com/luigivieira/emotions.
#
# Copyright (c) 2016-2017, Luiz Carlos Vieira (http://www.luiz.vieira.nom.br)
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaini... | 34.501661 | 80 | 0.577275 |
d5cdde5b05134917e9f50b2d42febc58e1b8cfa2 | 3,229 | py | Python | dico/model/webhook.py | dico-api/dico | 0bb80e2bb8dd66bb5078e52c9e37c180b7c80319 | [
"MIT"
] | 37 | 2021-08-23T00:16:42.000Z | 2022-02-22T23:19:47.000Z | dico/model/webhook.py | dico-api/dico | 0bb80e2bb8dd66bb5078e52c9e37c180b7c80319 | [
"MIT"
] | 14 | 2021-08-07T09:01:29.000Z | 2022-02-27T15:19:36.000Z | dico/model/webhook.py | eunwoo1104/dico | 0bb80e2bb8dd66bb5078e52c9e37c180b7c80319 | [
"MIT"
] | 9 | 2021-08-25T04:14:05.000Z | 2022-02-27T15:08:49.000Z | import typing
from .channel import Channel, Message
from .guild import Guild
from .snowflake import Snowflake
from .user import User
from ..base.model import TypeBase
if typing.TYPE_CHECKING:
from ..api import APIClient
class Webhook:
TYPING = typing.Union[int, str, Snowflake, "Webhook"]
RESPONSE = typin... | 32.94898 | 77 | 0.632704 |
d5cdf7930941fe1908f355bf09f970cf0cbd8909 | 321 | py | Python | samples/candel_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | 2 | 2019-05-15T11:36:19.000Z | 2020-08-15T07:48:28.000Z | samples/candel_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | samples/candel_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | from datetime import date
from FinChart import Wizard
wizard = Wizard()
view = wizard.addView("candel", _view_stretch=3)
view.addCandle(
"bar",
[date(2018, 1, 1), date(2018, 1, 2), date(2018, 1, 3), date(2018, 1, 4)],
[(1, 2, 0.5, 1.8), (2, 3, 1, 2), (1, 1, 0.5, 0.8), (0.8, 1, 0.8, 0.9)],
)
wizard.show()... | 22.928571 | 77 | 0.573209 |
d5ce2fc34885b20dbaaeed244415a475ee886f74 | 5,267 | py | Python | cyborg/common/exception.py | LiuLifan8/cyborg | aef91aa8d7ef856b0293a05f01e044f090d37c97 | [
"Apache-2.0"
] | null | null | null | cyborg/common/exception.py | LiuLifan8/cyborg | aef91aa8d7ef856b0293a05f01e044f090d37c97 | [
"Apache-2.0"
] | null | null | null | cyborg/common/exception.py | LiuLifan8/cyborg | aef91aa8d7ef856b0293a05f01e044f090d37c97 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Huawei Technologies Co.,LTD.
# 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
#
# Unl... | 28.781421 | 79 | 0.678755 |
d5ce4db1febeb5d60f8f7700ef214e5c5f48fa32 | 27,486 | py | Python | python/ct/crypto/cert_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/crypto/cert_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/crypto/cert_test.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import gflags
import time
import unittest
import sys
from ct.crypto import cert, error
from ct.crypto.asn1 import oid
from ct.crypto.asn1 import x509_extension as x509_ext
from ct.crypto.asn1 import x509_name
FLAGS = gflags.FLAGS
gflags.DEFINE_string("testdata_dir", "ct/crypto/tes... | 41.582451 | 81 | 0.657098 |
d5ceabb9ba0e4c741321927a70a3650d56702be0 | 905 | py | Python | chapter-6/project_template/asgi.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | chapter-6/project_template/asgi.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | chapter-6/project_template/asgi.py | PacktPublishing/Real-time-Django | 07480a089fc0880d752d4ee5740ae6587de93aee | [
"MIT"
] | null | null | null | # project_template/asgi.py
import os
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_template.settings")
from django.conf import settings
django.setup()
from django.core.asgi import get_asgi_application
from channels.security.websocket import OriginValidator
from channels.auth import AuthMiddlew... | 30.166667 | 76 | 0.710497 |
d5ceb8474cff39f98a4a4a229209df17712052bf | 45 | py | Python | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddAcidicMixtureToProjectileModel/add_acidic_mixture_to_projectile_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddAcidicMixtureToProjectileModel/add_acidic_mixture_to_projectile_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddAcidicMixtureToProjectileModel/add_acidic_mixture_to_projectile_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class AddAcidicMixtureToProjectileModel: pass | 45 | 45 | 0.933333 |
d5cf0062351e5c87723cf8661bcc5ea5cb82ca51 | 2,307 | py | Python | vaccine_feed_ingest/stages/outputs.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | vaccine_feed_ingest/stages/outputs.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | vaccine_feed_ingest/stages/outputs.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | """Helper methods for managing data for each stage"""
import pathlib
from typing import Iterator, Optional
from .common import STAGE_OUTPUT_NAME, PipelineStage
def find_all_run_dirs(
base_output_dir: pathlib.Path,
state: str,
site: str,
stage: PipelineStage,
) -> Iterator[pathlib.Path]:
"""Find ... | 27.795181 | 80 | 0.6658 |
d5cf01c40dfc27adf569cd6e724d87b9451943d9 | 6,941 | py | Python | survae/tests/transforms/bijections/conditional/coupling/coupling_splines.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 262 | 2020-07-05T20:57:44.000Z | 2022-03-28T02:24:43.000Z | survae/tests/transforms/bijections/conditional/coupling/coupling_splines.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 17 | 2020-08-15T05:43:34.000Z | 2022-01-31T12:24:21.000Z | survae/tests/transforms/bijections/conditional/coupling/coupling_splines.py | alisiahkoohi/survae_flows | e1747b05524c7ab540a211ed360ab3e67bc3e96d | [
"MIT"
] | 35 | 2020-08-24T06:55:37.000Z | 2022-02-11T05:17:58.000Z | import numpy as np
import torch
import torch.nn as nn
import torchtestcase
import unittest
from survae.transforms.bijections.conditional.coupling import *
from survae.nn.layers import ElementwiseParams, ElementwiseParams2d, scale_fn
from survae.tests.transforms.bijections.conditional import ConditionalBijectionTest
c... | 52.984733 | 151 | 0.582481 |
d5cf12bf4c7b2fa8783d4861684dcbb0640a8c21 | 5,834 | py | Python | napari/utils/_magicgui.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2021-04-04T21:25:04.000Z | 2021-04-04T21:25:04.000Z | napari/utils/_magicgui.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T19:31:09.000Z | 2020-10-15T19:39:33.000Z | napari/utils/_magicgui.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | """This module installs some napari-specific types in magicgui, if present.
magicgui is a package that allows users to create GUIs from python functions
https://magicgui.readthedocs.io/en/latest/
It offers a function ``register_type`` that allows developers to specify how
their custom classes or types should be conve... | 33.147727 | 79 | 0.625986 |
d5cf17bf1f5d25708b44698330659c226f19028a | 1,680 | py | Python | tests/test_flob.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | tests/test_flob.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | 14 | 2021-07-07T13:17:40.000Z | 2022-01-17T19:01:34.000Z | tests/test_flob.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import igsn_lib.flob
hash_tests = [
[
b"test 1",
"f67213b122a5d442d2b93bda8cc45c564a70ec5d2a4e0e95bb585cf199869c98",
None,
],
[
"Съешь же ещё этих мягких французских булок, да выпей чаю".encode("utf-8"),
"87b68d66bbd8b19f3d73c1a0fb2966ad6adafd... | 28 | 83 | 0.642857 |
d5cf53b7a53bb6a4589ca51ba70aef29d6b6f3be | 1,119 | py | Python | dialogflow/__init__.py | gertventer1970/dialogflow-python-client-v2 | e78b0e6765f94fb9ecbbc72c9fc30ce7245703e2 | [
"Apache-2.0"
] | 2 | 2019-10-29T14:39:57.000Z | 2019-11-01T11:49:04.000Z | dialogflow/__init__.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | dialogflow/__init__.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.083333 | 74 | 0.779267 |
d5cf68f00e8c1e3187a516b392c6948a2ae91506 | 11,183 | py | Python | dnacentersdk/api/v1_3_1/site_design.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/api/v1_3_1/site_design.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/api/v1_3_1/site_design.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Site Design API wrapper.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 ... | 37.152824 | 78 | 0.590897 |
d5cf83ed4be58de3c858be5ee66579aaad63d291 | 1,574 | py | Python | examples/docs_snippets/docs_snippets_tests/intro_tutorial_tests/advanced/test_warehouse.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/intro_tutorial_tests/advanced/test_warehouse.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/intro_tutorial_tests/advanced/test_warehouse.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import csv
import os
from dagster.utils import script_relative_path
from docs_snippets.intro_tutorial.advanced.pipelines.modes import (
SqlAlchemyPostgresWarehouse as sapw1,
)
from docs_snippets.intro_tutorial.advanced.pipelines.modes import (
calories_dev_job as calories_dev_job_no_config,
)
from docs_snippet... | 30.862745 | 85 | 0.754765 |
d5cf8446ee4a4bb7cac3a6ee8551c70e5140be9f | 1,017 | py | Python | website/tunnel_rush/views.py | sai-kamal/personal_website | b3edb2848abcbd3fba92ace00170b09c62fc69e2 | [
"MIT"
] | null | null | null | website/tunnel_rush/views.py | sai-kamal/personal_website | b3edb2848abcbd3fba92ace00170b09c62fc69e2 | [
"MIT"
] | null | null | null | website/tunnel_rush/views.py | sai-kamal/personal_website | b3edb2848abcbd3fba92ace00170b09c62fc69e2 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from users.models import Profile
from django.contrib.auth.decorators import login_required
# Views for general functions of website
def index(request):
'''renders home page of the website'''
return render(request, 'tunnel_rush/index.html... | 30.818182 | 98 | 0.693215 |
d5cf8a3242542c0727be7926059e6c9e742834fc | 356 | py | Python | test/unittests/test_AreaTotal.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | test/unittests/test_AreaTotal.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | test/unittests/test_AreaTotal.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | import numpy as np
from VariableUnittest import VariableUnitTest
from gwlfe.Input.LandUse import AreaTotal
class TestAreaTotal(VariableUnitTest):
def test_AreaTotal(self):
z = self.z
np.testing.assert_array_almost_equal(
AreaTotal.AreaTotal_f(z.Area),
AreaTotal.AreaTotal(... | 25.428571 | 67 | 0.713483 |
d5cfc77cdd987176c9712bb6c73f3fd1e94f8ee5 | 2,671 | py | Python | tests/data/test_images_dataset.py | NunoEdgarGFlowHub/torchio | 656e96c8863ecff0bb29bf880af054675bbb30fd | [
"MIT"
] | 1 | 2020-03-19T08:30:18.000Z | 2020-03-19T08:30:18.000Z | tests/data/test_images_dataset.py | NunoEdgarGFlowHub/torchio | 656e96c8863ecff0bb29bf880af054675bbb30fd | [
"MIT"
] | null | null | null | tests/data/test_images_dataset.py | NunoEdgarGFlowHub/torchio | 656e96c8863ecff0bb29bf880af054675bbb30fd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests for ImagesDataset."""
import random
import tempfile
import unittest
from pathlib import Path
import numpy as np
import nibabel as nib
import torchio
from torchio import INTENSITY, LABEL, DATA, Image
from ..utils import TorchioTestCase
class TestImagesDataset(TorchioTestCase):
"""T... | 30.701149 | 70 | 0.637215 |
d5cfe5267467399e4f11bfb35f87e330cb9d252c | 302 | py | Python | abc/187/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/187/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/187/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N = int(input())
ans = 0
X = [None] * N
Y = [None] * N
for i in range(N):
X[i], Y[i] = map(int, input().split())
for i in range(N-1):
for j in range(i+1, N):
x1, y1 = X[i], Y[i]
x2, y2 = X[j], Y[j]
if -1 <= (y2 - y1) / (x2 - x1) <= 1:
ans += 1
print(ans)
| 17.764706 | 44 | 0.410596 |
d5cffcbebdae12e582f272ccdd826d5985f86039 | 254 | py | Python | tdl_attrs/__init__.py | danmar3/tdl-attrs | 0d10f0efb5a73d103571536bbcaf1a089c63eb34 | [
"MIT"
] | null | null | null | tdl_attrs/__init__.py | danmar3/tdl-attrs | 0d10f0efb5a73d103571536bbcaf1a089c63eb34 | [
"MIT"
] | null | null | null | tdl_attrs/__init__.py | danmar3/tdl-attrs | 0d10f0efb5a73d103571536bbcaf1a089c63eb34 | [
"MIT"
] | null | null | null | from .core import (
is_initialized,
build,
get_input_args,
OrderType,
TdlArgs,
TdlDescriptor,
)
from .core import define
pr = TdlDescriptor
ar = TdlArgs
INIT = OrderType.INIT
BUILD = OrderType.BUILD
MANUAL = OrderType.MANUAL
| 15.875 | 25 | 0.69685 |
d5d008e4b3b828f9ff63a813d8431a8b69bc9ed7 | 753 | py | Python | examples/hacker_news_assets/hacker_news_assets_tests/test_assets/test_comment_stories.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/hacker_news_assets/hacker_news_assets_tests/test_assets/test_comment_stories.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/hacker_news_assets/hacker_news_assets_tests/test_assets/test_comment_stories.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import pytest
from hacker_news_assets.assets.comment_stories import comment_stories
from pandas import DataFrame
@pytest.mark.parametrize(
"comments, stories, expected",
[
([[2, 1000, "bob"]], [[1000]], [[2, 1000, "bob"]]),
([[2, 1000, "bob"], [3, 2, "alice"]], [[1000]], [[2, 1000, "bob"], [3,... | 34.227273 | 97 | 0.646746 |
d5d03fb1ebcea09f8fd5425a41b0bd12c5139e4d | 7,614 | py | Python | tensorflow/contrib/layers/python/layers/target_column_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/layers/python/layers/target_column_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/layers/python/layers/target_column_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 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... | 44.267442 | 86 | 0.674153 |
d5d06a213c253dfffe76501a963ccd7399052126 | 1,003 | py | Python | sdks/python/test/test_ClearProperty_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_ClearProperty_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_ClearProperty_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 25.075 | 109 | 0.740778 |
d5d071b7aac6739b70f07447b03b6cee5da033b2 | 346 | py | Python | premise/__init__.py | kais-siala/rmnd-lca | db00e65e520b59e7e85268cbefb5fef593139715 | [
"BSD-3-Clause"
] | null | null | null | premise/__init__.py | kais-siala/rmnd-lca | db00e65e520b59e7e85268cbefb5fef593139715 | [
"BSD-3-Clause"
] | null | null | null | premise/__init__.py | kais-siala/rmnd-lca | db00e65e520b59e7e85268cbefb5fef593139715 | [
"BSD-3-Clause"
] | null | null | null | __all__ = (
"NewDatabase",
"Geomap",
"DATA_DIR",
"INVENTORY_DIR"
)
__version__ = (0, 3, 3)
from pathlib import Path
DATA_DIR = Path(__file__).resolve().parent / "data"
INVENTORY_DIR = Path(__file__).resolve().parent / "data" / "additional_inventories"
from .ecoinvent_modification import NewDatabase
f... | 21.625 | 83 | 0.710983 |
d5d0a37b138e8b3ebcb558f5adfb9abf1cd10990 | 3,311 | py | Python | labs/lab-06/q4_plot_words.py | UnitedBagels/oss-repo-template | ee5ea91ff4c97afe7f5f7f69c4fbf75f732b984c | [
"CC0-1.0"
] | null | null | null | labs/lab-06/q4_plot_words.py | UnitedBagels/oss-repo-template | ee5ea91ff4c97afe7f5f7f69c4fbf75f732b984c | [
"CC0-1.0"
] | null | null | null | labs/lab-06/q4_plot_words.py | UnitedBagels/oss-repo-template | ee5ea91ff4c97afe7f5f7f69c4fbf75f732b984c | [
"CC0-1.0"
] | null | null | null | """
=====
Words
=====
Words/Ladder Graph
------------------
Generate an undirected graph over the 5757 5-letter words in the
datafile `words_dat.txt.gz`. Two words are connected by an edge
if they differ in one letter, resulting in 14,135 edges. This example
is described in Section 1.1 in Knuth's book (see [1]_ and ... | 32.782178 | 104 | 0.561462 |
d5d0b0fafa2e9928061cfcef71ffd77b19474c23 | 2,162 | py | Python | examples/sbpr_epinions.py | redhat6/cornac | 856cf0f546a0dc6b46f407128d89ef2534994c60 | [
"Apache-2.0"
] | null | null | null | examples/sbpr_epinions.py | redhat6/cornac | 856cf0f546a0dc6b46f407128d89ef2534994c60 | [
"Apache-2.0"
] | null | null | null | examples/sbpr_epinions.py | redhat6/cornac | 856cf0f546a0dc6b46f407128d89ef2534994c60 | [
"Apache-2.0"
] | 1 | 2020-03-19T13:58:33.000Z | 2020-03-19T13:58:33.000Z | # Copyright 2018 The Cornac 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 applicable ... | 43.24 | 103 | 0.699815 |
d5d0b86c8e3fd8a57cf3d73cdcc3f79dfe17254a | 858 | py | Python | tests/test_identity/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 126 | 2019-09-07T09:32:44.000Z | 2022-03-29T14:28:41.000Z | tests/test_identity/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 1,814 | 2019-08-24T10:08:07.000Z | 2022-03-31T14:28:36.000Z | tests/test_identity/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 46 | 2019-09-03T22:13:58.000Z | 2022-03-22T01:25:16.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2020 Fetch.AI Limited
#
# 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 ... | 40.857143 | 80 | 0.586247 |
d5d0ecabe612d5c8355a634963d2a743941c7fef | 14,633 | py | Python | hdltools/mmap/builder.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | hdltools/mmap/builder.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | hdltools/mmap/builder.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """Memory mapped interface builder."""
import copy
import re
from scoff.ast.visits.syntax import SyntaxChecker
# from scoff.ast.visits.control import SetFlag, ClearFlagAfter
import hdltools.util
from hdltools.abshdl.const import HDLIntegerConstant
from hdltools.abshdl.expr import HDLExpression
from hdltools.abshdl.m... | 36.041872 | 77 | 0.555389 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.