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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
753242888d04ffc19c56f0618c9f126e83e9c385 | 8,281 | py | Python | nurbspy/nurbs_curve_circular_arc.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 25 | 2020-03-11T19:21:40.000Z | 2022-03-24T02:21:11.000Z | nurbspy/nurbs_curve_circular_arc.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 2 | 2021-08-12T10:56:16.000Z | 2022-03-22T17:26:57.000Z | nurbspy/nurbs_curve_circular_arc.py | dragonbook/nurbspy | 08640cdb243f4cf72ae66f37e715afa14e70f455 | [
"MIT"
] | 8 | 2021-03-27T07:01:20.000Z | 2022-03-29T01:19:01.000Z | # -------------------------------------------------------------------------------------------------------------------- #
# Import packages
# -------------------------------------------------------------------------------------------------------------------- #
import numpy as np
from .nurbs_curve import NurbsCurve
# ... | 35.540773 | 123 | 0.507427 |
01b447aa855a3c26ab52a0a0b53da9d4f2542dc7 | 5,933 | py | Python | pandas/tests/arithmetic/conftest.py | kuantan/pandas | e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-02-20T13:36:45.000Z | 2021-02-20T13:36:45.000Z | pandas/tests/arithmetic/conftest.py | fanoway/pandas | 71312683b41b5177faf7ecd63555059504853cbd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2019-12-14T16:32:46.000Z | 2022-02-12T00:32:28.000Z | pandas/tests/arithmetic/conftest.py | lithomas1/pandas | e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
from pandas import RangeIndex
import pandas._testing as tm
from pandas.core.api import (
Float64Index,
Int64Index,
UInt64Index,
)
from pandas.core.computation import expressions as expr
@pytest.fixture(
autouse=True, scope="module", params=[0, 1000... | 24.415638 | 87 | 0.619417 |
ef0a4f97b4d77545aae27f42704f4e97629dd9a3 | 50,430 | py | Python | ginga/canvas/types/astro.py | finagle29/ginga | 161952a4016d3f014003db3d09dd78c61be85cb7 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/types/astro.py | finagle29/ginga | 161952a4016d3f014003db3d09dd78c61be85cb7 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/types/astro.py | finagle29/ginga | 161952a4016d3f014003db3d09dd78c61be85cb7 | [
"BSD-3-Clause"
] | null | null | null | #
# astro.py -- classes for special astronomy shapes drawn on
# ginga canvases.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import math
import numpy as np
from ginga.canvas.CanvasObject import (CanvasObjectBase, _bool, _color,
... | 38.732719 | 80 | 0.521892 |
b2fcbc0953496d0e6bdcdbee46ba9c0d1fbb2c94 | 6,361 | py | Python | ROAR/perception_module/obstacle_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 18 | 2020-10-16T00:38:55.000Z | 2022-03-03T06:01:49.000Z | ROAR/perception_module/obstacle_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 20 | 2020-07-23T03:50:50.000Z | 2021-11-09T04:00:26.000Z | ROAR/perception_module/obstacle_detector.py | RyanC1681/RCAI1122 | c9683110b58c255a7a78d880ff73df7ff2329405 | [
"Apache-2.0"
] | 140 | 2019-11-20T22:46:02.000Z | 2022-03-29T13:26:17.000Z | from ROAR.agent_module.agent import Agent
from ROAR.perception_module.detector import Detector
import numpy as np
from typing import Optional, Any, Tuple
import open3d as o3d
import time, cv2
class ObstacleDetector(Detector):
def save(self, **kwargs):
pass
def __init__(self, agent: Agent, knn: int = ... | 49.310078 | 135 | 0.553687 |
221f62e46706bdf8cf582723607b01e6f8656df8 | 6,399 | py | Python | tensorflow_datasets/core/features/translation_feature.py | jackd/datasets | 90c0b38438afcb56044f13b11a426d013d0c8848 | [
"Apache-2.0"
] | 1 | 2019-04-26T02:24:59.000Z | 2019-04-26T02:24:59.000Z | tensorflow_datasets/core/features/translation_feature.py | shayan-taheri/datasets | 08d14905499f0ae785dd8d56e9bb01cacf8a65c9 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/features/translation_feature.py | shayan-taheri/datasets | 08d14905499f0ae785dd8d56e9bb01cacf8a65c9 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | 33.15544 | 81 | 0.692608 |
1c1ef5d24827c9642b623f46ec56b48ed9fde119 | 4,572 | py | Python | nxbt/web/app.py | wyatt3/nxbt | 0c1a6be095fc4386d253c189f9566fa582df08db | [
"MIT"
] | null | null | null | nxbt/web/app.py | wyatt3/nxbt | 0c1a6be095fc4386d253c189f9566fa582df08db | [
"MIT"
] | null | null | null | nxbt/web/app.py | wyatt3/nxbt | 0c1a6be095fc4386d253c189f9566fa582df08db | [
"MIT"
] | null | null | null | import json
import os
from threading import RLock
import time
from socket import gethostname
from .cert import generate_cert
from ..nxbt import Nxbt, PRO_CONTROLLER
from flask import Flask, render_template, request
from flask_socketio import SocketIO, emit
import eventlet
app = Flask(__name__,
static_url... | 27.709091 | 93 | 0.582021 |
d7ca2c91b413e5b0d7b140957988cc358bf7b69e | 22,779 | py | Python | imperative/python/megengine/module/module.py | jonrzhang/MegEngine | 94b72022156a068d3e87bceed7e1c7ae77dada16 | [
"Apache-2.0"
] | 1 | 2021-03-29T04:25:30.000Z | 2021-03-29T04:25:30.000Z | imperative/python/megengine/module/module.py | jonrzhang/MegEngine | 94b72022156a068d3e87bceed7e1c7ae77dada16 | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/module/module.py | jonrzhang/MegEngine | 94b72022156a068d3e87bceed7e1c7ae77dada16 | [
"Apache-2.0"
] | null | null | null | # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 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 ARRANTIES OR CONDITIONS OF ANY ... | 36.272293 | 111 | 0.566706 |
550872e40c5f1766b02f8ac632526835b1c45627 | 1,770 | py | Python | tests/test_multithread.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | 1 | 2021-01-06T01:44:06.000Z | 2021-01-06T01:44:06.000Z | tests/test_multithread.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | null | null | null | tests/test_multithread.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/gaogaotiantian/viztracer/blob/master/NOTICE.txt
from viztracer import VizTracer
import time
import threading
from .base_tmpl import BaseTmpl
def fib(n):
if n < 2:
return 1
time.sleep(0.00... | 24.583333 | 86 | 0.597175 |
939740ae11092dcd27714477128b1a74a1d75911 | 14,070 | py | Python | tools/client_mods.py | fadams/emscripten | 42fb486c53d627b203b77af6e5d0c088c0ad03ad | [
"MIT"
] | 1 | 2021-06-02T19:42:13.000Z | 2021-06-02T19:42:13.000Z | tools/client_mods.py | TheGoozah/emscripten | 42fb486c53d627b203b77af6e5d0c088c0ad03ad | [
"MIT"
] | null | null | null | tools/client_mods.py | TheGoozah/emscripten | 42fb486c53d627b203b77af6e5d0c088c0ad03ad | [
"MIT"
] | 1 | 2019-10-22T12:25:11.000Z | 2019-10-22T12:25:11.000Z |
class PreciseF32:
name = 'PRECISE_F32 == 2'
@staticmethod
def get(settings, minified):
if settings.PRECISE_F32 == 2:
# Potentially-modifiable code, load as text, modify, then execute. This lets you
# patch the code on the client machine right before it is executed, perhaps based
# on infor... | 75.240642 | 229 | 0.524094 |
99d75706e666a1f1f0dc6f74c1d08cb3a64f942c | 2,259 | py | Python | eng/tox/tox_helper_tasks.py | hytao/azure-sdk-for-python | 382994348b289d4cb90dc74e2ddc9fadc7c5824d | [
"MIT"
] | null | null | null | eng/tox/tox_helper_tasks.py | hytao/azure-sdk-for-python | 382994348b289d4cb90dc74e2ddc9fadc7c5824d | [
"MIT"
] | null | null | null | eng/tox/tox_helper_tasks.py | hytao/azure-sdk-for-python | 382994348b289d4cb90dc74e2ddc9fadc7c5824d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 34.753846 | 107 | 0.593625 |
f6e12de606a83746a6b33e69b03a735403d6a2e2 | 28,893 | py | Python | ppdet/engine/trainer.py | xudou3/PaddleDetection | f5ddf363e2add2f33e535f2c0c563338ae655fe5 | [
"Apache-2.0"
] | 1 | 2021-11-03T03:41:37.000Z | 2021-11-03T03:41:37.000Z | ppdet/engine/trainer.py | xudou3/PaddleDetection | f5ddf363e2add2f33e535f2c0c563338ae655fe5 | [
"Apache-2.0"
] | null | null | null | ppdet/engine/trainer.py | xudou3/PaddleDetection | f5ddf363e2add2f33e535f2c0c563338ae655fe5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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 appli... | 40.924929 | 141 | 0.571142 |
68656b0c261aec9e0fbd7bfa602c777b3326acb4 | 9,321 | py | Python | example.py | ehbussell/PatchOptimalControl | 8a422a2b0b85b3ea4f6898bf2df9cdd3a9e4c52f | [
"MIT"
] | null | null | null | example.py | ehbussell/PatchOptimalControl | 8a422a2b0b85b3ea4f6898bf2df9cdd3a9e4c52f | [
"MIT"
] | null | null | null | example.py | ehbussell/PatchOptimalControl | 8a422a2b0b85b3ea4f6898bf2df9cdd3a9e4c52f | [
"MIT"
] | null | null | null | """Example script for optimising control on patch model."""
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np
from patch_model.patch_model import PatchModel
def make_figure2(model):
"Replicate Figure 2 from paper - General Strategy"
times = mod... | 37.584677 | 100 | 0.622144 |
d82854bded54373bcf9b37569b875d3312da17c7 | 1,255 | py | Python | Writeups/Offensive Security/Proving Ground/Potato/3.Exploit/autopwn_pg_potato.py | dugisan3rd/ctf | 01594916508479d9643d560a15d6ce2fd547286b | [
"MIT"
] | null | null | null | Writeups/Offensive Security/Proving Ground/Potato/3.Exploit/autopwn_pg_potato.py | dugisan3rd/ctf | 01594916508479d9643d560a15d6ce2fd547286b | [
"MIT"
] | null | null | null | Writeups/Offensive Security/Proving Ground/Potato/3.Exploit/autopwn_pg_potato.py | dugisan3rd/ctf | 01594916508479d9643d560a15d6ce2fd547286b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import requests
import pyfiglet
from colorama import Fore, Back, Style
def banner(text="autopwn"):
print(Fore.RED + pyfiglet.figlet_format(text, font="banner"))
print(Fore.GREEN + "[+] Author: @dugisan3rd")
print("[+] Medium: Offensive Security Proving Ground")
print("[+] Link: http... | 33.918919 | 98 | 0.666932 |
62c5e985aef135931ec76f17f94cd0678ca67754 | 2,335 | py | Python | foundryapp/foundryapp/doctype/container/container.py | umaepoch/foundryapp | 75e20cb399b114d416d3bdd286edd8c5a4690c75 | [
"MIT"
] | null | null | null | foundryapp/foundryapp/doctype/container/container.py | umaepoch/foundryapp | 75e20cb399b114d416d3bdd286edd8c5a4690c75 | [
"MIT"
] | null | null | null | foundryapp/foundryapp/doctype/container/container.py | umaepoch/foundryapp | 75e20cb399b114d416d3bdd286edd8c5a4690c75 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, yashwanth and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
import frappe
class Container(Document):
pass
@frappe.whitelist()
def fetch_so_details(foreign... | 41.696429 | 109 | 0.707066 |
9427c1c57cf677a2859c3b47d370c6f3bd16a79d | 543 | py | Python | asyncqtpy/common.py | codelv/asyncqtpy | def6207aa44c7de794345816fff514103c2440bb | [
"BSD-2-Clause"
] | null | null | null | asyncqtpy/common.py | codelv/asyncqtpy | def6207aa44c7de794345816fff514103c2440bb | [
"BSD-2-Clause"
] | null | null | null | asyncqtpy/common.py | codelv/asyncqtpy | def6207aa44c7de794345816fff514103c2440bb | [
"BSD-2-Clause"
] | null | null | null | # © 2018 Gerard Marull-Paretas <gerard@teslabs.com>
# © 2014 Mark Harviston <mark.harviston@gmail.com>
# © 2014 Arve Knudsen <arve.knudsen@gmail.com>
# BSD License
"""Mostly irrelevant, but useful utilities common to UNIX and Windows."""
import logging
def with_logger(cls):
"""Class decorator to add a logger to ... | 30.166667 | 73 | 0.714549 |
fabe2daa0008874928d3ddec526cc842f23acf37 | 32,327 | py | Python | tools/idl_parser/idl_parser.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-01-25T10:18:18.000Z | 2021-01-23T15:29:56.000Z | tools/idl_parser/idl_parser.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/idl_parser/idl_parser.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-01-23T15:29:58.000Z | 2021-01-23T15:29:58.000Z | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Parser for PPAPI IDL """
#
# IDL Parser
#
# The parser is uses the PLY yacc library to build a set of parsing rules based
# on... | 29.630614 | 88 | 0.585702 |
fb075b3b9be5a7dda301ab2d160a04536b9cd19b | 572 | py | Python | LeetCode/Aug 2021 LeetCoding Challenge/Two Sum IV - Input is a BST.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 13 | 2021-09-02T07:30:02.000Z | 2022-03-22T19:32:03.000Z | LeetCode/Hash Table/Two Sum IV - Input is a BST.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | null | null | null | LeetCode/Hash Table/Two Sum IV - Input is a BST.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 3 | 2021-08-24T16:06:22.000Z | 2021-09-17T15:39:53.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findTarget(self, root: TreeNode, k: int) -> bool:
hashSet = set()
def find(node... | 30.105263 | 57 | 0.524476 |
253044488eca32b6431d8aefe66e2ed55bb5a633 | 370 | py | Python | rtamt/operation/stl/discrete_time/offline/xor_operation.py | xiaoyaooo/rtamt | edb7bf664720c52e9d70920102c450b1f593af95 | [
"BSD-3-Clause"
] | null | null | null | rtamt/operation/stl/discrete_time/offline/xor_operation.py | xiaoyaooo/rtamt | edb7bf664720c52e9d70920102c450b1f593af95 | [
"BSD-3-Clause"
] | null | null | null | rtamt/operation/stl/discrete_time/offline/xor_operation.py | xiaoyaooo/rtamt | edb7bf664720c52e9d70920102c450b1f593af95 | [
"BSD-3-Clause"
] | 1 | 2021-05-18T12:57:46.000Z | 2021-05-18T12:57:46.000Z | from rtamt.operation.abstract_operation import AbstractOperation
class XorOperation(AbstractOperation):
def __init__(self):
pass
def reset(self):
pass
def update(self, left, right):
out = []
for i in range(len(left)):
out_sample = abs(left[i] - right[i])
... | 20.555556 | 64 | 0.602703 |
30855576b0f9ef667e12f5541420e3639354c747 | 9,403 | py | Python | 05_IDF.py | cmcuervol/HydroBalbo | 0c70536305d12f6fb9fb8fe7ce7cdb08d88472af | [
"MIT"
] | null | null | null | 05_IDF.py | cmcuervol/HydroBalbo | 0c70536305d12f6fb9fb8fe7ce7cdb08d88472af | [
"MIT"
] | null | null | null | 05_IDF.py | cmcuervol/HydroBalbo | 0c70536305d12f6fb9fb8fe7ce7cdb08d88472af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 05 09:54:42 2020
@author: Andres
"""
import os
import numpy as np
import pandas as pd
from Modules.IDF_Func import Wilches
from Modules.IDF_Func import Pulgarin
from Modules.IDF_Func import VargasDiazGranados
from Modules.IDF_Func import IDEAM
from Modules.Ut... | 37.019685 | 114 | 0.589067 |
75b8309bc77674bdf8056a548d73fafe499b3d20 | 4,230 | py | Python | orttraining/orttraining/python/training/_checkpoint_storage.py | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 6,036 | 2019-05-07T06:03:57.000Z | 2022-03-31T17:59:54.000Z | orttraining/orttraining/python/training/_checkpoint_storage.py | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 5,730 | 2019-05-06T23:04:55.000Z | 2022-03-31T23:55:56.000Z | orttraining/orttraining/python/training/_checkpoint_storage.py | lchang20/onnxruntime | 97b8f6f394ae02c73ed775f456fd85639c91ced1 | [
"MIT"
] | 1,566 | 2019-05-07T01:30:07.000Z | 2022-03-31T17:06:50.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
import h5py
from collections.abc import Mapping
import pickle
def _dfs_... | 41.881188 | 140 | 0.654374 |
c25368a7ecc33b6d5f9ff6eebb7ff980048dc1a1 | 4,405 | py | Python | src/pix2pix/main.py | corganhejijun/frontal-face-trans | a8d4d99bf537b4947258666272622f5a4bc759b5 | [
"MIT"
] | null | null | null | src/pix2pix/main.py | corganhejijun/frontal-face-trans | a8d4d99bf537b4947258666272622f5a4bc759b5 | [
"MIT"
] | null | null | null | src/pix2pix/main.py | corganhejijun/frontal-face-trans | a8d4d99bf537b4947258666272622f5a4bc759b5 | [
"MIT"
] | null | null | null | import argparse
import os
import scipy.misc
import numpy as np
from model2 import pix2pix
import tensorflow as tf
parser = argparse.ArgumentParser(description='')
parser.add_argument('--dataset_name', dest='dataset_name', default='celeb_train', help='name of the dataset')
parser.add_argument('--epoch', dest='epoch', ... | 67.769231 | 192 | 0.720999 |
826bad3e42a796338a5f96da025faac744a36301 | 1,557 | py | Python | tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py | LaudateCorpus1/gapic-generator-python | 4f4ad394374326a74ceefd2c37c54e228d74ba8d | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py | LaudateCorpus1/gapic-generator-python | 4f4ad394374326a74ceefd2c37c54e228d74ba8d | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py | LaudateCorpus1/gapic-generator-python | 4f4ad394374326a74ceefd2c37c54e228d74ba8d | [
"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... | 33.12766 | 86 | 0.766859 |
3e7bd876da7f51908a60bad286ea90a603b6c9d6 | 3,247 | py | Python | policy/generate.py | imalerich/imgo | 1dc999b62d95b74dd992fd1daf1cb0d974bba8a7 | [
"MIT"
] | null | null | null | policy/generate.py | imalerich/imgo | 1dc999b62d95b74dd992fd1daf1cb0d974bba8a7 | [
"MIT"
] | null | null | null | policy/generate.py | imalerich/imgo | 1dc999b62d95b74dd992fd1daf1cb0d974bba8a7 | [
"MIT"
] | null | null | null | from os.path import isfile, join
from os import listdir
import numpy as np
import random
import caffe
import lmdb
import sgf
# Import our python utilities.
import sys
sys.path.append('../python')
imgo = __import__('imgo')
# Directoryies and Strings.
PATH = '../data/games/'
TRAIN_DB = "../data/lmdb/lmdb_policy_train"
... | 35.293478 | 91 | 0.680628 |
cf15589274c47d1c14c519afcd94ebef5b0ffebd | 41,033 | py | Python | tests/test_dbsink.py | axiom-data-science/dbsink | b9e82040290fd45ef45737dea503424e640923ed | [
"MIT"
] | 1 | 2021-08-28T09:58:34.000Z | 2021-08-28T09:58:34.000Z | tests/test_dbsink.py | axiom-data-science/dbsink | b9e82040290fd45ef45737dea503424e640923ed | [
"MIT"
] | null | null | null | tests/test_dbsink.py | axiom-data-science/dbsink | b9e82040290fd45ef45737dea503424e640923ed | [
"MIT"
] | null | null | null | #!python
# coding=utf-8
from pathlib import Path
import simplejson as json
from datetime import datetime, timezone
import pytest
from easyavro import EasyProducer
from click.testing import CliRunner
from dateutil.parser import parse as dtparse
from dbsink import maps, tables, listen, utils, L
def test_listen_help()... | 39.116301 | 4,704 | 0.668267 |
b396aa9968f17c6fbd6a3a2004771bada2ef2831 | 75,671 | py | Python | androguard/core/bytecodes/apk.py | yang-guangliang/android_guard | 704fea36d796d5fbda2badf2237fc9dba74c3a96 | [
"Apache-2.0"
] | 3 | 2015-10-23T13:36:07.000Z | 2021-07-22T23:30:41.000Z | androguard/core/bytecodes/apk.py | yang-guangliang/android_guard | 704fea36d796d5fbda2badf2237fc9dba74c3a96 | [
"Apache-2.0"
] | null | null | null | androguard/core/bytecodes/apk.py | yang-guangliang/android_guard | 704fea36d796d5fbda2badf2237fc9dba74c3a96 | [
"Apache-2.0"
] | 1 | 2015-10-31T08:38:25.000Z | 2015-10-31T08:38:25.000Z | # This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# 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... | 31.928692 | 124 | 0.541608 |
6e17037ba72bafa244b5e89233e477dc955be89d | 7,178 | py | Python | gui/qt/history_list.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | 153 | 2018-02-26T16:22:27.000Z | 2020-10-08T09:15:05.000Z | gui/qt/history_list.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | 89 | 2018-03-03T23:17:11.000Z | 2020-07-13T10:19:29.000Z | gui/qt/history_list.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | 30 | 2018-03-03T13:41:14.000Z | 2019-11-01T18:05:07.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 40.100559 | 109 | 0.621761 |
94b2a91342534291407ce541fed590b1d1cb05eb | 84,695 | py | Python | tests/test_server_proto.py | karansthr/edgedb | c7b69f0711e03fd4e5c3cdf11fae61431ad6b0f4 | [
"Apache-2.0"
] | null | null | null | tests/test_server_proto.py | karansthr/edgedb | c7b69f0711e03fd4e5c3cdf11fae61431ad6b0f4 | [
"Apache-2.0"
] | null | null | null | tests/test_server_proto.py | karansthr/edgedb | c7b69f0711e03fd4e5c3cdf11fae61431ad6b0f4 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB 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... | 31.876176 | 79 | 0.475187 |
c8fe28b25324a842f4885afaeefc166a4f00f2cc | 80 | py | Python | Enigma/enigma/tests/__init__.py | MrXlVii/crypto_project | a6205ca4410993894297ff4c91cb51bf73943d2b | [
"MIT"
] | null | null | null | Enigma/enigma/tests/__init__.py | MrXlVii/crypto_project | a6205ca4410993894297ff4c91cb51bf73943d2b | [
"MIT"
] | null | null | null | Enigma/enigma/tests/__init__.py | MrXlVii/crypto_project | a6205ca4410993894297ff4c91cb51bf73943d2b | [
"MIT"
] | null | null | null | """
test suite initialization
"""
import enigma
from enigma.machine import *
| 8.888889 | 28 | 0.725 |
5919bd6a52532fbe1a17be7e591096581baa7bc7 | 18,914 | py | Python | apapi/transactional.py | DLZaan/apapi | ab33fdb51ca700491110f2f9fe0940b34def0dc7 | [
"Apache-2.0"
] | null | null | null | apapi/transactional.py | DLZaan/apapi | ab33fdb51ca700491110f2f9fe0940b34def0dc7 | [
"Apache-2.0"
] | null | null | null | apapi/transactional.py | DLZaan/apapi | ab33fdb51ca700491110f2f9fe0940b34def0dc7 | [
"Apache-2.0"
] | null | null | null | """
apapi.transactional
Child of Basic Connection class, responsible for Transactional API capabilities.
"""
import json
from typing import Iterable
from requests import Response
from .basic_connection import BasicConnection
from .utils import ENCODING_GZIP, ExportType, MIMEType
class TransactionalConnection(Basi... | 39.240664 | 110 | 0.617955 |
65edd22ad6a21224ac225df2adbbcbf79bad2ea8 | 4,623 | py | Python | examples/tensorflow_v2_mnist.py | deepfake1/trains | cb6ecb458a57c86e4a701125560841d2ffd610bc | [
"Apache-2.0"
] | null | null | null | examples/tensorflow_v2_mnist.py | deepfake1/trains | cb6ecb458a57c86e4a701125560841d2ffd610bc | [
"Apache-2.0"
] | null | null | null | examples/tensorflow_v2_mnist.py | deepfake1/trains | cb6ecb458a57c86e4a701125560841d2ffd610bc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
from tensorflow.keras.layers import Dense, Flatten, Conv2D
from tensorflow.keras import Model
from trains import Task
task = Task.init(project_name='examples',
task_name='Tensorflow v2 mnist ... | 35.290076 | 90 | 0.708414 |
56bd8bfeed7d567d28fa45bea55b2086df14d96b | 27,601 | py | Python | python/kserve/test/test_v1beta1_inference_service_spec.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | 1 | 2021-12-20T15:41:42.000Z | 2021-12-20T15:41:42.000Z | python/kserve/test/test_v1beta1_inference_service_spec.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | 1 | 2020-04-21T18:29:50.000Z | 2020-04-21T18:29:50.000Z | python/kserve/test/test_v1beta1_inference_service_spec.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | 1 | 2021-11-22T03:06:48.000Z | 2021-11-22T03:06:48.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
# distributed under t... | 41.630468 | 106 | 0.350676 |
488181c2f133e508f51dd403a0ab2810f5085c9e | 833 | py | Python | openhgnn/start.py | guyuisland/OpenHGNN | ab25b83431fed760136e122b442ca4470eb9522c | [
"Apache-2.0"
] | 1 | 2021-09-15T03:04:10.000Z | 2021-09-15T03:04:10.000Z | openhgnn/start.py | guyuisland/OpenHGNN | ab25b83431fed760136e122b442ca4470eb9522c | [
"Apache-2.0"
] | null | null | null | openhgnn/start.py | guyuisland/OpenHGNN | ab25b83431fed760136e122b442ca4470eb9522c | [
"Apache-2.0"
] | null | null | null | from .utils import set_random_seed, set_best_config
from .trainerflow import build_flow
from .auto import hpo_experiment
def OpenHGNN(args):
if not getattr(args, 'seed', False):
args.seed = 0
set_random_seed(args.seed)
if getattr(args, "use_best_config", False):
args = set_best_config(arg... | 26.870968 | 64 | 0.661465 |
3a89cc090058f1358b0d9d0ce3f087b435207048 | 10,683 | py | Python | django/db/backends/base/features.py | szuprefix/django | 4803834aaad99a92e65b5c70ccdbcf4d07ea9b03 | [
"PSF-2.0",
"BSD-3-Clause"
] | 4 | 2020-04-08T17:57:46.000Z | 2021-11-08T08:56:16.000Z | django/db/backends/base/features.py | guilhermej/django | 1d8cfa36089f2d1295abad03a99fc3c259bde6b5 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/base/features.py | guilhermej/django | 1d8cfa36089f2d1295abad03a99fc3c259bde6b5 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.db.models.aggregates import StdDev
from django.db.utils import ProgrammingError
from django.utils.functional import cached_property
class BaseDatabaseFeatures:
gis_enabled = False
allows_group_by_pk = False
allows_group_by_selected_pks = False
empty_fetchmany_value = []
update_can_self... | 36.965398 | 85 | 0.736029 |
4a1aa2d9a44249a405091a6c5891bcf0418bb906 | 6,275 | py | Python | src/hackeme/frontend/hackeme_parser.py | ThomasBollmeier/hackeme-native | 1bd9eac3eb057661045bcc1a612f8fc704f6d809 | [
"Apache-2.0"
] | null | null | null | src/hackeme/frontend/hackeme_parser.py | ThomasBollmeier/hackeme-native | 1bd9eac3eb057661045bcc1a612f8fc704f6d809 | [
"Apache-2.0"
] | null | null | null | src/hackeme/frontend/hackeme_parser.py | ThomasBollmeier/hackeme-native | 1bd9eac3eb057661045bcc1a612f8fc704f6d809 | [
"Apache-2.0"
] | null | null | null | from .hackeme_base_parser import HackemeBaseParser
from komparse import Ast
class HackemeParser(HackemeBaseParser):
def __init__(self):
HackemeBaseParser.__init__(self)
self._init_transformations()
def parse(self, source):
ast = HackemeBaseParser.parse(self, source)
if ast:
... | 30.31401 | 76 | 0.567649 |
0ce90660b686319385428735587b08f5896bb8d4 | 86,106 | py | Python | parcels/field.py | christensen5/parcels | 2dd1bb043c55d246825e8277041bb17a1f352871 | [
"MIT"
] | null | null | null | parcels/field.py | christensen5/parcels | 2dd1bb043c55d246825e8277041bb17a1f352871 | [
"MIT"
] | null | null | null | parcels/field.py | christensen5/parcels | 2dd1bb043c55d246825e8277041bb17a1f352871 | [
"MIT"
] | null | null | null | from parcels.tools.loggers import logger
from parcels.tools.converters import unitconverters_map, UnitConverter, Geographic, GeographicPolar
from parcels.tools.converters import TimeConverter
from parcels.tools.error import FieldSamplingError, FieldOutOfBoundError, TimeExtrapolationError
import parcels.tools.interpolat... | 51.871084 | 235 | 0.566232 |
73e6f5bf2566f119f81207f874ac65455b57d2ea | 883 | py | Python | message/urls.py | BaiEJi/DjangoMusic | cd35fd78daa646a0bc1ab1baa2e8491ae22151c5 | [
"MIT"
] | 1 | 2021-01-04T05:50:05.000Z | 2021-01-04T05:50:05.000Z | message/urls.py | BaiEJi/DjangoMusic | cd35fd78daa646a0bc1ab1baa2e8491ae22151c5 | [
"MIT"
] | null | null | null | message/urls.py | BaiEJi/DjangoMusic | cd35fd78daa646a0bc1ab1baa2e8491ae22151c5 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.message_view, name='message'),
# 留言管理按钮
path('messagebutton1', views.message_admin),
# 点赞
path('messagegood', views.message_good),
# 点踩
path('messagebad', views.message_bad),
# 点赞
path('messagegood2',... | 23.864865 | 104 | 0.674972 |
c93709cb885b3c8e087ec82bd8aac2784e790761 | 340 | py | Python | src/testes.py | Drohiro/devops-aula05 | 8021f4c8b07f42209685303834754be1bdcad33d | [
"Apache-2.0"
] | null | null | null | src/testes.py | Drohiro/devops-aula05 | 8021f4c8b07f42209685303834754be1bdcad33d | [
"Apache-2.0"
] | null | null | null | src/testes.py | Drohiro/devops-aula05 | 8021f4c8b07f42209685303834754be1bdcad33d | [
"Apache-2.0"
] | null | null | null | Import jogovelha
import sys
erroInicializar = False
jogo = jogovelha.inicializar()
if len(jogo) != 3:
erroInicializar = True
ele:
for linha in jogo:
if len(linha) != 3:
erroInicializar = True
else:
for elemento in linha:
if elemento != '.':
erroInicializar = True
if erroInicializar:
sys.exit(1)
... | 16.190476 | 30 | 0.685294 |
79c29ae59a3db436927af79fe0225c80dda59d06 | 228,864 | py | Python | juliet/fit.py | JonasKemmer/juliet | 867084ba4b407a44c73ee533315560b5868f671f | [
"MIT"
] | null | null | null | juliet/fit.py | JonasKemmer/juliet | 867084ba4b407a44c73ee533315560b5868f671f | [
"MIT"
] | null | null | null | juliet/fit.py | JonasKemmer/juliet | 867084ba4b407a44c73ee533315560b5868f671f | [
"MIT"
] | null | null | null | # Import batman, for lightcurve models:
import batman
# Try to import catwoman:
try:
import catwoman
have_catwoman = True
except:
have_catwoman = False
# Import radvel, for RV models:
import radvel
# Import george for detrending:
try:
import george
except:
print(
'Warning: no george install... | 56.691603 | 518 | 0.523136 |
abf7e83c404a2c7e51eaf92ce9e347e9bc1fbabe | 5,692 | py | Python | udf/ext_results.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | 7 | 2016-11-10T21:18:27.000Z | 2022-03-22T14:20:18.000Z | udf/ext_results.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | 2 | 2016-12-17T19:26:20.000Z | 2017-10-27T08:21:38.000Z | udf/ext_results.py | drew026/xDD_Geodynamics | 79444d94017300a51f608a449e65854e854b3673 | [
"CC-BY-4.0"
] | 19 | 2016-12-09T19:16:40.000Z | 2021-09-14T11:21:44.000Z | #==============================================================================
#GENERATE RESULTS TABLE
#==============================================================================
import time, random, re, yaml, psycopg2, copy, csv
from psycopg2.extensions import AsIs
start_time = time.time()
# Connect to Postgre... | 30.276596 | 151 | 0.661103 |
dc4adc09406611d6d3376d3465f655bdf0f43cfe | 10,418 | py | Python | tensorbay/cli/utility.py | edsn60/tensorbay-python-sdk | abc428549490023dfe6ae06eab818a3e5bb97c18 | [
"MIT"
] | null | null | null | tensorbay/cli/utility.py | edsn60/tensorbay-python-sdk | abc428549490023dfe6ae06eab818a3e5bb97c18 | [
"MIT"
] | null | null | null | tensorbay/cli/utility.py | edsn60/tensorbay-python-sdk | abc428549490023dfe6ae06eab818a3e5bb97c18 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
"""Graviti Tensorbay gas CLI utility functions."""
import logging
import os
import sys
from collections import OrderedDict
from configparser import ConfigParser, SectionProxy
from typing import Optional, Tuple, overload
import click
fro... | 28.464481 | 100 | 0.67009 |
9e520ba49e5a8f5e0f8a5fa3f20852e820edbf0e | 53,268 | py | Python | tests/test_recreation.py | ForestFort/invest | ea55638335e97264e09d359484b66b1b8553542d | [
"BSD-3-Clause"
] | null | null | null | tests/test_recreation.py | ForestFort/invest | ea55638335e97264e09d359484b66b1b8553542d | [
"BSD-3-Clause"
] | null | null | null | tests/test_recreation.py | ForestFort/invest | ea55638335e97264e09d359484b66b1b8553542d | [
"BSD-3-Clause"
] | null | null | null | """InVEST Recreation model tests."""
import datetime
import glob
import zipfile
import socket
import threading
import unittest
import tempfile
import shutil
import os
import functools
import logging
import json
import queue
import Pyro4
import pygeoprocessing
import pygeoprocessing.testing
import num... | 40.569688 | 102 | 0.618627 |
f9fa16baad81f6928975ad7439590e3c5d5d8fd9 | 2,170 | py | Python | Scrapy_spider/dangdang_spider/dangdang_spider/spiders/spider.py | Qlzr/Spider_projects | 7ca9e6dec0cc2531b56362deeb98863b08e0c0f4 | [
"MIT"
] | null | null | null | Scrapy_spider/dangdang_spider/dangdang_spider/spiders/spider.py | Qlzr/Spider_projects | 7ca9e6dec0cc2531b56362deeb98863b08e0c0f4 | [
"MIT"
] | null | null | null | Scrapy_spider/dangdang_spider/dangdang_spider/spiders/spider.py | Qlzr/Spider_projects | 7ca9e6dec0cc2531b56362deeb98863b08e0c0f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import urllib
from dangdang_spider.items import DangdangSpiderItem
class SpiderSpider(scrapy.Spider):
name = "spider"
#先清空上一次爬取的数据
with open('data.json', 'w') as f:
f.write('')
#输入要爬取的商品名字
data = input('请输入你要爬取的商品:')
#将输入的商品名称进行url编码
... | 38.070175 | 136 | 0.559908 |
ef82a08dcf645c2c26b4414f6366a165ed7f35fe | 1,758 | py | Python | setup.py | anemology/dcard-spider | 7503e6101f11502f7f6a288dbe74532c59204993 | [
"MIT"
] | null | null | null | setup.py | anemology/dcard-spider | 7503e6101f11502f7f6a288dbe74532c59204993 | [
"MIT"
] | null | null | null | setup.py | anemology/dcard-spider | 7503e6101f11502f7f6a288dbe74532c59204993 | [
"MIT"
] | null | null | null | import codecs
from setuptools import setup
def readme():
with codecs.open('README.rst', 'r', 'utf-8') as f:
return f.read()
def version():
with open('dcard/__init__.py') as f:
for line in f:
if line.startswith('__version__'):
return line.replace("'", '').split()[-... | 29.3 | 81 | 0.584187 |
756026738e18c93537d779ae930422a375832000 | 5,522 | py | Python | tests/core/tx-pool/test_tx_pool.py | pipermerriam/trinity | 6d37150a76d09fb8929ea3455d9475aefd038225 | [
"MIT"
] | 3 | 2019-06-17T13:59:20.000Z | 2021-05-02T22:09:13.000Z | tests/core/tx-pool/test_tx_pool.py | pipermerriam/trinity | 6d37150a76d09fb8929ea3455d9475aefd038225 | [
"MIT"
] | null | null | null | tests/core/tx-pool/test_tx_pool.py | pipermerriam/trinity | 6d37150a76d09fb8929ea3455d9475aefd038225 | [
"MIT"
] | 2 | 2019-12-14T02:52:32.000Z | 2021-02-18T23:04:44.000Z | import asyncio
import pytest
import uuid
from eth._utils.address import (
force_bytes_to_address
)
from p2p.service import run_service
from p2p.tools.factories import SessionFactory
from trinity.plugins.builtin.tx_pool.pool import (
TxPool,
)
from trinity.plugins.builtin.tx_pool.validators import (
Defau... | 32.104651 | 113 | 0.663347 |
39fa45d497d192f39f69e0daebb75ad52b39a83b | 89 | py | Python | Users/admin.py | Fowerus/drf-crm | be5420f1942886b685214c33537cf4b3759704a1 | [
"Apache-2.0"
] | 3 | 2021-09-20T09:21:46.000Z | 2021-09-21T08:51:14.000Z | Users/admin.py | Fowerus/drf-crm | be5420f1942886b685214c33537cf4b3759704a1 | [
"Apache-2.0"
] | null | null | null | Users/admin.py | Fowerus/drf-crm | be5420f1942886b685214c33537cf4b3759704a1 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from Users.models import *
admin.site.register(User)
| 12.714286 | 32 | 0.786517 |
21a024c7d4b90b642e9072fba36732e8a01be24f | 9,478 | py | Python | python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py | LWhite027/PaddleBox | b14bcdf285dd8829e11ab12cc815ac1b1ab62694 | [
"Apache-2.0"
] | 10 | 2021-05-12T07:20:32.000Z | 2022-03-04T08:21:56.000Z | python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 1 | 2021-01-07T11:00:58.000Z | 2021-01-07T11:00:58.000Z | python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 18 | 2021-05-19T08:01:49.000Z | 2022-02-11T03:11:32.000Z | # Copyright (c) 2019 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... | 42.693694 | 134 | 0.671555 |
b8004147426b8646bb90d1d384d9bde47453cb5e | 3,735 | py | Python | python97/chapter08/MyOrm.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | python97/chapter08/MyOrm.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | null | null | null | python97/chapter08/MyOrm.py | youaresherlock/PythonPractice | 2e22d3fdcb26353cb0d8215c150e84d11bc9a022 | [
"Apache-2.0"
] | 1 | 2019-11-05T01:10:15.000Z | 2019-11-05T01:10:15.000Z | #!usr/bin/python
# -*- coding:utf8 -*-
#需求
import numbers
class Field:
pass
class IntField(Field):
#数据描述符
def __init__(self, db_column, min_value=None, max_value=None):
self._value = None
self.min_value = min_value
self.max_value = max_value
self.db_column = db_column
... | 26.489362 | 149 | 0.591165 |
d59b4e44f61ac098eb4bf319950b9d72d38d17d2 | 1,500 | py | Python | tests/test_httpsig.py | manuelleduc/little-boxes | d933de13c02ec098db5ad66ab8ddda6c1d3a278e | [
"ISC"
] | 77 | 2018-06-12T04:55:02.000Z | 2021-08-21T17:35:25.000Z | tests/test_httpsig.py | manuelleduc/little-boxes | d933de13c02ec098db5ad66ab8ddda6c1d3a278e | [
"ISC"
] | 21 | 2018-06-22T13:07:07.000Z | 2021-08-21T17:37:16.000Z | tests/test_httpsig.py | manuelleduc/little-boxes | d933de13c02ec098db5ad66ab8ddda6c1d3a278e | [
"ISC"
] | 13 | 2018-06-16T19:43:22.000Z | 2021-12-01T02:42:54.000Z | import logging
import requests
from little_boxes import activitypub as ap
from little_boxes import httpsig
from little_boxes.key import Key
import httpretty
from test_backend import InMemBackend
logging.basicConfig(level=logging.DEBUG)
@httpretty.activate
def test_httpsig():
back = InMemBackend()
ap.use_ba... | 25 | 84 | 0.655333 |
6e0bea132e4b61f3ac97b8c32a145b7faf76df4f | 217 | py | Python | tests/test_carveme.py | acbweiss/carveme | 08f44e3e180730a881fbd73f8af03fa8e1f5895a | [
"Apache-2.0"
] | 84 | 2018-01-13T15:38:26.000Z | 2022-02-12T14:31:05.000Z | tests/test_carveme.py | acbweiss/carveme | 08f44e3e180730a881fbd73f8af03fa8e1f5895a | [
"Apache-2.0"
] | 133 | 2017-09-19T14:58:23.000Z | 2022-03-16T12:04:15.000Z | tests/test_carveme.py | acbweiss/carveme | 08f44e3e180730a881fbd73f8af03fa8e1f5895a | [
"Apache-2.0"
] | 48 | 2017-09-19T16:00:47.000Z | 2022-03-24T13:47:54.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `carveme` package."""
import unittest
from carveme import carveme
class TestCarveme(unittest.TestCase):
"""Tests for `carveme` package."""
pass
| 14.466667 | 38 | 0.658986 |
9e89d828702aed12aa2aed7a64360162e27c03eb | 1,698 | py | Python | app/NotificationMicroservice/notification_db.py | casperbh96/ML-Flask-Startup-Template | 77dbcf27a3382abd2a8b1fc4e368d9312682b49e | [
"MIT"
] | 136 | 2020-01-01T18:17:18.000Z | 2022-03-30T08:22:01.000Z | app/NotificationMicroservice/notification_db.py | casperbh96/ML-Flask-Startup-Template | 77dbcf27a3382abd2a8b1fc4e368d9312682b49e | [
"MIT"
] | 5 | 2020-03-14T07:33:05.000Z | 2021-09-24T09:18:25.000Z | app/NotificationMicroservice/notification_db.py | casperbh96/ML-Flask-Startup-Template | 77dbcf27a3382abd2a8b1fc4e368d9312682b49e | [
"MIT"
] | 43 | 2019-12-14T15:55:59.000Z | 2021-12-17T16:02:15.000Z | from notifications import Notifications, db
class NotificationAccess():
def __init__(self):
self.db = db
self.Notification = Notifications
def get_notification(self, user_id=None, noti_id=None, is_read=[False, False], get_all=False, as_dict=False):
'''
is_read[0] : if you w... | 40.428571 | 144 | 0.634865 |
27e0a198a120955e7ce677013a45acc226f36049 | 11,070 | py | Python | src/adk/utils.py | QuTech-Delft/qne-adk | a125b2d27f1e5fef2822329cf824b18e22e9d00e | [
"MIT"
] | 1 | 2022-03-16T07:56:10.000Z | 2022-03-16T07:56:10.000Z | src/adk/utils.py | QuTech-Delft/qne-adk | a125b2d27f1e5fef2822329cf824b18e22e9d00e | [
"MIT"
] | 3 | 2022-01-21T13:01:15.000Z | 2022-03-22T09:36:56.000Z | src/adk/utils.py | QuTech-Delft/qne-adk | a125b2d27f1e5fef2822329cf824b18e22e9d00e | [
"MIT"
] | null | null | null | import ast
import json
import os
from pathlib import Path
import shutil
import traceback
from typing import Any, Dict, List, Optional, Tuple, Type
from adk.exceptions import JsonFileNotFound, MalformedJsonFile, InvalidPathName
from adk.type_aliases import ErrorDictType
class ComplexEncoder(json.JSONEncoder):
"""... | 33.545455 | 120 | 0.615808 |
41a5821c7295c55c920978afa56e04dd532013cb | 3,246 | py | Python | portscanner/mixins/resolver.py | GoodiesHQ/portscanner | 87591a367b5079f6faa140a20783f92e3bdf2e92 | [
"MIT"
] | null | null | null | portscanner/mixins/resolver.py | GoodiesHQ/portscanner | 87591a367b5079f6faa140a20783f92e3bdf2e92 | [
"MIT"
] | null | null | null | portscanner/mixins/resolver.py | GoodiesHQ/portscanner | 87591a367b5079f6faa140a20783f92e3bdf2e92 | [
"MIT"
] | null | null | null | """
DNS Resolver mixin for PortScanner
"""
from abc import ABC, abstractmethod, abstractproperty
from contextlib import suppress
from ipaddress import ip_address, ip_network
from typing import Union, Optional, List, Collection, get_args
import asyncio
from aiodns import DNSResolver
from aiodns.error import DNSError
f... | 31.211538 | 87 | 0.622304 |
7832548fba5adf971264574c2216504fbc741a94 | 15,705 | py | Python | SQIL.py | georgeliu233/DRLFD_Urban | 08e448d50ba0def1f968ba51d5a24053f37a0791 | [
"MIT"
] | 1 | 2022-01-21T16:01:17.000Z | 2022-01-21T16:01:17.000Z | SQIL.py | georgeliu233/DRLFD_Urban | 08e448d50ba0def1f968ba51d5a24053f37a0791 | [
"MIT"
] | null | null | null | SQIL.py | georgeliu233/DRLFD_Urban | 08e448d50ba0def1f968ba51d5a24053f37a0791 | [
"MIT"
] | null | null | null | from functools import partial
import tensorflow as tf
import numpy as np
import pandas as pd
import gym
import matplotlib.pyplot as plt
from stable_baselines import logger
from stable_baselines.common import tf_util, OffPolicyRLModel, SetVerbosity, TensorboardWriter
from stable_baselines.common.vec_env impo... | 57.738971 | 196 | 0.541484 |
c32387ce487fa23a0b335b4312c4e4f83448b2e4 | 11,087 | py | Python | test/test_telegram.py | raman325/apprise | 784e073eea64d2ee37cc52e7a2391bce35b05720 | [
"MIT"
] | null | null | null | test/test_telegram.py | raman325/apprise | 784e073eea64d2ee37cc52e7a2391bce35b05720 | [
"MIT"
] | null | null | null | test/test_telegram.py | raman325/apprise | 784e073eea64d2ee37cc52e7a2391bce35b05720 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# 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 limit... | 38.231034 | 79 | 0.693515 |
ea2a631758f3b4c0325fd97a60377775de55272c | 75,365 | py | Python | fbgemm_gpu/fbgemm_gpu/split_table_batched_embeddings_ops.py | garroud/FBGEMM | a0c9ea3bbcbd8516ff6a9124d11c47267c714abc | [
"BSD-3-Clause"
] | 792 | 2018-10-30T22:04:06.000Z | 2022-03-31T10:56:18.000Z | fbgemm_gpu/fbgemm_gpu/split_table_batched_embeddings_ops.py | garroud/FBGEMM | a0c9ea3bbcbd8516ff6a9124d11c47267c714abc | [
"BSD-3-Clause"
] | 922 | 2018-11-05T07:03:04.000Z | 2022-03-31T20:02:30.000Z | fbgemm_gpu/fbgemm_gpu/split_table_batched_embeddings_ops.py | garroud/FBGEMM | a0c9ea3bbcbd8516ff6a9124d11c47267c714abc | [
"BSD-3-Clause"
] | 255 | 2018-10-30T22:04:24.000Z | 2022-03-31T17:42:28.000Z | #!/usr/bin/env python3
# pyre-ignore-all-errors[56]
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import enum
import logging
from dataclasses import dataclass
... | 37.626061 | 259 | 0.578146 |
b4d8e61cf40299aa2c8cfe22db66b0ce8c75a3e4 | 299 | py | Python | libs/core/media/api/urls.py | myog-io/WebDjangular | 73d3c40aa449eec5acc59d4493ee94059bddabbd | [
"MIT"
] | 1 | 2018-09-14T15:17:19.000Z | 2018-09-14T15:17:19.000Z | libs/core/media/api/urls.py | MyOwnGamesLLC/WebDjangular | 73d3c40aa449eec5acc59d4493ee94059bddabbd | [
"MIT"
] | 41 | 2018-12-16T16:58:54.000Z | 2019-02-22T20:08:58.000Z | libs/core/media/api/urls.py | myog-io/WebDjangular | 73d3c40aa449eec5acc59d4493ee94059bddabbd | [
"MIT"
] | 1 | 2019-12-10T09:32:49.000Z | 2019-12-10T09:32:49.000Z | from django.conf.urls import url
from django.conf.urls import include
from rest_framework.routers import DefaultRouter
from .views.MediaViewSet import MediaViewSet
router = DefaultRouter()
router.register('media', MediaViewSet)
urlpatterns = [
url(r'', include(router.urls)),
]
| 21.357143 | 49 | 0.745819 |
5f1ce3ba646b170858e6983ce48da9e36d7a5cdb | 397 | py | Python | conversations/migrations/0002_auto_20210210_2303.py | WaffleHacks/mailgunner | 3c55342960219bdfff6c971b01d02059fcc0f429 | [
"MIT"
] | null | null | null | conversations/migrations/0002_auto_20210210_2303.py | WaffleHacks/mailgunner | 3c55342960219bdfff6c971b01d02059fcc0f429 | [
"MIT"
] | 12 | 2021-06-13T01:50:20.000Z | 2021-08-17T17:49:43.000Z | conversations/migrations/0002_auto_20210210_2303.py | WaffleHacks/mailgunner | 3c55342960219bdfff6c971b01d02059fcc0f429 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-11 07:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("conversations", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="attachment",
name="content",
... | 20.894737 | 61 | 0.602015 |
f3ecb7fa4df725264da4d77fe1bd46d38a440cc5 | 1,688 | py | Python | tests/integration/offer/test_forms.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 4,639 | 2015-01-01T00:42:33.000Z | 2022-03-29T18:32:12.000Z | tests/integration/offer/test_forms.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 2,215 | 2015-01-02T22:32:51.000Z | 2022-03-29T12:16:23.000Z | tests/integration/offer/test_forms.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 2,187 | 2015-01-02T06:33:31.000Z | 2022-03-31T15:32:36.000Z | import datetime
from django.test import TestCase
from django.utils.timezone import now
from oscar.apps.dashboard.offers import forms
from oscar.apps.offer.models import ConditionalOffer
from oscar.test.factories import ConditionalOfferFactory, VoucherFactory
class TestMetaDataForm(TestCase):
def test_changing_... | 35.166667 | 89 | 0.665284 |
9edc189fb673e0b86d95f2c263802d9c20b2ca35 | 1,045 | py | Python | hearboi.py | jonyachen/hearboi | 4d4322e3d2e18f57b73b2784f94257d597ec9f53 | [
"MIT"
] | null | null | null | hearboi.py | jonyachen/hearboi | 4d4322e3d2e18f57b73b2784f94257d597ec9f53 | [
"MIT"
] | null | null | null | hearboi.py | jonyachen/hearboi | 4d4322e3d2e18f57b73b2784f94257d597ec9f53 | [
"MIT"
] | null | null | null | import warnings
import json
warnings.filterwarnings("ignore")
from dejavu import Dejavu
from dejavu.recognize import FileRecognizer, MicrophoneRecognizer
config = {
"database": {
"host": "127.0.0.1",
"user": "root",
"passwd": "M914ktIkP!",
"db": "sound_db",
}
}
if __name__ ==... | 26.794872 | 92 | 0.692823 |
7ca9d2ed25765a554a1377b5ff8eb749867616f1 | 5,247 | py | Python | models/basemodel.py | barmayo/spatial_attention | 6b47b26d1a570b7c85eb82693d8f2102d2733187 | [
"Apache-2.0"
] | 12 | 2021-07-06T09:10:33.000Z | 2022-03-31T11:46:10.000Z | models/basemodel.py | barmayo/spatial_attention | 6b47b26d1a570b7c85eb82693d8f2102d2733187 | [
"Apache-2.0"
] | 4 | 2021-12-03T13:12:06.000Z | 2022-02-28T17:10:50.000Z | models/basemodel.py | barmayo/spatial_attention | 6b47b26d1a570b7c85eb82693d8f2102d2733187 | [
"Apache-2.0"
] | 5 | 2021-07-06T09:11:00.000Z | 2022-02-02T19:44:52.000Z | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.net_util import norm_col_init, weights_init
from .model_io import ModelOutput
class BaseModel(torch.nn.Module):
def __init__(self, args):
action_space = args.action_space
target_embeddin... | 35.693878 | 119 | 0.611397 |
8e0a5074352f87a9565bcba6795cb33e6bd75ebc | 3,446 | py | Python | mslib/mscolab/_tests/test_user.py | withoutwaxaryan/MSS | 8bc06755e592c61d1b418f9a0b582ba0025f3da8 | [
"Apache-2.0"
] | null | null | null | mslib/mscolab/_tests/test_user.py | withoutwaxaryan/MSS | 8bc06755e592c61d1b418f9a0b582ba0025f3da8 | [
"Apache-2.0"
] | 1 | 2021-01-26T11:56:31.000Z | 2021-02-15T07:34:58.000Z | mslib/mscolab/_tests/test_user.py | withoutwaxaryan/MSS | 8bc06755e592c61d1b418f9a0b582ba0025f3da8 | [
"Apache-2.0"
] | 7 | 2021-01-21T10:40:09.000Z | 2021-05-18T15:04:15.000Z | # -*- coding: utf-8 -*-
"""
mslib.mscolab._tests.test_user.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests for user related routes.
This file is part of mss.
:copyright: Copyright 2019 Shivashis Padhi
:copyright: Copyright 2019-2021 by the mss team, see AUTHORS.
Licensed under the Apache Lic... | 34.118812 | 91 | 0.616657 |
88dd310f576e610f1c602516de158cdf5c747feb | 1,602 | py | Python | procurement_portal/records/migrations/0012_auto_20200928_2212.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | null | null | null | procurement_portal/records/migrations/0012_auto_20200928_2212.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | 19 | 2020-09-18T17:10:55.000Z | 2020-10-18T09:54:16.000Z | procurement_portal/records/migrations/0012_auto_20200928_2212.py | rikusv/procurement-portal-backend | a00eb1d9d9da7737a84d9c495db0f59b26839157 | [
"MIT"
] | 2 | 2020-10-21T17:58:44.000Z | 2022-02-13T17:21:22.000Z | # Generated by Django 3.1.1 on 2020-09-28 22:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("records", "0011_purchaserecord_bbbee_status"),
]
migration = """
DROP TRIGGER IF EXISTS full_text_search_content_update ON records_purchaserecord;
... | 38.142857 | 414 | 0.72035 |
b031881c84402a74cf6d265e4a070d95610d700e | 4,900 | py | Python | image/pro_seafile/scripts/bootstrap.py | haiwen/docker-example-ali | f89058aff634a4d754bd6837052037d229d44aae | [
"Apache-2.0"
] | 1 | 2021-06-14T14:35:57.000Z | 2021-06-14T14:35:57.000Z | image/pro_seafile/scripts/bootstrap.py | haiwen/docker-example-ali | f89058aff634a4d754bd6837052037d229d44aae | [
"Apache-2.0"
] | 1 | 2021-06-01T21:44:26.000Z | 2021-06-01T21:44:26.000Z | image/pro_seafile/scripts/bootstrap.py | haiwen/docker-example-ali | f89058aff634a4d754bd6837052037d229d44aae | [
"Apache-2.0"
] | 2 | 2019-12-25T23:08:34.000Z | 2020-04-15T11:32:16.000Z | #!/usr/bin/env python
#coding: UTF-8
"""
Bootstraping seafile server, letsencrypt (verification & cron job).
"""
import argparse
import os
from os.path import abspath, basename, exists, dirname, join, isdir
import shutil
import sys
import uuid
import time
from utils import (
call, get_conf, get_install_dir, logi... | 33.333333 | 125 | 0.650612 |
cf131d7ebc1061d7e7cb1012b150c4cb04a4176f | 10,383 | py | Python | hamper/plugins/platitudes.py | edunham/hamperbot | 110a99cb826a52d1293f400a886843ee1bf4f0d2 | [
"MIT"
] | 11 | 2015-01-11T00:32:06.000Z | 2020-05-16T02:48:56.000Z | hamper/plugins/platitudes.py | edunham/hamperbot | 110a99cb826a52d1293f400a886843ee1bf4f0d2 | [
"MIT"
] | 54 | 2015-03-28T04:20:06.000Z | 2022-02-11T16:24:32.000Z | hamper/plugins/platitudes.py | edunham/hamperbot | 110a99cb826a52d1293f400a886843ee1bf4f0d2 | [
"MIT"
] | 10 | 2015-05-01T01:27:11.000Z | 2017-05-20T05:36:59.000Z | import random
from hamper.interfaces import ChatPlugin
from hamper.utils import ude
platitudes = [
"Analysis without numbers is only an opinion.",
"This is why it's a good idea to design them to operate when some things are wrong .",
"This is true at any point in time.",
"Learn to live with the disapp... | 42.036437 | 182 | 0.647404 |
cb204eab0bbe714760debf28b6345294156fb7e9 | 1,871 | py | Python | Practical_1/practical1_final.py | akrettmann/Geog5995_assignment1_practicals_final | ac3346912aff55b4d217d21059a73939395235fe | [
"MIT"
] | null | null | null | Practical_1/practical1_final.py | akrettmann/Geog5995_assignment1_practicals_final | ac3346912aff55b4d217d21059a73939395235fe | [
"MIT"
] | null | null | null | Practical_1/practical1_final.py | akrettmann/Geog5995_assignment1_practicals_final | ac3346912aff55b4d217d21059a73939395235fe | [
"MIT"
] | null | null | null | import random
print ("Hello World")
'''
Step 1: Initialise x0 and y0
'''
print("Step 1: Initialise x0 and y0")
print("x0 and y0 are assigned a pseudorandom integer between 0 and 99 inclusive")
#x0 = 50
#y0 = 50
x0 = random.randint(0,99)
y0 = random.randint(0,99)
print("x0", x0)
print("y0", y0)
'''
Step 2: Move ... | 16.557522 | 87 | 0.656334 |
afcc015a805d757e91d96529eaf0e3de448a1c66 | 745 | py | Python | imagebutler/imagebutler.py | ViiSiX/ImageButler | f3507b8ba130ff5f8660c9218e62ba1ac7444c75 | [
"BSD-3-Clause"
] | 1 | 2017-11-10T17:58:45.000Z | 2017-11-10T17:58:45.000Z | imagebutler/imagebutler.py | ViiSiX/ImageButler | f3507b8ba130ff5f8660c9218e62ba1ac7444c75 | [
"BSD-3-Clause"
] | 35 | 2017-11-15T08:14:52.000Z | 2018-08-14T13:36:59.000Z | imagebutler/imagebutler.py | ViiSiX/ImageButler | f3507b8ba130ff5f8660c9218e62ba1ac7444c75 | [
"BSD-3-Clause"
] | 2 | 2017-11-12T19:19:56.000Z | 2017-12-21T12:51:48.000Z | from flask import Flask, Blueprint
from flask_restful import Api
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_redislite import FlaskRedis
app = Flask(__name__)
# The configuration must be loaded before other modules.
app.config.from_object('imagebutler.settings.BaseConfig')
ap... | 29.8 | 61 | 0.715436 |
b6953d96b277fb802ab818fd35bb99e514d3a35c | 4,977 | py | Python | libFBCAGen.py | mkreitze/behaviourCollector | 6ab6822da824b5de9e804ba7d91c40144b2bd194 | [
"CC0-1.0"
] | null | null | null | libFBCAGen.py | mkreitze/behaviourCollector | 6ab6822da824b5de9e804ba7d91c40144b2bd194 | [
"CC0-1.0"
] | null | null | null | libFBCAGen.py | mkreitze/behaviourCollector | 6ab6822da824b5de9e804ba7d91c40144b2bd194 | [
"CC0-1.0"
] | null | null | null | #to quickly generate FBCAs that I can hardcode
#imports of libraries
from PIL import Image
import random
import copy
import math
import os
import time #for debugging
import numpy
#global inits
CALength=100 #Length of the generated image (for min use 5)
CAWidth=100 #Width of the generated image (for min use 4)
useMin... | 39.816 | 146 | 0.640547 |
03e15f2d5b6a60a6b682b4949112d280891cbc15 | 3,419 | py | Python | db_email_backend/tests.py | goalplan/django-db-email-backend | b4d12aab6032c9125a9e201209c26c27851e494f | [
"MIT"
] | 9 | 2016-03-04T21:17:31.000Z | 2018-11-20T20:44:55.000Z | db_email_backend/tests.py | goalplan/django-db-email-backend | b4d12aab6032c9125a9e201209c26c27851e494f | [
"MIT"
] | 3 | 2017-03-24T11:15:17.000Z | 2019-04-03T13:56:06.000Z | db_email_backend/tests.py | goalplan/django-db-email-backend | b4d12aab6032c9125a9e201209c26c27851e494f | [
"MIT"
] | 10 | 2016-06-08T09:04:03.000Z | 2021-11-28T19:56:32.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.test import TestCase
from django.test.utils import override_settings
from django.core.mail import send_mail, EmailMessage, EmailMultiAlternatives
import django
from .models import Email
@override_settings(EMAIL_BACKEND='db_... | 40.223529 | 93 | 0.642878 |
b384b30513fb8867d47eb7156be1861230a0b60a | 34,738 | py | Python | rsatoolbox/data/dataset.py | Remi-Gau/rsatoolbox | 2b4b57fa4cee9d9b819c43ac0436278c696e2402 | [
"MIT"
] | 30 | 2019-10-07T02:37:52.000Z | 2021-04-12T05:34:00.000Z | rsatoolbox/data/dataset.py | Remi-Gau/rsatoolbox | 2b4b57fa4cee9d9b819c43ac0436278c696e2402 | [
"MIT"
] | 150 | 2019-10-07T13:04:14.000Z | 2021-04-21T21:39:41.000Z | rsatoolbox/data/dataset.py | Remi-Gau/rsatoolbox | 2b4b57fa4cee9d9b819c43ac0436278c696e2402 | [
"MIT"
] | 17 | 2019-10-08T12:20:55.000Z | 2021-03-04T16:17:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Definition of RSA Dataset class and subclasses
@author: baihan, jdiedrichsen, bpeters, adkipnis
"""
import numpy as np
from rsatoolbox.util.data_utils import get_unique_unsorted
from rsatoolbox.util.descriptor_utils import check_descriptor_length_error
from rsatoolb... | 38.770089 | 80 | 0.617048 |
20c1a9feb81b39f702c3aa9b3e0bd1b09595697f | 6,969 | py | Python | resolve_ref_exp_elements_ml/common.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | resolve_ref_exp_elements_ml/common.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | resolve_ref_exp_elements_ml/common.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 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... | 39.372881 | 78 | 0.705553 |
cd1b19147dfa9eba4754cc71d4a1204fd6d4d4fa | 359 | py | Python | inspy.py | nikhil-yadav120/Prox | 200cc32cf588bef9a14c7920140bf22c5ab385fe | [
"MIT"
] | null | null | null | inspy.py | nikhil-yadav120/Prox | 200cc32cf588bef9a14c7920140bf22c5ab385fe | [
"MIT"
] | null | null | null | inspy.py | nikhil-yadav120/Prox | 200cc32cf588bef9a14c7920140bf22c5ab385fe | [
"MIT"
] | null | null | null | from instapy import InstaPy
session = InstaPy(username="nikhilyadav3844", password="yadavnikhil**")
session.login()
session.like_by_tags(["business","adventure","fashion"], amount=10)
session.set_do_follow(True, percentage=25)
session.set_do_comment(True, percentage=50)
session.set_comments("Nice Post!", "Love It!"... | 23.933333 | 71 | 0.763231 |
6263afb2c6065d0c668414e321c5b57d2bb22401 | 1,042 | py | Python | core/tests/data/unicode_and_str_handler.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 5,422 | 2015-08-14T01:56:44.000Z | 2022-03-31T23:31:56.000Z | core/tests/data/unicode_and_str_handler.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 14,178 | 2015-08-14T05:21:45.000Z | 2022-03-31T23:54:10.000Z | core/tests/data/unicode_and_str_handler.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 3,574 | 2015-08-14T04:20:06.000Z | 2022-03-29T01:52:37.000Z | # coding: utf-8
#
# 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 requi... | 28.944444 | 78 | 0.760077 |
c6fbbef10570015566139258d9bb597916e8715d | 11,455 | py | Python | test/functional/mining_pos_reorg.py | mitchelvanamstel/SAPP | 8ccd8b949c814388f5f0e2e20e8016d38e291876 | [
"MIT"
] | null | null | null | test/functional/mining_pos_reorg.py | mitchelvanamstel/SAPP | 8ccd8b949c814388f5f0e2e20e8016d38e291876 | [
"MIT"
] | null | null | null | test/functional/mining_pos_reorg.py | mitchelvanamstel/SAPP | 8ccd8b949c814388f5f0e2e20e8016d38e291876 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.authproxy import JSONRPCException
from test_framework.test_framework import PivxTestFramework... | 46.565041 | 115 | 0.631689 |
06d2a9bd509c2c27b3f224cc8c996c65ec652aec | 1,844 | py | Python | wordle_solver/__main__.py | cgarretty/wordle_solver | 332fc5f45164950c4df9976988849a5774d06d18 | [
"MIT"
] | null | null | null | wordle_solver/__main__.py | cgarretty/wordle_solver | 332fc5f45164950c4df9976988849a5774d06d18 | [
"MIT"
] | null | null | null | wordle_solver/__main__.py | cgarretty/wordle_solver | 332fc5f45164950c4df9976988849a5774d06d18 | [
"MIT"
] | null | null | null | import json
import sys
from os.path import exists
import pickle
import numpy as np
import constants
import wordle
with open(constants.PATH_TO_WORDS) as data_file:
words = json.load(data_file)
all_words = wordle.get_bytecode_array(words["herrings"] + words["solutions"])
# Caching the score_cards for faster ... | 30.733333 | 81 | 0.699024 |
0405cdbd9d027e2286ff9998412be77c0a9ce2c4 | 41,358 | py | Python | elfsize.py | legatoproject/legato-Tools-LinkerReport | 8ec9ce9227f4ac72e7c5abc810e52269caa1dfbe | [
"Apache-2.0"
] | 2 | 2020-05-18T08:33:00.000Z | 2021-02-01T01:44:32.000Z | elfsize.py | legatoproject/legato-Tools-LinkerReport | 8ec9ce9227f4ac72e7c5abc810e52269caa1dfbe | [
"Apache-2.0"
] | null | null | null | elfsize.py | legatoproject/legato-Tools-LinkerReport | 8ec9ce9227f4ac72e7c5abc810e52269caa1dfbe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
A tool for generating reports on the static memory size of ELF binaries. See README.md for details,
or run elfsize.py --help for usage information.
"""
from subprocess import check_output, Popen, PIPE
try:
from elftools.elf import elffile
from elftools.elf.constants import SH_FLAGS... | 39.016981 | 100 | 0.531046 |
4359ae7998ce93fdbc0473c3f06b31409d8960a4 | 5,895 | py | Python | nexxT/tests/interface/AviFilePlayback.py | pfrydlewicz/nexxT | 33616dbeee448c59201aa3009d637fe6b8d2b39c | [
"Apache-2.0"
] | null | null | null | nexxT/tests/interface/AviFilePlayback.py | pfrydlewicz/nexxT | 33616dbeee448c59201aa3009d637fe6b8d2b39c | [
"Apache-2.0"
] | null | null | null | nexxT/tests/interface/AviFilePlayback.py | pfrydlewicz/nexxT | 33616dbeee448c59201aa3009d637fe6b8d2b39c | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020 ifm electronic gmbh
#
# THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
#
import logging
import time
from PySide2.QtCore import Signal, Slot, QTimer, QDateTime, QUrl
from PySide2.QtMultimedia import QMediaPlayer, QMediaPlaylist, QAbstractVideoSur... | 37.788462 | 132 | 0.672265 |
f843cbe8bc885baa50158de36d8ee803198678fb | 16,041 | py | Python | tests/test_typeerror.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 25 | 2018-09-21T13:21:25.000Z | 2021-12-30T06:00:57.000Z | tests/test_typeerror.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 48 | 2019-01-26T10:10:43.000Z | 2021-07-27T02:23:19.000Z | tests/test_typeerror.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 12 | 2018-09-27T09:19:58.000Z | 2021-02-12T17:17:07.000Z | import pytest
import astroid
import pylint.testutils
from conftest import CheckerTestCase
import pylint_protobuf
@pytest.fixture
def person_pb2(proto_builder):
return proto_builder("""
message Person {
required string name = 1;
required int32 code = 2;
optional string email ... | 36.128378 | 108 | 0.646967 |
9d825f5e281ba1f2fb8783737c8d0c9d50408fa2 | 882 | py | Python | examples/generic-st77xx-with-xpt2046.py | littlevgl/lv_bindings | c09a58213b1c8e1246b9f5c68d94741dcda71108 | [
"MIT"
] | 2 | 2019-01-23T11:35:11.000Z | 2019-01-29T03:35:35.000Z | examples/generic-st77xx-with-xpt2046.py | littlevgl/lv_bindings | c09a58213b1c8e1246b9f5c68d94741dcda71108 | [
"MIT"
] | 3 | 2019-01-25T07:37:30.000Z | 2019-01-29T09:35:40.000Z | examples/generic-st77xx-with-xpt2046.py | littlevgl/lv_bindings | c09a58213b1c8e1246b9f5c68d94741dcda71108 | [
"MIT"
] | 2 | 2019-01-23T19:41:40.000Z | 2019-01-24T06:38:42.000Z | import sys
sys.path.append('.')
from st77xx import *
from xpt2046 import *
spi=machine.SPI(
1,
baudrate=24_000_000,
polarity=0,
phase=0,
sck=machine.Pin(10,machine.Pin.OUT),
mosi=machine.Pin(11,machine.Pin.OUT),
miso=machine.Pin(12,machine.Pin.IN)
)
if 0:
# with DMA, the repaints seem ... | 23.837838 | 87 | 0.714286 |
2a9d1517780dc917923d0230f9d7aeb88b6f1fa7 | 2,711 | py | Python | FeedManager.py | briangmaddox/pyTwittertoRSS | 03606f179262bbf82347eaad967505b20ff3d20b | [
"MIT"
] | null | null | null | FeedManager.py | briangmaddox/pyTwittertoRSS | 03606f179262bbf82347eaad967505b20ff3d20b | [
"MIT"
] | null | null | null | FeedManager.py | briangmaddox/pyTwittertoRSS | 03606f179262bbf82347eaad967505b20ff3d20b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
"""
FeedManager.py
This class handles converting the tweets into a RSS feed file.
"""
from ManagerBase import *
from typing import List
from RSSItemTuple import *
from GlobalSettings import *
import feedgenerator
class FeedManager(ManagerBase):
"""
This class takes in... | 35.671053 | 112 | 0.495389 |
eb14a25ae7a945498d944f04a0f25e412fe41889 | 389 | py | Python | single_number.py | hbzhinsa/Leetcode_python | f60dba4e94c1e2202fa9614fc2b3aef0140723c6 | [
"MIT"
] | null | null | null | single_number.py | hbzhinsa/Leetcode_python | f60dba4e94c1e2202fa9614fc2b3aef0140723c6 | [
"MIT"
] | null | null | null | single_number.py | hbzhinsa/Leetcode_python | f60dba4e94c1e2202fa9614fc2b3aef0140723c6 | [
"MIT"
] | null | null | null | #https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/549/
#%%
num=[2,3,5,7,2,3,5]
output=7
#
class Solution:
def singleNumber(nums):
num.sort()
num.append(0.1)
for i in range(0,len(num),2):
if num[i]!=num[i+1]:
break
return num... | 22.882353 | 87 | 0.560411 |
fa8753cfd298296fa7f5cec8b2499aaa9600b172 | 5,045 | py | Python | python-code-examples/lib/python3.7/site-packages/IPython/terminal/debugger.py | oisdk/prob-presentation | 880217ca51ab62f6feee58ccacdb39bfade43101 | [
"MIT"
] | 7 | 2018-09-10T05:42:46.000Z | 2021-05-01T12:48:30.000Z | IPython/terminal/debugger.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | IPython/terminal/debugger.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | import signal
import sys
from IPython.core.debugger import Pdb
from IPython.core.completer import IPCompleter
from .ptutils import IPythonPTCompleter
from .shortcuts import suspend_to_bg, cursor_in_leading_ws
from prompt_toolkit.enums import DEFAULT_BUFFER
from prompt_toolkit.filters import (Condition, HasFocus, Has... | 40.36 | 95 | 0.600396 |
de63c892e1eb918e0fd4df938ea5dbe4faa388b0 | 10,053 | py | Python | contrib/spendfrom/spendfrom.py | RidgyDidge/BakedCoin | 154730451cb7026de2252111317581615f226b97 | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | RidgyDidge/BakedCoin | 154730451cb7026de2252111317581615f226b97 | [
"MIT"
] | 1 | 2017-02-25T03:16:14.000Z | 2017-02-25T03:16:14.000Z | contrib/spendfrom/spendfrom.py | RidgyDidge/BakedCoin | 154730451cb7026de2252111317581615f226b97 | [
"MIT"
] | 2 | 2018-03-12T12:37:27.000Z | 2019-09-27T07:53:59.000Z | #!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bit... | 37.511194 | 111 | 0.632249 |
924c6e31479357bb3430fca4bb789070c50a6c4f | 2,669 | py | Python | backend/test_28316/urls.py | crowdbotics-apps/test-28316 | f3b0500b4c89cba87e6d51914a48681c5cb403e4 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_28316/urls.py | crowdbotics-apps/test-28316 | f3b0500b4c89cba87e6d51914a48681c5cb403e4 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_28316/urls.py | crowdbotics-apps/test-28316 | f3b0500b4c89cba87e6d51914a48681c5cb403e4 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """test_28316 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 36.561644 | 87 | 0.700262 |
26c8878714058cebdce64bd259e796afe1edb902 | 19,673 | py | Python | tests/sentry/lang/javascript/test_processor.py | mitsuhiko/sentry | cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90 | [
"BSD-3-Clause"
] | 4 | 2016-03-16T07:21:36.000Z | 2017-09-04T07:29:56.000Z | tests/sentry/lang/javascript/test_processor.py | mitsuhiko/sentry | cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/lang/javascript/test_processor.py | mitsuhiko/sentry | cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
import responses
from mock import patch
from requests.exceptions import RequestException
from sentry.interfaces.stacktrace import Stacktrace
from sentry.lang.javascript.processor import (
BadSource, discover_sourcemap, fetch_sourcemap,... | 43.04814 | 238 | 0.524424 |
7868f7faf580fff439d5a8f00dd47f3ded7b67c6 | 3,653 | py | Python | src/KnotTheory/HFK-Zurich/FloerHom2.py | craigfreilly/masters-project-submission | 902911917acec3fc26c7d3bfd5db1ae1f182890f | [
"MIT"
] | null | null | null | src/KnotTheory/HFK-Zurich/FloerHom2.py | craigfreilly/masters-project-submission | 902911917acec3fc26c7d3bfd5db1ae1f182890f | [
"MIT"
] | null | null | null | src/KnotTheory/HFK-Zurich/FloerHom2.py | craigfreilly/masters-project-submission | 902911917acec3fc26c7d3bfd5db1ae1f182890f | [
"MIT"
] | null | null | null | from genGen import genGen
from genGen import gen
from generators import classifiedGen
import combinatoric
import rectDiagMisc
import homology
reload(homology)
reload(combinatoric)
####################bnd map
def isRectPunc(diag,ax,ay,bx,by):
for i in xrange(ax,bx):
if diag[i][0]<by and diag[i... | 32.04386 | 145 | 0.482343 |
77fab2eb64f7693322e28f463d37952cdd9654bf | 2,513 | py | Python | plenum/test/node_request/test_setup_for_non_master.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/test/node_request/test_setup_for_non_master.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/test/node_request/test_setup_for_non_master.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | import pytest
from plenum.common.util import compare_3PC_keys
from plenum.test.helper import sdk_send_random_and_check, waitForViewChange
from plenum.test.node_catchup.helper import waitNodeDataEquality
from plenum.test.pool_transactions.helper import sdk_add_new_steward_and_node
from plenum.test.spy_helpers import ge... | 44.875 | 90 | 0.683645 |
65b15be781405d19feac2445865bd2a0cc9b74ee | 975 | py | Python | Rota_System/UI/model_undo.py | ergoregion/Rota-Program | 44dab4cb11add184619d88aa0fcab61532d128e6 | [
"MIT"
] | null | null | null | Rota_System/UI/model_undo.py | ergoregion/Rota-Program | 44dab4cb11add184619d88aa0fcab61532d128e6 | [
"MIT"
] | null | null | null | Rota_System/UI/model_undo.py | ergoregion/Rota-Program | 44dab4cb11add184619d88aa0fcab61532d128e6 | [
"MIT"
] | null | null | null | __author__ = 'Neil Butcher'
from PyQt4 import QtCore, QtGui
class MasterUndoModel(QtCore.QObject):
def __init__(self, parent=None):
QtCore.QObject.__init__(self, parent)
self.undoStack = QtGui.QUndoStack(self)
def add_command_contributer(self, other_model):
other_model.commandIssued.... | 29.545455 | 71 | 0.717949 |
b22a4c7e37ed1ca8de5a00e85a680caf28f74381 | 1,714 | py | Python | fn_html2pdf/setup.py | lizhecht/resilient-community-apps | bad264721d5c28e3232805ac65434fb16c3ae716 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_html2pdf/setup.py | lizhecht/resilient-community-apps | bad264721d5c28e3232805ac65434fb16c3ae716 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_html2pdf/setup.py | lizhecht/resilient-community-apps | bad264721d5c28e3232805ac65434fb16c3ae716 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import glob
import ntpath
def get_module_name(module_path):
"""
Return the module name of the module path
"""
return ntpath.split(module_path)[1].split(".")[0]
def snake_to_camel(word):
"""
Convert a w... | 32.961538 | 223 | 0.672112 |
a846a20e552b79401bcb73296b96f7d290cb6625 | 1,250 | py | Python | LoopStructural/visualisation/sphinx_scraper.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | LoopStructural/visualisation/sphinx_scraper.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | LoopStructural/visualisation/sphinx_scraper.py | vpicavet/LoopStructural | cde34fabc53b4d5cb0f8e22f53a574fac44dfbd6 | [
"MIT"
] | null | null | null | from LoopStructural.visualisation import model_visualisation as model_visualisation
def _get_loop_visualisation_scraper():
return Scraper()
class Scraper:
"""
Save ``pyvista.Plotter`` objects.
Used by sphinx-gallery to generate the plots from the code in the examples.
Pass an instance of this cla... | 36.764706 | 83 | 0.6744 |
9bf40deae34b6dbbf094b5f0bb3f91791b6cf150 | 9,922 | py | Python | world_server.py | JustM3Dev/Minecraft | ef38086181a15f7c4c9e833ee48bc9237c949d27 | [
"MIT"
] | 96 | 2015-01-02T15:16:06.000Z | 2022-03-02T11:06:52.000Z | world_server.py | JustM3Dev/Minecraft | ef38086181a15f7c4c9e833ee48bc9237c949d27 | [
"MIT"
] | 35 | 2015-04-16T03:59:14.000Z | 2021-09-30T03:39:54.000Z | world_server.py | JustM3Dev/Minecraft | ef38086181a15f7c4c9e833ee48bc9237c949d27 | [
"MIT"
] | 38 | 2015-01-08T05:26:43.000Z | 2021-12-16T10:23:34.000Z | from binascii import hexlify
from collections import deque, defaultdict, OrderedDict
import os
import threading
import time
import warnings
import datetime
from sqlite3.dbapi2 import Connection
from threading import Lock
from typing import Any, Dict, DefaultDict, Deque, Tuple, Optional, Set
from blocks import *
from c... | 40.497959 | 132 | 0.614594 |
642bc9c789f7415861f1154d8246e2f47dfbad25 | 2,156 | py | Python | examples/docs_snippets_crag/docs_snippets_crag_tests/concepts_tests/solids_pipelines_tests/test_pipelines.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets_crag/docs_snippets_crag_tests/concepts_tests/solids_pipelines_tests/test_pipelines.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets_crag/docs_snippets_crag_tests/concepts_tests/solids_pipelines_tests/test_pipelines.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 1 | 2021-11-30T21:40:46.000Z | 2021-11-30T21:40:46.000Z | from dagster import execute_pipeline
from docs_snippets_crag.concepts.solids_pipelines.branching_pipeline import branching_pipeline
from docs_snippets_crag.concepts.solids_pipelines.dynamic_pipeline.dynamic_pipeline import (
process_directory,
)
from docs_snippets_crag.concepts.solids_pipelines.fan_in_pipeline impo... | 32.666667 | 94 | 0.778757 |
d2112942dd1eec21061a07484359d85461e0b262 | 8,800 | py | Python | torch_tree_nn.py | Vivekjhunjhunwala/cs224u | f9426dd590cb4ec2c697fc31d2c5bfbe7d6658f4 | [
"Apache-2.0"
] | null | null | null | torch_tree_nn.py | Vivekjhunjhunwala/cs224u | f9426dd590cb4ec2c697fc31d2c5bfbe7d6658f4 | [
"Apache-2.0"
] | 1 | 2020-02-23T05:11:20.000Z | 2020-02-23T05:11:20.000Z | torch_tree_nn.py | Vivekjhunjhunwala/cs224u | f9426dd590cb4ec2c697fc31d2c5bfbe7d6658f4 | [
"Apache-2.0"
] | 1 | 2021-01-04T19:22:27.000Z | 2021-01-04T19:22:27.000Z | import random
import torch
import torch.nn as nn
import torch.utils.data
from torch_model_base import TorchModelBase
from utils import progress_bar
__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2020"
class TorchTreeNNModel(nn.Module):
def __init__(self, vocab, embed_dim, embedding, out... | 32.472325 | 95 | 0.571136 |
244846e5c5a8e944c6ef1b2d466bdc82b196cd20 | 31,082 | py | Python | netapp/santricity/api/symbol/t_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | netapp/santricity/api/symbol/t_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | netapp/santricity/api/symbol/t_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
TApi.py
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following condit... | 39.494282 | 845 | 0.545203 |
fd68b737ef778b3db9969f5d85a34c2aceac54f0 | 33 | py | Python | src/apis/__init__.py | wangyingbo/sspanel-mining | 1b1d7caf195388e1d9144979b740c52b7163f477 | [
"Apache-2.0"
] | 1 | 2021-11-03T12:09:27.000Z | 2021-11-03T12:09:27.000Z | src/apis/__init__.py | starkiller43/sspanel-mining | 27a7dd1fafcf551808245a69f2f449d5d52a0df7 | [
"Apache-2.0"
] | null | null | null | src/apis/__init__.py | starkiller43/sspanel-mining | 27a7dd1fafcf551808245a69f2f449d5d52a0df7 | [
"Apache-2.0"
] | null | null | null | from .v2rss_api import v2rss_api
| 16.5 | 32 | 0.848485 |
c22387933b0eb790e34838014925b686854e7497 | 452 | py | Python | tests/unit/executors/encoders/image/test_onnx.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | null | null | null | tests/unit/executors/encoders/image/test_onnx.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | null | null | null | tests/unit/executors/encoders/image/test_onnx.py | gvvynplaine/jina | 1441f40f849d22c21b8397527960b4307ff0d5a3 | [
"Apache-2.0"
] | null | null | null | from jina.hub.encoders.image.onnx import OnnxImageEncoder
from tests.unit.executors.encoders.image import ImageTestCase
class OnnxTestCase(ImageTestCase):
def _get_encoder(self, metas):
self.target_output_dim = 1280
self.input_dim = 224
return OnnxImageEncoder(
output_feature='... | 34.769231 | 72 | 0.714602 |
3eb534013b618c95c165625b9e511d331be2b5d5 | 184 | py | Python | src/rules/intention/intention_plugins/__init__.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | src/rules/intention/intention_plugins/__init__.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | src/rules/intention/intention_plugins/__init__.py | FrozenYogurtPuff/iStar-pipeline | aff129d201673925255890e06123798603b9163d | [
"MIT"
] | null | null | null | from .acl_to import acl_to
from .acl_without_to import acl_without_to
from .advcl import advcl
from .pcomp_ing import pcomp_ing
from .relcl import relcl
from .xcomp_to import xcomp_to
| 26.285714 | 42 | 0.836957 |
617aca46521f525292e4ce9a009076c125fbc8f4 | 3,721 | py | Python | pyhmsa_gui/spec/datum/datum.py | pyhmsa/pyhmsa-gui | 9f4943f2a428d16aadc9fc4b68bd21f37042144d | [
"MIT"
] | null | null | null | pyhmsa_gui/spec/datum/datum.py | pyhmsa/pyhmsa-gui | 9f4943f2a428d16aadc9fc4b68bd21f37042144d | [
"MIT"
] | 2 | 2016-09-09T13:21:55.000Z | 2016-11-09T09:54:51.000Z | pyhmsa_gui/spec/datum/datum.py | pyhmsa/pyhmsa-gui | 9f4943f2a428d16aadc9fc4b68bd21f37042144d | [
"MIT"
] | null | null | null | """
Base datum widgets
"""
# Standard library modules.
import os
# Third party modules.
import qtpy
from qtpy.QtCore import Qt
from qtpy.QtWidgets import \
QWidget, QVBoxLayout, QTableView, QHeaderView, QSizePolicy
import matplotlib.backends.backend_qt5agg as mbackend #@UnusedImport
from matplotlib.figure import... | 24.973154 | 85 | 0.6423 |
c52f0130db35222c815006d13be57cedc77e2378 | 8,915 | py | Python | test/conda_mock/conda_mock.py | JohanMabille/powerloader | baba929728a0b4dd696480d26838ce74a1203a2d | [
"BSD-3-Clause"
] | 4 | 2021-12-01T15:31:48.000Z | 2021-12-14T18:27:19.000Z | test/conda_mock/conda_mock.py | JohanMabille/powerloader | baba929728a0b4dd696480d26838ce74a1203a2d | [
"BSD-3-Clause"
] | 25 | 2021-12-06T18:36:05.000Z | 2022-02-23T08:03:57.000Z | test/conda_mock/conda_mock.py | JohanMabille/powerloader | baba929728a0b4dd696480d26838ce74a1203a2d | [
"BSD-3-Clause"
] | 3 | 2021-12-06T10:44:26.000Z | 2022-02-18T16:11:23.000Z | from http.server import BaseHTTPRequestHandler, SimpleHTTPRequestHandler, HTTPServer
import os, sys, time, re, json
import hashlib, base64
from .config import AUTH_USER, AUTH_PASS
def file_path(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
failure_count = 0
prev_headers = []
BYTE... | 36.093117 | 88 | 0.545149 |
76f83f7887bddbc7c772c746b08a4f79b3ba7884 | 270 | py | Python | pexpect_/demo2.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | pexpect_/demo2.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | pexpect_/demo2.py | ThansksJava/learnPython | 64c8df012bf91582ee10459610b2157f535f78ad | [
"Apache-2.0"
] | null | null | null | from pexpect import pxssh
import sys
s = pxssh.pxssh()
s.logfile = sys.stdout.buffer
hostname = '192.168.253.136'
username = 'root'
password = '1qaz@WSX'
s.login(hostname, username, password)
# s.prompt()
s.sendline("ls /")
# s.prompt()
s.sendline("whoami")
s.logout()
| 18 | 37 | 0.7 |
82967571f82e9bbfaaf3c932fc90a8c1f5641f2e | 2,504 | py | Python | snakeshot/response.py | trackness/snakeshot | bb9717f163d06e6a6e9c9f10cabf848be508ee6a | [
"MIT"
] | null | null | null | snakeshot/response.py | trackness/snakeshot | bb9717f163d06e6a6e9c9f10cabf848be508ee6a | [
"MIT"
] | null | null | null | snakeshot/response.py | trackness/snakeshot | bb9717f163d06e6a6e9c9f10cabf848be508ee6a | [
"MIT"
] | null | null | null | import json
import os
from jinja2 import Template, Environment, FileSystemLoader
from loguru import logger
from snakeshot.model.slam import Slam
html = "text/html"
class Response:
def __init__(self, name: str, year: int):
self._name = name
self._year = year
self._slam = Slam(name, year,... | 29.809524 | 83 | 0.552716 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.