hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62f741245be6a6a992930cc8a10fe6f58e127329 | 6,113 | py | Python | tensorflow/contrib/linalg/python/kernel_tests/linear_operator_diag_test.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/linalg/python/kernel_tests/linear_operator_diag_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/linalg/python/kernel_tests/linear_operator_diag_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 40.217105 | 80 | 0.713071 |
62f745599c767e61b3438eb75adbfe0dee8bec19 | 107 | py | Python | modelscript/scripts/glossaries/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/scripts/glossaries/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2019-02-12T07:49:15.000Z | 2019-02-12T07:50:12.000Z | modelscript/scripts/glossaries/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
import modelscript.scripts.glossaries.parser
import modelscript.scripts.glossaries.printer
| 21.4 | 45 | 0.850467 |
62f75c37539d5b6d6416ac94cd8e4c6d23c6e99f | 18,352 | py | Python | NightlyTests/tensorflow/test_winnow.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | null | null | null | NightlyTests/tensorflow/test_winnow.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | null | null | null | NightlyTests/tensorflow/test_winnow.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | null | null | null | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modifica... | 54.295858 | 116 | 0.673605 |
62f78fd74e7d065beafa1f78a2a6c0514af096a2 | 2,655 | py | Python | training/train_safe_driver.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | training/train_safe_driver.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | training/train_safe_driver.py | sohomiitb/hackathonCN | 99dfe67d1f6884dc99c7c71663807dcdf0617722 | [
"MIT"
] | null | null | null | # Import libraries
import argparse
from azureml.core import Run
import joblib
import json
import os
import pandas as pd
import shutil
import lightgbm
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn import metrics
from azureml.core import Workspace, Datastore, Dataset
... | 34.480519 | 115 | 0.767985 |
62f7e4e85408f2c6118e6bf31f01c89653403016 | 145 | py | Python | recursion/number.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/number.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/number.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null |
def count(c):
if c == 5:
return
print("before call to count", c)
count(c+1)
print("after call to count", c)
count(0) | 12.083333 | 36 | 0.531034 |
62f7e819588730039ec53f1d45eda57e04244b97 | 4,761 | py | Python | e_invoice/hooks.py | dawoodjee/e_invoice | bf1cc38d66d52f8c83b4733a997846de5ab5fb73 | [
"MIT"
] | null | null | null | e_invoice/hooks.py | dawoodjee/e_invoice | bf1cc38d66d52f8c83b4733a997846de5ab5fb73 | [
"MIT"
] | null | null | null | e_invoice/hooks.py | dawoodjee/e_invoice | bf1cc38d66d52f8c83b4733a997846de5ab5fb73 | [
"MIT"
] | null | null | null | from . import __version__ as app_version
app_name = "e_invoice"
app_title = "E Invoice"
app_publisher = "Bantoo"
app_description = "Adds QR Code to Invoices"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "devs@thebantoo.com"
app_license = "MIT"
# Includes in <head>
# ------------------
#... | 22.457547 | 78 | 0.655114 |
62f7ee5c155335fc6644adad136604efd11a3687 | 5,584 | py | Python | src/morphforge/traces/tracetypes/tracepiecewise.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforge/traces/tracetypes/tracepiecewise.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforge/traces/tracetypes/tracepiecewise.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 31.370787 | 126 | 0.65437 |
62f8074687847c15586c459e4af7c95624f618c9 | 1,433 | py | Python | fml/__init__.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | 4 | 2016-10-28T11:09:29.000Z | 2019-04-21T06:08:21.000Z | fml/__init__.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | null | null | null | fml/__init__.py | larsbratholm/ml_clustering | dec3386676f8b22054f18643b1ae7d3e44c65527 | [
"MIT"
] | 4 | 2017-03-31T16:00:39.000Z | 2021-07-06T02:10:29.000Z | # MIT License
#
# Copyright (c) 2016 Anders Steen Christensen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | 43.424242 | 80 | 0.77111 |
62f80a9f1b44e262f76cf0e3af35e910b590ceef | 3,963 | py | Python | transforms/transform_pong.py | Loptt/pong-autoencoder | c5123bb2466f644f7513d807044e11a4a17aae22 | [
"MIT"
] | null | null | null | transforms/transform_pong.py | Loptt/pong-autoencoder | c5123bb2466f644f7513d807044e11a4a17aae22 | [
"MIT"
] | 1 | 2021-03-19T03:06:46.000Z | 2021-08-02T13:29:05.000Z | transforms/transform_pong.py | Loptt/pong-autoencoder | c5123bb2466f644f7513d807044e11a4a17aae22 | [
"MIT"
] | null | null | null | import sys
import os
import numpy as np
import tensorflow as tf
from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.preprocessing.image import array_to_img
from keras.layers import Input, MaxPool2D
from keras import Model
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'... | 27.520833 | 94 | 0.674741 |
62f81a3b85382bf12d1a622e3334b3b538807740 | 565 | py | Python | src/typeDefs/approvedOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | src/typeDefs/approvedOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | src/typeDefs/approvedOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | from typing import TypedDict
import datetime as dt
class IApprovedOutage(TypedDict):
sdId: int
sdReqId: int
elTypeId: int
elId: int
elName: str
elType: str
reasonId: int
reason: str
outageType: str
outageTypeId: int
outageTag: str
outageTagId: int
occName: str
r... | 18.833333 | 33 | 0.676106 |
62f83bb8aeb40b642179883c7d77e3d3a4fa5895 | 32,222 | py | Python | tuf/roledb.py | maoyangLiu/tuf | 420937a96d19ae0aa6681282e57bb78f364c609b | [
"Apache-2.0",
"MIT"
] | 1 | 2021-04-30T22:25:14.000Z | 2021-04-30T22:25:14.000Z | tuf/roledb.py | sashka3076/tuf | 52207862008cc54db8a43e1543a653be0d0333f7 | [
"Apache-2.0",
"MIT"
] | null | null | null | tuf/roledb.py | sashka3076/tuf | 52207862008cc54db8a43e1543a653be0d0333f7 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012 - 2017, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
<Program Name>
roledb.py
<Author>
Vladimir Diaz <vladimir.v.diaz@gmail.com>
<Started>
March 21, 2012. Based on a previous version of this module by Geremy Condra.
<Cop... | 30.001862 | 97 | 0.731891 |
62f84bf65cca346061aa67cf73ab04d3cec685d4 | 8,919 | py | Python | platon/gas_strategies/time_based.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/gas_strategies/time_based.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/gas_strategies/time_based.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import collections
import math
import operator
from typing import (
Iterable,
Sequence,
Tuple,
)
from platon_typing import (
Bech32Address,
)
from platon_utils import (
to_tuple,
)
from platon_utils.toolz import (
curry,
groupby,
sliding_window,
)
from hexbytes import (
HexBytes,
)
... | 36.404082 | 98 | 0.701424 |
62f89b7ec5077ef3e74875a9384941296a27b169 | 350 | py | Python | tests/utils/test_utils_select_all_heroes.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | tests/utils/test_utils_select_all_heroes.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | 1 | 2021-08-21T10:16:03.000Z | 2021-08-21T10:16:03.000Z | tests/utils/test_utils_select_all_heroes.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | import os
from battleforcastile.utils.select_all_files import select_all_files
CURRENT_PATH = os.path.dirname(os.path.abspath(__file__))
def test_if_all_heroes_can_be_selected():
path = os.path.join(CURRENT_PATH, 'fixtures', 'heroes')
heroes = select_all_files(path)
assert len(heroes) == 1
assert he... | 26.923077 | 68 | 0.734286 |
62f89c508280967b60c8e03457ac9219ee7139e3 | 211 | py | Python | tests/integration/roots/test-resources/conf.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | tests/integration/roots/test-resources/conf.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | tests/integration/roots/test-resources/conf.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | import kaybee
extensions = [kaybee.__title__]
master_doc = 'index'
html_title = ''
exclude_patterns = ['_build']
kaybee_settings = kaybee.KaybeeSettings(
debugdumper=dict(
use_debug=True
)
)
| 14.066667 | 40 | 0.696682 |
62f8ab030c03f695fe6eeee1dcf6064f4eec4b29 | 4,526 | py | Python | tensorflow/python/framework/errors_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/framework/errors_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/framework/errors_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.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... | 40.053097 | 81 | 0.712329 |
62f8ecd4e2b13e865782012037ab5c3afa783c96 | 1,277 | py | Python | apiloones/urls.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | apiloones/urls.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | 8 | 2019-12-04T23:41:37.000Z | 2022-02-10T10:05:09.000Z | apiloones/urls.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | """apiloones URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 36.485714 | 81 | 0.740799 |
62f9005f4deb6e0e25f6f7d8490aae1fc6eaac9d | 546 | py | Python | graphs/wordgraph.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | 3 | 2016-07-11T23:34:24.000Z | 2018-07-26T22:15:16.000Z | graphs/wordgraph.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | null | null | null | graphs/wordgraph.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | 16 | 2015-07-13T22:51:23.000Z | 2021-07-19T03:08:17.000Z | def gml2adjlist(G):
"""
Return a dict mapping word to adjacent nodes. G.node dict in memory
looks like:
{0: {'id': 0, 'value': 0, 'label': 'agreeable'},
1: {'id': 1, 'value': 1, 'label': 'man'}, ... }
and G.edge dict looks like:
{0: {1: {}, 2: {}, 3: {}}, 1: {0: {}, 19: {}, 2: {}, 102: {}... | 27.3 | 85 | 0.489011 |
62f934de72ea32db87bf27f70118f3391b4680ae | 3,037 | py | Python | cms/plugins/video/migrations/0001_initial.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/video/migrations/0001_initial.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 9 | 2015-06-25T10:31:12.000Z | 2022-03-12T00:41:22.000Z | cms/plugins/video/migrations/0001_initial.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 __future__ import unicode_literals
from django.db import models, migrations
import cms.models.pluginmodel
class Migration(migrations.Migration):
dependencies = [
('cms', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Video',
... | 69.022727 | 206 | 0.658215 |
62f937b3935429100cf5f6f475ac1006805c5d10 | 8,850 | py | Python | bandbyband_all_dlam.py | bmorris3/freckles | 057a23b34d760b712c26b47e8734312243639e78 | [
"MIT"
] | 1 | 2021-09-03T15:19:23.000Z | 2021-09-03T15:19:23.000Z | bandbyband_all_dlam.py | bmorris3/freckles | 057a23b34d760b712c26b47e8734312243639e78 | [
"MIT"
] | null | null | null | bandbyband_all_dlam.py | bmorris3/freckles | 057a23b34d760b712c26b47e8734312243639e78 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg') # Solves tkagg problem
import matplotlib.pyplot as plt
import numpy as np
import astropy.units as u
from emcee import EnsembleSampler
# from emcee.mpi_pool import MPIPool
# import sys
import os
import h5py
from corner import corner
from astropy.modeling.blackbody import blackbo... | 43.170732 | 114 | 0.501356 |
62f93e4f84b1ff65f6509273a80db6e447c7cd11 | 17,077 | py | Python | src/compas_fab/backends/ros/planner_backend_moveit.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 1 | 2019-08-15T17:34:43.000Z | 2019-08-15T17:34:43.000Z | src/compas_fab/backends/ros/planner_backend_moveit.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 3 | 2019-07-30T13:50:51.000Z | 2019-07-30T14:27:27.000Z | src/compas_fab/backends/ros/planner_backend_moveit.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | null | null | null | """
Internal implementation of the planner backend interface for MoveIt!
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from roslibpy import Topic
from compas_fab.backends.ros.exceptions import RosError
from compas_fab.backends.ros.messages import Atta... | 50.079179 | 133 | 0.627335 |
62f94c449210729ddf204bbd512190b809d7afda | 89,375 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 35.522655 | 189 | 0.634036 |
62f95605515e38caed4ec51ff065563135a0d926 | 2,271 | py | Python | nodesList.py | esteldunedain/conupy | 16ed8973403c33ac2a9252d71679fb091d8c56e2 | [
"MIT"
] | 1 | 2022-02-17T14:09:09.000Z | 2022-02-17T14:09:09.000Z | nodesList.py | esteldunedain/conupy | 16ed8973403c33ac2a9252d71679fb091d8c56e2 | [
"MIT"
] | null | null | null | nodesList.py | esteldunedain/conupy | 16ed8973403c33ac2a9252d71679fb091d8c56e2 | [
"MIT"
] | null | null | null | # nodesList.py encoding: utf-8
from collections import MutableSequence
import numpy as np
from funciones import dist
class NodesList(MutableSequence):
def __init__(self):
self.list = list()
self.geo_hash = {}
def __len__(self):
return len(self.list)
def __getitem__(self, i):
... | 29.493506 | 80 | 0.532365 |
62f98b2ccca9e475a1fd1fe55a118d78abcac87d | 1,959 | py | Python | stories/serializers.py | mateusz800/blog | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | null | null | null | stories/serializers.py | mateusz800/blog | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | 6 | 2021-03-19T11:06:32.000Z | 2021-04-12T13:11:26.000Z | stories/serializers.py | mateusz800/stories | a4083a85fb045124cd78ac59895c3bd9afb559dd | [
"MIT"
] | null | null | null | from django.http import HttpResponseBadRequest
from rest_framework import serializers, status
from rest_framework.response import Response
from taggit_serializer.serializers import TagListSerializerField
from hitcount.models import HitCount
from profiles.serializers import ProfileSerializer
from media.serializers imp... | 36.962264 | 162 | 0.681981 |
62f98c8656089fb35123b475c6bc136351e56fb7 | 1,313 | py | Python | alipay/aop/api/response/AlipayFinancialnetAuthPaymentNotifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayFinancialnetAuthPaymentNotifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayFinancialnetAuthPaymentNotifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"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.response.AlipayResponse import AlipayResponse
class AlipayFinancialnetAuthPaymentNotifyResponse(AlipayResponse):
def __init__(self):
super(AlipayFinancialnetAuthPaymentNotifyResponse, self).__init__()
self._result_code... | 28.543478 | 116 | 0.681645 |
62f9932c7f0346710dabb54a30514afd3b206267 | 13,526 | py | Python | lib/datasets/task_evaluation.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | 1 | 2018-07-26T15:24:30.000Z | 2018-07-26T15:24:30.000Z | lib/datasets/task_evaluation.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | null | null | null | lib/datasets/task_evaluation.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-present, Facebook, 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... | 33.730673 | 80 | 0.596111 |
62f998bd765d203a0cb69f43a6ad67e27de64e2a | 193 | py | Python | main/gpbasics/Statistics/ApproximationType.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | main/gpbasics/Statistics/ApproximationType.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | main/gpbasics/Statistics/ApproximationType.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | from enum import Enum
class GlobalApproximations(Enum):
Nystroem = 0,
SKC = 1,
SKI = 2,
# SOD = Subset of data
SOD_Grid = 3,
SOD_Random = 4,
SOD_SmoothedGrid = 5
| 14.846154 | 33 | 0.601036 |
62f9aa5d6169319e18104fe0fecf51001c052867 | 149 | py | Python | basic/hello.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/hello.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/hello.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
with open('text.txt','a') as f:
for i,c in enumerate('abckslssdfadfkskfkkdkfkjd'):
f.writelines(str(i)) | 24.833333 | 51 | 0.651007 |
62f9b9113ca95334462d8fbe1a0594a82d4be91a | 10,855 | py | Python | service/StackInfo.py | keithCollins77093/hardInfo | 17b5031a7ea1aacbe9af30d1f170ffe217420f6e | [
"Apache-2.0"
] | null | null | null | service/StackInfo.py | keithCollins77093/hardInfo | 17b5031a7ea1aacbe9af30d1f170ffe217420f6e | [
"Apache-2.0"
] | null | null | null | service/StackInfo.py | keithCollins77093/hardInfo | 17b5031a7ea1aacbe9af30d1f170ffe217420f6e | [
"Apache-2.0"
] | null | null | null | # Project: File Volume Indexer
# Author: George Keith Watson
# Date Started: February 9, 2019
# Copyright: (c) Copyright 2019 George Keith Watson
# Module: StackInfo
# Date Started: Imported from LinuxLogForensics on March 18, 2022.
# Purpose: View for managing scans... | 39.908088 | 131 | 0.564717 |
62f9c420bcd62d6bc064df9dfcc974608d16925d | 1,278 | py | Python | app/auth/forms.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | app/auth/forms.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | app/auth/forms.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | 1 | 2022-03-17T08:33:57.000Z | 2022-03-17T08:33:57.000Z | from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,BooleanField,SubmitField,ValidationError
from wtforms.validators import InputRequired,Email,EqualTo
from ..models import User
class RegistrationForm(FlaskForm):
email = StringField('Your Email Address',validators=[InputRequired(),Email()... | 51.12 | 133 | 0.744131 |
62f9d3cfb2d1e50bd02f042946b4ccb44f93609f | 545 | py | Python | tests/conftest.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | 1 | 2021-01-13T06:39:08.000Z | 2021-01-13T06:39:08.000Z | tests/conftest.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | null | null | null | tests/conftest.py | avisionh/abtest | 9b4e640b67b2b4d2c3501f1549b63ddd675f058e | [
"MIT"
] | null | null | null | import pytest
import pandas as pd
pytest_plugins = [
"tests.fixtures.fixture_helper_ab_test",
]
@pytest.fixture()
def df_ab_test():
return pd.DataFrame(
data={
"user_id": [1, 2, 3, 4, 5],
"group": ["control", "control", "treatment", "control", "treatment"],
"landi... | 20.961538 | 81 | 0.451376 |
62fa1238bd3f35ddfd68fc46ab00c58155cd75f7 | 8,637 | py | Python | VAE_clim_clim_conv_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | VAE_clim_clim_conv_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | VAE_clim_clim_conv_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | """
train the VAE_clim_clim_conv / VAE network
"""
# loading some packages
from tensorflow.keras.layers import Lambda, Input, Dense
from cbrain.layers import *
from tensorflow.keras.models import Model
from tensorflow.keras.losses import mse, binary_crossentropy
from tensorflow.keras.utils import plot_model
from tens... | 30.411972 | 125 | 0.741577 |
62fa154cc34e39a235916be1715ba664615f441e | 7,967 | py | Python | ml-agents/mlagents/trainers/tests/test_sac.py | midopooler/ml-agents | 07d885a79f7bda4c1616972f2c30073ca4c0899b | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/tests/test_sac.py | midopooler/ml-agents | 07d885a79f7bda4c1616972f2c30073ca4c0899b | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/tests/test_sac.py | midopooler/ml-agents | 07d885a79f7bda4c1616972f2c30073ca4c0899b | [
"Apache-2.0"
] | null | null | null | import pytest
from unittest import mock
import copy
from mlagents.tf_utils import tf
from mlagents.trainers.sac.trainer import SACTrainer
from mlagents.trainers.sac.optimizer import SACOptimizer
from mlagents.trainers.policy.nn_policy import NNPolicy
from mlagents.trainers.agent_processor import AgentManagerQueue
fr... | 35.252212 | 104 | 0.738421 |
62fa3fc12ba19bf2ac80899cc5f2f36592792613 | 4,175 | py | Python | src/convert.py | gertjanklein/iris-export-builder | 5b8c14429c923f653b04b78badc5dc84ad5d9ce7 | [
"Apache-2.0"
] | null | null | null | src/convert.py | gertjanklein/iris-export-builder | 5b8c14429c923f653b04b78badc5dc84ad5d9ce7 | [
"Apache-2.0"
] | null | null | null | src/convert.py | gertjanklein/iris-export-builder | 5b8c14429c923f653b04b78badc5dc84ad5d9ce7 | [
"Apache-2.0"
] | null | null | null | from io import StringIO
import http
from time import sleep
from concurrent.futures import ThreadPoolExecutor, wait
import threading
import requests
import namespace as ns
from config import ConfigurationError
# Thread-local storage for requests session objects
tls = threading.local()
def convert(config:ns.Namesp... | 28.793103 | 97 | 0.651497 |
62fa3fc1e9672ed2c1c214da6e26483737494004 | 8,833 | py | Python | skbio/stats/tests/test_composition.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/tests/test_composition.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/tests/test_composition.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 39.609865 | 78 | 0.457602 |
62fa442a64ae649c1f1d43802ecb78bdacdbb507 | 968 | py | Python | python/pymei/Modules/__init__.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | null | null | null | python/pymei/Modules/__init__.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | null | null | null | python/pymei/Modules/__init__.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | 1 | 2021-02-23T21:13:47.000Z | 2021-02-23T21:13:47.000Z | __all__ = ["cmn", "cmnornaments", "corpus", "critapp", "edittrans", "facsimile", "figtable", "harmony", "header", "linkalign", "lyrics", "mensural", "midi", "namesdates", "neumes", "performance", "ptrref", "shared", "text", "usersymbols"]
from pymei.Modules.cmn import *
from pymei.Modules.cmnornaments import *
from py... | 42.086957 | 238 | 0.767562 |
62fa625d70c996d86fb5c574c86f3cd685aba443 | 93,090 | py | Python | src/client/pydaos/raw/daos_api.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/client/pydaos/raw/daos_api.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/client/pydaos/raw/daos_api.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | #!/usr/bin/python
"""
(C) Copyright 2018-2022 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
# pylint: disable=too-many-lines
# pylint: disable=raise-missing-from
# pylint: disable=relative-beyond-top-level
from .. import pydaos_shim
# pylint: enable=relative-beyond-top-level
import ctypes
i... | 39.064205 | 80 | 0.566581 |
62fa7a936915e09f59e049496c990749faec2d9f | 12,129 | py | Python | darwin/networks.py | lnis-uofu/darwin | e76d3a1cd5f93b85a6f32e6c6c3e7cadf32441a2 | [
"MIT"
] | null | null | null | darwin/networks.py | lnis-uofu/darwin | e76d3a1cd5f93b85a6f32e6c6c3e7cadf32441a2 | [
"MIT"
] | null | null | null | darwin/networks.py | lnis-uofu/darwin | e76d3a1cd5f93b85a6f32e6c6c3e7cadf32441a2 | [
"MIT"
] | null | null | null | '''
Implementation of hidden layers for supported Reservoir Computing models.
'''
import numpy as np
from sklearn.metrics import accuracy_score
from darwin.layers.readout import SingleLayerDense, MultiLayerDense
from darwin.quantization import fxp_quantization, downcast
from darwin.activations import *
class EchoSt... | 37.205521 | 158 | 0.623382 |
62faa00e74c152fdd91c62822d617c0a05738b3f | 1,566 | py | Python | sahara_plugin_cdh/plugins/cdh/v5_13_0/images.py | tellesnobrega/sahara-plugin-cdh | c6a8a3e11b40ee36a8b41069f2cb96c029461b65 | [
"Apache-2.0"
] | 2 | 2019-01-28T22:10:54.000Z | 2019-02-20T08:35:58.000Z | sahara_plugin_cdh/plugins/cdh/v5_13_0/images.py | openstack/sahara-plugin-cdh | 063c3ee8de7e56831ef6b3bc8807706bd5fd7cea | [
"Apache-2.0"
] | null | null | null | sahara_plugin_cdh/plugins/cdh/v5_13_0/images.py | openstack/sahara-plugin-cdh | 063c3ee8de7e56831ef6b3bc8807706bd5fd7cea | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 34.8 | 69 | 0.733078 |
62fae6d38031dd141fe586c382ac512a06ee034f | 494 | py | Python | mlapp/integrations/aml/utils/runconfig.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 33 | 2021-02-26T10:41:09.000Z | 2021-11-07T12:35:32.000Z | mlapp/integrations/aml/utils/runconfig.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 17 | 2021-03-04T15:37:21.000Z | 2021-04-06T12:00:13.000Z | mlapp/integrations/aml/utils/runconfig.py | kerenleibovich/mlapp | 0b8dfaba7a7070ab68cb29ff61dd1c7dd8076693 | [
"Apache-2.0"
] | 9 | 2021-03-03T20:02:41.000Z | 2021-10-05T13:03:56.000Z | from azureml.core.runconfig import RunConfiguration
from mlapp.integrations.aml.utils.env import create_env_from_requirements
def create_runconfig(aml_compute, env=None):
# Create a new runconfig object
aml_run_config = RunConfiguration()
# Use the aml_compute you created above.
aml_run_config.target... | 27.444444 | 73 | 0.763158 |
62faf94b4a6f80f6264d58b076e91674633cbd61 | 176 | py | Python | source/base/admin.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | 31 | 2018-02-26T11:28:14.000Z | 2021-04-19T02:51:53.000Z | source/base/admin.py | danielguerra69/memex-explorer | d4c2e63fb982bb23f6cb9d7b0a93b21740a68f10 | [
"BSD-2-Clause"
] | 185 | 2015-01-01T16:54:08.000Z | 2015-03-04T23:31:15.000Z | source/base/admin.py | danielguerra69/memex-explorer | d4c2e63fb982bb23f6cb9d7b0a93b21740a68f10 | [
"BSD-2-Clause"
] | 15 | 2018-03-23T14:01:35.000Z | 2020-10-28T00:46:28.000Z | from django.contrib import admin
from base.models import Project
@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
| 22 | 45 | 0.761364 |
62fb1c2078caf8cfae53359bb00935bcd0070bc5 | 11,705 | py | Python | common.py | wanghaiyangMIT/rhythm-detection | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | 2 | 2019-05-21T14:10:18.000Z | 2021-11-06T18:59:08.000Z | common.py | wanghaiyangMIT/rhythm-detection-opticalflowpure | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | null | null | null | common.py | wanghaiyangMIT/rhythm-detection-opticalflowpure | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn.parameter import Parameter
import math
def positional_encodings(T, D):
encodings = torch.zeros(T, D)
positions = torch.arange(0, T).float()
for d in range(D):
if d % 2 == 0:
... | 40.642361 | 115 | 0.561811 |
62fb256bc69256ef5e006f113863dd7e3369f070 | 2,716 | py | Python | venv/Lib/site-packages/pyrogram/methods/auth/send_code.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/methods/auth/send_code.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/methods/auth/send_code.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 36.213333 | 119 | 0.602725 |
62fb7deb51300c62a8e646606f21a61e91a53e2e | 947 | py | Python | pages/themes/PyQt/examples/simple_table_static_values.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/PyQt/examples/simple_table_static_values.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/PyQt/examples/simple_table_static_values.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | import sys
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtCore as qtc
from PyQt5 import QtGui as qtg
class MainWindow(qtw.QWidget):
def __init__(self , *args, **kwargs):
super().__init__(*args, **kwargs)
self.setWindowTitle('')
self.uiCreateTable();
self.show();
def uiCreateMenu(self):
pass
d... | 20.148936 | 74 | 0.704329 |
62fb945920fc236796006014d6addeb164da3113 | 2,367 | py | Python | data/datasets/person_search_dataset.py | keenJMS/JMS_OIM | 6f4bc1c114d007c108d6989c05fb0847aee78a1c | [
"Apache-2.0"
] | null | null | null | data/datasets/person_search_dataset.py | keenJMS/JMS_OIM | 6f4bc1c114d007c108d6989c05fb0847aee78a1c | [
"Apache-2.0"
] | null | null | null | data/datasets/person_search_dataset.py | keenJMS/JMS_OIM | 6f4bc1c114d007c108d6989c05fb0847aee78a1c | [
"Apache-2.0"
] | null | null | null | import os.path as osp
import torch
import numpy as np
from PIL import Image
from torch.utils.data import Dataset
class PersonSearchDataset(Dataset):
def __init__(self, root, transforms=None, mode='train'):
super(PersonSearchDataset, self).__init__()
self.root = root
self.data_path= self.ge... | 29.222222 | 91 | 0.611745 |
62fb9b5345fcb546f77f467309756e902a58fe68 | 2,989 | py | Python | alipay/aop/api/domain/DeliveryBaseInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/DeliveryBaseInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/DeliveryBaseInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.DeliveryMaterial import DeliveryMaterial
class DeliveryBaseInfo(object):
def __init__(self):
self._delivery_begin_time = None
self._delivery_end_time = None
... | 33.211111 | 89 | 0.651054 |
62fbbc09eb666d89f6e4368bc54d0abac876f766 | 10,375 | py | Python | Barbican/Server/barbican-stable-mitaka/barbican/barbican/common/config.py | cloud-security-research/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 36 | 2017-11-08T23:36:35.000Z | 2022-03-20T16:01:55.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/common/config.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 2 | 2017-11-17T03:19:17.000Z | 2018-07-04T03:37:36.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/common/config.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 12 | 2017-11-13T03:20:40.000Z | 2021-07-16T03:26:41.000Z | # Copyright (c) 2013-2014 Rackspace, 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 ... | 38.857678 | 79 | 0.586892 |
62fbe297d20341fdaf601ff9aed43a8e7499cdbe | 1,025 | py | Python | gwlfe/BMPs/Stream/UrbLoadRed_inner.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/BMPs/Stream/UrbLoadRed_inner.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/BMPs/Stream/UrbLoadRed_inner.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numba.pycc import CC
from numpy import zeros
cc = CC('UrbLoadRed_inner_compiled')
@cc.export('UrbLoadRed_inner',
'(int64, int32[:,::1], float64[:,:,::1], int64, int64, int64, float64[:,::1], float64[:,:,::1], float64[:,:,::1], int64)')
def UrbLoadRed_inner(NYrs, DaysMonth, Temp, NRur, Nqual, Storm, U... | 42.708333 | 133 | 0.475122 |
62fbf53b3502d276c7c9f0c358bfeb2303f446df | 5,819 | py | Python | conans/test/upload_test.py | TyRoXx/conan | 644516b5126f78f46275a9f6a01148183c9d149f | [
"MIT"
] | null | null | null | conans/test/upload_test.py | TyRoXx/conan | 644516b5126f78f46275a9f6a01148183c9d149f | [
"MIT"
] | null | null | null | conans/test/upload_test.py | TyRoXx/conan | 644516b5126f78f46275a9f6a01148183c9d149f | [
"MIT"
] | null | null | null | import unittest
from conans.test.tools import TestClient, TestServer
from conans.test.utils.test_files import hello_source_files
from conans.client.manager import CONANFILE
import os
from conans.paths import CONAN_MANIFEST
from conans.util.files import save
from conans.model.ref import ConanFileReference, PackageRefere... | 43.75188 | 95 | 0.60354 |
62fc77d39101f8a6b2d2c30700f8a3516da5ab79 | 23,123 | py | Python | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_junit_run.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from contextlib import contextmanager
from textwrap import dedent
from pants.b... | 38.538333 | 100 | 0.660208 |
62fc82a898183e5079050d70b857fca6051485b7 | 272 | py | Python | (2)Data Structures/heapq_heapreplace.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/heapq_heapreplace.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/heapq_heapreplace.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import heapq
from heapq_showtree import show_tree
from heapq_heapdata import data
heapq.heapify(data)
print('Start: ')
show_tree(data)
for n in [0,13]:
smallest = heapq.heapreplace(data,n)
print('replace {:>2} with {:>2}'.format(smallest,n))
show_tree(data)
| 20.923077 | 56 | 0.716912 |
62fcdefa6a182e877c27066f753c62ef586a4fd0 | 9,052 | py | Python | management_layer/tests/test_middleware.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | management_layer/tests/test_middleware.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | management_layer/tests/test_middleware.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | import time
import jwt
import os
from aiohttp import web
from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
from unittest.mock import patch
from management_layer import middleware
class AuthMiddlewareTest(AioHTTPTestCase):
async def get_application(self):
"""
Set up the applicati... | 37.404959 | 89 | 0.644167 |
62fce7d09d0bded72ebe3ed3ac1c2318544fd75f | 1,758 | py | Python | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/014_keypairs.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/014_keypairs.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/014_keypairs.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 35.877551 | 78 | 0.697383 |
62fd25ef8ce2d209a9e29ef5511a05145d0431a1 | 86,582 | py | Python | riscv_config/checker.py | riscv/riscv-conf | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 27 | 2019-08-12T07:54:57.000Z | 2021-09-07T02:24:49.000Z | riscv_config/checker.py | hemanthkumar17/riscv-config | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 32 | 2019-08-06T05:00:09.000Z | 2021-07-17T04:00:00.000Z | riscv_config/checker.py | hemanthkumar17/riscv-config | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 15 | 2019-08-06T05:08:20.000Z | 2021-07-21T03:44:34.000Z | import os
import logging
import copy
import re
from cerberus import Validator
import itertools
import riscv_config.utils as utils
from riscv_config.errors import ValidationError
from riscv_config.schemaValidator import schemaValidator
import riscv_config.constants as constants
from riscv_config.warl import warl_inter... | 47.994457 | 498 | 0.571424 |
62fd5862c04a77ded048ffb3a3f2ab438c9a6254 | 32,645 | py | Python | src/models/cross_validation.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | null | null | null | src/models/cross_validation.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | null | null | null | src/models/cross_validation.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | 1 | 2021-12-15T02:09:16.000Z | 2021-12-15T02:09:16.000Z | import numpy as np
from math import ceil
from models import utils
from config import cfg
from sklearn.model_selection import StratifiedShuffleSplit
from sklearn.model_selection import RepeatedKFold
from sklearn.model_selection import GroupKFold
class CrossValidation(object):
"""
Cross Validation
"""
... | 36.393534 | 118 | 0.484485 |
62fd72b06b957a0cef7fc760d931c891bea6fffc | 28,378 | py | Python | rlkit/launchers/launcher_util.py | YangRui2015/rlkit_pro | fccde0877a0da043525f7239bf703995107a8e80 | [
"MIT"
] | 1 | 2020-09-30T14:18:28.000Z | 2020-09-30T14:18:28.000Z | rlkit/launchers/launcher_util.py | YangRui2015/rlkit_pro | fccde0877a0da043525f7239bf703995107a8e80 | [
"MIT"
] | null | null | null | rlkit/launchers/launcher_util.py | YangRui2015/rlkit_pro | fccde0877a0da043525f7239bf703995107a8e80 | [
"MIT"
] | null | null | null | import datetime
import json
import os
import os.path as osp
import pickle
import random
import sys
import time
from collections import namedtuple
import __main__ as main
import dateutil.tz
import numpy as np
from rlkit.core import logger
from rlkit.launchers import conf
from rlkit.torch.pytorch_util import set_gpu_mo... | 31.671875 | 96 | 0.60554 |
62fd7cb0fd6b086b31dcfc65cbc493e87dd6e304 | 14,578 | py | Python | qctrlopencontrols/dynamic_decoupling_sequences/driven_controls.py | robo2323/python-open-controls | bdd499c3c04cd0485d7804dbdc2f83cdf6984f0e | [
"Apache-2.0"
] | null | null | null | qctrlopencontrols/dynamic_decoupling_sequences/driven_controls.py | robo2323/python-open-controls | bdd499c3c04cd0485d7804dbdc2f83cdf6984f0e | [
"Apache-2.0"
] | null | null | null | qctrlopencontrols/dynamic_decoupling_sequences/driven_controls.py | robo2323/python-open-controls | bdd499c3c04cd0485d7804dbdc2f83cdf6984f0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Q-CTRL Pty Ltd & Q-CTRL 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... | 44.175758 | 95 | 0.655577 |
62fda090e16f6b99e1ace2dc925bb5700c49ba24 | 3,223 | py | Python | data/process_data.py | LN5user/disaster-response | d6a709f2b642615909cc92ecccf8520472945fde | [
"Unlicense"
] | null | null | null | data/process_data.py | LN5user/disaster-response | d6a709f2b642615909cc92ecccf8520472945fde | [
"Unlicense"
] | null | null | null | data/process_data.py | LN5user/disaster-response | d6a709f2b642615909cc92ecccf8520472945fde | [
"Unlicense"
] | null | null | null | import sys
import pandas as pd
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
'''
Load and combine two datasets
INPUT
messages_filepath: str - path to the messages data
categories_filepath: str - path to the categories data
OUTPUT
df - pandas... | 29.842593 | 80 | 0.660875 |
62fdc94af2d52ce5ddd6690a881e26bef034856d | 21,290 | py | Python | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as p... | 40.863724 | 79 | 0.519822 |
62fdcdc33b3533af306af54f7ff7ca53877fd869 | 5,348 | py | Python | examples/task_text_classification_cola.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | 1 | 2021-04-26T08:01:25.000Z | 2021-04-26T08:01:25.000Z | examples/task_text_classification_cola.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | null | null | null | examples/task_text_classification_cola.py | deepframwork/TorchBlocks | 35f6e1bb83d2b9b05ba914a21fd365cb26ac4a32 | [
"MIT"
] | null | null | null | import os
import csv
from torchblocks.metrics import MattewsCorrcoef
from torchblocks.callback import TrainLogger
from torchblocks.trainer import TextClassifierTrainer
from torchblocks.processor import TextClassifierProcessor, InputExample
from torchblocks.utils import seed_everything, dict_to_text, build_argpars... | 46.912281 | 107 | 0.660808 |
62fe0446bcc849335037a43c00cc47b9b6d9fb8f | 875 | py | Python | army_ant/index/service_index.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 5 | 2018-01-18T14:11:52.000Z | 2020-10-23T16:02:25.000Z | army_ant/index/service_index.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 10 | 2018-02-02T20:19:36.000Z | 2020-10-05T08:46:36.000Z | army_ant/index/service_index.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# service_index.py
# José Devezas (joseluisdevezas@gmail.com)
# 2018-03-09 (refactor: 2019-03-14)
import logging
from army_ant.index import Index
logger = logging.getLogger(__name__)
class ServiceIndex(Index):
def __init__(self, reader, index_location, loop):
super().__init__(re... | 29.166667 | 65 | 0.665143 |
62fe1628caad4437b5951a6a7436d29bcbec353d | 856 | py | Python | models/_database.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | 1 | 2016-05-26T08:18:36.000Z | 2016-05-26T08:18:36.000Z | models/_database.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | models/_database.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | import peewee
__author__ = 'moskupols'
database = peewee.Proxy()
database_url = None
def init_database(url: str=None):
"""
Initializes database connection.
See https://peewee.readthedocs.org/en/latest/peewee/database.html?highlight=url#connecting-using-a-database-url
for info on URL format.
Url... | 26.75 | 115 | 0.732477 |
62fe40e3f7c041bf142f19f2e0c4ca5de17a059c | 6,706 | py | Python | tests/test_key.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | tests/test_key.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | tests/test_key.py | chrispyles/fica | 7c1739d0d5dae0e2f847b901b0968f484d6b097b | [
"MIT"
] | null | null | null | """Tests for ``fica.key``"""
import pytest
from unittest import mock
from fica import EMPTY, Key, SUBKEYS
from fica.key import KeyValuePair
from .utils import assert_object_attrs
@pytest.fixture
def default_key_attrs():
"""
A pytest fixture returning the default attribute values for a ``Key``.
"""
... | 30.761468 | 109 | 0.566955 |
62feb37ffa27c0c802f7fb8034a0f7c99683c488 | 18,225 | py | Python | mmdet3d/core/bbox/coders/center3d_bbox_coder.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 91 | 2020-08-07T09:38:32.000Z | 2022-02-12T08:11:08.000Z | mmdet3d/core/bbox/coders/center3d_bbox_coder.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 12 | 2020-08-17T08:57:41.000Z | 2021-12-08T09:25:12.000Z | mmdet3d/core/bbox/coders/center3d_bbox_coder.py | wangguojun2018/CenterNet3d | 5ddee6be104a9a22ee80fdeddc6f2627e36966d2 | [
"Apache-2.0"
] | 14 | 2020-08-12T13:14:32.000Z | 2022-01-28T16:34:21.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import torch
from mmdet.core.bbox.builder import BBOX_CODERS
from .partial_bin_based_bbox_coder import PartialBinBasedBBoxCoder
from mmdet3d.core.bbox.structures import LiDARInstance3DBoxes,... | 42.581776 | 145 | 0.621509 |
62ff27bbfdf18ac4d6351607755a61d55dda46e9 | 6,386 | py | Python | tests/test_users.py | thsetz/fossology-python | 1c7394624f8bf2deb0aece6ef0db443cf10c791b | [
"MIT"
] | 12 | 2019-12-10T09:57:27.000Z | 2022-01-05T19:09:34.000Z | tests/test_users.py | thsetz/fossology-python | 1c7394624f8bf2deb0aece6ef0db443cf10c791b | [
"MIT"
] | 66 | 2019-12-11T12:22:33.000Z | 2022-03-01T02:53:09.000Z | tests/test_users.py | thsetz/fossology-python | 1c7394624f8bf2deb0aece6ef0db443cf10c791b | [
"MIT"
] | 9 | 2020-05-08T19:45:29.000Z | 2022-01-05T19:09:24.000Z | # Copyright 2019-2021 Siemens AG
# SPDX-License-Identifier: MIT
import logging
import secrets
from datetime import date, timedelta
from unittest.mock import Mock
import pytest
import requests
import responses
from fossology import Fossology, fossology_token, versiontuple
from fossology.exceptions import Authenticati... | 33.434555 | 88 | 0.678359 |
62ff2a7e6b8be58624c755afb7202d24e2ee7a83 | 3,140 | py | Python | lymph/cli/main.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 89 | 2015-03-01T11:39:55.000Z | 2022-01-31T22:00:15.000Z | lymph/cli/main.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 214 | 2015-01-02T23:48:49.000Z | 2020-01-14T10:47:37.000Z | lymph/cli/main.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 36 | 2015-01-13T13:44:15.000Z | 2021-09-15T17:55:41.000Z |
def setup_config(args):
import os
import sys
from lymph.config import Configuration
from lymph.utils.sockets import guess_external_ip
vars_file = args.get('--vars') or os.environ.get('LYMPH_VARS')
env_vars = Configuration(raw=True)
if vars_file:
env_vars.load_file(vars_file)
... | 29.345794 | 136 | 0.663057 |
62ff4454ed4dda1f09d8a6e3b9230c7f98cf905a | 3,123 | py | Python | utils.py | ugurcancakal/stockPrediction | af687b6bfdda306f2b1297faf83d1cdc83047177 | [
"MIT"
] | null | null | null | utils.py | ugurcancakal/stockPrediction | af687b6bfdda306f2b1297faf83d1cdc83047177 | [
"MIT"
] | null | null | null | utils.py | ugurcancakal/stockPrediction | af687b6bfdda306f2b1297faf83d1cdc83047177 | [
"MIT"
] | 1 | 2022-03-09T09:59:24.000Z | 2022-03-09T09:59:24.000Z | '''
Google Stock Price Prediction Project
Utility functions
author: Ugurcan Cakal
201209
'''
import torch
import pandas as pd
import os
import numpy as np
from torch.autograd import Variable
from datetime import datetime, timedelta
def adjust_split(root_data, csv_filename, rate=2.002, date='2014-03-27'):
'''
Ad... | 22.79562 | 90 | 0.707333 |
62ff488c208d9d2ce471319cb23f17393db5358a | 807 | py | Python | experiments/generate_calibration.py | TheDebbio/srt-single-dish-tools | a01059f888a55d4b3c9d0768d61c58ae005961ca | [
"BSD-3-Clause"
] | 2 | 2018-01-29T18:50:25.000Z | 2018-06-18T23:41:43.000Z | experiments/generate_calibration.py | matteobachetti/srt-single-dish-tools | db02eaa1bb958945a88c36c1be847d43bf6b10b4 | [
"BSD-3-Clause"
] | 95 | 2017-05-25T13:12:14.000Z | 2018-09-24T10:33:11.000Z | experiments/generate_calibration.py | TheDebbio/srt-single-dish-tools | a01059f888a55d4b3c9d0768d61c58ae005961ca | [
"BSD-3-Clause"
] | 3 | 2017-06-13T10:10:50.000Z | 2018-06-08T12:35:57.000Z | import numpy as np
import os
from srttools.core.simulate import simulate_scan, save_scan
def gauss(x):
return 100 * np.exp(-x ** 2 /(2*0.1**2))
for i in range(12):
factor = (i // 2) * 2 + 1
center = factor * 7
times, position, shape = simulate_scan(shape=gauss)
if i % 2 == 1:
position =... | 25.21875 | 75 | 0.567534 |
62ff4a7bae995e792efb219c3febb77e9f6f0066 | 1,731 | py | Python | setup.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 1 | 2021-07-28T20:50:33.000Z | 2021-07-28T20:50:33.000Z | setup.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | 96 | 2021-05-05T22:11:41.000Z | 2022-03-17T03:03:25.000Z | setup.py | kaushikcfd/arraycontext | 1db13f2e0f810af413022d5bbcce281bdaa3b61b | [
"MIT"
] | 7 | 2021-05-20T21:00:18.000Z | 2021-08-24T22:51:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def main():
from setuptools import setup, find_packages
version_dict = {}
init_filename = "arraycontext/version.py"
exec(
compile(open(init_filename, "r").read(), init_filename, "exec"), version_dict
)
setup(
name="arraycontext",
... | 32.055556 | 85 | 0.556326 |
62ff9c811922ed7716c64bd557e9ae6ee41c9bd8 | 2,434 | py | Python | settings/settings.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 12 | 2015-11-24T22:43:14.000Z | 2021-03-24T05:01:43.000Z | settings/settings.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 1 | 2015-04-22T17:26:31.000Z | 2015-04-22T17:48:38.000Z | settings/settings.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 9 | 2015-03-05T17:43:47.000Z | 2021-03-19T14:29:49.000Z | from ConfigParser import ConfigParser
import os
try:
CONFIG_PATH = os.path.dirname(__file__) + os.path.sep + 'PyDA.conf'
except:
CONFIG_PATH = 'PyDA.conf' # this will only happen if we run this script directly
class SettingsManager(ConfigParser):
def __init__(self, config_path=CONFIG_PATH):
Config... | 38.634921 | 84 | 0.58258 |
62ffa8140d3f60d19b8c8781ec2e26b4b5f822b5 | 4,694 | py | Python | st2client/st2client/config_parser.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2client/st2client/config_parser.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2client/st2client/config_parser.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 28.107784 | 83 | 0.547294 |
62ffb63267a6f67019b50bbf19855a689d9d6d93 | 9,804 | py | Python | packages/python-packages/api-stub-generator/tests/docstring_parser_test.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/tests/docstring_parser_test.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/tests/docstring_parser_test.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from pydo... | 38.598425 | 129 | 0.694002 |
1a0002c32386c5ea6581a5f39d36c0d8adf869e3 | 7,262 | py | Python | src/python/pants/backend/python/tasks/pex_build_util.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/tasks/pex_build_util.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/tasks/pex_build_util.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from builtins import str
from pex.fetcher import Fetcher
from pex.resolver imp... | 43.48503 | 100 | 0.760672 |
1a001610a647ba4ad5e5dd963e3eb25c0b78af9a | 346 | py | Python | explo/imageRecorder/imageRecorder.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | explo/imageRecorder/imageRecorder.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | explo/imageRecorder/imageRecorder.py | Brinfer/ClearWay | 208abe652350ae457f4195ac3e73e6006738974a | [
"MIT"
] | null | null | null | ### Damien Frissant
### This file aim to take 6 pictures and save them.
### A new picture erease the previous one
import time
import picamera
with picamera.PiCamera() as camera:
for x in range(0,6):
# Max résolution 2592, 1944
camera.resolution = (1024, 768)
#camera.start_preview()
... | 26.615385 | 51 | 0.66185 |
1a00402178d80e549c13139fec5e7d13b6a96a30 | 2,300 | py | Python | srfnef/postprocess/imgq/index_recon/spatial_resolution.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/postprocess/imgq/index_recon/spatial_resolution.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | srfnef/postprocess/imgq/index_recon/spatial_resolution.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | import numpy as np
from scipy.optimize import curve_fit
from .contrast import _mean_value, _standard_deviation
"""
Here we have spatial resolution,sd_rc
"""
def _gaussian(x, *param):
return param[0] * np.exp(-np.power(x - param[1], 2) / (2 * np.power(param[2], 2)))
def _gaussian_fit_x(image):
center = np.... | 29.113924 | 98 | 0.631304 |
1a004d1c81d0beebb81940191bdc87a039c44051 | 77 | py | Python | homeassistant/components/ais_exo_player/const.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 5 | 2020-01-21T16:06:49.000Z | 2021-12-20T11:54:20.000Z | homeassistant/components/ais_exo_player/const.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 68 | 2018-10-04T16:01:20.000Z | 2022-03-31T06:21:46.000Z | homeassistant/components/ais_exo_player/const.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Constants for the AIS EXO PLAYER component."""
DOMAIN = "ais_exo_player"
| 19.25 | 49 | 0.727273 |
1a006c1669a3eb6a259cee70af6d3872c3319f4c | 23,825 | py | Python | pims/display.py | tacaswell/pims | 6bb8bdf2e53f99bcbaad9b228f148f6e06d5c299 | [
"BSD-3-Clause"
] | null | null | null | pims/display.py | tacaswell/pims | 6bb8bdf2e53f99bcbaad9b228f148f6e06d5c299 | [
"BSD-3-Clause"
] | null | null | null | pims/display.py | tacaswell/pims | 6bb8bdf2e53f99bcbaad9b228f148f6e06d5c299 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import uuid
import numpy as np
import tempfile
from io import BytesIO
from base64 import b64encode
from contextlib import contextmanager
import warnings
try:
from matplotlib.colors import ColorC... | 35.401189 | 113 | 0.624092 |
1a0080b8548e5049ac33284e326092089b648eba | 504 | py | Python | @Teste.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | @Teste.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | @Teste.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | # Função inverte maiúsculas e minúsculas
def swap_case(s):
sTemp = ''
if len(s):
for i in range(0, len(s)):
if str(s[i]).isalpha():
if str(s[i]).islower():
sTemp += str(s[i]).upper()
elif str(s[i]).isupper():
sTemp += st... | 25.2 | 46 | 0.470238 |
1a0081b53565d384112c6a9fe64621baebead4cc | 129 | py | Python | wsgi.py | miguel-osuna/Kanban-Boards | 3f75ccfa4d02213a1e3a953adb29a31d00747f89 | [
"MIT"
] | null | null | null | wsgi.py | miguel-osuna/Kanban-Boards | 3f75ccfa4d02213a1e3a953adb29a31d00747f89 | [
"MIT"
] | null | null | null | wsgi.py | miguel-osuna/Kanban-Boards | 3f75ccfa4d02213a1e3a953adb29a31d00747f89 | [
"MIT"
] | null | null | null | import os
from kanban_boards.app import create_app
app = create_app(configuration=os.getenv("APP_CONFIGURATION", "production"))
| 25.8 | 76 | 0.813953 |
1a008cb0c89d85fb5fb2215c13af248505f5839e | 2,518 | py | Python | cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/modules/higherRes.py | HotMaps/renovation_effect | 469a01b4cc805256768d884a3a2ae4560770b734 | [
"Apache-2.0"
] | 1 | 2021-05-11T06:41:04.000Z | 2021-05-11T06:41:04.000Z | cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/modules/higherRes.py | mayr-ethink/renovation_effect | 5b1fb81102b3c6ee531b719d8136ed9a343c2598 | [
"Apache-2.0"
] | 2 | 2020-06-04T20:19:36.000Z | 2020-06-04T20:19:36.000Z | cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/modules/higherRes.py | mayr-ethink/renovation_effect | 5b1fb81102b3c6ee531b719d8136ed9a343c2598 | [
"Apache-2.0"
] | null | null | null | import gdal, ogr, os, osr, time
import numpy as np
import sys
import CM_intern.common_modules.array2raster as a2r
try:
import CM_intern.CEDM.modules.cyf.SumOfHighRes as HRcFunction
except:
print("SumOfHighRes in\nCM_intern.calc_energy_density.modules.cython_files"+
"\nNeeds to compiled first")
... | 34.493151 | 133 | 0.681493 |
1a00ac612cd33bd20756b011e481af2f46f80f94 | 1,351 | py | Python | p25.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p25.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p25.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | #import urllib
#
#lakes = []
#for i in range(25):
# print "Lake " + str(i+1)
# l = urllib.urlopen("http://butter:fly@www.pythonchallenge.com/pc/hex/lake" + str(i+1) + ".wav")
# lakes.append(l.read())
# open("lakewavs/lake" + str(i+1) + ".wav", 'wb').write(lakes[-1])
import binascii, wave
from PIL import Image
for i ... | 30.704545 | 97 | 0.61658 |
1a00e0ed72ab0fd75ca8137c8c7dbed24fff5a90 | 7,383 | py | Python | pytket_cirq/pytket/cirq/cirq_convert.py | tbcdebug/pytket | 5568d8a4e0c3d9799e227493f697841b6eb3b769 | [
"Apache-2.0"
] | null | null | null | pytket_cirq/pytket/cirq/cirq_convert.py | tbcdebug/pytket | 5568d8a4e0c3d9799e227493f697841b6eb3b769 | [
"Apache-2.0"
] | null | null | null | pytket_cirq/pytket/cirq/cirq_convert.py | tbcdebug/pytket | 5568d8a4e0c3d9799e227493f697841b6eb3b769 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 40.344262 | 230 | 0.657456 |
1a00fffa0754a031956f31e0b4e18a2c40133132 | 2,683 | py | Python | src/lib/Bcfg2/Server/FileMonitor/Fam.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/FileMonitor/Fam.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/FileMonitor/Fam.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | """ Fam provides FAM support for file alteration events """
import os
import _fam
import stat
import logging
from time import time
from Bcfg2.Server.FileMonitor import FileMonitor
logger = logging.getLogger(__name__)
class Fam(FileMonitor):
__priority__ = 90
def __init__(self, ignore=None, debug=False):
... | 32.325301 | 80 | 0.536713 |
1a01275f54f5497f0fcb8ff0b1fce51cb00a9367 | 382 | py | Python | playbooks/test/KafkaContainer.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | 1 | 2020-12-02T16:31:07.000Z | 2020-12-02T16:31:07.000Z | playbooks/test/KafkaContainer.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | null | null | null | playbooks/test/KafkaContainer.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | null | null | null | from testcontainers.core.container import DockerContainer
class KafkaContainer(DockerContainer):
def __init__(self, image, port_to_expose, zookeeper_connect, **kargs):
super().__init__(image, **kargs)
self.port_to_expose = port_to_expose
self.with_exposed_ports(self.port_to_expose)
... | 34.727273 | 74 | 0.756545 |
1a0143a6bba16fd43dd7fb4a7a1ffbe5515df35e | 4,005 | py | Python | backend/mysystem/views/login.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | 1 | 2022-03-01T07:20:36.000Z | 2022-03-01T07:20:36.000Z | backend/mysystem/views/login.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | backend/mysystem/views/login.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Remark:管理后台登录视图
"""
import base64
from datetime import datetime, timedelta
from captcha.views import CaptchaStore, captcha_image
from django.utils.translation import gettext_lazy as _
from drf_yasg import openapi
from drf_yasg.utils import swagger_auto_schema
from rest_framework import ser... | 30.572519 | 113 | 0.592509 |
1a018e8841c69fe2f9d41e5d43e544ccd0cc1e49 | 43,722 | py | Python | neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012 Cisco Systems, 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... | 44.253036 | 79 | 0.589589 |
1a0199334a7bd23cc579cd4e8b6a1357f9978a16 | 121,902 | py | Python | pypeit/par/pypeitpar.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | pypeit/par/pypeitpar.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | pypeit/par/pypeitpar.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
Defines parameter sets used to set the behavior for core pypeit
functionality.
For more details on the full parameter hierarchy and a tabulated
description of the keywords in each parameter set, see :ref:`pypeitpar`.
For examples of how to change the parameters for a run of pypeit using
the pype... | 46.795393 | 230 | 0.58657 |
1a01abd9369679b7bffaf7f6f397a9e3232838b6 | 5,198 | py | Python | Week 10 - Neural Networks/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 10 - Neural Networks/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 10 - Neural Networks/submission.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | from keras import Sequential
from keras.datasets import mnist
import numpy as np
from keras.layers import Dense
from keras.utils import to_categorical
from keras.preprocessing.image import img_to_array
import matplotlib.pyplot as plt
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
# proc... | 39.679389 | 110 | 0.757599 |
1a01d8bacfc83eb15170f6750e9dfd6399b14a12 | 2,935 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/instances/set_scheduling.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/compute/instances/set_scheduling.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/instances/set_scheduling.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 34.529412 | 80 | 0.730835 |
1a01ec1455c2ca17331ffeae0b958327868d6ab7 | 3,600 | py | Python | losses/boundary_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 121 | 2018-10-01T15:27:08.000Z | 2022-02-16T14:04:34.000Z | losses/boundary_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 196 | 2018-09-26T19:32:29.000Z | 2022-03-30T15:17:53.000Z | losses/boundary_loss.py | CharlesAuthier/geo-deep-learning | e97ea1d362327cdcb2849cd2f810f1e914078243 | [
"MIT"
] | 36 | 2018-09-25T12:55:55.000Z | 2022-03-03T20:31:33.000Z | import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
logging.getLogger(__name__)
def one_hot(label, n_classes, requires_grad=True):
"""Return One Hot Label"""
device = label.device
one_hot_label = torch.eye(
n_classes, device=device, requires_grad=requires_grad)[labe... | 30.508475 | 111 | 0.608333 |
1a0208943758c7bcff6b642955a14464d5753264 | 11,988 | py | Python | src/gafaelfawr/handlers/login.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | null | null | null | src/gafaelfawr/handlers/login.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | 155 | 2020-05-29T17:21:13.000Z | 2022-03-28T19:55:52.000Z | src/gafaelfawr/handlers/login.py | lsst-sqre/gafaelfawr | 5d965e9d7901987ef041fd341637d75407b55227 | [
"MIT"
] | 3 | 2021-04-26T18:02:58.000Z | 2022-02-03T01:29:13.000Z | """Initial authentication handlers (``/login``)."""
from __future__ import annotations
import base64
import os
from enum import Enum
from typing import TYPE_CHECKING, Optional
from fastapi import APIRouter, Depends, Query, status
from fastapi.responses import RedirectResponse, Response
from httpx import HTTPError
f... | 36 | 78 | 0.69286 |
1a021d944b3777fb13a9759f3a9398ba7432da8c | 7,208 | py | Python | tests/models/validators/v2_1_2/jsd_6f9819e84178870c.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_6f9819e84178870c.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_6f9819e84178870c.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Update PnP Server Profile data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 restrictio... | 27.30303 | 78 | 0.344617 |
1a022e77869e94d0781821e9fa1bb7175c3b8abe | 670 | py | Python | Char-RNN-Classify-Text/model.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | Char-RNN-Classify-Text/model.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | Char-RNN-Classify-Text/model.py | shreyansh26/DL-Code-Repository | f1974eedc1fef54b2d274703390a22721e46f502 | [
"MIT"
] | null | null | null | import torch
from torch import nn
class RNN(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super().__init__()
self.hidden_size = hidden_size
self.i2h = nn.Linear(input_size + hidden_size, hidden_size)
self.i2o = nn.Linear(input_size + hidden_size, output_siz... | 30.454545 | 67 | 0.652239 |
1a022f13cdc06df025de2bb958ad87ad1ef7e7db | 5,676 | py | Python | shapelyShortestPath.py | bendemott/Python-Shapely-Examples | feda19bb4bf32e6d387d717bcc95bfc39057696f | [
"MIT"
] | 3 | 2017-11-21T14:51:16.000Z | 2018-12-06T08:07:09.000Z | shapelyShortestPath.py | deep0072/Python-Shapely-Examples | feda19bb4bf32e6d387d717bcc95bfc39057696f | [
"MIT"
] | null | null | null | shapelyShortestPath.py | deep0072/Python-Shapely-Examples | feda19bb4bf32e6d387d717bcc95bfc39057696f | [
"MIT"
] | 4 | 2016-09-20T06:00:34.000Z | 2021-05-18T09:42:53.000Z | '''
Build a matrix of lines... Paths actually.
'''
import random, os, sys, time, numpy, pprint
from shapely import *
from shapely.geometry import *
import shortestPath
def main():
filename='matrix_plot.png'
numberOfPoints = 500
gridWidth = 10000
gridHeight = 10000
pointList = []
shapePoints = []
for i in ran... | 27.157895 | 117 | 0.686047 |
1a025f7894ad27298e1a60e05bcbcac6bd33c887 | 2,445 | py | Python | cms/plugins/googlemap/migrations/0001_initial.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/googlemap/migrations/0001_initial.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 9 | 2015-06-25T10:31:12.000Z | 2022-03-12T00:41:22.000Z | cms/plugins/googlemap/migrations/0001_initial.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 __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='GoogleMap',
fields=[
... | 64.342105 | 374 | 0.599182 |
1a02691913fc345a6ab641bcfaba8990be4afea2 | 8,075 | py | Python | tests/pa/test_provision.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | 1 | 2021-01-22T05:44:51.000Z | 2021-01-22T05:44:51.000Z | tests/pa/test_provision.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | tests/pa/test_provision.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 40.577889 | 106 | 0.686687 |
1a02ccb1d682654f9baa4630ec1b69658be490a7 | 20,570 | py | Python | example/psychopy_integration/audio_experiment_lastrun.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | example/psychopy_integration/audio_experiment_lastrun.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | example/psychopy_integration/audio_experiment_lastrun.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2021.1.1),
on Sun 28 Feb 2021 04:15:36 PM -03
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E,... | 41.38833 | 128 | 0.68279 |
1a02ce8e40cdb2872d8e7aa34620c3d9d13884b2 | 2,763 | py | Python | tests/test_user_client.py | encord-team/encord-client-python | 665963c21d7a06e63dce105f9d29daf660617ad5 | [
"Apache-2.0"
] | 4 | 2022-02-09T00:31:18.000Z | 2022-03-04T17:19:47.000Z | tests/test_user_client.py | encord-team/encord-client-python | 665963c21d7a06e63dce105f9d29daf660617ad5 | [
"Apache-2.0"
] | 21 | 2022-02-07T10:05:08.000Z | 2022-03-16T19:52:58.000Z | tests/test_user_client.py | encord-team/encord-client-python | 665963c21d7a06e63dce105f9d29daf660617ad5 | [
"Apache-2.0"
] | 2 | 2022-02-21T13:55:54.000Z | 2022-03-04T17:15:19.000Z | import os
import pytest
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
import encord.exceptions
from encord.configs import _ENCORD_SSH_KEY, _ENCORD_SSH_KEY_FILE
from encord.user_client import EncordUserClient
PRIVATE_KEY = (
... | 34.5375 | 94 | 0.807094 |
1a02ddbe525cb261575e53c7a562350058c56a3b | 3,177 | py | Python | onadata/libs/utils/decorators.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/libs/utils/decorators.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/libs/utils/decorators.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from functools import wraps
from urllib.parse import urlparse
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from django.conf import settings
from django.http import HttpResponseRedirect
from onadata.apps.logger.models import XForm
def check_o... | 40.21519 | 80 | 0.618193 |
1a02e0df0160cbd51b5a88ceb196bba6cae5d784 | 1,916 | py | Python | datawinners/search/manage_index.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/search/manage_index.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/search/manage_index.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import logging
from datawinners.search import update_submission_search_index, form_model_change_handler, entity_search_update, entity_form_model_change_handler
from mangrove.datastore.documents import SurveyResponseDocument, FormModelDocument, EntityFormModelDocument
from mangrove.datastore.entity import Entity
from ma... | 43.545455 | 144 | 0.751566 |
1a0327889f991c52c6d5db761645c49c14308987 | 534 | py | Python | examples/minion/scripts/copy_esp32_espcam_package.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | examples/minion/scripts/copy_esp32_espcam_package.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | examples/minion/scripts/copy_esp32_espcam_package.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import platform
if platform.system() == 'Windows':
MYPYTHON = 'python'
MYCODEROOT = 'c:/coderoot'
MYSOURCEFILE = "c:"
else:
MYPYTHON = 'python3'
MYCODEROOT = '/coderoot'
MYSOURCEFILE = ""
MYSOURCEFILE += '/tmp/minion_ioboard_tmp/esp32cam/firmware.bin'
def runc... | 23.217391 | 130 | 0.659176 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.