hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
84cc4593904c011a80dfa3d615fb31bce14baa28 | 99,542 | py | Python | python/paddle/fluid/contrib/layers/nn.py | chao9527/PaddleBox | 1cb68eb8227096c3d269e7f6ba5075f7157add86 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/layers/nn.py | chao9527/PaddleBox | 1cb68eb8227096c3d269e7f6ba5075f7157add86 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/layers/nn.py | chao9527/PaddleBox | 1cb68eb8227096c3d269e7f6ba5075f7157add86 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appli... | 39.896593 | 208 | 0.578078 |
ac93e4ed26bea940b2abee9d9ec52ef7eb9c7549 | 504 | py | Python | ucsmsdk/methodmeta/StatsClearIntervalMeta.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/methodmeta/StatsClearIntervalMeta.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/methodmeta/StatsClearIntervalMeta.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the meta information of StatsClearInterval ExternalMethod."""
from ..ucscoremeta import MethodMeta, MethodPropertyMeta
method_meta = MethodMeta("StatsClearInterval", "statsClearInterval", "Version142b")
prop_meta = {
"cookie": MethodPropertyMeta("Cookie", "cookie", "Xs:string", "Version14... | 31.5 | 103 | 0.708333 |
2fcf2598babd57183729eb8e7a6535495a2d8937 | 11,107 | py | Python | src/robot/running/model.py | mbrzozowski/robotframework | 3bb3301a715d2809647915b5150f54ddde83b5e0 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-09-13T08:56:49.000Z | 2021-01-10T11:21:34.000Z | src/robot/running/model.py | daobatu/robotframework | 4710d41c5afced6df54e2ef66aefc29df4cc5e7b | [
"ECL-2.0",
"Apache-2.0"
] | 55 | 2021-03-10T01:16:34.000Z | 2022-03-14T01:27:43.000Z | src/robot/running/model.py | daobatu/robotframework | 4710d41c5afced6df54e2ef66aefc29df4cc5e7b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-16T01:51:00.000Z | 2022-03-16T01:51:00.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 37.778912 | 116 | 0.663546 |
8deb9ef5ea3489996f501dd54355049823bbf513 | 2,246 | py | Python | tests/demo/demoproject/settings.py | DjangoAdminHackers/django-adminfilters | f133d61270663479e5ce56ea0703c69d798cd919 | [
"BSD-1-Clause"
] | null | null | null | tests/demo/demoproject/settings.py | DjangoAdminHackers/django-adminfilters | f133d61270663479e5ce56ea0703c69d798cd919 | [
"BSD-1-Clause"
] | null | null | null | tests/demo/demoproject/settings.py | DjangoAdminHackers/django-adminfilters | f133d61270663479e5ce56ea0703c69d798cd919 | [
"BSD-1-Clause"
] | null | null | null | # Django settings for demoproject project.
import os
import sys
here = os.path.dirname(__file__)
sys.path.append(os.path.abspath(os.path.join(here, '..', '..')))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
# Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': '... | 29.552632 | 78 | 0.663847 |
3e770b290b5ab74370a7d99fe47e31adb7817df3 | 882 | py | Python | platform/core/polyaxon/hpsearch/search_managers/random.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/hpsearch/search_managers/random.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/polyaxon/hpsearch/search_managers/random.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | from hpsearch.search_managers.base import BaseSearchAlgorithmManager
from hpsearch.search_managers.utils import get_random_suggestions
from schemas import SearchAlgorithms
class RandomSearchManager(BaseSearchAlgorithmManager):
"""Random search algorithm manager for hyperparameter optimization."""
NAME = Sear... | 40.090909 | 92 | 0.753968 |
5b1e3b46a3f0f60e89faa6c4278bfbeaeb11ffd9 | 12,600 | py | Python | tests/sentry/tasks/test_sentry_apps.py | CSP197/sentry | df28d6cc97afde739196e0f8e1b448b53d637f0b | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/tasks/test_sentry_apps.py | CSP197/sentry | df28d6cc97afde739196e0f8e1b448b53d637f0b | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/tasks/test_sentry_apps.py | CSP197/sentry | df28d6cc97afde739196e0f8e1b448b53d637f0b | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
from celery import Task
from collections import namedtuple
from django.core.urlresolvers import reverse
from mock import patch
from sentry.models import Rule, SentryApp, SentryAppInstallation
from sentry.testutils import TestCase
from sentry.testutils.helpers import ... | 39.130435 | 95 | 0.658968 |
4c1d374d8d7453e0b31353954c1552b2c1d91e50 | 3,996 | py | Python | application/model/dao/aula_dao.py | UniversidadeDeVassouras/labproginter-2020.2-IgorRamos-t2 | 9d922c66d2faef32a9c82f137f5a3cbe3b4bfc0f | [
"Apache-2.0"
] | 1 | 2021-03-28T06:00:27.000Z | 2021-03-28T06:00:27.000Z | application/model/dao/aula_dao.py | igoramos77/ava2.0 | 9d922c66d2faef32a9c82f137f5a3cbe3b4bfc0f | [
"Apache-2.0"
] | null | null | null | application/model/dao/aula_dao.py | igoramos77/ava2.0 | 9d922c66d2faef32a9c82f137f5a3cbe3b4bfc0f | [
"Apache-2.0"
] | null | null | null | from application.model.entity.disciplina import Disciplina
from application.model.entity.aula import Aula
from application.model.dao.disciplina_dao import DisciplinaDAO
class AulaDAO():
def __init__(self):
disciplinaDao = DisciplinaDAO()
self.aulas = [
#(self, id, modulo_id, disciplina_... | 63.428571 | 115 | 0.631882 |
bebeb215b4b4cbe4147a8c86a8f323eb4e698470 | 7,240 | bzl | Python | boost/boost.bzl | QuantamHD/rules_boost | 584830e5fedf8eee8becc324166b3c0649a1712b | [
"Apache-2.0"
] | 214 | 2016-08-24T01:08:04.000Z | 2022-03-11T02:24:55.000Z | boost/boost.bzl | QuantamHD/rules_boost | 584830e5fedf8eee8becc324166b3c0649a1712b | [
"Apache-2.0"
] | 184 | 2017-01-20T22:43:28.000Z | 2022-03-07T16:26:45.000Z | boost/boost.bzl | QuantamHD/rules_boost | 584830e5fedf8eee8becc324166b3c0649a1712b | [
"Apache-2.0"
] | 258 | 2016-08-24T01:08:06.000Z | 2022-03-18T18:07:16.000Z | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
hdrs_patterns = [
"boost/%s.h",
"boost/%s_fwd.h",
"boost/%s.hpp",
"boost/%s_fwd.hpp",
"boost/%s/**/*.hpp",
"boost/%s/**/*.ipp",
"boost/%s/**/*.h",
"libs/%s... | 31.615721 | 163 | 0.601657 |
6d8551ac6c08e7bef51b317b5921be65d51b2d72 | 2,381 | py | Python | sdks/python/appcenter_sdk/models/SymbolUploads.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/SymbolUploads.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/SymbolUploads.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class SymbolUploads(... | 26.752809 | 80 | 0.551449 |
f48b054f88ea544572394306c4369b865f1417d1 | 7,753 | py | Python | lnbits/core/views/generic.py | lightningames/lnbits | 63d7431898f9ab79522765dbb29c8a2fd874820a | [
"MIT"
] | null | null | null | lnbits/core/views/generic.py | lightningames/lnbits | 63d7431898f9ab79522765dbb29c8a2fd874820a | [
"MIT"
] | null | null | null | lnbits/core/views/generic.py | lightningames/lnbits | 63d7431898f9ab79522765dbb29c8a2fd874820a | [
"MIT"
] | null | null | null | from os import path
from http import HTTPStatus
from quart import (
g,
current_app,
abort,
jsonify,
request,
redirect,
render_template,
send_from_directory,
url_for,
)
from lnbits.core import core_app, db
from lnbits.decorators import check_user_exists, validate_uuids
from lnbits.se... | 31.388664 | 103 | 0.630982 |
53f58b343e6aadd92127f908763ddc43a6c4bee6 | 1,684 | py | Python | tests/helloworld/hello_worker_task_pool_dask.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 9 | 2019-05-06T17:30:35.000Z | 2021-12-10T16:05:00.000Z | tests/helloworld/hello_worker_task_pool_dask.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 80 | 2018-04-13T20:25:04.000Z | 2022-03-10T21:59:58.000Z | tests/helloworld/hello_worker_task_pool_dask.py | HPC-SimTools/IPS-framework | 4911bcc97a64bb31503009de75f24d3cba263bec | [
"BSD-3-Clause"
] | 4 | 2020-08-07T17:58:13.000Z | 2021-11-12T17:17:42.000Z | # -------------------------------------------------------------------------------
# Copyright 2006-2021 UT-Battelle, LLC. See LICENSE for more information.
# -------------------------------------------------------------------------------
from ipsframework import Component
from time import sleep
import copy
def myFun(... | 33.68 | 94 | 0.511876 |
6cc30ef7a43654335a9886e571de6bc60d03ba4b | 658 | py | Python | mockserver/helper/randstr.py | sebastianlopez-cybavo/SOFA_MOCK_SERVER_PYTHON | b17a1ee33a66a0a99a619d51c17da807be992d47 | [
"Apache-2.0"
] | null | null | null | mockserver/helper/randstr.py | sebastianlopez-cybavo/SOFA_MOCK_SERVER_PYTHON | b17a1ee33a66a0a99a619d51c17da807be992d47 | [
"Apache-2.0"
] | null | null | null | mockserver/helper/randstr.py | sebastianlopez-cybavo/SOFA_MOCK_SERVER_PYTHON | b17a1ee33a66a0a99a619d51c17da807be992d47 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018-2022 The CYBAVO developers
# All Rights Reserved.
# NOTICE: All information contained herein is, and remains
# the property of CYBAVO and its suppliers,
# if any. The intellectual and technical concepts contained
# herein are proprietary to CYBAVO
# Dissemination of this information or reproduction... | 31.333333 | 67 | 0.746201 |
07d4d32666db4080820585fb22cbe41d9c6d2386 | 493 | py | Python | src/python/imdb_graphql/database.py | kiendang/imdb-graphql | b23847ac04cf31aad1ce51a353a9642b0878d312 | [
"MIT"
] | 5 | 2018-12-01T17:39:39.000Z | 2021-12-20T07:29:13.000Z | src/python/imdb_graphql/database.py | kiendang/imdb-graphql | b23847ac04cf31aad1ce51a353a9642b0878d312 | [
"MIT"
] | 1 | 2020-02-01T17:44:09.000Z | 2020-02-25T03:58:09.000Z | src/python/imdb_graphql/database.py | kiendang/imdb-graphql | b23847ac04cf31aad1ce51a353a9642b0878d312 | [
"MIT"
] | 1 | 2021-08-22T12:57:09.000Z | 2021-08-22T12:57:09.000Z | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('postgresql://imdb:@/imdb')
session = scoped_session(sessionmaker(
autocommit=False,
autoflush=False,
bind=engine
))
Base = declarati... | 24.65 | 73 | 0.774848 |
2d1136e82db59b6cf6dbd47fa462d52ce7dd1aee | 2,906 | py | Python | package/openjdk-10.44/custom.py | G4V/ck-env | b882480b00b9dbd88f15eef58440772e09414f64 | [
"BSD-3-Clause"
] | 80 | 2015-03-03T14:27:39.000Z | 2022-01-04T15:37:01.000Z | package/openjdk-10.44/custom.py | G4V/ck-env | b882480b00b9dbd88f15eef58440772e09414f64 | [
"BSD-3-Clause"
] | 78 | 2016-02-20T07:47:05.000Z | 2021-05-01T13:33:31.000Z | package/openjdk-10.44/custom.py | G4V/ck-env | b882480b00b9dbd88f15eef58440772e09414f64 | [
"BSD-3-Clause"
] | 22 | 2016-07-29T07:25:11.000Z | 2021-02-08T16:18:26.000Z | #!/usr/bin/python
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
import os
import sys
import json
##############################################################################
# customize installation
def setup(i):
"""
Input: {
cfg - meta of this ... | 26.18018 | 116 | 0.5117 |
72ddc2462b531b74c048a9603bf9adfc61174c67 | 2,602 | py | Python | drf_advanced_auth/serializers.py | seawolf42/drf-advanced-auth | a7ce415796326e7ffa6de6702e556979262202a1 | [
"BSD-3-Clause"
] | 1 | 2019-04-19T22:45:02.000Z | 2019-04-19T22:45:02.000Z | drf_advanced_auth/serializers.py | seawolf42/drf-advanced-auth | a7ce415796326e7ffa6de6702e556979262202a1 | [
"BSD-3-Clause"
] | null | null | null | drf_advanced_auth/serializers.py | seawolf42/drf-advanced-auth | a7ce415796326e7ffa6de6702e556979262202a1 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth import authenticate
from django.contrib.auth.password_validation import validate_password
from django.core.exceptions import ValidationError as ModelValidationError
from rest_framework import serializers
from . import utils
_authentication_failure_error = dict(error='authentication error')
... | 28.282609 | 81 | 0.699078 |
0efd756f0e32370aa04412e3ba7061d4714583f0 | 4,334 | py | Python | userextensions/views/gui.py | mraligorithm/django-userextensions | b84070516bd64824a97cd50dec31be7f83dbaa3b | [
"Apache-2.0"
] | null | null | null | userextensions/views/gui.py | mraligorithm/django-userextensions | b84070516bd64824a97cd50dec31be7f83dbaa3b | [
"Apache-2.0"
] | null | null | null | userextensions/views/gui.py | mraligorithm/django-userextensions | b84070516bd64824a97cd50dec31be7f83dbaa3b | [
"Apache-2.0"
] | null | null | null | """
This file contains views that render a specific page for the gui.
"""
from django.shortcuts import redirect, render, reverse
from django.conf import settings
from django.contrib import messages
from django.views.generic import (View, ListView)
from djangohelpers.views import FilterByQueryParamsMixin
from braces.vi... | 48.155556 | 119 | 0.712506 |
0538e2d4db28726c7e40f9453155b783a4b9d212 | 14,995 | py | Python | csvdiff3/output.py | sctweedie/csvdiff3 | fcdd720016504a10e350838d1a31dedaa2e662dc | [
"MIT"
] | 4 | 2019-10-23T11:46:49.000Z | 2022-02-23T13:03:09.000Z | csvdiff3/output.py | sctweedie/csvdiff3 | fcdd720016504a10e350838d1a31dedaa2e662dc | [
"MIT"
] | 6 | 2020-07-01T17:37:17.000Z | 2020-07-08T16:15:05.000Z | csvdiff3/output.py | sctweedie/csvdiff3 | fcdd720016504a10e350838d1a31dedaa2e662dc | [
"MIT"
] | null | null | null | from abc import abstractmethod
import re
import csv
import sys
import os
class OutputDriver():
"""
Abstract Base Class for merge output drivers.
The merge3 run will output its merge results to an instance of an
OutputDriver; the exact subclass chosen can format the output as
it wishes, eg. to defi... | 38.252551 | 88 | 0.558586 |
1ec9012f48f06c0591b907330ebd43c6a30c0280 | 371 | py | Python | src/enbuckets/models.py | tingcar/PSEP | 0a63ba14f034ee0b130a5b33aa349722ea821bfc | [
"Apache-2.0"
] | null | null | null | src/enbuckets/models.py | tingcar/PSEP | 0a63ba14f034ee0b130a5b33aa349722ea821bfc | [
"Apache-2.0"
] | null | null | null | src/enbuckets/models.py | tingcar/PSEP | 0a63ba14f034ee0b130a5b33aa349722ea821bfc | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Enbuck(models.Model):
user = models.ForeignKey(User)
entime = models.DateTimeField(null=True, blank=True)
envalue = models.DecimalField(max_digits=12, decimal_places=4)
def __unicode__(sel... | 28.538462 | 68 | 0.725067 |
7a3f5c43ca3bee87fd82bff8f62fd1f79a8272db | 425 | py | Python | adapter/wsgi.py | ArbiterGames/analytics-adapter | 3603cf0ab6c2377b9ade67d3ed7fafb68f0ea475 | [
"MIT"
] | null | null | null | adapter/wsgi.py | ArbiterGames/analytics-adapter | 3603cf0ab6c2377b9ade67d3ed7fafb68f0ea475 | [
"MIT"
] | null | null | null | adapter/wsgi.py | ArbiterGames/analytics-adapter | 3603cf0ab6c2377b9ade67d3ed7fafb68f0ea475 | [
"MIT"
] | null | null | null | """
WSGI config for adapter 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.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "adapter.settings")
from django.core.w... | 25 | 78 | 0.790588 |
c4a5196f00d9d47a3bb44fa873d32f71aced320a | 1,324 | py | Python | google_api_lib/utils.py | brentisreallyme/smallboard | f832687c2371ba60259598c2698a509eee0a7da0 | [
"MIT"
] | 21 | 2019-11-19T21:50:50.000Z | 2021-01-24T05:51:23.000Z | google_api_lib/utils.py | brentisreallyme/smallboard | f832687c2371ba60259598c2698a509eee0a7da0 | [
"MIT"
] | 404 | 2019-11-25T01:15:44.000Z | 2021-11-22T15:06:53.000Z | google_api_lib/utils.py | brentisreallyme/smallboard | f832687c2371ba60259598c2698a509eee0a7da0 | [
"MIT"
] | 8 | 2019-12-02T03:00:11.000Z | 2021-05-28T16:41:33.000Z | from django.conf import settings
import googleapiclient
import googleapiclient.discovery
import googleapiclient.errors
from google.oauth2 import service_account
from celery import Task
def enabled():
return settings.GOOGLE_API_AUTHN_INFO is not None
class GoogleApiClientTask(Task):
autoretry_for = (googlea... | 28.170213 | 82 | 0.675982 |
46dfc97f8a1defabc0eae27cf33aba1fd6338a51 | 2,619 | py | Python | src/decisionengine_modules/glideinwms/transforms/gwms_to_aws_data.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T15:51:19.000Z | 2022-02-23T15:45:37.000Z | src/decisionengine_modules/glideinwms/transforms/gwms_to_aws_data.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 358 | 2020-03-02T20:06:38.000Z | 2022-03-28T20:39:01.000Z | src/decisionengine_modules/glideinwms/transforms/gwms_to_aws_data.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 34 | 2020-02-24T17:17:11.000Z | 2022-01-13T21:50:11.000Z | import pandas as pd
from decisionengine.framework.modules import Transform
_ATTR_TRANSLATION_MAP = {
"GLIDEIN_Supported_VOs": "AWSProfile",
"INSTANCE_TYPE": "InstanceType",
"AVAILABILITY_ZONE": "AvailabilityZone",
"GlideinConfigPerEntryMaxGlideins": "MaxLimit",
}
@Transform.consumes(Factory_Entries_... | 38.514706 | 119 | 0.602138 |
1ee899f5baaa1eb1fdd5d2571f5f8e9d9c5aa5b7 | 2,531 | py | Python | src/img_pub_py/img_pub_py/file_pub.py | LukasKratochvila/ros2-ws-ai4di | 8c387eb3752a2abd16b577cce459e22551ddf5d8 | [
"MIT"
] | null | null | null | src/img_pub_py/img_pub_py/file_pub.py | LukasKratochvila/ros2-ws-ai4di | 8c387eb3752a2abd16b577cce459e22551ddf5d8 | [
"MIT"
] | null | null | null | src/img_pub_py/img_pub_py/file_pub.py | LukasKratochvila/ros2-ws-ai4di | 8c387eb3752a2abd16b577cce459e22551ddf5d8 | [
"MIT"
] | null | null | null | import rclpy
from rclpy.node import Node
from std_msgs.msg import String
from cv_bridge import CvBridge
from sensor_msgs.msg import Image
import cv2
import numpy as np
import os
class ImgPublisher(Node):
def __init__(self):
super().__init__('img_publisher')
self.declare_parameter("input_dir", ... | 38.348485 | 107 | 0.640853 |
42b8e92964f5337c0ebb982556066448913f024f | 8,504 | py | Python | sphinx-doc/conf.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | 1 | 2018-03-18T14:46:34.000Z | 2018-03-18T14:46:34.000Z | sphinx-doc/conf.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | null | null | null | sphinx-doc/conf.py | sasjafor/scion | cdcbd186d1350ad78f365556b771ada522bd33ed | [
"Apache-2.0"
] | 1 | 2018-03-14T14:59:57.000Z | 2018-03-14T14:59:57.000Z | # -*- coding: utf-8 -*-
#
# SCION documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 31 15:58:58 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 31.496296 | 79 | 0.716722 |
21b60debb9f43d19ba2ab5bcfa7f00e3676c357b | 1,914 | py | Python | lstmAEncoderTrain.py | drsagitn/lstm-gan-video-anomaly-detection | ab3acf76778c26e74658013536110d2d300df50c | [
"MIT"
] | 1 | 2021-06-01T18:38:01.000Z | 2021-06-01T18:38:01.000Z | lstmAEncoderTrain.py | drsagitn/lstm-gan-video-anomaly-detection | ab3acf76778c26e74658013536110d2d300df50c | [
"MIT"
] | 1 | 2019-06-25T05:10:53.000Z | 2019-06-25T05:10:53.000Z | lstmAEncoderTrain.py | drsagitn/lstm-gan-video-anomaly-detection | ab3acf76778c26e74658013536110d2d300df50c | [
"MIT"
] | 1 | 2019-07-05T07:02:17.000Z | 2019-07-05T07:02:17.000Z | # Basic libraries
import numpy as np
import tensorflow as tf
from data_gen import get_train_data, get_next_batch
import os
tf.reset_default_graph()
tf.set_random_seed(2016)
np.random.seed(2016)
# LSTM-autoencoder
from LSTMAutoencoder import *
# Constants
batch_num = 2
hidden_num = 1024
step_num = 10 # number of fram... | 34.178571 | 102 | 0.672414 |
632f559373d9bb0c3162946cc365d71f9a62bf57 | 29,838 | py | Python | test/aaa_profiling/test_orm.py | mattkohl/sqlalchemy | edf8e782cf5011cd43a0ee281b9e0b1d1becef1f | [
"MIT"
] | 1 | 2020-07-15T15:00:42.000Z | 2020-07-15T15:00:42.000Z | test/aaa_profiling/test_orm.py | mattkohl/sqlalchemy | edf8e782cf5011cd43a0ee281b9e0b1d1becef1f | [
"MIT"
] | null | null | null | test/aaa_profiling/test_orm.py | mattkohl/sqlalchemy | edf8e782cf5011cd43a0ee281b9e0b1d1becef1f | [
"MIT"
] | 1 | 2021-06-13T01:55:35.000Z | 2021-06-13T01:55:35.000Z | from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import testing
from sqlalchemy.orm import Bundle
from sqlalchemy.orm import configure_mappers
from sqlalchemy.orm import defaultload
from sqlalchemy.orm import defer
from sqlalch... | 25.722414 | 79 | 0.489376 |
98d9102a78df1f3865209e541609d44a14069588 | 1,889 | py | Python | sdk/python/pulumi_azure_native/network/v20160901/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20160901/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20160901/__init__.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from ... import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .application_gateway import *
from .exp... | 36.326923 | 80 | 0.822128 |
2141a0ba65c3f023200f5c2ba757a5d6be51509e | 8,440 | py | Python | config/settings/production.py | avitko001c/sparta_webapp | 728225db71d898b29c9408595a58b7297ccab0be | [
"Apache-1.1"
] | null | null | null | config/settings/production.py | avitko001c/sparta_webapp | 728225db71d898b29c9408595a58b7297ccab0be | [
"Apache-1.1"
] | null | null | null | config/settings/production.py | avitko001c/sparta_webapp | 728225db71d898b29c9408595a58b7297ccab0be | [
"Apache-1.1"
] | null | null | null | import logging
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env('DJANGO_SECRET_KEY')
# https://docs.djangoproject.com/en/dev/ref/settings/#allow... | 40.772947 | 106 | 0.6 |
4fbba626ceb756f39077e86d314ef1c4897ada9c | 5,268 | py | Python | resources/lib/services/library_updater.py | Spider-24/plugin.video.netflix | 3828f412412bee8023d5ce665c24e6f65bfea877 | [
"MIT"
] | null | null | null | resources/lib/services/library_updater.py | Spider-24/plugin.video.netflix | 3828f412412bee8023d5ce665c24e6f65bfea877 | [
"MIT"
] | null | null | null | resources/lib/services/library_updater.py | Spider-24/plugin.video.netflix | 3828f412412bee8023d5ce665c24e6f65bfea877 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Automatic updates of items exported to the Kodi library"""
from __future__ import absolute_import, division, unicode_literals
from datetime import datetime, timedelta
import AddonSignals
import xbmc
from resources.lib.globals import g
import resources.lib.common as common
import resources.... | 39.909091 | 94 | 0.635345 |
23b262e5975fdb14dec9fc60e87237192ffece89 | 3,774 | py | Python | contrib/macdeploy/custom_dsstore.py | FAB-Coin/fabcoin | 6515d8f84a6fa37605b4e6543ff98e907ddc8646 | [
"MIT"
] | 26 | 2018-04-24T00:33:11.000Z | 2022-03-26T15:46:04.000Z | contrib/macdeploy/custom_dsstore.py | FAB-Coin/fabcoin | 6515d8f84a6fa37605b4e6543ff98e907ddc8646 | [
"MIT"
] | 4 | 2018-07-17T13:33:26.000Z | 2018-08-27T07:10:49.000Z | contrib/macdeploy/custom_dsstore.py | FAB-Coin/fabcoin | 6515d8f84a6fa37605b4e6543ff98e907ddc8646 | [
"MIT"
] | 22 | 2018-04-24T00:33:31.000Z | 2022-02-03T09:40:26.000Z | #!/usr/bin/env python
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... | 61.868852 | 1,817 | 0.727345 |
05fb0f3c81fce608dd41e389cff62c71ab1eaa67 | 6,694 | py | Python | BnB.py | davidbrough1/cse_6140_project | 441ada5cac53c68e41ac7c734e15ba60aca40b36 | [
"MIT"
] | null | null | null | BnB.py | davidbrough1/cse_6140_project | 441ada5cac53c68e41ac7c734e15ba60aca40b36 | [
"MIT"
] | null | null | null | BnB.py | davidbrough1/cse_6140_project | 441ada5cac53c68e41ac7c734e15ba60aca40b36 | [
"MIT"
] | null | null | null | #This file contains all the code used to implement branch and bound algorithm
import time
import sys
from project import CSE6140Project
'''Globals
@INF = Infinity
@best_cost = Present best cost
@start_time = For measuring rate
'''
INF = 100000000
best_cost = 0
start_time = time.time()
'''Reducing the Cost ... | 31.42723 | 121 | 0.481775 |
ec17a1241f1978fb6e5b1462c9917acbbc20ad56 | 432 | py | Python | algorithm/tf_idf/models.py | ljm516/python-repo | a1071cbf4e4a021cc1ccd902edd4a60246ea4fcc | [
"Apache-2.0"
] | null | null | null | algorithm/tf_idf/models.py | ljm516/python-repo | a1071cbf4e4a021cc1ccd902edd4a60246ea4fcc | [
"Apache-2.0"
] | 6 | 2020-03-24T16:48:36.000Z | 2022-02-11T03:42:50.000Z | algorithm/tf_idf/models.py | ljm516/python-repo | a1071cbf4e4a021cc1ccd902edd4a60246ea4fcc | [
"Apache-2.0"
] | null | null | null | class Article(object):
"""docstring for Article"""
def __init__(self):
self.__title = None
self.__content = None
@property
def title(self):
return self.__title
@title.setter
def title(self, title):
self.__title = title
@property
def content(self):
... | 18.782609 | 32 | 0.601852 |
06490c74bddc6aae2655e04da446a4c8f02c2e77 | 249 | py | Python | packages/pyright-internal/src/tests/samples/protocol12.py | lipovsek/pytea | c536515a5e5947fac8871784323ba7eddc58956d | [
"MIT"
] | null | null | null | packages/pyright-internal/src/tests/samples/protocol12.py | lipovsek/pytea | c536515a5e5947fac8871784323ba7eddc58956d | [
"MIT"
] | null | null | null | packages/pyright-internal/src/tests/samples/protocol12.py | lipovsek/pytea | c536515a5e5947fac8871784323ba7eddc58956d | [
"MIT"
] | null | null | null | # This sample verifies that an error is generated when a non-protocol
# class is used as a base class for a protocol class.
from typing import Protocol
class BaseClass:
x: int
class DerivedClass(BaseClass, Protocol):
x: int
| 19.153846 | 70 | 0.706827 |
0441f26c5d46757b2ce49dec1c67935a484840e7 | 808 | py | Python | laboratorios/laboratorio5/Fiebre.py | carlos1796/uip-iiiq2016-prog3 | 227fc3d9dfbb35f87eb312ef674d3f681e685e21 | [
"MIT"
] | null | null | null | laboratorios/laboratorio5/Fiebre.py | carlos1796/uip-iiiq2016-prog3 | 227fc3d9dfbb35f87eb312ef674d3f681e685e21 | [
"MIT"
] | null | null | null | laboratorios/laboratorio5/Fiebre.py | carlos1796/uip-iiiq2016-prog3 | 227fc3d9dfbb35f87eb312ef674d3f681e685e21 | [
"MIT"
] | null | null | null | def muerto():
f = open("temp.dat", "a")
f.write(str(t) + ", Esta muerto\n")
f.close()
def enf():
f = open("temp.dat", "a")
f.write(str(t) + ", Esta enfermo\n")
f.close()
def normal():
f = open("temp.dat", "a")
f.write(str(t) + ", Normal\n")
f.close()
def tf():
f = op... | 17.565217 | 49 | 0.433168 |
a692e4d92b28a1c04c37ccdc52b413bd7422a490 | 2,631 | py | Python | tests/fullscale/viscoelasticity/nofaults-3d/meshes.py | Grant-Block/pylith | f6338261b17551eba879da998a5aaf2d91f5f658 | [
"MIT"
] | null | null | null | tests/fullscale/viscoelasticity/nofaults-3d/meshes.py | Grant-Block/pylith | f6338261b17551eba879da998a5aaf2d91f5f658 | [
"MIT"
] | null | null | null | tests/fullscale/viscoelasticity/nofaults-3d/meshes.py | Grant-Block/pylith | f6338261b17551eba879da998a5aaf2d91f5f658 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copy... | 21.925 | 72 | 0.391866 |
2d333e27d372b4d0ee3ed96519c0f4f9ccdee206 | 2,072 | py | Python | ocr/ocr.py | adunkman/hows-my-driving-dc | c8d9422290a75eb06d9238399154df5d6f88e4b6 | [
"MIT"
] | 21 | 2018-07-25T03:47:24.000Z | 2021-10-08T19:58:09.000Z | ocr/ocr.py | adunkman/hows-my-driving-dc | c8d9422290a75eb06d9238399154df5d6f88e4b6 | [
"MIT"
] | 18 | 2018-07-25T14:57:27.000Z | 2022-03-11T23:34:01.000Z | ocr/ocr.py | adunkman/hows-my-driving-dc | c8d9422290a75eb06d9238399154df5d6f88e4b6 | [
"MIT"
] | 3 | 2019-02-17T00:07:30.000Z | 2021-10-08T19:58:14.000Z | # import the necessary packages
from PIL import Image
import pytesseract
import argparse
import cv2
import os
import sys
import pandas as pd
def read_image(args):
'''
loads the image to memory
'''
return cv2.imread(args["image"])
def extract_text(image):
'''
Extracts text from the image
... | 27.626667 | 76 | 0.631757 |
b37f5b2b8321e90c97cf9ea7841ce92ab1730a70 | 1,475 | py | Python | src/zenml/pipelines/__init__.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | src/zenml/pipelines/__init__.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | src/zenml/pipelines/__init__.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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... | 44.69697 | 217 | 0.773559 |
bca879268cca087833ad52be799ee3d1ec9f7265 | 2,978 | py | Python | tests/components/songpal/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 6 | 2020-07-18T16:33:25.000Z | 2021-09-26T09:52:04.000Z | tests/components/songpal/__init__.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | tests/components/songpal/__init__.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Test the songpal integration."""
from songpal import SongpalException
from homeassistant.components.songpal.const import CONF_ENDPOINT
from homeassistant.const import CONF_NAME
from tests.async_mock import AsyncMock, MagicMock, patch
FRIENDLY_NAME = "name"
ENTITY_ID = f"media_player.{FRIENDLY_NAME}"
HOST = "0.0.0... | 28.361905 | 81 | 0.722968 |
142d977fd3ca8a92b7bc5d69a995840f7689ebbb | 3,474 | py | Python | graphgallery/datasets/karateclub.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | 1 | 2020-07-29T08:00:32.000Z | 2020-07-29T08:00:32.000Z | graphgallery/datasets/karateclub.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | graphgallery/datasets/karateclub.py | dongzizhu/GraphGallery | c65eab42daeb52de5019609fe7b368e30863b4ae | [
"MIT"
] | null | null | null | import os.path as osp
import pickle as pkl
from graphgallery import functional as gf
from ..data import Reader
from ..data.graph import Graph
from ..data.multi_graph import MultiGraph
from .in_memory_dataset import InMemoryDataset
_DATASET = gf.BunchDict(deezer="deezer dataset (node-level)",
... | 36.568421 | 128 | 0.579159 |
6edca006ea62f35fe49201c85fc0f9552d568f6e | 26,947 | py | Python | prmaya/plugins/prClosestPoint.py | parzival-roethlein/prmaya | 1a081ac859a97f9fbbbc91226441aa75a5449fea | [
"MIT"
] | 20 | 2018-09-03T05:50:09.000Z | 2021-03-27T11:42:38.000Z | prmaya/plugins/prClosestPoint.py | moChen0607/prmaya | 1b48f2b72b458d106752fee768846e1c172dd59a | [
"MIT"
] | null | null | null | prmaya/plugins/prClosestPoint.py | moChen0607/prmaya | 1b48f2b72b458d106752fee768846e1c172dd59a | [
"MIT"
] | 4 | 2018-09-14T02:06:47.000Z | 2020-01-28T15:14:39.000Z | """
SOURCE
https://github.com/parzival-roethlein/prmaya
DESCRIPTION
Deformer that moves points to closest: matrix (position) / mesh shape (or vertex) / nurbs-curve shape / nurbs-surface shape
USE CASES
- Modeling: Interactively snap vertices between meshes (closestVertex attribute)
- Modeling/Rigging: Interactively m... | 49.35348 | 148 | 0.633911 |
d23357772abbad4e6e869c279fc399931f1d14ff | 3,837 | py | Python | utils/utils.py | cclauss/CCNet | 3c8c5a53a9a36fa2b2a17944ad5078a010aec6c9 | [
"MIT"
] | 1,280 | 2018-11-27T01:02:19.000Z | 2022-03-30T11:39:22.000Z | utils/utils.py | zhaoSemantic/CCNet | 8496a87eaa596eda91e9281bd318fdde33d2f366 | [
"MIT"
] | 107 | 2018-11-30T13:40:57.000Z | 2022-02-25T14:20:16.000Z | utils/utils.py | zhaoSemantic/CCNet | 8496a87eaa596eda91e9281bd318fdde33d2f366 | [
"MIT"
] | 270 | 2018-11-29T02:31:55.000Z | 2022-03-29T06:09:40.000Z | from PIL import Image
import numpy as np
import torch
# colour map
label_colours = [(0,0,0)
# 0=background
,(128,0,0),(0,128,0),(128,128,0),(0,0,128),(128,0,128)
# 1=aeroplane, 2=bicycle, 3=bird, 4=boat, 5=bottle
,(0,128,128),(128,128,128),(64,0,... | 40.819149 | 124 | 0.586135 |
46602779854a199f66d81f60100cc047a2b00bd5 | 2,047 | py | Python | inferlo/pairwise/optimization/tree_dp.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2022-01-27T18:44:07.000Z | 2022-01-27T18:44:07.000Z | inferlo/pairwise/optimization/tree_dp.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 3 | 2022-01-23T18:02:30.000Z | 2022-01-27T23:10:51.000Z | inferlo/pairwise/optimization/tree_dp.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2021-09-03T06:12:57.000Z | 2021-09-03T06:12:57.000Z | # Copyright (c) 2020, The InferLO authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 - see LICENSE file.
from __future__ import annotations
from typing import TYPE_CHECKING
import numba
import numpy as np
if TYPE_CHECKING:
from inferlo.pairwise import PairWiseFiniteModel
@numba.njit... | 31.984375 | 77 | 0.683439 |
6e0165ba21ef9593e141a407d1228f58d53b3815 | 158 | py | Python | app/schemas/metric.py | germainlefebvre4/cryptobot-api | 6b8f10554bbb50ac669c8f8a87414c9292fc9d7b | [
"MIT"
] | null | null | null | app/schemas/metric.py | germainlefebvre4/cryptobot-api | 6b8f10554bbb50ac669c8f8a87414c9292fc9d7b | [
"MIT"
] | 8 | 2021-09-28T12:55:38.000Z | 2022-01-05T22:45:20.000Z | app/schemas/metric.py | germainlefebvre4/cryptobot-api | 6b8f10554bbb50ac669c8f8a87414c9292fc9d7b | [
"MIT"
] | null | null | null | from typing import Optional
from pydantic import BaseModel
class MetricBase(BaseModel):
count: int
class MetricUserCount(MetricBase):
status: str
| 14.363636 | 34 | 0.772152 |
7cd363571e54f2a623c3d9172f829b791075cbd6 | 5,204 | py | Python | bin/global_place/FZUplace/rdf_FZUplace.py | DanielTRYTRYLOOK/RDF-2020 | a6a6c0835a02c8a98ae8e899dec02ed960afb69c | [
"MIT"
] | 3 | 2020-11-08T17:04:04.000Z | 2021-03-28T17:44:12.000Z | bin/global_place/FZUplace/rdf_FZUplace.py | DanielTRYTRYLOOK/RDF-2020 | a6a6c0835a02c8a98ae8e899dec02ed960afb69c | [
"MIT"
] | 1 | 2021-11-30T09:12:06.000Z | 2021-11-30T09:12:06.000Z | bin/global_place/FZUplace/rdf_FZUplace.py | DanielTRYTRYLOOK/RDF-2020 | a6a6c0835a02c8a98ae8e899dec02ed960afb69c | [
"MIT"
] | 4 | 2021-09-01T17:04:22.000Z | 2022-02-11T15:20:45.000Z | '''
File name : rdf_FZUplace.py
Author : Jinwook Jung
Created on : Wed 14 Aug 2019 12:08:23 AM EDT
Last modified : 2020-03-30 22:54:26
Description :
'''
import subprocess, os, sys, random, yaml, time
from subprocess import Popen, PIPE, CalledProcessError
# FIXME
sys.path.inse... | 32.72956 | 130 | 0.581091 |
1015ee97db36f76e94ab1faefb0651512892a92b | 2,341 | py | Python | src/vendors/OsmToRoadGraph/tests/convert_graph_test.py | MikeNezumi/osm2tracks | 4e95218efae4cf35b34187d7d047d88edce6c2d0 | [
"MIT"
] | 1 | 2021-05-08T19:03:00.000Z | 2021-05-08T19:03:00.000Z | src/vendors/OsmToRoadGraph/tests/convert_graph_test.py | MikeNezumi/osm2tracks | 4e95218efae4cf35b34187d7d047d88edce6c2d0 | [
"MIT"
] | null | null | null | src/vendors/OsmToRoadGraph/tests/convert_graph_test.py | MikeNezumi/osm2tracks | 4e95218efae4cf35b34187d7d047d88edce6c2d0 | [
"MIT"
] | null | null | null | import random
import string
import unittest
from graph.graph import Graph
from graph.graph_types import Edge, Vertex, EdgeData, VertexData
from graph.convert_graph import convert_to_networkx
def random_string(length=8):
return ''.join(random.choice(string.ascii_lowercase) for i in range(length))
def random_uin... | 33.442857 | 145 | 0.651431 |
af2ff88c80f0e276c5b0c3dcc6d2242f6812e81f | 6,701 | py | Python | cartoongan/network/Transformer.py | pythonCloudbase/cartoonify | 321d896979c693eaed24afb381009ca16d74c909 | [
"MIT"
] | 244 | 2020-11-19T12:14:48.000Z | 2022-03-23T01:30:10.000Z | cartoongan/network/Transformer.py | pythonCloudbase/cartoonify | 321d896979c693eaed24afb381009ca16d74c909 | [
"MIT"
] | 5 | 2021-09-08T03:31:30.000Z | 2022-03-12T01:03:38.000Z | cartoongan/network/Transformer.py | pythonCloudbase/cartoonify | 321d896979c693eaed24afb381009ca16d74c909 | [
"MIT"
] | 51 | 2020-11-20T16:50:41.000Z | 2022-03-18T04:34:52.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class Transformer(nn.Module):
def __init__(self):
super(Transformer, self).__init__()
#
self.refpad01_1 = nn.ReflectionPad2d(3)
self.conv01_1 = nn.Conv2d(3, 64, 7)
self.in01_1 = InstanceNormalization(64)
... | 36.818681 | 75 | 0.601701 |
fbb41018d72a1b248c57dd6bf048f60f0995c129 | 3,263 | py | Python | disba/_cps/_srfker96.py | SeisPider/disba | 5e96c4a64dc473901c20e32c12cd4a5851e9ac79 | [
"BSD-3-Clause"
] | 54 | 2020-06-21T06:27:58.000Z | 2022-03-20T10:31:35.000Z | disba/_cps/_srfker96.py | SeisPider/disba | 5e96c4a64dc473901c20e32c12cd4a5851e9ac79 | [
"BSD-3-Clause"
] | 28 | 2020-06-23T00:35:36.000Z | 2022-03-08T07:29:06.000Z | disba/_cps/_srfker96.py | keurfonluu/disba | 194b2ec29a1afa9da8b72a49ce8d3869ddc8ec73 | [
"BSD-3-Clause"
] | 14 | 2020-06-23T16:03:20.000Z | 2022-03-11T02:45:43.000Z | import numpy
from .._common import jitted
from ._surf96 import surf96
__all__ = [
"srfker96",
]
@jitted
def srfker96(
t, d, a, b, rho, mode=0, itype=0, ifunc=2, ipar=2, dc=0.005, dt=0.025, dp=0.025
):
"""
Get phase or group velocity sensitivity kernel.
Parameters
----------
t : scalar
... | 29.93578 | 83 | 0.537542 |
bd76fef6981d7bae3ecbe071c2446590d7256d4c | 36,950 | py | Python | kornia/enhance/adjust.py | dhernandez0/kornia | 4014903163b4b840d32a28928353567339bd75fa | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/enhance/adjust.py | dhernandez0/kornia | 4014903163b4b840d32a28928353567339bd75fa | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/enhance/adjust.py | dhernandez0/kornia | 4014903163b4b840d32a28928353567339bd75fa | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from math import pi
from typing import Optional, Union
import torch
import torch.nn as nn
import torch.nn.functional as F
from kornia.color.hsv import hsv_to_rgb, rgb_to_hsv
from kornia.utils.helpers import _torch_histc_cast
from kornia.utils.image import _to_bcdhw, _to_bchw
__all__ = [
"adjust_brightness",
... | 36.475814 | 132 | 0.616752 |
8bb3b80eb402ad334bbd30e078451f68d7e26e28 | 671 | py | Python | manage.py | AminHCE/__aminhce__ | ffe53a7f08da207d2df9fdc9216d94e5c956f379 | [
"BSD-3-Clause"
] | 3 | 2021-02-17T05:43:08.000Z | 2021-02-19T13:25:41.000Z | manage.py | AminHCE/__aminhce__ | ffe53a7f08da207d2df9fdc9216d94e5c956f379 | [
"BSD-3-Clause"
] | null | null | null | manage.py | AminHCE/__aminhce__ | ffe53a7f08da207d2df9fdc9216d94e5c956f379 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.settings')
try:
from django.core.management import execute_from_command_line
exc... | 29.173913 | 79 | 0.681073 |
411f53d00113cf61b4cc1c70aef714b5b63b2590 | 23,003 | py | Python | airflow/configuration.py | iv2500/airflow | a74a9c7db87f0f2faac53baf0bf11fc4828ff674 | [
"Apache-2.0"
] | null | null | null | airflow/configuration.py | iv2500/airflow | a74a9c7db87f0f2faac53baf0bf11fc4828ff674 | [
"Apache-2.0"
] | null | null | null | airflow/configuration.py | iv2500/airflow | a74a9c7db87f0f2faac53baf0bf11fc4828ff674 | [
"Apache-2.0"
] | null | null | null |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not ... | 38.402337 | 96 | 0.625266 |
2491b37af43adb0472f9672a96d6a2bb9b027d4d | 106,301 | py | Python | atlassian/jira.py | dosoulwork/atlassian-python-api | ebb89d90ec8d36d06c5371caecd1df56f8f7403a | [
"Apache-2.0"
] | null | null | null | atlassian/jira.py | dosoulwork/atlassian-python-api | ebb89d90ec8d36d06c5371caecd1df56f8f7403a | [
"Apache-2.0"
] | null | null | null | atlassian/jira.py | dosoulwork/atlassian-python-api | ebb89d90ec8d36d06c5371caecd1df56f8f7403a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import logging
import re
from .rest_client import AtlassianRestAPI
import json
log = logging.getLogger(__name__)
class Jira(AtlassianRestAPI):
def reindex_status(self):
return self.get('rest/api/3/reindex')
def reindex(self, comments=True, change_history=True, worklogs=True):
... | 37.259376 | 136 | 0.595197 |
18cd20bbe1b5f16a428064242cda2956635e9940 | 7,558 | py | Python | earth/weather/alerts.py | justquick/python-earth | ced0d1fff7c2de77df5b51ea490137b0d84d1d96 | [
"MIT"
] | 2 | 2017-12-18T13:12:48.000Z | 2020-01-21T04:18:03.000Z | earth/weather/alerts.py | justquick/python-earth | ced0d1fff7c2de77df5b51ea490137b0d84d1d96 | [
"MIT"
] | null | null | null | earth/weather/alerts.py | justquick/python-earth | ced0d1fff7c2de77df5b51ea490137b0d84d1d96 | [
"MIT"
] | null | null | null | import re
import os
import time
from urllib import urlencode
from earth.core.config import conf
from datetime import datetime, timedelta
try:
from lxml import objectify
except ImportError:
raise ImportError, "Missing dependency: lxml"
from earth.core.iso8601 import parse_date as xml_time_parse
from earth.core ... | 40.854054 | 76 | 0.558216 |
8259e458691226c1e3e4cb477af7a7db47fb6e9b | 1,562 | py | Python | examples/profiling_example.py | morandiaye/openeo-python-client | cd04715fc4ab1eec2c9b8b187a0f88ff2c710eb8 | [
"Apache-2.0"
] | 1 | 2021-04-01T13:15:35.000Z | 2021-04-01T13:15:35.000Z | examples/profiling_example.py | morandiaye/openeo-python-client | cd04715fc4ab1eec2c9b8b187a0f88ff2c710eb8 | [
"Apache-2.0"
] | null | null | null | examples/profiling_example.py | morandiaye/openeo-python-client | cd04715fc4ab1eec2c9b8b187a0f88ff2c710eb8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pathlib import Path
import openeo
import tarfile
import tempfile
import pstats
# reading NDVI compute UDF from file
class UDFString():
def __init__(self, filename):
with open(str(Path(filename)), 'r+') as f:
self.value=f.read()
if __name__ == '__main__':
eocon... | 35.5 | 107 | 0.65749 |
4b084a73f938c3f193b263147b3cbaa03cb2c3ef | 2,280 | py | Python | plugin_tests/color_deconvolution_test.py | sskram/HistomicsTK | 6d274ba3a22e24bdaff205a39df04f515b862a31 | [
"Apache-2.0"
] | null | null | null | plugin_tests/color_deconvolution_test.py | sskram/HistomicsTK | 6d274ba3a22e24bdaff205a39df04f515b862a31 | [
"Apache-2.0"
] | 1 | 2021-03-26T00:40:17.000Z | 2021-03-26T00:40:17.000Z | plugin_tests/color_deconvolution_test.py | sskram/HistomicsTK | 6d274ba3a22e24bdaff205a39df04f515b862a31 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | 30.810811 | 79 | 0.600877 |
ee107fd1d8b66f82dd14368870db0dadc9557b9b | 1,211 | py | Python | Python/sort/Shell_Sort.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 897 | 2020-06-25T00:12:52.000Z | 2022-03-24T00:49:31.000Z | Python/sort/Shell_Sort.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 5,707 | 2020-06-24T17:53:28.000Z | 2022-01-22T05:03:15.000Z | Python/sort/Shell_Sort.py | zhcet19/NeoAlgo-1 | c534a23307109280bda0e4867d6e8e490002a4ee | [
"MIT"
] | 1,817 | 2020-06-25T03:51:05.000Z | 2022-03-29T05:14:07.000Z | # Python program for implementation of Shell Sort
def shellSort(arr):
# Start with a big gap, then reduce the gap
size = len(arr)
gap = size // 2
# Do a gapped insertion sort for this gap size.
while gap > 0:
for i in range(gap, size):
# add a[i] to the elements that have bee... | 18.921875 | 68 | 0.53014 |
8a49240d85ccbe9aac9948ac2120e04f20fb49a4 | 2,252 | py | Python | 6TH SEM/Three Men's Morris/tttme.py | LaxmiNyamagoud/Course_Projects | 9b4397553715a1bae54f9cd740081a6d6007c4ac | [
"MIT"
] | 1 | 2021-06-19T17:15:46.000Z | 2021-06-19T17:15:46.000Z | 6TH SEM/Three Men's Morris/tttme.py | LaxmiNyamagoud/Course_Projects | 9b4397553715a1bae54f9cd740081a6d6007c4ac | [
"MIT"
] | null | null | null | 6TH SEM/Three Men's Morris/tttme.py | LaxmiNyamagoud/Course_Projects | 9b4397553715a1bae54f9cd740081a6d6007c4ac | [
"MIT"
] | null | null | null | from easyAI import TwoPlayersGame
from easyAI.Player import Human_Player
class TTT( TwoPlayersGame ):
""" The board positions are numbered as follows:
7 8 9 0 0 0
4 5 6 0 0 0
1 2 3 0 0 0
"""
#moves 123456
#index of board 0123456
def __init__(self, player... | 29.631579 | 84 | 0.466696 |
db9e87d2979b293383016485af93dc4f8104222c | 7,693 | py | Python | chrome/common/extensions/docs/server2/branch_utility_test.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | chrome/common/extensions/docs/server2/branch_utility_test.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | chrome/common/extensions/docs/server2/branch_utility_test.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# 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.
import os
import sys
import unittest
from branch_utility import BranchUtility, ChannelInfo
from fake_url_fetcher import FakeUrlFet... | 42.977654 | 78 | 0.687378 |
7bb386db14f2cfb856a22d1bdb40634bc3b0b879 | 470 | py | Python | ecoindex_cli/logger.py | cnumr/ecoindex_cli | 42f48ee5643f92f123f4acc55c3d0c67700302d1 | [
"MIT"
] | 6 | 2021-06-03T09:57:37.000Z | 2022-03-03T16:50:57.000Z | ecoindex_cli/logger.py | cnumr/ecoindex_cli | 42f48ee5643f92f123f4acc55c3d0c67700302d1 | [
"MIT"
] | 28 | 2021-03-26T09:06:11.000Z | 2022-02-21T15:25:09.000Z | ecoindex_cli/logger.py | cnumr/ecoindex_cli | 42f48ee5643f92f123f4acc55c3d0c67700302d1 | [
"MIT"
] | 3 | 2021-05-17T23:37:20.000Z | 2021-11-03T09:46:34.000Z | import logging
from ecoindex_cli.files import create_folder
class Logger:
def __init__(self, filename: str) -> None:
self.path = "/tmp/ecoindex-cli/logs"
self.file_name = filename
create_folder(path=self.path)
logging.basicConfig(
filemode="w+",
filename=s... | 23.5 | 48 | 0.587234 |
7adf7f3a1acaad18994f33126049324ff3f18bd8 | 356 | py | Python | cursopython/pythonteste/aula12a.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | cursopython/pythonteste/aula12a.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | cursopython/pythonteste/aula12a.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | nome = str(input('Qual é o seu nome? '))
if nome == 'Átila':
print('Nome bonito!')
elif nome == 'Pedro' or nome == 'Maria' or nome == 'Paulo':
print('Seu nome é bem popular no Brasil!')
elif nome in 'Ana Claudia Jéssica Juliana':
print('Belo nome feminino!')
else:
print('Seu nome é bem normal!')
print('... | 35.6 | 59 | 0.634831 |
8e34ddb14773bab94150545547ca2557e597be79 | 5,210 | py | Python | coffeestats/caffeine/forms.py | coffeestats/coffeestats-django | 8982dc736261ab3cbe0f3e1d94da40bb03cd8ff3 | [
"MIT"
] | 6 | 2015-01-07T11:00:56.000Z | 2018-10-09T09:13:39.000Z | coffeestats/caffeine/forms.py | coffeestats/coffeestats-django | 8982dc736261ab3cbe0f3e1d94da40bb03cd8ff3 | [
"MIT"
] | 7 | 2015-09-05T18:17:59.000Z | 2020-11-13T00:04:28.000Z | coffeestats/caffeine/forms.py | coffeestats/coffeestats-django | 8982dc736261ab3cbe0f3e1d94da40bb03cd8ff3 | [
"MIT"
] | 1 | 2020-04-23T19:44:33.000Z | 2020-04-23T19:44:33.000Z | """
Forms for coffeestats.
"""
from datetime import datetime
from django import forms
from django.conf import settings
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django_registration.forms import RegistrationFormUniqueEmail
from .models import (
ACTION_TYPES,
... | 30.647059 | 70 | 0.632438 |
0294d49a94286fdc8c7c4bf50396d068cb902765 | 31,156 | py | Python | enaml/qt/q_popup_view.py | AndiEcker/enaml | 97dd9250f51eb077c9d26e6345ec65ff49444c71 | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/qt/q_popup_view.py | AndiEcker/enaml | 97dd9250f51eb077c9d26e6345ec65ff49444c71 | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/qt/q_popup_view.py | AndiEcker/enaml | 97dd9250f51eb077c9d26e6345ec65ff49444c71 | [
"BSD-3-Clause-Clear"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2013-2017, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
#------------------------------------------------... | 29.700667 | 79 | 0.577642 |
6c6d56512610375b62b5511b4ecdc40c6bb4c7f0 | 358 | py | Python | adm/templates/plugins/python3_flask/{{cookiecutter.name}}/main/wsgi.py | frdcms/mfserv | 82b20779ca8f8b5af39353383ff79f2018bc4f2f | [
"BSD-3-Clause"
] | 11 | 2018-11-23T16:39:31.000Z | 2021-06-01T12:44:31.000Z | adm/templates/plugins/python3_flask/{{cookiecutter.name}}/main/wsgi.py | frdcms/mfserv | 82b20779ca8f8b5af39353383ff79f2018bc4f2f | [
"BSD-3-Clause"
] | 315 | 2018-09-18T09:15:18.000Z | 2022-02-25T02:02:15.000Z | adm/templates/plugins/python3_flask/{{cookiecutter.name}}/main/wsgi.py | frdcms/mfserv | 82b20779ca8f8b5af39353383ff79f2018bc4f2f | [
"BSD-3-Clause"
] | 7 | 2018-09-20T10:22:36.000Z | 2019-07-31T12:09:06.000Z | import os
import mflog
from flask import Flask, render_template
app = Flask(__name__)
if os.environ.get('MFSERV_CURRENT_APP_DEBUG', '0') == '1':
app.config['PROPAGATE_EXCEPTIONS'] = True
logger = mflog.get_logger(__name__)
@app.route("/{{cookiecutter.name}}/")
def hello_world():
logger.info("This is an info... | 22.375 | 58 | 0.712291 |
44b5da2a769331854e10b49557a0fe5ebeacdc63 | 49 | py | Python | runserver.py | richard-ma/host-monitor | 7c36b583b774831e79ebbe7237b4ca4afc51079a | [
"MIT"
] | null | null | null | runserver.py | richard-ma/host-monitor | 7c36b583b774831e79ebbe7237b4ca4afc51079a | [
"MIT"
] | null | null | null | runserver.py | richard-ma/host-monitor | 7c36b583b774831e79ebbe7237b4ca4afc51079a | [
"MIT"
] | null | null | null | from host_monitor import app
app.run(debug=True)
| 16.333333 | 28 | 0.816327 |
caea929d0f7c12660753ec54c7e3ab34c1a95ba0 | 2,736 | py | Python | app/blueprints/auth/forms.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | app/blueprints/auth/forms.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | app/blueprints/auth/forms.py | hbradleyiii/spa-base | ac79535d63778dc0793b1e2d7ecac5547927798d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
app.blueprints.auth.forms
~~~~~~~~~~~~~~~~~~~~~~~~~
The auth forms for spa-base.
"""
from flask_wtf.recaptcha import RecaptchaField
from flask_wtf.recaptcha.validators import Recaptcha
from wtforms.validators import (
DataRequired,
Email as EmailValidator,
EqualTo,
Validat... | 36.48 | 94 | 0.648757 |
0a74b76ffc9438c52a3e89fb1396d25caea73353 | 943 | py | Python | packages/pyre/traits/Slotted.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/traits/Slotted.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:42:13.000Z | 2021-06-10T23:42:13.000Z | packages/pyre/traits/Slotted.py | jlmaurer/pyre | 6af38a83621d7d6228d147b4bb94f97fbb10f6e2 | [
"BSD-3-Clause"
] | 2 | 2020-08-31T18:07:52.000Z | 2021-12-10T08:54:39.000Z | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2020 all rights reserved
#
# superclass
from .Trait import Trait
# declaration
class Slotted(Trait):
"""
Intermediate class that knows that trait values are held by framework slots
"""
# types
from .SlotFactory import Slo... | 21.431818 | 79 | 0.655355 |
b5cdb36269c7c0a645d1527a996997b9df15e2b5 | 3,974 | py | Python | week13/back/api/views2/fbvView.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | null | null | null | week13/back/api/views2/fbvView.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | 13 | 2021-03-10T08:46:52.000Z | 2022-03-02T08:13:58.000Z | week13/back/api/views2/fbvView.py | yestemir/web | 5bdead66c26a3c466701e25ecae9720f04ad4118 | [
"Unlicense"
] | null | null | null | from rest_framework import status
from rest_framework.authentication import TokenAuthentication
from rest_framework.decorators import api_view, permission_classes, authentication_classes
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from api.models import Company, V... | 34.859649 | 90 | 0.676397 |
8148d20de07eba2b9fc5024273cf4d63f92247fd | 11,503 | py | Python | pywick/models/segmentation/mnas_linknets/inception_resnet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | pywick/models/segmentation/mnas_linknets/inception_resnet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | pywick/models/segmentation/mnas_linknets/inception_resnet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.utils.model_zoo as model_zoo
__all__ = ['InceptionResNetV2', 'inceptionresnetv2']
pretrained_settings = {
'inceptionresnetv2': {
'imagenet': {
'url': 'http://data.lip6.fr/cadene/pretrainedmodels/inceptionresnetv2-520b38e4.pth',
'input... | 32.221289 | 96 | 0.558115 |
4ee0ab5037c336fcab81af4330ff39a8233d4dbb | 1,330 | py | Python | tests/ci/cdk/setup.py | dougch/aws-lc | 53ffd54d00d5e9cfd131245724fb7cd2587a74d3 | [
"MIT"
] | null | null | null | tests/ci/cdk/setup.py | dougch/aws-lc | 53ffd54d00d5e9cfd131245724fb7cd2587a74d3 | [
"MIT"
] | 5 | 2021-08-02T21:40:39.000Z | 2021-08-17T20:18:00.000Z | tests/ci/cdk/setup.py | dougch/aws-lc | 53ffd54d00d5e9cfd131245724fb7cd2587a74d3 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md") as fp:
long_description = fp.read()
setuptools.setup(
name="cdk",
version="0.0.1",
description="An empty CDK Python app",
long_description=long_description,
long_description_content_type="text/markdown",
author="author",
package_dir={"": "c... | 24.62963 | 87 | 0.584211 |
13b12b2e407dbccf167cb3a1a9bbb77ff9b9ce7f | 2,795 | py | Python | muranopkgcheck/tests/test_ui_validator.py | openstack/murano-pkg-check | 4c36f3e49f0c066e65cc61cb4f9c22b5bc36ecd7 | [
"Apache-2.0"
] | 10 | 2016-09-14T22:02:43.000Z | 2019-01-28T22:05:02.000Z | muranopkgcheck/tests/test_ui_validator.py | openstack/murano-pkg-check | 4c36f3e49f0c066e65cc61cb4f9c22b5bc36ecd7 | [
"Apache-2.0"
] | null | null | null | muranopkgcheck/tests/test_ui_validator.py | openstack/murano-pkg-check | 4c36f3e49f0c066e65cc61cb4f9c22b5bc36ecd7 | [
"Apache-2.0"
] | 1 | 2017-01-30T22:32:09.000Z | 2017-01-30T22:32:09.000Z | # Copyright (c) 2016 Mirantis, 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... | 35.379747 | 78 | 0.550984 |
b2db9105153636d217dfc822fec62bb500c400bb | 13,113 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_system.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_system.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_system.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 32.538462 | 88 | 0.602227 |
1de61607097e9c3811a96c9ba866b6430d8a6e53 | 24,203 | py | Python | pw_tokenizer/py/detokenize_test.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | null | null | null | pw_tokenizer/py/detokenize_test.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | null | null | null | pw_tokenizer/py/detokenize_test.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 41.161565 | 80 | 0.612321 |
98c632bc549e8132fc0d53477ce7278c16ebc051 | 2,134 | py | Python | molecule/command/drivers.py | sio/molecule | 1a891f28ec655788be8d016fff8adab9cd233fa2 | [
"MIT"
] | null | null | null | molecule/command/drivers.py | sio/molecule | 1a891f28ec655788be8d016fff8adab9cd233fa2 | [
"MIT"
] | null | null | null | molecule/command/drivers.py | sio/molecule | 1a891f28ec655788be8d016fff8adab9cd233fa2 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# 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, modify, merge... | 33.873016 | 79 | 0.720244 |
4673666ada5507d39fda239a77687c9cb9fa12c7 | 1,227 | py | Python | leapdna/blocks/allele.py | knifecake/leapdna-python | 261a72a12eee82ddf489ed14a728723e2c627035 | [
"MIT"
] | null | null | null | leapdna/blocks/allele.py | knifecake/leapdna-python | 261a72a12eee82ddf489ed14a728723e2c627035 | [
"MIT"
] | null | null | null | leapdna/blocks/allele.py | knifecake/leapdna-python | 261a72a12eee82ddf489ed14a728723e2c627035 | [
"MIT"
] | null | null | null | from typing import Optional, Union
from leapdna.blocks.base import Base
from leapdna.blocks.locus import Locus
class Allele(Base):
block_type: str = 'allele'
name: str
locus: Locus
def __init__(self,
name: str,
locus: Union[Locus, str],
id: Optional... | 27.266667 | 76 | 0.577017 |
ea0f6ce2d4264cb563f4792dd38221e3f369a0c0 | 2,233 | py | Python | tornado/components/all_.py | binp-dev/tornado | 79463c6ee80ec2e2b46b7dd7425760093b7c7e76 | [
"MIT"
] | null | null | null | tornado/components/all_.py | binp-dev/tornado | 79463c6ee80ec2e2b46b7dd7425760093b7c7e76 | [
"MIT"
] | null | null | null | tornado/components/all_.py | binp-dev/tornado | 79463c6ee80ec2e2b46b7dd7425760093b7c7e76 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Dict
from dataclasses import dataclass
from ferrite.components.base import Component, Task, TaskWrapper
from ferrite.components.epics.epics_base import EpicsBaseCross, EpicsBaseHost
from ferrite.remote.tasks import RebootTask
from tornado.components.ipp import Ip... | 25.965116 | 77 | 0.580385 |
b0ab645d7bc84ff64f826a4173e802b3a07b6545 | 2,655 | py | Python | Test03_CNN/test03_cnntf.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 3 | 2018-07-29T17:31:58.000Z | 2019-06-27T10:36:34.000Z | Test03_CNN/test03_cnntf.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | null | null | null | Test03_CNN/test03_cnntf.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 1 | 2019-02-18T02:27:39.000Z | 2019-02-18T02:27:39.000Z | import tensorflow as tf
import numpy as np
# 下载mnist数据集
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('/tmp/', one_hot=True)
n_output_layer = 10
# 定义待训练的神经网络
def convolutional_neural_network(data):
weights = {'w_conv1': tf.Variable(tf.random_normal([5, 5, 1, 32]))... | 36.369863 | 113 | 0.619962 |
470e6ad379eaa74ca9e781f80d71b438c9f0f88a | 4,570 | py | Python | test/rpc-tests/cfund-paymentrequestvotelist.py | chasingkirkjufell/navcoin-core | e17614280db6e0b393894da126e1b530655202d4 | [
"MIT"
] | 103 | 2017-05-15T07:54:54.000Z | 2019-05-07T10:30:18.000Z | test/rpc-tests/cfund-paymentrequestvotelist.py | chasingkirkjufell/navcoin-core | e17614280db6e0b393894da126e1b530655202d4 | [
"MIT"
] | 446 | 2019-05-08T21:46:24.000Z | 2022-03-31T11:55:37.000Z | test/rpc-tests/cfund-paymentrequestvotelist.py | chasingkirkjufell/navcoin-core | e17614280db6e0b393894da126e1b530655202d4 | [
"MIT"
] | 78 | 2017-06-13T21:21:15.000Z | 2019-05-08T07:05:46.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The Navcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import NavcoinTestFramework
from test_framework.cfund_util import *
import... | 45.7 | 93 | 0.666521 |
c54f4dfeaa0b972693ec793ec0765ac6fcf1520e | 2,204 | py | Python | dev/Tickets/77.py | jfeng08/CoolProp | ac96aa48c8ced6fa3c7330b54b9409e0e021d618 | [
"MIT"
] | 12 | 2015-04-21T07:43:09.000Z | 2021-11-09T08:35:58.000Z | dev/Tickets/77.py | jfeng08/CoolProp | ac96aa48c8ced6fa3c7330b54b9409e0e021d618 | [
"MIT"
] | 32 | 2015-01-04T05:05:05.000Z | 2017-12-13T18:03:29.000Z | dev/Tickets/77.py | jfeng08/CoolProp | ac96aa48c8ced6fa3c7330b54b9409e0e021d618 | [
"MIT"
] | 8 | 2015-01-01T21:15:37.000Z | 2020-08-05T13:31:50.000Z | import matplotlib
matplotlib.use('Qt4Agg')
import numpy
import CoolProp
import CoolProp.CoolProp as CP
print "Testing the derivatives and store results for "+CoolProp.__gitrevision__
keys = ["dpdT","dpdrho","Z","dZ_dDelta","dZ_dTau","B","dBdT","C","dCdT","phir","dphir_dTau","d2phir_dTau2","dphir_dDelta",
"d2phir... | 41.584906 | 129 | 0.622051 |
1c8c93d17772283bfb8679ae4e406d8d7e85f6ef | 2,659 | py | Python | backend/chat_user_profile/migrations/0001_initial.py | crowdbotics-apps/otto-messages-30303 | 089b393a11fd8352c1c3aca71485e5d5b700fbca | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/chat_user_profile/migrations/0001_initial.py | crowdbotics-apps/otto-messages-30303 | 089b393a11fd8352c1c3aca71485e5d5b700fbca | [
"FTL",
"AML",
"RSA-MD"
] | 9 | 2021-09-06T17:23:20.000Z | 2021-10-17T17:34:17.000Z | backend/chat_user_profile/migrations/0001_initial.py | crowdbotics-apps/otto-messages-30303 | 089b393a11fd8352c1c3aca71485e5d5b700fbca | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | # Generated by Django 2.2.24 on 2021-09-03 23:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | 47.482143 | 168 | 0.613388 |
2556c62164a973d42b2bfd0991fc98c11cecff49 | 482 | py | Python | spiders/baike/html_downloader.py | aollio/toys | 1f796f80dae022eee2db03f92b55fb3158c762fd | [
"MIT"
] | null | null | null | spiders/baike/html_downloader.py | aollio/toys | 1f796f80dae022eee2db03f92b55fb3158c762fd | [
"MIT"
] | null | null | null | spiders/baike/html_downloader.py | aollio/toys | 1f796f80dae022eee2db03f92b55fb3158c762fd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import requests
__author__ = 'Aollio Hou'
__email__ = 'aollio@outlook.com'
class HtmlDownloader:
def download(self, url):
if url is None:
return None
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5 Windows NT)'
headers = {'User_Agent': user_agent}
... | 24.1 | 68 | 0.603734 |
ecf810faf4ac6855bcc3726562d1c4e81e44f51e | 942 | py | Python | setup.py | qiaodan97/neo_force_scheme | 6576bff00717202c950eb27e095baa8dc383c76b | [
"MIT"
] | 1 | 2021-06-01T23:24:38.000Z | 2021-06-01T23:24:38.000Z | setup.py | qiaodan97/neo_force_scheme | 6576bff00717202c950eb27e095baa8dc383c76b | [
"MIT"
] | 30 | 2021-06-01T16:15:29.000Z | 2022-03-08T05:13:36.000Z | setup.py | christinoleo/neo_force_scheme | c0bf94a8aeddb7e01422f06b1d1f9205301cbf4f | [
"MIT"
] | 2 | 2021-06-01T17:17:05.000Z | 2021-06-01T17:17:15.000Z | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="neo_force_scheme",
version="0.0.1",
author="Leonardo Christino",
author_email="christinoleo@dal.ca",
description="NeoForceSceme, an extention of the origin... | 31.4 | 104 | 0.676221 |
3d59ba51581b70a19bb8fb1f0927a6729b420ea2 | 385 | py | Python | python/patterns/fullStar.py | Ayushd70/RetartedCodes | 301ced178a0ec352b2d127e19028845de950551d | [
"MIT"
] | null | null | null | python/patterns/fullStar.py | Ayushd70/RetartedCodes | 301ced178a0ec352b2d127e19028845de950551d | [
"MIT"
] | null | null | null | python/patterns/fullStar.py | Ayushd70/RetartedCodes | 301ced178a0ec352b2d127e19028845de950551d | [
"MIT"
] | null | null | null | # Program to print full pyramid using *
# *
# * * *
# * * * * *
# * * * * * * *
# * * * * * * * * *
rows = int(input("Enter number of rows: "))
k = 0
for i in range(1, rows + 1):
for space in range(1, (rows - i) + 1):
print(end=" ")
while k != (2 * i - 1):
... | 17.5 | 44 | 0.348052 |
15eff29922e2e96c695043d945b4dae2bf723d85 | 3,453 | py | Python | serial_scripts/securitygroup/test_sg_serial.py | lmadhusudhanan/contrail-test | bd39ff19da06a20bd79af8c25e3cde07375577cf | [
"Apache-2.0"
] | null | null | null | serial_scripts/securitygroup/test_sg_serial.py | lmadhusudhanan/contrail-test | bd39ff19da06a20bd79af8c25e3cde07375577cf | [
"Apache-2.0"
] | 1 | 2021-06-01T22:19:48.000Z | 2021-06-01T22:19:48.000Z | serial_scripts/securitygroup/test_sg_serial.py | lmadhusudhanan/contrail-test | bd39ff19da06a20bd79af8c25e3cde07375577cf | [
"Apache-2.0"
] | null | null | null | import unittest
from tcutils.wrappers import preposttest_wrapper
from vnc_api.vnc_api import NoIdError
import os
import sys
from common.securitygroup.verify import VerifySecGroup
from common.securitygroup.base import BaseSGTest
from common.policy.config import ConfigPolicy
from tcutils.topo.topo_helper import *
from tc... | 33.852941 | 88 | 0.653924 |
1fbee9c0557c458399807b862c33dcf62105f05d | 5,747 | py | Python | python_modules/dagster/dagster_tests/core_tests/test_multiple_outputs.py | naralogics/dagster | 16d599daa380b800149474fcaff2311b3f8f269a | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/test_multiple_outputs.py | naralogics/dagster | 16d599daa380b800149474fcaff2311b3f8f269a | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/test_multiple_outputs.py | naralogics/dagster | 16d599daa380b800149474fcaff2311b3f8f269a | [
"Apache-2.0"
] | null | null | null | import re
import pytest
from dagster import (
DagsterInstance,
DagsterInvariantViolationError,
DagsterStepOutputNotFoundError,
ExecutionTargetHandle,
InputDefinition,
Output,
OutputDefinition,
execute_pipeline,
pipeline,
solid,
)
def test_multiple_outputs():
@solid(
... | 30.569149 | 97 | 0.695145 |
d299fa80cc642433b1069fe1f153a0dfcfeb6906 | 8,452 | py | Python | docs/conf.py | dhamaniasad/readitbetter | 7231a31012d2c20b234ac73306008edecde931ab | [
"MIT"
] | 1 | 2022-03-23T09:34:15.000Z | 2022-03-23T09:34:15.000Z | docs/conf.py | dhamaniasad/readitbetter | 7231a31012d2c20b234ac73306008edecde931ab | [
"MIT"
] | 3 | 2020-03-24T15:25:36.000Z | 2021-02-02T21:41:25.000Z | docs/conf.py | dhamaniasad/readitbetter | 7231a31012d2c20b234ac73306008edecde931ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# readitbetter documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
... | 30.623188 | 76 | 0.717227 |
dfda8d35126b12e900368edd23f83f699cab776d | 11,028 | py | Python | featscale.py | VITA-Group/Deep-Oversmoothing-ViT | 9bd242c577a67c09ee748d4c99d8e397b9019b92 | [
"MIT"
] | 29 | 2022-01-26T01:34:17.000Z | 2022-03-31T08:26:46.000Z | featscale.py | VITA-Group/Deep-Oversmoothing-ViT | 9bd242c577a67c09ee748d4c99d8e397b9019b92 | [
"MIT"
] | 2 | 2022-02-12T07:24:47.000Z | 2022-03-17T21:59:39.000Z | featscale.py | VITA-Group/Deep-Oversmoothing-ViT | 9bd242c577a67c09ee748d4c99d8e397b9019b92 | [
"MIT"
] | 2 | 2022-02-28T02:42:28.000Z | 2022-03-14T08:48:04.000Z | ############### Learnable channel-wise scale for HF component ###############
import math
import logging
from functools import partial
from collections import OrderedDict
from copy import deepcopy
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.models.vision_transformer import _cfg
from ... | 39.812274 | 118 | 0.63366 |
64fe1bc968cebb7112da57b550b7681f15dc9a6f | 2,720 | py | Python | ISM/MW_utils.py | XanAstia/tangents-gamma | f9a1927f90592934ff8b027ddc62cfb603975676 | [
"BSD-3-Clause"
] | null | null | null | ISM/MW_utils.py | XanAstia/tangents-gamma | f9a1927f90592934ff8b027ddc62cfb603975676 | [
"BSD-3-Clause"
] | null | null | null | ISM/MW_utils.py | XanAstia/tangents-gamma | f9a1927f90592934ff8b027ddc62cfb603975676 | [
"BSD-3-Clause"
] | 4 | 2018-02-05T13:24:37.000Z | 2019-12-09T10:11:27.000Z | import numpy as np
from scipy.optimize import fsolve
####
# NB: d0 is distance projected on Galactic plane
##### to change between different coordinate systems: polar, cartesian, lon/lat/dist
def rt2xy(rad, theta):
x = -rad * np.sin(theta)
y = rad * np.cos(theta)
return x, y
def rt2lond0(rad,theta,R0):
... | 28.041237 | 104 | 0.567647 |
ae80caff2dc3951c69c5b5368c7bab700bb888d5 | 1,661 | py | Python | 001-Curso-De-Python/001-DSA/002-Loops-Condicionais-Metodos-Funcoes/009-Desenvolvendo Uma Calculadora.py | Adrianogvs/001-Study-Projects | 188582cfd88885762fed587f14c6118d6a93abb7 | [
"MIT"
] | null | null | null | 001-Curso-De-Python/001-DSA/002-Loops-Condicionais-Metodos-Funcoes/009-Desenvolvendo Uma Calculadora.py | Adrianogvs/001-Study-Projects | 188582cfd88885762fed587f14c6118d6a93abb7 | [
"MIT"
] | null | null | null | 001-Curso-De-Python/001-DSA/002-Loops-Condicionais-Metodos-Funcoes/009-Desenvolvendo Uma Calculadora.py | Adrianogvs/001-Study-Projects | 188582cfd88885762fed587f14c6118d6a93abb7 | [
"MIT"
] | null | null | null | # Calculadora em Python
import time
import os
os.system('cls')
def menu():
print('=' * 43)
print('| Escolha uma das Opções abaixo: |')
print('|','-' * 39, '|')
print('| [1] Soma |')
print('| [2] Subtração ... | 33.22 | 84 | 0.448525 |
5b8acc2137732aace3d816251a723f7c2757ec32 | 249 | py | Python | jsonIO_jl_vs_py/jsonIO.py | el-uhu/LearnigResources-Julia_Python | a9d70c7d9b2b8a36f7f31a9ca13f226ecfb9e691 | [
"Apache-2.0"
] | null | null | null | jsonIO_jl_vs_py/jsonIO.py | el-uhu/LearnigResources-Julia_Python | a9d70c7d9b2b8a36f7f31a9ca13f226ecfb9e691 | [
"Apache-2.0"
] | null | null | null | jsonIO_jl_vs_py/jsonIO.py | el-uhu/LearnigResources-Julia_Python | a9d70c7d9b2b8a36f7f31a9ca13f226ecfb9e691 | [
"Apache-2.0"
] | null | null | null | import json
def loadDataset(jsonFile):
with open(jsonFile, "r") as myFile:
dset = json.load(myFile)
return(dset)
def saveDataset(dset, jsonFile):
with open(jsonFile, "w") as myFile:
json.dump(dset, myFile)
return()
| 20.75 | 39 | 0.64257 |
b1642ed955af79879784fb484c6231fd5acac459 | 2,688 | py | Python | atp/users/forms.py | Youpsla/Atoutpass | 59aade8f23660877071211fb758ed36bb846c893 | [
"BSD-3-Clause"
] | null | null | null | atp/users/forms.py | Youpsla/Atoutpass | 59aade8f23660877071211fb758ed36bb846c893 | [
"BSD-3-Clause"
] | 6 | 2020-06-05T18:41:37.000Z | 2022-03-11T23:25:28.000Z | atp/users/forms.py | Youpsla/Atoutpass | 59aade8f23660877071211fb758ed36bb846c893 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django import forms
from .models import User
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
from crispy_forms.layout import Fieldset
from crispy_forms.layout import HTML
from crispy_forms.layout import Submit
from django.core.urlresolvers import reverse
... | 32.780488 | 109 | 0.609747 |
8574e78f9e22f0004ee7c5a529725ea4ea6cfb99 | 3,504 | py | Python | Arc/migrations/0001_initial.py | zcrwind/ARC | 501c44373832a06cbe3e670f1987c80237c00ab6 | [
"MIT"
] | 3 | 2017-03-09T23:52:45.000Z | 2019-08-21T05:17:50.000Z | Arc/migrations/0001_initial.py | zcrwind/ARC | 501c44373832a06cbe3e670f1987c80237c00ab6 | [
"MIT"
] | null | null | null | Arc/migrations/0001_initial.py | zcrwind/ARC | 501c44373832a06cbe3e670f1987c80237c00ab6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-08 15:09
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | 44.35443 | 133 | 0.566781 |
a83a14dfab52f0a756cfab0150fb111448bee39c | 2,068 | py | Python | var/spack/repos/builtin/packages/supernova/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/supernova/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/supernova/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.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 *
import os
class Supernova(Package):
"""Supernova is a software package for de novo assembly from... | 40.54902 | 98 | 0.725822 |
ef7698b8c3ef15f2a882b0edb27f33f779d14d55 | 78 | py | Python | irrigation30/__init__.py | adamsohn/Capstone_Irrigation30 | 0ae7a43894b5e9e62584025ad74209f70c5a8145 | [
"MIT"
] | 2 | 2020-08-02T21:41:30.000Z | 2020-12-06T04:32:05.000Z | irrigation30/__init__.py | adamsohn/Capstone_Irrigation30 | 0ae7a43894b5e9e62584025ad74209f70c5a8145 | [
"MIT"
] | null | null | null | irrigation30/__init__.py | adamsohn/Capstone_Irrigation30 | 0ae7a43894b5e9e62584025ad74209f70c5a8145 | [
"MIT"
] | 2 | 2020-08-05T03:09:56.000Z | 2021-10-02T23:11:04.000Z | from .irrigation30 import authenticate
from .irrigation30 import Irrigation30
| 26 | 38 | 0.871795 |
871eaffc05e4a463c58b794b377495f8b0000f06 | 413 | py | Python | projectHome/home/migrations/0005_auto_20161205_0605.py | Schavras/Home | 2e206dff32b2f30025bec44beee8b1e0792972b7 | [
"MIT"
] | null | null | null | projectHome/home/migrations/0005_auto_20161205_0605.py | Schavras/Home | 2e206dff32b2f30025bec44beee8b1e0792972b7 | [
"MIT"
] | null | null | null | projectHome/home/migrations/0005_auto_20161205_0605.py | Schavras/Home | 2e206dff32b2f30025bec44beee8b1e0792972b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-05 04:05
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0004_movie_path'),
]
operations = [
migrations.RenameField(
mod... | 19.666667 | 48 | 0.590799 |
316161e9841c21552b82485ce515bc201aea64fc | 484 | py | Python | lantz/drivers/tektronix/__init__.py | ZixiLi0520/lantz | a67120a65e6b66f394965ef0100529db7be3df0a | [
"BSD-3-Clause"
] | 6 | 2016-04-13T12:59:18.000Z | 2020-06-24T17:43:04.000Z | lantz/drivers/tektronix/__init__.py | awsch/lantz | 717f6962a471be7ceb61d1d8f6c6f381553df9c4 | [
"BSD-3-Clause"
] | null | null | null | lantz/drivers/tektronix/__init__.py | awsch/lantz | 717f6962a471be7ceb61d1d8f6c6f381553df9c4 | [
"BSD-3-Clause"
] | 6 | 2015-12-14T19:30:36.000Z | 2020-06-29T21:16:01.000Z | # -*- coding: utf-8 -*-
"""
lantz.drivers.tektronix
~~~~~~~~~~~~~~~~~~~~~~~
:company: Tektronix.
:description: Test and Measurement Equipment.
:website: http://www.tek.com/
---
:copyright: 2015 by Lantz Authors, see AUTHORS for more details.
:license: BSD,
"""
from .tds2024b import ... | 21.043478 | 68 | 0.63843 |
5ae0c4d067328dd7e148bc5974e654c2e86fdedb | 72,584 | py | Python | dojo/utils.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | dojo/utils.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | dojo/utils.py | tmetodie/django-DefectDojo | 358d580cb1bdec885f4dc5485d01cb43f63d2bdc | [
"BSD-3-Clause"
] | null | null | null | import re
import binascii
import os
import hashlib
import bleach
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from calendar import monthrange
from datetime import date, datetime
from math import pi, sqrt
import vobject
from dateuti... | 39.490751 | 237 | 0.592734 |
2409d59834c913a6f17e745aa3290514e4334a92 | 1,582 | py | Python | diffractem/compute.py | mahabul123/diffractem | e3a8a3516234846d0be5edfd0620c42e44e2c114 | [
"MIT"
] | 1 | 2020-11-06T04:28:55.000Z | 2020-11-06T04:28:55.000Z | diffractem/compute.py | mahabul123/diffractem | e3a8a3516234846d0be5edfd0620c42e44e2c114 | [
"MIT"
] | null | null | null | diffractem/compute.py | mahabul123/diffractem | e3a8a3516234846d0be5edfd0620c42e44e2c114 | [
"MIT"
] | null | null | null | import numpy as np
import dask.array as da
def map_reduction_func(imgs, fun, *args, output_len=1, dtype=np.float, **kwargs):
"""
Use dask array map blocks for functions that return a numpy vector of values (e.g. fit functions or 1D profiles)
:param imgs: image stack as dask array, stacked along dimension ... | 40.564103 | 119 | 0.635904 |
fc9ca4ac4a3fb159261cb8b5cbae36f0a4e5c97f | 18,394 | py | Python | tensorflow/python/distribute/distribute_coordinator.py | ahoneybun/tensorflow | 5134e65300d1ac384eeb1f4ca72a011ad7225bc8 | [
"Apache-2.0"
] | 5 | 2018-10-20T03:54:49.000Z | 2021-01-02T07:19:53.000Z | tensorflow/python/distribute/distribute_coordinator.py | ahoneybun/tensorflow | 5134e65300d1ac384eeb1f4ca72a011ad7225bc8 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/distribute_coordinator.py | ahoneybun/tensorflow | 5134e65300d1ac384eeb1f4ca72a011ad7225bc8 | [
"Apache-2.0"
] | 2 | 2018-11-03T01:20:09.000Z | 2018-11-17T07:50:32.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... | 37.462322 | 80 | 0.69751 |
47302af979fafa12eccc513f4fcffbdc4cecf7d9 | 6,736 | py | Python | test/engine/test_processors.py | rissikess/sqlalchemy-ceodbc | 6f81f3f7a3c6e39843d478e11e010923a3bf7672 | [
"MIT"
] | null | null | null | test/engine/test_processors.py | rissikess/sqlalchemy-ceodbc | 6f81f3f7a3c6e39843d478e11e010923a3bf7672 | [
"MIT"
] | null | null | null | test/engine/test_processors.py | rissikess/sqlalchemy-ceodbc | 6f81f3f7a3c6e39843d478e11e010923a3bf7672 | [
"MIT"
] | null | null | null | from sqlalchemy.testing import fixtures
from sqlalchemy.testing import assert_raises_message, eq_
class _BooleanProcessorTest(fixtures.TestBase):
def test_int_to_bool_none(self):
eq_(
self.module.int_to_boolean(None),
None
)
def test_int_to_bool_zero(self):
eq_... | 26.836653 | 76 | 0.558046 |
67541c7c8c8ac15098e664939482584edc960491 | 22,346 | py | Python | pyston/filters/default_filters.py | zamazaljiri/django-pyston | 38adee8e96fc807e5b529f6f18093bf2a920e8d5 | [
"BSD-3-Clause"
] | null | null | null | pyston/filters/default_filters.py | zamazaljiri/django-pyston | 38adee8e96fc807e5b529f6f18093bf2a920e8d5 | [
"BSD-3-Clause"
] | null | null | null | pyston/filters/default_filters.py | zamazaljiri/django-pyston | 38adee8e96fc807e5b529f6f18093bf2a920e8d5 | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal, InvalidOperation
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from django.db.models import Q
from django.core.validators import validate_ipv4_address, validate_ipv46_address
from django.core.exceptions import ValidationError
from ch... | 31.209497 | 119 | 0.653137 |
45ebbdc8a7c4eb922fd3b6f78cf91a315554acac | 595 | py | Python | setup.py | kreczko/vector | 88106282d2433ee47c4104404692eed4092cd9f2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | kreczko/vector | 88106282d2433ee47c4104404692eed4092cd9f2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | kreczko/vector | 88106282d2433ee47c4104404692eed4092cd9f2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2019-2020, Jonas Eschle, Jim Pivarski, Eduardo Rodrigues, and Henry Schreiner.
#
# Distributed under the 3-clause BSD license, see accompanying file LICENSE
# or https://github.com/scikit-hep/vector for details.
from setuptools import setup
extras = {
... | 24.791667 | 94 | 0.615126 |
036cecb88cd0411c3fc6d86c676f03c130392d86 | 1,670 | py | Python | greedypermutation/cli.py | siddharthsheth/greedypermutation | a9637830c3f65250a1aa02480a381cfea2f64b90 | [
"MIT"
] | 6 | 2020-12-10T10:47:43.000Z | 2021-11-04T15:37:04.000Z | greedypermutation/cli.py | siddharthsheth/greedypermutation | a9637830c3f65250a1aa02480a381cfea2f64b90 | [
"MIT"
] | 2 | 2021-09-01T17:24:07.000Z | 2021-09-01T17:24:14.000Z | greedypermutation/cli.py | siddharthsheth/greedypermutation | a9637830c3f65250a1aa02480a381cfea2f64b90 | [
"MIT"
] | 2 | 2021-07-31T11:15:06.000Z | 2021-09-02T17:33:41.000Z | import click
import os
from greedypermutation import Point
from metricspaces import MetricSpace
@click.command()
@click.argument('pointsfile', type = click.File('r'))
# @click.option('--outfile', type = click.Path(allow_dash = True),
@click.option('--outfile', type = click.File('w'),
default = '-',
... | 37.111111 | 83 | 0.636527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.