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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f8ae6f00fbb800a07a0355f2989b04feb667626 | 601 | py | Python | test.py | dnutiu/sanic-prometheus | 5fb44f229d5084e1c27c7beedafb0a0b6a281c5d | [
"MIT"
] | null | null | null | test.py | dnutiu/sanic-prometheus | 5fb44f229d5084e1c27c7beedafb0a0b6a281c5d | [
"MIT"
] | null | null | null | test.py | dnutiu/sanic-prometheus | 5fb44f229d5084e1c27c7beedafb0a0b6a281c5d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from sanic_prometheus import monitor
from sanic import Sanic, response, Blueprint
from sanic_limiter import Limiter, get_remote_address
app = Sanic()
test_bp = Blueprint('test')
limiter = Limiter(
app,
global_limits=['10 per second', '500 per day'],
key_func=get_remote_address)
... | 23.115385 | 69 | 0.710483 |
c26689adda797afc89cc2aeddfe9d515417e7f22 | 8,555 | py | Python | tools/factory_param_generate.py | Supercon19WIFIHat/esp-at | a8ae08ad67ccc5b698d87f671c9a4350546fdc17 | [
"MIT-0"
] | 1 | 2020-01-03T23:32:42.000Z | 2020-01-03T23:32:42.000Z | tools/factory_param_generate.py | Supercon19WIFIHat/esp-at | a8ae08ad67ccc5b698d87f671c9a4350546fdc17 | [
"MIT-0"
] | null | null | null | tools/factory_param_generate.py | Supercon19WIFIHat/esp-at | a8ae08ad67ccc5b698d87f671c9a4350546fdc17 | [
"MIT-0"
] | 1 | 2020-02-26T08:54:37.000Z | 2020-02-26T08:54:37.000Z | #
# ESPRESSIF MIT License
#
# Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
#
# Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP32 only, in which case,
# it is free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the S... | 37.034632 | 134 | 0.623963 |
cd3014fa9465d3d86af7c1c645010a1edfed968c | 102,088 | py | Python | calfem/core.py | sigmundhh/DimGKPython | f24dcaf8e8415252fe414cc1a1a75921c094ed3c | [
"MIT"
] | null | null | null | calfem/core.py | sigmundhh/DimGKPython | f24dcaf8e8415252fe414cc1a1a75921c094ed3c | [
"MIT"
] | null | null | null | calfem/core.py | sigmundhh/DimGKPython | f24dcaf8e8415252fe414cc1a1a75921c094ed3c | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-15 -*-
"""
CALFEM Core module
Contains all the functions implementing CALFEM standard functionality
"""
from scipy.sparse.linalg import dsolve
import numpy as np
import logging as cflog
def error(msg):
"""Write ``msg`` to error log."""
cflog.error(" calfem.core: "+msg)
def info(msg):
... | 29.806715 | 132 | 0.413496 |
247b4adf7db8e875d555791ff0ba7247b32b2560 | 45,088 | py | Python | integration_tests/src/main/python/window_function_test.py | sameerz/spark-rapids | 55a5ceeca27ee51e42e1ac72b5d8e527dd5c0d8b | [
"Apache-2.0"
] | null | null | null | integration_tests/src/main/python/window_function_test.py | sameerz/spark-rapids | 55a5ceeca27ee51e42e1ac72b5d8e527dd5c0d8b | [
"Apache-2.0"
] | null | null | null | integration_tests/src/main/python/window_function_test.py | sameerz/spark-rapids | 55a5ceeca27ee51e42e1ac72b5d8e527dd5c0d8b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020-2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 53.612366 | 216 | 0.672906 |
d54e3429b519a9a58b84032e9e999be6d0bf4865 | 3,467 | py | Python | workspace/module/python-2.7/LxData/datObjects/_datObjValue.py | no7hings/Lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | 2 | 2018-03-06T03:33:55.000Z | 2019-03-26T03:25:11.000Z | workspace/module/python-2.7/LxData/datObjects/_datObjValue.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | workspace/module/python-2.7/LxData/datObjects/_datObjValue.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | # coding:utf-8
from LxData.datObjects import _datObjData
from .. import datCfg, datObjAbs
from . import _datObjRaw
# Method for Digit Calculate
class _Val_Digit(datObjAbs.Abs_DatValue):
def __add__(self, other):
"""
:param other: object of Value
:return: object of Value
"""
... | 30.412281 | 84 | 0.71272 |
ad31409725381f988a7fa54c0dc187afd0aced5c | 707 | py | Python | ex19.py | EiPoPoAung/python_exercises | e7c7b67e0409f6680ea7f580e3d1b21d6f96248d | [
"MIT"
] | null | null | null | ex19.py | EiPoPoAung/python_exercises | e7c7b67e0409f6680ea7f580e3d1b21d6f96248d | [
"MIT"
] | null | null | null | ex19.py | EiPoPoAung/python_exercises | e7c7b67e0409f6680ea7f580e3d1b21d6f96248d | [
"MIT"
] | null | null | null | def cheese_and_crackers(cheese_count,boxes_of_crackers):
print(f"You have {cheese_count} cheeses!")
print(f"You have{boxes_of_crackers} boxes of crackers!")
print("Man That's enough for a party!")
print("Get a blanke.\n")
print("We can just give the function numbers directly:")
cheese_and_cracke... | 44.1875 | 70 | 0.736917 |
5731dab5ad682d28fd7e251867e08d7565cce53c | 39,202 | py | Python | df_biomeviewer.py | voliol/DF-Diagnosipack | abf4b9a6349cd5f48a12bf75ee2689781517ace6 | [
"Unlicense"
] | null | null | null | df_biomeviewer.py | voliol/DF-Diagnosipack | abf4b9a6349cd5f48a12bf75ee2689781517ace6 | [
"Unlicense"
] | null | null | null | df_biomeviewer.py | voliol/DF-Diagnosipack | abf4b9a6349cd5f48a12bf75ee2689781517ace6 | [
"Unlicense"
] | null | null | null | import df_diagnosipack_base as base
from importlib import reload
import tabulate
import tkinter as tk
from tkinter import ttk
from doublescrolledframe import DoubleScrolledFrame
# This tool was/is the first one to use an application of its own instead of just running in text mode.
# This is a testament to the ... | 47.749086 | 133 | 0.577394 |
09be106e508df01c9027271968f7604878570dee | 906 | py | Python | kubernetes/test/test_v1_role_ref.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_role_ref.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_role_ref.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | 1 | 2020-05-09T07:16:55.000Z | 2020-05-09T07:16:55.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 20.133333 | 105 | 0.690949 |
02b0ea90a94c1a72621ad37275fecfa6af85ddd9 | 866 | py | Python | zdai/models/__init__.py | flongtin/zdai-python | 9ec47879d164b755c475b75776a76d54cb8d842d | [
"Apache-2.0"
] | null | null | null | zdai/models/__init__.py | flongtin/zdai-python | 9ec47879d164b755c475b75776a76d54cb8d842d | [
"Apache-2.0"
] | null | null | null | zdai/models/__init__.py | flongtin/zdai-python | 9ec47879d164b755c475b75776a76d54cb8d842d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Zuva 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, softwa... | 39.363636 | 74 | 0.809469 |
9973b987c6151de1515dd0f2ac4cd1408a46e12d | 2,771 | py | Python | web/routes/hololive.py | noaione/vt-schedule | d8e022e773d0622ff9afb36f7cc2bae565b695d9 | [
"MIT"
] | 5 | 2020-06-27T15:21:40.000Z | 2020-10-08T23:08:17.000Z | web/routes/hololive.py | noaione/vtb-schedule | d8e022e773d0622ff9afb36f7cc2bae565b695d9 | [
"MIT"
] | 1 | 2021-02-05T20:26:05.000Z | 2021-02-06T04:55:21.000Z | web/routes/hololive.py | ihateani-me/vtb-schedule | d8e022e773d0622ff9afb36f7cc2bae565b695d9 | [
"MIT"
] | null | null | null | from sanic import Blueprint
from sanic.log import logger
from sanic.response import json
from sanic_openapi import doc
from utils import udumps
from utils.dbconn import (
fetch_channels,
fetch_data,
fetch_holobili,
hololive_channels_data,
parse_uuids_args,
)
from utils.models import BiliChannelsMod... | 30.788889 | 95 | 0.664742 |
fde75cb8fd7af5f09941ac23cdded6a4322a3ff1 | 170,212 | py | Python | salt/modules/dockermod.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | salt/modules/dockermod.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | salt/modules/dockermod.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Management of Docker Containers
.. versionadded:: 2015.8.0
.. versionchanged:: 2017.7.0
This module has replaced the legacy docker execution module.
:depends: docker_ Python module
.. note::
Older releases of the Python bindings for Docker were called docker-py_ in
PyPI. All r... | 31.369701 | 144 | 0.605486 |
8aec25412eaf32e50ab1cceac0df40319aba0e67 | 3,423 | py | Python | src/numba_pghi.py | nperraud/pytorch-dc-tts | 71092c1cae47b634e6b1b4f18600e9cbb030bbef | [
"MIT"
] | null | null | null | src/numba_pghi.py | nperraud/pytorch-dc-tts | 71092c1cae47b634e6b1b4f18600e9cbb030bbef | [
"MIT"
] | null | null | null | src/numba_pghi.py | nperraud/pytorch-dc-tts | 71092c1cae47b634e6b1b4f18600e9cbb030bbef | [
"MIT"
] | null | null | null | import numpy as np
import heapq
import numba
from numba import njit
__author__ = 'Andres'
@njit
def pghi(spectrogram, tgrad, fgrad, a, M, L, tol=10):
""""Implementation of "A noniterativemethod for reconstruction of phase from STFT magnitude". by Prusa, Z., Balazs, P., and Sondergaard, P. Published in IEEE/ACM T... | 41.240964 | 245 | 0.616418 |
bf568a664f41b2b1009a321f5241b1d9e4b789f1 | 1,846 | py | Python | src/wikidated/wikidata/wikidata_dump_file.py | lschmelzeisen/wikidata-history-analyzer | 8673639b61839d2dca271fbbaf2feb8563b75f2d | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2021-06-10T09:26:44.000Z | 2021-07-07T13:49:00.000Z | src/wikidated/wikidata/wikidata_dump_file.py | lschmelzeisen/wikidata-history-analyzer | 8673639b61839d2dca271fbbaf2feb8563b75f2d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/wikidated/wikidata/wikidata_dump_file.py | lschmelzeisen/wikidata-history-analyzer | 8673639b61839d2dca271fbbaf2feb8563b75f2d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #
# Copyright 2021 Lukas Schmelzeisen
#
# 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 ... | 34.830189 | 86 | 0.676598 |
c7ffdfdd95f6e5ba6aa36e9047bb980c01789503 | 1,394 | py | Python | generate_parenthese/solution2_dynamic_programming.py | noahabe/public_leetcode_solutions | 4d5f7001e6f7acc04413ae16ec3eac8f687f38f7 | [
"MIT"
] | null | null | null | generate_parenthese/solution2_dynamic_programming.py | noahabe/public_leetcode_solutions | 4d5f7001e6f7acc04413ae16ec3eac8f687f38f7 | [
"MIT"
] | null | null | null | generate_parenthese/solution2_dynamic_programming.py | noahabe/public_leetcode_solutions | 4d5f7001e6f7acc04413ae16ec3eac8f687f38f7 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def generateParenthesis(self, n: int) -> List[str]:
# first create a matrix of n+1 rows and n+1 columns
mat = [[list() for _ in range(n+1)] for _ in range(n+1)]
# the column number plays the role of the numberOfClosedBracketsIUse in generatePrefixe... | 55.76 | 158 | 0.662123 |
53421d6952128aaa285acb02a54a164d192aa08b | 16,093 | py | Python | SerialPortSet.py | Montgomeryyy/ScanningControl | 58f995154e4a1fa86a52cad88e23fa27ac3fb556 | [
"MIT"
] | 1 | 2019-06-01T02:29:36.000Z | 2019-06-01T02:29:36.000Z | SerialPortSet.py | Montgomeryyy/ScanningControl | 58f995154e4a1fa86a52cad88e23fa27ac3fb556 | [
"MIT"
] | null | null | null | SerialPortSet.py | Montgomeryyy/ScanningControl | 58f995154e4a1fa86a52cad88e23fa27ac3fb556 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SerialPortSet.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_SerialPortSet(object):
def setupUi(self, SerialPort... | 75.200935 | 194 | 0.723669 |
ef5f8b346327b8c705f3b911efd8feb61bd7bc74 | 148 | py | Python | project_name/core/storage.py | edwinlunando/arunafelt | bafeed23bc27370966118bc70f84121fe69169c8 | [
"MIT"
] | 1 | 2016-11-26T02:52:36.000Z | 2016-11-26T02:52:36.000Z | project_name/core/storage.py | edwinlunando/arunafelt | bafeed23bc27370966118bc70f84121fe69169c8 | [
"MIT"
] | null | null | null | project_name/core/storage.py | edwinlunando/arunafelt | bafeed23bc27370966118bc70f84121fe69169c8 | [
"MIT"
] | null | null | null | from pipeline.storage import PipelineStorage
from pipeline.storage import GZIPMixin
class GZIPCachedStorage(GZIPMixin, PipelineStorage):
pass
| 21.142857 | 52 | 0.837838 |
77731dff6114c1d281cabebfd05644bb14927fde | 57 | py | Python | ants/src/testingfile.py | Phydon/Simulations | baca7571cef094278f2165cec582fd6bcb3c7be1 | [
"MIT"
] | null | null | null | ants/src/testingfile.py | Phydon/Simulations | baca7571cef094278f2165cec582fd6bcb3c7be1 | [
"MIT"
] | null | null | null | ants/src/testingfile.py | Phydon/Simulations | baca7571cef094278f2165cec582fd6bcb3c7be1 | [
"MIT"
] | null | null | null | import random
num = random .randrange(1)
print(num)
| 11.4 | 27 | 0.684211 |
7e6ede1ae03ad8484a23829a87faaf23d38267dc | 1,954 | py | Python | opentelemetry-sdk/tests/trace/test_implementation.py | p-yang/opentelemetry-python | 68b7ceac1df2498ee5bfc41a1998102e8b5b0064 | [
"Apache-2.0"
] | null | null | null | opentelemetry-sdk/tests/trace/test_implementation.py | p-yang/opentelemetry-python | 68b7ceac1df2498ee5bfc41a1998102e8b5b0064 | [
"Apache-2.0"
] | null | null | null | opentelemetry-sdk/tests/trace/test_implementation.py | p-yang/opentelemetry-python | 68b7ceac1df2498ee5bfc41a1998102e8b5b0064 | [
"Apache-2.0"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 40.708333 | 78 | 0.712897 |
573ce74dd360d0072fc4ed7e2cbab2b55ea65dbe | 4,402 | py | Python | database/models.py | CTylerD/tunadex | 50997d3492908fc695cdeeb7ca3a63a1c80075d1 | [
"MIT"
] | null | null | null | database/models.py | CTylerD/tunadex | 50997d3492908fc695cdeeb7ca3a63a1c80075d1 | [
"MIT"
] | 2 | 2021-04-30T21:18:42.000Z | 2021-08-23T20:44:38.000Z | database/models.py | CTylerD/Tunadex | 50997d3492908fc695cdeeb7ca3a63a1c80075d1 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, String, Integer, create_engine, ForeignKey
from flask_sqlalchemy import SQLAlchemy
from flask import jsonify
import json
import os
db = SQLAlchemy()
# Production database URL
DATABASE_URL = ('postgres://ewjgvziegmlphb:4958d4551c9c85a92b84ecfc8bd2057c44'
'3ae30cfe1f5e323b... | 23.168421 | 78 | 0.604044 |
5a67b2cb577b4ddaf0408e1214816c6df6b1d10f | 1,817 | py | Python | Lib/site-packages/selenium/webdriver/chrome/service.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 99 | 2017-09-18T20:12:04.000Z | 2022-01-21T15:26:54.000Z | Lib/site-packages/selenium/webdriver/chrome/service.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 73 | 2015-11-25T11:07:20.000Z | 2022-02-16T19:39:42.000Z | Lib/site-packages/selenium/webdriver/chrome/service.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 58 | 2017-09-23T08:16:42.000Z | 2022-03-25T09:10:13.000Z | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.5 | 124 | 0.695652 |
67da09da47b8b329383654e23c0f498025f127a3 | 1,516 | py | Python | src/sqlfluff/rules/L005.py | R7L208/sqlfluff | 072ebc738771b288738b8678aa31ecc5156d8488 | [
"MIT"
] | 173 | 2018-11-15T15:39:13.000Z | 2020-09-24T17:34:55.000Z | src/sqlfluff/rules/L005.py | R7L208/sqlfluff | 072ebc738771b288738b8678aa31ecc5156d8488 | [
"MIT"
] | 412 | 2018-11-15T16:34:59.000Z | 2020-09-29T01:50:00.000Z | src/sqlfluff/rules/L005.py | R7L208/sqlfluff | 072ebc738771b288738b8678aa31ecc5156d8488 | [
"MIT"
] | 41 | 2018-11-23T08:48:50.000Z | 2020-09-19T08:24:30.000Z | """Implementation of Rule L005."""
from typing import Optional
from sqlfluff.core.parser import RawSegment
from sqlfluff.core.rules.base import BaseRule, LintResult, LintFix, RuleContext
from sqlfluff.core.rules.doc_decorators import document_fix_compatible, document_groups
@document_groups
@document_fix_compatible
... | 26.596491 | 87 | 0.636544 |
84f8fb50e99b0e34c3c1f531fad3d3198a9e6333 | 1,121 | py | Python | python/scannerpy/common.py | qinglan233/scanner | 61ce0d35e49c92cab265b746bd55ae75ab57fb42 | [
"Apache-2.0"
] | 1 | 2021-06-27T08:00:04.000Z | 2021-06-27T08:00:04.000Z | python/scannerpy/common.py | qianl15/scanner | 61ce0d35e49c92cab265b746bd55ae75ab57fb42 | [
"Apache-2.0"
] | 1 | 2017-10-26T03:22:56.000Z | 2017-10-26T03:22:56.000Z | python/scannerpy/common.py | qinglan233/scanner | 61ce0d35e49c92cab265b746bd55ae75ab57fb42 | [
"Apache-2.0"
] | 1 | 2019-05-10T19:44:44.000Z | 2019-05-10T19:44:44.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import logging as log
import numpy as np
import enum
from collections import defaultdict
class ScannerException(Exception):
pass
class DeviceType(enum.Enum):
""" Enum for specifying where an Op should run. """
CPU = 0
... | 24.369565 | 82 | 0.648528 |
b65676b7668d627bc9985296fc32f01aec44427b | 8,080 | py | Python | mmdet/models/losses/iou_loss.py | dyhan0920/mmdetection | adc65ffc3e78c4dfd5f9c693210b69140c3f9a56 | [
"Apache-2.0"
] | 28 | 2020-07-13T02:18:21.000Z | 2022-02-20T07:22:15.000Z | mmdet/models/losses/iou_loss.py | wondervictor/lvis-mmdet | 68532eb6f4643ddf0179a4384c8c9e004a2c1d07 | [
"Apache-2.0"
] | 4 | 2021-10-10T06:33:56.000Z | 2022-02-25T03:15:10.000Z | mmdet/models/losses/iou_loss.py | wondervictor/lvis-mmdet | 68532eb6f4643ddf0179a4384c8c9e004a2c1d07 | [
"Apache-2.0"
] | 3 | 2021-05-13T06:27:03.000Z | 2022-02-15T03:46:41.000Z | import torch
import torch.nn as nn
from mmdet.core import bbox_overlaps
from ..builder import LOSSES
from .utils import weighted_loss
@weighted_loss
def iou_loss(pred, target, eps=1e-6):
"""IoU loss.
Computing the IoU loss between a set of predicted bboxes and target bboxes.
The loss is calculated as ne... | 33.114754 | 79 | 0.553342 |
97dcdf5f0b2537174badc9e4f894adba0c35a1b3 | 47 | py | Python | pyxb/bundles/opengis/_smil20.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | pyxb/bundles/opengis/_smil20.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | pyxb/bundles/opengis/_smil20.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | from pyxb.bundles.opengis.raw._smil20 import *
| 23.5 | 46 | 0.808511 |
0172df4b88c904bd7a860473dce332b07a465f6b | 1,269 | py | Python | tests/test_parse.py | ruthenian8/unisearch | 82ed2b012876bfec5d46b5f842c8bac5779b97de | [
"MIT"
] | null | null | null | tests/test_parse.py | ruthenian8/unisearch | 82ed2b012876bfec5d46b5f842c8bac5779b97de | [
"MIT"
] | null | null | null | tests/test_parse.py | ruthenian8/unisearch | 82ed2b012876bfec5d46b5f842c8bac5779b97de | [
"MIT"
] | null | null | null | import asyncio
import pytest
from unisearch import parse
from aiohttp import ClientSession
@pytest.mark.asyncio
async def test_encoding_detection(text_url):
async with ClientSession() as session:
async with session.get(text_url) as resp:
data = await resp.read()
enc = parse.detect_... | 27.586957 | 69 | 0.686367 |
1b39b87242b961f1564cdc0a983ec96c39a26b75 | 269 | py | Python | pyvin/__init__.py | cylussec/pyvin | 0f9919ed0d62ad4006ceb058a6242c7f233ae90c | [
"MIT"
] | null | null | null | pyvin/__init__.py | cylussec/pyvin | 0f9919ed0d62ad4006ceb058a6242c7f233ae90c | [
"MIT"
] | null | null | null | pyvin/__init__.py | cylussec/pyvin | 0f9919ed0d62ad4006ceb058a6242c7f233ae90c | [
"MIT"
] | null | null | null | from .pyvin import (VIN,
DecodedVIN,
RAISE,
SKIP,
PASS)
from .errors import VINError
from .utils import clean_vins, validate_vin
_VERSION = '0.0.2'
def get_version():
return _VERSION
| 20.692308 | 43 | 0.524164 |
2897ee22f01ebbfc4e9f392a5255c33883b0b5ae | 8,746 | py | Python | retired/old_version/original/drivers/imu/Imu.py | gecko-robotics/pygecko | a809593a894d8e591e992455a01aa73d8f7b7981 | [
"MIT"
] | 3 | 2019-06-13T07:52:12.000Z | 2020-07-05T13:28:43.000Z | retired/old_version/original/drivers/imu/Imu.py | walchko/pygecko | a809593a894d8e591e992455a01aa73d8f7b7981 | [
"MIT"
] | 23 | 2017-07-07T01:29:33.000Z | 2018-11-23T18:41:08.000Z | retired/old_version/original/drivers/imu/Imu.py | MomsFriendlyRobotCompany/pygecko | a809593a894d8e591e992455a01aa73d8f7b7981 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from __future__ import print_function
from __future__ import division
# import argparse
import time
import logging
import multiprocessing as mp
import lib.Messages as Msg
import lib.ZmqClass as Zmq
from otherLibs.BNO055 import BNO055
from math import cos, sin, atan2, asin, sqrt
# from math impor... | 35.844262 | 200 | 0.654356 |
82e3a9331fc95b293934d975f8a6c1330cdef892 | 5,335 | py | Python | snippets/experiments/far_close.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | snippets/experiments/far_close.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | snippets/experiments/far_close.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | import scipy
import scipy.spatial
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from emutils.utils import batch_process
from emutils.geometry import get_metric_name_and_params, pairwise_distance
sp = scipy
FAR_CLOSE_NORMALIZATION = ['euclidean', 'cit... | 29.475138 | 106 | 0.45642 |
4be80136f935412ea93209da4af81a1f83a72366 | 5,579 | py | Python | main_win.py | ok-noronha/Library-Management | c376e4baed2f22655727798bc07b7c25ba3753eb | [
"MIT"
] | null | null | null | main_win.py | ok-noronha/Library-Management | c376e4baed2f22655727798bc07b7c25ba3753eb | [
"MIT"
] | null | null | null | main_win.py | ok-noronha/Library-Management | c376e4baed2f22655727798bc07b7c25ba3753eb | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter.tix import *
from PIL import Image, ImageTk
from datetime import date
import add_book as ab
import book_details as bd
import add_student as ast
import student_details as sd
import return_book as rb
import issue_book as ib
import login_win as lw
class MainWindow:
def create_main... | 47.683761 | 136 | 0.696003 |
ca0ceb2781bd789c467013e3bb75bf41c02e2d27 | 2,677 | py | Python | tests/base.py | DaRoee/aiohttp-wsgi | 30424fa73af21f4917ef9a48a76bcf0bf7ac6239 | [
"BSD-3-Clause"
] | null | null | null | tests/base.py | DaRoee/aiohttp-wsgi | 30424fa73af21f4917ef9a48a76bcf0bf7ac6239 | [
"BSD-3-Clause"
] | null | null | null | tests/base.py | DaRoee/aiohttp-wsgi | 30424fa73af21f4917ef9a48a76bcf0bf7ac6239 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from collections import namedtuple
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
import aiohttp
from aiohttp_wsgi.wsgi import run_server
from aiohttp_wsgi.utils import parse_sockname
Response = namedtuple("Response", ("status", "reason", "headers", "content"))
class T... | 29.744444 | 94 | 0.611132 |
e04013a52cee104727c5eb28eec2e1886fc04819 | 7,117 | py | Python | venv/Lib/site-packages/mediapipe/calculators/util/detections_to_rects_calculator_pb2.py | Farhan-Malik/advance-hand-gesture | 0ebe21ddd7c8c2eb14746678be57b33d38c47205 | [
"MIT"
] | 41 | 2021-06-19T13:57:18.000Z | 2021-12-02T17:08:53.000Z | venv/Lib/site-packages/mediapipe/calculators/util/detections_to_rects_calculator_pb2.py | HxnDev/Pose-Detection | 2be27e88cf79a0fb643c5047158cba478c770be9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/mediapipe/calculators/util/detections_to_rects_calculator_pb2.py | HxnDev/Pose-Detection | 2be27e88cf79a0fb643c5047158cba478c770be9 | [
"MIT"
] | 4 | 2021-07-02T03:09:51.000Z | 2021-11-25T13:00:10.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/calculators/util/detections_to_rects_calculator.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _messag... | 48.746575 | 877 | 0.801883 |
654b62ddbb6791a44f5290df6468730aad179e1d | 193 | py | Python | app/admin.py | Ronyonka/sitexpo | 3297c870a24754829c5726e96d1aebdf048b6310 | [
"Unlicense"
] | null | null | null | app/admin.py | Ronyonka/sitexpo | 3297c870a24754829c5726e96d1aebdf048b6310 | [
"Unlicense"
] | 5 | 2020-06-05T20:03:54.000Z | 2021-09-08T00:52:56.000Z | events/admin.py | eddyyonnie/voice | 173a6bc7a77152b0458f7a136940d3d09ec4b89d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Profile,Project,Ratings
# Register your models here.
admin.site.register(Profile)
admin.site.register(Project)
admin.site.register(Ratings) | 27.571429 | 43 | 0.823834 |
3d2d6091b5491db6ed7585479a3c4f4f636cf09b | 4,551 | py | Python | ckanext/resourceproxy/tests/test_proxy.py | CodeandoMexico/ckan | d93ae8c4e4bf6aa0c9db9e5b82a77c1af768baef | [
"Apache-2.0"
] | 1 | 2019-12-17T02:16:55.000Z | 2019-12-17T02:16:55.000Z | ckanext/resourceproxy/tests/test_proxy.py | CodeandoMexico/ckan | d93ae8c4e4bf6aa0c9db9e5b82a77c1af768baef | [
"Apache-2.0"
] | null | null | null | ckanext/resourceproxy/tests/test_proxy.py | CodeandoMexico/ckan | d93ae8c4e4bf6aa0c9db9e5b82a77c1af768baef | [
"Apache-2.0"
] | null | null | null | import requests
import unittest
import json
import httpretty
import paste.fixture
from pylons import config
import ckan.logic as logic
import ckan.model as model
import ckan.tests as tests
import ckan.plugins as plugins
import ckan.lib.create_test_data as create_test_data
import ckan.config.middleware as middleware
i... | 31.604167 | 94 | 0.656779 |
16035020549f2522a95879c0526e2ec1e27c46e2 | 2,620 | py | Python | beamshapes/tests/test_pistoninsphereflint.py | faroit/bat_beamshapes | 9c2919b4e56dbd0cfc1039edc608ce1592b78df3 | [
"MIT"
] | 4 | 2022-01-05T02:06:33.000Z | 2022-03-16T09:00:08.000Z | beamshapes/tests/test_pistoninsphereflint.py | faroit/bat_beamshapes | 9c2919b4e56dbd0cfc1039edc608ce1592b78df3 | [
"MIT"
] | 19 | 2021-08-10T20:48:34.000Z | 2022-01-05T08:02:04.000Z | beamshapes/tests/test_pistoninsphereflint.py | faroit/bat_beamshapes | 9c2919b4e56dbd0cfc1039edc608ce1592b78df3 | [
"MIT"
] | 4 | 2022-01-04T14:50:17.000Z | 2022-01-28T02:33:34.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
End-to-end tests to check the piston in a sphere output.
"""
import os
try:
os.chdir('beamshapes/tests')
except:
pass
import unittest
# installing FLINT with Travis-CI is tricky, and so avoid doing it for now.
try:
import flint
import numpy as n... | 30.823529 | 86 | 0.550763 |
9b64b8c08920c4c26126b8bf7870f91952738bfb | 947 | py | Python | Graph/Edge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | Graph/Edge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | Graph/Edge.py | sywh/algorithms | 8df353aa6716f2ed83e9167a27ceb6d3384891da | [
"MIT"
] | null | null | null | class Edge:
def __init__(self, v: int, w: int, weight: float) -> None:
self.v = v
self.w = w
self._weight = weight
def weight(self):
return self._weight
def either(self):
return self.v
def other(self, vertex):
if vertex == self.v:
return sel... | 22.547619 | 63 | 0.525871 |
08be550a50a7b9c755c2cafe6d8efce331e9a7c7 | 1,391 | py | Python | tests/functional/trigger/alter/test_03.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/functional/trigger/alter/test_03.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/functional/trigger/alter/test_03.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: functional.trigger.alter.03
# title: ALTER TRIGGER - BEFORE DELETE
# decription: ALTER TRIGGER - BEFORE DELETE
#
# Dependencies:
# CREATE DATABASE
# CREATE TABLE
# CREATE TRIGGER
# SHOW TRIGGER
... | 25.290909 | 80 | 0.608196 |
94d1dddb7fc7bbfdf72581abe621a6b3aa5f055c | 9,400 | py | Python | plugins/lookup/netbox.py | loganbest/ansible_modules | 09d218c5db931ce5ef344556bcc839b44120a879 | [
"MIT"
] | 1 | 2020-01-18T00:14:59.000Z | 2020-01-18T00:14:59.000Z | plugins/lookup/netbox.py | FurryJulie/ansible_modules | 82b6473d5e95935f134e653486d68cc6f849a479 | [
"MIT"
] | null | null | null | plugins/lookup/netbox.py | FurryJulie/ansible_modules | 82b6473d5e95935f134e653486d68cc6f849a479 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2019. Chris Mills <chris@discreet-its.co.uk>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
netbox.py
A lookup function designed to return data from the Netbox application
"""
from __future__ import absolute_import, division... | 38.52459 | 156 | 0.613617 |
955a2e8b5e3e526118220b52a94e3b1def9a3b0c | 525 | py | Python | src/waldur_core/structure/migrations/0009_project_is_removed.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | 2 | 2017-01-20T15:26:25.000Z | 2017-08-03T04:38:08.000Z | src/waldur_core/structure/migrations/0009_project_is_removed.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | src/waldur_core/structure/migrations/0009_project_is_removed.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | # Generated by Django 1.11.20 on 2019-04-22 09:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('structure', '0008_customer_division'),
]
operations = [
migrations.AddField(
model_name='project',
name='is_removed... | 23.863636 | 53 | 0.588571 |
caaf7a5194c633b75199b5c0914c4d460e856069 | 6,044 | py | Python | api_client/python/grr_api_client/flow.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | 1 | 2021-01-25T00:55:20.000Z | 2021-01-25T00:55:20.000Z | api_client/python/grr_api_client/flow.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | null | null | null | api_client/python/grr_api_client/flow.py | tsehori/grr | 048506f22f74642bfe61749069a45ddf496fdab3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Flows-related part of GRR API client library."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from typing import Union
from google.protobuf import message
from grr_api_client import context as api_context
from grr_api_client im... | 31.643979 | 80 | 0.701026 |
0d74307bded300a3f1025dceb52685e90da46b7a | 3,029 | py | Python | pytorch_lightning/logging/test_tube_logger.py | wongjoel/pytorch-lightning | f79bdf232704e3d6454a32273f7bd6b2262029f4 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/logging/test_tube_logger.py | wongjoel/pytorch-lightning | f79bdf232704e3d6454a32273f7bd6b2262029f4 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/logging/test_tube_logger.py | wongjoel/pytorch-lightning | f79bdf232704e3d6454a32273f7bd6b2262029f4 | [
"Apache-2.0"
] | null | null | null | try:
from test_tube import Experiment
except ImportError:
raise ImportError('Missing test-tube package.')
from .base import LightningLoggerBase, rank_zero_only
class TestTubeLogger(LightningLoggerBase):
__test__ = False
def __init__(
self, save_dir, name="default", description=None, debu... | 29.407767 | 77 | 0.632552 |
7a7e7856558fd07499ff86e09ab1d6022cc9a899 | 574 | py | Python | 5variables.py | gurmeetkhehra/python-practice | abeb5586f8c1e673fd8ff312a4ae0941f2a0194b | [
"Apache-2.0"
] | null | null | null | 5variables.py | gurmeetkhehra/python-practice | abeb5586f8c1e673fd8ff312a4ae0941f2a0194b | [
"Apache-2.0"
] | null | null | null | 5variables.py | gurmeetkhehra/python-practice | abeb5586f8c1e673fd8ff312a4ae0941f2a0194b | [
"Apache-2.0"
] | null | null | null | # Q4. Create variables of all types supported by Python. Then print all of them along with their variable
# name and variable value
#
# Q5. Write Python code to create integer and float variables, at least three of them each. Then print the sum of
# respective integers and float variables on separate lines.
#variable ... | 22.96 | 113 | 0.778746 |
9d9f99ccc90d8b9cc722399c2364dfd3e74eb8a4 | 3,964 | py | Python | topaz/modules/ffi/ffi.py | ruby-compiler-survey/topaz | bf4a56adbe03ae9ab4984729c733fcbc64a164c4 | [
"BSD-3-Clause"
] | 241 | 2015-01-02T18:49:09.000Z | 2022-03-15T15:08:45.000Z | topaz/modules/ffi/ffi.py | ruby-compiler-survey/topaz | bf4a56adbe03ae9ab4984729c733fcbc64a164c4 | [
"BSD-3-Clause"
] | 16 | 2015-05-04T21:31:08.000Z | 2020-06-04T22:49:36.000Z | topaz/modules/ffi/ffi.py | ruby-compiler-survey/topaz | bf4a56adbe03ae9ab4984729c733fcbc64a164c4 | [
"BSD-3-Clause"
] | 24 | 2015-02-15T05:35:11.000Z | 2022-03-22T13:29:04.000Z | from __future__ import absolute_import
from topaz.error import RubyError
from topaz.module import ModuleDef
from topaz.modules.ffi.type import (POINTER, lltype_sizes, W_TypeObject,
type_names, W_BuiltinType)
from topaz.modules.ffi.function import W_FFIFunctionObject
from topaz.modul... | 46.635294 | 76 | 0.662714 |
df93d84f7a5ff2d88a9d423de2933440a21b75af | 1,164 | py | Python | thinking-in-python/python-spider/src/save.py | yihonglei/road-of-arch | cbd650de04637c9c18276f3b4d3fea8f9b92f22c | [
"Apache-2.0"
] | 3 | 2020-07-22T10:51:58.000Z | 2021-08-03T07:37:45.000Z | thinking-in-python/python-spider/src/save.py | yihonglei/road-of-arch | cbd650de04637c9c18276f3b4d3fea8f9b92f22c | [
"Apache-2.0"
] | 1 | 2022-01-24T03:36:05.000Z | 2022-02-08T09:02:57.000Z | thinking-in-python/python-spider/src/save.py | yihonglei/road-of-arch | cbd650de04637c9c18276f3b4d3fea8f9b92f22c | [
"Apache-2.0"
] | 4 | 2021-06-28T15:28:11.000Z | 2022-03-03T06:39:30.000Z | # -*- coding: utf-8 -*-
import time
from src.util.file_util import *
"""
文件保存
@author yihonglei
"""
class Save:
def __init__(self, website, title, data):
self.website = website
self.title = title
self.data = data
def save_csv(self):
pass
def save_word(self):
pass... | 25.304348 | 101 | 0.519759 |
77cff7add3a9e537eac7e045dd13d7000306822f | 6,648 | py | Python | hvc/metrics.py | URSUroman/hvc-custom | 04fedb9611b6a6d12d56c126843bd0d30ee1d779 | [
"BSD-3-Clause"
] | null | null | null | hvc/metrics.py | URSUroman/hvc-custom | 04fedb9611b6a6d12d56c126843bd0d30ee1d779 | [
"BSD-3-Clause"
] | null | null | null | hvc/metrics.py | URSUroman/hvc-custom | 04fedb9611b6a6d12d56c126843bd0d30ee1d779 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import scipy.spatial.distance
import sklearn.metrics
from sklearn.externals import joblib
def confusion_matrix(y_true=None, y_pred=None, model_meta_file=None, normalize=False):
"""generates a confusion matrix, given true and predicted labels
wrapper around sklearn.metrics.confusion_matrix
... | 31.808612 | 102 | 0.632822 |
493654cce16497bf7362df626615c07240ae16a7 | 1,351 | py | Python | electrum_dash/gui/kivy/nfc_scanner/__init__.py | justanwar/electrum-firo | dbfea4456000011a58a43c37425e44296b5da5b5 | [
"MIT"
] | 4 | 2021-01-18T01:23:41.000Z | 2021-04-13T22:39:11.000Z | electrum_dash/gui/kivy/nfc_scanner/__init__.py | justanwar/electrum-firo | dbfea4456000011a58a43c37425e44296b5da5b5 | [
"MIT"
] | 11 | 2021-01-18T09:34:27.000Z | 2022-02-05T07:58:11.000Z | electrum_dash/gui/kivy/nfc_scanner/__init__.py | justanwar/electrum-firo | dbfea4456000011a58a43c37425e44296b5da5b5 | [
"MIT"
] | 5 | 2021-05-02T10:53:50.000Z | 2022-03-10T00:31:37.000Z | from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.core import core_select_lib
__all__ = ('NFCBase', 'NFCScanner')
class NFCBase(Widget):
''' This is the base Abstract definition class that the actual hardware dependent
implementations would be based on. If you want to def... | 27.571429 | 130 | 0.65433 |
8558ca96c52c672667e405cedaa01d744d642ef2 | 18,620 | py | Python | python/callingconvention.py | ek0/binaryninja-api | d9661f34eec6855d495a10eaafc2a8e2679756a7 | [
"MIT"
] | null | null | null | python/callingconvention.py | ek0/binaryninja-api | d9661f34eec6855d495a10eaafc2a8e2679756a7 | [
"MIT"
] | null | null | null | python/callingconvention.py | ek0/binaryninja-api | d9661f34eec6855d495a10eaafc2a8e2679756a7 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2022 Vector 35 Inc
#
# 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, ... | 39.449153 | 154 | 0.765951 |
f40e869f781512a153e1283697b72ff491f5f46c | 12,326 | py | Python | improver_tests/cube_combiner/test_CubeCombiner.py | nivnac/improver | c16c794f62598017cebc6ae4f99af8f317219a77 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/cube_combiner/test_CubeCombiner.py | nivnac/improver | c16c794f62598017cebc6ae4f99af8f317219a77 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/cube_combiner/test_CubeCombiner.py | nivnac/improver | c16c794f62598017cebc6ae4f99af8f317219a77 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 44.498195 | 90 | 0.662827 |
97febface85ecd0b109e5f048ad0562e39af09ca | 14,982 | py | Python | src/negotiate_proof.py | quantumcatwang/SSI-Indy | 9f4e0efbbb691931725f18560691be382d7500fc | [
"Apache-2.0"
] | null | null | null | src/negotiate_proof.py | quantumcatwang/SSI-Indy | 9f4e0efbbb691931725f18560691be382d7500fc | [
"Apache-2.0"
] | null | null | null | src/negotiate_proof.py | quantumcatwang/SSI-Indy | 9f4e0efbbb691931725f18560691be382d7500fc | [
"Apache-2.0"
] | null | null | null | """
Example demonstrating Proof Verification.
First Issuer creates Claim Definition for existing Schema.
After that, it issues a Claim to Prover (as in issue_credential.py example)
Once Prover has successfully stored its Claim, it uses Proof Request that he
received, to get Claims which satisfy the Proof Request from h... | 47.411392 | 134 | 0.547056 |
381b1104aa0697dfdce30f25bca4e079d8b71c10 | 387 | py | Python | myapi/wsgi.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | myapi/wsgi.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | myapi/wsgi.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | """
WSGI config for myapi project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
1cd4444219278c37f025e1bd6645c049617aaf4c | 24,879 | py | Python | aries_cloudagent/protocols/present_proof/v1_0/manager.py | adamsc64/aries-cloudagent-python | d09f6085b248a68c95822ae6b2aa06bb0053675b | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/present_proof/v1_0/manager.py | adamsc64/aries-cloudagent-python | d09f6085b248a68c95822ae6b2aa06bb0053675b | [
"Apache-2.0"
] | 1 | 2020-03-06T12:11:29.000Z | 2020-03-06T12:11:29.000Z | aries_cloudagent/protocols/present_proof/v1_0/manager.py | adamsc64/aries-cloudagent-python | d09f6085b248a68c95822ae6b2aa06bb0053675b | [
"Apache-2.0"
] | null | null | null | """Classes to manage presentations."""
import json
import logging
import time
from ....revocation.models.revocation_registry import RevocationRegistry
from ....config.injection_context import InjectionContext
from ....core.error import BaseError
from ....holder.base import BaseHolder, HolderError
from ....ledger.base... | 38.275385 | 88 | 0.608626 |
065f0cfcbb81e229ce101cefa4da7fa3c66968d0 | 1,474 | py | Python | app/api/users/schemas.py | OpeOnikute/ctis-api | c13f1a0f16fdf39a3113951657f44ac10d42208a | [
"MIT"
] | 2 | 2017-12-11T02:23:55.000Z | 2017-12-12T12:27:38.000Z | app/api/users/schemas.py | OpeOnikute/ctis-api | c13f1a0f16fdf39a3113951657f44ac10d42208a | [
"MIT"
] | 1 | 2018-09-23T18:56:21.000Z | 2018-09-23T18:56:21.000Z | app/api/users/schemas.py | OpeOnikute/ctis-api | c13f1a0f16fdf39a3113951657f44ac10d42208a | [
"MIT"
] | null | null | null | from jsonschema import Draft4Validator
register_user_schema = Draft4Validator(
schema={
"title": "Register User",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
... | 24.566667 | 81 | 0.409769 |
d4d67ff1d3242234610a3e09ecd07c5f2531a6a4 | 3,198 | py | Python | data/own_lf002.py | Taesiny/deep_representation_one_class | a0d736bbeae2559b4f3f3b50cfd01f4cd60b26ee | [
"Apache-2.0"
] | null | null | null | data/own_lf002.py | Taesiny/deep_representation_one_class | a0d736bbeae2559b4f3f3b50cfd01f4cd60b26ee | [
"Apache-2.0"
] | null | null | null | data/own_lf002.py | Taesiny/deep_representation_one_class | a0d736bbeae2559b4f3f3b50cfd01f4cd60b26ee | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.932584 | 77 | 0.674797 |
c63d35cdfc3913aa940c7ab0a320ad316002ad7b | 6,650 | py | Python | ml_tracking_ops/experiment/logger.py | senadkurtisi/ml-tracking-ops | 4d5d1b200086eea422d3813505aa80b83519112c | [
"MIT"
] | 2 | 2022-01-31T12:32:39.000Z | 2022-02-02T21:08:49.000Z | ml_tracking_ops/experiment/logger.py | senadkurtisi/ml-tracking-ops | 4d5d1b200086eea422d3813505aa80b83519112c | [
"MIT"
] | null | null | null | ml_tracking_ops/experiment/logger.py | senadkurtisi/ml-tracking-ops | 4d5d1b200086eea422d3813505aa80b83519112c | [
"MIT"
] | null | null | null | import os
import time
import json
import pickle
import base64
import atexit
from typing import Union
from .utils import prepare_event
from .utils import CallbackTimer
class MetricBuffer:
"""Queue which buffers logs for the specified metric after reaching maximum capacity.
Motivation: Evading the I/O bottle... | 38.888889 | 116 | 0.629925 |
c5397b9e67f24c8b958bfda3d220449140843d59 | 784 | py | Python | magenta/models/performance_rnn/__init__.py | sandutsar/magenta | 77ed668af96edea7c993d38973b9da342bd31e82 | [
"Apache-2.0"
] | 16,143 | 2016-05-14T04:44:54.000Z | 2020-06-04T06:48:38.000Z | magenta/models/performance_rnn/__init__.py | sandutsar/magenta | 77ed668af96edea7c993d38973b9da342bd31e82 | [
"Apache-2.0"
] | 1,076 | 2016-05-19T14:13:43.000Z | 2020-06-04T16:36:51.000Z | magenta/models/performance_rnn/__init__.py | sandutsar/magenta | 77ed668af96edea7c993d38973b9da342bd31e82 | [
"Apache-2.0"
] | 3,584 | 2016-05-14T05:55:19.000Z | 2020-06-04T17:53:50.000Z | # Copyright 2022 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.636364 | 74 | 0.784439 |
628534181479fb15baec336d18cde307b1bedc7f | 22,652 | py | Python | blender/arm/logicnode/arm_nodes.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/arm_nodes.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/arm_nodes.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | import itertools
from collections import OrderedDict
from typing import Any, Generator, List, Optional, Type, Dict
from typing import OrderedDict as ODict # Prevent naming conflicts
import bpy.types
from bpy.props import *
from nodeitems_utils import NodeItem
import arm.node_utils
# When passed as a category to add... | 40.814414 | 161 | 0.684399 |
f9ae09e96d6bfcdea995534fb757bafadc7af95b | 586 | py | Python | Python3_Data_Structure/07_Matrix/02_Accessing_Value.py | jmmedel/Python3-Data-Structure-References | 3a607da2b67b5b80810d7084339e0602288c4f6b | [
"MIT"
] | null | null | null | Python3_Data_Structure/07_Matrix/02_Accessing_Value.py | jmmedel/Python3-Data-Structure-References | 3a607da2b67b5b80810d7084339e0602288c4f6b | [
"MIT"
] | null | null | null | Python3_Data_Structure/07_Matrix/02_Accessing_Value.py | jmmedel/Python3-Data-Structure-References | 3a607da2b67b5b80810d7084339e0602288c4f6b | [
"MIT"
] | null | null | null |
"""
Accessing Values in a Matrix
The data elements in a matrix can be accessed by using the indexes.
The access methos is same as the way data is accessed in Two dimensional array.
"""
from numpy import *
m = array([['Mon',18,20,22,17],['Tue',11,18,21,18],
['Wed',15,21,20,19],['Thu',11,20,22,21],
['F... | 16.277778 | 79 | 0.627986 |
7d57cd9c4840832657e92ae30b73954db78aaa6f | 906 | py | Python | suspicious_urls_ips/feeds/zeustrackerdns.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | suspicious_urls_ips/feeds/zeustrackerdns.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | suspicious_urls_ips/feeds/zeustrackerdns.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2014-2019 Maltrail developers (https://github.com/stamparm/maltrail/)
See the file 'LICENSE' for copying permission
"""
from antivirus.lists_based_engine.update import retrieve_content
from antivirus.lists_based_engine.settings import IP_TYPE
from antivirus.lists_based_engine.s... | 28.3125 | 83 | 0.716336 |
870b825d6cc3748d247dea04ebcbba404ae869d9 | 5,296 | py | Python | tetravolume.py | tetravertexion/MartianMath | 92d8cf6afa07bb244df4de8f426570c13a00aab7 | [
"MIT"
] | 1 | 2021-09-23T21:01:41.000Z | 2021-09-23T21:01:41.000Z | tetravolume.py | tetravertexion/MartianMath | 92d8cf6afa07bb244df4de8f426570c13a00aab7 | [
"MIT"
] | null | null | null | tetravolume.py | tetravertexion/MartianMath | 92d8cf6afa07bb244df4de8f426570c13a00aab7 | [
"MIT"
] | 1 | 2021-09-23T21:01:22.000Z | 2021-09-23T21:01:22.000Z | """
Euler volume, modified by Gerald de Jong
http://www.grunch.net/synergetics/quadvols.html
Kirby Urner (c) MIT License
See:
http://mathforum.org/kb/thread.jspa?threadID=2836546
for explanation of quadrays, used for some unit tests
"""
from math import sqrt as rt2
from qrays import Qvector, Vector
import sys
S3 ... | 29.422222 | 80 | 0.52398 |
65e48c7ee6fadddc2e3678af58e3840b57a573df | 4,999 | py | Python | homeassistant/components/daikin/config_flow.py | pszafer/core | ab6fb5cb7705a7f2e3a4f310b5d42047c3372bd2 | [
"Apache-2.0"
] | 3 | 2019-07-06T08:00:22.000Z | 2021-11-12T23:01:59.000Z | homeassistant/components/daikin/config_flow.py | pszafer/core | ab6fb5cb7705a7f2e3a4f310b5d42047c3372bd2 | [
"Apache-2.0"
] | 44 | 2020-08-03T07:31:07.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/daikin/config_flow.py | titilambert/home-assistant | a2651845f379992231fd7b9c8458828036296ee0 | [
"Apache-2.0"
] | 2 | 2017-09-03T16:06:02.000Z | 2021-01-12T15:07:52.000Z | """Config flow for the Daikin platform."""
import asyncio
import logging
from uuid import uuid4
from aiohttp import ClientError, web_exceptions
from async_timeout import timeout
from pydaikin.daikin_base import Appliance
from pydaikin.discovery import Discovery
import voluptuous as vol
from homeassistant import confi... | 34.715278 | 93 | 0.606521 |
e46a8ed9e0653ec899e4e9f4df0618b84ac03d24 | 297 | py | Python | glouton/modules/moduleBase.py | deckbsd/glouton-satnogs-data-downloader | 9674081b669b0ca3c04513ede4127c6221962a73 | [
"MIT"
] | 13 | 2018-01-29T06:08:15.000Z | 2020-03-04T07:00:56.000Z | glouton/modules/moduleBase.py | deckbsd/glouton-satnogs-data-downloader | 9674081b669b0ca3c04513ede4127c6221962a73 | [
"MIT"
] | 10 | 2018-12-21T11:37:21.000Z | 2021-05-09T12:39:23.000Z | glouton/modules/moduleBase.py | deckbsd/glouton-satnogs-data-downloader | 9674081b669b0ca3c04513ede4127c6221962a73 | [
"MIT"
] | 4 | 2019-01-25T13:40:13.000Z | 2019-07-22T08:14:19.000Z | import os
class ModuleBase:
def __init__(self, working_dir):
self.working_dir = working_dir
def runAfterDownload(self, file_name, full_path, observation):
raise NotImplementedError()
def runAfterDownloadCompleted(self, full_path):
raise NotImplementedError() | 27 | 66 | 0.727273 |
dd4d9404bb06c475b8e20fbc5267639e7ab6831b | 5,141 | py | Python | net.py | harbi-eng/Pycross | 4030081dafa8181deeeb5aaf2edbc802d90c9466 | [
"MIT"
] | 1 | 2021-07-04T19:17:44.000Z | 2021-07-04T19:17:44.000Z | net.py | harbi-eng/Pycross | 4030081dafa8181deeeb5aaf2edbc802d90c9466 | [
"MIT"
] | null | null | null | net.py | harbi-eng/Pycross | 4030081dafa8181deeeb5aaf2edbc802d90c9466 | [
"MIT"
] | null | null | null | import socket
import re
import serializer
from Messages import Messages
from importlib import import_module
import os
import preprocessing
import sys
"""
required messages:
# 1)send function ->SF
2)send main file ->SMF
3)send packages ->SP
5)read function ->RF
6)r... | 24.716346 | 117 | 0.547559 |
ac27ca66a620e8d9e8ba2b322d543629f8809c02 | 4,049 | py | Python | backtrader/backtrader/plot/formatters.py | harshabakku/live-back-testing-trader | 1fd69c7598dc15bea740f160eed886f396bcba2c | [
"MIT"
] | 1 | 2021-07-14T22:04:08.000Z | 2021-07-14T22:04:08.000Z | backtrader/backtrader/plot/formatters.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | null | null | null | backtrader/backtrader/plot/formatters.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | 3 | 2021-03-07T16:29:40.000Z | 2022-03-17T21:42:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015, 2016, 2017 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | 32.392 | 79 | 0.610521 |
984173b509bb7adc9abbee4e1d439960451851d9 | 200 | py | Python | backend/app/database/schemas.py | AxlLind/wasm-sandbox-demo | 333e00c24e34bf535efe06aa0fc1272bce30f65c | [
"MIT"
] | 3 | 2020-05-29T09:24:41.000Z | 2022-02-06T22:12:11.000Z | backend/app/database/schemas.py | AxlLind/wasm-sandbox-demo | 333e00c24e34bf535efe06aa0fc1272bce30f65c | [
"MIT"
] | 8 | 2020-05-21T09:57:48.000Z | 2021-08-28T09:06:53.000Z | backend/app/database/schemas.py | AxlLind/wasm-sandbox-demo | 333e00c24e34bf535efe06aa0fc1272bce30f65c | [
"MIT"
] | null | null | null | from typing import List
from pydantic import BaseModel
class BotBase(BaseModel):
name: str
base64_encoded_bot: str
class Bot(BotBase):
id: int
class Config:
orm_mode = True | 15.384615 | 30 | 0.695 |
afb324a2e748ab5b49dcdbb2dda778536bc98729 | 14,300 | py | Python | temp/input_systemwin.py | Pugavkomm/NS-analyst | 698af0e94f57b431fd77c17c49d4a23f11d21d3f | [
"MIT"
] | null | null | null | temp/input_systemwin.py | Pugavkomm/NS-analyst | 698af0e94f57b431fd77c17c49d4a23f11d21d3f | [
"MIT"
] | null | null | null | temp/input_systemwin.py | Pugavkomm/NS-analyst | 698af0e94f57b431fd77c17c49d4a23f11d21d3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'inpu_systemwin.ui'
#
# Created by: PyQt5 UI code generator 5.12
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_inpusystemWin(object):
def setupUi(self, inpusystemWin):
... | 50 | 149 | 0.682797 |
015e53fae6b0801570e76f21604480d4b4a07a46 | 6,775 | py | Python | torchbenchmark/models/maskrcnn_benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/inference.py | Chillee/benchmark | 91e1b2871327e44b9b7d24d173ca93720fb6565b | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/maskrcnn_benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/inference.py | Chillee/benchmark | 91e1b2871327e44b9b7d24d173ca93720fb6565b | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/maskrcnn_benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/inference.py | Chillee/benchmark | 91e1b2871327e44b9b7d24d173ca93720fb6565b | [
"BSD-3-Clause"
] | null | null | null | import torch
from ..inference import RPNPostProcessor
from ..utils import permute_and_flatten
from ....modeling.box_coder import BoxCoder
from ....modeling.utils import cat
from ....structures.bounding_box import BoxList
from ....structures.boxlist_ops import cat_boxlist
from ....structures.boxlist_ops import boxlist... | 34.92268 | 79 | 0.591587 |
57bfc63efba1b694fcf361f83573e9800846837f | 713 | py | Python | __init__.py | leoleolam/fpl_analytics | ef06e9dd929d2eed17e5481b61f1921e3092371d | [
"MIT"
] | 2 | 2019-02-16T18:38:03.000Z | 2021-09-24T16:30:10.000Z | __init__.py | leoleolam/fpl_analytics | ef06e9dd929d2eed17e5481b61f1921e3092371d | [
"MIT"
] | null | null | null | __init__.py | leoleolam/fpl_analytics | ef06e9dd929d2eed17e5481b61f1921e3092371d | [
"MIT"
] | null | null | null | from . _fpl_data_io import (fetch_data_url, save_fpl, load_fpl)
from . _fpl_process import *
from . _fpl_analyzer import (mean_plot, max_plot)
from . _fpl_feature import (FplFeature, BaseWeeklyFeature,
OppWeeklyFeature, HistWeeklyFeature,
Avg3WeeklyFeature, Sparse... | 50.928571 | 64 | 0.615708 |
6990eaa99edf937f32382a1c1a87965da56b91a9 | 9,414 | py | Python | neutron_lib/tests/unit/db/test_sqlalchemytypes.py | sapcc/neutron-lib | 4f787b8d7e04ebdbdb39a2582f31dca7f941fb4e | [
"Apache-2.0"
] | 41 | 2015-12-02T17:54:03.000Z | 2022-01-14T18:55:57.000Z | neutron_lib/tests/unit/db/test_sqlalchemytypes.py | sapcc/neutron-lib | 4f787b8d7e04ebdbdb39a2582f31dca7f941fb4e | [
"Apache-2.0"
] | null | null | null | neutron_lib/tests/unit/db/test_sqlalchemytypes.py | sapcc/neutron-lib | 4f787b8d7e04ebdbdb39a2582f31dca7f941fb4e | [
"Apache-2.0"
] | 62 | 2016-02-16T12:55:18.000Z | 2021-12-29T03:03:03.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
# d... | 36.207692 | 78 | 0.61058 |
64b083bfd93cf0c53890f024f76ce2e3d8cdf189 | 13,080 | py | Python | spanner/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | spanner/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | spanner/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 1 | 2020-04-14T10:47:41.000Z | 2020-04-14T10:47:41.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.spanner_admin_database_v1.proto import (
spanner_database_admin_pb2 as google_dot_cloud_dot_spanner_dot_admin_dot_database__v1_dot_proto_dot_spanner__database__admin__pb2,
)
from google.iam.v1 import iam_policy_pb2 ... | 57.117904 | 174 | 0.774159 |
e06dfec21f40da9eec5bece63f9786497d5c93f1 | 13,563 | py | Python | Pyiiko/frontWeb.py | gadzhi/pyko | 232eb1005fe5edb4a9b0ff518b9dc8421f8c10a4 | [
"Apache-2.0"
] | 18 | 2018-03-26T14:14:57.000Z | 2022-03-10T13:18:33.000Z | Pyiiko/frontWeb.py | rnd137/pyiiko | a702858c2ee597cbcc32317f45c2a79ec6c19035 | [
"Apache-2.0"
] | null | null | null | Pyiiko/frontWeb.py | rnd137/pyiiko | a702858c2ee597cbcc32317f45c2a79ec6c19035 | [
"Apache-2.0"
] | 6 | 2018-06-05T23:44:21.000Z | 2022-03-23T11:03:34.000Z | # Apache License
# Version 2.0, January 2004
# http://www.apache.org/licenses/
#
# TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
#
# 1. Definitions.
#
# "License" shall mean the terms and conditions for use, reproduction, and
# distribution as defined by Sections 1 through 9 of this document.
#
#... | 48.095745 | 80 | 0.706407 |
b8f7828910be8890a60b3648b628310d710d94b3 | 4,618 | py | Python | go/dlgo/agent/pg.py | huynq55/alpha-zero-general | 7c7b8a9a09b79178157ec6b6d379a071c9f0994a | [
"MIT"
] | null | null | null | go/dlgo/agent/pg.py | huynq55/alpha-zero-general | 7c7b8a9a09b79178157ec6b6d379a071c9f0994a | [
"MIT"
] | null | null | null | go/dlgo/agent/pg.py | huynq55/alpha-zero-general | 7c7b8a9a09b79178157ec6b6d379a071c9f0994a | [
"MIT"
] | null | null | null | """Policy gradient learning."""
import numpy as np
from keras import backend as K
from keras.optimizers import SGD
from dlgo.agent.base import Agent
from dlgo.agent.helpers import is_point_an_eye
from dlgo import encoders
from dlgo import goboard
from dlgo import kerasutil
__all__ = [
'PolicyAgent',
'load_pol... | 35.523077 | 76 | 0.637939 |
5da24a922642b799d04edfc9fee38cd376d9b251 | 16,492 | py | Python | neutron/tests/tempest/common/isolated_creds.py | NeCTAR-RC/neutron | acf78cc3c88aff638180819419a65145a9a79695 | [
"Apache-2.0"
] | null | null | null | neutron/tests/tempest/common/isolated_creds.py | NeCTAR-RC/neutron | acf78cc3c88aff638180819419a65145a9a79695 | [
"Apache-2.0"
] | null | null | null | neutron/tests/tempest/common/isolated_creds.py | NeCTAR-RC/neutron | acf78cc3c88aff638180819419a65145a9a79695 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corp.
#
# 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 t... | 41.964377 | 79 | 0.603383 |
1c35eb3559160c1667dc5809cf0b63a92d7f0385 | 686 | py | Python | app/stopwatch/apps.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | app/stopwatch/apps.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | 1 | 2019-02-20T21:15:08.000Z | 2019-02-20T21:15:08.000Z | app/stopwatch/apps.py | zigellsn/JWConfStage | 684060562a971b2dc33fe44b7f223babd4094786 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2022 Simon Zigelli
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.3 | 75 | 0.752187 |
b9373328eb87f03cfce46f268a74685f80e4a170 | 15,084 | py | Python | pandas/tests/indexes/datetimes/test_misc.py | aschonfeld/pandas | 65d9fe445da529a81502fd0692cb80de1494ac2c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexes/datetimes/test_misc.py | aschonfeld/pandas | 65d9fe445da529a81502fd0692cb80de1494ac2c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexes/datetimes/test_misc.py | aschonfeld/pandas | 65d9fe445da529a81502fd0692cb80de1494ac2c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import calendar
from datetime import datetime
import locale
import unicodedata
import numpy as np
import pytest
import pandas as pd
from pandas import DatetimeIndex, Index, Timestamp, date_range, offsets
import pandas._testing as tm
class TestTimeSeries:
def test_range_edges(self):
# GH#13672
id... | 36.790244 | 88 | 0.538849 |
d6c1e39aed61283fbe5213687be92e1e05c575e1 | 545 | py | Python | examples/checkbox.py | Yardanico/pylibui-cffi | 10d90f08b6b1e43bf567ffcd22dbe976cb10e80e | [
"MIT"
] | 6 | 2017-10-16T03:23:05.000Z | 2020-11-10T06:24:04.000Z | examples/checkbox.py | TiberiumN/pylibui-cffi | 10d90f08b6b1e43bf567ffcd22dbe976cb10e80e | [
"MIT"
] | null | null | null | examples/checkbox.py | TiberiumN/pylibui-cffi | 10d90f08b6b1e43bf567ffcd22dbe976cb10e80e | [
"MIT"
] | 1 | 2018-09-07T06:14:27.000Z | 2018-09-07T06:14:27.000Z | """
Shows a simple checkbox.
"""
from pylibui.core import App
from pylibui.controls import Window, Checkbox
class MyWindow(Window):
def on_close(self, data):
super().on_close(data)
app.stop()
class MyCheckbox(Checkbox):
def on_toggle(self, data):
print('checkbox toggled!')
app = A... | 16.515152 | 45 | 0.691743 |
9febd55984f474bfb172681e894bef490050458c | 15,182 | py | Python | nova/network/model.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | 1 | 2021-09-10T15:29:02.000Z | 2021-09-10T15:29:02.000Z | nova/network/model.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | nova/network/model.py | PFZheng/nova | 84be8abbccb5ddc2d7c5a7db59019ed1edb19e7f | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# 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 requ... | 32.861472 | 79 | 0.604663 |
95cf81f6580859acb63a88d24c33d80890a33740 | 135 | py | Python | cubework/__init__.py | kurisusnowdeng/Cubework | 56c0d35f87765efc8f2b6d47a4ccea6f2ec626aa | [
"Apache-2.0"
] | null | null | null | cubework/__init__.py | kurisusnowdeng/Cubework | 56c0d35f87765efc8f2b6d47a4ccea6f2ec626aa | [
"Apache-2.0"
] | null | null | null | cubework/__init__.py | kurisusnowdeng/Cubework | 56c0d35f87765efc8f2b6d47a4ccea6f2ec626aa | [
"Apache-2.0"
] | null | null | null | from .arguments import get_args, parse_args
from .initialize import initialize_distributed
from .distributed import destroy_distributed | 45 | 46 | 0.881481 |
420c2f3d1a5e99926a7adeb9aefced3fe5b2df15 | 737 | py | Python | ex079.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | ex079.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | ex079.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | # Crie um programa onde o usuário possa digitar vários valores numéricos e cadastre-os em uma lista. Caso o número já exista lá dentro, ele não será adicionado. No final, serão exibidos todos os valores únicos digitados, em ordem crescente.
lista = list()
while True:
valor = int(input('Digite um valor: '))
if... | 36.85 | 240 | 0.648575 |
cdb565967f7df398184564837c65227c13cea049 | 1,606 | py | Python | peekingduck/pipeline/nodes/input/utils/preprocess.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 79 | 2021-06-04T04:11:33.000Z | 2022-03-31T17:46:38.000Z | peekingduck/pipeline/nodes/input/utils/preprocess.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 248 | 2021-06-04T07:19:52.000Z | 2022-03-30T08:03:35.000Z | peekingduck/pipeline/nodes/input/utils/preprocess.py | chngzyk/PeekingDuck | 299dbbda9104c40822ff1076e98b2d45f9974302 | [
"Apache-2.0"
] | 25 | 2021-06-22T03:48:57.000Z | 2022-03-16T04:33:52.000Z | # Copyright 2021 AI Singapore
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 29.2 | 84 | 0.718555 |
1acd5723a3375f8a1936749a223f3b586268a9c6 | 4,724 | py | Python | statsmodels/stats/tests/test_moment_helpers.py | aliavni/statsmodels | ef5d57a8d45de76a895e9401705280d558d688ad | [
"BSD-3-Clause"
] | 1 | 2022-01-24T15:17:37.000Z | 2022-01-24T15:17:37.000Z | statsmodels/stats/tests/test_moment_helpers.py | aliavni/statsmodels | ef5d57a8d45de76a895e9401705280d558d688ad | [
"BSD-3-Clause"
] | null | null | null | statsmodels/stats/tests/test_moment_helpers.py | aliavni/statsmodels | ef5d57a8d45de76a895e9401705280d558d688ad | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 16 17:33:56 2011
Author: Josef Perktold
"""
import numpy as np
import pytest
from numpy.testing import assert_almost_equal, assert_, assert_equal
from statsmodels.stats import moment_helpers
from statsmodels.stats.moment_helpers import (cov2corr, mvsk2mc, mc2mvsk,
... | 38.096774 | 79 | 0.528154 |
0d2696a7849d36b52dc08b4585a181a9e9766a38 | 35,743 | py | Python | stubs/codepipeline.py | claytonbrown/troposphere | bf0f1e48b14f578de0221d50f711467ad716ca87 | [
"BSD-2-Clause"
] | null | null | null | stubs/codepipeline.py | claytonbrown/troposphere | bf0f1e48b14f578de0221d50f711467ad716ca87 | [
"BSD-2-Clause"
] | null | null | null | stubs/codepipeline.py | claytonbrown/troposphere | bf0f1e48b14f578de0221d50f711467ad716ca87 | [
"BSD-2-Clause"
] | null | null | null | from . import AWSObject, AWSProperty
from .validators import *
from .constants import *
# -------------------------------------------
class CodePipelineInputArtifact(AWSProperty):
"""# InputArtifact - CloudFormationResourceSpecification version: 1.4.0
{
"Documentation": "http://docs.aws.amazon.com/AWSClo... | 62.817223 | 263 | 0.693199 |
525aa310a0acb8e0e2fc0d344a95c787994d218d | 1,877 | py | Python | packages/pyre/db/SQLite.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/db/SQLite.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:42:13.000Z | 2021-06-10T23:42:13.000Z | packages/pyre/db/SQLite.py | jlmaurer/pyre | 6af38a83621d7d6228d147b4bb94f97fbb10f6e2 | [
"BSD-3-Clause"
] | 2 | 2020-08-31T18:07:52.000Z | 2021-12-10T08:54:39.000Z | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2020 all rights reserved
#
# externals
import pyre
import sqlite3
# superclass
from .Server import Server
# declaration
class SQLite(Server, family="pyre.db.server.sqlite"):
"""
Component that manages the connection to a sqlite databas... | 22.890244 | 76 | 0.613213 |
50843b77a057f0bf4b25539a2f0588614e01067c | 400 | py | Python | solutions/python3/1111.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/1111.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/1111.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | class Solution:
def maxDepthAfterSplit(self, seq: str) -> List[int]:
stack = []
res = [0] * len(seq)
for i, c in enumerate(seq):
if c == '(':
stack.append(i if not stack or stack[-1] < 0 else -i)
else:
ind = stack.pop()
... | 33.333333 | 69 | 0.4125 |
a6724979bb197242263c38d280e273a194a0feed | 1,114 | py | Python | programming/python-curso_em_video/exercises/ex112/utilidadesCeV/moeda/__init__.py | carlosevmoura/courses-notes | dc938625dd79267f9a262e7e6939205f63dda885 | [
"MIT"
] | null | null | null | programming/python-curso_em_video/exercises/ex112/utilidadesCeV/moeda/__init__.py | carlosevmoura/courses-notes | dc938625dd79267f9a262e7e6939205f63dda885 | [
"MIT"
] | null | null | null | programming/python-curso_em_video/exercises/ex112/utilidadesCeV/moeda/__init__.py | carlosevmoura/courses-notes | dc938625dd79267f9a262e7e6939205f63dda885 | [
"MIT"
] | null | null | null | def aumentar(_valor, _percentual, _format=True):
return moeda(_valor * (1 + _percentual / 100), _format)
def diminuir(_valor, _percentual, _format=True):
return moeda(_valor * (1 - _percentual / 100), _format)
def dobro(_valor, _format=True):
return moeda(_valor * 2, _format)
def metade(_valor, _forma... | 28.564103 | 65 | 0.579892 |
9cf1ded520bda81ff60acf676a87cfdc1db76526 | 4,777 | py | Python | ws/build/arducam_stereo_camera/catkin_generated/installspace/arducam_stereo_camera.py | Prasanna-icefire/redtail | 780886023831a5bb4108b6a2885385c3df314e18 | [
"BSD-3-Clause"
] | null | null | null | ws/build/arducam_stereo_camera/catkin_generated/installspace/arducam_stereo_camera.py | Prasanna-icefire/redtail | 780886023831a5bb4108b6a2885385c3df314e18 | [
"BSD-3-Clause"
] | null | null | null | ws/build/arducam_stereo_camera/catkin_generated/installspace/arducam_stereo_camera.py | Prasanna-icefire/redtail | 780886023831a5bb4108b6a2885385c3df314e18 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import cv2
import numpy as np
from datetime import datetime
import array
import fcntl
import os
import argparse
from utils import ArducamUtils
import rospy
from cv_bridge import CvBridge, CvBridgeError
from sensor_msgs.msg import Image, CameraInfo
from camera_info_manager import CameraInfoManag... | 29.487654 | 87 | 0.665899 |
670153d47f6d0da377725767e20ee14255bbad72 | 1,156 | py | Python | codes/first_checkpoint.py | mkunimoto/Transit-Search-and-Vetting | 9c5ea221fac9a511e58a14c2ab5b5335675379dc | [
"BSD-3-Clause"
] | 1 | 2020-04-26T08:49:44.000Z | 2020-04-26T08:49:44.000Z | codes/first_checkpoint.py | mkunimoto/Transit-Search-and-Vetting | 9c5ea221fac9a511e58a14c2ab5b5335675379dc | [
"BSD-3-Clause"
] | null | null | null | codes/first_checkpoint.py | mkunimoto/Transit-Search-and-Vetting | 9c5ea221fac9a511e58a14c2ab5b5335675379dc | [
"BSD-3-Clause"
] | null | null | null | import sys
import numpy as np
data = np.loadtxt(sys.argv[1])
per = float(sys.argv[2])
epo = float(sys.argv[3])
dur = float(sys.argv[4])
time = data[:,0]
flux = data[:,1]
# Temporal time series
v = flux - np.mean(flux)
# Phased time series
t0 = epo + 54900 - 0.5
phase = ((((time - t0)/per - 0.5) % 1.) - 0.5)*per
# ... | 21.407407 | 71 | 0.613322 |
e7c4d8ddfd004ea73b17ba3a44ab6d69a58e0117 | 45,344 | py | Python | src/python/dxpy/__init__.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/__init__.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/__init__.py | claymcleod/dx-toolkit | 3b51c06b39d4c3925439fff0089d7d28c3bd7f1c | [
"Apache-2.0"
] | 1 | 2022-01-08T08:07:24.000Z | 2022-01-08T08:07:24.000Z | # Copyright (C) 2013-2016 DNAnexus, Inc.
#
# This file is part of dx-toolkit (DNAnexus platform client libraries).
#
# 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.a... | 42.939394 | 351 | 0.637901 |
163f3a37f4ef38b60f26c16e2df6636454763549 | 873 | py | Python | challenges/example/alice/alice.py | ameserole/Naumachia | dc13c33c5fcf053c74dfce8351a696d28857fd9d | [
"MIT"
] | null | null | null | challenges/example/alice/alice.py | ameserole/Naumachia | dc13c33c5fcf053c74dfce8351a696d28857fd9d | [
"MIT"
] | null | null | null | challenges/example/alice/alice.py | ameserole/Naumachia | dc13c33c5fcf053c74dfce8351a696d28857fd9d | [
"MIT"
] | null | null | null | from time import sleep
import socket
import random
import os
import sys
UDP_IP = 'bob'
UDP_PORT = 5005
flag = os.environ['CTF_FLAG']
print("UDP target IP:", UDP_IP)
print("UDP target port:", UDP_PORT)
print("message:", flag)
sys.stdout.flush()
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
def random_case... | 20.785714 | 102 | 0.583047 |
13e0fb12356ac1f2866c259401b93b93a3421cea | 1,398 | py | Python | example/config.py | beathahahaha/tensorflow-DeepFM-master-original | ac0477f28d05ab45c3b4b8718d257fa0795238b9 | [
"MIT"
] | null | null | null | example/config.py | beathahahaha/tensorflow-DeepFM-master-original | ac0477f28d05ab45c3b4b8718d257fa0795238b9 | [
"MIT"
] | null | null | null | example/config.py | beathahahaha/tensorflow-DeepFM-master-original | ac0477f28d05ab45c3b4b8718d257fa0795238b9 | [
"MIT"
] | null | null | null |
# set the path-to-files
TRAIN_FILE = "./data/train.csv"
TEST_FILE = "./data/test.csv"
SUB_DIR = "./output"
NUM_SPLITS = 3
RANDOM_SEED = 2017
# types of columns of the dataset dataframe
CATEGORICAL_COLS = [
# 'ps_ind_02_cat', 'ps_ind_04_cat', 'ps_ind_05_cat',
# 'ps_car_01_cat', 'ps_car_02_cat', 'ps_car_03_c... | 30.391304 | 59 | 0.672389 |
dcbe142fea762e57bf5dc4dcec77a18d3cb051c5 | 12,854 | py | Python | pcdet/models/roi_heads/roi_head_template.py | cuiheng1234/CT3D | 831eb3cb1bc32775c415db7eb3e77c5ad800c9bb | [
"MIT"
] | 79 | 2021-08-16T11:37:28.000Z | 2022-03-28T14:01:59.000Z | pcdet/models/roi_heads/roi_head_template.py | cuiheng1234/CT3D | 831eb3cb1bc32775c415db7eb3e77c5ad800c9bb | [
"MIT"
] | 10 | 2021-08-14T08:04:25.000Z | 2021-12-20T05:35:24.000Z | pcdet/models/roi_heads/roi_head_template.py | cuiheng1234/CT3D | 831eb3cb1bc32775c415db7eb3e77c5ad800c9bb | [
"MIT"
] | 17 | 2021-08-22T16:51:08.000Z | 2022-03-21T02:21:55.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from ...utils import box_coder_utils, common_utils, loss_utils
from ..model_utils.model_nms_utils import class_agnostic_nms
from .target_assigner.proposal_target_layer import ProposalTargetLayer
class RoIHeadTemplate(nn.Module):
... | 45.260563 | 136 | 0.624319 |
f57310c64a06cb86660fb0362121b76d6c9f405e | 16,374 | py | Python | tests/test_list_action.py | electronhead/whendo | 27112834be0935b5b0f7ade4316e35532532e047 | [
"MIT"
] | 1 | 2022-03-04T09:25:13.000Z | 2022-03-04T09:25:13.000Z | tests/test_list_action.py | electronhead/whendo | 27112834be0935b5b0f7ade4316e35532532e047 | [
"MIT"
] | null | null | null | tests/test_list_action.py | electronhead/whendo | 27112834be0935b5b0f7ade4316e35532532e047 | [
"MIT"
] | null | null | null | from typing import Optional, Any, Dict
import pytest
import whendo.core.actions.list_action as list_x
from whendo.core.action import Action, Rez
from whendo.core.exception import TerminateSchedulerException
def negate(action: Action):
return list_x.Fail(operand=action)
def is_exception(result):
return isins... | 27.612142 | 88 | 0.604251 |
f5484230f702f45a43736e872137f72ae019e066 | 838 | py | Python | lint/events.py | arcturus140/SublimeLinter | 7b033b8bc3c7f1d0f539abde9dcec6d7a0041f41 | [
"MIT"
] | 646 | 2017-12-29T17:29:10.000Z | 2022-03-26T08:35:33.000Z | lint/events.py | arcturus140/SublimeLinter | 7b033b8bc3c7f1d0f539abde9dcec6d7a0041f41 | [
"MIT"
] | 1,121 | 2017-12-29T14:36:53.000Z | 2022-03-27T16:56:33.000Z | lint/events.py | arcturus140/SublimeLinter | 7b033b8bc3c7f1d0f539abde9dcec6d7a0041f41 | [
"MIT"
] | 148 | 2018-01-03T20:51:38.000Z | 2022-03-27T16:48:37.000Z | from collections import defaultdict
import traceback
LINT_START = 'LINT_START' # (buffer_id)
LINT_RESULT = 'LINT_RESULT' # (filename, linter_name, errors)
LINT_END = 'LINT_END' # (buffer_id)
listeners = defaultdict(set)
def subscribe(topic, fn):
listeners[topic].add(fn)
def unsubscribe(topic, fn)... | 17.458333 | 62 | 0.620525 |
110a9180ca5cbb0bf6367b4323c252d349791dec | 3,391 | py | Python | deep_quintic/terrain.py | bit-bots/deep_quintic | da67d87f5f3cab91bb4b00e676f7a38682f3ab72 | [
"MIT"
] | 19 | 2021-02-12T13:48:28.000Z | 2022-03-30T16:25:30.000Z | deep_quintic/terrain.py | bit-bots/deep_quintic | da67d87f5f3cab91bb4b00e676f7a38682f3ab72 | [
"MIT"
] | 96 | 2018-12-18T14:54:19.000Z | 2022-02-02T09:47:24.000Z | deep_quintic/terrain.py | bit-bots/deep_quintic | da67d87f5f3cab91bb4b00e676f7a38682f3ab72 | [
"MIT"
] | 4 | 2019-08-12T06:33:43.000Z | 2021-09-26T11:33:44.000Z | import pybullet as p
import pybullet_data as pd
import math
import time
import random
class Terrain:
def __init__(self, max_height=0.01, size=(25, 25), scale=(0.1, 0.1), clear_center=False):
self.id = -1
self.collision_shape = -1
self.scale = scale
self.rows = int(size[0] / scale... | 47.097222 | 117 | 0.561781 |
e20f907816a2d5d268fb399ca92d15c7ebb741da | 1,293 | py | Python | answers/automate_ml.py | d3vzer0/applied_data_science_amsterdam | 94b97c557001927b1ddffdfabc09c19364e1370b | [
"MIT"
] | 2 | 2020-02-20T12:40:25.000Z | 2021-07-13T06:27:15.000Z | answers/automate_ml.py | citrus304/bh2019 | d8ba8d6a0bf2ffc18a32bcc3c0579c337c165cde | [
"MIT"
] | null | null | null | answers/automate_ml.py | citrus304/bh2019 | d8ba8d6a0bf2ffc18a32bcc3c0579c337c165cde | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline, make_union
from sklearn.preprocessing import StandardScaler
from tpot.builti... | 49.730769 | 170 | 0.815159 |
7154f478f516307da2f02e7b41d79eeedb6ae4b8 | 3,788 | py | Python | hw4-lists/main.py | ltrojan/PirplePythonIsEasy | bbecb6676864ad447ff5be4e62c7d4525e870b7a | [
"MIT"
] | null | null | null | hw4-lists/main.py | ltrojan/PirplePythonIsEasy | bbecb6676864ad447ff5be4e62c7d4525e870b7a | [
"MIT"
] | null | null | null | hw4-lists/main.py | ltrojan/PirplePythonIsEasy | bbecb6676864ad447ff5be4e62c7d4525e870b7a | [
"MIT"
] | 1 | 2020-12-31T16:17:26.000Z | 2020-12-31T16:17:26.000Z | # -*- coding: utf-8 -*-
"""
main.py: Homework #4: Lists (Python Is Easy course by Pirple)
Details:
Create a global variable called myUniqueList. It should be an empty list
to start.
Next, create a function that allows you to add things to that list.
Anything that's passed to this function should get added to
myUniq... | 25.086093 | 72 | 0.660507 |
9a2d73e29822d076daba1edca3cf42bf0886614f | 8,587 | py | Python | tests/__init__.py | fvannee/patroni | e87fc12aebc6eb15b5efce3a10181c032b0e9965 | [
"MIT"
] | null | null | null | tests/__init__.py | fvannee/patroni | e87fc12aebc6eb15b5efce3a10181c032b0e9965 | [
"MIT"
] | null | null | null | tests/__init__.py | fvannee/patroni | e87fc12aebc6eb15b5efce3a10181c032b0e9965 | [
"MIT"
] | null | null | null | import os
import shutil
import unittest
from mock import Mock, patch
import psycopg2
import urllib3
from patroni.dcs import Leader, Member
from patroni.postgresql import Postgresql
from patroni.postgresql.config import ConfigHandler
from patroni.utils import RetryFailedError
class SleepException(Exception):
pa... | 40.504717 | 120 | 0.573308 |
c77f45fb5b17c5cab183e89646ddd156538cfc23 | 11,962 | py | Python | testing_support/patches_data.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | null | null | null | testing_support/patches_data.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | null | null | null | testing_support/patches_data.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# 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.
"""Samples patches to test patch.py."""
class RAW(object):
PATCH = (
'Index: chrome/file.cc\n'
'=========================... | 33.982955 | 80 | 0.543805 |
86535616ae477771363ad15dadca178b0a620b36 | 1,285 | py | Python | release/stubs.min/System/Windows/Forms/__init___parts/ICurrencyManagerProvider.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ICurrencyManagerProvider.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ICurrencyManagerProvider.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class ICurrencyManagerProvider:
""" Provides custom binding management for components. """
def GetRelatedCurrencyManager(self, dataMember):
"""
GetRelatedCurrencyManager(self: ICurrencyManagerProvider,dataMember: str) -> CurrencyManager
Gets the System.Windows.Forms.CurrencyManager f... | 27.934783 | 153 | 0.70428 |
3c5de6178be270af4fdd05219e7777a62777b66d | 86,561 | py | Python | samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py | spacether/openapi-generator | e708cdc83eb22e6f2087eb9b85139ecba1917626 | [
"Apache-2.0"
] | null | null | null | samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py | spacether/openapi-generator | e708cdc83eb22e6f2087eb9b85139ecba1917626 | [
"Apache-2.0"
] | null | null | null | samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api.py | spacether/openapi-generator | e708cdc83eb22e6f2087eb9b85139ecba1917626 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 37.684371 | 174 | 0.459375 |
51b9a3fc59e2846c72553d1a73601991902d2f94 | 3,232 | py | Python | site_scons/site_init.py | pramodsu/InvisiSpec-1.0 | 0d868f866992c064dcc64841ded7614cfae57ea0 | [
"BSD-3-Clause"
] | 1 | 2020-08-31T16:58:31.000Z | 2020-08-31T16:58:31.000Z | site_scons/site_init.py | teotro/InvisiSpec-1.0 | 7a923482ac33507fffefa9c2adbf45b4f53dc775 | [
"BSD-3-Clause"
] | null | null | null | site_scons/site_init.py | teotro/InvisiSpec-1.0 | 7a923482ac33507fffefa9c2adbf45b4f53dc775 | [
"BSD-3-Clause"
] | 1 | 2020-09-27T06:39:53.000Z | 2020-09-27T06:39:53.000Z | # Copyright (c) 2013, 2015-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the fun... | 44.273973 | 74 | 0.77599 |
e8281615f24f62ab9df1b012ca91e697ede4efbc | 3,179 | py | Python | main.py | MarkusPrim/B_To_MuNu | 8d6f5ce403a4382a7845ca243699ecec0e8fbd8e | [
"MIT"
] | null | null | null | main.py | MarkusPrim/B_To_MuNu | 8d6f5ce403a4382a7845ca243699ecec0e8fbd8e | [
"MIT"
] | null | null | null | main.py | MarkusPrim/B_To_MuNu | 8d6f5ce403a4382a7845ca243699ecec0e8fbd8e | [
"MIT"
] | null | null | null | import numpy
from uncertainties import ufloat
class Unit(object):
GeV = 1
MeV = 1e-3 * GeV
eV = 1e-9 * GeV
s = 1. / 6.582119e-16 / eV
class BToMuNuCalculations(object):
def __init__(self):
""" Calculates the Standard Model prediction for the B -> l nu decay.
K.A. Olive et al. (... | 41.828947 | 103 | 0.635105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.