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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d10f6d8c76ccb81fa136747a526a6be3051b106 | 3,001 | py | Python | openstack_dashboard/dashboards/admin/flavors/extras/tests.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/flavors/extras/tests.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/flavors/extras/tests.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 40.013333 | 79 | 0.632456 |
1d112fbf1100ae9ebf864d0fca848e9d4cf6a5d6 | 440 | py | Python | neb/minimizers/steepestdescent.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | 20 | 2016-12-13T19:38:19.000Z | 2022-02-11T08:40:40.000Z | neb/minimizers/steepestdescent.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | null | null | null | neb/minimizers/steepestdescent.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | 6 | 2017-03-02T16:59:44.000Z | 2021-01-25T10:06:17.000Z | import numpy
class SteepestDescent(object):
""" The Steepest Descent method takes a step along
the direction of the force
R_i+1 = R_i + k * F_i
where k is the stepsize.
"""
def __init__(self, stepsize=1.0e-3, eps=1.0e-2, verbose=False):
self._stepsize = stepsize
se... | 24.444444 | 67 | 0.615909 |
1d115dffcabd388cec3e6bc6bf58cdfe68223997 | 11,718 | py | Python | sharpy/io/inout_variables.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | sharpy/io/inout_variables.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | sharpy/io/inout_variables.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | import struct
import yaml
import logging
import numpy as np
logger = logging.getLogger(__name__)
class Variable:
num_vars = 0
def __init__(self, name, inout, **kwargs):
self.name = name # str: should be the same as in timestep info
self.xplane_name = kwargs.get('xplane_name', None) # equi... | 37.2 | 120 | 0.573903 |
1d1193c5a6bb4283cda69c231ea94cad8460c16c | 640 | bzl | Python | example/third_party/com_github_alexarchambault.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/com_github_alexarchambault.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/com_github_alexarchambault.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "com_github_alexarchambault_argonaut_shapeless_6_2_2_12",
artifact = "com.github.alexarchambault:argonaut-shapeless_6.2_2.12:1.2.0",
artifact_sha256 = "6d7... | 42.666667 | 93 | 0.720313 |
1d11f667cc4c30aac000108b86ebe64bab5d2c7c | 2,679 | py | Python | pyHide/crypto.py | gourav-j/pyHide | ab32fd155921c16d44d87b2818a8090d11437fce | [
"MIT"
] | null | null | null | pyHide/crypto.py | gourav-j/pyHide | ab32fd155921c16d44d87b2818a8090d11437fce | [
"MIT"
] | null | null | null | pyHide/crypto.py | gourav-j/pyHide | ab32fd155921c16d44d87b2818a8090d11437fce | [
"MIT"
] | null | null | null | # ============================================================================================
# MIT License
# Copyright (c) 2020 Konstantinos Bourantas
# 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 th... | 35.25 | 94 | 0.598731 |
1d11fcde272dcbf3ae76d557a73443e29d36ab8f | 6,536 | py | Python | utils/losses.py | robustrobotics/multi_view_stereonet | ab37254ed6c17a9057d0a006dc7ea2dd636cdd2f | [
"BSD-2-Clause"
] | 16 | 2021-07-04T13:20:02.000Z | 2022-03-14T07:17:34.000Z | utils/losses.py | robustrobotics/multi_view_stereonet | ab37254ed6c17a9057d0a006dc7ea2dd636cdd2f | [
"BSD-2-Clause"
] | 1 | 2022-03-16T03:52:31.000Z | 2022-03-16T03:52:31.000Z | utils/losses.py | robustrobotics/multi_view_stereonet | ab37254ed6c17a9057d0a006dc7ea2dd636cdd2f | [
"BSD-2-Clause"
] | 4 | 2021-07-14T17:17:15.000Z | 2021-12-28T03:32:25.000Z | # Copyright 2021 Massachusetts Institute of Technology
#
# @file losses.py<stereo>
# @author W. Nicholas Greene
# @date 2019-12-07 16:57:08 (Sat)
import torch
from utils import image_utils
def pseudo_huber_loss(truth, pred, scale=2.0):
"""Pseudo-Huber loss used in StereoNet.
Described in 2019 Barron - A Gen... | 38 | 105 | 0.687271 |
1d1251f2fecfb7a9866511f79cce13efdc75df1d | 6,200 | py | Python | tensorflow/contrib/learn/python/learn/estimators/stability_test.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/learn/python/learn/estimators/stability_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/learn/python/learn/estimators/stability_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... | 36.046512 | 80 | 0.705161 |
1d125647dbaf9bfbd76ec534cb7c3da0709205a8 | 8,033 | py | Python | stog/data/dataset_readers/amr_parsing/postprocess/wikification.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 9 | 2021-07-12T22:05:47.000Z | 2022-02-22T03:10:14.000Z | stog/data/dataset_readers/amr_parsing/postprocess/wikification.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 4 | 2021-08-31T08:28:37.000Z | 2022-03-28T05:52:14.000Z | stog/data/dataset_readers/amr_parsing/postprocess/wikification.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | null | null | null | import os
import json
import requests
from time import sleep
from collections import defaultdict
from bs4 import BeautifulSoup
from stog.data.dataset_readers.amr_parsing.io import AMRIO
from stog.utils import logging
logger = logging.init_logger()
def strip(text):
start = 0
while text[start] == '-' and sta... | 41.194872 | 163 | 0.579236 |
1d126d2bf7d1ebf6a1199e3f45c27ed601e84ef8 | 366 | py | Python | src/Features/plot_features.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 2 | 2020-07-28T14:20:45.000Z | 2021-01-07T23:55:52.000Z | src/Features/plot_features.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 7 | 2020-06-30T13:00:10.000Z | 2021-01-09T00:47:22.000Z | src/Features/plot_features.py | amitsou/Multimodal-User-Monitoring | 178049485b4afe5fbf9511e74e4c2f78bd89d426 | [
"MIT"
] | 1 | 2020-12-15T15:07:18.000Z | 2020-12-15T15:07:18.000Z | # -*- coding: utf-8 -*-
""" usage: python3 plot_features.py --segment size 10 """
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(
os.path.realpath(__file__)), "../"))
from Functions import plot_functions as pf
from Functions import utils as ut
if __name__ == '__main__':
segment_size = ut.... | 30.5 | 57 | 0.70765 |
1d127a7e239abf480ac740824fbc978fb362a660 | 4,549 | py | Python | doc/jupyter_execute/examples/models/tracing/tracing.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/tracing/tracing.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/tracing/tracing.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Distributed Tracing Template
#
# Illustrate the configuration for allowing distributed tracing using Jaeger.
#
#
# ## Setup Seldon Core
#
# Install Seldon Core as described in [docs](https://docs.seldon.io/projects/seldon-core/en/latest/workflow/install.html)
#
# Then ... | 28.791139 | 272 | 0.729391 |
1d1282e259ee6e75c76a311d7b751f91b95dda58 | 7,632 | py | Python | appengine/findit/libs/http/retry_http_client.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/libs/http/retry_http_client.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/libs/http/retry_http_client.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
import urllib
from libs.http.interceptor import LoggingInterceptor
class RetryHttpClient(object):
"""Represents a http client to send http/h... | 33.182609 | 87 | 0.632862 |
1d1285fd515e9fba76480fd692a12b7d958906e1 | 6,248 | py | Python | model/ResNest/resnest.py | chansoopark98/CSNet-seg | 7de095a71cb01821d269acefe9bc3b0f284dc26d | [
"MIT"
] | 7 | 2021-10-11T07:13:06.000Z | 2022-03-03T12:35:46.000Z | model/ResNest/resnest.py | chansoopark98/CSNet-seg | 7de095a71cb01821d269acefe9bc3b0f284dc26d | [
"MIT"
] | null | null | null | model/ResNest/resnest.py | chansoopark98/CSNet-seg | 7de095a71cb01821d269acefe9bc3b0f284dc26d | [
"MIT"
] | null | null | null | import tensorflow as tf
import torch
from .resnet import ResNet
# _url_format = 'https://s3.us-west-1.wasabisys.com/resnest/torch/{}-{}.pth'
_url_format = 'https://github.com/zhanghang1989/ResNeSt/releases/download/weights_step1/{}-{}.pth'
_model_sha256 = {name: checksum for checksum, name in [
('528c19ca', 'res... | 41.653333 | 175 | 0.663892 |
1d129226c4d38b20407d4f92fc310079a26ff4d7 | 578 | py | Python | office365/graph/onedrive/driveItemUploadableProperties.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/onedrive/driveItemUploadableProperties.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/onedrive/driveItemUploadableProperties.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | from office365.runtime.client_value_object import ClientValueObject
class DriveItemUploadableProperties(ClientValueObject):
"""The driveItemUploadableProperties resource represents an item being uploaded when creating an upload session."""
def __init__(self):
self.fileSystemInfo = None
self.n... | 34 | 119 | 0.724913 |
1d12d47b0c02c2d888964ab766a6621279d92429 | 3,937 | py | Python | alipay/aop/api/request/AlipayMsaasItapDataSyncRequest.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/request/AlipayMsaasItapDataSyncRequest.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/request/AlipayMsaasItapDataSyncRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayMsaasItapDataSyncModel import AlipayMsaasItapDataSyncModel
class AlipayMsaasItapDataSyncRequest(object):
def __init__(sel... | 27.151724 | 148 | 0.641605 |
1d12d5d08d64c5ff9a877d769ec0e7a52da63512 | 12,374 | py | Python | otrrentworker/etl/etl.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | otrrentworker/etl/etl.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | otrrentworker/etl/etl.py | omza/otrrentworker | faa70884a29dd271a33346ed45b3f43e5d7a7a21 | [
"MIT"
] | null | null | null | """ imports & globals """
import urllib.request
import csv
import os
from datetime import datetime, date, timedelta
""" azure storage repositories """
from azurestorage import db
from azurestorage.wrapper import StorageTableCollection
from azurestorage.tablemodels import Genre, Recording, Torrent
from helpers.helper ... | 39.0347 | 199 | 0.53176 |
1d12d6f8ba80c810453b7d5648ef7a10be320f69 | 4,674 | py | Python | integration-tests/integration_tests/api/parameters/post_parameters_header.py | JamesHinshelwood/openapi-python-client | 08bc2acf91d50d4fcdd7f0e50a8b0d3f00a187d9 | [
"MIT"
] | 1 | 2022-02-17T11:45:13.000Z | 2022-02-17T11:45:13.000Z | integration-tests/integration_tests/api/parameters/post_parameters_header.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | integration-tests/integration_tests/api/parameters/post_parameters_header.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.post_parameters_header_response_200 import PostParametersHeaderResponse200
from ...models.public_error import PublicError
from ...types import Response
def _get_kwargs(
*,
client: Client,
boolean_heade... | 25.129032 | 114 | 0.662388 |
1d12e3ed89cc90ddd123bb091e61f0f704a2175a | 2,285 | py | Python | pyOCD/board/board.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 2 | 2019-07-18T06:51:27.000Z | 2021-06-30T00:36:12.000Z | pyOCD/board/board.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | null | null | null | pyOCD/board/board.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 1 | 2017-07-20T20:47:18.000Z | 2017-07-20T20:47:18.000Z | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 ... | 28.209877 | 73 | 0.621882 |
1d12e672d7bc0da47889883ca27aec43dc688952 | 1,504 | py | Python | practise/02_binarytree_findlca.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | practise/02_binarytree_findlca.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | practise/02_binarytree_findlca.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | # Given a binary tree and two nodes, find the lca
class Node:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def find_lca(root, n1, n2):
if root == None:
return root
if root == n1 or root == n2:
return root
left = find_lca(root.left, n1, n2)
right =... | 15.04 | 49 | 0.630319 |
1d12ef101522602633dc05f9b94c598cf674a2da | 1,437 | py | Python | tests/test_provider_abergmeier_exasol.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | tests/test_provider_abergmeier_exasol.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | tests/test_provider_abergmeier_exasol.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # tests/test_provider_abergmeier_exasol.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:16:02 UTC)
def test_provider_import():
import terrascript.provider.abergmeier.exasol
def test_resource_import():
from terrascript.resource.abergmeier.exasol import exasol_connection
from terrascrip... | 30.574468 | 80 | 0.788448 |
1d1303183429b0b13c1dfefc3733f004af17f1b3 | 2,453 | py | Python | examples/managed-nodegroups-py/__main__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | null | null | null | examples/managed-nodegroups-py/__main__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | null | null | null | examples/managed-nodegroups-py/__main__.py | floknip/pulumi-eks | 4598fed19874f6ce9e44a33b55c87479d2427d7e | [
"Apache-2.0"
] | 1 | 2021-07-23T03:28:27.000Z | 2021-07-23T03:28:27.000Z | import pulumi
import pulumi_aws as aws
import pulumi_eks as eks
import iam
# IAM roles for the node groups.
role0 = iam.create_role("example-role0")
role1 = iam.create_role("example-role1")
role2 = iam.create_role("example-role2")
# Create an EKS cluster.
cluster = eks.Cluster("example-managed-nodegroups",
... | 49.06 | 118 | 0.506319 |
1d131580464df26cdb9ea35d47e449bac281c3d5 | 2,054 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/auth_info.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/auth_info.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/auth_info.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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 ... | 37.345455 | 78 | 0.609056 |
1d135ed07546e119e7f11d1404a5f13440fe3083 | 8,386 | py | Python | code/mw_pks.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | code/mw_pks.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | code/mw_pks.py | modichirag/21cmhod | 0807a7b0b880f4ba5bc7161b843d500ddcece5a7 | [
"MIT"
] | null | null | null | import numpy as np
import re
from pmesh.pm import ParticleMesh
from nbodykit.lab import BigFileCatalog, MultipleSpeciesCatalog, FFTPower
from nbodykit import setup_logging
from mpi4py import MPI
# enable logging, we have some clue what's going on.
setup_logging('info')
#
#
#Global, fixed things
scratch1... | 37.945701 | 98 | 0.588481 |
1d13a52e142bde992b28d89e7b5a1f829ee633f8 | 6,535 | py | Python | ops/non_local.py | temi92/epic-kitchens-55-action-models | 40e984bbdcf502539b3569774cb6b5526eb71c3c | [
"Apache-2.0"
] | 62 | 2019-08-05T04:32:47.000Z | 2020-06-11T16:14:16.000Z | ops/non_local.py | temi92/epic-kitchens-55-action-models | 40e984bbdcf502539b3569774cb6b5526eb71c3c | [
"Apache-2.0"
] | 13 | 2019-08-05T11:10:07.000Z | 2020-06-21T21:01:38.000Z | ops/non_local.py | temi92/epic-kitchens-55-action-models | 40e984bbdcf502539b3569774cb6b5526eb71c3c | [
"Apache-2.0"
] | 8 | 2019-08-07T06:28:23.000Z | 2020-04-24T08:58:05.000Z | # Non-local block using embedded gaussian
# Code from
# https://github.com/AlexHex7/Non-local_pytorch/blob/master/Non-Local_pytorch_0.3.1/lib/non_local_embedded_gaussian.py
import torch
from torch import nn
from torch.nn import functional as F
class _NonLocalBlockND(nn.Module):
def __init__(
self,
... | 28.662281 | 118 | 0.55241 |
1d13cc38318f1e7ef80825dbc07e4db1bb015f6c | 1,620 | py | Python | geneticalgorithm2/another_plotting_tools.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 34 | 2020-11-25T15:01:19.000Z | 2022-03-23T17:10:33.000Z | geneticalgorithm2/another_plotting_tools.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | null | null | null | geneticalgorithm2/another_plotting_tools.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 7 | 2020-11-30T16:50:16.000Z | 2022-02-22T16:03:45.000Z |
from typing import Optional
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib.colors import Normalize
from matplotlib.ticker import NullLocator
def plot_pop_scores(scores, title: str = 'Population scores', save_as: Optional[str] = None):
"""
plots scores (numeri... | 27.931034 | 93 | 0.599383 |
1d1411e073cae5ad169f58ec788649e78f582ea6 | 3,194 | py | Python | example/django_example/django_example/settings.py | rexzhang/asgi-middleware-static-file | 8e228cb88f09ab41e566377b7dee293fa4a79af4 | [
"MIT"
] | 12 | 2020-04-15T04:13:50.000Z | 2022-01-17T12:01:15.000Z | example/django_example/django_example/settings.py | rexzhang/asgi-middleware-static-file | 8e228cb88f09ab41e566377b7dee293fa4a79af4 | [
"MIT"
] | 2 | 2021-03-04T07:09:24.000Z | 2021-03-22T03:58:49.000Z | example/django_example/django_example/settings.py | rexzhang/asgi-middleware-static-file | 8e228cb88f09ab41e566377b7dee293fa4a79af4 | [
"MIT"
] | null | null | null | """
Django settings for django_example project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from ... | 27.299145 | 91 | 0.702567 |
1d141ab3b8f1a140c8c59a69eb4293c9a3f0c2df | 3,327 | py | Python | gemd/entity/object/tests/test_ingredient_run.py | CitrineInformatics/gemd-python | 4f80045c1b481269c7451f6a205755c22093eb74 | [
"Apache-2.0"
] | 7 | 2020-04-02T11:11:09.000Z | 2022-02-05T23:19:51.000Z | gemd/entity/object/tests/test_ingredient_run.py | CitrineInformatics/taurus | f87217a0ba7f209cc05f71f28810b7242c8e24b0 | [
"Apache-2.0"
] | 29 | 2019-09-09T23:20:41.000Z | 2020-03-31T19:13:01.000Z | gemd/entity/object/tests/test_ingredient_run.py | CitrineInformatics/taurus | f87217a0ba7f209cc05f71f28810b7242c8e24b0 | [
"Apache-2.0"
] | 3 | 2019-09-20T19:01:02.000Z | 2019-11-26T02:43:45.000Z | """Tests of the ingredient run object."""
import pytest
from gemd.entity.object.ingredient_run import IngredientRun
from gemd.entity.object.process_run import ProcessRun
from gemd.entity.bounds.real_bounds import RealBounds
def test_ingredient_reassignment():
"""Check that an ingredient run can be re-assigned to... | 34.65625 | 79 | 0.677187 |
1d1429e5186616bea4587f0e6f2c98e8e5e74529 | 6,500 | py | Python | ocr_engine/vietocr/tool/translate.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | 1 | 2021-06-30T11:01:25.000Z | 2021-06-30T11:01:25.000Z | ocr_engine/vietocr/tool/translate.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | ocr_engine/vietocr/tool/translate.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import math
from PIL import Image
from torch.nn.functional import log_softmax
from ..model.transformerocr import VietOCR
from ..model.vocab import Vocab
from ..model.beam import Beam
def batch_translate_beam_search(img, model, beam_size=4, candidates=1, max_seq_length=128, sos_token=1,... | 31.862745 | 131 | 0.656769 |
1d147896d73bd86b870cc38576a062adf789c314 | 2,961 | py | Python | cellphonedb/src/tests/methods/test_terminal_method_analysis.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | cellphonedb/src/tests/methods/test_terminal_method_analysis.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | cellphonedb/src/tests/methods/test_terminal_method_analysis.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | import os
import pandas as pd
from cellphonedb.src.app.flask.flask_app import create_app
from cellphonedb.src.app.cellphonedb_app import output_test_dir, data_test_dir, cellphonedb_app
from cellphonedb.src.local_launchers.local_method_launcher import LocalMethodLauncher
from cellphonedb.src.tests.cellphone_flask_test... | 55.867925 | 122 | 0.612293 |
1d1480a79e1f9850cf7b758b40442853a807132d | 3,887 | py | Python | unicorn/server/api.py | codingchili/unicorn-analytics | c878e52cd84012c1ed3b9cea69eb878b0e438541 | [
"MIT"
] | 3 | 2018-11-12T18:02:06.000Z | 2020-12-12T19:13:02.000Z | unicorn/server/api.py | codingchili/unicorn-analytics | c878e52cd84012c1ed3b9cea69eb878b0e438541 | [
"MIT"
] | 2 | 2018-11-14T22:47:12.000Z | 2018-11-18T07:32:20.000Z | unicorn/server/api.py | codingchili/unicorn-analytics | c878e52cd84012c1ed3b9cea69eb878b0e438541 | [
"MIT"
] | null | null | null | import asyncio
import logging
import json
import random
import string
from unicorn.util.config import server_config
from aiohttp import web
from unicorn.util.ansi import *
from unicorn.visualizer.visualizer import Visualizer
config = server_config()
visualizer = Visualizer()
logger = logging.getLogger()
... | 30.131783 | 94 | 0.593002 |
1d14d31d85c18e8a0bcde1d4f57017d0c5a9ed7d | 1,007 | py | Python | django_cron/backends/lock/file.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | django_cron/backends/lock/file.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | django_cron/backends/lock/file.py | ParikhKadam/django-cron | 82c4939af4691d2ba4deeb5c9bec4d1573b51815 | [
"MIT"
] | null | null | null | import os
from django.conf import settings
from django.core.files import locks
from django_cron.backends.lock.base import DjangoCronJobLock
class FileLock(DjangoCronJobLock):
"""
Quite a simple lock backend that uses kernel based locking
"""
__lock_fd = None
def lock(self):
lock_name =... | 26.5 | 75 | 0.637537 |
1d14ef308140fcc4f4ba96cbb50ed87a3609a38a | 1,431 | py | Python | app/recipe/serializers.py | sleonvaz/recipe-app-api | 673953dad7a15274de2f1fd9101bbc3d110dbf3b | [
"MIT"
] | null | null | null | app/recipe/serializers.py | sleonvaz/recipe-app-api | 673953dad7a15274de2f1fd9101bbc3d110dbf3b | [
"MIT"
] | null | null | null | app/recipe/serializers.py | sleonvaz/recipe-app-api | 673953dad7a15274de2f1fd9101bbc3d110dbf3b | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
"""Serializer for tag objects"""
class Meta:
model = Tag
fields = ('id', 'name')
read_only_fields = ('id',)
class IngredientSerializer(serializer... | 26.018182 | 65 | 0.6471 |
1d14fdb81647b693b6c661ee253bf1bd5a84d86b | 7,170 | py | Python | m2/runAudioExperiment/trial_data.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | m2/runAudioExperiment/trial_data.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | m2/runAudioExperiment/trial_data.py | m2march/runAudioExperiment | 642df2da9b9dea743278f89149176893a83929b9 | [
"MIT"
] | null | null | null | import os
import random
import logging
import time
import sounddevice
import pandas as pd
from scipy.io import wavfile
from m2.runAudioExperiment import audio
TRIAL_SETTINGS_FILENAME = 'trial_settings.csv'
TRIAL_DURATIONS_FILENAME = 'trial_durations.csv'
logger = logging.getLogger('m2.runAudioExperiment.trials')
cla... | 40.508475 | 79 | 0.595537 |
1d1505397c2c638440627d8d6d5676d0bc568eb4 | 52,936 | py | Python | scielomanager/api/tests_resources_v2.py | patymori/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 8 | 2015-07-07T03:09:16.000Z | 2019-03-16T04:46:32.000Z | scielomanager/api/tests_resources_v2.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 245 | 2015-01-14T13:29:58.000Z | 2022-01-13T00:48:44.000Z | scielomanager/api/tests_resources_v2.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 5 | 2016-02-19T15:47:08.000Z | 2019-03-16T04:46:20.000Z | #coding: utf-8
import json
import datetime
from django_webtest import WebTest
from django_factory_boy import auth
from journalmanager.tests import modelfactories
from editorialmanager.tests import modelfactories as editorial_modelfactories
from api.resources_v2 import (
JournalResource,
IssueResource,
)
... | 38.639416 | 155 | 0.654035 |
1d15179452c63e9080ea4b9f1669430c240a081d | 195 | py | Python | tests/plugins/loading/plugins/sources/malformedminversion/number.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/plugins/loading/plugins/sources/malformedminversion/number.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/plugins/loading/plugins/sources/malformedminversion/number.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # Plugins are required to specify the BST_MIN_VERSION
from buildstream import Source
class MalformedMinVersion(Source):
BST_MIN_VERSION = 2.0
def setup():
return MalformedMinVersion
| 16.25 | 53 | 0.779487 |
1d15625f9aec9962df58323ffbddda25e8a33e3c | 2,868 | py | Python | Spider7K7K/spider.py | seamile/Weeds | 8b05174ca26b8aa7cc79653ccb7d483bc58f0ed1 | [
"MIT"
] | 9 | 2017-11-18T06:44:43.000Z | 2018-08-25T11:14:53.000Z | Spider7K7K/spider.py | seamile/Weeds | 8b05174ca26b8aa7cc79653ccb7d483bc58f0ed1 | [
"MIT"
] | null | null | null | Spider7K7K/spider.py | seamile/Weeds | 8b05174ca26b8aa7cc79653ccb7d483bc58f0ed1 | [
"MIT"
] | 3 | 2017-11-18T06:45:53.000Z | 2017-12-26T14:53:26.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import json
import time
import aiohttp
import asyncio
from pyquery import PyQuery
BASE_URL = 'http://www.7k7k.com'
sem = asyncio.Semaphore(32)
@asyncio.coroutine
def get(url, *args, **kwargs):
url = url.split('#')[0]
with (yield from sem):
re... | 26.803738 | 75 | 0.593096 |
1d157045245ef6c0f35f24f5d79b1d964219f80b | 2,585 | py | Python | Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2017 Igalia S.L.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.... | 40.390625 | 110 | 0.737331 |
1d158dfe7ff49a674037be83e3c38461c9415892 | 6,383 | py | Python | app_config.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 1 | 2017-04-15T01:48:27.000Z | 2017-04-15T01:48:27.000Z | app_config.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 153 | 2017-04-14T18:06:26.000Z | 2017-06-02T13:08:09.000Z | app_config.py | nprapps/idp-georgia | 316eba6195b7f410567a7e11eb4811ff7cba54cc | [
"Unlicense"
] | 1 | 2021-02-18T11:15:52.000Z | 2021-02-18T11:15:52.000Z | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
"""
Project-wide application configuration.
DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE.
They will be exposed to users. Use environment variables instead.
See get_secrets() below for a fast way to access them.
"""
import logging
import os
from authomatic.providers ... | 26.485477 | 109 | 0.677268 |
1d1590dbb1785239b72ca00676f944bb058df952 | 2,581 | py | Python | envs/__init__.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | 1 | 2019-11-17T11:05:26.000Z | 2019-11-17T11:05:26.000Z | envs/__init__.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | envs/__init__.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | from gym.envs.registration import register
# Biased Mujoco
register(
'HalfCheetah_FLVel-v0',
entry_point='envs.utils:mujoco_wrapper',
kwargs={'entry_point': 'envs.mujoco.half_cheetah:HalfCheetahVelEnv_FL'},
max_episode_steps=1000
)
register(
'HalfCheetah_FLBias-v0',
entry_point='envs.utils:mu... | 26.070707 | 79 | 0.722976 |
1d159220f1b7346ed73b0802fe0f91e24c142b75 | 2,356 | py | Python | catalyst/core/callbacks/formatters.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | catalyst/core/callbacks/formatters.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | null | null | null | catalyst/core/callbacks/formatters.py | balakhonoff/catalyst | 82d904aee97045efbaef3963e36c2ce5173ddac4 | [
"Apache-2.0"
] | 1 | 2018-12-21T15:56:21.000Z | 2018-12-21T15:56:21.000Z | from typing import Dict
from abc import ABC, abstractmethod
import logging
from catalyst.core import State, utils
class MetricsFormatter(ABC, logging.Formatter):
"""Abstract metrics formatter."""
def __init__(self, message_prefix):
"""
Args:
message_prefix: logging format string
... | 29.45 | 74 | 0.609932 |
1d16060c83f64dd1bd633ed6c2dd7aadf767abe6 | 23,743 | py | Python | reference_graph.py | heuristicus/paper-utils | 32b729816f36c7e30ad6723328a2487550c8d869 | [
"MIT"
] | null | null | null | reference_graph.py | heuristicus/paper-utils | 32b729816f36c7e30ad6723328a2487550c8d869 | [
"MIT"
] | 10 | 2018-05-28T12:48:54.000Z | 2018-08-24T14:17:05.000Z | reference_graph.py | heuristicus/paper-utils | 32b729816f36c7e30ad6723328a2487550c8d869 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import logging
import argparse
import string
import pickle
from extract_references import ReferenceGroup, refgroup_from_filelist, FilenameRegex
import unidecode
import pygraphviz as pgv
from graph_tool.all import *
# Most usual stopwords would be quite unique if they appeared... | 41.581436 | 426 | 0.611633 |
1d160c4589bcf518a9aa9abb486a436389f8cd07 | 940 | py | Python | 6_reports/ocr_to_csv.py | invinst/cpdp_ocr | cf5a3f9c9267e28c686ced1e2e3a04bd896c230b | [
"MIT"
] | 2 | 2020-09-02T18:23:32.000Z | 2020-10-01T22:12:47.000Z | 6_reports/ocr_to_csv.py | invinst/cpdp_ocr | cf5a3f9c9267e28c686ced1e2e3a04bd896c230b | [
"MIT"
] | null | null | null | 6_reports/ocr_to_csv.py | invinst/cpdp_ocr | cf5a3f9c9267e28c686ced1e2e3a04bd896c230b | [
"MIT"
] | 1 | 2022-02-27T22:24:19.000Z | 2022-02-27T22:24:19.000Z | #!/usr/bin/python3
import psycopg2
import csv
def pg_conn(db_name='cpdp', db_host='localhost', db_user='cpdp', db_pass='cpdp'):
vals = dict(db_name=db_name, db_host=db_host, db_user=db_user, db_pass=db_pass)
conn_str = "dbname={db_name} host={db_host} user={db_user} password={db_pass}".format(**vals)
conn... | 23.5 | 97 | 0.656383 |
1d16195ce0ade67aefe7a380efe72b8841250619 | 186,656 | py | Python | unittests/traffic_generator/test_tg.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | unittests/traffic_generator/test_tg.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | unittests/traffic_generator/test_tg.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # Copyright (c) 2011 - 2017, Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 46.769231 | 171 | 0.630615 |
1d1699e9f616a4aa241995cc8a356db3f4362068 | 412 | py | Python | panda_prospecting/panda_prospecting/wsgi.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | panda_prospecting/panda_prospecting/wsgi.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | 10 | 2017-06-09T18:47:26.000Z | 2019-11-28T15:53:48.000Z | panda_prospecting/panda_prospecting/wsgi.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | """
WSGI config for panda_prospecting project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("D... | 24.235294 | 78 | 0.796117 |
1d16dbc0053fc2e00c7bdca2f49e4afb9d85c175 | 3,949 | py | Python | examples/keyboard.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | 1 | 2021-02-11T17:52:48.000Z | 2021-02-11T17:52:48.000Z | examples/keyboard.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | null | null | null | examples/keyboard.py | Trainzack/vmflib2 | 9bc9803b3c8c644346b5a5eb864c0deaf544d8a6 | [
"BSD-2-Clause"
] | 1 | 2021-02-12T18:56:51.000Z | 2021-02-12T18:56:51.000Z | #! /usr/bin/env python3
"""Example map generator: keyboard
This script demonstrates vmflib by generating a map (consisting of a room containing a musical keyboard)
and writing it to "keyboard.vmf". You can open the resulting file
using the Valve Hammer Editor and compile it for use in-game.
"""
from vmflib2 import... | 33.752137 | 128 | 0.676121 |
1d16ff2801e66aead3bbfa07b1dc1c4f434fdaa9 | 2,774 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/predict_5crop_mean.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/predict_5crop_mean.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/9_crop/predict_5crop_mean.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
#os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
from tqdm import tqdm
eps = 0.004
desired = {
0: 0.36239782,
1: 0.043841336,
2: 0.075268817,
3: 0.059322034,
4: 0.075268817,
5: 0.075268817,
6: 0... | 26.419048 | 103 | 0.652487 |
1d170b4615a93f0b4e1f354df7227b6dbe513658 | 401 | py | Python | test/basic.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 37 | 2015-09-10T13:52:40.000Z | 2021-11-17T11:53:30.000Z | test/basic.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 270 | 2015-09-09T13:00:53.000Z | 2021-12-16T17:39:05.000Z | test/basic.py | Patater/greentea | 4fcf55396ab7f5960a542edb88365686b8f33624 | [
"Apache-2.0"
] | 51 | 2015-09-04T13:16:47.000Z | 2021-11-18T15:40:03.000Z | #
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
import unittest
class BasicTestCase(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_example(self):
self.assertEqual(True, True)
s... | 17.434783 | 71 | 0.665835 |
1d17246c0125ca2f5e225a7b4628d3e435d41bf1 | 2,110 | py | Python | homeassistant/components/automation/template.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/automation/template.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/automation/template.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | """
Offer template automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/components/automation/#template-trigger
"""
import logging
from homeassistant.const import CONF_VALUE_TEMPLATE, EVENT_STATE_CHANGED
from homeassistant.exceptions import Temp... | 31.029412 | 78 | 0.699526 |
1d17397ed9be81ed00bd3d38443543f821df9ed3 | 3,854 | py | Python | udsoncan/services/RoutineControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | 1 | 2021-03-21T12:18:23.000Z | 2021-03-21T12:18:23.000Z | udsoncan/services/RoutineControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | udsoncan/services/RoutineControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from . import *
from udsoncan.Response import Response
from udsoncan.exceptions import *
import struct
class RoutineControl(BaseService):
_sid = 0x31
class ControlType(BaseSubfunction):
u"""
RoutineControl defined subfunctions
"""
... | 38.158416 | 161 | 0.594966 |
1d178415432f1d02b9b83a763d3fbd418a7a3c91 | 7,972 | py | Python | nbt.py | aheadley/pynemap | f2aa373e7c43755ce73c0a60110b609018cd2dcb | [
"MIT"
] | 6 | 2015-10-15T08:28:19.000Z | 2021-11-17T23:02:02.000Z | nbt.py | aheadley/pynemap | f2aa373e7c43755ce73c0a60110b609018cd2dcb | [
"MIT"
] | null | null | null | nbt.py | aheadley/pynemap | f2aa373e7c43755ce73c0a60110b609018cd2dcb | [
"MIT"
] | null | null | null | from struct import pack, unpack
from gzip import GzipFile
TAG_END = 0
TAG_BYTE = 1
TAG_SHORT = 2
TAG_INT = 3
TAG_LONG = 4
TAG_FLOAT = 5
TAG_DOUBLE = 6
TAG_BYTE_ARRAY = 7
TAG_STRING = 8
TAG_LIST = 9
TAG_COMPOUND = 10
class TAG(object):
"""Each Tag needs to take a buffer, an index into the buffer and return the index ... | 28.169611 | 232 | 0.705971 |
1d17be51ab0e60faedaddbe614f4587e7145bbad | 821 | py | Python | setup.py | davidwtbuxton/gae-pytz | 24741951a7af3e79cd8727ae3f79265decc93fef | [
"MIT"
] | null | null | null | setup.py | davidwtbuxton/gae-pytz | 24741951a7af3e79cd8727ae3f79265decc93fef | [
"MIT"
] | null | null | null | setup.py | davidwtbuxton/gae-pytz | 24741951a7af3e79cd8727ae3f79265decc93fef | [
"MIT"
] | null | null | null | from distutils.core import setup
import pytz
setup(
name='gae-pytz',
version=pytz.__version__,
url='https://github.com/potatolondon/gae-pytz/',
license='MIT',
author='Stuart Bishop',
author_email='stuart@stuartbishop.net',
description='A version of pytz for Django on Google App Engine.',
... | 29.321429 | 71 | 0.634592 |
1d1837c9f01251fd909371abc2e5d67f2e8b751b | 2,111 | py | Python | flask_perm/services/user_group_member.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 8 | 2016-09-11T14:40:44.000Z | 2022-03-01T16:55:33.000Z | flask_perm/services/user_group_member.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 1 | 2021-07-28T14:25:02.000Z | 2021-07-29T07:17:25.000Z | flask_perm/services/user_group_member.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 7 | 2016-08-10T07:56:26.000Z | 2022-01-11T09:14:00.000Z | # -*- coding: utf-8 -*-
from sqlalchemy import func
from sqlalchemy.exc import IntegrityError
from ..core import db
from ..models import UserGroupMember
def create(user_id, user_group_id):
member = UserGroupMember(
user_id=user_id,
user_group_id=user_group_id,
)
db.session.add(member)
t... | 28.527027 | 98 | 0.689721 |
1d186411f266b90956a0f9e020ba0f2ffc32020d | 4,351 | py | Python | joulescope/test/test_device.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 29 | 2018-12-19T22:42:09.000Z | 2022-01-31T12:26:52.000Z | joulescope/test/test_device.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 23 | 2019-07-21T23:44:46.000Z | 2022-03-11T13:29:11.000Z | joulescope/test/test_device.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 9 | 2019-07-22T00:07:53.000Z | 2021-11-26T11:46:19.000Z | # Copyright 2018 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 37.188034 | 99 | 0.676856 |
1d18664146a02b7721a80577610a73a68def2aa2 | 1,743 | py | Python | ansiblemetrics/playbook/num_blocks.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | 1 | 2020-04-24T16:09:14.000Z | 2020-04-24T16:09:14.000Z | ansiblemetrics/playbook/num_blocks.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | ansiblemetrics/playbook/num_blocks.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | from ansiblemetrics.ansible_metric import AnsibleMetric
class NumBlocks(AnsibleMetric):
""" This class measures the number of block sections in a playbook.
Blocks allow for logical grouping of tasks and in play error handling.
Most of what you can apply to a single task (with the exception of loops) can ... | 28.57377 | 118 | 0.535284 |
1d188b87a17cbf1fb855cd63479f75e698c242a7 | 105 | py | Python | transforms/__init__.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | 292 | 2020-10-14T01:04:22.000Z | 2022-03-31T15:34:59.000Z | transforms/__init__.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | 33 | 2021-02-17T03:41:16.000Z | 2022-03-19T12:39:41.000Z | transforms/__init__.py | ozcell/pytorch-auto-drive | f1c2fd223cf7d307a3968fe671d0271b03ced39c | [
"BSD-3-Clause"
] | 48 | 2020-11-09T05:54:46.000Z | 2022-03-31T10:32:55.000Z | # Modified from pytorch/vision/commit/a05598032c616bdd7010ab57fb38cf549695f988
from .transforms import *
| 35 | 78 | 0.866667 |
1d18994d897e6a0d0967a91d212c94b89b00f522 | 464 | py | Python | orders/migrations/0007_auto_20190127_1450.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | 1 | 2021-09-24T04:32:35.000Z | 2021-09-24T04:32:35.000Z | orders/migrations/0007_auto_20190127_1450.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | null | null | null | orders/migrations/0007_auto_20190127_1450.py | MahmudulHassan5809/Ecommerce-WebSite-With-Django2 | a9c76e6e925e236ba064be194a03d9d6635edac2 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-27 08:50
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0006_auto_20190127_1450'),
]
operations = [
migrations.AlterField(
model_name='order',
nam... | 23.2 | 110 | 0.622845 |
1d18cc683e46851eafb0590090267e910e8b8490 | 5,169 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/__init__.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 ... | 46.151786 | 94 | 0.829754 |
1d18d6beffe78d8b50f1d515f68e1cf0e0530147 | 9,577 | py | Python | tensorflow/contrib/metrics/python/kernel_tests/histogram_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/metrics/python/kernel_tests/histogram_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/metrics/python/kernel_tests/histogram_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # 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... | 37.410156 | 80 | 0.62932 |
1d18d99bb96b05a3aec41a1cda4386051555921c | 4,101 | py | Python | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
import mangrove.errors.MangroveException as ex
from django.utils.translation import get_language, ugettext, activate
def data_object_not_found_formatter(exception, message):
return message % (exception.data[0].capitalize(), ugettext(exception.data[1]), exception.data[2])
def ... | 58.585714 | 170 | 0.719093 |
1d190a5f350049d9062c63d1ac5728c0a2013d46 | 797 | py | Python | server/server/urls.py | mezidia/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 6 | 2021-02-10T10:50:18.000Z | 2021-08-21T10:44:37.000Z | server/server/urls.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 116 | 2021-02-10T08:09:03.000Z | 2022-03-30T01:50:02.000Z | server/server/urls.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 1 | 2021-08-16T14:31:13.000Z | 2021-08-16T14:31:13.000Z | """song helper 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-base... | 36.227273 | 75 | 0.705144 |
1d1946a4c2a0cff571e6af9002aff517bfa876d7 | 3,072 | py | Python | Clustering/k_means/k_means.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | Clustering/k_means/k_means.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | Clustering/k_means/k_means.py | AwsafAlam/Pattern_Recognition | cf52b833c6e66fe4920bc8a76b78246fbca83842 | [
"MIT"
] | null | null | null | import random
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
INPUT_FILE="blobs.txt"
ITERATIONS=100
#Define label for differnt point group
NOISE = 0
UNASSIGNED = 0
core=-1
edge=-2
dataset = []
def read_dataset():
"""
Reading dataset
"""
global INPUT_FILE, dataset
f = open(INPUT_FILE,... | 27.428571 | 181 | 0.66276 |
1d1971151529901d3554ee7282ef1eeecb2703cb | 190 | py | Python | Strings/camelcase.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | Strings/camelcase.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | Strings/camelcase.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | #https://www.hackerrank.com/challenges/camelcase
#!/bin/python3
import sys
s = input().strip()
if len(s)>0:
counter=1
for i in s:
if i.isupper():
counter+=1
print(counter) | 14.615385 | 48 | 0.642105 |
1d19713549af3d09c0f12830adddeb7cb7b826a1 | 4,495 | py | Python | xblock/exceptions.py | cclauss/XBlock | 3e5341015e8f8b4a203ac4a41471bac5549182b0 | [
"Apache-2.0"
] | null | null | null | xblock/exceptions.py | cclauss/XBlock | 3e5341015e8f8b4a203ac4a41471bac5549182b0 | [
"Apache-2.0"
] | null | null | null | xblock/exceptions.py | cclauss/XBlock | 3e5341015e8f8b4a203ac4a41471bac5549182b0 | [
"Apache-2.0"
] | null | null | null | """
Module for all xblock exception classes
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from webob import Response
try:
import simplejson as json # pylint: disable=F0401
except ImportError:
import json
class XBlockNotFoundError(Exception):
"""
Raised to i... | 29.966667 | 95 | 0.660734 |
1d19846dc385d1cb36f35f3037954fad54d850fd | 2,120 | py | Python | jumpscale/packages/tfgrid_solutions/chats/network.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/tfgrid_solutions/chats/network.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/tfgrid_solutions/chats/network.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from jumpscale.loader import j
from jumpscale.sals.chatflows.chatflows import StopChatFlow, chatflow_step
from jumpscale.sals.reservation_chatflow import deployer, deployment_context, solutions
from jumpscale.packages.tfgrid_solutions.sals.network_chat_base import NetworkBase
class NetworkDeploy(NetworkBase):
tit... | 35.932203 | 120 | 0.625472 |
1d1989799823af452dfa1f6aba2210405abea33c | 1,408 | py | Python | plugins/mask.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 1 | 2020-10-29T15:44:57.000Z | 2020-10-29T15:44:57.000Z | plugins/mask.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | null | null | null | plugins/mask.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 4 | 2020-10-28T09:02:35.000Z | 2020-12-27T22:45:57.000Z | from pikabot.utils import *
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
@ItzSjDude(outgoing=True, pattern="mask(.*)")
async def _(event):
if event.fwd_from:
return
if not event.reply_to_msg_id:
await event.edit("```Reply to any user message.```")
... | 36.102564 | 86 | 0.632102 |
1d19ba241cc0de3c1e19d0d1ea860cd18bb43bb1 | 645 | py | Python | rentals/migrations/0003_auto_20180308_1706.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | null | null | null | rentals/migrations/0003_auto_20180308_1706.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | 1 | 2018-11-06T03:17:14.000Z | 2018-11-06T03:17:14.000Z | rentals/migrations/0003_auto_20180308_1706.py | dpakach/RentalService | 2fe2c899b7f149ed3f0fc475100beaa0bc76619e | [
"MIT"
] | 1 | 2020-02-04T10:44:11.000Z | 2020-02-04T10:44:11.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-03-08 17:06
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("rentals", "0002_auto_20180306_0823")]
operations = [
migra... | 25.8 | 64 | 0.590698 |
1d19c4b36b0445ed0e9cb806e637456bbe3e01c3 | 4,610 | py | Python | src/testers/check_semantics.py | flokli/Triton | db520a9da012b28f23321ff082aa810e1f1552ff | [
"Apache-2.0"
] | 1 | 2018-10-09T12:08:55.000Z | 2018-10-09T12:08:55.000Z | src/testers/check_semantics.py | flokli/Triton | db520a9da012b28f23321ff082aa810e1f1552ff | [
"Apache-2.0"
] | null | null | null | src/testers/check_semantics.py | flokli/Triton | db520a9da012b28f23321ff082aa810e1f1552ff | [
"Apache-2.0"
] | 1 | 2018-10-09T12:08:44.000Z | 2018-10-09T12:08:44.000Z |
from triton import *
import pintool as Pintool
import os
BLUE = "\033[94m"
ENDC = "\033[0m"
GREEN = "\033[92m"
RED = "\033[91m"
# Check if we are on a Travis environment
Travis = False
try:
if os.environ['TRAVIS']:
Travis = True
except:
pass
# Get the Triton context over the pintool
Triton = Pin... | 30.328947 | 149 | 0.591106 |
1d19c4fd44a0bb5a983a16675a122a2a884b47cc | 8,531 | py | Python | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # pylint: disable=too-many-lines
# 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) AutoRe... | 44.432292 | 216 | 0.668151 |
1d19d1697bcd699272fdb919be4e5c3732ea9e17 | 461 | py | Python | tests/p4_tests.py | Alasdair-Macindoe/TuringMachineEmulator | 4c2639876bd94209b170232b2f33ea1409a61a45 | [
"MIT"
] | null | null | null | tests/p4_tests.py | Alasdair-Macindoe/TuringMachineEmulator | 4c2639876bd94209b170232b2f33ea1409a61a45 | [
"MIT"
] | null | null | null | tests/p4_tests.py | Alasdair-Macindoe/TuringMachineEmulator | 4c2639876bd94209b170232b2f33ea1409a61a45 | [
"MIT"
] | null | null | null | import pytest
import sys
sys.path.append('.')
from turingmachine import TuringMachine
import runtm
tm = runtm._read_file('examples/logic.txt')
def test_regular_accept():
tm.new_tape('$1|1=1')
assert tm.begin()
tm.new_tape("$1|1=1")
assert tm.begin()
tm.new_tape("$1|1=1")
assert tm.begin()
... | 20.043478 | 43 | 0.633406 |
1d1a21933f025208a7c849fe5b7a0c6808e39b1f | 3,232 | py | Python | setup.py | Privex/python-coinhandlers | b24c0c3f7d81cedefd52a5837a371cfef2f83e97 | [
"X11"
] | 2 | 2019-10-25T13:58:10.000Z | 2020-02-13T16:34:05.000Z | setup.py | Privex/python-coinhandlers | b24c0c3f7d81cedefd52a5837a371cfef2f83e97 | [
"X11"
] | null | null | null | setup.py | Privex/python-coinhandlers | b24c0c3f7d81cedefd52a5837a371cfef2f83e97 | [
"X11"
] | null | null | null | #!/usr/bin/env python3
"""
+===================================================+
| © 2019 Privex Inc. |
| https://www.privex.io |
+===================================================+
| |
| Python Cryptoc... | 43.675676 | 123 | 0.59901 |
1d1a3cb77de8bfa1cb506edb59302301006f89c7 | 11,576 | py | Python | AFRCNN(sum).py | ishine/AFRCNN-For-Speech-Separation | 8be8a33b87c7e294296c141c861f84736982a7c2 | [
"MIT"
] | 1 | 2021-12-20T11:33:45.000Z | 2021-12-20T11:33:45.000Z | AFRCNN(sum).py | mtxing/AFRCNN-For-Speech-Separation | 2d2d20e23731279affd797441252e25401451f0d | [
"MIT"
] | null | null | null | AFRCNN(sum).py | mtxing/AFRCNN-For-Speech-Separation | 2d2d20e23731279affd797441252e25401451f0d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import math
from norms import select_norm
import torch.nn.functional as F
'''
B: Batch number
N: Channel number
L: length of sequence
'''
class ConvNormAct(nn.Module):
def __init__(self, in_channels=512, out_channels=512, kernel_size=5, stride=1, groups=1, d=1, norm=... | 37.102564 | 169 | 0.524361 |
1d1a464bd1b6934d114782f7b7495af203b8e6c8 | 2,379 | py | Python | .leetcode/92.reverse-linked-list-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/92.reverse-linked-list-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/92.reverse-linked-list-ii.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=92 lang=python3
#
# [92] Reverse Linked List II
#
# https://leetcode.com/problems/reverse-linked-list-ii/description/
#
# algorithms
# Medium (40.85%)
# Likes: 3565
# Dislikes: 185
# Total Accepted: 346.2K
# Total Submissions: 846.5K
# Testcase Example: '[1,2,3,4,5]\n2\n4'
#
# Given the hea... | 19.5 | 78 | 0.551492 |
1d1a4db58d236f04b9f1b971d8044ade83407590 | 23,753 | py | Python | lingvo/tasks/asr/decoder_test.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 4 | 2019-06-08T00:19:06.000Z | 2020-08-03T16:28:53.000Z | lingvo/tasks/asr/decoder_test.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | null | null | null | lingvo/tasks/asr/decoder_test.py | tom-doerr/lingvo | 2441edc7fee78903502ebd528ab4dc309db0001d | [
"Apache-2.0"
] | 5 | 2018-12-11T08:05:16.000Z | 2020-05-30T03:40:13.000Z | # Copyright 2018 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... | 38.939344 | 80 | 0.634446 |
1d1a5ad318173a450dbdf27414267f9be2c3f94c | 21,808 | py | Python | benchmarking/cnn3d/train_rna.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | benchmarking/cnn3d/train_rna.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | benchmarking/cnn3d/train_rna.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import argparse
import functools
import json
import logging
import math
import os
import random
import numpy as np
import pandas as pd
import tensorflow as tf
import tqdm
try:
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
except:
... | 39.507246 | 106 | 0.630227 |
1d1a83e82ce8e7df40b0c4ab4c541eaea26f8296 | 3,225 | py | Python | analysis/computation/intervals.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | analysis/computation/intervals.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | 4 | 2019-03-18T20:11:30.000Z | 2019-03-18T20:11:59.000Z | analysis/computation/intervals.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | from analysis.computation import utils
import numpy
from scipy.spatial import distance
def get_adjacent_intervals(intervals):
return [(a, b) for a, b in zip(intervals, intervals[1:])]
def make_adjacent_chart(adjacent_intervals):
counted = utils.special_counter(adjacent_intervals, True)
seq = [['Label', ... | 37.941176 | 133 | 0.708837 |
1d1a8b50b4e41c5b462ccc24f810cc5437a77a84 | 17,632 | py | Python | initial-release/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | 4 | 2020-02-02T06:29:17.000Z | 2022-03-01T15:53:50.000Z | initial-release/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | null | null | null | initial-release/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | 2 | 2021-03-07T16:37:30.000Z | 2021-04-22T16:45:13.000Z | #!/usr/bin/env python3
#MIT License
#
#Copyright (c) 2019 TheHWcave
#
#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, ... | 28.484653 | 102 | 0.642241 |
1d1a90d53ea8a467ccef976bfda0d41b7691830f | 12,382 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_mcp9600.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_mcp9600.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_mcp9600.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2019 Dan Cogliano for Adafruit Industries
# SPDX-FileCopyrightText: 2021 kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_mcp9600`
================================================================================
CircuitPython driver for the MCP9600 thermoc... | 38.937107 | 100 | 0.631723 |
1d1ab5d05e01673500d02c5b64a080eaf634eee0 | 4,212 | py | Python | doc/exts/numpydoc.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | doc/exts/numpydoc.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | doc/exts/numpydoc.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | """
========
numpydoc
========
Sphinx extension that handles docstrings in the Numpy standard format. [1]
It will:
- Convert Parameters etc. sections to field lists.
- Convert See Also section to a See also entry.
- Renumber references.
- Extract the signature from the docstring, if it can't be determined otherwise.... | 35.1 | 84 | 0.583808 |
1d1adf30e03a6ad5387332d8f340771c63139bc6 | 472 | py | Python | demos/10-graphical-ui/data-conversion-demo/source/application.py | sk-dwtoulouse/python-initiation-training | f3883a2ba1fecb615173f27000e5ad944f11ff3f | [
"MIT"
] | 1 | 2021-06-23T06:55:12.000Z | 2021-06-23T06:55:12.000Z | demos/10-graphical-ui/data-conversion-demo/source/application.py | sk-dwtoulouse/python-initiation-training | f3883a2ba1fecb615173f27000e5ad944f11ff3f | [
"MIT"
] | null | null | null | demos/10-graphical-ui/data-conversion-demo/source/application.py | sk-dwtoulouse/python-initiation-training | f3883a2ba1fecb615173f27000e5ad944f11ff3f | [
"MIT"
] | 2 | 2021-06-23T12:36:34.000Z | 2021-09-09T14:21:24.000Z | """
Entry point for our demo application.
Uses a "WindowManager" class holding the main window and the
CSV data manager used in it.
.. include:: documentation/includes/application.md
"""
from PySide6.QtWidgets import QApplication
from interface import WindowManager # look at interface/__init__.py
if __name__ == "... | 23.6 | 68 | 0.75 |
1d1aec75d460cb13bfc89b15968a6223ff3a36f4 | 231 | py | Python | schemas/order.py | Jxiang2/EasyShop-V2 | 19db3c828c3a72a8b3e7118db1e18d8b94c54624 | [
"MIT"
] | null | null | null | schemas/order.py | Jxiang2/EasyShop-V2 | 19db3c828c3a72a8b3e7118db1e18d8b94c54624 | [
"MIT"
] | null | null | null | schemas/order.py | Jxiang2/EasyShop-V2 | 19db3c828c3a72a8b3e7118db1e18d8b94c54624 | [
"MIT"
] | null | null | null | from extensions.ma import ma
from models.order import OrderModel
class OrderSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = OrderModel
load_only = ("token",)
dump_only = ("id", "status", "user_id") | 28.875 | 47 | 0.670996 |
1d1af8ac3ff61cdaba8cc5ae35e6ce77f44fc39b | 2,362 | py | Python | pylibs/examples/form_partition.py | sbeyn/ot-ns | 94d577176ca4d4579c4e45fed52d847bebe80117 | [
"BSD-3-Clause"
] | 2 | 2021-03-31T21:16:57.000Z | 2021-11-08T11:18:27.000Z | pylibs/examples/form_partition.py | sbeyn/ot-ns | 94d577176ca4d4579c4e45fed52d847bebe80117 | [
"BSD-3-Clause"
] | null | null | null | pylibs/examples/form_partition.py | sbeyn/ot-ns | 94d577176ca4d4579c4e45fed52d847bebe80117 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020, The OTNS Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this... | 33.267606 | 85 | 0.696444 |
1d1b0cb3484a0f40d26e6dc7c2201ce3390e98d3 | 737 | py | Python | idea01/runner.py | RobRomijnders/santa20 | 0c2e4492b5cb8311abe9a1a3e3daff9506b47749 | [
"MIT"
] | null | null | null | idea01/runner.py | RobRomijnders/santa20 | 0c2e4492b5cb8311abe9a1a3e3daff9506b47749 | [
"MIT"
] | null | null | null | idea01/runner.py | RobRomijnders/santa20 | 0c2e4492b5cb8311abe9a1a3e3daff9506b47749 | [
"MIT"
] | null | null | null | from bots import Bots
from kaggle_environments import make
import tqdm
def best_of_n(agent1, agent2, n=20):
env = make("mab", debug=True)
wins = []
for i in tqdm.tqdm(range(n)):
env.run([agent1, agent2])
p1_score = env.steps[-1][0]['reward']
p2_score = env.steps[-1][1]['reward']
... | 25.413793 | 66 | 0.592944 |
1d1b2fa1eed2f6263094c575b59983297f321375 | 6,190 | py | Python | authors/apps/authentication/tests/test_register.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/authentication/tests/test_register.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | 22 | 2019-03-25T16:10:53.000Z | 2022-03-11T23:44:21.000Z | authors/apps/authentication/tests/test_register.py | andela/ah-backend-prime | 0708463d4565a4977a5a5dcb839f1dfed52fdc90 | [
"BSD-3-Clause"
] | 6 | 2019-03-25T09:39:39.000Z | 2021-03-11T23:54:12.000Z | from rest_framework import status
from django.urls import reverse
from authors.apps.authentication.tests.base import BaseTest
from authors.apps.authentication.tests.test_data import (
VALID_USER_DATA,
EMPTY_EMAIL,
EMPTY_USERNAME,
EMPTY_PASSWORD,
INVALID_EMAIL,
INVALID_USERNAME,
INVALID_PASSW... | 26.566524 | 76 | 0.560582 |
1d1b36fb09747775641557103789f4ad69e52281 | 3,125 | py | Python | pin_py/pinterest/pinpy.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | 3 | 2018-08-23T11:55:17.000Z | 2018-09-08T08:46:51.000Z | pin_py/pinterest/pinpy.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | null | null | null | pin_py/pinterest/pinpy.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | null | null | null | # Author Hassan Alvi
# Creation date : 20th July 2018
from pin_py.utils.http import Requests
try:
import simplejson as json
except ImportError:
import json
class PinPy:
pinterest_url = "https://api.pinterest.com/"
def __init__(self):
self.request = Requests()
self.all_pins = []
... | 35.511364 | 116 | 0.62912 |
1d1b4dce3fe26fb6c5ae601f53a4569a5daad6d2 | 209 | py | Python | archive/bind.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | 3 | 2018-12-03T13:17:01.000Z | 2019-01-06T13:59:17.000Z | archive/bind.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | null | null | null | archive/bind.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | null | null | null | from tkinter import *
root = Tk()
def callback(event):
print ("clicked at", event.x, event.y)
frame = Frame(root, width=100, height=100)
frame.bind("<Button-1>", callback)
frame.pack()
root.mainloop() | 17.416667 | 42 | 0.674641 |
1d1b6b7b9a3398ac7b6321c45c92cd4533de3499 | 52 | py | Python | src/dependencies.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | src/dependencies.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | null | null | null | src/dependencies.py | RonquilloAeon/fastapi-migrations | 524de15635cd92ed129a9a7d9d66cabf211a491c | [
"MIT"
] | 1 | 2020-10-03T22:13:54.000Z | 2020-10-03T22:13:54.000Z | from src.db import db
def get_db():
return db
| 8.666667 | 21 | 0.653846 |
1d1b6e77f25cb343f9e19bb78e094a0434b7b241 | 11,561 | py | Python | server/fm_server/network/wifi.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | 1 | 2017-10-22T03:15:58.000Z | 2017-10-22T03:15:58.000Z | server/fm_server/network/wifi.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | 33 | 2016-06-20T19:43:47.000Z | 2022-01-21T23:19:11.000Z | server/fm_server/network/wifi.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | null | null | null | """WiFi module to set WiFi options."""
import logging
import subprocess
import netifaces
from fm_database.base import get_session
from fm_database.models.system import Interface, Wifi
from sqlalchemy.orm.exc import NoResultFound
from fm_server.network.ethernet import get_external_interface, get_interfaces
f... | 30.994638 | 111 | 0.625465 |
1d1b700471832fb36d84b743603ca5582ee812aa | 527 | py | Python | pymod/__main__.py | Plexical/pymod.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | 1 | 2016-06-13T19:17:03.000Z | 2016-06-13T19:17:03.000Z | pymod/__main__.py | Plexical/pymod.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | 3 | 2017-05-10T08:29:20.000Z | 2018-02-07T20:57:16.000Z | pymod/__main__.py | Plexical/pydoc.me | b3bf1a8c6e15fa02d1b58a8f296ba60aae60d18a | [
"MIT"
] | null | null | null | import os
import sys
from pymod.routes import app
if __name__ == "__main__" and '--serve' in sys.argv:
from werkzeug import SharedDataMiddleware
static_base = os.path.join(os.getcwd(), 'static')
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {'/static': static_base})
app.debug = True
app.run(ho... | 25.095238 | 79 | 0.671727 |
1d1bb7237fa4fdf8b282378b66d0cd8e0348cf9d | 53,401 | py | Python | oscar/lib/python2.7/site-packages/execnet/gateway_base.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/execnet/gateway_base.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/execnet/gateway_base.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
base execnet gateway code send to the other side for bootstrapping.
NOTE: aims to be compatible to Python 2.5-3.X, Jython and IronPython
:copyright: 2004-2015
:authors:
- Holger Krekel
- Armin Rigo
- Benjamin Peterson
- Ronny Pfannschmidt
- many others
"""
from __future__ import w... | 34.788925 | 80 | 0.569353 |
1d1bbb3d15f31eb434afa5f811c023135ac80fed | 12,554 | py | Python | streamparse/dsl/topology.py | tail/streamparse | 8500325fad61d1606285227c658bfac587060b4c | [
"Apache-2.0"
] | null | null | null | streamparse/dsl/topology.py | tail/streamparse | 8500325fad61d1606285227c658bfac587060b4c | [
"Apache-2.0"
] | null | null | null | streamparse/dsl/topology.py | tail/streamparse | 8500325fad61d1606285227c658bfac587060b4c | [
"Apache-2.0"
] | null | null | null | """
Topology base class
"""
from __future__ import absolute_import
import simplejson as json
from pystorm.component import Component
from six import add_metaclass, iteritems, itervalues, string_types
from thriftpy.transport import TMemoryBuffer
from thriftpy.protocol import TBinaryProtocol
from ..thrift import Bolt, ... | 45.485507 | 95 | 0.556237 |
1d1bc732695bde415fc31da8a80bfac962aaf93d | 5,861 | py | Python | src/cl_featuriser.py | PyeongKim/GNN_scaffold_based_drug_generation | 23a1d057d017d02e0738fa1f999cedb060cdb4c9 | [
"MIT"
] | null | null | null | src/cl_featuriser.py | PyeongKim/GNN_scaffold_based_drug_generation | 23a1d057d017d02e0738fa1f999cedb060cdb4c9 | [
"MIT"
] | null | null | null | src/cl_featuriser.py | PyeongKim/GNN_scaffold_based_drug_generation | 23a1d057d017d02e0738fa1f999cedb060cdb4c9 | [
"MIT"
] | null | null | null | # Author: Pyeong Eun Kim
# Date: Dec.07.2020
# Title: Graph-based Deep Generative Model version 3 (single batch only)
# Affiliation: JLK Genome Research Centre
from dataclasses import dataclass, field
from typing import List
from rdkit import Chem
from rdkit.Chem import rdmolfiles, rdmolops, AllChem
from rdki... | 38.559211 | 124 | 0.582324 |
1d1bd245ecdad1cb6e34846dd02ece974937c4e5 | 15,397 | py | Python | appengine/findit/services/gerrit.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/services/gerrit.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/findit/services/gerrit.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module is for gerrit_related operations.
It provides fuctions to:
* Use rules to check if a CL can be auto reverted
* Auto create a revert CL
*... | 37.012019 | 80 | 0.724687 |
1d1bf20669920d7331181581d42d2a633adf76bb | 4,641 | py | Python | cinder/tests/unit/targets/targets_fixture.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/targets/targets_fixture.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/tests/unit/targets/targets_fixture.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.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... | 40.710526 | 79 | 0.592976 |
1d1bf61be4311ba0efada85697bbaaba5d0063fc | 6,966 | py | Python | satella/instrumentation/metrics/data.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/instrumentation/metrics/data.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/instrumentation/metrics/data.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import typing as tp
from satella.coding.structures import frozendict
from satella.json import JSONAble
def join_metric_data_name(prefix: str, name: str):
if prefix == '':
return name
else:
return prefix + '.' + name
class MetricData(JSONAble):
__slots__ = ('name', 'value', 'labels', 'ti... | 35.005025 | 100 | 0.595177 |
1d1c32ed9fcef2ed71d972cca8effce7c9db81a3 | 5,894 | py | Python | google-cloud-sdk/.install/.backup/lib/third_party/dns/rrset.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/third_party/dns/rrset.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/third_party/dns/rrset.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | 33.488636 | 78 | 0.635901 |
1d1c436ee9093752c20788f973159297e3d0e8f6 | 283 | py | Python | {{cookiecutter.project_name}}/services/schemas.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | 1 | 2020-05-11T14:42:25.000Z | 2020-05-11T14:42:25.000Z | {{cookiecutter.project_name}}/services/schemas.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | null | null | null | {{cookiecutter.project_name}}/services/schemas.py | KovalevVasiliy/python-fastapi-backend | e9ed466c00bae2eeb0b4271b013cc8dacd98acf0 | [
"MIT"
] | null | null | null | from typing import Dict, List, Union
from pydantic import BaseModel
class ErrorResponse(BaseModel):
ok: bool = False
error: Union[str, Dict, List] = 'Unknown error'
class ORMModel(BaseModel): # inherit all models from this one
class Config:
orm_mode = True
| 20.214286 | 62 | 0.70318 |
1d1c5dc3732248b50dee1b451cb003ded6a0f253 | 215 | py | Python | src/python/pulumi_util/__init__.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | 1 | 2022-02-11T06:52:03.000Z | 2022-02-11T06:52:03.000Z | src/python/pulumi_util/__init__.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | null | null | null | src/python/pulumi_util/__init__.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from .util import (
TTL_SECOND,
TTL_MINUTE,
TTL_HOUR,
TTL_DAY,
jsonify_promise,
list_of_promises,
default_val,
get_ami_arch_from_instance_type,
future_val,
future_func,
)
| 14.333333 | 34 | 0.739535 |
1d1c806c0b042d78afae22549203fae4af4b6fbe | 2,401 | py | Python | tests/configs/test_configs_for_keys.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | tests/configs/test_configs_for_keys.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | tests/configs/test_configs_for_keys.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import contextlib
import unittest
import warnings
from io import StringIO
from mmf.common.registry import registry
from mmf.utils.configuration import Configuration
from mmf.utils.general import setup_imports
from tests.test_utils import dummy_args
class TestConfigs... | 36.378788 | 84 | 0.556018 |
1d1c95884003bd42e827fd906b803d1a0e204020 | 1,464 | py | Python | migrations/versions/06a8443ce88f_.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 12 | 2017-04-21T07:29:23.000Z | 2021-08-24T21:17:28.000Z | migrations/versions/06a8443ce88f_.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 164 | 2017-04-21T07:22:34.000Z | 2022-03-31T23:28:41.000Z | migrations/versions/06a8443ce88f_.py | youssefaloua/call-forwarding-flask | d361c916f7a9599e32dd99e3bd2de60238f7020d | [
"MIT"
] | 6 | 2020-06-18T11:47:19.000Z | 2022-03-29T00:29:36.000Z | """empty message
Revision ID: 06a8443ce88f
Revises:
Create Date: 2017-03-30 10:15:50.340237
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '06a8443ce88f'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 26.618182 | 65 | 0.605874 |
1d1cc43cf6ee772e91e86b824480c1d9ace53b80 | 1,752 | py | Python | src/pynwb/legacy/io/file.py | q0j0p/pynwb | 6c3a864662f2cce63b542f9f614cc632903f9bc1 | [
"BSD-3-Clause-LBNL"
] | null | null | null | src/pynwb/legacy/io/file.py | q0j0p/pynwb | 6c3a864662f2cce63b542f9f614cc632903f9bc1 | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-06-01T22:25:36.000Z | 2021-06-01T22:25:36.000Z | src/pynwb/legacy/io/file.py | q0j0p/pynwb | 6c3a864662f2cce63b542f9f614cc632903f9bc1 | [
"BSD-3-Clause-LBNL"
] | null | null | null |
from pynwb.file import NWBFile
from .. import ObjectMapper, register_map
@register_map(NWBFile)
class NWBFileMap(ObjectMapper):
def __init__(self, spec):
super(NWBFileMap, self).__init__(spec)
raw_ts_spec = self.spec.get_group('acquisition').get_group('timeseries').get_neurodata_type('TimeSerie... | 43.8 | 120 | 0.722032 |
1d1cc491072c78ccf8739b7770b59fa2d166c097 | 7,501 | py | Python | git_t5/data/dataset.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | 1 | 2021-07-05T18:40:35.000Z | 2021-07-05T18:40:35.000Z | git_t5/data/dataset.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | git_t5/data/dataset.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | import itertools
import math
import typing
from abc import abstractmethod
from itertools import zip_longest
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Union
import datasets as hfds
import jax
import more_itertools
import numpy as np
from flax.training.common_utils import shard
from tor... | 34.095455 | 84 | 0.623384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.