hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k โ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 โ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 โ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
06dad1410e2a02e151efb9ec9b2aee561ebc438e | 1,784 | py | Python | b3j0f/aop/__init__.py | b3j0f/aop | 22b9ba335d103edd929c25eb6dbb94037d3615bc | [
"MIT"
] | 6 | 2015-03-17T12:42:32.000Z | 2020-04-19T04:03:54.000Z | b3j0f/aop/__init__.py | b3j0f/aop | 22b9ba335d103edd929c25eb6dbb94037d3615bc | [
"MIT"
] | 3 | 2016-01-25T13:13:29.000Z | 2020-04-19T21:23:17.000Z | b3j0f/aop/__init__.py | b3j0f/aop | 22b9ba335d103edd929c25eb6dbb94037d3615bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# --------------------------------------------------------------------
# The MIT License (MIT)
#
#ย Copyright (c) 2014 Jonathan Labรฉjof <jonathan.labejof@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fi... | 42.47619 | 79 | 0.700673 |
176795ef52d33e3324215277414451113e11980a | 800 | py | Python | 04-Date.py | tgjeon/Zero-to-Hero-Python | cdb8dd5282152110d25262254741302d2d24ec6d | [
"MIT"
] | 3 | 2016-09-20T15:50:30.000Z | 2019-05-14T03:46:53.000Z | 04-Date.py | tgjeon/Zero-to-Hero-Python | cdb8dd5282152110d25262254741302d2d24ec6d | [
"MIT"
] | null | null | null | 04-Date.py | tgjeon/Zero-to-Hero-Python | cdb8dd5282152110d25262254741302d2d24ec6d | [
"MIT"
] | 2 | 2018-06-08T15:20:00.000Z | 2019-05-14T03:46:53.000Z | # -*- coding: utf8 -*-
"""
04. ๋ ์ง๋ฅผ ์ฌ์ฉํด๋ด
์๋ค. (์์์๊ฐ: 16๋ถ ๊ฐ์)
- Original version (MVA): https://mva.microsoft.com/ko/training-courses/python%EC%9D%84-%EC%82%AC%EC%9A%A9%ED%95%9C-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%EC%86%8C%EA%B0%9C-8360
- Compact version (Youtube): https://youtu.be/emY34tSKXc4?t=1h17m24s
- ์ฐธ๊ณ :... | 15.09434 | 185 | 0.65125 |
f1e7bd5562a319d29630285960901b0d24e6544a | 304 | py | Python | flask_app/app/api/__init__.py | ruteckimikolaj/demo-gatsby-flask-scraper | 09490bac49147760a1301012ffa2619e1c690c78 | [
"MIT"
] | null | null | null | flask_app/app/api/__init__.py | ruteckimikolaj/demo-gatsby-flask-scraper | 09490bac49147760a1301012ffa2619e1c690c78 | [
"MIT"
] | 1 | 2021-03-31T19:32:20.000Z | 2021-03-31T19:32:20.000Z | flask_app/app/api/__init__.py | ruteckimikolaj/demo-gatsby-flask-scraper | 09490bac49147760a1301012ffa2619e1c690c78 | [
"MIT"
] | null | null | null |
from flask import Blueprint, Config, Flask
from app.api import receiver, sender, tokens
bp = Blueprint('api', __name__)
def create_app(config_class=Config):
app = Flask(__name__)
# ...
from app.api import bp as api_bp
app.register_blueprint(api_bp, url_prefix='/api')
| 20.266667 | 54 | 0.677632 |
32d480e9c81c44a68a02b8206991f417add1fd2d | 10,430 | py | Python | accelbyte_py_sdk/api/platform/operations/reward/query_rewards.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/platform/operations/reward/query_rewards.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/platform/operations/reward/query_rewards.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 31.415663 | 171 | 0.598274 |
0a65278c2b6ccec0553194d6fea1d096e7717cbd | 964 | py | Python | idb/cli/commands/location.py | doc22940/idb | 8eb2d82c6b560a5c243986da28124245284e65e9 | [
"MIT"
] | null | null | null | idb/cli/commands/location.py | doc22940/idb | 8eb2d82c6b560a5c243986da28124245284e65e9 | [
"MIT"
] | 5 | 2021-09-02T15:20:04.000Z | 2022-02-27T09:50:05.000Z | idb/cli/commands/location.py | Rezduan83/idb | a43b499302a37ada164cd183b9edb0e3a4699a1d | [
"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.
from argparse import ArgumentParser, Namespace
from idb.cli.commands.base import CompanionCommand
from idb.common.type... | 33.241379 | 80 | 0.724066 |
ede8136b2f9e57638aba43ef11f5a892e0f316a3 | 1,822 | py | Python | spack/packages/dla-future/package.py | msimberg/DLA-Future | 4b15374e234a0c30369ce6ae35b0816e2a19d687 | [
"BSD-3-Clause"
] | null | null | null | spack/packages/dla-future/package.py | msimberg/DLA-Future | 4b15374e234a0c30369ce6ae35b0816e2a19d687 | [
"BSD-3-Clause"
] | null | null | null | spack/packages/dla-future/package.py | msimberg/DLA-Future | 4b15374e234a0c30369ce6ae35b0816e2a19d687 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class DlaFuture(CMakePackage, CudaPackage):
"""DLA-Future library: Distributed Linear Algebra wi... | 31.413793 | 90 | 0.617453 |
9066833649dcf82854eb6f0ac4157768cc1e26df | 8,173 | py | Python | scripts/generate_synthetic_data.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | scripts/generate_synthetic_data.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | scripts/generate_synthetic_data.py | JonasFrey96/RPOSE | 7da77499ab777ce7ee37b731541982870da8d40b | [
"BSD-3-Clause"
] | null | null | null | import pickle
import numpy as np
import scipy.io as scio
import os
import numpy as np
import os
from scipy.spatial.transform import Rotation as R
import random
from math import radians
import time
from pathlib import Path
import scipy
import imageio
# RENDERING
from trimesh import collision
from pyrender.constants ... | 32.05098 | 105 | 0.589135 |
ee4eb29e742b47b4208b1a3d3744b448dd472c48 | 233 | py | Python | laboratorios/quiz1.py | ncenteno31/uip-prog3 | 90fc05cd7ef1c89fbadb54dc68c917f40a8cae14 | [
"MIT"
] | null | null | null | laboratorios/quiz1.py | ncenteno31/uip-prog3 | 90fc05cd7ef1c89fbadb54dc68c917f40a8cae14 | [
"MIT"
] | null | null | null | laboratorios/quiz1.py | ncenteno31/uip-prog3 | 90fc05cd7ef1c89fbadb54dc68c917f40a8cae14 | [
"MIT"
] | null | null | null | # Clase 3 QUIZ
# Noel Centeno 8-840-2233
# Calcular el Area y el Perimetro de un Rectangulo.
base= 5
altura= 7
metro= 100
pulgadas= 2.54
area = base * altura
perimetro = base*2 + altura*2
print (str (area))
print (str (perimetro))
| 17.923077 | 51 | 0.703863 |
9bf2041d4955c00801be5a56ccc3cc8413796fe8 | 7,757 | py | Python | Assignment 2/super_baseline_tagger.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | 1 | 2020-05-10T04:08:20.000Z | 2020-05-10T04:08:20.000Z | Assignment 2/super_baseline_tagger.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | null | null | null | Assignment 2/super_baseline_tagger.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | null | null | null | import random
import sys
import shutil
import glob
import os
import subprocess
max_accuracy = 0
train_files = []
test_files = []
max_acc_test = []
def data_splitter():
global train_files, test_files
k = 4
os.chdir("all")
shutil.rmtree("test")
shutil.rmtree("train")
os.mkdir("train")
o... | 39.375635 | 102 | 0.592239 |
f06c83e6768c2bfa7588f77dc40f4f111cbff866 | 1,170 | py | Python | src/foolscap/test/test_eventual.py | jaraco/foolscap | 845bea550447991b194ef884713a7b3be4b4a6c2 | [
"MIT"
] | 29 | 2015-01-05T19:37:27.000Z | 2021-03-03T21:59:13.000Z | src/foolscap/test/test_eventual.py | jaraco/foolscap | 845bea550447991b194ef884713a7b3be4b4a6c2 | [
"MIT"
] | 65 | 2015-03-01T03:18:03.000Z | 2022-03-24T16:00:48.000Z | src/foolscap/test/test_eventual.py | jaraco/foolscap | 845bea550447991b194ef884713a7b3be4b4a6c2 | [
"MIT"
] | 22 | 2015-01-28T10:51:46.000Z | 2022-01-26T07:56:25.000Z |
from twisted.trial import unittest
from foolscap.eventual import eventually, fireEventually, flushEventualQueue
class TestEventual(unittest.TestCase):
def tearDown(self):
return flushEventualQueue()
def testSend(self):
results = []
eventually(results.append, 1)
self.assertFa... | 27.209302 | 76 | 0.610256 |
1ccd41224b74967e7188facf4c21964dfa810e03 | 965 | py | Python | time_audit/scratch.py | mweiden/productivity-tools | b7026908ff5ea8db001884dd9abbf8316c06c5a7 | [
"MIT"
] | null | null | null | time_audit/scratch.py | mweiden/productivity-tools | b7026908ff5ea8db001884dd9abbf8316c06c5a7 | [
"MIT"
] | null | null | null | time_audit/scratch.py | mweiden/productivity-tools | b7026908ff5ea8db001884dd9abbf8316c06c5a7 | [
"MIT"
] | null | null | null | while ind_transitions < (len(transitions) - 1):
print(
f"day_bucket[{ind_day_buckets}]={day_buckets[ind_day_buckets]}, transitions[{ind_transitions}]={transitions[ind_transitions][0].isoformat()}"
)
if transitions[ind_transitions + 1][0] < day_buckets[ind_day_buckets + 1]:
print("advance tr... | 30.15625 | 149 | 0.642487 |
a28e20a636ce23665e010908ffbc6c5f914856a4 | 21,272 | py | Python | asv_bench/benchmarks/frame_methods.py | rendner/pandas | 47494a48edf25d5a49b0fb5b896b454c15c83595 | [
"BSD-3-Clause"
] | 1 | 2019-11-01T08:44:40.000Z | 2019-11-01T08:44:40.000Z | asv_bench/benchmarks/frame_methods.py | sdrees/pandas | bef454f0893efe2fa5e49317635f89c03467d16e | [
"BSD-3-Clause"
] | null | null | null | asv_bench/benchmarks/frame_methods.py | sdrees/pandas | bef454f0893efe2fa5e49317635f89c03467d16e | [
"BSD-3-Clause"
] | null | null | null | import string
import warnings
import numpy as np
from pandas import (
DataFrame,
MultiIndex,
NaT,
Series,
date_range,
isnull,
period_range,
timedelta_range,
)
from .pandas_vb_common import tm
class GetNumericData:
def setup(self):
self.df = DataFrame(np.random.randn(1000... | 27.590143 | 88 | 0.588943 |
bf4687e6da8e97cd946723376014a59c0d6c5875 | 2,173 | py | Python | examples/example5.py | jvansteirteghem/twunnel3 | 717ad40e114cfe63fa366465643ecb9f16ea6df9 | [
"MIT"
] | 13 | 2015-01-01T09:41:57.000Z | 2019-09-25T18:02:22.000Z | examples/example5.py | jvansteirteghem/twunnel3 | 717ad40e114cfe63fa366465643ecb9f16ea6df9 | [
"MIT"
] | 3 | 2015-08-30T06:59:05.000Z | 2019-05-16T11:23:12.000Z | examples/example5.py | jvansteirteghem/twunnel3 | 717ad40e114cfe63fa366465643ecb9f16ea6df9 | [
"MIT"
] | 4 | 2015-06-11T13:10:21.000Z | 2019-11-20T12:00:29.000Z | import sys
import os
sys.path.insert(0, os.path.abspath(".."))
import asyncio
from twunnel3 import local_proxy_server, logger
from examples import example
configuration = \
{
"LOGGER":
{
"LEVEL": 3
}
}
logger.configure(configuration)
loop = asyncio.get_event_loop()
configuration = \
{
"PROX... | 19.93578 | 88 | 0.505292 |
090b035d66a637fe1f62c8760e21443532b659e2 | 3,097 | py | Python | alicraper/settings.py | VictorVSa/alicraper | 54a9d005a38140ab4f4a39564269cc056840b7a0 | [
"MIT"
] | 3 | 2021-04-22T08:50:43.000Z | 2021-12-10T16:07:09.000Z | alicraper/settings.py | VictorVSa/alicraper | 54a9d005a38140ab4f4a39564269cc056840b7a0 | [
"MIT"
] | null | null | null | alicraper/settings.py | VictorVSa/alicraper | 54a9d005a38140ab4f4a39564269cc056840b7a0 | [
"MIT"
] | 2 | 2021-05-18T13:16:41.000Z | 2021-12-10T16:07:16.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for alicraper project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/top... | 34.411111 | 104 | 0.776881 |
882aab73404e6fdc435416d53e5bb7ac37d48ac2 | 26,765 | py | Python | sharpy/solvers/steplinearuvlm.py | ostodieck/sharpy | b85aa1c001a0ec851af4eb259cce7c01dfa68b9e | [
"BSD-3-Clause"
] | 1 | 2020-07-27T05:15:35.000Z | 2020-07-27T05:15:35.000Z | sharpy/solvers/steplinearuvlm.py | briandesilva/sharpy | aed86428ff88fd14d36cabd91cf7e04b5fc9a39a | [
"BSD-3-Clause"
] | null | null | null | sharpy/solvers/steplinearuvlm.py | briandesilva/sharpy | aed86428ff88fd14d36cabd91cf7e04b5fc9a39a | [
"BSD-3-Clause"
] | null | null | null | """
Time domain solver to integrate the linear UVLM aerodynamic system developed by S. Maraniello
N Goizueta
Nov 18
"""
from sharpy.utils.solver_interface import BaseSolver, solver
import numpy as np
import sharpy.utils.settings as settings
import sharpy.utils.generator_interface as gen_interface
import sharpy.utils.al... | 43.662316 | 130 | 0.598057 |
3f07ec471823faf0bb8f6e730695900a6e7cb1bc | 30,414 | py | Python | MSPDE4d_tf1class.py | Blue-Giant/MscaleDNN_tf1Class | ca36906724d41c51e5ae73bf011ebc0e2f2b3a26 | [
"MIT"
] | null | null | null | MSPDE4d_tf1class.py | Blue-Giant/MscaleDNN_tf1Class | ca36906724d41c51e5ae73bf011ebc0e2f2b3a26 | [
"MIT"
] | null | null | null | MSPDE4d_tf1class.py | Blue-Giant/MscaleDNN_tf1Class | ca36906724d41c51e5ae73bf011ebc0e2f2b3a26 | [
"MIT"
] | null | null | null | """
@author: LXA
Date: 2020 ๅนด 5 ๆ 31 ๆฅ
"""
import os
import sys
import tensorflow as tf
import numpy as np
import matplotlib
import platform
import shutil
import time
import DNN_Class_base
import DNN_tools
import DNN_data
import MS_LaplaceEqs
import General_Laplace
import Load_data2Mat
import saveDat... | 49.534202 | 126 | 0.579108 |
2e2d007585de13b95883c5aae3b81f29c9080021 | 171 | py | Python | repos/spiketoolkit/spiketoolkit/comparison/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | repos/spiketoolkit/spiketoolkit/comparison/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | repos/spiketoolkit/spiketoolkit/comparison/__init__.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | from .sortingcomparison import SortingComparison, MappedSortingExtractor, compute_performance, confusion_matrix
from .multisortingcomparison import MultiSortingComparison
| 57 | 111 | 0.906433 |
5fcfe7b1168b504b2d2b891eb1101dd0ed2c33f6 | 13,543 | py | Python | detectron2/modeling/meta_arch/rcnn.py | dlalsrl203/detectron2-1 | bcfd861f77683f25e12761a07103145a3dd3b82c | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/meta_arch/rcnn.py | dlalsrl203/detectron2-1 | bcfd861f77683f25e12761a07103145a3dd3b82c | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/meta_arch/rcnn.py | dlalsrl203/detectron2-1 | bcfd861f77683f25e12761a07103145a3dd3b82c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
import numpy as np
from typing import Dict, List, Optional, Tuple
import torch
from torch import nn
from detectron2.config import configurable
from detectron2.data.detection_utils import convert_image_to_rgb
from detectron2.structures import ImageList, ... | 40.915408 | 98 | 0.634424 |
68f180473fd917daac583d8d9242de3f78858f8b | 1,390 | py | Python | tests/fields/date_field_test.py | binary-butterfly/wtfjson | 551ad07c895ce3c94ac3015b6b5ecc2102599b56 | [
"MIT"
] | null | null | null | tests/fields/date_field_test.py | binary-butterfly/wtfjson | 551ad07c895ce3c94ac3015b6b5ecc2102599b56 | [
"MIT"
] | 1 | 2021-10-11T08:55:45.000Z | 2021-10-11T08:55:45.000Z | tests/fields/date_field_test.py | binary-butterfly/wtfjson | 551ad07c895ce3c94ac3015b6b5ecc2102599b56 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
binary butterfly validator
Copyright (c) 2021, binary butterfly GmbH
Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt.
"""
from datetime import date
from unittest import TestCase
from wtfjson import DictInput
from wtfjson.fields import DateField
... | 31.590909 | 97 | 0.669784 |
b78e7248499b693fb4b50310748b9ef8a9eecb04 | 1,735 | py | Python | tests/test_rabbit_context.py | uk-gov-mirror/ONSdigital.census-rm-qid-batch-runner | 158ab77260eb939a15e064ecb53040bd96180e5c | [
"MIT"
] | null | null | null | tests/test_rabbit_context.py | uk-gov-mirror/ONSdigital.census-rm-qid-batch-runner | 158ab77260eb939a15e064ecb53040bd96180e5c | [
"MIT"
] | 39 | 2019-05-14T07:23:06.000Z | 2021-03-05T11:50:56.000Z | tests/test_rabbit_context.py | uk-gov-mirror/ONSdigital.census-rm-qid-batch-runner | 158ab77260eb939a15e064ecb53040bd96180e5c | [
"MIT"
] | 1 | 2021-04-11T07:46:44.000Z | 2021-04-11T07:46:44.000Z | from unittest import TestCase
from unittest.mock import patch
from pika.spec import PERSISTENT_DELIVERY_MODE
from rabbit_context import RabbitContext, RabbitConnectionClosedError
@patch('rabbit_context.pika')
class TestRabbitContext(TestCase):
def test_context_manager_opens_connection_and_channel(self, patch_p... | 44.487179 | 119 | 0.705476 |
3bec3219f072b8defd270fae45b19ed32ec142dc | 2,900 | py | Python | echoAI/Activation/Torch/srelu.py | Venkateshwar2506/Echo | 5d236b25ee4900754f48e0a865e1bf1ae9183875 | [
"MIT"
] | null | null | null | echoAI/Activation/Torch/srelu.py | Venkateshwar2506/Echo | 5d236b25ee4900754f48e0a865e1bf1ae9183875 | [
"MIT"
] | null | null | null | echoAI/Activation/Torch/srelu.py | Venkateshwar2506/Echo | 5d236b25ee4900754f48e0a865e1bf1ae9183875 | [
"MIT"
] | null | null | null | """
Script defined the SReLU (S-shaped Rectified Linear Activation Unit):
.. math::
h(x_i) = \\left\\{\\begin{matrix} t_i^r + a_i^r(x_i - t_i^r), x_i \\geq t_i^r \\\\ x_i, t_i^r > x_i > t_i^l\\\\ t_i^l + a_i^l(x_i - t_i^l), x_i \\leq t_i^l \\\\ \\end{matrix}\\right.
See SReLU paper:
https://arxiv.org/pdf/1512... | 34.52381 | 205 | 0.577586 |
f07dc6896cc8510710e1cc96bf7ae49b00859569 | 37,413 | py | Python | swift/common/internal_client.py | naototty/swift | af373a9cbca5f084f1d0f215b82a579f76da5089 | [
"Apache-2.0"
] | null | null | null | swift/common/internal_client.py | naototty/swift | af373a9cbca5f084f1d0f215b82a579f76da5089 | [
"Apache-2.0"
] | null | null | null | swift/common/internal_client.py | naototty/swift | af373a9cbca5f084f1d0f215b82a579f76da5089 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 40.056745 | 79 | 0.578515 |
a7162563d84e62a79dea2df52cd1f7aac676a27a | 2,615 | py | Python | src/hcl_model/transformers/structural_breaks.py | khrapovs/hcl-model | 879740e6072c2ff45864040db0b8364b55de1f44 | [
"MIT"
] | null | null | null | src/hcl_model/transformers/structural_breaks.py | khrapovs/hcl-model | 879740e6072c2ff45864040db0b8364b55de1f44 | [
"MIT"
] | 5 | 2022-02-09T12:38:04.000Z | 2022-02-21T15:25:06.000Z | src/hcl_model/transformers/structural_breaks.py | khrapovs/hcl-model | 879740e6072c2ff45864040db0b8364b55de1f44 | [
"MIT"
] | 1 | 2022-02-17T09:59:22.000Z | 2022-02-17T09:59:22.000Z | from __future__ import annotations
from typing import Union
import numpy as np
import pandas as pd
import ruptures as rpt
from sklearn.base import BaseEstimator, TransformerMixin
X_TYPE = Union[pd.Series, np.ndarray]
class TargetStructuralBreakCorrectionTransformer(BaseEstimator, TransformerMixin):
def __init_... | 40.230769 | 118 | 0.670746 |
ad84da7bceabb31fcd668e9ab0ba97c53c659c10 | 591 | py | Python | common/oldTesting/streamClient.py | APWHY/carlsb | e8dd935f9c3b132bc16a0e0e982ffe9c13b8ad1c | [
"MIT"
] | null | null | null | common/oldTesting/streamClient.py | APWHY/carlsb | e8dd935f9c3b132bc16a0e0e982ffe9c13b8ad1c | [
"MIT"
] | null | null | null | common/oldTesting/streamClient.py | APWHY/carlsb | e8dd935f9c3b132bc16a0e0e982ffe9c13b8ad1c | [
"MIT"
] | null | null | null | # simple client to send TCP messages from
# only used as a tool for manual testing
import socket
# ip = '<broadcast>'
myIP = socket.gethostbyname(socket.gethostname())
print(myIP)
# ip = "127.0.0.1"
soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# soc.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) ... | 29.55 | 66 | 0.734349 |
10a31ec06284055e63a505083fc55e248ca8c504 | 1,059 | py | Python | tests/test_get_value_digital.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 31 | 2018-07-16T15:03:14.000Z | 2022-03-10T08:36:09.000Z | tests/test_get_value_digital.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 216 | 2018-07-18T20:00:34.000Z | 2021-10-05T17:40:47.000Z | tests/test_get_value_digital.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T00:56:58.000Z | 2021-11-05T13:31:37.000Z | from pathlib import Path
import fault
import magma as m
from .common import pytest_sim_params
def pytest_generate_tests(metafunc):
pytest_sim_params(metafunc, 'system-verilog', 'verilator')
class MyAdder(m.Circuit):
io = m.IO(a=m.In(m.UInt[4]),
b=m.Out(m.UInt[4]))
io.b @= io.a + 1
def t... | 22.531915 | 62 | 0.608121 |
c5148a9bda2c3d7c62714f56a756948c563743b9 | 2,921 | py | Python | config.py | tifmusic/tifmusic | 3ae8e4d71ad7985f320403e058e25afe2481cb6c | [
"MIT"
] | 2 | 2021-08-17T08:16:26.000Z | 2021-08-24T17:22:26.000Z | config.py | tifmusic/tifmusic | 3ae8e4d71ad7985f320403e058e25afe2481cb6c | [
"MIT"
] | null | null | null | config.py | tifmusic/tifmusic | 3ae8e4d71ad7985f320403e058e25afe2481cb6c | [
"MIT"
] | 2 | 2021-08-25T04:46:50.000Z | 2021-08-31T02:24:55.000Z | #MIT License
#Copyright (c) 2021 SUBIN
#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, distr... | 36.061728 | 161 | 0.707292 |
7b7defbee993dc201225a158cd3e8f4239e13bba | 2,263 | py | Python | tests/unit/workflow/processors/test_target_locker.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | 3 | 2018-11-27T15:45:19.000Z | 2018-12-21T20:32:10.000Z | tests/unit/workflow/processors/test_target_locker.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | 18 | 2018-12-02T18:38:59.000Z | 2020-02-05T22:09:37.000Z | tests/unit/workflow/processors/test_target_locker.py | thoughteer/edera | c4ddb5d8a25906c3bd773c91afb3260fc0b704f2 | [
"MIT"
] | null | null | null | import pytest
from edera import Condition
from edera import Task
from edera.exceptions import LockAcquisitionError
from edera.exceptions import LockRetentionError
from edera.lockers import ProcessLocker
from edera.requisites import shortcut
from edera.workflow import WorkflowBuilder
from edera.workflow.processors impo... | 21.552381 | 59 | 0.647813 |
30a0cc49abfc3c797ab1cfa1b62d5eda9025694a | 7,335 | py | Python | openpeerpower/components/shelly/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/shelly/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/shelly/config_flow.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Config flow for Shelly integration."""
import asyncio
import logging
import aiohttp
import aioshelly
import async_timeout
import voluptuous as vol
from openpeerpower import config_entries, core
from openpeerpower.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_USERNAME,
HTTP_UNAUTHORIZED,
)
from open... | 35.095694 | 88 | 0.577369 |
089d099f06d24ad67844856443e63719ca65c971 | 397 | py | Python | tpDcc/libs/math/__version__.py | tpDcc/tpDcc-libs-math | d4db4c10d2b460d32b68a6aabbbad4c9ada65c24 | [
"MIT"
] | null | null | null | tpDcc/libs/math/__version__.py | tpDcc/tpDcc-libs-math | d4db4c10d2b460d32b68a6aabbbad4c9ada65c24 | [
"MIT"
] | null | null | null | tpDcc/libs/math/__version__.py | tpDcc/tpDcc-libs-math | d4db4c10d2b460d32b68a6aabbbad4c9ada65c24 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Version module for tpDcc-libs-math
"""
from __future__ import print_function, division, absolute_import
__version__ = None
def get_version():
global __version__
if __version__:
return __version__
from ._version import get_versions
__versio... | 17.26087 | 64 | 0.702771 |
2fc604b1af18f23ab1bb109404f6c311f7457ae2 | 993 | py | Python | benchmark/err.py | eschnett/QuasinormalModes.jl | 7ec50c3f565f6cda7501baa0bc589e445873a06e | [
"MIT"
] | null | null | null | benchmark/err.py | eschnett/QuasinormalModes.jl | 7ec50c3f565f6cda7501baa0bc589e445873a06e | [
"MIT"
] | null | null | null | benchmark/err.py | eschnett/QuasinormalModes.jl | 7ec50c3f565f6cda7501baa0bc589e445873a06e | [
"MIT"
] | null | null | null | import sys
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
##################
# Load data file #
##################
data_re = np.loadtxt("run_1.dat", usecols = (1,9))
xData_re = data_re[:,0]
yData_re = abs(data_re[:,1])
data_im = np.loadtxt("run_1.dat", usecols = (1,10))
xData_im = data_... | 23.093023 | 80 | 0.646526 |
6c5c0dbe39e95be16ba689c76d1c64afd2c749bf | 32,779 | py | Python | arviz/stats/diagnostics.py | jpreszler/arviz | 4815daabe9db51eb5cbe8062678722d30077b873 | [
"Apache-2.0"
] | null | null | null | arviz/stats/diagnostics.py | jpreszler/arviz | 4815daabe9db51eb5cbe8062678722d30077b873 | [
"Apache-2.0"
] | null | null | null | arviz/stats/diagnostics.py | jpreszler/arviz | 4815daabe9db51eb5cbe8062678722d30077b873 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=too-many-lines, too-many-function-args, redefined-outer-name
"""Diagnostic functions for ArviZ."""
from collections.abc import Sequence
import warnings
import numpy as np
import pandas as pd
from scipy import stats
from .stats_utils import (
rint as _rint,
quantile as _quantile,
autocov a... | 32.104799 | 100 | 0.629244 |
b059d27382d32e8f8f9c3ae119295a722f8751b2 | 1,579 | py | Python | backend/urls.py | kevinqqnj/django-vue-template | d061c072ffea4c029784ff427c105a84cb153547 | [
"MIT"
] | 5 | 2019-05-30T09:31:44.000Z | 2020-09-11T05:47:39.000Z | backend/urls.py | kevinqqnj/django-vue-template | d061c072ffea4c029784ff427c105a84cb153547 | [
"MIT"
] | null | null | null | backend/urls.py | kevinqqnj/django-vue-template | d061c072ffea4c029784ff427c105a84cb153547 | [
"MIT"
] | 5 | 2019-07-19T07:36:54.000Z | 2021-04-11T09:46:31.000Z | """backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 35.886364 | 88 | 0.69981 |
91f6ecc4b1b741ccd0cace044ea5af80f3dd6251 | 1,186 | py | Python | Lesson 2.2 (if, else, elif).py | Justmove08/Lesson_2 | 8f88619c0bf0140be9f4b8e24f7a7852758de55a | [
"MIT"
] | null | null | null | Lesson 2.2 (if, else, elif).py | Justmove08/Lesson_2 | 8f88619c0bf0140be9f4b8e24f7a7852758de55a | [
"MIT"
] | null | null | null | Lesson 2.2 (if, else, elif).py | Justmove08/Lesson_2 | 8f88619c0bf0140be9f4b8e24f7a7852758de55a | [
"MIT"
] | null | null | null | # # ะะพะฝััััะบัะธั IF (ะตัะปะธ)
# if 0:
# print('true')
# print('continue')
# # ะะพะฝััััะบัะธั IF-ELSE (ะตัะปะธ, ะธะฝะฐัะต)
# if 0:
# print('true')
# else:
# print('false')
# # ะะพะฝััััะบัะธั IF-ELIF
# if 1:
# print('true')
# elif 1:
# print('elif_1')
# elif 1:
# print('elif_2')
# elif 1:
# print('elif_3')
#... | 17.188406 | 38 | 0.590219 |
36ed056951608eb8a7d098e1ff6f594a778313a3 | 2,919 | py | Python | my_package/data/dataset.py | Rohan-Raj-1729/myPackage | 85ccef85097e3a5f9e30d03739f7030579bfe34b | [
"MIT"
] | null | null | null | my_package/data/dataset.py | Rohan-Raj-1729/myPackage | 85ccef85097e3a5f9e30d03739f7030579bfe34b | [
"MIT"
] | null | null | null | my_package/data/dataset.py | Rohan-Raj-1729/myPackage | 85ccef85097e3a5f9e30d03739f7030579bfe34b | [
"MIT"
] | null | null | null | # Imports
import json
from PIL import Image
import numpy as np
class Dataset(object):
'''
A class for the dataset that will return data items as per the given index
'''
def __init__(self, annotation_file, transforms=None):
'''
Arguments:
annotation_file: path to the... | 34.75 | 84 | 0.530319 |
c7af398c446781e46a76f4ed9cc89f39ad3bfcd9 | 7,547 | py | Python | configurations/je_meta_fixedaggr_jsc80leakyconv_augzoombright.py | ShuaiW/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 182 | 2016-03-15T01:51:29.000Z | 2021-04-21T09:49:05.000Z | configurations/je_meta_fixedaggr_jsc80leakyconv_augzoombright.py | weidezhang/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 1 | 2018-06-22T16:46:12.000Z | 2018-06-22T21:08:09.000Z | configurations/je_meta_fixedaggr_jsc80leakyconv_augzoombright.py | weidezhang/kaggle-heart | 022997f27add953c74af2b371c67d9d86cbdccc3 | [
"MIT"
] | 61 | 2016-03-15T00:58:28.000Z | 2020-03-06T22:00:41.000Z | """Single slice vgg with normalised scale.
"""
import functools
import lasagne as nn
import numpy as np
import theano
import theano.tensor as T
import data_loader
import deep_learning_layers
import image_transform
import layers
import preprocess
import postprocess
import objectives
import theano_printer
import update... | 31.710084 | 149 | 0.719226 |
5404df7483cdb1fd68465f363f8dd5f9b3da5e6f | 7,522 | py | Python | linkerd/datadog_checks/linkerd/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | linkerd/datadog_checks/linkerd/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | linkerd/datadog_checks/linkerd/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x va... | 21.188732 | 105 | 0.787557 |
b002b603e75ff12d580d83a9b627836c60d2d8d8 | 9,643 | py | Python | tests/test_context.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | tests/test_context.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | tests/test_context.py | nascimento/coveragepy | 9adb80c9612d3d364362bd3b6551532fe9ec7d5f | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Tests for context support."""
import inspect
import os.path
import coverage
from coverage import env
from coverage.context import qualname_from_frame
from cove... | 33.137457 | 94 | 0.627398 |
8ff649882857b45ea87ac3dc54b188abd01262bf | 3,437 | py | Python | src/tests/test_comms_models.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | 5 | 2015-01-30T08:47:59.000Z | 2022-01-22T19:27:03.000Z | src/tests/test_comms_models.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | 2 | 2017-12-28T21:36:48.000Z | 2017-12-28T21:36:57.000Z | src/tests/test_comms_models.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | 1 | 2019-01-05T15:51:37.000Z | 2019-01-05T15:51:37.000Z | import unittest
class TestMsg(unittest.TestCase):
def test___init__(self):
# msg = Msg(*args, **kwargs)
assert True # TODO: implement your test here
def test___str__(self):
# msg = Msg(*args, **kwargs)
# self.assertEqual(expected, msg.__str__())
assert True # TODO: impl... | 40.435294 | 104 | 0.673553 |
82c15fcc29aeec0d0dd65aeebe69c59d3838271d | 277 | py | Python | interfax/__init__.py | ricky-shake-n-bake-bobby/interfax-python | 63c282672b6555f745d971988441af44b133468d | [
"MIT"
] | null | null | null | interfax/__init__.py | ricky-shake-n-bake-bobby/interfax-python | 63c282672b6555f745d971988441af44b133468d | [
"MIT"
] | null | null | null | interfax/__init__.py | ricky-shake-n-bake-bobby/interfax-python | 63c282672b6555f745d971988441af44b133468d | [
"MIT"
] | null | null | null | from .response import InboundFax, OutboundFax, ForwardingEmail, Document, Image
from .files import File
__version__ = '1.0.5'
from .client import InterFAX # NOQA
__all__ = ('InterFAX', 'InboundFax', 'OutboundFax', 'ForwardingEmail',
'Document', 'Image', 'File')
| 27.7 | 79 | 0.707581 |
974ee5d30804ed3970c84f42090129127547e5f4 | 1,150 | py | Python | reviewboard/extensions/testing/testcases.py | amalik2/reviewboard | 676aa2dce38ce619a74f2d4cb3cfae9bce21416e | [
"MIT"
] | 921 | 2015-01-01T15:26:28.000Z | 2022-03-29T11:30:38.000Z | reviewboard/extensions/testing/testcases.py | amalik2/reviewboard | 676aa2dce38ce619a74f2d4cb3cfae9bce21416e | [
"MIT"
] | 5 | 2015-03-17T18:57:47.000Z | 2020-10-02T13:24:31.000Z | reviewboard/extensions/testing/testcases.py | amalik2/reviewboard | 676aa2dce38ce619a74f2d4cb3cfae9bce21416e | [
"MIT"
] | 285 | 2015-01-12T06:24:36.000Z | 2022-03-29T11:03:50.000Z | """Base test case support for extension unit tests."""
from __future__ import unicode_literals
from djblets.extensions.testing import ExtensionTestCaseMixin
from reviewboard.extensions.base import get_extension_manager
from reviewboard.testing import TestCase
class ExtensionTestCase(ExtensionTestCaseMixin, TestCas... | 33.823529 | 77 | 0.745217 |
e7e5d906727d7f2ad28b7f5cc44bf562fb2432f7 | 1,967 | py | Python | openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_check/Opengauss_Function_Tools_gs_check_Case0234.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_check/Opengauss_Function_Tools_gs_check_Case0234.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/SERVER_TOOLS/gs_check/Opengauss_Function_Tools_gs_check_Case0234.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 35.125 | 119 | 0.638027 |
997da9e542fdace66007708c59806f1b5c1a8fd3 | 44,301 | py | Python | sklearn/manifold/tests/test_t_sne.py | henrytseng/scikit-learn | 75c58c39eb9eed15ba6c96c52b6adcd95f045294 | [
"BSD-3-Clause"
] | null | null | null | sklearn/manifold/tests/test_t_sne.py | henrytseng/scikit-learn | 75c58c39eb9eed15ba6c96c52b6adcd95f045294 | [
"BSD-3-Clause"
] | 1 | 2022-03-09T19:32:57.000Z | 2022-03-09T20:23:30.000Z | sklearn/manifold/tests/test_t_sne.py | henrytseng/scikit-learn | 75c58c39eb9eed15ba6c96c52b6adcd95f045294 | [
"BSD-3-Clause"
] | null | null | null | import sys
from io import StringIO
import numpy as np
from numpy.testing import assert_allclose
import scipy.sparse as sp
import pytest
import warnings
from sklearn.neighbors import NearestNeighbors
from sklearn.neighbors import kneighbors_graph
from sklearn.exceptions import EfficiencyWarning
from sklearn.utils._test... | 33.921133 | 88 | 0.655042 |
5a9569fe1ec40dea79d5328bb11c86cc09d539d2 | 2,909 | py | Python | tasks/hard-300/shooting-kers/service/generate_html.py | C4T-BuT-S4D/nordctf-2019-finals | b63d00efe9912de3e165badfa29be1483d731ecf | [
"WTFPL"
] | 5 | 2019-10-12T11:04:05.000Z | 2021-01-21T16:56:29.000Z | tasks/hard-300/shooting-kers/service/generate_html.py | C4T-BuT-S4D/nordctf-2019-finals | b63d00efe9912de3e165badfa29be1483d731ecf | [
"WTFPL"
] | null | null | null | tasks/hard-300/shooting-kers/service/generate_html.py | C4T-BuT-S4D/nordctf-2019-finals | b63d00efe9912de3e165badfa29be1483d731ecf | [
"WTFPL"
] | 1 | 2021-01-21T16:56:33.000Z | 2021-01-21T16:56:33.000Z | #!/usr/bin/env python3
import re
from html import escape
def get_offsets(line):
parts = re.findall(r'\S+\s+', line)
offsets = [0]
for part in parts:
offsets.append(offsets[-1] + len(part))
return offsets
def read_table():
length_header = [input() for i in range(4)][2]
length = int... | 26.445455 | 87 | 0.422482 |
21baf75d7c37f497ff7f11dc41cd95ccb0e3f835 | 5,570 | py | Python | networkx/generators/nonisomorphic_trees.py | jdrudolph/networkx | d49733b61fb7dedfbbbdd9c04464adf6beb5db07 | [
"BSD-3-Clause"
] | null | null | null | networkx/generators/nonisomorphic_trees.py | jdrudolph/networkx | d49733b61fb7dedfbbbdd9c04464adf6beb5db07 | [
"BSD-3-Clause"
] | null | null | null | networkx/generators/nonisomorphic_trees.py | jdrudolph/networkx | d49733b61fb7dedfbbbdd9c04464adf6beb5db07 | [
"BSD-3-Clause"
] | null | null | null | """
Implementation of the Wright, Richmond, Odlyzko and McKay (WROM)
algorithm for the enumeration of all non-isomorphic free trees of a
given order. Rooted trees are represented by level sequences, i.e.,
lists in which the i-th element specifies the distance of vertex i to
the root.
"""
# Copyright (C) 2013 by
# ... | 27.574257 | 75 | 0.585996 |
153486489979c55ad088f513f5b7d27d4f0ab901 | 501 | py | Python | Sound Analysis WeWalk/Comparer.py | 3arii/UpSpectrum | bccab66b6f5d36038a34c1a893a65a7eafae15c3 | [
"MIT"
] | null | null | null | Sound Analysis WeWalk/Comparer.py | 3arii/UpSpectrum | bccab66b6f5d36038a34c1a893a65a7eafae15c3 | [
"MIT"
] | null | null | null | Sound Analysis WeWalk/Comparer.py | 3arii/UpSpectrum | bccab66b6f5d36038a34c1a893a65a7eafae15c3 | [
"MIT"
] | null | null | null |
from PitchDetector import pitch_detector
from PyaudioRecorder import record_audio
src = "C:/Users/deniz/OneDrive/Documents/Deniz the Laps/Wewalk/Sound Analysis WeWalk/output.wav"
src2 = "C:/Users/deniz/OneDrive/Documents/Deniz the Laps/Wewalk/Sound Analysis WeWalk/output2.wav"
record_audio(src, 4)
record_aud... | 27.833333 | 99 | 0.744511 |
cd1d757725c82f8b31048bec3a1c4f5efd7a586e | 1,663 | py | Python | tasksplataform/googleapi.py | exodojaffar/EADGetTasks | 809e2577b6268c4e4f569810c46daf6db9250ff3 | [
"MIT"
] | 4 | 2021-02-08T00:29:19.000Z | 2021-05-18T03:48:46.000Z | tasksplataform/googleapi.py | exodojaffar/EADGetTasks | 809e2577b6268c4e4f569810c46daf6db9250ff3 | [
"MIT"
] | 1 | 2020-10-14T15:17:37.000Z | 2020-10-14T15:17:37.000Z | tasksplataform/googleapi.py | exodojaffar/EADGetTasks | 809e2577b6268c4e4f569810c46daf6db9250ff3 | [
"MIT"
] | null | null | null | from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from google.auth.transport.requests import Request
import pickle
import os.path
class GoogleApi:
def __init__(self, scopes, service, version, credentials_file="credentials.json"):
self.google_service = None
self._... | 24.455882 | 90 | 0.754059 |
c2fd1375b182e01a0074b92e04875d1c2a672c09 | 12,314 | py | Python | arelle/plugin/validate/CIPC/__init__.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 292 | 2015-01-27T03:31:51.000Z | 2022-03-26T07:00:05.000Z | arelle/plugin/validate/CIPC/__init__.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 94 | 2015-04-18T23:03:00.000Z | 2022-03-28T17:24:55.000Z | arelle/plugin/validate/CIPC/__init__.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 200 | 2015-01-13T03:55:47.000Z | 2022-03-29T12:38:56.000Z | '''
Created on Dec 21, 2017
Filer Guidelines: http://www.cipc.co.za/files/8615/1333/0514/25082017_Guidelines_for_Filing__AFSs_in_XBRL_by_Client_Companies_Technical_Aspects_v1-7_HVMZ.pdf
Taxonomy Architecture: http://www.cipc.co.za/files/1715/1325/5802/CIPC_XBRL_Taxonomy_Framework_Architecture_-_2017-12-15.pdf
Taxono... | 52.177966 | 157 | 0.606464 |
4011cdcb6bd3089a0dd7b9fbad8d461d361ec726 | 7,961 | py | Python | nodes/ImageServer.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | 1 | 2017-06-16T22:31:24.000Z | 2017-06-16T22:31:24.000Z | nodes/ImageServer.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | null | null | null | nodes/ImageServer.py | anqixu/sightedturtlesim | 35712504679a477d0021a8cec3d22cb087ebc545 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# Python port of AbstractImageServer and SingleImageServer in sightedturtlesim
import numpy as np
import cv2
class SingleImageServer:
# If the desired camera dimensions (with respect to the canvas dimensions)
# exceeds DOWNSIZE_SCALE_RATIO times the dimensions of the desired image,
# th... | 41.680628 | 126 | 0.671649 |
1dc6d4978fcfae9b6671a61ee5ad33190687d731 | 3,211 | py | Python | bin/sa_haveibeenpwned/aob_py3/future/types/newdict.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 2 | 2020-08-17T07:52:48.000Z | 2020-12-18T16:39:32.000Z | bin/sa_haveibeenpwned/aob_py3/future/types/newdict.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 5 | 2020-12-15T23:40:14.000Z | 2022-02-23T15:43:18.000Z | bin/sa_haveibeenpwned/aob_py2/future/types/newdict.py | hRun/SA-haveibeenpwned | 2a8ae3dedc405dc3c8dac1cb6a705a70f574afdb | [
"Apache-2.0"
] | 4 | 2019-05-16T09:57:33.000Z | 2021-07-14T12:31:21.000Z | """
A dict subclass for Python 2 that behaves like Python 3's dict
Example use:
>>> from builtins import dict
>>> d1 = dict() # instead of {} for an empty dict
>>> d2 = dict(key1='value1', key2='value2')
The keys, values and items methods now return iterators on Python 2.x
(with set-like behaviour on Py... | 28.669643 | 79 | 0.523513 |
46f4176d0e8e88a06a719e1b187269a97adba18b | 12,171 | py | Python | tests/test_integration.py | najamansari/django-elasticsearch-dsl | 7b6dab35313d0512ed86497ba407752ae82294c0 | [
"Apache-2.0"
] | null | null | null | tests/test_integration.py | najamansari/django-elasticsearch-dsl | 7b6dab35313d0512ed86497ba407752ae82294c0 | [
"Apache-2.0"
] | null | null | null | tests/test_integration.py | najamansari/django-elasticsearch-dsl | 7b6dab35313d0512ed86497ba407752ae82294c0 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import os
import unittest
from django.core.management import call_command
from django.test import TestCase
from django.utils.six import StringIO
from django.utils.translation import ugettext_lazy as _
from django_elasticsearch_dsl.test import ESTestCase
from .documents import (
ad_i... | 35.797059 | 73 | 0.513516 |
16be308adebf34b3a62305e50d8bd715f5e92f0f | 251 | py | Python | Practica3_Matias.py | mbermejo1/PracticasSF2 | 0dd57b24c658cb75f0783776d9178f13180563fe | [
"MIT"
] | null | null | null | Practica3_Matias.py | mbermejo1/PracticasSF2 | 0dd57b24c658cb75f0783776d9178f13180563fe | [
"MIT"
] | null | null | null | Practica3_Matias.py | mbermejo1/PracticasSF2 | 0dd57b24c658cb75f0783776d9178f13180563fe | [
"MIT"
] | null | null | null | print("\n\t\t-----> Welcome to Matias list changer <-----\t\t\n")
listn = [1,2,3,4,5,6,7,8,9,10]
print(f"\nThis is the list without changes ===> {listn}\n")
listn[4] *= 2
listn[7] *= 2
listn[9] *= 2
print(f"\nThis is the modified list ===> {listn}\n") | 35.857143 | 65 | 0.589641 |
f716de749187532c276040a0b1e00777b44337ce | 592 | py | Python | api_logic_server_cli/project_prototype/util.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 71 | 2021-01-23T17:34:33.000Z | 2022-03-29T13:11:29.000Z | api_logic_server_cli/project_prototype/util.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 38 | 2021-01-24T21:56:30.000Z | 2022-03-08T18:49:00.000Z | api_logic_server_cli/project_prototype/util.py | valhuber/ApiLogicServer | a4acd8d886a18d4d500e0fffffcaa2f1c0765040 | [
"BSD-3-Clause"
] | 14 | 2021-01-23T16:20:44.000Z | 2022-03-24T10:48:28.000Z | import sqlite3
from os import path
import sys
import logging
app_logger = logging.getLogger("api_logic_server_app")
def log(msg: any) -> None:
app_logger.info(msg)
# print("TIL==> " + msg)
def connection() -> sqlite3.Connection:
ROOT: str = path.dirname(path.realpath(__file__))
log(ROOT)
_connec... | 22.769231 | 67 | 0.675676 |
77502af18bf5c8e08f138efacb1134a2917a190e | 4,056 | py | Python | app/tests/v1/test_meets.py | exdus/Questioner-api | 22be46ef17b25c73949b105dca43dd9ea2b930ca | [
"MIT"
] | null | null | null | app/tests/v1/test_meets.py | exdus/Questioner-api | 22be46ef17b25c73949b105dca43dd9ea2b930ca | [
"MIT"
] | null | null | null | app/tests/v1/test_meets.py | exdus/Questioner-api | 22be46ef17b25c73949b105dca43dd9ea2b930ca | [
"MIT"
] | null | null | null | import unittest
from app import create_app
import os
import json
import pytest
import datetime
from app.api.v1.models.models import MEETUP_LIST
KEY = os.getenv("SECRET")
class BaseTest(unittest.TestCase):
def setUp(self):
self.app = create_app("testing")
self.client = self.app.test_client()
... | 38.264151 | 103 | 0.618343 |
49bd82a86d63d362216011c9e2162e0037e7c6bd | 3,036 | py | Python | tests/sources/test_textures.py | awesome-archive/webots | 8e74fb8393d1e3a6540749afc492635c43f1b30f | [
"Apache-2.0"
] | 2 | 2019-07-12T13:47:44.000Z | 2019-08-17T02:53:54.000Z | tests/sources/test_textures.py | golbh/webots | 8e74fb8393d1e3a6540749afc492635c43f1b30f | [
"Apache-2.0"
] | null | null | null | tests/sources/test_textures.py | golbh/webots | 8e74fb8393d1e3a6540749afc492635c43f1b30f | [
"Apache-2.0"
] | 1 | 2019-07-13T17:58:04.000Z | 2019-07-13T17:58:04.000Z | # Copyright 1996-2018 Cyberbotics 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 in... | 37.481481 | 113 | 0.584321 |
5cd5c7416f796784e724f794ec1830134bc41fd3 | 28,094 | py | Python | graphicsDisplay.py | chaobiubiu/contest_pacman | f8381af6e6be09a894dc301c94803ca33af5271b | [
"BSD-4-Clause-UC"
] | 1 | 2021-11-30T06:44:08.000Z | 2021-11-30T06:44:08.000Z | graphicsDisplay.py | chaobiubiu/contest_pacman | f8381af6e6be09a894dc301c94803ca33af5271b | [
"BSD-4-Clause-UC"
] | 4 | 2021-09-30T21:21:02.000Z | 2021-10-11T22:02:26.000Z | graphicsDisplay.py | chaobiubiu/contest_pacman | f8381af6e6be09a894dc301c94803ca33af5271b | [
"BSD-4-Clause-UC"
] | null | null | null | # graphicsDisplay.py
# ------------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.be... | 41.254038 | 189 | 0.58347 |
042c120e4deaf8aeae06a9e2136f39d6c224c161 | 6,511 | py | Python | rpython/rlib/rjitlog/test/test_jitlog.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | rpython/rlib/rjitlog/test/test_jitlog.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | rpython/rlib/rjitlog/test/test_jitlog.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 30 | 2018-08-20T03:16:34.000Z | 2022-01-12T17:39:22.000Z | import py
import sys
from rpython.jit.tool.oparser import pure_parse
from rpython.jit.metainterp.optimizeopt.util import equaloplists
from rpython.jit.metainterp.resoperation import ResOperation, rop
from rpython.jit.backend.model import AbstractCPU
from rpython.jit.metainterp.history import ConstInt, ConstPtr
from rpy... | 43.697987 | 100 | 0.594532 |
2a2be8327ddd572395d975e3251b3db59ecdbbdf | 191 | py | Python | server/src/shared_helpers/env.py | JackDanger/go-links | 7ca62bdeafc59c6523e36518fd64c293e1add280 | [
"Apache-2.0"
] | null | null | null | server/src/shared_helpers/env.py | JackDanger/go-links | 7ca62bdeafc59c6523e36518fd64c293e1add280 | [
"Apache-2.0"
] | null | null | null | server/src/shared_helpers/env.py | JackDanger/go-links | 7ca62bdeafc59c6523e36518fd64c293e1add280 | [
"Apache-2.0"
] | null | null | null | import os
def current_env_is_production():
return os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/')
def current_env_is_local():
return not current_env_is_production()
| 19.1 | 74 | 0.769634 |
6708d010ed7591822346319fec7248897003f403 | 247 | py | Python | data_types_and_variables/exercise/01_integer_operations.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | data_types_and_variables/exercise/01_integer_operations.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | data_types_and_variables/exercise/01_integer_operations.py | Galchov/python-fundamentals | 4939bdd1c66a7b458fd9ffd0a01d714de26724b5 | [
"MIT"
] | null | null | null | number_one = int(input())
number_two = int(input())
number_three = int(input())
number_four = int(input())
sum_one_two = number_one + number_two
integer_division = sum_one_two // number_three
result = integer_division * number_four
print(result) | 24.7 | 46 | 0.765182 |
b90bad385f11b0bb6e930a1e35e23694a1812340 | 1,240 | py | Python | legacy/steps/deployer/__init__.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 1,275 | 2020-11-19T14:18:25.000Z | 2021-08-13T07:31:39.000Z | legacy/steps/deployer/__init__.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 62 | 2020-11-30T16:06:14.000Z | 2021-08-10T08:34:52.000Z | legacy/steps/deployer/__init__.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 75 | 2020-12-22T19:15:08.000Z | 2021-08-13T03:07:50.000Z | # Copyright (c) ZenML GmbH 2020. 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 | 75 | 0.760484 |
821813b4286ce228612b9f828ed5f148b4a9f635 | 7,981 | py | Python | community_selection.py | anguoyuan/Hypergraph-Propagation-and-Community-Selection-for-Objects-Retrieval | 5595abca7eb231cd6edf8db293ad5d1d2d4b7121 | [
"MIT"
] | 13 | 2021-11-08T08:18:05.000Z | 2022-01-07T05:56:30.000Z | community_selection.py | anguoyuan/Hypergraph-Propagation-and-Community-Selection-for-Objects-Retrieval | 5595abca7eb231cd6edf8db293ad5d1d2d4b7121 | [
"MIT"
] | 1 | 2021-11-12T20:21:53.000Z | 2021-12-21T14:57:25.000Z | community_selection.py | anguoyuan/Hypergraph-Propagation-and-Community-Selection-for-Objects-Retrieval | 5595abca7eb231cd6edf8db293ad5d1d2d4b7121 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 5 16:02:42 2021
@author: Guoyuan An
"""
#prepare the uncertainty calculation
from scipy.stats import entropy
import numpy as np
import pickle
def prepare_community_selection(dataset,COMMUNITY_SELECTION):
graph_directaries={'roxford':'graph/delg... | 33.961702 | 141 | 0.587019 |
83e473452747651e72e59ffe90441d7572e844b5 | 9,624 | py | Python | examples/vpn-plugin-radius-auth/vpn_plugin_radius_auth.py | coalfire/auth-script-openvpn | b999bfaf77b35dd7a42eb3c53e026f700e5b2bcc | [
"Apache-2.0"
] | null | null | null | examples/vpn-plugin-radius-auth/vpn_plugin_radius_auth.py | coalfire/auth-script-openvpn | b999bfaf77b35dd7a42eb3c53e026f700e5b2bcc | [
"Apache-2.0"
] | null | null | null | examples/vpn-plugin-radius-auth/vpn_plugin_radius_auth.py | coalfire/auth-script-openvpn | b999bfaf77b35dd7a42eb3c53e026f700e5b2bcc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
vpn-plugin-radius-auth
authenticate against radius with username and password.
Use with auth-script-openvpn
"""
import logging
from logging.handlers import RotatingFileHandler
import os
import sys
import configargparse
from pyrad.client import Client
from pyrad.dictionary import Dictionar... | 27.575931 | 84 | 0.601205 |
19929d099cf2d46fc7c83060fb911192e1a4ba8d | 8,994 | py | Python | core/generate_hact_graphs.py | histocartography/hact-net | 4b66b41a2f00b768029b6aaa1152c746faf2b9c6 | [
"MIT"
] | 16 | 2021-06-11T05:23:43.000Z | 2022-03-23T20:30:42.000Z | core/generate_hact_graphs.py | yujing1997/hact-net | 4b66b41a2f00b768029b6aaa1152c746faf2b9c6 | [
"MIT"
] | 4 | 2021-06-02T02:58:10.000Z | 2022-03-22T12:31:33.000Z | core/generate_hact_graphs.py | yujing1997/hact-net | 4b66b41a2f00b768029b6aaa1152c746faf2b9c6 | [
"MIT"
] | 6 | 2021-05-30T23:36:57.000Z | 2022-03-22T12:31:58.000Z | """
Extract HACT graphs for all the sample in the BRACS dataset.
"""
import os
from glob import glob
import argparse
from PIL import Image
import numpy as np
from tqdm import tqdm
import torch
from dgl.data.utils import save_graphs
import h5py
from histocartography.preprocessing import (
VahadaneStainNormalizer,... | 37.012346 | 113 | 0.603736 |
6c11a9bfc1a262152ea0a9ed3ebcc257fa29cd86 | 705 | py | Python | Handout/pygame.i/referencia/config.py | pedroivoal/Dessoft | da4da1b48112db8da6a6b2ac5beef396c6d624d7 | [
"MIT"
] | null | null | null | Handout/pygame.i/referencia/config.py | pedroivoal/Dessoft | da4da1b48112db8da6a6b2ac5beef396c6d624d7 | [
"MIT"
] | null | null | null | Handout/pygame.i/referencia/config.py | pedroivoal/Dessoft | da4da1b48112db8da6a6b2ac5beef396c6d624d7 | [
"MIT"
] | null | null | null | from os import path
# Estabelece a pasta que contem as figuras e sons.
IMG_DIR = path.join(path.dirname(__file__), 'assets', 'img')
SND_DIR = path.join(path.dirname(__file__), 'assets', 'snd')
FNT_DIR = path.join(path.dirname(__file__), 'assets', 'font')
# Dados gerais do jogo.
WIDTH = 480 # Largura da tela
HEIGHT = ... | 22.741935 | 61 | 0.689362 |
cd214604cbbaaddc0fa132092702d79c4c6c77aa | 7,789 | py | Python | flexget/logger.py | RSully/flexget-flexget | ab36590e569511a43c1e35b1dfae9b7fb8db1535 | [
"MIT"
] | null | null | null | flexget/logger.py | RSully/flexget-flexget | ab36590e569511a43c1e35b1dfae9b7fb8db1535 | [
"MIT"
] | null | null | null | flexget/logger.py | RSully/flexget-flexget | ab36590e569511a43c1e35b1dfae9b7fb8db1535 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, unicode_literals, print_function
import collections
import contextlib
import logging
import logging.handlers
import sys
import threading
import uuid
import warnings
from flexget import __version__
from flexget.utils.tools import io_encoding
# A level more detailed tha... | 34.312775 | 111 | 0.706381 |
eab9eaccd128cad9a8c678e07d6e9420bdb41087 | 95 | py | Python | examples/test_simple.py | VStoilovskyi/agent-python-pytest | 325f56938009ae89ae7739410adcccc0d94f2cde | [
"Apache-2.0"
] | 85 | 2017-05-03T10:44:32.000Z | 2022-03-30T06:57:10.000Z | examples/test_simple.py | VStoilovskyi/agent-python-pytest | 325f56938009ae89ae7739410adcccc0d94f2cde | [
"Apache-2.0"
] | 212 | 2017-04-26T12:18:07.000Z | 2022-03-28T11:49:34.000Z | examples/test_simple.py | VStoilovskyi/agent-python-pytest | 325f56938009ae89ae7739410adcccc0d94f2cde | [
"Apache-2.0"
] | 103 | 2017-04-12T15:34:58.000Z | 2022-01-24T17:11:29.000Z | """Simple example test."""
def test_simple():
"""Simple example test."""
assert True
| 13.571429 | 30 | 0.610526 |
5d39b5031a17de51e4976e417a97bd5433ae39a0 | 649 | py | Python | office__excel__openpyxl__xlwt/xlsx__openpyxl__hello_world.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | office__excel__openpyxl__xlwt/xlsx__openpyxl__hello_world.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | office__excel__openpyxl__xlwt/xlsx__openpyxl__hello_world.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# pip install openpyxl
import openpyxl
columns = ['Name', 'Age', 'Course']
rows = [
['Vasya', '16', 1],
['Anya', '17', 2],
['Inna', '16', 1],
]
wb = openpyxl.Workbook()
# Remove default sheet
for sheet_name in wb.sheetnames:
... | 18.027778 | 46 | 0.625578 |
b00ea7a6aa448145f48c581ebcf013143ee92bc4 | 29,856 | py | Python | lingvo/core/spectrum_augmenter.py | zh794390558/lingvo | ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a | [
"Apache-2.0"
] | null | null | null | lingvo/core/spectrum_augmenter.py | zh794390558/lingvo | ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a | [
"Apache-2.0"
] | null | null | null | lingvo/core/spectrum_augmenter.py | zh794390558/lingvo | ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 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
#
... | 39.702128 | 80 | 0.647508 |
2933ad96285f7e2883b20ba959b39745931d273c | 1,474 | py | Python | bot.py | sanjay-271022/droplink-bot | 2fcc42bdcbe178839c03471105a997aa56895a09 | [
"MIT"
] | null | null | null | bot.py | sanjay-271022/droplink-bot | 2fcc42bdcbe178839c03471105a997aa56895a09 | [
"MIT"
] | null | null | null | bot.py | sanjay-271022/droplink-bot | 2fcc42bdcbe178839c03471105a997aa56895a09 | [
"MIT"
] | null | null | null | from os import environ
import aiohttp
from pyrogram import Client, filters
API_ID = environ.get('API_ID')
API_HASH = environ.get('API_HASH')
BOT_TOKEN = environ.get('BOT_TOKEN')
API_KEY = environ.get('API_KEY', 'e3eddb3e7c5513eee187120fce788ddc4a1a643b')
bot = Client('droplink bot',
api_id=API_ID,
... | 32.043478 | 150 | 0.666893 |
322cecc89245dc68f69986caf088035a3b9638d1 | 2,670 | py | Python | aleph/logic/resolver.py | aaronarnold2/aleph | 1728f4db8863554d5b0722546838970e53ec72bd | [
"MIT"
] | null | null | null | aleph/logic/resolver.py | aaronarnold2/aleph | 1728f4db8863554d5b0722546838970e53ec72bd | [
"MIT"
] | null | null | null | aleph/logic/resolver.py | aaronarnold2/aleph | 1728f4db8863554d5b0722546838970e53ec72bd | [
"MIT"
] | null | null | null | # Bulk object resolver.
# The purpose of this module is to quickly load objects of different
# types from the backend. It's typically used by the API serialiser
# to ensure that nested objects are loaded only once.
#
import logging
from normality import stringify
from collections import defaultdict
from aleph.core imp... | 28.709677 | 73 | 0.667416 |
26a467fd481a18961360769b005f30c2c9482ebc | 753 | py | Python | ase_project/urls.py | akshayk17/ase_project | 2838ddd15e755d749653009484848421f5644615 | [
"MIT"
] | null | null | null | ase_project/urls.py | akshayk17/ase_project | 2838ddd15e755d749653009484848421f5644615 | [
"MIT"
] | null | null | null | ase_project/urls.py | akshayk17/ase_project | 2838ddd15e755d749653009484848421f5644615 | [
"MIT"
] | null | null | null | """ase_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... | 34.227273 | 77 | 0.710491 |
3bb00845d448d306ce2d2763704049f54428545a | 5,697 | py | Python | sdk/python/pulumi_azure_native/netapp/get_account.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/netapp/get_account.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/netapp/get_account.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 33.122093 | 169 | 0.638757 |
86de0cb454bb1f7277211f99f55be3929a35beba | 8,091 | py | Python | statsmodels/robust/scale.py | haribharadwaj/statsmodels | 8675b890607fe6f116b1186dcba4c387c5e3778a | [
"BSD-3-Clause"
] | 34 | 2018-07-13T11:30:46.000Z | 2022-01-05T13:48:10.000Z | venv/lib/python3.6/site-packages/statsmodels/robust/scale.py | HeyWeiPan/vnpy_crypto | 844381797a475a01c05a4e162592a5a6e3a48032 | [
"MIT"
] | 6 | 2015-08-28T16:59:03.000Z | 2019-04-12T22:29:01.000Z | venv/lib/python3.6/site-packages/statsmodels/robust/scale.py | HeyWeiPan/vnpy_crypto | 844381797a475a01c05a4e162592a5a6e3a48032 | [
"MIT"
] | 28 | 2015-04-01T20:02:25.000Z | 2021-07-03T00:09:28.000Z | """
Support and standalone functions for Robust Linear Models
References
----------
PJ Huber. 'Robust Statistics' John Wiley and Sons, Inc., New York, 1981.
R Venables, B Ripley. 'Modern Applied Statistics in S'
Springer, New York, 2002.
"""
from statsmodels.compat.python import callable, range
import numpy as n... | 34.139241 | 117 | 0.563095 |
5e45fa0e3463adf0460ab3ead7bb0ce0fbca5ce3 | 253 | py | Python | vbb_backend/program/tests/test_program.py | patrickb42/backend-vbb-portal | 88362bc5b4d5cab95aa67e12694f98371604b65a | [
"MIT"
] | 3 | 2021-04-14T02:59:09.000Z | 2021-06-08T00:17:27.000Z | vbb_backend/program/tests/test_program.py | patrickb42/backend-vbb-portal | 88362bc5b4d5cab95aa67e12694f98371604b65a | [
"MIT"
] | 81 | 2020-12-08T00:11:52.000Z | 2021-08-09T18:13:32.000Z | vbb_backend/program/tests/test_program.py | patrickb42/backend-vbb-portal | 88362bc5b4d5cab95aa67e12694f98371604b65a | [
"MIT"
] | 5 | 2021-01-12T04:50:26.000Z | 2021-06-04T02:00:03.000Z | import pytest
from vbb_backend.program.models import Program
@pytest.mark.django_db
def test_program_create(program_factory):
newProgram1 = program_factory.create()
newProgram2 = program_factory.create()
assert Program.objects.count() == 2
| 28.111111 | 46 | 0.786561 |
b49a2c9711a21f0f0dc6fc6a82bfb18b12b23b30 | 2,162 | py | Python | tests/decorator/test_methods.py | rtshilston/flask-cors | 9fae3e5cf69c634f6144556fb848b7af05cd7bfe | [
"MIT"
] | 749 | 2015-02-13T09:30:52.000Z | 2022-03-30T22:17:14.000Z | tests/decorator/test_methods.py | rtshilston/flask-cors | 9fae3e5cf69c634f6144556fb848b7af05cd7bfe | [
"MIT"
] | 161 | 2015-02-26T05:59:28.000Z | 2022-03-31T10:40:13.000Z | tests/decorator/test_methods.py | rtshilston/flask-cors | 9fae3e5cf69c634f6144556fb848b7af05cd7bfe | [
"MIT"
] | 126 | 2015-02-24T23:26:38.000Z | 2022-03-21T04:58:49.000Z | # -*- coding: utf-8 -*-
"""
test
~~~~
Flask-CORS is a simple extension to Flask allowing you to support cross
origin resource sharing (CORS) using a simple decorator.
:copyright: (c) 2016 by Cory Dolphin.
:license: MIT, see LICENSE for more details.
"""
from ..base_test import FlaskCorsTestCas... | 34.870968 | 97 | 0.66235 |
81a516f0d78d15d0084b0f0d0a4cf6969b58d153 | 3,438 | py | Python | test/test_conversion.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | 1 | 2022-02-23T19:22:44.000Z | 2022-02-23T19:22:44.000Z | test/test_conversion.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | null | null | null | test/test_conversion.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | null | null | null | import unittest
from conversion import *
class TestConversions(unittest.TestCase):
def test_decimal_to_binary(self):
self.assertEqual(decimal_to_binary('8'), '1000')
self.assertEqual(decimal_to_binary('10'), '1010')
self.assertEqual(decimal_to_binary('15'), '1111')
def test_decimal_... | 39.068182 | 69 | 0.710878 |
3f76218043283966396ce8e2b27f8d98de3ee5e0 | 36,227 | py | Python | template/provider.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | 2 | 2021-05-07T08:50:06.000Z | 2021-06-12T15:48:23.000Z | template/provider.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | 1 | 2018-11-29T08:49:42.000Z | 2018-11-29T08:49:42.000Z | template/provider.py | lmr/Template-Toolkit-Python | 3b1affc79c2f650b057956b0dbf6e0cb51515999 | [
"Artistic-2.0"
] | null | null | null | #
# The Template-Python distribution is Copyright (C) Sean McAfee 2007-2008,
# derived from the Perl Template Toolkit Copyright (C) 1996-2007 Andy
# Wardley. All Rights Reserved.
#
# The file "LICENSE" at the top level of this source distribution describes
# the terms under which this file may be distributed.
#
... | 35.001932 | 86 | 0.648108 |
e4085074ce997f91c9d98960c474e8539c07777d | 2,502 | py | Python | CNN/main_new.py | junmadlab/Learn_to_compose_IDETC_2020 | edbaaccf51b195a60f672cac4609a56f16f277c8 | [
"MIT"
] | null | null | null | CNN/main_new.py | junmadlab/Learn_to_compose_IDETC_2020 | edbaaccf51b195a60f672cac4609a56f16f277c8 | [
"MIT"
] | null | null | null | CNN/main_new.py | junmadlab/Learn_to_compose_IDETC_2020 | edbaaccf51b195a60f672cac4609a56f16f277c8 | [
"MIT"
] | null | null | null | """
Trains a model, and visulizes results
Author(s): Wei Chen (wchen459@umd.edu)
Jun Wang (jwang38@umd.edu)
"""
import argparse
import os
import glob
import numpy as np
from importlib import import_module
import shutil
import h5py
from visualization import visualize_samples, visualize
if __name__ == "__... | 32.921053 | 112 | 0.663469 |
b8146ee022e51ab39dd7e7eec1bf24115f013df1 | 5,358 | py | Python | allennlp/modules/token_embedders/elmo_token_embedder_2.py | asiddhant/taskonomy-nlp | 34042cce5d77a13dd4f3128234d242b7ed14d4ec | [
"Apache-2.0"
] | 3 | 2019-06-17T21:09:07.000Z | 2022-03-18T05:19:31.000Z | allennlp/modules/token_embedders/elmo_token_embedder_2.py | asiddhant/taskonomy-nlp | 34042cce5d77a13dd4f3128234d242b7ed14d4ec | [
"Apache-2.0"
] | null | null | null | allennlp/modules/token_embedders/elmo_token_embedder_2.py | asiddhant/taskonomy-nlp | 34042cce5d77a13dd4f3128234d242b7ed14d4ec | [
"Apache-2.0"
] | null | null | null | from typing import List
import torch
from allennlp.common import Params
from allennlp.modules.token_embedders.token_embedder import TokenEmbedder
from allennlp.modules.elmo_2 import Elmo2
from allennlp.modules.time_distributed import TimeDistributed
from allennlp.data import Vocabulary
@TokenEmbedder.register("elmo_... | 44.65 | 99 | 0.642591 |
1c55fde6c03688a8e1fe6fe20ae030939d540e43 | 4,128 | py | Python | tests/parsers/mac_wifi.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:29.000Z | 2022-03-13T03:04:59.000Z | tests/parsers/mac_wifi.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | null | null | null | tests/parsers/mac_wifi.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 6 | 2016-12-18T08:05:36.000Z | 2021-04-06T14:19:11.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the Mac wifi.log parser."""
import unittest
from plaso.formatters import mac_wifi as _ # pylint: disable=unused-import
from plaso.lib import timelib
from plaso.parsers import mac_wifi
from tests.parsers import test_lib
class MacWifiUnitTest(test_lib.ParserTes... | 34.4 | 79 | 0.722626 |
f7ad2f4c9393b1cd648ece9064f3bd6e632c0bdb | 1,159 | py | Python | amos/tests.py | chuckoy/grabyaya | 5fbd7135cc74bdbb29c6d86b1b202b37b94e1660 | [
"MIT"
] | null | null | null | amos/tests.py | chuckoy/grabyaya | 5fbd7135cc74bdbb29c6d86b1b202b37b94e1660 | [
"MIT"
] | null | null | null | amos/tests.py | chuckoy/grabyaya | 5fbd7135cc74bdbb29c6d86b1b202b37b94e1660 | [
"MIT"
] | null | null | null | # django
from django.core.urlresolvers import reverse
from django.test import TestCase, RequestFactory, Client
# own modules
from .factories import UserFactory
from .utils import url_with_querystring
from django.contrib.auth.models import User
class HomePageTest(TestCase):
"""
Tests for home page
"""
... | 31.324324 | 76 | 0.707506 |
03f8d3ddde0b3fb404828b615b8c46f1efa8ae33 | 17,484 | py | Python | py_cui/dialogs/form.py | jupiterbjy/py_cui | 3f03af05ecc29f04cc07ee6b62c8ac2a76de8a68 | [
"BSD-3-Clause"
] | null | null | null | py_cui/dialogs/form.py | jupiterbjy/py_cui | 3f03af05ecc29f04cc07ee6b62c8ac2a76de8a68 | [
"BSD-3-Clause"
] | null | null | null | py_cui/dialogs/form.py | jupiterbjy/py_cui | 3f03af05ecc29f04cc07ee6b62c8ac2a76de8a68 | [
"BSD-3-Clause"
] | 1 | 2021-06-16T08:56:36.000Z | 2021-06-16T08:56:36.000Z | """Form widget for py_cui. Allows for giving user several fillable text fields in one block
"""
import py_cui.ui
import py_cui.widgets
import py_cui.popups
class DuplicateFormKeyError(Exception):
"""Error thrown when a duplicate form field key is passed
"""
pass
class FormField(py_cui.ui.TextBoxImplem... | 32.680374 | 122 | 0.599062 |
711d2b75dd24c4ecab70ea3286916dc43edffc1c | 6,976 | py | Python | examples/vyasarayani2011.py | humphreysb/opty | 4eacf7cadf61a339be6cebfa3e32ef41d2563151 | [
"BSD-2-Clause-FreeBSD"
] | 63 | 2015-03-07T19:38:10.000Z | 2022-03-31T17:17:53.000Z | examples/vyasarayani2011.py | humphreysb/opty | 4eacf7cadf61a339be6cebfa3e32ef41d2563151 | [
"BSD-2-Clause-FreeBSD"
] | 52 | 2015-02-15T17:24:03.000Z | 2021-06-18T16:43:45.000Z | examples/vyasarayani2011.py | humphreysb/opty | 4eacf7cadf61a339be6cebfa3e32ef41d2563151 | [
"BSD-2-Clause-FreeBSD"
] | 22 | 2015-05-25T21:28:16.000Z | 2022-03-14T03:55:57.000Z | """This example is taken from the following paper:
Vyasarayani, Chandrika P., Thomas Uchida, Ashwin Carvalho, and John McPhee.
"Parameter Identification in Dynamic Systems Using the Homotopy Optimization
Approach". Multibody System Dynamics 26, no. 4 (2011): 411-24.
In Section 3.1 there is a simple example of a singl... | 35.055276 | 79 | 0.598624 |
4c6a2ce79f709bc04aa6f021b017848a0d2a417a | 5,776 | py | Python | wrangling_scripts/figure1.py | DanielDaCosta/dashboardapp-daily-report | beb336d7993558c17fada8b1675b6982dc4c1f62 | [
"MIT"
] | 7 | 2020-05-03T00:55:42.000Z | 2021-04-15T01:07:38.000Z | wrangling_scripts/figure1.py | DanielDaCosta/dashboardapp-daily-report | beb336d7993558c17fada8b1675b6982dc4c1f62 | [
"MIT"
] | null | null | null | wrangling_scripts/figure1.py | DanielDaCosta/dashboardapp-daily-report | beb336d7993558c17fada8b1675b6982dc4c1f62 | [
"MIT"
] | null | null | null | import pandas as pd
from datetime import timedelta
import warnings
import plotly.graph_objs as go
warnings.filterwarnings("ignore")
def daily_average(path_csv):
"""Return the daily average of a specific region
Params:
path_csv (str): CSV path
Returns:
(dict): Dictionary containing the it... | 41.553957 | 90 | 0.596607 |
b26c8f4cfd5bfec6bf681941f0672fc58010b70c | 20,403 | py | Python | flask_user/user_manager.py | Jonazon/Flask-User | 6f74fd0dd52858b18af95f70e2ef8a888451fe6c | [
"MIT"
] | null | null | null | flask_user/user_manager.py | Jonazon/Flask-User | 6f74fd0dd52858b18af95f70e2ef8a888451fe6c | [
"MIT"
] | null | null | null | flask_user/user_manager.py | Jonazon/Flask-User | 6f74fd0dd52858b18af95f70e2ef8a888451fe6c | [
"MIT"
] | null | null | null | """This module implements the main UserManager class for Flask-User.
"""
# Author: Ling Thio <ling.thio@gmail.com>
# Copyright (c) 2013 Ling Thio'
import datetime
from flask import abort, Blueprint, current_app, Flask, session
from flask_login import LoginManager
from wtforms import ValidationError
from . import Co... | 43.226695 | 125 | 0.638681 |
2c00fcea97861e86dc948bdc282bc69c33bd95c3 | 632 | py | Python | src/genGraph_MPL.py | QuangVuong85/Dijkstra.GUI.PyQt5 | 835ea0b6a059c78036d2ded63c56d7d3be5864bb | [
"bzip2-1.0.6"
] | 1 | 2020-06-16T11:23:58.000Z | 2020-06-16T11:23:58.000Z | src/genGraph_MPL.py | QuangVuong85/Dijkstra.GUI.PyQt5 | 835ea0b6a059c78036d2ded63c56d7d3be5864bb | [
"bzip2-1.0.6"
] | null | null | null | src/genGraph_MPL.py | QuangVuong85/Dijkstra.GUI.PyQt5 | 835ea0b6a059c78036d2ded63c56d7d3be5864bb | [
"bzip2-1.0.6"
] | null | null | null | import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
G = nx.Graph() # Create empty graph
G.add_nodes_from(["A", "B", "C"]) # Add nodes
# Add edges
G.add_edge("A", "B", weight=5)
G.add_edge("B", "C", weight=7)
G.add_edge("C", "A", weight=2)
# Create drawing
pos = nx.spring_layout(G) # List of... | 25.28 | 63 | 0.712025 |
5dca669a19f6be67bb22f3024d4e8dc3e975cec3 | 959 | py | Python | ch03-first-api/main.py | hedrickbt/talkpython-fastapi | 633ee7b6ebfa78933b14fceed0c62884382363a1 | [
"MIT"
] | null | null | null | ch03-first-api/main.py | hedrickbt/talkpython-fastapi | 633ee7b6ebfa78933b14fceed0c62884382363a1 | [
"MIT"
] | null | null | null | ch03-first-api/main.py | hedrickbt/talkpython-fastapi | 633ee7b6ebfa78933b14fceed0c62884382363a1 | [
"MIT"
] | null | null | null | import json
from typing import Optional
import fastapi
import uvicorn
api = fastapi.FastAPI()
@api.get('/')
def index():
body = """
<html>
<body style='padding: 10px;'>
<h1>Welcome to the API</h1>
<div>
Try it: <a href='/api/calculate/?x=7&y=11'>/api/calculate/?x=7&y=11</a>
</div>
</... | 20.847826 | 108 | 0.567258 |
87fc76c329f2e8847e137d56bf7cb0db55137664 | 1,028 | py | Python | nodes/Object/GetObjectVisibility.py | atticus-lv/RenderNode | 8a4797a2186b76fedebc5d634cff298e69089474 | [
"Apache-2.0"
] | 17 | 2021-11-21T09:26:55.000Z | 2022-03-09T06:56:01.000Z | nodes/Object/GetObjectVisibility.py | atticus-lv/RenderNode | 8a4797a2186b76fedebc5d634cff298e69089474 | [
"Apache-2.0"
] | 1 | 2021-12-05T13:02:48.000Z | 2021-12-06T08:02:34.000Z | nodes/Object/GetObjectVisibility.py | atticus-lv/RenderNode | 8a4797a2186b76fedebc5d634cff298e69089474 | [
"Apache-2.0"
] | 4 | 2021-11-23T14:49:34.000Z | 2021-12-30T15:04:58.000Z | import bpy
from bpy.props import *
from ...nodes.BASE.node_base import RenderNodeBase
class RenderNodeGetObjectVisibility(RenderNodeBase):
bl_idname = 'RenderNodeGetObjectVisibility'
bl_label = 'Get Object Visibility'
def init(self, context):
self.create_input('RenderNodeSocketObject', 'object', ... | 33.16129 | 118 | 0.707198 |
77d901fe533ab9577189b18398e74e3ccc566d95 | 17,159 | bzl | Python | tools/cpp/windows_cc_configure.bzl | keithkml/bazel | 174d14fda916c89fbd8a3c9411588bbe87826a83 | [
"Apache-2.0"
] | null | null | null | tools/cpp/windows_cc_configure.bzl | keithkml/bazel | 174d14fda916c89fbd8a3c9411588bbe87826a83 | [
"Apache-2.0"
] | null | null | null | tools/cpp/windows_cc_configure.bzl | keithkml/bazel | 174d14fda916c89fbd8a3c9411588bbe87826a83 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=g-bad-file-header
# Copyright 2016 The Bazel 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
... | 46.375676 | 164 | 0.612157 |
8ccc8b3d27312583a70a938e6d75532553fbcce0 | 39,129 | py | Python | chronolapsegui.py | ZirconCode/chronolapse | 2cdc68e9615ab5bb1dc7e7f0f20006f32b373cfe | [
"MIT"
] | 1 | 2021-02-10T17:35:43.000Z | 2021-02-10T17:35:43.000Z | chronolapsegui.py | ZirconCode/chronolapse | 2cdc68e9615ab5bb1dc7e7f0f20006f32b373cfe | [
"MIT"
] | null | null | null | chronolapsegui.py | ZirconCode/chronolapse | 2cdc68e9615ab5bb1dc7e7f0f20006f32b373cfe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: ISO-8859-15 -*-
#
# generated by wxGlade 0.6.8 (standalone edition) on Sun Oct 02 12:29:06 2016
#
import wx
# begin wxGlade: dependencies
import gettext
from gettext import gettext as _
# end wxGlade
# begin wxGlade: extracode
class ProgressPanel(wx.Panel):
def __init__(self,... | 55.34512 | 225 | 0.69092 |
a733a21c979d47ef4c2df8b2c22c64ef087f45db | 626 | py | Python | anytask/schools/models.py | bcskda/anytask | 5a359dcb669b689fc5a4f1705f2c88cd031ab37d | [
"MIT"
] | null | null | null | anytask/schools/models.py | bcskda/anytask | 5a359dcb669b689fc5a4f1705f2c88cd031ab37d | [
"MIT"
] | 1 | 2021-03-01T07:42:38.000Z | 2021-03-01T09:14:10.000Z | anytask/schools/models.py | bcskda/anytask | 5a359dcb669b689fc5a4f1705f2c88cd031ab37d | [
"MIT"
] | null | null | null | from django.db import models
from django.core.urlresolvers import reverse
from courses.models import Course
# Create your models here.
class School(models.Model):
name = models.CharField(max_length=191, db_index=True, null=False, blank=False)
link = models.CharField(max_length=191, db_index=False, null=False... | 29.809524 | 84 | 0.731629 |
1aad2b6f042c9f6b4c05a2958fdef275ce029673 | 44 | py | Python | cb_scripts/ifttt/__init__.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | 1 | 2022-02-05T06:39:05.000Z | 2022-02-05T06:39:05.000Z | cb_scripts/ifttt/__init__.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | null | null | null | cb_scripts/ifttt/__init__.py | christopher-burke/python-scripts | bdbea2456130e0958b6a6ab8d138f4f19b39b934 | [
"MIT"
] | 1 | 2021-06-10T22:04:35.000Z | 2021-06-10T22:04:35.000Z | from .ifttt_event_trigger import post_ifttt
| 22 | 43 | 0.886364 |
96a97c075a94bc135b10cf3aa77374ebe692e250 | 1,833 | py | Python | taiga/front/sitemaps/__init__.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | null | null | null | taiga/front/sitemaps/__init__.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | 12 | 2019-11-25T14:08:32.000Z | 2021-06-24T10:35:51.000Z | taiga/front/sitemaps/__init__.py | threefoldtech/Threefold-Circles | cbc433796b25cf7af9a295af65d665a4a279e2d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesรบs Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragรกn <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | 29.095238 | 74 | 0.756137 |
13ee9fa78dd76b287cdd70f300a95e0f3b9ddc60 | 2,031 | py | Python | test/functional/rpc_getaddressinfo_labels_purpose_deprecation.py | asuka431/fujicoin-0.20.0 | 82b1f5dc5480f6585a90ef9cc47fd9cd6c55def2 | [
"MIT"
] | 1 | 2022-03-16T02:39:39.000Z | 2022-03-16T02:39:39.000Z | test/functional/rpc_getaddressinfo_labels_purpose_deprecation.py | asuka431/fujicoin-0.20.0 | 82b1f5dc5480f6585a90ef9cc47fd9cd6c55def2 | [
"MIT"
] | null | null | null | test/functional/rpc_getaddressinfo_labels_purpose_deprecation.py | asuka431/fujicoin-0.20.0 | 82b1f5dc5480f6585a90ef9cc47fd9cd6c55def2 | [
"MIT"
] | 1 | 2022-03-26T10:30:47.000Z | 2022-03-26T10:30:47.000Z | #!/usr/bin/env python3
# Copyright (c) 2020-2019 The Baricoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test deprecation of RPC getaddressinfo `labels` returning an array
containing a JSON object of `name`... | 41.44898 | 114 | 0.706548 |
4523188e880314a4982c26c9b50e7faf0c67555b | 9,897 | py | Python | Source/chrome/build/android/pylib/constants/__init__.py | yury-s/v8-inspector | 0ab4779e0909d387f243f41ca2621237cdb0c7fe | [
"BSD-3-Clause"
] | 20 | 2015-08-26T06:46:00.000Z | 2019-02-27T09:05:58.000Z | Source/chrome/build/android/pylib/constants/__init__.py | yury-s/v8-inspector | 0ab4779e0909d387f243f41ca2621237cdb0c7fe | [
"BSD-3-Clause"
] | null | null | null | Source/chrome/build/android/pylib/constants/__init__.py | yury-s/v8-inspector | 0ab4779e0909d387f243f41ca2621237cdb0c7fe | [
"BSD-3-Clause"
] | 2 | 2015-08-26T05:49:35.000Z | 2020-02-03T20:22:43.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Defines a set of constants shared by test runners and other scripts."""
# TODO(jbudorick): Split these constants into coherent modules.
# pylint: di... | 32.663366 | 80 | 0.68061 |
91f773ac7cd5264e0c54f0bc660fa782c38280d4 | 546 | py | Python | recipes/Python/252130_Write_a_plugin_for_ImageJ/recipe-252130.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/252130_Write_a_plugin_for_ImageJ/recipe-252130.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/252130_Write_a_plugin_for_ImageJ/recipe-252130.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | import ij
class Inverter_py(ij.plugin.filter.PlugInFilter):
def setup(self,arg, imp):
"""@sig public int setup(String arg, ij.ImagePlus imp)"""
return ij.plugin.filter.PlugInFilter.DOES_8G
def run(self,ip):
"""@sig public void run(ij.process.ImageProcessor ip)"""
pixels = ip.ge... | 32.117647 | 65 | 0.565934 |
3eb005492896b716fb6755b13ed0fb17aab84128 | 292 | py | Python | tests/challenges/test_array_reverse.py | aghyadalbalkhi-ASAC/data-structures-and-algorithms-python-401 | a7ffc3cbb1ffdead1e5a42733eba9f876e0fe57d | [
"MIT"
] | null | null | null | tests/challenges/test_array_reverse.py | aghyadalbalkhi-ASAC/data-structures-and-algorithms-python-401 | a7ffc3cbb1ffdead1e5a42733eba9f876e0fe57d | [
"MIT"
] | null | null | null | tests/challenges/test_array_reverse.py | aghyadalbalkhi-ASAC/data-structures-and-algorithms-python-401 | a7ffc3cbb1ffdead1e5a42733eba9f876e0fe57d | [
"MIT"
] | 5 | 2020-11-29T20:49:33.000Z | 2022-03-20T20:57:38.000Z | # put your array_reverse challenge tests here
from data_structures_and_algorithms.challenges.array_reverse.array_reverse import (
reverse_array,
)
# here's a test to get you started
def test_leave_as_is():
actual = reverse_array([1])
expected = [1]
assert actual == expected
| 26.545455 | 83 | 0.753425 |
7f495e63c10abc04d27b4b8aaca8ae60a28f3276 | 1,491 | py | Python | opsmgr/common/constants.py | open-power-ref-design-toolkit/opsmgr | ce9d5dc8a4038f22302a168288a6a4f6683dcd45 | [
"Apache-2.0"
] | 5 | 2017-05-10T00:32:37.000Z | 2019-08-21T09:32:01.000Z | opsmgr/common/constants.py | open-power-ref-design-toolkit/opsmgr | ce9d5dc8a4038f22302a168288a6a4f6683dcd45 | [
"Apache-2.0"
] | null | null | null | opsmgr/common/constants.py | open-power-ref-design-toolkit/opsmgr | ce9d5dc8a4038f22302a168288a6a4f6683dcd45 | [
"Apache-2.0"
] | 3 | 2017-05-10T00:32:40.000Z | 2018-10-16T19:18:18.000Z | # Copyright 2016, IBM US, 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 in writing... | 27.109091 | 74 | 0.729041 |
c699d9548fc2a247840f85ba0b784928ef0f631e | 5,755 | py | Python | heat/engine/clients/progress.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 1 | 2020-06-18T01:05:29.000Z | 2020-06-18T01:05:29.000Z | heat/engine/clients/progress.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | heat/engine/clients/progress.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 36.424051 | 78 | 0.686707 |
a2ec550b230b5f686a09a62d3cda4bd503507549 | 3,866 | py | Python | examples/demo/gloo/signals.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | examples/demo/gloo/signals.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | examples/demo/gloo/signals.py | shjoshi/vispy | 2f3d169aa60c738467e766c59096f51570483d6f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vispy: gallery 2
# Copyright (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Multiple digital signals.
"""
from vispy import gloo
from vispy import app
import numpy as np
import math
m = 20
n = 25000
x = n... | 29.51145 | 77 | 0.55044 |
b2c09e1dffb7a39eee87ceb9f275da7b4fefed2a | 2,131 | py | Python | astroquery/xmatch/tests/test_xmatch_remote.py | eteq/astroquery | 70db53f8f047a2ee3481fd3242e6b364bc1ca639 | [
"BSD-3-Clause"
] | 1 | 2021-03-20T00:07:01.000Z | 2021-03-20T00:07:01.000Z | astroquery/xmatch/tests/test_xmatch_remote.py | eteq/astroquery | 70db53f8f047a2ee3481fd3242e6b364bc1ca639 | [
"BSD-3-Clause"
] | 1 | 2016-01-15T14:46:02.000Z | 2016-01-15T14:46:02.000Z | astroquery/xmatch/tests/test_xmatch_remote.py | hamogu/astroquery | 9a2d1a2ecc4dbfafa6a39cf7a180bcf831a6266a | [
"BSD-3-Clause"
] | 1 | 2021-03-20T00:07:05.000Z | 2021-03-20T00:07:05.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os.path
from astropy.tests.helper import pytest, remote_data
from astropy.table import Table
from astropy.units import arcsec
from ...xmatch import XMatch
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
# fixture only used here to s... | 32.784615 | 77 | 0.666823 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.