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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eb20292fe912e4879839c814f005865710a297d2 | 4,872 | py | Python | pyexcel_openpyxlx/app.py | patarapolw/pyexcel-openpyxlx | 36512dfe5aae55d8a3a21f9cc2706b8a3dc6c0a2 | [
"MIT"
] | null | null | null | pyexcel_openpyxlx/app.py | patarapolw/pyexcel-openpyxlx | 36512dfe5aae55d8a3a21f9cc2706b8a3dc6c0a2 | [
"MIT"
] | null | null | null | pyexcel_openpyxlx/app.py | patarapolw/pyexcel-openpyxlx | 36512dfe5aae55d8a3a21f9cc2706b8a3dc6c0a2 | [
"MIT"
] | null | null | null | import openpyxl
from openpyxl.utils import get_column_letter
import ruamel.yaml as yaml
from pathlib import Path
# from copy import copy
class ExcelReader:
def __init__(self, filename):
self.wb = openpyxl.load_workbook(filename)
@staticmethod
def _to_styles(wb, skip_cell_formatting=True):
... | 44.697248 | 119 | 0.431445 |
db5a09e6080fc2d3709037971df14f242c463b1f | 356 | py | Python | asset/run.py | boltomli/Neo4j-Flask-Solutions | 66e6b3ae2041f2c822c62cd4061483f0fe8d2c48 | [
"Apache-2.0"
] | null | null | null | asset/run.py | boltomli/Neo4j-Flask-Solutions | 66e6b3ae2041f2c822c62cd4061483f0fe8d2c48 | [
"Apache-2.0"
] | null | null | null | asset/run.py | boltomli/Neo4j-Flask-Solutions | 66e6b3ae2041f2c822c62cd4061483f0fe8d2c48 | [
"Apache-2.0"
] | 1 | 2016-06-22T07:21:56.000Z | 2016-06-22T07:21:56.000Z | import sys
import os
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT)))
from asset import app
app.secret_key = os.urandom(24)
port = int(os.environ.get('PORT', 5000))... | 27.384615 | 103 | 0.735955 |
ab0d94861adfcab615929173ef18d149a6a5a9a1 | 18,436 | py | Python | gw_full_latest/CloudWAZIUP_old.py | rendikanyut/LowCostLoRaGw | a4bce0cf123ffeb48a01e779a62d76b1bf1c4486 | [
"Linux-OpenIB"
] | 654 | 2016-03-01T08:43:24.000Z | 2022-03-22T06:55:27.000Z | gw_full_latest/CloudWAZIUP_old.py | rendikanyut/LowCostLoRaGw | a4bce0cf123ffeb48a01e779a62d76b1bf1c4486 | [
"Linux-OpenIB"
] | 315 | 2016-02-25T10:36:11.000Z | 2022-03-31T20:59:21.000Z | gw_full_latest/CloudWAZIUP_old.py | rendikanyut/LowCostLoRaGw | a4bce0cf123ffeb48a01e779a62d76b1bf1c4486 | [
"Linux-OpenIB"
] | 388 | 2016-02-16T14:40:36.000Z | 2022-03-15T04:03:20.000Z | #-------------------------------------------------------------------------------
# Copyright 2018 Congduc Pham, University of Pau, France.
#
# Congduc.Pham@univ-pau.fr
#
# This file is part of the low-cost LoRa gateway developped at University of Pau
#
# This program is free software: you can redistribute it and/or mo... | 30.026059 | 160 | 0.711868 |
db1476df9e89479211ebbc6c04a1f7cc7d9b4d1b | 3,843 | py | Python | utils/build_swift/build_swift/defaults.py | jmgc/swift | 01c3c48674f72e76b093a2a894b94abbdb606c81 | [
"Apache-2.0"
] | 1 | 2021-01-26T11:32:57.000Z | 2021-01-26T11:32:57.000Z | utils/build_swift/build_swift/defaults.py | jmgc/swift | 01c3c48674f72e76b093a2a894b94abbdb606c81 | [
"Apache-2.0"
] | null | null | null | utils/build_swift/build_swift/defaults.py | jmgc/swift | 01c3c48674f72e76b093a2a894b94abbdb606c81 | [
"Apache-2.0"
] | 1 | 2021-09-11T08:43:53.000Z | 2021-09-11T08:43:53.000Z | # This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list o... | 28.051095 | 79 | 0.709342 |
760ff6885c4bf4fa615aea8d73f10c2b5d8cd889 | 18,092 | py | Python | deeplift/util.py | berleon/deeplift | 667f00b0359c093d7f707ff4f7cdb978ceba85eb | [
"MIT"
] | null | null | null | deeplift/util.py | berleon/deeplift | 667f00b0359c093d7f707ff4f7cdb978ceba85eb | [
"MIT"
] | null | null | null | deeplift/util.py | berleon/deeplift | 667f00b0359c093d7f707ff4f7cdb978ceba85eb | [
"MIT"
] | null | null | null | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import sys
import os
import os.path
import numpy as np
from collections import namedtuple
from collections import OrderedDict
import json
import deeplift
import tensorflow as tf
NEAR_ZERO_THRESHOLD = 10**(-7)
... | 42.172494 | 96 | 0.613973 |
8026bdd94c3b100fb9ee9d568b095ce4a702d4a9 | 232 | py | Python | nni/algorithms/compression/pytorch/auto_compress/__init__.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 9,680 | 2019-05-07T01:42:30.000Z | 2022-03-31T16:48:33.000Z | nni/algorithms/compression/pytorch/auto_compress/__init__.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,957 | 2019-05-06T21:44:21.000Z | 2022-03-31T09:21:53.000Z | nni/algorithms/compression/pytorch/auto_compress/__init__.py | dutxubo/nni | c16f4e1c89b54b8b80661ef0072433d255ad2d24 | [
"MIT"
] | 1,571 | 2019-05-07T06:42:55.000Z | 2022-03-31T03:19:24.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from .experiment import AutoCompressionExperiment
from .interface import AbstractAutoCompressionModule
from .utils import AutoCompressionSearchSpaceGenerator
| 33.142857 | 54 | 0.857759 |
856b47cbf14bb70242593d9e800f4b3ddb8ad8e3 | 8,175 | py | Python | pretrain.py | edd666/WeChat-Big-Data-Challenge-2021 | 4e4afc991a84047aed4e217635e65535542762cc | [
"Apache-2.0"
] | 1 | 2021-07-04T08:21:02.000Z | 2021-07-04T08:21:02.000Z | pretrain.py | edd666/WeChat-Big-Data-Challenge-2021 | 4e4afc991a84047aed4e217635e65535542762cc | [
"Apache-2.0"
] | null | null | null | pretrain.py | edd666/WeChat-Big-Data-Challenge-2021 | 4e4afc991a84047aed4e217635e65535542762cc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author : liaozhi
# @Time : 2021-07-01
# @Contact : liaozhi_edo@163.com
"""
ID特征处理(id_map)以及预训练embedding
"""
# packages
import numpy as np
import pandas as pd
from functools import reduce
from gensim.models import Word2Vec
from config import *
def get_feed_embedding():
"""
... | 36.013216 | 120 | 0.67474 |
fe774761650a46ddb195b0df073279576f0cda49 | 2,341 | py | Python | tools/init.py | Tatoeba/cppcms-skeleton | c4a7d3060915ce241f5eed38d0e951343ba84330 | [
"MIT"
] | 16 | 2015-03-03T13:03:59.000Z | 2021-12-27T10:19:59.000Z | tools/init.py | Tatoeba/cppcms-skeleton | c4a7d3060915ce241f5eed38d0e951343ba84330 | [
"MIT"
] | 1 | 2015-06-15T07:52:33.000Z | 2015-06-15T07:52:33.000Z | tools/init.py | Tatoeba/cppcms-skeleton | c4a7d3060915ce241f5eed38d0e951343ba84330 | [
"MIT"
] | 5 | 2015-09-14T14:01:05.000Z | 2017-08-23T11:28:01.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
#as we use symbolic links we need to do this
#to be able to import config.py
import sys
sys.path.append(".")
if (not os.path.isfile("config.py")):
sys.exit("you should first create a config.py file")
import config
import fileinput
import shutil
from move... | 26.602273 | 98 | 0.685177 |
9bf0da089a1e10be1fadffa28b9375c3e83a76e0 | 412 | py | Python | students/k33422/Alexandrin_Anton/practical_works/django_project_alexandrin/project_first_app/migrations/0005_alter_owner_password.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | 7 | 2021-09-02T08:20:58.000Z | 2022-01-12T11:48:07.000Z | students/k33422/Alexandrin_Anton/practical_works/django_project_alexandrin/project_first_app/migrations/0005_alter_owner_password.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | 76 | 2021-09-17T23:01:50.000Z | 2022-03-18T16:42:03.000Z | students/k33422/Alexandrin_Anton/practical_works/django_project_alexandrin/project_first_app/migrations/0005_alter_owner_password.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | 60 | 2021-09-04T16:47:39.000Z | 2022-03-21T04:41:27.000Z | # Generated by Django 3.2.9 on 2021-11-08 15:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project_first_app', '0004_auto_20211108_1541'),
]
operations = [
migrations.AlterField(
model_name='owner',
name='pa... | 21.684211 | 65 | 0.61165 |
397d783a0972e8a5f12c3e783035a4c5803020fa | 4,857 | py | Python | tests/testflows/rbac/tests/privileges/kill_query.py | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | 1 | 2022-02-27T15:21:20.000Z | 2022-02-27T15:21:20.000Z | tests/testflows/rbac/tests/privileges/kill_query.py | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | 16 | 2022-02-14T15:53:29.000Z | 2022-03-25T18:39:16.000Z | tests/testflows/rbac/tests/privileges/kill_query.py | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | null | null | null | from rbac.requirements import *
from rbac.helper.common import *
import rbac.helper.errors as errors
@TestSuite
def privilege_granted_directly_or_via_role(self, node=None):
"""Check that user is only able to execute KILL QUERY when they have required privilege, either directly or via role."""
role_name = f"ro... | 34.204225 | 125 | 0.607783 |
230162cb5bd35436f4003fc11bd2eb6578dcd5b6 | 23,757 | py | Python | gs_quant/markets/portfolio.py | hausea/gs-quant | 52b280b35cf8dcca55e1f124cbe65003aeee0ba6 | [
"Apache-2.0"
] | 1 | 2022-01-02T06:22:34.000Z | 2022-01-02T06:22:34.000Z | gs_quant/markets/portfolio.py | hausea/gs-quant | 52b280b35cf8dcca55e1f124cbe65003aeee0ba6 | [
"Apache-2.0"
] | null | null | null | gs_quant/markets/portfolio.py | hausea/gs-quant | 52b280b35cf8dcca55e1f124cbe65003aeee0ba6 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
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 applicablNe law or agreed to in writing,
software d... | 42.047788 | 120 | 0.635265 |
6773919c40b01cdbe4830dadfc5ecc51c31a7d7b | 59 | py | Python | source/appModules/winmail.py | davidhilton936/clone | 0889f95ef2d74f43b2c98f4d45bf09b0c605f1de | [
"bzip2-1.0.6"
] | 2 | 2019-04-27T11:28:51.000Z | 2019-04-27T11:31:36.000Z | source/appModules/winmail.py | davidhilton936/clone | 0889f95ef2d74f43b2c98f4d45bf09b0c605f1de | [
"bzip2-1.0.6"
] | 1 | 2017-08-08T00:44:17.000Z | 2017-08-08T00:44:17.000Z | source/appModules/winmail.py | davidhilton936/clone | 0889f95ef2d74f43b2c98f4d45bf09b0c605f1de | [
"bzip2-1.0.6"
] | 1 | 2020-04-30T19:14:00.000Z | 2020-04-30T19:14:00.000Z | #Uses the Outlook Express app module
from msimn import *
| 19.666667 | 37 | 0.762712 |
fedf397e6b2d7f3308449eb68f649f667d2feeeb | 4,436 | py | Python | grafeas/grafeas_v1/types/compliance.py | LaudateCorpus1/python-grafeas | 48aa298fa49d7992afb0a3b41fac4e80eb176251 | [
"Apache-2.0"
] | null | null | null | grafeas/grafeas_v1/types/compliance.py | LaudateCorpus1/python-grafeas | 48aa298fa49d7992afb0a3b41fac4e80eb176251 | [
"Apache-2.0"
] | null | null | null | grafeas/grafeas_v1/types/compliance.py | LaudateCorpus1/python-grafeas | 48aa298fa49d7992afb0a3b41fac4e80eb176251 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.685714 | 110 | 0.665014 |
eec92c4f1572e1e686bbb7ea4de5fd5b3befb3aa | 1,824 | py | Python | webware/MiddleKit/Design/SQLiteSQLGenerator.py | PeaceWorksTechnologySolutions/w4py3-middlekit | a9554e20c47010e7b0c0deee63e1786482c59a1c | [
"MIT"
] | 2 | 2020-10-31T09:12:58.000Z | 2021-02-20T13:52:14.000Z | webware/MiddleKit/Design/SQLiteSQLGenerator.py | WebwareForPython/w4py3-middlekit | f740e2d2d3a5c225d6b8f9eb27ac08f8deed47e6 | [
"MIT"
] | 2 | 2020-01-07T15:24:09.000Z | 2020-01-08T15:39:57.000Z | webware/MiddleKit/Design/SQLiteSQLGenerator.py | PeaceWorksTechnologySolutions/w4py3-middlekit | a9554e20c47010e7b0c0deee63e1786482c59a1c | [
"MIT"
] | 1 | 2021-09-27T21:04:18.000Z | 2021-09-27T21:04:18.000Z | import os
#from .SQLGenerator import SQLGenerator
from MiddleKit.Design.SQLGenerator import SQLGenerator
class SQLiteSQLGenerator(SQLGenerator):
def sqlSupportsDefaultValues(self):
return True
class Model(object):
def writeConnectToDatabase(self, generator, output, databasename):
pass
cl... | 24.32 | 85 | 0.650768 |
678dd5bd49556e784c70b412ca9ea012888816ea | 92 | py | Python | TOOL_NAME/__init__.py | rBrenick/maya-tool-template | 4a24bc178cb4fcd599d8a222feac534675c1ddb6 | [
"MIT"
] | 4 | 2019-06-06T21:58:00.000Z | 2020-12-21T04:01:42.000Z | TOOL_NAME/__init__.py | rBrenick/maya-tool-template | 4a24bc178cb4fcd599d8a222feac534675c1ddb6 | [
"MIT"
] | null | null | null | TOOL_NAME/__init__.py | rBrenick/maya-tool-template | 4a24bc178cb4fcd599d8a222feac534675c1ddb6 | [
"MIT"
] | 2 | 2019-02-03T11:32:40.000Z | 2020-12-06T18:11:59.000Z | # content
def main():
from TOOL_NAME import TOOL_NAME_ui
return TOOL_NAME_ui.main()
| 18.4 | 38 | 0.728261 |
c821b1437f122274cbbd9a892fc166c472980f4c | 11,023 | py | Python | examples/model_interpretation/task/similarity/LIME/lime_base.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | 1 | 2022-01-28T06:32:26.000Z | 2022-01-28T06:32:26.000Z | examples/model_interpretation/task/similarity/LIME/lime_base.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | null | null | null | examples/model_interpretation/task/similarity/LIME/lime_base.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | 1 | 2022-03-30T03:05:52.000Z | 2022-03-30T03:05:52.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 45.36214 | 101 | 0.56745 |
163d2e63761143468a6d26156251a8a3e4db93f5 | 1,161 | py | Python | examples/simple_reader_cellpy.py | streamengineer/cellpy | 59a83065297ce0ba370fc11181085c98f587101e | [
"MIT"
] | 38 | 2016-08-16T10:54:56.000Z | 2022-03-03T04:43:20.000Z | examples/simple_reader_cellpy.py | Ozzstein/cellpy | ee532905741db4cb928303d75426d2a4fa77144a | [
"MIT"
] | 88 | 2016-08-16T13:10:27.000Z | 2022-03-29T10:36:39.000Z | examples/simple_reader_cellpy.py | Ozzstein/cellpy | ee532905741db4cb928303d75426d2a4fa77144a | [
"MIT"
] | 13 | 2019-01-02T03:57:52.000Z | 2022-01-19T08:06:49.000Z | # -*- coding: utf-8 -*-
"""simple script for reading .res-files from arbin
This script uses the cellpy.cellreader.CellpyData object.
"""
import os
import sys
import matplotlib.pyplot as plt
from cellpy import cellreader
# from cellpy import prmreader, log
# log.setup_logging(default_level="DEBUG")
# prmreader.inf... | 20.732143 | 81 | 0.698536 |
a3a1019bb3af2bda0594e662b4d2bb7d47d0d2f4 | 2,937 | py | Python | src/data/sroie/__init__.py | marcospiau/final_project_ia376j | 2adfb147871be0259f16d472d527f3d2ea8a6ef5 | [
"MIT"
] | null | null | null | src/data/sroie/__init__.py | marcospiau/final_project_ia376j | 2adfb147871be0259f16d472d527f3d2ea8a6ef5 | [
"MIT"
] | null | null | null | src/data/sroie/__init__.py | marcospiau/final_project_ia376j | 2adfb147871be0259f16d472d527f3d2ea8a6ef5 | [
"MIT"
] | null | null | null | from typing import List, Dict, Union, Callable
import glob
import json
import os
from torch.utils.data import Dataset, DataLoader
import gin
SROIE_FIELDS_TO_EXTRACT = ['address', 'date', 'total', 'company']
def load_labels(key_path: str) -> dict:
"""Loads labels, filling missing values with empty string.
""... | 30.59375 | 79 | 0.676881 |
9f92da3458f798f1454c5d634352eca576ea935e | 5,650 | py | Python | asposewordscloud/models/requests/protect_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/protect_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/protect_document_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="protect_document_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a cop... | 45.2 | 170 | 0.655575 |
d58554564df36c248a2dcc567175b97f5cc776f4 | 1,035 | py | Python | 2021/12/part2.py | timofurrer/aoc-2020 | 446b688a57601d9891f520e43b7f822c373a6ff4 | [
"MIT"
] | null | null | null | 2021/12/part2.py | timofurrer/aoc-2020 | 446b688a57601d9891f520e43b7f822c373a6ff4 | [
"MIT"
] | null | null | null | 2021/12/part2.py | timofurrer/aoc-2020 | 446b688a57601d9891f520e43b7f822c373a6ff4 | [
"MIT"
] | null | null | null | from pathlib import Path
with (Path(__file__).parent / "input.txt").open() as puzzle_input_file:
puzzle_input_raw = puzzle_input_file.read()
from collections import defaultdict, deque, Counter
edges = [(a, b) for a, b in (line.split("-") for line in puzzle_input_raw.splitlines())]
# build graph
graph = defaultd... | 25.243902 | 88 | 0.662802 |
df6201fff299b0a7de5c209be35e8f53b3ba6ee5 | 5,191 | py | Python | gsan/tests/test_gsan.py | fictional-tribble/getaltname | 2c0a5949783e43cc58050cdd024e4f7ebdf1c111 | [
"MIT"
] | null | null | null | gsan/tests/test_gsan.py | fictional-tribble/getaltname | 2c0a5949783e43cc58050cdd024e4f7ebdf1c111 | [
"MIT"
] | 1 | 2018-10-04T05:03:23.000Z | 2018-10-04T05:03:23.000Z | gsan/tests/test_gsan.py | fictional-tribble/getaltname | 2c0a5949783e43cc58050cdd024e4f7ebdf1c111 | [
"MIT"
] | 1 | 2018-10-04T05:40:07.000Z | 2018-10-04T05:40:07.000Z | import io
import sys
import json
import unittest
from os import remove
from gsan.banner import banner
from gsan.get_san import get_san
from gsan.crt_sh import search_crt
from gsan.report import output, report_single, collect_report, nmap_output
from gsan.nmap_parsing import parse_nmap
class TestGetAltName(unittest.Te... | 38.169118 | 78 | 0.639568 |
a8eced596973d6178b085ba07f923bca4b2ba83a | 1,493 | py | Python | src/Pages/About.py | losek1/PyHash | 8eb8ebfae3e805b565c0780f34ac7a1c2f383ddb | [
"MIT"
] | 3 | 2019-05-20T23:04:29.000Z | 2020-03-25T02:26:27.000Z | src/Pages/About.py | losek1/PyHash | 8eb8ebfae3e805b565c0780f34ac7a1c2f383ddb | [
"MIT"
] | null | null | null | src/Pages/About.py | losek1/PyHash | 8eb8ebfae3e805b565c0780f34ac7a1c2f383ddb | [
"MIT"
] | 1 | 2019-05-20T23:04:36.000Z | 2019-05-20T23:04:36.000Z | from tkinter import ttk, PhotoImage
from os.path import join
class AboutPage(ttk.Frame):
def __init__(self: object, parent: object, props: dict) -> ttk.Frame:
super().__init__(parent, style='dark.TFrame')
# variables
theme = props['theme'].get_theme()
# icons cache
self.ico... | 48.16129 | 116 | 0.598794 |
e745b28c9454bb782f637fb8cc4ee4a09184a397 | 2,899 | py | Python | .github/download-commit-metadata.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 1 | 2021-02-26T16:46:32.000Z | 2021-02-26T16:46:32.000Z | .github/download-commit-metadata.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 1 | 2021-04-15T15:23:59.000Z | 2021-04-15T15:23:59.000Z | .github/download-commit-metadata.py | BertLindeman/pybricks-micropython | 8f22a99551100e66ddf08d014d9f442f22b33b4d | [
"MIT"
] | 1 | 2021-04-27T17:59:10.000Z | 2021-04-27T17:59:10.000Z | #!/usr/bin/env python3
"""Downloads pybricks-micropython commit data from GitHub and Azure."""
import json
import os
from pathlib import Path
from azure.cosmosdb.table.tableservice import TableService
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
GITHUB_TOKEN = os.environ["GITH... | 30.197917 | 74 | 0.55019 |
0d7c7e4b62ece1fdd5c74bcadecde4942eb2f007 | 1,426 | py | Python | launch/kuka_sunrise.launch.py | kroshu/ros2_kuka_sunrise | fad89aab3a7e388af15a04a6b5f4d992de9fd339 | [
"Apache-2.0"
] | 10 | 2020-02-10T08:02:00.000Z | 2022-03-30T15:47:06.000Z | launch/kuka_sunrise.launch.py | kroshu/ros2_kuka_sunrise | fad89aab3a7e388af15a04a6b5f4d992de9fd339 | [
"Apache-2.0"
] | 7 | 2020-10-02T09:31:23.000Z | 2022-03-31T23:47:14.000Z | launch/kuka_sunrise.launch.py | kroshu/ros2_kuka_sunrise | fad89aab3a7e388af15a04a6b5f4d992de9fd339 | [
"Apache-2.0"
] | 2 | 2020-02-10T08:18:15.000Z | 2020-05-22T03:05:01.000Z | # Copyright 2020 Zoltán Rési
#
# 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, ... | 39.611111 | 92 | 0.715288 |
d6bc30336a28d2babde28ed4b4e6203013e8e78c | 684 | py | Python | tests/fixtures/plugins/gemstones_inc/handlers.py | withrocks/commonlims | d8a925c917aa26e8205fefb3966a9f49f8f2e2f8 | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | tests/fixtures/plugins/gemstones_inc/handlers.py | withrocks/commonlims | d8a925c917aa26e8205fefb3966a9f49f8f2e2f8 | [
"BSD-3-Clause"
] | 99 | 2019-05-20T14:16:33.000Z | 2021-01-19T09:25:15.000Z | tests/fixtures/plugins/gemstones_inc/handlers.py | withrocks/commonlims | d8a925c917aa26e8205fefb3966a9f49f8f2e2f8 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T07:55:40.000Z | 2020-08-10T07:55:40.000Z | from __future__ import absolute_import
from tests.fixtures.plugins.gemstones.handlers \
import GemstoneSubstancesSubmission
from .models import GemstoneSample
class GemstoneSubstancesSubmissionEx(GemstoneSubstancesSubmission):
def handle(self, file_obj):
print("The industry is handling this!!!") # ... | 31.090909 | 82 | 0.682749 |
bec96f7672d6ce4a313a899b9b4e9e3c0d36a833 | 2,933 | py | Python | sqli_platform/challenges/sesqli1/views.py | Xistens/SQLi-Sandbox | 1b6a1652b6b10f20653451ae9ac2d06d283a5f0e | [
"MIT"
] | 1 | 2022-01-05T04:31:24.000Z | 2022-01-05T04:31:24.000Z | sqli_platform/challenges/sesqli1/views.py | Xistens/SQLi-Sandbox | 1b6a1652b6b10f20653451ae9ac2d06d283a5f0e | [
"MIT"
] | null | null | null | sqli_platform/challenges/sesqli1/views.py | Xistens/SQLi-Sandbox | 1b6a1652b6b10f20653451ae9ac2d06d283a5f0e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from flask import (
render_template,
Blueprint,
current_app,
redirect,
url_for,
session,
request,
flash
)
from sqli_platform import (app, clog, db)
from sqli_platform.utils.challenge import (
get_flag,
get_config,
format_query,
hash_pwd,
login_r... | 27.411215 | 163 | 0.633822 |
1db9870b5ba23012faf0214d344aa84c5541b65b | 487 | py | Python | 4.1 binary.py | syeddabeer/0projects | e132628f3693ed40c5ea9055a6c79f8266196bae | [
"Apache-2.0"
] | 1 | 2020-04-06T04:41:56.000Z | 2020-04-06T04:41:56.000Z | 4.1 binary.py | rahul263-stack/quarantine | d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09 | [
"MIT"
] | null | null | null | 4.1 binary.py | rahul263-stack/quarantine | d8b1cfe0da8cad9fe2f3bbd427334b979c7d2c09 | [
"MIT"
] | null | null | null | # python3
seq = [int(i) for i in input().split()]
search_seq = [int(i) for i in input().split()]
n = seq[0]
seq = seq[1:]
def binary_search(seq, elt, r):
l = 0
while l<=r:
m = (l+r)//2
if elt > seq[m]:
l = m + 1
elif elt < seq[m]:
r = m - 1
else:
... | 19.48 | 46 | 0.482546 |
a5a77a601c0365ea8707a0a5e3a0555e2c7fb951 | 7,188 | py | Python | src/containerapp/azext_containerapp/_ssh_utils.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | src/containerapp/azext_containerapp/_ssh_utils.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | src/containerapp/azext_containerapp/_ssh_utils.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 39.933333 | 118 | 0.661102 |
9b2f5137609e77d760989651ec9b6e15e7a68aad | 3,751 | py | Python | tools/rnahmm/algbioi/core/sequence.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | 88 | 2017-11-20T01:30:40.000Z | 2022-03-31T07:29:25.000Z | tools/rnahmm/algbioi/core/sequence.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | 121 | 2017-11-15T09:03:38.000Z | 2022-03-24T09:50:59.000Z | tools/rnahmm/algbioi/core/sequence.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | 35 | 2017-12-14T08:19:40.000Z | 2022-03-03T11:26:46.000Z | #!/usr/bin/env python
"""
Copyright (C) 2014 Ivan Gregor
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | 34.412844 | 89 | 0.683551 |
142bd0b51fe14694ca6914c60870d639bf8f52d2 | 2,819 | py | Python | app/marksapp/tests/test_pagination.py | CFelipe/marks | cc7e42eca9599f7e9df96f93c764faadf15f9bea | [
"MIT"
] | 21 | 2019-05-13T12:54:47.000Z | 2022-01-10T19:51:26.000Z | app/marksapp/tests/test_pagination.py | CFelipe/marks | cc7e42eca9599f7e9df96f93c764faadf15f9bea | [
"MIT"
] | 19 | 2018-11-18T20:10:09.000Z | 2019-11-16T02:47:38.000Z | app/marksapp/tests/test_pagination.py | CFelipe/marks | cc7e42eca9599f7e9df96f93c764faadf15f9bea | [
"MIT"
] | 1 | 2022-02-23T16:23:06.000Z | 2022-02-23T16:23:06.000Z | from django.test import TestCase
from django.contrib.auth.models import User
from marksapp.models import Tag, Bookmark
import marksapp.views as views
def marks_names(marks):
return [m.name for m in marks]
class PaginateTests(TestCase):
@classmethod
def setUpTestData(cls):
User.objects.create_use... | 39.704225 | 88 | 0.654842 |
1da5581d228b9058d5081a922310d72d63b191df | 685 | py | Python | src/esputils.py | gwvsol/ESP8266-NTP-Clock-Weather | 1096c96a393c0a89fb401859a67f70f71322eea3 | [
"MIT"
] | 1 | 2019-03-20T06:26:08.000Z | 2019-03-20T06:26:08.000Z | src/esputils.py | gwvsol/ESP8266-NTP-Clock-Weather | 1096c96a393c0a89fb401859a67f70f71322eea3 | [
"MIT"
] | null | null | null | src/esputils.py | gwvsol/ESP8266-NTP-Clock-Weather | 1096c96a393c0a89fb401859a67f70f71322eea3 | [
"MIT"
] | null | null | null | from time import localtime
from espconfig import *
"""Здесь реализованы методы для использования во всем проекте"""
debug = config['debug']
def log(*args):
"""Метод для логирования данных приложения"""
local = localtime()
year = local[0]
month = local[1] if local[1] >= 10 else '0{}'.format(local[1])
... | 36.052632 | 96 | 0.608759 |
664a612fa8f1361ed1afbdf59c4480bfb481f793 | 53 | py | Python | ancli/__init__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | 1 | 2020-10-24T16:08:14.000Z | 2020-10-24T16:08:14.000Z | ancli/__init__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | null | null | null | ancli/__init__.py | devforfu/ancli | 44ea37e756fb12221bfafc1ecae3b8ef46d84cce | [
"MIT"
] | null | null | null | from .ancli import make_cli
__all__ = ['make_cli']
| 10.6 | 27 | 0.716981 |
9191e7e2f024e2fc3b00b888b4c26249cc987005 | 969 | py | Python | mac/google-cloud-sdk/lib/surface/recommender/insights/__init__.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/surface/recommender/insights/__init__.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | mac/google-cloud-sdk/lib/surface/recommender/insights/__init__.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 35.888889 | 74 | 0.77193 |
5fc87244c310073bf26080c165e44f56e93fb594 | 730 | py | Python | HW4/main.py | atenagm1375/bio-inspired_computing | 439bed89877d2c887f3138847659390956b4bed6 | [
"MIT"
] | 3 | 2019-01-29T14:07:16.000Z | 2019-02-04T06:34:04.000Z | HW4/main.py | atenagm1375/bio-inspired_computing | 439bed89877d2c887f3138847659390956b4bed6 | [
"MIT"
] | null | null | null | HW4/main.py | atenagm1375/bio-inspired_computing | 439bed89877d2c887f3138847659390956b4bed6 | [
"MIT"
] | null | null | null | from read_data import read_data
from utils import *
# parametes
temperature = 10000
cooling_rate = 0.000003
cities, distances = read_data()
tour = generate_initial_solution(cities)
best = tour
while temperature > 1:
print(temperature)
new_tour = get_neighbour(tour)
current_energy = get_distance(tour, dis... | 28.076923 | 77 | 0.683562 |
9ae0be873dc41e3c7c58e1296543b8762922ecb5 | 49 | py | Python | _site/lectures/Week 02 - Processing files, Making Web Requests/support.py | BrianKolowitz/data-focused-python | 80c9345717745c54c77445e30452a9e9d9df6e5d | [
"MIT"
] | 29 | 2019-03-20T22:02:52.000Z | 2021-11-03T12:46:20.000Z | lectures/Week 02 - Processing files, Making Web Requests/support.py | xiangyuzeng/data-focused-python | db0b289875b1cc01744c126cf0f54d4d70d5d2af | [
"MIT"
] | 2 | 2019-10-31T20:36:36.000Z | 2019-10-31T20:36:36.000Z | lectures/Week 02 - Processing files, Making Web Requests/support.py | xiangyuzeng/data-focused-python | db0b289875b1cc01744c126cf0f54d4d70d5d2af | [
"MIT"
] | 33 | 2019-03-20T22:45:40.000Z | 2022-01-26T03:56:59.000Z | def print_func( par ):
print(f"Hello : {par}") | 24.5 | 26 | 0.612245 |
9b0cde81cc791ad3ef710ced337fb74e0e0f807b | 1,080 | py | Python | hail/python/hail/experimental/__init__.py | atgenomix/hail | ceb85fc87544b5dceabe64213e3c5acaaae6a05e | [
"MIT"
] | 1 | 2020-03-25T01:53:50.000Z | 2020-03-25T01:53:50.000Z | hail/python/hail/experimental/__init__.py | atgenomix/hail | ceb85fc87544b5dceabe64213e3c5acaaae6a05e | [
"MIT"
] | null | null | null | hail/python/hail/experimental/__init__.py | atgenomix/hail | ceb85fc87544b5dceabe64213e3c5acaaae6a05e | [
"MIT"
] | null | null | null | from .ldscore import ld_score
from .ld_score_regression import ld_score_regression
from .expressions import *
from .filtering_allele_frequency import filtering_allele_frequency
from .haplotype_freq_em import haplotype_freq_em
from .plots import hail_metadata, plot_roc_curve
from .phase_by_transmission import *
from .da... | 34.83871 | 66 | 0.708333 |
3b4942e6cf4eae018e703d118eada4d3a0da2750 | 3,478 | py | Python | challanges/print_level_order/k_tree.py | Patricia888/data-structures-and-algorithms | 8963acf857b9f7069eeeea2884b41376986c3d7c | [
"MIT"
] | null | null | null | challanges/print_level_order/k_tree.py | Patricia888/data-structures-and-algorithms | 8963acf857b9f7069eeeea2884b41376986c3d7c | [
"MIT"
] | null | null | null | challanges/print_level_order/k_tree.py | Patricia888/data-structures-and-algorithms | 8963acf857b9f7069eeeea2884b41376986c3d7c | [
"MIT"
] | null | null | null | from queue import Queue
class Node: # pragma: no cover
"""create a node"""
def __init__(self, val=None):
self.val = val
self.children = []
def __repr__(self):
return 'Node Val: {}'.format(self.val)
def __str__(self):
return f'Node value is {self.val}'
class KTree: ... | 26.753846 | 93 | 0.530477 |
385ffef5feefd076a46435a86ae040018f934de1 | 4,374 | py | Python | travelperk_http_python/scim/users.py | namelivia/travelperk-http-python | c6cbd88c999a49f7d61ae040029ca3e91ce72cae | [
"MIT"
] | 2 | 2021-08-30T12:34:26.000Z | 2021-08-31T07:56:12.000Z | travelperk_http_python/scim/users.py | namelivia/travelperk-http-python | c6cbd88c999a49f7d61ae040029ca3e91ce72cae | [
"MIT"
] | 6 | 2021-07-15T16:13:06.000Z | 2022-03-03T09:45:07.000Z | travelperk_http_python/scim/users.py | namelivia/travelperk-http-python | c6cbd88c999a49f7d61ae040029ca3e91ce72cae | [
"MIT"
] | null | null | null | from typing import List, TYPE_CHECKING
import humps
from travelperk_http_python.scim.users_query import UsersQuery
from travelperk_python_api_types.scim.users.user import User
from travelperk_http_python.scim.create_user_query import CreateUserQuery
from travelperk_http_python.scim.name_input_params import NameInputPar... | 38.707965 | 88 | 0.669639 |
f1dcf781599706c922a2a3803c253880c63caf48 | 61,250 | py | Python | tests/models.py | vault-the/peewee | cd07f4e01a1262166d8944736e11d0681fb76214 | [
"MIT"
] | null | null | null | tests/models.py | vault-the/peewee | cd07f4e01a1262166d8944736e11d0681fb76214 | [
"MIT"
] | null | null | null | tests/models.py | vault-the/peewee | cd07f4e01a1262166d8944736e11d0681fb76214 | [
"MIT"
] | null | null | null | import datetime
import sys
import time
import unittest
from peewee import *
from peewee import sqlite3
from .base import db
from .base import get_in_memory_db
from .base import new_connection
from .base import requires_models
from .base import skip_case_unless
from .base import skip_if
from .base import skip_unless
f... | 35.693473 | 79 | 0.552114 |
e9e6e88c2ed789f8f9b61270c5a60c9e768a1e57 | 8,906 | py | Python | pycqed/measurement/distortions/module_distortions.py | ZW7436/PycQED_py3 | dcc19dbaedd226112a2f98a7985dcf2bab2c9734 | [
"MIT"
] | 1 | 2019-07-05T13:41:51.000Z | 2019-07-05T13:41:51.000Z | pycqed/measurement/distortions/module_distortions.py | ball199578/PycQED_py3 | dcc19dbaedd226112a2f98a7985dcf2bab2c9734 | [
"MIT"
] | null | null | null | pycqed/measurement/distortions/module_distortions.py | ball199578/PycQED_py3 | dcc19dbaedd226112a2f98a7985dcf2bab2c9734 | [
"MIT"
] | null | null | null | """
module for distortion correction
"""
import matplotlib.pyplot as plt
import sys
sys.path.append("D:/Repository/PyCQED_py3")
import pycqed.measurement.kernel_functions_vector as kf
from pycqed.analysis import fitting_models as fit_mods
import numpy as np
from imp import reload
reload(kf)
"""
prepare the kernel to... | 32.742647 | 88 | 0.670671 |
4af0ddf656da3ef28ed1692a67caf857970d9bc6 | 23,549 | py | Python | kvmagent/kvmagent/plugins/zses.py | wh872743880/zstack-utility | e8ba863514a62a2e5ede6ed27dd50e4307086ce7 | [
"Apache-2.0"
] | null | null | null | kvmagent/kvmagent/plugins/zses.py | wh872743880/zstack-utility | e8ba863514a62a2e5ede6ed27dd50e4307086ce7 | [
"Apache-2.0"
] | null | null | null | kvmagent/kvmagent/plugins/zses.py | wh872743880/zstack-utility | e8ba863514a62a2e5ede6ed27dd50e4307086ce7 | [
"Apache-2.0"
] | null | null | null | import os.path
import zstacklib.utils.uuidhelper as uuidhelper
from kvmagent import kvmagent
from kvmagent.plugins.imagestore import ImageStoreClient
from zstacklib.utils import jsonobject
from zstacklib.utils import shell
from zstacklib.utils.bash import *
from zstacklib.utils.report import *
logger = log.get_logger... | 40.32363 | 198 | 0.653956 |
9e19e2585095bc3eb884ba1d76fea0ffc91e7117 | 2,071 | py | Python | geneagrapher_lib/graph/node.py | pnpnpn/geneagrapher | 76b900a53bdaf874373eb29344b6e70a4e5a8f8f | [
"MIT"
] | 22 | 2018-11-19T09:16:24.000Z | 2022-03-26T12:20:26.000Z | geneagrapher_lib/graph/node.py | pnpnpn/geneagrapher | 76b900a53bdaf874373eb29344b6e70a4e5a8f8f | [
"MIT"
] | 7 | 2019-10-22T11:30:39.000Z | 2022-02-08T18:42:25.000Z | geneagrapher_lib/graph/node.py | pnpnpn/geneagrapher | 76b900a53bdaf874373eb29344b6e70a4e5a8f8f | [
"MIT"
] | 8 | 2020-07-04T17:03:37.000Z | 2021-11-17T03:46:04.000Z | import functools
from .record import Record
@functools.total_ordering
class Node:
"""
Container class storing a node in the graph.
"""
def __init__(self, record, ancestors, descendants):
"""
Node class constructor.
Parameters:
record: instance of the Record class
... | 26.21519 | 67 | 0.566393 |
3b069e9e535419ca95a34441fd35447670056122 | 4,891 | py | Python | wbb/modules/info.py | tekavci/sticker | 05165cbed620452a582665f463055a9d9ab85c35 | [
"MIT"
] | null | null | null | wbb/modules/info.py | tekavci/sticker | 05165cbed620452a582665f463055a9d9ab85c35 | [
"MIT"
] | null | null | null | wbb/modules/info.py | tekavci/sticker | 05165cbed620452a582665f463055a9d9ab85c35 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 TheHamkerCat
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, ... | 32.825503 | 78 | 0.679411 |
85764430259d55911c026bda1c2ecf97b076d6f0 | 12,668 | py | Python | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/common/retry.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/common/retry.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/common/retry.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from abc i... | 41.263844 | 123 | 0.631828 |
6bcaae0ee9c327de946fd97a773ceb421a152ed4 | 4,509 | py | Python | packages/python/plotly/plotly/graph_objs/histogram/_unselected.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/histogram/_unselected.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/histogram/_unselected.py | eranws/plotly.py | 5b0e8d3ccab55fe1a6e4ba123cfc9d718a9ffc5a | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Unselected(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram"
_path_str = "histogram.unselected"
_valid_props = {"marker", "textfont"}
... | 30.466216 | 83 | 0.549346 |
21f88bbce8a86d675744e28e5e48aa6b9c96b4bc | 5,406 | py | Python | zaqar/storage/errors.py | vkmc/zaqar-websocket | a93c460a28e541b5cc8b425d5fb4d69e78ab9f4b | [
"Apache-2.0"
] | 1 | 2015-03-22T18:41:13.000Z | 2015-03-22T18:41:13.000Z | zaqar/storage/errors.py | vkmc/zaqar-websocket | a93c460a28e541b5cc8b425d5fb4d69e78ab9f4b | [
"Apache-2.0"
] | null | null | null | zaqar/storage/errors.py | vkmc/zaqar-websocket | a93c460a28e541b5cc8b425d5fb4d69e78ab9f4b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 Red Hat, 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 writ... | 27.865979 | 75 | 0.677026 |
69d19d5f95b509a75bd25baa2ffd2dfaa342cbbe | 1,564 | py | Python | pytype/pytd/pep484_test.py | gvanrossum/pytype | 0a804598271167b4fbb1f6a9664faef0918745f4 | [
"Apache-2.0"
] | 11 | 2017-02-12T12:19:50.000Z | 2022-03-06T08:56:48.000Z | pytype/pytd/pep484_test.py | gvanrossum/pytype | 0a804598271167b4fbb1f6a9664faef0918745f4 | [
"Apache-2.0"
] | null | null | null | pytype/pytd/pep484_test.py | gvanrossum/pytype | 0a804598271167b4fbb1f6a9664faef0918745f4 | [
"Apache-2.0"
] | 2 | 2017-06-27T14:41:57.000Z | 2021-12-05T11:27:33.000Z | import unittest
from pytype.pytd import pep484
from pytype.pytd import pytd
from pytype.pytd.parse import parser_test_base
class TestPEP484(parser_test_base.ParserTest):
"""Test the visitors in optimize.py."""
DEFAULT_PYTHON_VERSION = (2, 7)
def convert(self, t, python_version=None):
"""Run ConvertTypingT... | 31.918367 | 74 | 0.670077 |
c0304c76a15a7f66ecca0428bb024ffe93ee2d37 | 973 | py | Python | app/day19_1.py | pcalg/AdventOfCode2019 | 93b55414c7ad13d2d74d1dea1df98dd481b94d5a | [
"MIT"
] | null | null | null | app/day19_1.py | pcalg/AdventOfCode2019 | 93b55414c7ad13d2d74d1dea1df98dd481b94d5a | [
"MIT"
] | 6 | 2020-02-04T20:45:02.000Z | 2020-02-04T20:45:03.000Z | app/day19_1.py | pcalg/AdventOfCode2019 | 93b55414c7ad13d2d74d1dea1df98dd481b94d5a | [
"MIT"
] | null | null | null | """
solution AdventOfCode 2019 day 19 part 1.
https://adventofcode.com/2019/day/19.
author: pca
"""
from general.general import read_file
from general.general import get_location_input_files
from general.general import measure
from app.int_machine import IntMachine
from collections import defaultdict
from general.v... | 21.152174 | 78 | 0.595067 |
0687db4d5fc0a8d1ed04c39ecc6d6006ca25f8ef | 75 | py | Python | 01-python/safety/policestation.py | JamesKunstle/bootstrap_open_source_workflow | c6e02f76188b1040af7647fec89b54fd0a43ed10 | [
"MIT"
] | null | null | null | 01-python/safety/policestation.py | JamesKunstle/bootstrap_open_source_workflow | c6e02f76188b1040af7647fec89b54fd0a43ed10 | [
"MIT"
] | null | null | null | 01-python/safety/policestation.py | JamesKunstle/bootstrap_open_source_workflow | c6e02f76188b1040af7647fec89b54fd0a43ed10 | [
"MIT"
] | null | null | null | def draw_policestation():
print("police station not found")
return
| 18.75 | 37 | 0.706667 |
b7ee8640f4e824110b2901502c6ab8ec1f990d52 | 5,041 | py | Python | sigproc.py | vuthanh3298/SpeakRecognize | e2ff97c816328984b9a80bc95f2bec08ac95a3fb | [
"MIT"
] | 9 | 2015-04-15T07:06:12.000Z | 2017-10-22T16:56:22.000Z | sigproc.py | vuthanh3298/SpeakRecognize | e2ff97c816328984b9a80bc95f2bec08ac95a3fb | [
"MIT"
] | 2 | 2015-09-07T08:05:24.000Z | 2016-08-20T09:11:31.000Z | sigproc.py | RomelioTavas/Speech-Recognition-ANN | edc647e52cde97aaba3e95368c80f31f14514ae7 | [
"MIT"
] | 5 | 2020-06-04T07:05:55.000Z | 2021-09-06T09:00:49.000Z | # This file includes routines for basic signal processing including framing and computing power spectra.
# Author: James Lyons 2012
import numpy
import math
def framesig(sig,frame_len,frame_step,winfunc=lambda x:numpy.ones((1,x))):
"""Frame a signal into overlapping frames.
:param sig: the audio signal to fr... | 44.219298 | 143 | 0.689942 |
0c5e0b1b1874a6af2a63396ae3c87f150f890632 | 6,045 | py | Python | bouncer/authorizer.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | 8 | 2017-09-24T03:11:46.000Z | 2021-08-24T04:29:14.000Z | bouncer/authorizer.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | null | null | null | bouncer/authorizer.py | DentonGentry/gfiber-platform | 2ba5266103aad0b7b676555eebd3c2061ddb8333 | [
"Apache-2.0"
] | 1 | 2017-10-05T23:04:10.000Z | 2017-10-05T23:04:10.000Z | #!/usr/bin/python
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.159794 | 116 | 0.696112 |
a1814445a29f23e6da8785686ca3b3972de0211c | 1,788 | py | Python | django/conf/locale/it/formats.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | 1 | 2021-11-22T17:41:19.000Z | 2021-11-22T17:41:19.000Z | django/conf/locale/it/formats.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | null | null | null | django/conf/locale/it/formats.py | skyl/django | 843e7450ddcb820b2bdc6d47d6c4aab9820a46c4 | [
"BSD-3-Clause"
] | 1 | 2020-06-03T07:55:20.000Z | 2020-06-03T07:55:20.000Z | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' # 25 Ottobre 2006
TIME_FOR... | 40.636364 | 77 | 0.531879 |
1274b900c9c7f144a111b32f877b7f040a291d05 | 252 | py | Python | noise/extras/meta/modifier/factory.py | mgp25/noise | 8560849fa4a1d6e938adde27d26572f4da16e422 | [
"MIT"
] | 6 | 2019-05-02T09:40:53.000Z | 2021-05-18T00:18:30.000Z | noise/extras/meta/modifier/factory.py | mgp25/noise | 8560849fa4a1d6e938adde27d26572f4da16e422 | [
"MIT"
] | null | null | null | noise/extras/meta/modifier/factory.py | mgp25/noise | 8560849fa4a1d6e938adde27d26572f4da16e422 | [
"MIT"
] | null | null | null | from noise.extras.meta.modifier import MAP_MODIFIER
class ModifierFactory(object):
def get_modifier(self, name):
if name in MAP_MODIFIER:
return MAP_MODIFIER[name]()
raise ValueError("Unsupported modifier: %s" % name)
| 28 | 59 | 0.694444 |
c494d688052ed700130f7a6c76f8ed287d4f7235 | 4,383 | py | Python | contrib/seeds/generate-seeds.py | mejackmac324/monkycoin | b87847517d4340547929ff52b7b8d291c90e6ad3 | [
"MIT"
] | 1 | 2020-08-17T17:30:25.000Z | 2020-08-17T17:30:25.000Z | contrib/seeds/generate-seeds.py | mejackmac324/monkycoin | b87847517d4340547929ff52b7b8d291c90e6ad3 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | mejackmac324/monkycoin | b87847517d4340547929ff52b7b8d291c90e6ad3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.307143 | 99 | 0.583619 |
d7cd1a55a1b828d3ad8c070430e8e4da59344282 | 5,525 | py | Python | asciidoxy/generator/context.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | asciidoxy/generator/context.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | asciidoxy/generator/context.py | lurch/asciidoxy | 9781ba696637fadbf62f1b7c5da843b0d292007d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019-2020, TomTom (http://tomtom.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 38.636364 | 100 | 0.659186 |
79a386ea2aaf6ad79611c0697c99910eebd52695 | 34 | py | Python | letsencrypt/tests/display/__init__.py | impressiver/letsencrypt | f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa | [
"Apache-2.0"
] | 6 | 2015-09-13T21:58:27.000Z | 2019-11-15T07:07:36.000Z | letsencrypt/tests/display/__init__.py | ingochris/letsencrypt | f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa | [
"Apache-2.0"
] | null | null | null | letsencrypt/tests/display/__init__.py | ingochris/letsencrypt | f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa | [
"Apache-2.0"
] | 7 | 2017-08-10T21:33:51.000Z | 2021-06-03T15:53:50.000Z | """Let's Encrypt Display Tests"""
| 17 | 33 | 0.676471 |
3fbd2cdc54943e49cf0b0759b5c1ed9fb39a0fc5 | 3,854 | py | Python | itembase/core/migrations/0010_auto_20200203_1418.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | null | null | null | itembase/core/migrations/0010_auto_20200203_1418.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | 9 | 2020-01-17T14:16:08.000Z | 2020-02-18T15:07:40.000Z | itembase/core/migrations/0010_auto_20200203_1418.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.9 on 2020-02-03 20:18
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0009_auto_20200203_0752'),
]
operations = [
migrations.AlterField(... | 38.158416 | 173 | 0.609237 |
27191e31a917b14aab3a34bd3da9891fab004c57 | 2,874 | py | Python | webapi/app.py | mbasanta/projective-detective | 0903fde77ab7c4dadbb37273a863e4cf8be1c5a0 | [
"MIT"
] | null | null | null | webapi/app.py | mbasanta/projective-detective | 0903fde77ab7c4dadbb37273a863e4cf8be1c5a0 | [
"MIT"
] | 1 | 2015-08-12T13:44:42.000Z | 2015-08-12T13:44:42.000Z | webapi/app.py | mbasanta/projective-detective | 0903fde77ab7c4dadbb37273a863e4cf8be1c5a0 | [
"MIT"
] | null | null | null | #!flask/bin/python
'''Main Flask App'''
# pylint: disable=import-error
# pylint: disable=invalid-name
# pylint: disable=too-few-public-methods
# pylint: disable=unused-argument
from flask import Flask, jsonify, make_response, request, abort
from flask.ext.cors import CORS
import ctypes
import os
app = Flask(__name_... | 28.455446 | 94 | 0.666319 |
1d3af2beba52290f634ed67a1eb894ff170d7a56 | 670 | py | Python | manage.py | rkumar0106/rkumars_Chatbox_1 | 0248965d1b2c3c38c99142421ef61d7bf2934fb3 | [
"Apache-2.0"
] | null | null | null | manage.py | rkumar0106/rkumars_Chatbox_1 | 0248965d1b2c3c38c99142421ef61d7bf2934fb3 | [
"Apache-2.0"
] | null | null | null | manage.py | rkumar0106/rkumars_Chatbox_1 | 0248965d1b2c3c38c99142421ef61d7bf2934fb3 | [
"Apache-2.0"
] | 1 | 2021-02-25T07:43:52.000Z | 2021-02-25T07:43:52.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
import os
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'visit.settings')
try:
from django.core.management import execute_from_command_line
exce... | 29.130435 | 73 | 0.680597 |
a746c23496da49b978c7f5b984296884c151bb34 | 22 | py | Python | pydavid/pydavid/__init__.py | neuro-team-femto/david | 2ac4f3eccc927560b4faa2b11b08b31c8b5b5992 | [
"Unlicense",
"MIT"
] | 2 | 2018-02-12T14:31:14.000Z | 2020-02-27T22:53:05.000Z | pydavid/pydavid/__init__.py | neuro-team-femto/david | 2ac4f3eccc927560b4faa2b11b08b31c8b5b5992 | [
"Unlicense",
"MIT"
] | null | null | null | pydavid/pydavid/__init__.py | neuro-team-femto/david | 2ac4f3eccc927560b4faa2b11b08b31c8b5b5992 | [
"Unlicense",
"MIT"
] | 1 | 2018-09-27T10:11:25.000Z | 2018-09-27T10:11:25.000Z | from pydavid import *
| 11 | 21 | 0.772727 |
d7b30e1210a1ee27302ea57ec23c7fa9f4e2ab3b | 22 | py | Python | dnaweaver/version.py | jlerman44/DnaWeaver | 3ae9cf6020c9dc0ac257e6dbaff7fbd3b29a2d53 | [
"MIT"
] | 127 | 2018-09-21T22:27:17.000Z | 2022-03-30T21:11:49.000Z | dnaweaver/version.py | jlerman44/DnaWeaver | 3ae9cf6020c9dc0ac257e6dbaff7fbd3b29a2d53 | [
"MIT"
] | 171 | 2018-08-06T07:10:24.000Z | 2022-03-29T00:59:53.000Z | dnaweaver/version.py | jlerman44/DnaWeaver | 3ae9cf6020c9dc0ac257e6dbaff7fbd3b29a2d53 | [
"MIT"
] | 50 | 2018-08-12T22:50:46.000Z | 2022-03-23T07:52:47.000Z | __version__ = "0.3.6"
| 11 | 21 | 0.636364 |
ec5b1fde78f9cfc90ec2de75eb233bc29c3d5a99 | 3,771 | py | Python | test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py | tasherif-msft/autorest.python | 5b0121bcfa802aedaeda36990e8bcaa2b7e26b14 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py | tasherif-msft/autorest.python | 5b0121bcfa802aedaeda36990e8bcaa2b7e26b14 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/operations/_operation_group_two_operations.py | tasherif-msft/autorest.python | 5b0121bcfa802aedaeda36990e8bcaa2b7e26b14 | [
"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 ... | 42.370787 | 133 | 0.670379 |
200fb19da479dd66c774834c1d124baa723a066c | 86 | py | Python | cloudnetpy/__init__.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | 1 | 2021-11-16T15:23:24.000Z | 2021-11-16T15:23:24.000Z | cloudnetpy/__init__.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | cloudnetpy/__init__.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | from .cloudnetarray import CloudnetArray, RadarArray
from .version import __version__
| 28.666667 | 52 | 0.860465 |
578898f88e66a51464540f70c04f743f0b7f0480 | 4,644 | py | Python | profiles_api/views.py | rcenamsi/profiles-rest-api | 781a50fd7b41e491bfe31b6a9348c6b28a18c693 | [
"MIT"
] | null | null | null | profiles_api/views.py | rcenamsi/profiles-rest-api | 781a50fd7b41e491bfe31b6a9348c6b28a18c693 | [
"MIT"
] | 5 | 2021-04-08T19:59:44.000Z | 2022-02-10T10:54:44.000Z | profiles_api/views.py | rcenamsi/profiles-rest-api | 781a50fd7b41e491bfe31b6a9348c6b28a18c693 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.views import ObtainAuthToken
from res... | 36.857143 | 83 | 0.670112 |
11b4f33fe3251fe9d5e2fa5a709d50980bca2054 | 1,373 | py | Python | realsense-basics/app.py | Daksh-404/spatial-ai-webinar-repo | 1457e17fd1b9b15dc0e5996f319e3d70baf1fe3c | [
"Apache-2.0"
] | null | null | null | realsense-basics/app.py | Daksh-404/spatial-ai-webinar-repo | 1457e17fd1b9b15dc0e5996f319e3d70baf1fe3c | [
"Apache-2.0"
] | null | null | null | realsense-basics/app.py | Daksh-404/spatial-ai-webinar-repo | 1457e17fd1b9b15dc0e5996f319e3d70baf1fe3c | [
"Apache-2.0"
] | 1 | 2020-07-14T04:20:22.000Z | 2020-07-14T04:20:22.000Z | import time
import edgeiq
import sys
import numpy as np
"""
Use this app with the RealSense camera to create a video stream
and depth_colormap were objects that are blue are closer,
and those farther away will be shifted toward the red color
spectrum
"""
def main():
serial_numbers = []
text = "RealSense Camer... | 26.403846 | 81 | 0.597961 |
a6ccb9da942e0fef759a54c61d2ea362d1685610 | 540 | py | Python | docsrc/defs/md/PyTorch/o50-dna1000-fc50.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o50-dna1000-fc50.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o50-dna1000-fc50.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | 2 | 2021-06-14T20:27:40.000Z | 2021-06-14T20:29:29.000Z | import torch
class TorchModel(torch.nn.Module):
def __init__(self):
super().__init__()
INPUT_CHANNELS: int = 4
INPUT_WIDTH: int = 1000
FC_NUM_UNITS: int = 50
OUTPUT_UNITS: int = 50
self.model = torch.nn.Sequential(
torch.nn.Flatten(),
torch.... | 24.545455 | 72 | 0.57037 |
cd9342ab7fa81947e0ef851f8924d3cba93c39e2 | 394 | py | Python | 0x0A-python-inheritance/11-square.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/11-square.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/11-square.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | 4 | 2018-05-01T05:04:15.000Z | 2020-04-28T22:22:54.000Z | #!/usr/bin/python3
'''9-base_geometry.py'''
Rectangle = __import__('9-rectangle').Rectangle
class Square(Rectangle):
def __init__(self, size):
super().integer_validator(size, size)
super().__init__(size, size)
self.size = size
def area(self):
return self.size ** 2
def __... | 21.888889 | 60 | 0.616751 |
c8e96244455dd5cb9e1fec3fb954e3b8a0d7ecec | 26,290 | py | Python | bridgedb/test/test_email_autoresponder.py | jugheadjones10/bridgedb | 94d6bca4b22458c156898785d8f6ccedf562d884 | [
"BSD-3-Clause-Clear"
] | null | null | null | bridgedb/test/test_email_autoresponder.py | jugheadjones10/bridgedb | 94d6bca4b22458c156898785d8f6ccedf562d884 | [
"BSD-3-Clause-Clear"
] | null | null | null | bridgedb/test/test_email_autoresponder.py | jugheadjones10/bridgedb | 94d6bca4b22458c156898785d8f6ccedf562d884 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of BridgeDB, a Tor bridge distribution system.
#
# :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org>
# please also see AUTHORS file
# :copyright: (c) 2013, Isis Lovecruft
# (c) 2007-2013, The Tor Project, Inc.
# (c) 2007-201... | 45.881326 | 101 | 0.660517 |
bbc687e456c6887db545316903f0fc620ae1eeb6 | 2,629 | py | Python | core/controllers/questions_list.py | NoumanMasood/oppia | 55d8b0bbe6e034672a87889d3244156a43596132 | [
"Apache-2.0"
] | 1 | 2019-11-05T09:32:39.000Z | 2019-11-05T09:32:39.000Z | core/controllers/questions_list.py | TakorLucila/oppia | 393a81474ddc02b7141eed80f33c720cde447517 | [
"Apache-2.0"
] | null | null | null | core/controllers/questions_list.py | TakorLucila/oppia | 393a81474ddc02b7141eed80f33c720cde447517 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 38.661765 | 79 | 0.704831 |
05416bee3842307ae5ff9a5c00b45070925d9134 | 675 | py | Python | cpdb/document_cloud/management/commands/update_documents.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/document_cloud/management/commands/update_documents.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/document_cloud/management/commands/update_documents.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | import logging
from django.core.management.base import BaseCommand
from document_cloud.importers import DocumentCloudAttachmentImporter
logger = logging.getLogger('crawler.update_documents')
class Command(BaseCommand):
help = 'Update complaint documents info'
def add_arguments(self, parser):
parse... | 25.961538 | 68 | 0.666667 |
405be86c488df5d8d0cc25527c7f5bba8313ac3a | 3,639 | py | Python | configs/gfocal/gfocal_r101_fpn_ms2x.py | jms0923/gfl2_mmdet29 | a0d20df44516b6b344e25c745e07f77d34a46ae3 | [
"Apache-2.0"
] | 426 | 2020-10-16T08:09:27.000Z | 2022-03-30T03:36:04.000Z | configs/gfocal/gfocal_r101_fpn_ms2x.py | chisyliu/GFocalV2 | 2a55a572d25ced5de8b74651e73d2fb2a0feef0d | [
"Apache-2.0"
] | 35 | 2020-11-26T14:33:57.000Z | 2022-03-29T01:40:15.000Z | configs/gfocal/gfocal_r101_fpn_ms2x.py | chisyliu/GFocalV2 | 2a55a572d25ced5de8b74651e73d2fb2a0feef0d | [
"Apache-2.0"
] | 47 | 2020-11-26T02:48:03.000Z | 2022-03-06T09:28:54.000Z | _base_ = [
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
model = dict(
type='GFL',
pretrained='torchvision://resnet101',
backbone=dict(
type='ResNet',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
... | 29.827869 | 77 | 0.604836 |
1190bedce22ea57736456b93baa146f986dc045b | 4,874 | py | Python | CADRE/power_dymos/power_cell_voltage.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/power_dymos/power_cell_voltage.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/power_dymos/power_cell_voltage.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | """
Power discipline for CADRE: Power Cell Voltage component.
"""
from __future__ import print_function, division, absolute_import
from six.moves import range
import os
import numpy as np
from openmdao.api import ExplicitComponent
from MBI import MBI
class PowerCellVoltage(ExplicitComponent):
"""
Compute t... | 34.323944 | 82 | 0.526467 |
cfc2c98e540f5120f87e56e60268883f9e5181c8 | 680 | py | Python | networks/RFCN/psroi_pool.py | SionHu/LP-MOT | 90e6a1d51ebe1a948ac5c018a5ee560654e824f1 | [
"MIT"
] | null | null | null | networks/RFCN/psroi_pool.py | SionHu/LP-MOT | 90e6a1d51ebe1a948ac5c018a5ee560654e824f1 | [
"MIT"
] | null | null | null | networks/RFCN/psroi_pool.py | SionHu/LP-MOT | 90e6a1d51ebe1a948ac5c018a5ee560654e824f1 | [
"MIT"
] | null | null | null | from torch.nn.modules.module import Module
import sys
from psroi_poolfunction import PSRoIPoolingFunction
class PSRoIPool(Module):
def __init__(self, pooled_height, pooled_width, spatial_scale, group_size, output_dim):
super(PSRoIPool, self).__init__()
self.pooled_width = int(pooled_width)
... | 40 | 144 | 0.745588 |
61d49243430b781db8b12bc81bacc3ce44d8ef14 | 20,618 | py | Python | homeassistant/components/knx/__init__.py | GuyKh/core | 859bcb6eb4dbb9a8b87b6e4e888e074502db5df1 | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | homeassistant/components/knx/__init__.py | GuyKh/core | 859bcb6eb4dbb9a8b87b6e4e888e074502db5df1 | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/knx/__init__.py | GuyKh/core | 859bcb6eb4dbb9a8b87b6e4e888e074502db5df1 | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """Support KNX devices."""
from __future__ import annotations
import asyncio
import logging
from typing import Final
import voluptuous as vol
from xknx import XKNX
from xknx.core import XknxConnectionState
from xknx.core.telegram_queue import TelegramQueue
from xknx.dpt import DPTArray, DPTBase, DPTBinary
from xknx.e... | 35.487091 | 97 | 0.626297 |
9380d84f5a3535b6f8f5054b21ba239c8ff96243 | 4,204 | py | Python | pymonad/test/MonadTester.py | bjd2385/pymonad | baec7a540d9195b2da029d1a101edd7c385f94bb | [
"BSD-3-Clause"
] | null | null | null | pymonad/test/MonadTester.py | bjd2385/pymonad | baec7a540d9195b2da029d1a101edd7c385f94bb | [
"BSD-3-Clause"
] | null | null | null | pymonad/test/MonadTester.py | bjd2385/pymonad | baec7a540d9195b2da029d1a101edd7c385f94bb | [
"BSD-3-Clause"
] | null | null | null | # -----------------------------------------------------------------------------------------------------
# (c) Copyright 2014 by Jason DeLaat.
# Licensed under BSD 3-clause licence.
#
# This file contains helper classes and functions to make monad tests more readable and maintainable.
# ---------------------------------... | 35.327731 | 103 | 0.632017 |
bc80a9dc773c8047bd76cd5fc4030f937ca08283 | 528 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/OES/texture_npot.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/OES/texture_npot.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/OES/texture_npot.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES1 import _types as _cs
# End users want this...
from OpenGL.raw.GLES1._types import *
from OpenGL.raw.GLES1 import _errors
from OpenGL.constant import Constant as _C
... | 33 | 120 | 0.774621 |
e49d2934396f244f30a0f494c0250d6ab22c0112 | 2,126 | py | Python | pytorch_translate/test/test_average_checkpoints.py | fstahlberg/translate | b9fa0aa60b6e098dd0d29c636e9a7a0eeaf8d2f1 | [
"BSD-3-Clause"
] | 11 | 2019-04-28T07:29:04.000Z | 2021-08-16T03:37:08.000Z | pytorch_translate/test/test_average_checkpoints.py | fstahlberg/translate | b9fa0aa60b6e098dd0d29c636e9a7a0eeaf8d2f1 | [
"BSD-3-Clause"
] | null | null | null | pytorch_translate/test/test_average_checkpoints.py | fstahlberg/translate | b9fa0aa60b6e098dd0d29c636e9a7a0eeaf8d2f1 | [
"BSD-3-Clause"
] | 7 | 2019-11-17T20:07:47.000Z | 2021-04-20T13:16:42.000Z | #!/usr/bin/env python3
import collections
import numpy as np
import os
import tempfile
import torch
import unittest
from pytorch_translate.average_checkpoints import average_checkpoints
class AverageCheckpointsTest(unittest.TestCase):
def test_average_checkpoints(self):
params_0 = collections.OrderedDic... | 33.21875 | 77 | 0.516463 |
af767ed96677667b9dbbcf9c60e7baae866b8f0c | 668 | py | Python | geotrek/outdoor/tests/test_admin.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/outdoor/tests/test_admin.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | geotrek/outdoor/tests/test_admin.py | GeotrekCE/Geotrek | c1393925c1940ac795ab7fc04819cd8c78bc79fb | [
"BSD-2-Clause"
] | null | null | null | from django.contrib.admin import AdminSite
from django.test import TestCase
from geotrek.outdoor.admin import RatingAdmin
from geotrek.outdoor.tests.factories import RatingFactory
from geotrek.outdoor.models import Rating
class AdminTest(TestCase):
def test_color_markup(self):
rating = RatingFactory(color... | 37.111111 | 102 | 0.729042 |
589d5c8c5204094fa7c291c2277731e1a6dfde20 | 25,742 | py | Python | rlpyt/runners/async_rl.py | alex-petrenko/rlpyt | 600264d7b5b9915e1e68a6a891902b5182c41068 | [
"MIT"
] | 1 | 2020-03-16T21:18:12.000Z | 2020-03-16T21:18:12.000Z | rlpyt/runners/async_rl.py | alex-petrenko/rlpyt | 600264d7b5b9915e1e68a6a891902b5182c41068 | [
"MIT"
] | null | null | null | rlpyt/runners/async_rl.py | alex-petrenko/rlpyt | 600264d7b5b9915e1e68a6a891902b5182c41068 | [
"MIT"
] | null | null | null |
import time
import multiprocessing as mp
import psutil
import torch
from collections import deque
import math
from rlpyt.runners.base import BaseRunner
from rlpyt.utils.quick_args import save__init__args
from rlpyt.utils.logging import logger
from rlpyt.utils.collections import AttrDict
from rlpyt.utils.seed import s... | 42.269294 | 189 | 0.641481 |
8bb05b950e9d24c3757c7059c22beb6ca97466fe | 723 | py | Python | migrations/versions/ed3110b30b84_.py | pbraunstein/trackercise | d0b00f4f3a6bd33462a16787ee92c82dde5dfadd | [
"MIT"
] | null | null | null | migrations/versions/ed3110b30b84_.py | pbraunstein/trackercise | d0b00f4f3a6bd33462a16787ee92c82dde5dfadd | [
"MIT"
] | 165 | 2016-12-12T03:03:07.000Z | 2017-08-25T11:23:57.000Z | migrations/versions/ed3110b30b84_.py | pbraunstein/trackercise | d0b00f4f3a6bd33462a16787ee92c82dde5dfadd | [
"MIT"
] | null | null | null | """Make Users table compatible with Flask-Login
Revision ID: ed3110b30b84
Revises: 1eb512e3a41e
Create Date: 2017-01-16 15:28:40.324500
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ed3110b30b84'
down_revision = '1eb512e3a41e'
branch_labels = None
depends_on... | 24.931034 | 83 | 0.719225 |
489694da7ed7b43e47e2bc4cd10cc32e1276739c | 213 | py | Python | rooms/admin.py | studentisgss/booking | e0e28f42cf2a466688b4ea3787eb28dbc0980cac | [
"MIT"
] | 7 | 2015-12-11T19:18:39.000Z | 2020-10-30T12:50:19.000Z | rooms/admin.py | studentisgss/booking | e0e28f42cf2a466688b4ea3787eb28dbc0980cac | [
"MIT"
] | 119 | 2015-11-03T22:21:09.000Z | 2021-03-17T21:36:49.000Z | rooms/admin.py | studentisgss/booking | e0e28f42cf2a466688b4ea3787eb28dbc0980cac | [
"MIT"
] | null | null | null | from django.contrib import admin
from rooms.models import *
# Register your models here.
admin.site.register(Room)
admin.site.register(RoomPermission)
admin.site.register(RoomRule)
admin.site.register(Building)
| 21.3 | 35 | 0.812207 |
4e15a16e7054f74152998327fa0dc0b36d226f6e | 965 | py | Python | cdk_stacks/vpc.py | aws-samples/aws-dms-cdc-data-pipeline | 8b94884e1b8d89c5c44b73a83810a936f05ec748 | [
"MIT-0"
] | 3 | 2022-03-16T02:01:45.000Z | 2022-03-21T09:32:38.000Z | cdk_stacks/vpc.py | aws-samples/aws-dms-cdc-data-pipeline | 8b94884e1b8d89c5c44b73a83810a936f05ec748 | [
"MIT-0"
] | null | null | null | cdk_stacks/vpc.py | aws-samples/aws-dms-cdc-data-pipeline | 8b94884e1b8d89c5c44b73a83810a936f05ec748 | [
"MIT-0"
] | null | null | null | #!/usr/bin/env python3
import os
from aws_cdk import (
Stack,
aws_ec2,
)
from constructs import Construct
class VpcStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
#XXX: For createing Amazon MWAA in the existing VP... | 26.081081 | 76 | 0.659067 |
9b0ec4f584c6a3e54f226809382c58cec044d1b5 | 1,613 | py | Python | Project Number Plate.py | jaiyesh/Computer-Vision | 4902a7cf84f088851dc1c3e490fead54da3a3686 | [
"MIT"
] | null | null | null | Project Number Plate.py | jaiyesh/Computer-Vision | 4902a7cf84f088851dc1c3e490fead54da3a3686 | [
"MIT"
] | null | null | null | Project Number Plate.py | jaiyesh/Computer-Vision | 4902a7cf84f088851dc1c3e490fead54da3a3686 | [
"MIT"
] | null | null | null | import cv2
#####################
frameWidth = 640
frameHeight = 480
nPlateCascade = cv2.CascadeClassifier('Resources/haarcascades/haarcascade_russian_plate_number.xml') # Pretarained model
minArea = 500
color = (255,0,255)
################################
cap = cv2.VideoCapture(0)
#Video is sequence o... | 35.844444 | 122 | 0.619343 |
a03f588fb40ad3bfba02b2404c90d7979b8a5739 | 441 | py | Python | apps/main/urls.py | andrewixl/peopleshop | 51f9d8595838bdd0f4802b49d7508a8d9ab1b5f9 | [
"MIT"
] | null | null | null | apps/main/urls.py | andrewixl/peopleshop | 51f9d8595838bdd0f4802b49d7508a8d9ab1b5f9 | [
"MIT"
] | 6 | 2020-02-11T23:27:43.000Z | 2022-03-11T23:15:41.000Z | apps/main/urls.py | andrewixl/peopleshop | 51f9d8595838bdd0f4802b49d7508a8d9ab1b5f9 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^categories/(?P<id>\w+)/$', views.categories),
url(r'^product/(?P<type_id>\w+)/(?P<product_id>\d+)/$', views.product),
url(r'^promotions/$', views.promotions),
url(r'^contact/$', views.conta... | 33.923077 | 75 | 0.639456 |
6395d7ca75f6d7eeac31114b9b932d987efade32 | 50,443 | py | Python | python/ccxt/async_support/bw.py | atoll6/ccxt | 3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780 | [
"MIT"
] | 1 | 2018-08-20T09:38:13.000Z | 2018-08-20T09:38:13.000Z | python/ccxt/async_support/bw.py | atoll6/ccxt | 3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780 | [
"MIT"
] | null | null | null | python/ccxt/async_support/bw.py | atoll6/ccxt | 3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780 | [
"MIT"
] | 1 | 2021-09-16T08:33:31.000Z | 2021-09-16T08:33:31.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 44.878114 | 281 | 0.455544 |
4842d9c7e1b259a40767ffab9b0101007873a96a | 36,703 | py | Python | imperative/python/megengine/functional/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/functional/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/functional/tensor.py | kagome1007/MegEngine | 6814cf1cd7bfae05f1ca22a5b79a09244028c7fd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | 32.083042 | 131 | 0.573114 |
15fa9d0dac2ac8b1a074158dd8f0a14d51fdd79e | 31,207 | py | Python | ostap/fitting/models_3d.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | 14 | 2017-03-24T12:38:08.000Z | 2022-02-21T05:00:57.000Z | ostap/fitting/models_3d.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | 10 | 2019-03-08T18:48:42.000Z | 2022-03-22T11:59:48.000Z | ostap/fitting/models_3d.py | TatianaOvsiannikova/ostap | a005a78b4e2860ac8f4b618e94b4b563b2eddcf1 | [
"BSD-3-Clause"
] | 11 | 2017-03-23T15:29:58.000Z | 2022-02-21T05:03:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file ostap/fitting/models_3d.py
# Smooth non-factorizable 3D-models to describe background distribtions
# @author Vanya BELYAEV Ivan.Belyaeve@itep.ru
# @date 2017-11-20
# ================... | 40.581274 | 119 | 0.460121 |
cc078183b9659cb89a6221cd5257ce35a9b6b8dc | 12,832 | py | Python | lib/python2.7/site-packages/fabric/sftp.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/fabric/sftp.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/fabric/sftp.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | from __future__ import with_statement
import hashlib
import os
import posixpath
import stat
import re
from fnmatch import filter as fnfilter
from fabric.state import output, connections, env
from fabric.utils import warn
from fabric.context_managers import settings
def _format_local(local_path, local_is_path):
... | 40.1 | 95 | 0.575047 |
4a4bbc6fae90077053553d51ce7e223f97b010ff | 106 | py | Python | tests/bench/bytealloc-1-bytes_n.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 692 | 2016-12-19T23:25:35.000Z | 2022-03-31T14:20:48.000Z | tests/bench/bytealloc-1-bytes_n.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 509 | 2017-03-28T19:37:18.000Z | 2022-03-31T20:31:43.000Z | tests/bench/bytealloc-1-bytes_n.py | learnforpractice/micropython-cpp | 004bc8382f74899e7b876cc29bfa6a9cc976ba10 | [
"MIT"
] | 228 | 2016-12-19T05:03:30.000Z | 2022-03-22T18:13:00.000Z | import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)
| 13.25 | 38 | 0.613208 |
95dc49ea7b87cf72b28cbecada917eacc0f9193c | 3,521 | py | Python | testUtils.py | ChaosGroup/vray_gltf | 6ec192d677e9a5ffa7e63420aaffcabda554d4eb | [
"MIT"
] | 20 | 2021-05-24T10:22:44.000Z | 2022-03-18T07:25:27.000Z | testUtils.py | ChaosGroup/vray_gltf | 6ec192d677e9a5ffa7e63420aaffcabda554d4eb | [
"MIT"
] | null | null | null | testUtils.py | ChaosGroup/vray_gltf | 6ec192d677e9a5ffa7e63420aaffcabda554d4eb | [
"MIT"
] | 2 | 2022-02-28T07:50:59.000Z | 2022-03-04T03:06:49.000Z | import vray
import math
import Gltf_Parser.cameraUtils as camUtils
def _set_testing_material(renderer,node):
#make default material for testing
testTexture = renderer.classes.TexEdges()
testTexture.edges_tex = vray.AColor(1,0.0,0.0,1)
testTexture.bg_tex = vray.AColor(0.3481481, 0.8, 0.3481481, 1)
testTexture.wid... | 33.216981 | 169 | 0.737575 |
cce6dab1303adb0576db1bf87ae43eafa30b5278 | 294 | py | Python | 03_Object-Oriented Programming/02_attribute.py | Deaddy0430/python_learning | 198dd07bb5e710e441099f7ad4d98ce72e4319bc | [
"Apache-2.0"
] | null | null | null | 03_Object-Oriented Programming/02_attribute.py | Deaddy0430/python_learning | 198dd07bb5e710e441099f7ad4d98ce72e4319bc | [
"Apache-2.0"
] | null | null | null | 03_Object-Oriented Programming/02_attribute.py | Deaddy0430/python_learning | 198dd07bb5e710e441099f7ad4d98ce72e4319bc | [
"Apache-2.0"
] | null | null | null | class Dog:
def eat(self, food):
print(self.color, '的', self.kinds, '正在吃', food)
dog1 = Dog()
dog1.kinds = '京巴'
dog1.color = '白色'
dog1.color = '黄色' # this line will overwrite the color-attribute of dog1
dog1.eat('骨头')
dog2 = Dog()
dog2.kinds = '牧羊犬'
dog2.color = '灰色'
dog2.eat('屎') | 21 | 72 | 0.62585 |
9f3833b4f3976f0491ab79b99afb3971e13a7046 | 11,529 | py | Python | airflow/contrib/hooks/gcp_dataflow_hook.py | stefan-wolfsheimer/airflow | 68619f2da7521231ff1c159a9a4d626d61eb85b6 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/hooks/gcp_dataflow_hook.py | stefan-wolfsheimer/airflow | 68619f2da7521231ff1c159a9a4d626d61eb85b6 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/hooks/gcp_dataflow_hook.py | stefan-wolfsheimer/airflow | 68619f2da7521231ff1c159a9a4d626d61eb85b6 | [
"Apache-2.0"
] | null | null | null | # -*- 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
#... | 39.348123 | 89 | 0.586608 |
0f0a6d53e7116bf49876bc020628e27745d75de6 | 31,574 | py | Python | python/cudf/cudf/tests/test_multiindex.py | marlenezw/cudf | f6e14facc37fa270d302a8e1c39abffb6675c53e | [
"Apache-2.0"
] | 1 | 2021-03-01T05:41:41.000Z | 2021-03-01T05:41:41.000Z | python/cudf/cudf/tests/test_multiindex.py | marlenezw/cudf | f6e14facc37fa270d302a8e1c39abffb6675c53e | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/tests/test_multiindex.py | marlenezw/cudf | f6e14facc37fa270d302a8e1c39abffb6675c53e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA CORPORATION.
"""
Test related to MultiIndex
"""
import re
import cupy as cp
import numpy as np
import pandas as pd
import pytest
import cudf
from cudf.core.column import as_column
from cudf.core.index import as_index
from cudf.tests.utils import assert_eq, assert_neq
def test_mult... | 28.913919 | 79 | 0.498068 |
981649b1b9bc9421e36f616d75214005ab456707 | 29 | py | Python | data/studio21_generated/introductory/4541/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4541/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/4541/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def array_operations(a, k):
| 14.5 | 27 | 0.724138 |
bc97664d4df25e260a819496f1efba44afef60f2 | 27,109 | py | Python | setuptools/tests/test_config.py | dhimmel/setuptools | 3adda966e2e76ad59cf79fd8bdeab77fb11d308f | [
"MIT"
] | 1 | 2019-04-17T18:22:00.000Z | 2019-04-17T18:22:00.000Z | setuptools/tests/test_config.py | dhimmel/setuptools | 3adda966e2e76ad59cf79fd8bdeab77fb11d308f | [
"MIT"
] | null | null | null | setuptools/tests/test_config.py | dhimmel/setuptools | 3adda966e2e76ad59cf79fd8bdeab77fb11d308f | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
import contextlib
import pytest
from distutils.errors import DistutilsOptionError, DistutilsFileError
from mock import patch
from setuptools.dist import Distribution, _Distribution
from setuptools.config import ConfigHandler, read_configuration
from setu... | 31.376157 | 78 | 0.515179 |
74bfd0b40f48632298b31efd9b8dd453956848cf | 25,775 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/clientbase.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.
# ---------------------------------------------------------
"""Access base class to handle _restclient calls"""
import copy
import json
import logging
import os
import time
import uuid
impor... | 43.538851 | 118 | 0.633909 |
9ef0754ae8a218f693c013d4ea0e1da0690436c9 | 645 | py | Python | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | documentation_multiprocessing/08_reference/02_pipes_and_queues/pipe_01.py | software-foundations/learning-distributed-systems | b09f60742a88acf466fcf724e1368b95363682fa | [
"MIT"
] | null | null | null | """
For passing messages one can use Pipe() (for a connection between two processes)
or a queue (which allows multiple producers and consumers).
Returns a pair (conn1, conn2) of Connection objects representing the ends of a
pipe.
If duplex is True (the default) then the pipe is bidirectional. If duplex is
False th... | 26.875 | 81 | 0.775194 |
0664faf4362f143ae71bebb2df23d0b1dd823e6c | 5,120 | py | Python | tensorflow_io/core/python/experimental/serialization_ops.py | suyashkumar/io | 97acfce1445c0ccd172deab4f540c4d970573aca | [
"Apache-2.0"
] | 1 | 2020-01-20T17:48:31.000Z | 2020-01-20T17:48:31.000Z | tensorflow_io/core/python/experimental/serialization_ops.py | suyashkumar/io | 97acfce1445c0ccd172deab4f540c4d970573aca | [
"Apache-2.0"
] | null | null | null | tensorflow_io/core/python/experimental/serialization_ops.py | suyashkumar/io | 97acfce1445c0ccd172deab4f540c4d970573aca | [
"Apache-2.0"
] | 1 | 2020-04-30T02:03:38.000Z | 2020-04-30T02:03:38.000Z | # 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
#
# Unless required by applica... | 30.117647 | 84 | 0.67832 |
7ca35530f1c9389f7793e2c81975d39bb0dd9210 | 10,502 | py | Python | agent/indy_catalyst_agent/messaging/connections/routes.py | nairobi222/indy-catalyst | dcbd80524ace7747ecfecd716ff932e9b571d69a | [
"Apache-2.0"
] | 2 | 2019-08-16T11:21:10.000Z | 2022-01-03T21:10:59.000Z | agent/indy_catalyst_agent/messaging/connections/routes.py | nairobi222/indy-catalyst | dcbd80524ace7747ecfecd716ff932e9b571d69a | [
"Apache-2.0"
] | null | null | null | agent/indy_catalyst_agent/messaging/connections/routes.py | nairobi222/indy-catalyst | dcbd80524ace7747ecfecd716ff932e9b571d69a | [
"Apache-2.0"
] | null | null | null | """Connection handling admin routes."""
from aiohttp import web
from aiohttp_apispec import docs, request_schema, response_schema
from marshmallow import fields, Schema
from .manager import ConnectionManager
from .messages.connection_invitation import (
ConnectionInvitation,
ConnectionInvitationSchema,
)
fro... | 31.071006 | 88 | 0.656066 |
1273a81db2e0de6d3ecc854a1559d052d792b77a | 561 | py | Python | core/migrations/0009_location_user.py | georgebcservices/coffeedapp | c0aece544c8493af16fd49ce650f5745564b9adc | [
"MIT"
] | null | null | null | core/migrations/0009_location_user.py | georgebcservices/coffeedapp | c0aece544c8493af16fd49ce650f5745564b9adc | [
"MIT"
] | null | null | null | core/migrations/0009_location_user.py | georgebcservices/coffeedapp | c0aece544c8493af16fd49ce650f5745564b9adc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0008_remove_location_user'),
... | 24.391304 | 76 | 0.648841 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.