hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
830294e77a21b1dad8e26ce7c54643f9edc07e1b | 672 | py | Python | {{cookiecutter.project_package}}/manage.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 17 | 2019-11-05T20:29:11.000Z | 2022-03-09T09:25:10.000Z | {{cookiecutter.project_package}}/manage.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 49 | 2019-12-02T13:27:23.000Z | 2021-08-03T13:32:25.000Z | {{cookiecutter.project_package}}/manage.py | madelyneriksen/react-django-goodstuff-cookiecutter | daa8960a762c59ebbdc940ebb08f3784853e4ccf | [
"MIT"
] | 2 | 2020-10-11T18:38:39.000Z | 2021-03-16T13:16:00.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE", "{{ cookiecutter.project_package }}.settings.dev"
)
try:
from django.core.management import execute_from_command_line
ex... | 28 | 83 | 0.671131 |
f4fdec4c5860425ffdbae361106b31c9d4c4d9f9 | 6,911 | py | Python | src/datadog_api_client/v2/model/relationship_to_organizations.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/relationship_to_organizations.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/relationship_to_organizations.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
from datadog_api_client.v2.model_uti... | 39.718391 | 108 | 0.594415 |
507df0f91e573543d4bcafaf13ee11f6d2289def | 3,535 | py | Python | mediasoup-broadcaster-demo-ue4/1.0/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | null | null | null | mediasoup-broadcaster-demo-ue4/1.0/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | null | null | null | mediasoup-broadcaster-demo-ue4/1.0/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | 1 | 2021-08-20T00:39:37.000Z | 2021-08-20T00:39:37.000Z | from conans import ConanFile, CMake, tools
import json, os
class MediaSoupBroadCasterDemo(ConanFile):
name = "mediasoup-broadcaster-demo-ue4"
version = "1.0"
license = "Apache-2.0"
url = "https://github.com/adamrehn/ue4-conan-recipes/mediasoup-broadcaster-demo-ue4"
description = "Mediasoup Broadcas... | 44.1875 | 187 | 0.64413 |
dae23936359d20b5c08332e4f9252dc982c4fbec | 6,506 | py | Python | padan/padan/model/deeplabv2.py | seabearlmx/PA-DAN | bdd1200396d102e68acdd265db9d22ddb83b6404 | [
"MIT"
] | null | null | null | padan/padan/model/deeplabv2.py | seabearlmx/PA-DAN | bdd1200396d102e68acdd265db9d22ddb83b6404 | [
"MIT"
] | null | null | null | padan/padan/model/deeplabv2.py | seabearlmx/PA-DAN | bdd1200396d102e68acdd265db9d22ddb83b6404 | [
"MIT"
] | null | null | null | import torch.nn as nn
affine_par = True
class Bottleneck(nn.Module):
expansion = 4
def __init__(self, inplanes, planes, stride=1, dilation=1, downsample=None):
super(Bottleneck, self).__init__()
# change
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, stride=stride, bias=Fals... | 36.757062 | 99 | 0.577928 |
ffd71ae2f0fcad54e53cef3a4dac540b3cd1d916 | 12,709 | py | Python | py_alg_dat/partition.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | py_alg_dat/partition.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | py_alg_dat/partition.py | trycatchhorn/PyAlgDat | 85f8c7550630cf31b5e4472fd593956c9d96c078 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2015 by Brian Horn, trycatchhorn@gmail.com.
#
# 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 w... | 33.710875 | 96 | 0.623889 |
58676798f8bafc41a20166856bc7dc93b05e11cd | 5,844 | py | Python | gcn/layers.py | soumen-chakrabarti/tkipfgcn | b37e87380a78e0093168f49b26655edf1cb0e393 | [
"MIT"
] | null | null | null | gcn/layers.py | soumen-chakrabarti/tkipfgcn | b37e87380a78e0093168f49b26655edf1cb0e393 | [
"MIT"
] | null | null | null | gcn/layers.py | soumen-chakrabarti/tkipfgcn | b37e87380a78e0093168f49b26655edf1cb0e393 | [
"MIT"
] | null | null | null | from gcn.inits import *
import tensorflow as tf
# global unique layer ID dictionary for layer name assignment
_LAYER_UIDS = {}
def get_layer_uid(layer_name=''):
"""Helper function, assigns unique layer IDs."""
if layer_name not in _LAYER_UIDS:
_LAYER_UIDS[layer_name] = 1
return 1
else:
... | 31.419355 | 92 | 0.581109 |
5f1df9afae41a779b48ef3abc3805102e048fff3 | 40 | py | Python | testsuite/invalid.py | adamchainz/flake8-coding | 535c20ce0fccd62fc8fae628718749953675286c | [
"Apache-2.0"
] | 15 | 2015-05-29T08:01:23.000Z | 2021-10-13T08:48:18.000Z | testsuite/invalid.py | adamchainz/flake8-coding | 535c20ce0fccd62fc8fae628718749953675286c | [
"Apache-2.0"
] | 18 | 2015-05-29T13:46:20.000Z | 2019-06-16T13:10:25.000Z | testsuite/invalid.py | adamchainz/flake8-coding | 535c20ce0fccd62fc8fae628718749953675286c | [
"Apache-2.0"
] | 11 | 2015-05-29T08:01:27.000Z | 2021-04-06T15:10:19.000Z | #!/usr/bin/python
# -*- coding: utf -*-
| 13.333333 | 21 | 0.525 |
7eafb24aabed8431be830a44c9d9b7230412f190 | 25,198 | py | Python | dropbox/dropbox.py | jingjingxupku/dropbox-sdk-python | fdeb3c5d39486514d3ca23cff471d58d2d37a7c5 | [
"MIT"
] | 1 | 2021-06-25T15:04:56.000Z | 2021-06-25T15:04:56.000Z | dropbox/dropbox.py | jingjingxupku/dropbox-sdk-python | fdeb3c5d39486514d3ca23cff471d58d2d37a7c5 | [
"MIT"
] | null | null | null | dropbox/dropbox.py | jingjingxupku/dropbox-sdk-python | fdeb3c5d39486514d3ca23cff471d58d2d37a7c5 | [
"MIT"
] | null | null | null | __all__ = [
'Dropbox',
'DropboxTeam',
'create_session',
]
# This should always be 0.0.0 in master. Only update this after tagging
# before release.
__version__ = '0.0.0'
import contextlib
import json
import logging
import random
import time
import requests
import six
from . import files, stone_serialize... | 41.308197 | 94 | 0.590166 |
3153e66aea51456879f3870d635369d1d87b5eb1 | 989 | py | Python | pyleecan/Generator/run_generate_classes_internal.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Generator/run_generate_classes_internal.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Generator/run_generate_classes_internal.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | # -*- coding: utf-8 -*-
import sys
from os.path import dirname, abspath, normpath, join, system
sys.path.insert(0, normpath(abspath(join(dirname(__file__), "..", ".."))))
from ..Generator.run_generate_classes import generate_code
from ..Generator.read_fct import read_all
from ..definitions import MAIN_DIR, DOC_DIR, I... | 36.62963 | 109 | 0.57634 |
e87ca9802a2fe1cb53c45983f46a55cc38b05453 | 1,399 | py | Python | env/lib/python3.5/site-packages/surprise/__init__.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 2 | 2019-12-05T17:56:23.000Z | 2019-12-06T01:25:29.000Z | env/lib/python3.5/site-packages/surprise/__init__.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | null | null | null | env/lib/python3.5/site-packages/surprise/__init__.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 1 | 2019-10-06T14:29:39.000Z | 2019-10-06T14:29:39.000Z | from pkg_resources import get_distribution
from .prediction_algorithms import AlgoBase
from .prediction_algorithms import NormalPredictor
from .prediction_algorithms import BaselineOnly
from .prediction_algorithms import KNNBasic
from .prediction_algorithms import KNNWithMeans
from .prediction_algorithms import KNNWit... | 38.861111 | 76 | 0.804146 |
8dcb3171deb968dc6f847c71e9ca841c35c65bbb | 8,188 | py | Python | cnltk/tag/crf.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | cnltk/tag/crf.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | cnltk/tag/crf.py | gouthambs/cnltk | ad122a150e7796bf535c49676dec9fac2db8a19c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Natural Language Toolkit: Interface to the CRFSuite Tagger
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Long Duong <longdt219@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
A module for POS tagging using CRFSuite
"""
from __future__ import absolute_i... | 40.137255 | 128 | 0.587201 |
da27c594422959c319d5e8991ebde306c8e0980b | 1,316 | py | Python | test/mycaffe.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | 7 | 2018-11-21T09:19:51.000Z | 2022-01-27T11:55:43.000Z | test/mycaffe.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | null | null | null | test/mycaffe.py | KAIST-NCL/IDLE | e88aef411ba43a42487202286d743486484f5e17 | [
"BSD-2-Clause"
] | 3 | 2019-03-11T11:10:29.000Z | 2021-04-16T16:07:17.000Z | import sys
sys.path.append('/Users/SeongHwanKim/tensorflow3/caffe-master/python')
import caffe
from caffe import layers as L, params as P
def lenet(lmdb, batch_size):
# our version of LeNet: a series of linear and simple nonlinear transformations
n = caffe.NetSpec()
data, label = L.Data(batch_size=batch... | 42.451613 | 110 | 0.701368 |
ba4d805d3e78795ef9b46901b9684c274d7705e5 | 7,671 | py | Python | aiohttp/worker.py | adamko147/aiohttp | 3250c5d75a54e19e2825d0a609f9d9cd4bf62087 | [
"Apache-2.0"
] | 1 | 2021-01-19T09:47:03.000Z | 2021-01-19T09:47:03.000Z | aiohttp/worker.py | mochengyanyu/aiohttp | 3014db406268ff74cabbee75ca5fbc23ffe0dd1c | [
"Apache-2.0"
] | 199 | 2020-11-01T08:02:46.000Z | 2022-03-31T07:05:31.000Z | aiohttp/worker.py | mochengyanyu/aiohttp | 3014db406268ff74cabbee75ca5fbc23ffe0dd1c | [
"Apache-2.0"
] | null | null | null | """Async gunicorn worker for aiohttp.web"""
import asyncio
import os
import re
import signal
import sys
from types import FrameType
from typing import Any, Awaitable, Callable, Optional, Union # noqa
from gunicorn.config import AccessLogFormat as GunicornAccessLogFormat
from gunicorn.workers import base
from aiohtt... | 31.829876 | 85 | 0.620258 |
aa2f4a71b34121cb58b2289a7b7c43d70edd0b22 | 8,288 | py | Python | ec2.py | paulchakravarti/aws-utils | ad77d0d628a1485c2a313bc1450e5285f2a450f9 | [
"MIT"
] | null | null | null | ec2.py | paulchakravarti/aws-utils | ad77d0d628a1485c2a313bc1450e5285f2a450f9 | [
"MIT"
] | null | null | null | ec2.py | paulchakravarti/aws-utils | ad77d0d628a1485c2a313bc1450e5285f2a450f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import re
import subprocess
import textwrap
import click
import boto3
from botocore.exceptions import ClientError
from pprint import pprint
from tabulate import tabulate
def getpath(data,path):
if '.' in path:
head,tail = path.split('.',1)
r = getpath(data,hea... | 31.876923 | 98 | 0.576014 |
d081e209a607f908f921ccc2e5ebae87c8b42621 | 1,669 | py | Python | src/rdmysql/row.py | azhai/rdmysql | 3738694bcbd562c68ded8793d7a27ca338316384 | [
"MIT"
] | null | null | null | src/rdmysql/row.py | azhai/rdmysql | 3738694bcbd562c68ded8793d7a27ca338316384 | [
"MIT"
] | null | null | null | src/rdmysql/row.py | azhai/rdmysql | 3738694bcbd562c68ded8793d7a27ca338316384 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import date, datetime
from decimal import Decimal
class Row(object):
""" 单行结果 """
_fields = []
def __init__(self, data={}):
self._data = {}
self.merge(data)
def __len__(self):
return len(self._data)
def __getitem__(self, key):
... | 23.507042 | 60 | 0.566806 |
e7946c403f46662dfa16b8e87d31b459716a9d4a | 3,403 | py | Python | camel_tools/tokenizers/morphological.py | balhafni/camel_tools | 84a8149fe6e80b4ecbd4bf8cfb9f0440b4815389 | [
"MIT"
] | null | null | null | camel_tools/tokenizers/morphological.py | balhafni/camel_tools | 84a8149fe6e80b4ecbd4bf8cfb9f0440b4815389 | [
"MIT"
] | null | null | null | camel_tools/tokenizers/morphological.py | balhafni/camel_tools | 84a8149fe6e80b4ecbd4bf8cfb9f0440b4815389 | [
"MIT"
] | 2 | 2020-12-08T18:10:12.000Z | 2021-08-30T15:33:50.000Z | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright 2018-2019 New York University Abu Dhabi
#
# 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 limitatio... | 35.447917 | 79 | 0.659124 |
0e0a83bd6166f86e629020458b48e35515a428da | 955 | py | Python | corehq/ex-submodules/soil/tests/test_download_base.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/ex-submodules/soil/tests/test_download_base.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | corehq/ex-submodules/soil/tests/test_download_base.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | from io import BytesIO
from uuid import uuid4
from django.test import TestCase
from soil import BlobDownload
from soil.util import expose_blob_download
from corehq.blobs.tests.util import new_meta, TemporaryFilesystemBlobDB
class TestBlobDownload(TestCase):
identifier = 'identifier'
@classmethod
def se... | 28.088235 | 76 | 0.700524 |
88d295443eb19a0557334a8dd1eb23fddc4bef8a | 34,509 | py | Python | kfac/python/kernel_tests/graph_search_test.py | ntselepidis/kfac | ddad6375bbdebfae809bccfd3a5c3db073128764 | [
"Apache-2.0"
] | null | null | null | kfac/python/kernel_tests/graph_search_test.py | ntselepidis/kfac | ddad6375bbdebfae809bccfd3a5c3db073128764 | [
"Apache-2.0"
] | null | null | null | kfac/python/kernel_tests/graph_search_test.py | ntselepidis/kfac | ddad6375bbdebfae809bccfd3a5c3db073128764 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 39.802768 | 99 | 0.672433 |
dcf052d64a0a5d99e6ecf2a64ed0cfbbcd65d67e | 8,585 | py | Python | app/modules/common/CM/CM_TUW4/district_heating_potential.py | HotMaps/building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | 1 | 2017-05-12T11:31:09.000Z | 2017-05-12T11:31:09.000Z | app/modules/common/CM/CM_TUW4/district_heating_potential.py | HotMaps/HotMaps-building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | 2 | 2017-08-22T13:53:22.000Z | 2017-09-25T07:27:28.000Z | app/modules/common/CM/CM_TUW4/district_heating_potential.py | HotMaps/Hotmaps-building_h-c | db5a103cb9d41b88e6cdc3c9194fc1ec9fc5c31f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on July 11 2017
@author: fallahnejad@eeg.tuwien.ac.at
"""
import os
import sys
import time
from osgeo import ogr
import numpy as np
from scipy.ndimage import binary_dilation
from scipy.ndimage import binary_erosion
from scipy.ndimage import binary_fill_holes
from scipy.ndimage impor... | 43.80102 | 82 | 0.628422 |
02724532945148145768c54bda9c7ccc93a7b6f2 | 15,286 | py | Python | qiskit_nature/drivers/molecule.py | jsistos/qiskit-nature | e05e746e3ad16abc3cf01018145e82b3fc1f6374 | [
"Apache-2.0"
] | 1 | 2021-01-28T06:51:51.000Z | 2021-01-28T06:51:51.000Z | qiskit_nature/drivers/molecule.py | jsistos/qiskit-nature | e05e746e3ad16abc3cf01018145e82b3fc1f6374 | [
"Apache-2.0"
] | 70 | 2021-01-28T15:58:35.000Z | 2021-01-28T19:47:45.000Z | qiskit_nature/drivers/molecule.py | jsistos/qiskit-nature | e05e746e3ad16abc3cf01018145e82b3fc1f6374 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 36.833735 | 99 | 0.610755 |
213c5200ac437c310ef3fb034510788e506aa10c | 7,349 | py | Python | nets/graph_encoder.py | ChristinaTan0704/transTSP | b97cd7ed8ae97e91b687d5007d13a021781f3d1d | [
"MIT"
] | null | null | null | nets/graph_encoder.py | ChristinaTan0704/transTSP | b97cd7ed8ae97e91b687d5007d13a021781f3d1d | [
"MIT"
] | null | null | null | nets/graph_encoder.py | ChristinaTan0704/transTSP | b97cd7ed8ae97e91b687d5007d13a021781f3d1d | [
"MIT"
] | null | null | null | import torch
import numpy as np
from torch import nn
import math
class SkipConnection(nn.Module):
def __init__(self, module):
super(SkipConnection, self).__init__()
self.module = module
def forward(self, input):
return input + self.module(input)
class MultiHeadAttention(nn.Module):... | 34.341121 | 117 | 0.604844 |
c6eccc0d7cf8e478962c292d0531ebbb87c876f1 | 49 | py | Python | btd6_memory_info/generated/SteamNative/MusicPlayerWantsPlayingRepeatStatus_t/music_player_wants_playing_repeat_status_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/MusicPlayerWantsPlayingRepeatStatus_t/music_player_wants_playing_repeat_status_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/MusicPlayerWantsPlayingRepeatStatus_t/music_player_wants_playing_repeat_status_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class MusicPlayerWantsPlayingRepeatStatus_t: pass | 49 | 49 | 0.938776 |
b449b309ffdd5ffc661d589f14ab695ac1545bd9 | 9,651 | py | Python | src/python/pants/backend/jvm/subsystems/scala_platform.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/subsystems/scala_platform.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/subsystems/scala_platform.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 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
from collections import namedtuple
from pants.backend.jvm.subsystems.jvm_tool_mixin impo... | 43.278027 | 127 | 0.677546 |
e9f52cad35832123ea7c8ac17f3c2fd217c501e0 | 23,428 | py | Python | chemreader/tests/test_read.py | thomasly/chemreader | 409508d3145413b99066324c4f9334735f68cff4 | [
"MIT"
] | 1 | 2020-04-24T04:24:11.000Z | 2020-04-24T04:24:11.000Z | chemreader/tests/test_read.py | thomasly/chemreader | 409508d3145413b99066324c4f9334735f68cff4 | [
"MIT"
] | null | null | null | chemreader/tests/test_read.py | thomasly/chemreader | 409508d3145413b99066324c4f9334735f68cff4 | [
"MIT"
] | 1 | 2020-04-24T04:24:15.000Z | 2020-04-24T04:24:15.000Z | import os
import unittest
import logging
import numpy as np
from scipy import sparse as sp
from rdkit import Chem
from rdkit import RDLogger
from ..readers import Mol2, Mol2Block
from ..readers import Smiles
from ..readers import PDB, PartialPDB, PDBBB
from ..readers import CanonicalAtomOrderConverter
from ..readers.... | 42.751825 | 101 | 0.646065 |
46509a9e6551a2b7d85ebbe9a1f8ee2e57817310 | 1,936 | py | Python | aiomodrinth/facets.py | Xemay/aiomodrinth | 418e3c2dc67c6d2c45a5745f34c1ddadda5ed47d | [
"MIT"
] | null | null | null | aiomodrinth/facets.py | Xemay/aiomodrinth | 418e3c2dc67c6d2c45a5745f34c1ddadda5ed47d | [
"MIT"
] | null | null | null | aiomodrinth/facets.py | Xemay/aiomodrinth | 418e3c2dc67c6d2c45a5745f34c1ddadda5ed47d | [
"MIT"
] | null | null | null | from aiomodrinth.models.project import ProjectType, Category, ProjectLicense, GameVersion
from typing import Union, Type
FacetType = Union[Category, GameVersion, ProjectLicense, ProjectType]
def facet_type_to_string(facet_type: Type[FacetType]) -> str:
pattern = {Category: "categories",
GameVersi... | 26.162162 | 102 | 0.622417 |
4685e0eab4b220b374f0d90387258bb6b1ac4466 | 467 | py | Python | website/migrations/0020_auto_20170426_1728.py | sunijsharma/wikitowns | 47d5a895e9df04778f3436b3523a1e68aeacde85 | [
"MIT"
] | 46 | 2018-02-27T18:21:27.000Z | 2022-01-31T23:05:53.000Z | website/migrations/0020_auto_20170426_1728.py | piyushd26/wikitowns | 8480f7e2ce747313b79d356878aeed1ef541b2d9 | [
"MIT"
] | 40 | 2017-02-08T11:42:42.000Z | 2021-12-13T19:46:25.000Z | website/migrations/0020_auto_20170426_1728.py | piyushd26/wikitowns | 8480f7e2ce747313b79d356878aeed1ef541b2d9 | [
"MIT"
] | 7 | 2018-03-01T00:50:05.000Z | 2020-10-01T14:16:57.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-26 17:28
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('website', '0019_bookrecommendation_book_image_url'),
]
operations = [
migrations.Al... | 23.35 | 71 | 0.64454 |
722b650db34df68c836ba00cd1ba15c516b0eeea | 1,439 | py | Python | fixture/session.py | LyubovAK/python_training | 14965d4df0daea31755879ed9e9671e89481ecc9 | [
"Apache-2.0"
] | null | null | null | fixture/session.py | LyubovAK/python_training | 14965d4df0daea31755879ed9e9671e89481ecc9 | [
"Apache-2.0"
] | null | null | null | fixture/session.py | LyubovAK/python_training | 14965d4df0daea31755879ed9e9671e89481ecc9 | [
"Apache-2.0"
] | null | null | null | class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
wd = self.app.wd
self.app.open_home_page()
wd.find_element_by_name("user").click()
wd.find_element_by_name("user").clear()
wd.find_element_by_name("user").send_keys... | 31.282609 | 73 | 0.605976 |
d3a94723f6a59080b96fcbba5bba47c2694573bd | 9,979 | py | Python | test/test_pipenv_setup_comp.py | neighborhoods/pipenv-devcheck | 6e6626ce0a367814f65313a0f0e6e67bcc154eed | [
"MIT"
] | 1 | 2022-01-11T17:45:58.000Z | 2022-01-11T17:45:58.000Z | test/test_pipenv_setup_comp.py | neighborhoods/pipenv-devcheck | 6e6626ce0a367814f65313a0f0e6e67bcc154eed | [
"MIT"
] | 2 | 2020-02-05T17:14:31.000Z | 2020-02-10T18:25:00.000Z | test/test_pipenv_setup_comp.py | neighborhoods/pipenv-devcheck | 6e6626ce0a367814f65313a0f0e6e67bcc154eed | [
"MIT"
] | null | null | null | import pytest
from pipenv_devcheck.pipenv_setup_comp import (
read_setup, read_pipfile, get_setup_deps, get_pipfile_deps,
split_ops_and_versions, name_equality_check, version_check,
extras_equality_check)
def test_read_setup(mocker, setup_text, setup_deps_from_read):
"""
Tests that setup.py readi... | 38.233716 | 79 | 0.670107 |
d6f1e595ce646e86c3f9eaacf1359246a0f14fbb | 605 | py | Python | main.py | dvsu/ebook-renamer | 4ca3c9bf3160333cb54ad3f79cef3c1ee99e7419 | [
"MIT"
] | null | null | null | main.py | dvsu/ebook-renamer | 4ca3c9bf3160333cb54ad3f79cef3c1ee99e7419 | [
"MIT"
] | null | null | null | main.py | dvsu/ebook-renamer | 4ca3c9bf3160333cb54ad3f79cef3c1ee99e7419 | [
"MIT"
] | null | null | null | # import argparse
from file_renamer import FileRenamer
# TODO: 1. add CLI command
# parser = argparse.ArgumentParser(prog="Humble Bundle Ebook Renamer", description="blablabla")
# parser.add_argument('-r', '--reference', type=str, required=True, help="Reference file path")
# args = parser.parse_args()
# aa = args.re... | 28.809524 | 95 | 0.757025 |
0521d784531b6e6d7b025155210182a98e2eb244 | 696 | py | Python | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | crawlab/spiders/spiders/db.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | null | null | null | import os
from pymongo import MongoClient
MONGO_HOST = os.environ.get('MONGO_HOST') or 'localhost'
MONGO_PORT = int(os.environ.get('MONGO_PORT')) or 27017
MONGO_USERNAME = os.environ.get('MONGO_USERNAME')
MONGO_PASSWORD = os.environ.get('MONGO_PASSWORD')
MONGO_DB = os.environ.get('MONGO_DB') or 'crawlab_test'
mongo =... | 36.631579 | 59 | 0.698276 |
11c7153a0a1f6895d447ea783ba272078cb906a3 | 1,007 | py | Python | examples/two_way_com_test.py | NuCOS/nucosObs | ff75a78efb7709cb57dfc91dab96d94c2c1d491b | [
"MIT"
] | 1 | 2017-12-29T13:46:42.000Z | 2017-12-29T13:46:42.000Z | examples/two_way_com_test.py | NuCOS/nucosObs | ff75a78efb7709cb57dfc91dab96d94c2c1d491b | [
"MIT"
] | null | null | null | examples/two_way_com_test.py | NuCOS/nucosObs | ff75a78efb7709cb57dfc91dab96d94c2c1d491b | [
"MIT"
] | 1 | 2017-12-29T13:46:48.000Z | 2017-12-29T13:46:48.000Z | import asyncio as aio
from nucosObs import main_loop, loop, debug
from nucosObs.observer import Observer, inThread, broadcast
from nucosObs.observable import Observable
from nucosObs.twoWayInterface import TwoWayInterface
debug.append(True)
class HelloObserver(Observer):
def __init__(self, name, observable, conc... | 32.483871 | 83 | 0.708044 |
a04d6812fe014dbae59b9a00b5ff482e7085d26c | 6,837 | py | Python | Lib/site-packages/tensorflow_probability/python/experimental/inference_gym/targets/_jax/sparse_logistic_regression.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_probability/python/experimental/inference_gym/targets/_jax/sparse_logistic_regression.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/site-packages/tensorflow_probability/python/experimental/inference_gym/targets/_jax/sparse_logistic_regression.py | caiyongji/tf2.3.1-py3.7.9-full-built | ace4efcbf05b2b494388739718a18c13eab83c71 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # Lint as: python2, python3
# Copyright 2020 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 39.068571 | 96 | 0.675442 |
e714c49efba7f3b489a0ceca5cb8c91dd125ae04 | 1,021 | py | Python | dataio/__init__.py | shrubb/neurecon | 9e3488ba1b9449f401331467da8b4774f7799259 | [
"MIT"
] | null | null | null | dataio/__init__.py | shrubb/neurecon | 9e3488ba1b9449f401331467da8b4774f7799259 | [
"MIT"
] | null | null | null | dataio/__init__.py | shrubb/neurecon | 9e3488ba1b9449f401331467da8b4774f7799259 | [
"MIT"
] | null | null | null | def get_data(args, return_val=False, val_downscale=4.0, **overwrite_cfgs):
dataset_type = args.data.get('type', 'DTU')
cfgs = {
'scale_radius': args.data.get('scale_radius', -1),
'downscale': args.data.downscale,
'data_dir': args.data.data_dir,
'train_cameras': False,
'sp... | 32.935484 | 74 | 0.623898 |
4dd35800a4721581c35c28114dd5078a23c3de08 | 182 | py | Python | django_minifier/filesystem.py | realnoobs/django_minifier | 4750ddacd8ab2efd66680abfa3e267d0363e1a8d | [
"MIT"
] | null | null | null | django_minifier/filesystem.py | realnoobs/django_minifier | 4750ddacd8ab2efd66680abfa3e267d0363e1a8d | [
"MIT"
] | null | null | null | django_minifier/filesystem.py | realnoobs/django_minifier | 4750ddacd8ab2efd66680abfa3e267d0363e1a8d | [
"MIT"
] | null | null | null | from django.template.loaders.filesystem import Loader as FilesystemLoader
from .mixins import TemplateMinifierMixin
class Loader(TemplateMinifierMixin, FilesystemLoader):
pass
| 26 | 73 | 0.846154 |
ce30578d799dd7d6d4ec0d0b92a8b3da599c9e43 | 952 | py | Python | tests/test_faceProcessor.py | deay0ung/HalloPy | 652902ed95627496d280eb48f0cef8dade76701d | [
"MIT"
] | 60 | 2018-09-01T08:27:32.000Z | 2022-03-09T21:42:54.000Z | tests/test_faceProcessor.py | deay0ung/HalloPy | 652902ed95627496d280eb48f0cef8dade76701d | [
"MIT"
] | 3 | 2019-06-15T10:08:25.000Z | 2020-04-13T16:34:24.000Z | tests/test_faceProcessor.py | deay0ung/HalloPy | 652902ed95627496d280eb48f0cef8dade76701d | [
"MIT"
] | 24 | 2018-09-01T08:27:49.000Z | 2021-06-15T00:14:04.000Z | import cv2
import numpy as np
import logging
from hallopy.controller import FaceProcessor
from hallopy import utils
from util.image_comp_tool import ImageTestTool
class TestFaceProcessor:
def test_face_covered_frame(self):
"""Test if faces are detected and covered. """
# setup
test_path ... | 31.733333 | 88 | 0.710084 |
75d00640ac335dcb8385c3c009030806792b0e65 | 800 | py | Python | test/filtering/filters/generic_filter_test.py | OTRI-Unipd/OTRI | 5d1fce470eeb31f5cc75cadfc06d9d2908736052 | [
"FSFAP"
] | null | null | null | test/filtering/filters/generic_filter_test.py | OTRI-Unipd/OTRI | 5d1fce470eeb31f5cc75cadfc06d9d2908736052 | [
"FSFAP"
] | 34 | 2020-04-18T13:57:05.000Z | 2021-10-05T16:21:56.000Z | test/filtering/filters/generic_filter_test.py | OTRI-Unipd/OTRI | 5d1fce470eeb31f5cc75cadfc06d9d2908736052 | [
"FSFAP"
] | null | null | null | import unittest
from otri.filtering.filters.generic_filter import GenericFilter
from otri.filtering.stream import Stream
def EXAMPLE_OP(x): return x + 1
class GenericFilterTest(unittest.TestCase):
def setUp(self):
self.s_A = Stream()
self.s_B = Stream()
self.gen_filter = GenericFilter(
... | 32 | 79 | 0.6725 |
eff67eade47d90153b671bacd7c74a71a0a449d6 | 256,987 | py | Python | HLTrigger/Configuration/python/HLT_PIon_cff.py | Xingfu23/cmssw | c82c0fefefd6b377b74d37073bb4f19ce7430068 | [
"Apache-2.0"
] | null | null | null | HLTrigger/Configuration/python/HLT_PIon_cff.py | Xingfu23/cmssw | c82c0fefefd6b377b74d37073bb4f19ce7430068 | [
"Apache-2.0"
] | null | null | null | HLTrigger/Configuration/python/HLT_PIon_cff.py | Xingfu23/cmssw | c82c0fefefd6b377b74d37073bb4f19ce7430068 | [
"Apache-2.0"
] | null | null | null | # hltGetConfiguration --cff --data /dev/CMSSW_11_2_0/PIon --type PIon
# /dev/CMSSW_11_2_0/PIon/V17 (CMSSW_11_2_0)
import FWCore.ParameterSet.Config as cms
fragment = cms.ProcessFragment( "HLT" )
fragment.HLTConfigVersion = cms.PSet(
tableName = cms.string('/dev/CMSSW_11_2_0/PIon/V17')
)
fragment.transferSystem =... | 46.137702 | 212 | 0.731889 |
acd16629a2197c92dff1dc89045ecf6bdcb5361d | 9,002 | py | Python | aiproteomics/rt/models/transformer_rt.py | ai-proteomics/aiproteomics | 125aed4b3528bfd40349ef932034d9532ab969c3 | [
"Apache-2.0"
] | null | null | null | aiproteomics/rt/models/transformer_rt.py | ai-proteomics/aiproteomics | 125aed4b3528bfd40349ef932034d9532ab969c3 | [
"Apache-2.0"
] | 14 | 2022-03-30T19:49:30.000Z | 2022-03-31T11:39:27.000Z | aiproteomics/rt/models/transformer_rt.py | ai-proteomics/aiproteomics | 125aed4b3528bfd40349ef932034d9532ab969c3 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
def get_angles(pos, i, d_model):
angle_rates = 1 / np.power(10000, (2 * (i // 2)) / np.float32(d_model))
return pos * angle_rates
# Position
def positional_encoding(position, d_model):
angle_rads = get_angles(
np.arange(position)[:, np.newaxis], np.aran... | 32.381295 | 104 | 0.637081 |
2511c0546b8d0707b37c268081698571770cff90 | 857 | py | Python | docsrc/defs/md/PyTorch/o2-dna1000-conv10w-fc5.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o2-dna1000-conv10w-fc5.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o2-dna1000-conv10w-fc5.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | 2 | 2021-06-14T20:27:40.000Z | 2021-06-14T20:29:29.000Z | import math
import torch
class TorchModel(torch.nn.Module):
def __init__(self):
super().__init__()
INPUT_CHANNELS: int = 4
INPUT_WIDTH: int = 1000
CONV_NUM_FILTERS: int = 10
CONV_FILTER_WIDTH: int = 21
FC_NUM_UNITS: int = 5
OUTPUT_UNITS: int = 2
se... | 27.645161 | 74 | 0.536756 |
64c49f500b1de17f5075fa002b40b5173caa02ed | 211 | py | Python | unit_tests/__init__.py | openstack-charmers/charm-trilio-data-mover | 156492067a2a3c86ce3f13a043abc7051cafc36d | [
"Apache-2.0"
] | 1 | 2019-08-22T18:06:29.000Z | 2019-08-22T18:06:29.000Z | unit_tests/__init__.py | openstack-charmers/charm-trilio-horizon-plugin | 52d488f620ff9090420f36988c9bd93d320ccdd0 | [
"Apache-2.0"
] | null | null | null | unit_tests/__init__.py | openstack-charmers/charm-trilio-horizon-plugin | 52d488f620ff9090420f36988c9bd93d320ccdd0 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("src")
sys.path.append("src/lib")
# Mock out charmhelpers so that we can test without it.
import charms_openstack.test_mocks # noqa
charms_openstack.test_mocks.mock_charmhelpers()
| 21.1 | 55 | 0.78673 |
ad22870f574ce5f0c77bead9fdef564f5c774a94 | 5,640 | py | Python | python/mmsitedao.py | balder2046/my-program | 53285cebb4852707596252ad93959a361144c595 | [
"MIT"
] | null | null | null | python/mmsitedao.py | balder2046/my-program | 53285cebb4852707596252ad93959a361144c595 | [
"MIT"
] | null | null | null | python/mmsitedao.py | balder2046/my-program | 53285cebb4852707596252ad93959a361144c595 | [
"MIT"
] | null | null | null | import os
import sqlite3
import picturemanager
class PictureDatabase:
def __init__(self,dbpath):
self.conn = sqlite3.connect(dbpath)
pass
class AlbumPicturesDao:
SQL_CREATE_TABLE = 'create table if not exists pictures(id INTEGER PRIMARY key autoincrement,url text not null,urlbase not null)'
... | 42.406015 | 178 | 0.652837 |
589b3435ce9a5cbd60d81238d82d18e87e4a3c20 | 662 | py | Python | src/olympia/activity/admin.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/activity/admin.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/activity/admin.py | covariant/addons-server | 41e6ee9e426facb19a1e1ca8d40277cb6f94a7da | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | from django.contrib import admin
from .models import ActivityLog
class ActivityLogAdmin(admin.ModelAdmin):
list_display = (
'created',
'user',
'__str__',
)
raw_id_fields = ('user',)
readonly_fields = (
'created',
'user',
'__str__',
)
date_hierar... | 18.914286 | 55 | 0.589124 |
395ac89add02b67d67d67b3db8551124c7d4addd | 5,896 | py | Python | tests/unit/states/test_ipmi.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 12 | 2015-01-21T00:18:25.000Z | 2021-07-11T07:35:26.000Z | tests/unit/states/test_ipmi.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 1 | 2015-02-23T19:37:47.000Z | 2015-02-23T19:37:47.000Z | tests/unit/states/test_ipmi.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 12 | 2015-01-05T09:50:42.000Z | 2019-08-19T01:43:40.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase... | 37.316456 | 79 | 0.51306 |
4f903af271d3cb2f724e98a32db70d24b55ec06b | 11,259 | py | Python | pineboolib/DlgConnect.py | Miguel-J/pineboo-qt5-prueba | 09cba52bffa3b845aea7f5daa4aed0c3b7a97523 | [
"MIT"
] | null | null | null | pineboolib/DlgConnect.py | Miguel-J/pineboo-qt5-prueba | 09cba52bffa3b845aea7f5daa4aed0c3b7a97523 | [
"MIT"
] | null | null | null | pineboolib/DlgConnect.py | Miguel-J/pineboo-qt5-prueba | 09cba52bffa3b845aea7f5daa4aed0c3b7a97523 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from builtins import str
import os
from PyQt5 import QtWidgets, QtCore, uic
from pineboolib.utils import filedir
# MODIFICACION 1 PARA CONECTOR SQLITE : Using Python's SQLite Module: self-contained, serverless, zero-configuration and transactional. It i... | 40.793478 | 225 | 0.643574 |
d14e619f0bdbca060b82b1f884418f809c82daec | 6,817 | py | Python | alfirt.runner/src/generator/scene/SceneGenerators.py | Dzess/ALFIRT | a25e34dcacff8c4f63c4c87aa94be90551261758 | [
"MIT"
] | 1 | 2018-07-23T17:30:47.000Z | 2018-07-23T17:30:47.000Z | alfirt.runner/src/generator/scene/SceneGenerators.py | Dzess/ALFIRT | a25e34dcacff8c4f63c4c87aa94be90551261758 | [
"MIT"
] | null | null | null | alfirt.runner/src/generator/scene/SceneGenerators.py | Dzess/ALFIRT | a25e34dcacff8c4f63c4c87aa94be90551261758 | [
"MIT"
] | null | null | null | '''
Created on Aug 11, 2011
@author: Piotr
'''
import logging
from generator.data.SceneDescription import SceneDescription
from generator.data.ObjectPose import ObjectPose
from math import cos, sin, sqrt, radians, floor
class SceneGeneratorBase(object):
'''
Base abstract class for generating scenes
'... | 36.260638 | 108 | 0.639724 |
2696a747d8e3db5f2f9c6c6095a3c6d4c21b0174 | 2,685 | py | Python | src/race/scripts/ttc.py | mldiego/Platooning-F1Tenth | ec5eadb137da8428642b3ffd1b8ca31fde4f6dff | [
"MIT"
] | null | null | null | src/race/scripts/ttc.py | mldiego/Platooning-F1Tenth | ec5eadb137da8428642b3ffd1b8ca31fde4f6dff | [
"MIT"
] | null | null | null | src/race/scripts/ttc.py | mldiego/Platooning-F1Tenth | ec5eadb137da8428642b3ffd1b8ca31fde4f6dff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from ackermann_msgs.msg import AckermannDriveStamped
from message_filters import ApproximateTimeSynchronizer, Subscriber
from nav_msgs.msg import Odometry
from sensor_msgs.msg import LaserScan
import numpy as np
from std_msgs.msg import Float32
from race.msg import stamped_ttc
class... | 37.816901 | 118 | 0.695717 |
144302852a03fb657b5411222c6aca8441355604 | 657 | py | Python | 0x0B-python-input_output/9-student.py | malu17/alx-higher_level_programming | 75a24d98c51116b737f339697c75855e34254d3a | [
"MIT"
] | null | null | null | 0x0B-python-input_output/9-student.py | malu17/alx-higher_level_programming | 75a24d98c51116b737f339697c75855e34254d3a | [
"MIT"
] | null | null | null | 0x0B-python-input_output/9-student.py | malu17/alx-higher_level_programming | 75a24d98c51116b737f339697c75855e34254d3a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Student module.
Contains a Student class and some methods.
"""
class Student():
"""Defines a Student."""
def __init__(self, first_name, last_name, age):
"""Sets the necessary attributes for the Student object.
Args:
first_name (str): first name of the stude... | 25.269231 | 74 | 0.61035 |
8556deccb98759fbf8af76346398ef672f414772 | 4,939 | py | Python | masters/master.chromium.lkgr/master_lkgr_cfg.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | masters/master.chromium.lkgr/master_lkgr_cfg.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | masters/master.chromium.lkgr/master_lkgr_cfg.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T09:16:32.000Z | 2020-07-22T09:16:32.000Z | # Copyright (c) 2012 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.
from buildbot.process.properties import WithProperties
from master import gitiles_poller
from master import master_config
from master import master_util... | 34.538462 | 118 | 0.676048 |
ffef3f7e78bf00aa772b06e5131b7507952b77ae | 6,989 | py | Python | djangsimple/settings.py | danx0r/djangsimple | 6827b9d5fdeeb8fcdd68fa6bf92d29048e839059 | [
"BSD-3-Clause"
] | null | null | null | djangsimple/settings.py | danx0r/djangsimple | 6827b9d5fdeeb8fcdd68fa6bf92d29048e839059 | [
"BSD-3-Clause"
] | null | null | null | djangsimple/settings.py | danx0r/djangsimple | 6827b9d5fdeeb8fcdd68fa6bf92d29048e839059 | [
"BSD-3-Clause"
] | null | null | null | # Django settings for djangsimple project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': ... | 35.29798 | 127 | 0.676921 |
e294b81e7fc17f434c2e4ff3b42f5c9e0efa908b | 2,617 | py | Python | ocflib/vhost/web.py | MCer65535/ocflib | dd8358ab7a955b47c16cf8500db1bf54d5736f78 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ocflib/vhost/web.py | MCer65535/ocflib | dd8358ab7a955b47c16cf8500db1bf54d5736f78 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ocflib/vhost/web.py | MCer65535/ocflib | dd8358ab7a955b47c16cf8500db1bf54d5736f78 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | import re
import requests
from ocflib.account.search import user_attrs
from ocflib.account.search import user_attrs_ucb
VHOST_DB_PATH = '/home/s/st/staff/vhost/vhost.conf'
VHOST_DB_URL = 'https://www.ocf.berkeley.edu/~staff/vhost.conf'
def get_vhost_db():
"""Returns lines from the vhost database. Loaded from t... | 27.547368 | 94 | 0.58846 |
85098ef8e7a0783e4fc6b90db70133da661d3885 | 619 | py | Python | contrib/qt_translations.py | SafeNodeNetwork/SafeNode | 72c830f7eeb59b9c5c959a2745da9d37471a27a7 | [
"MIT"
] | 2 | 2018-05-05T14:03:54.000Z | 2018-05-05T14:55:04.000Z | contrib/qt_translations.py | SafeNodeNetwork/SafeNode | 72c830f7eeb59b9c5c959a2745da9d37471a27a7 | [
"MIT"
] | 1 | 2018-05-09T17:46:32.000Z | 2018-05-09T17:46:32.000Z | contrib/qt_translations.py | SafeNodeNetwork/SafeNode | 72c830f7eeb59b9c5c959a2745da9d37471a27a7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary SafeNode distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.ar... | 26.913043 | 110 | 0.68336 |
ef038c0ee8d4044b3b65733eb4e8f5ad7d873a80 | 3,685 | py | Python | lightclient.py | nukemain/LedStripControl | a827de10670a9d5c1e9d76a0e02f065314968c7f | [
"MIT"
] | null | null | null | lightclient.py | nukemain/LedStripControl | a827de10670a9d5c1e9d76a0e02f065314968c7f | [
"MIT"
] | null | null | null | lightclient.py | nukemain/LedStripControl | a827de10670a9d5c1e9d76a0e02f065314968c7f | [
"MIT"
] | null | null | null | import socket
from SpotifyAPI import MySpotifyAPI
import time
import sys
API = MySpotifyAPI()
songname = ''
oldsongname = ''
i = 0
'''
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("IP_HERE", 1025))
'''
try:
while True:
time.sleep(1)
API.call_token_refresh("C:\\Users\\Sowap\\MyS... | 37.989691 | 153 | 0.49498 |
a8ae754362801bdb15035155271ba2bd7a7150d5 | 1,720 | py | Python | torch/csrc/deploy/example/generate_examples.py | brooks-anderson/pytorch | dd928097938b6368fc7e2dc67721550d50ab08ea | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | torch/csrc/deploy/example/generate_examples.py | brooks-anderson/pytorch | dd928097938b6368fc7e2dc67721550d50ab08ea | [
"Intel"
] | 1 | 2021-03-25T13:42:15.000Z | 2021-03-25T13:42:15.000Z | torch/csrc/deploy/example/generate_examples.py | brooks-anderson/pytorch | dd928097938b6368fc7e2dc67721550d50ab08ea | [
"Intel"
] | 1 | 2021-06-21T14:41:30.000Z | 2021-06-21T14:41:30.000Z | """
Generate the example files that torchpy_test uses.
"""
import argparse
from pathlib import Path
import torch
from torch.package import PackageExporter
try:
from .examples import Simple, resnet18, MultiReturn, multi_return_metadata
except ImportError:
from examples import Simple, resnet18, MultiReturn, mul... | 33.076923 | 116 | 0.684302 |
8539461ac04b1b9d69486aae318156370ba05ec9 | 3,292 | py | Python | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/communication/azure-mgmt-communication/azure/mgmt/communication/models/__init__.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # 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 ... | 40.146341 | 94 | 0.722965 |
4b46b144cf8914fcb8a720050dc8e750aa5657b8 | 10,001 | py | Python | toontown/toon/DistributedNPCToon.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 8 | 2017-10-10T11:41:01.000Z | 2021-02-23T12:55:47.000Z | toontown/toon/DistributedNPCToon.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/toon/DistributedNPCToon.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 2 | 2019-04-06T16:18:23.000Z | 2021-02-25T06:25:01.000Z | from pandac.PandaModules import *
from DistributedNPCToonBase import *
from toontown.quest import QuestParser
from toontown.quest import QuestChoiceGui
from toontown.quest import TrackChoiceGui
from toontown.toonbase import TTLocalizer
from toontown.hood import ZoneUtil
from toontown.toontowngui import TeaserPanel
Choi... | 42.198312 | 145 | 0.617838 |
5ec0c07b201b95046a39b411ee335809e91a3eba | 12,729 | bzl | Python | kotlin/internal/toolchains.bzl | lukaciko/rules_kotlin | b637ddf908ca276dcfb28f02f9bd03dcb3d87238 | [
"Apache-2.0"
] | null | null | null | kotlin/internal/toolchains.bzl | lukaciko/rules_kotlin | b637ddf908ca276dcfb28f02f9bd03dcb3d87238 | [
"Apache-2.0"
] | null | null | null | kotlin/internal/toolchains.bzl | lukaciko/rules_kotlin | b637ddf908ca276dcfb28f02f9bd03dcb3d87238 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Bazel 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 applicable la... | 34.778689 | 119 | 0.583078 |
9b4571d564a34d5dec855606cf4960e3c8cac007 | 5,426 | py | Python | pinball_ext/common/s3_utils.py | robinmaben/pinball | c54a206cf6e3dbadb056c189f741d75828c02f98 | [
"Apache-2.0"
] | 1,143 | 2015-03-06T22:10:53.000Z | 2022-02-23T21:16:47.000Z | pinball_ext/common/s3_utils.py | robinmaben/pinball | c54a206cf6e3dbadb056c189f741d75828c02f98 | [
"Apache-2.0"
] | 70 | 2015-03-06T00:44:39.000Z | 2019-05-01T13:15:10.000Z | pinball_ext/common/s3_utils.py | robinmaben/pinball | c54a206cf6e3dbadb056c189f741d75828c02f98 | [
"Apache-2.0"
] | 169 | 2015-03-09T21:27:12.000Z | 2022-03-19T08:09:13.000Z | # Copyright 2015, Pinterest, 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... | 28.408377 | 79 | 0.680059 |
530120ad5dde9b2e80f74262e8d82e3d7e4b76bf | 19,549 | py | Python | pvn3d/datasets/CrankSlider/data_render_gazebo_CrankSlider.py | akber871/PVN3D | ce1d3448207c655bcabf92ce7b157a70642973a5 | [
"MIT"
] | null | null | null | pvn3d/datasets/CrankSlider/data_render_gazebo_CrankSlider.py | akber871/PVN3D | ce1d3448207c655bcabf92ce7b157a70642973a5 | [
"MIT"
] | null | null | null | pvn3d/datasets/CrankSlider/data_render_gazebo_CrankSlider.py | akber871/PVN3D | ce1d3448207c655bcabf92ce7b157a70642973a5 | [
"MIT"
] | 2 | 2021-09-10T11:47:37.000Z | 2022-01-31T18:24:36.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
import open3d as o3d
from rospy.exceptions import ROSException
import numpy as np
import ros_numpy
import tf
from geometry_msgs.msg import Pose, Twist, PoseArray, PoseStamped, Point, Quaternion, Vector3
from sensor_msgs.msg import Image, CameraInfo, PointCloud... | 49.366162 | 186 | 0.572203 |
e49d606eca2fa35557d2d0436abb815b082058c0 | 2,974 | py | Python | test/functional/p2p_timeouts.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | null | null | null | test/functional/p2p_timeouts.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | null | null | null | test/functional/p2p_timeouts.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | 3 | 2021-04-03T09:11:50.000Z | 2021-04-03T09:12:31.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2018 TurboCoin
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various net timeouts.
- Create three turbocoind nodes:
no_verack_node - we never send a verack in response to ... | 34.581395 | 116 | 0.702757 |
4b8470467019a24c8c5f0e68daa7b3fa92961353 | 5,403 | py | Python | theif/utils/bspline.py | CheerfulUser/source_synphot | a66b2172e229922fcd09020ff94243dd56ac7378 | [
"MIT"
] | null | null | null | theif/utils/bspline.py | CheerfulUser/source_synphot | a66b2172e229922fcd09020ff94243dd56ac7378 | [
"MIT"
] | null | null | null | theif/utils/bspline.py | CheerfulUser/source_synphot | a66b2172e229922fcd09020ff94243dd56ac7378 | [
"MIT"
] | null | null | null | '''A basis-spline module shamelessly grabbed from Stack Overvlow:
http://stackoverflow.com/questions/35236221/how-to-get-the-spline-basis-used-by-scipy-interpolate-splev
This is needed because the basis functions are hidden from python view in
the scipy.interpolate implementation. We want the basis functions thems... | 35.313725 | 106 | 0.547103 |
b771df9e692c2c50d0383eb0006fc4334a3021eb | 1,863 | py | Python | docs/conf.py | gijigae/basthon-jupyterlab | 1e3e70e96be65a7ff168bc1763cc859a44abe6d7 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | gijigae/basthon-jupyterlab | 1e3e70e96be65a7ff168bc1763cc859a44abe6d7 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | gijigae/basthon-jupyterlab | 1e3e70e96be65a7ff168bc1763cc859a44abe6d7 | [
"BSD-3-Clause"
] | null | null | null | """documentation for jupyterlite"""
import os
import json
import datetime
from pathlib import Path
HERE = Path(__file__).parent
ROOT = HERE.parent
APP_PKG = ROOT / "app/package.json"
APP_DATA = json.loads(APP_PKG.read_text(encoding="utf-8"))
# metadata
author = APP_DATA["author"]
project = author.replace("Contributor... | 22.719512 | 83 | 0.668814 |
43b473d42c563e9deb7e238cfa406cbc34b0f6c6 | 806 | py | Python | tests/utils/test_utils_data.py | daizutabi/ivory | d961e6c05ece112d99b8f8c2d6dad530f60b7303 | [
"MIT"
] | 1 | 2019-05-16T10:38:53.000Z | 2019-05-16T10:38:53.000Z | tests/utils/test_utils_data.py | daizutabi/ivory | d961e6c05ece112d99b8f8c2d6dad530f60b7303 | [
"MIT"
] | null | null | null | tests/utils/test_utils_data.py | daizutabi/ivory | d961e6c05ece112d99b8f8c2d6dad530f60b7303 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import ivory.utils.data
def test_softmax():
df = pd.DataFrame([[1, 2], [3, 4]], index=[3, 4])
df = ivory.utils.data.softmax(df)
assert np.allclose(df.sum(axis=1).to_numpy(), [1, 1])
def test_mean():
df = pd.DataFrame([[1, 2], [3, 4], [5, 6]], index=[3, 4, 4])
... | 26 | 64 | 0.566998 |
e6eae5c72b6d2728956f749cb7660312cdc28028 | 2,916 | py | Python | src/fprime/common/models/serialize/string_type.py | vietjtnguyen/fprime-tools | e4ea8b621bd0ab77b56acbec1fcb5ec249dc977e | [
"Apache-2.0"
] | 10 | 2021-06-24T22:32:54.000Z | 2022-03-19T22:51:42.000Z | src/fprime/common/models/serialize/string_type.py | vietjtnguyen/fprime-tools | e4ea8b621bd0ab77b56acbec1fcb5ec249dc977e | [
"Apache-2.0"
] | 35 | 2021-06-03T22:42:49.000Z | 2022-03-30T16:50:56.000Z | src/fprime/common/models/serialize/string_type.py | vietjtnguyen/fprime-tools | e4ea8b621bd0ab77b56acbec1fcb5ec249dc977e | [
"Apache-2.0"
] | 12 | 2021-06-01T23:22:57.000Z | 2022-03-30T01:15:06.000Z | """
Created on Dec 18, 2014
@author: tcanham
"""
import struct
from fprime.constants import DATA_ENCODING
from . import type_base
from .type_exceptions import (
DeserializeException,
NotInitializedException,
StringSizeException,
TypeMismatchException,
)
class StringType(type_base.ValueType):
"... | 35.13253 | 115 | 0.620027 |
3c614889f4e58ce7664f6930df645836f61b5e6d | 2,834 | py | Python | ml_logger/parser/utils.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | 15 | 2019-11-18T05:22:11.000Z | 2022-01-19T03:06:39.000Z | ml_logger/parser/utils.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | 32 | 2020-02-16T20:36:35.000Z | 2021-03-26T17:18:21.000Z | ml_logger/parser/utils.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | 3 | 2020-12-22T20:13:52.000Z | 2022-01-24T14:21:25.000Z | """Utility functions for the parser module."""
import json
from typing import Any, List, Optional, Tuple
from ml_logger.types import LogType
def flatten_log(d: LogType, parent_key: str = "", sep: str = "#") -> LogType:
"""Flatten a log using a separator.
Taken from https://stackoverflow.com/a/6027615/135386... | 32.574713 | 96 | 0.617855 |
43d27fbbd18fed710a2915b4735c4014a63c4361 | 794 | py | Python | modelvshuman/datasets/stylized.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 158 | 2021-06-04T15:19:58.000Z | 2022-03-30T00:31:28.000Z | modelvshuman/datasets/stylized.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 7 | 2021-07-20T03:57:34.000Z | 2022-02-01T11:00:47.000Z | modelvshuman/datasets/stylized.py | TizianThieringer/model-vs-human | 17729b8167520f682d93d55c340c27de07bb2681 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 14 | 2021-06-16T13:33:11.000Z | 2022-03-29T15:04:09.000Z | from os.path import join as pjoin
from .base import Dataset
from .dataloaders import PytorchLoader
from .imagenet import ImageNetParams
from .registry import register_dataset
from .. import constants as c
from . import info_mappings, decision_mappings
@register_dataset(name='stylized')
def stylized(*args, **kwargs):... | 36.090909 | 105 | 0.648615 |
44e7fdf14ed532028b4897c87ae91658c88ef28e | 808 | py | Python | manage.py | rangertaha/crawlytics | 111a1b09ff3f94896b6bb134bb74f696d14d8327 | [
"MIT"
] | null | null | null | manage.py | rangertaha/crawlytics | 111a1b09ff3f94896b6bb134bb74f696d14d8327 | [
"MIT"
] | null | null | null | manage.py | rangertaha/crawlytics | 111a1b09ff3f94896b6bb134bb74f696d14d8327 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "crawlytics.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that t... | 35.130435 | 77 | 0.643564 |
da616eefd4ea2c848fd38b65d5ea88d77d57524f | 1,239 | py | Python | var/spack/repos/builtin/packages/py-networkx/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-06-25T15:25:29.000Z | 2020-06-25T15:25:29.000Z | var/spack/repos/builtin/packages/py-networkx/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2018-07-06T19:11:46.000Z | 2018-07-06T19:12:28.000Z | var/spack/repos/builtin/packages/py-networkx/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-03-06T11:04:37.000Z | 2020-03-06T11:04:37.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyNetworkx(PythonPackage):
"""NetworkX is a Python package for the creation, manipulation,... | 49.56 | 94 | 0.73527 |
4526b81f6d687955ab5b8333f2a1dff435a5fd78 | 6,679 | py | Python | zvt/api/fundamental.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | 1 | 2019-08-24T02:26:51.000Z | 2019-08-24T02:26:51.000Z | zvt/api/fundamental.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | zvt/api/fundamental.py | ringwraith/zvt | ff5844ff7991132bbf38d464f29f461dba5efa14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from zvt.api.common import get_data
from zvt.domain import FinanceFactor, BalanceSheet, IncomeStatement, CashFlowStatement, SPODetail, RightsIssueDetail, \
DividendFinancing, TopTenHolder, TopTenTradableHolder, HolderTrading, ManagerTrading
def get_finance_factor(provider='eastmoney', sec... | 68.85567 | 119 | 0.69202 |
74afe1febdb8de1be121087efc3b60b940d5bdbd | 153 | py | Python | img/rec.py | rbn42/codebase | ecc7197f5c5a66a7ddc97c42820aa23f92fc1f80 | [
"MIT"
] | null | null | null | img/rec.py | rbn42/codebase | ecc7197f5c5a66a7ddc97c42820aa23f92fc1f80 | [
"MIT"
] | null | null | null | img/rec.py | rbn42/codebase | ecc7197f5c5a66a7ddc97c42820aa23f92fc1f80 | [
"MIT"
] | null | null | null | import glob
import sys
def f(p):
for n in glob.glob(p,recursive=True):
print(n)
root=sys.argv[1]
f('%s/**/*.jpg'%root)
f('%s/**/*.png'%root)
| 17 | 41 | 0.575163 |
af71fa396558d58dd6abb6ab32bd3f5c2bb31fa7 | 11,927 | py | Python | tests/tz/test_timezone.py | rileyjohngibbs/pendulum | f1df7dc3f838bd4ab1075ba25c8b6ce5d8141995 | [
"MIT"
] | null | null | null | tests/tz/test_timezone.py | rileyjohngibbs/pendulum | f1df7dc3f838bd4ab1075ba25c8b6ce5d8141995 | [
"MIT"
] | null | null | null | tests/tz/test_timezone.py | rileyjohngibbs/pendulum | f1df7dc3f838bd4ab1075ba25c8b6ce5d8141995 | [
"MIT"
] | null | null | null | from datetime import datetime
from datetime import timedelta
import pytest
import pendulum
from pendulum import timezone
from pendulum.tz import fixed_timezone
from pendulum.tz.exceptions import AmbiguousTime
from pendulum.tz.exceptions import NonExistingTime
from ..conftest import assert_datetime
@pytest.fixture... | 26.802247 | 111 | 0.638467 |
2ffd159107b1dc1a1208b61d74de21501e7ff5a2 | 267 | py | Python | XML/lxml__xml.etree__examples/css_selector.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | XML/lxml__xml.etree__examples/css_selector.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | XML/lxml__xml.etree__examples/css_selector.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
from lxml import html
root = html.fromstring('<p>Hello<br><b>world</b>!</p><br>')
word = root.cssselect('b')[0]
print(html.tostring(word, encoding='unicode', with_tail=False)) # <b>world</b>
| 22.25 | 79 | 0.651685 |
0b0318506b6580556b6fc574a6a57887ab7de785 | 3,917 | py | Python | tables/automl/dataset_test.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 3 | 2021-01-24T23:42:57.000Z | 2021-02-17T12:02:12.000Z | tables/automl/dataset_test.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 320 | 2020-11-08T21:02:43.000Z | 2022-02-10T10:43:29.000Z | tables/automl/dataset_test.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 2 | 2019-11-04T18:25:20.000Z | 2019-11-05T14:35:28.000Z | #!/usr/bin/env python
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 26.646259 | 79 | 0.689558 |
dda9e79cfa05d57a71bf4c5e006de33a5ec7d104 | 207 | py | Python | _test/test-chapter/some_test.py | DavidLeoni/prova-qcb | 38520ab66b34a145e43ffb0ee808562eae31c325 | [
"Apache-2.0"
] | 2 | 2021-04-28T08:31:14.000Z | 2021-08-13T19:43:55.000Z | _test/test-chapter/some_test.py | DavidLeoni/prova-qcb | 38520ab66b34a145e43ffb0ee808562eae31c325 | [
"Apache-2.0"
] | 85 | 2017-09-20T12:29:11.000Z | 2022-02-22T09:42:33.000Z | _test/test-chapter/some_test.py | DavidLeoni/prova-qcb | 38520ab66b34a145e43ffb0ee808562eae31c325 | [
"Apache-2.0"
] | 3 | 2020-09-11T11:59:22.000Z | 2021-07-28T09:09:36.000Z | # 10
# Python
import some_sol
import sys
sys.path.append('../../')
import jupman
from some_sol import * # let's hope for the best
# this is not a solution, jupman tags shouln't get processed:
#jupman-raise | 20.7 | 61 | 0.724638 |
2df958f2f63cff330a7100b685d5bf522d79236a | 1,131 | py | Python | awx/main/migrations/0080_v360_replace_job_origin.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 11,396 | 2017-09-07T04:56:02.000Z | 2022-03-31T13:56:17.000Z | awx/main/migrations/0080_v360_replace_job_origin.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 11,046 | 2017-09-07T09:30:46.000Z | 2022-03-31T20:28:01.000Z | awx/main/migrations/0080_v360_replace_job_origin.py | DamoR25/awxnew | 03ed6e97558ae090ea52703caf6ed1b196557981 | [
"Apache-2.0"
] | 3,592 | 2017-09-07T04:14:31.000Z | 2022-03-31T23:53:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-14 14:51
from __future__ import unicode_literals
from django.db import migrations, models
from awx.main.utils.common import set_current_apps
class Migration(migrations.Migration):
dependencies = [
('main', '0079_v360_rm_implicit_oauth2_ap... | 31.416667 | 149 | 0.642794 |
6eec738c02e1aec3fc78bd4d9b708a5cb2a1265e | 652 | py | Python | other/fischer_yates_shuffle.py | JB1959/Python | b6ca263983933c3ecc06ed0083dd11b6faf870c8 | [
"MIT"
] | 21 | 2020-11-29T11:34:44.000Z | 2021-06-04T05:50:33.000Z | other/fischer_yates_shuffle.py | Agha-Muqarib/Python | 04f156a8973d6156a4357e0717d9eb0aa264d086 | [
"MIT"
] | 279 | 2020-02-12T20:51:09.000Z | 2021-07-20T11:25:19.000Z | other/fischer_yates_shuffle.py | Agha-Muqarib/Python | 04f156a8973d6156a4357e0717d9eb0aa264d086 | [
"MIT"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | #!/usr/bin/python
"""
The Fisher–Yates shuffle is an algorithm for generating a random permutation of a
finite sequence.
For more details visit
wikipedia/Fischer-Yates-Shuffle.
"""
import random
def FYshuffle(list):
for i in range(len(list)):
a = random.randint(0, len(list) - 1)
b = random.randint... | 26.08 | 81 | 0.633436 |
fc12b82feccfb84898b2bb919496eb5c7276dd52 | 2,688 | py | Python | tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_computation_context.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_computation_context.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_computation_context.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.353846 | 78 | 0.757813 |
3290007c2c3d9f20c23597688f30f7b9e2b35bb8 | 3,252 | py | Python | src/virtual-wan/azext_vwan/_util.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/virtual-wan/azext_vwan/_util.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/virtual-wan/azext_vwan/_util.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 42.233766 | 122 | 0.662362 |
00213d60f44c385adb1f1213e2d128bb81fb2d06 | 3,651 | py | Python | src/mem/ruby/network/garnet2.0/GarnetNetwork.py | shantanu-gupta/gem5 | 94af1a6531c5a14da0d67c0c1f5abd8e22e6e514 | [
"BSD-3-Clause"
] | 30 | 2019-07-12T02:35:33.000Z | 2022-02-22T03:34:35.000Z | src/mem/ruby/network/garnet2.0/GarnetNetwork.py | shantanu-gupta/gem5 | 94af1a6531c5a14da0d67c0c1f5abd8e22e6e514 | [
"BSD-3-Clause"
] | 8 | 2020-02-05T17:47:10.000Z | 2021-09-06T03:58:56.000Z | src/mem/ruby/network/garnet2.0/GarnetNetwork.py | shantanu-gupta/gem5 | 94af1a6531c5a14da0d67c0c1f5abd8e22e6e514 | [
"BSD-3-Clause"
] | 25 | 2017-12-02T00:46:04.000Z | 2022-02-18T19:28:53.000Z | # Copyright (c) 2008 Princeton University
# Copyright (c) 2009 Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above c... | 50.013699 | 78 | 0.734867 |
f7d01011b09cc6fc1793f112fb34a6c6cce8fd26 | 5,895 | py | Python | cogs/General.py | msattova/LTPbot | b7a66fe818b37779890b3dc0f57432725a15b79d | [
"MIT"
] | null | null | null | cogs/General.py | msattova/LTPbot | b7a66fe818b37779890b3dc0f57432725a15b79d | [
"MIT"
] | null | null | null | cogs/General.py | msattova/LTPbot | b7a66fe818b37779890b3dc0f57432725a15b79d | [
"MIT"
] | null | null | null | from discord.ext import commands
import discord
import random
from . import LTPcogs
from . import LTPlib as ltp
from . import Twenty_doors
# はじめに呼び出されるコグ
class General(commands.Cog):
# コンストラクタ
def __init__(self, bot):
self.bot = bot
# ゲーム中か否かの判断変数。鍵の名前はそのままコグの名前にする
self.has_started =... | 34.676471 | 73 | 0.524682 |
9af443062fa0e9f58624d2167c0c725fbc8785ec | 10,236 | py | Python | astroquery/alma/tapsql.py | rickynilsson/astroquery | b7edec0d8e36b11c25baa39ad72e4160bc30d465 | [
"BSD-3-Clause"
] | 577 | 2015-02-12T18:23:49.000Z | 2022-03-22T21:38:58.000Z | astroquery/alma/tapsql.py | rickynilsson/astroquery | b7edec0d8e36b11c25baa39ad72e4160bc30d465 | [
"BSD-3-Clause"
] | 1,812 | 2015-01-01T08:02:20.000Z | 2022-03-31T13:03:52.000Z | astroquery/alma/tapsql.py | rickynilsson/astroquery | b7edec0d8e36b11c25baa39ad72e4160bc30d465 | [
"BSD-3-Clause"
] | 322 | 2015-02-23T19:31:29.000Z | 2022-03-25T18:51:30.000Z | """
Utilities for generating ADQL for ALMA TAP service
"""
from datetime import datetime
from astropy import units as u
import astropy.coordinates as coord
from astropy.time import Time
ALMA_DATE_FORMAT = '%d-%m-%Y'
def _gen_pos_sql(field, value):
result = ''
if field == 'SkyCoord.from_name':
# reso... | 35.915789 | 87 | 0.495897 |
d103d6c98699d44014312fc9c86091daa2d67ee4 | 633 | py | Python | manage.py | vamtiger-project/vamtiger-user-registry-django | be76638dc37c05d9b8f6039097494e7e05b7d4a0 | [
"MIT"
] | null | null | null | manage.py | vamtiger-project/vamtiger-user-registry-django | be76638dc37c05d9b8f6039097494e7e05b7d4a0 | [
"MIT"
] | 6 | 2021-03-19T09:14:42.000Z | 2022-02-10T10:22:57.000Z | manage.py | vamtiger-project/vamtiger-user-registry-django | be76638dc37c05d9b8f6039097494e7e05b7d4a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_registry.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | 28.772727 | 77 | 0.685624 |
5196855abb367337913eb493dc2f147d8cdb33bc | 668 | py | Python | sentinel_data/test_image_map.py | cgentemann/seaice | 2f1e7aeec1a5db7bbd1037bd2fb3c392f628f60d | [
"Apache-2.0"
] | null | null | null | sentinel_data/test_image_map.py | cgentemann/seaice | 2f1e7aeec1a5db7bbd1037bd2fb3c392f628f60d | [
"Apache-2.0"
] | null | null | null | sentinel_data/test_image_map.py | cgentemann/seaice | 2f1e7aeec1a5db7bbd1037bd2fb3c392f628f60d | [
"Apache-2.0"
] | null | null | null |
#Python34
import os
import folium
print(folium.__version__)
from folium import plugins
path = 'D:/Project_Data/Arctic_PRIZE/Processed_Data/S1'
merc = os.path.join(path, 'S1A_EW_GRDM_1SDH_20170601T071215_20170601T071320_016837_01BFE1_35BF_terrian_200mHH.tif')
m = folium.Map([37, 0], zoom_start=1, tiles='stamenton... | 18.054054 | 115 | 0.724551 |
193414665e46eab423c36f34651857b641dea0a5 | 3,284 | py | Python | Hw/H6_Adversarial_Attack/attacker.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | 2 | 2021-11-09T14:28:19.000Z | 2022-03-03T17:49:23.000Z | Hw/H6_Adversarial_Attack/attacker.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | null | null | null | Hw/H6_Adversarial_Attack/attacker.py | zhigangjiang/DLAndML-Experiment | 162fb9c2a0865b6adf16f9a9e9a3f6a9b3e7f9b6 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
class Attacker:
def __init__(self, model, loader, mean, std, device):
# 讀入預訓練模型 vgg16
self.model = model
self.loader = loader
self.device = device
self.mean = mean
self.std = std
# FGSM 攻擊
@staticmethod
def f... | 38.186047 | 125 | 0.560292 |
5ff23f46d3f6f6366dc7b1a40f54f2bcc04208d1 | 257 | py | Python | torchtext/legacy/__init__.py | parmeet/text | 1fb2aedb48b5ecc5e81741e7c8504486b91655c6 | [
"BSD-3-Clause"
] | 1 | 2021-05-31T08:19:27.000Z | 2021-05-31T08:19:27.000Z | torchtext/legacy/__init__.py | parmeet/text | 1fb2aedb48b5ecc5e81741e7c8504486b91655c6 | [
"BSD-3-Clause"
] | null | null | null | torchtext/legacy/__init__.py | parmeet/text | 1fb2aedb48b5ecc5e81741e7c8504486b91655c6 | [
"BSD-3-Clause"
] | null | null | null | from . import data
from .. import nn # Not in the legacy folder
from . import datasets
from .. import utils # Not in the legacy folder
from . import vocab
__all__ = ['data',
'nn',
'datasets',
'utils',
'vocab']
| 21.416667 | 48 | 0.564202 |
af7d5d35b2ef997f94c2151a221f27150ea167eb | 1,483 | py | Python | Diploma/preprocessing/offline_preprocessing.py | PVSemk/Emotion-Recognition-in-Video-with-Sound | 6ba5aea38b7fce5fcfcd8e547bf39bbad9b69bcd | [
"MIT"
] | null | null | null | Diploma/preprocessing/offline_preprocessing.py | PVSemk/Emotion-Recognition-in-Video-with-Sound | 6ba5aea38b7fce5fcfcd8e547bf39bbad9b69bcd | [
"MIT"
] | null | null | null | Diploma/preprocessing/offline_preprocessing.py | PVSemk/Emotion-Recognition-in-Video-with-Sound | 6ba5aea38b7fce5fcfcd8e547bf39bbad9b69bcd | [
"MIT"
] | null | null | null | from openface_utils.video_processor import Video_Processor
import os
import torch
from tqdm import tqdm
import numpy as np
import pandas as pd
from openface_utils.resnet50_extractor import Resnet50_Extractor
VIDEO_EXT = ['.mp4', '.avi']
class Preprocessor(object):
def __init__(self,
save_size=112,... | 40.081081 | 80 | 0.628456 |
a4c868011dc1bc19622a07ceb5ff9ed00575fc6a | 11,106 | py | Python | google/cloud/aiplatform_v1beta1/types/pipeline_service.py | SinaChavoshi/python-aiplatform | 384785bd06b39784e02a0afffa92612a70628946 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1beta1/types/pipeline_service.py | SinaChavoshi/python-aiplatform | 384785bd06b39784e02a0afffa92612a70628946 | [
"Apache-2.0"
] | 1 | 2020-10-15T18:51:09.000Z | 2020-10-16T22:02:32.000Z | google/cloud/aiplatform_v1beta1/types/pipeline_service.py | SinaChavoshi/python-aiplatform | 384785bd06b39784e02a0afffa92612a70628946 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.89701 | 138 | 0.688367 |
bc040ad2e42566d713d04642b894cc9d79e1aead | 22,492 | py | Python | iridium/record.py | chriz-uniba/iridium | 4d357dc9d61aebfedd3c3e6a6b6451798c2c7122 | [
"MIT"
] | null | null | null | iridium/record.py | chriz-uniba/iridium | 4d357dc9d61aebfedd3c3e6a6b6451798c2c7122 | [
"MIT"
] | null | null | null | iridium/record.py | chriz-uniba/iridium | 4d357dc9d61aebfedd3c3e6a6b6451798c2c7122 | [
"MIT"
] | null | null | null | """High-level interface for draft and record API."""
from __future__ import annotations
from datetime import datetime
from pathlib import Path
from typing import BinaryIO, Dict, Iterable, List, Optional, Tuple
from .generic import AccessProxy, Query
from .inveniordm import InvenioRDMClient
from .inveniordm.models imp... | 36.872131 | 90 | 0.651031 |
02b3883eb7ac30eaf34046ee0ac45b2bb9d53762 | 2,727 | py | Python | a10_neutron_lbaas/v2/policy.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 10 | 2015-09-15T05:16:15.000Z | 2020-03-18T02:34:39.000Z | a10_neutron_lbaas/v2/policy.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 334 | 2015-02-11T23:45:00.000Z | 2020-02-28T08:58:51.000Z | a10_neutron_lbaas/v2/policy.py | hthompson6/a10-neutron-lbaas | f1639758cd3abcc6c86c8e6b64dcb0397c359621 | [
"Apache-2.0"
] | 24 | 2015-01-13T21:14:45.000Z | 2021-06-02T17:22:14.000Z | # Copyright 2019, Omkar Telee (omkartelee01), A10 Networks
#
# 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 requir... | 30.988636 | 79 | 0.589659 |
0cfe332298754ec6c9d45a5ef0474bb2a1cebbd4 | 30,766 | py | Python | release/scripts/addons_contrib/np_station/np_float_box.py | simileV/blenderStereo29 | 09b993449aaca671a9eb2a6a22327246936eb3db | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-07-20T15:41:58.000Z | 2020-07-20T15:41:58.000Z | release/scripts/addons_contrib/np_station/np_float_box.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons_contrib/np_station/np_float_box.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distri... | 39.595882 | 664 | 0.640155 |
c050ca99016b503129efffa2a690441248141dee | 2,477 | py | Python | Flask-Web-App-Tutorial-main/website/auth.py | kennartfoundation/flask_10 | 50ef253592e55371a37ea8825442f917d320ff46 | [
"MIT"
] | null | null | null | Flask-Web-App-Tutorial-main/website/auth.py | kennartfoundation/flask_10 | 50ef253592e55371a37ea8825442f917d320ff46 | [
"MIT"
] | null | null | null | Flask-Web-App-Tutorial-main/website/auth.py | kennartfoundation/flask_10 | 50ef253592e55371a37ea8825442f917d320ff46 | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, request, flash, redirect, url_for
from .models import User
from werkzeug.security import generate_password_hash, check_password_hash
from . import db
from flask_login import login_user, login_required, logout_user, current_user
auth = Blueprint('auth', __name__)
@auth.r... | 36.426471 | 96 | 0.628583 |
450a3416f306ebf889d857eec3b512da3869eecb | 2,396 | py | Python | bin/parse_vcf.py | kullrich/snpless-nf | 60e8aabea603c81a6d21c885f843c9accfea5f4c | [
"MIT"
] | null | null | null | bin/parse_vcf.py | kullrich/snpless-nf | 60e8aabea603c81a6d21c885f843c9accfea5f4c | [
"MIT"
] | null | null | null | bin/parse_vcf.py | kullrich/snpless-nf | 60e8aabea603c81a6d21c885f843c9accfea5f4c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import operator
import numpy as np
from cyvcf2 import VCF
#mean_coverage input file should have <sample_id><tab><meanDepth>
vcf = VCF(sys.argv[1])
mean_coverage = sys.argv[2]
mean_coverage_dict = {}
with open(mean_coverage, 'rt') as inhandle:
for lines in inhandle:
samp... | 61.435897 | 260 | 0.687396 |
a199d152b4d3545b4e1f3d0bdaea8ea9faca96ee | 775 | py | Python | setup.py | Dictino/pluto-on-binder | 108c2424a8d00e7e845109d6ebdb165d57d0e8b8 | [
"Unlicense"
] | null | null | null | setup.py | Dictino/pluto-on-binder | 108c2424a8d00e7e845109d6ebdb165d57d0e8b8 | [
"Unlicense"
] | null | null | null | setup.py | Dictino/pluto-on-binder | 108c2424a8d00e7e845109d6ebdb165d57d0e8b8 | [
"Unlicense"
] | null | null | null | import setuptools
setuptools.setup(
name="jupyter-pluto-proxy",
# py_modules rather than packages, since we only have 1 file
py_modules=['plutoserver'],
entry_points={
'jupyter_serverproxy_servers': [
# name = packagename:function_name
'pluto = plutoserver:setup_plutoserver',
]
... | 38.75 | 225 | 0.676129 |
65fe705c8d0b85031f0f0bae513c10e1f3890121 | 9,801 | py | Python | minio/minioadmin.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2021-09-23T07:47:13.000Z | 2021-09-23T07:47:13.000Z | minio/minioadmin.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | null | null | null | minio/minioadmin.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2019-04-02T16:13:36.000Z | 2019-04-02T16:13:36.000Z | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
# (C) 2021 MinIO, 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/lic... | 34.149826 | 79 | 0.570758 |
4dd003aec5d8eaea1543fa0d1920bfc3e41464b6 | 25,699 | py | Python | plaster/tools/pipeline/pipeline.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | null | null | null | plaster/tools/pipeline/pipeline.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | 22 | 2020-06-22T19:27:50.000Z | 2021-09-30T20:02:31.000Z | plaster/tools/pipeline/pipeline.py | erisyon/plaster | 20af32aed2365c6351fe3c26293308960099152b | [
"MIT"
] | 2 | 2020-06-16T17:38:46.000Z | 2021-08-06T09:37:22.000Z | import gc
import logging
import sys
import time
from os.path import realpath
import numpy as np
from munch import Munch
from plaster.tools.utils import utils
from plaster.tools.zlog import zlog
from plumbum import colors, local
log = logging.getLogger(__name__)
def timestamps_from_paths(paths, ignore_fn=None):
... | 36.504261 | 117 | 0.497879 |
424a78f521342ce743ae7911342298e85ee93e17 | 103 | py | Python | venv/lib/python3.6/site-packages/django/contrib/postgres/fields/utils.py | xiegudong45/typeidea | db6504a232d120d6ffa185730bd35b9b9ecffa6c | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | venv/lib/python3.6/site-packages/django/contrib/postgres/fields/utils.py | xiegudong45/typeidea | db6504a232d120d6ffa185730bd35b9b9ecffa6c | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | virtual/lib/python3.6/site-packages/django/contrib/postgres/fields/utils.py | ngishjonathan/gallery | dd67f28887316d6277927c667f6641d26317b0b8 | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | class AttributeSetter(object):
def __init__(self, name, value):
setattr(self, name, value)
| 25.75 | 36 | 0.679612 |
24ef43e718bd3f5237a4594b3dc295c7f1cf3cf4 | 1,561 | py | Python | tests/v1/stop.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 133 | 2018-07-01T06:08:49.000Z | 2022-03-26T15:22:21.000Z | tests/v1/stop.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 76 | 2018-06-28T16:41:57.000Z | 2022-03-26T17:23:06.000Z | tests/v1/stop.py | tombry/virlutils | e98136b4e88c456828f2d0496c14f851f2627a46 | [
"MIT"
] | 43 | 2018-06-27T20:40:52.000Z | 2022-02-22T06:16:11.000Z | from . import BaseTest
from click.testing import CliRunner
import requests_mock
from virl.cli.main import virl
try:
from unittest.mock import patch
except ImportError:
from mock import patch
class Tests(BaseTest):
def test_virl_stop(self):
with requests_mock.mock() as m:
# Mock the re... | 37.166667 | 76 | 0.639974 |
18dc611a019407469df593eae7fb57d68a3d618b | 1,680 | py | Python | apps/app.py | Deteriorator/OneBlog | 650f37e233b49d583b40a64e6461b0529a8a148b | [
"Apache-2.0"
] | null | null | null | apps/app.py | Deteriorator/OneBlog | 650f37e233b49d583b40a64e6461b0529a8a148b | [
"Apache-2.0"
] | null | null | null | apps/app.py | Deteriorator/OneBlog | 650f37e233b49d583b40a64e6461b0529a8a148b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------------------------------------
@Name: app.py
@Desc:
@Author: liangz.org@gmail.com
@Create: 2021.06.11 23:27
-------------------------------------------------------------------------------
@Ch... | 28.965517 | 79 | 0.48631 |
fe18386d5c982b4f217119c2937de6ff7516df80 | 6,230 | py | Python | Tracked/std_msgs/msg/_int32_multi_array.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/std_msgs/msg/_int32_multi_array.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/std_msgs/msg/_int32_multi_array.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | # generated from rosidl_generator_py/resource/_idl.py.em
# with input from std_msgs:msg\Int32MultiArray.idl
# generated code does not contain a copyright notice
# Import statements for member types
# Member 'data'
import array # noqa: E402, I100
from rosidl_parser.rosidl_parser import definition as rosidl_parser_d... | 37.53012 | 135 | 0.607705 |
bb122002081e6b3f4ecced939411e2fd0274f37e | 848 | py | Python | MotionRecognitionPPTControl/model/train.py | oaojjj/Hand-Motion-Recognition-PPT-Contoll | 5ae3b609cc1d9eece8975d1fe20c32eba1ab9c17 | [
"Apache-2.0"
] | null | null | null | MotionRecognitionPPTControl/model/train.py | oaojjj/Hand-Motion-Recognition-PPT-Contoll | 5ae3b609cc1d9eece8975d1fe20c32eba1ab9c17 | [
"Apache-2.0"
] | 1 | 2021-05-12T13:51:31.000Z | 2021-05-12T13:51:31.000Z | MotionRecognitionPPTControl/model/train.py | oaojjj/Hand-Motion-Recognition-PPT-Contoll | 5ae3b609cc1d9eece8975d1fe20c32eba1ab9c17 | [
"Apache-2.0"
] | 3 | 2021-06-06T07:37:29.000Z | 2021-06-13T07:23:06.000Z | import os
import sys
import argparse
# python train.py --input_train_path = [INPUT_TRAIN_PATH]
from model.train_utils import load_data, build_model
def main(dirname):
x_train,y_train,x_test,y_test = load_data(dirname)
model=build_model(y_train.shape[1])
print('Training stage')
print('=============='... | 31.407407 | 102 | 0.716981 |
8397ecc4b9847142e83f1d2eba2f79100c84780c | 4,932 | py | Python | Algorithm.Python/PythonDictionaryFeatureRegressionAlgorithm.py | BlackBoxAM/Lean | 5ea9f04b104d27f0fcfe3a383a3a60ca12206d99 | [
"Apache-2.0"
] | 6,580 | 2015-01-12T16:48:44.000Z | 2022-03-31T22:05:09.000Z | Algorithm.Python/PythonDictionaryFeatureRegressionAlgorithm.py | BlackBoxAM/Lean | 5ea9f04b104d27f0fcfe3a383a3a60ca12206d99 | [
"Apache-2.0"
] | 3,392 | 2015-01-12T17:44:07.000Z | 2022-03-30T20:34:03.000Z | Algorithm.Python/PythonDictionaryFeatureRegressionAlgorithm.py | BlackBoxAM/Lean | 5ea9f04b104d27f0fcfe3a383a3a60ca12206d99 | [
"Apache-2.0"
] | 3,354 | 2015-01-12T16:58:31.000Z | 2022-03-31T00:56:03.000Z | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen... | 38.53125 | 114 | 0.641322 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.