hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9748178ba8a2985c5abc1fc95c30f647601960ac | 6,052 | py | Python | docs/conf.py | mrshannon/flask-signin | 7886879622f3c30056874b6a0ab61d356c92f406 | [
"MIT"
] | null | null | null | docs/conf.py | mrshannon/flask-signin | 7886879622f3c30056874b6a0ab61d356c92f406 | [
"MIT"
] | null | null | null | docs/conf.py | mrshannon/flask-signin | 7886879622f3c30056874b6a0ab61d356c92f406 | [
"MIT"
] | null | null | null | # -*- 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 ------------------------------------------------------------... | 32.363636 | 87 | 0.648876 |
486fdc95bfe525fd2dad9d3234f90d18c38c3f73 | 3,064 | py | Python | src/waldur_mastermind/marketplace/managers.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | 2 | 2017-01-20T15:26:25.000Z | 2017-08-03T04:38:08.000Z | src/waldur_mastermind/marketplace/managers.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | src/waldur_mastermind/marketplace/managers.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | from django.db import models as django_models
from django.db.models import Q
from waldur_core.core import managers as core_managers
from waldur_core.structure import models as structure_models
from waldur_core.structure import utils as structure_utils
class MixinManager(core_managers.GenericKeyMixin, django_models.M... | 33.304348 | 99 | 0.672977 |
c51460a4b28adc5002682bd650807ec52cd60c7d | 817 | py | Python | examples/rpc_client2.py | fordoo/fizznet | 55d83d11c3b37c3bde7fae8c3579e5cb712d1940 | [
"MIT"
] | 60 | 2015-10-16T03:18:38.000Z | 2021-06-04T07:39:53.000Z | examples/rpc_client2.py | fordoo/fizznet | 55d83d11c3b37c3bde7fae8c3579e5cb712d1940 | [
"MIT"
] | 4 | 2015-11-20T09:38:29.000Z | 2016-09-06T15:27:35.000Z | examples/rpc_client2.py | fordoo/fizznet | 55d83d11c3b37c3bde7fae8c3579e5cb712d1940 | [
"MIT"
] | 15 | 2015-11-07T19:14:28.000Z | 2019-10-12T07:35:50.000Z | # -*- coding: utf-8 -*-
import logging
import sys
sys.path.append('../')
from tornado import ioloop, gen
from example_utils import log_initialize
from torpc import RPCClient
logger = logging.getLogger(__name__)
@gen.coroutine
def test_rpc():
ret = yield rpc_client.call('sum', 11, 22)
logger.info('call su... | 24.029412 | 89 | 0.687882 |
12a7630100c7c0519bb2e746fa65c249b5977e19 | 5,098 | py | Python | src/mlb_statsapi/model/base.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/base.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | src/mlb_statsapi/model/base.py | power-edge/mlb_statsapi_etl | 9cca2ae059e8aab98ed460e7b71ad6eeeed09ffe | [
"Apache-2.0"
] | null | null | null | """
created by nikos at 4/21/21
"""
import json
import os
from serde import Model, fields, tags
from mlb_statsapi.utils import CONFIGS_PATH
from mlb_statsapi.utils.log import LogMixin
from mlb_statsapi.utils.stats_api_object import StatsAPIObject
__beta_stats_api_default_version__ = '1.0'
beta_stats_api_version = os... | 29.468208 | 120 | 0.686151 |
e98ad22acb6cd11944636abb785d93855c517c8a | 1,362 | py | Python | src/api-service/__app__/timer_tasks/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | 1 | 2021-12-20T14:48:40.000Z | 2021-12-20T14:48:40.000Z | src/api-service/__app__/timer_tasks/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | null | null | null | src/api-service/__app__/timer_tasks/__init__.py | CuteCutePanda/onefuzz | c71ce580bd6ef37e6e8f8ee7c9413a13c0abd695 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
import azure.functions as func
from onefuzztypes.enums import JobState, TaskState
from ..onefuzzlib.events import get_events
from ..onefuzzlib.jobs import Job
from ..onefuzzlib.orm import process_state_upd... | 28.375 | 85 | 0.701175 |
8d6f7a991c630b16af45b76704f7e73f8579a6db | 4,487 | py | Python | contribute_point_calculator.py | iknoom/LeetCode-Solutions | 85c034dfaf1455bcd69c19a2009197934d83f08e | [
"MIT"
] | 2 | 2021-01-26T04:15:33.000Z | 2021-01-26T04:15:46.000Z | contribute_point_calculator.py | iknoom/LeetCode-Solutions | 85c034dfaf1455bcd69c19a2009197934d83f08e | [
"MIT"
] | null | null | null | contribute_point_calculator.py | iknoom/LeetCode-Solutions | 85c034dfaf1455bcd69c19a2009197934d83f08e | [
"MIT"
] | null | null | null | import os, datetime, pickle, pytz
from collections import defaultdict
class point_calculator:
def __init__(self):
self.parsed_logs = []
with open('problems_info', 'rb') as f:
self.problems_info = pickle.load(f)
def parse_git_log(self):
git_logs = os.popen("bash -c 'git fetc... | 36.185484 | 140 | 0.519724 |
82730263acaf100bb98478b51ef86a67f8a385bc | 25,837 | py | Python | cadquery/sketch.py | Hecatron-Forks/cadquery | db457616f0a2cfbdaa836c9b9083b5d635753b7c | [
"Apache-2.0"
] | null | null | null | cadquery/sketch.py | Hecatron-Forks/cadquery | db457616f0a2cfbdaa836c9b9083b5d635753b7c | [
"Apache-2.0"
] | null | null | null | cadquery/sketch.py | Hecatron-Forks/cadquery | db457616f0a2cfbdaa836c9b9083b5d635753b7c | [
"Apache-2.0"
] | null | null | null | from typing import (
Union,
Optional,
List,
Dict,
Callable,
Tuple,
Iterable,
Iterator,
Any,
Sequence,
TypeVar,
cast as tcast,
)
from typing_extensions import Literal
from math import tan, sin, cos, pi, radians
from itertools import product, chain
from multimethod import m... | 25.862863 | 108 | 0.51074 |
975110d0dfc627cc8697c02a98961542107d6ad9 | 4,917 | py | Python | train.py | juliagong/sketch2face | 40b7f1ee129dc0ff14c4d3a4e3479a7ee5439296 | [
"BSD-3-Clause"
] | 10 | 2019-07-12T15:13:13.000Z | 2021-11-25T22:28:25.000Z | train.py | juliagong/sketch2face | 40b7f1ee129dc0ff14c4d3a4e3479a7ee5439296 | [
"BSD-3-Clause"
] | 5 | 2020-11-13T18:15:47.000Z | 2022-02-10T00:15:29.000Z | train.py | juliagong/sketch2face | 40b7f1ee129dc0ff14c4d3a4e3479a7ee5439296 | [
"BSD-3-Clause"
] | 2 | 2021-01-08T02:59:15.000Z | 2021-01-22T04:52:28.000Z | """General-purpose training script for image-to-image translation.
This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and
different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization).
You need to specify the dataset ('--dataroot'), e... | 59.963415 | 159 | 0.68253 |
1e160ea206c276854600191e2edf0c93535990cb | 183 | py | Python | Week 1 In-out, int and bool/Task14.py | retverd/python_hse | cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88 | [
"MIT"
] | null | null | null | Week 1 In-out, int and bool/Task14.py | retverd/python_hse | cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88 | [
"MIT"
] | null | null | null | Week 1 In-out, int and bool/Task14.py | retverd/python_hse | cb9bfb092c1cf68ae0c53b9919ca24a71a8cbf88 | [
"MIT"
] | null | null | null | # Подсчитайте результат вычисления выражения 213169^{123} и запишите его 10 раз подряд.
#
# Подсказка: воспользуйтесь функцией str и умножением строк.
print(str(213169 ** 123) * 10)
| 30.5 | 87 | 0.765027 |
e5139d9499e708ca47d5e9e33d2ebd3e13589d95 | 10,307 | py | Python | apps/courses/views.py | open-source-uc/ramos-uc | 9b8e9151b46a86752910d3bf51bc4267449e8460 | [
"MIT"
] | 7 | 2021-07-14T18:13:35.000Z | 2021-11-21T20:10:54.000Z | apps/courses/views.py | nico-mac/ramos-uc | 9b8e9151b46a86752910d3bf51bc4267449e8460 | [
"MIT"
] | 57 | 2021-07-10T01:31:56.000Z | 2022-01-14T02:02:58.000Z | apps/courses/views.py | nico-mac/ramos-uc | 9b8e9151b46a86752910d3bf51bc4267449e8460 | [
"MIT"
] | 4 | 2021-07-23T16:51:55.000Z | 2021-08-31T02:41:41.000Z | from django.shortcuts import render, get_object_or_404
from django.http import JsonResponse
from django.urls import reverse
from .models import Course, Section
from .serializers import PlannerSearchSerializer
from django.views.decorators.cache import cache_control, never_cache
from django.core.cache import cache
from d... | 31.233333 | 87 | 0.582808 |
e7cea4180de4096a0b3dc78f32c63d7d9923592d | 2,047 | py | Python | tests/fiaas_skipper/deploy/test_cluster.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | null | null | null | tests/fiaas_skipper/deploy/test_cluster.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | null | null | null | tests/fiaas_skipper/deploy/test_cluster.py | rarruda/skipper | a5ed39eac102116ef49dc952d6f1f4017acaa11c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8
# Copyright 2017-2019 The FIAAS 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
#
# U... | 31.984375 | 74 | 0.685393 |
f51ffcfb554fd822f6c63157eaac4d87854073f1 | 2,094 | py | Python | envido.py | cabustillo13/Truco-Argentino | 84700759176cdfe1c9d7a4852abf63503fa22371 | [
"MIT"
] | null | null | null | envido.py | cabustillo13/Truco-Argentino | 84700759176cdfe1c9d7a4852abf63503fa22371 | [
"MIT"
] | null | null | null | envido.py | cabustillo13/Truco-Argentino | 84700759176cdfe1c9d7a4852abf63503fa22371 | [
"MIT"
] | null | null | null | def extraerDatos(dato):
palo = dato[0:1] # Se extrae el primer caracter correspondiente a un palo
aux = dato.split(palo)
valor = int(aux[1]) # Se extra el valor del caracter
if (valor >= 10): # En el envido las cartas de 10 para arriba suman cero
valor = 0
r... | 36.103448 | 88 | 0.536772 |
d8c38457a7da16f828a105c1a3d40f34d7640064 | 8,481 | py | Python | habitat_sim/agent/agent.py | rakeshshrestha31/habitat-sim | 5a304163319053ce47e9e31026323df3262f2f64 | [
"MIT"
] | 1 | 2019-04-22T06:04:48.000Z | 2019-04-22T06:04:48.000Z | habitat_sim/agent/agent.py | rakeshshrestha31/habitat-sim | 5a304163319053ce47e9e31026323df3262f2f64 | [
"MIT"
] | null | null | null | habitat_sim/agent/agent.py | rakeshshrestha31/habitat-sim | 5a304163319053ce47e9e31026323df3262f2f64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import attr
import numpy as np
from .controls import ObjectControls, ActuationSpec
from habitat_sim import utils
from ha... | 32.872093 | 117 | 0.645561 |
e42cede256ece7910db430da56e82c7e048c0f50 | 19,245 | py | Python | deeprobust/graph/defense/node_embedding.py | Louise-LuLin/DeepRobust | a91b2d321f45cd7b24873220bd62a60911829d2c | [
"MIT"
] | null | null | null | deeprobust/graph/defense/node_embedding.py | Louise-LuLin/DeepRobust | a91b2d321f45cd7b24873220bd62a60911829d2c | [
"MIT"
] | null | null | null | deeprobust/graph/defense/node_embedding.py | Louise-LuLin/DeepRobust | a91b2d321f45cd7b24873220bd62a60911829d2c | [
"MIT"
] | null | null | null | """
Code in this file is modified from https://github.com/abojchevski/node_embedding_attack
'Adversarial Attacks on Node Embeddings via Graph Poisoning'
Aleksandar Bojchevski and Stephan Günnemann, ICML 2019
http://proceedings.mlr.press/v97/bojchevski19a.html
Copyright (C) owned by the authors, 2019
"""
import numba
i... | 35.705009 | 119 | 0.625201 |
0d540995bc1eb278c39115a8b1780acf01fb4167 | 3,193 | py | Python | Lib/test/test_contains.py | arvindm95/unladen-swallow | 8175e37eaea7ca66ed03283b46bc1d2db0d3f9c3 | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Lib/test/test_contains.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Lib/test/test_contains.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | from test.test_support import have_unicode, run_unittest
import unittest
class base_set:
def __init__(self, el):
self.el = el
class set(base_set):
def __contains__(self, el):
return self.el == el
class seq(base_set):
def __getitem__(self, n):
return [self.el][n]
class TestConta... | 28.508929 | 72 | 0.547134 |
ab2c24c18597b4eb464cbd5e62f979cfb48ab3f8 | 1,853 | py | Python | input_configs.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | 1 | 2021-03-17T16:42:46.000Z | 2021-03-17T16:42:46.000Z | input_configs.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | null | null | null | input_configs.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Centrify Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 39.425532 | 120 | 0.660011 |
e76c4b9335e67250430eed22780115afa827fe36 | 3,421 | py | Python | examples/agents/cem.py | afernandezcanosa/gym | 11c3b77ea0afd467b51e4f2c73e47e103ef128e9 | [
"Python-2.0",
"OLDAP-2.7"
] | 94 | 2018-01-19T05:31:39.000Z | 2020-10-27T15:11:47.000Z | examples/agents/cem.py | huangjiancong1/gym_baxter | 7534d9504b4678a3b09a4e17466f54eaeaf23ccc | [
"Apache-2.0"
] | 14 | 2020-01-28T23:09:45.000Z | 2022-03-12T00:06:59.000Z | examples/agents/cem.py | huangjiancong1/gym_baxter | 7534d9504b4678a3b09a4e17466f54eaeaf23ccc | [
"Apache-2.0"
] | 17 | 2018-02-17T17:14:16.000Z | 2019-04-28T05:49:04.000Z | from __future__ import print_function
import gym
from gym import wrappers, logger
import numpy as np
from six.moves import cPickle as pickle
import json, sys, os
from os import path
from _policies import BinaryActionLinearPolicy # Different file so it can be unpickled
import argparse
def cem(f, th_mean, batch_size, n... | 36.393617 | 108 | 0.64981 |
a7b68ede6eefacfdd43fef9883a61abd674325d0 | 16,942 | py | Python | arxiv_latex_cleaner/tests/arxiv_latex_cleaner_test.py | aditya95sriram/arxiv-latex-cleaner | 00918f146a54b0edd011b63a1bab3bef380faa4e | [
"Apache-2.0"
] | 1 | 2021-09-14T04:35:01.000Z | 2021-09-14T04:35:01.000Z | arxiv_latex_cleaner/tests/arxiv_latex_cleaner_test.py | aditya95sriram/arxiv-latex-cleaner | 00918f146a54b0edd011b63a1bab3bef380faa4e | [
"Apache-2.0"
] | null | null | null | arxiv_latex_cleaner/tests/arxiv_latex_cleaner_test.py | aditya95sriram/arxiv-latex-cleaner | 00918f146a54b0edd011b63a1bab3bef380faa4e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google Research 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 applicab... | 34.717213 | 136 | 0.584347 |
05de24cb02e30a490964a400c195e67101eac565 | 3,288 | py | Python | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/applications/mobilenet/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | null | null | null | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/applications/mobilenet/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | null | null | null | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/applications/mobilenet/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 1 | 2021-01-28T01:57:41.000Z | 2021-01-28T01:57:41.000Z | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""MobileNet v1 models for Keras.
MobileNet is a general architecture and can be used for multiple use cases.
Depending on the use case, it can use different input layer size and
different ... | 48.352941 | 97 | 0.593978 |
aa6876250b6fbbd5b3b30fb6dc4d705bbb7791a0 | 97,217 | py | Python | rapid7vmconsole/api/tag_api.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 61 | 2018-05-17T05:57:09.000Z | 2022-03-08T13:59:21.000Z | rapid7vmconsole/api/tag_api.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 33 | 2018-06-26T16:21:14.000Z | 2022-03-03T20:55:47.000Z | rapid7vmconsole/api/tag_api.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 43 | 2018-02-24T05:45:53.000Z | 2022-03-31T22:15:16.000Z | # coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from rap... | 44.492906 | 6,055 | 0.606499 |
d2f5fb62298227e3bba5b81d818b5952b0b3ce7a | 5,386 | py | Python | 2018_02_15_cryptocurrencies_trading/algorithms/shared/mr_btc-1500963590682.py | jiricejchan/AnonymniAnalytici | e4e96f943d0b2232d9099c6e7bb690a3d25ea422 | [
"MIT"
] | 10 | 2017-03-28T06:52:22.000Z | 2017-11-21T17:41:11.000Z | 2018_02_15_cryptocurrencies_trading/algorithms/shared/mr_btc-1500963590682.py | jiricejchan/AnonymniAnalytici | e4e96f943d0b2232d9099c6e7bb690a3d25ea422 | [
"MIT"
] | 1 | 2017-07-21T08:27:01.000Z | 2017-07-21T08:27:01.000Z | 2018_02_15_cryptocurrencies_trading/algorithms/shared/mr_btc-1500963590682.py | jiricejchan/AnonymniAnalytici | e4e96f943d0b2232d9099c6e7bb690a3d25ea422 | [
"MIT"
] | 8 | 2017-03-05T17:21:40.000Z | 2019-12-01T18:46:39.000Z | from catalyst.api import (
order_target_percent,
record,
symbol,
get_open_orders,
set_max_leverage,
schedule_function,
date_rules,
attach_pipeline,
pipeline_output,
)
from catalyst.pipeline import Pipeline
from catalyst.pipeline.data import CryptoPricing
from catalyst.... | 30.602273 | 97 | 0.593205 |
7a670ec0e5e713180e6f0399a08e497a847f932a | 2,660 | py | Python | mldiag/descriptors.py | S-AI-F/MLDiag-1 | 67d79f7b16b112ad9dadefa63818db21ef3e259c | [
"MIT"
] | null | null | null | mldiag/descriptors.py | S-AI-F/MLDiag-1 | 67d79f7b16b112ad9dadefa63818db21ef3e259c | [
"MIT"
] | null | null | null | mldiag/descriptors.py | S-AI-F/MLDiag-1 | 67d79f7b16b112ad9dadefa63818db21ef3e259c | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from functools import partial
from typing import List
import numpy as np
# TODO: reproduce the Augmenter base class of nlpaug
class Description(ABC):
def __init__(self,
name,
verbose):
self.name = name
self.verbose = verbose
... | 28 | 98 | 0.627444 |
ed9b7f1b949b47ed7db483aff0b8cb8b0b385325 | 3,142 | py | Python | nicodl/core.py | yusei-wy/nicodl | 91311610c6590519b31a8a307c7ee9bf698d0e7a | [
"MIT"
] | null | null | null | nicodl/core.py | yusei-wy/nicodl | 91311610c6590519b31a8a307c7ee9bf698d0e7a | [
"MIT"
] | null | null | null | nicodl/core.py | yusei-wy/nicodl | 91311610c6590519b31a8a307c7ee9bf698d0e7a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import configparser
import subprocess
import sys
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
class Crawler(object):
_driver = None
def run(self, user, password, url):
if url is None:
self.error("Error: url is not s... | 29.092593 | 78 | 0.586251 |
0a3fff22b5dfb008da0ef487f5b1992412c3e257 | 1,328 | py | Python | desafio103.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | desafio103.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | desafio103.py | marcelocmedeiros/RevisaoPython | 04c602bf17e8ab37c9660337a8f8497eb498e10d | [
"MIT"
] | null | null | null | # Marcelo Campos de Medeiros
# ADS UNIFIP
# REVISÃO DE PYTHON
# AULA 21 Funções (Def) 2° parte---> GUSTAVO GUANABARA
'''
Faça um Programa que tenha uma função chamada ficha() que receba dois parâmetros
opcionais: o primeiro que indique o nome do jogador e o outro chamado gols que
informe quantos gols ele fez. O progra... | 27.102041 | 80 | 0.685994 |
8a4f59b82ca9a6904490638924a6b16be400d1e2 | 98 | py | Python | apps/sage_intacct/apps.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | null | null | null | apps/sage_intacct/apps.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | 3 | 2020-07-20T10:54:15.000Z | 2022-02-23T17:13:49.000Z | apps/sage_intacct/apps.py | fylein/fyle-intacct-api | 16e45538ec3a2b7af396742a42302704c33a7bd7 | [
"MIT"
] | 2 | 2020-07-25T14:50:56.000Z | 2020-08-02T13:48:37.000Z | from django.apps import AppConfig
class SageIntacctConfig(AppConfig):
name = 'sage_intacct'
| 16.333333 | 35 | 0.77551 |
4c194f1c2e6799f196aefe434556298263b3cfef | 25,673 | py | Python | colour/utilities/tests/test_array.py | Saransh-cpp/colour | 02612fef79cddbada324def766b8a93283430908 | [
"BSD-3-Clause"
] | 6 | 2019-06-18T18:53:29.000Z | 2021-09-10T21:02:45.000Z | colour/utilities/tests/test_array.py | Saransh-cpp/colour | 02612fef79cddbada324def766b8a93283430908 | [
"BSD-3-Clause"
] | null | null | null | colour/utilities/tests/test_array.py | Saransh-cpp/colour | 02612fef79cddbada324def766b8a93283430908 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines unit tests for :mod:`colour.utilities.array` module.
"""
import numpy as np
import unittest
from collections import namedtuple
from colour.constants import DEFAULT_FLOAT_DTYPE, DEFAULT_INT_DTYPE
from colour.utilities import (
as_array, as_int_array, as_float_array, as_numeric, ... | 29.307078 | 79 | 0.526234 |
9eb1ac5aa7a6d105980b6dd2742d2749fce9a4e0 | 425 | py | Python | pos/webpos/migrations/0011_auto_20150706_2005.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | pos/webpos/migrations/0011_auto_20150706_2005.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | pos/webpos/migrations/0011_auto_20150706_2005.py | NonnEmilia/OpenGenfri | 7061957fb13ef824763922e1891cb72f7d51bb0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('webpos', '0010_auto_20141230_1634'),
]
operations = [
migrations.AlterField(
model_name='item',
name... | 21.25 | 74 | 0.618824 |
05bf6c644a73b0151eb400f9eedfada28335db79 | 8,235 | py | Python | src/cocoa/toga_cocoa/widgets/internal/refresh.py | freespace/toga | 2ae96ddede34b5164b1be3d80a18aa87336f28f0 | [
"BSD-3-Clause"
] | 2 | 2022-01-08T11:18:20.000Z | 2022-01-26T13:41:34.000Z | src/cocoa/toga_cocoa/widgets/internal/refresh.py | freespace/toga | 2ae96ddede34b5164b1be3d80a18aa87336f28f0 | [
"BSD-3-Clause"
] | 4 | 2022-01-05T09:16:30.000Z | 2022-03-29T09:32:44.000Z | src/cocoa/toga_cocoa/widgets/internal/refresh.py | freespace/toga | 2ae96ddede34b5164b1be3d80a18aa87336f28f0 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T08:56:59.000Z | 2022-01-05T08:56:59.000Z | from toga_cocoa.libs import (
SEL,
NSClipView,
NSEvent,
NSEventPhaseEnded,
NSLayoutAttributeCenterX,
NSLayoutAttributeCenterY,
NSLayoutAttributeHeight,
NSLayoutAttributeNotAnAttribute,
NSLayoutAttributeTop,
NSLayoutAttributeWidth,
NSLayoutConstraint,
NSLayoutRelationEqual... | 36.438053 | 137 | 0.681481 |
bee102b73f3323c3426cce65951f060a710d9be4 | 3,545 | py | Python | scikits/crab/base.py | 3cgg/crab | 81a51f03836291f561c2e1f7966ed11c5c5226d7 | [
"BSD-3-Clause"
] | null | null | null | scikits/crab/base.py | 3cgg/crab | 81a51f03836291f561c2e1f7966ed11c5c5226d7 | [
"BSD-3-Clause"
] | null | null | null | scikits/crab/base.py | 3cgg/crab | 81a51f03836291f561c2e1f7966ed11c5c5226d7 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T07:42:11.000Z | 2021-12-20T07:42:11.000Z | #-*- coding:utf-8 -*-
"""
Base Recommender Models.
"""
# Authors: Marcel Caraciolo <marcel@muricoca.com>
# Bruno Melo <bruno@muricoca.com>
# License: BSD Style.
#from scikits.learn.base import BaseEstimator
from sklearn.base import BaseEstimator
class BaseRecommender(BaseEstimator):
"""
Base Clas... | 29.297521 | 77 | 0.602821 |
071e73a0f4e0f903cd9a8aff2d3a87febf36288f | 32,345 | py | Python | chc/app/CDictionary.py | Databean/CodeHawk-C | 98720753beb51e0bf5105f8f6838618292fbf55c | [
"MIT"
] | null | null | null | chc/app/CDictionary.py | Databean/CodeHawk-C | 98720753beb51e0bf5105f8f6838618292fbf55c | [
"MIT"
] | null | null | null | chc/app/CDictionary.py | Databean/CodeHawk-C | 98720753beb51e0bf5105f8f6838618292fbf55c | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk C Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2017-2020 Kestrel Technology LLC
#
# Permission is hereby granted, free ... | 40.685535 | 100 | 0.601608 |
fa7f8bf6b5630522b83f99f2a37422c8bf7af9d5 | 765 | py | Python | src/ch2_http_services/githib_api_from_python.py | OblongCheese/ConsumingServicesWithPython | a8057720f110c13a5f1e1256e4cc5d5f14386d15 | [
"MIT"
] | 89 | 2017-01-27T22:38:58.000Z | 2021-12-20T14:20:12.000Z | src/ch2_http_services/github_api_from_python.py | imbi7py/consuming_services_python_demos | de2359cc980b283df40ed79364df2651c493173e | [
"MIT"
] | 15 | 2017-02-22T17:51:10.000Z | 2021-06-25T19:02:52.000Z | src/ch2_http_services/github_api_from_python.py | imbi7py/consuming_services_python_demos | de2359cc980b283df40ed79364df2651c493173e | [
"MIT"
] | 47 | 2017-02-16T15:21:05.000Z | 2021-12-20T14:20:15.000Z | import requests
def main():
# mikeckennedy
# consuming_services_python_demos
user, repo = get_repo_info()
url = 'https://api.github.com/repos/{}/{}'.format(
user, repo
)
resp = requests.get(url)
if resp.status_code != 200:
print("Error accessing repo: {}".format(resp.st... | 20.131579 | 66 | 0.603922 |
67659bddaf9fe77098282411ba061db90e1a5da7 | 68 | py | Python | examples/02-on-board-components/01-led-blink/benchlib-sd/bench.py | fragmuffin/upytester | 09b213ddcadff27ab72715024a3500a3569640ef | [
"MIT"
] | 4 | 2019-02-04T04:47:20.000Z | 2021-12-08T02:37:08.000Z | examples/02-on-board-components/01-led-blink/benchlib-sd/bench.py | fragmuffin/upytester | 09b213ddcadff27ab72715024a3500a3569640ef | [
"MIT"
] | 2 | 2019-04-22T22:09:24.000Z | 2020-09-08T04:46:38.000Z | examples/02-on-board-components/01-led-blink/benchlib-sd/bench.py | fragmuffin/upytester | 09b213ddcadff27ab72715024a3500a3569640ef | [
"MIT"
] | null | null | null | # import all libraries that define an @instruction
import customled
| 22.666667 | 50 | 0.823529 |
b74787c2f6e6157730bd582bb734ad1a12fec323 | 807 | py | Python | utilities/utilities.py | nissant/dgi-portfolio-tracker | 7c50bf622ba580a474e6183f886bca43b061b2ba | [
"MIT"
] | null | null | null | utilities/utilities.py | nissant/dgi-portfolio-tracker | 7c50bf622ba580a474e6183f886bca43b061b2ba | [
"MIT"
] | null | null | null | utilities/utilities.py | nissant/dgi-portfolio-tracker | 7c50bf622ba580a474e6183f886bca43b061b2ba | [
"MIT"
] | null | null | null | from datetime import datetime
def convert_sqlalchemy_list_to_dict_list(obj_list):
dict_list = []
for row in obj_list:
row_as_dict = {column: str(getattr(row, column)) for column in row.__table__.c.keys()}
dict_list.append(row_as_dict)
return dict_list
def set_records_update_time(db_recor... | 31.038462 | 94 | 0.67658 |
93dc4c9c3b8c1ade106e731315c8d9dbe64a1e74 | 216 | py | Python | api/api/db.py | rikonor/vanguard-api | 5462b2327cacad68bedb945dc323d534ebbdfeee | [
"MIT"
] | 61 | 2016-04-19T00:14:37.000Z | 2022-03-14T03:49:05.000Z | api/api/db.py | swordfish6975/vanguard-api | 46452e1ffbe175fa82c41f87d9a299be95a2008b | [
"MIT"
] | 4 | 2017-07-10T01:30:33.000Z | 2018-08-07T05:07:54.000Z | api/api/db.py | swordfish6975/vanguard-api | 46452e1ffbe175fa82c41f87d9a299be95a2008b | [
"MIT"
] | 17 | 2017-07-10T23:26:27.000Z | 2022-02-25T01:46:21.000Z | import os
from pymongo import MongoClient
MONGO_URL = os.environ.get("MONGO_URL")
if MONGO_URL is None:
raise EnvironmentError("Please provide a MONGO_URL")
CLIENT = MongoClient(MONGO_URL)
DB = CLIENT.vanguard
| 21.6 | 56 | 0.782407 |
fa70a6a489a1d0edcce0e8780913795cddad9ee8 | 4,490 | py | Python | mindspore/python/mindspore/ops/_op_impl/_custom_op/bessel_k0e.py | httpsgithu/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | 1 | 2022-02-23T09:13:43.000Z | 2022-02-23T09:13:43.000Z | mindspore/python/mindspore/ops/_op_impl/_custom_op/bessel_k0e.py | 949144093/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/ops/_op_impl/_custom_op/bessel_k0e.py | 949144093/mindspore | c29d6bb764e233b427319cb89ba79e420f1e2c64 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Huawei Technologies Co., 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 law or agreed to... | 34.806202 | 116 | 0.638307 |
871a2a80ed1942db0d167c2f7cb9c5dff9bcd76b | 568 | py | Python | test/tensorflow/iris-classifier/predictor.py | ourobouros/cortex | 1b3aaf909816b93f6a6e3edd0da8c10891e05be9 | [
"Apache-2.0"
] | 1 | 2022-02-23T08:45:19.000Z | 2022-02-23T08:45:19.000Z | test/tensorflow/iris-classifier/predictor.py | ourobouros/cortex | 1b3aaf909816b93f6a6e3edd0da8c10891e05be9 | [
"Apache-2.0"
] | null | null | null | test/tensorflow/iris-classifier/predictor.py | ourobouros/cortex | 1b3aaf909816b93f6a6e3edd0da8c10891e05be9 | [
"Apache-2.0"
] | null | null | null | # WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.24.*, run `git checkout -b 0.24` or switch to the `0.24` branch on GitHub)
labels = ["setosa", "versicolor", "virginica"]
class TensorFlowPredictor:
def __init__(self, tensor... | 40.571429 | 213 | 0.709507 |
9565e8fe9979221baeefad3d18dfe4174aeaf666 | 9,462 | py | Python | tests/test_parse/test_tree.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | tests/test_parse/test_tree.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | tests/test_parse/test_tree.py | xingjianleng/cogent3 | a85d08a948f6903e4e04eea8292f588cc0b4907e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Unit tests for tree parsers.
"""
from unittest import TestCase, main
from cogent3.core.tree import PhyloNode
from cogent3.parse.tree import DndParser, DndTokenizer, RecordError
# from cogent3.parse.newick import parse_string, TreeParseError as RecordError
# def DndParser(data, NodeClass=Phyl... | 31.858586 | 120 | 0.57398 |
6f619e914d2e4b6e8554ba2d9cbac7fd58779dd4 | 11,570 | py | Python | nikola/plugins/task/archive.py | ivanyschen/nikola | c75adc76f008af7ac37b009f71764f5bf0c48e87 | [
"MIT"
] | 1,901 | 2015-01-02T02:49:51.000Z | 2022-03-30T23:31:35.000Z | nikola/plugins/task/archive.py | ivanyschen/nikola | c75adc76f008af7ac37b009f71764f5bf0c48e87 | [
"MIT"
] | 1,755 | 2015-01-01T08:17:16.000Z | 2022-03-24T18:02:22.000Z | nikola/plugins/task/archive.py | ivanyschen/nikola | c75adc76f008af7ac37b009f71764f5bf0c48e87 | [
"MIT"
] | 421 | 2015-01-02T18:06:37.000Z | 2022-03-28T23:18:54.000Z | # -*- coding: utf-8 -*-
# Copyright © 2012-2021 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights t... | 48.208333 | 159 | 0.661452 |
0d680df750990f4998b69715135786deee5970f9 | 4,006 | py | Python | AxfProject/axf/models.py | aeasringnar/axf_project | e62289c9ddd60345ba881c6f03039aae5ec42861 | [
"BSD-2-Clause"
] | 1 | 2019-11-26T09:31:49.000Z | 2019-11-26T09:31:49.000Z | AxfProject/axf/models.py | aeasringnar/axf_project | e62289c9ddd60345ba881c6f03039aae5ec42861 | [
"BSD-2-Clause"
] | 10 | 2020-03-24T17:15:32.000Z | 2022-03-11T23:52:17.000Z | AxfProject/axf/models.py | aeasringnar/axf_project | e62289c9ddd60345ba881c6f03039aae5ec42861 | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
# Create your models here.
# 首页轮播数据
class Wheel(models.Model):
img = models.CharField(max_length=150)
name = models.CharField(max_length=20)
trackid = models.CharField(max_length=20)
# 首页导航数据
class Nav(models.Model):
img = models.CharField(max_length=150)
name = models.... | 31.543307 | 88 | 0.71967 |
e84b62ff767745bfb4534c9182794001f5100a0d | 453 | py | Python | diventi/accounts/migrations/0312_auto_20200503_1142.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 2 | 2019-06-27T16:00:17.000Z | 2020-08-14T07:46:05.000Z | diventi/accounts/migrations/0312_auto_20200503_1142.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 26 | 2020-02-15T22:39:35.000Z | 2022-02-19T21:09:01.000Z | diventi/accounts/migrations/0312_auto_20200503_1142.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 1 | 2021-11-12T22:30:15.000Z | 2021-11-12T22:30:15.000Z | # Generated by Django 2.2.12 on 2020-05-03 09:42
import diventi.accounts.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0311_auto_20200502_1924'),
]
operations = [
migrations.AlterModelManagers(
name='diventiuser... | 21.571429 | 74 | 0.602649 |
4c7d390a78a24056d20c1ab25c005d36922ca254 | 4,659 | py | Python | google/ads/google_ads/v1/services/transports/paid_organic_search_term_view_service_grpc_transport.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | google/ads/google_ads/v1/services/transports/paid_organic_search_term_view_service_grpc_transport.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/services/transports/paid_organic_search_term_view_service_grpc_transport.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 37.572581 | 151 | 0.644559 |
78e1781053bd81d72b18f4e80f4fb2f496b65c4f | 754 | py | Python | src/WeatherUnits/derived/wind.py | noblecloud/WeatherUnits | b5401f10355b4e89a2f07faa2f459d61764b38f0 | [
"MIT"
] | 1 | 2021-04-20T22:58:57.000Z | 2021-04-20T22:58:57.000Z | src/WeatherUnits/derived/wind.py | noblecloud/WeatherUnits | b5401f10355b4e89a2f07faa2f459d61764b38f0 | [
"MIT"
] | null | null | null | src/WeatherUnits/derived/wind.py | noblecloud/WeatherUnits | b5401f10355b4e89a2f07faa2f459d61764b38f0 | [
"MIT"
] | null | null | null | from ..length import Length
from ..time import Time
from .rate import DistanceOverTime
from ..base import NamedType
from ..others import Direction
__all__ = ['Wind']
@NamedType
class Wind(DistanceOverTime):
_numerator: Length
_denominator: Time
# TODO: Add support for setting both speed and direction
__directio... | 22.176471 | 83 | 0.742706 |
23ba64e254be845a615ed1295237a77db5db92b2 | 230 | py | Python | Python/Mundo 2/ex048.py | henrique-tavares/Coisas | f740518b1bedec5b0ea8c12ae07a2cac21eb51ae | [
"MIT"
] | 1 | 2020-02-07T20:39:26.000Z | 2020-02-07T20:39:26.000Z | Python/Mundo 2/ex048.py | neptune076/Coisas | 85c064cc0e134465aaf6ef41acf747d47f108fc9 | [
"MIT"
] | null | null | null | Python/Mundo 2/ex048.py | neptune076/Coisas | 85c064cc0e134465aaf6ef41acf747d47f108fc9 | [
"MIT"
] | null | null | null | print("")
total = 0
cont = 0
for i in range(1, 500, 2):
if (i % 3 == 0):
total += i
cont += 1
print("A soma dos primeiros {} números impares múltiplos de 3 é igual a {}".format(cont, total), end="\n\n") | 19.166667 | 108 | 0.534783 |
84a1c0618384f921815f6116909b938426758691 | 42,116 | py | Python | tests/unit/states/dockerng_test.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | tests/unit/states/dockerng_test.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | tests/unit/states/dockerng_test.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Unit tests for the dockerng state
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import (
MagicMock,
Mock,
NO_MOCK,
N... | 39.54554 | 109 | 0.453106 |
4de0a2257498e3996aece9200dd773e064f0acb3 | 1,076 | py | Python | setup.py | gibbsie/cdk-graviton2-alb-aga-route53 | c9d99a533acce6db3131ad68a623405a9fc0fe9b | [
"MIT-0"
] | 2 | 2021-06-09T01:50:35.000Z | 2021-06-11T09:20:29.000Z | setup.py | gibbsie/cdk-graviton2-alb-aga-route53 | c9d99a533acce6db3131ad68a623405a9fc0fe9b | [
"MIT-0"
] | null | null | null | setup.py | gibbsie/cdk-graviton2-alb-aga-route53 | c9d99a533acce6db3131ad68a623405a9fc0fe9b | [
"MIT-0"
] | 3 | 2021-06-09T03:37:54.000Z | 2021-11-29T04:55:09.000Z | import setuptools
with open("README.md") as fp:
long_description = fp.read()
setuptools.setup(
name="ec2_ialb_aga_custom_r53",
version="0.0.1",
description="An empty CDK Python app",
long_description=long_description,
long_description_content_type="text/markdown",
author="author",
... | 23.391304 | 71 | 0.618959 |
2ef19ebba558931765c69248099b13949ca76bc4 | 1,639 | py | Python | api/base/tests.py | neosergio/library_tracker | ab7cb28a55ebf14f2b94eadab3defed03fd66e07 | [
"MIT"
] | null | null | null | api/base/tests.py | neosergio/library_tracker | ab7cb28a55ebf14f2b94eadab3defed03fd66e07 | [
"MIT"
] | null | null | null | api/base/tests.py | neosergio/library_tracker | ab7cb28a55ebf14f2b94eadab3defed03fd66e07 | [
"MIT"
] | null | null | null | from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from library.models import Library, Book
class BookTestCase(TestCase):
def test_book_creation(self):
client = APIClient()
book = {'title': 'A greatLibraryBookSerializer book',
... | 28.258621 | 71 | 0.562538 |
2c07fc5d6f76602ae25a3db78d124b4961fd4787 | 6,321 | py | Python | handlers/pet.py | byn9826/Thousand-Day | cd1396cfb6110d1560aea705f2e24fec0b72d258 | [
"BSD-3-Clause"
] | 2 | 2017-04-30T02:39:13.000Z | 2017-05-05T13:11:54.000Z | handlers/pet.py | byn9826/Thousand-Day | cd1396cfb6110d1560aea705f2e24fec0b72d258 | [
"BSD-3-Clause"
] | null | null | null | handlers/pet.py | byn9826/Thousand-Day | cd1396cfb6110d1560aea705f2e24fec0b72d258 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import mysql.connector
import datetime
#transfer owner to relative
#return 1 for success
#return 0 for error
def transferPet(petId, ownerId, relativeId, cnx):
petQuery = 'UPDATE pet set owner_id = %s, relative_id = %s WHERE pet_id = %s'
try:
petCursor = cnx.cur... | 31.763819 | 116 | 0.631387 |
69bad65f1808159b8f76583773033a47cbba4210 | 142 | py | Python | home/urls.py | alissatroiano/Hue | 1251755dfc4a06ea7168e2878bd3409284730141 | [
"FTL"
] | 1 | 2021-04-10T23:23:37.000Z | 2021-04-10T23:23:37.000Z | home/urls.py | alissatroiano/Hue | 1251755dfc4a06ea7168e2878bd3409284730141 | [
"FTL"
] | null | null | null | home/urls.py | alissatroiano/Hue | 1251755dfc4a06ea7168e2878bd3409284730141 | [
"FTL"
] | 1 | 2021-07-28T12:13:08.000Z | 2021-07-28T12:13:08.000Z | from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='home'),
]
| 15.777778 | 39 | 0.704225 |
0e0125a9566208109a7eb595554f37be06cabe03 | 52,771 | py | Python | tensorflow/python/training/monitored_session.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 2 | 2018-10-17T21:46:24.000Z | 2020-07-19T16:02:12.000Z | tensorflow/python/training/monitored_session.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 1 | 2018-09-17T19:30:27.000Z | 2018-09-17T19:30:27.000Z | tensorflow/python/training/monitored_session.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 6 | 2018-12-20T01:35:20.000Z | 2020-07-10T17:29:57.000Z | # pylint: disable=g-bad-file-header
# 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/LICENS... | 38.518978 | 103 | 0.686741 |
6bf8b50ed4e88dc3f606d6ee49f836358ed07537 | 1,537 | py | Python | src/tests/test_view.py | aminul91/linktutor_restapi | 2077119f9771b31e2aa49f914ebd76451fe3b53c | [
"MIT"
] | null | null | null | src/tests/test_view.py | aminul91/linktutor_restapi | 2077119f9771b31e2aa49f914ebd76451fe3b53c | [
"MIT"
] | null | null | null | src/tests/test_view.py | aminul91/linktutor_restapi | 2077119f9771b31e2aa49f914ebd76451fe3b53c | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.urls import reverse
from app.models import *
from app.views import *
from rest_framework import status
class TestViews(TestCase):
def setUp(self):
self.client = Client()
self.tutorials_url = reverse('tutorials')
self.tutorials_insert = re... | 32.702128 | 102 | 0.514639 |
89ab10ccbbed64e5be6982c9b90210183f7bff94 | 839 | py | Python | setup.py | ravil-mobile/gemmforge | 6381584c2d1ce77eaa938de02bc4f130f19cb2e4 | [
"MIT"
] | null | null | null | setup.py | ravil-mobile/gemmforge | 6381584c2d1ce77eaa938de02bc4f130f19cb2e4 | [
"MIT"
] | 2 | 2021-02-01T16:31:22.000Z | 2021-05-05T13:44:43.000Z | setup.py | ravil-mobile/gemmforge | 6381584c2d1ce77eaa938de02bc4f130f19cb2e4 | [
"MIT"
] | null | null | null | import setuptools
with open("gemmforge/VERSION", "r") as version_file:
current_version = version_file.read().strip()
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = ['numpy']
setuptools.setup(
name="gemmforge",
version=current_version,
license="MIT",
author="Ravil Doro... | 27.064516 | 55 | 0.725864 |
f2154da2dfd794145bac3af970caae4219bdf09d | 415 | py | Python | Problemset/maximum-subarray/maximum-subarray.py | worldwonderer/algorithm | 083178b2d987de7f6020aceca869a353c0b4b1f3 | [
"MIT"
] | 1 | 2021-01-30T01:52:46.000Z | 2021-01-30T01:52:46.000Z | Problemset/maximum-subarray/maximum-subarray.py | worldwonderer/algorithm | 083178b2d987de7f6020aceca869a353c0b4b1f3 | [
"MIT"
] | 1 | 2021-12-15T14:54:06.000Z | 2021-12-15T14:54:06.000Z | Problemset/maximum-subarray/maximum-subarray.py | worldwonderer/algorithm | 083178b2d987de7f6020aceca869a353c0b4b1f3 | [
"MIT"
] | 2 | 2021-04-19T03:32:18.000Z | 2021-06-22T07:06:01.000Z |
# @Title: 最大子序和 (Maximum Subarray)
# @Author: 18015528893
# @Date: 2021-02-18 20:24:39
# @Runtime: 52 ms
# @Memory: 15.3 MB
class Solution:
def maxSubArray(self, nums: List[int]) -> int:
max_sum = float('-inf')
s = 0
for num in nums:
if s < 0:
s = num
... | 20.75 | 50 | 0.489157 |
9a70fb6db710f49e265a3fa449cd01cec281accb | 10,380 | py | Python | src/transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 5 | 2020-09-01T09:15:48.000Z | 2020-09-15T03:25:05.000Z | src/transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 2 | 2022-03-08T04:58:59.000Z | 2022-03-19T03:45:14.000Z | src/transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 3 | 2020-08-20T04:46:25.000Z | 2020-10-14T08:39:13.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. 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
#
# Unless required by applicable... | 41.52 | 119 | 0.644894 |
d7dce94107e3e7f8f49c9e3d30df78a9fa5c71f1 | 398 | py | Python | setup.py | gnopuz83/lassonet | d4c765d46d34b97bb87fc54d44970098d05b738b | [
"BSD-3-Clause"
] | null | null | null | setup.py | gnopuz83/lassonet | d4c765d46d34b97bb87fc54d44970098d05b738b | [
"BSD-3-Clause"
] | null | null | null | setup.py | gnopuz83/lassonet | d4c765d46d34b97bb87fc54d44970098d05b738b | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='lassonetfab',
packages=find_packages(),
url='https://github.com/gnopuz83/lassonet',
description='This is a lassonet implementation',
long_description=open('README.md').read(),
dependency_links = [
"git+git@github.com:gnopuz83/lassone... | 28.428571 | 52 | 0.693467 |
6184f299506760aaa770f283797f653b6abb3a89 | 16,670 | py | Python | tests/test_mycroft_skills_manager.py | j1nx/mycroft-skills-manager | 214b4a4ffeba37b95f2f07bde2a85ddb7c0e3c84 | [
"Apache-2.0"
] | null | null | null | tests/test_mycroft_skills_manager.py | j1nx/mycroft-skills-manager | 214b4a4ffeba37b95f2f07bde2a85ddb7c0e3c84 | [
"Apache-2.0"
] | null | null | null | tests/test_mycroft_skills_manager.py | j1nx/mycroft-skills-manager | 214b4a4ffeba37b95f2f07bde2a85ddb7c0e3c84 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Mycroft AI, Inc.
#
# This file is part of Mycroft Skills Manager
# (see https://github.com/MatthewScholefield/mycroft-light).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional inf... | 38.410138 | 79 | 0.636533 |
bfb54aa15c7cd0c22efab84ae1925eb8fe1694ae | 3,041 | py | Python | src/tankoh2/contourcreator.py | sfreund-DLR/tankoh2 | 92ff080f7034a7eb1cdabed5089c79fd01af4d11 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | src/tankoh2/contourcreator.py | sfreund-DLR/tankoh2 | 92ff080f7034a7eb1cdabed5089c79fd01af4d11 | [
"MIT",
"BSD-3-Clause"
] | 27 | 2021-11-03T19:53:00.000Z | 2022-03-28T12:43:30.000Z | src/tankoh2/contourcreator.py | sfreund-DLR/tankoh2 | 92ff080f7034a7eb1cdabed5089c79fd01af4d11 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """This module creates dome contours"""
import numpy as np
from matplotlib import pyplot as plt
from tankoh2.exception import Tankoh2Error
from tankoh2.service import indent
from tankoh2.service import log
def getCountourConical(rPolarOpening, rSmall, rLarge, lConical, domeType ='circular'):
"""Calculates th... | 30.108911 | 102 | 0.573167 |
ddf0490c2e4a1f50d15877c002e1ed1c70730961 | 1,956 | py | Python | setup.py | MeiNogizaka/netmiko | 43859b8ca0689d053966b4def4f56f02dc00c844 | [
"MIT"
] | 1 | 2019-10-16T19:02:30.000Z | 2019-10-16T19:02:30.000Z | setup.py | MeiNogizaka/netmiko | 43859b8ca0689d053966b4def4f56f02dc00c844 | [
"MIT"
] | null | null | null | setup.py | MeiNogizaka/netmiko | 43859b8ca0689d053966b4def4f56f02dc00c844 | [
"MIT"
] | 1 | 2019-10-16T19:02:32.000Z | 2019-10-16T19:02:32.000Z | from setuptools import setup
from setuptools import find_packages
import os
import re
with open("README.md", "r") as fs:
long_description = fs.read()
def find_version(*file_paths):
"""
This pattern was modeled on a method from the Python Packaging User Guide:
https://packaging.python.org/en/late... | 31.548387 | 95 | 0.634458 |
a0a13fbde39f30e42b1d6843afb68dda89198383 | 27,430 | py | Python | tensorflow/python/ops/cond_v2.py | rickyzhang82/tensorflow | 397fdb37bc923f1f56d0224617cfd1b1dfd76d99 | [
"Apache-2.0"
] | 3 | 2021-01-19T20:24:09.000Z | 2021-01-19T21:40:05.000Z | tensorflow/python/ops/cond_v2.py | rickyzhang82/tensorflow | 397fdb37bc923f1f56d0224617cfd1b1dfd76d99 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/cond_v2.py | rickyzhang82/tensorflow | 397fdb37bc923f1f56d0224617cfd1b1dfd76d99 | [
"Apache-2.0"
] | 1 | 2019-01-27T09:44:57.000Z | 2019-01-27T09:44:57.000Z | # Copyright 2018 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... | 40.338235 | 110 | 0.728728 |
b3efc3e3bbe4b6748d696ffb9359c8612d436c8a | 2,997 | py | Python | _scrapy/amazon/amazon/spiders/products_spider.py | dbo1001/TFG-Amazon-Scraper | 4b310acda121b7226e4efdd7166bb08a86de0f64 | [
"Apache-2.0"
] | 3 | 2018-10-16T10:39:51.000Z | 2020-11-18T14:15:56.000Z | _scrapy/amazon/amazon/spiders/products_spider.py | dbo1001/TFG-Amazon-Scraper | 4b310acda121b7226e4efdd7166bb08a86de0f64 | [
"Apache-2.0"
] | 43 | 2018-11-05T18:48:29.000Z | 2019-07-09T13:17:01.000Z | _scrapy/amazon/amazon/spiders/products_spider.py | dbo1001/TFG-Amazon-Scraper | 4b310acda121b7226e4efdd7166bb08a86de0f64 | [
"Apache-2.0"
] | 2 | 2019-07-14T17:04:13.000Z | 2021-06-06T07:13:51.000Z | # -*- coding: utf-8 -*-
import scrapy
import json
import re
import js2xml
from urllib.parse import urljoin
from amazon.items import AmazonItem
class ProductsSpider(scrapy.Spider):
name = 'products_spider'
allowed_domains = ['amazon.com']
list_urls = []
try:
with open('./urls_output.json') as json_data:
url... | 31.547368 | 142 | 0.65699 |
213a09cceadc55068677412896f9cfc4fdd0ad2f | 1,451 | py | Python | setup.py | shakraw/pyheif | f80fcc5e534350fdfee526eff15d4cc3a27ade4a | [
"Apache-2.0"
] | null | null | null | setup.py | shakraw/pyheif | f80fcc5e534350fdfee526eff15d4cc3a27ade4a | [
"Apache-2.0"
] | null | null | null | setup.py | shakraw/pyheif | f80fcc5e534350fdfee526eff15d4cc3a27ade4a | [
"Apache-2.0"
] | null | null | null | import os
import codecs
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
return fp.read()
def get_version(r... | 29.612245 | 62 | 0.64714 |
38cc60380200a4c5b4c1ba71be756f4f655919e7 | 473 | py | Python | tests/util/test_reflect.py | wenhaizhu/FBPCS | cf103135acf44e879dab7c9819a5a8f0e22ef702 | [
"MIT"
] | null | null | null | tests/util/test_reflect.py | wenhaizhu/FBPCS | cf103135acf44e879dab7c9819a5a8f0e22ef702 | [
"MIT"
] | null | null | null | tests/util/test_reflect.py | wenhaizhu/FBPCS | cf103135acf44e879dab7c9819a5a8f0e22ef702 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from fbpcs.util.reflect import get_class
from fbpcs.util.s3path import S3Path
TEST_CLASS_PATH = "fbpc... | 26.277778 | 65 | 0.769556 |
435b76e51b0bb09f6f81181aa78ebbcd60a88b6c | 40,671 | py | Python | pydicomutils/IODs/EnhancedSRTID1500.py | sectra-medical/pydicomutils | aa2bdfa43c7aac11907e72a1cd172996901b9096 | [
"MIT"
] | 8 | 2020-03-16T17:09:23.000Z | 2022-02-02T15:31:40.000Z | pydicomutils/IODs/EnhancedSRTID1500.py | sectra-medical/pydicomutils | aa2bdfa43c7aac11907e72a1cd172996901b9096 | [
"MIT"
] | null | null | null | pydicomutils/IODs/EnhancedSRTID1500.py | sectra-medical/pydicomutils | aa2bdfa43c7aac11907e72a1cd172996901b9096 | [
"MIT"
] | 1 | 2021-06-21T20:08:19.000Z | 2021-06-21T20:08:19.000Z | import os
import random
from datetime import datetime
from pydicom import Dataset, read_file, uid
from .IOD import IOD, IODTypes, SOP_CLASS_UID_MODALITY_DICT
from .modules.specific_sr_modules import SRDocumentSeriesModule, SRDocumentGeneralModule
from .modules.specific_sr_modules import SRDocumentContentModul... | 47.848235 | 135 | 0.502028 |
99bc9bd86dbdad6655f83b90106d5ea51d207e12 | 3,344 | py | Python | examples/temp/GradientTest_2DHorizontal_time.py | zfang-slim/pysit | 8fca42b9749841abc302d1f8195a1437fad7ae4d | [
"BSD-3-Clause"
] | 64 | 2015-09-08T06:23:27.000Z | 2022-03-09T23:35:24.000Z | examples/temp/GradientTest_2DHorizontal_time.py | zfang-slim/pysit | 8fca42b9749841abc302d1f8195a1437fad7ae4d | [
"BSD-3-Clause"
] | 23 | 2015-10-08T01:14:24.000Z | 2021-07-15T11:37:05.000Z | examples/temp/GradientTest_2DHorizontal_time.py | zfang-slim/pysit | 8fca42b9749841abc302d1f8195a1437fad7ae4d | [
"BSD-3-Clause"
] | 48 | 2015-06-25T14:48:22.000Z | 2021-12-06T19:50:25.000Z | # Std import block
import time
import copy
import numpy as np
import matplotlib.pyplot as plt
from pysit import *
from pysit.gallery import horizontal_reflector
from GradientTest import GradientTest
if __name__ == '__main__':
# Setup
# Define Domain
pmlx = PML(0.1, 100)
pmlz = PML(0.1, 100)
... | 30.678899 | 82 | 0.582237 |
48007a088c3c9ab32d910b78b873e30d5097df66 | 30,719 | py | Python | tests/tests_geomstats/test_hypersphere.py | lrozo/geomstats | accf4f2cc1de3bf9c6853d6618d7d18e44ce4874 | [
"MIT"
] | 1 | 2022-01-10T07:22:11.000Z | 2022-01-10T07:22:11.000Z | tests/tests_geomstats/test_hypersphere.py | lrozo/geomstats | accf4f2cc1de3bf9c6853d6618d7d18e44ce4874 | [
"MIT"
] | null | null | null | tests/tests_geomstats/test_hypersphere.py | lrozo/geomstats | accf4f2cc1de3bf9c6853d6618d7d18e44ce4874 | [
"MIT"
] | null | null | null | """Unit tests for the Hypersphere."""
import scipy.special
import tests.helper as helper
import geomstats.backend as gs
import geomstats.tests
from geomstats.geometry.hypersphere import Hypersphere
from geomstats.geometry.matrices import Matrices
from geomstats.learning.frechet_mean import FrechetMean
MEAN_ESTIMATIO... | 38.112903 | 79 | 0.62043 |
e06687867cd3066d6a6d2151dccf270e24d1fd40 | 1,144 | bzl | Python | src/cdk/config.bzl | forsti0506/components | c03fd6e0737ec8f654fdb8ad3eacb023b323e575 | [
"MIT"
] | null | null | null | src/cdk/config.bzl | forsti0506/components | c03fd6e0737ec8f654fdb8ad3eacb023b323e575 | [
"MIT"
] | null | null | null | src/cdk/config.bzl | forsti0506/components | c03fd6e0737ec8f654fdb8ad3eacb023b323e575 | [
"MIT"
] | null | null | null | # List of all entry-points of the Angular CDK package.
CDK_ENTRYPOINTS = [
"a11y",
"accordion",
"bidi",
"clipboard",
"coercion",
"collections",
"dialog",
"drag-drop",
"keycodes",
"layout",
"observers",
"overlay",
"platform",
"portal",
"scrolling",
"stepper... | 25.422222 | 79 | 0.63986 |
604368b75ff0c77436fd9a7633939b5563307c68 | 24,075 | py | Python | qutip/wigner.py | ldabas/qutip | 2bd445c0625b89a8b5bfe636182e2c44c961da5e | [
"BSD-3-Clause"
] | null | null | null | qutip/wigner.py | ldabas/qutip | 2bd445c0625b89a8b5bfe636182e2c44c961da5e | [
"BSD-3-Clause"
] | null | null | null | qutip/wigner.py | ldabas/qutip | 2bd445c0625b89a8b5bfe636182e2c44c961da5e | [
"BSD-3-Clause"
] | null | null | null | # This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | 32.755102 | 92 | 0.554559 |
88527f3b1b963d1b69885003d14e177f6d3d2961 | 1,004 | py | Python | setup.py | dashonigkuchen/MinePI | a7a79561010614eb93abfe8ced3e27d016211eb1 | [
"MIT"
] | 8 | 2021-06-12T17:14:22.000Z | 2022-03-22T13:57:38.000Z | setup.py | dashonigkuchen/MinePI | a7a79561010614eb93abfe8ced3e27d016211eb1 | [
"MIT"
] | 7 | 2021-06-12T17:47:02.000Z | 2022-02-12T18:23:46.000Z | setup.py | dashonigkuchen/MinePI | a7a79561010614eb93abfe8ced3e27d016211eb1 | [
"MIT"
] | 5 | 2021-08-12T17:43:13.000Z | 2022-03-22T13:39:22.000Z | from distutils.core import setup
setup(
name = "MinePI",
packages = ["MinePI"],
version = "0.4.2",
license = "MIT",
description = "Minecraft utility library.",
author = "benno1237, honigkuchen",
author_email = "benno.kollreider@gmail.com",
url = "https://github.com/benno1237/MinePI",
... | 32.387097 | 88 | 0.598606 |
6cbf6ca37635930496c4a99a18a0d2e6ad6ea355 | 2,844 | py | Python | flink-python/pyflink/ml/tests/test_ml_environment.py | mnmhouse/flink | 8b05cbee4425c5ee33d73bed1473e075d7e17387 | [
"Apache-2.0"
] | 41 | 2018-11-14T04:05:42.000Z | 2022-02-09T10:39:23.000Z | flink-python/pyflink/ml/tests/test_ml_environment.py | mnmhouse/flink | 8b05cbee4425c5ee33d73bed1473e075d7e17387 | [
"Apache-2.0"
] | 15 | 2021-06-13T18:06:12.000Z | 2022-02-09T22:40:04.000Z | flink-python/pyflink/ml/tests/test_ml_environment.py | fantasticKe/flink | c42ad0fcbcd5f2666952ee3fc4763490915091f6 | [
"Apache-2.0"
] | 16 | 2019-01-04T09:19:03.000Z | 2022-01-10T14:34:31.000Z | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... | 50.785714 | 97 | 0.741913 |
95d96401b96dcda6663fd81641635f82746ff31c | 10,165 | py | Python | arena/main.py | Xewus/Arena | f5aaa8ca3ba8b7fb66e359b1d973dc6a219821f1 | [
"MIT"
] | null | null | null | arena/main.py | Xewus/Arena | f5aaa8ca3ba8b7fb66e359b1d973dc6a219821f1 | [
"MIT"
] | null | null | null | arena/main.py | Xewus/Arena | f5aaa8ca3ba8b7fb66e359b1d973dc6a219821f1 | [
"MIT"
] | null | null | null | import random
from pygame import mixer
from time import sleep
from game import game_settings
from game.game_settings import (
CREATE_USERS_HERO, MAX_HERO_DEFENSE, MAX_HERO_ATTACK,
MAX_HERO_DODGE, MAX_HERO_HEALTH, WITH_THINGS)
from game.heroes import AVAILABLE_HEROES_CLASSES, Hero
from game.things impo... | 34.692833 | 79 | 0.623512 |
bcfd2a45760b97a1a6ce96236d39e8d45edc0eac | 2,603 | py | Python | ExcelTestCheck/ExcelTestCheck.py | yanagi-ori/EysenckTest_ExcelCheck | 4b4a0e791efb09a3d42e3317d608809830455336 | [
"MIT"
] | null | null | null | ExcelTestCheck/ExcelTestCheck.py | yanagi-ori/EysenckTest_ExcelCheck | 4b4a0e791efb09a3d42e3317d608809830455336 | [
"MIT"
] | null | null | null | ExcelTestCheck/ExcelTestCheck.py | yanagi-ori/EysenckTest_ExcelCheck | 4b4a0e791efb09a3d42e3317d608809830455336 | [
"MIT"
] | null | null | null | from tkinter import Tk, Button, Label
from tkinter.filedialog import askopenfile
from tkinter.messagebox import showerror
from PIL import ImageTk, Image
import pyexcel
import xlwt
def calculation(test_path, ans_path):
my_array = pyexcel.get_array(file_name=test_path)
ans = pyexcel.get_array(file_name=ans_pat... | 36.152778 | 115 | 0.631579 |
f52e8971096574484cb0f7f8f76bc4621857d56f | 347 | py | Python | commands/deviot_rebuild_boards.py | tablatronix/Deviot | ac77241301d607304b2b4d07adad3a707cfadca2 | [
"Apache-2.0"
] | null | null | null | commands/deviot_rebuild_boards.py | tablatronix/Deviot | ac77241301d607304b2b4d07adad3a707cfadca2 | [
"Apache-2.0"
] | null | null | null | commands/deviot_rebuild_boards.py | tablatronix/Deviot | ac77241301d607304b2b4d07adad3a707cfadca2 | [
"Apache-2.0"
] | null | null | null | from sublime_plugin import WindowCommand
from ..platformio.pio_bridge import PioBridge
class DeviotRebuildBoardsCommand(WindowCommand):
"""
Rebuild the boards.json file who is used to list the
boards in the quick menu
Extends: sublime_plugin.WindowCommand
"""
def run(self):
PioBridge... | 26.692308 | 57 | 0.740634 |
2dcfb90f3d0716c3e8272f0eb5abd7d4f428d8f4 | 32,013 | py | Python | tests/core/full_node/test_full_node_store.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 6 | 2021-06-30T13:03:47.000Z | 2021-07-10T12:46:37.000Z | tests/core/full_node/test_full_node_store.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 8 | 2021-07-01T15:45:09.000Z | 2021-09-08T04:30:46.000Z | tests/core/full_node/test_full_node_store.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 11 | 2021-07-03T17:30:57.000Z | 2022-03-15T08:47:03.000Z | # flake8: noqa: F811, F401
import asyncio
from secrets import token_bytes
from typing import List, Optional
import pytest
from thyme.consensus.blockchain import ReceiveBlockResult
from thyme.consensus.multiprocess_validation import PreValidationResult
from thyme.consensus.pot_iterations import is_overflow_block
from ... | 45.280057 | 120 | 0.620779 |
27984b1494d4e3a214d335ab59932e282a361570 | 2,925 | py | Python | src/tfi/driver/pytorch/load.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 160 | 2017-09-13T00:32:05.000Z | 2018-05-21T18:17:32.000Z | src/tfi/driver/pytorch/load.py | tesserai/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 6 | 2017-09-14T17:54:21.000Z | 2018-01-27T19:31:18.000Z | src/tfi/driver/pytorch/load.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 11 | 2017-09-13T00:37:08.000Z | 2018-03-05T08:03:34.000Z | import inspect
import torch
deserialized_objects = {}
restore_location = torch.serialization.default_restore_location
def _check_container_source(container_type, source_file, original_source):
current_source = inspect.getsource(container_type)
if original_source != current_source:
if container_type.dum... | 44.318182 | 83 | 0.552137 |
cd7134e5f3a880ec6370166598d7a6d5642ef270 | 121 | py | Python | models/model_canteen/admin.py | SanjarbekSaminjonov/musofirlar.backend | 23b09e90cc4e3d153063ad1768b5ae1c18ff866d | [
"Apache-2.0"
] | 1 | 2021-12-23T12:43:17.000Z | 2021-12-23T12:43:17.000Z | models/model_canteen/admin.py | SanjarbekSaminjonov/musofirlar.backend | 23b09e90cc4e3d153063ad1768b5ae1c18ff866d | [
"Apache-2.0"
] | null | null | null | models/model_canteen/admin.py | SanjarbekSaminjonov/musofirlar.backend | 23b09e90cc4e3d153063ad1768b5ae1c18ff866d | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Canteen
# Register your models here.
admin.site.register(Canteen)
| 17.285714 | 32 | 0.801653 |
ac7f4bb9cfc99116ee032e34681cd2dbede941af | 5,947 | py | Python | CIM14/IEC61970/Generation/Production/HydroPump.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM14/IEC61970/Generation/Production/HydroPump.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM14/IEC61970/Generation/Production/HydroPump.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 50.82906 | 235 | 0.734992 |
71e82a5ff1312881ce6c164eca614cd214f54719 | 1,363 | py | Python | src/tests/videoframe/test_stereo.py | mhubii/GIFT-Grab | c9678e25edbd0403b25366d60a3e2e2e5c32320f | [
"BSD-3-Clause"
] | 41 | 2017-06-24T21:58:17.000Z | 2022-03-29T04:44:05.000Z | src/tests/videoframe/test_stereo.py | mhubii/GIFT-Grab | c9678e25edbd0403b25366d60a3e2e2e5c32320f | [
"BSD-3-Clause"
] | 91 | 2017-06-14T09:57:40.000Z | 2020-12-02T11:36:19.000Z | src/tests/videoframe/test_stereo.py | mhubii/GIFT-Grab | c9678e25edbd0403b25366d60a3e2e2e5c32320f | [
"BSD-3-Clause"
] | 15 | 2017-05-21T14:04:50.000Z | 2021-11-22T06:03:26.000Z | from pytest import (mark, yield_fixture, raises)
from pygiftgrab import (VideoFrame, ColourSpace)
stereo_frame, stereo_count = None, None
data_length = 0
@yield_fixture(autouse=True)
def peri_test(colour_space):
global stereo_frame, stereo_count, data_length
stereo_count = 2
cols, rows = 1920, 1080
... | 30.288889 | 75 | 0.753485 |
d69dd4bd11734216510a6899361482e02f766747 | 128 | py | Python | pyroomacoustics/tests/test_issue_235.py | Womac/pyroomacoustics | af452ea42686eb12df34dd7ffdb0c833b64b27f9 | [
"MIT"
] | 915 | 2016-02-08T08:10:37.000Z | 2022-03-31T17:33:21.000Z | pyroomacoustics/tests/test_issue_235.py | zha80052/pyroomacoustics | 15a86425b68969b2109860ca3614f0cbf92b1bd0 | [
"MIT"
] | 212 | 2017-02-06T13:06:30.000Z | 2022-03-28T14:32:15.000Z | pyroomacoustics/tests/test_issue_235.py | zha80052/pyroomacoustics | 15a86425b68969b2109860ca3614f0cbf92b1bd0 | [
"MIT"
] | 513 | 2016-11-15T05:41:49.000Z | 2022-03-29T15:41:09.000Z | import pyroomacoustics as pra
def test_set_rt_no_directivity():
room = pra.ShoeBox([5, 4, 3])
room.set_ray_tracing()
| 16 | 33 | 0.710938 |
49757f4ca00287542582ce2f97ee7486a20b855e | 4,227 | py | Python | examples/pipelines/experiments/demo_count_rows_and_log.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 27 | 2021-05-27T00:01:24.000Z | 2022-01-30T19:55:24.000Z | examples/pipelines/experiments/demo_count_rows_and_log.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 284 | 2021-05-12T22:26:41.000Z | 2022-02-23T21:18:34.000Z | examples/pipelines/experiments/demo_count_rows_and_log.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 5 | 2021-06-02T04:51:47.000Z | 2021-12-20T17:07:41.000Z | """
The Azure ML pipeline for running a basic experiment
that consumes a dataset and does some logging.
to execute:
> python pipelines/experiments/demo_count_rows_and_log.py
--config-dir pipelines/config
--config-name experiments/demo_count_rows_and_log
run.submit=True
"""
# pylint: disable=no-member
# NOTE: because i... | 35.521008 | 91 | 0.670925 |
7046cfd73611c75ecc92b2b381bbc1439fe44a92 | 21,514 | py | Python | lithops/invokers.py | otrack/lithops | 81ffe3aa16f4483881e172e8805966735cc6e850 | [
"Apache-2.0"
] | null | null | null | lithops/invokers.py | otrack/lithops | 81ffe3aa16f4483881e172e8805966735cc6e850 | [
"Apache-2.0"
] | null | null | null | lithops/invokers.py | otrack/lithops | 81ffe3aa16f4483881e172e8805966735cc6e850 | [
"Apache-2.0"
] | null | null | null | #
# (C) Copyright IBM Corp. 2020
# (C) Copyright Cloudlab URV 2020
#
# 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 ap... | 39.259124 | 111 | 0.572604 |
a9ff1bb7ede2600d39d033356a68a5344ce6ecbe | 468 | py | Python | src/main/migrations/0003_url_archivo.py | fernandogl/sunwise | d9a2e901bbdd456f7b78a1c83ee3650218a1d8f1 | [
"MIT"
] | null | null | null | src/main/migrations/0003_url_archivo.py | fernandogl/sunwise | d9a2e901bbdd456f7b78a1c83ee3650218a1d8f1 | [
"MIT"
] | null | null | null | src/main/migrations/0003_url_archivo.py | fernandogl/sunwise | d9a2e901bbdd456f7b78a1c83ee3650218a1d8f1 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-07 07:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0002_archivourl'),
]
operations = [
migrations.AddField(
model_name='url',
... | 23.4 | 114 | 0.630342 |
1f49a1b6863bb8919046a7c96c63bee4948bcc34 | 434 | py | Python | setup.py | mypetyak/django-citadel | 84b86b66b83aad8c02abb83b92bea906f76d8c68 | [
"MIT"
] | 4 | 2015-05-01T17:38:02.000Z | 2019-10-27T05:59:21.000Z | setup.py | mypetyak/django-citadel | 84b86b66b83aad8c02abb83b92bea906f76d8c68 | [
"MIT"
] | 3 | 2020-02-11T23:19:42.000Z | 2021-06-10T18:35:33.000Z | setup.py | mypetyak/django-citadel | 84b86b66b83aad8c02abb83b92bea906f76d8c68 | [
"MIT"
] | 2 | 2016-10-29T00:13:21.000Z | 2019-10-27T05:59:32.000Z | #!/usr/bin/env python
from distutils.core import setup
from setuptools import find_packages
setup(
name='django-citadel',
version='1.0.1',
description='A Django app that provides an encrypted Model and ModelField',
author='Christopher Bunn',
url='https://github.com/mypetyak/django-citadel',
pa... | 24.111111 | 79 | 0.686636 |
71d36f1c6aec8077f38d2402e7963ad1be4ec3b2 | 17,500 | py | Python | src/vistir/path.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | src/vistir/path.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | src/vistir/path.py | yong422/vistir | 94301fa5fe4d9c51e50834688866940af455e927 | [
"ISC"
] | null | null | null | # -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import atexit
import errno
import functools
import os
import posixpath
import shutil
import stat
import time
import warnings
import six
from six.moves import urllib_parse
from six.moves.urllib import request as urllib_requ... | 30.276817 | 98 | 0.639257 |
1c69aa2d2a726eaec728bde7db86f00b75eef5c2 | 10,427 | py | Python | setup.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | null | null | null | setup.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | null | null | null | setup.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import subprocess
import time
from setuptools import find_packages, setup
import torch
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
def readme():
with open('README.md', encoding='utf-8') as f:
content = f.read()
return content
M... | 34.641196 | 126 | 0.511557 |
5d9b06ebcd0acf2ac16a2d94d9e50f5b601b8e6b | 1,868 | py | Python | BAD IDEAS/LAND_OF_BAD_IDEAS.py | michaelgailling/obac | 483c532ec09e4249dc6bd4e34d8d1d0299da1c52 | [
"MIT"
] | 3 | 2018-10-03T12:02:29.000Z | 2018-10-05T02:33:39.000Z | BAD IDEAS/LAND_OF_BAD_IDEAS.py | michaelgailling/obac | 483c532ec09e4249dc6bd4e34d8d1d0299da1c52 | [
"MIT"
] | null | null | null | BAD IDEAS/LAND_OF_BAD_IDEAS.py | michaelgailling/obac | 483c532ec09e4249dc6bd4e34d8d1d0299da1c52 | [
"MIT"
] | null | null | null | import pickle
# Use a string as a way of creating global variable names
# Worst of the bad ideas so far
globals()["herp"] = 0
print(herp)
# The more forgiving abuse of the above is demonstrated below encapsulated in a class where it belongs
class BadIdeaClass1():
def __init__(self):
setattr(self, 'herp', ... | 21.471264 | 124 | 0.673983 |
6c75244e786ea995804bfab4ae782fb849f7d81e | 4,116 | py | Python | examples/python/01-list-properties.py | copterspace/tiscamera | 2ce3ee845e7c9ca9d479c8e67f5b27e805eff219 | [
"Apache-2.0"
] | null | null | null | examples/python/01-list-properties.py | copterspace/tiscamera | 2ce3ee845e7c9ca9d479c8e67f5b27e805eff219 | [
"Apache-2.0"
] | null | null | null | examples/python/01-list-properties.py | copterspace/tiscamera | 2ce3ee845e7c9ca9d479c8e67f5b27e805eff219 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2017 The Imaging Source Europe GmbH
#
# 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 a... | 42.43299 | 111 | 0.422983 |
07cf1af458bed5034f3ead9da8e3fd5cfe27cf13 | 683 | py | Python | src/infra/factories/in_memory_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | null | null | null | src/infra/factories/in_memory_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | 1 | 2022-03-30T20:31:18.000Z | 2022-03-30T20:31:18.000Z | src/infra/factories/in_memory_repository_factory.py | marcelinoavelar/github-monitor | e0f850d05d1eaa7561eb3c838ae3cc35047ab033 | [
"MIT"
] | null | null | null | from abc import ABC
from src.domanin.factories.repository_factory import RepositoryFactory
from src.domanin.repositories.schedule_repository import ScheduleRepository
from src.infra.repositories.in_memory.github_data_in_memory_repository import GithubDataInMemoryRepository
from src.infra.repositories.in_memory.schedul... | 37.944444 | 106 | 0.841874 |
63325f7e114e9b3a743fd114a7786dfd7d985715 | 1,385 | py | Python | scripts/python/LaidlawFX/studio_pref.py | LaidlawFX/LaidlawFX | ee8133dbf452b2b14a2e915878cc15c0517b4154 | [
"MIT"
] | 23 | 2019-02-21T05:20:46.000Z | 2021-06-15T06:45:22.000Z | scripts/python/LaidlawFX/studio_pref.py | LaidlawFX/LaidlawFX | ee8133dbf452b2b14a2e915878cc15c0517b4154 | [
"MIT"
] | 1 | 2019-03-16T14:25:15.000Z | 2019-03-25T03:13:30.000Z | scripts/python/LaidlawFX/studio_pref.py | LaidlawFX/LaidlawFX | ee8133dbf452b2b14a2e915878cc15c0517b4154 | [
"MIT"
] | 2 | 2019-08-04T03:46:40.000Z | 2019-08-22T05:46:59.000Z | # =============================================================================
# IMPORTS
# =============================================================================
import hou
# =============================================================================
# FUNCTIONS
# ===========================================... | 37.432432 | 80 | 0.2787 |
182f8fdd560845e3af04944593d97a5667286060 | 38,871 | py | Python | eloquent/query/builder.py | KarthickNamakkalKrishnan/eloquent | 0638b688d5fd0c1a46b7471dd465eeb4c2f84666 | [
"MIT"
] | 47 | 2015-03-19T02:11:36.000Z | 2022-03-29T07:16:42.000Z | eloquent/query/builder.py | KarthickNamakkalKrishnan/eloquent | 0638b688d5fd0c1a46b7471dd465eeb4c2f84666 | [
"MIT"
] | 20 | 2015-03-16T02:56:51.000Z | 2015-05-24T17:51:29.000Z | eloquent/query/builder.py | sdispater/eloquent | 0638b688d5fd0c1a46b7471dd465eeb4c2f84666 | [
"MIT"
] | 4 | 2018-08-29T13:42:50.000Z | 2021-03-14T11:28:31.000Z | # -*- coding: utf-8 -*-
import re
from itertools import chain
from collections import OrderedDict
from .expression import QueryExpression
from .join_clause import JoinClause
from ..support.collection import Collection
from ..utils import basestring, Null
from ..exceptions import ArgumentError
class QueryBuilder(obje... | 25.708333 | 104 | 0.563119 |
87bae26bde05507bd77650186bbcc417ec202bc1 | 749 | py | Python | st2common/st2common/exceptions/resultstracker.py | avezraj/st2 | 519c7f6819e52fb289c440bb7d1df7b558bb9ed7 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/exceptions/resultstracker.py | avezraj/st2 | 519c7f6819e52fb289c440bb7d1df7b558bb9ed7 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/exceptions/resultstracker.py | avezraj/st2 | 519c7f6819e52fb289c440bb7d1df7b558bb9ed7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Extreme Networks, 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 i... | 35.666667 | 74 | 0.785047 |
a4d074a27c5903b41c6d6b3a1546a0736402b63d | 3,279 | py | Python | mppsolar/devices/jk24s.py | Northbadge/mpp-solar | fa1e552691669a66632ecd3fb5d18b1cdd2cebfe | [
"MIT"
] | null | null | null | mppsolar/devices/jk24s.py | Northbadge/mpp-solar | fa1e552691669a66632ecd3fb5d18b1cdd2cebfe | [
"MIT"
] | null | null | null | mppsolar/devices/jk24s.py | Northbadge/mpp-solar | fa1e552691669a66632ecd3fb5d18b1cdd2cebfe | [
"MIT"
] | null | null | null | import logging
from .device import AbstractDevice
from ..io.jkbleio import JkBleIO
from ..io.testio import TestIO
log = logging.getLogger("MPP-Solar")
class jk24s(AbstractDevice):
def __init__(self, *args, **kwargs) -> None:
super().__init__()
self._name = kwargs["name"]
self.set_port(**... | 41.506329 | 104 | 0.620006 |
de4a4132a1c16c37a0367e5d6af5cc08778ca625 | 6,613 | py | Python | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney-hardware/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | null | null | null | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney-hardware/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | 4 | 2021-06-08T19:58:45.000Z | 2022-03-08T21:09:20.000Z | Controller/DisplayEmulator/DisplayEmulator.py | colindomoney/ZeroOne | 3e02f7b7ba1957ab4c35abeba228e40a8a06e810 | [
"MIT"
] | null | null | null | import fnmatch, os, socket
import pickle, timer_cm, dill
import ZO
from threading import *
from tkinter import *
from PIL import ImageTk, Image
PIXEL_MULTIPLIER = 10
IMAGE_PATH = '/Users/colind/Documents/Projects/ZeroOne/ZeroOne/Graphics/Images'
def get_images():
return fnmatch.filter(os.listdir(IMAGE_PATH), '*... | 32.737624 | 126 | 0.594738 |
1be716b0ff07c707a51ee95d1ddd3b2c80234984 | 16,857 | py | Python | openfold/config.py | ericmjl/openfold | 3ea45f90dbd314095d56bcf033e515555092dd15 | [
"Apache-2.0"
] | null | null | null | openfold/config.py | ericmjl/openfold | 3ea45f90dbd314095d56bcf033e515555092dd15 | [
"Apache-2.0"
] | null | null | null | openfold/config.py | ericmjl/openfold | 3ea45f90dbd314095d56bcf033e515555092dd15 | [
"Apache-2.0"
] | null | null | null | import copy
import ml_collections as mlc
def set_inf(c, inf):
for k, v in c.items():
if isinstance(v, mlc.ConfigDict):
set_inf(v, inf)
elif k == "inf":
c[k] = inf
def model_config(name, train=False, low_prec=False):
c = copy.deepcopy(config)
if name == "model_1":
... | 36.408207 | 83 | 0.422436 |
7537b597059cd49759121a5a0a524a0a9e6ef57b | 727 | py | Python | Get Retroativo/2019_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 6 | 2019-10-18T17:47:30.000Z | 2021-03-18T06:04:06.000Z | Get Retroativo/2019_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 1 | 2020-09-24T08:17:29.000Z | 2020-09-28T08:16:39.000Z | Get Retroativo/2019_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 3 | 2019-10-20T18:40:20.000Z | 2021-04-15T01:27:59.000Z | import psycopg2.extras
from controller import RobotRotine as rr
from api import graphqlconsume, querygraphql
import time
import datetime
import numpy as np
"""
current = np.datetime64(datetime.datetime.now())
currentab = np.datetime64(current) + np.timedelta64(5, 'h')
lastdate = np.datetime64(currentab) - np.timedelta6... | 25.964286 | 61 | 0.69326 |
c7896cdf7d7239b9719ca7d56ec0fa1d9f532e5b | 2,345 | py | Python | kokon/utils/db.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | kokon/utils/db.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | kokon/utils/db.py | KoalicjaOtwartyKrakow/backend | 636eb0216ef8c236daec1dfc68f3118cf494d992 | [
"MIT"
] | null | null | null | """Module containing database connection."""
from contextlib import contextmanager
import sqlalchemy
from sqlalchemy.orm import sessionmaker
from kokon import settings
class DB:
_db_connection_pool = None
@classmethod
def _get_db_connection_pool(cls):
"""Get database engine."""
if cls.... | 37.822581 | 93 | 0.583369 |
23d49e5363da7fb23ebfa4c602173c1479523e4f | 7,021 | py | Python | DQM/SiPixelMonitorClient/test/pixel_dqm_sourceclient-file_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | DQM/SiPixelMonitorClient/test/pixel_dqm_sourceclient-file_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | DQM/SiPixelMonitorClient/test/pixel_dqm_sourceclient-file_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("SIPIXELDQM")
##----## Geometry and other global parameters:
process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
###process.load("DQM.Integration.test.Front... | 51.248175 | 181 | 0.788634 |
a62c6a92c2904a8ad835a9dd15e4cf25ba3dd805 | 1,444 | py | Python | data_aug/gaussian_blur.py | avihu111/SimCLR_OCC | f8a68881f5f02c2e34807ff2b86f68f2412ffc29 | [
"MIT"
] | 2 | 2021-09-10T04:19:44.000Z | 2022-02-09T11:45:50.000Z | data_aug/gaussian_blur.py | avihu111/SimCLR_OCC | f8a68881f5f02c2e34807ff2b86f68f2412ffc29 | [
"MIT"
] | null | null | null | data_aug/gaussian_blur.py | avihu111/SimCLR_OCC | f8a68881f5f02c2e34807ff2b86f68f2412ffc29 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch import nn
from torchvision.transforms import transforms
class GaussianBlur(object):
"""blur a single image on CPU"""
def __init__(self, kernel_size):
radias = kernel_size // 2
kernel_size = radias * 2 + 1
self.blur_h = nn.Conv2d(3, 3, kernel_... | 30.083333 | 74 | 0.560942 |
151a96bd796511d165b70ec731a39543306c73ae | 6,013 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/ns/nsdiameter.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/ns/nsdiameter.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/ns/nsdiameter.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 33.405556 | 219 | 0.731582 |
a604eebd4b7da47e102903ed7f40bbeb32ede8ca | 514 | py | Python | examples/sparql_update_example.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | 1 | 2021-08-09T16:32:00.000Z | 2021-08-09T16:32:00.000Z | examples/sparql_update_example.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | null | null | null | examples/sparql_update_example.py | mwatts15/rdflib | 047e3e9781a28966ff9b6fd46ec20e459a5a0f11 | [
"BSD-3-Clause"
] | null | null | null |
"""
SPARQL Update statements can be applied with :meth:`rdflib.graph.Graph.update`
"""
import rdflib
if __name__ == '__main__':
g = rdflib.Graph()
g.load("foaf.rdf")
g.update('''
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia: <http://dbpedia.org/resource/>
INSERT
{ ?s a... | 19.037037 | 81 | 0.579767 |
b92bd6d986a62b16ef685747cfee462141c41cf4 | 7,018 | py | Python | library/ucs_chassis_template.py | sisudhir/ucsm-ansible | aae0adb1ba347c301d0d2943e5461b241553f07c | [
"NTP"
] | 6 | 2019-10-03T15:14:22.000Z | 2021-01-28T07:23:48.000Z | library/ucs_chassis_template.py | sisudhir/ucsm-ansible | aae0adb1ba347c301d0d2943e5461b241553f07c | [
"NTP"
] | 1 | 2021-06-01T23:48:07.000Z | 2021-06-01T23:48:07.000Z | library/ucs_chassis_template.py | sisudhir/ucsm-ansible | aae0adb1ba347c301d0d2943e5461b241553f07c | [
"NTP"
] | 6 | 2019-09-17T19:04:53.000Z | 2021-07-05T06:34:42.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'... | 36.362694 | 140 | 0.708179 |
754bc7416226a34ea92559599aa70617d01c5bb8 | 3,670 | py | Python | tia/util/windows.py | lsternlicht/tia | fe74d1876260a946e52bd733bc32da0698749f2c | [
"BSD-3-Clause"
] | 23 | 2017-11-13T01:05:49.000Z | 2022-03-30T01:38:00.000Z | tia/util/windows.py | lsternlicht/tia | fe74d1876260a946e52bd733bc32da0698749f2c | [
"BSD-3-Clause"
] | 1 | 2018-09-19T21:59:04.000Z | 2018-09-19T21:59:04.000Z | tia/util/windows.py | lsternlicht/tia | fe74d1876260a946e52bd733bc32da0698749f2c | [
"BSD-3-Clause"
] | 13 | 2018-11-26T21:53:36.000Z | 2022-01-09T00:10:27.000Z | """
collection of utilities for use on windows systems
"""
import os
def send_outlook_email(to, subject, body, attachments=None, cc=None, bcc=None, is_html=0):
""" Send an email using your local outlook client """
import win32com.client
asarr = lambda v: None if not v else isinstance(v, str) and [v] or v
... | 32.192982 | 94 | 0.596458 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.