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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f163eb54fbb5fd35aad6d63c8ba955df66a34465 | 2,153 | py | Python | ascii_layout.py | petedaws/pyasciidraw | 9b9ac862332bfa7f71bdf14887845e084d9580e6 | [
"MIT"
] | null | null | null | ascii_layout.py | petedaws/pyasciidraw | 9b9ac862332bfa7f71bdf14887845e084d9580e6 | [
"MIT"
] | null | null | null | ascii_layout.py | petedaws/pyasciidraw | 9b9ac862332bfa7f71bdf14887845e084d9580e6 | [
"MIT"
] | null | null | null | import math
class Canvas:
def __init__(self,width=1,height=1):
self.height = height
self.width = width
self.canvas = []
for a in range(self.height):
self.__add_row()
def __add_row(self):
row = []
for b in range(self.width):
row.append(' ')
self.canvas.append(row)
def __extend_row(self,ro... | 23.659341 | 67 | 0.645611 |
3ed55044c1004e3b25f5c6a5faf423bf13c94250 | 2,780 | py | Python | models/tconv.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 8 | 2022-01-19T20:47:36.000Z | 2022-03-20T05:11:04.000Z | models/tconv.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 2 | 2022-02-17T06:14:25.000Z | 2022-02-17T08:43:57.000Z | models/tconv.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 5 | 2022-02-15T04:16:27.000Z | 2022-03-29T01:21:41.000Z | import torch
import torch.nn as nn
from torch.nn.utils import weight_norm
# class Chomp1d(nn.Module):
# def __init__(self, chomp_size):
# super(Chomp1d, self).__init__()
# self.chomp_size = chomp_size
# def forward(self, x):
# return x[:, :, :-self.chomp_size].contiguous()
class Tem... | 40.882353 | 110 | 0.593885 |
dbca83f2ec0bed74710b13304b8ae575c0c30e50 | 15,523 | py | Python | spyder/utils/qthelpers.py | stonebig/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | 1 | 2016-05-26T13:26:21.000Z | 2016-05-26T13:26:21.000Z | spyder/utils/qthelpers.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | null | null | null | spyder/utils/qthelpers.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""Qt utilities"""
# Standard library imports
import os
import os.path as osp
import re
import sys
# Third party imports
from qtpy.compat import to_q... | 33.745652 | 80 | 0.603041 |
11e4744516f5e6e35ef6f330bfdb6685850af8a7 | 2,461 | py | Python | Working/oc-cnn-master-Q/src/main/VGG_FACE_torch.py | QUANHAO-NCU/pytorch-visual-block | f024541add5581026343aaaaeaf27d8415f3d4fe | [
"MIT"
] | 1 | 2021-05-13T15:02:06.000Z | 2021-05-13T15:02:06.000Z | Working/oc-cnn-master/src/main/VGG_FACE_torch.py | QUANHAO-NCU/pytorch-Neural-NetWork | f024541add5581026343aaaaeaf27d8415f3d4fe | [
"MIT"
] | null | null | null | Working/oc-cnn-master/src/main/VGG_FACE_torch.py | QUANHAO-NCU/pytorch-Neural-NetWork | f024541add5581026343aaaaeaf27d8415f3d4fe | [
"MIT"
] | 1 | 2021-05-13T15:02:07.000Z | 2021-05-13T15:02:07.000Z | import torch
import torch.nn as nn
from torch.autograd import Variable
from functools import reduce
class LambdaBase(nn.Sequential):
def __init__(self, fn, *args):
super(LambdaBase, self).__init__(*args)
self.lambda_func = fn
def forward_prepare(self, input):
output = []
for m... | 32.813333 | 115 | 0.55384 |
2316f1bb76a477384f2f67b196300d36ae07781a | 7,517 | py | Python | tests/test_groupby.py | domoritz/solas | 23878fed9efbf14781791dafec26705c6762cfd1 | [
"Apache-2.0"
] | 2 | 2021-11-09T17:54:43.000Z | 2022-01-28T15:38:58.000Z | tests/test_groupby.py | domoritz/solas | 23878fed9efbf14781791dafec26705c6762cfd1 | [
"Apache-2.0"
] | 27 | 2021-04-08T18:58:49.000Z | 2021-10-11T02:33:35.000Z | tests/test_groupby.py | domoritz/solas | 23878fed9efbf14781791dafec26705c6762cfd1 | [
"Apache-2.0"
] | 1 | 2021-06-18T02:41:48.000Z | 2021-06-18T02:41:48.000Z | # Copyright 2019-2020 The Solas 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 agre... | 41.761111 | 138 | 0.697486 |
5ff94b1b34436417421ce7e53a143dfa17e22d3f | 550 | py | Python | examples/statemachine/trafficLightDemo.py | yawor/pyparsing | 39934574db9796f27397b9f76a112c2466bd1a69 | [
"MIT"
] | 1,499 | 2017-07-17T04:10:36.000Z | 2022-03-31T08:50:58.000Z | examples/statemachine/trafficLightDemo.py | yawor/pyparsing | 39934574db9796f27397b9f76a112c2466bd1a69 | [
"MIT"
] | 316 | 2017-12-23T23:05:03.000Z | 2022-03-30T10:09:43.000Z | examples/statemachine/trafficLightDemo.py | yawor/pyparsing | 39934574db9796f27397b9f76a112c2466bd1a69 | [
"MIT"
] | 254 | 2017-07-02T15:23:13.000Z | 2022-03-29T18:20:22.000Z | #
# trafficLightDemo.py
#
# Example of a simple state machine modeling the state of a traffic light
#
import statemachine
import trafficlightstate
class TrafficLight(trafficlightstate.TrafficLightStateMixin):
def __init__(self):
self.initialize_state(trafficlightstate.Red)
def change(self):
... | 20.37037 | 73 | 0.701818 |
f6456c59e6aa8fdaf58314a37d3ada2781e9a32e | 39,584 | py | Python | openprocurement/tender/competitivedialogue/tests/base.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/competitivedialogue/tests/base.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | 150 | 2016-06-07T15:09:50.000Z | 2018-03-19T16:17:53.000Z | openprocurement/tender/competitivedialogue/tests/base.py | raccoongang/openprocurement.tender.competitivedialogue | 0cc7fdf8aff1ecd82ba404318d6d88efc9a97d78 | [
"Apache-2.0"
] | 17 | 2016-05-27T13:17:52.000Z | 2018-06-15T14:39:03.000Z | # -*- coding: utf-8 -*-
import os
from hashlib import sha512
from datetime import datetime, timedelta
from uuid import uuid4
from copy import deepcopy
from openprocurement.api.design import sync_design
from openprocurement.api.constants import SANDBOX_MODE
from openprocurement.api.utils import apply_data_patch, get_now... | 42.381156 | 243 | 0.498004 |
4bd09f774f729c9eb7af956b28bcafc7b876e9d8 | 2,338 | py | Python | bin/api_connector_splunk/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py | CyberGRX/api-connector-splunk | 7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6 | [
"MIT"
] | 106 | 2018-03-09T13:03:05.000Z | 2022-03-10T11:01:48.000Z | bin/api_connector_splunk/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py | CyberGRX/api-connector-splunk | 7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6 | [
"MIT"
] | 54 | 2016-08-11T14:22:30.000Z | 2020-08-07T22:14:55.000Z | bin/api_connector_splunk/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py | CyberGRX/api-connector-splunk | 7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6 | [
"MIT"
] | 33 | 2018-04-23T20:18:11.000Z | 2022-03-27T16:41:03.000Z | import ConfigParser
import os.path as op
from .data_collection import ta_mod_input as ta_input
from .ta_cloud_connect_client import TACloudConnectClient as CollectorCls
from ..common.lib_util import (
get_main_file, get_app_root_dir, get_mod_input_script_name
)
def _load_options_from_inputs_spec(app_root, stanza... | 32.472222 | 73 | 0.710436 |
3fedb3e4ba072072fe6646993dff20205c98e150 | 647 | py | Python | p2/api/permissions.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | p2/api/permissions.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | p2/api/permissions.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | """p2 core api permissions"""
from rest_framework import permissions
class CustomObjectPermissions(permissions.DjangoObjectPermissions):
"""
Similar to `DjangoObjectPermissions`, but adding 'view' permissions.
"""
perms_map = {
'GET': ['%(app_label)s.view_%(model_name)s'],
'OPTIONS': ... | 34.052632 | 72 | 0.619784 |
83d3af2a0971b4bf081ee1fcbcc7ba813899d298 | 2,642 | py | Python | VSR/Backend/Torch/Models/Vespcn.py | soufiomario/VideoSuperResolution | 3677e562df4674b9ff827feecce1806de15131a4 | [
"MIT"
] | 2 | 2021-08-05T08:32:03.000Z | 2021-08-12T09:33:44.000Z | VSRTorch/Models/Vespcn.py | Evergreengyq/VideoSuperResolution | 1d0c54fafaf7a02f0d69408502f90c55f0f76536 | [
"MIT"
] | null | null | null | VSRTorch/Models/Vespcn.py | Evergreengyq/VideoSuperResolution | 1d0c54fafaf7a02f0d69408502f90c55f0f76536 | [
"MIT"
] | null | null | null | # Copyright (c): Wenyi Tang 2017-2019.
# Author: Wenyi Tang
# Email: wenyi.tang@intel.com
# Update Date: 2019/4/3 下午5:10
import torch
import torch.nn.functional as F
from .Model import SuperResolution
from .vespcn import ops
from ..Framework.Summary import get_writer
from ..Util import Metrics
from ..Util.Utility... | 37.211268 | 80 | 0.635125 |
241ad558ee90abc659b63f98117f4deceef593b3 | 1,320 | py | Python | pasteit/wsgi.py | bjorn/Paste-It | 458a5072a9f33343365586b4b028a134168fcdc0 | [
"MIT"
] | 1 | 2020-06-11T03:11:08.000Z | 2020-06-11T03:11:08.000Z | pasteit/wsgi.py | bjorn/Paste-It | 458a5072a9f33343365586b4b028a134168fcdc0 | [
"MIT"
] | null | null | null | pasteit/wsgi.py | bjorn/Paste-It | 458a5072a9f33343365586b4b028a134168fcdc0 | [
"MIT"
] | null | null | null | """
WSGI config for pastit project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` s... | 34.736842 | 79 | 0.789394 |
c181cd7cb6196bbb6b39d3577e90bed73780c675 | 72 | py | Python | enthought/pyface/tasks/action/task_action_controller.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/pyface/tasks/action/task_action_controller.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/pyface/tasks/action/task_action_controller.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from pyface.tasks.action.task_action_controller import *
| 24 | 56 | 0.833333 |
8e49dfb309d2e6c89fb9231946cf5cca6f0ddd87 | 1,553 | py | Python | rplugin/python3/denite/kind/directory.py | gamoutatsumi/denite.nvim | 7e14c6c4d645c891b07c73d294ba9aadb08a9843 | [
"MIT"
] | 2,249 | 2016-02-15T23:13:15.000Z | 2022-03-30T07:51:58.000Z | rplugin/python3/denite/kind/directory.py | gamoutatsumi/denite.nvim | 7e14c6c4d645c891b07c73d294ba9aadb08a9843 | [
"MIT"
] | 795 | 2016-02-15T23:52:26.000Z | 2022-02-19T09:55:59.000Z | rplugin/python3/denite/kind/directory.py | gamoutatsumi/denite.nvim | 7e14c6c4d645c891b07c73d294ba9aadb08a9843 | [
"MIT"
] | 391 | 2016-02-15T23:15:33.000Z | 2021-11-12T03:01:54.000Z | # ============================================================================
# FILE: directory.py
# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
# okamos <himinato.k at gmail.com>
# License: MIT license
# ============================================================================
from pynvim import... | 33.76087 | 78 | 0.509337 |
986ebf73646b0047ee90296c9d2756e0fa8d0775 | 3,942 | py | Python | mongoengine/errors.py | embeddedfactor/mongoengine | 3627969fce1e17882f84a45773b66a502f765269 | [
"MIT"
] | null | null | null | mongoengine/errors.py | embeddedfactor/mongoengine | 3627969fce1e17882f84a45773b66a502f765269 | [
"MIT"
] | 1 | 2021-06-01T23:44:17.000Z | 2021-06-01T23:44:17.000Z | mongoengine/errors.py | embeddedfactor/mongoengine | 3627969fce1e17882f84a45773b66a502f765269 | [
"MIT"
] | null | null | null | from collections import defaultdict
import six
__all__ = ('NotRegistered', 'InvalidDocumentError', 'LookUpError',
'DoesNotExist', 'MultipleObjectsReturned', 'InvalidQueryError',
'OperationError', 'NotUniqueError', 'FieldDoesNotExist',
'ValidationError', 'SaveConditionError')
class N... | 26.816327 | 79 | 0.623034 |
5bef4ef50d565e790ff9f065927157e8edf046ba | 759 | py | Python | part 2/get_year_deltas.py | trh0ly/Derivate | d7aa46d95e4a0999b7d81c35eb987f9bab8f3419 | [
"Unlicense"
] | null | null | null | part 2/get_year_deltas.py | trh0ly/Derivate | d7aa46d95e4a0999b7d81c35eb987f9bab8f3419 | [
"Unlicense"
] | null | null | null | part 2/get_year_deltas.py | trh0ly/Derivate | d7aa46d95e4a0999b7d81c35eb987f9bab8f3419 | [
"Unlicense"
] | null | null | null | #
# DX Package
#
# Frame -- Helper Function
#
# get_year_deltas.py
#
# Python for Finance, 2nd ed.
# (c) Dr. Yves J. Hilpisch
#
import numpy as np
def get_year_deltas(date_list, day_count=365.):
''' Return vector of floats with day deltas in year fractions.
Initial value normalized to zero.
... | 23 | 67 | 0.603426 |
d5e8f49eaeab107127c253925fa9d6c39a88c053 | 39,485 | py | Python | gradio/interface.py | Un-index/gradio | 06acffa04249cc1ff1ef3d38b4f62b9a73643157 | [
"Apache-2.0"
] | null | null | null | gradio/interface.py | Un-index/gradio | 06acffa04249cc1ff1ef3d38b4f62b9a73643157 | [
"Apache-2.0"
] | null | null | null | gradio/interface.py | Un-index/gradio | 06acffa04249cc1ff1ef3d38b4f62b9a73643157 | [
"Apache-2.0"
] | null | null | null | """
This is the core file in the `gradio` package, and defines the Interface class, including methods for constructing the
interface using the input and output types.
"""
import copy
import csv
import getpass
import inspect
import markdown2
import numpy as np
import os
import pkg_resources
import requests
import rando... | 51.546997 | 523 | 0.607497 |
92446178008cf22cbbbdcee47fd8c1dbb0cda53b | 8,571 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py | iamvishnuks/azure-sdk-for-python | 4df435651ab32f57b1e9f33fc65fd46632055704 | [
"MIT"
] | 1 | 2020-09-18T13:20:20.000Z | 2020-09-18T13:20:20.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------------... | 51.63253 | 187 | 0.709485 |
8df5e35010177862896fee51b5086366792fb69d | 2,152 | py | Python | src/agent/rnd_net/bigger_conv_net.py | abagaria/opiq | b7df5134d8b265972ad70f7ba92b385f1e3fe5f2 | [
"MIT"
] | 13 | 2020-02-13T16:09:16.000Z | 2021-07-21T16:23:39.000Z | src/agent/rnd_net/bigger_conv_net.py | abagaria/opiq | b7df5134d8b265972ad70f7ba92b385f1e3fe5f2 | [
"MIT"
] | 2 | 2020-08-04T01:46:37.000Z | 2021-06-28T10:30:53.000Z | src/agent/rnd_net/bigger_conv_net.py | abagaria/opiq | b7df5134d8b265972ad70f7ba92b385f1e3fe5f2 | [
"MIT"
] | 3 | 2020-08-01T07:33:02.000Z | 2021-11-13T20:54:55.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class Target_RND(nn.Module):
def __init__(self, args):
super(Target_RND, self).__init__()
maze_size = args.state_shape[0]
image_size = maze_size
... | 29.888889 | 72 | 0.59619 |
4ce7c3ef5fdd1107e987a66a6ebc434765b7c167 | 1,684 | py | Python | config/wsgi.py | ezequieljsosa/globinq | 9c777456d6ed582ab821d19e4dabbc25b474f390 | [
"MIT"
] | null | null | null | config/wsgi.py | ezequieljsosa/globinq | 9c777456d6ed582ab821d19e4dabbc25b474f390 | [
"MIT"
] | 2 | 2021-03-18T21:46:48.000Z | 2022-03-11T23:37:50.000Z | config/wsgi.py | ezequieljsosa/globinq | 9c777456d6ed582ab821d19e4dabbc25b474f390 | [
"MIT"
] | null | null | null | """
WSGI config for globinq project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | 42.1 | 79 | 0.796912 |
d00445b28886d3cf0ed834f7884a051554da462e | 134,774 | py | Python | pycaret/nlp.py | Kazuyuki-Kawabata/pycaret | 3e402df6c92e2935af50ac780cf9fe6cd95490b2 | [
"MIT"
] | null | null | null | pycaret/nlp.py | Kazuyuki-Kawabata/pycaret | 3e402df6c92e2935af50ac780cf9fe6cd95490b2 | [
"MIT"
] | null | null | null | pycaret/nlp.py | Kazuyuki-Kawabata/pycaret | 3e402df6c92e2935af50ac780cf9fe6cd95490b2 | [
"MIT"
] | null | null | null | # Module: Natural Language Processing
# Author: Moez Ali <moez.ali@queensu.ca>
# License: MIT
# Release: PyCaret 2.2.0
# Last modified : 25/10/2020
def setup(
data,
target=None,
custom_stopwords=None,
html=True,
session_id=None,
log_experiment=False,
experiment_name=None,
log_plots=Fal... | 28.596223 | 202 | 0.525836 |
3901025b6cc9ea9a4d457b2b7626134f5be0ea59 | 2,496 | py | Python | statsmodels/examples/try_power.py | Thinh127/Statics_Python | c25f7f18bd869d739eeb4f87e70f9a797c7abc2b | [
"BSD-3-Clause"
] | 10 | 2016-05-18T11:46:33.000Z | 2018-12-23T04:52:27.000Z | statsmodels/examples/try_power.py | AnaMP/statsmodels | 2d4aad9a14619ce0c84d4c7bca9dacd66b2be566 | [
"BSD-3-Clause"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | statsmodels/examples/try_power.py | AnaMP/statsmodels | 2d4aad9a14619ce0c84d4c7bca9dacd66b2be566 | [
"BSD-3-Clause"
] | 3 | 2015-04-01T08:26:54.000Z | 2020-02-14T14:34:10.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 02 14:38:17 2013
Author: Josef Perktold
"""
import numpy as np
import statsmodels.stats.power as smp
import statsmodels.stats.proportion as smpr
sigma=1; d=0.3; nobs=80; alpha=0.05
print smp.normal_power(d, nobs/2, 0.05)
print smp.NormalIndPower().power(d, nobs, 0.05)... | 36.173913 | 94 | 0.739583 |
78c6a18839f655ae95137c2b2af25b44a57ccd11 | 175,243 | py | Python | awx/api/views/__init__.py | withshubh/awx | 38f3176221fe6981f38931d050705b736ea89fdc | [
"Apache-2.0"
] | null | null | null | awx/api/views/__init__.py | withshubh/awx | 38f3176221fe6981f38931d050705b736ea89fdc | [
"Apache-2.0"
] | null | null | null | awx/api/views/__init__.py | withshubh/awx | 38f3176221fe6981f38931d050705b736ea89fdc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import dateutil
import functools
import html
import logging
import re
import requests
import socket
import sys
import time
from base64 import b64encode
from collections import OrderedDict
from urllib3.exceptions import ConnectTimeoutError
# Django
f... | 38.195946 | 160 | 0.686515 |
6eab12c1be06fb025bd448c19aa0c092fbb733c5 | 188 | py | Python | 100-Exercicios/ex021.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex021.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | 100-Exercicios/ex021.py | thedennerdev/ExerciciosPython-Iniciante | de36c4a09700353a9a1daa7f1320e416c6201a5c | [
"MIT"
] | null | null | null | #Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3.
import pygame
pygame.init()
pygame.mixer.music.load('ex021.mp3')
pygame.mixer.music.play()
pygame.event.wait()
| 23.5 | 75 | 0.765957 |
35776b5bf6b9ca36de1cbd0f9db91e6ed1a62069 | 660 | py | Python | examples/play_webcam.py | svohara/pyvision3 | cc0082897358bd2a8b29306c9d50ff6d2c118ead | [
"MIT"
] | 2 | 2016-12-14T20:44:17.000Z | 2018-02-09T04:11:11.000Z | examples/play_webcam.py | svohara/pyvision3 | cc0082897358bd2a8b29306c9d50ff6d2c118ead | [
"MIT"
] | 4 | 2020-04-16T02:38:16.000Z | 2020-04-28T03:25:39.000Z | examples/play_webcam.py | svohara/pyvision3 | cc0082897358bd2a8b29306c9d50ff6d2c118ead | [
"MIT"
] | 1 | 2017-01-14T16:04:36.000Z | 2017-01-14T16:04:36.000Z | """
Created on Dec 26, 2015
@author: sohara
"""
import pyvision3 as pv3
def play_webcam(cam_num=0):
vid = pv3.Video(cam_num)
vid.play(delay=0) # start in a paused state
def play_sample_mov():
vid = pv3.Video(pv3.VID_PRIUS)
vid.play()
if __name__ == "__main__":
print("========================... | 25.384615 | 78 | 0.533333 |
93a546f190d442bff3da00fde5143aae409541e6 | 3,339 | py | Python | lib/util.py | Taremin/TareminPoseChecker | e6a44e72a11649f04648a8fc84e23786b418118d | [
"MIT"
] | null | null | null | lib/util.py | Taremin/TareminPoseChecker | e6a44e72a11649f04648a8fc84e23786b418118d | [
"MIT"
] | null | null | null | lib/util.py | Taremin/TareminPoseChecker | e6a44e72a11649f04648a8fc84e23786b418118d | [
"MIT"
] | null | null | null | import bpy
import bmesh
import json
import os
from mathutils.bvhtree import BVHTree
path = os.path.join(os.path.dirname(__file__), "../resources.json")
resources = json.load(open(path, encoding="utf-8"))
def get_addon_name():
return __package__.split('.', 2)[0]
def get_pref(context):
return ... | 25.684615 | 82 | 0.671159 |
e09a61a29ee917ad05373c9a84b774c946c56b20 | 86,777 | py | Python | Packs/EWS/Integrations/EWSv2/EWSv2.py | turbodog/content | 39d2844f5e69e7a506c5b959163f70d0c655533a | [
"MIT"
] | null | null | null | Packs/EWS/Integrations/EWSv2/EWSv2.py | turbodog/content | 39d2844f5e69e7a506c5b959163f70d0c655533a | [
"MIT"
] | null | null | null | Packs/EWS/Integrations/EWSv2/EWSv2.py | turbodog/content | 39d2844f5e69e7a506c5b959163f70d0c655533a | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import sys
import traceback
import json
import os
import hashlib
from datetime import timedelta
from cStringIO import StringIO
import logging
import warnings
import subprocess
import email
from requests.exceptions import... | 39.55196 | 125 | 0.650138 |
f78f2334165664954da469ee3310af867ba98ee7 | 90 | py | Python | quflow/laplacian/__init__.py | klasmodin/quflow | cb283da9d799b96d15ee4763161c49b55d974788 | [
"MIT"
] | null | null | null | quflow/laplacian/__init__.py | klasmodin/quflow | cb283da9d799b96d15ee4763161c49b55d974788 | [
"MIT"
] | null | null | null | quflow/laplacian/__init__.py | klasmodin/quflow | cb283da9d799b96d15ee4763161c49b55d974788 | [
"MIT"
] | null | null | null | from .direct import *
from . import direct
from . import sparse
from . import tridiagonal
| 18 | 25 | 0.766667 |
91afc5d319358151c7d396d72e42ac38a68a5947 | 1,247 | py | Python | Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
pythiaHepMCVerbosity = cms.untracked.bool(False),
... | 46.185185 | 89 | 0.542903 |
e16ae5684f09767b7c2ff7965a842b0296fcea35 | 1,376 | py | Python | app/event/migrations/0016_auto_20160819_0239.py | Sovol2018/sovolo | 54250e42b4af3391d2f99690f45b93ab240563c2 | [
"MIT"
] | 2 | 2017-06-06T11:34:49.000Z | 2017-10-24T13:09:50.000Z | app/event/migrations/0016_auto_20160819_0239.py | Sovol2018/sovolo | 54250e42b4af3391d2f99690f45b93ab240563c2 | [
"MIT"
] | 346 | 2016-08-09T20:50:57.000Z | 2018-08-28T06:52:17.000Z | app/event/migrations/0016_auto_20160819_0239.py | hejob/sovolo | 8b73253d7bf0427c7ae0ebb6d8e3d70e118e8427 | [
"MIT"
] | 3 | 2017-11-27T14:07:57.000Z | 2018-08-13T15:51:01.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-18 17:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('event', '0015_auto_20160819_0220'),
]
operations = [
migrations.AlterField(
... | 65.52381 | 980 | 0.53125 |
a6e3e3236b4e8c3f106fa71d87e778c8abc8565d | 2,844 | py | Python | tests/test_local.py | chasemc/cblaster | fee315eddf9fdf893b265fb45fc1d3da06a39432 | [
"MIT"
] | 53 | 2020-04-04T14:47:56.000Z | 2022-03-23T20:41:56.000Z | tests/test_local.py | Po-Hao-Chen/cblaster | 8b6d97e0a5c94f11e791edbdb31a07cd5b085fa4 | [
"MIT"
] | 33 | 2020-11-10T01:36:35.000Z | 2022-03-21T18:25:16.000Z | tests/test_local.py | Po-Hao-Chen/cblaster | 8b6d97e0a5c94f11e791edbdb31a07cd5b085fa4 | [
"MIT"
] | 12 | 2020-10-14T07:39:38.000Z | 2022-03-21T18:15:23.000Z | #!/usr/bin/env python3
"""
Test suite for local.py
"""
import subprocess
import pytest
from pathlib import Path
from cblaster import local, helpers
TEST_DIR = Path(__file__).resolve().parent
def test_parse():
# length of QBE85648 == 179
result = [
# qid sid pid len mismatch gapopen qstart qend ... | 25.854545 | 84 | 0.574191 |
4a255adb0d22a5c6c111b79160de36c13bc0c557 | 671 | py | Python | planar_ising/sparse_lu/csr_matrix.py | ValeryTyumen/planar_ising | 5a1803487e1dd59c5d5e790cc949b7234bf52ac8 | [
"MIT"
] | 8 | 2019-05-02T20:27:21.000Z | 2020-11-01T20:41:38.000Z | planar_ising/sparse_lu/csr_matrix.py | ValeryTyumen/planar_ising | 5a1803487e1dd59c5d5e790cc949b7234bf52ac8 | [
"MIT"
] | 1 | 2019-09-03T18:15:53.000Z | 2019-09-06T16:41:12.000Z | planar_ising/sparse_lu/csr_matrix.py | ValeryTyumen/planar_ising | 5a1803487e1dd59c5d5e790cc949b7234bf52ac8 | [
"MIT"
] | 3 | 2019-08-11T23:08:58.000Z | 2022-03-19T09:09:50.000Z | class CSRMatrix:
def __init__(self, signs, logs, column_indices, row_first_element_indices):
self._signs = signs
self._logs = logs
self._column_indices = column_indices
self._row_first_element_indices = row_first_element_indices
@property
def signs(self):
return s... | 19.735294 | 79 | 0.673621 |
5320bff4dd88b7445708525ef47afe772ac8fc40 | 3,943 | py | Python | GUI.py | kritika-srivastava/Random-Password-Generator | ed683150fa0ba1860ef51e9caca4c1a82c91a63d | [
"MIT"
] | 2 | 2020-05-10T10:55:17.000Z | 2021-06-14T19:40:24.000Z | GUI.py | kritika-srivastava/Random-Password-Generator | ed683150fa0ba1860ef51e9caca4c1a82c91a63d | [
"MIT"
] | null | null | null | GUI.py | kritika-srivastava/Random-Password-Generator | ed683150fa0ba1860ef51e9caca4c1a82c91a63d | [
"MIT"
] | null | null | null | # Kritika Srivastava
# April 19, 2020
# Final GUI code
import sys
from PyQt5 import QtCore, QtGui, QtWidgets, uic
import random
import string
qtcreator_file = "MainWindow.ui" # Enter your .ui file here.
Ui_MainWindow, QtBaseClass = uic.loadUiType(qtcreator_file)
class MyWindow(QtWidgets.QMainWindow, Ui_MainWindo... | 33.991379 | 79 | 0.675628 |
a1b345d6e083f256f16ca9a05059a09f859dfc95 | 13,826 | py | Python | pytorch_rl/ksp_her/algorithm.py | jinPrelude/reinforcement_learning | 0b9980b6735dae2034cf346d32a56d5bef4675a4 | [
"MIT"
] | 4 | 2018-12-10T06:20:05.000Z | 2020-08-17T02:58:22.000Z | pytorch_rl/ksp_her/algorithm.py | jinPrelude/reinforcement_learning | 0b9980b6735dae2034cf346d32a56d5bef4675a4 | [
"MIT"
] | null | null | null | pytorch_rl/ksp_her/algorithm.py | jinPrelude/reinforcement_learning | 0b9980b6735dae2034cf346d32a56d5bef4675a4 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import os
from pytorch_rl import ounoise
class Net(nn.Module):
def __init__(self, state_space, action_space):
super(Net, self).__init__()
self.fc1 = nn.Linear(state_space, 50)
self.fc1.weight.data.normal_... | 42.411043 | 162 | 0.604803 |
174c03248c85d3fb27c755fbf8f75ef64f705aa3 | 5,573 | py | Python | video-colorization/deep-exemplar-based-video-colorization/colornet.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | 228 | 2017-11-20T06:05:56.000Z | 2022-03-23T12:40:05.000Z | video-colorization/deep-exemplar-based-video-colorization/colornet.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | 36 | 2018-01-11T23:26:20.000Z | 2022-03-12T00:53:38.000Z | video-colorization/deep-exemplar-based-video-colorization/colornet.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | 76 | 2017-11-22T22:00:00.000Z | 2022-03-28T05:58:57.000Z | # Copyright 2021 Sony Group Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 31.485876 | 79 | 0.574018 |
c047baf6a3a0fd77e138e4281f92461f46a05fb6 | 4,209 | py | Python | benchmark/startQiskit_Class1357.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class1357.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class1357.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=44
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,floor, sqrt, pi
import numpy as np
import networkx as ... | 31.886364 | 80 | 0.614635 |
4830764a103c96fcc201be934ae38df302f9c4e1 | 10,165 | py | Python | contrib/linearize/linearize-data.py | AlphaconTeam/AlphaconNetwork | c484de626f36c04ecf3f177807fe52ed8d7470c4 | [
"MIT"
] | 1 | 2019-11-18T12:15:51.000Z | 2019-11-18T12:15:51.000Z | contrib/linearize/linearize-data.py | AlphaconTeam/AlphaconNetwork | c484de626f36c04ecf3f177807fe52ed8d7470c4 | [
"MIT"
] | null | null | null | contrib/linearize/linearize-data.py | AlphaconTeam/AlphaconNetwork | c484de626f36c04ecf3f177807fe52ed8d7470c4 | [
"MIT"
] | 2 | 2019-06-17T14:47:21.000Z | 2021-01-16T07:25:13.000Z | #!/usr/bin/env python3
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Alphacon Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/license... | 31.373457 | 108 | 0.69395 |
cde0ad7a8e566b6b0d87521677ba7e96af393c9a | 37,558 | py | Python | apogee/modelspec/moog.py | jsobeck/APOGEE | 307a75d52e8ec0b0fdb1acbba8daeea4f979c67c | [
"BSD-3-Clause"
] | 41 | 2015-01-14T17:28:14.000Z | 2022-03-24T03:45:12.000Z | apogee/modelspec/moog.py | jsobeck/APOGEE | 307a75d52e8ec0b0fdb1acbba8daeea4f979c67c | [
"BSD-3-Clause"
] | 61 | 2015-03-02T02:41:25.000Z | 2022-03-25T12:19:49.000Z | apogee/modelspec/moog.py | jsobeck/APOGEE | 307a75d52e8ec0b0fdb1acbba8daeea4f979c67c | [
"BSD-3-Clause"
] | 35 | 2015-06-08T19:36:44.000Z | 2022-03-23T10:32:38.000Z | ###############################################################################
# apogee.modelspec.moog: functions to run MOOG with the APOGEE analysis
###############################################################################
import sys
import os, os.path
import shutil
import tempfile
import subprocess
import num... | 49.745695 | 347 | 0.597556 |
836deed1c9f51c480b91fb2e6cd50c0a3eaa18df | 4,627 | py | Python | benchmark/startQiskit1837.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1837.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1837.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=64
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,floor, sqrt, pi
import numpy as np
import networkx as ... | 32.584507 | 82 | 0.618327 |
d8fefeef7d9ec18b554811bf2050b86d8b3591ff | 1,157 | py | Python | maro/cli/utils/details_validity_wrapper.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 598 | 2020-09-23T00:50:22.000Z | 2022-03-31T08:12:54.000Z | maro/cli/utils/details_validity_wrapper.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 235 | 2020-09-22T10:20:48.000Z | 2022-03-31T02:10:03.000Z | maro/cli/utils/details_validity_wrapper.py | gx9702/maro | 38c796f0a7ed1e0f64c299d96c6e0df032401fa9 | [
"MIT"
] | 116 | 2020-09-22T09:19:04.000Z | 2022-02-12T05:04:07.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from functools import wraps
from maro.cli.utils.details_reader import DetailsReader
from maro.utils.exception.cli_exception import BadRequestError, ClusterInternalError
def check_details_validity(func):
@wraps(func)
def with_checker(*... | 31.27027 | 116 | 0.638721 |
512986d6c0c0fe64ce731b8580e035cf283a5186 | 73,886 | py | Python | src/transformers/trainer_backup.py | liususan091219/transformers | c88c3a65e2c2d3f0d891561482c6fb02d30d9b5f | [
"Apache-2.0"
] | null | null | null | src/transformers/trainer_backup.py | liususan091219/transformers | c88c3a65e2c2d3f0d891561482c6fb02d30d9b5f | [
"Apache-2.0"
] | null | null | null | src/transformers/trainer_backup.py | liususan091219/transformers | c88c3a65e2c2d3f0d891561482c6fb02d30d9b5f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 46.763291 | 188 | 0.648634 |
c8c577feaf2cfd5b0fb8f5dd61e1a12512ab55c8 | 3,369 | py | Python | google-cloud-sdk/lib/surface/compute/network_endpoint_groups/list.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/network_endpoint_groups/list.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | google-cloud-sdk/lib/surface/compute/network_endpoint_groups/list.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 32.708738 | 79 | 0.729593 |
d810ea76a1b6df32baf9842ebe72d3b417ab4cc4 | 13,227 | py | Python | v6.0.5/system/fortios_system_api_user.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 14 | 2018-09-25T20:35:25.000Z | 2021-07-14T04:30:54.000Z | v6.0.5/system/fortios_system_api_user.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 32 | 2018-10-09T04:13:42.000Z | 2020-05-11T07:20:28.000Z | v6.0.5/system/fortios_system_api_user.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 11 | 2018-10-09T00:14:53.000Z | 2021-11-03T10:54:09.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 31.719424 | 106 | 0.545022 |
80c2dca925513566effb640efa58e1b1dd254b4a | 21,939 | py | Python | electrum_audax/tests/test_blockchain.py | enkrypter/audax-polaris | 62a337bdf51c1276cd00a8b59f3ef61ff3b4b72b | [
"MIT"
] | null | null | null | electrum_audax/tests/test_blockchain.py | enkrypter/audax-polaris | 62a337bdf51c1276cd00a8b59f3ef61ff3b4b72b | [
"MIT"
] | null | null | null | electrum_audax/tests/test_blockchain.py | enkrypter/audax-polaris | 62a337bdf51c1276cd00a8b59f3ef61ff3b4b72b | [
"MIT"
] | 2 | 2019-10-08T06:52:54.000Z | 2019-10-24T03:33:20.000Z | import shutil
import tempfile
import os
from electrum_audax import constants, blockchain
from electrum_audax.simple_config import SimpleConfig
from electrum_audax.blockchain import Blockchain, deserialize_header, hash_header
from electrum_audax.util import bh2u, bfh, make_dir
from . import SequentialTestCase
class ... | 63.962099 | 219 | 0.732622 |
7c5607a81fe387d919d2b5ced02f537200a12c40 | 1,825 | py | Python | finmeter/semantics.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | 5 | 2019-10-06T20:13:32.000Z | 2021-11-07T14:27:02.000Z | finmeter/semantics.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | null | null | null | finmeter/semantics.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | null | null | null | from . import lwvlib
from mikatools import *
from sklearn import preprocessing
from sklearn.cluster import AffinityPropagation
import numpy as np
import itertools
from scipy import spatial
import statistics
w2v_model = lwvlib.load(script_path("data/fin-word2vec-lemma.bin"), 10000, 500000)
concrete = json_load(script... | 22.8125 | 82 | 0.672877 |
2124a42e17040043b64548503a871dfdbc6d170c | 3,850 | py | Python | JumpscaleLib/tools/storybot/Story.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | null | null | null | JumpscaleLib/tools/storybot/Story.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | 220 | 2018-07-29T08:37:17.000Z | 2019-08-05T15:01:27.000Z | JumpscaleLib/tools/storybot/Story.py | threefoldtech/jumpscale_lib9 | 03c1451133d777e5af106fcc6f75c1138bb997f2 | [
"Apache-2.0"
] | 1 | 2018-08-20T09:16:08.000Z | 2018-08-20T09:16:08.000Z | from .utils import _find_second, _parse_body, _check_broken_links
from jumpscale import j
class Story():
"""Represents a story
"""
LIST_TITLE = "Stories"
def __init__(self, title="", url="", description="", state="open", body="", update_func=None):
"""Constructor of a Story
Keyword... | 32.627119 | 98 | 0.572727 |
4acb70d959cb1964d4637644f09d4ef9f656850a | 11,783 | py | Python | RelationalGridWorldEnv.py | farukksubasi/Relational-Grid-World | d14ebaae8a03638e799c07aaded98527d932f58b | [
"MIT"
] | null | null | null | RelationalGridWorldEnv.py | farukksubasi/Relational-Grid-World | d14ebaae8a03638e799c07aaded98527d932f58b | [
"MIT"
] | null | null | null | RelationalGridWorldEnv.py | farukksubasi/Relational-Grid-World | d14ebaae8a03638e799c07aaded98527d932f58b | [
"MIT"
] | null | null | null | # Import Modules
import sys
import time
import os
import numpy as np
from gym.envs.toy_text import discrete
import pygame
# Define colors and import icons
dir_path = os.path.dirname(os.path.realpath(__file__))
white = (255,255,255)
black = (0,0,0)
pit_img = pygame.image.load(dir_path + '/icon/pit.png')
mountain_img ... | 36.821875 | 154 | 0.551218 |
a0cdb0f6390477da31f8c235e92ec614ae91e669 | 1,891 | py | Python | Rock-Paper-Scissors/rpsGame.py | adrianurdar/Automate-The-Boring-Stuff | 457684fc1b26b98279f42446058d594cb566b505 | [
"MIT"
] | 1 | 2020-11-18T13:14:40.000Z | 2020-11-18T13:14:40.000Z | Rock-Paper-Scissors/rpsGame.py | adrianurdar/Automate-The-Boring-Stuff | 457684fc1b26b98279f42446058d594cb566b505 | [
"MIT"
] | null | null | null | Rock-Paper-Scissors/rpsGame.py | adrianurdar/Automate-The-Boring-Stuff | 457684fc1b26b98279f42446058d594cb566b505 | [
"MIT"
] | null | null | null | import random, sys
print("Welcome to ROCK, PAPER, SCISSORS!")
# Keep track of the wins, losses and ties
wins = 0
losses = 0
ties = 0
# The main game loop
while True:
print("%s Wins, %s Ties, %s Losses" %(wins, ties, losses))
# The player input loop
while True:
print("Enter your move: (r)ock... | 26.633803 | 74 | 0.507139 |
201c7b1e901031077bf54bda47b9019b813f23d4 | 526 | py | Python | tree/0129_sum_root_to_leaf_numbers/0129_sum_root_to_leaf_numbers.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 6 | 2019-09-16T01:50:44.000Z | 2020-09-17T08:52:25.000Z | tree/0129_sum_root_to_leaf_numbers/0129_sum_root_to_leaf_numbers.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | null | null | null | tree/0129_sum_root_to_leaf_numbers/0129_sum_root_to_leaf_numbers.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 4 | 2020-02-07T12:43:16.000Z | 2021-04-11T06:38:55.000Z | class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def sumNumbers(self, root):
return self.sumNumbersRecu(root, 0)
def sumNumbersRecu(self, root, num):
if root is None:
return 0
... | 30.941176 | 121 | 0.606464 |
304c2ac7f729826d153e5f10fb307d85a3351a9d | 1,149 | py | Python | tests/core/test_literal.py | Tiqets/tonalite | c4c4d362dc91e96ecb8e891ab0551c2eb337dcda | [
"MIT"
] | null | null | null | tests/core/test_literal.py | Tiqets/tonalite | c4c4d362dc91e96ecb8e891ab0551c2eb337dcda | [
"MIT"
] | null | null | null | tests/core/test_literal.py | Tiqets/tonalite | c4c4d362dc91e96ecb8e891ab0551c2eb337dcda | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Optional
import pytest
from tonalite import from_dict
from tonalite.exceptions import WrongTypeError
from tests.common import literal_support
@literal_support
def test_from_dict_with_literal():
from typing import Literal
@dataclass
class X:
l... | 19.15 | 57 | 0.677111 |
17f66cf22761bb72376fead87b428d21c9fb349e | 629 | py | Python | similarityPy/measure/similarity_measure_type.py | cenkbircanoglu/clustering | 0a97fbf43e58e65e8d9eed30eecff00bcd47f093 | [
"MIT"
] | 23 | 2015-01-21T01:39:11.000Z | 2019-08-27T09:43:39.000Z | similarityPy/measure/similarity_measure_type.py | cenkbircanoglu/clustering | 0a97fbf43e58e65e8d9eed30eecff00bcd47f093 | [
"MIT"
] | 1 | 2015-01-18T08:52:30.000Z | 2015-01-18T08:52:30.000Z | similarityPy/measure/similarity_measure_type.py | cenkbircanoglu/clustering | 0a97fbf43e58e65e8d9eed30eecff00bcd47f093 | [
"MIT"
] | 6 | 2015-03-23T16:58:18.000Z | 2019-03-12T06:31:56.000Z | # coding=utf-8
"""
Created on 18 January 2014
@author: Cenk Bircanoglu
"""
from enum import Enum
DISSIMILARITY_ABBR = 0
DISTANCE_ABBR = 1
SIMILARITY_RATIO_ABBR = 2
DISSIMILARITY_RATIO_ABBR = 3
DISTANCE_RATIO_ABBR = 4
DISSIMILARITY = "dissimilarity"
DISTANCE = "distance"
SIMILARITY_RATIO = "similarity_ratio"
DISTANCE_... | 24.192308 | 49 | 0.801272 |
c78237f50d2841ffbe94cbe9d4a353efc2e92883 | 7,584 | py | Python | lab-notebook/smunukutla/2019-07-14-SAM - Raw Data 1D CNN.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | lab-notebook/smunukutla/2019-07-14-SAM - Raw Data 1D CNN.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | lab-notebook/smunukutla/2019-07-14-SAM - Raw Data 1D CNN.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[8]:
# environment set up
import tensorflow as tf
import tensorflow.keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Reshape, Conv1D, MaxPooling1D, Flatten, Dense, Dropout
from tensorflow.keras.utils import to_categorical
import numpy ... | 23.92429 | 160 | 0.682094 |
091a8333c1fe8f0eee01877f3db44af48ac5984c | 3,969 | py | Python | lab-notebook/kchu/2019-01-22-KTC-initial_ICA_exploration.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | lab-notebook/kchu/2019-01-22-KTC-initial_ICA_exploration.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | lab-notebook/kchu/2019-01-22-KTC-initial_ICA_exploration.py | velexi-corporation/spectra-ml | 10fab9e72437e79b6f7ff5ae4b9592bc7c48f10d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# ## 2019-01-22: Initial ICA Exploration
#
# ### Authors
# * Kevin Chu (kevin@velexi.com)
#
# ### Notes
#
# * In theory, ICA should "learn" spectra features that are common across multiple materials. Projection of a new spectra onto these "component spectra" could be used to co... | 24.20122 | 243 | 0.71101 |
31f2865534429cd119a3654950a8cb01093e5ae4 | 2,098 | py | Python | src/server/oasisapi/auth/serializers.py | macabuag/OasisPlatform_GLP | dd0f856c58a4eee563195c68cc764b4dc5d8de13 | [
"BSD-3-Clause"
] | 36 | 2018-07-23T02:05:03.000Z | 2021-08-06T23:08:32.000Z | src/server/oasisapi/auth/serializers.py | macabuag/OasisPlatform_GLP | dd0f856c58a4eee563195c68cc764b4dc5d8de13 | [
"BSD-3-Clause"
] | 399 | 2018-10-01T09:10:34.000Z | 2022-03-22T16:41:25.000Z | src/server/oasisapi/auth/serializers.py | macabuag/OasisPlatform_GLP | dd0f856c58a4eee563195c68cc764b4dc5d8de13 | [
"BSD-3-Clause"
] | 17 | 2018-08-01T08:48:00.000Z | 2021-12-09T04:52:08.000Z | from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from rest_framework_simplejwt import settings as jwt_settings
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer as BaseTokenObtainPairSerializer
fr... | 38.145455 | 107 | 0.714967 |
2d55c9c9f7313b0a9fb7cdefa4e31f0a28b60bc8 | 395 | py | Python | tfnlu/parser/get_tags.py | ishine/tfnlu | 73d567a5f07845a70bc13da63e6ad7b9eefe837e | [
"MIT"
] | 1 | 2021-03-22T03:51:18.000Z | 2021-03-22T03:51:18.000Z | tfnlu/parser/get_tags.py | ishine/tfnlu | 73d567a5f07845a70bc13da63e6ad7b9eefe837e | [
"MIT"
] | null | null | null | tfnlu/parser/get_tags.py | ishine/tfnlu | 73d567a5f07845a70bc13da63e6ad7b9eefe837e | [
"MIT"
] | 3 | 2020-09-08T14:45:48.000Z | 2021-05-14T13:45:51.000Z | from collections import Counter
from tqdm import tqdm
def get_tags(y):
tokens = Counter()
for mat in tqdm(y):
for line in mat:
tokens.update(line)
word_index = {'': 0}
for k in tokens.keys():
if k not in word_index:
word_index[k] = len(word_index)
index_word... | 24.6875 | 54 | 0.610127 |
725777de1cc969c5cd7e8292d04025cd8bb66f12 | 28,040 | py | Python | keystoneclient/tests/test_discovery.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/tests/test_discovery.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/tests/test_discovery.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 36.415584 | 79 | 0.577675 |
259839874cc4ab928c127763e698ae2b93779bb6 | 386 | py | Python | aliyun/api/rest/Slb20140515SetLoadBalancerStatusRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | aliyun/api/rest/Slb20140515SetLoadBalancerStatusRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | aliyun/api/rest/Slb20140515SetLoadBalancerStatusRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2015.01.26
'''
from aliyun.api.base import RestApi
class Slb20140515SetLoadBalancerStatusRequest(RestApi):
def __init__(self,domain='slb.aliyuncs.com',port=80):
RestApi.__init__(self,domain, port)
self.LoadBalancerId = None
self.LoadBalancerStatus = None
def getapiname(self... | 29.692308 | 61 | 0.756477 |
cff6a145753524468608a0e7afe71c225a346064 | 2,270 | py | Python | Twitter_Sentiment_Analysis.py | Hiteshsaai/NLP | 1f4dcd2bb574ebc1059e5e0098f7f7780d12eda1 | [
"MIT"
] | null | null | null | Twitter_Sentiment_Analysis.py | Hiteshsaai/NLP | 1f4dcd2bb574ebc1059e5e0098f7f7780d12eda1 | [
"MIT"
] | null | null | null | Twitter_Sentiment_Analysis.py | Hiteshsaai/NLP | 1f4dcd2bb574ebc1059e5e0098f7f7780d12eda1 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
# Twitter sentiment analysis
# In[2]:
import tweepy
import re
import pickle
from tweepy import OAuthHandler
consumer_key = "your key"
consumer_secret = "your key"
access_token = "your key"
access_secret = "your key"
# In[ ]:
auth = OAuthHandler(consumer_key,consumer_secret)
a... | 21.619048 | 119 | 0.618502 |
354e05f4d2869775b0a454af69ea4515bc9ee5f1 | 2,706 | py | Python | jacket/api/compute/openstack/compute/schemas/scheduler_hints.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/api/compute/openstack/compute/schemas/scheduler_hints.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/api/compute/openstack/compute/schemas/scheduler_hints.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | 2 | 2016-08-10T02:21:49.000Z | 2020-07-24T01:57:21.000Z | # Copyright 2014 NEC 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 ... | 34.253165 | 78 | 0.55728 |
e67b0bdc9bdab418bc65971b8b693ca312dc22b5 | 994 | py | Python | marionette_tg/plugins/_io.py | kpdyer/marionette | bb40a334a18c82728eec01c9b56330bcb91a28da | [
"Apache-2.0"
] | 73 | 2015-05-22T20:07:32.000Z | 2015-11-12T15:09:00.000Z | marionette_tg/plugins/_io.py | kpdyer/marionette | bb40a334a18c82728eec01c9b56330bcb91a28da | [
"Apache-2.0"
] | 20 | 2015-04-14T03:40:41.000Z | 2015-10-02T00:57:28.000Z | marionette_tg/plugins/_io.py | kpdyer/marionette | bb40a334a18c82728eec01c9b56330bcb91a28da | [
"Apache-2.0"
] | 14 | 2015-04-29T18:10:42.000Z | 2015-11-03T00:36:29.000Z | #!/usr/bin/env python
# coding: utf-8
import socket
import string
def puts(channel, marionette_state, input_args, blocking=True):
if (not channel):
return False
msg = input_args[0]
msg_len = len(msg)
while len(msg) > 0:
try:
bytes_sent = channel.send(msg)
msg ... | 19.88 | 63 | 0.578471 |
bf590f3cac11dbeeb4bf6c230b74c84ef4cf389a | 19,523 | py | Python | heliospheric_imager_analysis/images.py | LukeBarnard/heliospheric_imager_analysis | 15396b1a02b5127308e3844db1999e02eace337f | [
"MIT"
] | 3 | 2019-10-12T11:15:57.000Z | 2020-04-28T09:30:05.000Z | heliospheric_imager_analysis/images.py | LukeBarnard/heliospheric_imager_analysis | 15396b1a02b5127308e3844db1999e02eace337f | [
"MIT"
] | null | null | null | heliospheric_imager_analysis/images.py | LukeBarnard/heliospheric_imager_analysis | 15396b1a02b5127308e3844db1999e02eace337f | [
"MIT"
] | null | null | null | import glob
import os
import numpy as np
import pandas as pd
import scipy.interpolate as interp
import scipy.ndimage as ndimage
import scipy.signal as signal
import sunpy.map as smap
import sunpy.image.coalignment as coalign
import astropy.units as u
def __find_hi_data_path__():
"""
Function to load in... | 43.192478 | 120 | 0.663013 |
8abad8f8ee990abfa417f124f1a99251ae7003f8 | 3,809 | py | Python | stackwhy/stack_why.py | cariad/stackwhy | 5d5f0764ab86740fbbc3ae25170d149b388b949c | [
"MIT"
] | null | null | null | stackwhy/stack_why.py | cariad/stackwhy | 5d5f0764ab86740fbbc3ae25170d149b388b949c | [
"MIT"
] | 4 | 2021-10-31T15:52:31.000Z | 2021-11-01T13:06:27.000Z | stackwhy/stack_why.py | cariad/stackwhy | 5d5f0764ab86740fbbc3ae25170d149b388b949c | [
"MIT"
] | null | null | null | from functools import cached_property
from sys import stdout
from textwrap import wrap
from typing import IO, Callable, List, Optional
from ansiscape import bright_green, bright_red, bright_yellow, heavy
from ansiscape.types import SequencePart, SequenceType
from boto3.session import Session
from tabulate import tabul... | 30.472 | 85 | 0.570228 |
8d5c5d28200c3b7cb51f22ac65bd22e6c422dab1 | 307 | py | Python | src/blackjack/result.py | adamivora/blackjack-runner | 9049618abfab2abe02c710116a699912fd89265f | [
"MIT"
] | null | null | null | src/blackjack/result.py | adamivora/blackjack-runner | 9049618abfab2abe02c710116a699912fd89265f | [
"MIT"
] | null | null | null | src/blackjack/result.py | adamivora/blackjack-runner | 9049618abfab2abe02c710116a699912fd89265f | [
"MIT"
] | null | null | null | class Result:
def __init__(self,
player, player_score, dealer_score, bet, balance, result):
self.player = player
self.player_score = player_score
self.dealer_score = dealer_score
self.bet = bet
self.balance = balance
self.result = result
| 30.7 | 75 | 0.612378 |
0d71e2bb93ee7c5c0d27cc28f4a9cb2eb4afa483 | 1,608 | py | Python | application.py | Leezhonglin/flask-socketio | f14d6e5337b29ea5a8ced24f15401adf30b324c9 | [
"Apache-2.0"
] | 3 | 2021-01-28T14:05:43.000Z | 2021-09-27T06:21:47.000Z | application.py | Leezhonglin/flask-socketio | f14d6e5337b29ea5a8ced24f15401adf30b324c9 | [
"Apache-2.0"
] | null | null | null | application.py | Leezhonglin/flask-socketio | f14d6e5337b29ea5a8ced24f15401adf30b324c9 | [
"Apache-2.0"
] | 1 | 2021-04-07T13:21:14.000Z | 2021-04-07T13:21:14.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*
"""
******************************************************************************
* Copyright (C) 2020~2021 lzl
* 版权所有。
******************************************************************************
@file_name: application.py
@author:lzl
@create date: 下午8:50
@description:
@u... | 22.647887 | 78 | 0.591418 |
1dd34635fbdaada4d668c21c0f3d656fdfbcb01c | 789 | py | Python | example_project/yawdtrans_demo/models.py | Varun11940/yawd-translations | 3b4bd84cfe451ce43beb94507dfcdbf61bd1686f | [
"BSD-3-Clause"
] | 2 | 2017-02-21T16:21:45.000Z | 2019-04-02T05:42:12.000Z | example_project/yawdtrans_demo/models.py | Varun11940/yawd-translations | 3b4bd84cfe451ce43beb94507dfcdbf61bd1686f | [
"BSD-3-Clause"
] | 4 | 2020-09-30T20:15:51.000Z | 2020-10-17T05:24:34.000Z | example_project/yawdtrans_demo/models.py | Varun11940/yawd-translations | 3b4bd84cfe451ce43beb94507dfcdbf61bd1686f | [
"BSD-3-Clause"
] | 80 | 2020-09-30T12:40:07.000Z | 2020-10-02T09:52:51.000Z | from django.db import models
from translations.models import Translatable, Translation
class MultilingualPage(Translatable):
#this field will be available "as is" in all languages
slug = models.SlugField(max_length=100)
@models.permalink
def get_absolute_url(self):
return ('multilingual-pa... | 35.863636 | 75 | 0.735108 |
137e3030c9e3ef0fe5208c4b27deb8a0b372c5b9 | 473 | py | Python | data/scripts/templates/object/tangible/ship/attachment/engine/shared_blacksun_heavy_engine_s02.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/ship/attachment/engine/shared_blacksun_heavy_engine_s02.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/ship/attachment/engine/shared_blacksun_heavy_engine_s02.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/attachment/engine/shared_blacksun_heavy_engine_s02.iff"
result... | 27.823529 | 96 | 0.739958 |
d7ca07d2b7427ad95762bbf36aa92a77e9013ef9 | 21,004 | py | Python | python/orca/src/bigdl/orca/data/shard.py | Django-Jiang/BigDL | 542c0e18f93eaafa571613fd5951278ddaf5446d | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/data/shard.py | Django-Jiang/BigDL | 542c0e18f93eaafa571613fd5951278ddaf5446d | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/data/shard.py | Django-Jiang/BigDL | 542c0e18f93eaafa571613fd5951278ddaf5446d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 ... | 38.119782 | 100 | 0.559655 |
523605e96a83b39cbbace3452bcbf8054c325e75 | 1,464 | py | Python | scripts/dept_to_json.py | lanig35/couchdb | e11e390a09fa2001ba4acb831c834f5cd734fecd | [
"MIT"
] | null | null | null | scripts/dept_to_json.py | lanig35/couchdb | e11e390a09fa2001ba4acb831c834f5cd734fecd | [
"MIT"
] | null | null | null | scripts/dept_to_json.py | lanig35/couchdb | e11e390a09fa2001ba4acb831c834f5cd734fecd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import csv, json
from slugify import slugify
depts = []
with open ("../dataset/departements-francais.csv","r",encoding="utf-8") as f:
data = csv.DictReader (f)
for row in data:
print (row["Nom"])
dept = {}
dept["nom"] = row ["Nom"]
dept["slug"] = slugify (... | 36.6 | 77 | 0.494536 |
f7da228bc183004e129b70bbd33a3b36dce34bb3 | 830 | py | Python | celeryDj/urls.py | tek-shinobi/celeryDj | 38038838cf0ac2335b77949216039497325df81c | [
"MIT"
] | null | null | null | celeryDj/urls.py | tek-shinobi/celeryDj | 38038838cf0ac2335b77949216039497325df81c | [
"MIT"
] | 5 | 2021-03-19T01:04:14.000Z | 2021-09-22T18:49:24.000Z | celeryDj/urls.py | tek-shinobi/celeryDj | 38038838cf0ac2335b77949216039497325df81c | [
"MIT"
] | null | null | null | """celeryDj URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 34.583333 | 77 | 0.715663 |
a2abe50f0373f0793aa795b25893e76e11313d07 | 413 | py | Python | games/models/home_lists.py | JeffersonBC/eshop-index-back | 66a11ad2ee86b9cd4dd49bcb34f676db3281153b | [
"MIT"
] | null | null | null | games/models/home_lists.py | JeffersonBC/eshop-index-back | 66a11ad2ee86b9cd4dd49bcb34f676db3281153b | [
"MIT"
] | null | null | null | games/models/home_lists.py | JeffersonBC/eshop-index-back | 66a11ad2ee86b9cd4dd49bcb34f676db3281153b | [
"MIT"
] | null | null | null | from django.db import models
class SwitchGameListSlot(models.Model):
order = models.IntegerField(default=0)
class SwitchGameList(models.Model):
title = models.CharField(max_length=128)
query_json = models.CharField(max_length=256)
logged_list = models.BooleanField(default=False)
frequency = mode... | 29.5 | 74 | 0.769976 |
5b04c582cb9ab13e8a07e9af9d8251ec378c8f27 | 11,642 | py | Python | tests/utils/image_builder.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | null | null | null | tests/utils/image_builder.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | null | null | null | tests/utils/image_builder.py | zkanda/scalyr-agent-2 | 81bde110337b5e7dc5045f26097b721e1ff4ebae | [
"Apache-2.0"
] | 1 | 2015-07-29T00:00:10.000Z | 2015-07-29T00:00:10.000Z | # Copyright 2014-2020 Scalyr 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 to in writin... | 35.711656 | 125 | 0.629102 |
3959f356d00dc90c078873f5c3c28ea32d7664ab | 56,408 | py | Python | tensorflow/python/ops/math_grad.py | hanton/tensorflow | 34fd2a5e9bcdb40957ece90fec46a37e6e9248b2 | [
"Apache-2.0"
] | 3 | 2017-11-09T17:40:28.000Z | 2021-11-17T10:24:19.000Z | tensorflow/python/ops/math_grad.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/math_grad.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | # 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... | 34.54256 | 81 | 0.68547 |
1f54cea0d78b78d527162b15a276da5c2e9fe058 | 47,973 | py | Python | imgaug/augmenters/blur.py | CrazyVertigo/imgaug | bc8c9e430738e7ae17054d6e10f29a7f5404cef4 | [
"MIT"
] | 1 | 2019-11-29T02:20:52.000Z | 2019-11-29T02:20:52.000Z | imgaug/augmenters/blur.py | CrazyVertigo/imgaug | bc8c9e430738e7ae17054d6e10f29a7f5404cef4 | [
"MIT"
] | null | null | null | imgaug/augmenters/blur.py | CrazyVertigo/imgaug | bc8c9e430738e7ae17054d6e10f29a7f5404cef4 | [
"MIT"
] | null | null | null | """
Augmenters that blur images.
Do not import directly from this file, as the categorization is not final.
Use instead ::
from imgaug import augmenters as iaa
and then e.g. ::
seq = iaa.Sequential([
iaa.GaussianBlur((0.0, 3.0)),
iaa.AverageBlur((2, 5))
])
List of augmenters:
* Gau... | 40.586294 | 187 | 0.572155 |
c5f772d1313dcf78308068b325c4d39b4665a3ad | 2,376 | py | Python | src/parse.py | Kioryu/coo-and-gurgle | 1a9fefef48098764ef98863134c2312b5f808c0f | [
"MIT"
] | null | null | null | src/parse.py | Kioryu/coo-and-gurgle | 1a9fefef48098764ef98863134c2312b5f808c0f | [
"MIT"
] | null | null | null | src/parse.py | Kioryu/coo-and-gurgle | 1a9fefef48098764ef98863134c2312b5f808c0f | [
"MIT"
] | null | null | null | class AST(object):
pass
class BinOp(AST):
def __init__(self, left, op, right):
self.left = left
self.token = self.op = op
self.right = right
class Num(AST):
def __init__(self, token):
self.token = token
self.value = token.value
class Exit(AST):
def __init__(... | 30.857143 | 119 | 0.608586 |
c21286c30b0d81e466caad06641be5f4b8ce5bc0 | 1,163 | py | Python | chrome/common/extensions/docs/server2/manifest_features_test.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | chrome/common/extensions/docs/server2/manifest_features_test.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | chrome/common/extensions/docs/server2/manifest_features_test.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2013 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.
import unittest
from manifest_features import ConvertDottedKeysToNested
class ManifestFeaturesTest(unittest.TestCase):
def testConv... | 20.767857 | 72 | 0.487532 |
8d44889a590fcdaed08f61c0616641db347d4d5f | 1,427 | py | Python | tests/plans/cassandra/bootcassnode.py | buzztroll/cloudinit.d | 9fcc7c489b646e76f2b7360c0d807dae88d9cc0f | [
"Apache-2.0"
] | null | null | null | tests/plans/cassandra/bootcassnode.py | buzztroll/cloudinit.d | 9fcc7c489b646e76f2b7360c0d807dae88d9cc0f | [
"Apache-2.0"
] | null | null | null | tests/plans/cassandra/bootcassnode.py | buzztroll/cloudinit.d | 9fcc7c489b646e76f2b7360c0d807dae88d9cc0f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import getpass
import tempfile
try:
import simplejson as json
except:
import json
f = open("bootconf.json", "r")
vals_dict = json.load(f)
f.close()
print vals_dict
print vals_dict['myip']
myip = vals_dict['myip']
seed1 = vals_dict['seed1']
seed2 = vals_dict['seed2']... | 23.783333 | 107 | 0.605466 |
d15b95391baaffe339fbb2bfec7cc9ad2af49c7b | 126 | py | Python | tests/settings/__init__.py | barakaVictor/django-gamma-cloudinary | 598af46844ca7b2de3cc832cb0d8dd3f9742e625 | [
"BSD-3-Clause"
] | 1 | 2022-03-13T13:44:19.000Z | 2022-03-13T13:44:19.000Z | tests/settings/__init__.py | barakaVictor/django-gamma-cloudinary | 598af46844ca7b2de3cc832cb0d8dd3f9742e625 | [
"BSD-3-Clause"
] | 4 | 2021-09-22T11:44:24.000Z | 2022-01-13T11:06:54.000Z | tests/settings/__init__.py | barakaVictor/django-gamma-cloudinary | 598af46844ca7b2de3cc832cb0d8dd3f9742e625 | [
"BSD-3-Clause"
] | null | null | null | try:
#from tests.settings.development import *
from tests.settings.staging import *
except Exception as e:
raise e | 25.2 | 45 | 0.722222 |
91c740fbfe25e487a313eab9bfce835762957e94 | 1,206 | py | Python | api/tests.py | kkampardi/TodoLIst | d5b03c7b163b61ac8ef613553817e698573a613f | [
"MIT"
] | 2 | 2017-03-30T00:42:17.000Z | 2018-12-04T13:39:41.000Z | api/tests.py | kkampardi/TodoLIst | d5b03c7b163b61ac8ef613553817e698573a613f | [
"MIT"
] | null | null | null | api/tests.py | kkampardi/TodoLIst | d5b03c7b163b61ac8ef613553817e698573a613f | [
"MIT"
] | null | null | null | from django.test import TestCase
# test views imports
from rest_framework.test import APIClient
from rest_framework import status
from django.core.urlresolvers import reverse
from .models import TodoList
# Create your tests here.
class ModelTestCase(TestCase):
# lets define a test suit for the todolist model
... | 30.15 | 76 | 0.702322 |
7d2a1bd3fe3dd43382e19be4c46c447bd1f9ab73 | 11,914 | py | Python | lib/spack/spack/test/concretize_preferences.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-07-03T22:53:51.000Z | 2021-07-03T22:53:51.000Z | lib/spack/spack/test/concretize_preferences.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-03-23T17:08:14.000Z | 2021-04-01T17:18:22.000Z | lib/spack/spack/test/concretize_preferences.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-01-10T18:54:54.000Z | 2021-07-03T22:57:16.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import pytest
import stat
import spack.package_prefs
import spack.repo
import spack.util.spack_yaml as syaml
from spack.c... | 32.820937 | 79 | 0.650411 |
adc0b715f2a752e79a4ef4f91ed1a3d06933be30 | 31,016 | py | Python | trickortreat/trickortreat.py | sourcery-ai-bot/aikaterna-cogs | 75c84f53d5a3a1aa91564fef87cc8d5e67887707 | [
"Apache-2.0"
] | null | null | null | trickortreat/trickortreat.py | sourcery-ai-bot/aikaterna-cogs | 75c84f53d5a3a1aa91564fef87cc8d5e67887707 | [
"Apache-2.0"
] | 1 | 2021-04-11T09:53:32.000Z | 2021-04-11T09:53:32.000Z | trickortreat/trickortreat.py | sourcery-ai-bot/aikaterna-cogs | 75c84f53d5a3a1aa91564fef87cc8d5e67887707 | [
"Apache-2.0"
] | null | null | null | import asyncio
import datetime
from typing import Literal, Optional
import discord
import random
import math
from redbot.core import commands, checks, Config, bank
from redbot.core.utils.chat_formatting import box, pagify, humanize_number
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
__version__ = "0.1.3... | 48.99842 | 266 | 0.58947 |
6a883ebb3e84ec632073f4c4725b3658c5760c26 | 5,862 | py | Python | mztab_m_swagger_client/models/cv.py | lifs-tools/pymzTab-m | 4d5f0c2370a24a70f15e430c8b3edbf4f26f2f2e | [
"MIT"
] | 4 | 2019-06-12T14:00:42.000Z | 2022-02-01T02:46:02.000Z | mztab_m_swagger_client/models/cv.py | lifs-tools/pymzTab-m | 4d5f0c2370a24a70f15e430c8b3edbf4f26f2f2e | [
"MIT"
] | 3 | 2020-08-17T07:25:15.000Z | 2022-02-04T18:50:20.000Z | mztab_m_swagger_client/models/cv.py | lifs-tools/pymzTab-m | 4d5f0c2370a24a70f15e430c8b3edbf4f26f2f2e | [
"MIT"
] | 2 | 2019-06-12T14:00:49.000Z | 2020-08-19T14:57:43.000Z | # coding: utf-8
"""
mzTab-M reference implementation and validation API.
This is the mzTab-M reference implementation and validation API service. # noqa: E501
OpenAPI spec version: 2.0.0
Contact: nils.hoffmann@isas.de
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import ... | 27.521127 | 99 | 0.552542 |
bc0db760cfc84cbc0e3584eb3afce3d1a780a5ba | 360 | py | Python | src/userservice/userservice/__init__.py | robbdimitrov/thoughts | 5b497fb267c0f829ac502248fb59edfd4482339c | [
"MIT"
] | 6 | 2019-05-04T12:34:51.000Z | 2020-02-15T06:08:00.000Z | src/userservice/userservice/__init__.py | robbdimitrov/thoughts | 5b497fb267c0f829ac502248fb59edfd4482339c | [
"MIT"
] | 23 | 2019-10-06T11:11:43.000Z | 2021-03-29T18:25:23.000Z | src/userservice/userservice/__init__.py | robbdimitrov/thoughts | 5b497fb267c0f829ac502248fb59edfd4482339c | [
"MIT"
] | 1 | 2019-05-29T06:30:17.000Z | 2019-05-29T06:30:17.000Z | import os
from flask import Flask
from userservice import db, user, follow
def create_app():
app = Flask(__name__)
app.config['DATABASE_URI'] = os.getenv('DATABASE_URI')
# Register the database client
db.init_app(app)
# Register the api routes
app.register_blueprint(user.bp)
app.regist... | 18 | 58 | 0.705556 |
c0575b5354d5fc08ccec4ec3743e8b99bce6db2b | 6,410 | py | Python | core/manage.py | bdotdub/norc | ccc51a9889b0d0b640e8f9300aa8bebd3e98e65d | [
"BSD-3-Clause"
] | 1 | 2020-01-10T03:12:42.000Z | 2020-01-10T03:12:42.000Z | core/manage.py | bdotdub/norc | ccc51a9889b0d0b640e8f9300aa8bebd3e98e65d | [
"BSD-3-Clause"
] | null | null | null | core/manage.py | bdotdub/norc | ccc51a9889b0d0b640e8f9300aa8bebd3e98e65d | [
"BSD-3-Clause"
] | null | null | null |
#
# Copyright (c) 2009, Perpetually.com, LLC.
# 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 lis... | 44.825175 | 120 | 0.692824 |
3052e5b60bdc3dbb939bc7e128df4eac203d6ebe | 1,820 | py | Python | danceschool/prerequisites/apps.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 32 | 2017-09-12T04:25:25.000Z | 2022-03-21T10:48:07.000Z | danceschool/prerequisites/apps.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 97 | 2017-09-01T02:43:08.000Z | 2022-01-03T18:20:34.000Z | danceschool/prerequisites/apps.py | django-danceschool/django-danceschool | 65ae09ffdcb0821e82df0e1f634fe13c0384a525 | [
"BSD-3-Clause"
] | 19 | 2017-09-26T13:34:46.000Z | 2022-03-21T10:48:10.000Z | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
from django.db.models import Q
class PrerequisitesAppConfig(AppConfig):
name = 'danceschool.prerequisites'
verbose_name = _('Class Requirements/Prerequisites')
def ready(self):
from danceschool.core.models im... | 44.390244 | 110 | 0.692857 |
956ef5b6e671ce1824f64c064789f1cc75625e73 | 194 | py | Python | customer/views.py | borkarfaiz/safety_net_accounting | 78802248528f872cf27ab3fc8de71783989acc8f | [
"MIT"
] | null | null | null | customer/views.py | borkarfaiz/safety_net_accounting | 78802248528f872cf27ab3fc8de71783989acc8f | [
"MIT"
] | null | null | null | customer/views.py | borkarfaiz/safety_net_accounting | 78802248528f872cf27ab3fc8de71783989acc8f | [
"MIT"
] | null | null | null | from django.views.generic import ListView
from .models import Customer
# Create your views here.
class CustomerList(ListView):
model = Customer
context_object_name = 'customer_list'
| 17.636364 | 41 | 0.768041 |
5299879f4b7101193965a89fdfdfc0cb54e89028 | 11,446 | py | Python | lib/hachoir/editor/fieldset.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 320 | 2017-03-28T23:33:45.000Z | 2022-02-17T08:45:01.000Z | lib/hachoir/editor/fieldset.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 300 | 2017-03-28T19:22:54.000Z | 2021-12-01T01:11:55.000Z | lib/hachoir/editor/fieldset.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 90 | 2017-03-29T16:12:43.000Z | 2022-03-01T06:23:48.000Z | from hachoir.core.dict import UniqKeyError
from hachoir.field import MissingField, Float32, Float64, FakeArray
from hachoir.editor import createEditableField, EditorError
from collections import deque # Python 2.4
import weakref # Python 2.1
import struct
class EditableFieldSet(object):
MAX_SIZE = (1 << 40) # ... | 31.794444 | 85 | 0.581164 |
988a4269eb70046b0ef68f9c48a63b528c061a18 | 332 | py | Python | cb0tcc/amain.py | tuna2134/cb0t.py | f27f87c78bd6ca4ad5f1477c28f1fbe3f2f3df7d | [
"MIT"
] | null | null | null | cb0tcc/amain.py | tuna2134/cb0t.py | f27f87c78bd6ca4ad5f1477c28f1fbe3f2f3df7d | [
"MIT"
] | null | null | null | cb0tcc/amain.py | tuna2134/cb0t.py | f27f87c78bd6ca4ad5f1477c28f1fbe3f2f3df7d | [
"MIT"
] | null | null | null | from aiohttp import ClientSession
class aiocb0t:
async def create(self, url):
async with ClientSession() as session:
async with session.post("https://cb0t.cc/api/create", data = {"url": url}) as r:
self.data = await r.json()
@property
def url(self):
return self.... | 27.666667 | 92 | 0.60241 |
76211a1958053c47ca733feffc22a0be3667287f | 1,145 | py | Python | aphid/__main__.py | Jashooa/Aphid | 1b5df0dac8835956b2c7af86a1331c974614a90c | [
"MIT"
] | 1 | 2021-02-15T14:05:56.000Z | 2021-02-15T14:05:56.000Z | aphid/__main__.py | Jashooa/Aphid | 1b5df0dac8835956b2c7af86a1331c974614a90c | [
"MIT"
] | null | null | null | aphid/__main__.py | Jashooa/Aphid | 1b5df0dac8835956b2c7af86a1331c974614a90c | [
"MIT"
] | null | null | null | import asyncio
import logging
from bot import AphidBot
from utils import config, database
fmt = '[%(asctime)s.%(msecs)03d] %(levelname).1s (%(name)s) %(message)s'
datefmt = '%H:%M:%S'
logging.basicConfig(level=logging.INFO, format=fmt, datefmt=datefmt)
log = logging.getLogger(__name__)
def run():
loop = async... | 24.891304 | 121 | 0.643668 |
2fc8d94ed8fe5a8e95334d1b9ff8fd9713a0bfa8 | 344 | py | Python | telegram_bot/src/state.py | bringmetheaugust/Challenger | 00c4de9ea15f56afa72c66610408f4f46926e770 | [
"MIT"
] | null | null | null | telegram_bot/src/state.py | bringmetheaugust/Challenger | 00c4de9ea15f56afa72c66610408f4f46926e770 | [
"MIT"
] | null | null | null | telegram_bot/src/state.py | bringmetheaugust/Challenger | 00c4de9ea15f56afa72c66610408f4f46926e770 | [
"MIT"
] | null | null | null | from aiogram.dispatcher.filters.state import State, StatesGroup
class FormState(StatesGroup):
withBrands = State()
withYears = State()
withPrice = State()
# inline keyboard item
class FormItem:
def __init__(self, itemData: str, isSelected = False):
self.data: str = itemData
self.isSele... | 26.461538 | 63 | 0.703488 |
0edfa4806f22e707b7124278ff210c16ebf6d8ae | 3,942 | py | Python | tensorflow/python/keras/distribute/mirrored_variable_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 4 | 2020-06-28T08:25:36.000Z | 2021-08-12T12:41:34.000Z | tensorflow/python/keras/distribute/mirrored_variable_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 10 | 2021-08-03T08:42:38.000Z | 2022-01-03T03:29:12.000Z | tensorflow/python/keras/distribute/mirrored_variable_test.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2019 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... | 36.841121 | 84 | 0.711568 |
0631e1028f156ac66a2af0ec8e6499df17371ec2 | 179 | py | Python | telegrambot/middlewares/__init__.py | BTMAN1489-1/telegrambot | fae2f6da98b50dccb9d800405509a16d4639953f | [
"MIT"
] | 5 | 2021-02-10T14:48:29.000Z | 2021-05-01T13:46:32.000Z | telegrambot/middlewares/__init__.py | BTMAN1489-1/telegrambot | fae2f6da98b50dccb9d800405509a16d4639953f | [
"MIT"
] | 1 | 2021-06-25T18:53:54.000Z | 2021-06-30T16:15:54.000Z | telegrambot/middlewares/__init__.py | BTMAN1489-1/telegrambot | fae2f6da98b50dccb9d800405509a16d4639953f | [
"MIT"
] | 3 | 2021-04-18T09:39:59.000Z | 2021-05-18T16:47:19.000Z | from aiogram import Dispatcher
from loader import dp
from .throttling import ThrottlingMiddleware
if __name__ == "middlewares":
dp.middleware.setup(ThrottlingMiddleware())
| 19.888889 | 47 | 0.798883 |
cfbf1a6ebb6730339b5c5ca769bd2b09061b4ebc | 5,152 | py | Python | tfcv/modeling/backbones/inception.py | xingzhaolee/tfcv | 27b6a4e8e93cf9b5fecedd6c259118f64b74e263 | [
"MIT"
] | null | null | null | tfcv/modeling/backbones/inception.py | xingzhaolee/tfcv | 27b6a4e8e93cf9b5fecedd6c259118f64b74e263 | [
"MIT"
] | null | null | null | tfcv/modeling/backbones/inception.py | xingzhaolee/tfcv | 27b6a4e8e93cf9b5fecedd6c259118f64b74e263 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tfcv.modeling.layers import conv2d
from tfcv.modeling.modules import (
inception_block_a,
inception_block_b,
inception_block_c,
inception_block_d,
inception_block_e,
)
class Inception3(tf.keras.Model):
""" Inception3.
[1] Rethinking the Inception Architecture... | 28.464088 | 87 | 0.518051 |
9ef7f227d74e99765bf3324489b42dfc7ab4866c | 2,839 | py | Python | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_version_aliases_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_version_aliases_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_version_aliases_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class ListVersionAliasesRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and th... | 25.809091 | 80 | 0.552659 |
63b4e0b402d6642e385ce98bef1dbaae54429a90 | 12,142 | py | Python | tests/unit_tests/tuners/bayesian_test.py | ageron/keras-tuner | 003559cc82bc82b01480c85e51568cd4d3e5ca86 | [
"Apache-2.0"
] | null | null | null | tests/unit_tests/tuners/bayesian_test.py | ageron/keras-tuner | 003559cc82bc82b01480c85e51568cd4d3e5ca86 | [
"Apache-2.0"
] | null | null | null | tests/unit_tests/tuners/bayesian_test.py | ageron/keras-tuner | 003559cc82bc82b01480c85e51568cd4d3e5ca86 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The KerasTuner 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 33.265753 | 82 | 0.650964 |
437e804ad1a940ec44874bc05afaad3d3507b789 | 407 | py | Python | evan69/0004/0004.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | evan69/0004/0004.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | evan69/0004/0004.py | dwh65416396/python | 1a7e3edd1cd3422cc0eaa55471a0b42e004a9a1a | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | import collections,re
import sys
def cal(filename = 'in.txt'):
print 'now processing:' + filename + '......'
f = open(filename,'r')
data = f.read()
dic = collections.defaultdict(lambda :0)
data = re.sub(r'[\W\d]',' ',data)
data = data.lower()
datalist = data.split(' ')
for item in datalist:
dic[item] += 1
de... | 21.421053 | 46 | 0.633907 |
9567641a0163b627a1eced87d74ad8b0731c0945 | 3,610 | py | Python | userproject/settings.py | WaMungai/Awwards | 719ab8a9b14260627db5e60bb1edf5edb8415beb | [
"Unlicense"
] | null | null | null | userproject/settings.py | WaMungai/Awwards | 719ab8a9b14260627db5e60bb1edf5edb8415beb | [
"Unlicense"
] | 3 | 2020-06-06T00:39:06.000Z | 2021-09-08T01:41:14.000Z | userproject/settings.py | WaMungai/Awwards | 719ab8a9b14260627db5e60bb1edf5edb8415beb | [
"Unlicense"
] | null | null | null | """
Django settings for userproject project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import ... | 25.422535 | 91 | 0.699446 |
a67daf0bb35cc3db35002865a6bfb42ab619edcd | 129 | py | Python | server/app/core/admin.py | p-schlickmann/streamy-app | 92ece073be79d04a70d2195d1079abf487961c70 | [
"MIT"
] | null | null | null | server/app/core/admin.py | p-schlickmann/streamy-app | 92ece073be79d04a70d2195d1079abf487961c70 | [
"MIT"
] | null | null | null | server/app/core/admin.py | p-schlickmann/streamy-app | 92ece073be79d04a70d2195d1079abf487961c70 | [
"MIT"
] | 1 | 2022-01-31T23:53:13.000Z | 2022-01-31T23:53:13.000Z | from django.contrib import admin
from . import models
admin.site.register(models.Category)
admin.site.register(models.Stream)
| 16.125 | 36 | 0.806202 |
1df6fb427ca8fdb882c3d9ff006b5f10f158b3b2 | 2,195 | py | Python | app/main/forms.py | pojoin/h3blog | 249a82a347bcacce50f2ac2bd410e1f0a127ec72 | [
"MulanPSL-1.0"
] | 5 | 2020-09-22T09:10:13.000Z | 2022-03-22T14:47:04.000Z | app/main/forms.py | pojoin/h3blog | 249a82a347bcacce50f2ac2bd410e1f0a127ec72 | [
"MulanPSL-1.0"
] | null | null | null | app/main/forms.py | pojoin/h3blog | 249a82a347bcacce50f2ac2bd410e1f0a127ec72 | [
"MulanPSL-1.0"
] | 4 | 2020-04-15T10:49:41.000Z | 2021-04-06T08:01:59.000Z | # -*- coding:utf-8 -*-
__author__ = '何三'
from flask_wtf import FlaskForm
from flask_login import current_user
from wtforms import StringField,PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from app.models import User, InvitationCode
class ... | 39.196429 | 104 | 0.705239 |
8aca5a6fc0d3cca4a4735df9294338f57594b67f | 554 | py | Python | authapp/migrations/0005_auto_20201228_1601.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | authapp/migrations/0005_auto_20201228_1601.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | authapp/migrations/0005_auto_20201228_1601.py | ZeroXKiritsu/geekshop | 9a6fc6c3a5671d5701f1ba2743566f35cb8149ab | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-28 13:01
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('authapp', '0004_auto_20201228_1558'),
]
operations = [
migrations.AlterField(
... | 26.380952 | 146 | 0.662455 |
7d0d5e478046350ffc18b06f18643c8bee4afc48 | 6,504 | py | Python | kornia/geometry/transform/crop.py | sampepose/kornianodeps | 384edd02a6bcfb76bf1abdb2a2029e89e3719bb8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/geometry/transform/crop.py | sampepose/kornianodeps | 384edd02a6bcfb76bf1abdb2a2029e89e3719bb8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/geometry/transform/crop.py | sampepose/kornianodeps | 384edd02a6bcfb76bf1abdb2a2029e89e3719bb8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Tuple
import torch
from kornia.geometry.transform.imgwarp import (
warp_perspective, get_perspective_transform
)
__all__ = [
"crop_and_resize",
"center_crop",
]
def crop_and_resize(tensor: torch.Tensor, boxes: torch.Tensor,
size: Tuple[int, int]) -> torch.Tensor:
... | 34.052356 | 78 | 0.579336 |
6b9ea61736f4c262fbb865038028410879881e5c | 3,694 | py | Python | var/spack/repos/builtin/packages/intel-gtpin/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/intel-gtpin/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/intel-gtpin/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class IntelGtpin(Package):
"""Intel(R) GtPin is a dynamic binary instrumentation framework for G... | 47.358974 | 96 | 0.722523 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.