hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b984fb5f1bc2e6c00dc6e1c7dcc033b91b2aaf15 | 22,289 | py | Python | artssat/dashboard/__init__.py | simonpf/pARTS | b4d9f4c2ceac594273c5589e44fe6a3a4f8d7028 | [
"MIT"
] | 3 | 2020-09-02T08:20:42.000Z | 2020-12-18T17:19:38.000Z | artssat/dashboard/__init__.py | simonpf/pARTS | b4d9f4c2ceac594273c5589e44fe6a3a4f8d7028 | [
"MIT"
] | null | null | null | artssat/dashboard/__init__.py | simonpf/pARTS | b4d9f4c2ceac594273c5589e44fe6a3a4f8d7028 | [
"MIT"
] | null | null | null | import numpy as np
import threading
from bokeh import events
from bokeh.colors import RGB
from bokeh.server.server import Server
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHand... | 34.343606 | 90 | 0.493652 |
74b3c256178c0c68669fd2e5e0fde78ac0eb3268 | 4,007 | py | Python | demo.py | hujinxinb/FCHD_head_detect | 59e2b55d358e38ae6a3f2cf69403db7aef8016f9 | [
"MIT"
] | 1 | 2019-09-05T06:20:40.000Z | 2019-09-05T06:20:40.000Z | demo.py | hujinxinb/FCHD_head_detect | 59e2b55d358e38ae6a3f2cf69403db7aef8016f9 | [
"MIT"
] | 2 | 2019-04-29T05:56:32.000Z | 2019-10-31T16:29:36.000Z | demo.py | hujinxinb/FCHD_head_detect | 59e2b55d358e38ae6a3f2cf69403db7aef8016f9 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import cv2
import matplotlib as mpl
mpl.use('tkagg')
import matplotlib.pyplot as plt
#from cairocffi import *
import os
from os.path import join as pjoin
import sys
import copy
import detect_face
import nn4 as network
import random
import time
import sklearn
from sklearn.ext... | 28.827338 | 116 | 0.670576 |
365bab8d98fc74ac3d56ffe4666ef56e4ffcc9d9 | 43,271 | py | Python | mindspore/train/callback/_summary_collector.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | mindspore/train/callback/_summary_collector.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | mindspore/train/callback/_summary_collector.py | ysh329/mindspore | 754e253466a77ba5335c38a3ec7598db8ee4990a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., 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-2.0
#
# Unless required by applicable law or agre... | 45.837924 | 120 | 0.668854 |
3686dc480b405b470304bef5ff912554187395d7 | 9,246 | py | Python | build/lib/vespy/fk.py | NeilWilkins/VesPy | 29b766b737a470915cf02ed70f4077cec1ff77c5 | [
"MIT"
] | 7 | 2019-05-07T14:14:41.000Z | 2022-03-24T06:30:08.000Z | vespy/fk.py | NeilWilkins/VesPy | 29b766b737a470915cf02ed70f4077cec1ff77c5 | [
"MIT"
] | null | null | null | vespy/fk.py | NeilWilkins/VesPy | 29b766b737a470915cf02ed70f4077cec1ff77c5 | [
"MIT"
] | 2 | 2019-05-07T14:14:41.000Z | 2022-01-16T23:52:16.000Z | # fk.py
# module: vespy.fk
# FK analysis functions for seismic data
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from vespy.utils import get_station_coordinates
def fk_analysis(st, smax, fmin, fmax, tmin, tmax, stat='power'):
'''
Performs frequency-wavenumber space (FK) analy... | 39.512821 | 196 | 0.672399 |
ca97848e4e72a8bb9708aeb1141c84c621369f85 | 1,151 | py | Python | playground/auxiliary/tools.py | kangyifei/CloudSimPy | 45912e7ea35086b67941624102e400cb22e549ab | [
"MIT"
] | 78 | 2019-03-03T12:36:18.000Z | 2020-10-12T08:54:02.000Z | playground/Non_DAG/utils/tools.py | GengxinLiu/CloudSimPy | c103672f51d6617707501f05548a7df6090cdca5 | [
"MIT"
] | 11 | 2019-03-15T12:48:34.000Z | 2020-09-16T06:57:59.000Z | playground/Non_DAG/utils/tools.py | GengxinLiu/CloudSimPy | c103672f51d6617707501f05548a7df6090cdca5 | [
"MIT"
] | 34 | 2019-03-15T12:10:25.000Z | 2020-10-31T22:24:56.000Z | import time
import numpy as np
import tensorflow as tf
def average_completion(exp):
completion_time = 0
number_task = 0
for job in exp.simulation.cluster.jobs:
for task in job.tasks:
number_task += 1
completion_time += (task.finished_timestamp - task.started_timestamp)
... | 32.885714 | 102 | 0.724587 |
1fad7490bfbaf75ea555b9cfcf1675e3809d61a4 | 593 | py | Python | src/pytest/__main__.py | compas-dev/ironpython-pytest | 6d0eceddce0dac91b363dd72d15d7ff00cc7c9af | [
"MIT"
] | 1 | 2020-04-25T12:09:20.000Z | 2020-04-25T12:09:20.000Z | src/pytest/__main__.py | compas-dev/ironpython-pytest | 6d0eceddce0dac91b363dd72d15d7ff00cc7c9af | [
"MIT"
] | null | null | null | src/pytest/__main__.py | compas-dev/ironpython-pytest | 6d0eceddce0dac91b363dd72d15d7ff00cc7c9af | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
import os
from .test_runner import run
def main():
parser = argparse.ArgumentParser(description='IronPython pytest runner.')
parser.add_argument('file_or_dir', type=str, help='Directory or file to test', default=os.path.dirname(__file__))
parser.add_... | 26.954545 | 117 | 0.713322 |
c115356955f3398b14f8aaf77d10159783cae6d3 | 1,670 | py | Python | BuyTokens.py | systemquant/DeFi_PanCakeSwapBot | 39665bfd095e9b571a70699926c080882e5b456d | [
"MIT"
] | 142 | 2021-08-30T19:57:29.000Z | 2022-03-30T15:03:35.000Z | BuyTokens.py | systemquant/DeFi_PanCakeSwapBot | 39665bfd095e9b571a70699926c080882e5b456d | [
"MIT"
] | 21 | 2021-09-04T20:57:31.000Z | 2022-03-02T00:09:08.000Z | BuyTokens.py | systemquant/DeFi_PanCakeSwapBot | 39665bfd095e9b571a70699926c080882e5b456d | [
"MIT"
] | 116 | 2021-09-01T13:32:46.000Z | 2022-03-29T05:17:15.000Z | import config
import time
def buyTokens(**kwargs):
symbol = kwargs.get('symbol')
web3 = kwargs.get('web3')
walletAddress = kwargs.get('walletAddress')
contractPancake = kwargs.get('contractPancake')
TokenToBuyAddress = kwargs.get('TokenToSellAddress')
WBNB_Address = kwargs.get('WBNB_Address')
... | 43.947368 | 116 | 0.581437 |
cb85579d565dde442e10b14ebedfc7f13f61bd38 | 7,045 | py | Python | examples/rfcn/lib/rpn/proposal_layer.py | ayzk/ft-caffe-public | 888399c2fcf90c227416576a5a265b218c6be5da | [
"BSD-2-Clause"
] | 933 | 2016-08-29T14:29:20.000Z | 2022-03-20T09:03:49.000Z | examples/rfcn/lib/rpn/proposal_layer.py | ayzk/ft-caffe-public | 888399c2fcf90c227416576a5a265b218c6be5da | [
"BSD-2-Clause"
] | 286 | 2016-08-30T01:33:01.000Z | 2021-08-22T08:34:19.000Z | examples/rfcn/lib/rpn/proposal_layer.py | ayzk/ft-caffe-public | 888399c2fcf90c227416576a5a265b218c6be5da | [
"BSD-2-Clause"
] | 611 | 2016-08-30T07:22:04.000Z | 2021-12-18T11:53:08.000Z | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
import caffe
import numpy as np
import yaml
from fast_r... | 38.922652 | 80 | 0.592477 |
120c3266e85ea4579f50f486a784db890fe698c8 | 259 | py | Python | tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_None_PolyTrend_7_12_0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_None_PolyTrend_7_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_None_PolyTrend_7_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "None", sigma = 0.0, exog_count = 0, ar_order = 12); | 37 | 159 | 0.725869 |
3e7f22fb6507d867eaefb9a8afabc22c30b9b589 | 10,062 | py | Python | signac/contrib/mpipool.py | rohanbabbar04/signac | dfc28cbfdd11ea2f2e226f87719f323595e0f4ff | [
"BSD-3-Clause"
] | 100 | 2019-01-31T01:37:20.000Z | 2022-03-29T10:35:34.000Z | signac/contrib/mpipool.py | rohanbabbar04/signac | dfc28cbfdd11ea2f2e226f87719f323595e0f4ff | [
"BSD-3-Clause"
] | 607 | 2019-01-31T14:08:17.000Z | 2022-03-31T21:51:48.000Z | signac/contrib/mpipool.py | daico007/signac | a20d815bd87af3d8992c71871071024062cada07 | [
"BSD-3-Clause"
] | 31 | 2019-01-31T14:36:50.000Z | 2022-03-14T03:48:32.000Z | # The MIT License (MIT)
#
# Copyright (c) 2014, 2015 Adrian Price-Whelan & Dan Foreman-Mackey
#
# 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 limitati... | 33.878788 | 90 | 0.574538 |
cd22eccd13b3b20eb01aa3b2e848697c7754abd8 | 3,505 | py | Python | modules/utils/utils.py | king-menin/slavic-ner | f88e3150546fd2a49bda682396d82c749d6659bb | [
"MIT"
] | 6 | 2019-09-04T09:08:57.000Z | 2020-09-04T11:55:30.000Z | modules/utils/utils.py | king-menin/AGRR-2019 | 3bf8533cd54c018b45d809c3fcdc2a55a406248d | [
"MIT"
] | 1 | 2020-05-21T01:16:31.000Z | 2021-09-13T08:47:18.000Z | modules/utils/utils.py | king-menin/slavic-ner | f88e3150546fd2a49bda682396d82c749d6659bb | [
"MIT"
] | 2 | 2019-09-24T12:42:30.000Z | 2021-01-15T00:24:00.000Z | import __main__ as main
from collections import Counter
import numpy as np
def if_none(own, other):
return own if own is not None else other
def ipython_info():
return hasattr(main, '__file__')
def voting_choicer(tok_map, labels):
label = []
prev_idx = 0
for origin_idx in tok_map:
vote... | 28.495935 | 84 | 0.52525 |
17d84aa620d9dcf70eb47b7186a7f3d87ed160a5 | 11,833 | py | Python | ludwig/neuropod_export.py | jakobt/ludwig | ef8ead2f99255093e5492a2b221a472e11b228b1 | [
"Apache-2.0"
] | 1 | 2019-07-03T09:05:53.000Z | 2019-07-03T09:05:53.000Z | ludwig/neuropod_export.py | dsblank/ludwig | 29cc68b4b37730536855f8b4f31379a9d945f33b | [
"Apache-2.0"
] | null | null | null | ludwig/neuropod_export.py | dsblank/ludwig | 29cc68b4b37730536855f8b4f31379a9d945f33b | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import os
import shutil
import sys
import numpy as np
from ludwig import __file__ as ludwig_path
from ludwig.api import LudwigModel
from ludwig.constants import CATEGORY, NUMERICAL, BINARY, SEQUENCE, TEXT, SET, \
VECTOR
from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME, \
... | 33.426554 | 80 | 0.54686 |
0d570f6a9e434c47d03369af4f4720bcee81b4b7 | 1,469 | py | Python | descriptor/migrations/0021_auto_20200729_2203.py | alduxx/papirodocker | a1fab0d15ced07c4b03732651cffaa5158c164a4 | [
"Unlicense"
] | null | null | null | descriptor/migrations/0021_auto_20200729_2203.py | alduxx/papirodocker | a1fab0d15ced07c4b03732651cffaa5158c164a4 | [
"Unlicense"
] | null | null | null | descriptor/migrations/0021_auto_20200729_2203.py | alduxx/papirodocker | a1fab0d15ced07c4b03732651cffaa5158c164a4 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.7 on 2020-07-29 22:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('descriptor', '0020_auto_20200727_1347'),
]
operations = [
migrations.AlterModelOptions(
name='s... | 38.657895 | 260 | 0.598366 |
891c4be2ae50199f6b3044c112e481a50bf0aca0 | 928 | py | Python | website/__init__.py | ander9991/GradSchoolZero | 89b8cf228f21ec8d258c7e906e3e1d2cccab2a8e | [
"Apache-2.0"
] | 1 | 2021-11-10T02:39:05.000Z | 2021-11-10T02:39:05.000Z | website/__init__.py | ander9991/GradSchoolZero | 89b8cf228f21ec8d258c7e906e3e1d2cccab2a8e | [
"Apache-2.0"
] | null | null | null | website/__init__.py | ander9991/GradSchoolZero | 89b8cf228f21ec8d258c7e906e3e1d2cccab2a8e | [
"Apache-2.0"
] | 1 | 2021-11-25T23:02:10.000Z | 2021-11-25T23:02:10.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from os import path
from flask_login import LoginManager
db = SQLAlchemy()
DB_NAME = "database.db"
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'hjshjhdjah kjshkjdhjs'
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite://... | 22.634146 | 66 | 0.697198 |
0f935293005c370b86da5bd7d30d3c4909b16069 | 791 | py | Python | setup.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 7 | 2018-07-22T14:45:54.000Z | 2021-01-08T14:15:04.000Z | setup.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 25 | 2018-06-04T18:35:33.000Z | 2022-03-12T01:03:00.000Z | setup.py | krzysztofarendt/modestga | b4a884028d7cd6ad61fa5362a8be3a08b355918c | [
"BSD-2-Clause"
] | 1 | 2021-03-25T03:40:52.000Z | 2021-03-25T03:40:52.000Z | from setuptools import setup
import setuptools
setup(name='modestga',
version='0.5.11',
description='Genetic Algorithm minimization',
url='https://github.com/krzysztofarendt/modestga',
keywords='genetic algorithm optimization',
author='Krzysztof Arendt',
author_email='krzysztof.aren... | 29.296296 | 56 | 0.599241 |
574c3a54f31b4ee062bf60ae675094efe82543d7 | 2,967 | py | Python | test/functional/feature_logging.py | bitkin/bitkin | 0203d230d12822a972df4102b1875e9757a56d63 | [
"MIT"
] | null | null | null | test/functional/feature_logging.py | bitkin/bitkin | 0203d230d12822a972df4102b1875e9757a56d63 | [
"MIT"
] | null | null | null | test/functional/feature_logging.py | bitkin/bitkin | 0203d230d12822a972df4102b1875e9757a56d63 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Bitkincoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test debug logging."""
import os
from test_framework.test_framework import BitkincoinTestFramework... | 39.56 | 131 | 0.672396 |
10e70e12eabcde4d8228bb65bd4da0385174e62b | 64 | py | Python | puppet/files/other/topology_generator/topology_generator/benchmark/__init__.py | muka/servioticy-vagrant | 9b67937d5338c8693c00caa49398f399d7ba4f98 | [
"Apache-2.0"
] | null | null | null | puppet/files/other/topology_generator/topology_generator/benchmark/__init__.py | muka/servioticy-vagrant | 9b67937d5338c8693c00caa49398f399d7ba4f98 | [
"Apache-2.0"
] | null | null | null | puppet/files/other/topology_generator/topology_generator/benchmark/__init__.py | muka/servioticy-vagrant | 9b67937d5338c8693c00caa49398f399d7ba4f98 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Álvaro Villalba Navarro <alvaro.villalba@bsc.es>'
| 32 | 63 | 0.78125 |
5add12c12dfb1a6f2e1cdf5a8cc2a91188aa1154 | 518 | py | Python | client/button_blend.py | jakethedev/quantum | 218da372201d056e7cb541337475ee4fc85d9fc6 | [
"MIT"
] | null | null | null | client/button_blend.py | jakethedev/quantum | 218da372201d056e7cb541337475ee4fc85d9fc6 | [
"MIT"
] | null | null | null | client/button_blend.py | jakethedev/quantum | 218da372201d056e7cb541337475ee4fc85d9fc6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
from aiy.leds import (Leds, Color)
with Leds() as leds:
print('RGB: Blend between PURPLE and BLUE over 3 seconds')
for i in range(30):
color = Color.blend(Color.BLUE, Color.PURPLE, i / 30)
leds.update(Leds.rgb_on(color))
time.sleep(0.1)
print('RG... | 28.777778 | 62 | 0.633205 |
72bc2d1a81293cb7fb54e8c021fb0a56410a0627 | 36,292 | py | Python | openstack_dashboard/dashboards/project/loadbalancers/tests.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/loadbalancers/tests.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/loadbalancers/tests.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"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
# distributed under t... | 39.023656 | 79 | 0.600518 |
9a2a71856dc111d77d969e3d2d8f7752d1725040 | 50,890 | py | Python | conf.py | composex/blog.composex.io | 6e84c44ccc47e2d73a44f490f2ae67c8dbee0d24 | [
"BSD-3-Clause"
] | null | null | null | conf.py | composex/blog.composex.io | 6e84c44ccc47e2d73a44f490f2ae67c8dbee0d24 | [
"BSD-3-Clause"
] | null | null | null | conf.py | composex/blog.composex.io | 6e84c44ccc47e2d73a44f490f2ae67c8dbee0d24 | [
"BSD-3-Clause"
] | 1 | 2020-06-02T08:24:52.000Z | 2020-06-02T08:24:52.000Z | # -*- coding: utf-8 -*-
import time
BLOG_AUTHOR = "https://github.com/johnpreston" # (translatable)
BLOG_TITLE = "ECS Compose-X - Blog" # (translatable)
SITE_URL = "https://blog.compose-x.io/"
# BASE_URL = "https://blog.compose-x.io/"
BLOG_EMAIL = "JohnPreston@users.noreply.github.com"
BLOG_DESCRIPTION = "Technical... | 40.229249 | 184 | 0.710041 |
99142119456ed12e16e927f5af2032a916fcd744 | 1,083 | py | Python | examples/python/web-service/webservice.py | andrestone/cdk8s | 473b5ef7f442b932e9c4c4356945b91e8e1bc4e4 | [
"Apache-2.0"
] | 2,160 | 2020-03-02T23:56:13.000Z | 2021-03-15T12:02:14.000Z | examples/python/web-service/webservice.py | andrestone/cdk8s | 473b5ef7f442b932e9c4c4356945b91e8e1bc4e4 | [
"Apache-2.0"
] | 454 | 2020-03-03T06:31:02.000Z | 2021-03-10T12:12:31.000Z | examples/python/web-service/webservice.py | andrestone/cdk8s | 473b5ef7f442b932e9c4c4356945b91e8e1bc4e4 | [
"Apache-2.0"
] | 178 | 2020-03-03T06:25:09.000Z | 2021-03-03T17:58:57.000Z | #!/usr/bin/env python3
from constructs import Construct, Node
from imports import k8s
class WebService(Construct):
def __init__(self, scope: Construct, id: str, *, image: str, replicas=1, port=80, containerPort=8080, **kwargs):
super().__init__(scope, id)
label = {"app": Node.of(self).... | 36.1 | 116 | 0.573407 |
11a87a59efb8a2e18b3774caba2d720d14aaa43c | 21,905 | py | Python | bioinformatics-programs/getDomainsFromHMMScanOrRpsAndTm.py | dengzq1234/TREND | 0374da1fbdd3b5236445d62f07ea84485074b437 | [
"MIT"
] | null | null | null | bioinformatics-programs/getDomainsFromHMMScanOrRpsAndTm.py | dengzq1234/TREND | 0374da1fbdd3b5236445d62f07ea84485074b437 | [
"MIT"
] | null | null | null | bioinformatics-programs/getDomainsFromHMMScanOrRpsAndTm.py | dengzq1234/TREND | 0374da1fbdd3b5236445d62f07ea84485074b437 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys, getopt, re
import collections
import traceback
import json
import math
from subprocess import call
from Bio import SeqIO
USAGE = "\n\nThe script extracts domain information from the results of hmmscan or rpsblast.\n\n" + \
"python " + sys.argv[0] + '''
-h - help
-i... | 38.633157 | 236 | 0.699795 |
40242de03e1f2ff3a2b7ea61853b2eb8e39ac2a7 | 16,206 | py | Python | assets/html_data.py | luzpaz/KiCad-Diff | 4552c1776a7242b72b70776a1a40ecc11ad618e1 | [
"MIT"
] | 182 | 2017-08-17T01:56:41.000Z | 2022-03-27T20:05:53.000Z | assets/html_data.py | luzpaz/KiCad-Diff | 4552c1776a7242b72b70776a1a40ecc11ad618e1 | [
"MIT"
] | 76 | 2018-10-03T17:32:38.000Z | 2022-03-25T23:05:10.000Z | assets/html_data.py | luzpaz/KiCad-Diff | 4552c1776a7242b72b70776a1a40ecc11ad618e1 | [
"MIT"
] | 37 | 2018-03-24T01:27:41.000Z | 2022-03-17T22:51:41.000Z | # HTML Data
# Intermediate approach before something better
indexHead = """
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="http://127.0.0.1:9092/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="st... | 39.334951 | 226 | 0.451499 |
3342d2471229a6b44e0b675ec2f9d024547041ec | 86,911 | py | Python | pynetdicom3/dimse_primitives.py | sisobus/pynetdicom3 | c9d3d1b52f17a107566f31e63e0e4d0e8aaacbab | [
"MIT"
] | 2 | 2019-02-07T08:02:30.000Z | 2019-03-20T04:00:20.000Z | pynetdicom3/dimse_primitives.py | sisobus/pynetdicom3 | c9d3d1b52f17a107566f31e63e0e4d0e8aaacbab | [
"MIT"
] | null | null | null | pynetdicom3/dimse_primitives.py | sisobus/pynetdicom3 | c9d3d1b52f17a107566f31e63e0e4d0e8aaacbab | [
"MIT"
] | 1 | 2019-04-11T07:39:06.000Z | 2019-04-11T07:39:06.000Z | """
Define the DIMSE-C and DIMSE-N service parameter primitives.
Notes:
* The class member names must match their corresponding DICOM element keyword
in order for the DIMSE messages/primitives to be created correctly.
TODO: Implement properties for DIMSE-N parameters
TODO: Implement status related parameters fo... | 39.758005 | 80 | 0.548527 |
6ceaecebfb602bc889bc6a72c55decf7264493d4 | 2,700 | py | Python | videos/grid_paths/grid_move_up.py | ryu577/pyray | 860b71463e2729a85b1319b5c3571c0b8f3ba50c | [
"MIT"
] | 715 | 2018-01-13T04:29:10.000Z | 2022-03-24T12:15:08.000Z | videos/grid_paths/grid_move_up.py | ryu577/pyray | 860b71463e2729a85b1319b5c3571c0b8f3ba50c | [
"MIT"
] | 8 | 2018-01-14T07:48:41.000Z | 2020-07-14T09:56:27.000Z | videos/grid_paths/grid_move_up.py | ryu577/pyray | 860b71463e2729a85b1319b5c3571c0b8f3ba50c | [
"MIT"
] | 111 | 2018-01-13T06:47:24.000Z | 2021-04-01T05:58:28.000Z | import numpy as np
from PIL import Image, ImageDraw, ImageFont, ImageMath
from pyray.rotation import general_rotation, planar_rotation, axis_rotation,\
rotate_point_about_axis
from pyray.shapes.twod.plot import Canvas
from pyray.axes import ZigZagPath
import pyray.grid as grd
def tst(basedir=".\\"):
for i in r... | 40.909091 | 77 | 0.565185 |
811697bd2ceeb780d9f5578640a12746b2af2fc7 | 861 | py | Python | yatube/posts/urls.py | pakodev28/yatube_project | ae58943b3eee1536d46292f9539b22961530ee6d | [
"MIT"
] | null | null | null | yatube/posts/urls.py | pakodev28/yatube_project | ae58943b3eee1536d46292f9539b22961530ee6d | [
"MIT"
] | null | null | null | yatube/posts/urls.py | pakodev28/yatube_project | ae58943b3eee1536d46292f9539b22961530ee6d | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("follow/", views.follow_index, name="follow_index"),
path(
"<str:username>/follow/", views.profile_follow, name="profile_follow"
),
path("new/", views.new_post, name="new_post"),
... | 27.774194 | 77 | 0.594657 |
004ff51901f6de4abf9b5fb86fe0903112ba4d98 | 531 | py | Python | PSMS/migrations/0006_auto_20181218_0130.py | hellen6654/DataBase_CGHP | d4e393d3994c3a7b576c651ad2ac7ef919a3f386 | [
"MIT"
] | null | null | null | PSMS/migrations/0006_auto_20181218_0130.py | hellen6654/DataBase_CGHP | d4e393d3994c3a7b576c651ad2ac7ef919a3f386 | [
"MIT"
] | null | null | null | PSMS/migrations/0006_auto_20181218_0130.py | hellen6654/DataBase_CGHP | d4e393d3994c3a7b576c651ad2ac7ef919a3f386 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2018-12-17 17:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('PSMS', '0005_auto_20181218_0125'),
]
operations = [
migrations.AlterField(
model_name='pizza',
name='kind_chose',
... | 27.947368 | 195 | 0.574388 |
74b940a1b9afe48516d7d212f05ceeac4f8512bd | 6,876 | py | Python | biosteam/units/_batch_bioreactor.py | rupert-br/biosteam | 2fda82749b23aeb62877257836cd1d7bd8a87638 | [
"MIT"
] | null | null | null | biosteam/units/_batch_bioreactor.py | rupert-br/biosteam | 2fda82749b23aeb62877257836cd1d7bd8a87638 | [
"MIT"
] | null | null | null | biosteam/units/_batch_bioreactor.py | rupert-br/biosteam | 2fda82749b23aeb62877257836cd1d7bd8a87638 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020-2021, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details... | 33.057692 | 140 | 0.578389 |
62af06de52912d5d504893308cd7a5cf09b06f4e | 1,245 | py | Python | video/migrations/0001_initial.py | ChoiJunsik/Sumalyze | 2387f6c6512a2da106d2579b1df08ee2311e2602 | [
"MIT"
] | 2 | 2019-05-09T10:43:28.000Z | 2019-05-20T07:50:45.000Z | video/migrations/0001_initial.py | ChoiJunsik/Sumalyze | 2387f6c6512a2da106d2579b1df08ee2311e2602 | [
"MIT"
] | 3 | 2021-09-08T01:01:39.000Z | 2022-03-11T23:47:50.000Z | video/migrations/0001_initial.py | ChoiJunsik/Sumalyze | 2387f6c6512a2da106d2579b1df08ee2311e2602 | [
"MIT"
] | 1 | 2020-04-09T13:41:56.000Z | 2020-04-09T13:41:56.000Z | # Generated by Django 2.1.5 on 2019-05-26 06:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 35.571429 | 120 | 0.603213 |
63f95a3badf645cb4fa922c79fe13896b0c31982 | 8,945 | py | Python | rl_coach/architectures/tensorflow_components/heads/ppo_head.py | jl45621/coach | 9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084 | [
"Apache-2.0"
] | 1,960 | 2017-10-19T10:31:24.000Z | 2020-11-07T18:19:23.000Z | rl_coach/architectures/tensorflow_components/heads/ppo_head.py | jl45621/coach | 9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084 | [
"Apache-2.0"
] | 349 | 2017-10-21T17:17:18.000Z | 2020-10-17T13:39:56.000Z | rl_coach/architectures/tensorflow_components/heads/ppo_head.py | jl45621/coach | 9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084 | [
"Apache-2.0"
] | 428 | 2017-10-21T01:32:58.000Z | 2020-11-07T13:49:49.000Z | #
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 56.974522 | 135 | 0.710788 |
12e55d73497293b90fe73e601aec08f4577850f4 | 639 | py | Python | hata/discord/guild/__init__.py | WizzyBots/hata | f6991afc0bebf7dad932888a536f4d010f8663c7 | [
"0BSD"
] | 1 | 2022-03-02T03:59:57.000Z | 2022-03-02T03:59:57.000Z | hata/discord/guild/__init__.py | m0nk3ybraindead/hata | f87ed3d7009eeae31d6ea158772efd33775c7b1c | [
"0BSD"
] | 1 | 2022-02-08T16:54:39.000Z | 2022-02-08T16:54:39.000Z | hata/discord/guild/__init__.py | WizzyBots/hata | f6991afc0bebf7dad932888a536f4d010f8663c7 | [
"0BSD"
] | null | null | null | from .audit_logs import *
from .discovery import *
from .embedded_activity_state import *
from .event_types import *
from .flags import *
from .guild import *
from .preinstanced import *
from .preview import *
from .utils import *
from .verification_screen import *
from .welcome_screen import *
from .widget import *
_... | 22.821429 | 38 | 0.72457 |
44b872881d5f00a9e1af8ddc135331008805ee58 | 4,453 | py | Python | scripts/study_case/ID_4/torch_geometric/datasets/modelnet.py | kzbnb/numerical_bugs | bc22e72bcc06df6ce7889a25e0aeed027bde910b | [
"Apache-2.0"
] | 8 | 2021-06-30T06:55:14.000Z | 2022-03-18T01:57:14.000Z | scripts/study_case/ID_4/torch_geometric/datasets/modelnet.py | kzbnb/numerical_bugs | bc22e72bcc06df6ce7889a25e0aeed027bde910b | [
"Apache-2.0"
] | 1 | 2021-06-30T03:08:15.000Z | 2021-06-30T03:08:15.000Z | scripts/study_case/ID_4/torch_geometric/datasets/modelnet.py | kzbnb/numerical_bugs | bc22e72bcc06df6ce7889a25e0aeed027bde910b | [
"Apache-2.0"
] | 2 | 2021-11-17T11:19:48.000Z | 2021-11-18T03:05:58.000Z | import os
import os.path as osp
import glob
import torch
from scripts.study_case.ID_4.torch_geometric.data import InMemoryDataset, download_url, extract_zip
from scripts.study_case.ID_4.torch_geometric.read import read_off
class ModelNet(InMemoryDataset):
r"""The ModelNet10/40 datasets from the `"3D ShapeNets: A... | 40.117117 | 99 | 0.621379 |
ab45eb2d92419abc2788b5c1663b427111e8a8a7 | 6,993 | py | Python | dag.py | airlaunch-ch/airflow-dags-demo-industry | a07fdca734694c9ba5ae06a4b4fa95c51289ee7f | [
"Apache-2.0"
] | null | null | null | dag.py | airlaunch-ch/airflow-dags-demo-industry | a07fdca734694c9ba5ae06a4b4fa95c51289ee7f | [
"Apache-2.0"
] | null | null | null | dag.py | airlaunch-ch/airflow-dags-demo-industry | a07fdca734694c9ba5ae06a4b4fa95c51289ee7f | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import queue
from dateutil.parser import parse
from io import BytesIO
import pandas as pd
from sqlalchemy.types import DateTime, Float, Text
from airflow import DAG
from providers.airlaunch.opcua.transfers.opcua_to_postgres import OPCUAToPostgresOperator
from airflow.operators... | 41.135294 | 193 | 0.646504 |
fef529ee6976c46e1b793865ed5fa4dbcd0509c7 | 1,604 | py | Python | notion_renderer/__main__.py | ruucm/notion_renderer | dede1b1b3c38fd5a741acfd5dc1171b4bc5afb84 | [
"MIT"
] | null | null | null | notion_renderer/__main__.py | ruucm/notion_renderer | dede1b1b3c38fd5a741acfd5dc1171b4bc5afb84 | [
"MIT"
] | null | null | null | notion_renderer/__main__.py | ruucm/notion_renderer | dede1b1b3c38fd5a741acfd5dc1171b4bc5afb84 | [
"MIT"
] | null | null | null | # type: ignore[attr-defined]
from typing import Optional
from enum import Enum
from random import choice
import typer
from rich.console import Console
from notion_renderer import version
from notion_renderer.example import hello
from notion_renderer.notion_to_mdx import convert
class Color(str, Enum):
white = ... | 22.591549 | 77 | 0.622818 |
1ec2b7d40e4e99d1c36be1700f6aa6a00fb595ba | 309 | py | Python | data/multilingual/Latn.IBO/Sun-ExtA_8/pdf_to_json_test_Latn.IBO_Sun-ExtA_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.IBO/Sun-ExtA_8/pdf_to_json_test_Latn.IBO_Sun-ExtA_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.IBO/Sun-ExtA_8/pdf_to_json_test_Latn.IBO_Sun-ExtA_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.IBO/Sun-ExtA_8/udhr_Latn.IBO_Sun-ExtA_8.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.9 | 79 | 0.809061 |
1752e4274d45dc490a84d01cc552e700c7805568 | 10,514 | py | Python | script.module.nanscrapers/lib/nanscrapers/scraperplugins/wrzcraft.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:37:15.000Z | 2019-03-05T09:37:15.000Z | script.module.nanscrapers/lib/nanscrapers/scraperplugins/wrzcraft.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.nanscrapers/lib/nanscrapers/scraperplugins/wrzcraft.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:16:08.000Z | 2021-11-05T22:16:08.000Z | # -*- coding: utf-8 -*-
'''
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed... | 33.484076 | 107 | 0.494769 |
043927b6fdbc6e4cc830f3d803f908b1c56faff0 | 11,200 | py | Python | main.py | Shamos99/supahands-coding-test | 12e6ba7b811ad550c69273f017300f23fcf53c70 | [
"MIT"
] | null | null | null | main.py | Shamos99/supahands-coding-test | 12e6ba7b811ad550c69273f017300f23fcf53c70 | [
"MIT"
] | null | null | null | main.py | Shamos99/supahands-coding-test | 12e6ba7b811ad550c69273f017300f23fcf53c70 | [
"MIT"
] | null | null | null | import copy
class Constants:
"""
I don't think its needed for a project of this scale, but its the "right" way of doing this and I'm, a good boy
I would normally put these in a separate constants.py file, but I want to keep the entire solution in one file so yeah
"""
DEFAULT_STAM = 3
DEFAULT_B... | 33.333333 | 129 | 0.599196 |
5e583f8102fe03db4adda1c922704a51e9376f0b | 13,861 | py | Python | pyiron_base/generic/units.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 7 | 2020-09-12T11:01:09.000Z | 2022-03-01T20:59:46.000Z | pyiron_base/generic/units.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 417 | 2018-07-03T12:44:00.000Z | 2022-03-31T14:25:31.000Z | pyiron_base/generic/units.py | pyiron/pyiron_base | 3f62c6c59b90b774a04a61dd6d8a461fc6ef5bd1 | [
"BSD-3-Clause"
] | 8 | 2018-04-03T05:21:07.000Z | 2021-12-27T09:55:19.000Z | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import functools
import numpy as np
import pint
Q_ = pint.Quantity
__author__ = "Sudarsan Surendralal"
__copyright__ =... | 35.632391 | 120 | 0.614674 |
b2f318a25b3b3c40124fd3cc2f8848aa210fcdb9 | 8,603 | py | Python | azext_keyvault/keyvault/custom/http_message_security.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | azext_keyvault/keyvault/custom/http_message_security.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | azext_keyvault/keyvault/custom/http_message_security.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.000Z | #---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------... | 44.807292 | 120 | 0.654539 |
76e2cf3e2e3f13da61d00dd1332f195aba94446e | 157 | py | Python | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | null | null | null | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | 5 | 2020-06-06T01:00:13.000Z | 2021-06-09T18:49:18.000Z | py-env/bin/django-admin.py | ipmLessing/dj-cms | ed061e4c33a99f6505d19ce2e0cd54363aa62b0b | [
"MIT"
] | null | null | null | #!/home/kasengchou/git/dj-cms/py-env/bin/python3.6
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 26.166667 | 50 | 0.770701 |
d92271cdc28aee2176b4be04f707808fdc195ea9 | 248 | py | Python | Ibis/settings.py | Ronkiro/Ibis | 40dbf0590ec098715ca7d6d16b6dc5a60f9ff5e5 | [
"MIT"
] | 1 | 2020-07-06T15:08:53.000Z | 2020-07-06T15:08:53.000Z | Ibis/settings.py | Ronkiro/Ibis | 40dbf0590ec098715ca7d6d16b6dc5a60f9ff5e5 | [
"MIT"
] | 1 | 2019-06-21T13:46:16.000Z | 2019-06-21T13:46:16.000Z | Ibis/settings.py | Ronkiro/Ibis | 40dbf0590ec098715ca7d6d16b6dc5a60f9ff5e5 | [
"MIT"
] | null | null | null | """ This file changes the global settings logic.
Do not do any changes here, unless you know what you
are doing.
"""
# Mode standard is 'f'
MODE='f'
FILE_TARGET='your file.ext' # Target file, where the software writes the buffer.
LOG=True
| 24.8 | 80 | 0.709677 |
03d455ddaf56eb3cf9e7b5582c16a6667bcb7108 | 3,080 | py | Python | tests/test_filters.py | Jmillan-Dev/drf-query-filter | e86c412996ba68f5dfa6edff7f46d15c6b87f56e | [
"MIT"
] | 4 | 2021-01-21T06:10:31.000Z | 2021-03-17T00:21:41.000Z | tests/test_filters.py | Jmillan-Dev/drf-query-filter | e86c412996ba68f5dfa6edff7f46d15c6b87f56e | [
"MIT"
] | null | null | null | tests/test_filters.py | Jmillan-Dev/drf-query-filter | e86c412996ba68f5dfa6edff7f46d15c6b87f56e | [
"MIT"
] | null | null | null | from django.db.models import Q
from django.test import TestCase
from rest_framework.exceptions import ValidationError
from drf_query_filter import fields, filters
from drf_query_filter.utils import ConnectorType
class SimpleView:
query_params = [
fields.IntegerField('id') & fields.ChoicesField('state', c... | 32.083333 | 90 | 0.621753 |
33ca08877b963a108c8a2866afef94d3e8686285 | 3,407 | py | Python | pyleecan/Methods/Simulation/Magnetics/store_output.py | BonneelP/pyleecan | 29e6b4358420754993af1a43048aa12d1538774e | [
"Apache-2.0"
] | 2 | 2020-08-28T14:54:55.000Z | 2021-03-13T19:34:45.000Z | pyleecan/Methods/Simulation/Magnetics/store_output.py | BonneelP/pyleecan | 29e6b4358420754993af1a43048aa12d1538774e | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Simulation/Magnetics/store_output.py | BonneelP/pyleecan | 29e6b4358420754993af1a43048aa12d1538774e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import mean, max as np_max, min as np_min
from SciDataTool import DataTime, VectorField, Data1D
from ....Functions.Winding.gen_phase_list import gen_name
def store_output(self, output, out_dict, axes_dict):
"""Store the standard outputs of Magnetics that are temporarily in out... | 30.150442 | 116 | 0.584679 |
6fd581f2984656586d1703779ad9b183265a64f3 | 721 | py | Python | HookerScraping/Class/Scraping.py | HookerMen/webscraping-challenge | 4eb2acf82be93d33f22c3340d4b6d0191a1c8d79 | [
"MIT"
] | null | null | null | HookerScraping/Class/Scraping.py | HookerMen/webscraping-challenge | 4eb2acf82be93d33f22c3340d4b6d0191a1c8d79 | [
"MIT"
] | null | null | null | HookerScraping/Class/Scraping.py | HookerMen/webscraping-challenge | 4eb2acf82be93d33f22c3340d4b6d0191a1c8d79 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import re
# Unica super clase de la aplicación. Sirve como estructura para las siguientes clases
class Scraping(object):
# Recibe una URL
def __init__(self,url):
# Obtener la URL
self.__url = url
# Realizamos una petición y la respuesta la co... | 31.347826 | 113 | 0.678225 |
d6f1e6711ea5735b811ed03983c8aa332571651d | 1,321 | py | Python | var/spack/repos/builtin/packages/r-statmod/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-statmod/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/r-statmod/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 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 RStatmod(RPackage):
"""Statistical Modeling
A collection of algorithms and functions ... | 45.551724 | 96 | 0.769871 |
79ce24902b80a882e705eeed77b1dbd5be394d1e | 5,703 | py | Python | fltk/util/config/arguments.py | ReubenJ/fltk-testbed | 8b18ba0638af1e1d905343e9a52fbf522fc8303f | [
"BSD-2-Clause"
] | 2 | 2021-10-15T18:22:48.000Z | 2021-11-20T21:24:49.000Z | fltk/util/config/arguments.py | ReubenJ/fltk-testbed | 8b18ba0638af1e1d905343e9a52fbf522fc8303f | [
"BSD-2-Clause"
] | 1 | 2021-09-10T07:20:48.000Z | 2021-09-10T07:20:48.000Z | fltk/util/config/arguments.py | ReubenJ/fltk-testbed | 8b18ba0638af1e1d905343e9a52fbf522fc8303f | [
"BSD-2-Clause"
] | 45 | 2021-09-06T08:50:49.000Z | 2021-09-28T12:10:13.000Z | from argparse import Namespace
from dataclasses import dataclass
from typing import List, Tuple, Type, Dict, T
import torch.distributed as dist
import torch.nn
import fltk.nets as nets
from fltk.datasets import CIFAR10Dataset, FashionMNISTDataset, CIFAR100Dataset, MNIST
from fltk.datasets.dataset import Dataset
CLIE... | 37.032468 | 118 | 0.674733 |
4d16532806442ed808fead9f12e15e7cbebc4eb2 | 1,091 | py | Python | tests/test_make_charge_scalar.py | adelabriere/matchms | a580539e6db3f4f00e12097983b85b2d494159ba | [
"Apache-2.0"
] | 64 | 2020-06-22T14:59:21.000Z | 2022-03-30T00:50:13.000Z | tests/test_make_charge_scalar.py | adelabriere/matchms | a580539e6db3f4f00e12097983b85b2d494159ba | [
"Apache-2.0"
] | 561 | 2020-03-19T14:35:59.000Z | 2022-03-29T10:11:12.000Z | tests/test_make_charge_scalar.py | adelabriere/matchms | a580539e6db3f4f00e12097983b85b2d494159ba | [
"Apache-2.0"
] | 32 | 2020-05-06T07:35:59.000Z | 2022-03-10T09:03:45.000Z | import numpy
import pytest
from matchms import Spectrum
from matchms.filtering import make_charge_scalar
@pytest.mark.parametrize("input_charge, corrected_charge", [('+1', 1),
('1', 1),
(' 1 ', 1),
... | 40.407407 | 91 | 0.528873 |
760f45fbebf8cf509c66720a8f8c9e8b328a7a58 | 1,053 | py | Python | nemo/collections/cv/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2021-06-23T19:24:47.000Z | 2021-06-23T19:24:47.000Z | nemo/collections/cv/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2020-06-11T00:54:42.000Z | 2020-06-11T00:54:42.000Z | nemo/collections/cv/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2019-11-20T00:51:38.000Z | 2019-11-20T00:51:38.000Z | # =============================================================================
# Copyright (c) 2020 NVIDIA. 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:... | 37.607143 | 79 | 0.65717 |
addc0c2dd23100606fd61b087a419ffe95b62a92 | 25,059 | py | Python | main.py | shashi278/skyshare | 36c900abe48d4d6585cfb7b0ca4f36c48de4d47e | [
"MIT"
] | 1 | 2021-06-23T05:02:46.000Z | 2021-06-23T05:02:46.000Z | main.py | shashi278/skyshare | 36c900abe48d4d6585cfb7b0ca4f36c48de4d47e | [
"MIT"
] | null | null | null | main.py | shashi278/skyshare | 36c900abe48d4d6585cfb7b0ca4f36c48de4d47e | [
"MIT"
] | 1 | 2021-06-23T05:02:47.000Z | 2021-06-23T05:02:47.000Z | from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.anchorlayout import AnchorLayout
from kivy.logger import Logger
from kivy.lang.builder import Builder
from kivy.properties import (
BooleanProperty,
ListProperty,
NumericProperty,
ObjectProperty,
OptionProperty,
StringProp... | 32.126923 | 133 | 0.585059 |
b1d1bc65a3d88886d3f9075ed9c76c12996bdaea | 496 | py | Python | evaluate/previous_works/svsyn/spherical/weights.py | Syniez/Joint_360depth | 4f28c3b5b7f648173480052e205e898c6c7a5151 | [
"MIT"
] | 92 | 2019-09-08T09:55:05.000Z | 2022-02-21T21:29:40.000Z | spherical/weights.py | zjsprit/SphericalViewSynthesis | fcdec95bf3ad109767d27396434b51cf3aad2b4b | [
"BSD-2-Clause"
] | 4 | 2020-05-12T02:29:36.000Z | 2021-11-26T07:49:43.000Z | spherical/weights.py | zjsprit/SphericalViewSynthesis | fcdec95bf3ad109767d27396434b51cf3aad2b4b | [
"BSD-2-Clause"
] | 26 | 2019-09-16T02:26:33.000Z | 2021-10-21T03:55:02.000Z | import torch
from .grid import *
def phi_confidence(sgrid): # fading towards horizontal singularities
return torch.abs(torch.sin(phi(sgrid)))
def theta_confidence(sgrid): # fading towards vertical singularities
return torch.abs(torch.cos(theta(sgrid)))
def spherical_confidence(sgrid, zero_low=0.0,... | 33.066667 | 69 | 0.72379 |
c3cb2cac8ff4726da19b06299035e2f53522ef63 | 47,439 | py | Python | diofant/ntheory/factor_.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | diofant/ntheory/factor_.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | diofant/ntheory/factor_.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | null | null | null | """
Integer factorization
"""
import math
import numbers
import random
from ..core import Function, Integer, Mul, Pow, Rational, integer_nthroot
from ..core.compatibility import as_int
from ..core.evalf import bitcount
from ..core.sympify import sympify
from .generate import nextprime, primerange, sieve
from .primete... | 29.575436 | 124 | 0.531925 |
1f558305bb6543f624de3fb58846017ba16f96dd | 9,276 | py | Python | sdk/python/pulumi_azure_native/cache/v20171001/patch_schedule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20171001/patch_schedule.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20171001/patch_schedule.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! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 44.382775 | 632 | 0.655347 |
dc84ca1feda0f27ebd688040f503cd78a1f4903e | 20,880 | py | Python | salt/cloud/clouds/softlayer_hw.py | kev009/salt | aecd53203eca51e150128ae7c9ad2a979d004127 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/softlayer_hw.py | kev009/salt | aecd53203eca51e150128ae7c9ad2a979d004127 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/softlayer_hw.py | kev009/salt | aecd53203eca51e150128ae7c9ad2a979d004127 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
SoftLayer HW Cloud Module
=========================
The SoftLayer HW cloud module is used to control access to the SoftLayer
hardware cloud system
Use of this module only requires the ``apikey`` parameter. Set up the cloud
configuration at:
``/etc/salt/cloud.providers`` or ``/etc/salt/clo... | 30.348837 | 108 | 0.587931 |
6ba0f5ad790d80ee2e51d9e25a6aeeec885ce9e2 | 248 | py | Python | sites/manage.py | cmwaura/Final_Red_Scrap | 6b1b78de7d1129cda787e9f4688ddd409af39eb5 | [
"MIT"
] | null | null | null | sites/manage.py | cmwaura/Final_Red_Scrap | 6b1b78de7d1129cda787e9f4688ddd409af39eb5 | [
"MIT"
] | null | null | null | sites/manage.py | cmwaura/Final_Red_Scrap | 6b1b78de7d1129cda787e9f4688ddd409af39eb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sites.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.545455 | 69 | 0.770161 |
822e14762f7b038d41e0746a898ecc27a1d19fba | 835 | py | Python | pet_ros2_lcd_pkg/util/i2c_lib.py | Pet-Series/pet_ros2_lcd_pkg | 64b9d7313361a27627e1c5dddaad310685ba412f | [
"MIT"
] | null | null | null | pet_ros2_lcd_pkg/util/i2c_lib.py | Pet-Series/pet_ros2_lcd_pkg | 64b9d7313361a27627e1c5dddaad310685ba412f | [
"MIT"
] | null | null | null | pet_ros2_lcd_pkg/util/i2c_lib.py | Pet-Series/pet_ros2_lcd_pkg | 64b9d7313361a27627e1c5dddaad310685ba412f | [
"MIT"
] | null | null | null | import smbus
from time import *
class i2c_device:
def __init__(self, addr, port=1):
self.addr = addr
self.bus = smbus.SMBus(port)
# Write a single command
def write_cmd(self, cmd):
self.bus.write_byte(self.addr, cmd)
sleep(0.0001)
# Write a command and argument
def write_cmd_arg(sel... | 24.558824 | 53 | 0.674251 |
962de2a6b4f2b7c706d935e98ba124706d1a218e | 310 | py | Python | constants.py | sagge-miky/Super-HUGS-Revolution-98 | 00443e7da399db9faad7dd12b0656e8fd6fb33b0 | [
"BSD-2-Clause"
] | null | null | null | constants.py | sagge-miky/Super-HUGS-Revolution-98 | 00443e7da399db9faad7dd12b0656e8fd6fb33b0 | [
"BSD-2-Clause"
] | null | null | null | constants.py | sagge-miky/Super-HUGS-Revolution-98 | 00443e7da399db9faad7dd12b0656e8fd6fb33b0 | [
"BSD-2-Clause"
] | null | null | null | ############################################
# Created on 1-10-2013. Miguel Angel Astor #
############################################
# Debug constant. Set to False to turn off debugging messages.
DEBUG = False
# Number of players in the game. Should always be greater than or equal to one.
NUM_PLAYERS = 1
| 31 | 79 | 0.529032 |
58330de0e6cf3350e09345262493d726c4b28e45 | 1,236 | py | Python | src/orion/algo/random.py | christopher-beckham/orion | fc4aa14dd58bf50196aa6ad3a2869e3d86ca1a45 | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/random.py | christopher-beckham/orion | fc4aa14dd58bf50196aa6ad3a2869e3d86ca1a45 | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/random.py | christopher-beckham/orion | fc4aa14dd58bf50196aa6ad3a2869e3d86ca1a45 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:mod:`orion.algo.random` -- Random sampler as optimization algorithm
======================================================================
.. module:: random
:platform: Unix
:synopsis: Draw and deliver samples from prior defined in problem's domain.
"""
from orion.algo.base import ... | 29.428571 | 80 | 0.609223 |
29783949a6bc7d614a6ce1bb0be393d91e00431a | 1,222 | py | Python | netbox_aws/filters.py | lampwins/interop2020-netbox-plugins | e983b1875c58230228448deca6b129be9fc40c1e | [
"Apache-2.0"
] | 4 | 2020-10-06T19:00:01.000Z | 2021-04-26T19:37:00.000Z | netbox_aws/filters.py | lampwins/interop2020-netbox-plugins | e983b1875c58230228448deca6b129be9fc40c1e | [
"Apache-2.0"
] | null | null | null | netbox_aws/filters.py | lampwins/interop2020-netbox-plugins | e983b1875c58230228448deca6b129be9fc40c1e | [
"Apache-2.0"
] | 1 | 2021-04-16T15:24:24.000Z | 2021-04-16T15:24:24.000Z | import django_filters
from django.db.models import Q
from utilities.filters import BaseFilterSet
from ipam.models import Prefix
from netbox_aws.models import VPC
from netbox_aws.choices import VPCRegionChoices
class VPCFilterSet(BaseFilterSet):
q = django_filters.CharFilter(
method='search',
lab... | 26.565217 | 67 | 0.643208 |
749bba2d64b24763676674bf43c5e57434110130 | 1,722 | py | Python | data/lccc/process.py | gmftbyGMFTBY/HashRetrieval | 08c8998a802d1237aada7e30d440d34d92788173 | [
"MIT"
] | 1 | 2021-12-08T12:40:24.000Z | 2021-12-08T12:40:24.000Z | data/lccc/process.py | gmftbyGMFTBY/HashRetrieval | 08c8998a802d1237aada7e30d440d34d92788173 | [
"MIT"
] | null | null | null | data/lccc/process.py | gmftbyGMFTBY/HashRetrieval | 08c8998a802d1237aada7e30d440d34d92788173 | [
"MIT"
] | null | null | null | from tqdm import tqdm
import ipdb, json, random, csv, torch
def read_file(path, mode='train'):
with open(path) as f:
data = json.load(f)
if mode == 'train':
data = data[mode]
data = [[''.join(j.split()) for j in i] for i in data]
responses = [i[-1] for i in data]
... | 34.44 | 73 | 0.52381 |
e5033799202a9feaa1d630b9ae92754ca6af73be | 855 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/utility_models/delay_extension_partitioned_vertex.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/utility_models/delay_extension_partitioned_vertex.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/utility_models/delay_extension_partitioned_vertex.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | from pacman.model.partitioned_graph.partitioned_vertex import PartitionedVertex
from spinn_front_end_common.interface.provenance\
.provides_provenance_data_from_machine_impl \
import ProvidesProvenanceDataFromMachineImpl
from enum import Enum
class DelayExtensionPartitionedVertex(
PartitionedVertex, ... | 37.173913 | 79 | 0.745029 |
fc109238e788efdf34f7664f82f7c70eb8fe7d8f | 3,329 | py | Python | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/django_project_Krivoshapkina/settings.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/django_project_Krivoshapkina/settings.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | students/K33402/Krivoshapkina_Aitalina/LR_2/PR_2.2/django_project_Krivoshapkina/settings.py | aytakr/ITMO_ICT_WebDevelopment_2021-2022 | 57c0eef5e1f413c7f031ee001d59e5122f990f26 | [
"MIT"
] | null | null | null | """
Django settings for django_project_Krivoshapkina project.
Generated by 'django-admin startproject' using Django 4.0.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings... | 26.632 | 91 | 0.709522 |
53bb2c260f6316a060aa69a9ca70882ac1037f01 | 7,884 | py | Python | ImageAnalysis/ImageAnalysis/python/references/bead-designer-test/gui/beadgui.py | mikebourbeauart/PerlerPrinter | 8c5023de6bb9b3cbe2bc28c1c823030dfd708db4 | [
"MIT"
] | null | null | null | ImageAnalysis/ImageAnalysis/python/references/bead-designer-test/gui/beadgui.py | mikebourbeauart/PerlerPrinter | 8c5023de6bb9b3cbe2bc28c1c823030dfd708db4 | [
"MIT"
] | 2 | 2021-09-07T23:43:53.000Z | 2022-01-13T00:39:55.000Z | ImageAnalysis/ImageAnalysis/python/references/bead-designer-test/gui/beadgui.py | mikebourbeauart/PerlerPrinter | 8c5023de6bb9b3cbe2bc28c1c823030dfd708db4 | [
"MIT"
] | 1 | 2019-10-21T17:12:07.000Z | 2019-10-21T17:12:07.000Z | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 30 2011)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
impo... | 38.458537 | 194 | 0.67656 |
f4555a3ba69e21bc2142f801353a2d1227719ad5 | 893 | py | Python | objectdata.py | Retropunchout/Triton | 3845f07add811b32d3ada5d2f9cf0169c326b58d | [
"MIT"
] | null | null | null | objectdata.py | Retropunchout/Triton | 3845f07add811b32d3ada5d2f9cf0169c326b58d | [
"MIT"
] | null | null | null | objectdata.py | Retropunchout/Triton | 3845f07add811b32d3ada5d2f9cf0169c326b58d | [
"MIT"
] | null | null | null | objectdata = """
---
!!python/object:__main__.item
name: bandage
description: "A Bandage, used for binding wounds"
static: False
wearable: False
wieldable: False
getable: True
classrestr: Medic
rarity: 1
dmgmod: 0
defmod: 0
useaction: itemheal()
---
!!p... | 21.261905 | 54 | 0.602464 |
d9b761c0f7b2718acaf7735ac60f83f0001f1fd5 | 1,239 | py | Python | repos/system_upgrade/el7toel8/actors/scancpu/tests/test_scancpu.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/scancpu/tests/test_scancpu.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/scancpu/tests/test_scancpu.py | panovotn/leapp-repository | e80bdbf65393e68bc2e91b43b46fdd9b9b787878 | [
"Apache-2.0"
] | null | null | null | import os
from leapp.libraries.actor import cpu
from leapp.libraries.common import testutils
from leapp.libraries.stdlib import api
from leapp.models import CPUInfo
class mocked_get_cpuinfo(object):
def __init__(self, filename):
self.filename = filename
def __call__(self):
"""
Return... | 31.769231 | 83 | 0.709443 |
71ac960e38e33083ba09a5a435ae4c640892e7e9 | 263 | py | Python | 00_note.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | 25 | 2018-01-15T00:09:02.000Z | 2022-01-27T02:29:15.000Z | 00_note.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | null | null | null | 00_note.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | 18 | 2018-01-07T09:36:42.000Z | 2021-12-14T11:08:05.000Z | Reverse_Linked_List_206
136 Single Number
137 Single Number II
168 Excel Sheet Column Title
171 Excel Sheet Column Number
190 Reverse Bits
231 Power of Two
258 Add Digits
263 Ugly Number
292 Nim Game
326 Power of Three
Add_Binary_067
Count_and_Say_038 | 10.52 | 29 | 0.806084 |
dd0b584f365eac7af8820ca188dac1d77baf0735 | 4,252 | py | Python | language_model/word_frequency.py | naderabdalghani/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | 2 | 2021-12-13T04:19:30.000Z | 2022-02-16T16:27:20.000Z | language_model/word_frequency.py | MuhanadAtef/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | null | null | null | language_model/word_frequency.py | MuhanadAtef/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | 2 | 2021-08-17T06:25:36.000Z | 2021-08-17T12:45:33.000Z | import pickle
import string
from collections import Counter
from .utils import parse_into_words
class WordFrequency:
def __init__(self):
self._dictionary = Counter()
self._total_words = 0
self._unique_words = 0
self._letters = set()
self._longest_word_length = 0
s... | 31.969925 | 83 | 0.574553 |
3c2ac7d7d5f7f110839e752f7816d637cf26fc0f | 4,314 | py | Python | flexget/tests/test_npo_watchlist.py | ksurl/flexget | a54dc25780b62f80d2e638278277a945428ffd05 | [
"MIT"
] | null | null | null | flexget/tests/test_npo_watchlist.py | ksurl/flexget | a54dc25780b62f80d2e638278277a945428ffd05 | [
"MIT"
] | 13 | 2022-03-28T03:25:30.000Z | 2022-03-28T10:25:44.000Z | flexget/tests/test_npo_watchlist.py | aidan-/Flexget | 5622436a412918ef204c51e9f984cd9fe784ea7c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
@pytest.mark.online
class TestNpoWatchlistInfo:
config = """
tasks:
test:
npo_watchlist:
email: '8h3ga3+7nzf7xueal70o@sharklasers.com'
password: 'Fl3xg3t!'
"""
def test_npowatchlist_lookup(self, execute_task):... | 36.559322 | 154 | 0.605471 |
1640502d99bdbd3e6a5b8490187de0fe3278749c | 297 | py | Python | project.py | soxoj/maigret-maltego | 01ad6409622fd6b777b89452eb5112b27724a34e | [
"Apache-2.0"
] | 18 | 2021-12-22T21:14:05.000Z | 2022-03-25T00:34:14.000Z | project.py | extracru/maltego-transformation-template | 44fb514871bd406a8a401a48d85d7bc3f4aac34c | [
"Apache-2.0"
] | 2 | 2022-02-08T21:20:43.000Z | 2022-02-23T14:40:26.000Z | project.py | extracru/maltego-transformation-template | 44fb514871bd406a8a401a48d85d7bc3f4aac34c | [
"Apache-2.0"
] | 3 | 2022-02-26T02:52:54.000Z | 2022-03-25T00:34:15.000Z | import sys
import transforms
from maltego_trx.registry import register_transform_function, register_transform_classes
from maltego_trx.server import app, application
from maltego_trx.handler import handle_run
register_transform_classes(transforms)
handle_run(__name__, sys.argv, app)
| 27 | 89 | 0.841751 |
4d18da6f83a233de5db88a60e6f2db921a6eda95 | 583 | py | Python | chat_classifier/views.py | tanaysh7/Classifier_Service | e8641a579aa50018c5368e4974c14bb052a3ad5b | [
"MIT"
] | null | null | null | chat_classifier/views.py | tanaysh7/Classifier_Service | e8641a579aa50018c5368e4974c14bb052a3ad5b | [
"MIT"
] | null | null | null | chat_classifier/views.py | tanaysh7/Classifier_Service | e8641a579aa50018c5368e4974c14bb052a3ad5b | [
"MIT"
] | null | null | null | # from django.shortcuts import render
from django.http import JsonResponse
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import requests
from .model import predict
@csrf_exempt
def home(request):
#response = requests.get('http://freegeoip.net/json/')
#geodata = res... | 17.666667 | 58 | 0.692967 |
e4a37ed8173afa0f9650aeb065a9fd4a1f68b2b0 | 63,426 | py | Python | coloredlogs/__init__.py | cclloyd/python-coloredlogs | 4a3683ff7ead6298c8ac9d3b5dded535ebc7ff79 | [
"MIT"
] | null | null | null | coloredlogs/__init__.py | cclloyd/python-coloredlogs | 4a3683ff7ead6298c8ac9d3b5dded535ebc7ff79 | [
"MIT"
] | null | null | null | coloredlogs/__init__.py | cclloyd/python-coloredlogs | 4a3683ff7ead6298c8ac9d3b5dded535ebc7ff79 | [
"MIT"
] | null | null | null | # Colored terminal output for Python's logging module.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: February 16, 2020
# URL: https://coloredlogs.readthedocs.io
"""
Colored terminal output for Python's :mod:`logging` module.
.. contents::
:local:
Getting started
===============
The easiest way ... | 42.199601 | 114 | 0.64617 |
b1040cddb32f33b183a9eceb6bee29bfcf56554b | 1,076 | py | Python | web/src/stadistic/__init__.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | web/src/stadistic/__init__.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | web/src/stadistic/__init__.py | frhumanes/consulting | 400df4fc59240d2cd1c5807feaabacd056fdce03 | [
"Apache-2.0"
] | null | null | null | class StadisticRouter(object):
"""A router to control all database operations on models in
the stadistic application"""
def db_for_read(self, model, **hints):
"Point all operations on myapp models to 'other'"
if model._meta.app_label == 'stadistic':
return 'nonrel'
retur... | 37.103448 | 86 | 0.621747 |
fd1a38de4492b05c2b2aebb3fdae9d16e80d3dd3 | 2,682 | py | Python | tests/test_simple_aspp.py | crnbaker/MONAI | a4b1144efdc27b197410033ae08bd587c8a1634a | [
"Apache-2.0"
] | null | null | null | tests/test_simple_aspp.py | crnbaker/MONAI | a4b1144efdc27b197410033ae08bd587c8a1634a | [
"Apache-2.0"
] | null | null | null | tests/test_simple_aspp.py | crnbaker/MONAI | a4b1144efdc27b197410033ae08bd587c8a1634a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 MONAI Consortium
# 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, s... | 31.552941 | 118 | 0.594333 |
dfdee2abf9718f4c545e45daf4ce01f5f73ea0a6 | 5,072 | py | Python | readthedocs/builds/views.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | 2 | 2019-11-19T20:50:25.000Z | 2021-04-26T21:59:29.000Z | readthedocs/builds/views.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | 12 | 2019-12-05T04:47:01.000Z | 2022-01-09T00:56:58.000Z | readthedocs/builds/views.py | agarwalrounak/readthedocs.org | 4911600c230809bd6fb3585d1903121db2928ad6 | [
"MIT"
] | 1 | 2020-01-09T02:35:45.000Z | 2020-01-09T02:35:45.000Z | # -*- coding: utf-8 -*-
"""Views for builds app."""
import logging
import textwrap
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.http import (
HttpResponseForbidden,
HttpResponsePermanentRedirect,
HttpResponseRedirect,
)
from django.shortcuts im... | 29.835294 | 96 | 0.644716 |
dd3c1441f8f8b26473d15889198abb3593edfa51 | 11,618 | py | Python | legacy/ctr/avazu_data_processer.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 4 | 2020-01-04T13:15:02.000Z | 2021-07-21T07:50:02.000Z | legacy/ctr/avazu_data_processer.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | legacy/ctr/avazu_data_processer.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-10-31T07:18:49.000Z | 2020-01-13T03:18:39.000Z | import sys
import csv
import cPickle
import argparse
import os
import numpy as np
from utils import logger, TaskMode
parser = argparse.ArgumentParser(description="PaddlePaddle CTR example")
parser.add_argument(
'--data_path', type=str, required=True, help="path of the Avazu dataset")
parser.add_argument(
'--o... | 27.995181 | 82 | 0.599587 |
9d312da6b9468a825b1e5682e680b82cf68aabe1 | 9,388 | py | Python | sdk/python/pulumi_aws/elasticbeanstalk/environment.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elasticbeanstalk/environment.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elasticbeanstalk/environment.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
class Environment(pulumi.CustomResour... | 40.119658 | 314 | 0.669046 |
d0e804ed604e751008f49c463abf0c9aa3edb433 | 4,736 | py | Python | rdr_service/lib_fhir/fhirclient_3_0_0/models/operationdefinition_tests.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/lib_fhir/fhirclient_3_0_0/models/operationdefinition_tests.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/lib_fhir/fhirclient_3_0_0/models/operationdefinition_tests.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 on 2017-03-22.
# 2017, SMART Health IT.
import io
import json
import os
import unittest
from . import operationdefinition
from .fhirdate import FHIRDate
class OperationDefinitionTests(unittest.TestCase):
def instantiate_from(se... | 54.436782 | 187 | 0.699958 |
249cc25f23c0af32f7bcdc69dd89d7dc39754b33 | 346 | py | Python | etc/launch_common_scf.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | 1 | 2022-03-19T00:08:35.000Z | 2022-03-19T00:08:35.000Z | etc/launch_common_scf.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | null | null | null | etc/launch_common_scf.py | rubel75/aiida-wien2k | 255c4aa72a6d503b72b502371758605242b0a673 | [
"MIT"
] | null | null | null | from aiida_common_workflows.workflows.relax.wien2k import Wien2kCommonRelaxWorkChain
inputgen = Wien2kCommonRelaxWorkChain.get_input_generator()
from aiida.engine import submit, run
builder = inputgen.get_builder(structure=load_node(73739),engines= {
'relax': {
'code': 'wien2k-run123_lapw@localhost'... | 38.444444 | 84 | 0.757225 |
a0f7aa91517d82b34123e11c2477b7efc701c103 | 9,417 | py | Python | akshare/stock/stock_info.py | X-Mars/akshare | 5483fd649b7a7cfc0520b0cbaaf2d76b076855d5 | [
"MIT"
] | null | null | null | akshare/stock/stock_info.py | X-Mars/akshare | 5483fd649b7a7cfc0520b0cbaaf2d76b076855d5 | [
"MIT"
] | null | null | null | akshare/stock/stock_info.py | X-Mars/akshare | 5483fd649b7a7cfc0520b0cbaaf2d76b076855d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2021/7/6 20:31
Desc: 股票基本信息
"""
import json
import warnings
from io import BytesIO
import pandas as pd
import requests
def stock_info_sz_name_code(indicator: str = "A股列表") -> pd.DataFrame:
"""
深圳证券交易所-股票列表
http://www.szse.cn/market/product/stock/list... | 33.874101 | 140 | 0.59966 |
35713ea27f62abd8d5a0f82e0c546714203e8775 | 2,031 | py | Python | lib/sparseconvnet/__init__.py | reinforcementdriving/JS3C-Net | 40326fdbebc688c10a6247f46ed08463de0db206 | [
"MIT"
] | 136 | 2020-12-07T16:05:13.000Z | 2022-03-28T11:42:23.000Z | lib/sparseconvnet/__init__.py | reinforcementdriving/JS3C-Net | 40326fdbebc688c10a6247f46ed08463de0db206 | [
"MIT"
] | 14 | 2021-01-14T13:06:06.000Z | 2022-03-19T07:20:16.000Z | lib/sparseconvnet/__init__.py | reinforcementdriving/JS3C-Net | 40326fdbebc688c10a6247f46ed08463de0db206 | [
"MIT"
] | 23 | 2020-12-26T12:01:12.000Z | 2022-01-20T01:24:23.000Z | # Copyright 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
forward_pass_multiplyAdd_count = 0
forward_pass_hidden_states = 0
from .abstract import abstract
from .add import Add_fun, ... | 48.357143 | 108 | 0.866076 |
fdee345e80a0871b57fa37a3daf0f39bad8e17d5 | 2,274 | py | Python | app/routers/webhooks.py | NewShadesDAO/api | 1e66336f0ea526f245918ecdc328c9a66280be91 | [
"CC0-1.0"
] | 1 | 2022-03-21T07:37:02.000Z | 2022-03-21T07:37:02.000Z | app/routers/webhooks.py | NewShadesDAO/api | 1e66336f0ea526f245918ecdc328c9a66280be91 | [
"CC0-1.0"
] | 25 | 2022-01-16T13:18:21.000Z | 2022-03-29T13:08:19.000Z | app/routers/webhooks.py | NewShadesDAO/api | 1e66336f0ea526f245918ecdc328c9a66280be91 | [
"CC0-1.0"
] | 1 | 2022-01-15T21:42:00.000Z | 2022-01-15T21:42:00.000Z | import logging
from typing import Optional
from fastapi import APIRouter, Body, Header, HTTPException, Request
from sentry_sdk import capture_exception
from starlette import status
from app.helpers.queue_utils import queue_bg_task
from app.helpers.websockets import pusher_client
from app.models.webhook import Webhook... | 32.485714 | 114 | 0.734828 |
f4c21b8a026dcc3a2c50438037f289f8282004d8 | 5,153 | py | Python | manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | null | null | null | manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py | raissaa/manila-tempest-plugin | 3dd627bdec282071450694bf5399d53e9f9abd5b | [
"Apache-2.0"
] | 1 | 2021-12-22T13:14:59.000Z | 2021-12-22T13:14:59.000Z | # Copyright 2014 OpenStack Foundation
# 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 requ... | 38.744361 | 79 | 0.725015 |
d9463f7c3fc4946afa43dd826f48da8f7af15a96 | 995 | py | Python | Alternative_Notebooks/get_assignments.py | gdsa-upc/2017-Team4 | 4a4fb9aaa0703e1269e1e4353a6fcaff576d4e6a | [
"MIT"
] | null | null | null | Alternative_Notebooks/get_assignments.py | gdsa-upc/2017-Team4 | 4a4fb9aaa0703e1269e1e4353a6fcaff576d4e6a | [
"MIT"
] | null | null | null | Alternative_Notebooks/get_assignments.py | gdsa-upc/2017-Team4 | 4a4fb9aaa0703e1269e1e4353a6fcaff576d4e6a | [
"MIT"
] | 2 | 2017-12-16T19:48:38.000Z | 2017-12-22T20:24:14.000Z | from train_codebook import train_codebook
from get_local_features import get_local_features
from scipy.cluster.vq import vq, whiten
import matplotlib.pyplot as plt
import sys
import os.path as path
#dir = sys.path.insert(0,'./home/PycharmProjects/GDSA/Projecte/')
dir = path.dirname(__file__)
#dir = sys.path.insert(0,... | 27.638889 | 88 | 0.759799 |
6d62852792a1e6b61d9d4353fe9a83a933add27c | 5,524 | py | Python | homework13.py | WillSkywalker/core-python-programming | 8c8b36beb7dce6b09fc2cec17c844bcf519101c0 | [
"Apache-2.0"
] | 1 | 2015-11-12T15:10:35.000Z | 2015-11-12T15:10:35.000Z | homework13.py | WillSkywalker/core-python-programming | 8c8b36beb7dce6b09fc2cec17c844bcf519101c0 | [
"Apache-2.0"
] | null | null | null | homework13.py | WillSkywalker/core-python-programming | 8c8b36beb7dce6b09fc2cec17c844bcf519101c0 | [
"Apache-2.0"
] | null | null | null | #!usr/bin/env python
# Author: Will Skyywalker
# Core Python Programming - Homework 13
from math import sqrt, atan, pi
from time import ctime
class MoneyFmt(float): # 13-3, 13-17
def __init__(self, amount, bracket=False):
super(MoneyFmt, self).__init__()
self._amount = amount
self._brac... | 24.995475 | 61 | 0.542361 |
e43608fd33081461199e20cc093779ca67fd8543 | 132 | py | Python | pythonExercicios/ex014.py | Yhago-Carvalho/CursoPython | 343ccabb1a61e16c6078de9672c78c56deed2589 | [
"MIT"
] | null | null | null | pythonExercicios/ex014.py | Yhago-Carvalho/CursoPython | 343ccabb1a61e16c6078de9672c78c56deed2589 | [
"MIT"
] | null | null | null | pythonExercicios/ex014.py | Yhago-Carvalho/CursoPython | 343ccabb1a61e16c6078de9672c78c56deed2589 | [
"MIT"
] | null | null | null | c = float(input('Digite a temperatura em Ceusius: '))
f = (9*c + 160)/5
print(f'A temperatura de {c:.1f}ºC corresponde a {f:.1f}ºF') | 44 | 60 | 0.659091 |
fc74cb91cc134ffb0195b4d2b8941e11a49396d0 | 13,259 | py | Python | cloud_utils/gke.py | alecgunny/cloud-utils | 41df732633ed9e5180bdca50c4ad5ed8cf72a093 | [
"MIT"
] | null | null | null | cloud_utils/gke.py | alecgunny/cloud-utils | 41df732633ed9e5180bdca50c4ad5ed8cf72a093 | [
"MIT"
] | null | null | null | cloud_utils/gke.py | alecgunny/cloud-utils | 41df732633ed9e5180bdca50c4ad5ed8cf72a093 | [
"MIT"
] | null | null | null | import logging
import math
import re
import time
import typing
from contextlib import contextmanager
import attr
import google
from google.auth.transport.requests import Request as AuthRequest
from google.cloud import container_v1 as container
from google.oauth2 import service_account
from cloud_utils.k8s import K8sA... | 32.104116 | 79 | 0.617317 |
299523a629d06b024a413e1072eb4a740b9da72b | 686 | py | Python | mgnemu/models/check_comment.py | 0xporky/mgnemu | 7bbb27d945b416d08b31c92608a431e4652b2be4 | [
"MIT"
] | 1 | 2017-07-12T19:43:13.000Z | 2017-07-12T19:43:13.000Z | mgnemu/models/check_comment.py | 0xporky/mgnemu-python | 7bbb27d945b416d08b31c92608a431e4652b2be4 | [
"MIT"
] | null | null | null | mgnemu/models/check_comment.py | 0xporky/mgnemu-python | 7bbb27d945b416d08b31c92608a431e4652b2be4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Model of check comment, needed for zero checks.
"""
from mgnemu.models.base_model import BaseModel
from mgnemu.models.sales_types import COMMENT_TYPE
from mgnemu.models.sales_types import COMMENT
class CheckComment(BaseModel):
def __init__(self, data):
BaseModel.__init__(se... | 20.787879 | 50 | 0.587464 |
769eb226ac894bb66bbc593b436f61620ab66da1 | 1,785 | py | Python | Project Assignment-2/app/models.py | vedant-jad99/Cloud-Computing-Projects-and-Assignments-CS356 | c5040e6a3b99b7da56651c0b9d6c54f134aca33e | [
"Apache-2.0"
] | null | null | null | Project Assignment-2/app/models.py | vedant-jad99/Cloud-Computing-Projects-and-Assignments-CS356 | c5040e6a3b99b7da56651c0b9d6c54f134aca33e | [
"Apache-2.0"
] | null | null | null | Project Assignment-2/app/models.py | vedant-jad99/Cloud-Computing-Projects-and-Assignments-CS356 | c5040e6a3b99b7da56651c0b9d6c54f134aca33e | [
"Apache-2.0"
] | null | null | null | from app import db, login_manager
from flask_login import UserMixin
from datetime import datetime
@login_manager.user_loader
def load_user(userid):
return User.query.get(int(userid))
class User(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
first_name = db.Column(db.String(40), unique... | 48.243243 | 139 | 0.709244 |
2ecc55ca99985aa96f6ec15e1c8de910fe574848 | 3,044 | py | Python | lib/cmds/w_succ.py | poharrison/westpa | 8618ab598f9bb38a7bc1479932f5332b137dfcbc | [
"MIT"
] | 140 | 2015-01-07T23:30:36.000Z | 2022-03-28T17:15:30.000Z | lib/cmds/w_succ.py | burntyellow/westpa | 9dc62478fcef0001b9c038cd56a40b6be1b9d64a | [
"MIT"
] | 157 | 2015-01-03T03:38:36.000Z | 2022-03-31T14:12:16.000Z | lib/cmds/w_succ.py | burntyellow/westpa | 9dc62478fcef0001b9c038cd56a40b6be1b9d64a | [
"MIT"
] | 56 | 2015-01-02T21:21:40.000Z | 2022-03-03T16:27:54.000Z |
import sys, argparse
import numpy
import west, westpa
from oldtools.aframe import WESTAnalysisTool, WESTDataReaderMixin, CommonOutputMixin, BinningMixin, IterRangeMixin
import logging
log = logging.getLogger('w_succ')
class WSucc(CommonOutputMixin,WESTDataReaderMixin,WESTAnalysisTool):
def __init__(self):
... | 40.052632 | 114 | 0.595926 |
351904c8b8a2f0310da01347179effdbea1ad233 | 30,113 | py | Python | tests/common/fixtures/advanced_reboot.py | xwjiang2021/sonic-mgmt | 82c446b9fb016eb070af765aa9d9999e55b27342 | [
"Apache-2.0"
] | 2 | 2021-11-24T09:33:41.000Z | 2021-12-03T09:08:29.000Z | tests/common/fixtures/advanced_reboot.py | xwjiang2021/sonic-mgmt | 82c446b9fb016eb070af765aa9d9999e55b27342 | [
"Apache-2.0"
] | null | null | null | tests/common/fixtures/advanced_reboot.py | xwjiang2021/sonic-mgmt | 82c446b9fb016eb070af765aa9d9999e55b27342 | [
"Apache-2.0"
] | null | null | null | import copy
import ipaddress
import itertools
import json
import logging
import pytest
import time
import os
from tests.common.mellanox_data import is_mellanox_device as isMellanoxDevice
from tests.common.platform.ssh_utils import prepare_testbed_ssh_keys as prepareTestbedSshKeys
from tests.common.reboot import reboot... | 45.834094 | 139 | 0.635108 |
ce5fb0db275052c1e486cb697e9dadf06ad38787 | 355 | py | Python | tests/test_models.py | andytwoods/django-gitabix | c72867675364072d32be94d31c197430c1d46ae4 | [
"MIT"
] | null | null | null | tests/test_models.py | andytwoods/django-gitabix | c72867675364072d32be94d31c197430c1d46ae4 | [
"MIT"
] | null | null | null | tests/test_models.py | andytwoods/django-gitabix | c72867675364072d32be94d31c197430c1d46ae4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_django-gitabix
------------
Tests for `django-gitabix` models module.
"""
from django.test import TestCase
from django_gitabix import models
class TestDjango_gitabix(TestCase):
def setUp(self):
pass
def test_something(self):
pass
... | 13.653846 | 41 | 0.633803 |
a6c0674addb6370a6e8e652709d85eb54543e11e | 21,733 | py | Python | pipe/network/sample_pyramid_add_kpn_NoRefine.py | dong1015323606/tof_mpi_remove | 11ecac5db4b30affbb1785ac01397e7aa53f22cf | [
"MIT"
] | 6 | 2020-08-24T02:03:56.000Z | 2021-12-10T02:39:41.000Z | pipe/network/sample_pyramid_add_kpn_NoRefine.py | dong1015323606/tof_mpi_remove | 11ecac5db4b30affbb1785ac01397e7aa53f22cf | [
"MIT"
] | 1 | 2020-10-16T02:15:36.000Z | 2021-06-05T02:25:36.000Z | pipe/network/sample_pyramid_add_kpn_NoRefine.py | dong1015323606/tof_mpi_remove | 11ecac5db4b30affbb1785ac01397e7aa53f22cf | [
"MIT"
] | 6 | 2020-09-25T12:20:44.000Z | 2021-11-25T03:13:36.000Z | import sys
sys.path.insert(0, './module/')
import tensorflow as tf
from dataset import *
from activation import *
from conv import conv
from dfus_block import dfus_block_add_output_conv
tf.logging.set_verbosity(tf.logging.INFO)
PI = 3.14159265358979323846
flg = False
dtype = tf.float32
def feature_extractor_subnet... | 32.632132 | 287 | 0.528781 |
f3620b66f17c9d86090322d9f2ba0c3695dd0947 | 492 | py | Python | annotypes/py2_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 2 | 2019-08-16T11:40:21.000Z | 2019-10-25T12:43:48.000Z | annotypes/py2_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 3 | 2019-03-12T11:03:23.000Z | 2019-07-02T10:24:28.000Z | annotypes/py2_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 1 | 2020-08-14T13:52:01.000Z | 2020-08-14T13:52:01.000Z | import time
from annotypes import WithCallTypes, add_call_types, Anno
from .simple import Simple
with Anno("Parameters to take"):
ASimple = Simple
class ReuseCls(WithCallTypes):
@add_call_types
def validate(self, params):
# type: (ASimple) -> ASimple
if params.exposure < 0.4:
... | 19.68 | 57 | 0.646341 |
3d93f98fc67dd0c9bae1a7789476c63b9f5f5603 | 2,456 | py | Python | geist/keyboard.py | thetestpeople/Geist | a1ef16d8b4c3777735008b671a50acfde3ce7bf1 | [
"MIT"
] | 5 | 2015-05-01T15:58:48.000Z | 2017-04-19T03:38:25.000Z | geist/keyboard.py | tonysimpson/Geist | a1ef16d8b4c3777735008b671a50acfde3ce7bf1 | [
"MIT"
] | 1 | 2016-08-05T17:05:02.000Z | 2016-08-05T17:05:02.000Z | geist/keyboard.py | tonysimpson/Geist | a1ef16d8b4c3777735008b671a50acfde3ce7bf1 | [
"MIT"
] | 2 | 2016-09-27T13:45:31.000Z | 2017-05-21T14:08:57.000Z | def keyboard_layout_factory(layout_name):
if layout_name != 'default':
raise ValueError('unsupported keyboard layout %r' % (layout_name,))
return CouldDoBetterKeyboardLayout()
def _key_down_up(name):
return [KeyDown(name), KeyUp(name)]
class CouldDoBetterKeyboardLayout(object):
"""Converts s... | 27.909091 | 78 | 0.551303 |
5c35760686627614867cae48f3af027817ac514c | 3,990 | py | Python | meshmodapi/settings.py | CoHutso/mesh-mod-api | 80d206aec1c1aecba672240ecaeadf3d3c9883d3 | [
"MIT"
] | null | null | null | meshmodapi/settings.py | CoHutso/mesh-mod-api | 80d206aec1c1aecba672240ecaeadf3d3c9883d3 | [
"MIT"
] | null | null | null | meshmodapi/settings.py | CoHutso/mesh-mod-api | 80d206aec1c1aecba672240ecaeadf3d3c9883d3 | [
"MIT"
] | null | null | null | """
Django settings for meshmodapi project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from path... | 27.517241 | 118 | 0.720802 |
b61e67eca1b6c87768e531194c09351b0e466655 | 1,647 | py | Python | pinax/teams/decorators.py | auto-mat/pinax-teams | 6d05f5c161fa51cc5ebe87cdea03d821ea1d424c | [
"MIT"
] | null | null | null | pinax/teams/decorators.py | auto-mat/pinax-teams | 6d05f5c161fa51cc5ebe87cdea03d821ea1d424c | [
"MIT"
] | null | null | null | pinax/teams/decorators.py | auto-mat/pinax-teams | 6d05f5c161fa51cc5ebe87cdea03d821ea1d424c | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import functools
from django.http import Http404
from django.shortcuts import get_object_or_404
from django.utils.decorators import available_attrs
from account.decorators import login_required
from .models import Membership, Team
def team_required(func=None):
"""
D... | 32.94 | 80 | 0.681846 |
29278f4a616ec7759cec64dd8c8fa3be31882b7e | 20,220 | py | Python | foiamachine/apps/mail/models.py | saizai/foiamachine | 344007d57b47ac93df637e4a282c4d87cc6f78e3 | [
"Unlicense",
"MIT"
] | 9 | 2017-08-02T16:28:10.000Z | 2021-07-19T09:51:46.000Z | foiamachine/apps/mail/models.py | saizai/foiamachine | 344007d57b47ac93df637e4a282c4d87cc6f78e3 | [
"Unlicense",
"MIT"
] | null | null | null | foiamachine/apps/mail/models.py | saizai/foiamachine | 344007d57b47ac93df637e4a282c4d87cc6f78e3 | [
"Unlicense",
"MIT"
] | 5 | 2017-10-10T23:15:02.000Z | 2021-07-19T09:51:48.000Z | from django.db import models
from django.db.models import Q
from django.conf import settings
from django_extensions.db.fields import AutoSlugField
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.utils import timezone
from werkzeug.datastructures import MultiDict
from time import mktime
imp... | 41.349693 | 128 | 0.601039 |
237c9ee8c09c9ccf9f21f574ffec9a903f7b08e1 | 4,277 | py | Python | web/app.py | DewaldOosthuizen/article_project1 | 68522180239ff6986966b4fc9385c52b312d171f | [
"MIT"
] | 7 | 2019-03-27T06:14:38.000Z | 2020-08-03T19:14:35.000Z | web/app.py | DewaldOosthuizen/article_project1 | 68522180239ff6986966b4fc9385c52b312d171f | [
"MIT"
] | 1 | 2020-06-13T08:22:22.000Z | 2020-06-13T17:59:11.000Z | web/app.py | DewaldOosthuizen/article_project1 | 68522180239ff6986966b4fc9385c52b312d171f | [
"MIT"
] | 5 | 2019-09-18T19:25:24.000Z | 2021-09-20T20:32:53.000Z | # import functools
import bcrypt
from flask import Flask, jsonify, request
from flask_restful import Api, Resource
from pymongo import MongoClient
# print = functools.partial(print, flush=True)
app = Flask(__name__)
api = Api(app)
client = MongoClient("mongodb://my_db:27017")
db = client.projectDB
users = db["Users"... | 22.62963 | 76 | 0.589432 |
7dd4d00a8c45e99629a7a2b0a827f07a0c5ec9b5 | 85,144 | py | Python | docusign_esign/models/envelope_id.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | docusign_esign/models/envelope_id.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | docusign_esign/models/envelope_id.py | Thinkful/docusign-esign-python-client | d4e84468cfc502fc4a99277cd7440e2f42e66443 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 35.329461 | 2,170 | 0.672848 |
4807b9388e4c5a401b1a1522fc93591862cd5f5e | 13,246 | py | Python | pyof/v0x04/common/action.py | lucasgsfelix/python-openflow | d46fbf78ffc7693aafb179185b7c2d3c8988b151 | [
"MIT"
] | null | null | null | pyof/v0x04/common/action.py | lucasgsfelix/python-openflow | d46fbf78ffc7693aafb179185b7c2d3c8988b151 | [
"MIT"
] | null | null | null | pyof/v0x04/common/action.py | lucasgsfelix/python-openflow | d46fbf78ffc7693aafb179185b7c2d3c8988b151 | [
"MIT"
] | null | null | null | """Defines actions that may be associated with flows packets."""
# System imports
from enum import IntEnum
from math import ceil
# Local source tree imports
from pyof.foundation.base import GenericStruct
from pyof.foundation.basic_types import (
FixedTypeList, Pad, UBInt8, UBInt16, UBInt32)
from pyof.v0x04.common.... | 30.242009 | 79 | 0.653858 |
9ecce7387941b55e41e17aaf82876bd985c89ccb | 22,213 | py | Python | generated/ansible-collection/batchcertificate.py | audevbot/autorest.devops.debug | a507fb6e2dd7826212537f27d583f203aac1c28f | [
"MIT"
] | null | null | null | generated/ansible-collection/batchcertificate.py | audevbot/autorest.devops.debug | a507fb6e2dd7826212537f27d583f203aac1c28f | [
"MIT"
] | null | null | null | generated/ansible-collection/batchcertificate.py | audevbot/autorest.devops.debug | a507fb6e2dd7826212537f27d583f203aac1c28f | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2019 Zim Kalinowski, (@zikalino)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 32.286337 | 113 | 0.510242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.