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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4da90ebd6055194a7db43a600ad35402bead2a80 | 1,098 | py | Python | eproc-automated-deployments/img/3-ui.py | estambakio-sc/continuous-development | 85c52430fa6acebf56c3fb3558b2b48ab22226c8 | [
"MIT"
] | 1 | 2020-10-14T11:07:43.000Z | 2020-10-14T11:07:43.000Z | eproc-automated-deployments/img/3-ui.py | estambakio-sc/continuous-development | 85c52430fa6acebf56c3fb3558b2b48ab22226c8 | [
"MIT"
] | 1 | 2020-03-16T09:18:00.000Z | 2020-03-30T11:45:29.000Z | eproc-automated-deployments/img/3-ui.py | estambakio-sc/continuous-development | 85c52430fa6acebf56c3fb3558b2b48ab22226c8 | [
"MIT"
] | null | null | null | from diagrams import Cluster, Diagram, Edge
from diagrams.onprem.client import User
from diagrams.generic.place import Datacenter
from diagrams.onprem.network import Internet
from diagrams.saas.chat import Slack
from diagrams.onprem.vcs import Github
from diagrams.onprem.ci import Circleci
from diagrams.azure.compute i... | 45.75 | 206 | 0.794171 |
59cd3bcc8ca3b77aebdef7e586a51b0a59fcade7 | 2,505 | py | Python | botCrusaded.py | Greeser/chat_wars_bots | 8f42541474b91df77f408ad7a10fb65d8a573a12 | [
"MIT"
] | null | null | null | botCrusaded.py | Greeser/chat_wars_bots | 8f42541474b91df77f408ad7a10fb65d8a573a12 | [
"MIT"
] | 9 | 2020-03-24T16:58:44.000Z | 2022-03-11T23:46:17.000Z | botCrusaded.py | Greeser/chat_wars_bots | 8f42541474b91df77f408ad7a10fb65d8a573a12 | [
"MIT"
] | null | null | null | import time
import telethon.sync
from telethon import TelegramClient, events
from telethon.tl.types import PeerUser, PeerChat, PeerChannel
import asyncio
import datetime
import random
import argparse
# sample API_ID from https://github.com/telegramdesktop/tdesktop/blob/f98fdeab3fb2ba6f55daf8481595f879729d1b84/Telegram... | 30.54878 | 145 | 0.680639 |
09d5bd888ddb0614cadc3367784f0a0ed57f8e2b | 77 | py | Python | unsync/__init__.py | rams3sh/unsync | abac9c5ca0f5015bcb3b25263240554f5349b047 | [
"MIT"
] | 726 | 2018-03-09T03:44:15.000Z | 2022-03-31T13:27:07.000Z | unsync/__init__.py | rams3sh/unsync | abac9c5ca0f5015bcb3b25263240554f5349b047 | [
"MIT"
] | 38 | 2018-03-14T01:46:44.000Z | 2022-01-21T14:16:08.000Z | unsync/__init__.py | rams3sh/unsync | abac9c5ca0f5015bcb3b25263240554f5349b047 | [
"MIT"
] | 60 | 2018-09-13T15:27:44.000Z | 2022-02-06T19:48:42.000Z | from unsync.unsync import unsync, Unfuture
__all__ = ["unsync", "Unfuture"]
| 19.25 | 42 | 0.74026 |
d11b4d9e5986c8a585eea834d7750f3375bce2f7 | 10,956 | py | Python | build/tools/roomservice.py | clhexftw/vendor_blaze | 460e0a3455b0eeaf6d6bbb30446ee58916e22208 | [
"Apache-2.0"
] | null | null | null | build/tools/roomservice.py | clhexftw/vendor_blaze | 460e0a3455b0eeaf6d6bbb30446ee58916e22208 | [
"Apache-2.0"
] | null | null | null | build/tools/roomservice.py | clhexftw/vendor_blaze | 460e0a3455b0eeaf6d6bbb30446ee58916e22208 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2012-2013, The CyanogenMod Project
# (C) 2017-2018,2020-2021, The LineageOS Project
#
# 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
#
# ht... | 34.344828 | 183 | 0.627145 |
49d683b8a6cb411b5aca88e98b2114061ed16df5 | 2,140 | py | Python | src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py | miyachu/grpc | a06ea3c3162c10ff90a1578bf82bbbff95dc799d | [
"BSD-3-Clause"
] | 4 | 2018-05-21T03:46:34.000Z | 2022-03-31T03:19:46.000Z | src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py | miyachu/grpc | a06ea3c3162c10ff90a1578bf82bbbff95dc799d | [
"BSD-3-Clause"
] | null | null | null | src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py | miyachu/grpc | a06ea3c3162c10ff90a1578bf82bbbff95dc799d | [
"BSD-3-Clause"
] | 2 | 2018-04-12T02:12:49.000Z | 2020-09-06T08:08:19.000Z | # Copyright 2015, Google 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 copyright
# notice, this list of conditions and the f... | 44.583333 | 78 | 0.784579 |
2c8ec5a7a151e7d3e0cb17245f1498501ddd1fe8 | 3,189 | py | Python | vault/tests/test_integration.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | vault/tests/test_integration.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | vault/tests/test_integration.py | fujigon/integrations-core | 256b1c138fd1bf1c71db63698737e813cfda00f8 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-2019
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import re
from collections import defaultdict
import pytest
from datadog_checks.vault import Vault
from .metrics import METRICS
from .utils import run_check
@pytest.mark.usefixtures('dd_environment')
@py... | 35.433333 | 106 | 0.67576 |
ffc3b12ad1de2efe7c41138fa659445519d83cd1 | 1,682 | py | Python | voip_monitor/CVE-2022-24260.py | tuannm-1876/cybersec-pocs | 05b6e05f830bf3e57907493e7578ffdb243d70b2 | [
"MIT"
] | null | null | null | voip_monitor/CVE-2022-24260.py | tuannm-1876/cybersec-pocs | 05b6e05f830bf3e57907493e7578ffdb243d70b2 | [
"MIT"
] | null | null | null | voip_monitor/CVE-2022-24260.py | tuannm-1876/cybersec-pocs | 05b6e05f830bf3e57907493e7578ffdb243d70b2 | [
"MIT"
] | null | null | null | import requests
import argparse
def parse_args():
parser = argparse.ArgumentParser(prog="python3 CVE-2022-24260.py")
parser.add_argument('-u', '--url', required=True, type=str, default=None)
parser.add_argument('--proxy', required=False, type=str, default=None,
help="Proxy URL, sup... | 44.263158 | 560 | 0.661712 |
61b629753f479ee3f6877c98c10e055c5c585130 | 3,874 | py | Python | bindings/python/iree/runtime/system_api_test.py | nicolasvasilache/iree | be6d0b6365c6d6a2d05fe318071b370d25c2e2f1 | [
"Apache-2.0"
] | null | null | null | bindings/python/iree/runtime/system_api_test.py | nicolasvasilache/iree | be6d0b6365c6d6a2d05fe318071b370d25c2e2f1 | [
"Apache-2.0"
] | 1 | 2021-06-16T12:18:44.000Z | 2021-06-16T12:18:44.000Z | bindings/python/iree/runtime/system_api_test.py | nicolasvasilache/iree | be6d0b6365c6d6a2d05fe318071b370d25c2e2f1 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# pylint: disable=unused-variable
import re
from absl import logging
from absl.te... | 35.218182 | 113 | 0.684822 |
754c2bd5f8cf09de61a4ef9b4e65bea793ac4c7b | 2,201 | py | Python | kerasTUT/9-Autoencoder_example.py | hebangyi/tutorials | cdad8a1999cf5611104990088ead53b4c056893b | [
"MIT"
] | 10,786 | 2016-06-10T10:58:42.000Z | 2022-03-31T06:45:24.000Z | kerasTUT/9-Autoencoder_example.py | yyyyyyx/tutorials | c36c8995951bc09890efd329635c2b74bd532610 | [
"MIT"
] | 73 | 2016-07-13T08:13:22.000Z | 2020-11-08T04:57:08.000Z | kerasTUT/9-Autoencoder_example.py | yyyyyyx/tutorials | c36c8995951bc09890efd329635c2b74bd532610 | [
"MIT"
] | 6,303 | 2016-06-19T03:29:27.000Z | 2022-03-31T07:58:22.000Z | """
To know more or get code samples, please visit my website:
https://mofanpy.com/tutorials/
Or search: 莫烦Python
Thank you for supporting!
"""
# please note, all tutorial code are running under python3.5.
# If you use the version like python2.7, please modify the code accordingly
# 9 - Autoencoder example
# to try ... | 28.217949 | 90 | 0.726034 |
0b25a7594975a6481ba4d969cd3cf525a570b0d6 | 34 | py | Python | tests/__init__.py | sellisd/seir | ae85a6ba95db334efdf133000d2f242f4b478353 | [
"MIT"
] | 8 | 2020-04-08T07:07:02.000Z | 2021-08-10T03:07:54.000Z | tests/__init__.py | sellisd/seir | ae85a6ba95db334efdf133000d2f242f4b478353 | [
"MIT"
] | 15 | 2020-04-07T08:43:45.000Z | 2020-10-01T13:56:47.000Z | tests/__init__.py | sellisd/seir | ae85a6ba95db334efdf133000d2f242f4b478353 | [
"MIT"
] | 8 | 2020-04-06T19:48:54.000Z | 2021-03-03T10:28:30.000Z | """Unit test package for SEIR."""
| 17 | 33 | 0.647059 |
8d8af855779db22a2a7cbe05db10fa912ff0c710 | 36,577 | py | Python | sktime/forecasting/base/_base.py | BINAYKUMAR943/sktime | f02f656de86da420b1c14e58dc60194261969eb3 | [
"BSD-3-Clause"
] | 1 | 2021-05-23T20:39:50.000Z | 2021-05-23T20:39:50.000Z | sktime/forecasting/base/_base.py | BINAYKUMAR943/sktime | f02f656de86da420b1c14e58dc60194261969eb3 | [
"BSD-3-Clause"
] | 1 | 2021-05-15T16:24:02.000Z | 2021-05-16T05:25:31.000Z | sktime/forecasting/base/_base.py | BINAYKUMAR943/sktime | f02f656de86da420b1c14e58dc60194261969eb3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Base class template for forecaster scitype.
class name: BaseForecaster
Scitype defining methods:
fitting - fit(self, y, X=None, fh=None)
forecasting - predict(self, fh=None, X=None, return_pred_int=False,
alpha=DEFAULT_ALPHA)
fit&fo... | 34.539188 | 88 | 0.586543 |
38524831f9d9e121742474727eb0a90b35058a78 | 6,430 | py | Python | src/vak/split/split.py | bollwyvl/vak | 1876b30a5b72f841e19720cca2c95d7940a5d9a9 | [
"BSD-3-Clause"
] | null | null | null | src/vak/split/split.py | bollwyvl/vak | 1876b30a5b72f841e19720cca2c95d7940a5d9a9 | [
"BSD-3-Clause"
] | null | null | null | src/vak/split/split.py | bollwyvl/vak | 1876b30a5b72f841e19720cca2c95d7940a5d9a9 | [
"BSD-3-Clause"
] | null | null | null | import warnings
import numpy as np
from ..labels import from_df as labels_from_df
from .algorithms import brute_force
from .algorithms.validate import validate_durations_convert_nonnegative
def train_test_dur_split_inds(durs,
labels,
labelset,
... | 41.217949 | 109 | 0.565474 |
644e97c20123247fbd798a807f583aee99ba8d4a | 13,943 | py | Python | contrib/gitian-build.py | mnscoin/mnscoin | 62c62e528edc9caf844853a69521487802fdb139 | [
"MIT"
] | null | null | null | contrib/gitian-build.py | mnscoin/mnscoin | 62c62e528edc9caf844853a69521487802fdb139 | [
"MIT"
] | null | null | null | contrib/gitian-build.py | mnscoin/mnscoin | 62c62e528edc9caf844853a69521487802fdb139 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
def setup():
global args, workdir
programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget']
if args.kvm:
programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils']
elif args.docker:
dockers = ['docker.io',... | 55.995984 | 231 | 0.641827 |
5f0c43252f772ee693e18243169f841597ff88c9 | 4,823 | py | Python | spyderlib/widgets/externalshell/osx_app_site.py | SylvainCorlay/spyder | b87bfa08abd53e1c97b59feeb51f665f6a632415 | [
"MIT"
] | 2 | 2016-01-23T11:52:24.000Z | 2021-04-27T03:52:25.000Z | spyder/widgets/externalshell/osx_app_site.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | null | null | null | spyder/widgets/externalshell/osx_app_site.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | null | null | null | #
# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for
# site files
#
# Spyder's MacOS X App site.py additions
#
# It includes missing variables and paths that are not added by
# py2app to its own site.py
#
# These functions were taken verbatim from Python 2.7.3 site.py
#
import sys
import os
try:
... | 29.408537 | 84 | 0.576405 |
0968ec6137cebff5770a91618e0f67f3705a5ccf | 19,822 | py | Python | houston/ardu/sandbox.py | squaresLab/Houston | 088cb52fe2d36dfb25b03b98f51b09d56f7d47d0 | [
"MIT"
] | 3 | 2018-11-12T08:04:27.000Z | 2021-12-01T11:25:33.000Z | houston/ardu/sandbox.py | ChrisTimperley/ros_mission_sim | 088cb52fe2d36dfb25b03b98f51b09d56f7d47d0 | [
"MIT"
] | 220 | 2017-10-02T19:49:10.000Z | 2019-08-01T22:08:01.000Z | houston/ardu/sandbox.py | ChrisTimperley/ros_mission_sim | 088cb52fe2d36dfb25b03b98f51b09d56f7d47d0 | [
"MIT"
] | 2 | 2018-10-04T21:03:58.000Z | 2018-10-08T13:33:56.000Z | from typing import Optional, Sequence
import time
import shlex
from timeit import default_timer as timer
import os
import sys
import threading
import logging
import docker
import dronekit
from bugzoo.client import Client as BugZooClient
from pymavlink import mavutil
from .home import HomeLocation
from .connection imp... | 40.288618 | 113 | 0.542478 |
e6d320262753c6cf71fcab56f2cbaf7c614ca985 | 1,653 | py | Python | engine/lib/asm/const_patcher.py | alexcher-im/sgemu | e85c6834b1057a27ba5c41c357c0de2336a12e2e | [
"Zlib"
] | 5 | 2020-10-24T12:39:52.000Z | 2021-04-04T22:47:44.000Z | engine/lib/asm/const_patcher.py | alexcher-im/sgemu | e85c6834b1057a27ba5c41c357c0de2336a12e2e | [
"Zlib"
] | null | null | null | engine/lib/asm/const_patcher.py | alexcher-im/sgemu | e85c6834b1057a27ba5c41c357c0de2336a12e2e | [
"Zlib"
] | null | null | null | import platform
from opcode import opmap
import numpy as np
SHOULD_DISABLE_ON_PYPY = True
_do_not_wrap = platform.python_implementation().lower() == 'pypy'
def wrap(inline=(), force=False):
return lambda func: _wrap(func, inline, force)
def _wrap(src_func, inline, force):
if not force and _do_not_wrap an... | 30.611111 | 116 | 0.649728 |
73481aad09797ef9b1311c961ca2d484d4d510d8 | 4,357 | py | Python | srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | supavit-siriwan/scenario_runner | bf729630ae8adae7dafb0638289650e81b2a7561 | [
"MIT"
] | 3 | 2021-03-12T07:35:42.000Z | 2022-03-11T07:20:53.000Z | srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | supavit-siriwan/scenario_runner | bf729630ae8adae7dafb0638289650e81b2a7561 | [
"MIT"
] | 1 | 2021-05-27T17:08:53.000Z | 2021-05-27T17:08:53.000Z | srunner/scenariomanager/actorcontrols/npc_vehicle_control.py | supavit-siriwan/scenario_runner | bf729630ae8adae7dafb0638289650e81b2a7561 | [
"MIT"
] | 3 | 2019-10-31T04:12:26.000Z | 2020-03-25T21:38:50.000Z | #!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an example control for vehicles
"""
import math
import carla
from agents.navigation.basic_agent import LocalPla... | 35.137097 | 123 | 0.657104 |
7c5539778d429d4d4873a1a2fe69ced37de9aa3d | 3,499 | py | Python | bindings/python/ensmallen/datasets/string/halomonasboliviensislc1.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/halomonasboliviensislc1.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/halomonasboliviensislc1.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Halomonas boliviensis LC1.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prot... | 33.32381 | 223 | 0.679337 |
1c8bc3c563ff7fe132279764f884e0c635527460 | 4,436 | py | Python | KKlib.py | msb002/imped2drt | 37247b8e29bc88b053bde8cf9b0981c3cf5c99cc | [
"MIT"
] | 3 | 2020-05-27T04:16:34.000Z | 2021-05-24T00:01:06.000Z | KKlib.py | msb002/imped2drt | 37247b8e29bc88b053bde8cf9b0981c3cf5c99cc | [
"MIT"
] | null | null | null | KKlib.py | msb002/imped2drt | 37247b8e29bc88b053bde8cf9b0981c3cf5c99cc | [
"MIT"
] | 3 | 2020-02-03T18:16:18.000Z | 2020-06-23T11:31:17.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 24 16:36:57 2018
Last Updated: Jan 17 2020
@author: NicoleCreange
Based on work by Yoed Tsur
"""
#%%
import numpy as np
import matplotlib.pyplot as plt
np.seterr(divide='ignore', invalid='ignore')
def KKT_i2r(ww,z):
l = len(z)
KKTr = []
... | 35.488 | 101 | 0.516907 |
c8495af283ea9900215809a06168ff061bf5f6ea | 841 | py | Python | Workshops-S2020/entry_test/chess.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | null | null | null | Workshops-S2020/entry_test/chess.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | null | null | null | Workshops-S2020/entry_test/chess.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | 1 | 2020-10-29T18:31:32.000Z | 2020-10-29T18:31:32.000Z | def same_color(x1, y1, x2, y2):
same_row = (x2 - x1) % 2 + 1
same_column = (y2 - y1) % 2 + 1
return same_row == same_column
def queen(x1, y1, x2, y2):
if y1 == y2:
return True
if x1 == x2:
return True
if abs(x2 - x1) == abs(y2 - y1):
return True
return False
def ... | 24.735294 | 92 | 0.527943 |
3a7b04626a9e049d7b7477d76dfde7bac642e058 | 5,155 | py | Python | example/tests/test_utils.py | ZipDeal-LLC/django-tenants-celery-beat | 7eea658502289385b64b9dbd25e73d85db563516 | [
"MIT"
] | 4 | 2021-02-26T22:50:47.000Z | 2021-06-05T07:59:43.000Z | example/tests/test_utils.py | ZipDeal-LLC/django-tenants-celery-beat | 7eea658502289385b64b9dbd25e73d85db563516 | [
"MIT"
] | 15 | 2021-02-26T22:54:56.000Z | 2022-02-22T18:52:11.000Z | example/tests/test_utils.py | ZipDeal-LLC/django-tenants-celery-beat | 7eea658502289385b64b9dbd25e73d85db563516 | [
"MIT"
] | 2 | 2021-12-07T03:57:32.000Z | 2022-02-25T17:37:06.000Z | from celery.schedules import crontab
from django.test import TestCase
from django_tenants_celery_beat.utils import generate_beat_schedule
from tenancy.models import Tenant
class GenerateBeatScheduleTestCase(TestCase):
@classmethod
def setUpTestData(cls):
Tenant.objects.bulk_create(
[
... | 34.139073 | 98 | 0.423084 |
75a23d165ab06834cd65428a1c5ac0b5cc414059 | 1,846 | py | Python | aliyun-python-sdk-outboundbot/aliyunsdkoutboundbot/request/v20191226/DescribeGlobalQuestionRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-outboundbot/aliyunsdkoutboundbot/request/v20191226/DescribeGlobalQuestionRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-outboundbot/aliyunsdkoutboundbot/request/v20191226/DescribeGlobalQuestionRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.92 | 97 | 0.773564 |
6a98452e1263179798b6f5dce8af36b9d044726e | 8,141 | py | Python | src/parser/page_content.py | cclauss/jahia2wp | e8d01aac2f545742df2fa18189178afd0c451056 | [
"MIT"
] | 9 | 2017-09-26T08:15:53.000Z | 2019-02-28T12:21:34.000Z | src/parser/page_content.py | cclauss/jahia2wp | e8d01aac2f545742df2fa18189178afd0c451056 | [
"MIT"
] | 768 | 2017-09-15T09:05:48.000Z | 2020-02-12T00:53:06.000Z | src/parser/page_content.py | cclauss/jahia2wp | e8d01aac2f545742df2fa18189178afd0c451056 | [
"MIT"
] | 11 | 2017-10-04T15:00:59.000Z | 2019-07-18T07:05:03.000Z | """(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017"""
from datetime import datetime
from parser.box import Box
from parser.navigation_page import NavigationPage
from settings import JAHIA_DATE_FORMAT
from parser.sidebar import Sidebar
import logging
import re
from utils impor... | 37.516129 | 118 | 0.567498 |
66d254c0366bc77f869e921b41ba73a49bffc5f3 | 231 | py | Python | causalml/__init__.py | waltherg/causalml | c99ebc5d05a41c8384feaf7e3c144b2b1b65f826 | [
"Apache-2.0"
] | null | null | null | causalml/__init__.py | waltherg/causalml | c99ebc5d05a41c8384feaf7e3c144b2b1b65f826 | [
"Apache-2.0"
] | null | null | null | causalml/__init__.py | waltherg/causalml | c99ebc5d05a41c8384feaf7e3c144b2b1b65f826 | [
"Apache-2.0"
] | 1 | 2021-02-07T05:57:29.000Z | 2021-02-07T05:57:29.000Z | name = 'causalml'
__version__ = '0.8.0'
__all__ = ['dataset',
'features',
'feature_selection',
'inference',
'match',
'metrics',
'optimize',
'propensity']
| 21 | 31 | 0.450216 |
ea70a57bf3ffdd8d5e007b3cb6ddf805d6640ef5 | 1,398 | py | Python | dffml/tests/test_typing.py | aghinsa/deploy_test_cvt_gif | 6cca54080d3bf0fc9b7fd69f3d56634ab0351fdb | [
"MIT"
] | 1 | 2021-10-01T18:37:15.000Z | 2021-10-01T18:37:15.000Z | dffml/tests/test_typing.py | aghinsa/deploy_test_cvt_gif | 6cca54080d3bf0fc9b7fd69f3d56634ab0351fdb | [
"MIT"
] | null | null | null | dffml/tests/test_typing.py | aghinsa/deploy_test_cvt_gif | 6cca54080d3bf0fc9b7fd69f3d56634ab0351fdb | [
"MIT"
] | 1 | 2021-10-01T18:37:19.000Z | 2021-10-01T18:37:19.000Z | from typing import Dict, Any, NamedTuple, Optional
from typing import NewType
from dataclasses import dataclass
# from dffml.df.types import Definition
class Definition:
"""
List[type] is how to specify a list
"""
def __new__(cls, *args, **kwargs):
obj = super().__new__(cls)
# print(... | 22.548387 | 61 | 0.594421 |
627ec62df6cead73846b0f50d165b38207754cde | 4,987 | py | Python | example/gan/mxgan/custom_ops.py | Liuxg16/BrainMatrix | 0ec70edd4e12dd3719d20dd14d4e24438c60326f | [
"Apache-2.0"
] | 249 | 2016-06-17T17:59:14.000Z | 2021-05-31T09:56:17.000Z | example/gan/mxgan/custom_ops.py | Liuxg16/BrainMatrix | 0ec70edd4e12dd3719d20dd14d4e24438c60326f | [
"Apache-2.0"
] | 9 | 2016-09-29T06:11:41.000Z | 2018-11-18T16:09:30.000Z | example/gan/mxgan/custom_ops.py | Liuxg16/BrainMatrix | 0ec70edd4e12dd3719d20dd14d4e24438c60326f | [
"Apache-2.0"
] | 64 | 2016-06-17T22:40:26.000Z | 2020-05-16T00:31:58.000Z | """Customized operators using NDArray GPU API"""
import numpy as np
import mxnet as mx
import pickle as pkl
class LogSumExpOp(mx.operator.CustomOp):
"""Implementation of log sum exp for numerical stability
"""
def __init__(self, axis):
self.axis = axis
def forward(self, is_train, req, in_data... | 29.684524 | 78 | 0.599158 |
2b26a37c10b5c50aea69f80b8956d25796231621 | 218 | py | Python | xfconf/tests/testwmconf.py | cr33dog/pyxfce | ce3fa5e8c556e14a8127d67192484fe2f59b5595 | [
"BSD-3-Clause"
] | 4 | 2017-08-23T06:32:19.000Z | 2019-11-05T09:59:24.000Z | xfconf/tests/testwmconf.py | cr33dog/pyxfce | ce3fa5e8c556e14a8127d67192484fe2f59b5595 | [
"BSD-3-Clause"
] | null | null | null | xfconf/tests/testwmconf.py | cr33dog/pyxfce | ce3fa5e8c556e14a8127d67192484fe2f59b5595 | [
"BSD-3-Clause"
] | 2 | 2017-09-03T17:32:12.000Z | 2021-02-27T20:12:34.000Z | #!/usr/bin/env python
import xfce4.xfconf
print(xfce4.xfconf.list_channels())
wm = xfce4.xfconf.channel_get("xfwm4")
print(wm.get_properties("/"))
wm = xfce4.xfconf.channel_get("xfwm4")
print(wm.get_properties("/"))
| 21.8 | 38 | 0.738532 |
3f3cf211a67e5e881da50b8397c538c691e70861 | 4,395 | py | Python | tests/integration/WatchmanEdenTestCase.py | louissobel/watchman | 461f99e1e22546025a5d3a4fcd28a59bf9809914 | [
"Apache-2.0"
] | 1 | 2022-03-20T08:44:44.000Z | 2022-03-20T08:44:44.000Z | tests/integration/WatchmanEdenTestCase.py | louissobel/watchman | 461f99e1e22546025a5d3a4fcd28a59bf9809914 | [
"Apache-2.0"
] | 2 | 2021-09-28T04:34:54.000Z | 2022-02-26T09:11:45.000Z | tests/integration/WatchmanEdenTestCase.py | louissobel/watchman | 461f99e1e22546025a5d3a4fcd28a59bf9809914 | [
"Apache-2.0"
] | null | null | null | # vim:ts=4:sw=4:et:
# Copyright 2016-present Facebook, Inc.
# Licensed under the Apache License, Version 2.0
# no unicode literals
from __future__ import absolute_import, division, print_function
import os
import tempfile
import WatchmanInstance
import WatchmanTestCase
TestParent = object
try:
import configpar... | 32.316176 | 87 | 0.65802 |
c0507348a2d55946052827fb1bafe46aaca313c8 | 1,145 | py | Python | src/calculate_class_weight.py | JanPalasek/sentiment-analysis-czech | 5e6efe74fa8250f5d1d0c9b02cf8f2271dbbbe87 | [
"MIT"
] | null | null | null | src/calculate_class_weight.py | JanPalasek/sentiment-analysis-czech | 5e6efe74fa8250f5d1d0c9b02cf8f2271dbbbe87 | [
"MIT"
] | null | null | null | src/calculate_class_weight.py | JanPalasek/sentiment-analysis-czech | 5e6efe74fa8250f5d1d0c9b02cf8f2271dbbbe87 | [
"MIT"
] | null | null | null | from sklearn.utils import class_weight
import numpy as np
import csv
import argparse
import json
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dataset_full_path", required=True, type=str)
parser.add_argument("--config_path", required=True, type=str)
args = parser.... | 31.805556 | 104 | 0.68559 |
c224f1dca269cde07a3de1ce59f642e061774edd | 4,209 | py | Python | dev/freecad_test_body_objects/list_objects.py | s-light/io_import_fcstd | 3211961417ebc3f1c0cc4e192ebbc46aed419868 | [
"MIT"
] | 6 | 2019-10-31T01:20:33.000Z | 2022-02-02T01:38:08.000Z | dev/freecad_test_body_objects/list_objects.py | s-light/io_import_fcstd | 3211961417ebc3f1c0cc4e192ebbc46aed419868 | [
"MIT"
] | 13 | 2019-10-04T15:38:43.000Z | 2022-03-23T19:01:20.000Z | dev/freecad_test_body_objects/list_objects.py | s-light/io_import_fcstd | 3211961417ebc3f1c0cc4e192ebbc46aed419868 | [
"MIT"
] | 1 | 2019-10-04T23:40:20.000Z | 2019-10-04T23:40:20.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
List Objects.
Stand-alone
"""
import sys
import os
path_to_freecad = "/usr/lib/freecad-daily-python3/lib/FreeCAD.so"
def append_freecad_path():
"""Append the FreeCAD path."""
global path_to_freecad
if os.path.exists(path_to_freecad):
if os.pa... | 22.508021 | 65 | 0.476598 |
45269b3ea1719b4ff0b963029c7baabf9cbbc44c | 11,099 | py | Python | mara_singer/schema.py | hz-lschick/mara-singer | 733cf407a3a9aa494204c0d681f52b9017fc9e2e | [
"MIT"
] | 1 | 2020-10-14T03:38:52.000Z | 2020-10-14T03:38:52.000Z | mara_singer/schema.py | hz-lschick/mara-singer | 733cf407a3a9aa494204c0d681f52b9017fc9e2e | [
"MIT"
] | 11 | 2020-07-22T09:57:58.000Z | 2020-11-19T13:45:15.000Z | mara_singer/schema.py | hz-lschick/mara-singer | 733cf407a3a9aa494204c0d681f52b9017fc9e2e | [
"MIT"
] | null | null | null | from functools import singledispatch
from mara_db import dbs
@singledispatch
def jsonschema_to_sql_create_table(db: object, jsonschema, table_name: str = None, key_properties: [str] = None, properties: [str] = None, create_if_not_exists: bool = False) -> str:
"""
Creates an SQL create table statement from an... | 49.328889 | 199 | 0.669249 |
828c95495f29c8a0e292de686d8856c4a5975083 | 207 | py | Python | demo/CLI/yearpredMSD/csv2libsvm.py | bclehmann/xgboost | 345796825f7bbeb0251bca1244e296fda211551b | [
"Apache-2.0"
] | 27 | 2018-11-11T12:55:10.000Z | 2021-11-15T01:43:01.000Z | demo/CLI/yearpredMSD/csv2libsvm.py | bclehmann/xgboost | 345796825f7bbeb0251bca1244e296fda211551b | [
"Apache-2.0"
] | 10 | 2018-12-06T18:50:21.000Z | 2021-11-08T16:34:47.000Z | demo/CLI/yearpredMSD/csv2libsvm.py | bclehmann/xgboost | 345796825f7bbeb0251bca1244e296fda211551b | [
"Apache-2.0"
] | 15 | 2019-01-25T18:21:39.000Z | 2021-12-15T14:47:03.000Z | import sys
fo = open(sys.argv[2], 'w')
for l in open(sys.argv[1]):
arr = l.split(',')
fo.write('%s' % arr[0])
for i in range(len(arr) - 1):
fo.write(' %d:%s' % (i, arr[i+1]))
fo.close()
| 20.7 | 42 | 0.497585 |
b2c8621d33ec4d83b0186232c3d517951ec2d31d | 279,299 | py | Python | pyboto3/firehose.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 91 | 2016-12-31T11:38:37.000Z | 2021-09-16T19:33:23.000Z | pyboto3/firehose.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 7 | 2017-01-02T18:54:23.000Z | 2020-08-11T13:54:02.000Z | pyboto3/firehose.py | gehad-shaat/pyboto3 | 4a0c2851a8bc04fb1c71c36086f7bb257e48181d | [
"MIT"
] | 26 | 2016-12-31T13:11:00.000Z | 2022-03-03T21:01:12.000Z | '''
The MIT License (MIT)
Copyright (c) 2016 WavyCloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | 68.809805 | 14,817 | 0.682587 |
03a877c8706cbafeeafce0b78894f503c89545bb | 9,388 | py | Python | env/lib/python3.6/site-packages/tablib/packages/dbfpy/header.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | env/lib/python3.6/site-packages/tablib/packages/dbfpy/header.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | env/lib/python3.6/site-packages/tablib/packages/dbfpy/header.py | anthowen/duplify | 846d01c1b21230937fdf0281b0cf8c0b08a8c24e | [
"MIT"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | """DBF header definition.
TODO:
- handle encoding of the character fields
(encoding information stored in the DBF header)
"""
"""History (most recent first):
16-sep-2010 [als] fromStream: fix century of the last update field
11-feb-2007 [als] added .ignoreErrors
10-feb-2007 [als] added __getitem__: return... | 34.014493 | 97 | 0.583085 |
017b190ed100e2917c82eadad7ce3ff22f07a52c | 7,772 | py | Python | train.py | koderjoker/Image-Classifier | 161b61425eb1ff906ac9a685f2750ef8fb0261ac | [
"MIT"
] | null | null | null | train.py | koderjoker/Image-Classifier | 161b61425eb1ff906ac9a685f2750ef8fb0261ac | [
"MIT"
] | null | null | null | train.py | koderjoker/Image-Classifier | 161b61425eb1ff906ac9a685f2750ef8fb0261ac | [
"MIT"
] | 1 | 2021-04-14T17:29:36.000Z | 2021-04-14T17:29:36.000Z | import argparse
import torch
from torch import nn
from torch import optim
from torchvision import transforms, datasets, models
from collections import OrderedDict
import json
#Take inputs from user
parser = argparse.ArgumentParser()
parser.add_argument('data_directory', type=str, help='Train a new network on a data s... | 40.691099 | 133 | 0.590453 |
0541d6a77e2e8cb6b20b083c3844ed74a8c6877d | 3,958 | py | Python | test/package/test_dependency_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | test/package/test_dependency_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | test/package/test_dependency_hooks.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | from io import BytesIO
from torch.package import (
PackageExporter,
)
from torch.testing._internal.common_utils import run_tests
try:
from .common import PackageTestCase
except ImportError:
# Support the case where we run this file directly.
from common import PackageTestCase
class TestDependencyHoo... | 32.178862 | 95 | 0.662961 |
61a2c4cc07165652fda0c8a7b0dcda83f0764873 | 29,962 | py | Python | scanners/sslyze.py | eddietejeda/domain-scan | ad2bfaae5b17437c994d8f1ce50c9f9bcecade8b | [
"CC0-1.0"
] | null | null | null | scanners/sslyze.py | eddietejeda/domain-scan | ad2bfaae5b17437c994d8f1ce50c9f9bcecade8b | [
"CC0-1.0"
] | null | null | null | scanners/sslyze.py | eddietejeda/domain-scan | ad2bfaae5b17437c994d8f1ce50c9f9bcecade8b | [
"CC0-1.0"
] | null | null | null | ###
# Inspect a site's TLS configuration using sslyze.
#
# If data exists for a domain from `pshtt`, will check results
# and only process domains with valid HTTPS, or broken chains.
#
# Supported options:
#
# --sslyze-serial - If set, will use a synchronous (single-threaded
# in-process) scanner. Defaults to true.
#... | 34.399541 | 168 | 0.614078 |
a616edbc6cebd82c266401bbcc52ed0148fe6993 | 851 | py | Python | test_colocation.py | joshzyj/pull_facebook_data_for_good | 082170b1ab3e9be26e5b8b706552e3cd8c324071 | [
"MIT"
] | null | null | null | test_colocation.py | joshzyj/pull_facebook_data_for_good | 082170b1ab3e9be26e5b8b706552e3cd8c324071 | [
"MIT"
] | null | null | null | test_colocation.py | joshzyj/pull_facebook_data_for_good | 082170b1ab3e9be26e5b8b706552e3cd8c324071 | [
"MIT"
] | 1 | 2020-04-30T20:43:13.000Z | 2020-04-30T20:43:13.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 5 11:11:56 2020
@author: hamishgibbs
"""
import unittest
import datetime
from colocation import get_file_dates, combine_url, get_urls
class TestColocation(unittest.TestCase):
def setUp(self):
self.date1 = datetime.datet... | 26.59375 | 82 | 0.666275 |
648604bfa64bd5361db430909ba246a496fe2393 | 1,203 | py | Python | 2017/python/day2.py | majormunky/advent_of_code | 4cccd7f3879e28e465bbc39176659bdd52bd70d6 | [
"MIT"
] | null | null | null | 2017/python/day2.py | majormunky/advent_of_code | 4cccd7f3879e28e465bbc39176659bdd52bd70d6 | [
"MIT"
] | null | null | null | 2017/python/day2.py | majormunky/advent_of_code | 4cccd7f3879e28e465bbc39176659bdd52bd70d6 | [
"MIT"
] | 1 | 2020-12-04T06:12:01.000Z | 2020-12-04T06:12:01.000Z | import sys
import common
def get_filename():
filename = sys.argv[0]
filename = filename.split("/")[-1]
filename = filename.split(".")[0]
return filename
data = common.get_file_contents("data/{}_input.txt".format(get_filename()))
def get_parts(line):
result = []
for item in line.split(" "):
... | 19.721311 | 75 | 0.546966 |
ce0f870c092ccb68b4ed103d1a0693feed1a1db7 | 1,230 | py | Python | Algorithms/other/counting_inversions.py | philipandreadis/Algorithms-Collection-Python | 5109ccaf3ec09031d7e1f135e3492d8180026b43 | [
"MIT"
] | 86 | 2020-09-23T15:46:12.000Z | 2022-03-20T16:35:52.000Z | Algorithms/other/counting_inversions.py | dineshssdn-867/Algorithms-Collection-Python | 266e5608b0c3558c3738ab749e27329010cd9fd6 | [
"MIT"
] | 3 | 2020-03-29T14:32:00.000Z | 2020-08-27T21:50:28.000Z | Algorithms/other/counting_inversions.py | dineshssdn-867/Algorithms-Collection-Python | 266e5608b0c3558c3738ab749e27329010cd9fd6 | [
"MIT"
] | 40 | 2020-09-22T18:57:57.000Z | 2022-03-30T20:04:15.000Z | def merge_sort(array):
total_inversions = 0
if len(array) <= 1:
return (array, 0)
midpoint = int(len(array) / 2)
(left, left_inversions) = merge_sort(array[:midpoint])
(right, right_inversions) = merge_sort(array[midpoint:])
(merged_array, merge_inversions) = merge_and_count(left, righ... | 27.954545 | 80 | 0.64878 |
16a1caa494883f4f59810c7b3ade41902ec5da96 | 1,413 | py | Python | test_paralleldomain/model/map/test_map.py | parallel-domain/pd-sdk | 20e3d052a5cb612a2dd84bda7b1b5487a6a60edc | [
"Apache-2.0"
] | 10 | 2021-11-17T17:23:49.000Z | 2022-03-18T09:51:23.000Z | test_paralleldomain/model/map/test_map.py | parallel-domain/pd-sdk | 20e3d052a5cb612a2dd84bda7b1b5487a6a60edc | [
"Apache-2.0"
] | 3 | 2021-12-02T17:16:20.000Z | 2022-01-07T12:47:13.000Z | test_paralleldomain/model/map/test_map.py | parallel-domain/pd-sdk | 20e3d052a5cb612a2dd84bda7b1b5487a6a60edc | [
"Apache-2.0"
] | 2 | 2022-03-09T07:03:54.000Z | 2022-03-23T15:53:48.000Z | import os
import pytest
from paralleldomain.decoding.helper import decode_dataset
from paralleldomain.utilities.any_path import AnyPath
from test_paralleldomain.decoding.constants import DGP_V1_DATASET_PATH_ENV, UMD_FILE_PATH_ENV
@pytest.fixture
def umd_path() -> str:
if UMD_FILE_PATH_ENV not in os.environ:
... | 31.4 | 96 | 0.743808 |
9e12c8a162939697444fb8855e0520b5de23847a | 995 | py | Python | tests/model/test_graph_connectivity_dfs.py | unitatem/jira-pert | a95b5d2a9a154d70e464689837559430860173ac | [
"MIT"
] | null | null | null | tests/model/test_graph_connectivity_dfs.py | unitatem/jira-pert | a95b5d2a9a154d70e464689837559430860173ac | [
"MIT"
] | null | null | null | tests/model/test_graph_connectivity_dfs.py | unitatem/jira-pert | a95b5d2a9a154d70e464689837559430860173ac | [
"MIT"
] | null | null | null | import unittest
from jira_pert.model.graph_connectivity_dfs import GraphConnectivityDFS
from jira_pert.model.pert_graph import PertGraph
class MyTestCase(unittest.TestCase):
def test_connected_graph(self):
graph = PertGraph()
graph._add_node(key='A', dependencies=[])
graph._add_node(key='... | 33.166667 | 77 | 0.698492 |
b026f3f70aa60079b4b5c20a97cba36830217521 | 6,732 | py | Python | examples/ogbg_molpcba/models.py | berndbohnet/flax | 5aa7f335bb8819088c8b1aa89aa459c99eb00c1c | [
"Apache-2.0"
] | 1 | 2022-02-27T13:50:55.000Z | 2022-02-27T13:50:55.000Z | examples/ogbg_molpcba/models.py | berndbohnet/flax | 5aa7f335bb8819088c8b1aa89aa459c99eb00c1c | [
"Apache-2.0"
] | null | null | null | examples/ogbg_molpcba/models.py | berndbohnet/flax | 5aa7f335bb8819088c8b1aa89aa459c99eb00c1c | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 35.431579 | 80 | 0.702763 |
314159a2e4c98b3f0a42c91d9c05a02d9588bba3 | 4,897 | py | Python | packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/Operation/PhactoriExtractComponentOperation.py | tokusanya/seacas | 54d9c3b68508ca96e3db1fd00c5d84a810fb330b | [
"Zlib",
"NetCDF",
"MIT",
"BSL-1.0",
"X11",
"BSD-3-Clause"
] | null | null | null | packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/Operation/PhactoriExtractComponentOperation.py | tokusanya/seacas | 54d9c3b68508ca96e3db1fd00c5d84a810fb330b | [
"Zlib",
"NetCDF",
"MIT",
"BSL-1.0",
"X11",
"BSD-3-Clause"
] | null | null | null | packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/Operation/PhactoriExtractComponentOperation.py | tokusanya/seacas | 54d9c3b68508ca96e3db1fd00c5d84a810fb330b | [
"Zlib",
"NetCDF",
"MIT",
"BSL-1.0",
"X11",
"BSD-3-Clause"
] | null | null | null | # Copyright(C) 1999-2020 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... | 42.582609 | 94 | 0.745967 |
4b72fc6b03a428c81cd8655c1959f243201c8cea | 3,790 | py | Python | libs/dustUI/dustFrameBrowse.py | minarady1/blink-1 | 4453cf9a9bc4f4ba72b48f569ab9b33d5de177a0 | [
"BSD-3-Clause"
] | 2 | 2021-03-03T05:03:56.000Z | 2021-03-03T05:03:58.000Z | libs/dustUI/dustFrameBrowse.py | minarady1/blink-1 | 4453cf9a9bc4f4ba72b48f569ab9b33d5de177a0 | [
"BSD-3-Clause"
] | 104 | 2016-04-10T19:22:20.000Z | 2018-11-20T15:47:14.000Z | libs/smartmeshsdk-REL-1.3.0.1/libs/dustUI/dustFrameBrowse.py | realms-team/solmanager | 95fa049df041add5f8d37c053ef560d0e5d06dff | [
"BSD-3-Clause"
] | 2 | 2019-03-13T11:43:04.000Z | 2019-04-30T13:54:52.000Z | #!/usr/bin/python
#============================ adjust path =====================================
import sys
import os
if __name__ == '__main__':
here = sys.path[0]
sys.path.insert(0, os.path.join(here, '..'))
#============================ logging =========================================
import logging
cla... | 33.839286 | 112 | 0.485488 |
f2c2fb61d1061f3c60a8bca0954516891decbfb7 | 2,094 | py | Python | tests-trio/p2p-trio/test_endpoint_tracker.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | 3 | 2019-06-17T13:59:20.000Z | 2021-05-02T22:09:13.000Z | tests-trio/p2p-trio/test_endpoint_tracker.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | 2 | 2019-04-30T06:22:12.000Z | 2019-06-14T04:27:18.000Z | tests-trio/p2p-trio/test_endpoint_tracker.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | 2 | 2019-12-14T02:52:32.000Z | 2021-02-18T23:04:44.000Z | import pytest
import trio
from trio.testing import (
wait_all_tasks_blocked,
)
import pytest_trio
from p2p.trio_service import (
background_service,
)
from p2p.tools.factories.discovery import (
EndpointFactory,
EndpointVoteFactory,
ENRFactory,
)
from p2p.tools.factories.keys import (
Priva... | 24.068966 | 98 | 0.765043 |
c6f7ef04035cf05bb8e3e49103a54116d00cab72 | 6,613 | py | Python | sandbox/src1/VG.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 5 | 2016-05-28T14:12:28.000Z | 2021-04-22T10:23:12.000Z | sandbox/src1/VG.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | null | null | null | sandbox/src1/VG.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 2 | 2015-07-13T10:04:10.000Z | 2021-04-22T10:23:23.000Z | # this is module VG
### JHT: if you have to update this module, then also
### check for possible updates in the other modules HG, VG, HS, VS
import os,math
import Tkinter as Tk
from tiasgatfuncs import *
def doit(fn,dp,mt):
""" JHT: this is the module that analyses an ALFOSC pinhole spectrum
with a... | 37.788571 | 94 | 0.6584 |
3bf75aef975a4f0e6ef65cf81901bcc8f0e7322e | 1,120 | py | Python | tasks/deps.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 3 | 2016-10-25T09:37:19.000Z | 2020-07-21T14:06:00.000Z | tasks/deps.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 2 | 2019-05-23T13:08:56.000Z | 2021-02-25T15:28:41.000Z | tasks/deps.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 3 | 2016-09-02T13:15:05.000Z | 2019-10-01T12:55:10.000Z | # -*- encoding: ascii -*-
"""
Dependencies
~~~~~~~~~~~~
"""
import os as _os
import invoke as _invoke
@_invoke.task()
def old(ctx):
""" List outdated python packages """
with ctx.shell.root_dir():
ctx.run('pip list -o', echo=True)
@_invoke.task()
def package(ctx, upgrade=False):
""" Update py... | 23.333333 | 78 | 0.579464 |
ad34055627c3a4247f415c918048f5c376da89e4 | 2,131 | py | Python | ambassador/ambassador/ir/ircors.py | ewbankkit/ambassador | e693d96a0df01e9e9dce79e98b6cf0fcfd5ae02e | [
"Apache-2.0"
] | 2 | 2019-03-21T03:40:09.000Z | 2019-10-27T07:32:00.000Z | ambassador/ambassador/ir/ircors.py | ewbankkit/ambassador | e693d96a0df01e9e9dce79e98b6cf0fcfd5ae02e | [
"Apache-2.0"
] | 2 | 2021-03-20T05:48:09.000Z | 2021-03-20T05:48:58.000Z | ambassador/ambassador/ir/ircors.py | ewbankkit/ambassador | e693d96a0df01e9e9dce79e98b6cf0fcfd5ae02e | [
"Apache-2.0"
] | null | null | null | from typing import Any, TYPE_CHECKING
from ..config import Config
from ..utils import RichStatus
from .irresource import IRResource
if TYPE_CHECKING:
from .ir import IR
class IRCORS (IRResource):
def __init__(self, ir: 'IR', aconf: Config,
rkey: str="ir.cors",
kind: str="... | 31.80597 | 96 | 0.507274 |
192f4ffbf4fc334d86f6d3d7461c053bdf1212ca | 4,951 | py | Python | src/the_tale/the_tale/game/bills/tests/test_place_modifier.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 1 | 2020-04-02T11:51:20.000Z | 2020-04-02T11:51:20.000Z | src/the_tale/the_tale/game/bills/tests/test_place_modifier.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | null | null | null | src/the_tale/the_tale/game/bills/tests/test_place_modifier.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
class PlaceModifierTests(helpers.BaseTestPrototypes):
def setUp(self):
super(PlaceModifierTests, self).setUp()
self.place = self.place1
self.place_2 = self.place2
self.bill_data = bills.place_change_modifier.PlaceModifier(place_id=self.... | 48.539216 | 147 | 0.631994 |
07b7b942cb57cd366254180d58e0d1a7c2818c9c | 799 | py | Python | xlsxwriter/test/comparison/test_textbox09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_textbox09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_textbox09.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 23.5 | 79 | 0.61577 |
d2e7fec343905e8befe630b479dab9f8b21a31f8 | 27,695 | py | Python | model.py | ZhaoYi1031/code2vec | 40553fcc14d3bd93995c73aefdbdefa2e0e66b98 | [
"MIT"
] | null | null | null | model.py | ZhaoYi1031/code2vec | 40553fcc14d3bd93995c73aefdbdefa2e0e66b98 | [
"MIT"
] | null | null | null | model.py | ZhaoYi1031/code2vec | 40553fcc14d3bd93995c73aefdbdefa2e0e66b98 | [
"MIT"
] | null | null | null | import tensorflow as tf
import PathContextReader
import numpy as np
import time
import pickle
from common import common, VocabType
class Model:
topk = 10
num_batches_to_log = 100
def __init__(self, config):
# 模型的主要参数都写在这里
self.config = config
self.sess = tf.Session()
self.ev... | 55.61245 | 176 | 0.583246 |
01a18ad5b2281c4cb8bd4766efa7da3aa9c46055 | 4,310 | py | Python | code/train.py | fengduqianhe/CANE-master | 4d94bbd0669ccb103292e1e1f2c51e7c7a961e54 | [
"MIT"
] | null | null | null | code/train.py | fengduqianhe/CANE-master | 4d94bbd0669ccb103292e1e1f2c51e7c7a961e54 | [
"MIT"
] | null | null | null | code/train.py | fengduqianhe/CANE-master | 4d94bbd0669ccb103292e1e1f2c51e7c7a961e54 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from .DataSet import dataSet
from .import config
from .import cane
import random
import os
import argparse
# parser = argparse.ArgumentParser()
# parser.add_argument('--dataset', '-d')
# parser.add_argument('--rho', '-r')
# args = parser.parse_args()
def start_train(dataset... | 37.155172 | 118 | 0.482599 |
bb2a893d161ec341c6c656e6e8effe2ab7e07387 | 483 | py | Python | mainapp/migrations/0002_request_dateadded.py | reyasmohammed/rescuekerala | 68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c | [
"MIT"
] | 1 | 2018-09-22T21:08:38.000Z | 2018-09-22T21:08:38.000Z | mainapp/migrations/0002_request_dateadded.py | reyasmohammed/rescuekerala | 68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c | [
"MIT"
] | 1 | 2018-08-18T12:00:29.000Z | 2018-08-18T12:00:29.000Z | mainapp/migrations/0002_request_dateadded.py | reyasmohammed/rescuekerala | 68ee6cd4ea7b94e04fd32c4d488bcd7a8f2d371c | [
"MIT"
] | 5 | 2019-11-07T11:34:56.000Z | 2019-11-07T11:36:00.000Z | # Generated by Django 2.1 on 2018-08-11 09:32
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='request',
na... | 23 | 93 | 0.6294 |
4e27a288bc09805b358343501fbdd23ed7fa2e48 | 1,216 | py | Python | src/main.py | danwwagner/repurposed-thermostats | 6d63393e1754175893a0c920aca22e0966277015 | [
"MIT"
] | null | null | null | src/main.py | danwwagner/repurposed-thermostats | 6d63393e1754175893a0c920aca22e0966277015 | [
"MIT"
] | null | null | null | src/main.py | danwwagner/repurposed-thermostats | 6d63393e1754175893a0c920aca22e0966277015 | [
"MIT"
] | null | null | null | from controlcontroller import ControlController
import glob
import os
# (1) Change sensor type here
from sensor import MCP9808
# (2) Change sensor type here
# List representation for use if the system will
# contain multiple types of temperature sensors.
# Signify the temperature sensor that will
# not be averaged a... | 25.87234 | 63 | 0.761513 |
cabe1b5a299524ea61f815b60a4176bd96d9e707 | 4,439 | py | Python | inception_v3/train.py | littlefisherfisher/models | 11fd89c0b45853e2ca99b86bf1638d5e8fbd9d34 | [
"Apache-2.0"
] | null | null | null | inception_v3/train.py | littlefisherfisher/models | 11fd89c0b45853e2ca99b86bf1638d5e8fbd9d34 | [
"Apache-2.0"
] | null | null | null | inception_v3/train.py | littlefisherfisher/models | 11fd89c0b45853e2ca99b86bf1638d5e8fbd9d34 | [
"Apache-2.0"
] | null | null | null | import oneflow.experimental as flow
import argparse
import numpy as np
import os
import time
from models.inceptionv3 import inception_v3
from utils.ofrecord_data_utils import OFRecordDataLoader
def _parse_args():
parser = argparse.ArgumentParser("flags for train inceptionv3")
parser.add_argument(
"--... | 30.613793 | 88 | 0.596756 |
c8d9822bead3281f14c60ff578d4f7e16ee8f80a | 1,502 | py | Python | actions/0_start_cfg.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 3 | 2018-11-20T17:08:00.000Z | 2021-12-13T17:56:16.000Z | actions/0_start_cfg.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 4 | 2017-05-03T16:56:28.000Z | 2021-02-10T21:53:40.000Z | actions/0_start_cfg.py | StackStorm-Exchange/vyatta | a1b16e425da29e279744bdcbff422d7f481b2424 | [
"Apache-2.0"
] | 3 | 2017-05-03T16:06:57.000Z | 2021-01-28T17:48:22.000Z | import requests
import warnings
from st2client.client import Client
from st2common.runners.base_action import Action
class sstartCfg(Action):
def run(self, deviceIP):
# Fetching device credentials based on keys derived from deviceIP
################################################################... | 34.930233 | 78 | 0.486019 |
26c879f188c56ff6fd2e6ba7ccdf1710b640a4fa | 830 | py | Python | src/test/python/excel/test_excel_reader.py | photowey/pytest-dynamic-framework | 4e7b6d74594191006b50831d42e7aae21e154d56 | [
"Apache-2.0"
] | null | null | null | src/test/python/excel/test_excel_reader.py | photowey/pytest-dynamic-framework | 4e7b6d74594191006b50831d42e7aae21e154d56 | [
"Apache-2.0"
] | null | null | null | src/test/python/excel/test_excel_reader.py | photowey/pytest-dynamic-framework | 4e7b6d74594191006b50831d42e7aae21e154d56 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# ---------------------------------------------
# @file test_excel_reader.py
# @description test_excel_reader
# @author WcJun
# @date 2021/07/31
# ---------------------------------------------
import os
from src.main.python.excel.excel_reader import ExcelReader
class TestExcelReader:
de... | 29.642857 | 99 | 0.56506 |
d8f4960084b7cf219088d60cf8c2a24a9d53500a | 12,203 | py | Python | classla/models/tagger.py | clarinsi/classla | 229148f3942ff3428741f4004b7d6643b8a4dc45 | [
"Apache-2.0"
] | 11 | 2021-03-06T07:48:15.000Z | 2022-03-03T13:39:49.000Z | classla/models/tagger.py | clarinsi/classla | 229148f3942ff3428741f4004b7d6643b8a4dc45 | [
"Apache-2.0"
] | 23 | 2021-03-12T13:17:17.000Z | 2022-02-14T08:56:53.000Z | classla/models/tagger.py | clarinsi/classla | 229148f3942ff3428741f4004b7d6643b8a4dc45 | [
"Apache-2.0"
] | 7 | 2021-04-04T15:04:27.000Z | 2022-02-20T17:33:39.000Z | """
Entry point for training and evaluating a POS/morphological features tagger.
This tagger uses highway BiLSTM layers with character and word-level representations, and biaffine classifiers
to produce consistant POS and UFeats predictions.
For details please refer to paper: https://nlp.stanford.edu/pubs/qi2018univer... | 45.533582 | 144 | 0.661559 |
a6b19d4a907ffc7765558217b57ee06b81b3d5d2 | 7,590 | py | Python | auth.py | deb17/regex | fc811a1e42380265986f374598308dc79a0eb88d | [
"MIT"
] | null | null | null | auth.py | deb17/regex | fc811a1e42380265986f374598308dc79a0eb88d | [
"MIT"
] | 1 | 2021-06-01T23:16:37.000Z | 2021-06-01T23:16:37.000Z | auth.py | deb17/regex | fc811a1e42380265986f374598308dc79a0eb88d | [
"MIT"
] | null | null | null | import os
import logging
import bottle
from cork import Cork
from bottle_flash2 import FlashPlugin
# import requests
DATABASE_URL = os.environ['DATABASE_URL']
DBNAME = DATABASE_URL.rsplit('/', 1)[1]
MAILID = os.environ['MAILID']
PASSWORD = os.environ['PASSWORD']
COOKIE_SECRET = os.environ['COOKIE_SECRET']
# SITE_V... | 27.302158 | 73 | 0.630698 |
8b80f590bb4b9c70fe8ec91f61a66dcc5010dc7c | 823 | py | Python | clustertop/__init__.py | rossdylan/clustertop | 996471bdfec956a2e12b723081c00fea91815bf2 | [
"MIT"
] | 2 | 2015-05-09T02:54:43.000Z | 2017-06-26T20:59:24.000Z | clustertop/__init__.py | rossdylan/clustertop | 996471bdfec956a2e12b723081c00fea91815bf2 | [
"MIT"
] | null | null | null | clustertop/__init__.py | rossdylan/clustertop | 996471bdfec956a2e12b723081c00fea91815bf2 | [
"MIT"
] | null | null | null | from clustertop.poller import Poller
from ConfigParser import ConfigParser
import argparse
import importlib
def main():
parser = argparse.ArgumentParser(
description='Control the cluster top backend')
parser.add_argument('command', choices=['check', 'run'])
parser.add_argument('--config', type=str... | 31.653846 | 72 | 0.654921 |
f8b5821c054b709898f5ad3da055fce69d97980e | 11,746 | py | Python | DeepRL_For_HPE/DatasetHandler/BiwiBrowser.py | muratcancicek/Deep_RL_For_Head_Pose_Est | b3436a61a44d20d8bcfd1341792e0533e3ff9fc2 | [
"Apache-2.0"
] | null | null | null | DeepRL_For_HPE/DatasetHandler/BiwiBrowser.py | muratcancicek/Deep_RL_For_Head_Pose_Est | b3436a61a44d20d8bcfd1341792e0533e3ff9fc2 | [
"Apache-2.0"
] | null | null | null | DeepRL_For_HPE/DatasetHandler/BiwiBrowser.py | muratcancicek/Deep_RL_For_Head_Pose_Est | b3436a61a44d20d8bcfd1341792e0533e3ff9fc2 | [
"Apache-2.0"
] | null | null | null | # Author: Muratcan Cicek, https://users.soe.ucsc.edu/~cicekm/
import os
if 'COMPUTERNAME' in os.environ:
if os.environ['COMPUTERNAME'] == "MSI3":
os.environ['KERAS_BACKEND'] = 'theano'
os.environ['MKL_THREADING_LAYER'] = 'GNU'
# Dirty importing that allows the main author to switch environments eas... | 48.139344 | 253 | 0.685595 |
8113a8cba2bcf2286cd0500e071beb5cb68e6eef | 20,221 | py | Python | fastai/dataset.py | DeepBodapati/fastai | 3cfa9361ee1daadeb8a9df540c2da550f77a2dc2 | [
"Apache-2.0"
] | null | null | null | fastai/dataset.py | DeepBodapati/fastai | 3cfa9361ee1daadeb8a9df540c2da550f77a2dc2 | [
"Apache-2.0"
] | null | null | null | fastai/dataset.py | DeepBodapati/fastai | 3cfa9361ee1daadeb8a9df540c2da550f77a2dc2 | [
"Apache-2.0"
] | null | null | null | import csv
from .imports import *
from .torch_imports import *
from .core import *
from .transforms import *
from .layer_optimizer import *
from .dataloader import DataLoader
def get_cv_idxs(n, cv_idx=0, val_pct=0.2, seed=42):
""" Get a list of index values for Validation set from a dataset
Arguments:
... | 40.523046 | 146 | 0.642154 |
673354e3055a7b1d71b08746c1c94df14e4db352 | 4,429 | py | Python | TestFileSize1000_3.py | ytyaru/Python.FileSize.201702071138 | 569c45d5e9b91befbaece50520eb69955e148c65 | [
"CC0-1.0"
] | null | null | null | TestFileSize1000_3.py | ytyaru/Python.FileSize.201702071138 | 569c45d5e9b91befbaece50520eb69955e148c65 | [
"CC0-1.0"
] | 6 | 2017-02-09T00:54:50.000Z | 2017-02-09T10:56:13.000Z | TestFileSize1000_3.py | ytyaru/Python.FileSize.201702071138 | 569c45d5e9b91befbaece50520eb69955e148c65 | [
"CC0-1.0"
] | null | null | null | import unittest
import FileSize
from decimal import Decimal
class TestFileSize1000_3(unittest.TestCase):
def test_999(self):
self.__target = FileSize.FileSize(byte_size_of_unit=1000, integral_figure_num=3)
actual = 999
self.assertEqual(self.__target.Get(actual), "999 B")
def test_1000(se... | 47.117021 | 88 | 0.671032 |
cd9a73d95108ad89864474bf0fd85766c9edfd0d | 696 | py | Python | scripts/show_environment.py | lmenou/py-pde | 3899cba0481657ea7b3d5c05e318d0b851bbe8cd | [
"MIT"
] | 163 | 2020-03-30T09:26:32.000Z | 2022-03-31T12:22:18.000Z | scripts/show_environment.py | lmenou/py-pde | 3899cba0481657ea7b3d5c05e318d0b851bbe8cd | [
"MIT"
] | 127 | 2020-03-31T15:33:15.000Z | 2022-03-30T19:27:47.000Z | scripts/show_environment.py | lmenou/py-pde | 3899cba0481657ea7b3d5c05e318d0b851bbe8cd | [
"MIT"
] | 37 | 2020-03-10T18:54:22.000Z | 2022-03-29T14:45:40.000Z | #!/usr/bin/env python3
"""
This script shows important information about the current python environment and the
associated installed packages. This information can be helpful in understanding issues
that occur with the package
"""
import sys
from pathlib import Path
PACKAGE_PATH = Path(__file__).resolve().parents[1]
... | 26.769231 | 86 | 0.682471 |
442ff9956300f476d06723650adf00e18c5aaad8 | 14,636 | py | Python | tests/app/questionnaire/test_value_source_resolver.py | pricem14pc/eq-questionnaire-runner | 54cc2947ba181a2673ea1fb7cf6b4acdd609e06b | [
"MIT"
] | null | null | null | tests/app/questionnaire/test_value_source_resolver.py | pricem14pc/eq-questionnaire-runner | 54cc2947ba181a2673ea1fb7cf6b4acdd609e06b | [
"MIT"
] | null | null | null | tests/app/questionnaire/test_value_source_resolver.py | pricem14pc/eq-questionnaire-runner | 54cc2947ba181a2673ea1fb7cf6b4acdd609e06b | [
"MIT"
] | null | null | null | from typing import Mapping, Optional, Union
from unittest.mock import Mock
import pytest
from app.data_models import AnswerStore, ListStore
from app.data_models.answer import Answer
from app.questionnaire import Location, QuestionnaireSchema
from app.questionnaire.location import InvalidLocationException
from app.que... | 28.811024 | 87 | 0.585747 |
2b56986071cac09222bf3493b4e6582683cb2d44 | 1,762 | py | Python | pkg/codegen/testing/test/testdata/plain-and-default/python/setup.py | goverdhan07/pulumi | 301efa60653c90047a3427af41339387223dbccd | [
"Apache-2.0"
] | 12,004 | 2018-06-17T23:56:29.000Z | 2022-03-31T18:00:09.000Z | pkg/codegen/testing/test/testdata/plain-and-default/python/setup.py | goverdhan07/pulumi | 301efa60653c90047a3427af41339387223dbccd | [
"Apache-2.0"
] | 6,263 | 2018-06-17T23:27:24.000Z | 2022-03-31T19:20:35.000Z | pkg/codegen/testing/test/testdata/plain-and-default/python/setup.py | goverdhan07/pulumi | 301efa60653c90047a3427af41339387223dbccd | [
"Apache-2.0"
] | 706 | 2018-06-17T23:56:50.000Z | 2022-03-31T11:20:23.000Z | # coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import errno
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_call
VERSION = "0.0.0"
PLUGIN_VERSIO... | 29.366667 | 93 | 0.585698 |
4c51c8366d9b541619f497b38b35d7548674254f | 58 | py | Python | edit/models/restorers/__init__.py | tpoisonooo/basicVSR_mge | 53df836a7dcc075083ef7c9ff7cabea69fec3192 | [
"Apache-2.0"
] | 28 | 2021-03-23T09:00:33.000Z | 2022-03-10T03:55:00.000Z | edit/models/restorers/__init__.py | tpoisonooo/basicVSR_mge | 53df836a7dcc075083ef7c9ff7cabea69fec3192 | [
"Apache-2.0"
] | 2 | 2021-04-17T20:08:55.000Z | 2022-02-01T17:48:55.000Z | edit/models/restorers/__init__.py | tpoisonooo/basicVSR_mge | 53df836a7dcc075083ef7c9ff7cabea69fec3192 | [
"Apache-2.0"
] | 5 | 2021-05-19T07:35:56.000Z | 2022-01-13T02:11:50.000Z | from .BidirectionalRestorer import BidirectionalRestorer
| 19.333333 | 56 | 0.896552 |
ca5630fc244f181929c18bf90d460051333ae183 | 392 | py | Python | main/forms.py | agilghif/temenin-isoman | 18a768363420709c3a03a7d1453ddd8fa138c8b5 | [
"Unlicense"
] | null | null | null | main/forms.py | agilghif/temenin-isoman | 18a768363420709c3a03a7d1453ddd8fa138c8b5 | [
"Unlicense"
] | null | null | null | main/forms.py | agilghif/temenin-isoman | 18a768363420709c3a03a7d1453ddd8fa138c8b5 | [
"Unlicense"
] | null | null | null | from django import *
from django.forms import ModelForm
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.forms import ModelForm, Textarea, TextInput
from deteksi_mandiri.models import *
class CreateUserForm(UserCreationForm):
class Meta:
model ... | 30.153846 | 64 | 0.762755 |
b268ed3d7df9edf69a267fb5fb9a4374f4add36d | 1,420 | py | Python | 17huo.py | ZhongXinWang/python | 4cf3ecdc9d9e811e777c6d8408a8319097cfdec3 | [
"Apache-2.0"
] | null | null | null | 17huo.py | ZhongXinWang/python | 4cf3ecdc9d9e811e777c6d8408a8319097cfdec3 | [
"Apache-2.0"
] | null | null | null | 17huo.py | ZhongXinWang/python | 4cf3ecdc9d9e811e777c6d8408a8319097cfdec3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#Author:Winston.Wang
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
'''
打开网页 get()
find_element_by_css_selector() 根据选择器找元素
find_elements_by_tag_name() 根据标签的名字
execute_script() 执行脚本
set_page_load_timeout() #等待超时时间
'''
#指定浏览... | 30.869565 | 146 | 0.754225 |
64afb0edf416b9ff1b8bc4aacefa53cb1cc02a37 | 9,555 | py | Python | doc/conf.py | sam-at-github/PySCIPOpt | 35775087653e6a920cb21683b7e2922141e8fb01 | [
"MIT"
] | 2 | 2019-04-25T12:56:06.000Z | 2019-04-25T12:56:10.000Z | PySCIPOpt/doc/conf.py | linjc16/TBranT | cc051e386775da87f25964f98547c29dde841362 | [
"MIT"
] | 3 | 2017-07-26T15:24:02.000Z | 2018-07-10T17:08:25.000Z | PySCIPOpt/doc/conf.py | linjc16/TBranT | cc051e386775da87f25964f98547c29dde841362 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# PySCIPOpt documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 5 12:34:03 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | 32.5 | 80 | 0.717321 |
13cb4ac0e47e4a5c8de3eb48db102ea357216456 | 12,238 | py | Python | tests/test_config.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
import os
from flexmock import flexmock
from mcloud.config import YamlConfig, Service, UnknownServiceError, ConfigParseError
from mcloud.container import PrebuiltImageBuilder, DockerfileImageBuilder, InlineDockerfileImageBuilder
import pytest
def test_not_existent_file():
with ... | 24.378486 | 139 | 0.576483 |
08fc71e38a1d22a22e5accfb0af79b6dba2d03f2 | 827 | py | Python | kubernetes/test/test_v1_job_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_job_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_job_status.py | jraby/kubernetes-client-python | e6e7b710d0b15fbde686bc9dccf00da5951bef84 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 19.232558 | 105 | 0.697703 |
844fe04c80108c09800725a81ab23f3ebc6f146c | 3,277 | py | Python | jagger/jagger/client.py | arruda/magic_it_up | 251a5cbd1fdebcea5a0150eec1367fd58b0da2d3 | [
"MIT"
] | null | null | null | jagger/jagger/client.py | arruda/magic_it_up | 251a5cbd1fdebcea5a0150eec1367fd58b0da2d3 | [
"MIT"
] | null | null | null | jagger/jagger/client.py | arruda/magic_it_up | 251a5cbd1fdebcea5a0150eec1367fd58b0da2d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import socket
import random
import logging
import time
from constants import MSG_DATE_SEP, END_MSG, ALLOWED_KEYS
logging.basicConfig(filename='jagger_client.log', level=logging.DEBUG)
logger = logging.getLogger("jagger_client")
def check_counter_and_sk... | 29.258929 | 77 | 0.632896 |
77552639a41ff4d7c8ffa74a25a5b9b0995071f9 | 25 | py | Python | controller/__init__.py | hotpoor-for-Liwei/hj_hackathon_201607 | 7ef326a733f88e9a02961a5b467b9109e5b375b9 | [
"MIT"
] | 1 | 2021-12-21T10:42:46.000Z | 2021-12-21T10:42:46.000Z | www_local/controller/__init__.py | 2218084076/hotpoor_autoclick_xhs | a52446ba691ac19e43410a465dc63f940c0e444d | [
"Apache-2.0"
] | 1 | 2016-08-03T06:11:08.000Z | 2016-08-03T06:11:08.000Z | www_local/controller/__init__.py | 2218084076/hotpoor_autoclick_xhs | a52446ba691ac19e43410a465dc63f940c0e444d | [
"Apache-2.0"
] | 2 | 2019-11-13T06:11:25.000Z | 2020-03-13T06:19:00.000Z | # -*- encoding: utf8 -*-
| 12.5 | 24 | 0.48 |
6af8cc2b510b0b061b74b1a3b8db9e6d8ccf1c8e | 26,910 | py | Python | tools/importers/CNTK/cntk_to_ell.py | n-gineer/ELL | 2e5b93fe13993073a9486fc8720359ae4a49f737 | [
"MIT"
] | 2,094 | 2016-09-28T05:55:24.000Z | 2019-05-04T19:06:36.000Z | tools/importers/CNTK/cntk_to_ell.py | n-gineer/ELL | 2e5b93fe13993073a9486fc8720359ae4a49f737 | [
"MIT"
] | 213 | 2017-06-30T12:53:40.000Z | 2019-05-03T06:35:38.000Z | tools/importers/CNTK/cntk_to_ell.py | n-gineer/ELL | 2e5b93fe13993073a9486fc8720359ae4a49f737 | [
"MIT"
] | 301 | 2017-03-24T08:40:00.000Z | 2019-05-02T21:22:28.000Z | ####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: cntk_to_ell.py (importers)
# Authors: Byron Changuion
#
# Requires: Python 3.x, cntk-2.4
#
#####################################################################... | 46.881533 | 119 | 0.634262 |
54d76c5c3aee421d915ca9ca85c36ac4c92909e8 | 3,137 | py | Python | Outros/Advanced Backup v.0.1 alpha/Application/interface.py | paulovrn12/Aprendizados | fab59169e81d3f86709206dccbee69a69cf29964 | [
"MIT"
] | null | null | null | Outros/Advanced Backup v.0.1 alpha/Application/interface.py | paulovrn12/Aprendizados | fab59169e81d3f86709206dccbee69a69cf29964 | [
"MIT"
] | null | null | null | Outros/Advanced Backup v.0.1 alpha/Application/interface.py | paulovrn12/Aprendizados | fab59169e81d3f86709206dccbee69a69cf29964 | [
"MIT"
] | null | null | null | # IMPORTAÇÕES
from tkinter import *
import robocopy as rc
def TelaInicio():
# VARIÁVEIS ÚTEIS
icon_dir = r'Scripts\Advanced Backup v.0.1 alpha\Application\data\icon\adv.ico'
# GUI
tela = Tk()
tela.title('Início - Advanced Backup v.0.1 alpha')
CentroMonitor(tela, 400, 180)
tela.iconbit... | 41.826667 | 177 | 0.669748 |
f82da76e6a951eb3963c0e9ec99ce38bb451cb03 | 5,115 | py | Python | onlinecourse/migrations/0001_initial.py | jtihomirovs/final-cloud-app-with-database | b850cf743c98dceac77abdc43de40df40c52bb0c | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | jtihomirovs/final-cloud-app-with-database | b850cf743c98dceac77abdc43de40df40c52bb0c | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | jtihomirovs/final-cloud-app-with-database | b850cf743c98dceac77abdc43de40df40c52bb0c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.3 on 2022-01-13 10:39
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... | 46.926606 | 210 | 0.583187 |
851e4db9136a44b5000b9f70486fa0f6e1bc1bc8 | 2,464 | py | Python | hathor/transaction/genesis.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | 51 | 2019-12-28T03:33:27.000Z | 2022-03-10T14:03:03.000Z | hathor/transaction/genesis.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | 316 | 2019-09-10T09:20:05.000Z | 2022-03-31T20:18:56.000Z | hathor/transaction/genesis.py | jansegre/hathor-core | 22b3de6be2518e7a0797edbf0e4f6eb1cf28d6fd | [
"Apache-2.0"
] | 19 | 2020-01-04T00:13:18.000Z | 2022-02-08T21:18:46.000Z | # Copyright 2021 Hathor Labs
#
# 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... | 29.686747 | 106 | 0.737013 |
9df791e491b8a3300aa5b5aed8ec37448d86d231 | 1,183 | py | Python | tests/conftest.py | rsokl/noggin | 154e4fffa3298eb1f65e1720712b21264733a7cd | [
"MIT"
] | 25 | 2019-05-28T13:59:43.000Z | 2021-08-20T00:08:10.000Z | tests/conftest.py | rsokl/noggin | 154e4fffa3298eb1f65e1720712b21264733a7cd | [
"MIT"
] | 23 | 2019-05-30T14:51:58.000Z | 2020-04-17T15:53:20.000Z | tests/conftest.py | rsokl/noggin | 154e4fffa3298eb1f65e1720712b21264733a7cd | [
"MIT"
] | 1 | 2020-04-17T15:54:52.000Z | 2020-04-17T15:54:52.000Z | import os
import tempfile
import matplotlib.pyplot as plt
import pytest
from hypothesis import Verbosity, settings
settings.register_profile("ci", deadline=None)
settings.register_profile("intense", deadline=None, max_examples=1000)
settings.register_profile("dev", max_examples=10)
settings.register_profile("debug", ... | 28.853659 | 80 | 0.726965 |
d55712f0c4c674bb0c34d5842cdb03b85422bc19 | 7,460 | py | Python | grading/utils.py | cc3-ug/lab03-2022 | a0bf2ae52185aa3070d9bcc5d1d349377371884f | [
"MIT"
] | null | null | null | grading/utils.py | cc3-ug/lab03-2022 | a0bf2ae52185aa3070d9bcc5d1d349377371884f | [
"MIT"
] | null | null | null | grading/utils.py | cc3-ug/lab03-2022 | a0bf2ae52185aa3070d9bcc5d1d349377371884f | [
"MIT"
] | null | null | null | import os
import re
import json
import boto3
import base64
import shutil
import hashlib
import zipfile
import paramiko
import tempfile
import pycparser
from os import environ
from glob import glob
from Crypto import Random
from subprocess import run
from subprocess import PIPE
from tabulate import tabulate
from Crypto.... | 24.299674 | 97 | 0.587668 |
e09d6c9558303704e36c4b1d75e8a5e962464c47 | 3,835 | py | Python | test/setups/custom/sinq_amor_diaphragms.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | test/setups/custom/sinq_amor_diaphragms.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | test/setups/custom/sinq_amor_diaphragms.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Various devices for diaphragms in AMOR'
devices = dict(
xs = device('test.utils.TestDevice',
description = 'xs motor',
precision = .1,
unit = 'mm',
abslimits = (-20, 20),
),
d1t = device('nicos.devices.generic.VirtualMotor',
description = 'Slit 1 top',... | 30.927419 | 75 | 0.549413 |
eb3962289f4b9202c40d4c9c1bc0627ece26e3c0 | 11,634 | py | Python | tests/test_omegaconf.py | anthonytec2/omegaconf | 9a9c662a441ff828eadbfcd6fbf9e307439a93fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_omegaconf.py | anthonytec2/omegaconf | 9a9c662a441ff828eadbfcd6fbf9e307439a93fd | [
"BSD-3-Clause"
] | null | null | null | tests/test_omegaconf.py | anthonytec2/omegaconf | 9a9c662a441ff828eadbfcd6fbf9e307439a93fd | [
"BSD-3-Clause"
] | null | null | null | from typing import Any
import pytest
from pytest import raises
from omegaconf import (
MISSING,
BooleanNode,
DictConfig,
EnumNode,
FloatNode,
IntegerNode,
ListConfig,
MissingMandatoryValue,
OmegaConf,
StringNode,
)
from omegaconf.errors import UnsupportedInterpolationType
from... | 30.296875 | 87 | 0.556558 |
2f453c0e71600727ca79d3263d5fd071961a01fc | 15,138 | py | Python | salt/modules/pip.py | abh/salt | e8870573a2d3eca1a7794ce8340797fa487de04d | [
"Apache-2.0"
] | 1 | 2017-09-09T11:21:13.000Z | 2017-09-09T11:21:13.000Z | salt/modules/pip.py | abh/salt | e8870573a2d3eca1a7794ce8340797fa487de04d | [
"Apache-2.0"
] | null | null | null | salt/modules/pip.py | abh/salt | e8870573a2d3eca1a7794ce8340797fa487de04d | [
"Apache-2.0"
] | null | null | null | '''
Install Python packages with pip to either the system or a virtualenv
'''
# Import Python libs
import os
import logging
import tempfile
import shutil
# Import Salt libs
from salt.exceptions import CommandExecutionError, CommandNotFoundError
# It would be cool if we could use __virtual__() in this module, though, s... | 31.27686 | 147 | 0.593605 |
201709cde10677f321898e3ca43a3bb6619c6bd2 | 3,844 | py | Python | make_table.py | LEEAHRI/baekjoon | b4732043f40b52b09b37329072629f80581e02ee | [
"MIT"
] | null | null | null | make_table.py | LEEAHRI/baekjoon | b4732043f40b52b09b37329072629f80581e02ee | [
"MIT"
] | null | null | null | make_table.py | LEEAHRI/baekjoon | b4732043f40b52b09b37329072629f80581e02ee | [
"MIT"
] | 1 | 2021-07-07T05:52:50.000Z | 2021-07-07T05:52:50.000Z | import sys
def checkData(data):
Validate = [ len(i) == 5 for i in data ] # "최소, 최대 2"
result = False in Validate
if result:
print(Validate.index(False))
return result
def urllevel(name):
name, number = name.lower()[:-1], name[-1]
nameDB = [ "bronze", "sliver", "gold", "platinum", "dia... | 29.569231 | 102 | 0.502862 |
c37ee4d0134da1282567998cfea137d3c1ead503 | 7,213 | py | Python | imarispy/bdv.py | tlambert03/imarispy | 6e5e1228c11a8ae6df478070a9790e2d95888abc | [
"MIT"
] | 9 | 2018-05-31T12:01:56.000Z | 2020-03-23T13:11:29.000Z | imarispy/bdv.py | tlambert03/imarispy | 6e5e1228c11a8ae6df478070a9790e2d95888abc | [
"MIT"
] | 3 | 2018-05-30T21:12:47.000Z | 2020-08-19T20:53:06.000Z | imarispy/bdv.py | tlambert03/imarispy | 6e5e1228c11a8ae6df478070a9790e2d95888abc | [
"MIT"
] | 4 | 2018-09-21T02:11:13.000Z | 2020-08-11T12:39:22.000Z | import os
import h5py
import numpy as np
from xml.etree import ElementTree as ET
from .util import subsample_data
def np_to_bdv(array,
fname='myfile',
subsamp=((1, 1, 1), (1, 2, 2)),
chunks=((4, 32, 32), (16, 16, 16)),
compression='gzip'
):
ass... | 38.164021 | 112 | 0.549841 |
8940cb423adffcc9edb1d3b0ab37e5196834169a | 1,318 | py | Python | primitives/get_quick_pray_location.py | anordin95/replay_mouse | 569abe771cac3b639317b1ca97c98b0c486a4714 | [
"MIT"
] | null | null | null | primitives/get_quick_pray_location.py | anordin95/replay_mouse | 569abe771cac3b639317b1ca97c98b0c486a4714 | [
"MIT"
] | null | null | null | primitives/get_quick_pray_location.py | anordin95/replay_mouse | 569abe771cac3b639317b1ca97c98b0c486a4714 | [
"MIT"
] | null | null | null | from primitives.click_location import ClickLocation
from pynput import keyboard, mouse
import logging
import pickle
import random
import pyautogui
from functools import partial
import time
quick_pray_location = None
logger = logging.getLogger(__name__)
def on_press(key):
if key == keyboard.Key.esc:
logger.critica... | 25.843137 | 73 | 0.7739 |
1f758f18f5346233439322bdf35a4dbcc6852c54 | 3,612 | py | Python | playbooks/files/rax-maas/plugins/pacemaker.py | JCallicoat/rpc-maas | 879bab6623339c99c288acf9191b445fe1ea1fa2 | [
"Apache-2.0"
] | 31 | 2015-01-03T10:30:56.000Z | 2019-06-23T22:21:24.000Z | playbooks/files/rax-maas/plugins/pacemaker.py | JCallicoat/rpc-maas | 879bab6623339c99c288acf9191b445fe1ea1fa2 | [
"Apache-2.0"
] | 457 | 2015-01-01T15:58:47.000Z | 2021-06-10T12:04:11.000Z | playbooks/files/rax-maas/plugins/pacemaker.py | JCallicoat/rpc-maas | 879bab6623339c99c288acf9191b445fe1ea1fa2 | [
"Apache-2.0"
] | 65 | 2015-03-02T02:39:59.000Z | 2021-12-22T21:57:01.000Z | #!/usr/bin/env python3
# Copyright 2014, Rackspace US, 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 applicab... | 31.684211 | 79 | 0.6567 |
704d58674aa2460c3770832605de99729383ca7a | 8,399 | py | Python | mne/commands/mne_compute_proj_ecg.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 2 | 2015-09-27T20:33:49.000Z | 2020-04-22T19:10:56.000Z | mne/commands/mne_compute_proj_ecg.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | null | null | null | mne/commands/mne_compute_proj_ecg.py | Anevar/mne-python | 15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb | [
"BSD-3-Clause"
] | 1 | 2018-09-15T09:45:38.000Z | 2018-09-15T09:45:38.000Z | #!/usr/bin/env python
"""Compute SSP/PCA projections for ECG artifacts
You can do for example:
$ mne compute_proj_ecg -i sample_audvis_raw.fif -c "MEG 1531" --l-freq 1 --h-freq 100 --rej-grad 3000 --rej-mag 4000 --rej-eeg 100
"""
from __future__ import print_function
# Authors : Alexandre Gramfort, Ph.D.
# ... | 40.379808 | 130 | 0.556971 |
e1fba5d13c536e800e4a197861ca00fae6d88045 | 1,516 | py | Python | 1/kiwi_juice.py | SakiFu/top-coder | 6ee54b6481acf9d2b4dd315cdb1fee30de9a5a4d | [
"MIT"
] | null | null | null | 1/kiwi_juice.py | SakiFu/top-coder | 6ee54b6481acf9d2b4dd315cdb1fee30de9a5a4d | [
"MIT"
] | null | null | null | 1/kiwi_juice.py | SakiFu/top-coder | 6ee54b6481acf9d2b4dd315cdb1fee30de9a5a4d | [
"MIT"
] | null | null | null | import math
"""
Taro has prepared delicious kiwi fruit juice. He poured it into N bottles numbered from 0 to N -1.
The capacity of the i-th bottle is capacities[i] liters, and he poured juice[i] liters of kiwi juice into this bottle.
Now he wants to redistribute juice in the bottles.
In order to do this, he will perf... | 32.956522 | 119 | 0.639182 |
8d64be0e1beb46125a75be4ad90865f8c4981b2d | 563 | py | Python | Solutions/16/Printer.py | hosseindehghanipour1998/Python-Training | 8825f43c9b843d927453b555b84674f609501264 | [
"MIT"
] | 1 | 2019-11-03T15:12:28.000Z | 2019-11-03T15:12:28.000Z | Solutions/16/Printer.py | hosseindehghanipour1998/python2-sample-questions | 8825f43c9b843d927453b555b84674f609501264 | [
"MIT"
] | null | null | null | Solutions/16/Printer.py | hosseindehghanipour1998/python2-sample-questions | 8825f43c9b843d927453b555b84674f609501264 | [
"MIT"
] | null | null | null | #Q2-a
def a(x):
i = 1
while i<x:
print i,
i+=1
while x>0:
print x,
x-=1
#-----------------------------------
#Q2-b
def b(x):
print x*" ",
'''
or we can use this one:
def b(x):
while i<x:
print " ",
'''
#-----------------------------------
... | 13.093023 | 36 | 0.301954 |
1f013aad029a9dff945e7367ae51240bcca2dcc6 | 4,887 | py | Python | Round F/festival2.py | romilxz/GoogleKickStart-2021 | 383f28ee7c6041e176db5f8388eed1564c5c4347 | [
"MIT"
] | 76 | 2021-03-21T14:13:32.000Z | 2022-03-20T03:30:06.000Z | Round F/festival2.py | romilxz/GoogleKickStart-2021 | 383f28ee7c6041e176db5f8388eed1564c5c4347 | [
"MIT"
] | 3 | 2021-05-10T13:40:21.000Z | 2021-12-19T17:33:12.000Z | Round F/festival2.py | romilxz/GoogleKickStart-2021 | 383f28ee7c6041e176db5f8388eed1564c5c4347 | [
"MIT"
] | 32 | 2021-03-21T15:07:05.000Z | 2022-03-18T21:53:34.000Z | # Copyright (c) 2021 kamyu. All rights reserved.
#
# Google Kick Start 2021 Round F - Problem B. Festival
# https://codingcompetitions.withgoogle.com/kickstart/round/0000000000435bae/0000000000887dba
#
# Time: O(NlogN), pass in PyPy2 but Python2
# Space: O(N)
#
from random import randint, seed
# Template:
# https://... | 31.127389 | 93 | 0.54246 |
2996cd8f55fb01337ae1b28b08405a27b690ff98 | 785 | py | Python | test/request_subscribe_rest.py | bootpay/server_python | fd288e0f85e272587a564da2bdd1a1ef3a49380d | [
"MIT"
] | 2 | 2018-12-20T07:52:39.000Z | 2019-11-17T16:07:39.000Z | test/request_subscribe_rest.py | bootpay/server_python | fd288e0f85e272587a564da2bdd1a1ef3a49380d | [
"MIT"
] | null | null | null | test/request_subscribe_rest.py | bootpay/server_python | fd288e0f85e272587a564da2bdd1a1ef3a49380d | [
"MIT"
] | 5 | 2018-12-31T00:42:05.000Z | 2022-03-23T10:05:52.000Z | import sys
import os
import time
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from lib.BootpayApi import BootpayApi
bootpay = BootpayApi('5b8f6a4d396fa665fdc2b5ea', 'rm6EYECr6aroQVG2ntW0A6LpWnkTgP4uQ3H18sDDUYw=')
result = bootpay.get_access_token()
if result['status'] is 200:
response = bootpa... | 23.787879 | 96 | 0.601274 |
c8b336e342865a7ab2e4f501cadfad78e74c2313 | 8,559 | py | Python | sdk/lusid/models/paged_resource_list_of_property_definition_search_result.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/paged_resource_list_of_property_definition_search_result.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/paged_resource_list_of_property_definition_search_result.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.4425
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 32.05618 | 140 | 0.626241 |
9b661acb15724c1bd487d54e97db991ff3c3e20d | 3,797 | py | Python | src/python/src/utils/file_saver.py | halimov-oa/scrapy-boilerplate | fe3c552fed26bedb0618c245ab923aa34a89ac9d | [
"MIT"
] | null | null | null | src/python/src/utils/file_saver.py | halimov-oa/scrapy-boilerplate | fe3c552fed26bedb0618c245ab923aa34a89ac9d | [
"MIT"
] | null | null | null | src/python/src/utils/file_saver.py | halimov-oa/scrapy-boilerplate | fe3c552fed26bedb0618c245ab923aa34a89ac9d | [
"MIT"
] | null | null | null | import cgi
import mimetypes
import os
import pathlib
import re
from html import unescape
from typing import Optional, Tuple
from uuid import uuid4
from urllib.parse import unquote
from furl import furl
from scrapy.http import Response
class FileSaver:
folder_size: int
folder_number: int
select_folder: st... | 34.207207 | 117 | 0.624704 |
26431c64510748aee61329bbbd39815af5d0ec6e | 21,960 | py | Python | typingdefense/level.py | Juzley/typingdefense | 8adbd0d4e02bcd8ac1a1c827efb0e7c740bded82 | [
"MIT"
] | null | null | null | typingdefense/level.py | Juzley/typingdefense | 8adbd0d4e02bcd8ac1a1c827efb0e7c740bded82 | [
"MIT"
] | null | null | null | typingdefense/level.py | Juzley/typingdefense | 8adbd0d4e02bcd8ac1a1c827efb0e7c740bded82 | [
"MIT"
] | null | null | null | """Module containing all classes required to represent and handle a level."""
import math
import numpy
import weakref
import json
import copy
import ctypes
from collections import deque
from enum import Enum, unique
from OpenGL import GL
import typingdefense.glutils as glutils
import typingdefense.camera as camera
impo... | 37.346939 | 80 | 0.514754 |
48c876e724d77ac50edfd30e7c7037d74c99f265 | 8,767 | py | Python | python3.4Smartforest/lib/python3.4/site-packages/django/core/management/commands/squashmigrations.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/core/management/commands/squashmigrations.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/core/management/commands/squashmigrations.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections, migrations
from django.db.migrations.loader import AmbiguityError, MigrationLoader
from django.db.migrations.migration import SwappableTuple
from django.db.migrations.o... | 8,767 | 8,767 | 0.610243 |
8faad1c0f417eab3396b362bcc477d27aecd7393 | 13,717 | py | Python | tools/krr-Cortes.py | cosmo-epfl/glosim | 930998b7249adc0ac3e48308314233341de6e73f | [
"MIT"
] | 24 | 2017-04-19T14:23:53.000Z | 2021-12-23T13:37:23.000Z | tools/krr-Cortes.py | lab-cosmo/glosim | 930998b7249adc0ac3e48308314233341de6e73f | [
"MIT"
] | 9 | 2017-05-23T10:30:08.000Z | 2019-02-05T06:43:04.000Z | tools/krr-Cortes.py | lab-cosmo/glosim | 930998b7249adc0ac3e48308314233341de6e73f | [
"MIT"
] | 11 | 2017-05-01T14:37:40.000Z | 2021-12-23T14:00:12.000Z | #!/usr/bin/env python
# compute kernel ridge regression for a data set given a kernel matrix
# and a vector of the observed properties. syntax:
# $ krr.py <kernel.dat> <properties.dat> [ options ]
import argparse
import numpy as np
import sys
import MultipleKernelLearning as mkl
import costs as cst
from select_land... | 49.88 | 296 | 0.594007 |
9980b4d38a3ae528fc3bf8e52c015fd5e81cec7d | 2,661 | py | Python | vendor/github.com/elastic/beats/metricbeat/scripts/config_collector.py | PPACI/krakenbeat | e75ec8f006164acb8a57d0c9609bebe534955813 | [
"Apache-2.0"
] | 3 | 2018-01-04T19:15:26.000Z | 2020-02-20T03:35:27.000Z | vendor/github.com/elastic/beats/metricbeat/scripts/config_collector.py | PPACI/krakenbeat | e75ec8f006164acb8a57d0c9609bebe534955813 | [
"Apache-2.0"
] | null | null | null | vendor/github.com/elastic/beats/metricbeat/scripts/config_collector.py | PPACI/krakenbeat | e75ec8f006164acb8a57d0c9609bebe534955813 | [
"Apache-2.0"
] | 1 | 2020-10-11T14:57:48.000Z | 2020-10-11T14:57:48.000Z | import os
import argparse
import yaml
# Collects config for all modules
def collect(beat_name, beat_path, full=False):
base_dir = beat_path + "/module"
path = os.path.abspath(base_dir)
# yml file
config_yml = "\n#========================== Modules configuration =====================... | 28.010526 | 103 | 0.565201 |
e1308e34f20c16ef49a124a89d7c6e894d69501e | 803 | py | Python | setup.py | zekearneodo/ceciestunepipe | 7e771783769816f37de44077177152175aecc2b7 | [
"MIT"
] | null | null | null | setup.py | zekearneodo/ceciestunepipe | 7e771783769816f37de44077177152175aecc2b7 | [
"MIT"
] | null | null | null | setup.py | zekearneodo/ceciestunepipe | 7e771783769816f37de44077177152175aecc2b7 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='ceciestunepipe',
version='0.1',
description='Spike sorting pipeline based on spikeinterface for spikeglx and openephys',
url='http://github.com/zekearneodo/ceciestunepipe',
author='Zeke Arneodo',
author_email='ezequiel@ini.ethz.ch',
license='... | 33.458333 | 94 | 0.449564 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.