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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21c97e2e430dcfd004a50ad560aaa6e8508eb552 | 6,860 | py | Python | contrib/options_extracter.py | sshnaidm/ansible2dd | 48a0651a622ced3ea54263ebc489fea4250607c7 | [
"Apache-2.0"
] | null | null | null | contrib/options_extracter.py | sshnaidm/ansible2dd | 48a0651a622ced3ea54263ebc489fea4250607c7 | [
"Apache-2.0"
] | null | null | null | contrib/options_extracter.py | sshnaidm/ansible2dd | 48a0651a622ced3ea54263ebc489fea4250607c7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# Extract Ansible tasks from tripleo repos
import os
import yaml
TASK_ATTRS = [
"action",
"any_errors_fatal",
"args",
"async",
"become",
"become_exe",
"become_flags",
"become_method",
"become_user",
"changed_when",
"check_mode",
"collections",
"c... | 29.826087 | 78 | 0.463848 |
652760c5d46ddfd9c31dfb81c18f0446ce42f65d | 548 | py | Python | top/api/rest/WdtVipStockOutsideWmsQueryRequest.py | SAMZONG/taobao-sdk-python3 | 202a9df2085229838541713bd24433a90d07c7fc | [
"MIT"
] | null | null | null | top/api/rest/WdtVipStockOutsideWmsQueryRequest.py | SAMZONG/taobao-sdk-python3 | 202a9df2085229838541713bd24433a90d07c7fc | [
"MIT"
] | null | null | null | top/api/rest/WdtVipStockOutsideWmsQueryRequest.py | SAMZONG/taobao-sdk-python3 | 202a9df2085229838541713bd24433a90d07c7fc | [
"MIT"
] | null | null | null | '''
Created by auto_sdk on 2020.06.01
'''
from top.api.base import RestApi
class WdtVipStockOutsideWmsQueryRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.end_time = None
self.order_no = None
self.order_type = None
self.outer_no = No... | 26.095238 | 56 | 0.709854 |
5df1ee801175593acb659d8d98e7003c2a71c730 | 8,628 | py | Python | Projects/Brick Game/breakoutgraphics.py | andyandy2567/python_projects | 9831176c7c1e68fa6f4733fc6f730fe2bd09bf06 | [
"MIT"
] | null | null | null | Projects/Brick Game/breakoutgraphics.py | andyandy2567/python_projects | 9831176c7c1e68fa6f4733fc6f730fe2bd09bf06 | [
"MIT"
] | null | null | null | Projects/Brick Game/breakoutgraphics.py | andyandy2567/python_projects | 9831176c7c1e68fa6f4733fc6f730fe2bd09bf06 | [
"MIT"
] | null | null | null | """
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao
YOUR DESCRIPTION HERE
"""
from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.gui.events.mouse import onmouseclicked, onmousemoved
f... | 36.405063 | 137 | 0.60663 |
eb16564f344d8d2d76082d7877f0797e4ed7c63c | 275 | py | Python | src/main/python/control/ObjectDetectorTest.py | jjoyce0510/autonomous-shipping-vessel | 6757ecd77ad6ef422223413c57f60278b88b543b | [
"MIT"
] | 1 | 2017-11-08T15:20:09.000Z | 2017-11-08T15:20:09.000Z | src/main/python/control/ObjectDetectorTest.py | jjoyce0510/autonomous-shipping-vessel | 6757ecd77ad6ef422223413c57f60278b88b543b | [
"MIT"
] | null | null | null | src/main/python/control/ObjectDetectorTest.py | jjoyce0510/autonomous-shipping-vessel | 6757ecd77ad6ef422223413c57f60278b88b543b | [
"MIT"
] | null | null | null | from src.main.python.control.ObjectDetector import ObjectDetector
from src.main.python.wrappers.camera.Camera import CameraController
import time
myCamera = CameraController(objectDetector=ObjectDetector(None))
time.sleep(1)
myCamera.start()
time.sleep(10)
myCamera.stop()
| 25 | 67 | 0.832727 |
3f63ab3d30749b5a6c26b88daf0787e4e7bdf6db | 5,395 | py | Python | openaddr/summarize.py | albarrentine/machine | 5c302e8aabe0e2f6048af08cd9136eed2b58508d | [
"0BSD"
] | null | null | null | openaddr/summarize.py | albarrentine/machine | 5c302e8aabe0e2f6048af08cd9136eed2b58508d | [
"0BSD"
] | null | null | null | openaddr/summarize.py | albarrentine/machine | 5c302e8aabe0e2f6048af08cd9136eed2b58508d | [
"0BSD"
] | null | null | null | from __future__ import absolute_import, division, print_function
import json
from csv import DictReader
from io import StringIO
from base64 import b64decode
from operator import itemgetter
from os.path import join, dirname, splitext, relpath
from dateutil.parser import parse as parse_datetime
from urllib.parse import ... | 29.005376 | 85 | 0.622428 |
a757a37fcaefdb2edf4402975f531d84de971913 | 24,582 | py | Python | mindspore/ops/operations/_thor_ops.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/_thor_ops.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/_thor_ops.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 37.358663 | 120 | 0.622529 |
cf0e33be2975e29c01eae21105bfd36782f847fa | 1,000 | py | Python | accounts/accounts.py | awslabs/aws-dataset-ingestion-metrics-collection-framework | 8d20c0b03c08a8c09fd17bc4849efb9d802f0c00 | [
"MIT-0"
] | 9 | 2021-05-24T21:32:56.000Z | 2021-10-20T14:33:11.000Z | accounts/accounts.py | srinivasreddych/aws-dataset-ingestion-metrics-collection-framework | b5239c5a046bd17a825d38d3b4407480588f66ae | [
"MIT-0"
] | null | null | null | accounts/accounts.py | srinivasreddych/aws-dataset-ingestion-metrics-collection-framework | b5239c5a046bd17a825d38d3b4407480588f66ae | [
"MIT-0"
] | 1 | 2021-05-24T20:45:39.000Z | 2021-05-24T20:45:39.000Z | """ Fetches Accounts """
import json
import zipfile
try:
with open('accounts/config.json') as f:
accounts = json.load(f)
except FileNotFoundError:
with zipfile.ZipFile('/tmp/accounts.zip', 'r') as zip_ref:
zip_ref.open('accounts/config.json')
def fetch_account_central(account:str):
""" R... | 29.411765 | 84 | 0.673 |
73ac9d65f12397885fcf3f72d4b030e4a3541efb | 1,429 | py | Python | pubarchiver/__init__.py | caltechlibrary/datacite_to_portico | 63615b9832c73e8dbbdec9cf2bea8eae3804bdf4 | [
"BSD-3-Clause"
] | 1 | 2019-01-31T21:47:20.000Z | 2019-01-31T21:47:20.000Z | pubarchiver/__init__.py | caltechlibrary/datacite_to_portico | 63615b9832c73e8dbbdec9cf2bea8eae3804bdf4 | [
"BSD-3-Clause"
] | null | null | null | pubarchiver/__init__.py | caltechlibrary/datacite_to_portico | 63615b9832c73e8dbbdec9cf2bea8eae3804bdf4 | [
"BSD-3-Clause"
] | null | null | null | '''
PubArchiver -- Package up publications for archiving in Portico
Authors
-------
Tom Morrell <tmorrell@caltech.edu> -- Caltech Library
Michael Hucka <mhucka@caltech.edu> -- Caltech Library
Copyright
---------
Copyright (c) 2019-2022 by the California Institute of Technology. This code
is open-source software re... | 34.02381 | 83 | 0.579426 |
b869170162a203133a3a2fc29ac93d94e746aee0 | 3,699 | py | Python | xicam/gui/utils/__init__.py | JulReinhardt/Xi-cam | 031970e7de4c34da3181a10e2d897b08df0b874f | [
"BSD-3-Clause-LBNL"
] | null | null | null | xicam/gui/utils/__init__.py | JulReinhardt/Xi-cam | 031970e7de4c34da3181a10e2d897b08df0b874f | [
"BSD-3-Clause-LBNL"
] | null | null | null | xicam/gui/utils/__init__.py | JulReinhardt/Xi-cam | 031970e7de4c34da3181a10e2d897b08df0b874f | [
"BSD-3-Clause-LBNL"
] | null | null | null | from pyqtgraph.parametertree import Parameter, parameterTypes, ParameterTree
from qtpy.QtWidgets import QDialog, QVBoxLayout, QDialogButtonBox
from qtpy.QtCore import Qt
"""
Usage:
parameterized_scan = ParameterizablePlan(scan)
plan = parameterized_scan([det], device_list(), min, max)
plan_parameter = plan.paramete... | 27 | 102 | 0.611246 |
072c9416f6e4a63800b3157a7ec223296fe58d98 | 194 | py | Python | static/general/formscript.py | 1ncendium/Covid-lookup | 35d61adcd136d6e78f5d3f641aa0bb8b9c9cb26d | [
"MIT"
] | null | null | null | static/general/formscript.py | 1ncendium/Covid-lookup | 35d61adcd136d6e78f5d3f641aa0bb8b9c9cb26d | [
"MIT"
] | null | null | null | static/general/formscript.py | 1ncendium/Covid-lookup | 35d61adcd136d6e78f5d3f641aa0bb8b9c9cb26d | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
class SearchForm(FlaskForm):
searchquery = StringField('Enter Your Country:')
submit = SubmitField('Search') | 32.333333 | 52 | 0.783505 |
0d6e1b4c761315837580c43dea60e974da7349ca | 138 | py | Python | doc/web/web.py | ponyatov/metaLeds | e017f4b14dcdf87275154d8220fbdae06cd9f370 | [
"MIT"
] | null | null | null | doc/web/web.py | ponyatov/metaLeds | e017f4b14dcdf87275154d8220fbdae06cd9f370 | [
"MIT"
] | null | null | null | doc/web/web.py | ponyatov/metaLeds | e017f4b14dcdf87275154d8220fbdae06cd9f370 | [
"MIT"
] | null | null | null | class Web(Net): pass
## web interface data
web = Web('interface') ; glob << web
web['host'] = IP(config.HOST) ; web << Port(config.PORT)
| 23 | 56 | 0.644928 |
1c20e2c2b6a61970cf029078fd2340078eaa335c | 4,899 | py | Python | piwheels/__init__.py | jgillis/piwheels | 541882d0ba703493cb6ecdc889a397173295d3ad | [
"BSD-3-Clause"
] | 120 | 2019-07-16T00:05:17.000Z | 2022-03-23T17:57:16.000Z | piwheels/__init__.py | jgillis/piwheels | 541882d0ba703493cb6ecdc889a397173295d3ad | [
"BSD-3-Clause"
] | 247 | 2019-07-13T11:52:27.000Z | 2022-03-28T11:11:28.000Z | piwheels/__init__.py | jgillis/piwheels | 541882d0ba703493cb6ecdc889a397173295d3ad | [
"BSD-3-Clause"
] | 12 | 2019-07-18T19:39:46.000Z | 2021-11-07T11:53:57.000Z | # The piwheels project
# Copyright (c) 2017 Ben Nuttall <https://github.com/bennuttall>
# Copyright (c) 2017 Dave Jones <dave@waveform.org.uk>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistribution... | 43.353982 | 81 | 0.714227 |
eb4880f354085848f6fa8167eef61df23d9cbf86 | 1,483 | py | Python | 10_image_processing_in_openCV_intro1-preprocessing.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | 1 | 2021-12-15T22:27:27.000Z | 2021-12-15T22:27:27.000Z | 10_image_processing_in_openCV_intro1-preprocessing.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | null | null | null | 10_image_processing_in_openCV_intro1-preprocessing.py | Data-Laboratory/WorkExamples | 27e58207e664da7813673e6792c0c30c0a5bf74c | [
"MIT"
] | null | null | null |
#Ref: Microscopists
# Image smoothing, denoising
# Averaging, gaussian blurring, median, bilateral filtering
#OpenCV has a function cv2.filter2D(), which convolves whatever kernel we define with the image.
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('images/BSE_Google_noisy.jp... | 31.553191 | 105 | 0.678355 |
1b35a5cc7b1e3a0d6ec5ef36433af348d1a79a6e | 5,879 | py | Python | Examples/widget_example.py | mmorandi/DearPyGui | 08ae5bf475e0287ab80317e605d2dede94dd7fc6 | [
"MIT"
] | null | null | null | Examples/widget_example.py | mmorandi/DearPyGui | 08ae5bf475e0287ab80317e605d2dede94dd7fc6 | [
"MIT"
] | null | null | null | Examples/widget_example.py | mmorandi/DearPyGui | 08ae5bf475e0287ab80317e605d2dede94dd7fc6 | [
"MIT"
] | null | null | null | from dearpygui.core import *
from dearpygui.simple import *
# callback
def retrieve_values(sender, data):
show_logger()
log_info("Checkbox: " + str(get_value("Checkbox##widget")))
log_info("Combo: " + str(get_value("Combo##widget")))
log_info("Radio Button: " + str(get_value("Radio Button##widget")))
... | 45.223077 | 86 | 0.624766 |
45845bec2152e138712fd1894fcd9883ae2f7fa7 | 1,596 | py | Python | test/test_get_block_details_by_block_height_response_item_blockchain_specific_ethereum_classic.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_get_block_details_by_block_height_response_item_blockchain_specific_ethereum_classic.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | test/test_get_block_details_by_block_height_response_item_blockchain_specific_ethereum_classic.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | 1 | 2021-07-21T03:35:18.000Z | 2021-07-21T03:35:18.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 43.135135 | 484 | 0.807018 |
ac0e2f12786fc5f80522e1cc9bbfcb5078a852fd | 1,170 | py | Python | indico/modules/rb/models/map_areas.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/modules/rb/models/map_areas.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 5 | 2021-04-08T19:26:47.000Z | 2022-01-24T16:30:18.000Z | indico/modules/rb/models/map_areas.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 2 | 2019-02-24T17:29:10.000Z | 2021-04-08T19:23:27.000Z | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from indico.core.db import db
from indico.util.string import format_repr
class MapArea(db.Model):
__... | 23.877551 | 104 | 0.613675 |
b5221a30655e41be7e37bf130e61c988b353042e | 3,155 | py | Python | scripts/exceptions.py | foo-dogsquared/texture-notes | 02a446b66a4e9873af8d144deb47007cf6bba455 | [
"MIT"
] | null | null | null | scripts/exceptions.py | foo-dogsquared/texture-notes | 02a446b66a4e9873af8d144deb47007cf6bba455 | [
"MIT"
] | null | null | null | scripts/exceptions.py | foo-dogsquared/texture-notes | 02a446b66a4e9873af8d144deb47007cf6bba455 | [
"MIT"
] | null | null | null | class Error(Exception):
pass
# Base exception for profiles
class ProfileError(Error):
def __init__(self, location):
super().__init__()
self.location = location
class ProfileAlreadyExistsError(ProfileError):
def __init__(self, location):
super().__init__(location)
self.mes... | 31.55 | 112 | 0.703328 |
93fb5d58027a0e750ea4d80e9030c0c9c0e38c3f | 1,965 | py | Python | monk/system_unit_tests/keras/test_optimizer_nesterov_sgd.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 542 | 2019-11-10T12:09:31.000Z | 2022-03-28T11:39:07.000Z | monk/system_unit_tests/keras/test_optimizer_nesterov_sgd.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 117 | 2019-11-12T09:39:24.000Z | 2022-03-12T00:20:41.000Z | monk/system_unit_tests/keras/test_optimizer_nesterov_sgd.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 246 | 2019-11-09T21:53:24.000Z | 2022-03-29T00:57:07.000Z | import os
import sys
sys.path.append("../../../../monk_v1/");
sys.path.append("../../../monk/");
import psutil
from keras_prototype import prototype
from compare_prototype import compare
from common import print_start
from common import print_status
import tensorflow as tf
if(tf.__version__[0] == '2'):
import ten... | 40.9375 | 415 | 0.661069 |
c9c9d58a2e6fb3bedeaa8a6f9e4f523c9141825d | 4,519 | py | Python | temboo/core/Library/GitHub/ReposAPI/Contents/GetContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/GitHub/ReposAPI/Contents/GetContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/GitHub/ReposAPI/Contents/GetContents.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# GetContents
# Returns the contents of a file or directory in a repository.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# ... | 39.99115 | 196 | 0.674043 |
140346403d9a1ecc06d523c0eda82c5e3fcb30c9 | 60 | py | Python | src/vbr/client/__init__.py | a2cps/python-vbr | 9d5d4480386d0530450d59157e0da6937320f928 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T19:08:29.000Z | 2021-05-26T19:08:29.000Z | src/vbr/client/__init__.py | a2cps/python-vbr | 9d5d4480386d0530450d59157e0da6937320f928 | [
"BSD-3-Clause"
] | 7 | 2021-05-04T13:12:39.000Z | 2022-03-09T21:04:33.000Z | src/vbr/client/__init__.py | a2cps/python-vbr | 9d5d4480386d0530450d59157e0da6937320f928 | [
"BSD-3-Clause"
] | 2 | 2021-04-20T14:46:52.000Z | 2021-06-07T20:28:28.000Z | """Provides a VBR client with APIs
"""
from .vbr import VBR
| 15 | 34 | 0.7 |
d5f9f6758e50988e57ff6e598b1077d77b5d9672 | 30,686 | py | Python | AustinEatBackend/AustinEat.py | linm95/Austin-eat | bc516e9f0b08147bfc90d0427f60d7b7d48a9b5b | [
"MIT"
] | null | null | null | AustinEatBackend/AustinEat.py | linm95/Austin-eat | bc516e9f0b08147bfc90d0427f60d7b7d48a9b5b | [
"MIT"
] | null | null | null | AustinEatBackend/AustinEat.py | linm95/Austin-eat | bc516e9f0b08147bfc90d0427f60d7b7d48a9b5b | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright Team Wabler, UT Austin
# Author: Po-Cheng Pan, Tian Tan, Meng Lin
# [START IMPORT]
import webapp2
import global_vars as VAR
import database
from datetime import datetime
from datetime import timedelta
import braintree
import requests_toolbelt.adapters.appengine
from database import *
import ... | 35.639954 | 130 | 0.599068 |
2d15c87c2efcf7c61cbd1f2a29021a8e8f63cf1e | 2,764 | py | Python | notebooks/stock_predictions_import_data.py | bonitoo-io/influxdb-client-python | 465476b33648ba399a8f3e13d8780f7b3fe51950 | [
"MIT"
] | 1 | 2019-09-06T10:06:09.000Z | 2019-09-06T10:06:09.000Z | notebooks/stock_predictions_import_data.py | bonitoo-io/influxdb-client-python | 465476b33648ba399a8f3e13d8780f7b3fe51950 | [
"MIT"
] | 5 | 2019-08-06T04:58:58.000Z | 2019-09-05T09:09:40.000Z | notebooks/stock_predictions_import_data.py | bonitoo-io/influxdb-client-python | 465476b33648ba399a8f3e13d8780f7b3fe51950 | [
"MIT"
] | 1 | 2019-08-05T05:46:55.000Z | 2019-08-05T05:46:55.000Z | """
Import VIX - CBOE Volatility Index - from "vix-daily.csv" file into InfluxDB 2.0
https://datahub.io/core/finance-vix#data
"""
from collections import OrderedDict
from csv import DictReader
from datetime import timezone
import ciso8601
import requests
import rx
from rx import operators as ops
from influxdb_client... | 31.770115 | 108 | 0.655933 |
e8612fcecaaacf1a2d55f66d5af14c34803f89d5 | 3,283 | py | Python | test/unit_test/test_dendrogram_model.py | WheatonCS/Lexos | 994be4e403053ebbef18e5758a100af616195706 | [
"MIT"
] | 107 | 2015-03-19T09:10:31.000Z | 2022-01-29T01:33:48.000Z | test/unit_test/test_dendrogram_model.py | WheatonCS/Lexos | 994be4e403053ebbef18e5758a100af616195706 | [
"MIT"
] | 864 | 2015-05-19T19:27:00.000Z | 2022-01-28T18:48:52.000Z | test/unit_test/test_dendrogram_model.py | WheatonCS/Lexos | 994be4e403053ebbef18e5758a100af616195706 | [
"MIT"
] | 25 | 2015-06-02T23:03:06.000Z | 2020-08-06T04:27:49.000Z | import numpy as np
import pandas as pd
from lexos.models.dendrogram_model import DendroOption, DendrogramModel, \
DendroTestOptions
class TestLeftOrientation:
test_options = DendroTestOptions(
doc_term_matrix=pd.DataFrame(
[
[0.0, 0.0, 9.0, 9.0, 0.0, 0.0, 5.0, 4.0],
... | 30.971698 | 74 | 0.490405 |
47a1aef72e033c89b613177a8264cb7e6935b55f | 10,263 | py | Python | networking_fortinet/agent/linux/interface.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | networking_fortinet/agent/linux/interface.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | networking_fortinet/agent/linux/interface.py | samsu/networking-fortinet | f9c99bcfbae7d328d0de815fb68fe3b6719c9050 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Fortinet, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 43.487288 | 79 | 0.629543 |
0aefc845aab13ea854cb52cff842730737c22557 | 7,674 | py | Python | pytoil/cli/show.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | 6 | 2021-05-08T20:31:03.000Z | 2022-03-08T01:25:43.000Z | pytoil/cli/show.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | 116 | 2021-07-08T11:21:22.000Z | 2022-03-30T14:04:51.000Z | pytoil/cli/show.py | FollowTheProcess/pytoil | b13acb14f015ae5399d7697bdc3e0e475dff03ec | [
"Apache-2.0"
] | null | null | null | """
The `pytoil show` subcommand group.
Author: Tom Fleet
Created: 18/06/2021
"""
import httpx
import typer
from wasabi import msg
from pytoil.api import API
from pytoil.cli import utils
from pytoil.config import Config
app = typer.Typer(name="show")
# Callback for documentation only
@app.callback()
def show() -... | 26.645833 | 85 | 0.610373 |
0e8d2c337a7133a0bcac35405a3be14f7e345a90 | 4,623 | py | Python | gpflow/optimizers/mcmc.py | christabella/GPflow | 30824d289f8ee3f58d4249238c8b7267e6a0b2fc | [
"Apache-2.0"
] | null | null | null | gpflow/optimizers/mcmc.py | christabella/GPflow | 30824d289f8ee3f58d4249238c8b7267e6a0b2fc | [
"Apache-2.0"
] | null | null | null | gpflow/optimizers/mcmc.py | christabella/GPflow | 30824d289f8ee3f58d4249238c8b7267e6a0b2fc | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Artem Artemev @awav, Eric Hambro @condnsdmatters
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.177966 | 100 | 0.669262 |
8c77f0ab6f8ff5898b16cbedee48af17ddc5ee13 | 46 | py | Python | tests/__init__.py | namespace-ee/pyscard-json-rpc | 9103adc7be5f0282b39c2b04057da6d02b67c805 | [
"MIT"
] | null | null | null | tests/__init__.py | namespace-ee/pyscard-json-rpc | 9103adc7be5f0282b39c2b04057da6d02b67c805 | [
"MIT"
] | 89 | 2020-11-18T10:57:37.000Z | 2022-03-31T21:16:03.000Z | tests/__init__.py | namespace-ee/pyscard-json-rpc | 9103adc7be5f0282b39c2b04057da6d02b67c805 | [
"MIT"
] | null | null | null | """Unit test package for pyscard_json_rpc."""
| 23 | 45 | 0.73913 |
416fac73658a34e194c4d0d15188c70b3da17697 | 1,164 | py | Python | videos/utils.py | KamaljeetSahoo/Project-Aperture | a8d48049f3b3296b2c8345a84de8c63e6ee64b66 | [
"MIT"
] | null | null | null | videos/utils.py | KamaljeetSahoo/Project-Aperture | a8d48049f3b3296b2c8345a84de8c63e6ee64b66 | [
"MIT"
] | null | null | null | videos/utils.py | KamaljeetSahoo/Project-Aperture | a8d48049f3b3296b2c8345a84de8c63e6ee64b66 | [
"MIT"
] | 2 | 2021-12-04T15:46:27.000Z | 2022-02-18T20:56:56.000Z | from Katna.video import Video
from Katna.writer import KeyFrameDiskWriter
from .models import FrameCaption
from gallery.utils import sentence_similarity_model
from sklearn.metrics.pairwise import cosine_similarity
diskwriter = KeyFrameDiskWriter(location="temp_extracted_frames")
def extract_frames_from_video(video_... | 38.8 | 83 | 0.786082 |
7bde2d279f974192158028a1364b5c6a38448232 | 10,220 | py | Python | tests/card_tests/card_tests.py | zetsubo/hearthstone-simulator | af5417bde6bb878b7b1e54ef268f2296f300062e | [
"MIT"
] | null | null | null | tests/card_tests/card_tests.py | zetsubo/hearthstone-simulator | af5417bde6bb878b7b1e54ef268f2296f300062e | [
"MIT"
] | null | null | null | tests/card_tests/card_tests.py | zetsubo/hearthstone-simulator | af5417bde6bb878b7b1e54ef268f2296f300062e | [
"MIT"
] | null | null | null | import json
import unittest
import re
from hearthbreaker.agents.basic_agents import DoNothingAgent
from hearthbreaker.constants import CHARACTER_CLASS, MINION_TYPE, CARD_RARITY
from hearthbreaker.engine import card_lookup
from tests.agents.testing_agents import PlayAndAttackAgent
from tests.testing_utils import genera... | 65.935484 | 118 | 0.466928 |
d832a947571600a20ad97f98323e4e16f83d5925 | 19,219 | py | Python | cms/menu.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | null | null | null | cms/menu.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 9 | 2015-06-25T10:31:12.000Z | 2022-03-12T00:41:22.000Z | cms/menu.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 1 | 2017-08-22T07:00:30.000Z | 2017-08-22T07:00:30.000Z | # -*- coding: utf-8 -*-
from collections import defaultdict
from cms.apphook_pool import apphook_pool
from cms.models.moderatormodels import (ACCESS_DESCENDANTS,
ACCESS_PAGE_AND_DESCENDANTS, ACCESS_CHILDREN, ACCESS_PAGE_AND_CHILDREN, ACCESS_PAGE)
from cms.models.permissionmodels import PagePermission, GlobalPagePer... | 38.284861 | 129 | 0.608564 |
b29bc69dc0cb5bc52dfadc65b5c4b20cd226e611 | 12,811 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/static_routes/static_routes.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/static_routes/static_routes.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/static_routes/static_routes.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The eos_static_routes class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessary... | 35.09863 | 96 | 0.575131 |
5cf067e96b385a399c436cdd58f042ef23dfe6db | 42,201 | py | Python | backend/venv/Lib/site-packages/sphinx/quickstart.py | analurandis/Tur | b4b5d1230d70659be0c3f477f0baea68fc46ba39 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | backend/venv/Lib/site-packages/sphinx/quickstart.py | analurandis/Tur | b4b5d1230d70659be0c3f477f0baea68fc46ba39 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | backend/venv/Lib/site-packages/sphinx/quickstart.py | analurandis/Tur | b4b5d1230d70659be0c3f477f0baea68fc46ba39 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # -*- coding: utf-8 -*-
"""
sphinx.quickstart
~~~~~~~~~~~~~~~~~
Quickly setup documentation source to work with Sphinx.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys, os, time, re
from os import path
TERM_ENCODING = getatt... | 32.841245 | 80 | 0.660909 |
2b84777c0e1165e2e18cb3a4568454051a9b222e | 1,610 | py | Python | keylime/user_utils_test.py | ansasaki/keylime | 6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4 | [
"Apache-2.0"
] | null | null | null | keylime/user_utils_test.py | ansasaki/keylime | 6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4 | [
"Apache-2.0"
] | null | null | null | keylime/user_utils_test.py | ansasaki/keylime | 6aeb105975e8f2b3e9c83417dcf69b25dc2d69e4 | [
"Apache-2.0"
] | null | null | null | '''
SPDX-License-Identifier: Apache-2.0
Copyright 2022 IBM Corporation
'''
import unittest
from keylime import user_utils
class TestUserUtils(unittest.TestCase):
def test_string_to_uidgid(self):
uid, gid = user_utils.string_to_uidgid('root')
self.assertTrue(isinstance(uid, int))
self.ass... | 30.377358 | 64 | 0.645963 |
633bc6efedbda1763b0608625adc46db51d41b39 | 657 | py | Python | testTextureLoading.py | m4reQ/sPYke | 8a0c8755424963017ea747d913318a310c4b1cb6 | [
"MIT"
] | 1 | 2020-10-27T01:51:07.000Z | 2020-10-27T01:51:07.000Z | testTextureLoading.py | m4reQ/sPYke | 8a0c8755424963017ea747d913318a310c4b1cb6 | [
"MIT"
] | 7 | 2020-10-01T06:42:09.000Z | 2021-06-23T12:19:09.000Z | testTextureLoading.py | m4reQ/sPYke | 8a0c8755424963017ea747d913318a310c4b1cb6 | [
"MIT"
] | null | null | null | import spyke
spyke.Init()
from spyke import ResourceManager
from spyke.window import *
import time
class Test(GlfwWindow):
def __init__(self):
spec = WindowSpecs(512, 512, "")
self.testsCount = 5
super().__init__(spec)
def OnLoad(self):
start = time.perf_counter... | 21.193548 | 103 | 0.608828 |
e17fe115db6190a4d5a779d14343078b8a4bc604 | 7,049 | py | Python | litex_things/deps/litex/litex/tools/litex_server.py | bjonnh/fomu-playground | 9f95ed7b28d15ce219d09c16c2c8d6b5594adceb | [
"0BSD"
] | null | null | null | litex_things/deps/litex/litex/tools/litex_server.py | bjonnh/fomu-playground | 9f95ed7b28d15ce219d09c16c2c8d6b5594adceb | [
"0BSD"
] | null | null | null | litex_things/deps/litex/litex/tools/litex_server.py | bjonnh/fomu-playground | 9f95ed7b28d15ce219d09c16c2c8d6b5594adceb | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
# This file is Copyright (c) 2015-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# This file is Copyright (c) 2019 Sean Cross <sean@xobs.io>
# This file is Copyright (c) 2018 Felix Held <felix-github@felixheld.de>
# License: BSD
import argparse
import sys
import socket
import time
import th... | 35.422111 | 95 | 0.551426 |
963cd142b7cea295c3463f649df1f8b676c12274 | 684 | py | Python | bullet.py | nijuni2022/alien-invasions | db2ca9acc81cdcb78b42eaadd7e662a4e2e2710c | [
"MIT"
] | null | null | null | bullet.py | nijuni2022/alien-invasions | db2ca9acc81cdcb78b42eaadd7e662a4e2e2710c | [
"MIT"
] | null | null | null | bullet.py | nijuni2022/alien-invasions | db2ca9acc81cdcb78b42eaadd7e662a4e2e2710c | [
"MIT"
] | null | null | null | import pygame
from pygame.sprite import Sprite
class Bullet(Sprite):
def __init__(self, ai_settings, screen, ship):
super(Bullet, self).__init__()
self.screen = screen
self.rect = pygame.Rect(0, 0,ai_settings.bullet_width, ai_settings.bullet_height)
self.rect.centerx = ship.rect.ce... | 29.73913 | 89 | 0.665205 |
2d734dea22bce3849d1de97d4295a92a242a0cc7 | 473 | py | Python | examples/features/partial.runs/.test-run.py | JonathanLehner/korali | 90f97d8e2fed2311f988f39cfe014f23ba7dd6cf | [
"MIT"
] | 43 | 2018-07-26T07:20:42.000Z | 2022-03-02T10:23:12.000Z | examples/features/partial.runs/.test-run.py | JonathanLehner/korali | 90f97d8e2fed2311f988f39cfe014f23ba7dd6cf | [
"MIT"
] | 212 | 2018-09-21T10:44:07.000Z | 2022-03-22T14:33:05.000Z | examples/features/partial.runs/.test-run.py | JonathanLehner/korali | 90f97d8e2fed2311f988f39cfe014f23ba7dd6cf | [
"MIT"
] | 16 | 2018-07-25T15:00:36.000Z | 2022-03-22T14:19:46.000Z | #! /usr/bin/env python3
from subprocess import call
r = call(["python3", "run-cmaes.py"])
if r!=0:
exit(r)
r = call(["python3", "run-dea.py"])
if r!=0:
exit(r)
r = call(["python3", "run-mcmc.py"])
if r!=0:
exit(r)
r = call(["python3", "run-multiple.py"])
if r!=0:
exit(r)
r = call(["python3", "run-propagati... | 14.333333 | 43 | 0.566596 |
27ed4096c7d51fc69f7286288ea0de9251d93fb1 | 6,743 | py | Python | lib/evaluation/metrics.py | SimeonZhang/detectron2_tensorflow | ca03f633111d540ea91b3de75dbfa1da813647be | [
"Apache-2.0"
] | 3 | 2021-06-07T10:48:51.000Z | 2022-03-01T11:43:40.000Z | lib/evaluation/metrics.py | SimeonZhang/detectron2_tensorflow | ca03f633111d540ea91b3de75dbfa1da813647be | [
"Apache-2.0"
] | null | null | null | lib/evaluation/metrics.py | SimeonZhang/detectron2_tensorflow | ca03f633111d540ea91b3de75dbfa1da813647be | [
"Apache-2.0"
] | null | null | null | """Functions for computing metrics like precision, recall, CorLoc and etc."""
from __future__ import division
import numpy as np
def compute_precision_recall(scores, labels, num_gt):
"""Compute precision and recall.
Args:
scores: A float numpy array representing detection score
labels: A floa... | 42.408805 | 84 | 0.685748 |
3c07d80becfaa43cead20235684aa8dfddb2344b | 618 | py | Python | Course_2/Week_3/simple_matching_in_python.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | 2 | 2021-03-23T16:02:32.000Z | 2022-03-13T09:32:56.000Z | Course_2/Week_3/simple_matching_in_python.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | null | null | null | Course_2/Week_3/simple_matching_in_python.py | internetworksio/Google-ITAutomation-Python | 6027750a33e8df883d762223bb0c4a5a95395bc0 | [
"MIT"
] | 7 | 2021-01-14T05:39:54.000Z | 2022-03-13T09:33:01.000Z | """
This script is used for course notes.
Author: Erick Marin
Date: 12/19/2020
"""
import re
result = re.search(r"aza", "plaza")
print(result)
result = re.search(r"aza", "bazaar")
print(result)
result = re.search(r"aza", "maze")
print(result)
print(re.search(r"^x", "xenon"))
print(re.search(r"p.ng", "clapping"))... | 17.166667 | 51 | 0.661812 |
77129d0a7f8815b74dfb8f0d2b90eda90a82e527 | 3,834 | py | Python | python/tink/testing/bytes_io.py | saavan251/tink | acddae66fbcd38d0502c0e65c051a780eca7d6a1 | [
"Apache-2.0"
] | 2 | 2020-11-09T11:25:34.000Z | 2022-03-04T06:21:44.000Z | python/tink/testing/bytes_io.py | saavan251/tink | acddae66fbcd38d0502c0e65c051a780eca7d6a1 | [
"Apache-2.0"
] | null | null | null | python/tink/testing/bytes_io.py | saavan251/tink | acddae66fbcd38d0502c0e65c051a780eca7d6a1 | [
"Apache-2.0"
] | 1 | 2020-11-16T17:34:09.000Z | 2020-11-16T17:34:09.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... | 33.33913 | 78 | 0.703704 |
1cb442edd8ddf9c0f090025b3e6c9f185443c22b | 21,856 | py | Python | utils/video_transforms.py | hansheng0512/LateTemporalModeling3DCNN | 71c1d3fae9781c55059f0518e0b39781a535e153 | [
"MIT"
] | 144 | 2020-08-06T02:18:49.000Z | 2022-03-16T23:03:56.000Z | utils/video_transforms.py | hansheng0512/LateTemporalModeling3DCNN | 71c1d3fae9781c55059f0518e0b39781a535e153 | [
"MIT"
] | 26 | 2020-08-12T01:07:48.000Z | 2022-01-11T16:28:08.000Z | utils/video_transforms.py | hansheng0512/LateTemporalModeling3DCNN | 71c1d3fae9781c55059f0518e0b39781a535e153 | [
"MIT"
] | 55 | 2020-08-13T03:00:17.000Z | 2022-03-28T06:38:08.000Z | from __future__ import division
import torch
import random
import numpy as np
import numbers
import types
import cv2
import math
import os, sys
import collections
class Compose(object):
"""Composes several video_transforms together.
Args:
transforms (List[Transform]): list of transforms to compose.
... | 38.751773 | 151 | 0.593887 |
c3214cb3ebfa72315265d320da75e95a80ccc70b | 443 | py | Python | data/scripts/templates/object/tangible/lair/pharple/shared_lair_pharple.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/lair/pharple/shared_lair_pharple.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/lair/pharple/shared_lair_pharple.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/lair/pharple/shared_lair_pharple.iff"
result.attribute_template_id ... | 26.058824 | 73 | 0.722348 |
d461fba36bfda64096b1876eff69452bf1cf0141 | 52,570 | py | Python | transformers/src/transformers/generation_utils.py | zwcolin/robust_domain_shift | 8246cef51c357c6ad28c7d83f2260bd278c91766 | [
"MIT"
] | 26 | 2021-11-23T09:01:32.000Z | 2022-03-25T11:34:15.000Z | transformers/src/transformers/generation_utils.py | zwcolin/robust_domain_shift | 8246cef51c357c6ad28c7d83f2260bd278c91766 | [
"MIT"
] | 3 | 2021-12-10T17:43:23.000Z | 2022-03-18T11:37:19.000Z | transformers/src/transformers/generation_utils.py | zwcolin/robust_domain_shift | 8246cef51c357c6ad28c7d83f2260bd278c91766 | [
"MIT"
] | 5 | 2021-12-19T03:22:08.000Z | 2022-02-14T04:41:04.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... | 48.54109 | 246 | 0.625623 |
a25a1b5903163f356999abdba98e29a2cbcfdb9d | 1,727 | py | Python | holidays/countries/bangladesh.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | 654 | 2018-01-19T06:48:53.000Z | 2022-03-26T07:44:58.000Z | holidays/countries/bangladesh.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | 525 | 2018-01-16T20:16:43.000Z | 2022-03-31T13:19:02.000Z | holidays/countries/bangladesh.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | 320 | 2017-11-20T16:06:22.000Z | 2022-03-18T12:55:13.000Z | # -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@icl... | 28.783333 | 133 | 0.641575 |
28355c87c5460dacc9f6312fddfd597409179471 | 9,320 | py | Python | tools/analysis_tools/analyze_results_cell.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | 1 | 2022-03-15T07:36:04.000Z | 2022-03-15T07:36:04.000Z | tools/analysis_tools/analyze_results_cell.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | null | null | null | tools/analysis_tools/analyze_results_cell.py | sty16/cell_transformer | fc3d8dd8363664381617c76fb016f14c704749d8 | [
"Apache-2.0"
] | null | null | null | import argparse
import collections
import copy
import os.path
import warnings
import pickle
import shutil
import matplotlib.pyplot as plt
import mmcv
import torch
from mmcv import DictAction
from mmcv.runner import get_dist_info, init_dist, load_checkpoint
from mmcv.parallel import MMDataParallel
from sk... | 33.049645 | 105 | 0.640558 |
114dab63d961f827d612ed0fbad82a9519edf25f | 38,890 | py | Python | nemo/collections/tts/torch/data.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 1 | 2022-03-17T03:29:17.000Z | 2022-03-17T03:29:17.000Z | nemo/collections/tts/torch/data.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | null | null | null | nemo/collections/tts/torch/data.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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... | 45.168409 | 161 | 0.624531 |
e617a88ebd3c716c0099df3ac358ab1da6eae5ef | 10,292 | py | Python | scripts/generate_repetitions.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | 1 | 2020-09-23T09:37:23.000Z | 2020-09-23T09:37:23.000Z | scripts/generate_repetitions.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | null | null | null | scripts/generate_repetitions.py | BorgwardtLab/Imputing_Signatures | 9551e892f71703bde46907c9e2765c01fe4f1b27 | [
"BSD-3-Clause"
] | null | null | null | import csv
import json
import os
import sys
import argparse
import pandas as pd
import numpy as np
#from generate_hypersearch_commands import get_reps_to_submit
seed_to_rep = { 249040430: 0,
621965744: 1,
771860110: 2,
775293950: 3,
700134501: 4
}
def ... | 49.244019 | 215 | 0.549553 |
8689dd5685d60fa28aaec3cc5f996e7d8f1f08c8 | 3,481 | py | Python | AutomatedTesting/Gem/PythonTests/EditorPythonBindings/EntitySearchCommands_test.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | AutomatedTesting/Gem/PythonTests/EditorPythonBindings/EntitySearchCommands_test.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/EditorPythonBindings/EntitySearchCommands_test.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
#
# This is a pytest module to test the in-Editor Python API for Entity Search
#
import pytest
pytest.importors... | 45.207792 | 155 | 0.623384 |
963d1fb6745c8675ee3ef3d9c2c1056221939c52 | 393 | py | Python | employee/wsgi.py | Dhruv-Jangda/Employee | e38399ecdbfb6460fdefa228836f2ed5f29b588d | [
"MIT"
] | 1 | 2021-11-29T08:23:33.000Z | 2021-11-29T08:23:33.000Z | employee/wsgi.py | Dhruv-Jangda/Employee | e38399ecdbfb6460fdefa228836f2ed5f29b588d | [
"MIT"
] | null | null | null | employee/wsgi.py | Dhruv-Jangda/Employee | e38399ecdbfb6460fdefa228836f2ed5f29b588d | [
"MIT"
] | null | null | null | """
WSGI config for employee 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/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
7e42bcbd7f58f94778f932c1ecc13ed312839bbc | 12,146 | py | Python | supervised model initial/RL_MATLAB/experimental.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | supervised model initial/RL_MATLAB/experimental.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | supervised model initial/RL_MATLAB/experimental.py | Marius-Juston/MatLab-RL-ANFIS | 650645345dc197ca5b7069085bf95185acc40467 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ANFIS in torch: some simple functions to supply data and plot results.
@author: James Power <james.power@mu.ie> Apr 12 18:13:10 2019
"""
import matplotlib.pyplot as plt
import time
import torch
import torch.nn.functional as F
dtype = torch.float
def mfs_prin... | 39.563518 | 176 | 0.620781 |
1654bb0d880424ed9f6101512200f2884d9b731e | 730 | py | Python | tests/examples.py | philiparvidsson/pymake | 64c8ebba4c9ae8502b53ff4420f404be1c6e50fb | [
"MIT"
] | 2 | 2017-05-21T13:47:00.000Z | 2021-04-22T15:19:47.000Z | tests/examples.py | philiparvidsson/pymake | 64c8ebba4c9ae8502b53ff4420f404be1c6e50fb | [
"MIT"
] | 5 | 2016-11-24T22:09:21.000Z | 2016-12-02T08:18:48.000Z | tests/examples.py | philiparvidsson/pymake | 64c8ebba4c9ae8502b53ff4420f404be1c6e50fb | [
"MIT"
] | 1 | 2018-09-05T12:37:27.000Z | 2018-09-05T12:37:27.000Z | #!/usr/bin/env python
#---------------------------------------
# IMPORTS
#---------------------------------------
import os
import subprocess
import test
from pymake2 import *
#---------------------------------------
# SCRIPT
#---------------------------------------
# Some examples require Windows and such, so do... | 21.470588 | 73 | 0.506849 |
cdb7ad1b987c082b5db43bf92b13422b06370e94 | 1,986 | py | Python | init.py | sen-lee/detection_license_plate | 940772656d014da20006b077a4264b3f7ace80f9 | [
"Apache-2.0"
] | null | null | null | init.py | sen-lee/detection_license_plate | 940772656d014da20006b077a4264b3f7ace80f9 | [
"Apache-2.0"
] | null | null | null | init.py | sen-lee/detection_license_plate | 940772656d014da20006b077a4264b3f7ace80f9 | [
"Apache-2.0"
] | null | null | null |
# import some common libraries
import numpy as np
import random
import os
# import some common detectron2 utilities
from detectron2.utils.logger import setup_logger
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.data import Metadata... | 33.1 | 148 | 0.722558 |
5f03fce69657afb499860c5a3f6e4c315341716b | 632 | py | Python | skvalidate/__init__.py | riffard/scikit-validate | c490aead800b15daebd8839ac6365de6eab6014b | [
"Apache-2.0"
] | null | null | null | skvalidate/__init__.py | riffard/scikit-validate | c490aead800b15daebd8839ac6365de6eab6014b | [
"Apache-2.0"
] | null | null | null | skvalidate/__init__.py | riffard/scikit-validate | c490aead800b15daebd8839ac6365de6eab6014b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for scikit-validate."""
import logging
import os
__author__ = """FAST"""
__email__ = 'fast-hep@cern.ch'
__version__ = '0.4.0'
__skvalidate_root__ = os.path.dirname(__file__)
# logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.propagate =... | 20.387097 | 57 | 0.713608 |
b8508245b0b699e645616798d10e1b4d57ab3053 | 17,551 | py | Python | flask_calendar/calendar_data.py | Kartones/flask-calendar | fc5f13bfdf4978ebf9981628cb73bd58ac5d7ac8 | [
"Unlicense"
] | 166 | 2017-12-13T21:06:52.000Z | 2022-03-29T06:52:23.000Z | flask_calendar/calendar_data.py | vanger2607/flask-calendar | fc5f13bfdf4978ebf9981628cb73bd58ac5d7ac8 | [
"Unlicense"
] | 30 | 2019-09-28T17:34:52.000Z | 2021-03-29T17:24:23.000Z | flask_calendar/calendar_data.py | vanger2607/flask-calendar | fc5f13bfdf4978ebf9981628cb73bd58ac5d7ac8 | [
"Unlicense"
] | 76 | 2018-02-03T23:09:00.000Z | 2022-03-29T06:52:06.000Z | import json
import os
import random
import time
from datetime import datetime
from typing import Dict, List, Optional, cast
from flask import current_app
import flask_calendar.constants as constants
from flask_calendar.gregorian_calendar import GregorianCalendar
KEY_TASKS = "tasks"
KEY_USERS = "users"
KEY_NORMAL_TAS... | 41.887828 | 120 | 0.608626 |
6bdcdfef759601eb6a8ff7ab8a108049b3cd8dc8 | 16,163 | py | Python | gs_api_client/swagger/models/deleted_storages_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 7 | 2019-07-12T13:59:45.000Z | 2021-03-16T08:46:20.000Z | gs_api_client/swagger/models/deleted_storages_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 13 | 2020-01-23T07:50:29.000Z | 2022-03-21T14:32:40.000Z | gs_api_client/swagger/models/deleted_storages_get_response.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
API Specification
# Introduction Welcome to gridscales API documentation. A REST API is a programming interface that allows you to access and send data directly to our systems using HTTPS requests, without the need to use a web GUI. All the functionality you are already familiar with in y... | 136.974576 | 12,787 | 0.713667 |
00803130a6e60b4aaedfa7d834383f513d76110f | 2,946 | py | Python | coffea/processor/dataframe.py | hepaccelerate/coffea | 153061d6dd69a646fcd0a5b019168188595f6130 | [
"BSD-3-Clause"
] | 1 | 2019-06-26T12:40:13.000Z | 2019-06-26T12:40:13.000Z | coffea/processor/dataframe.py | hepaccelerate/coffea | 153061d6dd69a646fcd0a5b019168188595f6130 | [
"BSD-3-Clause"
] | null | null | null | coffea/processor/dataframe.py | hepaccelerate/coffea | 153061d6dd69a646fcd0a5b019168188595f6130 | [
"BSD-3-Clause"
] | 1 | 2019-07-05T14:49:12.000Z | 2019-07-05T14:49:12.000Z | from ..util import awkward
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
class LazyDataFrame(MutableMapping):
"""
Simple delayed uproot reader (a la lazyarrays)
Keeps track of values accessed, for later parsing.
"""
def __init__... | 26.781818 | 92 | 0.611337 |
000305ea47eb69c3b012659aa621f62f4db9a09c | 669 | py | Python | 01 - csv/csv_dictreader.py | WinTush/Learn-Python | 29b4378852ad85d26fd55585c2a0c963efde01fb | [
"MIT"
] | null | null | null | 01 - csv/csv_dictreader.py | WinTush/Learn-Python | 29b4378852ad85d26fd55585c2a0c963efde01fb | [
"MIT"
] | null | null | null | 01 - csv/csv_dictreader.py | WinTush/Learn-Python | 29b4378852ad85d26fd55585c2a0c963efde01fb | [
"MIT"
] | null | null | null | import csv
users = [
{'name': 'Sol Mansi', 'username': 'solm', 'department': 'IT infrastructure'},
{'name': 'Lio Nelson', 'username': 'lion', 'department': 'User Experience Research'},
{'name': 'Charlie Grey', 'username': 'greyc', 'department': 'Development'},
]
keys = ['name', 'username', 'department']
... | 33.45 | 99 | 0.633782 |
bd11ef91b8d1263ae88526ea1f5f5ab43f32599b | 713 | py | Python | tools/Polygraphy/polygraphy/tools/args/onnxrt/__init__.py | borisfom/TensorRT | 42805f078052daad1a98bc5965974fcffaad0960 | [
"Apache-2.0"
] | 1 | 2022-03-05T08:46:19.000Z | 2022-03-05T08:46:19.000Z | tools/Polygraphy/polygraphy/tools/args/onnxrt/__init__.py | maxpark/TensorRT | 46253b644142a1d9632ba463422abfc5dcefc371 | [
"Apache-2.0"
] | null | null | null | tools/Polygraphy/polygraphy/tools/args/onnxrt/__init__.py | maxpark/TensorRT | 46253b644142a1d9632ba463422abfc5dcefc371 | [
"Apache-2.0"
] | 1 | 2022-03-19T16:03:30.000Z | 2022-03-19T16:03:30.000Z | #
# Copyright (c) 2021, NVIDIA CORPORATION. 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 appl... | 39.611111 | 74 | 0.765778 |
635c1e54814f98f41ab74a7445fa6facaa4bc64f | 6,307 | py | Python | ufora/FORA/Axioms/AxiomJOA_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/FORA/Axioms/AxiomJOA_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/FORA/Axioms/AxiomJOA_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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 i... | 38.932099 | 109 | 0.576027 |
ad7eada5c112ceef7a11261b197731ddb602bb12 | 5,796 | py | Python | polar-plots/adsb-polar-plot.py | mutability/dump1090-tools | 9770bbaf9a69a70c9a689405cb7e4b404b134d72 | [
"0BSD"
] | 59 | 2015-01-20T11:45:39.000Z | 2022-03-13T13:08:58.000Z | polar-plots/adsb-polar-plot.py | BelmY/dump1090-tools | 9770bbaf9a69a70c9a689405cb7e4b404b134d72 | [
"0BSD"
] | 1 | 2015-06-04T07:21:19.000Z | 2015-06-04T07:21:19.000Z | polar-plots/adsb-polar-plot.py | BelmY/dump1090-tools | 9770bbaf9a69a70c9a689405cb7e4b404b134d72 | [
"0BSD"
] | 20 | 2015-03-01T02:47:33.000Z | 2022-01-08T23:26:04.000Z | #!/usr/bin/env python
import csv, math, os
from contextlib import closing
from PIL import Image, ImageDraw, ImageFont
data = []
max_rate = 0.0
max_range = 0.0
with closing(open('polar_range.csv', 'r')) as f:
r = csv.reader(f)
r.next() # header
for row in r:
b_start = float(row[0])
b_end =... | 29.571429 | 103 | 0.530366 |
8cc3bdfd42055dd03b3f90522249b376aa011708 | 773 | py | Python | user/forms.py | applicationsdev/Django-Python-Redis-AJAX-Social-Network | f0e35a396aa0f2e304ce4c267bd0c075618eb3de | [
"MIT"
] | null | null | null | user/forms.py | applicationsdev/Django-Python-Redis-AJAX-Social-Network | f0e35a396aa0f2e304ce4c267bd0c075618eb3de | [
"MIT"
] | null | null | null | user/forms.py | applicationsdev/Django-Python-Redis-AJAX-Social-Network | f0e35a396aa0f2e304ce4c267bd0c075618eb3de | [
"MIT"
] | null | null | null | # Imports
from django import forms
from django.contrib.auth.models import User
# User Login form class
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput)
# User Registration form class
class UserRegistrationForm(forms.ModelForm):
password = for... | 32.208333 | 85 | 0.694696 |
bc5f2e14580e96f06b3751e4e1ddbd338cf78f9e | 150,936 | py | Python | tests/test_utils.py | elitest/cryptography | 7921375c6a8f1d3bd32ecd4c0ba9be0682c5a57a | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2015-09-25T16:03:32.000Z | 2015-09-25T16:03:32.000Z | tests/test_utils.py | elitest/cryptography | 7921375c6a8f1d3bd32ecd4c0ba9be0682c5a57a | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | elitest/cryptography | 7921375c6a8f1d3bd32ecd4c0ba9be0682c5a57a | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-17T12:26:45.000Z | 2020-07-17T12:26:45.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import binascii
import os
import textwrap
import pretend
import pytest
... | 48.909916 | 79 | 0.71052 |
696a326a92939564213c8b11e6de50a1434c7d75 | 1,889 | py | Python | src/cambridge-oxford-mag/mendeley-catalog.py | oacore/cambridge-vs-oxford-repo-showdown | f755f1b9408839ae047e2b3894f73965329d21e4 | [
"Apache-2.0"
] | 2 | 2016-06-21T14:32:35.000Z | 2017-06-27T07:06:53.000Z | src/cambridge-oxford-mag/mendeley-catalog.py | oacore/or2016-cambridge-vs-oxford-demo | f755f1b9408839ae047e2b3894f73965329d21e4 | [
"Apache-2.0"
] | null | null | null | src/cambridge-oxford-mag/mendeley-catalog.py | oacore/or2016-cambridge-vs-oxford-demo | f755f1b9408839ae047e2b3894f73965329d21e4 | [
"Apache-2.0"
] | null | null | null | from mendeley import Mendeley
import yaml
import codecs
with open('config.yml') as f:
config = yaml.load(f)
mendeley = Mendeley(config['clientId'], config['clientSecret'],"http://localhost:5000/oauth")
auth = mendeley.start_authorization_code_flow()
# mendeley_object = Mendeley(config['clientId'], config['client... | 35.641509 | 236 | 0.712546 |
343625a4c0288f728820c2b7ed22a197044c1efe | 1,201 | py | Python | hubspot/crm/owners/models/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | 1 | 2020-11-12T08:46:32.000Z | 2020-11-12T08:46:32.000Z | hubspot/crm/owners/models/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | null | null | null | hubspot/crm/owners/models/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# flake8: noqa
"""
CRM Owners
HubSpot uses **owners** to assign CRM objects to specific people in your organization. The endpoints described here are used to get a list of the owners that are available for an account. To assign an owner to an object, set the hubspot_owner_id property using the... | 46.192308 | 517 | 0.799334 |
0a6699f97e293abf8898652c1099845b4b368e7b | 36,671 | py | Python | src/acl.py | aruba/aos-cx-python | a22064cb3a10c78c5af6330622a891f14340afa6 | [
"Apache-2.0"
] | 5 | 2019-12-02T23:37:13.000Z | 2020-02-17T15:45:03.000Z | src/acl.py | aruba/aos-cx-python | a22064cb3a10c78c5af6330622a891f14340afa6 | [
"Apache-2.0"
] | null | null | null | src/acl.py | aruba/aos-cx-python | a22064cb3a10c78c5af6330622a891f14340afa6 | [
"Apache-2.0"
] | 3 | 2020-04-29T18:27:27.000Z | 2021-06-11T19:36:09.000Z | from src import common_ops, interface, port
import json
import random
def get_all_acls(**kwargs):
"""
Perform a GET call to get a list of all ACLs
:param kwargs:
keyword s: requests.session object with loaded cookie jar
keyword url: URL in main() function
:return: List of all ACLs in... | 40.431092 | 124 | 0.671757 |
c1ed97c15d26b33af57409601b87244b7b6cef4a | 13,044 | py | Python | gazoo_device/switchboard/transport_process.py | isabella232/gazoo-device | 0e1e276d72333e713b47152815708b9c74c45409 | [
"Apache-2.0"
] | 14 | 2020-11-05T23:23:32.000Z | 2022-03-01T18:59:29.000Z | gazoo_device/switchboard/transport_process.py | google/gazoo-device | f333b386f5993c8d4c9e12c89ebb620a0c4f5506 | [
"Apache-2.0"
] | 1 | 2021-06-24T19:20:50.000Z | 2021-06-24T19:20:50.000Z | gazoo_device/switchboard/transport_process.py | isabella232/gazoo-device | 0e1e276d72333e713b47152815708b9c74c45409 | [
"Apache-2.0"
] | 5 | 2021-05-20T22:52:51.000Z | 2022-02-21T08:46:21.000Z | # Copyright 2021 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 agreed to in writing, ... | 36.640449 | 98 | 0.695339 |
b2af2f1622b040ca070f1d5170d0164c8fc525dd | 12,753 | py | Python | src/ansys/mapdl/core/misc.py | Miiicah/pymapdl | ce85393ca82db7556a5d05883ca3fd9296444cba | [
"MIT"
] | null | null | null | src/ansys/mapdl/core/misc.py | Miiicah/pymapdl | ce85393ca82db7556a5d05883ca3fd9296444cba | [
"MIT"
] | null | null | null | src/ansys/mapdl/core/misc.py | Miiicah/pymapdl | ce85393ca82db7556a5d05883ca3fd9296444cba | [
"MIT"
] | null | null | null | """Module for miscellaneous functions and methods"""
from functools import wraps
import inspect
import os
import platform
import random
import socket
import string
import sys
import tempfile
from threading import Thread
import numpy as np
import scooby
# path of this module
MODULE_PATH = os.path.dirname(inspect.getfi... | 30.007059 | 133 | 0.597977 |
ae221a0551ba6ecd3faa20e991cd13c0fab49392 | 779 | py | Python | src/models/base.py | fivejjs/scikit-hts-examples | 7e65c7e144f91dd01a2d61a67aaaf368f8a722aa | [
"MIT"
] | 43 | 2020-04-01T01:14:21.000Z | 2022-03-10T14:11:21.000Z | src/models/base.py | fivejjs/scikit-hts-examples | 7e65c7e144f91dd01a2d61a67aaaf368f8a722aa | [
"MIT"
] | 15 | 2020-04-08T14:29:52.000Z | 2022-03-09T11:59:27.000Z | src/models/base.py | fivejjs/scikit-hts-examples | 7e65c7e144f91dd01a2d61a67aaaf368f8a722aa | [
"MIT"
] | 25 | 2020-03-29T16:02:12.000Z | 2022-03-25T17:49:43.000Z | """
See notebook to get an understanding of how the model parameters were decided
"""
from sklearn.ensemble import RandomForestRegressor
rf = RandomForestRegressor(bootstrap=True, ccp_alpha=0.0,
criterion='mse', max_depth=None,
max_features='auto', max_leaf_nodes=... | 43.277778 | 77 | 0.534018 |
c5e623c3de8bdd48593c810837bf20bd6f75fc7e | 155 | py | Python | tools/parentdir.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 15 | 2019-12-20T08:24:31.000Z | 2022-03-18T09:24:25.000Z | tools/parentdir.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 124 | 2020-04-20T04:36:49.000Z | 2022-01-29T11:08:09.000Z | tools/parentdir.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 12 | 2020-07-08T22:19:39.000Z | 2022-03-19T09:13:11.000Z | """Add parent directory to sys.path for module importing"""
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parents[1]))
| 25.833333 | 59 | 0.76129 |
6e7df07949ac2055ce153b429d334a57ac8b2024 | 4,639 | py | Python | src/pyq/_n.py | Enlnt/pyq | 8c31f19e6ee8970d5b4146c5593cb1ed174e1385 | [
"Apache-2.0"
] | 149 | 2017-11-04T17:11:22.000Z | 2022-03-12T16:27:28.000Z | src/pyq/_n.py | Enlnt/pyq | 8c31f19e6ee8970d5b4146c5593cb1ed174e1385 | [
"Apache-2.0"
] | 111 | 2017-11-08T03:06:20.000Z | 2021-10-06T17:16:11.000Z | src/pyq/_n.py | Enlnt/pyq | 8c31f19e6ee8970d5b4146c5593cb1ed174e1385 | [
"Apache-2.0"
] | 35 | 2017-11-05T05:37:38.000Z | 2021-08-03T07:59:42.000Z | """A helper module for interfacing with numpy
Numpy has four date units
Code Meaning Time span (relative) Time span (absolute)
Y year +/- 9.2e18 years [9.2e18 BC, 9.2e18 AD]
M month +/- 7.6e17 years [7.6e17 BC, 7.6e17 AD]
W week +/- 1.7e17 years [1.7e17 BC, 1.7e17 AD]
D day +/- 2.5e16 years [2.5e16 BC, 2.5e16 AD]
An... | 28.115152 | 79 | 0.530718 |
c354f5062144266498bb76b3985e943d54c329a9 | 5,374 | py | Python | src/cfnlint/rules/resources/properties/JsonSize.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | null | null | null | src/cfnlint/rules/resources/properties/JsonSize.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | 1 | 2020-04-15T16:36:10.000Z | 2020-04-15T16:36:10.000Z | src/cfnlint/rules/resources/properties/JsonSize.py | obobrova/cfn-python-lint | 42c0cd89577a39e903e5ef8a337926cc7ff6822c | [
"MIT-0"
] | 1 | 2020-01-05T01:05:55.000Z | 2020-01-05T01:05:55.000Z | """
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import datetime
import json
import re
import six
import cfnlint.helpers
from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules import RuleMatch
from cfnlint.helpers import RESOURCE_SPECS
class J... | 42.650794 | 144 | 0.536472 |
5407196c14aa8fca846c8b63e495d97756e8df4a | 2,027 | py | Python | setup.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | setup.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | setup.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
setup(
name='DefectDojo',
version='1.11.0',
author='Greg Anderson',
description="Tool for managing vulnerability engagements",
install_requires=[
'defusedxml',
'Django==2.2.17',
'django-auditlog==0.4.7',
'django-cus... | 26.324675 | 85 | 0.522447 |
fa241b61597a9015feca7119236644dec4eb9b81 | 11,384 | py | Python | robonet/datasets/util/hdf5_loader.py | voyager1998/RoboNet | a45a8999f0333c054f6c4fab9abfcc4143e762c8 | [
"MIT"
] | null | null | null | robonet/datasets/util/hdf5_loader.py | voyager1998/RoboNet | a45a8999f0333c054f6c4fab9abfcc4143e762c8 | [
"MIT"
] | null | null | null | robonet/datasets/util/hdf5_loader.py | voyager1998/RoboNet | a45a8999f0333c054f6c4fab9abfcc4143e762c8 | [
"MIT"
] | null | null | null | import h5py
import cv2
import pdb
import imageio
import io
import hashlib
import numpy as np
import os
import random
class ACTION_MISMATCH:
ERROR = 0
PAD_ZERO = 1
CLEAVE = 2
class STATE_MISMATCH:
ERROR = 0
PAD_ZERO = 1
CLEAVE = 2
def default_loader_hparams():
return {
'target_a... | 42.00738 | 120 | 0.636947 |
59818b1c759bfc92085315373173b6520fb859d0 | 1,659 | py | Python | catalog/tests/test_forms.py | mrmarkhurlburt/django_media_library | 59bcff3dcf8a803dbfa22eb4d073bd5e9f73cdee | [
"CC0-1.0"
] | null | null | null | catalog/tests/test_forms.py | mrmarkhurlburt/django_media_library | 59bcff3dcf8a803dbfa22eb4d073bd5e9f73cdee | [
"CC0-1.0"
] | 1 | 2022-02-10T11:04:51.000Z | 2022-02-10T11:04:51.000Z | catalog/tests/test_forms.py | mrmarkhurlburt/django_media_library | 59bcff3dcf8a803dbfa22eb4d073bd5e9f73cdee | [
"CC0-1.0"
] | null | null | null | from django.test import TestCase
# Create your tests here.
print('test_forms running')
import datetime
from django.utils import timezone
from catalog.forms import RenewBookForm
class RenewBookFormTest(TestCase):
def test_renew_form_date_field_label(self):
form = RenewBookForm()
self.asser... | 36.866667 | 121 | 0.681736 |
e9da44f6992f4ab104759a0abcf81ff3aa5204d1 | 8,617 | py | Python | pybind/nos/v7_1_0/rbridge_id/interface/ve/ipv6/ipv6_anycast_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/rbridge_id/interface/ve/ipv6/ipv6_anycast_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/rbridge_id/interface/ve/ipv6/ipv6_anycast_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 67.320313 | 1,067 | 0.637229 |
cc8c6c7e4d2883756384d97dbac040c073d817b1 | 17,854 | py | Python | cly/console.py | redislabsdev/cly | 748f1477ca4d7fa54669d6f85a7baf1b9056f0f0 | [
"BSD-3-Clause"
] | 2 | 2015-02-26T00:27:34.000Z | 2018-01-11T07:35:56.000Z | cly/console.py | redislabsdev/cly | 748f1477ca4d7fa54669d6f85a7baf1b9056f0f0 | [
"BSD-3-Clause"
] | null | null | null | cly/console.py | redislabsdev/cly | 748f1477ca4d7fa54669d6f85a7baf1b9056f0f0 | [
"BSD-3-Clause"
] | 3 | 2020-06-03T03:36:19.000Z | 2020-10-18T15:43:56.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Alec Thomas <alec@swapoff.org>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
"""Console/terminal interaction classes and functions.
This module provides a simple formatting syntax for... | 30.312394 | 84 | 0.568892 |
f40ca3ff431fecfd53814c677ef70ca3d2b492da | 29,502 | py | Python | cnltk/draw/cfg.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | cnltk/draw/cfg.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | cnltk/draw/cfg.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: CFG visualization
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Visualization tools for CFGs.
"""
# Idea for a nice demo:
# - 3 panes: grammar, treelet, working area
# - gra... | 37.920308 | 77 | 0.544912 |
efb477847fde4653efeb52bfe72e23a64e78efef | 208 | py | Python | pbsuite/utils/mergeFaQu.py | shokrof/pbhoney | 288dbb9cbbd16621f815c0e9eb99e1d1455c5c26 | [
"MIT"
] | null | null | null | pbsuite/utils/mergeFaQu.py | shokrof/pbhoney | 288dbb9cbbd16621f815c0e9eb99e1d1455c5c26 | [
"MIT"
] | null | null | null | pbsuite/utils/mergeFaQu.py | shokrof/pbhoney | 288dbb9cbbd16621f815c0e9eb99e1d1455c5c26 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
from pbsuite.utils.FileHandlers import mergeFastaQual
if __name__ == '__main__':
f = mergeFastaQual(sys.argv[1], sys.argv[2])
for i in f:
print f[i].toString(),
| 20.8 | 53 | 0.673077 |
4c6b5a049b0bc070c429be4a687018a9edc2755d | 3,733 | py | Python | scripts/08_sparse_tracts.py | snmarkley1/HHUUD10 | 9b8ef34d55a37aea4b6cf634cb5ef0c4b24bf977 | [
"MIT"
] | 3 | 2022-03-11T15:22:03.000Z | 2022-03-22T17:02:20.000Z | scripts/08_sparse_tracts.py | snmarkley1/HHUUD10 | 9b8ef34d55a37aea4b6cf634cb5ef0c4b24bf977 | [
"MIT"
] | null | null | null | scripts/08_sparse_tracts.py | snmarkley1/HHUUD10 | 9b8ef34d55a37aea4b6cf634cb5ef0c4b24bf977 | [
"MIT"
] | null | null | null |
#####################################################################################
#####################################################################################
#### --------------------------------------------------------------------------- ####
#### IDENTIFYING/ORGANIZING SPARSE TRACTS ... | 36.598039 | 123 | 0.502277 |
d2a19c0066c0db3b7469c37eb460747cb129386f | 2,436 | py | Python | databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | 1 | 2020-08-20T16:22:07.000Z | 2020-08-20T16:22:07.000Z | databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | 2 | 2020-07-20T16:03:49.000Z | 2020-08-14T16:14:10.000Z | databuilder/extractor/dashboard/mode_analytics/mode_dashboard_usage_extractor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import logging
from pyhocon import ConfigTree # noqa: F401
from typing import Any # noqa: F401
from databuilder.extractor.base_extractor import Extractor
from databuilder.extractor.dashboard.mode_analytics.mode_dashboard_utils ... | 38.666667 | 118 | 0.692118 |
6651f6e2f66171d8414ed6e47296167338ae60f4 | 2,112 | py | Python | tests/wallet/test_flaxlisp.py | ReadyNeutron/shitcoin-blockchain | 80add4e545ad22a317244f7fd958d118a5a75c5d | [
"Apache-2.0"
] | 174 | 2021-06-16T17:49:22.000Z | 2022-03-17T03:03:17.000Z | tests/wallet/test_flaxlisp.py | ReadyNeutron/shitcoin-blockchain | 80add4e545ad22a317244f7fd958d118a5a75c5d | [
"Apache-2.0"
] | 49 | 2021-06-17T14:10:53.000Z | 2022-01-31T11:04:21.000Z | tests/wallet/test_flaxlisp.py | ReadyNeutron/shitcoin-blockchain | 80add4e545ad22a317244f7fd958d118a5a75c5d | [
"Apache-2.0"
] | 80 | 2021-06-17T14:23:31.000Z | 2022-02-24T05:52:47.000Z | import pytest
from flax.wallet.flaxlisp import (
apply,
args,
cons,
eval,
fail,
first,
is_zero,
make_if,
make_list,
nth,
quote,
rest,
sexp,
)
class TestFlaxlisp:
def test_sexp(self):
assert sexp() == "()"
assert sexp(1) == "(1)"
assert s... | 25.445783 | 70 | 0.454072 |
b9636e44edc5a3c34913508de2d90f72d6758fdd | 1,402 | py | Python | nipype/interfaces/spm/tests/test_auto_EstimateModel.py | mfalkiewicz/nipype | 775e21b78fb1ffa2ff9cb12e6f052868bd44d052 | [
"Apache-2.0"
] | 1 | 2015-01-19T13:12:27.000Z | 2015-01-19T13:12:27.000Z | nipype/interfaces/spm/tests/test_auto_EstimateModel.py | bpinsard/nipype | 373bdddba9f675ef153951afa368729e2d8950d2 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/spm/tests/test_auto_EstimateModel.py | bpinsard/nipype | 373bdddba9f675ef153951afa368729e2d8950d2 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..model import EstimateModel
def test_EstimateModel_inputs():
input_map = dict(estimation_method=dict(field='method',
mandatory=True,
),
flags=dict(),
ignore_exception=dict(deprecated='1.0.0',
no... | 25.490909 | 67 | 0.649073 |
fc6daeaa940e3bbb26c757020396793de52bf9dc | 348 | py | Python | seqgra/model/model/__init__.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | seqgra/model/model/__init__.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | seqgra/model/model/__init__.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | 2 | 2021-06-14T20:27:40.000Z | 2021-06-14T20:29:29.000Z | """
Elements of model definition
Classes:
- :class:`~seqgra.model.model.architecture.Architecture`: architecture section of model definition
- :class:`~seqgra.model.model.operation.Operation`: operation of architecture section
"""
from seqgra.model.model.operation import Operation
from seqgra.model.model.archi... | 34.8 | 102 | 0.793103 |
9ee91acb35b18f8d27a7324dc7fad0390b2008af | 760 | py | Python | day4/append_vs_comprehension/main.py | H37kouya/lib-python-study | 6af40c27e2e48f71825e8dc7ecee0e820bf8dbfc | [
"MIT"
] | null | null | null | day4/append_vs_comprehension/main.py | H37kouya/lib-python-study | 6af40c27e2e48f71825e8dc7ecee0e820bf8dbfc | [
"MIT"
] | null | null | null | day4/append_vs_comprehension/main.py | H37kouya/lib-python-study | 6af40c27e2e48f71825e8dc7ecee0e820bf8dbfc | [
"MIT"
] | null | null | null | import time
def measurement_append() -> None:
print("measurement_append")
def append_func():
x = []
for i in range(int(1e6)):
x.append(i)
timeit(append_func)
def measurement_comprehension() -> None:
print("measurement_comprehension")
def append_func():
x = [... | 18.536585 | 61 | 0.618421 |
0cf2c5e1def1a76c694d3af6638e0e1dea80c620 | 5,102 | py | Python | flask/iroha_client.py | blockchain-Bobby/Plenteum-Iroha | 431119e4d0c2cb472f2df4a24c30e72c47fb51ae | [
"Apache-2.0"
] | 1 | 2019-03-17T19:18:53.000Z | 2019-03-17T19:18:53.000Z | flask/iroha_client.py | blockchain-Bobby/Plenteum-Iroha | 431119e4d0c2cb472f2df4a24c30e72c47fb51ae | [
"Apache-2.0"
] | null | null | null | flask/iroha_client.py | blockchain-Bobby/Plenteum-Iroha | 431119e4d0c2cb472f2df4a24c30e72c47fb51ae | [
"Apache-2.0"
] | null | null | null | import binascii
from iroha import IrohaCrypto as ic
from iroha import Iroha, IrohaGrpc
import sys
iroha = Iroha('admin@test')
#populate from login form. iroha = Iroha('user@domain')
net = IrohaGrpc()
admin_private_key = open('./configs/admin@test.priv').read()
#user_private_key = open('./configs/user@test.priv').read(... | 32.705128 | 87 | 0.69267 |
a8aedb04093a987f75024f4035e57e551ce5f232 | 488 | py | Python | tests/test_logger.py | wasimusu/cached | eef5d2b7fb6dd2975ab029aed920c9e95dce6379 | [
"MIT"
] | 8 | 2020-06-28T22:42:07.000Z | 2021-04-29T17:47:33.000Z | tests/test_logger.py | ujas09/distcache | a9d8124fd727472b2e79f8146b8bf73d6957a767 | [
"MIT"
] | null | null | null | tests/test_logger.py | ujas09/distcache | a9d8124fd727472b2e79f8146b8bf73d6957a767 | [
"MIT"
] | 6 | 2020-06-28T05:45:22.000Z | 2022-02-10T09:17:15.000Z | """
Tests distcache/logger.py
Testing objective:
Is there any data corruption?
Are all the objects logged properly.
Testing ideas:
Read from a file. Write to actual_log.txt. Compare it to expected_log.txt
Generate file of different types.
Do lots of iterations.
"""
import unittest
from distcache i... | 20.333333 | 77 | 0.723361 |
3d4e7a6fa769d8f91dc6fad247d727ae4b590686 | 4,999 | py | Python | thirdparty/basalt/thirdparty/ros/ros_comm/test/test_roslib_comm/test/test_roslib_message.py | Bookiebookie/LieSpline | b617bdf6b37164562387d0257145e9230d28e2e7 | [
"BSD-3-Clause"
] | 2 | 2021-05-22T09:46:00.000Z | 2022-03-25T09:56:22.000Z | thirdparty/basalt/thirdparty/ros/ros_comm/test/test_roslib_comm/test/test_roslib_message.py | Bookiebookie/LieSpline | b617bdf6b37164562387d0257145e9230d28e2e7 | [
"BSD-3-Clause"
] | null | null | null | thirdparty/basalt/thirdparty/ros/ros_comm/test/test_roslib_comm/test/test_roslib_message.py | Bookiebookie/LieSpline | b617bdf6b37164562387d0257145e9230d28e2e7 | [
"BSD-3-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 41.31405 | 124 | 0.683737 |
af38c1ccf6126a2fae3b835218a74ecdb370cfd9 | 3,254 | py | Python | sdk/python/pulumi_azure_nextgen/scheduler/v20160301/get_job.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/scheduler/v20160301/get_job.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/scheduler/v20160301/get_job.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 30.990476 | 124 | 0.634296 |
c9d6e2010e25a50e11d7f26ef264be6c5e4ad99a | 11,357 | py | Python | stubs.min/System/Windows/Media/__init___parts/GeneralTransformCollection.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Media/__init___parts/GeneralTransformCollection.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Media/__init___parts/GeneralTransformCollection.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class GeneralTransformCollection(Animatable,ISealable,IAnimatable,IResource,IList,ICollection,IEnumerable,IList[GeneralTransform],ICollection[GeneralTransform],IEnumerable[GeneralTransform]):
"""
Represents an ordered collection of System.Windows.Media.GeneralTransform objects.
GeneralTransformCollection()
... | 38.368243 | 215 | 0.724927 |
742cf603c661c88f5307ca5016d891ccb25854b5 | 21,890 | py | Python | apps/optimizer.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 13 | 2019-05-01T01:37:30.000Z | 2022-03-18T08:52:19.000Z | apps/optimizer.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 111 | 2019-03-25T00:50:48.000Z | 2022-03-30T17:13:43.000Z | apps/optimizer.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 52 | 2019-01-24T21:05:04.000Z | 2022-03-07T23:37:55.000Z | #!/usr/bin/env python3
import os
import argparse
import time
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#plt.style.use('clint.mpl')
from pprint import pprint
import scipy.signal as signal
import itertools
from pygama import DataSet
import pygama.utils as pu
import pygama.analysis.histograms... | 42.670565 | 125 | 0.541846 |
ca9df008217c69060eea7ffc25c7a474c3acde5e | 3,979 | py | Python | alipay/aop/api/request/AlipayFundTransBatchQuerybatchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayFundTransBatchQuerybatchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayFundTransBatchQuerybatchRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayFundTransBatchQuerybatchModel import AlipayFundTransBatchQuerybatchModel
class AlipayFundTransBatchQuerybatchRequest(object):
... | 27.441379 | 148 | 0.645388 |
794ae76ed74e0e253b874598d9df1653ac0b7641 | 6,578 | py | Python | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 3 | 2019-11-19T09:47:25.000Z | 2022-02-24T00:32:31.000Z | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 1 | 2019-03-18T14:19:49.000Z | 2020-01-11T13:54:33.000Z | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 1 | 2022-02-24T00:32:36.000Z | 2022-02-24T00:32:36.000Z | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 28.23176 | 77 | 0.656887 |
697d697d38a3e4c673100a0caf820ad2ffcde5bc | 305,076 | py | Python | hphp/hack/test/integration/test_lsp.py | ScriptBox99/hhvm | a65da0fa07025cb9b19b8746361aba81ea69f26a | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | hphp/hack/test/integration/test_lsp.py | ScriptBox99/hhvm | a65da0fa07025cb9b19b8746361aba81ea69f26a | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | hphp/hack/test/integration/test_lsp.py | ScriptBox99/hhvm | a65da0fa07025cb9b19b8746361aba81ea69f26a | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | # pyre-strict
# flake8: noqa: B950
from __future__ import absolute_import, division, print_function, unicode_literals
import copy
import enum
import json
import os
import re
import unittest
import urllib.parse
from typing import Iterable, List, Mapping, Tuple
import common_tests
from hh_paths import hh_server
from l... | 41.888782 | 156 | 0.360808 |
a2803a25d453e9bca52fc351de079957be6f1d46 | 4,342 | py | Python | pypureclient/flasharray/FA_2_1/models/oauth_token_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_1/models/oauth_token_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_1/models/oauth_token_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 33.4 | 186 | 0.583602 |
e4de95fa3b3572ea9b084acfd09ad06a26e49e03 | 1,210 | py | Python | backend/apps/ml/mlregistry.py | lstasiak/ml-django-app | 23547c7eaa3ef6a80ae9b39f2f84430c4e56280d | [
"MIT"
] | null | null | null | backend/apps/ml/mlregistry.py | lstasiak/ml-django-app | 23547c7eaa3ef6a80ae9b39f2f84430c4e56280d | [
"MIT"
] | null | null | null | backend/apps/ml/mlregistry.py | lstasiak/ml-django-app | 23547c7eaa3ef6a80ae9b39f2f84430c4e56280d | [
"MIT"
] | null | null | null | from apps.endpoints.models import MLAlgorithm, MLAlgorithmStatus, MLEndpoint
class MLRegistry:
def __init__(self):
self.endpoints = {}
def add_algorithm(self, endpoint_name, algorithm_object, algorithm_name,
algorithm_status, algorithm_version, owner,
algorithm... | 39.032258 | 87 | 0.590083 |
639bdec733fdd5ffae9fdc5d99e7aa2f2262fe3e | 4,508 | py | Python | benchmark/startQiskit_noisy3262.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3262.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3262.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=52
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 35.21875 | 140 | 0.654836 |
549b2b2337cbe9facb6193064e016a7529a64243 | 1,025 | py | Python | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-12.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-12.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | 1 | 2022-01-31T22:22:55.000Z | 2022-01-31T22:22:55.000Z | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-12.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null |
'''
Hardcoded string input
no filtering
sink: run ls in a dir
'''
'''
Created by Paul E. Black and William Mentzer 2020
This software was developed at the National Institute of Standards and Technology
by employees of the Federal Government in the course of their official duties.
Pursuant to title 17 Section 105 of t... | 21.808511 | 81 | 0.641951 |
a837d2dd9f3fbc5d084645335b25a0081f65fd62 | 147 | py | Python | audio_utils/recorder/__main__.py | pandafy/audio_utils | dc262de6a0d6289aef5f7f49c6bff4790045b040 | [
"MIT"
] | 1 | 2022-01-31T10:28:34.000Z | 2022-01-31T10:28:34.000Z | audio_utils/recorder/__main__.py | pandafy/audio_utils | dc262de6a0d6289aef5f7f49c6bff4790045b040 | [
"MIT"
] | null | null | null | audio_utils/recorder/__main__.py | pandafy/audio_utils | dc262de6a0d6289aef5f7f49c6bff4790045b040 | [
"MIT"
] | 1 | 2020-12-17T13:33:23.000Z | 2020-12-17T13:33:23.000Z | from audio_utils import recorder
recorder.KeyPressTriggeredRecorder().record("/home/vvasuki/sanskrit-coders/indic_text_to_speech/local/test.wav")
| 36.75 | 112 | 0.85034 |
14cf3f5ec4b925f4d4519bb6b3db78435a86cf83 | 4,255 | py | Python | src/movie_menu.py | jerichooconnell/lcse_tools | 6ef12584d0b544adebe057e47e1a78382b522042 | [
"Apache-2.0"
] | null | null | null | src/movie_menu.py | jerichooconnell/lcse_tools | 6ef12584d0b544adebe057e47e1a78382b522042 | [
"Apache-2.0"
] | null | null | null | src/movie_menu.py | jerichooconnell/lcse_tools | 6ef12584d0b544adebe057e47e1a78382b522042 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
A simple pygtk dialog box application for launching the 3-panel movie player on the Power Wall
"""
import pygtk
pygtk.require('2.0')
import gtk
from subprocess import call
# Init our movie data
path_1 = "/home/user/converted-movies"
path_2 = "/mnt/scratch/low-z/1536/movies/new"
font_size ... | 46.25 | 213 | 0.674501 |
aabbeecaea08eb356b965e43972c5988d5bc01f3 | 32,797 | py | Python | python/ccxt/bibox.py | longniao/ccxt | 3af5494bd16865f9e141f902adbd1deba7a3135e | [
"MIT"
] | 1 | 2021-03-01T17:45:33.000Z | 2021-03-01T17:45:33.000Z | python/ccxt/bibox.py | longniao/ccxt | 3af5494bd16865f9e141f902adbd1deba7a3135e | [
"MIT"
] | 4 | 2020-09-06T22:46:57.000Z | 2021-05-10T08:35:02.000Z | python/ccxt/bibox.py | longniao/ccxt | 3af5494bd16865f9e141f902adbd1deba7a3135e | [
"MIT"
] | 1 | 2019-11-08T12:36:13.000Z | 2019-11-08T12:36:13.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
# -----------------------------------------------------------------------------
try:
basestri... | 37.871824 | 262 | 0.492637 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.