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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fbe350f08751ce35bf7b7a760effe123edcf653f | 565 | py | Python | service/methods.py | USECAP/ci-tools | ad2300e3297266ff3ee6ed9118ccd16fc05291e3 | [
"MIT"
] | null | null | null | service/methods.py | USECAP/ci-tools | ad2300e3297266ff3ee6ed9118ccd16fc05291e3 | [
"MIT"
] | null | null | null | service/methods.py | USECAP/ci-tools | ad2300e3297266ff3ee6ed9118ccd16fc05291e3 | [
"MIT"
] | null | null | null | """Forked Methods from jsonrpcserver"""
from jsonrpcserver.methods import Methods as _Methods
from .background import BackgroundTask
class Methods(_Methods): # pylint: disable=too-many-ancestors
"""
Holds a list of methods.
"""
def __setitem__(self, key, value):
# Method must be callable
... | 31.388889 | 79 | 0.692035 |
69657d1984ccb6f8f58878434109d7fe1ba9a712 | 2,931 | py | Python | python/oneflow/framework/docstr/tensor_ops.py | Panlichen/oneflow | ad93c69c9932e5515aa31fb7f157073708810a3d | [
"Apache-2.0"
] | null | null | null | python/oneflow/framework/docstr/tensor_ops.py | Panlichen/oneflow | ad93c69c9932e5515aa31fb7f157073708810a3d | [
"Apache-2.0"
] | null | null | null | python/oneflow/framework/docstr/tensor_ops.py | Panlichen/oneflow | ad93c69c9932e5515aa31fb7f157073708810a3d | [
"Apache-2.0"
] | 1 | 2021-12-15T02:14:49.000Z | 2021-12-15T02:14:49.000Z | """
Copyright 2020 The OneFlow 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 law or agr... | 27.914286 | 92 | 0.607984 |
25458c5bbde6c839aae12bcc7b3a6b1438a33b4b | 7,249 | py | Python | pirates/leveleditor/worldData/RavensCoveJailInterior.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/leveleditor/worldData/RavensCoveJailInterior.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/leveleditor/worldData/RavensCoveJailInterior.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import Point3, VBase3, Vec4, Vec3
objectStruct = {'LevelEnvironment': {'BASE': {'AmbientColor': Vec4(1, 0.25, 0.25, 1),'Direction': Vec3(0.0, 0.0, 270.0),'FogColor': Vec4(0.27, 0.31, 0.32, 0),'FogLinearRange': (0.0, 80.0),'FogType': 2,'LightSwitch': [0, 0, 0],'SkyType': 10,'EnvEffect': 1}},'Obj... | 2,416.333333 | 7,036 | 0.634432 |
cba012d869847309dc86a9d8b977564065193279 | 8,254 | py | Python | tests/service/optimizer/gpu/test_nvidia_gpu_driver.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | 7 | 2021-10-06T17:02:13.000Z | 2022-03-22T10:45:23.000Z | tests/service/optimizer/gpu/test_nvidia_gpu_driver.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | 2 | 2022-03-16T11:20:54.000Z | 2022-03-24T13:54:49.000Z | tests/service/optimizer/gpu/test_nvidia_gpu_driver.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | null | null | null | from unittest import IsolatedAsyncioTestCase
from unittest.mock import Mock, patch, call
from guapow import __app_name__
from guapow.service.optimizer.gpu import NvidiaGPUDriver, NvidiaPowerMode
class NvidiaGPUDriverTest(IsolatedAsyncioTestCase):
@patch(f'{__app_name__}.service.optimizer.gpu.shutil.which', retu... | 66.564516 | 287 | 0.73322 |
bb8fc4b1bbfed49af9f61af53ed0657a20ee3fc6 | 730 | py | Python | backend/server/apps/endpoints/urls.py | Thiesvdz/my_ml_service | 9d39d95218d84539906c12e0d400d4eb89af91d1 | [
"MIT"
] | null | null | null | backend/server/apps/endpoints/urls.py | Thiesvdz/my_ml_service | 9d39d95218d84539906c12e0d400d4eb89af91d1 | [
"MIT"
] | null | null | null | backend/server/apps/endpoints/urls.py | Thiesvdz/my_ml_service | 9d39d95218d84539906c12e0d400d4eb89af91d1 | [
"MIT"
] | null | null | null | from django.urls import include, re_path
from rest_framework.routers import DefaultRouter
from apps.endpoints.views import EndpointViewSet
from apps.endpoints.views import MLAlgorithmViewSet
from apps.endpoints.views import MLAlgorithmStatusViewSet
from apps.endpoints.views import MLRequestViewSet
router = DefaultRo... | 42.941176 | 97 | 0.831507 |
5b4e774e37bdac9c3bda0c5578ee9477a69255a9 | 1,287 | py | Python | ch2/exercise_2_1_4.py | sweetpalma/clrs | baa2dfd99a435b2138f01bda5779e3cd57275a8d | [
"MIT"
] | 2 | 2019-05-30T18:29:10.000Z | 2019-06-26T17:13:14.000Z | ch2/exercise_2_1_4.py | sweetpalma/clrs | baa2dfd99a435b2138f01bda5779e3cd57275a8d | [
"MIT"
] | null | null | null | ch2/exercise_2_1_4.py | sweetpalma/clrs | baa2dfd99a435b2138f01bda5779e3cd57275a8d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Part of CLRS solutions by SweetPalma, 2019. See LICENSE for details.
import unittest
# Solution:
def binary_sum(a, b):
n = len(a)
c = list()
carry = 0
for i in reversed(range(0, n)):
paired = a[i] + b[i] + carry
if paired > 1:
c.insert(0, paired - 2... | 26.265306 | 70 | 0.58042 |
adfc05772f01957053fe239c640b679d16399f6b | 47,231 | py | Python | bin/maast.py | zjshi/Maast | 01428afa8dad042cb8fcbba024b60f176b228898 | [
"MIT"
] | null | null | null | bin/maast.py | zjshi/Maast | 01428afa8dad042cb8fcbba024b60f176b228898 | [
"MIT"
] | 8 | 2022-03-24T22:17:19.000Z | 2022-03-29T15:42:00.000Z | bin/maast.py | zjshi/Maast | 01428afa8dad042cb8fcbba024b60f176b228898 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import division
import sys, os, time, argparse
import shutil, hashlib, math, multiprocessing
import numpy as np
from operator import itemgetter
from Bio import SeqIO
from snps_io import id_genome_clusters, id_centroid
from snps_io import vcf_io, concat_alleles, gen_msa, align_... | 34.424927 | 327 | 0.678114 |
da0a670f00184ba762023ea80571798c62e4997b | 5,541 | py | Python | numdifftools/test_functions.py | jlec/numdifftools | 43071da54627f896213cabcea61158d29f4e86b0 | [
"BSD-3-Clause"
] | null | null | null | numdifftools/test_functions.py | jlec/numdifftools | 43071da54627f896213cabcea61158d29f4e86b0 | [
"BSD-3-Clause"
] | null | null | null | numdifftools/test_functions.py | jlec/numdifftools | 43071da54627f896213cabcea61158d29f4e86b0 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on 17. mai 2015
@author: pab
'''
from __future__ import division
import numpy as np
function_names = ['cos', 'sin', 'tan',
'cosh', 'sinh', 'tanh',
'arcsinh',
'exp', 'expm1', 'exp2', 'square',
'sqrt',
'log', 'log1p', ... | 40.152174 | 75 | 0.304097 |
5e34dd564c7f63d99b7c3a05e142fdd76d6786ec | 1,199 | py | Python | cf/arena_util.py | sr-study/melon-playlist-continuation-2020 | 04386434133de7adbcc63fbb88ee71f69a604ecb | [
"Apache-2.0"
] | 1 | 2020-07-27T15:03:10.000Z | 2020-07-27T15:03:10.000Z | cf/arena_util.py | sr-study/melon-playlist-continuation-2020 | 04386434133de7adbcc63fbb88ee71f69a604ecb | [
"Apache-2.0"
] | 2 | 2020-07-27T14:51:14.000Z | 2020-07-28T11:12:28.000Z | cf/arena_util.py | sr-study/melon-playlist-continuation-2020 | 04386434133de7adbcc63fbb88ee71f69a604ecb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import io
import os
import json
import distutils.dir_util
from collections import Counter
import numpy as np
import numpy as np
import pandas as pd
def write_json(data, fname):
def _conv(o):
if isinstance(o, np.int64):
return int(o)
else:
return int(... | 21.410714 | 69 | 0.63553 |
32514d2177f813b2e883495be3e0c5213bb1ddc3 | 625 | py | Python | auto_changelog/__init__.py | WqyJh/auto-changelog | 884fa133bb13013b694646472b2b113d6be2abc4 | [
"MIT"
] | 1 | 2019-08-21T10:41:17.000Z | 2019-08-21T10:41:17.000Z | auto_changelog/__init__.py | WqyJh/auto-changelog | 884fa133bb13013b694646472b2b113d6be2abc4 | [
"MIT"
] | null | null | null | auto_changelog/__init__.py | WqyJh/auto-changelog | 884fa133bb13013b694646472b2b113d6be2abc4 | [
"MIT"
] | null | null | null | from typing import Any
from auto_changelog.domain_model import RepositoryInterface, PresenterInterface
__version__ = '1.0.0dev1'
def generate_changelog(
repository: RepositoryInterface,
presenter: PresenterInterface,
title: str = 'Changelog',
description: str = '',
starting_c... | 32.894737 | 131 | 0.7248 |
7b19ce3f1a50141479ddea652f8a96c42cfc1a46 | 3,324 | py | Python | app/requests.py | vugutsa/News-API | 16becc037aa05d54a5ec6abede5baf9f94b1eb3a | [
"Unlicense"
] | null | null | null | app/requests.py | vugutsa/News-API | 16becc037aa05d54a5ec6abede5baf9f94b1eb3a | [
"Unlicense"
] | null | null | null | app/requests.py | vugutsa/News-API | 16becc037aa05d54a5ec6abede5baf9f94b1eb3a | [
"Unlicense"
] | null | null | null | import urllib.request,json
from .models import News
# Getting api key
api_key = None
# Getting the movie base url
base_url = None
def configure_request(app):
global api_key,base_url
api_key = app.config['NEWS_API_KEY']
base_url = app.config['NEWS_API_BASE_URL']
def get_news(category):
'''
Funct... | 32.910891 | 116 | 0.690132 |
28aaaa735ba7072af61e862f22d4d1d6a9686809 | 3,544 | py | Python | bindings/python/ensmallen/datasets/string/paenibacilluspeoriae.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/paenibacilluspeoriae.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/paenibacilluspeoriae.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Paenibacillus peoriae.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ... | 32.814815 | 223 | 0.677201 |
da4213c8aaa7bd7c127eb6661b4ae2da317a4d12 | 196 | py | Python | master.py | thor-shuang/git_learning | b3b86ea6636705f2bbe28014fc35303a0d7d75b5 | [
"MIT"
] | null | null | null | master.py | thor-shuang/git_learning | b3b86ea6636705f2bbe28014fc35303a0d7d75b5 | [
"MIT"
] | null | null | null | master.py | thor-shuang/git_learning | b3b86ea6636705f2bbe28014fc35303a0d7d75b5 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
@File : master.py
@Vision : 1.0.0
@Time : 2020/6/4 14:08
@Author : Qing Shuang
@Email : 2075693226@qq.com
@Software: PyCharm
"""
# master
# master
# master
| 13.066667 | 28 | 0.581633 |
fd07f4d0364b0edce94496c98f55c9cce5b58cb8 | 8,145 | py | Python | functions.py | m-pana/AutoSpeech | 46f6b400ef22e400c051718196e5c78091215d25 | [
"MIT"
] | null | null | null | functions.py | m-pana/AutoSpeech | 46f6b400ef22e400c051718196e5c78091215d25 | [
"MIT"
] | null | null | null | functions.py | m-pana/AutoSpeech | 46f6b400ef22e400c051718196e5c78091215d25 | [
"MIT"
] | null | null | null | import time
import torch
import torch.nn.functional as F
import logging
import numpy as np
import matplotlib.pyplot as plt
from utils import compute_eer
from utils import AverageMeter, ProgressMeter, accuracy
plt.switch_backend('agg')
logger = logging.getLogger(__name__)
def train(cfg, model, optimizer, train_loade... | 33.79668 | 120 | 0.618293 |
cc799c986856fa1e6e1b691fb88b8e3e03fdb936 | 360 | py | Python | correctiv_justizgelder/cms_apps.py | correctiv/correctiv-justizgelder | 6e72dc8212cdfc38571e5410f4b2c0bab66a6ef3 | [
"MIT"
] | 2 | 2015-05-08T15:48:35.000Z | 2021-09-13T10:57:35.000Z | correctiv_justizgelder/cms_apps.py | correctiv/correctiv-justizgelder | 6e72dc8212cdfc38571e5410f4b2c0bab66a6ef3 | [
"MIT"
] | null | null | null | correctiv_justizgelder/cms_apps.py | correctiv/correctiv-justizgelder | 6e72dc8212cdfc38571e5410f4b2c0bab66a6ef3 | [
"MIT"
] | 1 | 2017-12-11T14:13:28.000Z | 2017-12-11T14:13:28.000Z | """Application hooks for blog"""
from django.utils.translation import ugettext_lazy as _
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
class JustizgelderApphook(CMSApp):
name = _('Court Donations Database')
app_name = 'justizgelder'
urls = ['correctiv_justizgelder.urls']
app... | 24 | 55 | 0.780556 |
19792024274c8bd4219e660bdc03a4e7ea5caa2e | 366 | py | Python | bvbcet/GBM/bisect.py | satish-annigeri/Notebooks | 92a7dc1d4cf4aebf73bba159d735a2e912fc88bb | [
"CC0-1.0"
] | null | null | null | bvbcet/GBM/bisect.py | satish-annigeri/Notebooks | 92a7dc1d4cf4aebf73bba159d735a2e912fc88bb | [
"CC0-1.0"
] | null | null | null | bvbcet/GBM/bisect.py | satish-annigeri/Notebooks | 92a7dc1d4cf4aebf73bba159d735a2e912fc88bb | [
"CC0-1.0"
] | null | null | null | #Bisection method to find a real root of an equation***********
a,b=input ('enter the value of a and b')
maxitr=input('enter the no. of iterations')
itr=0
print("itr, a, b, x, fx")
func= lambda x: x**3+x-1
while itr<maxitr:
x=(a+b)/2.0
fa=func(a)
fx=func(x)
if fa*fx<0.0:
b=x
else:
a=... | 22.875 | 63 | 0.546448 |
b32bb67c3fbb8bd832815c5e6ac9683edec2eb6d | 25,026 | py | Python | mhctools/parsing.py | denklewer/mhctools | 1aed7e8b975253349a0c504f7d42e7051139e459 | [
"Apache-2.0"
] | null | null | null | mhctools/parsing.py | denklewer/mhctools | 1aed7e8b975253349a0c504f7d42e7051139e459 | [
"Apache-2.0"
] | null | null | null | mhctools/parsing.py | denklewer/mhctools | 1aed7e8b975253349a0c504f7d42e7051139e459 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-2019. Mount Sinai School of Medicine
#
# 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 applicabl... | 44.137566 | 166 | 0.536242 |
55f48af27a245cff4d79abe1afacb2ca13c703d0 | 11,720 | py | Python | celery/tests/app/test_app.py | stratoukos/celery | da9c0bad1f52515a70ae28d48abddbf42571a39f | [
"BSD-3-Clause"
] | 1 | 2015-12-02T17:12:09.000Z | 2015-12-02T17:12:09.000Z | celery/tests/app/test_app.py | stratoukos/celery | da9c0bad1f52515a70ae28d48abddbf42571a39f | [
"BSD-3-Clause"
] | null | null | null | celery/tests/app/test_app.py | stratoukos/celery | da9c0bad1f52515a70ae28d48abddbf42571a39f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from __future__ import with_statement
import os
from mock import Mock, patch
from pickle import loads, dumps
from kombu import Exchange
from celery import Celery
from celery import app as _app
from celery.app import defaults
from celery.app import state
from celery.loaders.bas... | 34.880952 | 77 | 0.60256 |
283ac1824f81858e123d452398762a41d3869986 | 1,360 | py | Python | qtaf_settings.py | Vancheung/QTAF | 31133f221f3abaf68078218d9bbf95f097837363 | [
"BSD-3-Clause"
] | null | null | null | qtaf_settings.py | Vancheung/QTAF | 31133f221f3abaf68078218d9bbf95f097837363 | [
"BSD-3-Clause"
] | null | null | null | qtaf_settings.py | Vancheung/QTAF | 31133f221f3abaf68078218d9bbf95f097837363 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Tencent is pleased to support the open source community by making QTA available.
# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the BSD 3-Clause License (the "License"); you may not use this
# file except in compliance with the License. You may... | 31.627907 | 88 | 0.5875 |
b0f2d3f068285a402855ec3031ff5af42b3ec3b9 | 3,694 | py | Python | server_scripts/dev_board_eth.py | slaclab/pysmurf | 0fef2dda87e6da292485266b3bf630c9b7ca97dc | [
"BSD-3-Clause-LBNL"
] | 3 | 2019-10-17T02:37:59.000Z | 2022-03-09T16:42:34.000Z | server_scripts/dev_board_eth.py | slaclab/pysmurf | 0fef2dda87e6da292485266b3bf630c9b7ca97dc | [
"BSD-3-Clause-LBNL"
] | 446 | 2019-04-10T04:46:20.000Z | 2022-03-15T20:27:57.000Z | server_scripts/dev_board_eth.py | slaclab/pysmurf | 0fef2dda87e6da292485266b3bf630c9b7ca97dc | [
"BSD-3-Clause-LBNL"
] | 13 | 2019-02-05T18:02:05.000Z | 2021-03-02T18:41:49.000Z | #!/usr/bin/env python3
#-----------------------------------------------------------------------------
# Title : PyRogue Server
#-----------------------------------------------------------------------------
# File : python/pyrogue_server.py
# Created : 2017-06-20
#------------------------------------------... | 43.97619 | 115 | 0.518138 |
1ac8c87737a6a65e5708196d55194e945b48822d | 389 | py | Python | app.py | alexpulver/company-guardrails | 6a72b34de61bfde0b2360739ab3f0e2dcf6ee1be | [
"MIT-0"
] | null | null | null | app.py | alexpulver/company-guardrails | 6a72b34de61bfde0b2360739ab3f0e2dcf6ee1be | [
"MIT-0"
] | null | null | null | app.py | alexpulver/company-guardrails | 6a72b34de61bfde0b2360739ab3f0e2dcf6ee1be | [
"MIT-0"
] | null | null | null | import os
from aws_cdk import core as cdk
from cdk_nag import NIST80053Checks
from deployment import LandingPageFrontend
app = cdk.App()
LandingPageFrontend(
app,
"LandingPageFrontend",
env=cdk.Environment(
account=os.environ["CDK_DEFAULT_ACCOUNT"],
region=os.environ["CDK_DEFAULT_REGION"... | 17.681818 | 50 | 0.722365 |
c585d4c4a235d180a4f968d805c8b5ad5a6d782e | 720 | py | Python | examples/basic/tube.py | Singlesnail/vedo | c61ad3aca5c926d4b41b8a468aefe8fc02f242ab | [
"CC0-1.0"
] | 1 | 2021-04-25T06:28:01.000Z | 2021-04-25T06:28:01.000Z | examples/basic/tube.py | leftwillow/vedo | b2e2cfc3453bbd118b6c81a2227b8ce6f1d22b7b | [
"CC0-1.0"
] | null | null | null | examples/basic/tube.py | leftwillow/vedo | b2e2cfc3453bbd118b6c81a2227b8ce6f1d22b7b | [
"CC0-1.0"
] | null | null | null | """Use array to vary radius and color
of a line represented as a tube.
"""
from vedo import *
import numpy as np
settings.defaultFont = 'Quikhand'
ln = [[sin(x), cos(x), x / 2] for x in np.arange(0,9, 0.1)]
N = len(ln)
############################### a simple tube( along ln
t1 = Tube(ln, c="blue", r=0.08)
#########... | 25.714286 | 64 | 0.552778 |
6205c915fe7a9942899db05c52d22f18124b1bf6 | 378 | py | Python | tests.py | rjnay1984/photo-album-python | 11a3a8a6e200e1c4406c1d640373a3a95d19cb05 | [
"MIT"
] | null | null | null | tests.py | rjnay1984/photo-album-python | 11a3a8a6e200e1c4406c1d640373a3a95d19cb05 | [
"MIT"
] | null | null | null | tests.py | rjnay1984/photo-album-python | 11a3a8a6e200e1c4406c1d640373a3a95d19cb05 | [
"MIT"
] | null | null | null | from photo_album import request_album
"""
Test the length of the album, since it's
consistent in the placeholder API.
"""
def test_photo_album_success():
album_request = request_album(4)
assert len(album_request) == 50
def test_photo_album_unsuccessful():
album_request = request_album(101)
assert '... | 22.235294 | 69 | 0.751323 |
7d702fe3d0d9ee87710be07e57817fd32ee00db8 | 572 | py | Python | casingSimulations/__init__.py | simpeg-research/casingSimulations | ba55d5847b01b44b8a8209d2b5728e073752e41a | [
"MIT"
] | 3 | 2019-11-13T21:23:19.000Z | 2021-12-07T05:53:08.000Z | casingSimulations/__init__.py | lheagy/casingResearch | bc03c07b216bf6f9015e65ed0d8deaae88d4b019 | [
"MIT"
] | 5 | 2017-03-04T23:36:32.000Z | 2017-04-28T21:11:47.000Z | casingSimulations/__init__.py | lheagy/casingResearch | bc03c07b216bf6f9015e65ed0d8deaae88d4b019 | [
"MIT"
] | 2 | 2018-12-28T01:32:10.000Z | 2020-03-06T08:39:07.000Z | from . import model
from .mesh import (
CylMeshGenerator, CasingMeshGenerator, TensorMeshGenerator
)
from .physics import (
casing_currents, casing_charges, plotCurrentDensity,
plot_currents_over_freq,
plot_currents_over_mu, plot_j_over_mu_z, plot_j_over_freq_z,
plot_j_over_mu_x
)
from .view import ... | 27.238095 | 72 | 0.791958 |
47872f8e7c4856376a7387b557797e7d7eb9c882 | 193 | py | Python | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 1 | 2021-07-15T08:55:12.000Z | 2021-07-15T08:55:12.000Z | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 7 | 2021-01-07T23:51:57.000Z | 2021-12-13T19:50:57.000Z | syn/conf/__init__.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 2 | 2016-07-11T08:46:31.000Z | 2017-12-13T13:30:51.000Z | from .conf import *
from .conf2 import *
from .vars import *
from syn.base_utils import harvest_metadata, delete
with delete(harvest_metadata, delete):
harvest_metadata('../metadata.yml')
| 24.125 | 51 | 0.761658 |
843254f3c642463ad250158774b369d82b88581a | 4,794 | py | Python | ros/src/twist_controller/dbw_node.py | Lucap87ct/CarND-Capstone | cb8680b57f0fc1fb7ad46bef7d81c3cf7cda3231 | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | Lucap87ct/CarND-Capstone | cb8680b57f0fc1fb7ad46bef7d81c3cf7cda3231 | [
"MIT"
] | 5 | 2020-03-14T17:32:12.000Z | 2022-03-12T00:20:17.000Z | ros/src/twist_controller/dbw_node.py | andrea-ortalda/CarND-Capstone | 53045261e18a651d06d46455f04b1eb0f2e4f5f5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Bool
from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport
from geometry_msgs.msg import TwistStamped
import math
from twist_controller import Controller
class DBWNode(object):
def __init__(self):
rospy.init_node('dbw_n... | 41.327586 | 128 | 0.590738 |
c509b3b0fece0841f9e9bb065dc843d504b031da | 2,758 | py | Python | hyperstream/utils/statistics/percentile.py | vishalbelsare/HyperStream | 35d63962f78cdfaac0383e38d79b16af373f1492 | [
"MIT"
] | 12 | 2017-01-14T15:26:51.000Z | 2020-10-04T14:46:44.000Z | hyperstream/utils/statistics/percentile.py | vishalbelsare/HyperStream | 35d63962f78cdfaac0383e38d79b16af373f1492 | [
"MIT"
] | 27 | 2017-04-04T22:49:02.000Z | 2018-02-22T13:46:52.000Z | hyperstream/utils/statistics/percentile.py | vishalbelsare/HyperStream | 35d63962f78cdfaac0383e38d79b16af373f1492 | [
"MIT"
] | 6 | 2017-04-04T15:09:52.000Z | 2018-11-19T08:01:23.000Z | # The MIT License (MIT)
# Copyright (c) 2014-2017 University of Bristol
#
# 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 us... | 30.307692 | 80 | 0.620015 |
0d86a24931005ada8510470ea88c669885fc7e29 | 5,543 | py | Python | components/alibi-detect-server/adserver/cm_model.py | M46F/seldon-core | db251e0177c056bac7b4518033833d27a85529ee | [
"Apache-2.0"
] | 4 | 2019-08-29T19:36:55.000Z | 2021-12-20T00:37:08.000Z | components/alibi-detect-server/adserver/cm_model.py | M46F/seldon-core | db251e0177c056bac7b4518033833d27a85529ee | [
"Apache-2.0"
] | 97 | 2021-01-22T11:50:05.000Z | 2021-08-02T21:22:21.000Z | components/alibi-detect-server/adserver/cm_model.py | M46F/seldon-core | db251e0177c056bac7b4518033833d27a85529ee | [
"Apache-2.0"
] | 7 | 2020-09-07T09:10:57.000Z | 2021-11-25T02:59:02.000Z | import json
from typing import List, Dict, Optional, Union
import logging
import numpy as np
from enum import Enum
import kfserving
import importlib
import pickle
import os
from adserver.constants import (
HEADER_RETURN_INSTANCE_SCORE,
REQUEST_ID_HEADER_NAME,
NAMESPACE_HEADER_NAME,
)
from .numpy_encoder imp... | 32.798817 | 129 | 0.596067 |
debf6b21d6f1ae10046d75b4730d03b562ac5aa2 | 2,525 | py | Python | ceilometerclient/v2/options.py | dreamhost/python-ceilometerclient | a550dcfa4971df5ef517aa73d2ebc7a6675c72c6 | [
"Apache-2.0"
] | null | null | null | ceilometerclient/v2/options.py | dreamhost/python-ceilometerclient | a550dcfa4971df5ef517aa73d2ebc7a6675c72c6 | [
"Apache-2.0"
] | null | null | null | ceilometerclient/v2/options.py | dreamhost/python-ceilometerclient | a550dcfa4971df5ef517aa73d2ebc7a6675c72c6 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 30.059524 | 78 | 0.525545 |
875fc7fd6799e210dc5c4b1c2a28f7918c5d9215 | 1,941 | py | Python | .history/postImages/index_20201006210944.py | Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE | 9a8289d8550115362c46dea3ed8570b789c09a10 | [
"MIT"
] | 2 | 2020-10-21T22:14:15.000Z | 2020-10-21T22:14:16.000Z | .history/postImages/index_20201006210947.py | Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE | 9a8289d8550115362c46dea3ed8570b789c09a10 | [
"MIT"
] | null | null | null | .history/postImages/index_20201006210947.py | Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE | 9a8289d8550115362c46dea3ed8570b789c09a10 | [
"MIT"
] | null | null | null | import csv
import requests
df = open("bridgeData3.csv",'r').readlines()
fin = open('final.csv','r').readlines()
finCsv = fin[1:]
# url = https://b2ptc.herokuapp.com/bridges
finalCsv = df[1:]
obj = {}
for i in finalCsv:
x = i.split(',')
obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_im... | 30.328125 | 97 | 0.512107 |
021a368b8a2fb30f58f8d888cfc2d1ac12776cc5 | 2,205 | py | Python | conans/test/functional/old/user_info_test.py | johnmcfarlane/conan | 725bd0cee4e53f35521aef7eeb61d4772c460d5e | [
"MIT"
] | null | null | null | conans/test/functional/old/user_info_test.py | johnmcfarlane/conan | 725bd0cee4e53f35521aef7eeb61d4772c460d5e | [
"MIT"
] | 4 | 2018-09-05T13:08:31.000Z | 2020-03-05T09:17:20.000Z | conans/test/functional/old/user_info_test.py | johnmcfarlane/conan | 725bd0cee4e53f35521aef7eeb61d4772c460d5e | [
"MIT"
] | 2 | 2018-09-05T11:58:44.000Z | 2018-09-05T12:14:11.000Z | import os
import unittest
from conans.paths import CONANFILE
from conans.test.utils.tools import TestClient
class UserInfoTest(unittest.TestCase):
def test_user_info_propagation(self):
client = TestClient()
def export_lib(name, requires, infolines):
base = '''
import os
from conans... | 31.956522 | 94 | 0.61542 |
f3af6b92499d165d199379344a35b391ca9af338 | 21,994 | py | Python | pyecore/resources/resource.py | jamoralp/pyecore | df1f230e6e99dfe0a6ccfa34776b626e2bb13d63 | [
"BSD-3-Clause"
] | 99 | 2017-06-02T14:03:51.000Z | 2022-03-11T06:34:11.000Z | pyecore/resources/resource.py | jamoralp/pyecore | df1f230e6e99dfe0a6ccfa34776b626e2bb13d63 | [
"BSD-3-Clause"
] | 108 | 2017-05-19T05:53:45.000Z | 2022-03-30T04:49:47.000Z | pyecore/resources/resource.py | jamoralp/pyecore | df1f230e6e99dfe0a6ccfa34776b626e2bb13d63 | [
"BSD-3-Clause"
] | 41 | 2017-06-02T14:07:35.000Z | 2021-12-02T06:21:01.000Z | # -*- coding: future_fstrings -*-
""" The resource module proposes all the concepts that are related to Resource
handling. A Resource represents a special model container that can be
serialized. Many ``Resource`` can be contained in a ``ResourceSet``, and
"cross-reference" each others.
"""
from uuid import uuid4
import... | 34.473354 | 79 | 0.587297 |
3e79148e432493f36676a1ad234fe82b1434eceb | 34,029 | py | Python | MonocularDepthEstimation/src/train/train_model.py | csharpshooter/DeepLearning | c1d20660c32076468970f7376931e1fcd0d2644e | [
"MIT"
] | null | null | null | MonocularDepthEstimation/src/train/train_model.py | csharpshooter/DeepLearning | c1d20660c32076468970f7376931e1fcd0d2644e | [
"MIT"
] | null | null | null | MonocularDepthEstimation/src/train/train_model.py | csharpshooter/DeepLearning | c1d20660c32076468970f7376931e1fcd0d2644e | [
"MIT"
] | null | null | null | import os
import sys
import numpy as np
import torch
from torch.nn import CrossEntropyLoss, BCEWithLogitsLoss
from torch.optim.lr_scheduler import LambdaLR
from torchsummary import summary
from tqdm import tqdm
from src.utils import Utils
'''
Class used for training the model.
This class consists of all different t... | 43.739075 | 120 | 0.592024 |
2bb62de970c8da45cf6859db80d551ef52927879 | 2,927 | py | Python | chia/util/chia_logging.py | hashgreen/chia-blockchain | b1acb5597ba242649d1dc97de7fd605148e33816 | [
"Apache-2.0"
] | 2 | 2022-03-22T22:00:46.000Z | 2022-03-22T22:42:45.000Z | chia/util/chia_logging.py | zcomputerwiz/experiments-blockchain | 841754b44494451a9e3e537575eeec431fe533d1 | [
"Apache-2.0"
] | 3 | 2022-03-21T22:00:11.000Z | 2022-03-21T22:00:40.000Z | chia/util/chia_logging.py | zcomputerwiz/experiments-blockchain | 841754b44494451a9e3e537575eeec431fe533d1 | [
"Apache-2.0"
] | 1 | 2022-03-20T14:51:39.000Z | 2022-03-20T14:51:39.000Z | import logging
from pathlib import Path
from typing import Dict
import colorlog
from concurrent_log_handler import ConcurrentRotatingFileHandler
from logging.handlers import SysLogHandler
from chia.util.path import mkdir, path_from_root
def initialize_logging(service_name: str, logging_config: Dict, root_path: Path... | 42.42029 | 119 | 0.663478 |
ebb158b9b4862af2b1ce189444f680bdde9820fe | 2,253 | py | Python | data/cirq_new/cirq_program/startCirq_noisy778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy778.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=19
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 32.652174 | 77 | 0.686196 |
67f3385b9807806cec80c22d8ef52741fa7707fb | 19,730 | py | Python | models/qsar_fub.py | patlewig/httk | 02f5b370d701cb6c1f4b34e1448110b9c4a7174b | [
"MIT"
] | null | null | null | models/qsar_fub.py | patlewig/httk | 02f5b370d701cb6c1f4b34e1448110b9c4a7174b | [
"MIT"
] | null | null | null | models/qsar_fub.py | patlewig/httk | 02f5b370d701cb6c1f4b34e1448110b9c4a7174b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 24 16:22:39 2016
@author: ppradeep
"""
#%%
###########################################################################
## Import libraries
###########################################################################
import os
clear = lambda: os.system('c... | 45.356322 | 206 | 0.640193 |
ee393bb19e84042dde473932678b17f7b78e0c11 | 1,881 | py | Python | src/adafruit_blinka/microcontroller/pico_u2if/i2c.py | caternuson/Adafruit_Blinka | 120c7a7f4c7559ede6a7d098e4800663381fc93d | [
"MIT"
] | 1 | 2020-11-28T18:22:32.000Z | 2020-11-28T18:22:32.000Z | src/adafruit_blinka/microcontroller/pico_u2if/i2c.py | caternuson/Adafruit_Blinka | 120c7a7f4c7559ede6a7d098e4800663381fc93d | [
"MIT"
] | null | null | null | src/adafruit_blinka/microcontroller/pico_u2if/i2c.py | caternuson/Adafruit_Blinka | 120c7a7f4c7559ede6a7d098e4800663381fc93d | [
"MIT"
] | null | null | null | """I2C Class for Pico u2if"""
from .pico_u2if import pico_u2if
class I2C:
"""Custom I2C Class for Pico u2if"""
def __init__(self, scl, sda, *, frequency=100000):
index = None
if scl.id == 5 and sda.id == 4:
index = 0
if scl.id == 15 and sda.id == 14:
index = 1
... | 29.857143 | 78 | 0.592238 |
f471689396ece0bca8a5485020f0f1accadff522 | 1,059 | py | Python | python3/learn-python/take_screenshot.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 2 | 2020-09-29T04:09:41.000Z | 2020-10-18T13:33:36.000Z | python3/learn-python/take_screenshot.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | null | null | null | python3/learn-python/take_screenshot.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 1 | 2021-12-26T04:55:55.000Z | 2021-12-26T04:55:55.000Z | from selenium import webdriver
from time import sleep
driver = webdriver.Chrome()
driver.get('https://www.coursera.org/learn/understanding-visualization-data/lecture/KeSCz/what-is-statistics')
sleep(1)
driver.get_screenshot_as_file("screenshot.png")
'''
#coding=utf-8 ... | 34.16129 | 187 | 0.574127 |
8a7a2e093a97f1d623d6e259d86853a2df5fab9e | 548 | py | Python | output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_pattern_2_xsd/nistschema_sv_iv_list_date_pattern_2.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_pattern_2_xsd/nistschema_sv_iv_list_date_pattern_2.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/date/schema_instance/nistschema_sv_iv_list_date_pattern_2_xsd/nistschema_sv_iv_list_date_pattern_2.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "NISTSchema-SV-IV-list-date-pattern-2-NS"
@dataclass
class NistschemaSvIvListDatePattern2:
class Meta:
name = "NISTSchema-SV-IV-list-date-pattern-2"
namespace = "NISTSchema-SV-IV-list-date-pattern-2-NS"
value: L... | 27.4 | 116 | 0.616788 |
8d473b19dd9dc30625aaeecec9aa08300173f99b | 10,577 | py | Python | beyond/frames/frames.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | beyond/frames/frames.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | beyond/frames/frames.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This module define the Frames available for computation and their relations
to each other.
The relations may be circular, thanks to the use of the Node class.
.. code-block:: text
,---. ,-------. ,----.
|G50|---bias---|EME2000|..bias..|GCRF|
... | 26.575377 | 92 | 0.549967 |
4505ce2c2814e4238ec64be05abad48ce9b3561c | 1,563 | py | Python | tests/links_tests/model_tests/fpn_tests/test_fpn.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | null | null | null | tests/links_tests/model_tests/fpn_tests/test_fpn.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | null | null | null | tests/links_tests/model_tests/fpn_tests/test_fpn.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 1 | 2019-03-21T04:29:59.000Z | 2019-03-21T04:29:59.000Z | from __future__ import division
import numpy as np
import unittest
import chainer
from chainer import testing
from chainer.testing import attr
from chainercv.links.model.fpn import FPN
def _random_array(xp, shape):
return xp.array(
np.random.uniform(-1, 1, size=shape), dtype=np.float32)
class DummyEx... | 25.622951 | 78 | 0.598848 |
b5f27de61dcaa2e20d5708c51eef860e3f0df564 | 12,466 | py | Python | virtual/lib/python2.7/site-packages/ww/tools/iterables.py | DK-denno/awwards | af20f2da2bccf066a4da3fb4aa67ad839bae2af9 | [
"MIT"
] | 15 | 2016-10-15T10:15:08.000Z | 2021-04-06T08:31:02.000Z | virtual/lib/python2.7/site-packages/ww/tools/iterables.py | DK-denno/awwards | af20f2da2bccf066a4da3fb4aa67ad839bae2af9 | [
"MIT"
] | 7 | 2016-10-14T08:53:29.000Z | 2016-11-09T23:43:31.000Z | virtual/lib/python2.7/site-packages/ww/tools/iterables.py | DK-denno/awwards | af20f2da2bccf066a4da3fb4aa67ad839bae2af9 | [
"MIT"
] | 3 | 2016-10-13T11:44:46.000Z | 2016-10-14T08:58:03.000Z | # coding: utf-8
"""
:doc:`g() </iterable_wrapper>` is very convenient, but it's only a
thin wrapper on top of the tools from this module.
So if you want to apply some of the goodies from it without having to
turn your iterables into IterableWrapper objects, you can use the functions
from this modu... | 34.153425 | 79 | 0.604925 |
f22bf3b2b9924fefdf21b633e986ed77efffa8ed | 5,201 | py | Python | MSSN_code/src/trainer.py | weiwenlan/Mobile-Lightweight-Super-Resolution-Construction-System | fe1552bf119795f25692d999e5cd375b105705ae | [
"MIT"
] | 14 | 2020-11-07T05:38:32.000Z | 2022-01-19T13:05:58.000Z | MSSN_code/src/trainer.py | weiwenlan/Mobile-Lightweight-Super-Resolution-Construction-System | fe1552bf119795f25692d999e5cd375b105705ae | [
"MIT"
] | 3 | 2021-09-01T13:29:10.000Z | 2021-12-02T08:57:08.000Z | MSSN_code/src/trainer.py | weiwenlan/Mobile-Lightweight-Super-Resolution-Construction-System | fe1552bf119795f25692d999e5cd375b105705ae | [
"MIT"
] | 5 | 2020-11-07T02:59:48.000Z | 2021-12-07T09:09:07.000Z | import os
import math
from decimal import Decimal
import utility
import torch
import torch.nn.utils as utils
from tqdm import tqdm
import skimage
from skimage.measure import compare_ssim
class Trainer():
def __init__(self, args, loader, my_model, my_loss, ckp):
self.args = args
self.scale = args... | 33.993464 | 141 | 0.52836 |
a1632e042d9b1815a77150ebd1eb53a77cc9ee13 | 1,226 | py | Python | armi/bookkeeping/visualization/__init__.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 162 | 2019-11-01T17:35:58.000Z | 2022-03-18T04:22:39.000Z | armi/bookkeeping/visualization/__init__.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 315 | 2019-11-01T17:32:05.000Z | 2022-03-30T03:51:42.000Z | armi/bookkeeping/visualization/__init__.py | keckler/armi | b5f95b4795aa21e00fd6786f6994862a4bdccb16 | [
"Apache-2.0"
] | 55 | 2019-11-01T16:59:59.000Z | 2022-03-25T18:19:06.000Z | # Copyright 2020 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 43.785714 | 86 | 0.792007 |
b5ac8e496fd9466d0c63c18a84f20f2f3677c391 | 74,649 | py | Python | torch/testing/_internal/common_quantization.py | rkansal47/pytorch | 08f8d31fcf658563507a79334abaa135aeb9bddd | [
"Intel"
] | 1 | 2021-08-02T08:24:19.000Z | 2021-08-02T08:24:19.000Z | torch/testing/_internal/common_quantization.py | xiezhq-hermann/pytorch | fd8004b42e2a2348ec8837e3fb524b960c1b4cdb | [
"Intel"
] | null | null | null | torch/testing/_internal/common_quantization.py | xiezhq-hermann/pytorch | fd8004b42e2a2348ec8837e3fb524b960c1b4cdb | [
"Intel"
] | null | null | null | r"""Importing this file includes common utility methods and base clases for
checking quantization api and properties of resulting modules.
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.quantized as nnq
import torch.nn.quantized.dynamic as nnqd
from torch.nn.intrinsic import _Fu... | 37.606549 | 130 | 0.599767 |
a677836218d9caa0db62c03723151ef0a4cfcec5 | 2,779 | py | Python | bentoml/frameworks/sklearn.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | bentoml/frameworks/sklearn.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | bentoml/frameworks/sklearn.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | import os
from bentoml.service.env import BentoServiceEnv
from bentoml.exceptions import MissingDependencyException
from bentoml.service.artifacts import BentoServiceArtifact
def _import_joblib_module():
try:
import joblib
except ImportError:
joblib = None
if joblib is None:
try... | 28.357143 | 88 | 0.65923 |
5fc30670d5a556a4faec02e0528c8cb8d0113c53 | 9,037 | py | Python | src/utils/check-pr/check-pr.py | stishkin/onefuzz | eca88cb35f60c30fe7a6dbfbc436be0f7ddc36c9 | [
"MIT"
] | null | null | null | src/utils/check-pr/check-pr.py | stishkin/onefuzz | eca88cb35f60c30fe7a6dbfbc436be0f7ddc36c9 | [
"MIT"
] | null | null | null | src/utils/check-pr/check-pr.py | stishkin/onefuzz | eca88cb35f60c30fe7a6dbfbc436be0f7ddc36c9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
import os
import subprocess
import tempfile
import time
import uuid
from typing import List, Optional
from cleanup_ad import delete_current_user_app_registrations
from .github_client import GithubClient
... | 33.224265 | 102 | 0.556269 |
7b840fb3a7d0f710ca637bddc658df2ae4e68ce0 | 10,410 | py | Python | src/tngsdk/package/tests/test_packager_onap.py | nandoooo/tng-sdk-package | ef1b6b4f6f7df95a7014f264437c4b2d14c1c1e9 | [
"Apache-2.0"
] | 7 | 2018-02-13T11:45:56.000Z | 2021-03-01T04:38:22.000Z | src/tngsdk/package/tests/test_packager_onap.py | nandoooo/tng-sdk-package | ef1b6b4f6f7df95a7014f264437c4b2d14c1c1e9 | [
"Apache-2.0"
] | 68 | 2018-02-13T12:26:04.000Z | 2019-08-21T08:00:19.000Z | src/tngsdk/package/tests/test_packager_onap.py | nandoooo/tng-sdk-package | ef1b6b4f6f7df95a7014f264437c4b2d14c1c1e9 | [
"Apache-2.0"
] | 8 | 2018-01-29T14:31:51.000Z | 2020-06-30T10:29:02.000Z | import unittest
import tempfile
import os
import zipfile
import yaml
from tngsdk.package.tests.fixtures import misc_file
from tngsdk.package.packager import PM
from tngsdk.package.packager.packager import NapdRecord
from tngsdk.package.packager.onap_packager import OnapPackager, OnapPackage,\
OnapPackageSet
from tn... | 42.145749 | 78 | 0.522574 |
78374e1b3e98504f8756969f866dd2ccf71bfaa3 | 3,030 | py | Python | pyLipsum/main.py | MajorcaDevs/pyLipsum | 943ca3dfea2b26df970e485ad089acc62b2c0b9a | [
"MIT"
] | 1 | 2020-01-11T18:12:11.000Z | 2020-01-11T18:12:11.000Z | pyLipsum/main.py | RaulWhite/pyLipsum | 943ca3dfea2b26df970e485ad089acc62b2c0b9a | [
"MIT"
] | 3 | 2020-01-10T20:22:20.000Z | 2020-01-19T23:58:32.000Z | pyLipsum/main.py | MajorcaDevs/pyLipsum | 943ca3dfea2b26df970e485ad089acc62b2c0b9a | [
"MIT"
] | 1 | 2020-01-10T21:22:39.000Z | 2020-01-10T21:22:39.000Z | from random import choice, randint
import logging
# Import dictionaries
from dicts.chiquitoDict import chiquitoDict
from dicts.ipsumDict import ipsumDict
logging.basicConfig(format='\n%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
def ipsum(dict: classmethod, numParags: int, lorem: bool):... | 46.615385 | 113 | 0.511551 |
75adafebb74211f8c6f76867e4e852dff0ab5263 | 867 | py | Python | wikidata_panglaodb/similarity.py | jvfe/wikidata_panglaodb | a1dd854393c9c81229dcf639d62fb758cf145973 | [
"BSD-2-Clause"
] | 1 | 2020-11-12T21:28:34.000Z | 2020-11-12T21:28:34.000Z | wikidata_panglaodb/similarity.py | jvfe/wikidata_panglaodb | a1dd854393c9c81229dcf639d62fb758cf145973 | [
"BSD-2-Clause"
] | 2 | 2020-09-16T21:09:36.000Z | 2020-12-25T19:02:41.000Z | wikidata_panglaodb/similarity.py | jvfe/wikidata_panglaodb | a1dd854393c9c81229dcf639d62fb758cf145973 | [
"BSD-2-Clause"
] | null | null | null | """Similarity checking functions"""
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
def get_string_match(string1, string2):
"""Checks if the stemmed version of two strings is the same
Sometimes matches from the reconciliation service return as false since
the item has fe... | 29.896552 | 83 | 0.696655 |
394e39bf85a75912913d3a8f0d2ecad08312f458 | 1,360 | py | Python | galaxy/main/migrations/0085_auto_20180328_1130.py | akaRem/galaxy | 567947171579fcdf7c0192316812ee0c59ccce6e | [
"Apache-2.0"
] | null | null | null | galaxy/main/migrations/0085_auto_20180328_1130.py | akaRem/galaxy | 567947171579fcdf7c0192316812ee0c59ccce6e | [
"Apache-2.0"
] | null | null | null | galaxy/main/migrations/0085_auto_20180328_1130.py | akaRem/galaxy | 567947171579fcdf7c0192316812ee0c59ccce6e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-28 15:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0084_content_block_update'),
]
operations = [
migrations.AlterFiel... | 52.307692 | 656 | 0.641912 |
ed1cfa8d32e0712d1a1ff607fe8cbd7ae2f2066a | 149 | py | Python | main.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | main.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | main.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | import okama as ok
ls3 = ['MCFTR.INDX', 'RGBITR.INDX', 'GC.COMM']
y = ok.EfficientFrontier(assets=ls3, ccy='USD', n_points=10)
print(y.mdp_points)
| 21.285714 | 60 | 0.697987 |
fd9981ed6b88bb7edffbbd376d4ac53bccc3bc83 | 19,917 | py | Python | mars/tensor/execution/tests/test_reduction_execute.py | lmatz/mars | 45f9166b54eb91b21e66cef8b590a41aa8ac9569 | [
"Apache-2.0"
] | 1 | 2018-12-26T08:37:04.000Z | 2018-12-26T08:37:04.000Z | mars/tensor/execution/tests/test_reduction_execute.py | lmatz/mars | 45f9166b54eb91b21e66cef8b590a41aa8ac9569 | [
"Apache-2.0"
] | null | null | null | mars/tensor/execution/tests/test_reduction_execute.py | lmatz/mars | 45f9166b54eb91b21e66cef8b590a41aa8ac9569 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 39.754491 | 110 | 0.638199 |
5c4219bacb246d4bb9aff78a308c2750f63459a1 | 3,357 | py | Python | tests/objects/guild/test_guild.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 118 | 2021-08-30T15:00:47.000Z | 2022-03-31T11:06:16.000Z | tests/objects/guild/test_guild.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 343 | 2021-08-30T12:25:57.000Z | 2022-03-31T07:02:11.000Z | tests/objects/guild/test_guild.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 62 | 2021-08-31T22:30:20.000Z | 2022-03-25T18:29:11.000Z | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
from pincer.objects import Guild, Emoji, Channel, Role
FAKE_GUILD = {
'id': '0',
'name': 'test-server',
'features': [],
'emojis': [
{'name': 'test-emoji',
'roles': [],
'id': '0',... | 25.625954 | 65 | 0.443551 |
6ecf24c086f49ce87a33a1a1ebfeabed59f9ae50 | 1,241 | py | Python | variational/utils.py | pytorchbearer/variational | c9f700e308211c52322bb424a8414ea11eab79a4 | [
"MIT"
] | 3 | 2019-06-05T09:24:33.000Z | 2019-08-13T00:53:40.000Z | variational/utils.py | pytorchbearer/variational | c9f700e308211c52322bb424a8414ea11eab79a4 | [
"MIT"
] | null | null | null | variational/utils.py | pytorchbearer/variational | c9f700e308211c52322bb424a8414ea11eab79a4 | [
"MIT"
] | null | null | null | import sys
if sys.version_info[0] < 3:
def set_doc(inner, doc):
return None # Not simple to do in Python 2.7 so we can leave it for now, just build docs with Python 3+
else:
def set_doc(inner, doc):
inner.__doc__ = doc
def cite(bibtex):
"""A decorator which adds a reference to the **Google... | 31.025 | 114 | 0.5278 |
8a8dbbbefddebb4ef42febb92ddfd25f39ed2f4f | 81 | py | Python | tests/test_pymautic.py | danimaribeiro/py-mautic | 0f821fb8c356bc40581a331897ee2a406e2a6070 | [
"BSD-2-Clause"
] | 4 | 2016-05-16T23:24:56.000Z | 2018-03-19T09:04:40.000Z | tests/test_pymautic.py | danimaribeiro/py-mautic | 0f821fb8c356bc40581a331897ee2a406e2a6070 | [
"BSD-2-Clause"
] | null | null | null | tests/test_pymautic.py | danimaribeiro/py-mautic | 0f821fb8c356bc40581a331897ee2a406e2a6070 | [
"BSD-2-Clause"
] | null | null | null |
import pymautic
def test_main():
assert pymautic # use your library here
| 11.571429 | 44 | 0.716049 |
0bc16d4f9423477a4b8111c3f7dd262716cd7569 | 3,919 | py | Python | sectors/module/file2ws.py | vantagecrypto/OV_Data_Bridge | b09f58e9c4664fa9842eead95b3e54a8027870e2 | [
"MIT"
] | null | null | null | sectors/module/file2ws.py | vantagecrypto/OV_Data_Bridge | b09f58e9c4664fa9842eead95b3e54a8027870e2 | [
"MIT"
] | null | null | null | sectors/module/file2ws.py | vantagecrypto/OV_Data_Bridge | b09f58e9c4664fa9842eead95b3e54a8027870e2 | [
"MIT"
] | null | null | null | import _thread as thread
import time
from datetime import datetime
import json
from . import common, log
from sectors.common import admin_config
from db.models import (
TBLBridge
)
class Bridge:
"""
File to WebSocket Data Bridge
"""
def __init__(self, bridge_info):
self.bridge_info = b... | 29.466165 | 112 | 0.588415 |
ebed391c84fa09177eb7bd1a41a43decf14a1d19 | 1,117 | py | Python | tests/resources.py | lukasbindreiter/white-brush | 67e5dcda8043f2d7bba440bcb9a84c2fa85ec9ba | [
"MIT"
] | 3 | 2018-04-27T23:04:04.000Z | 2019-11-01T02:54:45.000Z | tests/resources.py | lukasbindreiter/white-brush | 67e5dcda8043f2d7bba440bcb9a84c2fa85ec9ba | [
"MIT"
] | 33 | 2018-04-29T15:12:29.000Z | 2022-01-19T21:44:19.000Z | tests/resources.py | lukasbindreiter/white-brush | 67e5dcda8043f2d7bba440bcb9a84c2fa85ec9ba | [
"MIT"
] | 2 | 2018-06-16T17:09:25.000Z | 2020-01-14T01:23:34.000Z | import os
from typing import Tuple, Iterator
import numpy as np
from white_brush.io import read_image
def get_test_image() -> Tuple[str, np.ndarray]:
"""
Return the name and the data of the first image in the `test_images`
directory
Usage example:
>>> img_name, img = get_test_image()
>>> im... | 22.34 | 72 | 0.656222 |
0ae380aaeb8ec5de4b8fe769802de9caa364ea52 | 1,463 | py | Python | Game_Life/env/lib/python3.7/site-packages/pygame/tests/sysfont_test.py | munoztd0/AI_games | de2a45b1a68b26b21b8efbc140c679b5ff90cb9a | [
"MIT"
] | 1 | 2022-03-03T05:13:14.000Z | 2022-03-03T05:13:14.000Z | Game_Life/env/lib/python3.7/site-packages/pygame/tests/sysfont_test.py | munoztd0/AI_games | de2a45b1a68b26b21b8efbc140c679b5ff90cb9a | [
"MIT"
] | null | null | null | Game_Life/env/lib/python3.7/site-packages/pygame/tests/sysfont_test.py | munoztd0/AI_games | de2a45b1a68b26b21b8efbc140c679b5ff90cb9a | [
"MIT"
] | null | null | null | import unittest
import platform
class SysfontModuleTest(unittest.TestCase):
def test_create_aliases(self):
import pygame.sysfont
pygame.sysfont.initsysfonts()
pygame.sysfont.create_aliases()
self.assertTrue(len(pygame.sysfont.Sysalias) > 0)
def test_initsysfonts(self):
... | 28.134615 | 82 | 0.628161 |
0137cf6f12cff84a9b196c2559977b4bd185128c | 8,748 | py | Python | tools/dataset_converters/preprocess_with_clip_bbox.py | wusize/mmdetection | c167fb1af78d910d9a8304ad2a2e6ddd32c70281 | [
"Apache-2.0"
] | null | null | null | tools/dataset_converters/preprocess_with_clip_bbox.py | wusize/mmdetection | c167fb1af78d910d9a8304ad2a2e6ddd32c70281 | [
"Apache-2.0"
] | null | null | null | tools/dataset_converters/preprocess_with_clip_bbox.py | wusize/mmdetection | c167fb1af78d910d9a8304ad2a2e6ddd32c70281 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn.functional as F
from mmdet.datasets import build_dataloader, DATASETS
from mmdet.models import clip
from tqdm import tqdm
import matplotlib.pyplot as plt
import os
from mmcv.ops import roi_align
import argparse
CLASSES = ('person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus',
... | 43.093596 | 112 | 0.616141 |
53bdf2b662c02b991e5c25a7af758dce7940dc6f | 10,249 | py | Python | aerich/cli.py | yusukefs/aerich | 919d56c936a45fab57ad32ee01b1631177bca235 | [
"Apache-2.0"
] | null | null | null | aerich/cli.py | yusukefs/aerich | 919d56c936a45fab57ad32ee01b1631177bca235 | [
"Apache-2.0"
] | null | null | null | aerich/cli.py | yusukefs/aerich | 919d56c936a45fab57ad32ee01b1631177bca235 | [
"Apache-2.0"
] | null | null | null | import asyncio
import os
from configparser import ConfigParser
from functools import wraps
from pathlib import Path
from typing import List
import click
from click import Context, UsageError
from tortoise import Tortoise, generate_schema_for_client
from tortoise.exceptions import OperationalError
from tortoise.transac... | 31.829193 | 102 | 0.669431 |
790edeae3cebe9f07d21898f2b3d872ed481a19f | 5,793 | py | Python | train.py | stroblme/hqsp-main | add585604912f0dec6d02118d4643435525a8df1 | [
"MIT"
] | null | null | null | train.py | stroblme/hqsp-main | add585604912f0dec6d02118d4643435525a8df1 | [
"MIT"
] | null | null | null | train.py | stroblme/hqsp-main | add585604912f0dec6d02118d4643435525a8df1 | [
"MIT"
] | null | null | null | import sys
sys.path.append("./stqft")
sys.path.append("./qcnn")
import os
#Activate the cuda env
os.environ["LD_LIBRARY_PATH"] = "$LD_LIBRARY_PATH:/usr/local/cuda/lib64/:/usr/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda-11.2/lib64:/usr/local/cuda/targets/x86_64-linux/lib/"
import time
import multiprocess... | 42.595588 | 268 | 0.669256 |
232e24dd9b77c3ac3bb95d26721dda0ad49e7e9c | 3,330 | py | Python | sm64ex-nightly/tools/util/generate_audiofile_cpp.py | alex-free/sm64ex-creator | e7089df69fb43f266b2165078d94245b33b8e72a | [
"Intel",
"X11",
"Unlicense"
] | 2 | 2022-03-12T08:27:53.000Z | 2022-03-12T18:26:06.000Z | sm64ex-nightly/tools/util/generate_audiofile_cpp.py | alex-free/sm64ex-creator | e7089df69fb43f266b2165078d94245b33b8e72a | [
"Intel",
"X11",
"Unlicense"
] | null | null | null | sm64ex-nightly/tools/util/generate_audiofile_cpp.py | alex-free/sm64ex-creator | e7089df69fb43f266b2165078d94245b33b8e72a | [
"Intel",
"X11",
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os
import re
import sys
file_list = [
'Features.h',
'Compiler.h',
'error.h',
'extended.h',
'compression.h',
'aupvinternal.h',
'aupvlist.h',
'audiofile.h',
'afinternal.h',
'byteorder.h',
'AudioFormat.h',
'debug.h',
'util.h',
'units.h'... | 24.306569 | 114 | 0.592793 |
aac1f58291f84ce1b9db5fa70e3881ba8daad42b | 1,322 | py | Python | app/tests/api/test_forms.py | hndrewaall/league | 13737b4d0c6c813dbf125db8a57f48e5b3acd8fa | [
"MIT"
] | 4 | 2017-01-26T17:51:16.000Z | 2021-06-05T14:26:22.000Z | app/tests/api/test_forms.py | hndrewaall/league | 13737b4d0c6c813dbf125db8a57f48e5b3acd8fa | [
"MIT"
] | 190 | 2016-11-27T19:34:23.000Z | 2020-02-10T17:17:39.000Z | app/tests/api/test_forms.py | hndrewaall/league | 13737b4d0c6c813dbf125db8a57f48e5b3acd8fa | [
"MIT"
] | 14 | 2016-11-27T18:34:03.000Z | 2021-10-09T16:04:26.000Z | # -*- coding: utf-8 -*-
"""Test forms."""
import pytest
from league.dashboard.forms import GameCreateForm
class TestGameCreateForm:
"""Game create form."""
@pytest.mark.parametrize('winner', ['white', 'black'])
@pytest.mark.parametrize('handicap', [0, 8])
@pytest.mark.parametrize('komi', [0, 7])
... | 38.882353 | 78 | 0.553707 |
790292a54e8eb8cdf5d33f844f48868af3da1b12 | 11,103 | py | Python | plotly_study/graph_objs/streamtube/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/graph_objs/streamtube/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | plotly_study/graph_objs/streamtube/hoverlabel/__init__.py | lucasiscovici/plotly_py | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | [
"MIT"
] | null | null | null | from plotly_study.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#f... | 34.268519 | 88 | 0.565973 |
75c9f4da20ffb98f77fece5d0c996890435b0ee6 | 2,307 | py | Python | backend/ideapros_llc_pop_st_32583/urls.py | crowdbotics-apps/ideapros-llc-pop-st-32583 | 544441bdbe62fad9416c4a302672c0b994682e33 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_pop_st_32583/urls.py | crowdbotics-apps/ideapros-llc-pop-st-32583 | 544441bdbe62fad9416c4a302672c0b994682e33 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_pop_st_32583/urls.py | crowdbotics-apps/ideapros-llc-pop-st-32583 | 544441bdbe62fad9416c4a302672c0b994682e33 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """ideapros_llc_pop_st_32583 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='... | 36.619048 | 87 | 0.713481 |
890d90b04a0f77e7bfb4de79616a922be9f292a0 | 1,322 | py | Python | h2o-py/tests/testdir_munging/unop/pyunit_scale.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-py/tests/testdir_munging/unop/pyunit_scale.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-py/tests/testdir_munging/unop/pyunit_scale.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
def center_scale():
iris = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris.csv"))[0:4]
# frame (default args)
foo = iris.scale()
# TODO: the below assertion fails. Should it?
#assert ab... | 26.979592 | 123 | 0.599092 |
54b1dedf5899db45ee3264e1bae8bddb8b4048d4 | 2,582 | py | Python | TDS_Image_Proj/code/process_image_dir.py | Tulsa-Data-Science/Playground | 0a2fbc9a321db2a5147959f405bd5af7ad2848c3 | [
"MIT"
] | 3 | 2018-05-07T23:48:36.000Z | 2018-08-30T00:14:37.000Z | TDS_Image_Proj/code/process_image_dir.py | Tulsa-Data-Science/Playground | 0a2fbc9a321db2a5147959f405bd5af7ad2848c3 | [
"MIT"
] | 2 | 2018-04-23T23:52:32.000Z | 2018-06-06T06:03:10.000Z | TDS_Image_Proj/code/process_image_dir.py | Tulsa-Data-Science/Playground | 0a2fbc9a321db2a5147959f405bd5af7ad2848c3 | [
"MIT"
] | 10 | 2018-04-22T21:44:09.000Z | 2018-06-26T00:17:54.000Z | #!/usr/bin/env python
import cv2
import glob
import numpy as np
import os
from PIL import Image
import sys
def processDir(input_dir):
# iterate through the files in the input directory with a '.jpg' extension
# and skip anything with oldformat in its path
for img in glob.iglob(input_dir + '/*/*.jpg'):
if 'oldfor... | 30.376471 | 119 | 0.672734 |
5f0c050146a72c256ac032a96b88571c08022d64 | 1,772 | py | Python | source/_sample/pyopengl/program_manager.py | showa-yojyo/notebook | 82c15074c24d64a1dfcb70a526bc1deb2ecffe68 | [
"MIT"
] | 14 | 2016-04-13T08:10:02.000Z | 2021-04-19T09:42:51.000Z | source/_sample/pyopengl/program_manager.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | 88 | 2017-09-27T15:07:05.000Z | 2019-10-02T04:05:03.000Z | source/_sample/pyopengl/program_manager.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""program_manager.py: Define class ProgramManager.
"""
import OpenGL.GL as GL
class ProgramManager(object):
"""OpenGL shader program manager.
This class managers a program object and its shader objects.
"""
def __init__(self):
"""Initialize an instance of class ProgramM... | 30.551724 | 80 | 0.638826 |
e395f22d7ee63ed66e41922858b949d73de6f668 | 12,144 | py | Python | mvn/datasets/human36m.py | QuPengfei/learnable-triangulation-pytorch | 861d9ccf8b06bd2f130697cd40b7ac57d7f7d9f2 | [
"MIT"
] | 914 | 2019-05-15T10:54:09.000Z | 2022-03-24T19:20:33.000Z | mvn/datasets/human36m.py | QuPengfei/learnable-triangulation-pytorch | 861d9ccf8b06bd2f130697cd40b7ac57d7f7d9f2 | [
"MIT"
] | 129 | 2019-06-08T08:43:42.000Z | 2021-08-03T02:52:12.000Z | mvn/datasets/human36m.py | QuPengfei/learnable-triangulation-pytorch | 861d9ccf8b06bd2f130697cd40b7ac57d7f7d9f2 | [
"MIT"
] | 166 | 2019-05-17T03:05:01.000Z | 2022-03-10T18:02:18.000Z | import os
from collections import defaultdict
import pickle
import numpy as np
import cv2
import torch
from torch.utils.data import Dataset
from mvn.utils.multiview import Camera
from mvn.utils.img import get_square_bbox, resize_image, crop_image, normalize_image, scale_bbox
from mvn.utils import volumetric
class ... | 44.321168 | 140 | 0.615777 |
93d31b57e11df0cbb469a2ea87c01cd62fa1c1d4 | 2,286 | py | Python | stubs/micropython-v1_13-esp32/uos.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_13-esp32/uos.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | stubs/micropython-v1_13-esp32/uos.py | mattytrentini/micropython-stubs | 4d596273823b69e9e5bcf5fa67f249c374ee0bbc | [
"MIT"
] | null | null | null | """
Module: 'uos' on micropython-v1.13-266-esp32
"""
# MCU: {'ver': 'v1.13-266', 'port': 'esp32', 'arch': 'xtensawin', 'sysname': 'esp32', 'release': '1.13.0', 'name': 'micropython', 'mpy': 10757, 'version': '1.13.0', 'machine': 'ESP32 module (spiram) with ESP32', 'build': '266', 'nodename': 'esp32', 'platform': 'esp32... | 14.56051 | 294 | 0.451006 |
9243feb24e24bbc02065fe51884824955c6d22ec | 2,067 | py | Python | modules/pytket-cirq/setup.py | isobelhooper/pytket-extensions | 53e1f40844fff29814a599d70a61963c27f094f2 | [
"Apache-2.0"
] | null | null | null | modules/pytket-cirq/setup.py | isobelhooper/pytket-extensions | 53e1f40844fff29814a599d70a61963c27f094f2 | [
"Apache-2.0"
] | null | null | null | modules/pytket-cirq/setup.py | isobelhooper/pytket-extensions | 53e1f40844fff29814a599d70a61963c27f094f2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 36.263158 | 83 | 0.685051 |
e7927438d5930b243ad6f6a9a3a53bcdc215fe29 | 27,068 | py | Python | QUANTAXIS/QACmd/__init__.py | nuswgg/QUANTAXIS | ccdb6116e1974f3a7c9d0e6635060bfb7f149b88 | [
"MIT"
] | 3 | 2020-10-20T07:48:52.000Z | 2022-02-11T05:47:34.000Z | QUANTAXIS/QACmd/__init__.py | nuswgg/QUANTAXIS | ccdb6116e1974f3a7c9d0e6635060bfb7f149b88 | [
"MIT"
] | null | null | null | QUANTAXIS/QACmd/__init__.py | nuswgg/QUANTAXIS | ccdb6116e1974f3a7c9d0e6635060bfb7f149b88 | [
"MIT"
] | 1 | 2020-03-10T11:01:25.000Z | 2020-03-10T11:01:25.000Z | # encoding: UTF-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2019 yutiansut/QUANTAXIS
#
# 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... | 42.761453 | 134 | 0.549394 |
e540b434096f8f26f82c04b0b20b95f1132384eb | 9,234 | py | Python | notion/markdown.py | esnaultdev/notion-py | a6541fc5ae209885fbcbc7e023b1e68a0f213c96 | [
"MIT"
] | 1 | 2021-04-14T13:57:53.000Z | 2021-04-14T13:57:53.000Z | notion/markdown.py | onyxim/notion-py | afa9baeabdabc58849a6d8b80f3b0df12f7cfa27 | [
"MIT"
] | null | null | null | notion/markdown.py | onyxim/notion-py | afa9baeabdabc58849a6d8b80f3b0df12f7cfa27 | [
"MIT"
] | null | null | null | import commonmark
import re
import html
from xml.dom import minidom
from commonmark.dump import prepare
delimiters = {
"!",
'"',
"#",
"$",
"%",
"&",
"'",
"(",
")",
"*",
"+",
",",
"-",
".",
"/",
":",
";",
"<",
"=",
">",
"?",
"@",
... | 26.610951 | 120 | 0.507797 |
bd2bc694699f6f1209aaa8da21fa1af19f26395a | 1,504 | py | Python | tests/test_map3d.py | zkytony/thortils | 07ddfa6f6d09662094ba39343f89ba124c250e03 | [
"MIT"
] | null | null | null | tests/test_map3d.py | zkytony/thortils | 07ddfa6f6d09662094ba39343f89ba124c250e03 | [
"MIT"
] | null | null | null | tests/test_map3d.py | zkytony/thortils | 07ddfa6f6d09662094ba39343f89ba124c250e03 | [
"MIT"
] | null | null | null | import time
import thortils as tt
from thortils import constants
from thortils.controller import launch_controller, thor_controller_param
from thortils.map3d import Map3D, Mapper3D
from thortils.utils.visual import GridMapVisualizer
from thortils.agent import thor_reachable_positions
def test_mapper(scene, floor_cut=... | 32 | 76 | 0.729388 |
46001615dcae8007152b34c028b27d63999abc85 | 2,509 | py | Python | icon_validator/rules/plugin_validators/icon_validator.py | rapid7/icon-integrations-validators | 673e588f8c6aa02bdb6c5e82556fdc59fe3a7280 | [
"MIT"
] | 6 | 2020-11-10T03:07:00.000Z | 2022-02-24T18:07:57.000Z | icon_validator/rules/plugin_validators/icon_validator.py | rapid7/icon-integrations-validators | 673e588f8c6aa02bdb6c5e82556fdc59fe3a7280 | [
"MIT"
] | 17 | 2020-01-21T16:02:04.000Z | 2022-01-12T15:11:26.000Z | icon_validator/rules/plugin_validators/icon_validator.py | rapid7/icon-integrations-validators | 673e588f8c6aa02bdb6c5e82556fdc59fe3a7280 | [
"MIT"
] | 2 | 2020-12-26T11:33:23.000Z | 2021-09-30T22:22:43.000Z | import os
from pathlib import Path
import filetype
from icon_validator.rules.validator import KomandPluginValidator
from icon_validator.exceptions import ValidationException
class IconValidator(KomandPluginValidator):
def validate(self, plugin_spec):
"""Base64 matches icon file valid base64, <=70kb in ... | 38.015152 | 132 | 0.704265 |
e0d24bdd7d77fa38bc7454aae4f74dcd800899c5 | 265 | py | Python | mumbaihackathon_in/mumbai_hackathon/doctype/team_project_url/team_project_url.py | Mumbaikar007/mumbaihackathon_in | 261a4340862cb884dca0a6b0a513da47ba26caa6 | [
"MIT"
] | null | null | null | mumbaihackathon_in/mumbai_hackathon/doctype/team_project_url/team_project_url.py | Mumbaikar007/mumbaihackathon_in | 261a4340862cb884dca0a6b0a513da47ba26caa6 | [
"MIT"
] | null | null | null | mumbaihackathon_in/mumbai_hackathon/doctype/team_project_url/team_project_url.py | Mumbaikar007/mumbaihackathon_in | 261a4340862cb884dca0a6b0a513da47ba26caa6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Neil Lasrado and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class TeamProjectURL(Document):
pass
| 24.090909 | 51 | 0.777358 |
1d12e18406e5d771ad6ce49de3f060b5d87959a1 | 789 | py | Python | var/spack/repos/builtin/packages/r-kknn/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/r-kknn/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/r-kknn/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 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 RKknn(RPackage):
"""Weighted k-Nearest Neighbors for Classification, Regression and
Cl... | 35.863636 | 95 | 0.703422 |
d4721f47df851152506797fb9590416b4212bcb1 | 2,805 | py | Python | houdini/houdini_client/auth_backend.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | 2 | 2017-09-25T00:30:22.000Z | 2021-02-04T22:11:54.000Z | houdini/houdini_client/auth_backend.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | 11 | 2016-12-29T22:05:57.000Z | 2020-06-05T17:23:10.000Z | houdini/houdini_client/auth_backend.py | TrianglePlusPlus/houdini | 292b1fb395fc34dbefa8f891cc94bb811f5805bb | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import check_password
from django.utils import timezone
from datetime import datetime
from enum import Enum
import jwt
import pytz
import requests
User... | 33.795181 | 98 | 0.621747 |
8d01cc69680492c531089f17afbbed11eff02948 | 4,284 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 26.121951 | 136 | 0.709617 |
912622f2c7b1b67e32e16a1c2e4e4074211af43f | 385 | py | Python | textattack/models/helpers/__init__.py | chong-z/TextAttack | 9842160b558db2118365770029be70782327a40a | [
"MIT"
] | null | null | null | textattack/models/helpers/__init__.py | chong-z/TextAttack | 9842160b558db2118365770029be70782327a40a | [
"MIT"
] | null | null | null | textattack/models/helpers/__init__.py | chong-z/TextAttack | 9842160b558db2118365770029be70782327a40a | [
"MIT"
] | null | null | null | # Helper stuff, like embeddings.
from . import utils
from .glove_embedding_layer import GloveEmbeddingLayer, GloveLikeEmbeddingLayer
# Helper modules.
from .bert_for_classification import BERTForClassification
from .lstm_for_classification import LSTMForClassification
from .t5_for_text_to_text import T5ForTextToText
f... | 38.5 | 79 | 0.880519 |
ffb0acac5b902323e7bbc9998c59f8fbe916f5ac | 3,443 | py | Python | simpleTest.py | egerland/masters | 410fd5c877e8f981f0fbbc5f7ee1506d6517dc8d | [
"MIT"
] | null | null | null | simpleTest.py | egerland/masters | 410fd5c877e8f981f0fbbc5f7ee1506d6517dc8d | [
"MIT"
] | null | null | null | simpleTest.py | egerland/masters | 410fd5c877e8f981f0fbbc5f7ee1506d6517dc8d | [
"MIT"
] | null | null | null | # Copyright 2006-2017 Coppelia Robotics GmbH. All rights reserved.
# marc@coppeliarobotics.com
# www.coppeliarobotics.com
#
# -------------------------------------------------------------------
# THIS FILE IS DISTRIBUTED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTY. THE USER WILL USE IT AT HIS/HER OWN RISK. THE... | 43.582278 | 159 | 0.674121 |
d50b45d41a1ab378540be0be78746402bbe27ead | 335 | py | Python | build/catkin_generated/order_packages.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | 1 | 2021-11-08T12:24:24.000Z | 2021-11-08T12:24:24.000Z | build/catkin_generated/order_packages.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | null | null | null | build/catkin_generated/order_packages.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/order_packages.context.py.in
source_root_dir = '/home/pls/ydlidar_ws/src'
whitelisted_packages = ''.split(';') if '' != '' else []
blacklisted_packages = ''.split(';') if '' != '' else []
underlay_workspaces = '/home/pls/ydlidar_ws/devel'.split(';') if '/home/pls/ydlidar_ws/devel'... | 55.833333 | 107 | 0.680597 |
8bf6ceddcc5dd49d53e934dbcb22f8cb5b0c02a2 | 1,645 | py | Python | internal/notes/builtin-SAVE/packages/scons/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/scons/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/scons/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 42.179487 | 78 | 0.669909 |
bcf5dabbb48a04f3db5a9d99101d7e39ffe2e031 | 544 | py | Python | awards/form.py | UmurerwaDivine/Awards | 7017466033fda36b3de6aa2e8d130f1b9e9ac9b8 | [
"MIT"
] | null | null | null | awards/form.py | UmurerwaDivine/Awards | 7017466033fda36b3de6aa2e8d130f1b9e9ac9b8 | [
"MIT"
] | null | null | null | awards/form.py | UmurerwaDivine/Awards | 7017466033fda36b3de6aa2e8d130f1b9e9ac9b8 | [
"MIT"
] | null | null | null | from django import forms
from .models import Profile,Pic
from django.contrib.auth.forms import AuthenticationForm
class ProfileForm(forms.ModelForm):
model = Profile
username = forms.CharField(label='Username',max_length = 30)
bio = forms.CharField(label='Image Caption',max_length=500)
profile_pic = forms.ImageF... | 22.666667 | 61 | 0.746324 |
5ffdba068d9a031f0114ea29ef5212e208459cb3 | 450 | py | Python | nmtpytorch/layers/__init__.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | null | null | null | nmtpytorch/layers/__init__.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | null | null | null | nmtpytorch/layers/__init__.py | toshohirasawa/mmt-with-monolingual-data | 3f80f3a1807e1a837ef82d75917c1cf581270b84 | [
"MIT"
] | 1 | 2020-07-22T19:25:53.000Z | 2020-07-22T19:25:53.000Z | # Basic layers
from .ff import FF
from .fusion import Fusion
from .flatten import Flatten
from .seq_conv import SequenceConvolution
from .rnninit import RNNInitializer
from .max_margin import MaxMargin
from .embedding import get_partial_embedding_layer
# Attention layers
from .attention import *
# ZSpace layers
from ... | 20.454545 | 50 | 0.806667 |
5a0d30a2da75ed965b105d380213ae523e46f906 | 4,584 | py | Python | oauth_dropins/dropbox.py | ravenscroftj/oauth-dropins | 59cc4bfc8157142249c5eb561b1f665da560e6c1 | [
"Unlicense"
] | null | null | null | oauth_dropins/dropbox.py | ravenscroftj/oauth-dropins | 59cc4bfc8157142249c5eb561b1f665da560e6c1 | [
"Unlicense"
] | null | null | null | oauth_dropins/dropbox.py | ravenscroftj/oauth-dropins | 59cc4bfc8157142249c5eb561b1f665da560e6c1 | [
"Unlicense"
] | null | null | null | """Dropbox OAuth drop-in.
Standard OAuth 2.0 flow. Docs:
https://www.dropbox.com/developers/documentation/http/overview
https://www.dropbox.com/developers/documentation/http/documentation#authorization
"""
import logging
import urllib.parse, urllib.request
from flask import request
from google.cloud import ndb
from ... | 30.357616 | 84 | 0.694154 |
51289fc4b8d99cdb7ba2a921b856a287be29b95c | 7,398 | py | Python | core/modules/models/seg/deeplab/decoder.py | FelixFu520/DAO | ac30bad4503408e771bc28c77dd8a20c18c15a05 | [
"MIT"
] | null | null | null | core/modules/models/seg/deeplab/decoder.py | FelixFu520/DAO | ac30bad4503408e771bc28c77dd8a20c18c15a05 | [
"MIT"
] | null | null | null | core/modules/models/seg/deeplab/decoder.py | FelixFu520/DAO | ac30bad4503408e771bc28c77dd8a20c18c15a05 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author:FelixFu
# @Date: 2021.4.14
# @GitHub:https://github.com/felixfu520
# @Copy From:
"""
BSD 3-Clause License
Copyright (c) Soumith Chintala 2016,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following... | 33.627273 | 94 | 0.62206 |
522765b438d4b64650ddaffd86f5a23d58c0f190 | 894 | py | Python | plugins/20.py | akhialomgir/auto-derby | 94248ed70e8d83920ca93b62329bccb58bdc78ae | [
"MIT"
] | null | null | null | plugins/20.py | akhialomgir/auto-derby | 94248ed70e8d83920ca93b62329bccb58bdc78ae | [
"MIT"
] | null | null | null | plugins/20.py | akhialomgir/auto-derby | 94248ed70e8d83920ca93b62329bccb58bdc78ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
import auto_derby
from auto_derby import single_mode, mathtools
class Training(single_mode.Training):
def score(self, ctx: single_mode.Context) -> float:
success_rate = mathtools.interpolate(
int(ctx.vitality * 10000),
(
... | 22.35 | 63 | 0.493289 |
25f56fd853fc6ed52990b5af57aabba6a18ed6df | 704 | py | Python | app/events/client/commands/renameAll.py | Hacker-1202/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 14 | 2021-11-05T11:27:25.000Z | 2022-02-28T02:04:32.000Z | app/events/client/commands/renameAll.py | CssHammer/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 2 | 2022-01-24T22:00:44.000Z | 2022-01-31T13:13:27.000Z | app/events/client/commands/renameAll.py | CssHammer/Selfium | 7e798c23c9f24aacab6f6a485d6355f1045bc65c | [
"MIT"
] | 5 | 2022-01-02T13:33:17.000Z | 2022-02-26T13:09:50.000Z | import discord
import asyncio
from discord.ext import commands
from app.vars.client import client
from app.helpers import Notify
from app.filesystem import ignore
@client.command()
@commands.guild_only()
@commands.has_permissions(manage_nicknames=True)
async def renameAll(ctx, *, nick: str):
notify = Notify(ctx=c... | 30.608696 | 89 | 0.72017 |
0cc81fb810176cad0758a62dcf12de8793946109 | 37,768 | py | Python | heat/rpc/client.py | steveb/heat | e5202ef4540887386c4cde10449d97611f90d927 | [
"Apache-2.0"
] | 1 | 2015-12-18T21:46:55.000Z | 2015-12-18T21:46:55.000Z | heat/rpc/client.py | steveb/heat | e5202ef4540887386c4cde10449d97611f90d927 | [
"Apache-2.0"
] | null | null | null | heat/rpc/client.py | steveb/heat | e5202ef4540887386c4cde10449d97611f90d927 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 45.834951 | 79 | 0.558092 |
37b688f3902462b53ad80ad2d77cbe26e2f0b2cb | 730 | py | Python | final_project/server.py | thisdotthis/xzceb-flask_eng_fr | 0a385fe9ba5fdf0e7cf284259bf0d65e44f5815a | [
"Apache-2.0"
] | null | null | null | final_project/server.py | thisdotthis/xzceb-flask_eng_fr | 0a385fe9ba5fdf0e7cf284259bf0d65e44f5815a | [
"Apache-2.0"
] | null | null | null | final_project/server.py | thisdotthis/xzceb-flask_eng_fr | 0a385fe9ba5fdf0e7cf284259bf0d65e44f5815a | [
"Apache-2.0"
] | null | null | null | from machinetranslation.translator import english_to_french, french_to_english
from flask import Flask, render_template, request
import json
app = Flask(__name__,template_folder='templates')
@app.route("/englishToFrench")
def englishToFrench():
textToTranslate = request.args.get('textToTranslate')
translatedT... | 29.2 | 78 | 0.769863 |
0326d0078bbb1b796ae4fad156dd6c8b7eb8efa0 | 1,976 | py | Python | examples/lammps/melting/lammps-4nodes.py | tpeterka/decaf | ad6ad823070793bfd7fc8d9384d5475f7cf20848 | [
"BSD-3-Clause"
] | 1 | 2019-05-10T02:50:50.000Z | 2019-05-10T02:50:50.000Z | examples/lammps/melting/lammps-4nodes.py | tpeterka/decaf | ad6ad823070793bfd7fc8d9384d5475f7cf20848 | [
"BSD-3-Clause"
] | 2 | 2020-10-28T03:44:51.000Z | 2021-01-18T19:49:33.000Z | examples/lammps/melting/lammps-4nodes.py | tpeterka/decaf | ad6ad823070793bfd7fc8d9384d5475f7cf20848 | [
"BSD-3-Clause"
] | 2 | 2018-08-31T14:02:47.000Z | 2020-04-17T16:01:54.000Z | # a small 4-node example
# input file
infile = 'in.melt'
# --- include the following 4 lines each time ---
import networkx as nx
import os
import imp
wf = imp.load_source('workflow', os.environ['DECAF_PREFIX'] + '/python/decaf.py')
# --- set your options here ---
# path to .so module for dataflow callback function... | 35.285714 | 112 | 0.682186 |
9f8d958020c4f04ba7e69f7e2a2509bc31f978c0 | 462 | py | Python | my/core/time.py | thetomcraig/HPI | 5eecd8721dc0cbfc68040106bb7b540b1567dff3 | [
"MIT"
] | null | null | null | my/core/time.py | thetomcraig/HPI | 5eecd8721dc0cbfc68040106bb7b540b1567dff3 | [
"MIT"
] | null | null | null | my/core/time.py | thetomcraig/HPI | 5eecd8721dc0cbfc68040106bb7b540b1567dff3 | [
"MIT"
] | null | null | null | from functools import lru_cache
from datetime import datetime, tzinfo
import pytz # type: ignore
# https://gist.github.com/edwardabraham/8680198
tz_lookup = {
pytz.timezone(x).localize(datetime.now()).tzname(): pytz.timezone(x)
for x in pytz.all_timezones
}
tz_lookup['UTC'] = pytz.utc # ugh. otherwise it'z Zu... | 25.666667 | 72 | 0.735931 |
90bde287e2ef4714327514da06e86d797ba92dcc | 6,608 | py | Python | tests/test_project.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 1,582 | 2015-01-05T02:41:44.000Z | 2022-03-30T20:03:22.000Z | tests/test_project.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 66 | 2015-01-23T07:58:04.000Z | 2021-11-12T02:23:27.000Z | tests/test_project.py | mubashshirjamal/code | d9c7adf7efed8e9c1ab3ff8cdeb94e7eb1a45382 | [
"BSD-3-Clause"
] | 347 | 2015-01-05T07:47:07.000Z | 2021-09-20T21:22:32.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
from datetime import datetime
from nose.tools import ok_
from tests.base import TestCase
from vilya.config import DOMAIN
from vilya.models.project import CodeDoubanProject
from vilya.libs.text import gravatar_url
from vilya.libs.permdir import... | 37.76 | 76 | 0.597306 |
3fcdc57906c214bdc8179c55b576e2e9e8d80973 | 19,611 | py | Python | python/paddle/fluid/tests/unittests/test_dist_base.py | tianjianhe/Paddle | 2b11c710b3dddf07873fefaaa3758349d2396e88 | [
"Apache-2.0"
] | 2 | 2019-04-03T05:36:17.000Z | 2020-04-29T03:38:54.000Z | python/paddle/fluid/tests/unittests/test_dist_base.py | tianjianhe/Paddle | 2b11c710b3dddf07873fefaaa3758349d2396e88 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_dist_base.py | tianjianhe/Paddle | 2b11c710b3dddf07873fefaaa3758349d2396e88 | [
"Apache-2.0"
] | 3 | 2019-01-07T06:50:29.000Z | 2019-03-13T08:48:23.000Z | # Copyright (c) 2018 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 app... | 36.249538 | 138 | 0.56866 |
2c2eabcc9b525cd6f26dce7620922e5abc941e5d | 1,588 | py | Python | processextra.py | juhokokkala/matern32-poisson-sde-stan | 9907b4697b2cc7c735776ba7577ecc5add1e33b5 | [
"MIT"
] | 1 | 2020-03-16T17:55:02.000Z | 2020-03-16T17:55:02.000Z | processextra.py | juhokokkala/matern32-poisson-sde-stan | 9907b4697b2cc7c735776ba7577ecc5add1e33b5 | [
"MIT"
] | null | null | null | processextra.py | juhokokkala/matern32-poisson-sde-stan | 9907b4697b2cc7c735776ba7577ecc5add1e33b5 | [
"MIT"
] | 1 | 2019-10-06T13:52:36.000Z | 2019-10-06T13:52:36.000Z | ################################################################################
# Copyright (C) 2016 Juho Kokkala
#
# This file is licensed under the MIT License.
################################################################################
"""Script for processing the results of the extra test about numeric errors... | 29.407407 | 80 | 0.515113 |
0bfee9a3caadd126a21565ba95e70e159c45b255 | 3,701 | py | Python | cekit/descriptor/image.py | crobby/cekit | 129aeeeb0eab6ff445c4a3dfe7b9be5d190cceb0 | [
"MIT"
] | null | null | null | cekit/descriptor/image.py | crobby/cekit | 129aeeeb0eab6ff445c4a3dfe7b9be5d190cceb0 | [
"MIT"
] | null | null | null | cekit/descriptor/image.py | crobby/cekit | 129aeeeb0eab6ff445c4a3dfe7b9be5d190cceb0 | [
"MIT"
] | null | null | null | import copy
import os
import yaml
from cekit.descriptor import Descriptor, Label, Env, Port, Run, Modules, \
Packages, Osbs, Volume, Resource, ExecuteContainer
from cekit.version import version as cekit_version
_image_schema = yaml.safe_load("""
map:
name: {type: str, required: True}
version: {type: text, req... | 40.67033 | 94 | 0.600919 |
20093b291281c6dc9c5554c762be6181e3967908 | 64,037 | py | Python | salt/transport/tcp.py | eiginn/salt | fae5bc757ad0f1716483ce7ae180b451545c2058 | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | salt/transport/tcp.py | eiginn/salt | fae5bc757ad0f1716483ce7ae180b451545c2058 | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | salt/transport/tcp.py | eiginn/salt | fae5bc757ad0f1716483ce7ae180b451545c2058 | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | """
TCP transport classes
Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})"
"""
import errno
import logging
import os
import queue
import socket
import threading
import time
import traceback
import urllib.parse
import salt.crypt
import salt.exceptions
import salt.ext.tornado
import salt.e... | 38.004154 | 107 | 0.554039 |
b1de66542e990852570d0825e181d49c32975991 | 48 | py | Python | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWidthAndPrecision_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | f'{1:.5d} {2:3.5d} {3:3d} {"spam":>20} {4:<#d}'
| 24 | 47 | 0.395833 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.