hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a26823d702ba75dc63a6b31cbaeac1cefb349c3 | 686 | py | Python | django_jwt/middleware.py | Casassarnau/django-jwt-oidc | 0c047c060ff08736b56f408432fbff9ad5799ad3 | [
"MIT"
] | 5 | 2022-02-21T10:19:19.000Z | 2022-03-29T19:05:44.000Z | django_jwt/middleware.py | Casassarnau/django-jwt-oidc | 0c047c060ff08736b56f408432fbff9ad5799ad3 | [
"MIT"
] | null | null | null | django_jwt/middleware.py | Casassarnau/django-jwt-oidc | 0c047c060ff08736b56f408432fbff9ad5799ad3 | [
"MIT"
] | 1 | 2022-03-27T08:39:47.000Z | 2022-03-27T08:39:47.000Z | from django.contrib.auth.models import AnonymousUser
from django.utils.deprecation import MiddlewareMixin
from django_jwt.auth import JWTAuthentication
from django_jwt.settings_utils import get_setting
class JWTAuthenticationMiddleware(MiddlewareMixin):
def process_request(self, request):
key = ... | 38.111111 | 117 | 0.706997 |
4a2682eab7b26af7111abc106b4714b0ca4d3f7b | 1,099 | py | Python | backend/views.py | jbwashington/F1n35-Server | e2da179bce74b006f1b495077c4188a61a5f1f64 | [
"Apache-2.0"
] | null | null | null | backend/views.py | jbwashington/F1n35-Server | e2da179bce74b006f1b495077c4188a61a5f1f64 | [
"Apache-2.0"
] | 11 | 2020-09-04T10:13:29.000Z | 2022-03-08T22:09:25.000Z | backend/views.py | jbwashington/F1n35-Server | e2da179bce74b006f1b495077c4188a61a5f1f64 | [
"Apache-2.0"
] | null | null | null | from flask import request, jsonify, Blueprint
from flask_login import login_required, login_user, current_user, logout_user
from models import User
bp = Blueprint('blueprint', __name__, template_folder='templates')
@bp.route("/", methods=["GET"])
def index():
return jsonify(message="Hello World!"), 200
@bp.rout... | 27.475 | 77 | 0.698817 |
4a268340053a1ddb86db483e978b359c47ca3eb6 | 640 | py | Python | setup.py | PatrickAlphaC/cryptocompare | d94b9bc17d69f6460dbe95b94dbab5c1d2fefc15 | [
"MIT"
] | null | null | null | setup.py | PatrickAlphaC/cryptocompare | d94b9bc17d69f6460dbe95b94dbab5c1d2fefc15 | [
"MIT"
] | null | null | null | setup.py | PatrickAlphaC/cryptocompare | d94b9bc17d69f6460dbe95b94dbab5c1d2fefc15 | [
"MIT"
] | null | null | null | from setuptools import setup
with open('README.md', encoding="utf-8") as f:
readme = f.read()
setup(
name='cryptocompare',
version='0.7.3',
description='Wrapper for CryptoCompare.com',
long_description=readme,
long_description_content_type='text/markdown',
url='https://github.com/lagerfeue... | 29.090909 | 59 | 0.695313 |
4a26843a2369c6d6443513e2c909facba9c54943 | 816 | py | Python | ProjectApplication/evaluation/migrations/0011_adds_decision_letter.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-07-29T10:00:11.000Z | 2022-02-19T11:00:34.000Z | ProjectApplication/evaluation/migrations/0011_adds_decision_letter.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 471 | 2019-09-20T14:37:28.000Z | 2022-03-25T14:16:34.000Z | ProjectApplication/evaluation/migrations/0011_adds_decision_letter.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-03-15T12:42:47.000Z | 2022-02-15T18:06:52.000Z | # Generated by Django 3.0.3 on 2020-03-05 09:05
from django.db import migrations, models
import evaluation.models
import storages.backends.s3boto3
class Migration(migrations.Migration):
dependencies = [
('evaluation', '0010_file_name_processed_on_save'),
]
operations = [
migrations.AddF... | 31.384615 | 185 | 0.682598 |
4a26844a23da6f7c906ea767fe60f0f6b85a2a89 | 4,021 | py | Python | labs/lab06/data.py | abalone88/cs61a_2018sp | 59d408d0961cf71faf10b77779bfc71c0c508f0c | [
"MIT"
] | 2 | 2021-06-05T20:36:20.000Z | 2021-06-05T20:44:26.000Z | labs/lab06/data.py | abalone88/cs61a_2018sp | 59d408d0961cf71faf10b77779bfc71c0c508f0c | [
"MIT"
] | null | null | null | labs/lab06/data.py | abalone88/cs61a_2018sp | 59d408d0961cf71faf10b77779bfc71c0c508f0c | [
"MIT"
] | null | null | null | # CS 61A World Game Data:
from classes import *
# Characters:
james = Character('James',
'I saw Gibbes near Soda with a smoothie. You can probably find him there.')
gibbes = Character('Gibbes',
"This smoothie is so disappointing! "
"I wish someone would bring me a n... | 40.21 | 93 | 0.616513 |
4a2684d52340d5170ad16aa921c8659376a0be7f | 5,399 | py | Python | manim/utils/bezier.py | elletech/practice_manim | 83671e9e801490ce84100da3a684e369860fda37 | [
"MIT"
] | 1 | 2021-05-06T13:05:01.000Z | 2021-05-06T13:05:01.000Z | manim/utils/bezier.py | elletech/practice_manim | 83671e9e801490ce84100da3a684e369860fda37 | [
"MIT"
] | null | null | null | manim/utils/bezier.py | elletech/practice_manim | 83671e9e801490ce84100da3a684e369860fda37 | [
"MIT"
] | null | null | null | """Utility functions related to Bézier curves."""
__all__ = [
"bezier",
"partial_bezier_points",
"interpolate",
"integer_interpolate",
"mid",
"inverse_interpolate",
"match_interpolate",
"get_smooth_handle_points",
"diag_to_matrix",
"is_closed",
]
import typing
import numpy as... | 29.664835 | 88 | 0.614558 |
4a2685902fbeb59f0f379729b052e1a767eb4e52 | 12,107 | py | Python | examples/mpc_cifar/mpc_cifar.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 2 | 2020-03-23T18:32:13.000Z | 2020-12-11T10:54:08.000Z | examples/mpc_cifar/mpc_cifar.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 10 | 2021-02-03T16:45:53.000Z | 2021-04-07T16:24:17.000Z | examples/mpc_cifar/mpc_cifar.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 2 | 2020-04-15T19:28:02.000Z | 2020-04-16T01:59:30.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import random
import shutil
import tempfile
import time
import crypten
import crypten.commun... | 31.944591 | 88 | 0.57124 |
4a26861c83bd93dbc803e187e68b4a9b49810759 | 2,604 | py | Python | youtuatools/extractor/lemonde.py | Pagasis/YouTua | edb44b2065a7224f8b26aaf76166bf7287901567 | [
"MIT"
] | 47 | 2021-01-02T07:44:50.000Z | 2022-02-28T22:02:13.000Z | nextdl/extractor/lemonde.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 4 | 2021-02-07T03:35:13.000Z | 2021-10-31T19:23:53.000Z | nextdl/extractor/lemonde.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 8 | 2021-01-03T05:44:39.000Z | 2021-11-01T05:46:32.000Z | from __future__ import unicode_literals
from .common import InfoExtractor
class LemondeIE(InfoExtractor):
_VALID_URL = r"https?://(?:.+?\.)?lemonde\.fr/(?:[^/]+/)*(?P<id>[^/]+)\.html"
_TESTS = [
{
"url": "http://www.lemonde.fr/police-justice/video/2016/01/19/comprendre-l-affaire-bygmalion... | 37.2 | 163 | 0.517281 |
4a2686d96e5332d268201d0bad2ac481f79f2572 | 751 | py | Python | 02_challenge/02_challenge.py | anithagd30/wtfiswronghere | c2ebccd2fe8bb6df7e78bf9d9d81c1944e45c91b | [
"MIT"
] | null | null | null | 02_challenge/02_challenge.py | anithagd30/wtfiswronghere | c2ebccd2fe8bb6df7e78bf9d9d81c1944e45c91b | [
"MIT"
] | null | null | null | 02_challenge/02_challenge.py | anithagd30/wtfiswronghere | c2ebccd2fe8bb6df7e78bf9d9d81c1944e45c91b | [
"MIT"
] | null | null | null | """
We will use this script to teach Python to absolute beginners
The script is an example of Fizz-Buzz implemented in Python
The FizzBuzz problem:
For all integers between 1 and 99 (include both):
# print fizz for multiples of 3
# print buzz for multiples of 5
# print fizzbuzz for multiples of 3 and 5"
... | 27.814815 | 61 | 0.629827 |
4a268830078ee05db245f6d9d5b517507415e48a | 4,091 | py | Python | python/example_code/s3/s3_versioning/remove_delete_marker.py | Pahtoe/aws-doc-sdk-examples | 1534e600cc1bbbf4d9da95cd5df6730e7473edf4 | [
"Apache-2.0"
] | 1 | 2020-08-27T16:54:38.000Z | 2020-08-27T16:54:38.000Z | python/example_code/s3/s3_versioning/remove_delete_marker.py | hloo/aws-doc-sdk-examples | 7ad6a0c079bda6a221c3bbd608cda237d4122bd7 | [
"Apache-2.0"
] | null | null | null | python/example_code/s3/s3_versioning/remove_delete_marker.py | hloo/aws-doc-sdk-examples | 7ad6a0c079bda6a221c3bbd608cda237d4122bd7 | [
"Apache-2.0"
] | null | null | null | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
An AWS Lambda handler that receives an Amazon S3 batch event. The handler unpacks the
event and removes the specified delete marker from the bucket.
"""
# snippet-start:[s3.python.lambda.remove_delete_marker... | 38.961905 | 88 | 0.594231 |
4a26895a31ec0e1182be3cd2b895cfbcb5d30aec | 230 | py | Python | cli/commands/cmd_stopall.py | Pythonian/catwatch | 25730faa9d8ec6564b075de78bbbf4ff125ada97 | [
"MIT"
] | null | null | null | cli/commands/cmd_stopall.py | Pythonian/catwatch | 25730faa9d8ec6564b075de78bbbf4ff125ada97 | [
"MIT"
] | null | null | null | cli/commands/cmd_stopall.py | Pythonian/catwatch | 25730faa9d8ec6564b075de78bbbf4ff125ada97 | [
"MIT"
] | 2 | 2018-08-04T16:46:55.000Z | 2019-07-02T19:30:24.000Z | import subprocess
import click
@click.command()
def cli():
"""
Stop all services.
:return: Subprocess call result
"""
cmd = 'pkill honcho && docker-compose stop'
return subprocess.call(cmd, shell=True)
| 15.333333 | 47 | 0.647826 |
4a268c538c826eedfe7dd2d9c131594353ea2811 | 947 | py | Python | Ser_1/Code/seir1ask8d.py | AlexandrosKyriakakis/ElectromagneticFieldsB | c7d9cf077a7f6235d1ba27e62dd306d515fa38de | [
"MIT"
] | 2 | 2021-02-22T11:20:03.000Z | 2022-03-24T09:12:03.000Z | Ser_1/Code/seir1ask8d.py | AlexandrosKyriakakis/ElectromagneticFieldsB | c7d9cf077a7f6235d1ba27e62dd306d515fa38de | [
"MIT"
] | null | null | null | Ser_1/Code/seir1ask8d.py | AlexandrosKyriakakis/ElectromagneticFieldsB | c7d9cf077a7f6235d1ba27e62dd306d515fa38de | [
"MIT"
] | null | null | null | import scipy as sp
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from scipy import integrate
from mpl_toolkits import mplot3d
def f(x, y):
e0 = 8.854 * (10**(-12))
def Sx(TH): return (2*e0) / \
(((x + 1 - 0.1*np.cos(TH))**2 + 1 + 0.01*(np.sin(TH))**2)**1.5)
sx, error1 = int... | 21.044444 | 71 | 0.57339 |
4a268ce86fc34d9cfb693959f72998a8d81096bd | 1,017 | py | Python | homzhub_customization/homzhub_customization/doctype/customer_dashboard.py | HPL-ERP/homzhub_customization | 311364116aa61fc00b263c78ffbb6d3946cff154 | [
"MIT"
] | null | null | null | homzhub_customization/homzhub_customization/doctype/customer_dashboard.py | HPL-ERP/homzhub_customization | 311364116aa61fc00b263c78ffbb6d3946cff154 | [
"MIT"
] | null | null | null | homzhub_customization/homzhub_customization/doctype/customer_dashboard.py | HPL-ERP/homzhub_customization | 311364116aa61fc00b263c78ffbb6d3946cff154 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from frappe import _
def get_data(data):
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Customer. See timeline below for details'),
'fieldname': 'customer',
'non_standard_fieldnames': {
'Payment Entry': 'party',
'Quota... | 19.941176 | 110 | 0.561455 |
4a268d237840418126dfde839970ccb927debe2f | 7,101 | py | Python | object_detector_app/object_detection/core/matcher_test.py | robotanica/moveo_ros | 12d9e81dd393f3b540e6b9f771ce332a73c86472 | [
"MIT"
] | null | null | null | object_detector_app/object_detection/core/matcher_test.py | robotanica/moveo_ros | 12d9e81dd393f3b540e6b9f771ce332a73c86472 | [
"MIT"
] | null | null | null | object_detector_app/object_detection/core/matcher_test.py | robotanica/moveo_ros | 12d9e81dd393f3b540e6b9f771ce332a73c86472 | [
"MIT"
] | 1 | 2022-03-28T21:28:41.000Z | 2022-03-28T21:28:41.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 47.02649 | 80 | 0.740177 |
4a268d682215360adb8929a5d03c09de15434064 | 3,984 | py | Python | kubernetes_asyncio/client/models/v1_node_selector.py | weltonrodrigo/kubernetes_asyncio | b793f3e9ea43cbd0f4ff40ace1b0b677682f4042 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_node_selector.py | weltonrodrigo/kubernetes_asyncio | b793f3e9ea43cbd0f4ff40ace1b0b677682f4042 | [
"Apache-2.0"
] | 13 | 2021-04-12T02:03:48.000Z | 2022-03-28T02:08:46.000Z | kubernetes_asyncio/client/models/v1_node_selector.py | weltonrodrigo/kubernetes_asyncio | b793f3e9ea43cbd0f4ff40ace1b0b677682f4042 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.16.14
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
f... | 32.129032 | 124 | 0.61998 |
4a268db0274b1afe5c56016133b5c54b85c18283 | 6,353 | py | Python | python/GafferAppleseedUI/AppleseedAttributesUI.py | danieldresser-ie/gaffer | 78c22487156a5800fcca49a24f52451a8ac0c559 | [
"BSD-3-Clause"
] | null | null | null | python/GafferAppleseedUI/AppleseedAttributesUI.py | danieldresser-ie/gaffer | 78c22487156a5800fcca49a24f52451a8ac0c559 | [
"BSD-3-Clause"
] | null | null | null | python/GafferAppleseedUI/AppleseedAttributesUI.py | danieldresser-ie/gaffer | 78c22487156a5800fcca49a24f52451a8ac0c559 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2014, Esteban Tovagliari. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribution... | 23.271062 | 87 | 0.651661 |
4a268dbf84d78fc55f4701f0d00c478dbf8015b9 | 7,289 | py | Python | FigureTable/RadioROC/roc_pr.py | vkola-lab/multi-task | 6a61db4223e1812744f13028747b07e2f840cc0b | [
"MIT"
] | null | null | null | FigureTable/RadioROC/roc_pr.py | vkola-lab/multi-task | 6a61db4223e1812744f13028747b07e2f840cc0b | [
"MIT"
] | null | null | null | FigureTable/RadioROC/roc_pr.py | vkola-lab/multi-task | 6a61db4223e1812744f13028747b07e2f840cc0b | [
"MIT"
] | null | null | null | import os, sys
currentdir = os.path.dirname(os.path.realpath(__file__))
parentdir = os.path.dirname(currentdir)
parentdir = os.path.dirname(parentdir)
print(parentdir)
sys.path.append(parentdir)
from performance_eval import *
import csv
from collections import defaultdict
# get diagnoses from radiologists' rating form... | 40.494444 | 109 | 0.601317 |
4a268dde4d774af7768c59b276cd88e211f8cdec | 453 | py | Python | data/scripts/templates/object/static/structure/naboo/shared_gungan_shield_s01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/static/structure/naboo/shared_gungan_shield_s01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/static/structure/naboo/shared_gungan_shield_s01.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 = Static()
result.template = "object/static/structure/naboo/shared_gungan_shield_s01.iff"
result.attribute_template... | 26.647059 | 79 | 0.728477 |
4a268e230d27c3ddf3c6f06ef2d0c066763505d9 | 257 | py | Python | python/tests/config/sparse_nogold.py | CitizenScienceInAstronomyWorkshop/pyIBCC | 35215648f3361689e374780182f39182eddda64f | [
"MIT"
] | 11 | 2015-01-05T14:03:00.000Z | 2020-05-31T07:22:20.000Z | python/tests/config/sparse_nogold.py | edwinrobots/pyIBCC | 9a51a21638b1e22260a3386862725926addb46c3 | [
"MIT"
] | 5 | 2015-03-10T18:24:24.000Z | 2018-04-03T12:52:40.000Z | python/tests/config/sparse_nogold.py | CitizenScienceInAstronomyWorkshop/pyIBCC | 35215648f3361689e374780182f39182eddda64f | [
"MIT"
] | 7 | 2015-03-16T11:35:08.000Z | 2018-04-24T05:45:51.000Z | import numpy as np
scores = np.array([0,1])
nScores = len(scores)
nClasses = 2
inputFile = "./data/crowdlabels_sparse_mixed.csv"
outputFile = "./data/test.out"
confMatFile = "./data/test_ibcc.mat"
nu0 = np.array([50,50])
alpha0 = np.array([[2, 1], [1, 2]])
| 25.7 | 49 | 0.677043 |
4a268e4d8f5ff36d46432fb4209de18e0dc881cd | 993 | py | Python | grid_search.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | null | null | null | grid_search.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | null | null | null | grid_search.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | null | null | null | import itertools
import matplotlib.pyplot as plt
import numpy as np
plt.figure()
title = "test"
classes = ['2nd Last FC', 'Last FC', '', '', ''] # VGG
classes_2 = ['1-layer LSTM(512)', '1-layer LSTM(3000)', '2-layer LSTM(1024-1024)', '2-layer LSTM(3000-1024)',
'2-layer LSTM(5000-1024)'] # LSTM
cmap = p... | 31.03125 | 109 | 0.660624 |
4a268e96b365ba018064f0627c0d8e79d1f7ddf5 | 9,507 | py | Python | cosmosis/runtime/parameter.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | cosmosis/runtime/parameter.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | cosmosis/runtime/parameter.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | #coding: utf-8
u"""Definition of the :class:`Parameter` class."""
from __future__ import absolute_import
from builtins import object
import random
from . import config
from . import prior as priors # to avoid breaking other stuff below
import numpy as np
class Parameter(object):
u"""Distribution meta-data for... | 33.125436 | 126 | 0.585358 |
4a268ee6de45c8bb94a82cd154a030be9032abbe | 2,221 | py | Python | benchmark/startPyquil1163.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1163.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil1163.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=52
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 24.955056 | 64 | 0.541648 |
4a268f383c62cc15e8aa82f261f3ee6a50c8e949 | 1,424 | py | Python | datasets/fairface/download_fairface.py | oxai/debias-vision-lang | 15ff8a00c964fbd03543b77d98ea8d61438e2840 | [
"MIT"
] | 5 | 2022-03-23T02:34:28.000Z | 2022-03-29T06:06:19.000Z | datasets/fairface/download_fairface.py | oxai/debias-vision-lang | 15ff8a00c964fbd03543b77d98ea8d61438e2840 | [
"MIT"
] | null | null | null | datasets/fairface/download_fairface.py | oxai/debias-vision-lang | 15ff8a00c964fbd03543b77d98ea8d61438e2840 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import os
from gdown import download
import subprocess
BASE_PATH = os.path.abspath("")
OUTDATA_PATH = os.path.join(BASE_PATH, "data")
fairface_parts = {
"imgs": {
"train_val": (
"https://drive.google.com/uc?id=1g7qNOZz9wC7OfOhcPqH1EZ5bk1UFGmlL",
"train_val_... | 33.116279 | 79 | 0.622893 |
4a268f4f2876440b5d01522bd80e44f01536ffad | 64,529 | py | Python | ape/intcoords/nifty.py | shihchengli/APE | c2f529b9e20959824317dbc3c018ce41702d67f6 | [
"MIT"
] | 3 | 2020-04-13T02:26:34.000Z | 2022-01-04T12:02:08.000Z | ape/intcoords/nifty.py | shihchengli/APE | c2f529b9e20959824317dbc3c018ce41702d67f6 | [
"MIT"
] | 1 | 2021-08-06T11:05:51.000Z | 2021-08-06T11:05:51.000Z | ape/intcoords/nifty.py | shihchengli/APE | c2f529b9e20959824317dbc3c018ce41702d67f6 | [
"MIT"
] | 1 | 2021-08-03T08:28:25.000Z | 2021-08-03T08:28:25.000Z |
"""@package geometric.nifty Nifty functions, originally intended to be imported by any module within ForceBalance.
This file was copied over from ForceBalance to geomeTRIC in order to lighten the dependencies of the latter.
Table of Contents:
- I/O formatting
- Math: Variable manipulation, linear algebra, least squa... | 41.179962 | 231 | 0.58913 |
4a26907a7754589ecf0e67a972eb0efe1642b928 | 27,833 | py | Python | hikari/impl/rest_bot.py | Lunarmagpie/hikari | 3f4fed67f76c655845d379066f9d192e7dffd0b0 | [
"MIT"
] | null | null | null | hikari/impl/rest_bot.py | Lunarmagpie/hikari | 3f4fed67f76c655845d379066f9d192e7dffd0b0 | [
"MIT"
] | null | null | null | hikari/impl/rest_bot.py | Lunarmagpie/hikari | 3f4fed67f76c655845d379066f9d192e7dffd0b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2020 Nekokatt
# Copyright (c) 2021-present davfsa
#
# 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, inc... | 43.625392 | 120 | 0.666691 |
4a26915a87fc459359ca81467847e4f5c79a0a2a | 9,115 | py | Python | standard_wallet/wallet_runnable.py | freddiecoleman/wallets | 20c815b404f3c136d4c6d64d5033c017a830e5d9 | [
"Apache-2.0"
] | 1 | 2022-01-27T09:26:48.000Z | 2022-01-27T09:26:48.000Z | standard_wallet/wallet_runnable.py | freddiecoleman/wallets | 20c815b404f3c136d4c6d64d5033c017a830e5d9 | [
"Apache-2.0"
] | 1 | 2021-09-05T01:50:18.000Z | 2021-09-05T01:50:18.000Z | standard_wallet/wallet_runnable.py | freddiecoleman/wallets | 20c815b404f3c136d4c6d64d5033c017a830e5d9 | [
"Apache-2.0"
] | 1 | 2021-09-05T02:02:00.000Z | 2021-09-05T02:02:00.000Z | import asyncio
from utilities.decorations import print_leaf, divider, prompt, start_list, close_list, selectable, informative
from utilities.puzzle_utilities import puzzlehash_from_string
from chiasim.hashable import Coin, Header, HeaderHash
from chiasim.clients.ledger_sim import connect_to_ledger_sim
from chiasim.wall... | 37.204082 | 113 | 0.664838 |
4a26915c297b09d17cccb4bf14f3fb45bf1bc5e4 | 9,968 | py | Python | conftest.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2021-04-08T07:04:55.000Z | 2021-05-14T04:20:33.000Z | conftest.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | 16 | 2021-04-13T18:04:38.000Z | 2021-04-13T18:05:07.000Z | conftest.py | s4-2/scancode-toolkit | 8931b42e2630b94d0cabc834dfb3c16f01f82321 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright (c) nexB Inc. and others http://www.nexb.com/. 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... | 32.2589 | 135 | 0.616974 |
4a269183a0000e0ada1b599f177518c4fa2f578d | 190 | py | Python | src/stk/__init__.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | src/stk/__init__.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | src/stk/__init__.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | from .databases import * # noqa
from .ea import * # noqa
from .molecular import * # noqa
from .serialization import * # noqa
from .utilities import * # noqa
__version__ = '2022.5.2.1'
| 23.75 | 36 | 0.684211 |
4a26926b03c2e05fa1daf6399b54e504d8427c64 | 7,372 | py | Python | experiments/ashvin/corl2019/offpolicy/dcvae3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/dcvae3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/dcvae3.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | import railrl.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from railrl.launchers.launcher_util import run_experimen... | 38.196891 | 181 | 0.591291 |
4a269394698f07ce658ede47e579502e273e263a | 608 | py | Python | src/python/assign_unmapped_pos.py | mozack/test | 39e6297e578d0407fd687958c32cadc2dfc5845d | [
"MIT"
] | 77 | 2016-10-24T15:46:24.000Z | 2022-03-22T11:37:56.000Z | src/python/assign_unmapped_pos.py | mozack/test | 39e6297e578d0407fd687958c32cadc2dfc5845d | [
"MIT"
] | 47 | 2017-01-31T19:18:51.000Z | 2022-03-29T09:26:25.000Z | src/python/assign_unmapped_pos.py | mozack/test | 39e6297e578d0407fd687958c32cadc2dfc5845d | [
"MIT"
] | 9 | 2017-10-03T23:31:39.000Z | 2021-04-09T09:40:07.000Z | import sys
for line in sys.stdin:
line = line.rstrip()
if line.startswith('@'):
print line
else:
fields = line.split()
flag = int(fields[1])
# 4 = read unmapped. 8 = mate unmapped
if flag & 0xC == 4 and fields[2] == '*':
# This read is unmapped and mate is mapped
chrom = fields[6]
pos = fields[7... | 23.384615 | 45 | 0.600329 |
4a269504071bd64042c9dab2eb226277a23dd837 | 197 | py | Python | Numpy/Sum_and_Prod.py | idarlenearaujo/HackerRank_Python | 3fc4d0baf37fe321737f1e1ae9320d67e5ee984a | [
"MIT"
] | null | null | null | Numpy/Sum_and_Prod.py | idarlenearaujo/HackerRank_Python | 3fc4d0baf37fe321737f1e1ae9320d67e5ee984a | [
"MIT"
] | null | null | null | Numpy/Sum_and_Prod.py | idarlenearaujo/HackerRank_Python | 3fc4d0baf37fe321737f1e1ae9320d67e5ee984a | [
"MIT"
] | null | null | null | import numpy as np
N, M = map(int, input().split())
# array A
arrayA = np.array([list(map(int, input().split())) for i in range(N)])
# sum sob eixo 0
# prod
print(np.prod(np.sum(arrayA, axis=0)))
| 21.888889 | 70 | 0.639594 |
4a2695b00752b2555132503b4d536ab399172763 | 19,044 | py | Python | helm/dagster/schema/schema_tests/test_instance.py | camvogel/dagster | b4df94bf34906e7f81c973a7fdad5429ae3697ba | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/schema_tests/test_instance.py | camvogel/dagster | b4df94bf34906e7f81c973a7fdad5429ae3697ba | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/schema_tests/test_instance.py | camvogel/dagster | b4df94bf34906e7f81c973a7fdad5429ae3697ba | [
"Apache-2.0"
] | 1 | 2021-12-08T18:13:19.000Z | 2021-12-08T18:13:19.000Z | import pytest
import yaml
from dagster.core.run_coordinator import QueuedRunCoordinator
from dagster_aws.s3.compute_log_manager import S3ComputeLogManager
from dagster_azure.blob.compute_log_manager import AzureBlobComputeLogManager
from dagster_gcp.gcs.compute_log_manager import GCSComputeLogManager
from kubernetes.cl... | 37.122807 | 100 | 0.678481 |
4a26961989d72c1b67a1f0991bbb8f4a7e7d0a14 | 125 | py | Python | tools/pdffer.py | BjornFJohansson/TravisSlideProcessor | 8af3531cf5b798000974d65c1d7fa4b5e8ec6a6d | [
"BSD-3-Clause"
] | 1 | 2018-05-09T15:11:46.000Z | 2018-05-09T15:11:46.000Z | tools/pdffer.py | BjornFJohansson/TravisSlideProcessor | 8af3531cf5b798000974d65c1d7fa4b5e8ec6a6d | [
"BSD-3-Clause"
] | 2 | 2017-09-25T06:36:48.000Z | 2017-09-25T09:54:17.000Z | tools/pdffer.py | BjornFJohansson/AutoSlideProcessor | 8af3531cf5b798000974d65c1d7fa4b5e8ec6a6d | [
"BSD-3-Clause"
] | null | null | null | from nbconvert import PDFExporter
exporter = PDFExporter()
output, resources = exporter.from_filename('betacarotene.ipynb') | 25 | 64 | 0.816 |
4a26970a24c5a1771426ef27aedb47fee5bf3380 | 3,064 | py | Python | lib/tool_shed/tool_shed_registry.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | 1 | 2020-09-02T23:26:12.000Z | 2020-09-02T23:26:12.000Z | lib/tool_shed/tool_shed_registry.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | null | null | null | lib/tool_shed/tool_shed_registry.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | 1 | 2016-06-14T13:21:13.000Z | 2016-06-14T13:21:13.000Z | import logging
import xml.etree.ElementTree
from collections import OrderedDict
from six.moves.urllib import request as urlrequest
from tool_shed.util import common_util, xml_util
log = logging.getLogger(__name__)
DEFAULT_TOOL_SHEDS_CONF_XML = """<?xml version="1.0"?>
<tool_sheds>
<tool_shed name="Galaxy Main T... | 42.555556 | 119 | 0.638708 |
4a2697ec70cc717240744fd758faeea80a81639f | 49 | py | Python | tools/deepke/name_entity_re/standard/tools/__init__.py | dfface/DoctorKG | 6bd6ebec8244a9ce0a2c8c278a704f02b9afaaf8 | [
"MIT"
] | 1 | 2022-03-26T16:08:08.000Z | 2022-03-26T16:08:08.000Z | tools/deepke/name_entity_re/standard/tools/__init__.py | dfface/DoctorKG | 6bd6ebec8244a9ce0a2c8c278a704f02b9afaaf8 | [
"MIT"
] | null | null | null | tools/deepke/name_entity_re/standard/tools/__init__.py | dfface/DoctorKG | 6bd6ebec8244a9ce0a2c8c278a704f02b9afaaf8 | [
"MIT"
] | null | null | null | from .dataset import *
from .preprocess import * | 24.5 | 25 | 0.755102 |
4a269829b489f4701fa8fe0c58344ec701026f58 | 8,816 | py | Python | Scripts/ORF_CNN_141.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | 1 | 2021-08-16T14:49:04.000Z | 2021-08-16T14:49:04.000Z | Scripts/ORF_CNN_141.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | null | null | null | Scripts/ORF_CNN_141.py | ShepherdCode/Soars2021 | ab4f304eaa09e52d260152397a6c53d7a05457da | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # ORF recognition by CNN
#
# Use variable number of bases between START and STOP. Thus, ncRNA will have its STOP out-of-frame or too close to the START, and pcRNA will have its STOP in-frame and far from the START.
# In[109]:
import time
t = time.time()
time.strftime('%Y-%m... | 31.598566 | 187 | 0.694986 |
4a2698723e98668fdf4fcbb359f73176359503fe | 242 | py | Python | Tratamento de erros/adicao.py | g7jpedro/Python_exer | 9efbe179599eba4cdb39c9525fd850565d16f5fd | [
"MIT"
] | null | null | null | Tratamento de erros/adicao.py | g7jpedro/Python_exer | 9efbe179599eba4cdb39c9525fd850565d16f5fd | [
"MIT"
] | null | null | null | Tratamento de erros/adicao.py | g7jpedro/Python_exer | 9efbe179599eba4cdb39c9525fd850565d16f5fd | [
"MIT"
] | null | null | null |
n1 = input('Digite o primeiro valor: ')
n2 = input('Digite o segundo valor: ')
try:
somar = float(n1) + float(n2)
except ValueError:
print('ERRO ! Informe um tipo certo de dado.')
else:
print(f'A soma de {n1} + {n2} = {somar}') | 22 | 50 | 0.619835 |
4a26987c3f6748024d30258df2d6ac83da0d2b5b | 1,635 | py | Python | tests/integration_test.py | alexismhill3/pinetree | 45a1c2eae4cb3677b26794b9f1dc8a304e237550 | [
"MIT"
] | 6 | 2020-07-20T21:35:07.000Z | 2021-06-22T06:51:03.000Z | tests/integration_test.py | alexismhill3/pinetree | 45a1c2eae4cb3677b26794b9f1dc8a304e237550 | [
"MIT"
] | 12 | 2019-09-09T16:31:29.000Z | 2021-09-15T18:10:01.000Z | tests/integration_test.py | alexismhill3/pinetree | 45a1c2eae4cb3677b26794b9f1dc8a304e237550 | [
"MIT"
] | 4 | 2017-09-08T03:21:49.000Z | 2019-08-27T21:12:04.000Z | # Test simulation
import unittest
import subprocess
import tempfile
import importlib
class MainTest(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.TemporaryDirectory()
def tearDown(self):
self.tempdir.cleanup()
def run_test(self, prefix):
test_mod = importlib.impor... | 26.370968 | 72 | 0.653823 |
4a2698c0fbf1e8a4bc710064957ebae6fcc13e11 | 31 | py | Python | 3-Python-Advanced (May 2021)/modules/lab/triangle/__init__.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 3-Python-Advanced (May 2021)/modules/lab/triangle/__init__.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 3-Python-Advanced (May 2021)/modules/lab/triangle/__init__.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | from .draw import draw_triangle | 31 | 31 | 0.870968 |
4a2699061be5cdcf43d6bb3a9e5bc9aa6ca59122 | 6,026 | py | Python | DankMemes/commandHandler.py | Kritner/DankMemeBot | 32120951baf3a63c2e1d6793b180d4a49228e6be | [
"MIT"
] | null | null | null | DankMemes/commandHandler.py | Kritner/DankMemeBot | 32120951baf3a63c2e1d6793b180d4a49228e6be | [
"MIT"
] | 9 | 2018-04-04T17:37:32.000Z | 2018-04-05T19:40:15.000Z | DankMemes/commandHandler.py | Kritner/DankMemeBot | 32120951baf3a63c2e1d6793b180d4a49228e6be | [
"MIT"
] | null | null | null | import random
from slackclient import SlackClient
class CommandHandler():
_memeMode = "sequential"
_memeModeToggleString = "memeMode"
_currentTargetForDankness = "michael"
_helpCommandString = "wat do"
_memes = [
{"trigger" : "rules",
"channel" : None,
"index" : 0,
... | 37.899371 | 133 | 0.565383 |
4a2699d343e6ce9904a1e79607d21af896c4c757 | 42,119 | py | Python | mmd_scripting/core/nuthouse01_core.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | 4 | 2020-03-02T00:27:24.000Z | 2020-05-29T15:23:50.000Z | mmd_scripting/core/nuthouse01_core.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | null | null | null | mmd_scripting/core/nuthouse01_core.py | Nuthouse01/VMD-to-text-Conversion-Tool | 0d9334bd5735accdd8bb6e1b69889fbe054a7481 | [
"MIT"
] | null | null | null | import math
import sys
import traceback
from os import path, listdir
from typing import Any, Tuple, List, Sequence, Callable, Iterable, TypeVar, Union
_SCRIPT_VERSION = "Script version: Nuthouse01 - v1.07.03 - 8/9/2021"
# This code is free to use and re-distribute, but I cannot be held responsible for damages that it... | 38.605866 | 130 | 0.661459 |
4a269a1abab64bcb3bf3a4375a0f5d06bd659b21 | 12,943 | py | Python | dipy/sims/tests/test_voxel.py | omarocegueda/dipy | 520b724041116a958892bee0068b057314a21cb2 | [
"MIT"
] | 2 | 2018-07-25T14:04:20.000Z | 2021-02-10T07:10:10.000Z | dipy/sims/tests/test_voxel.py | aarya22/dipy-reco1 | 9d20c911b4afe83e52ded698eff9ba0f0fafeca8 | [
"MIT"
] | null | null | null | dipy/sims/tests/test_voxel.py | aarya22/dipy-reco1 | 9d20c911b4afe83e52ded698eff9ba0f0fafeca8 | [
"MIT"
] | 2 | 2018-07-24T21:20:54.000Z | 2018-08-27T04:08:24.000Z | import numpy as np
from nose.tools import (assert_true, assert_false, assert_equal,
assert_almost_equal)
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_)
from dipy.sims.voxel import (_check_directions, SingleTensor, MultiTensor,
... | 40.701258 | 79 | 0.564166 |
4a269a5496e8a0689b293858ea9c4958c00d883a | 4,788 | py | Python | src/bintray_client.py | hmrc/bintray-backup-restore | 26b4744fcbd736fea8c318fe36ce2c11e80bce04 | [
"Apache-2.0"
] | 1 | 2021-01-28T11:10:53.000Z | 2021-01-28T11:10:53.000Z | src/bintray_client.py | hmrc/bintray-backup-restore | 26b4744fcbd736fea8c318fe36ce2c11e80bce04 | [
"Apache-2.0"
] | null | null | null | src/bintray_client.py | hmrc/bintray-backup-restore | 26b4744fcbd736fea8c318fe36ce2c11e80bce04 | [
"Apache-2.0"
] | 1 | 2021-04-10T23:38:50.000Z | 2021-04-10T23:38:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import os
import requests
from progress.bar import IncrementalBar
from tenacity import retry
PROGRESS_BAR_FORMAT = "%(percent).1f%% - remaining %(remaining)d - eta %(eta)ds"
def get_sha1_hash(path):
pathstr = str(path)
stream = os.popen(f"sha1sum {p... | 38 | 111 | 0.615706 |
4a269a563cb050c243c7e242ae673c279282d512 | 1,027 | py | Python | test/001/test.py | NSSAC/nssacPreCommitHook | ff27364687c8d89d2d1d8fbe982bf67d851e02fc | [
"Apache-2.0"
] | null | null | null | test/001/test.py | NSSAC/nssacPreCommitHook | ff27364687c8d89d2d1d8fbe982bf67d851e02fc | [
"Apache-2.0"
] | null | null | null | test/001/test.py | NSSAC/nssacPreCommitHook | ff27364687c8d89d2d1d8fbe982bf67d851e02fc | [
"Apache-2.0"
] | null | null | null | # BEGIN: Copyright
# Copyright (C) 2019 Rector and Visitors of the University of Virginia
# All rights reserved
# END: Copyright
# BEGIN: License
# 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 Li... | 38.037037 | 147 | 0.745862 |
4a269ba6571baf473a81fefc9a02ab122543edbd | 552 | py | Python | cli/src/commands/run_config.py | mikiec84/docsearch-scraper | 08aa90ee9bf91b3e5e3e0d383e4d1b4d284c56b8 | [
"MIT"
] | 1 | 2020-11-09T21:06:27.000Z | 2020-11-09T21:06:27.000Z | cli/src/commands/run_config.py | mikiec84/docsearch-scraper | 08aa90ee9bf91b3e5e3e0d383e4d1b4d284c56b8 | [
"MIT"
] | 4 | 2021-03-31T19:59:26.000Z | 2022-03-02T15:02:55.000Z | cli/src/commands/run_config.py | gaybro8777/docsearch-scraper | 08aa90ee9bf91b3e5e3e0d383e4d1b4d284c56b8 | [
"MIT"
] | null | null | null | from scraper.src.index import run_config
from .abstract_command import AbstractCommand
class RunConfig(AbstractCommand):
def get_name(self):
return 'run'
def get_description(self):
return 'Run a config'
def get_usage(self):
return super(RunConfig, self).get_usage() + " config"
... | 26.285714 | 79 | 0.67029 |
4a269bd22e26504b747eda8f1c55cc828051a84a | 1,421 | py | Python | bin/app_setup.py | openstacker/splunk_app_catalyst_cloud | 6d0302aa7bc6be2192a757abcbc350b25a506848 | [
"Apache-1.1"
] | null | null | null | bin/app_setup.py | openstacker/splunk_app_catalyst_cloud | 6d0302aa7bc6be2192a757abcbc350b25a506848 | [
"Apache-1.1"
] | null | null | null | bin/app_setup.py | openstacker/splunk_app_catalyst_cloud | 6d0302aa7bc6be2192a757abcbc350b25a506848 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017 Catalyst Cloud 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... | 33.046512 | 69 | 0.655876 |
4a269c5218af88fb30496502f1c1ecbd1872b258 | 783 | py | Python | src/terra/constants.py | eco-stake/staketaxcsv | 4d619b0304f8e58ad7940be50edeee4ccc05cd8a | [
"MIT"
] | 1 | 2022-02-05T05:37:08.000Z | 2022-02-05T05:37:08.000Z | src/terra/constants.py | eco-stake/staketaxcsv | 4d619b0304f8e58ad7940be50edeee4ccc05cd8a | [
"MIT"
] | null | null | null | src/terra/constants.py | eco-stake/staketaxcsv | 4d619b0304f8e58ad7940be50edeee4ccc05cd8a | [
"MIT"
] | 1 | 2022-02-05T05:37:11.000Z | 2022-02-05T05:37:11.000Z | MILLION = 1000000.0
CONTRACTS_LOTA = [
"terra1e7hzp3tnsswpfcu6gt4wlgfm20lcsqqywhaagu",
"terra14mevcmeqt0n4myggt7c56l5fl0xw2hwa2mhlg0", # register contract
"terra1342fp86c3z3q0lksq92lncjxpkfl9hujwh6xfn", # withdraw stake contract
"terra1ez46kxtulsdv07538fh5ra5xj8l68mu8eg24vr" # bond stake contract
]... | 25.258065 | 82 | 0.781609 |
4a269d60dd5c1f4e80fa8dc77b4dcfa9dcab3bdc | 2,794 | py | Python | P1/test.py | Rogerwlk/Information-Retrieval-Search-Engine | 7f7f0237106344cdaadbf87d769a281218fe711f | [
"MIT"
] | null | null | null | P1/test.py | Rogerwlk/Information-Retrieval-Search-Engine | 7f7f0237106344cdaadbf87d769a281218fe711f | [
"MIT"
] | null | null | null | P1/test.py | Rogerwlk/Information-Retrieval-Search-Engine | 7f7f0237106344cdaadbf87d769a281218fe711f | [
"MIT"
] | null | null | null | import re
p_date = re.compile(r"""\b
([0-9]{1,2}-[0-9]{1,2}-[0-9]{2,4})
|(((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[.]?
|January|February|March|April|May|June|July|August
|September|October|November|December)
\ [0-9]{1,2}(st|nd|rd|th)?,\ [0-9]{2,4})
\b""", re.VERBOSE)
p_num1 = re.compile(r',([0-9]{3})'... | 26.11215 | 116 | 0.557266 |
4a269dafdb0b91e2ee418b2070fcab4c3d821cf2 | 2,298 | py | Python | DefaultPythonSource/TA/TAPython/Python/ChameleonSketch/ChameleonSketch.py | cgerchenhp/TAPython_DefaultResources | 785175cbd93c4dd2185a64b7942d66fa8c2d8bea | [
"MIT"
] | null | null | null | DefaultPythonSource/TA/TAPython/Python/ChameleonSketch/ChameleonSketch.py | cgerchenhp/TAPython_DefaultResources | 785175cbd93c4dd2185a64b7942d66fa8c2d8bea | [
"MIT"
] | null | null | null | DefaultPythonSource/TA/TAPython/Python/ChameleonSketch/ChameleonSketch.py | cgerchenhp/TAPython_DefaultResources | 785175cbd93c4dd2185a64b7942d66fa8c2d8bea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import unreal
from Utilities.Utils import Singleton
import random
import os
class ChameleonSketch(metaclass=Singleton):
def __init__(self, jsonPath):
self.jsonPath = jsonPath
self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath)
self.ui_names ... | 38.3 | 126 | 0.630548 |
4a269de20030a9d51d68aabd92e11d40be2ef843 | 787 | py | Python | thyme/wallet/puzzles/p2_puzzle_hash.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 6 | 2021-06-30T13:03:47.000Z | 2021-07-10T12:46:37.000Z | thyme/wallet/puzzles/p2_puzzle_hash.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 8 | 2021-07-01T15:45:09.000Z | 2021-09-08T04:30:46.000Z | thyme/wallet/puzzles/p2_puzzle_hash.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 11 | 2021-07-03T17:30:57.000Z | 2022-03-15T08:47:03.000Z | """
Pay to puzzle hash
In this puzzle program, the solution must be a reveal of the puzzle with the given
hash along with its solution.
"""
from thyme.types.blockchain_format.program import Program
from thyme.types.blockchain_format.sized_bytes import bytes32
from .load_clvm import load_clvm
MOD = load_clvm("p2_puz... | 29.148148 | 115 | 0.808132 |
4a269fec691f38d01e4f9a6a8a981fac050b06f4 | 11,358 | py | Python | test/objects/linode_test.py | rylabs-billy/linode_api4-python | 55a804d7ae9c208965b6fb759d772cdcebade896 | [
"BSD-3-Clause"
] | 67 | 2018-08-26T20:36:34.000Z | 2022-03-11T06:15:04.000Z | test/objects/linode_test.py | rylabs-billy/linode_api4-python | 55a804d7ae9c208965b6fb759d772cdcebade896 | [
"BSD-3-Clause"
] | 89 | 2016-04-19T00:37:00.000Z | 2018-04-16T14:46:39.000Z | test/objects/linode_test.py | rylabs-billy/linode_api4-python | 55a804d7ae9c208965b6fb759d772cdcebade896 | [
"BSD-3-Clause"
] | 43 | 2018-06-28T18:21:14.000Z | 2022-02-09T20:53:42.000Z | from datetime import datetime
from test.base import ClientBaseCase
from linode_api4.objects import Config, Disk, Image, Instance, Type
from linode_api4.objects.base import MappedObject
class LinodeTest(ClientBaseCase):
"""
Tests methods of the Linode class
"""
def test_get_linode(self):
"""
... | 32.267045 | 119 | 0.573781 |
4a269ff3651e182be35f62e2f75bed0bec9c8dc1 | 48,610 | py | Python | python/ccxt/bitmex.py | QuoineFinancial/ccxt | c715e44a64250c20bdefd5f5b80ac60f4ae80913 | [
"MIT"
] | null | null | null | python/ccxt/bitmex.py | QuoineFinancial/ccxt | c715e44a64250c20bdefd5f5b80ac60f4ae80913 | [
"MIT"
] | null | null | null | python/ccxt/bitmex.py | QuoineFinancial/ccxt | c715e44a64250c20bdefd5f5b80ac60f4ae80913 | [
"MIT"
] | null | null | null | # -*- 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
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 40.780201 | 126 | 0.464657 |
4a26a0d66200c005abbaa3686785bf20e1864acc | 851 | py | Python | main.py | GuiSAlmeida/OS-Scheduler | 1b7c3fb2dff5a7a92366519e72cbc86fa2fa337b | [
"MIT"
] | null | null | null | main.py | GuiSAlmeida/OS-Scheduler | 1b7c3fb2dff5a7a92366519e72cbc86fa2fa337b | [
"MIT"
] | null | null | null | main.py | GuiSAlmeida/OS-Scheduler | 1b7c3fb2dff5a7a92366519e72cbc86fa2fa337b | [
"MIT"
] | null | null | null | #################################################################
# Algorithms simulating OS scheduler process #
# Author: Guilherme Almeida #
# Contact: https://www.guisalmeida.com #
########################################################... | 26.59375 | 65 | 0.540541 |
4a26a1065e394fa14a61c4eb605ce92ff8e71965 | 4,586 | py | Python | fiction_scraper/filters.py | de3sw2aq1/fiction-scrapers | bcda0c708c679273b8e2e962faa0d4e8f7988fea | [
"MIT"
] | null | null | null | fiction_scraper/filters.py | de3sw2aq1/fiction-scrapers | bcda0c708c679273b8e2e962faa0d4e8f7988fea | [
"MIT"
] | 2 | 2021-03-22T16:57:08.000Z | 2021-12-13T19:36:23.000Z | fiction_scraper/filters.py | de3sw2aq1/fiction-scrapers | bcda0c708c679273b8e2e962faa0d4e8f7988fea | [
"MIT"
] | 1 | 2020-07-22T14:16:40.000Z | 2020-07-22T14:16:40.000Z | """Filter functions for spiders.
This module contains functions that can be applied to the <body> of a story to
modify it. The body element will be passed to the filter function as the first
argument. Some filters have optional keyword arguments that may be configured
by setting the arguments with `functools.partial()... | 32.992806 | 79 | 0.668993 |
4a26a18ed24dab94094c049b9fdd1b7477650e46 | 1,529 | py | Python | DonnaAlert.py | TobiasMR/donna-alert | 5db41b3dbbbbfb7656376e421587d9b87508bc92 | [
"MIT"
] | null | null | null | DonnaAlert.py | TobiasMR/donna-alert | 5db41b3dbbbbfb7656376e421587d9b87508bc92 | [
"MIT"
] | null | null | null | DonnaAlert.py | TobiasMR/donna-alert | 5db41b3dbbbbfb7656376e421587d9b87508bc92 | [
"MIT"
] | null | null | null | import sys
import json
import pprint
import argparse
from flask import Flask, make_response, render_template, jsonify, send_from_directory
from flask.ext.sqlalchemy import SQLAlchemy
from birdy.twitter import AppClient
from models import Source, Mention, Base
from twitter import get_twitter_mentions
app = Flask(__na... | 27.303571 | 85 | 0.691956 |
4a26a1dc9fc77166691f212b697855db485ce345 | 4,647 | py | Python | homeassistant/components/sensor/command_line.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | 7 | 2018-06-29T01:13:54.000Z | 2020-04-01T16:08:27.000Z | homeassistant/components/sensor/command_line.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/sensor/command_line.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | 3 | 2018-10-09T08:37:48.000Z | 2019-11-16T08:32:27.000Z | """
Allows to configure custom shell commands to turn a value for a sensor.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.command_line/
"""
import logging
import subprocess
import shlex
from datetime import timedelta
import voluptuous as vol
i... | 32.270833 | 79 | 0.649021 |
4a26a261c392d3cfb759ed5ba5cd2e0593c8deed | 13,264 | py | Python | spinup/algos/sapm/sapm.py | kyungjaelee/soft_action_particle_method | 8a37dabcb079907bcaebffc45935df8372f78469 | [
"MIT"
] | 32 | 2019-08-28T16:48:12.000Z | 2021-10-15T04:33:14.000Z | spinup/algos/sapm/sapm.py | kyungjaelee/soft_action_particle_method | 8a37dabcb079907bcaebffc45935df8372f78469 | [
"MIT"
] | null | null | null | spinup/algos/sapm/sapm.py | kyungjaelee/soft_action_particle_method | 8a37dabcb079907bcaebffc45935df8372f78469 | [
"MIT"
] | 1 | 2019-08-28T16:46:48.000Z | 2019-08-28T16:46:48.000Z | import numpy as np
import gym
import random
import collections
import matplotlib.pyplot as plt
import time
from spinup.algos.sapm import Defs
from spinup.algos.sapm.Q_2layers import Q2_Network
from spinup.algos.sapm.Q_3layers import Q3_Network
from spinup.utils.logx import EpochLogger
"""
SAPM (Soft Action Particle ... | 43.205212 | 162 | 0.573809 |
4a26a376bbf103b9f4d149ee37cd9e8bce49523d | 2,541 | py | Python | ckanext/example_idatasetform/tests/test_controllers.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 1 | 2018-11-29T22:13:01.000Z | 2018-11-29T22:13:01.000Z | ckanext/example_idatasetform/tests/test_controllers.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 135 | 2019-07-03T19:58:12.000Z | 2020-02-14T19:57:33.000Z | ckanext/example_idatasetform/tests/test_controllers.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 3 | 2019-06-21T11:57:57.000Z | 2020-01-20T12:36:38.000Z | # encoding: utf-8
from nose.tools import assert_equal
from ckan.lib.helpers import url_for
import ckan.plugins as plugins
import ckan.tests.helpers as helpers
import ckan.tests.factories as factories
import ckan.model as model
submit_and_follow = helpers.submit_and_follow
def _get_package_edit_page(app, package_na... | 35.788732 | 79 | 0.662731 |
4a26a37b58964ba8c7ee9e15acc83687adc1b2b5 | 243 | py | Python | python/8kyu/i_love_you_a_little_a_lot_passionately_not_at_all.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 3 | 2021-06-08T01:57:13.000Z | 2021-06-26T10:52:47.000Z | python/8kyu/i_love_you_a_little_a_lot_passionately_not_at_all.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | null | null | null | python/8kyu/i_love_you_a_little_a_lot_passionately_not_at_all.py | Sigmanificient/codewars | b34df4bf55460d312b7ddf121b46a707b549387a | [
"MIT"
] | 2 | 2021-06-10T21:20:13.000Z | 2021-06-30T10:13:26.000Z | """Kata url: https://www.codewars.com/kata/57f24e6a18e9fad8eb000296."""
def how_much_i_love_you(nb_petals: int) -> str:
return (
"I love you", "a little", "a lot", "passionately", "madly", "not at all"
)[(nb_petals - 1) % 6]
| 30.375 | 80 | 0.625514 |
4a26a48749d5927956d07f7c4b2d65a1f627d2dc | 1,514 | py | Python | tests/test_utils.py | atrodahl/slack-cli | ee72fa39a5ae516132a6021aa32095a2e5533624 | [
"MIT"
] | null | null | null | tests/test_utils.py | atrodahl/slack-cli | ee72fa39a5ae516132a6021aa32095a2e5533624 | [
"MIT"
] | null | null | null | tests/test_utils.py | atrodahl/slack-cli | ee72fa39a5ae516132a6021aa32095a2e5533624 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from slackcli import messaging
class ParseStatusTests(unittest.TestCase):
def test_parse_full_status(self):
self.assertEqual(
{"status_emoji": ":office:", "status_text": "In office"},
messaging.parse_status_update("/status :office: I... | 32.913043 | 75 | 0.639366 |
4a26a5168c5687fc58032a675a610528831c3c4c | 47,555 | py | Python | chives/wallet/wallet_node.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 75 | 2021-06-27T03:30:59.000Z | 2022-03-20T12:32:55.000Z | chives/wallet/wallet_node.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 39 | 2021-07-02T07:11:24.000Z | 2022-03-20T15:00:07.000Z | chives/wallet/wallet_node.py | zcomputerwiz/chives-blockchain | 73d268bf76f50ff6133c868b58891e75739a2708 | [
"Apache-2.0"
] | 41 | 2021-06-24T11:24:43.000Z | 2022-03-14T16:11:38.000Z | import asyncio
import json
import logging
import time
import traceback
from pathlib import Path
from typing import Callable, Dict, List, Optional, Set, Tuple, Union
from blspy import PrivateKey
from chives.consensus.block_record import BlockRecord
from chives.consensus.blockchain_interface import BlockchainInterface
f... | 45.550766 | 118 | 0.617075 |
4a26a56be93f97b4a95b6eaa6dcde724f588621e | 2,710 | py | Python | setup.py | loot-king/cmake-python-distributions | edc3205a6aa354db1bde47dfe20478353d11c045 | [
"Apache-2.0"
] | null | null | null | setup.py | loot-king/cmake-python-distributions | edc3205a6aa354db1bde47dfe20478353d11c045 | [
"Apache-2.0"
] | null | null | null | setup.py | loot-king/cmake-python-distributions | edc3205a6aa354db1bde47dfe20478353d11c045 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from distutils.text_file import TextFile
from skbuild import setup
# Add current folder to path
# This is required to import versioneer in an isolated pip build
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import versioneer # noqa: E402
with open('README.... | 28.526316 | 91 | 0.656089 |
4a26a5c38ceb94810fd34500c5c6cc236cae7976 | 8,327 | py | Python | meercat/utils.py | rloganiv/meercat-aux | 4d9006095e9fb91034f8dae0baaa81a1567f6606 | [
"Apache-2.0"
] | 1 | 2021-11-24T03:32:00.000Z | 2021-11-24T03:32:00.000Z | meercat/utils.py | rloganiv/meercat-aux | 4d9006095e9fb91034f8dae0baaa81a1567f6606 | [
"Apache-2.0"
] | 1 | 2020-12-09T00:15:33.000Z | 2021-05-27T00:52:03.000Z | meercat/utils.py | rloganiv/streaming-cdc | 4d9006095e9fb91034f8dae0baaa81a1567f6606 | [
"Apache-2.0"
] | null | null | null | """Utilities."""
import csv
import collections
import itertools
import json
import logging
import os
import pickle
import random
import torch
from tqdm import tqdm
logger = logging.getLogger(__name__)
ENTITY_VOCAB_FILENAME = 'entities.txt'
ENTITY_MENTION_START = '[E_START]'
ENTITY_MENTION_END = '[E_END]'
def add_... | 33.175299 | 86 | 0.620151 |
4a26a62af11cef4606bd08f0aa0c00ea83d8c152 | 3,173 | py | Python | ucsmsdk/mometa/firmware/FirmwareSystemFsmTask.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/firmware/FirmwareSystemFsmTask.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/firmware/FirmwareSystemFsmTask.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for FirmwareSystemFsmTask ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class FirmwareSystemFsmTaskConsts:
COMPLETION_CANCELLED = "cancelled"
COMPLETION_COMPLETED = "com... | 52.016393 | 248 | 0.656161 |
4a26a6b527c288d82161e6050f0933670ecb88f7 | 2,627 | py | Python | docs/conf.py | darrowco/readthedocs.org | fa7fc5a24306f1f6a27c7393f381c594ab29b357 | [
"MIT"
] | 1 | 2021-08-17T00:50:48.000Z | 2021-08-17T00:50:48.000Z | docs/conf.py | darrowco/readthedocs.org | fa7fc5a24306f1f6a27c7393f381c594ab29b357 | [
"MIT"
] | null | null | null | docs/conf.py | darrowco/readthedocs.org | fa7fc5a24306f1f6a27c7393f381c594ab29b357 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
import os
import sys
from configparser import RawConfigParser
import sphinx_rtd_theme
sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.dirname(__file__))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readth... | 23.881818 | 75 | 0.69547 |
4a26a6b58dca85b3ad6b9015ab0948c9f4ef318d | 1,804 | py | Python | aliyun-python-sdk-resourcemanager/aliyunsdkresourcemanager/request/v20200331/GetPolicyRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-resourcemanager/aliyunsdkresourcemanager/request/v20200331/GetPolicyRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-resourcemanager/aliyunsdkresourcemanager/request/v20200331/GetPolicyRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.08 | 92 | 0.768293 |
4a26a75e95f521afc2f7282a4d793c55ee618818 | 14,191 | py | Python | fairseq_master/fairseq/models/transformer_lm.py | Vicky-Wil/NLE_CLR_NMT | 48758b6ee7de3f8546f1e54c6650cd0082c7dee7 | [
"MIT"
] | 41 | 2020-07-06T03:26:59.000Z | 2022-01-12T07:34:23.000Z | fairseq_master/fairseq/models/transformer_lm.py | Vicky-Wil/NLE_CLR_NMT | 48758b6ee7de3f8546f1e54c6650cd0082c7dee7 | [
"MIT"
] | 13 | 2019-08-15T18:32:54.000Z | 2020-03-31T17:32:24.000Z | fairseq_master/fairseq/models/transformer_lm.py | Vicky-Wil/NLE_CLR_NMT | 48758b6ee7de3f8546f1e54c6650cd0082c7dee7 | [
"MIT"
] | 11 | 2019-10-01T04:54:17.000Z | 2021-04-07T14:27:48.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
from fairseq import options, utils... | 53.753788 | 128 | 0.691776 |
4a26a764f91c9328e58e1679814a45499aa929c6 | 1,216 | py | Python | venv/Lib/site-packages/gevent/resolver/blocking.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | venv/Lib/site-packages/gevent/resolver/blocking.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 11 | 2018-06-18T15:49:07.000Z | 2021-11-25T01:45:33.000Z | venv/Lib/site-packages/gevent/resolver/blocking.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | # Copyright (c) 2018 gevent contributors. See LICENSE for details.
import _socket
__all__ = [
'Resolver',
]
class Resolver(object):
"""
A resolver that directly uses the system's resolver functions.
.. caution::
This resolver is *not* cooperative.
This resolver has the lowest overhead... | 26.434783 | 76 | 0.657072 |
4a26a7d2ef7bcc39fd71182b0cd8e2cca7a504d4 | 6,006 | py | Python | find.py | matthewkos/DREAM-ALS-Stratification-Prize4Life-Challenge | 907676e0b7f3a52ab4a131089fc562375f09170b | [
"WTFPL"
] | null | null | null | find.py | matthewkos/DREAM-ALS-Stratification-Prize4Life-Challenge | 907676e0b7f3a52ab4a131089fc562375f09170b | [
"WTFPL"
] | null | null | null | find.py | matthewkos/DREAM-ALS-Stratification-Prize4Life-Challenge | 907676e0b7f3a52ab4a131089fc562375f09170b | [
"WTFPL"
] | null | null | null | import pandas
from TicToc import TicToc
import numpy as np
from process import print_pd
import sklearn.feature_selection
def read_data():
train_filename = 'Data/Train_data_processed.pkl'
val_filename = 'Data/Val_data_processed.pkl'
train_data = pandas.read_pickle(train_filename)
val_data = pandas... | 34.125 | 91 | 0.566101 |
4a26a84acfcc32a81b246d3dad04b84a7dcb53a5 | 6,388 | py | Python | pytext/utils/timing.py | victorling8/pytext | bc78c39edd06797b766ba7db4bef731e6e1ac533 | [
"BSD-3-Clause"
] | null | null | null | pytext/utils/timing.py | victorling8/pytext | bc78c39edd06797b766ba7db4bef731e6e1ac533 | [
"BSD-3-Clause"
] | null | null | null | pytext/utils/timing.py | victorling8/pytext | bc78c39edd06797b766ba7db4bef731e6e1ac533 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import collections
import functools
import timeit
import traceback
import weakref
from json import dumps as json_dumps
from .ascii_table import ascii_table
class SnapshotList(list):
"""lists are not weakref-able by def... | 28.904977 | 85 | 0.526143 |
4a26a8763d267d6f5851971232107bf610c64c60 | 4,335 | py | Python | synthetic_simpleAE.py | wushanshan/L1AE | c15b2a3f74a48d6a51d8efcea09689f0d2ebf46a | [
"Apache-2.0"
] | 19 | 2018-06-28T15:47:22.000Z | 2021-11-13T09:01:32.000Z | synthetic_simpleAE.py | wushanshan/L1AE | c15b2a3f74a48d6a51d8efcea09689f0d2ebf46a | [
"Apache-2.0"
] | 1 | 2019-05-03T14:18:52.000Z | 2019-05-05T12:31:21.000Z | synthetic_simpleAE.py | wushanshan/L1AE | c15b2a3f74a48d6a51d8efcea09689f0d2ebf46a | [
"Apache-2.0"
] | 5 | 2019-08-11T22:19:26.000Z | 2020-09-10T11:48:12.000Z | """Train an autoencoder over synthetic datasets"""
from __future__ import division
from datasets import synthetic_block_sparse_data
from utils import l1_min_avg_err
from baselines import simple_AE_l1
import os
import numpy as np
import tensorflow as tf
SEED = 43
np.random.seed(SEED)
flags = tf.app.flags
flags.DEFINE... | 39.054054 | 79 | 0.635755 |
4a26a89f1010253a44386473be1090c35d7c9137 | 4,038 | py | Python | sisjuridico/apps/reportes/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | sisjuridico/apps/reportes/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | sisjuridico/apps/reportes/views.py | AnthonyWainer/sistemaJuridico | 83acf42fd20793ea05d6bff57322e17355893fc9 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.db.models import Max, Q
from apps.seguridad.models import permisos, User
from apps.expediente.models import expedientes, categoria, resolucion
from apps.paginacion import pagina... | 48.650602 | 223 | 0.684002 |
4a26a8cd452530b8d89bbe6d84f7ee0a5ec35580 | 3,241 | py | Python | koran.py | Reylyer/discord-koran | b2ca8fc728c2944a691ed5ce67007118a8017201 | [
"MIT"
] | null | null | null | koran.py | Reylyer/discord-koran | b2ca8fc728c2944a691ed5ce67007118a8017201 | [
"MIT"
] | null | null | null | koran.py | Reylyer/discord-koran | b2ca8fc728c2944a691ed5ce67007118a8017201 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import requests, json, asyncio
import argparse, inspect
from datetime import datetime
from datetime import timedelta
class Koran(commands.Cog):
tformat = '%Y-%m-%dT%H:%M:%S+00:00'
print_tformat = '%a, %d %b %Y %H:%M'
def __init__(self, client) -> None:
... | 36.41573 | 166 | 0.586239 |
4a26a9198529978fd1fc3a8ba63016402c9a0475 | 753 | py | Python | livemark/plugins/comments/plugin.py | AyrtonB/livemark | f8c49d449ea6242c674cf345823468aaabea6e6b | [
"MIT"
] | 1 | 2021-10-05T15:52:17.000Z | 2021-10-05T15:52:17.000Z | livemark/plugins/comments/plugin.py | AyrtonB/livemark | f8c49d449ea6242c674cf345823468aaabea6e6b | [
"MIT"
] | null | null | null | livemark/plugins/comments/plugin.py | AyrtonB/livemark | f8c49d449ea6242c674cf345823468aaabea6e6b | [
"MIT"
] | null | null | null | from ...plugin import Plugin
# TODO: use base url from the SitePlugin
class CommentsPlugin(Plugin):
identity = "comments"
priority = 45
validity = {
"type": "object",
"properties": {
"enable": {"type": "boolean"},
},
}
# Context
@property
def code(se... | 21.514286 | 69 | 0.572377 |
4a26a9d7c775441f0c0a7e05fcdf2b01a2d59f1b | 11,353 | py | Python | config.py | KatanoShingo/Keyhac | 4b68bc866f6bfe9cbf7f43dcc8f60d2022fd88e1 | [
"MIT"
] | 3 | 2020-05-23T13:39:52.000Z | 2021-02-22T07:48:43.000Z | config.py | KatanoShingo/Keyhac | 4b68bc866f6bfe9cbf7f43dcc8f60d2022fd88e1 | [
"MIT"
] | 2 | 2020-04-12T11:10:50.000Z | 2020-04-12T15:27:47.000Z | config.py | KatanoShingo/Keyhac | 4b68bc866f6bfe9cbf7f43dcc8f60d2022fd88e1 | [
"MIT"
] | 1 | 2021-03-06T11:01:54.000Z | 2021-03-06T11:01:54.000Z | import sys
import os
import datetime
import pyauto
from keyhac import *
class MAP:
def __init__(self, keymap):
self.ime = False
#ユーザー設定
MultiDisplay = True
#どのウインドウにフォーカスがあっても効くキーマップ
keymap_global = keymap.defineWindowKeymap()
#アプリ切り替え
keymap_global[ "RS-Z" ] = "Win-1"
... | 32.344729 | 74 | 0.485334 |
4a26ad07d036befce0b4dffb7f8c99e28cbb90ce | 931 | py | Python | python/examples/guess_number_1.py | RodolfoDiaz/CodeLibrary | 603ac9eee5b014bef8f04545bc4e73b0ec376131 | [
"MIT"
] | 1 | 2018-10-11T14:29:40.000Z | 2018-10-11T14:29:40.000Z | python/examples/guess_number_1.py | RodolfoDiaz/CodeLibrary | 603ac9eee5b014bef8f04545bc4e73b0ec376131 | [
"MIT"
] | 2 | 2020-04-26T21:12:00.000Z | 2020-10-28T21:10:03.000Z | python/examples/guess_number_1.py | RodolfoDiaz/CodeLibrary | 603ac9eee5b014bef8f04545bc4e73b0ec376131 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Code sample: using random numbers and loops."""
import random
minNumber = 1 # input('Enter the minimum number: ')
maxNumber = 5 # input('Enter the maximum number: ')
attempts = 3
if (minNumber < maxNumber):
random_number = random.randint(minNumber, maxNumber)
count = 0
while ... | 33.25 | 78 | 0.586466 |
4a26ad433e9264c22f384439d8ce50576eb12806 | 13,422 | py | Python | venv/lib/python3.9/site-packages/pyarrow/tests/test_gandiva.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 3 | 2021-03-29T19:21:08.000Z | 2021-12-31T09:30:11.000Z | python/pyarrow/tests/test_gandiva.py | royalstream/arrow | eb20a3dbc7732f612e5ce54be5f4291440829350 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 95 | 2020-12-08T14:14:27.000Z | 2021-07-17T00:43:39.000Z | python/pyarrow/tests/test_gandiva.py | royalstream/arrow | eb20a3dbc7732f612e5ce54be5f4291440829350 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 9 | 2021-02-24T10:27:55.000Z | 2022-03-28T08:27:12.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.672131 | 79 | 0.668008 |
4a26af76283ec0a8023f05f5cae6c1e188af7216 | 2,815 | py | Python | solmate/programs/system_program/instructions/create_account.py | nimily/solmate | acd12d6e79598ca53fcb94b0fc3c524cb6c50b7c | [
"MIT"
] | 3 | 2022-03-11T19:06:15.000Z | 2022-03-22T02:40:53.000Z | solmate/programs/system_program/instructions/create_account.py | nimily/solmate | acd12d6e79598ca53fcb94b0fc3c524cb6c50b7c | [
"MIT"
] | null | null | null | solmate/programs/system_program/instructions/create_account.py | nimily/solmate | acd12d6e79598ca53fcb94b0fc3c524cb6c50b7c | [
"MIT"
] | null | null | null | # LOCK-BEGIN[imports]: DON'T MODIFY
from .instruction_tag import InstructionTag
from dataclasses import dataclass
from io import BytesIO
from podite import (
BYTES_CATALOG,
U64,
)
from solana.publickey import PublicKey
from solana.transaction import (
AccountMeta,
TransactionInstruction,
)
from solmate.... | 25.825688 | 82 | 0.652575 |
4a26afa35d4665b71ed5ce927337e57e32bc9eec | 691 | py | Python | pitty/bin/django-admin.py | othienoJoe/Moringa-Tribune | 7bb86e1b45f81dba3079abf6ab1f302d22234cd1 | [
"Unlicense"
] | null | null | null | pitty/bin/django-admin.py | othienoJoe/Moringa-Tribune | 7bb86e1b45f81dba3079abf6ab1f302d22234cd1 | [
"Unlicense"
] | null | null | null | pitty/bin/django-admin.py | othienoJoe/Moringa-Tribune | 7bb86e1b45f81dba3079abf6ab1f302d22234cd1 | [
"Unlicense"
] | null | null | null | #!/home/moringa/Desktop/Moringa-Tribune/pitty/bin/python
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
raise ImportError(
'django-admin.py was de... | 31.409091 | 80 | 0.727931 |
4a26afd7fa3c76dfe085506dd6ddb52c150528e5 | 181 | py | Python | settings/channel_archiver/NIHSAMPLE_FROZEN_OPTICAL_settings.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | null | null | null | settings/channel_archiver/NIHSAMPLE_FROZEN_OPTICAL_settings.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 1 | 2019-10-22T21:28:31.000Z | 2019-10-22T21:39:12.000Z | settings/channel_archiver/NIHSAMPLE_FROZEN_OPTICAL_settings.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 2 | 2019-06-06T15:06:46.000Z | 2020-07-20T02:03:22.000Z | MEAN.filename = '//mx340hs/data/anfinrud_1903/Archive/NIH.SAMPLE_FROZEN_OPTICAL.MEAN.txt'
MEAN2.filename = '//mx340hs/data/anfinrud_1903/Archive/NIH.SAMPLE_FROZEN_OPTICAL.MEAN2.txt' | 90.5 | 91 | 0.828729 |
4a26b0a39ecf4bca8d56c7539b428348d71afc73 | 5,940 | py | Python | migrations/versions/9aa069b2417d_.py | jiejiang/inventory | 9ce34a54812a23785504bbe62d914afde797895f | [
"Apache-2.0"
] | 1 | 2021-10-06T04:28:09.000Z | 2021-10-06T04:28:09.000Z | migrations/versions/9aa069b2417d_.py | jiejiang/inventory | 9ce34a54812a23785504bbe62d914afde797895f | [
"Apache-2.0"
] | 6 | 2021-03-19T01:45:44.000Z | 2022-03-11T23:52:09.000Z | migrations/versions/9aa069b2417d_.py | jiejiang/inventory | 9ce34a54812a23785504bbe62d914afde797895f | [
"Apache-2.0"
] | null | null | null | """empty message
Revision ID: 9aa069b2417d
Revises: None
Create Date: 2016-08-22 15:22:08.772102
"""
# revision identifiers, used by Alembic.
revision = '9aa069b2417d'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###... | 46.771654 | 123 | 0.685017 |
4a26b0c4195824609cb3fc706b2b3bdbca4fa1f9 | 4,859 | py | Python | api.py | locus-ioe/SF21-Project-1-Template | ad813ddd5619d66e9375d17a0e58b3d3f3d99610 | [
"MIT"
] | null | null | null | api.py | locus-ioe/SF21-Project-1-Template | ad813ddd5619d66e9375d17a0e58b3d3f3d99610 | [
"MIT"
] | null | null | null | api.py | locus-ioe/SF21-Project-1-Template | ad813ddd5619d66e9375d17a0e58b3d3f3d99610 | [
"MIT"
] | null | null | null | """
This file contains the code to setup your own REST API server for use in the
project. The custom REST API server fetches data from the original One API
and only provides the first 20 characters for use in the actual app. The
comments throughout the file will guide you to fully setup your own API server.
The require... | 40.831933 | 87 | 0.722165 |
4a26b11db112ba49b60015a7ec1f730fa53507af | 991 | py | Python | kommersant_parser.py | Zed-chi/news-parser | 20c5592baaa8d80182b45b0a2aafde4baaf3357a | [
"MIT"
] | 1 | 2019-01-14T17:59:34.000Z | 2019-01-14T17:59:34.000Z | kommersant_parser.py | Zed-chi/news-parser | 20c5592baaa8d80182b45b0a2aafde4baaf3357a | [
"MIT"
] | null | null | null | kommersant_parser.py | Zed-chi/news-parser | 20c5592baaa8d80182b45b0a2aafde4baaf3357a | [
"MIT"
] | 1 | 2019-01-14T17:59:37.000Z | 2019-01-14T17:59:37.000Z | from bs4 import BeautifulSoup as web
from basic_parser import Parser
class Kommersant_parser(Parser):
def __init__(self):
super().__init__("http://www.kommersant.ru/RSS/news.xml")
self.encoding = "windows-1251"
self.site_encoding = "windows-1251"
def grab(self, url):
content =... | 28.314286 | 79 | 0.566095 |
4a26b1643b6fb3d83c9b6501d4279a47860b8b65 | 8,372 | py | Python | tritam_crm_sms/models/stock_picking.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | tritam_crm_sms/models/stock_picking.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | tritam_crm_sms/models/stock_picking.py | kenysmile/test_facebook | 844a3ddd53abd319c0115de86909118a37106c67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import models, fields, api,tools,_
import calendar
from datetime import timedelta, date
import datetime
import re
from threading import Timer, Thread
#import imp
import sys
#reload(sys)
#sys.setdefaultencoding("utf8")
from odoo.exceptions import UserError
import logging
_logger = loggi... | 56.952381 | 157 | 0.491758 |
4a26b1665885f6ff757ab0504ffe9658b1722fb5 | 11,180 | py | Python | src/robot/running/handlers.py | d-biehl/robotframework | ac4803649702ada9d18c5357ad7fcbbebcd0fb89 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-02-14T12:19:18.000Z | 2020-02-14T12:19:18.000Z | src/robot/running/handlers.py | imust6226/robotframework | 08c56fef2ebc64d682c7f99acd77c480d8d0e028 | [
"ECL-2.0",
"Apache-2.0"
] | 26 | 2020-04-07T04:25:35.000Z | 2022-03-01T08:08:23.000Z | src/robot/running/handlers.py | imust6226/robotframework | 08c56fef2ebc64d682c7f99acd77c480d8d0e028 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 35.833333 | 85 | 0.657513 |
4a26b29fe5e4b988588579acfcf2c792c3ff4f6d | 3,554 | py | Python | sdk/python/pulumi_azure/compute/get_dedicated_host.py | AdminTurnedDevOps/pulumi-azure | affd9eaaee3016f350f0d0469694dbd52850300b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/get_dedicated_host.py | AdminTurnedDevOps/pulumi-azure | affd9eaaee3016f350f0d0469694dbd52850300b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/get_dedicated_host.py | AdminTurnedDevOps/pulumi-azure | affd9eaaee3016f350f0d0469694dbd52850300b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class GetDed... | 40.850575 | 131 | 0.689645 |
4a26b3511eabb848557335172dccd4c669daef06 | 1,969 | py | Python | xrpl/ledger/main.py | florent-uzio/xrpl-py | ce396a15a6fc39ca20e035636463b58b231ffeac | [
"0BSD"
] | 1 | 2021-04-07T16:59:01.000Z | 2021-04-07T16:59:01.000Z | xrpl/ledger/main.py | florent-uzio/xrpl-py | ce396a15a6fc39ca20e035636463b58b231ffeac | [
"0BSD"
] | null | null | null | xrpl/ledger/main.py | florent-uzio/xrpl-py | ce396a15a6fc39ca20e035636463b58b231ffeac | [
"0BSD"
] | null | null | null | """High-level ledger methods with the XRPL ledger."""
from typing import Any, Dict, cast
from xrpl.clients import Client, XRPLRequestFailureException
from xrpl.models.requests import Fee, Ledger
def get_latest_validated_ledger_sequence(client: Client) -> int:
"""
Returns the sequence number of the latest va... | 28.128571 | 67 | 0.694769 |
4a26b364a3062eebf66a8b8c3cb3402284c322eb | 1,473 | py | Python | MechFinder/urls.py | srinidh-007/MechFinder | 6c217ee28963ea11b0960c982aa07cff35e31709 | [
"Apache-2.0"
] | null | null | null | MechFinder/urls.py | srinidh-007/MechFinder | 6c217ee28963ea11b0960c982aa07cff35e31709 | [
"Apache-2.0"
] | null | null | null | MechFinder/urls.py | srinidh-007/MechFinder | 6c217ee28963ea11b0960c982aa07cff35e31709 | [
"Apache-2.0"
] | null | null | null | """mechcheck URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 38.763158 | 77 | 0.682281 |
4a26b41f252e099f6bb08f49519ef23506e6c1db | 148 | py | Python | library_app/library_app/doctype/trancation/test_trancation.py | priyatoshy/FrappeLibraryApplication | 73237b49f9647024ef7262b756fa799fe201b6d9 | [
"MIT"
] | null | null | null | library_app/library_app/doctype/trancation/test_trancation.py | priyatoshy/FrappeLibraryApplication | 73237b49f9647024ef7262b756fa799fe201b6d9 | [
"MIT"
] | null | null | null | library_app/library_app/doctype/trancation/test_trancation.py | priyatoshy/FrappeLibraryApplication | 73237b49f9647024ef7262b756fa799fe201b6d9 | [
"MIT"
] | null | null | null | # Copyright (c) 2022, Priyatosh and Contributors
# See license.txt
# import frappe
import unittest
class TestTrancation(unittest.TestCase):
pass
| 16.444444 | 48 | 0.783784 |
4a26b4fa42ce8085af307df776c8bc8a236820ad | 3,542 | py | Python | neurokit2/rsp/rsp_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/rsp/rsp_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | neurokit2/rsp/rsp_process.py | danibene/NeuroKit | df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
from ..signal import signal_rate, signal_sanitize
from .rsp_amplitude import rsp_amplitude
from .rsp_clean import rsp_clean
from .rsp_peaks import rsp_peaks
from .rsp_phase import rsp_phase
def rsp_process(rsp_signal, sampling_rate=1000, method="khodadad2018"):
"""**Pr... | 38.5 | 109 | 0.682947 |
4a26b56d05aa2314899dcaa6729330c086fb5d37 | 6,463 | py | Python | filer/admin/clipboardadmin.py | pabloriveracelerity/django-filer | db9d7c02c51e85af46fa8a47be522e6f391c1264 | [
"BSD-3-Clause"
] | null | null | null | filer/admin/clipboardadmin.py | pabloriveracelerity/django-filer | db9d7c02c51e85af46fa8a47be522e6f391c1264 | [
"BSD-3-Clause"
] | null | null | null | filer/admin/clipboardadmin.py | pabloriveracelerity/django-filer | db9d7c02c51e85af46fa8a47be522e6f391c1264 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf.urls import url
from django.contrib import admin
from django.forms.models import modelform_factory
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from . import views
from .. import settings as fi... | 36.931429 | 77 | 0.57218 |
4a26b6568ed7e9fc334ef470f659697381265ba1 | 2,300 | py | Python | tests/chainer_tests/functions_tests/array_tests/test_spatial_transformer_grid.py | disktnk/chainer | 133798db470f6fd95973b882b9ccbd0c9726ac13 | [
"MIT"
] | 90 | 2017-02-23T04:04:47.000Z | 2020-04-09T12:06:50.000Z | tests/chainer_tests/functions_tests/array_tests/test_spatial_transformer_grid.py | disktnk/chainer | 133798db470f6fd95973b882b9ccbd0c9726ac13 | [
"MIT"
] | 7 | 2017-07-23T13:38:06.000Z | 2018-07-10T07:09:03.000Z | tests/chainer_tests/functions_tests/array_tests/test_spatial_transformer_grid.py | disktnk/chainer | 133798db470f6fd95973b882b9ccbd0c9726ac13 | [
"MIT"
] | 32 | 2017-02-28T07:40:38.000Z | 2021-02-17T11:33:09.000Z | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product({
'use_cudnn': ['always', 'never'],
}))
class TestSpatialTransformerG... | 32.394366 | 79 | 0.633913 |
4a26b6f0eeb024c64cd89fdd6ae3293bffcc0087 | 1,337 | py | Python | source/evaluation/classification/evaluation.py | vered1986/NC_embeddings | 8dec4e2f7918ab7606abf61b9d90e4f2786a9652 | [
"Apache-2.0"
] | 9 | 2019-06-11T02:55:07.000Z | 2019-09-04T23:51:36.000Z | source/evaluation/classification/evaluation.py | vered1986/NC_embeddings | 8dec4e2f7918ab7606abf61b9d90e4f2786a9652 | [
"Apache-2.0"
] | null | null | null | source/evaluation/classification/evaluation.py | vered1986/NC_embeddings | 8dec4e2f7918ab7606abf61b9d90e4f2786a9652 | [
"Apache-2.0"
] | 2 | 2020-08-26T10:20:07.000Z | 2021-02-24T07:00:33.000Z | import codecs
from sklearn import metrics
def output_predictions(predictions_file, relations, predictions, test_set_keys, test_labels):
"""
Output the model predictions for the test set
:param predictions_file: the output file path
:param relations: the ordered list of relations
:param prediction... | 40.515152 | 117 | 0.667165 |
4a26b7224ae81404fd3db93f5c4e82c36aa013a0 | 39,971 | py | Python | tensorflow/python/framework/tensor_shape.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/framework/tensor_shape.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/framework/tensor_shape.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31.399057 | 80 | 0.660029 |
4a26b8cb6dad6d78f867d2551fc91352720b66e2 | 4,195 | py | Python | ops.py | postBG/fashionMNIST-DCGAN-tensorflow | cd13df6425d30132064ddaa1925280433e827d2c | [
"MIT"
] | null | null | null | ops.py | postBG/fashionMNIST-DCGAN-tensorflow | cd13df6425d30132064ddaa1925280433e827d2c | [
"MIT"
] | null | null | null | ops.py | postBG/fashionMNIST-DCGAN-tensorflow | cd13df6425d30132064ddaa1925280433e827d2c | [
"MIT"
] | null | null | null | import tensorflow as tf
from layers import leaky_relu, batch_norm
GENERATOR = 'generator'
DISCRIMINATOR = 'discriminator'
# TODO: How to collect this all variables
# TODO: Extract Hyper parameter
def generator(z, output_channel=1, reuse=False, training=True, kernel_size=4):
"""
This function creates generat... | 38.842593 | 116 | 0.66031 |
4a26b915385f936315fa9bb75ce019517bfe4fb2 | 2,453 | py | Python | internal/notes/builtin-SAVE/packages/r-genomicalignments/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/r-genomicalignments/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/r-genomicalignments/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 49.06 | 135 | 0.684468 |
4a26b9543333c1b3a047270ae2244ed31295e414 | 7,186 | py | Python | pkg/scheduler/patcher/main.py | yaroslaver/csi-baremetal | f0dc8d36de06bd19613ff5683069919534db54ce | [
"Apache-2.0"
] | null | null | null | pkg/scheduler/patcher/main.py | yaroslaver/csi-baremetal | f0dc8d36de06bd19613ff5683069919534db54ce | [
"Apache-2.0"
] | null | null | null | pkg/scheduler/patcher/main.py | yaroslaver/csi-baremetal | f0dc8d36de06bd19613ff5683069919534db54ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*
# Copyright © 2020 Dell Inc. or its subsidiaries. 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.ap... | 32.224215 | 97 | 0.641108 |
4a26b9ce13b5e35499044d559c681b52c96e991c | 1,101 | py | Python | tapis_cli/commands/taccapis/v2/systems/models/system_history.py | shwetagopaul92/tapis-cli-ng | 6f424b8352c0d034d4f5547fac21d5c8dd097a7f | [
"BSD-3-Clause"
] | null | null | null | tapis_cli/commands/taccapis/v2/systems/models/system_history.py | shwetagopaul92/tapis-cli-ng | 6f424b8352c0d034d4f5547fac21d5c8dd097a7f | [
"BSD-3-Clause"
] | null | null | null | tapis_cli/commands/taccapis/v2/systems/models/system_history.py | shwetagopaul92/tapis-cli-ng | 6f424b8352c0d034d4f5547fac21d5c8dd097a7f | [
"BSD-3-Clause"
] | null | null | null | from tapis_cli.display import Verbosity
from tapis_cli.search import argtype, argmod
from .system import System
__all__ = ['SystemHistory']
class SystemHistory(System):
"""Model of a Tapis system history record
"""
SEARCH_ARGS = [
# JSON_field, type, verbosity, mods_allowed, default_mod, choices,... | 42.346154 | 102 | 0.69119 |
4a26baba45298984e8192ce5c2686265f895daba | 6,003 | py | Python | wdae/wdae/datasets_api/views.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | wdae/wdae/datasets_api/views.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | 82 | 2019-07-22T11:44:23.000Z | 2022-01-13T15:27:33.000Z | wdae/wdae/datasets_api/views.py | iossifovlab/gpf | e556243d29666179dbcb72859845b4d6c011af2b | [
"MIT"
] | null | null | null | from rest_framework.response import Response
from rest_framework import status
from guardian.shortcuts import get_groups_with_perms
from query_base.query_base import QueryBaseView
from studies.study_wrapper import StudyWrapperBase
from .models import Dataset
from groups_api.serializers import GroupSerializer
from dat... | 33.724719 | 77 | 0.604864 |
4a26bb509a7159b49b1d584c93c7330044ba392a | 209 | py | Python | Dataset/Leetcode/train/136/168.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/136/168.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/136/168.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def singleNumber(self, nums: List[int]) -> int:
nums.sort()
for i in range(len(nums)//2):
if nums[2*i] != nums[2*i+1]:return nums[2*i]
return nums[-1]
| 26.125 | 56 | 0.5311 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.