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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba800bf3fafd4d1117b5751ba64320b7d4c9cfab | 4,794 | py | Python | genetics/fitnessTest.py | TeamAbstract/GeneticScheduling | 8c2830b595c8389af372d9fbf02abed2ea2cfa5c | [
"Apache-2.0"
] | null | null | null | genetics/fitnessTest.py | TeamAbstract/GeneticScheduling | 8c2830b595c8389af372d9fbf02abed2ea2cfa5c | [
"Apache-2.0"
] | 6 | 2015-02-27T14:27:52.000Z | 2016-01-14T11:11:15.000Z | genetics/fitnessTest.py | TeamAbstract/GeneticScheduling | 8c2830b595c8389af372d9fbf02abed2ea2cfa5c | [
"Apache-2.0"
] | null | null | null | from datetime import datetime as DateTime
from genetics.genepool import GenePool
from vessels import Vessels
from schedule import Schedule
import util
import settings
class FitnessTest:
# Weighting #TODO fine tune weighting
bonusPerHourTillDeadline = 5
penaltyPerHourOverDeadline = -10
penaltyPerHourOverlapping ... | 29.411043 | 96 | 0.744472 |
ac9ef7f3ffeda6b7c1fde06d4515dfa110d65ba2 | 4,004 | py | Python | jsparser/lexer.py | sandin/JSParser | 1b894d5be90e8a0669f1d730a05cf4cf40509e60 | [
"Apache-2.0"
] | 1 | 2021-11-01T01:50:39.000Z | 2021-11-01T01:50:39.000Z | jsparser/lexer.py | sandin/JSParser | 1b894d5be90e8a0669f1d730a05cf4cf40509e60 | [
"Apache-2.0"
] | null | null | null | jsparser/lexer.py | sandin/JSParser | 1b894d5be90e8a0669f1d730a05cf4cf40509e60 | [
"Apache-2.0"
] | null | null | null | import enum
g_last_char: str = ' '
g_identifier_str: str = None
g_number_val: float = 0
g_cur_token = None
def reset():
global g_last_char, g_identifier_str, g_number_val, g_cur_token
g_last_char = ' '
g_identifier_str = None
g_number_val = 0
g_cur_token = None
class Token(enum.IntEnum):
EO... | 28.197183 | 166 | 0.586414 |
d8a1e985680f36bc9afa3d80da767f2fe34abe8e | 11,308 | py | Python | scripts/calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | scripts/calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | scripts/calc_metrics.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | 45.051793 | 145 | 0.653962 |
1900c8f148f0541570397e724a6c6531deb98b2b | 177 | py | Python | run.py | hhoosshhii53pinkwest/shiritori | d9a2eca72af91a5d0fc948e921d51bb3ed2a15f2 | [
"MIT"
] | null | null | null | run.py | hhoosshhii53pinkwest/shiritori | d9a2eca72af91a5d0fc948e921d51bb3ed2a15f2 | [
"MIT"
] | null | null | null | run.py | hhoosshhii53pinkwest/shiritori | d9a2eca72af91a5d0fc948e921d51bb3ed2a15f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from slackbot.bot import Bot
def main():
bot = Bot()
bot.run()
if __name__ == "__main__":
print('start slackbot')
main()
| 16.090909 | 29 | 0.525424 |
3b9a8d08f3541e93cee07aa304e8c8a3313755e9 | 10,173 | py | Python | degiroapi/__init__.py | SilageTime/DegiroAPI | b95860ae3286c17cd2e8dbc13ea31a4eb4bcc785 | [
"MIT"
] | null | null | null | degiroapi/__init__.py | SilageTime/DegiroAPI | b95860ae3286c17cd2e8dbc13ea31a4eb4bcc785 | [
"MIT"
] | null | null | null | degiroapi/__init__.py | SilageTime/DegiroAPI | b95860ae3286c17cd2e8dbc13ea31a4eb4bcc785 | [
"MIT"
] | null | null | null | import requests
from degiroapi.order import Order
from degiroapi.client_info import ClientInfo
from degiroapi.datatypes import Data
class DeGiro:
__LOGIN_URL = 'https://trader.degiro.nl/login/secure/login'
__LOGOUT_URL = 'https://trader.degiro.nl/trading/secure/logout'
__CLIENT_INFO_URL = 'https://trader.d... | 45.415179 | 154 | 0.588322 |
8e70ac502181662d1f6f44e013914a16620e8d51 | 745 | py | Python | webapp/graphite/node.py | chicagobuss/graphite-web | 8f13d44d446acfaecefb438f1f4b8f56e5164092 | [
"Apache-2.0"
] | 2 | 2015-05-01T07:48:42.000Z | 2019-06-17T18:55:55.000Z | webapp/graphite/node.py | kamaradclimber/graphite-web | 522d84fed687bd946878e48d85982d59f7bd1267 | [
"Apache-2.0"
] | 2 | 2021-06-10T19:24:59.000Z | 2022-02-11T03:39:33.000Z | webapp/graphite/node.py | kamaradclimber/graphite-web | 522d84fed687bd946878e48d85982d59f7bd1267 | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:22.000Z | 2019-04-19T09:55:52.000Z |
class Node(object):
__slots__ = ('name', 'path', 'local', 'is_leaf')
def __init__(self, path):
self.path = path
self.name = path.split('.')[-1]
self.local = True
self.is_leaf = False
def __repr__(self):
return '<%s[%x]: %s>' % (self.__class__.__name__, id(self), self.path)
class BranchNo... | 21.911765 | 74 | 0.636242 |
43d1f593d8d4326a55321cbb9249f82ff4edd488 | 11,855 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_ssl_certkey.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/network/netscaler/netscaler_ssl_certkey.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/network/netscaler/netscaler_ssl_certkey.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-10-30T12:48:24.000Z | 2020-10-30T12:48:24.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Citrix Systems
# 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',
... | 31.86828 | 136 | 0.592324 |
226d18cc3eab0ef89909ec04d8bc2573e6aa763b | 19,460 | py | Python | src/transformers/models/fsmt/tokenization_fsmt.py | reichang182/Transformer | 301536b15f1e757c51411800c25876617e9f1191 | [
"Apache-2.0"
] | 2 | 2021-09-20T05:44:21.000Z | 2022-01-25T08:13:44.000Z | src/transformers/models/fsmt/tokenization_fsmt.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/fsmt/tokenization_fsmt.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | 1 | 2021-04-19T20:49:55.000Z | 2021-04-19T20:49:55.000Z | # coding=utf-8
# Copyright 2019 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 37.640232 | 121 | 0.605447 |
0c7ac38273a2c7a34ff7631c51a1005aa56f7201 | 1,471 | py | Python | app/apiv2/organizations/locations/roles/schedules/timeclocks/timeclocks.py | matthewstrasiotto/suite | 8d83208f965f23e0a33db6b3b7f9e5126f7324f8 | [
"MIT"
] | null | null | null | app/apiv2/organizations/locations/roles/schedules/timeclocks/timeclocks.py | matthewstrasiotto/suite | 8d83208f965f23e0a33db6b3b7f9e5126f7324f8 | [
"MIT"
] | null | null | null | app/apiv2/organizations/locations/roles/schedules/timeclocks/timeclocks.py | matthewstrasiotto/suite | 8d83208f965f23e0a33db6b3b7f9e5126f7324f8 | [
"MIT"
] | null | null | null | from flask_restful import marshal, reqparse, Resource
from app.constants import API_ENVELOPE
from app.models import Schedule2, Timeclock
from app.apiv2.decorators import verify_org_location_role_schedule, \
permission_location_manager
from app.apiv2.marshal import timeclock_fields
class ScheduleTimeclocksApi(Re... | 32.688889 | 86 | 0.658736 |
af00da665410b17978a3af46701683e86932fbe2 | 1,012 | py | Python | bin/update-search-index.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 4 | 2016-11-07T13:02:18.000Z | 2019-09-03T02:04:05.000Z | bin/update-search-index.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 21 | 2016-11-30T20:44:52.000Z | 2017-05-02T15:38:56.000Z | bin/update-search-index.py | not-nexus/shelf | ea59703082402ad3b6454482f0487418295fbd19 | [
"MIT"
] | 2 | 2017-01-24T14:36:04.000Z | 2020-01-13T16:10:05.000Z | #!/usr/bin/env python
import docopt
from shelf.bulk_update.utils import run
doc = """Usage: ./update-search-index [options] <config-path>
Options:
-b --bucket bucket The name of the bucket, or buckets that you
would like to rebuild the search index for.
... | 37.481481 | 81 | 0.499012 |
91616a80184b52ab46dccf79fd5420217f8cc819 | 118 | py | Python | n2w_it/__init__.py | IlGalvo/N2W-IT | 5dd0ce1c688d2e1e25feb484b93f4ea83394824e | [
"MIT"
] | 1 | 2021-03-29T11:51:25.000Z | 2021-03-29T11:51:25.000Z | n2w_it/__init__.py | IlGalvo/N2W-IT | 5dd0ce1c688d2e1e25feb484b93f4ea83394824e | [
"MIT"
] | null | null | null | n2w_it/__init__.py | IlGalvo/N2W-IT | 5dd0ce1c688d2e1e25feb484b93f4ea83394824e | [
"MIT"
] | null | null | null | __author__ = "Andrea Galvani"
__email__ = "Andrea.Galvani96@outlook.com"
__version__ = "1.0.1"
from .n2w_it import *
| 19.666667 | 42 | 0.737288 |
d87029ab643909ccbdbb6934a43ef8d386817362 | 515 | py | Python | webdev/fornecedores/migrations/0018_auto_20210524_1806.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | null | null | null | webdev/fornecedores/migrations/0018_auto_20210524_1806.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | 103 | 2021-04-25T21:28:11.000Z | 2022-03-15T01:36:31.000Z | webdev/fornecedores/migrations/0018_auto_20210524_1806.py | h-zanetti/jewelry-manager | 74166b89f492303b8ebf5ff8af058f394eb2a28b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-05-24 21:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fornecedores', '0017_auto_20210520_1847'),
]
operations = [
migrations.AlterField(
model_name='dadosbancarios',
name... | 27.105263 | 155 | 0.617476 |
eac28bcd365a2a919beca9f8de527baa4cb54e1e | 2,216 | py | Python | src/quico.py | JohannHospice/quico | 3936c1849c06b93b4d167734e526a5526cc7b053 | [
"MIT"
] | null | null | null | src/quico.py | JohannHospice/quico | 3936c1849c06b93b4d167734e526a5526cc7b053 | [
"MIT"
] | null | null | null | src/quico.py | JohannHospice/quico | 3936c1849c06b93b4d167734e526a5526cc7b053 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import subprocess
def main():
args, unknown_joined = parse_known_args()
build_cmd = CommandBuilder(['docker', 'build'])
build_cmd.append_with_option('-f', args.file)
build_cmd.append_with_option('-t', args.tag)
build_cmd.append(args.directory)
ru... | 31.657143 | 139 | 0.657491 |
0c82e334b65819d5d953cce17a9ef92ead5d98f2 | 7,065 | py | Python | cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 167 | 2017-11-14T20:37:28.000Z | 2022-03-31T11:19:18.000Z | cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 2,190 | 2017-06-14T12:48:13.000Z | 2022-03-31T16:09:51.000Z | cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py | victorusu/reframe | e98078a990e31a47604b06d674e4ee730c22cd44 | [
"BSD-3-Clause"
] | 83 | 2017-05-29T19:12:16.000Z | 2022-03-18T09:49:21.000Z | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import reframe as rfm
import reframe.utility.sanity as sn
@rfm.simple_test
class HaloCellExchangeTest(rfm.RegressionTest):
... | 46.788079 | 78 | 0.479264 |
f39573bcdad939b3695a2ff240cd6ace61a22524 | 6,380 | py | Python | event_callback.py | KyrinCode/python-sdk | 57dd02388d6b8552ad346d72838c2fd8177fec65 | [
"MIT"
] | 61 | 2019-07-03T07:40:17.000Z | 2022-03-06T13:30:53.000Z | event_callback.py | KyrinCode/python-sdk | 57dd02388d6b8552ad346d72838c2fd8177fec65 | [
"MIT"
] | 105 | 2019-07-25T08:48:59.000Z | 2022-03-23T03:47:34.000Z | event_callback.py | KyrinCode/python-sdk | 57dd02388d6b8552ad346d72838c2fd8177fec65 | [
"MIT"
] | 61 | 2019-07-03T06:58:42.000Z | 2022-02-16T08:50:14.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
FISCO BCOS/Python-SDK is a python client for FISCO BCOS2.0 (https://github.com/FISCO-BCOS/)
FISCO BCOS/Python-SDK is free software: you can redistribute it and/or modify it under the
terms of the MIT License as published by the Free Software Foundation. This proje... | 35.444444 | 109 | 0.670846 |
2c146b5c3b1a1974b34c4daff216ed3881890272 | 4,547 | py | Python | pysparkle/frontend/qt.py | macdems/pysparkle | 7d6018e5f2010d6a79fe71bc972bd29c61a113bc | [
"MIT"
] | 1 | 2015-12-19T19:25:15.000Z | 2015-12-19T19:25:15.000Z | pysparkle/frontend/qt.py | macdems/pysparkle | 7d6018e5f2010d6a79fe71bc972bd29c61a113bc | [
"MIT"
] | null | null | null | pysparkle/frontend/qt.py | macdems/pysparkle | 7d6018e5f2010d6a79fe71bc972bd29c61a113bc | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2016 Maciej Dems <maciej.dems@p.lodz.pl>
# See LICENSE file for copyright information.
import sys
if 'PySide6' in sys.modules:
from PySide6.QtWidgets import QMessageBox, QLabel, QTextEdit
_exec_attr = 'exec'
elif 'PyQt6' in sys.modules:
from PyQt6.QtWidgets import QMessageBox, QLabel, ... | 45.47 | 107 | 0.710798 |
3788d7c3d4ca83cde1621bc7f858b8fc2b420806 | 2,367 | py | Python | salt/salt/custom/tests/multi_breakout_test.py | stirlab/headless-selenium-test-server | 0faa49c9bfbc3cc168033134bc1c5e901b086235 | [
"MIT"
] | 2 | 2017-11-30T08:49:04.000Z | 2018-05-14T22:49:24.000Z | salt/salt/custom/tests/multi_breakout_test.py | stirlab/headless-selenium-test-server | 0faa49c9bfbc3cc168033134bc1c5e901b086235 | [
"MIT"
] | null | null | null | salt/salt/custom/tests/multi_breakout_test.py | stirlab/headless-selenium-test-server | 0faa49c9bfbc3cc168033134bc1c5e901b086235 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import signal
import sys
import time
from selenium.common.exceptions import StaleElementReferenceException
from selenium.common.exceptions import WebDriverException
import test_common as common
import test_config as config
from user_map import user_map
session_map = {
"webrtc-test.stirlab.loc... | 21.518182 | 105 | 0.661174 |
8563090ea581688e9772d7c8c3a969d1a7caceb1 | 2,865 | py | Python | conanfile.py | BentouDev/AssimpConan | 34b86b571f939b107ef69ef3011e1615ca1b63c9 | [
"MIT"
] | null | null | null | conanfile.py | BentouDev/AssimpConan | 34b86b571f939b107ef69ef3011e1615ca1b63c9 | [
"MIT"
] | null | null | null | conanfile.py | BentouDev/AssimpConan | 34b86b571f939b107ef69ef3011e1615ca1b63c9 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
import os, platform
assimp_version = os.getenv('ASSIMP_VERSION', '0.0')
assimp_commit = os.getenv('ASSIMP_COMMIT', '')
class AssimpConan(ConanFile):
name = "assimp"
license = "MIT"
url = "https://github.com/BentouDev/AssimpConan"
version = assimp_version
... | 37.207792 | 92 | 0.616056 |
0289e8392361b366bf62daa231a49bc023afe32f | 3,058 | py | Python | dataset/vidor_hoid_mini.py | sx14/ST-HOID-helper | f0822307fe03548c92dc1e2ef80bb738ed0bd3f5 | [
"MIT"
] | null | null | null | dataset/vidor_hoid_mini.py | sx14/ST-HOID-helper | f0822307fe03548c92dc1e2ef80bb738ed0bd3f5 | [
"MIT"
] | null | null | null | dataset/vidor_hoid_mini.py | sx14/ST-HOID-helper | f0822307fe03548c92dc1e2ef80bb738ed0bd3f5 | [
"MIT"
] | null | null | null | import os
import glob
from tqdm import tqdm
from dataset import DatasetV1
class VidOR_HOID(DatasetV1):
"""
VidOR-HOID dataset
"""
def __init__(self, anno_rpath, video_rpath, splits, low_memory=True):
"""
anno_rpath: the root path of annotations
video_rpath: the root path of v... | 39.714286 | 128 | 0.630804 |
81f819598f9c996976e2a3babbedc8804e434b39 | 6,716 | py | Python | python-gstreamer-webrtc-client/gst-exp/run.py | raushanraja/webrtc-example | b6ed87a29c4c7837962ac8c849a75823f6bbe471 | [
"Apache-2.0"
] | null | null | null | python-gstreamer-webrtc-client/gst-exp/run.py | raushanraja/webrtc-example | b6ed87a29c4c7837962ac8c849a75823f6bbe471 | [
"Apache-2.0"
] | null | null | null | python-gstreamer-webrtc-client/gst-exp/run.py | raushanraja/webrtc-example | b6ed87a29c4c7837962ac8c849a75823f6bbe471 | [
"Apache-2.0"
] | null | null | null | import random
import ssl
import websockets
import asyncio
import os
import sys
import json
import argparse
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst
gi.require_version('GstWebRTC', '1.0')
from gi.repository import GstWebRTC
gi.require_version('GstSdp', '1.0')
from gi.repository import G... | 36.901099 | 129 | 0.625968 |
be53589ba3eba1da3b9f895fd6ecfd64fd76a9da | 451 | py | Python | data/scripts/templates/object/tangible/lair/bol/shared_lair_bol_grassland.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/lair/bol/shared_lair_bol_grassland.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/lair/bol/shared_lair_bol_grassland.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/lair/bol/shared_lair_bol_grassland.iff"
result.attribute_template_i... | 26.529412 | 75 | 0.727273 |
8753534109c83b44dc8f21c9d0d2f0932f760144 | 1,780 | py | Python | biliup/engine/upload.py | DingKuiqing/bilibiliupload | 7fa66ece796859219b2119edfc7e6838fd7c4bfa | [
"MIT"
] | 1 | 2021-08-15T07:27:57.000Z | 2021-08-15T07:27:57.000Z | biliup/engine/upload.py | yzydlc/bilibiliupload | 89428db415f55c63d6431f320ed3c83c3481448f | [
"MIT"
] | null | null | null | biliup/engine/upload.py | yzydlc/bilibiliupload | 89428db415f55c63d6431f320ed3c83c3481448f | [
"MIT"
] | null | null | null | import logging
import os
logger = logging.getLogger('biliup')
class UploadBase:
def __init__(self, principal, data, persistence_path=None):
self.principal = principal
self.persistence_path = persistence_path
self.data = data
# @property
@staticmethod
def file_list(index):
... | 28.709677 | 78 | 0.574157 |
d458617b924ccd4e62e9bf591893230723efd0e6 | 13,123 | py | Python | third_party/saltedge/swagger_client/models/report.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | 1 | 2022-03-01T10:28:31.000Z | 2022-03-01T10:28:31.000Z | third_party/saltedge/swagger_client/models/report.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | 75 | 2020-11-07T20:14:55.000Z | 2021-10-05T15:08:22.000Z | third_party/saltedge/swagger_client/models/report.py | ltowarek/budget-supervisor | 862a2d720aecd4ad2fded9c63bc839190ebbc77e | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Salt Edge Account Information API
API Reference for services # noqa: E501
OpenAPI spec version: 5.0.0
Contact: support@saltedge.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Report(object):
... | 31.621687 | 226 | 0.592243 |
8d8c21835a9c4da45bdec445ad5ccfd3e8eace76 | 10,826 | py | Python | tests/test_modeling_tf_openai.py | christy-yuan-li/transformers-1 | 2ee9f9b69e67426aaed690f652f9cdd8b524b99d | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_tf_openai.py | christy-yuan-li/transformers-1 | 2ee9f9b69e67426aaed690f652f9cdd8b524b99d | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_tf_openai.py | christy-yuan-li/transformers-1 | 2ee9f9b69e67426aaed690f652f9cdd8b524b99d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The HuggingFace Team. 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 requir... | 37.331034 | 117 | 0.669315 |
3515e554c0e1de4d081f0f0894607b26c1ada925 | 6,434 | py | Python | crawer.py | code-aifarmer/Image-crawling-program-developed-based-on-PyQt5 | 6a897f958f3b82fbcf124722098110d59f76c608 | [
"MIT"
] | 2 | 2021-01-20T16:30:25.000Z | 2021-05-20T15:09:22.000Z | crawer.py | code-aifarmer/Image-crawling-program-developed-based-on-PyQt5 | 6a897f958f3b82fbcf124722098110d59f76c608 | [
"MIT"
] | null | null | null | crawer.py | code-aifarmer/Image-crawling-program-developed-based-on-PyQt5 | 6a897f958f3b82fbcf124722098110d59f76c608 | [
"MIT"
] | 2 | 2021-01-22T04:21:07.000Z | 2021-05-20T15:09:26.000Z | # -*- coding: utf-8 -*-
from ui_mainwindow import Ui_MainWindow
import utils
from PyQt5.Qt import *
from PyQt5.QtTest import QTest
from threading import Thread
import shlex
import os
from tkinter import messagebox
import image_downloader
from logger import logger
# class DialogAbout(QDialog, Ui_Dialog_about):
# ... | 32.826531 | 99 | 0.617345 |
8d7294bb7a717ca92590937bf21dec0a3ba356e0 | 156 | py | Python | arch_elements/model_def/__init__.py | martsec/arcitectural_elements_identifier | 87607e87f714443c5aa37c96896b76a4f6f424d4 | [
"AAL"
] | null | null | null | arch_elements/model_def/__init__.py | martsec/arcitectural_elements_identifier | 87607e87f714443c5aa37c96896b76a4f6f424d4 | [
"AAL"
] | null | null | null | arch_elements/model_def/__init__.py | martsec/arcitectural_elements_identifier | 87607e87f714443c5aa37c96896b76a4f6f424d4 | [
"AAL"
] | null | null | null | from .mobilenet import Mobilenet
from .cnn import CNN
from .svm import SVMClassifier
__all__ = [
"Mobilenet",
"CNN",
"SVMClassifier",
] | 17.333333 | 33 | 0.653846 |
60573010333516771d53c2e0c6a36c55e4898b93 | 1,762 | py | Python | pygisty/gisty/headless.py | BlyatManGopnik/pygisty | e9ba1b41e6c873cf3ce7bb449d119669940a767b | [
"MIT"
] | 1 | 2022-03-26T06:46:01.000Z | 2022-03-26T06:46:01.000Z | pygisty/gisty/headless.py | Amedlio/pygisty | dfb7f624b3bba0a3972bd01eac297dcb23e17181 | [
"MIT"
] | 1 | 2022-03-26T08:10:34.000Z | 2022-03-26T08:12:15.000Z | pygisty/gisty/headless.py | Amedlio/pygisty | dfb7f624b3bba0a3972bd01eac297dcb23e17181 | [
"MIT"
] | 1 | 2022-03-26T06:30:40.000Z | 2022-03-26T06:30:40.000Z | import requests
import json
import time
def headless(clientid, configdir):
global authtoken
global headlessdone
global devicecode
headlessdone = False
print(clientid)
print("Starting headless GitHub authentication")
pog = {"client_id": clientid, "scope": "gist"}
header = {'User-Agent':... | 35.959184 | 110 | 0.568672 |
8f4b5933201e7fa3723c7fc51b1f9bea5f0fc838 | 4,289 | py | Python | ci/UpdateCi.py | WOCyo/chinese-poetry | 88ac4a5104c9435fbf172b9b25f4200654c2a237 | [
"MIT"
] | 1 | 2022-03-21T14:04:31.000Z | 2022-03-21T14:04:31.000Z | ci/UpdateCi.py | WOCyo/chinese-poetry | 88ac4a5104c9435fbf172b9b25f4200654c2a237 | [
"MIT"
] | null | null | null | ci/UpdateCi.py | WOCyo/chinese-poetry | 88ac4a5104c9435fbf172b9b25f4200654c2a237 | [
"MIT"
] | null | null | null | import json
import logging
import os
import re
from difflib import SequenceMatcher
import requests
from bs4 import BeautifulSoup
from bs4.element import NavigableString
def get_page_content(page: int) -> list:
""" 获取目录页每一页的内容 """
content = []
r = requests.post("http://qsc.zww.cn/getdata.asp", data={
... | 31.306569 | 105 | 0.547214 |
674fd21e8889269802d5c0a2d62bbc6b4828db29 | 20,608 | py | Python | tensorflow_privacy/privacy/analysis/rdp_privacy_accountant.py | andrewyguo/privacy | a33afde0c105ece6c48b17a80f13899cf3e7c1b3 | [
"Apache-2.0"
] | null | null | null | tensorflow_privacy/privacy/analysis/rdp_privacy_accountant.py | andrewyguo/privacy | a33afde0c105ece6c48b17a80f13899cf3e7c1b3 | [
"Apache-2.0"
] | null | null | null | tensorflow_privacy/privacy/analysis/rdp_privacy_accountant.py | andrewyguo/privacy | a33afde0c105ece6c48b17a80f13899cf3e7c1b3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.508943 | 80 | 0.65426 |
966e552590e84aaad282fe310ab44a4b93d8e287 | 4,119 | py | Python | bitmex_websocket/_bitmex_websocket.py | tmaeda1981jp/bitmex-websocket | 160d662a7db03834701dc27f6ed908b90ad6b75b | [
"MIT"
] | null | null | null | bitmex_websocket/_bitmex_websocket.py | tmaeda1981jp/bitmex-websocket | 160d662a7db03834701dc27f6ed908b90ad6b75b | [
"MIT"
] | null | null | null | bitmex_websocket/_bitmex_websocket.py | tmaeda1981jp/bitmex-websocket | 160d662a7db03834701dc27f6ed908b90ad6b75b | [
"MIT"
] | null | null | null | from bitmex_websocket.auth.api_key_auth import generate_nonce,\
generate_signature
from bitmex_websocket.settings import settings
from pyee import EventEmitter
from urllib.parse import urlparse
from websocket import WebSocketApp
import alog
import json
import ssl
import time
__all__ = ['BitMEXWebsocket']
class ... | 27.098684 | 76 | 0.599903 |
f3d25a52030648e8f143121ef4e121eab2d1d163 | 1,250 | py | Python | backend/config/testing.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | null | null | null | backend/config/testing.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 368 | 2018-12-18T14:43:20.000Z | 2022-03-02T02:54:18.000Z | backend/config/testing.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 2 | 2019-10-02T03:06:06.000Z | 2020-10-05T16:53:48.000Z | import os
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = "postgresql://ed_user:ed_pass@localhost/stardrive_test"
TESTING = True
CORS_ENABLED = True
DEBUG = False
DEVELOPMENT = False
MASTER_URL = "http://localhost:5000"
MASTER_EMAIL = "daniel.h.funk@gmail.com"
MASTER_PASS = "dfunk7"
MI... | 30.487805 | 81 | 0.716 |
2f6337e162ad32a70995654d15ce0b560ae0d3d7 | 3,492 | py | Python | venv/Lib/site-packages/pandas/tests/indexes/multi/test_missing.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/indexes/multi/test_missing.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/indexes/multi/test_missing.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
from pandas import MultiIndex
import pandas._testing as tm
def test_fillna(idx):
# GH 11343
msg = "isna is not defined for MultiIndex"
with pytest.raises(NotImplementedError, match=msg):
idx.fillna(idx[0])
def test_dropna():
... | 30.365217 | 85 | 0.580183 |
afcb2cd2413c35eb509560cf24f7a2a882ae639c | 1,133 | py | Python | virtual/Lib/site-packages/pylint/test/functional/names_in__all__.py | JamesKimari/pitch-one | aac9007716bf2e3b6446588a06508fac068f3d20 | [
"MIT"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/names_in__all__.py | evantoh/patient-management-system | 6637eb1344775633759165260ed99843581c0e72 | [
"Unlicense"
] | 32 | 2018-05-01T05:24:43.000Z | 2022-03-11T23:20:39.000Z | virtual/lib/python3.6/site-packages/pylint/test/functional/names_in__all__.py | evantoh/patient-management-system | 6637eb1344775633759165260ed99843581c0e72 | [
"Unlicense"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | # pylint: disable=too-few-public-methods,no-self-use, no-absolute-import,import-error
"""Test Pylint's use of __all__.
* NonExistant is not defined in this module, and it is listed in
__all__. An error is expected.
* This module imports path and republished it in __all__. No errors
are expected.
"""
from __future... | 22.66 | 85 | 0.655781 |
eab6989cee130838c739c635cb06aab0118184fe | 1,923 | py | Python | murano/api/versions.py | ISCAS-VDI/murano-base | 34287bd9109b32a2bb0960c0428fe402dee6d9b2 | [
"Apache-2.0"
] | 1 | 2021-07-28T23:19:49.000Z | 2021-07-28T23:19:49.000Z | murano/api/versions.py | ISCAS-VDI/murano-base | 34287bd9109b32a2bb0960c0428fe402dee6d9b2 | [
"Apache-2.0"
] | null | null | null | murano/api/versions.py | ISCAS-VDI/murano-base | 34287bd9109b32a2bb0960c0428fe402dee6d9b2 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 31.016129 | 78 | 0.601144 |
e7d76996ebdf02fbdc11f6b83d23af980fa00228 | 48,066 | py | Python | flow/core/kernel/vehicle/traci.py | Bobobert/aflow | 7d28e362f757397c0c5303bc495b10ed597e03d5 | [
"MIT"
] | null | null | null | flow/core/kernel/vehicle/traci.py | Bobobert/aflow | 7d28e362f757397c0c5303bc495b10ed597e03d5 | [
"MIT"
] | null | null | null | flow/core/kernel/vehicle/traci.py | Bobobert/aflow | 7d28e362f757397c0c5303bc495b10ed597e03d5 | [
"MIT"
] | null | null | null | """Script containing the TraCI vehicle kernel class."""
import traceback
from flow.core.kernel.vehicle import KernelVehicle
import traci.constants as tc
from traci.exceptions import FatalTraCIError, TraCIException
import numpy as np
import collections
import warnings
from flow.controllers.car_following_models import S... | 40.391597 | 111 | 0.591894 |
f47ed31c172447188e2065e159e4db7d4c7581fd | 15,246 | py | Python | rofe_ann.py | IvoryLu/data-processing | 65d91537dea777d037e9a419a355a0c8493aa19c | [
"BSD-3-Clause"
] | null | null | null | rofe_ann.py | IvoryLu/data-processing | 65d91537dea777d037e9a419a355a0c8493aa19c | [
"BSD-3-Clause"
] | null | null | null | rofe_ann.py | IvoryLu/data-processing | 65d91537dea777d037e9a419a355a0c8493aa19c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed May 29 14:37:38 2019
@author: 00098223
"""
#Part 1 - Data Preprocessing
##Importing the libraries
#import numpy as np
#import matplotlib.pyplot as plt
#import pandas as pd
#import csv
#from imblearn.combine import SMOTEENN
#import tensorflow as tf
... | 37.185366 | 168 | 0.579037 |
c69725e309105e48bd6f1ed1d7a844fa2d8d92b7 | 2,299 | py | Python | python/get_words.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | python/get_words.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | python/get_words.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | import csv
import json
from nltk.corpus import stopwords
from nltk import download
download('stopwords') # Download stopwords list.
stop_words = stopwords.words('english')
words = []
sentences = []
def preprocess(sentence):
if False:
sentence = sentence.replace("?", "")
sentence = sentence.repla... | 31.493151 | 75 | 0.53632 |
3fa795e1521fcc68f0a6f508c6ea922ed0b620fd | 11,180 | py | Python | pdc/apps/componentbranch/serializers.py | hluk/product-definition-center | af79f73c30fa5f5709ba03d584b7a49b83166b81 | [
"MIT"
] | 18 | 2015-12-15T17:56:18.000Z | 2021-04-10T13:49:48.000Z | pdc/apps/componentbranch/serializers.py | hluk/product-definition-center | af79f73c30fa5f5709ba03d584b7a49b83166b81 | [
"MIT"
] | 303 | 2015-11-18T07:37:06.000Z | 2021-05-26T12:34:01.000Z | pdc/apps/componentbranch/serializers.py | hluk/product-definition-center | af79f73c30fa5f5709ba03d584b7a49b83166b81 | [
"MIT"
] | 27 | 2015-11-19T20:33:54.000Z | 2021-03-25T08:15:28.000Z | #
# Copyright (c) 2017 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
from rest_framework import serializers
from django.conf import settings as django_settings
import re
from datetime import datetime
import six
from pdc.apps.common.fields import ChoiceSlugField
from pdc.apps.co... | 37.77027 | 86 | 0.63873 |
3664ceb34a2b9b706c877de0066d8bb576f3ebdc | 13,750 | py | Python | libs/groupdocs_conversion_cloud/models/__init__.py | rocketbot-cl/pdf2word | e46f6f574f69aa744e300baf4802e426b71bf9b2 | [
"MIT"
] | null | null | null | libs/groupdocs_conversion_cloud/models/__init__.py | rocketbot-cl/pdf2word | e46f6f574f69aa744e300baf4802e426b71bf9b2 | [
"MIT"
] | null | null | null | libs/groupdocs_conversion_cloud/models/__init__.py | rocketbot-cl/pdf2word | e46f6f574f69aa744e300baf4802e426b71bf9b2 | [
"MIT"
] | null | null | null | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models
from groupdocs_conversion_cloud.models.convert_options import ConvertOptions
from groupdocs_conversion_cloud.models.convert_settings import ConvertSettings
from groupdocs_conversion_cloud.models.disc_usage import DiscUsage
from grou... | 78.571429 | 106 | 0.925164 |
a6f6a341cf14a73b34221eeabab8a24b578a6c7f | 539 | py | Python | 151-200/p173.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | 1 | 2019-02-25T13:00:31.000Z | 2019-02-25T13:00:31.000Z | 151-200/p173.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | null | null | null | 151-200/p173.py | YiWeiShen/Project-Euler-Hints | a79cacab075dd98d393516f083aaa7ffc6115a06 | [
"MIT"
] | null | null | null | def cal_square_num(num):
sum = 0
for i in range(1, int(num/4)+2):
print(i)
if i % 2 == 0:
for j in range(2, int(num/4)+2, 2):
if 0 < i*i-j*j <= num:
sum += 1
else:
continue
else:
for j in rang... | 24.5 | 47 | 0.374768 |
4d35126206f2ba9a42970402941202da99e1594a | 9,148 | py | Python | test_denorm_project/test_app/models.py | mristroph/django-denorm | 7d1f720d67e5c58005140aee8d80d0adc6f03efa | [
"BSD-3-Clause"
] | 54 | 2015-10-04T07:15:02.000Z | 2021-11-29T12:38:31.000Z | test_denorm_project/test_app/models.py | mristroph/django-denorm | 7d1f720d67e5c58005140aee8d80d0adc6f03efa | [
"BSD-3-Clause"
] | 47 | 2015-08-12T12:15:50.000Z | 2021-09-29T13:04:55.000Z | test_denorm_project/test_app/models.py | mristroph/django-denorm | 7d1f720d67e5c58005140aee8d80d0adc6f03efa | [
"BSD-3-Clause"
] | 26 | 2015-08-21T18:29:53.000Z | 2022-03-24T18:59:16.000Z | from django.db import connection
from django.conf import settings
from django.db import models
try:
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
except ImportError:
from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation
from django.contrib import ... | 30.801347 | 118 | 0.697311 |
5d1b1c978ff48253495b6f6c39f34ab57d5ed4bd | 314 | py | Python | clks/optim/__init__.py | cjliux/mdst.c2f | 5617624b25ddaa11ffbc07401d3fe0276ca220d5 | [
"BSD-3-Clause"
] | 2 | 2020-07-17T12:12:35.000Z | 2020-09-12T14:28:55.000Z | clks/optim/__init__.py | cjliux/mdst.c2f | 5617624b25ddaa11ffbc07401d3fe0276ca220d5 | [
"BSD-3-Clause"
] | null | null | null | clks/optim/__init__.py | cjliux/mdst.c2f | 5617624b25ddaa11ffbc07401d3fe0276ca220d5 | [
"BSD-3-Clause"
] | null | null | null | #coding: utf-8
# automatically import any Python files in the directory
import os
import importlib
for file in os.listdir(os.path.dirname(__file__)):
if file.endswith('.py') and not file.startswith('_'):
module = file[:file.find('.py')]
importlib.import_module('clks.optim.' + module)
| 31.4 | 57 | 0.678344 |
8cd4914f1a5defa0d752efd6236efbea385f0148 | 16,719 | py | Python | ctapipe/visualization/mpl_camera.py | chaimain/ctapipe | ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5 | [
"BSD-3-Clause"
] | null | null | null | ctapipe/visualization/mpl_camera.py | chaimain/ctapipe | ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5 | [
"BSD-3-Clause"
] | null | null | null | ctapipe/visualization/mpl_camera.py | chaimain/ctapipe | ff80cff2daaf56e1d05ea6501c68fd83a9cf79d5 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Visualization routines using matplotlib
"""
import copy
import logging
import numpy as np
from astropy import units as u
from matplotlib import pyplot as plt
from matplotlib.collections import PatchCollection
from matplotlib.colors import Normalize, L... | 32.911417 | 88 | 0.585023 |
a1798eccb28095249bc0bb281c9cfb4dcdd40c60 | 38,269 | py | Python | src/ansys/mapdl/core/_commands/preproc/materials.py | Miiicah/pymapdl | ce85393ca82db7556a5d05883ca3fd9296444cba | [
"MIT"
] | 1 | 2022-02-09T01:12:02.000Z | 2022-02-09T01:12:02.000Z | src/ansys/mapdl/core/_commands/preproc/materials.py | Miiicah/pymapdl | ce85393ca82db7556a5d05883ca3fd9296444cba | [
"MIT"
] | 9 | 2022-02-24T20:34:18.000Z | 2022-03-31T20:44:17.000Z | src/ansys/mapdl/core/_commands/preproc/materials.py | lynch1972/pymapdl | 46b31438af2a0d5b2d9a69abe82e0fe69935a855 | [
"MIT"
] | null | null | null | """
These PREP7 commands are used to define the linear material properties.
"""
class Materials:
def emunit(self, lab="", value="", **kwargs):
"""APDL Command: EMUNIT
Specifies the system of units for magnetic field problems.
Parameters
----------
lab
Label sp... | 36.974879 | 170 | 0.58925 |
aab264de277b03e005e296a209ec21133932f73d | 9,248 | py | Python | plugins/commands.py | Akashvbf/Unlimited-Filter-Bot | 8e42721e3b149d48d1c73664de6ce1eed3d68884 | [
"MIT"
] | null | null | null | plugins/commands.py | Akashvbf/Unlimited-Filter-Bot | 8e42721e3b149d48d1c73664de6ce1eed3d68884 | [
"MIT"
] | null | null | null | plugins/commands.py | Akashvbf/Unlimited-Filter-Bot | 8e42721e3b149d48d1c73664de6ce1eed3d68884 | [
"MIT"
] | null | null | null | import os
import math
import json
import time
import shutil
import heroku3
import requests
from pyrogram import filters
from pyrogram import Client as trojanz
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
... | 32.56338 | 98 | 0.552119 |
8430bd7bb8fe855a2d8ca2fd4121f6855a91721f | 506 | py | Python | packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/indicator/stream/_maxpoints.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs
):
super(MaxpointsValidator, self).__init__(
plotly_name=plotly_name,
parent... | 31.625 | 79 | 0.626482 |
38c30a0b84e87433035166cb8f59a7895bed58df | 424 | py | Python | 04_Run_numpydatagen.py | VenkateshJoshi00/ANNFaultlocation | 0ca8ce496fc4f77656bbb130c0e6166a2cdfea2c | [
"MIT"
] | 1 | 2021-03-25T09:58:50.000Z | 2021-03-25T09:58:50.000Z | 04_Run_numpydatagen.py | VenkateshJoshi00/ANNFaultlocation | 0ca8ce496fc4f77656bbb130c0e6166a2cdfea2c | [
"MIT"
] | null | null | null | 04_Run_numpydatagen.py | VenkateshJoshi00/ANNFaultlocation | 0ca8ce496fc4f77656bbb130c0e6166a2cdfea2c | [
"MIT"
] | 1 | 2021-02-01T16:54:33.000Z | 2021-02-01T16:54:33.000Z | from os import walk
import numpy as np
numpdatdir = './uploads/'
cleandatadir = './cleaned_data/faults_current_only/'
allFiles = [f for _, _1, f in walk(cleandatadir) ]
allFiles = allFiles[0]
tdata = []
for fn in allFiles:
tmp = np.loadtxt(cleandatadir+fn)
y = float( fn[2:-5] )
tdata += [[tmp, y]]
... | 21.2 | 52 | 0.681604 |
6a0b24103fbbf6cab873e0e5ceb7ad250a2bd9d6 | 12,988 | py | Python | sdk/python/pulumi_azure_native/netapp/v20200801/backup.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/netapp/v20200801/backup.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/netapp/v20200801/backup.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
__... | 39.718654 | 941 | 0.626501 |
1ef108fb1d3c1287652605afb77ef8631a632965 | 1,275 | py | Python | curifactory/args.py | ORNL/curifactory | f8be235b7fa7b91cc86f61d610d7093075b89d1f | [
"BSD-3-Clause"
] | 4 | 2022-01-25T18:27:49.000Z | 2022-03-30T22:57:04.000Z | curifactory/args.py | ORNL/curifactory | f8be235b7fa7b91cc86f61d610d7093075b89d1f | [
"BSD-3-Clause"
] | 1 | 2022-03-05T19:10:42.000Z | 2022-03-07T18:00:49.000Z | curifactory/args.py | ORNL/curifactory | f8be235b7fa7b91cc86f61d610d7093075b89d1f | [
"BSD-3-Clause"
] | null | null | null | """Contains the parent dataclass ExperimentArgs, containing run-specific config params."""
from dataclasses import dataclass
@dataclass
class ExperimentArgs:
"""Base arguments class, for handling naming and hashing.
In any given repo, this class should be extended to contain any needed
local configurati... | 32.692308 | 93 | 0.66902 |
55d9b7698d5862f4256c659b6477b42d7684c377 | 189 | py | Python | keylight/constants.py | andornaut/keylight | e03d7b66724b0a50cdef56a8354cd1f478e6de0c | [
"MIT"
] | 4 | 2021-02-05T02:55:33.000Z | 2022-02-02T23:21:19.000Z | keylight/constants.py | andornaut/keylight | e03d7b66724b0a50cdef56a8354cd1f478e6de0c | [
"MIT"
] | null | null | null | keylight/constants.py | andornaut/keylight | e03d7b66724b0a50cdef56a8354cd1f478e6de0c | [
"MIT"
] | null | null | null | MIN_BRIGHTNESS = 0
MAX_BRIGHTNESS = 100
MIN_COLOR = 2900
# Although the API accepts values up to 7000, 6987 is the maximum that was observed to work.
MAX_COLOR = 6987
DEFAULT_PORT = 9123
| 21 | 92 | 0.772487 |
fbf4d49332ae1cba3e32ca329c10c0a8d72992c4 | 91,766 | py | Python | sfepy/discrete/fem/meshio.py | Gkdnz/SfePy | a3a39d4e087705e9e0e8884cbf63513a2ded2108 | [
"BSD-3-Clause"
] | null | null | null | sfepy/discrete/fem/meshio.py | Gkdnz/SfePy | a3a39d4e087705e9e0e8884cbf63513a2ded2108 | [
"BSD-3-Clause"
] | null | null | null | sfepy/discrete/fem/meshio.py | Gkdnz/SfePy | a3a39d4e087705e9e0e8884cbf63513a2ded2108 | [
"BSD-3-Clause"
] | null | null | null | import sys
from copy import copy
import numpy as nm
from sfepy.base.base import (complex_types, dict_from_keys_init,
assert_, is_derived_class, ordered_iteritems,
insert_static_method, output, get_default,
get_default_attr, Struct,... | 32.187303 | 80 | 0.459331 |
c457502a4764c959ed4aa6b4bb79091323d01308 | 9,458 | py | Python | train.py | 17702513221/keras-yolov3 | b0314c031812de29ceea89bd56c9da342f5c96c6 | [
"MIT"
] | 3 | 2019-06-24T12:23:26.000Z | 2020-04-04T09:09:17.000Z | train.py | 17702513221/keras-yolov3 | b0314c031812de29ceea89bd56c9da342f5c96c6 | [
"MIT"
] | null | null | null | train.py | 17702513221/keras-yolov3 | b0314c031812de29ceea89bd56c9da342f5c96c6 | [
"MIT"
] | null | null | null | """
Retrain the YOLO model for your own dataset.
"""
import numpy as np
import keras.backend as K
from keras.layers import Input, Lambda
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping
from yolo3.model import p... | 45.912621 | 129 | 0.692641 |
9278516b50f4026a0be7509f7d8afa6699f92ca7 | 8,919 | py | Python | src/miner/miner.py | nullart/oicoin | 26f997cf15239ffa03011b387fc45ca6a8a199f4 | [
"MIT"
] | null | null | null | src/miner/miner.py | nullart/oicoin | 26f997cf15239ffa03011b387fc45ca6a8a199f4 | [
"MIT"
] | null | null | null | src/miner/miner.py | nullart/oicoin | 26f997cf15239ffa03011b387fc45ca6a8a199f4 | [
"MIT"
] | null | null | null | import time
import hashlib as hasher
import json
import requests
import base64
from flask import Flask
from flask import request
from multiprocessing import Process, Pipe
import ecdsa
from miner_config import MINER_ADDRESS, MINER_NODE_URL, PEER_NODES
node = Flask(__name__)
class Block:
def __init__(self, index, ... | 39.995516 | 171 | 0.656352 |
4e42118549688739a453af9c0681d8e9ff81dbaa | 372 | py | Python | irrigator_pro/farms/empty_view.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | irrigator_pro/farms/empty_view.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | irrigator_pro/farms/empty_view.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | from django.views.generic import TemplateView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
class EmptyView(TemplateView):
template_name = 'farms/empty.html'
@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
retu... | 33.818182 | 63 | 0.774194 |
e839d795869acef91e050db28bbbc710e2d82dec | 554 | py | Python | src/modist/app/schemas/security.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | 1 | 2021-01-03T00:20:07.000Z | 2021-01-03T00:20:07.000Z | src/modist/app/schemas/security.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | src/modist/app/schemas/security.py | modist-io/modist-api | 827d4b1962caee9a2fde1470df30d8fd60f8f998 | [
"0BSD"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright (c) 2020 Modist Team <admin@modist.io>
# ISC License <https://choosealicense.com/licenses/isc>
"""Contains schemas related to security routes and services."""
from typing import List
from pydantic import BaseModel
class JWTPayloadSchema(BaseModel):
"""Describes the JWT pay... | 20.518519 | 63 | 0.698556 |
84ccb05f5591a5aaa47b58271afbb852d0c915ca | 1,354 | py | Python | montage.py | sergentd/neural_style_transfer | f8a856ec387c092e0df757566ca5d8894d118fb3 | [
"MIT"
] | null | null | null | montage.py | sergentd/neural_style_transfer | f8a856ec387c092e0df757566ca5d8894d118fb3 | [
"MIT"
] | null | null | null | montage.py | sergentd/neural_style_transfer | f8a856ec387c092e0df757566ca5d8894d118fb3 | [
"MIT"
] | null | null | null | # import necessary packages
from conf import config as conf
from imutils import build_montages
from imutils import paths
import numpy as np
import imutils
import argparse
import cv2
import os
# grab the reference to the list of images we want to include in the montage
origPaths = list(paths.list_images(conf.ORIG_DIR))... | 32.238095 | 76 | 0.742245 |
83f0aa7a6c35b3d08e47fd7fe2ca8569ea725b7b | 734 | py | Python | examples/captcha_examples.py | Ziki2001/new-school-sdk | b606e666888e1c9813e2f1a6a64bbede3744026e | [
"MIT"
] | 9 | 2021-09-03T11:55:08.000Z | 2022-01-29T04:42:01.000Z | examples/captcha_examples.py | Ziki2001/new-school-sdk | b606e666888e1c9813e2f1a6a64bbede3744026e | [
"MIT"
] | 15 | 2022-01-06T08:45:47.000Z | 2022-03-31T13:45:07.000Z | examples/captcha_examples.py | Ziki2001/new-school-sdk | b606e666888e1c9813e2f1a6a64bbede3744026e | [
"MIT"
] | 6 | 2021-12-01T04:52:06.000Z | 2022-01-29T04:42:04.000Z | # -*- coding: utf-8 -*-
'''
:file: use_verify.py
:author: -Farmer
:url: https://blog.farmer233.top
:date: 2022/01/14 21:33:06
'''
from school_sdk.client import UserClient
from school_sdk import SchoolClient
# 实例化学校
# 并根据验证码类型指定captcha_type为kap或者cap
# 使用Kaptcha(与旧版系统类似的验证码)
Gdust = SchoolClient("172.16... | 22.242424 | 79 | 0.724796 |
19846a50ce08052183af0f414bad881e5340ce64 | 1,396 | py | Python | code/models/LeNet.py | ArvindSubramaniam/Pruning-Networks-using-Neuron2Neuron-Skip-Connections | bbe402bbf4c5afb4ae712354e8fca5ce320501b8 | [
"Apache-2.0"
] | 1 | 2021-11-16T03:36:51.000Z | 2021-11-16T03:36:51.000Z | code/models/LeNet.py | ArvindSubramaniam/Pruning-Networks-using-Neuron2Neuron-Skip-Connections | bbe402bbf4c5afb4ae712354e8fca5ce320501b8 | [
"Apache-2.0"
] | null | null | null | code/models/LeNet.py | ArvindSubramaniam/Pruning-Networks-using-Neuron2Neuron-Skip-Connections | bbe402bbf4c5afb4ae712354e8fca5ce320501b8 | [
"Apache-2.0"
] | 3 | 2020-12-29T01:52:01.000Z | 2021-11-16T03:36:52.000Z | import torch
import torch.nn as nn
import torch.optim
import torch.nn.functional as F
class LeNet5(nn.Module):
def __init__(self):
super(LeNet5, self).__init__()
# input channel = 1, output channel = 6, kernel_size = 5
# input size = (32, 32), output size = (28, 28)
self.conv1... | 34.04878 | 75 | 0.532951 |
84a1382812464141654e9f3ed4166db0ee5d8935 | 127 | py | Python | examples/preprocess/showpoint.py | pysrc/cvauto | 90466de8d6a56b7489ef2ad1139cdb4aafe84e9f | [
"MIT"
] | 5 | 2018-09-29T13:57:48.000Z | 2022-03-10T03:04:30.000Z | examples/preprocess/showpoint.py | pysrc/cvauto | 90466de8d6a56b7489ef2ad1139cdb4aafe84e9f | [
"MIT"
] | 1 | 2019-01-24T23:56:00.000Z | 2019-02-12T07:51:16.000Z | examples/preprocess/showpoint.py | pysrc/cvauto | 90466de8d6a56b7489ef2ad1139cdb4aafe84e9f | [
"MIT"
] | null | null | null | from cvauto import position
p = position.Position()
k = position.KeyType('7.png', dx=153, dy=-77)
p.getPosition(k, debug=True)
| 25.4 | 45 | 0.724409 |
5199b09a3ecda65f2b31cda3afe1248c16ad7ac5 | 4,755 | py | Python | fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py | kai-xl8/fairseq | fd080b308e1e3361d6c498b235496080fa6599e5 | [
"MIT"
] | 143 | 2020-12-30T21:40:00.000Z | 2022-01-06T21:19:24.000Z | fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py | kai-xl8/fairseq | fd080b308e1e3361d6c498b235496080fa6599e5 | [
"MIT"
] | 5 | 2021-05-24T08:56:59.000Z | 2021-11-19T09:21:31.000Z | fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py | kai-xl8/fairseq | fd080b308e1e3361d6c498b235496080fa6599e5 | [
"MIT"
] | 20 | 2021-03-27T10:30:32.000Z | 2022-03-17T17:13:41.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch.optim.lr_scheduler
from . import register_lr_scheduler, LegacyFairseqLRScheduler
@register_lr_scheduler('reduce_lr_on_plateau'... | 42.079646 | 97 | 0.625026 |
ff2a75249387f174a4c0637e45daad435e93902d | 3,318 | py | Python | tests/test_api/test_project.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | tests/test_api/test_project.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | tests/test_api/test_project.py | granularai/polyaxon-schemas | 017ae74701f21f12f0b25e75379681ea5d8baa9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import uuid
from unittest import TestCase
from hestia.tz_utils import local_now
from marshmallow import ValidationError
from tests.utils import assert_equal_dict
from polyaxon_schemas.api.experiment import ExperimentConfig
from... | 39.5 | 80 | 0.611513 |
e9ab97528d3db952aba3238b817240a777ca1c2c | 21,010 | py | Python | openrtdynamics2/lang/diagram_core/graph_traversion.py | OpenRTDynamics/PythonAPI_Experiments | 1b7a114110089bc7721da604c5e344854ed555c3 | [
"MIT"
] | null | null | null | openrtdynamics2/lang/diagram_core/graph_traversion.py | OpenRTDynamics/PythonAPI_Experiments | 1b7a114110089bc7721da604c5e344854ed555c3 | [
"MIT"
] | null | null | null | openrtdynamics2/lang/diagram_core/graph_traversion.py | OpenRTDynamics/PythonAPI_Experiments | 1b7a114110089bc7721da604c5e344854ed555c3 | [
"MIT"
] | null | null | null | from .signal_network.signals import *
from .signal_network.Block import *
# from .system import *
from typing import Dict, List
from colorama import init, Fore, Back, Style
init(autoreset=True)
#
# NOTE: this is not used
#
class graph_traversion2:
def __init__(self):
# the list of reachable blocks... | 37.78777 | 272 | 0.652975 |
078805334a4dc09621d35922fbab569351058e34 | 6,266 | py | Python | theano/tensor/nnet/__init__.py | bartvm/Theano | e088e2a8d81a27c98b2e80b1a05227700996e42d | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/nnet/__init__.py | bartvm/Theano | e088e2a8d81a27c98b2e80b1a05227700996e42d | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/nnet/__init__.py | bartvm/Theano | e088e2a8d81a27c98b2e80b1a05227700996e42d | [
"BSD-3-Clause"
] | null | null | null | from .nnet import (
CrossentropyCategorical1Hot, CrossentropyCategorical1HotGrad,
CrossentropySoftmax1HotWithBiasDx, CrossentropySoftmaxArgmax1HotWithBias,
LogSoftmax, Prepend_scalar_constant_to_each_row,
Prepend_scalar_to_each_row, Softmax,
SoftmaxGrad, SoftmaxWithBias, binary_crossentropy,
cat... | 43.513889 | 81 | 0.680179 |
2ff691a15bfcbcf3f669388ce76d0adbe069de40 | 431 | py | Python | data/scripts/templates/object/mobile/shared_forest_murra.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_forest_murra.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_forest_murra.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_forest_murra.iff"
result.attribute_template_id = 9
result.stf... | 25.352941 | 58 | 0.721578 |
7934df9d7242729576f9def8fe0b5b369d84387d | 173 | py | Python | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | 5 | 2020-09-13T05:07:38.000Z | 2020-12-26T15:10:00.000Z | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | null | null | null | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | 2 | 2020-06-03T06:40:31.000Z | 2020-06-12T14:55:17.000Z | from vnpy.app.data_recorder import DataRecorderApp
from .engine import RecorderEnginePro
class DataRecorderAppPro(DataRecorderApp):
engine_class = RecorderEnginePro
| 19.222222 | 50 | 0.83815 |
1ed55ecac948fb03cae35935bf29747fabc14617 | 5,987 | py | Python | examples/nlp/text_normalization_as_tagging/evaluation/eval_per_class.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | null | null | null | examples/nlp/text_normalization_as_tagging/evaluation/eval_per_class.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | 1 | 2022-03-06T14:09:02.000Z | 2022-03-06T14:09:02.000Z | examples/nlp/text_normalization_as_tagging/evaluation/eval_per_class.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. 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... | 41.006849 | 119 | 0.574745 |
662169b81621bb0829d61cce2994cf0ec19718e9 | 368 | py | Python | Programming-Basics-with-Python-April-2019/07_conditional_statements_more_exercises/05_firm.py | marinakolova/Python-Courses | eb95c782307be561b5026c5adafaa001b04caf4f | [
"MIT"
] | null | null | null | Programming-Basics-with-Python-April-2019/07_conditional_statements_more_exercises/05_firm.py | marinakolova/Python-Courses | eb95c782307be561b5026c5adafaa001b04caf4f | [
"MIT"
] | null | null | null | Programming-Basics-with-Python-April-2019/07_conditional_statements_more_exercises/05_firm.py | marinakolova/Python-Courses | eb95c782307be561b5026c5adafaa001b04caf4f | [
"MIT"
] | null | null | null | import math
hours_needed = int(input())
days = int(input())
overtime_workers = int(input())
hours_worked = days * 0.9 * 8
hours_worked += (overtime_workers * 2 * days)
if hours_worked >= hours_needed:
print(f"Yes!{math.floor(hours_worked) - hours_needed} hours left.")
else:
print(f"Not enough time!{hours_nee... | 26.285714 | 85 | 0.711957 |
34c0603e0b5a89d64a71152434b12453ed7c0aee | 323 | py | Python | use/python/log_handle/examples/src_cfg_log.py | MuggleWei/Hakuna_Matata | 6a3a012dc2a5942599098d94e90e9381d660500d | [
"WTFPL"
] | null | null | null | use/python/log_handle/examples/src_cfg_log.py | MuggleWei/Hakuna_Matata | 6a3a012dc2a5942599098d94e90e9381d660500d | [
"WTFPL"
] | 30 | 2020-03-04T21:59:09.000Z | 2022-01-04T16:46:52.000Z | use/python/log_handle/examples/src_cfg_log.py | MuggleWei/Hakuna_Matata | 6a3a012dc2a5942599098d94e90e9381d660500d | [
"WTFPL"
] | null | null | null | import logging
from log_handle import LogHandle
if __name__ == "__main__":
LogHandle.init_log(filename="logs/output.log", use_rotate=True)
logging.debug("debug message")
logging.info("info message")
logging.warning("warning message")
logging.error("error message")
logging.fatal("fatal message... | 24.846154 | 67 | 0.724458 |
b2088699d1cb9127cee7d5b6814fa68eacbbee04 | 1,290 | py | Python | tests/test_utils.py | qiskit-community/repo-monitor | b777f64b340e1bf46be017a80c5c6e521f466e5d | [
"Apache-2.0"
] | 9 | 2021-08-06T14:33:06.000Z | 2022-01-01T04:00:39.000Z | tests/test_utils.py | qiskit-community/repo-monitor | b777f64b340e1bf46be017a80c5c6e521f466e5d | [
"Apache-2.0"
] | 2 | 2021-08-04T18:52:31.000Z | 2021-10-01T20:57:25.000Z | tests/test_utils.py | qiskit-community/repo-monitor | b777f64b340e1bf46be017a80c5c6e521f466e5d | [
"Apache-2.0"
] | 4 | 2021-08-12T06:49:30.000Z | 2022-02-08T20:19:34.000Z | """Tests for utils."""
import unittest
from typing import Optional, Union
from monitor.utils import UrlsHelper, GitHubUrlsHelper
class MockUrlsHelper(UrlsHelper):
"""Mock urls helpder for testing purposes."""
def get_comments_url(self, account: str, repo: str,
number: Union[str, int... | 36.857143 | 99 | 0.634884 |
3ac5c76f5e2524e281652dabbac7e557c65b9b98 | 295 | py | Python | poster/streaminghttp/__init__.py | EvanDarwin/poster | 88e0149cce746d4fe8781da45ca6e0d772356237 | [
"MIT"
] | null | null | null | poster/streaminghttp/__init__.py | EvanDarwin/poster | 88e0149cce746d4fe8781da45ca6e0d772356237 | [
"MIT"
] | 2 | 2016-06-15T18:46:47.000Z | 2016-06-16T00:40:18.000Z | poster/streaminghttp/__init__.py | EvanDarwin/poster | 88e0149cce746d4fe8781da45ca6e0d772356237 | [
"MIT"
] | 1 | 2021-06-22T10:03:32.000Z | 2021-06-22T10:03:32.000Z | def register_openers():
"""
DEPRECATED - This function will be removed in version 1.0.0
This function is now a placeholder for backwards compatibility
"""
class DummyOpener(object):
def add_handler(self, *args, **kwargs):
pass
return DummyOpener()
| 22.692308 | 66 | 0.647458 |
8d9a52c4fa148539c5eaa922ae3577a237cbb763 | 9,800 | py | Python | third_party/legacy_rostest/runner.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 14 | 2021-05-02T00:58:45.000Z | 2022-01-11T07:01:27.000Z | third_party/legacy_rostest/runner.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | null | null | null | third_party/legacy_rostest/runner.py | mvukov/rules_ros | 0919c94fae4c84f40c9ec23164345f6db8aef853 | [
"Apache-2.0"
] | 1 | 2022-02-07T00:17:23.000Z | 2022-02-07T00:17:23.000Z | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 33.793103 | 116 | 0.634184 |
4adfe58dd650c33518a3baf9cca110c295de15f5 | 2,280 | py | Python | server/opendp_apps/profiler/csv_reader.py | mikephelan/opendp-ux | 80c65da0ed17adc01c69b05dbc9cbf3a5973a016 | [
"MIT"
] | 6 | 2021-05-25T18:50:58.000Z | 2022-03-23T19:52:15.000Z | server/opendp_apps/profiler/csv_reader.py | mikephelan/opendp-ux | 80c65da0ed17adc01c69b05dbc9cbf3a5973a016 | [
"MIT"
] | 298 | 2021-05-19T17:34:09.000Z | 2022-03-29T18:45:22.000Z | server/opendp_apps/profiler/csv_reader.py | opendp/dpcreator | 6ba3c58ecdcd81ca1f4533a14ce7604eccf6a646 | [
"MIT"
] | null | null | null | from django.conf import settings
import csv
import pandas as pd
from opendp_apps.profiler import static_vals as pstatic
class DelimiterNotFoundException(Exception):
"""
This exception should be raised when a file does not have a clear
delimiter (empty, corrupted, etc.)
"""
pass
class ColumnLimitI... | 34.029851 | 104 | 0.628509 |
a19be96d7df57cc36b0dfe12ba3db4b6be3acdc1 | 2,125 | py | Python | eth/vm/forks/constantinople/storage.py | jmcph4/py-evm | 0cd3ebac9c7c336b07f2f52c52b069fbe400bcef | [
"MIT"
] | null | null | null | eth/vm/forks/constantinople/storage.py | jmcph4/py-evm | 0cd3ebac9c7c336b07f2f52c52b069fbe400bcef | [
"MIT"
] | null | null | null | eth/vm/forks/constantinople/storage.py | jmcph4/py-evm | 0cd3ebac9c7c336b07f2f52c52b069fbe400bcef | [
"MIT"
] | null | null | null | from eth_utils import (
encode_hex,
)
from eth.constants import (
UINT256
)
from eth.vm.computation import BaseComputation
from eth.vm.forks.constantinople import (
constants
)
def sstore_eip1283(computation: BaseComputation) -> None:
slot, value = computation.stack_pop(num_items=2, type_hint=UINT25... | 27.960526 | 81 | 0.608941 |
ca2eb83e1f99d270e091efc168b9d130766736ea | 1,002 | py | Python | Esercizi01/08-RappBinary.py | AmadeusZhang/Corso-Python-IngMat | b1bf0156284e3a65e7451fc8547ceb69092b7894 | [
"MIT"
] | null | null | null | Esercizi01/08-RappBinary.py | AmadeusZhang/Corso-Python-IngMat | b1bf0156284e3a65e7451fc8547ceb69092b7894 | [
"MIT"
] | null | null | null | Esercizi01/08-RappBinary.py | AmadeusZhang/Corso-Python-IngMat | b1bf0156284e3a65e7451fc8547ceb69092b7894 | [
"MIT"
] | null | null | null | """
Created on Sun Mar 20 22:24:41 2022
@author: zhzj
Dato un numero positivo Q, scrivere la sua rappresentazione in binario naturale, indicando anche il minimo numero di bit utilizzato.
Il programma dovrà esibire un comportamento come nell'esempio seguente:
Input: 19 in decimale
Output: con 5 bit = 10011 in binari... | 23.302326 | 132 | 0.592814 |
84345171ddd2de8be3bd39ec02e5c7cf618f722b | 4,085 | py | Python | blaze/compute/tests/test_core_compute.py | jreback/blaze | 85c39335cac4ef7f2921a7f621bc13525880fc44 | [
"BSD-3-Clause"
] | 1 | 2015-05-17T23:17:12.000Z | 2015-05-17T23:17:12.000Z | blaze/compute/tests/test_core_compute.py | jreback/blaze | 85c39335cac4ef7f2921a7f621bc13525880fc44 | [
"BSD-3-Clause"
] | null | null | null | blaze/compute/tests/test_core_compute.py | jreback/blaze | 85c39335cac4ef7f2921a7f621bc13525880fc44 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import pytest
from datashape import discover, dshape, coretypes as ct
from blaze.compute.core import (compute_up, compute, bottom_up_until_type_break,
top_then_bottom_then_top_again_etc,
s... | 29.178571 | 80 | 0.595594 |
a2bcd83597a67aca05692d36440397574609444f | 953 | py | Python | www/tests/test_aio.py | stefanhoelzl/brython | 433d272e7bb0e3c0994392f8f265bc39e87854f7 | [
"BSD-3-Clause"
] | 1 | 2018-10-12T12:29:14.000Z | 2018-10-12T12:29:14.000Z | www/tests/test_aio.py | SungBeom/BBAM_Brython | 107036ad20a94af1d43e5ce5bd7c73e6a470d687 | [
"BSD-3-Clause"
] | null | null | null | www/tests/test_aio.py | SungBeom/BBAM_Brython | 107036ad20a94af1d43e5ce5bd7c73e6a470d687 | [
"BSD-3-Clause"
] | null | null | null | from browser import console
import asyncio
async def wait_secs(s, result):
await asyncio.sleep(s)
console.log("Returning result", result)
return result
@aio.async_test(0.5)
def test_simple_coroutine():
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring fut... | 34.035714 | 117 | 0.740818 |
ac2bc5a5b23efafaead655619edbc4b2ad376a01 | 1,605 | py | Python | tuplas.py | franciscoRic/Aula-Python | bc767b2ff22526ad0c3cc4ab51ee5227be9ce399 | [
"MIT"
] | null | null | null | tuplas.py | franciscoRic/Aula-Python | bc767b2ff22526ad0c3cc4ab51ee5227be9ce399 | [
"MIT"
] | null | null | null | tuplas.py | franciscoRic/Aula-Python | bc767b2ff22526ad0c3cc4ab51ee5227be9ce399 | [
"MIT"
] | null | null | null | """
# As tuplas são representadas por um ()
tupla1 = (1, 2, 3, 4, 5, 6)
print(tupla1)
print(type(tupla1))
tupla2 = 1, 2, 3, 4, 5, 6
print(tupla1)
print(type(tupla2))
# As Duplas devem ter mais de 1 valor.
#Não é tupla
tupla3 = (4)
print(tupla3)
print(type(tupla3))
tupla4 = (4,) # Isso é uma tupla
print(tupla4)
... | 14.078947 | 87 | 0.666044 |
dd65bcdb3c21bf9f21232b9058064bc9496e5acb | 171 | py | Python | scripts/quest/q29980s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/quest/q29980s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/quest/q29980s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | # True Knight of Light
medal = 1142403
if sm.canHold(medal):
sm.chatScript("You have earned a new medal.")
sm.startQuest(parentID)
sm.completeQuest(parentID) | 21.375 | 49 | 0.71345 |
d82a20c5ebb586b8458d48f2d594f7001c4379c7 | 444 | py | Python | blog/migrations/0011_auto_20200703_2039.py | joshi008/PenIt-Personal-Blogging-Website | 5fd3c3422909d0c2bcabdd40aeeec30dce57d009 | [
"MIT"
] | 2 | 2020-08-02T10:54:39.000Z | 2020-09-09T19:04:56.000Z | blog/migrations/0011_auto_20200703_2039.py | joshi008/PenIt-Personal-Blogging-Website | 5fd3c3422909d0c2bcabdd40aeeec30dce57d009 | [
"MIT"
] | 8 | 2021-04-08T20:58:47.000Z | 2022-03-12T00:54:03.000Z | blog/migrations/0011_auto_20200703_2039.py | joshi008/PenIt-Personal-Blogging-Website | 5fd3c3422909d0c2bcabdd40aeeec30dce57d009 | [
"MIT"
] | 1 | 2021-02-27T19:11:31.000Z | 2021-02-27T19:11:31.000Z | # Generated by Django 2.2 on 2020-07-03 15:09
from django.db import migrations
import django_summernote.fields
class Migration(migrations.Migration):
dependencies = [
('blog', '0010_auto_20200603_1818'),
]
operations = [
migrations.AlterField(
model_name='blogpost',
... | 22.2 | 86 | 0.641892 |
8bf41417f631d7fe2ae67449f71c6711218db572 | 4,332 | py | Python | RecoBTag/ONNXRuntime/python/pfDeepBoostedDiscriminatorsJetTags_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoBTag/ONNXRuntime/python/pfDeepBoostedDiscriminatorsJetTags_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoBTag/ONNXRuntime/python/pfDeepBoostedDiscriminatorsJetTags_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
pfDeepBoostedDiscriminatorsJetTags = cms.EDProducer(
'BTagProbabilityToDiscriminator',
discriminators = cms.VPSet(
cms.PSet(
name = cms.string('TvsQCD'),
numerator = cms.VInputTag(
cms.InputTag('pfDeepBoostedJetTags', 'probTbcq'),
... | 43.32 | 66 | 0.586334 |
085376138ebed7bdad9d5e0f3f5b08aaa7ef3a59 | 713 | py | Python | stinkies/portal/views.py | jordan-dimov/stinky-games | 175c3fa21276456cb1b58703b835f8393f5b2b4a | [
"CC0-1.0"
] | null | null | null | stinkies/portal/views.py | jordan-dimov/stinky-games | 175c3fa21276456cb1b58703b835f8393f5b2b4a | [
"CC0-1.0"
] | null | null | null | stinkies/portal/views.py | jordan-dimov/stinky-games | 175c3fa21276456cb1b58703b835f8393f5b2b4a | [
"CC0-1.0"
] | null | null | null | from django.contrib import messages
from django.shortcuts import render
from django.utils.safestring import mark_safe
from friendship.models import Friend
def homepage_view(request):
context = {
}
if request.user.is_authenticated:
friendship_requests = Friend.objects.requests(request.user)
... | 41.941176 | 194 | 0.69986 |
db9ab3a6b6c72114b91d95dac8ab8b4dc841a1f2 | 4,404 | py | Python | zenstates.py | fbmoose48/ZenStates-Linux | 9e76197fdd4b5a969b3af6c0af290f9121691c7f | [
"MIT"
] | 437 | 2017-04-21T21:05:07.000Z | 2022-03-23T13:08:43.000Z | zenstates.py | musicaudience/ZenStates-Linux | 0bc27f4740e382f2a2896dc1dabfec1d0ac96818 | [
"MIT"
] | 14 | 2017-09-25T12:57:18.000Z | 2021-10-03T04:48:54.000Z | zenstates.py | musicaudience/ZenStates-Linux | 0bc27f4740e382f2a2896dc1dabfec1d0ac96818 | [
"MIT"
] | 60 | 2018-02-03T20:56:47.000Z | 2022-03-27T07:52:22.000Z | #!/usr/bin/python
import struct
import os
import glob
import argparse
pstates = range(0xC0010064, 0xC001006C)
def writemsr(msr, val, cpu = -1):
try:
if cpu == -1:
for c in glob.glob('/dev/cpu/[0-9]*/msr'):
f = os.open(c, os.O_WRONLY)
os.lseek(f, msr, os.SEEK_SET... | 37.322034 | 159 | 0.572888 |
00777cd004f8fa750146dd87dceb0288d99e1c43 | 3,149 | py | Python | allennlp/modules/token_embedders/bag_of_word_counts_token_embedder.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | null | null | null | allennlp/modules/token_embedders/bag_of_word_counts_token_embedder.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | null | null | null | allennlp/modules/token_embedders/bag_of_word_counts_token_embedder.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | 2 | 2019-12-21T05:58:44.000Z | 2021-08-16T07:41:21.000Z | import torch
from allennlp.common.checks import ConfigurationError
from allennlp.data import Vocabulary
from allennlp.modules.token_embedders.token_embedder import TokenEmbedder
from allennlp.nn.util import get_text_field_mask
@TokenEmbedder.register("bag_of_word_counts")
class BagOfWordCountsTokenEmbedder(TokenEmbe... | 35.784091 | 93 | 0.659574 |
e10730a2198aaf131381c727754c5d312b1bb97a | 4,082 | py | Python | vectors.py | shivam13verma/judge-embeddings | 9b861319a1240529d25c15799952e32dde2e894e | [
"MIT"
] | null | null | null | vectors.py | shivam13verma/judge-embeddings | 9b861319a1240529d25c15799952e32dde2e894e | [
"MIT"
] | null | null | null | vectors.py | shivam13verma/judge-embeddings | 9b861319a1240529d25c15799952e32dde2e894e | [
"MIT"
] | null | null | null | import locale
import glob
import os
import os.path
import requests
import tarfile
import sys
import re
import gensim
from gensim.models.doc2vec import TaggedDocument
from collections import namedtuple
from gensim.models import Doc2Vec
import gensim.models.doc2vec
from collections import OrderedDict
import multiproces... | 31.4 | 120 | 0.66879 |
eef3daed8ab45777b3b7b176edfb2f44810328d9 | 1,883 | py | Python | setup.py | kalyan1179/Automate-WhatsApp-Messages-with-Python | aaf4c46be1fa57776dcd2014fa5293e564a2ea4a | [
"MIT"
] | null | null | null | setup.py | kalyan1179/Automate-WhatsApp-Messages-with-Python | aaf4c46be1fa57776dcd2014fa5293e564a2ea4a | [
"MIT"
] | null | null | null | setup.py | kalyan1179/Automate-WhatsApp-Messages-with-Python | aaf4c46be1fa57776dcd2014fa5293e564a2ea4a | [
"MIT"
] | null | null | null |
from distutils.core import setup
setup(
name = 'pyAWM', # How you named your package folder (MyLib)
packages = ['pyAWM'], # Chose the same as "name"
# package_dir={'': 'C:/Users/aswanth kumar/Desktop'},
version = '1.0.1', # Start with a small number and increase it with every change you ma... | 64.931034 | 169 | 0.660117 |
45e36c19cad5c3fed20b61a6aa38b81392364cb4 | 135 | py | Python | loga/__init__.py | hukkin/loga | 5c10de42a13f8611ee84ca22122f71dbd2a27df4 | [
"MIT"
] | 1 | 2021-04-23T17:11:25.000Z | 2021-04-23T17:11:25.000Z | loga/__init__.py | hukkin/loga | 5c10de42a13f8611ee84ca22122f71dbd2a27df4 | [
"MIT"
] | 2 | 2021-07-12T22:22:08.000Z | 2021-07-19T20:53:24.000Z | loga/__init__.py | hukkinj1/loga | 5c10de42a13f8611ee84ca22122f71dbd2a27df4 | [
"MIT"
] | null | null | null | __version__ = "1.0.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
from ._loga import Loga as Loga # noqa: F401
| 33.75 | 87 | 0.725926 |
09d8391fef11c2c147f17b59f71e7f2089fca844 | 569 | py | Python | blueprints/api/receitas/blueprint.py | maiconandsilva/receitas | 924aa3acbd5b24286fb2a0527c2a2e133f904937 | [
"MIT"
] | null | null | null | blueprints/api/receitas/blueprint.py | maiconandsilva/receitas | 924aa3acbd5b24286fb2a0527c2a2e133f904937 | [
"MIT"
] | null | null | null | blueprints/api/receitas/blueprint.py | maiconandsilva/receitas | 924aa3acbd5b24286fb2a0527c2a2e133f904937 | [
"MIT"
] | null | null | null | from flask import Blueprint
bp_receitas = Blueprint('receitas', __name__, url_prefix='/receitas')
bp_categorias = Blueprint('categorias', __name__, url_prefix='/categorias')
bp_ingredientes = Blueprint('ingredientes', __name__, url_prefix='/ingredientes')
bp_unidades_medida = Blueprint('unidades_medida', __name__,
... | 40.642857 | 81 | 0.785589 |
73a62bdf477587e54509ce7621fd7adf1a387639 | 7,402 | py | Python | pythainlp/ulmfit/core.py | wasdee/pythainlp | 9e97321aebc104cb260f801e3b983c937f31ae01 | [
"Apache-2.0"
] | 1 | 2021-01-13T17:59:55.000Z | 2021-01-13T17:59:55.000Z | pythainlp/ulmfit/core.py | prrssr/pythainlp | 19ff3510a73dd93515fcc1b4485326a8b7172026 | [
"Apache-2.0"
] | null | null | null | pythainlp/ulmfit/core.py | prrssr/pythainlp | 19ff3510a73dd93515fcc1b4485326a8b7172026 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Universal Language Model Fine-tuning for Text Classification (ULMFiT).
"""
import collections
from typing import Callable, Collection
import numpy as np
import torch
from pythainlp.corpus import get_corpus_path
from pythainlp.tokenize import THAI2FIT_TOKENIZER
from pythainlp.ulmfit.preproce... | 31.632479 | 97 | 0.630775 |
56f174adde895a512b0ba5286ab22010776c0838 | 1,561 | py | Python | python_attacks/slowloris.py | mfranceschi/psat-crisis-management | c6b4d65720b7820e179336b6e28332502cd54cb1 | [
"MIT"
] | null | null | null | python_attacks/slowloris.py | mfranceschi/psat-crisis-management | c6b4d65720b7820e179336b6e28332502cd54cb1 | [
"MIT"
] | null | null | null | python_attacks/slowloris.py | mfranceschi/psat-crisis-management | c6b4d65720b7820e179336b6e28332502cd54cb1 | [
"MIT"
] | null | null | null | import socket, random, time
# Source: https://github.com/adrianchifor/pyslowloris
headers = [
"User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36",
"Accept-language: en-US,en"
]
sockets = []
def setupSocket(ip):
sock = soc... | 28.907407 | 139 | 0.577194 |
d54269a690ac2cacf02a36e04017a71d95301f8d | 2,627 | py | Python | tests/mac/macdisk/test_representing_internal_corestorage_volume.py | Abd-Elrazek/InQRy | ab9d19a737a41673e8dcc419d49ca0e96476d560 | [
"MIT"
] | 37 | 2017-05-12T02:32:26.000Z | 2019-05-03T14:43:08.000Z | tests/mac/macdisk/test_representing_internal_corestorage_volume.py | Abd-Elrazek/InQRy | ab9d19a737a41673e8dcc419d49ca0e96476d560 | [
"MIT"
] | 11 | 2017-08-27T03:36:18.000Z | 2018-10-28T01:31:12.000Z | tests/mac/macdisk/test_representing_internal_corestorage_volume.py | Abd-Elrazek/InQRy | ab9d19a737a41673e8dcc419d49ca0e96476d560 | [
"MIT"
] | 15 | 2019-06-13T11:29:12.000Z | 2022-02-28T06:40:14.000Z | from inqry.system_specs import macdisk
DISKUTIL_OUTPUT = ''' Device Identifier: disk1
Device Node: /dev/disk1
Whole: Yes
Part of Whole: disk1
Device / Media Name: APPLE SSD AP0256J
Volume Name: Macintosh HD
Mounted: ... | 32.432099 | 101 | 0.610582 |
5bd9458dbc14d8863a84699e77eb0680609ee6f4 | 6,968 | py | Python | nanopores/scripts/calculate_forces.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 8 | 2016-09-07T01:59:31.000Z | 2021-03-06T12:14:31.000Z | nanopores/scripts/calculate_forces.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | null | null | null | nanopores/scripts/calculate_forces.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 4 | 2017-12-06T17:43:01.000Z | 2020-05-01T05:41:14.000Z | ''' calculate forces on molecule depending on midpoint '''
#from petsc4py import PETSc
#from mpi4py import MPI
#comm = PETSc.Comm(MPI.COMM_SELF)
from nanopores import *
from dolfin import *
comm = mpi_comm_self()
import sys, argparse, math, os, mpi4py
# general parameters
r = 0.55 # [nm]
q = -2. # [q*C]
dnaqsdamp = 0.... | 32.713615 | 103 | 0.648536 |
5c43c46d481286e831943489942a59b6580a1784 | 1,467 | py | Python | python/searches/binary_search_array_of_coordinates.py | dogunbound/weird_algorithms | 82770af1b55a81f50a7955fd52b70d8a0ec7c43c | [
"MIT"
] | null | null | null | python/searches/binary_search_array_of_coordinates.py | dogunbound/weird_algorithms | 82770af1b55a81f50a7955fd52b70d8a0ec7c43c | [
"MIT"
] | null | null | null | python/searches/binary_search_array_of_coordinates.py | dogunbound/weird_algorithms | 82770af1b55a81f50a7955fd52b70d8a0ec7c43c | [
"MIT"
] | null | null | null | # takes an array of coordinate tuples and a coordinate tuple
# searches array with a binary search for a matching coordinate tuple
# returns coordinate of location, -1 if fails
def binary_coord_search(arr, coord):
low=0
high=len(arr)-1
while low <= high:
mid = (low + high) // 2
if arr[mid] ... | 27.166667 | 119 | 0.612134 |
f355f8561d55938789f567e220547c4e6a06b12f | 15,419 | py | Python | cdp/accessibility.py | auphofBSF/python-chrome-devtools-protocol | a5c6ecea252a0770257c7b2e08479d521ba8d12f | [
"MIT"
] | 42 | 2019-10-07T17:50:00.000Z | 2022-03-28T17:56:27.000Z | cdp/accessibility.py | auphofBSF/python-chrome-devtools-protocol | a5c6ecea252a0770257c7b2e08479d521ba8d12f | [
"MIT"
] | 23 | 2019-06-09T19:56:25.000Z | 2022-03-02T01:53:13.000Z | cdp/accessibility.py | auphofBSF/python-chrome-devtools-protocol | a5c6ecea252a0770257c7b2e08479d521ba8d12f | [
"MIT"
] | 15 | 2019-11-25T10:20:32.000Z | 2022-03-01T21:14:56.000Z | # DO NOT EDIT THIS FILE!
#
# This file is generated from the CDP specification. If you need to make
# changes, edit the generator and regenerate all of the modules.
#
# CDP domain: Accessibility (experimental)
from __future__ import annotations
from cdp.util import event_class, T_JSON_DICT
from dataclasses import data... | 33.665939 | 132 | 0.652572 |
97bbbd724296fa99ba54f2b37df53ff8d19c9766 | 2,181 | py | Python | infinity/apps/base/test.py | ra101/Django-Infinity | 9fd17c3c27e1d9f4c1796007b7dc053857edd294 | [
"MIT"
] | null | null | null | infinity/apps/base/test.py | ra101/Django-Infinity | 9fd17c3c27e1d9f4c1796007b7dc053857edd294 | [
"MIT"
] | null | null | null | infinity/apps/base/test.py | ra101/Django-Infinity | 9fd17c3c27e1d9f4c1796007b7dc053857edd294 | [
"MIT"
] | null | null | null | from uuid import uuid4
from django.urls import reverse
from django.test import tag
from rest_framework import status
from rest_framework.test import APITestCase
from constance.test import override_config as override_live_settings
from infinity.constants import LiveDemoInitialConfig
@tag("home")
class HomeTests(APIT... | 28.697368 | 83 | 0.694177 |
5bb219bfbf688e249c1129362ecb781b166c9a37 | 523 | py | Python | widgets/create_project/create_project.py | cnralux/qgis-zoa-plugin | f25846ee2d9d563da5e201172c2fb5c220b2952b | [
"MIT"
] | null | null | null | widgets/create_project/create_project.py | cnralux/qgis-zoa-plugin | f25846ee2d9d563da5e201172c2fb5c220b2952b | [
"MIT"
] | null | null | null | widgets/create_project/create_project.py | cnralux/qgis-zoa-plugin | f25846ee2d9d563da5e201172c2fb5c220b2952b | [
"MIT"
] | null | null | null | '''
Created on 17 sept. 2015
@author: arxit
'''
from __future__ import absolute_import
from builtins import object
import os
from .create_project_dialog import CreateProjectDialog
class CreateProject(object):
'''
Main class for the create project widget
'''
def __init__(self):
'''
... | 16.34375 | 54 | 0.57935 |
6f40039ed95c75b2dfde9d4f34ed9813c9f0b13a | 1,989 | py | Python | mac/google-cloud-sdk/lib/surface/compute/sole_tenancy/node_groups/describe.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | mac/google-cloud-sdk/lib/surface/compute/sole_tenancy/node_groups/describe.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | mac/google-cloud-sdk/lib/surface/compute/sole_tenancy/node_groups/describe.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. 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 requir... | 33.711864 | 77 | 0.741076 |
933a4e15875e962de6bfcb218fea9e06912eec2c | 4,042 | py | Python | seldom/testdata/conversion.py | defnngj/pyse | 6dbf080f74440cc10a7d44e87bee0e8cbb4362e2 | [
"Apache-2.0"
] | 250 | 2015-09-10T09:25:02.000Z | 2019-11-16T12:03:44.000Z | seldom/testdata/conversion.py | ooceann/seldom | 2e2b8855c305e8b8aa16c852517385814e253720 | [
"Apache-2.0"
] | 13 | 2016-04-22T08:03:04.000Z | 2019-06-03T03:44:54.000Z | seldom/testdata/conversion.py | ooceann/seldom | 2e2b8855c305e8b8aa16c852517385814e253720 | [
"Apache-2.0"
] | 166 | 2015-07-16T02:51:58.000Z | 2019-11-15T05:12:30.000Z | """
Data type conversion of different files
"""
import csv
import json
import yaml
import codecs
from itertools import islice
try:
from openpyxl import load_workbook
except ModuleNotFoundError:
raise ModuleNotFoundError("Please install the library. https://pypi.org/project/openpyxl/")
def _check_data(list_dat... | 27.496599 | 95 | 0.60762 |
2db1b097689c074c5e4d6d75c9eaeb916e740103 | 746 | py | Python | app/controllers/admin/known_ip_model_view.py | politeauthority/simple-honey | a875773c3299044b113c339203c909b6c4391fb4 | [
"MIT"
] | null | null | null | app/controllers/admin/known_ip_model_view.py | politeauthority/simple-honey | a875773c3299044b113c339203c909b6c4391fb4 | [
"MIT"
] | 1 | 2021-06-01T21:43:04.000Z | 2021-06-01T21:43:04.000Z | app/controllers/admin/known_ip_model_view.py | politeauthority/simple-honey | a875773c3299044b113c339203c909b6c4391fb4 | [
"MIT"
] | null | null | null | """Known Ip Model View
"""
from flask_admin.form import SecureForm
from app.controllers.admin.base_model_view import BaseModelView
from app.utilities import admin_tools
class KnownIpModelView(BaseModelView):
"""
View Class for KnownIps
"""
page_size = 25
column_type_formatters = admin_tools.def... | 28.692308 | 70 | 0.730563 |
105a5f8954f1795597bf87fa4e817dcc89a4a5ce | 711 | py | Python | server/config.py | mbucknell/ngwmn-ui | 7d65053a330dc94ec0dbbea251ab55ac7d6ed376 | [
"CC0-1.0"
] | null | null | null | server/config.py | mbucknell/ngwmn-ui | 7d65053a330dc94ec0dbbea251ab55ac7d6ed376 | [
"CC0-1.0"
] | null | null | null | server/config.py | mbucknell/ngwmn-ui | 7d65053a330dc94ec0dbbea251ab55ac7d6ed376 | [
"CC0-1.0"
] | null | null | null | """
Application configuration settings
"""
DEBUG = False
SERVICE_ROOT = 'https://cida.usgs.gov'
STATS_SERVICE_ROOT = 'http://cida.usgs.gov/ngwmn_statistics'
CONFLUENCE_URL = 'https://my.usgs.gov/confluence/'
STATISTICS_METHODS_URL = CONFLUENCE_URL + 'createrssfeed.action?types=page&spaces=GWDataPortal&title' \
... | 39.5 | 125 | 0.735584 |
dffcffa859cf4d567ee47e96c68407f75a150ff8 | 2,382 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/report/common.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/report/common.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/report/common.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
pageSize = {
'A4': (210,297),
'A5': (148.5,105)
}
odt_namespace = {
"office":"{urn:oasis:names:tc:opendocument:xmlns:office:1.0}",
"style":"{urn:oasis:names:tc:opendocument:xmlns:style:1.0}",
"text":... | 45.807692 | 74 | 0.628463 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.