hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d311312627a88c1949f4689d306a5a8078da740 | 33,884 | py | Python | pcdsdevices/interface.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/interface.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/interface.py | slacAdpai/pcdsdevices | 7d79821f8b5652a7fd457b9a73d22ef37b2043d3 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Module for defining bell-and-whistles movement features.
"""
import functools
import logging
import numbers
import re
import signal
import time
from contextlib import contextmanager
from pathlib import Path
from threading import Event, Thread
from types import MethodType, SimpleNamespace
from weakref import WeakSet... | 33.884 | 79 | 0.578267 |
b7ef48ad6ae2e2e52dc5f4669657354bb2214ea5 | 403 | py | Python | history_actions/loader.py | marcosschroh/django-history-actions | fc29eee29ed4f6ba71a366783fefdbe223cbed21 | [
"MIT"
] | 1 | 2018-09-11T18:35:42.000Z | 2018-09-11T18:35:42.000Z | history_actions/loader.py | marcosschroh/django-history-actions | fc29eee29ed4f6ba71a366783fefdbe223cbed21 | [
"MIT"
] | null | null | null | history_actions/loader.py | marcosschroh/django-history-actions | fc29eee29ed4f6ba71a366783fefdbe223cbed21 | [
"MIT"
] | null | null | null | from django.apps import apps
from django.db.models.signals import post_save
from history_actions import mixins
def subscribe_to_signals():
for app, models in apps.all_models.items():
for _, model in models.items():
if issubclass(model, mixins.PostSaveHistory):
post_save.conne... | 28.785714 | 78 | 0.692308 |
06f81c54e0c39f1f522c11571ac1e4ec5ba138e1 | 525 | py | Python | test/test_blender.py | ottopasuuna/blender-render-tool | 99f7b9e3ee1004efb739c7812bd0e976cf386511 | [
"Apache-2.0"
] | 3 | 2020-10-04T22:06:10.000Z | 2020-10-30T13:48:28.000Z | test/test_blender.py | ottopasuuna/blender-render-tool | 99f7b9e3ee1004efb739c7812bd0e976cf386511 | [
"Apache-2.0"
] | 11 | 2018-09-04T02:50:55.000Z | 2020-04-10T19:17:58.000Z | test/test_blender.py | ottopasuuna/blender-render-tool | 99f7b9e3ee1004efb739c7812bd0e976cf386511 | [
"Apache-2.0"
] | 3 | 2018-10-13T20:01:36.000Z | 2021-03-01T20:09:42.000Z | from .context import src
from src.blender import *
def test_build_blender_cmd():
cmd = build_blender('test.blend', 'outdir', frames=range(1, 3))
assert cmd == 'blender -b test.blend -o outdir/####.png -f 1,2'
cmd = build_blender('test.blend', 'outdir', frames=range(1, 6, 2))
assert cmd == 'blender -... | 32.8125 | 70 | 0.64 |
469bef3074f386ec65194b5074d16ddf8c8c7c21 | 4,870 | py | Python | test/functional/rpc_bind.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | HunterCanimun/surgeofficial-surge-coin | 663dc25517e9045a65a9b1e0993bbaa06d564284 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test running bitcoind with the -rpcbind and -rpcallowip options."""
import socket
import sys
from tes... | 45.092593 | 162 | 0.622793 |
857761cc8ab950d1c17148ddbcef304b3c6e1889 | 6,660 | py | Python | predict.py | mme384/Image-Classifier-MobileNet-V2 | 28a285c69dc30f45bbcb4c80e60676aec22d1083 | [
"Unlicense"
] | null | null | null | predict.py | mme384/Image-Classifier-MobileNet-V2 | 28a285c69dc30f45bbcb4c80e60676aec22d1083 | [
"Unlicense"
] | null | null | null | predict.py | mme384/Image-Classifier-MobileNet-V2 | 28a285c69dc30f45bbcb4c80e60676aec22d1083 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
FILE NAME: predict.py
AUTHOR: Michalis Meyer
DATE CREATED: 22.04.2020
DATE LAST MODIFIED:
PYTHON VERSION: 3.7
SCRIPT PURPOSE: Predict the class of an image
SAMPLE COMMAND LINE: python predict.py --file_path './test_images/hard-leaved_pocket... | 37 | 189 | 0.672973 |
ba650962e9b117b332a162f731e7909d0773b5ea | 2,068 | py | Python | camera_calib/fiducial_detect.py | justinblaber/camera_calib_python | 9427ff31d55af7619e7aee74136446a31d10def0 | [
"Apache-2.0"
] | 3 | 2020-10-14T10:24:09.000Z | 2021-09-19T20:48:40.000Z | camera_calib/fiducial_detect.py | justinblaber/camera_calib_python | 9427ff31d55af7619e7aee74136446a31d10def0 | [
"Apache-2.0"
] | 1 | 2021-09-28T02:06:42.000Z | 2021-09-28T02:06:42.000Z | camera_calib/fiducial_detect.py | justinblaber/camera_calib_python | 9427ff31d55af7619e7aee74136446a31d10def0 | [
"Apache-2.0"
] | 2 | 2021-01-07T20:13:31.000Z | 2021-01-08T18:16:53.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: fiducial_detect.ipynb (unless otherwise specified).
__all__ = ['DotVisionCheckerDLDetector']
# Cell
import copy
import math
import warnings
import torch
from skimage.measure import label, regionprops
from torchvision import transforms
from .utils import *
# Cell
class Do... | 39.018868 | 101 | 0.610251 |
37cfb208d246f6f08f6193188ae4bc9348ee45aa | 685 | py | Python | Medium/784. Letter Case Permutation/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Medium/784. Letter Case Permutation/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Medium/784. Letter Case Permutation/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 784. Letter Case Permutation
# Runtime: 98 ms, faster than 16.21% of Python3 online submissions for Letter Case Permutation.
# Memory Usage: 15.5 MB, less than 27.62% of Python3 online submissions for Letter Case Permutation.
class Solution:
# Recursion
def letterCasePermutation(self, s: str) -> list[str]... | 29.782609 | 100 | 0.540146 |
511c2c796aede7f3c0c061bf30347288bf2b566e | 2,124 | py | Python | historia/test/test_economy.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | 6 | 2016-04-26T18:39:36.000Z | 2021-09-01T09:13:38.000Z | historia/test/test_economy.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | null | null | null | historia/test/test_economy.py | eranimo/historia | 5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd | [
"MIT"
] | 4 | 2016-04-10T23:47:23.000Z | 2021-08-15T11:40:28.000Z | from unittest import TestCase
from historia.pops.enums.pop_job import PopJob
from historia.economy import Good
from historia.test.mocks import mock_manager, mock_map, make_mock_country, make_mock_pop
random_hex = mock_map.random_hex()
country = make_mock_country(mock_manager, random_hex)
province = country.provinces... | 34.258065 | 88 | 0.700094 |
b3e5b9a0e2df12959ec5190d80968cb5f77a4bfe | 1,429 | py | Python | consumer_avro.py | Codnos/kafka-avro-mongo-webflux | 2c3f7b6519c58f13e3f4a76b3307152f40c6eb12 | [
"Apache-2.0"
] | 1 | 2018-06-04T16:28:40.000Z | 2018-06-04T16:28:40.000Z | consumer_avro.py | Codnos/kafka-avro-mongo-webflux | 2c3f7b6519c58f13e3f4a76b3307152f40c6eb12 | [
"Apache-2.0"
] | 1 | 2022-03-08T21:11:03.000Z | 2022-03-08T21:11:03.000Z | consumer_avro.py | Codnos/kafka-avro-mongo-webflux-reactjs | 2c3f7b6519c58f13e3f4a76b3307152f40c6eb12 | [
"Apache-2.0"
] | null | null | null | import io
import urllib.request
import pandas as pd
import avro.schema
import avro.io
import decimal
def twos_comp(val, bits):
"""compute the 2's complement of int value val"""
if (val & (1 << (bits - 1))) != 0: # if sign bit is set e.g., 8bit: 128-255
val = val - (1 << bits) # compute negative... | 28.58 | 84 | 0.679496 |
c57c0657e06889f184323af25ba681655993b701 | 12,669 | py | Python | trove/tests/scenario/groups/guest_log_group.py | a4913994/openstack_trove | 3b550048dd1e5841ad0f3295679e0f0b913a5687 | [
"Apache-2.0"
] | 244 | 2015-01-01T12:04:44.000Z | 2022-03-25T23:38:39.000Z | trove/tests/scenario/groups/guest_log_group.py | a4913994/openstack_trove | 3b550048dd1e5841ad0f3295679e0f0b913a5687 | [
"Apache-2.0"
] | 6 | 2015-08-18T08:19:10.000Z | 2022-03-05T02:32:36.000Z | trove/tests/scenario/groups/guest_log_group.py | a4913994/openstack_trove | 3b550048dd1e5841ad0f3295679e0f0b913a5687 | [
"Apache-2.0"
] | 178 | 2015-01-02T15:16:58.000Z | 2022-03-23T03:30:20.000Z | # Copyright 2015 Tesora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 38.981538 | 78 | 0.721446 |
9e76f30a099e36500602df7f34f0ee06cf311bfe | 1,502 | py | Python | data_random.py | nuaaflash/NuaaOldBookStore | 259f551a5fa97f2862745cb239c50d8ef87efe49 | [
"Apache-2.0"
] | 1 | 2020-04-15T17:04:07.000Z | 2020-04-15T17:04:07.000Z | data_random.py | nuaaflash/NuaaOldBookStore | 259f551a5fa97f2862745cb239c50d8ef87efe49 | [
"Apache-2.0"
] | null | null | null | data_random.py | nuaaflash/NuaaOldBookStore | 259f551a5fa97f2862745cb239c50d8ef87efe49 | [
"Apache-2.0"
] | null | null | null | from Bookstore.models import *
from django.utils import timezone
import random
import json
import hashlib
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
def get_publisher():
return "Online Bookstore Publisher"
def get_date():
return timezone.now()
def get_isbn(book):
print book['book_name']
m... | 28.339623 | 80 | 0.647137 |
a544c4c4974f55921d03264f3a15e1ef693ddf98 | 8,249 | py | Python | pyk4a/pyk4a.py | kevinkit/pyk4a | 159c6eff46a2aecfea8553efba0fd20950ccc763 | [
"MIT"
] | 2 | 2020-02-11T13:05:09.000Z | 2020-06-16T14:22:28.000Z | pyk4a/pyk4a.py | kevinkit/pyk4a | 159c6eff46a2aecfea8553efba0fd20950ccc763 | [
"MIT"
] | null | null | null | pyk4a/pyk4a.py | kevinkit/pyk4a | 159c6eff46a2aecfea8553efba0fd20950ccc763 | [
"MIT"
] | 1 | 2020-02-11T13:06:36.000Z | 2020-02-11T13:06:36.000Z | from typing import Tuple, Union, Optional
import k4a_module
from enum import Enum
import numpy as np
from pyk4a.config import Config, ColorControlMode, ColorControlCommand
# k4a_wait_result_t
class Result(Enum):
Success = 0
Failed = 1
Timeout = 2
class K4AException(Exception):
pass
class K4ATimeo... | 34.514644 | 120 | 0.693781 |
613dca9917ec51818666f3676713d8d46aa071bf | 10,350 | py | Python | my_plugins/youcompleteme/third_party/ycmd/ycmd/request_wrap.py | VirtualLG/vimrc | 33f961b0e465b852753479bc4aa0a32a6ff017cf | [
"MIT"
] | null | null | null | my_plugins/youcompleteme/third_party/ycmd/ycmd/request_wrap.py | VirtualLG/vimrc | 33f961b0e465b852753479bc4aa0a32a6ff017cf | [
"MIT"
] | null | null | null | my_plugins/youcompleteme/third_party/ycmd/ycmd/request_wrap.py | VirtualLG/vimrc | 33f961b0e465b852753479bc4aa0a32a6ff017cf | [
"MIT"
] | null | null | null | # Copyright (C) 2014-2020 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | 36.572438 | 80 | 0.644928 |
a5ee6a540775fe729a045b264bb72f276362042b | 2,856 | py | Python | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/UpdateBackupSourceGroupRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/UpdateBackupSourceGroupRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-hbr/aliyunsdkhbr/request/v20170908/UpdateBackupSourceGroupRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may ... | 43.938462 | 116 | 0.75035 |
284c5390604afef5813e1aa93a93a936bcc25a35 | 102,155 | py | Python | salt/utils/parsers.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/utils/parsers.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/utils/parsers.py | lyft/salt | 2715908423a412f736253d0e5d3cfe185a0179a2 | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
salt.utils.parsers
~~~~~~~~~~~~~~~~~~
This is where all the black magic happens on all of salt's CLI tools.
'''
# Import python libs
from __future__ import absolute_import, print_function
import os
import sys
import... | 38.074916 | 137 | 0.533836 |
b65e80fe93ed9ea6f4e16ff45ab677dd4047b40a | 24,050 | py | Python | mne/tests/test_event.py | stevemats/mne-python | 47051833f21bb372d60afc3adbf4305648ac7f69 | [
"BSD-3-Clause"
] | 1 | 2021-12-21T16:16:40.000Z | 2021-12-21T16:16:40.000Z | mne/tests/test_event.py | stevemats/mne-python | 47051833f21bb372d60afc3adbf4305648ac7f69 | [
"BSD-3-Clause"
] | 2 | 2018-10-29T09:09:34.000Z | 2019-08-02T16:24:09.000Z | mne/tests/test_event.py | stevemats/mne-python | 47051833f21bb372d60afc3adbf4305648ac7f69 | [
"BSD-3-Clause"
] | 1 | 2021-07-22T17:57:33.000Z | 2021-07-22T17:57:33.000Z | # -*- coding: utf-8 -*-
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD-3-Clause
import os.path as op
import os
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_equa... | 40.488215 | 79 | 0.588358 |
06e2f7c7a167269cfb3d4b12db86e379b7fbdd6c | 7,105 | py | Python | sdl2/surface.py | cmitu/py-sdl2 | d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d | [
"CC0-1.0"
] | 222 | 2017-08-19T00:51:59.000Z | 2022-02-05T19:39:33.000Z | sdl2/surface.py | cmitu/py-sdl2 | d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d | [
"CC0-1.0"
] | 103 | 2017-08-20T17:13:05.000Z | 2022-02-05T20:20:01.000Z | sdl2/surface.py | cmitu/py-sdl2 | d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d | [
"CC0-1.0"
] | 54 | 2017-08-20T17:13:00.000Z | 2022-01-14T23:51:13.000Z | from ctypes import CFUNCTYPE, Structure, POINTER, c_int, c_void_p
from .dll import _bind
from .stdinc import Uint8, Uint32, SDL_bool
from .blendmode import SDL_BlendMode
from .rect import SDL_Rect
from .pixels import SDL_PixelFormat, SDL_Palette
from .rwops import SDL_RWops, SDL_RWFromFile
__all__ = [
# Structs & ... | 57.764228 | 161 | 0.760028 |
7fc81868643d58ce070b66c53c9024cc6415dfd0 | 1,296 | py | Python | maize/util/chain_utils.py | denern/maize-blockchain | b8639899f44b03232dda90c706d061e5e1158ca3 | [
"Apache-2.0"
] | 14 | 2021-07-21T19:45:05.000Z | 2022-02-09T04:29:51.000Z | maize/util/chain_utils.py | denern/maize-blockchain | b8639899f44b03232dda90c706d061e5e1158ca3 | [
"Apache-2.0"
] | 9 | 2021-07-24T09:30:46.000Z | 2021-12-05T19:51:29.000Z | maize/util/chain_utils.py | denern/maize-blockchain | b8639899f44b03232dda90c706d061e5e1158ca3 | [
"Apache-2.0"
] | 5 | 2021-10-04T17:33:47.000Z | 2022-03-15T08:37:51.000Z | from typing import List
from clvm.casts import int_from_bytes
from maize.types.blockchain_format.coin import Coin
from maize.types.blockchain_format.program import SerializedProgram
from maize.types.blockchain_format.sized_bytes import bytes32
from maize.types.condition_opcodes import ConditionOpcode
from maize.util.... | 34.105263 | 106 | 0.760031 |
8e8c2de39def63382d0cac2b61d8f9e82f5e29d9 | 658 | py | Python | builder/settings.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 9 | 2020-12-30T17:24:46.000Z | 2022-02-16T22:10:47.000Z | builder/settings.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 85 | 2021-01-09T09:44:45.000Z | 2022-03-26T07:34:00.000Z | builder/settings.py | mscroggs/defelement.com | 0cfc01a0cc3b801ef10ede12bf64f77a6a70efb1 | [
"CC-BY-4.0",
"MIT"
] | 1 | 2022-03-28T08:15:38.000Z | 2022-03-28T08:15:38.000Z | import os as _os
dir_path = _os.path.join(_os.path.dirname(_os.path.realpath(__file__)), "..")
element_path = _os.path.join(dir_path, "elements")
template_path = _os.path.join(dir_path, "templates")
files_path = _os.path.join(dir_path, "files")
pages_path = _os.path.join(dir_path, "pages")
data_path = _os.path.join(di... | 36.555556 | 77 | 0.74924 |
eaa35e1933dc2ea319add0347a60d1282bea483e | 467 | py | Python | my_codes/input/eos.py | iwamura-lab/my_codes | 70140fe81b70d7ea4969c442771db40054cc109e | [
"MIT"
] | null | null | null | my_codes/input/eos.py | iwamura-lab/my_codes | 70140fe81b70d7ea4969c442771db40054cc109e | [
"MIT"
] | null | null | null | my_codes/input/eos.py | iwamura-lab/my_codes | 70140fe81b70d7ea4969c442771db40054cc109e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import shutil
if __name__ == "__main__":
f = open("./original/POSCAR", "r")
content = [column for column in f]
f.close()
for i in range(99):
content[1] = str(7.00 + (i + 1) / 10**4) + "\n"
fpath = "7_00" + str(i + 1).zfill(2)
shutil.copytree("./original", ... | 27.470588 | 55 | 0.505353 |
c598d36796c4526459241dfe9f292a7c2038c5ea | 315 | py | Python | destacame/buses/migrations/0002_rename_buss_buss2.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | destacame/buses/migrations/0002_rename_buss_buss2.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | destacame/buses/migrations/0002_rename_buss_buss2.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-12 19:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('buses', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='Buss',
new_name='Buss2',
),
]
| 17.5 | 48 | 0.574603 |
0b45c27f40b81a62f5615b7981e0e0d98e568468 | 9,103 | py | Python | library/rabbitmq_queue.py | joe-pll/rabbitmq-ansible-modules | e56ff0caa650c7417d32d39b7e6e961e8ce5e124 | [
"Apache-2.0"
] | null | null | null | library/rabbitmq_queue.py | joe-pll/rabbitmq-ansible-modules | e56ff0caa650c7417d32d39b7e6e961e8ce5e124 | [
"Apache-2.0"
] | null | null | null | library/rabbitmq_queue.py | joe-pll/rabbitmq-ansible-modules | e56ff0caa650c7417d32d39b7e6e961e8ce5e124 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# (c) 2017, Giuseppe Pellegrino <mr.giuseppepellegrino@gmail.com>
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: rabbitmq_queue
short_description: Manage RabbitMQ vhost
descri... | 34.093633 | 149 | 0.621004 |
190b88e1f0ff3a466215e94730c9412eb07aa5e9 | 8,052 | py | Python | fusions/robotics/sensor_fusion.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | 7 | 2022-03-03T12:10:46.000Z | 2022-03-08T18:14:40.000Z | fusions/robotics/sensor_fusion.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | fusions/robotics/sensor_fusion.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | 1 | 2022-03-07T08:18:42.000Z | 2022-03-07T08:18:42.000Z | import torch
import torch.nn as nn
from .models_utils import (
duplicate,
gaussian_parameters,
product_of_experts,
sample_gaussian,
)
class SensorFusion(nn.Module):
"""
#
Regular SensorFusionNetwork Architecture
Number of parameters:
Inputs:
image: batch_s... | 36.434389 | 110 | 0.576503 |
3bf99daee5f757406887aa6187264073f6f75a6b | 666 | py | Python | manage.py | Code-Forever-com/Django-CMS | 6a61d4b796f1177e3a342d975ebaa1d1589fc40a | [
"MIT"
] | null | null | null | manage.py | Code-Forever-com/Django-CMS | 6a61d4b796f1177e3a342d975ebaa1d1589fc40a | [
"MIT"
] | null | null | null | manage.py | Code-Forever-com/Django-CMS | 6a61d4b796f1177e3a342d975ebaa1d1589fc40a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_cms.settings')
try:
from django.core.management import execute_from_command_line
except I... | 28.956522 | 74 | 0.68018 |
04d05d89ebcc070461b0c57b86a32d4a1dae759c | 228 | py | Python | Codewars/Unique_in_order - (6 kyu).py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Unique_in_order - (6 kyu).py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Unique_in_order - (6 kyu).py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | def unique_in_order(iterable):
result = []
for x in iterable:
if len(result) < 1 or not x == result[len(result) - 1]:
result.append(x)
return result
print(unique_in_order('AAAABBBCCDAABBB')) | 25.333333 | 63 | 0.614035 |
10f4d5b924f334ba6c61210173b806f155073185 | 598 | py | Python | venv/Lib/site-packages/google/api_core/version.py | alexandermarquesm/DiscordBot | 7b0829f885c728538bee5e9df53248213885c199 | [
"MIT"
] | 3 | 2020-12-30T06:37:10.000Z | 2021-03-05T11:56:04.000Z | venv/Lib/site-packages/google/api_core/version.py | alexandermarquesm/DiscordBot | 7b0829f885c728538bee5e9df53248213885c199 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/google/api_core/version.py | alexandermarquesm/DiscordBot | 7b0829f885c728538bee5e9df53248213885c199 | [
"MIT"
] | 1 | 2020-12-21T03:53:03.000Z | 2020-12-21T03:53:03.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.375 | 74 | 0.757525 |
ef9be003cfe7d14435f8f0d3cba8e1e87e0e3059 | 5,853 | py | Python | tests/simulation/test_simulator.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | null | null | null | tests/simulation/test_simulator.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | null | null | null | tests/simulation/test_simulator.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | null | null | null | from typing import Optional
import pytest
from hathor.simulator import FakeConnection, Simulator
from tests import unittest
class SimulatorTestCase(unittest.TestCase):
__test__ = False
seed_config: Optional[int] = None
def setUp(self):
super().setUp()
self.simulator = Simulator(self.s... | 32.337017 | 118 | 0.623441 |
45562e4e36572bc587246facac1cdc9285bb7c68 | 3,912 | py | Python | src/aioredis_cluster/command_info/__init__.py | VadimPushtaev/aioredis-cluster | 754797c1c6f864cf1436ff3bd82aa3f61a750724 | [
"MIT"
] | 18 | 2020-12-11T16:56:55.000Z | 2021-12-14T21:18:46.000Z | src/aioredis_cluster/command_info/__init__.py | VadimPushtaev/aioredis-cluster | 754797c1c6f864cf1436ff3bd82aa3f61a750724 | [
"MIT"
] | 3 | 2021-02-21T13:10:07.000Z | 2021-11-15T11:06:36.000Z | src/aioredis_cluster/command_info/__init__.py | VadimPushtaev/aioredis-cluster | 754797c1c6f864cf1436ff3bd82aa3f61a750724 | [
"MIT"
] | 3 | 2021-11-09T14:37:59.000Z | 2022-03-18T07:25:33.000Z | from typing import AnyStr, FrozenSet, List, NoReturn, Sequence
import attr
from aioredis_cluster.util import ensure_str
from .commands import COMMANDS
__all__ = [
"COMMANDS",
"CommandsRegistry",
"CommandInfo",
"CommandInfoError",
"UnknownCommandError",
"InvalidCommandError",
"extract_ke... | 26.97931 | 96 | 0.667434 |
828f30c40eba787d10efc63cf2f74b3c9b7c8ca0 | 21,344 | py | Python | tensorflow/python/framework/dtypes.py | yolman230/tensorflow | 8180678e1b71f9e4326b9d84987d78232000bac2 | [
"Apache-2.0"
] | 56 | 2018-06-21T13:47:23.000Z | 2020-05-13T09:31:47.000Z | tensorflow/python/framework/dtypes.py | kaist-ina/tensorflow | 169124c0c9630b719e7f0e55722c38c7ecd6c5ac | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:13.000Z | 2022-02-10T04:19:15.000Z | tensorflow/python/framework/dtypes.py | kaist-ina/tensorflow | 169124c0c9630b719e7f0e55722c38c7ecd6c5ac | [
"Apache-2.0"
] | 15 | 2018-09-06T14:18:32.000Z | 2020-05-14T06:35:30.000Z | # Copyright 2015 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.454545 | 84 | 0.707365 |
02db0894b67e36755128d5f976abe8e3e6952841 | 2,569 | py | Python | test/optimization/test_vehicle_routing.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | null | null | null | test/optimization/test_vehicle_routing.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | null | null | null | test/optimization/test_vehicle_routing.py | IanJoel/qiskit-aqua | 7707172d01f0539358f1ce2406f307e830105303 | [
"Apache-2.0"
] | 2 | 2020-02-13T02:17:58.000Z | 2020-08-09T07:56:25.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 38.343284 | 77 | 0.659011 |
87fa897d022eea500eacb8bcbc414797ebf935f5 | 477 | py | Python | cogs/utils/db/__init__.py | iomintz/Chiaki-Nanami | f59dc04e34f320689dc4232ecd1b82ecd73fba04 | [
"MIT"
] | 1 | 2018-07-15T21:40:43.000Z | 2018-07-15T21:40:43.000Z | cogs/utils/db/__init__.py | bmintz/Chiaki-Nanami | f59dc04e34f320689dc4232ecd1b82ecd73fba04 | [
"MIT"
] | null | null | null | cogs/utils/db/__init__.py | bmintz/Chiaki-Nanami | f59dc04e34f320689dc4232ecd1b82ecd73fba04 | [
"MIT"
] | null | null | null | """Database utilities for Chiaki
Despite appearances, while this tries to be an ORM, a fully fledged ORM
is not the goal. It's too complex of a project to even bother with one.
Queries will still be made using raw SQL.
The main purpose is to create a self-documenting table class that can be
used as reference and to m... | 28.058824 | 72 | 0.761006 |
012773ad6902bcc4fdfff5597383e3483220b498 | 1,037 | py | Python | esmvalcore/preprocessor/_derive/rtnt.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 26 | 2019-06-07T07:50:07.000Z | 2022-03-22T21:04:01.000Z | esmvalcore/preprocessor/_derive/rtnt.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 1,370 | 2019-06-06T09:03:07.000Z | 2022-03-31T04:37:20.000Z | esmvalcore/preprocessor/_derive/rtnt.py | zklaus/ESMValCore | 5656fb8b546eeb4d750a424de7ed56a237edfabb | [
"Apache-2.0"
] | 26 | 2019-07-03T13:08:48.000Z | 2022-03-02T16:08:47.000Z | """Derivation of variable `rtnt`."""
from iris import Constraint
from ._baseclass import DerivedVariableBase
class DerivedVariable(DerivedVariableBase):
"""Derivation of variable `rtnt`."""
@staticmethod
def required(project):
"""Declare the variables needed for derivation."""
required ... | 25.925 | 59 | 0.575699 |
08f7f32298a1481af6c836b7af8def45f7956c94 | 6,768 | py | Python | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 35.621053 | 115 | 0.701684 |
6c8e41b6d4d1ddef572cbd1a611ea6d7a153ad59 | 13,541 | py | Python | h2o-perf/bench/py/h2oPerf/Alerting.py | gigliovale/h2o | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 882 | 2015-05-22T02:59:21.000Z | 2022-02-17T05:02:48.000Z | h2o-perf/bench/py/h2oPerf/Alerting.py | VonRosenchild/h2o-2 | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 1 | 2015-01-14T23:54:56.000Z | 2015-01-15T20:04:17.000Z | h2o-perf/bench/py/h2oPerf/Alerting.py | VonRosenchild/h2o-2 | be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1 | [
"Apache-2.0"
] | 392 | 2015-05-22T17:04:11.000Z | 2022-02-22T09:04:39.000Z | import abc
import MySQLdb
import requests
import os
from datetime import datetime, timedelta
from LMSAdaptiveFilter import LMSAdaptiveFilter
# Global queries used throughout
TEST_NAMES_QUERY = \
"""
SELECT DISTINCT tr.test_name
FROM test_run tr
INNER JOIN test_run_phase_result tp
USING(test_run_id)
WHERE tp.end_... | 33.434568 | 120 | 0.637028 |
056fcba404ad61d34f1bfb379d9d3ee82f08017d | 8,996 | py | Python | dyspatch_client/models/template_meta_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/models/template_meta_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/models/template_meta_read.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Dyspatch API
# Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](ht... | 30.808219 | 845 | 0.605825 |
86f7c637998505f94e8b4a9deb3603997dfbb456 | 1,049 | py | Python | examples/heat_map.py | zkx741481546/keract | 6f25711e54f7f8b5387fff8f79ad35a0a1113d33 | [
"MIT"
] | null | null | null | examples/heat_map.py | zkx741481546/keract | 6f25711e54f7f8b5387fff8f79ad35a0a1113d33 | [
"MIT"
] | null | null | null | examples/heat_map.py | zkx741481546/keract | 6f25711e54f7f8b5387fff8f79ad35a0a1113d33 | [
"MIT"
] | null | null | null | from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import decode_predictions
from keras.applications.vgg16 import preprocess_input
from keras.preprocessing.image import img_to_array
model = VGG16()
from PIL import Image
import requests
from io import BytesIO
import numpy as np
url = 'https://up... | 31.787879 | 109 | 0.757865 |
fac603281b95ce1ceb3b5321f97db5f0281ad6c6 | 7,580 | py | Python | entsoe/mappings.py | gjertro/entsoe-py | 6823dde6ad8ecddaabe67fbaf66e9814dd29d037 | [
"MIT"
] | 1 | 2019-02-08T21:26:54.000Z | 2019-02-08T21:26:54.000Z | entsoe/mappings.py | gjertro/entsoe-py | 6823dde6ad8ecddaabe67fbaf66e9814dd29d037 | [
"MIT"
] | null | null | null | entsoe/mappings.py | gjertro/entsoe-py | 6823dde6ad8ecddaabe67fbaf66e9814dd29d037 | [
"MIT"
] | null | null | null | DOMAIN_MAPPINGS = {
'AL': '10YAL-KESH-----5',
'AT': '10YAT-APG------L',
'BA': '10YBA-JPCC-----D',
'BE': '10YBE----------2',
'BG': '10YCA-BULGARIA-R',
'BY': '10Y1001A1001A51S',
'CH': '10YCH-SWISSGRIDZ',
'CZ': '10YCZ-CEPS-----N',
'DE': '10Y1001A1001A83F',
'DK': '10Y1001A1001A65H',
... | 33.100437 | 69 | 0.512533 |
df8fde63cf99aa8436e8ee76631cc9c7f431e87c | 453 | py | Python | pythonProject/MUNDO 3/Desafio 105.py | lucasjlgc/Aulas-de-Python- | 6aaed1c660487a680e9c449210600ccdfa326612 | [
"MIT"
] | null | null | null | pythonProject/MUNDO 3/Desafio 105.py | lucasjlgc/Aulas-de-Python- | 6aaed1c660487a680e9c449210600ccdfa326612 | [
"MIT"
] | 1 | 2021-06-25T15:29:11.000Z | 2021-06-25T15:29:11.000Z | pythonProject/MUNDO 3/Desafio 105.py | lucasjlgc/Aulas-de-Python- | 6aaed1c660487a680e9c449210600ccdfa326612 | [
"MIT"
] | null | null | null | def notas(*num, sit = False):
r = dict()
r['Total'] = len(num)
r['Maior'] = max(num)
r['Menor'] = min(num)
r['Média'] = sum(num)/len(num)
if sit:
if r['Média'] <6:
r['Situação'] = 'Ruim'
elif r['Média']>6 and r['Média']<9:
r['Situação'] = 'Regular'
... | 21.571429 | 43 | 0.470199 |
c9b88cadbe1e2951b98a2cabf6eae1daf8cde68b | 14,689 | py | Python | intersight/models/iam_o_auth_token_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/iam_o_auth_token_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/iam_o_auth_token_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 33.923788 | 1,052 | 0.638301 |
583ef94c3b81d62adb8e663e24a57161f2cfd968 | 4,484 | py | Python | back/user/views.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | back/user/views.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | back/user/views.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib.auth import logout
from django.contrib import messages
from django.contrib.auth import login
from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse
from django.utils.encoding import force_bytes, force_text
from django... | 38.655172 | 114 | 0.661909 |
1294fc4a37230780e6b6240cac9bf9e3c745eb88 | 2,661 | py | Python | src/jobs/json_renderer.py | ZendriXXX/predict-python | fe0360b4888980421f8f91f158d6523729bfc5f7 | [
"MIT"
] | null | null | null | src/jobs/json_renderer.py | ZendriXXX/predict-python | fe0360b4888980421f8f91f158d6523729bfc5f7 | [
"MIT"
] | null | null | null | src/jobs/json_renderer.py | ZendriXXX/predict-python | fe0360b4888980421f8f91f158d6523729bfc5f7 | [
"MIT"
] | null | null | null | from json.encoder import encode_basestring_ascii, encode_basestring, INFINITY, _make_iterencode
from rest_framework.renderers import JSONRenderer
from rest_framework.utils.encoders import JSONEncoder
# default renderer cannot handle JSON inf values
# https://stackoverflow.com/questions/35939464/django-rest-framework... | 32.851852 | 108 | 0.582864 |
8e7116101dce308dd76d59661c118414af61108b | 1,383 | py | Python | foxylib/singleton/slack/foxylib_slack.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | null | null | null | foxylib/singleton/slack/foxylib_slack.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | 3 | 2019-12-12T05:17:44.000Z | 2022-03-11T23:40:50.000Z | foxylib/singleton/slack/foxylib_slack.py | foxytrixy-com/foxylib | 94b8c5b9f8b12423393c68f7d9f910258840ed18 | [
"BSD-3-Clause"
] | 2 | 2019-10-16T17:39:34.000Z | 2020-02-10T06:32:08.000Z | # https://pypi.org/project/slackclient/
import logging
import os
from functools import lru_cache, partial
from slack import RTMClient, WebClient
from foxylib.singleton.env.foxylib_env import FoxylibEnv
from foxylib.tools.log.foxylib_logger import FoxylibLogger
from foxylib.tools.messenger.slack.slack_tool import Sla... | 27.66 | 79 | 0.740419 |
cece8f79bbd811bba80aee5ab890ff3eb844d726 | 1,766 | py | Python | setup.py | dschien/pint-pandas | 5c8499133f87afe718681df7b48f0870708078be | [
"BSD-3-Clause"
] | null | null | null | setup.py | dschien/pint-pandas | 5c8499133f87afe718681df7b48f0870708078be | [
"BSD-3-Clause"
] | null | null | null | setup.py | dschien/pint-pandas | 5c8499133f87afe718681df7b48f0870708078be | [
"BSD-3-Clause"
] | null | null | null | import sys
try:
reload(sys).setdefaultencoding("UTF-8")
except:
pass
try:
from setuptools import setup, find_packages
except ImportError:
print('Please install or upgrade setuptools or pip to continue')
sys.exit(1)
import codecs
def read(filename):
return codecs.open(filename, encoding='utf... | 27.169231 | 69 | 0.628539 |
fd573c3a05a02f71f3924bfcdb7e2bd02f3c2fb1 | 3,956 | py | Python | layint_scan_api/models/package_search_result.py | LayeredInsight/layint_scan_api_python | bc258b2af5d2211b986e32fedea95fcfc7de80ff | [
"Apache-2.0"
] | 1 | 2018-03-26T23:55:00.000Z | 2018-03-26T23:55:00.000Z | layint_scan_api/models/package_search_result.py | LayeredInsight/layint_scan_api_python | bc258b2af5d2211b986e32fedea95fcfc7de80ff | [
"Apache-2.0"
] | null | null | null | layint_scan_api/models/package_search_result.py | LayeredInsight/layint_scan_api_python | bc258b2af5d2211b986e32fedea95fcfc7de80ff | [
"Apache-2.0"
] | 2 | 2020-11-04T02:56:33.000Z | 2020-11-05T08:12:01.000Z | # coding: utf-8
"""
Layered Insight Scan
Layered Insight Scan performs static vulnerability analysis, license and package compliance. You can find out more about Scan at http://layeredinsight.com.
OpenAPI spec version: 0.9.4
Contact: help@layeredinsight.com
Generated by: https://github.com/swagg... | 26.373333 | 160 | 0.573812 |
caa5faabd040cc4fa59ecdfc876c8a7032b53bee | 2,363 | py | Python | m3u8-cmdline/m3u8.py | Abeous/streaming | 5d34eba2f27af4d25395200038b240ec1f4ea3e5 | [
"MIT"
] | null | null | null | m3u8-cmdline/m3u8.py | Abeous/streaming | 5d34eba2f27af4d25395200038b240ec1f4ea3e5 | [
"MIT"
] | null | null | null | m3u8-cmdline/m3u8.py | Abeous/streaming | 5d34eba2f27af4d25395200038b240ec1f4ea3e5 | [
"MIT"
] | null | null | null | import subprocess
import os
import platform
import json
import argparse
class config_info:
def __init__(self, system):
self.directory = os.path.join(os.path.expanduser('~'), '.config','hls-restreamer')
self.os = system
self.path = self.directory + '/config.json'
config = config_info(platform.system... | 30.688312 | 183 | 0.679221 |
af9607f6dc6d5832a92f523c324954277f407309 | 3,046 | py | Python | demo.py | namelessjon/mitemp | bd6ffed5bfd9a3a52dd8a4b96e896fa79b5c5f10 | [
"MIT"
] | null | null | null | demo.py | namelessjon/mitemp | bd6ffed5bfd9a3a52dd8a4b96e896fa79b5c5f10 | [
"MIT"
] | null | null | null | demo.py | namelessjon/mitemp | bd6ffed5bfd9a3a52dd8a4b96e896fa79b5c5f10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Demo file showing how to use the mitemp library."""
import argparse
import re
import logging
import sys
from btlewrap import available_backends, BluepyBackend, GatttoolBackend, PygattBackend
from mitemp_bt.mitemp_bt_poller import MiTempBtPoller, \
MI_TEMPERATURE, MI_HUMIDITY, MI_BATTERY
... | 31.402062 | 108 | 0.676953 |
2a78ad851be6e6d0ba2a5b198392c65f9017acb9 | 3,112 | py | Python | tests/collections/asr/numba/rnnt_loss/utils/test_reduce.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | 1 | 2021-04-13T20:34:16.000Z | 2021-04-13T20:34:16.000Z | tests/collections/asr/numba/rnnt_loss/utils/test_reduce.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | null | null | null | tests/collections/asr/numba/rnnt_loss/utils/test_reduce.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.186047 | 113 | 0.670308 |
54a5fbc89ea01241390d2432962fec5e6639b33f | 1,001 | py | Python | domains/fetch/problems/training/problem1011_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T12:56:56.000Z | 2021-09-28T12:56:56.000Z | domains/fetch/problems/training/problem1011_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | null | null | null | domains/fetch/problems/training/problem1011_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:30:39.000Z | 2022-03-31T16:30:39.000Z | __author__ = 'patras'
from domain_chargeableRobot import *
from timer import DURATION
from state import state
DURATION.TIME = {
'put': 2,
'take': 2,
'perceive': 3,
'charge': 5,
'move': 10,
'moveToEmergency': 5,
'moveCharger': 15,
'addressEmergency': 10,
'wait': 5,
}
DURATION.COUNTE... | 19.627451 | 56 | 0.526474 |
e614a47e3f16a16923d73953e6722c5099e8baa1 | 501 | py | Python | tests/conftest.py | afrigon/fastapi-template | cb3c86353c67ef19c5abe12658e327ff37b14f90 | [
"MIT"
] | 2 | 2020-03-05T20:34:09.000Z | 2020-04-19T02:33:53.000Z | tests/conftest.py | afrigon/sharify-api | 383baa5ae089d996c2d68da8b55e566dd0cfbbf9 | [
"MIT"
] | 2 | 2019-12-17T18:49:29.000Z | 2019-12-17T23:19:11.000Z | tests/conftest.py | afrigon/fastapi-template | cb3c86353c67ef19c5abe12658e327ff37b14f90 | [
"MIT"
] | 2 | 2020-01-07T14:25:38.000Z | 2021-06-23T16:10:57.000Z | """
Application fixtures to easily create app instances
Examples:
$ python -m pytest
$ coverage run -m pytest
$ coverage report
$ coverage html
"""
import pytest
from starlette.testclient import TestClient
from app import ApplicationFactory
@pytest.fixture
def app():
"""debug application fixture... | 17.892857 | 75 | 0.716567 |
649d10222f6083f88868a8fb2dedd78e800b42ef | 172 | py | Python | RPI_Camera.py | KyungWonCho/Research-1 | 9f0e124ffbdb2e3e148ea5cc3336c2075b4d7420 | [
"MIT"
] | null | null | null | RPI_Camera.py | KyungWonCho/Research-1 | 9f0e124ffbdb2e3e148ea5cc3336c2075b4d7420 | [
"MIT"
] | null | null | null | RPI_Camera.py | KyungWonCho/Research-1 | 9f0e124ffbdb2e3e148ea5cc3336c2075b4d7420 | [
"MIT"
] | null | null | null | from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(2)
camera.capture('/home/pi/Desktop/img.jpg')
camera.stop_preview()
| 17.2 | 42 | 0.77907 |
b4d6b8b0b4e4e5e98d2d3eea0318434c146cc82c | 20,530 | py | Python | flexget/plugins/output/send_telegram.py | vbabiy/Flexget | 9611689de68062cd3dddcf145d65c7a44a42d490 | [
"MIT"
] | null | null | null | flexget/plugins/output/send_telegram.py | vbabiy/Flexget | 9611689de68062cd3dddcf145d65c7a44a42d490 | [
"MIT"
] | null | null | null | flexget/plugins/output/send_telegram.py | vbabiy/Flexget | 9611689de68062cd3dddcf145d65c7a44a42d490 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import sys
from distutils.version import LooseVersion
from ssl import SSLError
from urllib2 import URLError
from sqlalchemy import Column, Integer, String
from flexget import db_schema, plugin, options
from flexget.event import event
from flexget.log... | 36.858169 | 120 | 0.578811 |
08f5102c7998ca277a75754bba5044337112f6bf | 769 | py | Python | guestbook/views.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | guestbook/views.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | guestbook/views.py | hcpthanks/vCard | cc9a301f413961c398c355426013c0cc05fbb1b7 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect, reverse
from django.http import HttpResponse
from .models import Message
# Create your views here.
def post_message(request):
"""首页留言提交处理
"""
#如果用户客户端提交方法是POST
if request.method =='POST':
# 得到想要的数据项
name = request.POST.get('name', '')
... | 28.481481 | 66 | 0.592978 |
13d6b1f3c18ce36f6c003cff070c4d8f464451e7 | 132 | py | Python | params/scenarios/partlyconstrained.py | systemsecologygroup/EasterIslandABM | bcd2e1268b41a549c6e47508650ec2ce8958ad1b | [
"MIT"
] | null | null | null | params/scenarios/partlyconstrained.py | systemsecologygroup/EasterIslandABM | bcd2e1268b41a549c6e47508650ec2ce8958ad1b | [
"MIT"
] | null | null | null | params/scenarios/partlyconstrained.py | systemsecologygroup/EasterIslandABM | bcd2e1268b41a549c6e47508650ec2ce8958ad1b | [
"MIT"
] | null | null | null | params_scenario = {
"n_agents_arrival": 2,
"p_split_threshold": int(36),
"r_t": 2,
"r_c": 1,
"gamma": 0, # 0
}
| 16.5 | 33 | 0.522727 |
788b40b7f0262c2081143410f03fd2375ea671c7 | 961 | py | Python | models/rf.py | uva-hydroinformatics-lab/flood_data | de82afb48afbc5b6140c363b934c13827762c13e | [
"MIT"
] | null | null | null | models/rf.py | uva-hydroinformatics-lab/flood_data | de82afb48afbc5b6140c363b934c13827762c13e | [
"MIT"
] | 12 | 2018-07-23T21:14:52.000Z | 2018-07-26T03:46:56.000Z | models/rf.py | uva-hydroinformatics-lab/flood_data | de82afb48afbc5b6140c363b934c13827762c13e | [
"MIT"
] | 2 | 2018-07-24T15:50:33.000Z | 2018-07-27T19:04:38.000Z | from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
import os
import sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
from db_scripts.main_db_script import data_dir, db_filename
from hr_db_scripts.m... | 32.033333 | 88 | 0.778356 |
da7a7e4541a33981e8b0b3135ec24413fdeff187 | 1,766 | py | Python | docpub/docs/pipeline.py | mcclatchy/docpub | 1ad006803d60aa508394ae656b9554bb815bf92d | [
"Apache-2.0"
] | 5 | 2017-08-07T13:31:20.000Z | 2021-05-23T22:46:14.000Z | docpub/docs/pipeline.py | mcclatchy/docpub | 1ad006803d60aa508394ae656b9554bb815bf92d | [
"Apache-2.0"
] | 2 | 2020-06-05T17:26:25.000Z | 2021-06-10T18:47:54.000Z | docpub/docs/pipeline.py | mcclatchy/docpub | 1ad006803d60aa508394ae656b9554bb815bf92d | [
"Apache-2.0"
] | 1 | 2017-08-07T13:31:20.000Z | 2017-08-07T13:31:20.000Z | # extending python-social-auth pipeline options
from django.contrib.auth.models import Group #, User
# from django.core.mail import send_mail
from docpub.settings import APP_DOMAIN, EMAIL_RECIPIENT, EMAIL_SENDER, SLACK_USER
from docs.slackbot import slackbot
def apply_permissions(backend, user, response, *args, **kwa... | 41.069767 | 194 | 0.643828 |
2803c434eb047663935f62a30f9b8ca1d7973115 | 572 | py | Python | parsercode/daedcode/step3_archive_arena_file.py | DeadlyK1tten/arena_log_parser | d672df63fefd55bd92ad31bd472464073ceb6019 | [
"Apache-2.0"
] | null | null | null | parsercode/daedcode/step3_archive_arena_file.py | DeadlyK1tten/arena_log_parser | d672df63fefd55bd92ad31bd472464073ceb6019 | [
"Apache-2.0"
] | null | null | null | parsercode/daedcode/step3_archive_arena_file.py | DeadlyK1tten/arena_log_parser | d672df63fefd55bd92ad31bd472464073ceb6019 | [
"Apache-2.0"
] | null | null | null | """
archive output_log.txt to archive
Tested on Windows, will it work anywhere else>
"""
import glob
import os
def main():
print('starting')
if not os.path.exists('output_log.txt'):
print('no log file')
return
file_list = glob.glob(os.path.join('archive', 'output_log*.txt'))
for n i... | 22.88 | 76 | 0.617133 |
e7e35a172884c951ba7d4a6346a67ea48fcc6dce | 6,573 | py | Python | ai4eutils/write_html_image_list.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 32 | 2019-07-01T04:50:47.000Z | 2022-03-16T01:48:16.000Z | ai4eutils/write_html_image_list.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 5 | 2020-01-20T00:43:10.000Z | 2020-08-13T00:42:20.000Z | ai4eutils/write_html_image_list.py | dnarqq/WildHack | 4fb9e4545cb47a4283ebc1dec955c0817b1664c0 | [
"MIT"
] | 27 | 2019-11-19T23:27:51.000Z | 2022-03-25T20:22:28.000Z | #
# function write_html_image_list(filename,imageFilenames,titles, options)
#
# Given a list of image file names, writes an HTML file that
# shows all those images, with optional one-line headers above each.
#
# Each "filename" can also be a dict with elements 'filename','title',
# 'imageStyle','textStyle'
#
# Strips d... | 34.234375 | 184 | 0.57508 |
ecea65ae45fd2bf00f18ee807d93dc2b1786376e | 25,649 | py | Python | test/ReadsAlignmentUtils_server_test.py | Tianhao-Gu/ReadsAlignmentUtils | dfd5f90489bb8831b142605b36b08f9ebb9d7e3d | [
"MIT"
] | null | null | null | test/ReadsAlignmentUtils_server_test.py | Tianhao-Gu/ReadsAlignmentUtils | dfd5f90489bb8831b142605b36b08f9ebb9d7e3d | [
"MIT"
] | 4 | 2018-08-08T00:35:39.000Z | 2021-01-04T19:57:25.000Z | test/ReadsAlignmentUtils_server_test.py | Tianhao-Gu/ReadsAlignmentUtils | dfd5f90489bb8831b142605b36b08f9ebb9d7e3d | [
"MIT"
] | 13 | 2017-05-30T14:53:37.000Z | 2020-12-16T22:58:32.000Z | # -*- coding: utf-8 -*-
import glob
import hashlib
import inspect
import os # noqa: F401
import shutil
import tempfile
import time
import unittest
from configparser import ConfigParser
from datetime import datetime
from os import environ
from pprint import pprint # noqa: F401
from zipfile import ZipFile
import reque... | 40.712698 | 104 | 0.557722 |
9545c3c3affc6ec3df2c8d13528c3834dfa00127 | 3,442 | py | Python | udon/email.py | GregoireDelannoy/udon | 8b71c0dd241d1fee0f90197b89338a6750050504 | [
"ISC"
] | 1 | 2020-02-11T14:46:10.000Z | 2020-02-11T14:46:10.000Z | udon/email.py | GregoireDelannoy/udon | 8b71c0dd241d1fee0f90197b89338a6750050504 | [
"ISC"
] | 1 | 2020-09-19T13:53:06.000Z | 2020-09-19T13:53:06.000Z | udon/email.py | GregoireDelannoy/udon | 8b71c0dd241d1fee0f90197b89338a6750050504 | [
"ISC"
] | 3 | 2020-07-08T07:30:38.000Z | 2021-01-27T10:19:24.000Z | #
# Copyright (c) 2019 Eric Faurot <eric@faurot.net>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH... | 30.192982 | 97 | 0.600813 |
fa93e1647da961f5f636dca3ef38b48e98a3773c | 3,356 | py | Python | src/pretix/api/oauth.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 1,248 | 2015-04-24T13:32:06.000Z | 2022-03-29T07:01:36.000Z | src/pretix/api/oauth.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 2,113 | 2015-02-18T18:58:16.000Z | 2022-03-31T11:12:32.000Z | src/pretix/api/oauth.py | fabm3n/pretix | 520fb620888d5c434665a6a4a33cb2ab22dd42c7 | [
"Apache-2.0"
] | 453 | 2015-05-13T09:29:06.000Z | 2022-03-24T13:39:16.000Z | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by ... | 47.942857 | 144 | 0.696663 |
26cec108104050942626e96ae3d987b94e1f759c | 315 | py | Python | videoSummarizer/tag_generation/test_pmi.py | talsperre/LectureSummarizer | 4a0d5a51e80be77fb3715cb386a242871d5cf298 | [
"MIT"
] | 4 | 2020-09-20T19:37:26.000Z | 2021-12-12T08:03:17.000Z | videoSummarizer/tag_generation/test_pmi.py | talsperre/LectureSummarizer | 4a0d5a51e80be77fb3715cb386a242871d5cf298 | [
"MIT"
] | 28 | 2020-11-13T18:50:46.000Z | 2022-03-02T14:53:59.000Z | videoSummarizer/tag_generation/test_pmi.py | talsperre/LectureSummarizer | 4a0d5a51e80be77fb3715cb386a242871d5cf298 | [
"MIT"
] | 2 | 2021-03-23T11:32:43.000Z | 2021-03-24T03:50:37.000Z | from TagGenerationPMI import TagGenrationPMI
import sys
with open(sys.argv[1], 'r') as file:
data = file.read().replace('\n', '')
data = data.split(' ')
obj = TagGenrationPMI()
bigrams, trigrams = obj.generate_tags(data)
print("Bigrams are : {}".format(bigrams))
print("Trigrams are : {}".format(trigrams))
| 22.5 | 44 | 0.688889 |
a62afd91d777a60b046261dbd2ce7f0f02512ab4 | 22,801 | py | Python | aaem/components/annual_savings/annual_savings.py | gina-alaska/alaska_affordable_energy_model | 96fed0137152985ce280ea37e0affec131e3087f | [
"MIT-feh"
] | 1 | 2022-01-23T07:18:36.000Z | 2022-01-23T07:18:36.000Z | aaem/components/annual_savings/annual_savings.py | gina-alaska/alaska_affordable_energy_model | 96fed0137152985ce280ea37e0affec131e3087f | [
"MIT-feh"
] | 5 | 2017-07-14T21:56:46.000Z | 2017-07-14T21:59:15.000Z | aaem/components/annual_savings/annual_savings.py | gina-alaska/alaska_affordable_energy_model | 96fed0137152985ce280ea37e0affec131e3087f | [
"MIT-feh"
] | 2 | 2020-04-28T18:12:55.000Z | 2021-01-13T01:56:57.000Z | """
annual_savings.py
ross spicer
created: 2015/09/16
this file is the representation of what is being calculated at the bottom of
each of the spread sheet tabs.
"""
import numpy as np
import os.path
from abc import ABCMeta, abstractmethod
from pandas import DataFrame
class AnnualSavings (object):
"""
... | 39.312069 | 87 | 0.564317 |
b6eca889b97e1ea666446d3fabab81ba29c6ee01 | 2,401 | py | Python | 5.analysis/logistic_classification.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | 5.analysis/logistic_classification.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | 5.analysis/logistic_classification.py | fullmooncj/textmining_edu | b1402fd96fbde945f48c52d71ba4dfe51fd96602 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import numpy as np
import tensorflow as tf
xy = np.loadtxt('news.target', unpack=True, dtype='float32')
x_data = np.transpose(xy[0:20])
y_data = np.transpose(xy[20:])
X = tf.placeholder("float", [None, 20])
Y = tf.placeholder("float", [None, 7])
W = tf.Variable(tf.zeros([20,... | 46.173077 | 528 | 0.627655 |
28b8091855c00d8088e53caba2b1c7b3d9d612cd | 39,781 | py | Python | tests/test_datasets.py | ckkelvinchan/mmediting | 73ab4347380f8022b7dde6be65cecf910cbdfbd0 | [
"Apache-2.0"
] | 2 | 2021-04-20T11:31:37.000Z | 2021-05-27T13:04:40.000Z | tests/test_datasets.py | ckkelvinchan/mmediting | 73ab4347380f8022b7dde6be65cecf910cbdfbd0 | [
"Apache-2.0"
] | null | null | null | tests/test_datasets.py | ckkelvinchan/mmediting | 73ab4347380f8022b7dde6be65cecf910cbdfbd0 | [
"Apache-2.0"
] | 2 | 2021-04-22T12:10:14.000Z | 2021-05-19T02:09:48.000Z | import os.path as osp
from pathlib import Path
from unittest.mock import patch
import numpy as np
import pytest
from torch.utils.data import Dataset
# yapf: disable
from mmedit.datasets import (AdobeComp1kDataset, BaseGenerationDataset,
BaseSRDataset, GenerationPairedDataset,
... | 36.698339 | 79 | 0.554712 |
47af018e313c42d52665b96fb869f829aa6c5194 | 8,436 | py | Python | ginipaybusiness/src/doc/source/conf.py | gini/gini-health-sdk-android | 09361d0f1ead21d821992e31943477af138c6d62 | [
"Apache-2.0"
] | null | null | null | ginipaybusiness/src/doc/source/conf.py | gini/gini-health-sdk-android | 09361d0f1ead21d821992e31943477af138c6d62 | [
"Apache-2.0"
] | null | null | null | ginipaybusiness/src/doc/source/conf.py | gini/gini-health-sdk-android | 09361d0f1ead21d821992e31943477af138c6d62 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Gini API documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 23 17:02:36 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 31.477612 | 79 | 0.717639 |
2c9a21427f66d749c15c14426cd3660d34d1c28f | 2,348 | py | Python | tests/testapp/tests/factories.py | joshuajonah/feincms-elephantblog | 57a1d60ffa72d7678e6d9f1ceb0ad31b9a44fcff | [
"BSD-3-Clause"
] | null | null | null | tests/testapp/tests/factories.py | joshuajonah/feincms-elephantblog | 57a1d60ffa72d7678e6d9f1ceb0ad31b9a44fcff | [
"BSD-3-Clause"
] | null | null | null | tests/testapp/tests/factories.py | joshuajonah/feincms-elephantblog | 57a1d60ffa72d7678e6d9f1ceb0ad31b9a44fcff | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import, unicode_literals
import datetime
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
import factory
from elephantblog.models import Entry, Category, CategoryTranslation
class UserFactory(factory.DjangoModelFactory)... | 25.247312 | 68 | 0.650341 |
b180d9a0aaee642a22b00ccb8a76c7b426b376bf | 4,225 | py | Python | benchmark/startQiskit3034.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3034.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit3034.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=42
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.631148 | 140 | 0.649941 |
b96f4c361ecaa3a29ac1ceca551f23dc1144fec5 | 14,342 | py | Python | ami_md/ami_json.py | bturkus/ami-tools | d9ad73a3802055ac6c3a935ecb291fc96df6d156 | [
"MIT"
] | null | null | null | ami_md/ami_json.py | bturkus/ami-tools | d9ad73a3802055ac6c3a935ecb291fc96df6d156 | [
"MIT"
] | null | null | null | ami_md/ami_json.py | bturkus/ami-tools | d9ad73a3802055ac6c3a935ecb291fc96df6d156 | [
"MIT"
] | null | null | null | import os, json, re, logging
# data manipulation
from pandas.tslib import Timestamp
import numpy as np
import pandas as pd
# ami modules
import ami_files.ami_file as ami_file
import ami_md.ami_md_constants as ami_md_constants
FULL_TECHFN_RE = r"^[a-z]{3}_[a-z\d\-\*_]+_([vfrspt]\d{2})+_(pm|em|sc)$"
STUB_TECHFN_RE = ... | 32.229213 | 129 | 0.6573 |
356fe041b5f84d6497a41eedfa3fec370db6a21b | 9,299 | py | Python | mac-platform-tools/systrace/catapult/devil/devil/android/logcat_monitor_test.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 1,894 | 2015-04-17T18:29:53.000Z | 2022-03-28T22:41:06.000Z | mac-platform-tools/systrace/catapult/devil/devil/android/logcat_monitor_test.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | mac-platform-tools/systrace/catapult/devil/devil/android/logcat_monitor_test.py | NBPS-Robotics/FTC-Code-Team-9987---2022 | 180538f3ebd234635fa88f96ae7cf7441df6a246 | [
"MIT"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | #!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=protected-access
import itertools
import threading
import unittest
import six
from devil import devil_env
from dev... | 40.430435 | 80 | 0.647597 |
9d6962508612d479bf00b382ede9298a33c10f30 | 3,071 | py | Python | python/ngraph/__init__.py | free25zer/ngraph | a58d3bc255b092d901b54aa744dc0e5945d24fb6 | [
"Apache-2.0"
] | null | null | null | python/ngraph/__init__.py | free25zer/ngraph | a58d3bc255b092d901b54aa744dc0e5945d24fb6 | [
"Apache-2.0"
] | null | null | null | python/ngraph/__init__.py | free25zer/ngraph | a58d3bc255b092d901b54aa744dc0e5945d24fb6 | [
"Apache-2.0"
] | null | null | null | # ******************************************************************************
# Copyright 2017-2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 33.380435 | 88 | 0.773689 |
db409b215a78d2e5f470f077baabf89008987b12 | 19,482 | py | Python | pandas/core/computation/pytables.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 2 | 2019-04-16T21:03:23.000Z | 2021-05-08T13:25:44.000Z | pandas/core/computation/pytables.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 1 | 2016-08-15T12:35:16.000Z | 2016-08-15T12:35:16.000Z | pandas/core/computation/pytables.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 2 | 2017-05-27T03:25:12.000Z | 2021-09-21T21:51:12.000Z | """ manage PyTables query interface via Expressions """
import ast
from functools import partial
import numpy as np
from pandas.compat import DeepChainMap, string_types, u
from pandas.core.dtypes.common import is_list_like
import pandas as pd
from pandas.core.base import StringMixin
import pandas.core.common as co... | 32.148515 | 79 | 0.555949 |
1c1195d740c673c4fbbe9bca08ba0a97d7c2e035 | 17,646 | py | Python | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | null | null | null | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 368 | 2018-12-18T14:43:20.000Z | 2022-03-02T02:54:18.000Z | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 2 | 2019-10-02T03:06:06.000Z | 2020-10-05T16:53:48.000Z | import unittest
from flask import json
from tests.base_test import BaseTest
from app import db
from app.email_service import TEST_MESSAGES
from app.model.email_log import EmailLog
from app.model.investigator import Investigator
from app.model.participant import Relationship
from app.model.questionnaires.identification_... | 44.225564 | 151 | 0.629208 |
2c49a1d6d4b4f9487afa74be01a9ab641d6bd449 | 1,847 | py | Python | Krakatau-master/Krakatau/Krakatau/assembler/token_regexes.py | orneryhippo/saturdays | 525ce086452e96a01d1762418c79d4c84fd605b5 | [
"Apache-2.0"
] | null | null | null | Krakatau-master/Krakatau/Krakatau/assembler/token_regexes.py | orneryhippo/saturdays | 525ce086452e96a01d1762418c79d4c84fd605b5 | [
"Apache-2.0"
] | null | null | null | Krakatau-master/Krakatau/Krakatau/assembler/token_regexes.py | orneryhippo/saturdays | 525ce086452e96a01d1762418c79d4c84fd605b5 | [
"Apache-2.0"
] | null | null | null | DIRECTIVE = r'\.[a-z]+'
WORD = r'(?:[a-zA-Z_$\(<]|\[[A-Z\[])[\w$;\/\[\(\)<>*+-]*'
FOLLOWED_BY_WHITESPACE = r'(?=\s|\Z)'
REF = r'\[[a-z0-9_:]+\]'
LABEL_DEF = r'L\w+:'
COMMENT = r';.*'
# Match optional comment and at least one newline, followed by any number of empty/whitespace lines
NEWLINES = r'(?:{})?\n\s*'.format(CO... | 40.152174 | 133 | 0.493774 |
62ba4ee5ae4668e2001ba14c394b7034f35704b8 | 239 | py | Python | scaffoldgraph/utils/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 121 | 2019-12-12T15:30:16.000Z | 2022-02-28T02:00:54.000Z | scaffoldgraph/utils/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 8 | 2020-04-04T15:37:26.000Z | 2021-11-17T07:30:31.000Z | scaffoldgraph/utils/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 28 | 2019-12-16T11:58:53.000Z | 2021-11-19T09:57:46.000Z | """
scaffoldgraph.utils
"""
from .misc import canonize_smiles, summary
from .aggregate import aggregate
from .logging import suppress_rdlogger
__all__ = [
'canonize_smiles',
'aggregate',
'summary',
'suppress_rdlogger',
]
| 15.933333 | 42 | 0.715481 |
48bae455bbdef6dae8f929f65944f96b8f97e3c1 | 1,951 | py | Python | manila/openstack/common/scheduler/filters/ignore_attempted_hosts_filter.py | redhat-openstack/manila | bef43561b303a36d99849952ba8c408b19bafd02 | [
"Apache-2.0"
] | null | null | null | manila/openstack/common/scheduler/filters/ignore_attempted_hosts_filter.py | redhat-openstack/manila | bef43561b303a36d99849952ba8c408b19bafd02 | [
"Apache-2.0"
] | null | null | null | manila/openstack/common/scheduler/filters/ignore_attempted_hosts_filter.py | redhat-openstack/manila | bef43561b303a36d99849952ba8c408b19bafd02 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 33.637931 | 78 | 0.631984 |
10fc16abb288a774bc34237207448be852316a7a | 30,577 | py | Python | google/cloud/data_fusion_v1/services/data_fusion/async_client.py | renovate-bot/python-data-fusion | cdc2d510bca87bda0599f4081f54a41aa23006ad | [
"Apache-2.0"
] | 2 | 2021-07-07T11:58:49.000Z | 2021-12-30T02:19:36.000Z | google/cloud/data_fusion_v1/services/data_fusion/async_client.py | renovate-bot/python-data-fusion | cdc2d510bca87bda0599f4081f54a41aa23006ad | [
"Apache-2.0"
] | 30 | 2021-07-07T13:17:40.000Z | 2022-03-29T00:02:01.000Z | google/cloud/data_fusion_v1/services/data_fusion/async_client.py | renovate-bot/python-data-fusion | cdc2d510bca87bda0599f4081f54a41aa23006ad | [
"Apache-2.0"
] | 2 | 2021-07-07T11:00:37.000Z | 2022-01-29T08:09:18.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.264507 | 171 | 0.636132 |
dbd0f8e468a298fccd3eb6d5c36f0a44b215852c | 657 | py | Python | migrations/versions/27630d92b728_.py | VikTymZ/pegelinux | bd274aebf8606da5217e0ee7653cf0dd8db4c10a | [
"MIT"
] | 11 | 2018-06-29T01:48:05.000Z | 2021-01-13T19:56:02.000Z | migrations/versions/27630d92b728_.py | VikTymZ/pegelinux | bd274aebf8606da5217e0ee7653cf0dd8db4c10a | [
"MIT"
] | 237 | 2018-07-01T05:18:03.000Z | 2022-02-12T10:32:50.000Z | migrations/versions/27630d92b728_.py | VikTymZ/pegelinux | bd274aebf8606da5217e0ee7653cf0dd8db4c10a | [
"MIT"
] | 9 | 2018-06-30T12:10:28.000Z | 2019-10-22T10:42:43.000Z | """empty message
Revision ID: 27630d92b728
Revises: a4702859796a
Create Date: 2018-06-27 10:13:29.576559
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "27630d92b728"
down_revision = "a4702859796a"
branch_labels = None
depends_on = None
def upgrade():
# ... | 22.655172 | 84 | 0.69102 |
51fb8451b0bf5d8804f4b5850b386bfdeb80481f | 3,404 | py | Python | molo/globalsite/migrations/0001_initial.py | praekeltfoundation/molo.globalsite | 225d68de81b566aa8511e0326cf09b15fe7530c6 | [
"BSD-2-Clause"
] | null | null | null | molo/globalsite/migrations/0001_initial.py | praekeltfoundation/molo.globalsite | 225d68de81b566aa8511e0326cf09b15fe7530c6 | [
"BSD-2-Clause"
] | 7 | 2018-05-10T14:36:41.000Z | 2018-10-18T08:27:51.000Z | molo/globalsite/migrations/0001_initial.py | praekeltfoundation/molo.globalsite | 225d68de81b566aa8511e0326cf09b15fe7530c6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-05-15 20:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('wagtailcore', '0032_add_bulk_delete_pag... | 54.031746 | 299 | 0.635135 |
658371dcd734d69d0c4f4eae9e882256b8ca859e | 158 | py | Python | backend/__init__.py | luannguyenkhoa/tododemo-django-docker | 2f71498dc5884199e4b38211ba892273824ae5bf | [
"MIT"
] | null | null | null | backend/__init__.py | luannguyenkhoa/tododemo-django-docker | 2f71498dc5884199e4b38211ba892273824ae5bf | [
"MIT"
] | null | null | null | backend/__init__.py | luannguyenkhoa/tododemo-django-docker | 2f71498dc5884199e4b38211ba892273824ae5bf | [
"MIT"
] | 1 | 2019-10-16T08:11:07.000Z | 2019-10-16T08:11:07.000Z | """Initialize."""
__version__ = '0.1.0'
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
| 39.5 | 117 | 0.64557 |
38af581913af0e5e5a6e8e1f3b539d92d54555a3 | 5,527 | py | Python | main.py | hiwonjoon/cycle-gan-tf | 1dea58036d75029559c8f0aaf83e307919b0742b | [
"MIT"
] | 79 | 2017-04-11T14:59:21.000Z | 2019-07-08T04:14:02.000Z | main.py | naru-hiyoko/cycle-gan-tf | 1dea58036d75029559c8f0aaf83e307919b0742b | [
"MIT"
] | 3 | 2017-05-11T17:33:32.000Z | 2018-02-18T12:54:04.000Z | main.py | naru-hiyoko/cycle-gan-tf | 1dea58036d75029559c8f0aaf83e307919b0742b | [
"MIT"
] | 28 | 2017-04-11T20:45:15.000Z | 2019-07-05T11:24:16.000Z | import numpy as np
import random
from ops import *
from model import *
import tensorflow as tf
import dataset
tf.set_random_seed(123)
np.random.seed(123)
random.seed(123)
TARGET = 'horse2zebra'
LOG_DIR = './log/'+TARGET
A_DIR = './datasets/'+TARGET+'/trainA/*'
B_DIR = './datasets/'+TARGET+'/trainB/*'
LEARNING_RATE... | 31.050562 | 126 | 0.667089 |
3cc3019314fa41644a2b1914638a13ead45f04f7 | 5,170 | py | Python | rl_algorithms/qlearning/DQN.py | blurry-mood/RL-algorithms | a3869943059579ef3a28f803bfe00f4fd58baeab | [
"MIT"
] | 4 | 2021-12-12T16:55:55.000Z | 2022-01-16T18:22:18.000Z | rl_algorithms/qlearning/DQN.py | blurry-mood/RL-algorithms | a3869943059579ef3a28f803bfe00f4fd58baeab | [
"MIT"
] | null | null | null | rl_algorithms/qlearning/DQN.py | blurry-mood/RL-algorithms | a3869943059579ef3a28f803bfe00f4fd58baeab | [
"MIT"
] | null | null | null | import collections
from copy import deepcopy
from typing import List
import torch
from ..Agent import Agent
import numpy as np
from torch import nn
class DQN(Agent):
def __init__(self, network: nn.Module, actions: List, alpha: float, gamma: float, eps: float, c: int = 128, t: int = 1024, capacity: int = 1024, ... | 32.515723 | 177 | 0.589942 |
eabbba6d63a9f509c8dec2c871ddcec2855f336e | 388 | py | Python | kroml/iostrategies/input_text/loader_text.py | kroML/kroml | cfa5e505aaac01c31c1a4811e27ce70c41e0b1ae | [
"MIT"
] | null | null | null | kroml/iostrategies/input_text/loader_text.py | kroML/kroml | cfa5e505aaac01c31c1a4811e27ce70c41e0b1ae | [
"MIT"
] | 4 | 2020-09-26T01:10:21.000Z | 2022-02-10T02:00:18.000Z | kroml/iostrategies/input_text/loader_text.py | kroML/kroml | cfa5e505aaac01c31c1a4811e27ce70c41e0b1ae | [
"MIT"
] | null | null | null | import abc
from utils.logger import Logger
logger = Logger(__name__)
@logger.for_all_methods(in_args=False,
skip_func=['__init__'])
class Loader(metaclass=abc.ABCMeta):
def __init__(self, config, variables):
self.config = config
self.variables = variables
@abc.abstra... | 21.555556 | 47 | 0.654639 |
3acadcf71646a67465b0c1cf26ce6a3a3ac1139d | 15,022 | py | Python | flask_appbuilder/security/sqla/manager.py | astahlman/Flask-AppBuilder | ebd543db9fc787ca9a1c5ee06809ae0e92359968 | [
"BSD-3-Clause"
] | null | null | null | flask_appbuilder/security/sqla/manager.py | astahlman/Flask-AppBuilder | ebd543db9fc787ca9a1c5ee06809ae0e92359968 | [
"BSD-3-Clause"
] | 3 | 2021-06-08T23:39:54.000Z | 2022-03-12T00:50:13.000Z | flask_appbuilder/security/sqla/manager.py | jameslo1212/Flask-AppBuilder | b71789d85b632935eca79c0b53fb77f20bf17fe6 | [
"BSD-3-Clause"
] | null | null | null | import logging
import uuid
from sqlalchemy import func
from sqlalchemy.engine.reflection import Inspector
from werkzeug.security import generate_password_hash
from .models import User, Permission, PermissionView, RegisterUser, ViewMenu, Role
from ..manager import BaseSecurityManager
from ...models.sqla.interface impor... | 36.818627 | 135 | 0.607975 |
7f596934619918187d0f3ea8a92a3adf403f59fd | 3,277 | py | Python | topic_model/train_lda_model_and_save.py | krikyn/Strong-Paraphrase-Generation-2020 | 3d5b6f4fd0d4b4f96ed6bdd91b7000d3d80fc901 | [
"MIT"
] | 10 | 2020-04-29T18:28:34.000Z | 2021-11-26T07:41:19.000Z | topic_model/train_lda_model_and_save.py | krikyn/Strong-Paraphrase-Generation-2020 | 3d5b6f4fd0d4b4f96ed6bdd91b7000d3d80fc901 | [
"MIT"
] | null | null | null | topic_model/train_lda_model_and_save.py | krikyn/Strong-Paraphrase-Generation-2020 | 3d5b6f4fd0d4b4f96ed6bdd91b7000d3d80fc901 | [
"MIT"
] | 9 | 2020-07-02T08:31:55.000Z | 2021-11-15T20:57:54.000Z | import re
import numpy as np
import pandas as pd
from pprint import pprint
# Gensim
import gensim
import gensim.corpora as corpora
from gensim.utils import simple_preprocess
from gensim.models import CoherenceModel
# Plotting tools
import pyLDAvis
import pyLDAvis.gensim # don't skip this
import matplotlib.pyplot as ... | 30.915094 | 94 | 0.588648 |
6e2224888f00bc45654f9a1c6cbd4b3c03016c3a | 81 | py | Python | scraper/eckersleys.py | hector-moya/my-new-chroma | be61a9e8a5221118c16f1ed517f6c914c533e354 | [
"MIT"
] | null | null | null | scraper/eckersleys.py | hector-moya/my-new-chroma | be61a9e8a5221118c16f1ed517f6c914c533e354 | [
"MIT"
] | 5 | 2021-03-09T23:46:12.000Z | 2022-03-02T06:24:52.000Z | scraper/eckersleys.py | hector-moya/my-new-chroma | be61a9e8a5221118c16f1ed517f6c914c533e354 | [
"MIT"
] | null | null | null | from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup | 40.5 | 43 | 0.839506 |
93684b9dac1b63822ee0f3a4ee9e3a1e4242514c | 4,141 | py | Python | binlin/utils/visualize.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | 1 | 2021-12-15T08:44:35.000Z | 2021-12-15T08:44:35.000Z | binlin/utils/visualize.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | 3 | 2021-03-19T04:07:44.000Z | 2022-01-13T01:40:50.000Z | binlin/utils/visualize.py | UKPLab/inlg2019-revisiting-binlin | 250196403ee4050cac78c547add90087ea04243f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import os
from typing import List
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import torch
from matplotlib.backends.backend_pdf import PdfPages
from torch.nn.modules.module import _addindent
from binlin.uti... | 28.756944 | 99 | 0.645013 |
d667b996a7269ff29fa2a08dbc7f5c906aedb67b | 1,373 | py | Python | lego/settings/lego.py | ollfkaih/lego | b15aacaf09efe90e7f984d25b0e7bddbe12647e8 | [
"MIT"
] | 45 | 2017-10-24T12:09:06.000Z | 2021-11-03T21:21:03.000Z | lego/settings/lego.py | ollfkaih/lego | b15aacaf09efe90e7f984d25b0e7bddbe12647e8 | [
"MIT"
] | 980 | 2017-10-24T12:29:07.000Z | 2022-03-31T04:04:31.000Z | lego/settings/lego.py | ollfkaih/lego | b15aacaf09efe90e7f984d25b0e7bddbe12647e8 | [
"MIT"
] | 23 | 2018-04-11T16:34:22.000Z | 2021-11-23T12:28:30.000Z | from datetime import timedelta
SITE = {
"name": "LEGO",
"slogan": "LEGO Er Ganske Oppdelt",
"contact_email": "webkom@abakus.no",
"documentation_url": "/docs/",
"domain": "abakus.no",
"owner": "Abakus",
}
API_VERSION = "v1"
LOGIN_REDIRECT_URL = f"/api/{API_VERSION}/"
EMAIL_SUBJECT_PREFIX = "[A... | 22.145161 | 71 | 0.670066 |
7896d86a3d11f4a7f73d57d5bfba3a679bdfbc51 | 7,244 | py | Python | beerkeg.py | huntrar/ChooseMyBeer | 02dad14baf064ce8d3107ff6f4586bf2ec0d3118 | [
"MIT"
] | 4 | 2015-07-22T05:51:18.000Z | 2017-04-30T03:01:39.000Z | beerkeg.py | huntrar/ChooseMyBeer | 02dad14baf064ce8d3107ff6f4586bf2ec0d3118 | [
"MIT"
] | null | null | null | beerkeg.py | huntrar/ChooseMyBeer | 02dad14baf064ce8d3107ff6f4586bf2ec0d3118 | [
"MIT"
] | null | null | null |
import re
import webbrowser
from urlparse import urlparse
from utils import get_text, get_html, is_num, unique
class BeerKeg(object):
''' Beer Keg class '''
def __init__(self, url, num_attempts, verbose=False):
''' url must be a string containing the url for a single BevMo keg '''
self.url ... | 32.778281 | 80 | 0.464384 |
38f1635e2190dd8c678402adf55ebf12edf16bd7 | 3,751 | py | Python | gui/plugins/timeline_view_test.py | strcrzy/grr | 60d113069b8016c3eba8bc735a3acbc5c738fda4 | [
"Apache-2.0"
] | 6 | 2015-04-03T02:25:28.000Z | 2021-11-17T21:42:59.000Z | gui/plugins/timeline_view_test.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | 3 | 2020-02-11T22:29:15.000Z | 2021-06-10T17:44:31.000Z | gui/plugins/timeline_view_test.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
# Copyright 2011 Google Inc. All Rights Reserved.
"""Tests for the Timeline viewer flow."""
from grr.client import vfs
from grr.gui import runtests_test
from grr.lib import access_control
from grr.lib import action_mocks
from grr.lib import aff4
from g... | 30.495935 | 79 | 0.688083 |
65c2192b08e4b1e1d4cdee725461069b57cfc99f | 1,562 | py | Python | comparison_qrs_detectors/comparison_qrs_detectors/config.py | Andrew1021/Comparison-QRS-Detectors | 6f77b7aa6b48fc79c5aa62f2546cbfb0a794ab9d | [
"BSD-3-Clause"
] | null | null | null | comparison_qrs_detectors/comparison_qrs_detectors/config.py | Andrew1021/Comparison-QRS-Detectors | 6f77b7aa6b48fc79c5aa62f2546cbfb0a794ab9d | [
"BSD-3-Clause"
] | 2 | 2021-09-02T08:31:27.000Z | 2021-09-06T09:28:13.000Z | comparison_qrs_detectors/comparison_qrs_detectors/config.py | Andrew1021/Comparison-QRS-Detectors | 6f77b7aa6b48fc79c5aa62f2546cbfb0a794ab9d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
comparison_qrs_detectors
-------
A toolbox for comparison of the Pan-Tompkins, Engelse-Zeelenberg and Christov QRS detector written in Python.
:copyright: (c) 2021 by Open Innovation Lab
:license: BSD 3-clause, see LICENSE for more details.
"""
# Imports
# 3rd party
import pathli... | 34.711111 | 140 | 0.75096 |
a0eecfbecc7ffd1c439329f03fb7b5b7173d9c3c | 20,669 | py | Python | modules/tests/smoke/broken_links.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | modules/tests/smoke/broken_links.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | modules/tests/smoke/broken_links.py | arnavsharma93/eden | 2e559a277c4144ba4f4cdcd108460d025923671d | [
"MIT"
] | null | null | null | """ Sahana Eden Test Framework
@copyright: 2011-2014 (c) Sahana Software Foundation
@license: MIT
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, incl... | 39.220114 | 175 | 0.544632 |
0d4294dd7e1387a470a4641ca2286099b860c6d0 | 4,992 | py | Python | dds_web/security/tokens.py | zishanmirza/dds_web | dbcb92176951cf7589a558833e2c870e9e47e9df | [
"BSD-3-Clause"
] | null | null | null | dds_web/security/tokens.py | zishanmirza/dds_web | dbcb92176951cf7589a558833e2c870e9e47e9df | [
"BSD-3-Clause"
] | 47 | 2020-02-04T15:20:12.000Z | 2020-06-01T06:25:21.000Z | dds_web/security/tokens.py | zishanmirza/dds_web | dbcb92176951cf7589a558833e2c870e9e47e9df | [
"BSD-3-Clause"
] | 3 | 2019-09-20T08:45:04.000Z | 2019-09-24T08:51:00.000Z | ####################################################################################################
# IMPORTS ################################################################################ IMPORTS #
####################################################################################################
# Standard libra... | 42.666667 | 114 | 0.66266 |
b29447bc2f0835101a524c0fbbd9fc8cc07d80d5 | 1,596 | py | Python | src/ioSettings/urls.py | IOwebapps/sigtest | 4440d08fa187b5287ff98cb0263cfb5cfd819e2e | [
"MIT"
] | 1 | 2022-03-29T15:09:03.000Z | 2022-03-29T15:09:03.000Z | src/ioSettings/urls.py | IOwebapps/sigtest | 4440d08fa187b5287ff98cb0263cfb5cfd819e2e | [
"MIT"
] | null | null | null | src/ioSettings/urls.py | IOwebapps/sigtest | 4440d08fa187b5287ff98cb0263cfb5cfd819e2e | [
"MIT"
] | null | null | null | """ URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
... | 33.957447 | 80 | 0.712406 |
c3f090a7abfcc876891555a356671fc3978ae791 | 38,263 | py | Python | samples/python/console/speech_sample.py | jolguk/cognitive-services-speech-sdk | 13173866ff72138f767254fddbf8a98c92669f5e | [
"MIT"
] | null | null | null | samples/python/console/speech_sample.py | jolguk/cognitive-services-speech-sdk | 13173866ff72138f767254fddbf8a98c92669f5e | [
"MIT"
] | null | null | null | samples/python/console/speech_sample.py | jolguk/cognitive-services-speech-sdk | 13173866ff72138f767254fddbf8a98c92669f5e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
"""
Speech recognition samples for the Microsoft Cognitive Services Speech SDK
"""
import time
import wave
import string
try:
... | 50.545575 | 141 | 0.721219 |
4cc955c2b035c6d18c2ceebe24d70da017ef3bca | 4,846 | py | Python | jina/peapods/runtimes/base.py | abreu4/jina | d1d045e9e0933dffb3bd668cb9cfebab6cd52202 | [
"Apache-2.0"
] | 2 | 2021-01-22T07:34:35.000Z | 2021-01-23T04:36:41.000Z | jina/peapods/runtimes/base.py | abreu4/jina | d1d045e9e0933dffb3bd668cb9cfebab6cd52202 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | jina/peapods/runtimes/base.py | abreu4/jina | d1d045e9e0933dffb3bd668cb9cfebab6cd52202 | [
"Apache-2.0"
] | null | null | null | import argparse
from ...logging import JinaLogger
class BaseRuntime:
"""A Jina Runtime is a procedure that blocks the main process once running (i.e. :meth:`run_forever`),
therefore must be put into a separated thread/process. Any program/library/package/module that blocks the main
process, can be formul... | 41.067797 | 119 | 0.645687 |
23beec444364b57e4dd08e4b7c66067aec449642 | 9,981 | py | Python | numpy/array_api/_creation_functions.py | OakCityLabs/numpy | 09f5c5a64eb019b3e058c7183ca1ead6190bdbc8 | [
"BSD-3-Clause"
] | 1 | 2021-12-14T18:48:58.000Z | 2021-12-14T18:48:58.000Z | numpy/array_api/_creation_functions.py | OakCityLabs/numpy | 09f5c5a64eb019b3e058c7183ca1ead6190bdbc8 | [
"BSD-3-Clause"
] | null | null | null | numpy/array_api/_creation_functions.py | OakCityLabs/numpy | 09f5c5a64eb019b3e058c7183ca1ead6190bdbc8 | [
"BSD-3-Clause"
] | 1 | 2022-02-09T22:48:38.000Z | 2022-02-09T22:48:38.000Z | from __future__ import annotations
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
if TYPE_CHECKING:
from ._typing import (
Array,
Device,
Dtype,
NestedSequence,
SupportsBufferProtocol,
)
from collections.abc import Sequence
from ._dtypes import _all... | 28.355114 | 86 | 0.642721 |
66d50d07ff2067b802b90a2aadd88df23153830a | 1,136 | py | Python | examples/unsupervised_quality_estimation/aggregate_scores.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 16,259 | 2018-05-02T02:31:30.000Z | 2022-03-31T21:50:23.000Z | examples/unsupervised_quality_estimation/aggregate_scores.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 3,863 | 2018-05-02T13:42:39.000Z | 2022-03-31T19:03:32.000Z | examples/unsupervised_quality_estimation/aggregate_scores.py | fairseq-FT/fairseq | 18725499144c1bba7c151b796ba774e59d36eaa9 | [
"MIT"
] | 4,796 | 2018-05-02T07:55:51.000Z | 2022-03-31T14:46:45.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 argparse
import sys
import numpy as np
aggregate_funcs = {
"std": np.std,
"var": np.var,
"median": np.median,
"mean"... | 27.047619 | 83 | 0.654049 |
c0e4709abc2601efd73a3ca778f01b32c64954f0 | 4,093 | py | Python | igibson/tasks/room_rearrangement_task.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/tasks/room_rearrangement_task.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/tasks/room_rearrangement_task.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | import logging
import numpy as np
import pybullet as p
from igibson.reward_functions.potential_reward import PotentialReward
from igibson.scenes.igibson_indoor_scene import InteractiveIndoorScene
from igibson.tasks.task_base import BaseTask
from igibson.termination_conditions.max_collision import MaxCollision
from ig... | 33.276423 | 118 | 0.629367 |
921c6e06d0564b4cf8c9e3520338f70b055ae2ba | 4,730 | py | Python | dials_data/cli.py | toastisme/data | 6ef6383853385bc63f81cfa5217bae29a17c8279 | [
"BSD-3-Clause"
] | null | null | null | dials_data/cli.py | toastisme/data | 6ef6383853385bc63f81cfa5217bae29a17c8279 | [
"BSD-3-Clause"
] | 10 | 2021-06-01T05:57:15.000Z | 2022-03-01T23:03:11.000Z | dials_data/cli.py | ndevenish/data | 93225485f9011900b8ec57645ff0b368b4810c66 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import sys
import dials_data
import dials_data.datasets
import dials_data.download
import yaml
def cli_info(cmd_args):
parser = argparse.ArgumentParser(
description="Shown information", prog="dials.data info"
)
parser.add_argument(
"-v",
"--verbose",
action... | 32.62069 | 99 | 0.646512 |
8d95dcb84f04bbe0268a6eb6b45884d13c275237 | 62,147 | py | Python | tests/test_scottbrian_utils/test_time_hdr.py | ScottBrian/scottbrian_utils | 897d61462153a40e00f8c596d5286958eb03f34a | [
"MIT"
] | null | null | null | tests/test_scottbrian_utils/test_time_hdr.py | ScottBrian/scottbrian_utils | 897d61462153a40e00f8c596d5286958eb03f34a | [
"MIT"
] | null | null | null | tests/test_scottbrian_utils/test_time_hdr.py | ScottBrian/scottbrian_utils | 897d61462153a40e00f8c596d5286958eb03f34a | [
"MIT"
] | null | null | null | """test_time_hdr.py module."""
from datetime import datetime, timedelta
import pytest
import sys
from typing import Any, Callable, cast, Tuple, Union
from typing_extensions import Final
from scottbrian_utils.time_hdr import StartStopHeader as StartStopHeader
from scottbrian_utils.time_hdr import time_box as time_box... | 41.348636 | 79 | 0.557565 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.