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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c0d72622c59e42f0255f05d2bb30cf318470d188 | 2,152 | py | Python | papers/CVPR2021-MOSI/configs/data/hmdb51.py | huang-ziyuan/EssentialMC2 | 87141df94c1ac8e426ceec071720b97f5b9d3b88 | [
"MIT"
] | 69 | 2021-11-01T11:18:13.000Z | 2022-03-28T04:27:17.000Z | papers/CVPR2021-MOSI/configs/data/hmdb51.py | huang-ziyuan/EssentialMC2 | 87141df94c1ac8e426ceec071720b97f5b9d3b88 | [
"MIT"
] | 6 | 2021-11-01T09:28:13.000Z | 2022-02-11T09:49:58.000Z | papers/CVPR2021-MOSI/configs/data/hmdb51.py | huang-ziyuan/EssentialMC2 | 87141df94c1ac8e426ceec071720b97f5b9d3b88 | [
"MIT"
] | 16 | 2021-11-11T06:26:18.000Z | 2022-03-20T13:32:15.000Z | _reserve_ = 'data'
MEAN = (0.45, 0.45, 0.45)
STD = (0.225, 0.225, 0.225)
train_pipeline = [
dict(
type="DecodeVideoToTensor",
num_frames=16,
target_fps=30,
sample_mode='interval',
sample_interval=4,
sample_minus_interval=False
),
dict(
type="TensorTo... | 22.416667 | 77 | 0.568773 |
f0b484113f7d8608317064bafb98bbcfad33b6de | 206 | py | Python | tutorials/demo/solutions/Neuromatch_Tutorial_Format_Solution_0f49f2a1.py | raxosiris/course-content | 6904ae919b91aeb885d73b53cb9b02e6ec73d9cd | [
"CC-BY-4.0"
] | 26 | 2020-07-01T20:38:44.000Z | 2021-06-20T06:37:27.000Z | tutorials/demo/solutions/Neuromatch_Tutorial_Format_Solution_0f49f2a1.py | raxosiris/course-content | 6904ae919b91aeb885d73b53cb9b02e6ec73d9cd | [
"CC-BY-4.0"
] | 3 | 2020-06-23T03:46:36.000Z | 2020-07-07T05:26:01.000Z | tutorials/demo/solutions/Neuromatch_Tutorial_Format_Solution_0f49f2a1.py | raxosiris/course-content | 6904ae919b91aeb885d73b53cb9b02e6ec73d9cd | [
"CC-BY-4.0"
] | 16 | 2020-07-06T06:48:02.000Z | 2021-07-30T08:18:52.000Z | """
Discussion: Write a dicussion about/answers to any open-ended questions you pose (either about a demo or elsewhere)
You can write a paragraph or two of nice didactic text
within a single comment.
"""; | 34.333333 | 115 | 0.76699 |
5375c6cd45033b35907d23a8a1535706219918c4 | 1,985 | py | Python | alipay/aop/api/domain/AlipayTradeServiceAccountQueryModel.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/AlipayTradeServiceAccountQueryModel.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/AlipayTradeServiceAccountQueryModel.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 *
class AlipayTradeServiceAccountQueryModel(object):
def __init__(self):
self._alipay_user_id = None
self._biz_type = None
self._sub_biz_type = None
@property
def alipay_... | 27.957746 | 79 | 0.60806 |
3afb975acea771cb49cf22627970c6cb39a06201 | 10,170 | py | Python | Simple Classifier/ResNet-50 Feature Classifier/RTApp.py | 123prashanth123/Fault-Detection-System | fa59ca81ce4627a42648e654b55cdc505cde2103 | [
"MIT"
] | null | null | null | Simple Classifier/ResNet-50 Feature Classifier/RTApp.py | 123prashanth123/Fault-Detection-System | fa59ca81ce4627a42648e654b55cdc505cde2103 | [
"MIT"
] | null | null | null | Simple Classifier/ResNet-50 Feature Classifier/RTApp.py | 123prashanth123/Fault-Detection-System | fa59ca81ce4627a42648e654b55cdc505cde2103 | [
"MIT"
] | 1 | 2021-07-26T08:58:43.000Z | 2021-07-26T08:58:43.000Z | import os
import platform
import cv2
import torch
import numpy as np
import utils as u
# ******************************************************************************************************************** #
# Inference Helper
def __help__(frame=None, model=None, fea_extractor=None, show_prob=True, pt1=None, pt2=Non... | 44.217391 | 134 | 0.539528 |
a162ac79448511d26b84bc8f654ec6fe9d790454 | 1,795 | py | Python | DeepLearningCourse-Uni/Exercise_3_forward from scratch/modules.py | anish-pratheepkumar/GitDeepLearningStudy | 3d1873e2ac70b9ee6cca309e96759e1714bc73f1 | [
"MIT"
] | null | null | null | DeepLearningCourse-Uni/Exercise_3_forward from scratch/modules.py | anish-pratheepkumar/GitDeepLearningStudy | 3d1873e2ac70b9ee6cca309e96759e1714bc73f1 | [
"MIT"
] | null | null | null | DeepLearningCourse-Uni/Exercise_3_forward from scratch/modules.py | anish-pratheepkumar/GitDeepLearningStudy | 3d1873e2ac70b9ee6cca309e96759e1714bc73f1 | [
"MIT"
] | null | null | null | import numpy as np
class Module:
def forward(self, *args, **kwargs):
pass
class Network(Module):
def __init__(self, layers=[]):
# store the layers passed in the constructor in your Network object
self.layers = layers
def forward(self, x):
# for ... | 24.589041 | 75 | 0.571588 |
522e510a74b1a1ed114122384cbcdf36bc6fe035 | 13,128 | py | Python | src/ezdxf/entities/text.py | luoyu-123/ezdxf | 40963a2010028f87846241e08434f43ab421f3fb | [
"MIT"
] | 1 | 2021-06-05T09:15:15.000Z | 2021-06-05T09:15:15.000Z | src/ezdxf/entities/text.py | luoyu-123/ezdxf | 40963a2010028f87846241e08434f43ab421f3fb | [
"MIT"
] | null | null | null | src/ezdxf/entities/text.py | luoyu-123/ezdxf | 40963a2010028f87846241e08434f43ab421f3fb | [
"MIT"
] | null | null | null | # Copyright (c) 2019-2020 Manfred Moitzi
# License: MIT License
import math
from typing import TYPE_CHECKING, Tuple, Union
from ezdxf.lldxf import validator
from ezdxf.entities.mtext import caret_decode
from ezdxf.lldxf import const
from ezdxf.lldxf.attributes import (
DXFAttr, DXFAttributes, DefSubclass, XType, R... | 35.481081 | 82 | 0.602453 |
280eeacdd8feadc306d7f8874ff877f212283015 | 2,126 | py | Python | codeGenD/usrLib/dictCpp.py | littleepsilon/codeGenD | de69e383903994701965977e152a0e4b974ea3b9 | [
"MIT"
] | 1 | 2020-11-21T17:04:59.000Z | 2020-11-21T17:04:59.000Z | codeGenD/usrLib/dictCpp.py | littleepsilon/codeGenD | de69e383903994701965977e152a0e4b974ea3b9 | [
"MIT"
] | null | null | null | codeGenD/usrLib/dictCpp.py | littleepsilon/codeGenD | de69e383903994701965977e152a0e4b974ea3b9 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
#
# time: 02:56
# date: 2020-06-22
# description: test Description on this line
# author: untitled
# import pyModule
# import sys
# import os
# import 3rd-part Moudle
# sys.path.append( os.path.split( os.path.realpath(__file__) )[0] + '' )
# import usrModule
cppDict = {... | 14.561644 | 72 | 0.484008 |
19192311454fd59d9a033645d767cbeec9b72e77 | 9,746 | py | Python | tests/test_checkpointing.py | yuriyi/devito | d0a29b3ad3653c20f88b35c2780471cef107b7a2 | [
"MIT"
] | null | null | null | tests/test_checkpointing.py | yuriyi/devito | d0a29b3ad3653c20f88b35c2780471cef107b7a2 | [
"MIT"
] | null | null | null | tests/test_checkpointing.py | yuriyi/devito | d0a29b3ad3653c20f88b35c2780471cef107b7a2 | [
"MIT"
] | null | null | null | from examples.checkpointing.checkpoint import DevitoCheckpoint, CheckpointOperator
from examples.seismic.acoustic.acoustic_example import acoustic_setup
from examples.seismic import Receiver
from pyrevolve import Revolver
import numpy as np
from conftest import skipif_yask
import pytest
from functools import reduce
fr... | 38.370079 | 97 | 0.643854 |
ebf0a09c3178ae6f39d5f86664d739362dfd3fa0 | 5,466 | py | Python | settings.py | anik31/addons-server | cecb61da98d6e830fb45a2b1d61b41e72812137e | [
"BSD-3-Clause"
] | null | null | null | settings.py | anik31/addons-server | cecb61da98d6e830fb45a2b1d61b41e72812137e | [
"BSD-3-Clause"
] | 760 | 2021-05-17T07:59:30.000Z | 2022-03-31T11:14:15.000Z | settings.py | championshuttler/addons-server | 5d4c1bfbed2fc509ecc1f3f5065955996e057eeb | [
"BSD-3-Clause"
] | null | null | null | """This is the standard development settings file.
If you need to overload settings, please do so in a local_settings.py file (it
won't be tracked in git).
"""
import os
from urllib.parse import urlparse
from olympia.lib.settings_base import * # noqa
WSGI_APPLICATION = 'olympia.wsgi.application'
INTERNAL_ROUTES_A... | 32.535714 | 105 | 0.72393 |
06840d5c943471a11d1f3c111d7eaca895bd3ed7 | 33,336 | py | Python | saleor/checkout/utils.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T09:37:26.000Z | 2019-04-15T09:37:26.000Z | saleor/checkout/utils.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | null | null | null | saleor/checkout/utils.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 1 | 2020-12-26T10:25:37.000Z | 2020-12-26T10:25:37.000Z | """Cart-related utility functions."""
from datetime import date, timedelta
from functools import wraps
from uuid import UUID
from django.conf import settings
from django.contrib import messages
from django.db import transaction
from django.db.models import Sum
from django.utils.encoding import smart_text
from django.u... | 36.432787 | 79 | 0.688175 |
5000e349ac7e9265d0abaefdde80f00f290a88a4 | 761 | py | Python | setup.py | hthompson6/bit-notifier | 60e6ab9a4946f0663cbce652b6381f92608577d3 | [
"MIT"
] | 12 | 2017-07-03T21:25:42.000Z | 2019-04-16T08:58:26.000Z | setup.py | hthompson-a10/bit-notify | 60e6ab9a4946f0663cbce652b6381f92608577d3 | [
"MIT"
] | 2 | 2017-07-05T16:29:44.000Z | 2017-07-05T16:39:48.000Z | setup.py | hthompson-a10/bit-notify | 60e6ab9a4946f0663cbce652b6381f92608577d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# flake8: noqa
from setuptools import setup, find_packages
setup(
name = "bit-notify",
version = "0.1.2",
packages = find_packages(),
author = "Hunter Thompson",
author_email = "thompson.grey.hunter@gmail.com",
description = "Bittrex SMS Notifier",
license = "MIT",
... | 27.178571 | 56 | 0.622865 |
422a2d47a0074ebe7683e65f12112cbe467868b0 | 29,716 | py | Python | cloudcafe/objectstorage/objectstorage_api/client.py | kurhula/cloudcafe | 7d49cf6bfd7e1a6e5b739e7de52f2e18e5ccf924 | [
"Apache-2.0"
] | null | null | null | cloudcafe/objectstorage/objectstorage_api/client.py | kurhula/cloudcafe | 7d49cf6bfd7e1a6e5b739e7de52f2e18e5ccf924 | [
"Apache-2.0"
] | null | null | null | cloudcafe/objectstorage/objectstorage_api/client.py | kurhula/cloudcafe | 7d49cf6bfd7e1a6e5b739e7de52f2e18e5ccf924 | [
"Apache-2.0"
] | 1 | 2020-04-13T17:44:28.000Z | 2020-04-13T17:44:28.000Z | """
Copyright 2013 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 37.758577 | 79 | 0.575818 |
d9f4db62572fb152c83e131460af8f279bad34c4 | 3,478 | py | Python | homeassistant/components/kankun/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/kankun/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/kankun/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for customised Kankun SP3 Wifi switch."""
import logging
import requests
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import (
CONF_HOST,
CONF_NAME,
CONF_PASSWORD,
CONF_PATH,
CONF_PORT,
CONF_SWITCHES,
... | 27.824 | 84 | 0.603508 |
a54b4198e6f4145db811825416640ced4e8d7ebe | 4,506 | py | Python | module1-introduction-to-sql/rpg_queries.py | maximematerno/DS-Unit-3-Sprint-2-SQL-and-Databases | 563efe5f74734b9a1b02f7e695534ec992f0510c | [
"MIT"
] | null | null | null | module1-introduction-to-sql/rpg_queries.py | maximematerno/DS-Unit-3-Sprint-2-SQL-and-Databases | 563efe5f74734b9a1b02f7e695534ec992f0510c | [
"MIT"
] | null | null | null | module1-introduction-to-sql/rpg_queries.py | maximematerno/DS-Unit-3-Sprint-2-SQL-and-Databases | 563efe5f74734b9a1b02f7e695534ec992f0510c | [
"MIT"
] | null | null | null | import sqlite3
from tabulate import tabulate
conn = sqlite3.connect('rpg_db.sqlite3')
cursor = conn.cursor()
# How many total Characters?
total_characters_query = 'SELECT COUNT(*) FROM charactercreator_character;'
total_characters = cursor.execute(total_characters_query).fetchone()[0]
print(f' The number total of ch... | 45.06 | 141 | 0.671771 |
c776b621ce378d65402454346e382dd2b4834021 | 7,368 | py | Python | MultiQubit_PulseGenerator_Custom/readout.py | kahojyun/Drivers | 100de116e372594068dc5c725c8898a0f1d580a4 | [
"MIT"
] | null | null | null | MultiQubit_PulseGenerator_Custom/readout.py | kahojyun/Drivers | 100de116e372594068dc5c725c8898a0f1d580a4 | [
"MIT"
] | null | null | null | MultiQubit_PulseGenerator_Custom/readout.py | kahojyun/Drivers | 100de116e372594068dc5c725c8898a0f1d580a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# add logger, to allow logging to Labber's instrument log
import logging
import numpy as np
log = logging.getLogger('LabberDriver')
class Demodulation(object):
"""Demodulate multi-tone qubit readout.
Parameters
----------
n_qubit : int
The number of qubits to readout.... | 36.117647 | 80 | 0.562704 |
d72b1566c28793c71a0b87d8220dd7520718e4fc | 202 | py | Python | tests/decorator.py | jpages/twopy | d0ae42b02ee60cf432e716884f43ec6670bcae2b | [
"BSD-3-Clause"
] | 7 | 2018-12-18T20:32:04.000Z | 2021-05-30T04:20:22.000Z | tests/decorator.py | jpages/twopy | d0ae42b02ee60cf432e716884f43ec6670bcae2b | [
"BSD-3-Clause"
] | null | null | null | tests/decorator.py | jpages/twopy | d0ae42b02ee60cf432e716884f43ec6670bcae2b | [
"BSD-3-Clause"
] | 1 | 2021-11-14T17:47:11.000Z | 2021-11-14T17:47:11.000Z | def mon_decorateur(fonction):
print("Notre décorateur est appelé avec en paramètre la fonction {0}".format(fonction))
return fonction
@mon_decorateur
def salut():
print("Salut !")
salut()
| 20.2 | 91 | 0.717822 |
21d195c2cf3487f8b7fd6c1812bbbadb6cf94e5e | 6,025 | py | Python | aws_cloudformation/templates/validate_lambda.py | fortinet/fortiweb-autoscale | a3b8455d4d980b838b3170e2463e3e0d2deab122 | [
"MIT"
] | 3 | 2020-06-16T06:36:49.000Z | 2021-12-27T12:09:04.000Z | aws_cloudformation/templates/validate_lambda.py | fortinet/fortiweb-autoscale | a3b8455d4d980b838b3170e2463e3e0d2deab122 | [
"MIT"
] | null | null | null | aws_cloudformation/templates/validate_lambda.py | fortinet/fortiweb-autoscale | a3b8455d4d980b838b3170e2463e3e0d2deab122 | [
"MIT"
] | 1 | 2020-07-01T03:31:50.000Z | 2020-07-01T03:31:50.000Z | import json,logging,threading,boto3
from botocore.vendored import requests
import re
CFN_SUCCESS = "SUCCESS"
CFN_FAILED = "FAILED"
g_return_error = True
def cfn_send(evt, context, responseStatus, respData, reason=''):
respUrl = evt['ResponseURL']
print(respUrl)
respBody = {}
respBody['Status'] = resp... | 43.345324 | 191 | 0.652116 |
d7afdc2d0a15c4a0929f845ad12b4e64c038fe18 | 5,862 | py | Python | qa/rpc-tests/rawtransactions.py | Ankh-Trust/credit-core | fa6fd67bdc9846cc40ee24f9a64e610e634b9356 | [
"MIT"
] | 2 | 2019-10-31T11:56:31.000Z | 2019-11-02T08:48:45.000Z | qa/rpc-tests/rawtransactions.py | Ankh-fdn/credit-core | fa6fd67bdc9846cc40ee24f9a64e610e634b9356 | [
"MIT"
] | 2 | 2019-11-22T18:49:20.000Z | 2020-10-06T11:44:46.000Z | qa/rpc-tests/rawtransactions.py | Ankh-fdn/credit-core | fa6fd67bdc9846cc40ee24f9a64e610e634b9356 | [
"MIT"
] | 1 | 2020-06-09T16:15:27.000Z | 2020-06-09T16:15:27.000Z | #!/usr/bin/env python2
# Copyright (c) 2016-2017 The Duality Blockchain Solutions developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test re-org scenarios with a mempool that contains transactions
# that spend (directl... | 41.28169 | 147 | 0.635107 |
4ce472f0ef6a81b353c0937b359fac63c5cb7375 | 4,213 | py | Python | jack/io/multiNLI2jtr.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 192 | 2017-10-19T18:04:56.000Z | 2019-09-21T23:29:03.000Z | jack/io/multiNLI2jtr.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 120 | 2017-10-16T09:46:07.000Z | 2019-06-20T18:34:24.000Z | jack/io/multiNLI2jtr.py | elyase/jack | a4f43a4012a540d55d2e05d8a904e6f8cc3002f1 | [
"MIT"
] | 50 | 2017-10-19T09:57:45.000Z | 2019-07-24T13:46:26.000Z | """
This files allows creating a jtr datafile for the SNLI corpus,
whereby each instance receives support under the form of 'related' instances
"""
import json
__candidate_labels = ['entailment', 'neutral', 'contradiction']
__candidates = [{'text': cl} for cl in __candidate_labels]
def convert_snli(multisnli_file)... | 39.745283 | 113 | 0.614764 |
a0c580bf5435e723c80478c3170ef40eae791a60 | 2,580 | py | Python | intents/oversights/duplicates_in_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 1 | 2020-06-26T19:16:15.000Z | 2020-06-26T19:16:15.000Z | intents/oversights/duplicates_in_topk.py | bhagyakjain/debaised-analysis | 6b8b27575bf3f60a6711e370bfad838e29f5cc8a | [
"Apache-2.0"
] | 30 | 2020-06-01T13:42:25.000Z | 2022-03-31T03:58:55.000Z | intents/oversights/duplicates_in_topk.py | googleinterns/debaised-analysis | 0dad1186a177a171956a33c49999d9387b9f989d | [
"Apache-2.0"
] | 10 | 2020-06-10T05:43:59.000Z | 2020-08-20T10:32:24.000Z | """
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distrib... | 35.833333 | 72 | 0.713566 |
d7347580ec3880250d84b6eb34b5652ef0b03e28 | 10,408 | py | Python | .config/qtile/backup.py | yuesubi/dotfiles | 9a2df7e87ce3fb12d5a14d8a02e66fab112ae5a3 | [
"MIT"
] | null | null | null | .config/qtile/backup.py | yuesubi/dotfiles | 9a2df7e87ce3fb12d5a14d8a02e66fab112ae5a3 | [
"MIT"
] | null | null | null | .config/qtile/backup.py | yuesubi/dotfiles | 9a2df7e87ce3fb12d5a14d8a02e66fab112ae5a3 | [
"MIT"
] | null | null | null | # Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# o... | 35.043771 | 85 | 0.59435 |
460537d9cbfabdd5790eefafb4e096d1c6a96983 | 51,217 | py | Python | Lib/site-packages/plotly/graph_objs/scatterpolargl/_marker.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 4 | 2020-02-05T11:26:47.000Z | 2021-05-26T07:48:46.000Z | Lib/site-packages/plotly/graph_objs/scatterpolargl/_marker.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 6 | 2021-03-18T22:27:08.000Z | 2022-03-11T23:40:50.000Z | venv/lib/python3.7/site-packages/plotly/graph_objs/scatterpolargl/_marker.py | kylenahas/180LoginV1 | 8f64be6e6016d47dff8febfcfa3bbd56e9042f89 | [
"MIT"
] | 1 | 2020-02-02T21:17:12.000Z | 2020-02-02T21:17:12.000Z | from plotly.basedatatypes import BaseTraceHierarchyType
import copy
class Marker(BaseTraceHierarchyType):
# autocolorscale
# --------------
@property
def autocolorscale(self):
"""
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette de... | 41.204344 | 79 | 0.544058 |
a19c209e1271e0b77cbd812bdf910331345c36d3 | 1,044 | py | Python | cmake/split.py | Earthcomputer/libseedfinding | 37a7c59334ca4c77bed7aabd9aa7ca0f473da66b | [
"MIT"
] | 11 | 2020-07-22T15:50:52.000Z | 2021-09-30T22:21:54.000Z | cmake/split.py | Earthcomputer/libseedfinding | 37a7c59334ca4c77bed7aabd9aa7ca0f473da66b | [
"MIT"
] | 2 | 2020-08-11T08:26:41.000Z | 2020-08-16T09:54:51.000Z | cmake/split.py | Earthcomputer/libseedfinding | 37a7c59334ca4c77bed7aabd9aa7ca0f473da66b | [
"MIT"
] | null | null | null | import os
import sys
border = '// ----------------------------------------------------------------------------'
PythonVersion = sys.version_info[0];
# find all .h first
with open('lcg.h') as f:
lines = f.readlines()
inImplementation = False
if PythonVersion < 3:
os.makedirs('out')
else:
... | 31.636364 | 90 | 0.464559 |
8957587b46d41fb52f4e64ecb202bce825d59da4 | 18,394 | py | Python | Progress_Bar.py | rondan100/APLICATIVO2 | 5424dc40ac06ce275d7e1ed8ab5cf1e4c409f836 | [
"MIT"
] | 1 | 2020-10-14T11:13:44.000Z | 2020-10-14T11:13:44.000Z | Progress_Bar.py | rondan100/Xadrez-de-Dados-Android | 5424dc40ac06ce275d7e1ed8ab5cf1e4c409f836 | [
"MIT"
] | null | null | null | Progress_Bar.py | rondan100/Xadrez-de-Dados-Android | 5424dc40ac06ce275d7e1ed8ab5cf1e4c409f836 | [
"MIT"
] | null | null | null | from kivy.app import App
from kivy.uix.progressbar import ProgressBar
from kivy.core.text import Label as CoreLabel
from kivy.lang.builder import Builder
from kivy.graphics import Color, Ellipse, Rectangle
from kivy.clock import Clock
class CircularProgressBar(ProgressBar):
def __init__(self, **kwargs):
... | 40.249453 | 141 | 0.618952 |
cf6247023e64b76f655e3232d6cb6e9d147c329e | 10,735 | py | Python | mindspore/ops/_grad/grad_array_ops.py | huxiaoman7/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-05-23T07:08:46.000Z | 2020-05-23T07:08:46.000Z | mindspore/ops/_grad/grad_array_ops.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | mindspore/ops/_grad/grad_array_ops.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 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... | 26.119221 | 101 | 0.638472 |
86091a64a1a95b7a6042ab5f3a393717e1701205 | 6,620 | py | Python | ELDAmwl/database/tables/backscatter.py | actris-scc/ELDAmwl | c4d8426e6609a00837779a80d4acd39c580a0178 | [
"MIT"
] | 1 | 2021-12-06T09:48:07.000Z | 2021-12-06T09:48:07.000Z | ELDAmwl/database/tables/backscatter.py | actris-scc/ELDAmwl | c4d8426e6609a00837779a80d4acd39c580a0178 | [
"MIT"
] | null | null | null | ELDAmwl/database/tables/backscatter.py | actris-scc/ELDAmwl | c4d8426e6609a00837779a80d4acd39c580a0178 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Classes for backscatter related db tables"""
from ELDAmwl.database.tables.db_base import Base
from sqlalchemy import CHAR
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import DECIMAL
from sqlalchemy import INTEGER
from sqlalchemy import String
from sqlalchemy ... | 20.6875 | 60 | 0.566767 |
dc94b0e2317e4feb1aa5c18fd617b55ba486b1ea | 4,235 | py | Python | robin_stocks/crypto.py | rkreddy56/stock-watch | 9a42b5c91f945482cf9915cb45328dfdb76d1f76 | [
"MIT"
] | null | null | null | robin_stocks/crypto.py | rkreddy56/stock-watch | 9a42b5c91f945482cf9915cb45328dfdb76d1f76 | [
"MIT"
] | null | null | null | robin_stocks/crypto.py | rkreddy56/stock-watch | 9a42b5c91f945482cf9915cb45328dfdb76d1f76 | [
"MIT"
] | null | null | null | """Contains functions to get information about crypto-currencies."""
import robin_stocks.helper as helper
import robin_stocks.urls as urls
@helper.login_required
def load_crypto_profile(info=None):
"""Gets the information associated with the crypto account.
:param info: The name of the key whose value is to ... | 40.333333 | 125 | 0.717119 |
b9bfe449a2b958baf3f0d651b877dd5239cdfd27 | 3,167 | py | Python | asv_bench/benchmarks/utils.py | Rippling/modin | b2cf1d5fc704803a1ce6699e9a373dc7abeb409e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | asv_bench/benchmarks/utils.py | Rippling/modin | b2cf1d5fc704803a1ce6699e9a373dc7abeb409e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | asv_bench/benchmarks/utils.py | Rippling/modin | b2cf1d5fc704803a1ce6699e9a373dc7abeb409e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 31.356436 | 88 | 0.680455 |
bb18d188130401a65ba689f2f045e16f18eb3086 | 758 | py | Python | hopester/urls.py | totalgood/hopester | be846c983eba2669a2bd21eb36c2089206823ed9 | [
"MIT"
] | null | null | null | hopester/urls.py | totalgood/hopester | be846c983eba2669a2bd21eb36c2089206823ed9 | [
"MIT"
] | null | null | null | hopester/urls.py | totalgood/hopester | be846c983eba2669a2bd21eb36c2089206823ed9 | [
"MIT"
] | null | null | null | """hopester URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | 34.454545 | 77 | 0.705805 |
586a80c3da09ae3bc32c1e9bdca6324857d01f55 | 3,580 | py | Python | 2d-tools/render_line_svg.py | inconvergent/blender-utils | 3c4ed707d3bafa0be7a5fb58b2c7171fe8a38472 | [
"MIT"
] | 12 | 2016-02-16T20:14:55.000Z | 2022-03-12T21:05:11.000Z | 2d-tools/render_line_svg.py | inconvergent/blender-utils | 3c4ed707d3bafa0be7a5fb58b2c7171fe8a38472 | [
"MIT"
] | null | null | null | 2d-tools/render_line_svg.py | inconvergent/blender-utils | 3c4ed707d3bafa0be7a5fb58b2c7171fe8a38472 | [
"MIT"
] | 1 | 2017-01-17T09:26:56.000Z | 2017-01-17T09:26:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
BLACK = [0,0,0,1]
def order_edges(edges):
res = []
ev_dict = {}
ve_dict = {}
e_visited = {}
v_ordered = []
e_order = []
enum = len(edges)
for e,(v1,v2) in enumerate(edges):
ev_dict[e] = [v1,v2]
if v1 in ve_dict:
ve_dict[v1].append(e)
else:... | 17.635468 | 77 | 0.619553 |
a016f1798e2a3802858af91ec661a4442f1cda84 | 763 | py | Python | examples/run_country.py | ElcoK/WISC | c3779b387664b37cdfc49399202c74ab30531066 | [
"MIT"
] | 1 | 2022-03-11T08:31:18.000Z | 2022-03-11T08:31:18.000Z | examples/run_country.py | ElcoK/WISC | c3779b387664b37cdfc49399202c74ab30531066 | [
"MIT"
] | 2 | 2020-04-25T10:40:42.000Z | 2020-10-08T13:12:56.000Z | examples/run_country.py | ElcoK/WISC | c3779b387664b37cdfc49399202c74ab30531066 | [
"MIT"
] | 4 | 2018-07-23T12:39:51.000Z | 2021-02-02T00:01:47.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 17 19:37:33 2018
@author: cenv0574
"""
import os
import sys
import country_converter as coco
cc = coco.CountryConverter()
# make connection to all the scripts
sys.path.append(os.path.join( '..'))
from scripts.utils import load_config,create_folder_structure
from scripts... | 23.121212 | 65 | 0.686763 |
5e7910b621175cec721d7cd1a9c6c82a771bc0ef | 6,114 | py | Python | airflow/sensors/base_sensor_operator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 3 | 2019-10-03T21:38:59.000Z | 2019-10-04T00:39:03.000Z | airflow/sensors/base_sensor_operator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 7 | 2019-03-27T07:58:14.000Z | 2020-02-12T17:42:33.000Z | airflow/sensors/base_sensor_operator.py | Ryan-Miao/airflow | a2aca8714fac014ed7da97229d7877f1bc6e5a59 | [
"Apache-2.0"
] | 2 | 2018-11-01T22:36:10.000Z | 2019-11-23T13:36:53.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 43.056338 | 89 | 0.653909 |
f741a5a36d0e415fcfa0601ee6fd6c6f4d1c8726 | 3,888 | py | Python | assignment1/deeplearning/gradient_check.py | AnthonyNg404/Deep-Learning | ef1dafaa1d07e9c9b574ba1722a7954c16ef463d | [
"Unlicense"
] | null | null | null | assignment1/deeplearning/gradient_check.py | AnthonyNg404/Deep-Learning | ef1dafaa1d07e9c9b574ba1722a7954c16ef463d | [
"Unlicense"
] | null | null | null | assignment1/deeplearning/gradient_check.py | AnthonyNg404/Deep-Learning | ef1dafaa1d07e9c9b574ba1722a7954c16ef463d | [
"Unlicense"
] | null | null | null | import numpy as np
from random import randrange
def eval_numerical_gradient(f, x, verbose=True, h=0.00001):
"""
a naive implementation of numerical gradient of f at x
- f should be a function that takes a single argument
- x is the point (numpy array) to evaluate the gradient at
"""
fx = f(x)... | 31.104 | 108 | 0.58179 |
20c80b63e26e938b92386d805821af902953f345 | 2,946 | py | Python | RecoHI/HiTracking/python/hiMergedConformalPixelTracking_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoHI/HiTracking/python/hiMergedConformalPixelTracking_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoHI/HiTracking/python/hiMergedConformalPixelTracking_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from RecoHI.HiTracking.HILowPtConformalPixelTracks_cfi import *
from RecoHI.HiTracking.hiMultiTrackSelector_cfi import *
from RecoTracker.FinalTrackSelectors.trackListMerger_cfi import *
from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrd... | 31.340426 | 93 | 0.697556 |
cf2aa008154a44bed131682940db95c7e7a8628f | 300 | py | Python | minecraft/stats/mcstats/stats/crouch.py | pixelpox/pixelpox.github.io | ab488014c4eeaf77e0f256746bb580f839284950 | [
"MIT"
] | 1 | 2019-08-08T10:36:54.000Z | 2019-08-08T10:36:54.000Z | minecraft/stats/mcstats/stats/crouch.py | pixelpox/pixelpox.github.io | ab488014c4eeaf77e0f256746bb580f839284950 | [
"MIT"
] | 2 | 2019-08-06T05:50:04.000Z | 2021-09-01T20:06:15.000Z | bin/mcstats/mcstats/stats/crouch.py | smashedbotatos/iCarey_Whitelist_System | cf93d3983f15838a22859781d6a36e8f44cb458f | [
"Apache-2.0"
] | null | null | null | from mcstats import mcstats
mcstats.registry.append(
mcstats.MinecraftStat(
'crouch',
{
'title': 'Sneaky',
'desc': 'Distance crouched',
'unit': 'cm',
},
mcstats.StatReader(['minecraft:custom','minecraft:crouch_one_cm'])
))
| 23.076923 | 74 | 0.54 |
5fd59d72bc702496e1058183873579bb845221d9 | 223 | py | Python | examples/computer_vision/mmdetection_pytorch/configs/dcn/cascade_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | 1 | 2021-03-29T13:39:45.000Z | 2021-03-29T13:39:45.000Z | examples/computer_vision/mmdetection_pytorch/configs/dcn/cascade_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | examples/computer_vision/mmdetection_pytorch/configs/dcn/cascade_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | _base_ = "../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py"
model = dict(
backbone=dict(
dcn=dict(type="DCN", deform_groups=1, fallback_on_stride=False),
stage_with_dcn=(False, True, True, True),
)
)
| 27.875 | 72 | 0.67713 |
52e61d9e9197589ff813e8b7de8e618c52c8d695 | 1,108 | py | Python | venv/lib/python3.8/site-packages/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_reference.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_reference.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_reference.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 36.933333 | 95 | 0.475632 |
55a320a702d0704ecc0e0bb7154c5c22f0014487 | 59,327 | py | Python | test_MC.py | sohamch/VKMC | c78d93ad8e628408456844a7431e4343eaf90aaa | [
"MIT"
] | null | null | null | test_MC.py | sohamch/VKMC | c78d93ad8e628408456844a7431e4343eaf90aaa | [
"MIT"
] | null | null | null | test_MC.py | sohamch/VKMC | c78d93ad8e628408456844a7431e4343eaf90aaa | [
"MIT"
] | null | null | null | from onsager import crystal, supercell, cluster
import numpy as np
import itertools
import Transitions
import Cluster_Expansion
import MC_JIT
import unittest
import time
import warnings
import collections
warnings.filterwarnings('error', category=RuntimeWarning)
np.seterr(all='raise')
class Test_MC_Arrays(unittest.T... | 47.652209 | 146 | 0.598598 |
46bdc48e2ab7b7e65f616b47bf6cc337861e30b2 | 4,864 | py | Python | Morse Code.py | DebRC/Morse-Code-Translator | aa531181e51c79177fd8576696467d9faa40a9bf | [
"MIT"
] | null | null | null | Morse Code.py | DebRC/Morse-Code-Translator | aa531181e51c79177fd8576696467d9faa40a9bf | [
"MIT"
] | null | null | null | Morse Code.py | DebRC/Morse-Code-Translator | aa531181e51c79177fd8576696467d9faa40a9bf | [
"MIT"
] | null | null | null | # import all functions from the tkinter
from tkinter import *
# import messagebox class from tkinter
from tkinter import messagebox
# Create a GUI window
root = Tk()
root.resizable(width=False, height=False)
# create a global variables
option1 = StringVar(root)
option2 = StringVar(root)
# initialise the... | 33.315068 | 149 | 0.557566 |
63fab930e7834639d26d7e348aa201d89bdd921a | 2,828 | py | Python | docs/source/conf.py | rmartico/UBUMonitorDocs | 6ea6ea22348d964e4ad8a13f5ec1716c414ba3a2 | [
"MIT"
] | null | null | null | docs/source/conf.py | rmartico/UBUMonitorDocs | 6ea6ea22348d964e4ad8a13f5ec1716c414ba3a2 | [
"MIT"
] | null | null | null | docs/source/conf.py | rmartico/UBUMonitorDocs | 6ea6ea22348d964e4ad8a13f5ec1716c414ba3a2 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.270588 | 79 | 0.67645 |
4e86e54f833878e8bc96ed502a7de33115b88563 | 27,255 | py | Python | pip/utils/__init__.py | jonparrott/pip | 9c037803197b05bb722223c2f5deffcbb7f4b0c4 | [
"MIT"
] | 1 | 2022-01-24T12:05:27.000Z | 2022-01-24T12:05:27.000Z | pip/utils/__init__.py | jonparrott/pip | 9c037803197b05bb722223c2f5deffcbb7f4b0c4 | [
"MIT"
] | null | null | null | pip/utils/__init__.py | jonparrott/pip | 9c037803197b05bb722223c2f5deffcbb7f4b0c4 | [
"MIT"
] | 1 | 2020-12-18T10:39:35.000Z | 2020-12-18T10:39:35.000Z | from __future__ import absolute_import
from collections import deque
import contextlib
import errno
import io
import locale
# we have a submodule named 'logging' which would shadow this if we used the
# regular name:
import logging as std_logging
import re
import os
import posixpath
import shutil
import stat
import su... | 31.8028 | 79 | 0.601798 |
4554077c3547caa3032559a4cb8409521a3e9c2c | 6,500 | py | Python | utils/masked_cross_entropy.py | dchen-asapp/trade-dst | 2852e82856f1f0787504a001f37e87062d63d54d | [
"MIT"
] | 1 | 2021-03-31T21:42:02.000Z | 2021-03-31T21:42:02.000Z | utils/masked_cross_entropy.py | dchen-asapp/trade-dst | 2852e82856f1f0787504a001f37e87062d63d54d | [
"MIT"
] | null | null | null | utils/masked_cross_entropy.py | dchen-asapp/trade-dst | 2852e82856f1f0787504a001f37e87062d63d54d | [
"MIT"
] | null | null | null | import torch
from torch.nn import functional
from torch.autograd import Variable
from utils.config import *
import torch.nn as nn
import numpy as np
def sequence_mask(sequence_length, max_len=None):
if max_len is None:
max_len = sequence_length.data.max()
batch_size = sequence_length.size(0)
seq_ra... | 37.790698 | 92 | 0.664 |
3d2e52e8ded30cd675cea534a87dc0cdeb01c474 | 8,652 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"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.335196 | 206 | 0.67129 |
334c63e64a63adc4dfc6e52a9943f295970d8314 | 1,866 | py | Python | src/vm-repair/setup.py | mjain2/azure-cli-extensions | ec19257bfff14c54df0d69008257847aca7276ac | [
"MIT"
] | null | null | null | src/vm-repair/setup.py | mjain2/azure-cli-extensions | ec19257bfff14c54df0d69008257847aca7276ac | [
"MIT"
] | null | null | null | src/vm-repair/setup.py | mjain2/azure-cli-extensions | ec19257bfff14c54df0d69008257847aca7276ac | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 35.884615 | 180 | 0.597535 |
daddd25ddf80c5a83cb8bd83303247a9a86533d5 | 3,185 | py | Python | rapid7_insightvm/komand_rapid7_insightvm/actions/get_scan_engine_pool/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | rapid7_insightvm/komand_rapid7_insightvm/actions/get_scan_engine_pool/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | rapid7_insightvm/komand_rapid7_insightvm/actions/get_scan_engine_pool/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Input:
ID = "id"
class Output:
SCAN_ENGINE_POOL = "scan_engine_pool"
class GetScanEnginePoolInput(komand.Input):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"id": {
... | 22.75 | 122 | 0.457771 |
d423d9e2685fdec7deefa953e54498aed9550aa7 | 21,376 | py | Python | anuran/main.py | ramellose/anuran | 8541f9cedbca00981257564fb8562d46fa5f5cab | [
"Apache-2.0"
] | 4 | 2020-03-05T16:11:14.000Z | 2021-12-03T17:56:57.000Z | anuran/main.py | ramellose/anuran | 8541f9cedbca00981257564fb8562d46fa5f5cab | [
"Apache-2.0"
] | 2 | 2021-11-05T11:28:39.000Z | 2021-11-24T09:13:35.000Z | anuran/main.py | ramellose/anuran | 8541f9cedbca00981257564fb8562d46fa5f5cab | [
"Apache-2.0"
] | 1 | 2020-12-03T07:50:44.000Z | 2020-12-03T07:50:44.000Z | #!/usr/bin/env python
"""
anuran: Null models for replicate networks.
The script takes a network as input and uses this to generate null models.
The output of the null models is presented as a csv of set sizes
and a t-test is used to assess whether set sizes are different than expected from the null model.
Detailed ex... | 52.136585 | 124 | 0.541776 |
7a95c4ea4e9b166eb8a2d3d0c2cab08bc135efb3 | 347 | py | Python | packages/api-server/api_server/models/ros_pydantic/rmf_fleet_msgs/FleetState.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | 2 | 2021-02-22T06:08:25.000Z | 2021-03-05T12:14:51.000Z | packages/api-server/api_server/models/ros_pydantic/rmf_fleet_msgs/FleetState.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | 77 | 2020-12-08T22:10:22.000Z | 2021-03-09T00:44:47.000Z | packages/api-server/api_server/models/ros_pydantic/rmf_fleet_msgs/FleetState.py | baviera08/romi-dashboard | ac3a15014ad3c3bdac523a6550934a06653cfba1 | [
"Apache-2.0"
] | 1 | 2021-01-11T05:35:28.000Z | 2021-01-11T05:35:28.000Z | # This is a generated file, do not edit
from typing import List
import pydantic
from ..rmf_fleet_msgs.RobotState import RobotState
class FleetState(pydantic.BaseModel):
name: str = "" # string
robots: List[RobotState] = [] # rmf_fleet_msgs/RobotState
class Config:
orm_mode = True
# string ... | 17.35 | 62 | 0.706052 |
d0079455daac6744f07b17bbc17e0e3ab9096200 | 936 | py | Python | .history/classes/Round_20171107111340.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Round_20171107111340.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/classes/Round_20171107111340.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
class Round():
_app = None
_name = None
_gender = None
_matches = [ ]
_cap = 3
def __init__(self, app, gender, name):
# Set our application
self._app = app
# Debug
if(self._app.debug):
print("[LOAD] Round: {}".f... | 19.914894 | 59 | 0.560897 |
e2be1c13d48cd0130caf663c073e8293db0408ce | 8,664 | py | Python | rpc/__init__.py | hongbaoblockchain/HongbaoGuiWallet | 4efe20e65b6dc6175787dd4db7ef9135a5098e16 | [
"BSD-3-Clause"
] | null | null | null | rpc/__init__.py | hongbaoblockchain/HongbaoGuiWallet | 4efe20e65b6dc6175787dd4db7ef9135a5098e16 | [
"BSD-3-Clause"
] | null | null | null | rpc/__init__.py | hongbaoblockchain/HongbaoGuiWallet | 4efe20e65b6dc6175787dd4db7ef9135a5098e16 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
## Copyright (c) 2017, The Hongbao Project (www.hongbaoblockchain.org)
'''
RPC requests
'''
from __future__ import print_function
import sys
import requests, json
from requests.exceptions import ConnectionError
from uuid import uuid4
from Queue import Queue
from threading i... | 34.935484 | 141 | 0.57964 |
1994d15c76a0d175d6f3efca8e50a69da22a3216 | 4,805 | py | Python | transwarp/i18n.py | michaelliao/transwarp | d4f308ebe9c6698b013a946cb33b9cc9a6076321 | [
"Apache-2.0"
] | 26 | 2015-01-04T02:04:07.000Z | 2021-11-03T08:54:26.000Z | transwarp/i18n.py | michaelliao/transwarp | d4f308ebe9c6698b013a946cb33b9cc9a6076321 | [
"Apache-2.0"
] | 1 | 2015-01-25T04:34:04.000Z | 2015-01-30T02:23:42.000Z | transwarp/i18n.py | michaelliao/transwarp | d4f308ebe9c6698b013a946cb33b9cc9a6076321 | [
"Apache-2.0"
] | 35 | 2015-01-02T07:26:34.000Z | 2021-11-11T16:04:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Michael Liao'
'''
I18N support.
'''
import os, re, logging, codecs, threading
_RE_EQUALS = re.compile(r'(?<!\\)\=')
_I18N_MAP = dict()
# thread local object for storing locale.
_locale = threading.local()
def _load(fpath):
'''
Load a i18n file.
... | 28.431953 | 151 | 0.518418 |
12f73ce43f581d14bcfaf13ae4691a6724dc3f4d | 399 | py | Python | fooofunit/capabilities/__init__.py | GriffithsLab/fooof-unit | 8c0144010b27d68eb1bf044dc5d21db00d9a664b | [
"MIT"
] | null | null | null | fooofunit/capabilities/__init__.py | GriffithsLab/fooof-unit | 8c0144010b27d68eb1bf044dc5d21db00d9a664b | [
"MIT"
] | 11 | 2020-08-11T15:07:50.000Z | 2020-09-14T18:21:34.000Z | fooofunit/capabilities/__init__.py | GriffithsLab/fooof-unit | 8c0144010b27d68eb1bf044dc5d21db00d9a664b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Loads all capability classes"""
from os.path import dirname, basename, isfile
import glob
"""
NOTE: All capability files must have a prefix "cap_" and extension ".py".
Only these would be loaded.
"""
files = glob.glob(dirname(__file__)+"/cap_*.py")
modules = [ basename(f)[:-3] for f in fil... | 24.9375 | 73 | 0.674185 |
5aa0981c47490dd8c584bc71fe26bebc2c112a7d | 451 | py | Python | start_telegram_session.py | samuelviveiros/connector | 85f7a93f15ef3d01b648a64422fbfdea0191de76 | [
"MIT"
] | null | null | null | start_telegram_session.py | samuelviveiros/connector | 85f7a93f15ef3d01b648a64422fbfdea0191de76 | [
"MIT"
] | 13 | 2021-11-23T00:19:34.000Z | 2021-11-29T21:05:57.000Z | start_telegram_session.py | samuelviveiros/connector | 85f7a93f15ef3d01b648a64422fbfdea0191de76 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from dotenv import load_dotenv
from telethon import TelegramClient
load_dotenv()
api_id = os.getenv("API_ID")
api_hash = os.getenv("API_HASH")
phone = os.getenv("PHONE")
client = TelegramClient("telegram", api_id, api_hash)
with client: # Telethon will request phone and code to lo... | 23.736842 | 80 | 0.716186 |
562a2d1a96abb09be42e4a2f8db2ebe95f284b33 | 2,323 | py | Python | ycyc/tools/email_tools.py | MrLYC/ycyc | 1938493294fbad3a461cc3a752c5385d30a6e51d | [
"MIT"
] | 22 | 2015-07-21T03:15:36.000Z | 2021-02-23T07:58:03.000Z | ycyc/tools/email_tools.py | MrLYC/ycyc | 1938493294fbad3a461cc3a752c5385d30a6e51d | [
"MIT"
] | 3 | 2016-03-20T12:06:07.000Z | 2018-01-16T10:34:19.000Z | ycyc/tools/email_tools.py | MrLYC/ycyc | 1938493294fbad3a461cc3a752c5385d30a6e51d | [
"MIT"
] | 3 | 2015-05-08T00:55:38.000Z | 2017-02-25T03:30:14.000Z | #!/usr/bin/env python
# encoding: utf-8
from collections import namedtuple
import smtplib
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.header import Header
import os
import six
from ycyc.base.typeutils import SimpleEx... | 29.405063 | 73 | 0.629359 |
f0d733e7cba5f81ebce365a4e897fffee68bd841 | 243 | py | Python | example_data/steel_dwass.py | nishimoto/py_r_stats | 1e4a2dbe68feb25d34f2cbf1a769cb44238ae6cd | [
"MIT"
] | null | null | null | example_data/steel_dwass.py | nishimoto/py_r_stats | 1e4a2dbe68feb25d34f2cbf1a769cb44238ae6cd | [
"MIT"
] | null | null | null | example_data/steel_dwass.py | nishimoto/py_r_stats | 1e4a2dbe68feb25d34f2cbf1a769cb44238ae6cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pandas as pd
import matplotlib.pylab as plt
df = pd.DataFrame({
"a": [1, 2, 3, 5, 1],
"b": [12, 31, 54, 62, 12],
"c": [10, 12, 6, 74, 11]
})
df.plot(kind="box")
plt.savefig("boxplot.steel-dwass.png")
| 18.692308 | 38 | 0.576132 |
1dac3bb88108aa49d462ed5021b43feea4bf1fb7 | 682 | py | Python | echo_server.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | 1 | 2017-06-12T03:12:29.000Z | 2017-06-12T03:12:29.000Z | echo_server.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | null | null | null | echo_server.py | ianzhengnan/learnpy | ed1736ac976d56253183399466a167fb9319f869 | [
"Apache-2.0"
] | null | null | null |
import socket, threading, time
def tcplink(sock, addr):
print('Accept new connection from %s:%s...' % addr)
sock.send(b'Welcome!')
while True:
data = sock.recv(1024)
time.sleep(1)
if not data or data.decode('utf-8') == 'exit':
break
sock.send(('Hello, %s!' % d... | 20.666667 | 72 | 0.595308 |
90a3184dba7b5c92d77d74602dfa95658e2f685c | 2,262 | py | Python | games/WAVES/extractors/TimeToAnswerMS.py | mjgm97/opengamedata-core | 10bbaaf8ffc43855298ecb8ad0940acc59475cc1 | [
"MIT"
] | null | null | null | games/WAVES/extractors/TimeToAnswerMS.py | mjgm97/opengamedata-core | 10bbaaf8ffc43855298ecb8ad0940acc59475cc1 | [
"MIT"
] | 2 | 2022-01-04T19:41:13.000Z | 2022-02-04T20:36:51.000Z | games/WAVES/extractors/TimeToAnswerMS.py | mjgm97/opengamedata-core | 10bbaaf8ffc43855298ecb8ad0940acc59475cc1 | [
"MIT"
] | 1 | 2021-12-17T15:53:16.000Z | 2021-12-17T15:53:16.000Z | from schemas import Event
import typing
from typing import Any, List, Union
# local imports
from extractors.Feature import Feature
from schemas.Event import Event
class TimeToAnswerMS(Feature):
def __init__(self, name:str, description:str, count_index:int):
Feature.__init__(self, name=name, description=des... | 39.684211 | 91 | 0.633068 |
ca3cfe723072db20b40aecfcf0cdc2c6cf70f6b0 | 2,987 | py | Python | tests/interwikidata_tests.py | notconfusing/pywikibot-fr-welcome-bot | 6e07b7e74166a47c9425816e79786308df369ac2 | [
"MIT"
] | 1 | 2020-01-03T11:52:01.000Z | 2020-01-03T11:52:01.000Z | tests/interwikidata_tests.py | notconfusing/pywikibot-fr-welcome-bot | 6e07b7e74166a47c9425816e79786308df369ac2 | [
"MIT"
] | 2 | 2019-11-07T13:46:32.000Z | 2019-11-07T14:20:53.000Z | tests/interwikidata_tests.py | notconfusing/pywikibot-fr-welcome-bot | 6e07b7e74166a47c9425816e79786308df369ac2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for scripts/interwikidata.py."""
#
# (C) Pywikibot team, 2015-2019
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, division, unicode_literals
import pywikibot
from pywikibot import Link
from scripts import interwikidata
from tests.aspect... | 27.154545 | 77 | 0.598929 |
5c45167f28eeda06bae2b86094121cec90975e6e | 3,504 | py | Python | aoc/rect.py | spossner/aoc | bee1f3e71ff302c55f723e858c82a0a07b2db0b8 | [
"MIT"
] | null | null | null | aoc/rect.py | spossner/aoc | bee1f3e71ff302c55f723e858c82a0a07b2db0b8 | [
"MIT"
] | null | null | null | aoc/rect.py | spossner/aoc | bee1f3e71ff302c55f723e858c82a0a07b2db0b8 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Union
from aoc import Point
@dataclass
class Rect:
"""
Rect class (x,y) with width and height all inclusive
"""
x: int = 0
y: int = 0
w: int = 0
h: int = 0
@classmethod
def boundary(cls, points):
boundary = None
... | 31.285714 | 200 | 0.505422 |
a92b8be0eca2a13b6714dea2f84a97dba4cbf86f | 204,058 | py | Python | elasticsearch/_async/client/ml.py | puddingDad2016/elasticsearch-py | d013e8863667341792c2187cb1b7c677b1fd7862 | [
"Apache-2.0"
] | 1 | 2022-03-29T02:46:02.000Z | 2022-03-29T02:46:02.000Z | elasticsearch/_async/client/ml.py | puddingDad2016/elasticsearch-py | d013e8863667341792c2187cb1b7c677b1fd7862 | [
"Apache-2.0"
] | null | null | null | elasticsearch/_async/client/ml.py | puddingDad2016/elasticsearch-py | d013e8863667341792c2187cb1b7c677b1fd7862 | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 45.886665 | 120 | 0.616908 |
fb03aeecd960c6634c7222c6c4c0e93a5838ceb4 | 10,014 | py | Python | lib_pypy/_sqlite3_build.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | lib_pypy/_sqlite3_build.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | lib_pypy/_sqlite3_build.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | #-*- coding: utf-8 -*-
# pysqlite2/dbapi.py: pysqlite DB-API module
#
# Copyright (C) 2007-2008 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from... | 35.013986 | 79 | 0.726383 |
1a47e79a79cc03db13322e7e2a64f5a5e8a618b3 | 16,084 | py | Python | tests/suite/test_app_protect_waf_policies.py | Taymindis/kubernetes-ingress | 28d02e476455b2fd9ac9446cdff06749642ddb0c | [
"Apache-2.0"
] | 3,803 | 2016-03-10T14:33:39.000Z | 2022-03-31T20:01:58.000Z | tests/suite/test_app_protect_waf_policies.py | Taymindis/kubernetes-ingress | 28d02e476455b2fd9ac9446cdff06749642ddb0c | [
"Apache-2.0"
] | 1,159 | 2016-03-10T15:22:26.000Z | 2022-03-31T13:20:57.000Z | tests/suite/test_app_protect_waf_policies.py | Taymindis/kubernetes-ingress | 28d02e476455b2fd9ac9446cdff06749642ddb0c | [
"Apache-2.0"
] | 1,793 | 2016-03-12T15:17:09.000Z | 2022-03-31T02:00:55.000Z | import requests, logging
import pytest, json
from settings import TEST_DATA, DEPLOYMENTS
from suite.resources_utils import (
wait_before_test,
create_items_from_yaml,
wait_before_test,
get_file_contents,
get_service_endpoint,
)
from suite.custom_resources_utils import (
create_crd_from_yaml,
... | 33.438669 | 110 | 0.619995 |
d719c4835e22dca9e4cd2ac7ac054ae2f4298906 | 5,142 | py | Python | homeassistant/components/cover/device_condition.py | SionSheevok/core | a29cc29304686d8ed3d68b0e6dedc958628783bc | [
"Apache-2.0"
] | 3 | 2022-02-18T14:03:39.000Z | 2022-03-26T20:26:55.000Z | homeassistant/components/cover/device_condition.py | SionSheevok/core | a29cc29304686d8ed3d68b0e6dedc958628783bc | [
"Apache-2.0"
] | 56 | 2020-11-23T18:10:42.000Z | 2022-03-31T06:04:00.000Z | homeassistant/components/cover/device_condition.py | SionSheevok/core | a29cc29304686d8ed3d68b0e6dedc958628783bc | [
"Apache-2.0"
] | null | null | null | """Provides device automations for Cover."""
from __future__ import annotations
import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_ABOVE,
CONF_BELOW,
CONF_CONDITION,
CONF_DEVICE_ID,
CONF_DOMAIN,
CONF_ENTITY_ID,
CONF_TYPE,
STATE_CLOSED,
STATE_CLOSING... | 32.751592 | 86 | 0.665111 |
b26b81b6cf6270634560f241287c2460788999ee | 13,836 | py | Python | BOM_to_Excel_Ducts_script.py | os4bim/revit | 6e79e37e556f92b3e4bf431e51d2337a968e4b57 | [
"MIT"
] | null | null | null | BOM_to_Excel_Ducts_script.py | os4bim/revit | 6e79e37e556f92b3e4bf431e51d2337a968e4b57 | [
"MIT"
] | null | null | null | BOM_to_Excel_Ducts_script.py | os4bim/revit | 6e79e37e556f92b3e4bf431e51d2337a968e4b57 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__doc__ = "Création automatique d'un bordereau de prix pour gaines de ventilation\nPrérequis :\n- Ouvrir une feuille Excel\n- Avoir au moins un segment, un fitting et un Accessory par cicuit"
__title__ = 'Export\nDucts'
__author__ = 'Yoann OBRY'
#BOM to Excel Ducts v1.0
import clr
im... | 31.517084 | 192 | 0.696733 |
d29b0d705002caa42d749d542ba033dda37c3d52 | 486 | py | Python | static_share/tests.py | RRMoelker/django-static-share | 3ec1cdf07de52378163f12926c866d74e81410d2 | [
"MIT"
] | 2 | 2016-04-21T17:28:57.000Z | 2016-07-16T02:01:46.000Z | static_share/tests.py | RRMoelker/django-static-share | 3ec1cdf07de52378163f12926c866d74e81410d2 | [
"MIT"
] | null | null | null | static_share/tests.py | RRMoelker/django-static-share | 3ec1cdf07de52378163f12926c866d74e81410d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.template import Template, Context, TemplateSyntaxError
from unittest import TestCase
class StaticShareTestCase(TestCase):
def test_working_tag(self):
"""
Test template tag working
Very basic, does not test parameters
"""
rendered = Template(
'{% load static_share %... | 30.375 | 92 | 0.709877 |
6542aa6993938e0378518d6b4405ee05b9e3b02d | 3,199 | py | Python | tests/test_project/test_project/settings.py | nalch/django-logging-endpoint | bdfbe39c639ab9a97d5094410b0fd5096242427f | [
"Apache-2.0"
] | 1 | 2019-12-20T09:44:52.000Z | 2019-12-20T09:44:52.000Z | tests/test_project/test_project/settings.py | nalch/django-logging-endpoint | bdfbe39c639ab9a97d5094410b0fd5096242427f | [
"Apache-2.0"
] | 3 | 2020-01-07T15:54:22.000Z | 2020-01-09T22:23:05.000Z | tests/test_project/test_project/settings.py | nalch/django-logging-endpoint | bdfbe39c639ab9a97d5094410b0fd5096242427f | [
"Apache-2.0"
] | 5 | 2019-09-23T14:39:55.000Z | 2020-01-09T22:17:36.000Z | """
Django settings for test_project project.
Generated by 'django-admin startproject' using Django 1.11.20.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
imp... | 25.388889 | 91 | 0.698968 |
a8a444748ff2bc4ff14cc5099eac96d734dc9001 | 659 | py | Python | 2017-12-21/projeto/aplicacao/migrations/0001_initial.py | dunossauro/bora_falar_de_python | 7fe92d6257a2cad1c570255bc9be069f6c8e38d3 | [
"Apache-2.0"
] | 6 | 2017-09-07T20:24:48.000Z | 2018-09-12T16:16:32.000Z | 2017-12-21/projeto/aplicacao/migrations/0001_initial.py | dunossauro/bora_falar_de_python | 7fe92d6257a2cad1c570255bc9be069f6c8e38d3 | [
"Apache-2.0"
] | 1 | 2017-12-22T01:47:12.000Z | 2017-12-24T13:59:13.000Z | 2017-12-21/projeto/aplicacao/migrations/0001_initial.py | dunossauro/bora_falar_de_python | 7fe92d6257a2cad1c570255bc9be069f6c8e38d3 | [
"Apache-2.0"
] | 6 | 2017-10-20T01:25:01.000Z | 2018-09-11T22:54:01.000Z | # Generated by Django 2.0 on 2017-12-22 00:25
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Email',
fields=[
('id', models.AutoField(auto... | 28.652174 | 173 | 0.578149 |
0ec8aaabf6283886cdf93993182ebb4c8813b112 | 38,712 | py | Python | src/test/scenarios/kusto/output/extnoflatten/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py | colawwj/autorest.az | 3606c06491830a3b78443d08f1757314c90128af | [
"MIT"
] | null | null | null | src/test/scenarios/kusto/output/extnoflatten/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py | colawwj/autorest.az | 3606c06491830a3b78443d08f1757314c90128af | [
"MIT"
] | null | null | null | src/test/scenarios/kusto/output/extnoflatten/src/kusto/azext_kusto/vendored_sdks/kusto/operations/_data_connections_operations.py | colawwj/autorest.az | 3606c06491830a3b78443d08f1757314c90128af | [
"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 ... | 50.275325 | 245 | 0.669431 |
a901abe54512cbdc60623eac0113eff7cbf11af1 | 1,994 | py | Python | pyleecan/Methods/Output/Output/plot/plot_A_time_space.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Output/Output/plot/plot_A_time_space.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Output/Output/plot/plot_A_time_space.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .....Functions.Plot.plot_A_time_space import (
plot_A_time_space as plot_A_time_space_fct,
)
def plot_A_time_space(
self,
Data_str,
is_deg=True,
is_elecorder=False,
is_spaceorder=False,
freq_max=20000,
r_max=100,
z_max=None,
is_norm=False,
unit... | 26.945946 | 82 | 0.636911 |
81808c50c7479de96bca3e8ae030d8c0b35ed5a2 | 7,322 | py | Python | Lib/bsddb/test/test_db.py | underrun/pybsddb | c9595d77af49a7107f0646e63682995e3f1d65a8 | [
"BSD-3-Clause"
] | 3 | 2016-08-25T15:37:55.000Z | 2018-06-26T02:15:24.000Z | Lib/bsddb/test/test_db.py | underrun/pybsddb | c9595d77af49a7107f0646e63682995e3f1d65a8 | [
"BSD-3-Clause"
] | null | null | null | Lib/bsddb/test/test_db.py | underrun/pybsddb | c9595d77af49a7107f0646e63682995e3f1d65a8 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2008-2014, Jesus Cea Avion <jcea@jcea.es>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of... | 36.979798 | 79 | 0.642857 |
8c5d370ab78decf9d091240d67c931a2029185b5 | 92 | py | Python | pdbparse/construct/formats/filesystem/ext3.py | ax330d/ida_pdb_loader | 051b6806810d8aaa40f973442b06c3c0e4c24131 | [
"MIT"
] | 50 | 2016-12-16T17:33:33.000Z | 2022-03-17T06:15:43.000Z | lib/honcore/lib/construct/formats/filesystem/ext3.py | keabard/KeaBot | b4c39c88a11b171738d3623a9cd234e2e4342b7d | [
"Unlicense"
] | null | null | null | lib/honcore/lib/construct/formats/filesystem/ext3.py | keabard/KeaBot | b4c39c88a11b171738d3623a9cd234e2e4342b7d | [
"Unlicense"
] | 29 | 2016-12-17T04:17:10.000Z | 2022-03-17T06:15:45.000Z | """
Extension 3 (ext3)
Used primarily for concurrent Linux systems (ext2 + journalling)
"""
| 18.4 | 64 | 0.728261 |
a6f1c8c651515074c9475b3bb6686206b58342d6 | 6,722 | py | Python | src/bt/game/view.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | 1 | 2017-06-30T00:35:05.000Z | 2017-06-30T00:35:05.000Z | src/bt/game/view.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | src/bt/game/view.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | import os
import pygame
from bt.game.app import app, Config
def split_into_lines(text, width_ok_func):
for par in text.split("\n"):
words = par.split(" ") + [""]
ind = 0
while ind < len(words) - 1:
line = ""
while width_ok_func(line) and ind < len(words):
... | 34.121827 | 81 | 0.518001 |
fb988eb39858589d2ac4254164534350144d1aff | 322 | py | Python | pipenv/vendor/shellingham/_core.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 3 | 2020-06-04T05:22:33.000Z | 2020-09-23T19:44:02.000Z | pipenv/vendor/shellingham/_core.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 9 | 2019-12-05T00:49:12.000Z | 2021-09-08T01:31:25.000Z | pipenv/vendor/shellingham/_core.py | Enzime/pipenv | d4f710be4a39e09a82a5133b7b3a277ee9bfb13a | [
"MIT"
] | 1 | 2019-06-04T10:25:26.000Z | 2019-06-04T10:25:26.000Z | SHELL_NAMES = {
'sh', 'bash', 'dash', # Bourne.
'csh', 'tcsh', # C.
'ksh', 'zsh', 'fish', # Common alternatives.
'cmd', 'powershell', 'pwsh', # Microsoft.
'elvish', 'xonsh', # More exotic.
}
class ShellDetectionFailure(EnvironmentError):
pas... | 26.833333 | 58 | 0.484472 |
a0c7220265209db3b99c92f4b63dbe79f1cc8ded | 155,684 | py | Python | python/tvm/relay/frontend/tflite.py | hbrunie/tvm_ttile | 35de098ef637b501b96a8a4455d8deae052e0268 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/relay/frontend/tflite.py | hbrunie/tvm_ttile | 35de098ef637b501b96a8a4455d8deae052e0268 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2019-08-16T20:37:41.000Z | 2019-08-16T20:38:15.000Z | python/tvm/relay/frontend/tflite.py | hbrunie/tvm_ttile | 35de098ef637b501b96a8a4455d8deae052e0268 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.963342 | 100 | 0.638055 |
43929b355e6b128287b4f77ed04b0d5f263db719 | 228,591 | py | Python | toolchain/riscv/Linux/python/lib/python3.7/test/test_socket.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 120 | 2019-11-12T19:22:44.000Z | 2020-05-17T12:17:25.000Z | toolchain/riscv/Linux/python/lib/python3.7/test/test_socket.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 19 | 2021-02-18T05:59:03.000Z | 2022-01-13T01:00:52.000Z | toolchain/riscv/Linux/python/lib/python3.7/test/test_socket.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 18 | 2021-02-22T13:32:56.000Z | 2022-01-22T12:38:29.000Z | import unittest
from test import support
import errno
import io
import itertools
import socket
import select
import tempfile
import time
import traceback
import queue
import sys
import os
import array
import contextlib
from weakref import proxy
import signal
import math
import pickle
import struct
import random
import... | 37.802381 | 117 | 0.622518 |
6e92e093c274607fea6b11675930ac8d2e2e4f9b | 1,307 | py | Python | a2_KMedoids_Cluster_Alg/test.py | h2222/dddm-assignment | 627ca04a202dae90f3c4a394b61f2b3d8f91dfb9 | [
"MIT"
] | 1 | 2021-08-03T08:29:21.000Z | 2021-08-03T08:29:21.000Z | a2_KMedoids_Cluster_Alg/test.py | h2222/dddm-assignment | 627ca04a202dae90f3c4a394b61f2b3d8f91dfb9 | [
"MIT"
] | null | null | null | a2_KMedoids_Cluster_Alg/test.py | h2222/dddm-assignment | 627ca04a202dae90f3c4a394b61f2b3d8f91dfb9 | [
"MIT"
] | null | null | null | # coding=utf-8
def get_ave(arrt_ls, pk_len_ls):
total_arrt = 0
for i in range(len(arrt_ls) - 1, 0, -1):
total_arrt += (arrt_ls[i] - arrt_ls[i-1])
ave_arrt = total_arrt / (len(arrt_ls) - 1 + 1e-10)
ave_pk_len = sum(pk_len_ls) / (len(pk_len_ls) + 1e-10)
return ave_arrt, ave_pk_len
def test... | 29.044444 | 73 | 0.543994 |
3843620021938b4cb7dbcd7122e901eaf04428c8 | 4,207 | py | Python | src/lib/trains/exdet.py | papkov/CenterNet | 91fe229756881fe8f77697b73407e2337b6fc65e | [
"MIT"
] | null | null | null | src/lib/trains/exdet.py | papkov/CenterNet | 91fe229756881fe8f77697b73407e2337b6fc65e | [
"MIT"
] | null | null | null | src/lib/trains/exdet.py | papkov/CenterNet | 91fe229756881fe8f77697b73407e2337b6fc65e | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import sys
import time
import cv2
import numpy as np
import torch
from utils.debugger import Debugger
from models.data_parallel import DataParallel
from models.decode import agnex_ct_decode, exct_decode
from models.losses import FocalLoss, RegL1Loss
fr... | 38.59633 | 85 | 0.519135 |
0b07519dcad3c00c8ae209c61b384443618ff01c | 667 | py | Python | server/jobs/blingfire_helper.py | maugch/LessMessyNLP | 2f4751ad2a3898618afb891c4af564bd1e3c5c01 | [
"MIT"
] | null | null | null | server/jobs/blingfire_helper.py | maugch/LessMessyNLP | 2f4751ad2a3898618afb891c4af564bd1e3c5c01 | [
"MIT"
] | null | null | null | server/jobs/blingfire_helper.py | maugch/LessMessyNLP | 2f4751ad2a3898618afb891c4af564bd1e3c5c01 | [
"MIT"
] | null | null | null | #from blingfire import *
#TODO: understand how blingfire can be used
# 1. doesn't work in cygwin
# 2. doesn't work in virtualenv windows x64
# 3. ...
'''
def pre(jsonObject,operation,filepath,which):
return True,''
def exe(app,jsonObject,operation,filepath,which):
job = app.task_queue.enqueue(s... | 25.653846 | 55 | 0.656672 |
1baf943ec9d3bc9c300e01742dcb6f55860303ca | 538 | py | Python | allies/migrations/0002_auto_20201215_1421.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 4 | 2022-02-16T10:19:11.000Z | 2022-03-17T03:34:26.000Z | allies/migrations/0002_auto_20201215_1421.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 1 | 2022-02-17T14:02:31.000Z | 2022-03-31T03:56:42.000Z | allies/migrations/0002_auto_20201215_1421.py | kevincornish/HeckGuide | eb974d6b589908f5fc2308d41032a48941cc3d21 | [
"MIT"
] | 3 | 2022-02-17T06:13:52.000Z | 2022-03-23T21:37:21.000Z | # Generated by Django 3.1 on 2020-12-15 19:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('allies', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='currentally',
name='avatar_id',
... | 22.416667 | 49 | 0.574349 |
b9c8b5ee7c3b74c0e8755ea02b2a0a7006db73cc | 23,871 | py | Python | test_program_for_ProgramOfTimeScheduledEvents_ReubenPython2and3Class.py | Reuben-Brewer/ProgramOfTimeScheduledEvents_ReubenPython2and3Class | 9321ad94f5aa0f7c4ffa3c9512d1d959ac79b30d | [
"Apache-2.0"
] | null | null | null | test_program_for_ProgramOfTimeScheduledEvents_ReubenPython2and3Class.py | Reuben-Brewer/ProgramOfTimeScheduledEvents_ReubenPython2and3Class | 9321ad94f5aa0f7c4ffa3c9512d1d959ac79b30d | [
"Apache-2.0"
] | null | null | null | test_program_for_ProgramOfTimeScheduledEvents_ReubenPython2and3Class.py | Reuben-Brewer/ProgramOfTimeScheduledEvents_ReubenPython2and3Class | 9321ad94f5aa0f7c4ffa3c9512d1d959ac79b30d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Reuben Brewer, Ph.D.
reuben.brewer@gmail.com
www.reubotics.com
Apache 2 License
Software Revision D, 03/13/2022
Verified working on: Python 2.7, 3.8 for Windows 8.1, 10 64-bit and Raspberry Pi Buster (no Mac testing yet).
'''
__author__ = 'reuben.brewer'
from ProgramOfTim... | 48.030181 | 194 | 0.443341 |
2fd1288e4609e48d47db922e4926b06b5e6997fe | 934 | py | Python | 11_Listas/87.py | TheCarvalho/Curso-Em-Video-Python | 8bd5128023ddf8b0f59eab46463c95e47569da73 | [
"Unlicense"
] | null | null | null | 11_Listas/87.py | TheCarvalho/Curso-Em-Video-Python | 8bd5128023ddf8b0f59eab46463c95e47569da73 | [
"Unlicense"
] | null | null | null | 11_Listas/87.py | TheCarvalho/Curso-Em-Video-Python | 8bd5128023ddf8b0f59eab46463c95e47569da73 | [
"Unlicense"
] | null | null | null |
# * Exercício Python 087: Aprimore o desafio anterior, mostrando no final:
# * A) A soma de todos os valores pares digitados.
# * B) A soma dos valores da terceira coluna
# * C) O maior valor da segunda linha
soma_terceira_coluna = soma_pares = 0
matriz = [
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
]
for i in ran... | 26.685714 | 74 | 0.594218 |
51279d6de06fc1611141e6da5b57a3293f696dec | 1,418 | py | Python | tests/st/ops/ascend/test_tbe_ops/test_split.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | 7 | 2020-05-24T03:19:26.000Z | 2020-05-24T03:20:00.000Z | tests/st/ops/ascend/test_tbe_ops/test_split.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | null | null | null | tests/st/ops/ascend/test_tbe_ops/test_split.py | ythlml/mindspore | 028ae212624164044cfaa84f347fc502cb7fcb0f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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... | 30.170213 | 78 | 0.684767 |
0952c1e867966892b0328d8d1089f48eee0c3f8a | 1,850 | py | Python | tests/test_escape_game.py | jpochetedmead/Flask-Adventure-Game | 43fe7d01e9c5df0e9939876bff7eb0daba7865fc | [
"MIT"
] | null | null | null | tests/test_escape_game.py | jpochetedmead/Flask-Adventure-Game | 43fe7d01e9c5df0e9939876bff7eb0daba7865fc | [
"MIT"
] | null | null | null | tests/test_escape_game.py | jpochetedmead/Flask-Adventure-Game | 43fe7d01e9c5df0e9939876bff7eb0daba7865fc | [
"MIT"
] | null | null | null | from escape_game import create_app
def test_import():
assert create_app
def test_config():
assert not create_app().testing
assert create_app({'TESTING': True}).testing
def test_index(client):
response = client.get('/')
assert response.status_code == 200
assert b'In this game your goal is to e... | 27.61194 | 129 | 0.694595 |
f3afa9ddfd67b4202389dc17d075b4a06c79ccc2 | 1,096 | py | Python | backend/users/views.py | crowdbotics-apps/location-tracker-32987 | 3ef0ce3f3f1907c91df60cd34c08c2ec0a476766 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/views.py | crowdbotics-apps/location-tracker-32987 | 3ef0ce3f3f1907c91df60cd34c08c2ec0a476766 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/views.py | crowdbotics-apps/location-tracker-32987 | 3ef0ce3f3f1907c91df60cd34c08c2ec0a476766 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from .models import User
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import (
UpdateView,
CreateView,
RedirectView,
ListView,
DetailView,
)
User = get_user_model()
class UserDeta... | 21.92 | 87 | 0.740876 |
9d55b93d27a04673878686228f540d7d264576be | 448 | py | Python | Paradigmas Python/aula09/exercicio2.py | Neto002/Estacio | 0c89cefb4d68a1054aab881099c6191cf8000392 | [
"MIT"
] | null | null | null | Paradigmas Python/aula09/exercicio2.py | Neto002/Estacio | 0c89cefb4d68a1054aab881099c6191cf8000392 | [
"MIT"
] | null | null | null | Paradigmas Python/aula09/exercicio2.py | Neto002/Estacio | 0c89cefb4d68a1054aab881099c6191cf8000392 | [
"MIT"
] | null | null | null | '''class Pessoa(object):
def __init__(self, nome, idade, peso):
self.nome = nome
self.idade = idade
self.peso = peso
def andar(self):
print('anda')
pessoa1 = Pessoa("Juliana", 23, 75)
pessoa2 = Pessoa("Carlos", 39, 72)
print(pessoa1.nome)
pessoa1.andar()
def fatorial(n):
i... | 19.478261 | 42 | 0.553571 |
6819175a570a492fafd0b93d61879a576be744f8 | 1,907 | py | Python | utils/text_to_speech.py | yonghankim/AI-Speaker | abd87dd85a68e5cf94edea9c69f7b647789af2ce | [
"MIT"
] | 3 | 2018-05-31T05:12:44.000Z | 2019-05-24T16:33:00.000Z | utils/text_to_speech.py | yonghankim/AI-Speaker | abd87dd85a68e5cf94edea9c69f7b647789af2ce | [
"MIT"
] | null | null | null | utils/text_to_speech.py | yonghankim/AI-Speaker | abd87dd85a68e5cf94edea9c69f7b647789af2ce | [
"MIT"
] | 6 | 2018-08-03T03:48:33.000Z | 2020-06-07T10:45:38.000Z | # -*- coding:utf-8 -*-
import os
import urllib.request
from gtts import gTTS
from boto3 import client
class TextToSpeech:
def __init__(self):
self.output_gtts = "output_gtts.mp3" # gTTS
self.output_ntts = "output_ntts.mp3" # Naver-Clova
self.output_atts = "output_atts.mp3" # AWS... | 30.269841 | 77 | 0.606712 |
473285385c441b9a9a7faabcaafe612f050f441d | 3,669 | py | Python | bindings/python/ensmallen/datasets/string/candidatusspechtbacteriabacteriumrifcsplowo212full3822.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/candidatusspechtbacteriabacteriumrifcsplowo212full3822.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/candidatusspechtbacteriabacteriumrifcsplowo212full3822.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Candidatus Spechtbacteria bacterium RIFCSPLOWO2_12_FULL_38_22.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
... | 34.942857 | 223 | 0.693377 |
c33f49c918bbfc7bd9e34d845d3c26bdd167093a | 3,186 | py | Python | backend/lambdas/tasks/work_query_queue.py | linji0801/amazon-s3-find-and-forget | 9005fded8176faaee1e12cc42dc57f7d7b861a0d | [
"Apache-2.0"
] | null | null | null | backend/lambdas/tasks/work_query_queue.py | linji0801/amazon-s3-find-and-forget | 9005fded8176faaee1e12cc42dc57f7d7b861a0d | [
"Apache-2.0"
] | null | null | null | backend/lambdas/tasks/work_query_queue.py | linji0801/amazon-s3-find-and-forget | 9005fded8176faaee1e12cc42dc57f7d7b861a0d | [
"Apache-2.0"
] | null | null | null | import json
import os
import boto3
from decorators import with_logging, s3_state_store
from boto_utils import read_queue
queue_url = os.getenv("QueueUrl")
state_machine_arn = os.getenv("StateMachineArn")
sqs = boto3.resource("sqs")
queue = sqs.Queue(queue_url)
sf_client = boto3.client("stepfunctions")
@with_logging... | 34.258065 | 88 | 0.648462 |
086c586bd9292d3de4933af2d0ab99ad88efafa2 | 74 | py | Python | PDA/extra_assignments/7.1. Lists_ Even indices/solution/main.py | EMbeDS-education/StatsAndComputing20212022 | 971e418882b206a1b5606d15d222cef1a5a04834 | [
"MIT"
] | 2 | 2022-02-24T09:35:15.000Z | 2022-03-14T20:34:33.000Z | PDA/extra_assignments/7.1. Lists_ Even indices/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | null | null | null | PDA/extra_assignments/7.1. Lists_ Even indices/solution/main.py | GeorgiosArg/StatsAndComputing20212022 | 798d39af6aa5ef5eef49d5d6f43191351e8a49f3 | [
"MIT"
] | 2 | 2022-03-15T21:40:35.000Z | 2022-03-26T14:51:31.000Z | a = [int(s) for s in input().split()]
for i in a[::2]:
print(i, sep=' ') | 24.666667 | 37 | 0.513514 |
c1b860fcc4e337300041fae5c19d8d7fe025dc23 | 1,038 | py | Python | myoperator-{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py | myoperator/cookiecutter-pypackage | a8d6b75de55b388705b0e2e6e7ef4dc53faac66b | [
"BSD-3-Clause"
] | null | null | null | myoperator-{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py | myoperator/cookiecutter-pypackage | a8d6b75de55b388705b0e2e6e7ef4dc53faac66b | [
"BSD-3-Clause"
] | null | null | null | myoperator-{{cookiecutter.project_slug}}/tests/test_{{cookiecutter.project_slug}}.py | myoperator/cookiecutter-pypackage | a8d6b75de55b388705b0e2e6e7ef4dc53faac66b | [
"BSD-3-Clause"
] | 1 | 2020-01-24T10:27:10.000Z | 2020-01-24T10:27:10.000Z | #!/usr/bin/env python
"""Tests for `{{ cookiecutter.project_slug }}` package."""
{% if cookiecutter.use_pytest == 'y' -%}
import pytest
{% else %}
import unittest
{%- endif %}
from myoperator.{{ cookiecutter.project_slug }} import {{ cookiecutter.project_slug }}
{%- if cookiecutter.use_pytest == 'y' %}
@pytest.fi... | 24.714286 | 86 | 0.656069 |
c1d2ca873abe6ddc9190160eb74a50c3e1095589 | 5,770 | py | Python | sdk/python/pulumi_azure/datalake/analytics_firewall_rule.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/datalake/analytics_firewall_rule.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/datalake/analytics_firewall_rule.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Analyt... | 50.614035 | 199 | 0.692894 |
015708e73f44ef240a0f2e51f01ba32a6ec53c2f | 3,053 | py | Python | users/forms.py | francoxr/Instagram-Django | e9e06483f43468968bd0cb0a72ad0d6706127848 | [
"MIT"
] | null | null | null | users/forms.py | francoxr/Instagram-Django | e9e06483f43468968bd0cb0a72ad0d6706127848 | [
"MIT"
] | null | null | null | users/forms.py | francoxr/Instagram-Django | e9e06483f43468968bd0cb0a72ad0d6706127848 | [
"MIT"
] | null | null | null | """User Forms."""
# Django
from users.models import Profile
from django import forms
from django.contrib.auth.models import User
class SignupForm(forms.Form):
"""Signup form."""
username = forms.CharField(
min_length=4,
max_length=50,
widget = forms.TextInput(attrs={'placeholder':'Nom... | 32.827957 | 117 | 0.626924 |
1a5115fed301ed46bee59874e1c8d6d8e6a52c69 | 2,308 | py | Python | test/deeptime/test_scikit_time.py | znicolaou/pysindy | f77e85f895da1d3ed98f9a6d84327d984f5d957c | [
"MIT"
] | 1 | 2021-12-06T19:20:17.000Z | 2021-12-06T19:20:17.000Z | test/deeptime/test_scikit_time.py | znicolaou/pysindy | f77e85f895da1d3ed98f9a6d84327d984f5d957c | [
"MIT"
] | 3 | 2019-12-17T01:59:55.000Z | 2020-01-13T17:18:22.000Z | test/deeptime/test_scikit_time.py | znicolaou/pysindy | f77e85f895da1d3ed98f9a6d84327d984f5d957c | [
"MIT"
] | 2 | 2019-12-05T13:08:41.000Z | 2020-01-07T20:30:04.000Z | import pytest
from numpy.testing import assert_allclose
from sklearn import __version__
from sklearn.exceptions import NotFittedError
from pysindy import FourierLibrary
from pysindy import SINDy
from pysindy import STLSQ
from pysindy.deeptime import SINDyEstimator
from pysindy.deeptime import SINDyModel
def test_est... | 27.47619 | 71 | 0.736568 |
27415a1bacdbd97663dbd6fb26e2cc4ccf06a874 | 29,510 | py | Python | pandas/core/groupby/ops.py | angelaambroz/pandas | da3d0d92ee7d09011ab893871694cc0d84c66f02 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/groupby/ops.py | angelaambroz/pandas | da3d0d92ee7d09011ab893871694cc0d84c66f02 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/groupby/ops.py | angelaambroz/pandas | da3d0d92ee7d09011ab893871694cc0d84c66f02 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Provide classes to perform the groupby aggregate operations.
These are not exposed to the user and provide implementations of the grouping
operations, primarily in cython. These classes (BaseGrouper and BinGrouper)
are contained *in* the SeriesGroupBy and DataFrameGroupBy objects.
"""
import collections
import n... | 31.360255 | 88 | 0.581769 |
27710c21bb781e85f73280fc365d2b57ad88a806 | 604 | py | Python | day1/main.py | en0/AoC2018 | ccf66db4a32327e29db1a0e6fa7011ded2fedf6e | [
"Unlicense"
] | null | null | null | day1/main.py | en0/AoC2018 | ccf66db4a32327e29db1a0e6fa7011ded2fedf6e | [
"Unlicense"
] | null | null | null | day1/main.py | en0/AoC2018 | ccf66db4a32327e29db1a0e6fa7011ded2fedf6e | [
"Unlicense"
] | null | null | null | def main():
print("Part One:", sum(lines()))
print("Part Two:", search_for_duplicate())
def search_for_duplicate():
state = 0
state_seen = set([state])
while True:
for f in lines():
state = state + f
if state in state_seen:
return state
s... | 19.483871 | 46 | 0.541391 |
7e267e23e6e631b80636baf8f2138081306fd76e | 746 | py | Python | examples/create_user.py | ZaibanAli/eospy | c29c3ca413e9d940dff756dc870daea329ad56fe | [
"MIT"
] | 150 | 2018-06-01T19:27:02.000Z | 2022-03-26T19:13:33.000Z | examples/create_user.py | ZaibanAli/eospy | c29c3ca413e9d940dff756dc870daea329ad56fe | [
"MIT"
] | 53 | 2018-07-13T21:02:39.000Z | 2021-08-23T19:14:32.000Z | examples/create_user.py | ZaibanAli/eospy | c29c3ca413e9d940dff756dc870daea329ad56fe | [
"MIT"
] | 74 | 2018-09-05T15:06:34.000Z | 2022-02-06T23:24:02.000Z | from eospy.cleos import Cleos
ce = Cleos(url='http://api.pennstation.eosnewyork.io:7001')
# use a string or EOSKey for push_transaction
key = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
# use EOSKey:
# import eospy.keys
# key = eospy.keys.EOSKey('5HuaTWKeGzZhqyzuzFAjjFjPnnnjdgcp562oBSS8Wv1qgDSkR2W')
resp =... | 46.625 | 168 | 0.670241 |
6dc98b39afab644b4475c6ac9fdc8a1a89bfaacd | 14,013 | py | Python | dnn_cool/synthetic_dataset.py | hristo-vrigazov/dnn.cool | 5936cfdb0a3dd91582c9025ad844859fa8341381 | [
"MIT"
] | 51 | 2020-08-25T03:55:19.000Z | 2022-02-03T19:48:58.000Z | dnn_cool/synthetic_dataset.py | hristo-vrigazov/dnn.cool | 5936cfdb0a3dd91582c9025ad844859fa8341381 | [
"MIT"
] | 1 | 2020-12-18T08:50:04.000Z | 2020-12-18T10:14:35.000Z | dnn_cool/synthetic_dataset.py | hristo-vrigazov/dnn.cool | 5936cfdb0a3dd91582c9025ad844859fa8341381 | [
"MIT"
] | 1 | 2020-08-31T08:41:41.000Z | 2020-08-31T08:41:41.000Z | from collections import OrderedDict
from functools import partial
import cv2
from torch.utils.data import DataLoader, Subset
from dnn_cool.converters import TypeGuesser, ValuesConverter, TaskConverter, Converters
from dnn_cool.tasks import *
from dnn_cool.utils import split_dataset
from dnn_cool.value_converters impo... | 38.078804 | 111 | 0.642403 |
62f81186373bf1dd973d1d87cf5ba4de93a7e9a2 | 22,577 | py | Python | udel_radio.py | bheberlein/hypro | 9c0049a613148ac05f11230b1e5350cf8c3f7ab2 | [
"CC0-1.0"
] | 3 | 2021-05-11T01:20:33.000Z | 2022-03-03T12:41:52.000Z | udel_radio.py | bheberlein/hypro | 9c0049a613148ac05f11230b1e5350cf8c3f7ab2 | [
"CC0-1.0"
] | null | null | null | udel_radio.py | bheberlein/hypro | 9c0049a613148ac05f11230b1e5350cf8c3f7ab2 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Functions to do radiometric calibrations.
@author: Nanfeng Liu (nliu58@wisc.edu)
"""
import os, numpy as np, glob, argparse
def make_radio_cali_file_Hyspex(radio_cali_file, dn_image_file, setting_file):
""" Make a Hyspex radiometric calibration file.
... | 47.035417 | 188 | 0.593834 |
b78024578bb92d8b3442340339894dfe1fe08481 | 1,209 | py | Python | docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py | dolfinus/fastapi | 8b8341402484438ee16b3cbadbc1e4fd8ed8a495 | [
"MIT"
] | null | null | null | docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py | dolfinus/fastapi | 8b8341402484438ee16b3cbadbc1e4fd8ed8a495 | [
"MIT"
] | null | null | null | docs_src/sql_databases/sql_app_py310/tests/test_sql_app.py | dolfinus/fastapi | 8b8341402484438ee16b3cbadbc1e4fd8ed8a495 | [
"MIT"
] | null | null | null | from fastapi.testclient import TestClient
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from ..database import Base
from ..main import app, get_db
SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
engine = create_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": Fal... | 25.1875 | 83 | 0.699752 |
47fb9e061b35d2cfe0d610475ba37cbef1e8c2ce | 14,391 | py | Python | site-packages/novaclient/tests/functional/v2/test_servers.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | site-packages/novaclient/tests/functional/v2/test_servers.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | site-packages/novaclient/tests/functional/v2/test_servers.py | hariza17/freezer_libraries | e0bd890eba5e7438976fb3b4d66c41c128bab790 | [
"PSF-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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 ... | 41.592486 | 79 | 0.606907 |
f66de4aef57ec9a3784ed0fc60e44afb4d673ad0 | 6,094 | py | Python | sensor.py | TG-Coder101/RPi-Temperature-Sensor | 2d3dcbff0d3e25ccc7ea44805272843081fb2d21 | [
"MIT"
] | null | null | null | sensor.py | TG-Coder101/RPi-Temperature-Sensor | 2d3dcbff0d3e25ccc7ea44805272843081fb2d21 | [
"MIT"
] | null | null | null | sensor.py | TG-Coder101/RPi-Temperature-Sensor | 2d3dcbff0d3e25ccc7ea44805272843081fb2d21 | [
"MIT"
] | null | null | null | try:
#module imports
import os
import glob
import argparse
import time
#other imports
import adafruit_ssd1306
import board
import busio
import boto3
import digitalio
import pyfiglet
import RPi.GPIO as GPIO
from PIL import Image, ImageDraw, ImageFont
from termcolor import colored, cprint
from pyfiglet ... | 24.97541 | 111 | 0.675747 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.