hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79511842dbabcea06a7c53ac39ceb0d361da63c1 | 2,868 | py | Python | pyqtgraph/exporters/PrintExporter.py | marsipu/pyqtgraph | eb8965c2f4b8ef9393eeeb857bc23d5faf2c1baf | [
"MIT"
] | 1 | 2021-07-09T23:27:37.000Z | 2021-07-09T23:27:37.000Z | pyqtgraph/exporters/PrintExporter.py | tom00ti/pyqtgraph | 6b4385ce0d0f9078aa22e2e27aa5307271e95ae1 | [
"MIT"
] | null | null | null | pyqtgraph/exporters/PrintExporter.py | tom00ti/pyqtgraph | 6b4385ce0d0f9078aa22e2e27aa5307271e95ae1 | [
"MIT"
] | null | null | null | from .Exporter import Exporter
from ..parametertree import Parameter
from ..Qt import QtGui, QtCore, QtSvg
import re
translate = QtCore.QCoreApplication.translate
__all__ = ['PrintExporter']
#__all__ = [] ## Printer is disabled for now--does not work very well.
class PrintExporter(Exporter):
Name = "Printer"... | 39.287671 | 110 | 0.602859 |
795119d6a65d74e29656bde466342abc699b627b | 650 | py | Python | bin/cli.py | rmit-ir/joint-cascade-ranking | fa53c4447ce0ebe380d0ebbb5017eb7b1ac015e3 | [
"MIT"
] | 9 | 2018-12-03T12:29:54.000Z | 2021-08-18T02:21:34.000Z | bin/cli.py | rmit-ir/joint-cascade-ranking | fa53c4447ce0ebe380d0ebbb5017eb7b1ac015e3 | [
"MIT"
] | 1 | 2019-11-05T14:54:50.000Z | 2019-11-20T01:12:45.000Z | bin/cli.py | rmit-ir/joint-cascade-ranking | fa53c4447ce0ebe380d0ebbb5017eb7b1ac015e3 | [
"MIT"
] | 4 | 2019-10-16T02:55:11.000Z | 2021-12-05T00:23:29.000Z | class AttrDict(dict):
__setattr__ = dict.__setitem__
__getattr__ = dict.__getitem__
@classmethod
def from_parseargs(cls, args):
config = cls()
config.merge_parseargs(args)
return config
@classmethod
def from_attr_dict(cls, other):
config = cls()
for key,... | 28.26087 | 69 | 0.589231 |
79511bd93dd29d8fab4047de060459b0fe8f22c1 | 7,841 | py | Python | bipartite/matching.py | severmore/pygraph | 1ad4c0f6c287ef5fd4c0269495ff890b8be8a6e0 | [
"MIT"
] | 2 | 2018-06-30T10:19:41.000Z | 2018-07-02T09:57:25.000Z | bipartite/matching.py | severmore/pygraph | 1ad4c0f6c287ef5fd4c0269495ff890b8be8a6e0 | [
"MIT"
] | 10 | 2018-06-28T16:19:21.000Z | 2018-07-06T11:48:03.000Z | bipartite/matching.py | severmore/pygraphs | 1ad4c0f6c287ef5fd4c0269495ff890b8be8a6e0 | [
"MIT"
] | null | null | null | """
Created by Ivanov Roman and Maxim Dudin.
https://github.com/severmore/pygraphs
"""
from collections import deque
def euler_partition(graph, sustain_graph=False):
"""
Finds an Euler partition of a graph. An Euler partition is a partition of
edges of a graph into open and close path, each vertex of odd degre... | 27.416084 | 80 | 0.661268 |
79511e61ff4229cda4d0f13805e1c20e75406481 | 11,885 | py | Python | jx_telebot.py | jxwhat/telegram_bot | f984eeac70efeca99c89c7e3436e88de65ed99d1 | [
"MIT"
] | null | null | null | jx_telebot.py | jxwhat/telegram_bot | f984eeac70efeca99c89c7e3436e88de65ed99d1 | [
"MIT"
] | null | null | null | jx_telebot.py | jxwhat/telegram_bot | f984eeac70efeca99c89c7e3436e88de65ed99d1 | [
"MIT"
] | null | null | null | # this file provides supporting stuff for the telegram bot
import numpy as np
import pandas as pd
import yfinance as yf
import re
import random
from datetime import datetime, timedelta
from datetime import date as datetype ## clumsy code but works for now
import requests
vocab_dict = {
'no_change': ['remained f... | 33.198324 | 168 | 0.549011 |
79511e883f0726820a155db9a2df66110bdaecac | 5,182 | py | Python | src/stk/molecular/functional_groups/factories/boronic_acid_factory.py | supramolecular-toolkit/stk | 0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | src/stk/molecular/functional_groups/factories/boronic_acid_factory.py | JelfsMaterialsGroup/stk | 0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | src/stk/molecular/functional_groups/factories/boronic_acid_factory.py | supramolecular-toolkit/stk | 0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | """
Boronic Acid Factory
====================
"""
from __future__ import annotations
import typing
from collections import abc
from .functional_group_factory import FunctionalGroupFactory
from .utilities import get_atom_ids
from ..functional_groups import BoronicAcid
from ...molecule import Molecule
from ...atoms i... | 30.662722 | 71 | 0.564068 |
79511f8809fe03a5ecbce619085d46fad3459e42 | 3,327 | py | Python | python/kfserving/test/test_v1beta1_alibi_explainer_spec.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 6 | 2022-02-15T21:54:19.000Z | 2022-02-16T21:18:54.000Z | python/kfserving/test/test_v1beta1_alibi_explainer_spec.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 635 | 2021-01-29T07:06:06.000Z | 2022-03-31T09:09:20.000Z | python/kfserving/test/test_v1beta1_alibi_explainer_spec.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 4 | 2021-02-15T23:02:53.000Z | 2022-01-27T22:54:16.000Z | # Copyright 2020 kubeflow.org.
#
# 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,... | 30.245455 | 105 | 0.533514 |
79511fa50dbbf3c85a67a7e66a81564151308499 | 1,011 | py | Python | airflow/www/gunicorn_config.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 8 | 2017-04-20T16:15:44.000Z | 2020-10-11T13:44:10.000Z | airflow/www/gunicorn_config.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 219 | 2017-03-15T18:40:16.000Z | 2022-02-28T22:52:43.000Z | airflow/www/gunicorn_config.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.000Z | #!/usr/bin/env python
#
# 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
# "... | 34.862069 | 75 | 0.771513 |
79512037860f60e2420827be48ddfa72ece0fcaa | 14,680 | py | Python | _code_generation/mof.py | osgirl/dractor | aa0ba9f5e4802ae365df3cb7d51c31b8d1b2349b | [
"Apache-2.0"
] | null | null | null | _code_generation/mof.py | osgirl/dractor | aa0ba9f5e4802ae365df3cb7d51c31b8d1b2349b | [
"Apache-2.0"
] | 2 | 2019-03-17T15:40:39.000Z | 2019-03-17T15:40:41.000Z | _code_generation/mof.py | osgirl/dractor | aa0ba9f5e4802ae365df3cb7d51c31b8d1b2349b | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Verizon. All Rights Reserved.
#
# File: mof.py
# Author: John Hickey, Phil Chandler
# Date: 2017-02-17
#
# 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 Licen... | 30.143737 | 100 | 0.618188 |
795120d9661a627b7941be18f854f41be190ccda | 6,891 | py | Python | src/view/helpDialog.py | Curtin-Timescales-of-Mineral-Systems/UPb-Unmixer | 4391a77bbb7c198955af8637ed10854245cd15c3 | [
"MIT"
] | 1 | 2021-02-17T08:10:21.000Z | 2021-02-17T08:10:21.000Z | src/view/helpDialog.py | Curtin-Timescales-of-Mineral-Systems/UPb-Unmixer | 4391a77bbb7c198955af8637ed10854245cd15c3 | [
"MIT"
] | null | null | null | src/view/helpDialog.py | Curtin-Timescales-of-Mineral-Systems/UPb-Unmixer | 4391a77bbb7c198955af8637ed10854245cd15c3 | [
"MIT"
] | null | null | null | from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QLabel, QTabWidget, QVBoxLayout, QWidget, QDialog, QLayout
from utils import config, string, calculations
class HelpDialog(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle(config.TITLE + " help")
about_label: QL... | 51.044444 | 181 | 0.595269 |
79512226bda6594208f2df1b5e7f4c6bf8546918 | 7,380 | py | Python | build/lib/WORC/classification/AdvancedSampler.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | build/lib/WORC/classification/AdvancedSampler.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | build/lib/WORC/classification/AdvancedSampler.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016-2019 Biomedical Imaging Group Rotterdam, Departments of
# Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | 37.653061 | 99 | 0.628862 |
795124f5956467b4e725d767c1b0c0765f150e03 | 257 | py | Python | 0x04-python-more_data_structures/10-best_score.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/10-best_score.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/10-best_score.py | Trice254/alx-higher_level_programming | b49b7adaf2c3faa290b3652ad703914f8013c67c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
def best_score(a_dictionary):
m = 0
res = ""
if a_dictionary:
for k, v in a_dictionary.items():
if v > m:
res = k
m = v
return res
else:
return None
| 18.357143 | 41 | 0.44358 |
79512638a56b332004747d466d3ec9317b9bbb41 | 3,661 | py | Python | profiles_project/profiles_api/views.py | aseem-hegshetye/Django_Rest_Api | 663693b4003d012029fc3365f01b171824229344 | [
"MIT"
] | null | null | null | profiles_project/profiles_api/views.py | aseem-hegshetye/Django_Rest_Api | 663693b4003d012029fc3365f01b171824229344 | [
"MIT"
] | 15 | 2020-06-06T00:44:36.000Z | 2022-03-12T00:18:42.000Z | profiles_project/profiles_api/views.py | aseem-hegshetye/Django_Rest_Api | 663693b4003d012029fc3365f01b171824229344 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView, Response, status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings impo... | 32.114035 | 126 | 0.679869 |
795126b292ac556dd3a62d41d01831097b39fc84 | 3,524 | py | Python | PyAxe/AFTP.py | sunjinopensource/PyAxe | 4b01d0aec83006f9ab366acbefbe7a2bcd5bee10 | [
"MIT"
] | null | null | null | PyAxe/AFTP.py | sunjinopensource/PyAxe | 4b01d0aec83006f9ab366acbefbe7a2bcd5bee10 | [
"MIT"
] | null | null | null | PyAxe/AFTP.py | sunjinopensource/PyAxe | 4b01d0aec83006f9ab366acbefbe7a2bcd5bee10 | [
"MIT"
] | null | null | null | import os
import ftplib
import re
from . import ALog
ANONYMOUS_USERPASS = ('', '')
class FileStat:
def __init__(self):
self.isDir = False
self.permissionBits = '' # 'rwxrwxrwx'
self.name = ''
self.size = 0
def dir(host, targetDir='/', userpass=ANONYMOUS_USERPASS... | 30.119658 | 177 | 0.571793 |
7951277a710e2424e66291bfe8c36119cc185bbd | 929 | py | Python | RecoHGCal/TICL/python/SimTracksters_cff.py | soumyadipbarman/cmssw | 1e8e5a42bd6a4f7eb5a4dc2523ca21b04b687658 | [
"Apache-2.0"
] | 13 | 2015-11-30T15:49:45.000Z | 2022-02-08T16:11:30.000Z | RecoHGCal/TICL/python/SimTracksters_cff.py | soumyadipbarman/cmssw | 1e8e5a42bd6a4f7eb5a4dc2523ca21b04b687658 | [
"Apache-2.0"
] | 640 | 2015-02-11T18:55:47.000Z | 2022-03-31T14:12:23.000Z | RecoHGCal/TICL/python/SimTracksters_cff.py | soumyadipbarman/cmssw | 1e8e5a42bd6a4f7eb5a4dc2523ca21b04b687658 | [
"Apache-2.0"
] | 51 | 2015-08-11T21:01:40.000Z | 2022-03-30T07:31:34.000Z | import FWCore.ParameterSet.Config as cms
from RecoHGCal.TICL.trackstersFromSimClustersProducer_cfi import trackstersFromSimClustersProducer as _trackstersFromSimClustersProducer
from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer as _filteredLayerClustersProducer
# CA - PATTERN... | 34.407407 | 136 | 0.8493 |
7951277be2e0540b73a805c24f3393759fef015e | 189,965 | py | Python | qiskit/circuit/quantumcircuit.py | itoko/qiskit-terra | 5c61d8f2df5a2255e1f31a53be79a45a1abe0cd1 | [
"Apache-2.0"
] | 1,456 | 2017-08-05T16:33:05.000Z | 2018-06-05T04:15:35.000Z | qiskit/circuit/quantumcircuit.py | itoko/qiskit-terra | 5c61d8f2df5a2255e1f31a53be79a45a1abe0cd1 | [
"Apache-2.0"
] | 365 | 2017-08-04T06:09:16.000Z | 2018-06-05T08:33:37.000Z | qiskit/circuit/quantumcircuit.py | itoko/qiskit-terra | 5c61d8f2df5a2255e1f31a53be79a45a1abe0cd1 | [
"Apache-2.0"
] | 463 | 2017-08-05T04:10:01.000Z | 2018-06-05T06:43:21.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# 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 modifications or derivative wo... | 39.135764 | 100 | 0.597489 |
795128014c9de92d174d1f4345ed699b13341265 | 414 | py | Python | app/services/cli/settings.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | app/services/cli/settings.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | app/services/cli/settings.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | """
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
#-------------------------------------------------------------------------------
# Global settings
#-------------------------------------------------------------------------------
# Core Django settings
#--... | 31.846154 | 80 | 0.301932 |
7951280dde0bd6c660a84ca4935acca684c0ed84 | 851 | py | Python | website/pagination_classes.py | edsegura30/BackEnd | 82669ce4f07fa54936f33ee08f0123f64d27a83a | [
"MIT"
] | 3 | 2019-04-05T17:39:28.000Z | 2019-05-22T15:38:08.000Z | website/pagination_classes.py | edsegura30/BackEnd | 82669ce4f07fa54936f33ee08f0123f64d27a83a | [
"MIT"
] | 1 | 2019-04-05T17:39:44.000Z | 2019-04-08T08:56:55.000Z | website/pagination_classes.py | edsegura30/BackEnd | 82669ce4f07fa54936f33ee08f0123f64d27a83a | [
"MIT"
] | null | null | null | """
Custom paginators for API responses
"""
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
_BASE_URL = 'http://localhost:8000/'
_EVENT_URL = 'events/'
class DefaultEdgarPagination(PageNumberPagination):
"""
This is the default REST API paginator
""... | 28.366667 | 61 | 0.613396 |
795128174c98f5be3d2b79e43ab1d172dafe03fc | 169,255 | py | Python | nova/virt/libvirt/driver.py | bopopescu/novatest-1 | 16ed4510200308b8b710cac90aa032ec5eab7e9d | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | bopopescu/novatest-1 | 16ed4510200308b8b710cac90aa032ec5eab7e9d | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | bopopescu/novatest-1 | 16ed4510200308b8b710cac90aa032ec5eab7e9d | [
"Apache-2.0"
] | 1 | 2020-07-24T08:49:47.000Z | 2020-07-24T08:49:47.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# Copyright (c) 2012 Univer... | 41.957115 | 79 | 0.560308 |
79512840cdc2dd833c98c35c8ab44be0a49cc05b | 4,935 | py | Python | pipenv/patched/crayons.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | pipenv/patched/crayons.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | pipenv/patched/crayons.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
clint.colored
~~~~~~~~~~~~~
This module provides a simple and elegant wrapper for colorama.
"""
import os
import re
import sys
import shellingham
import colorama
PY3 = sys.version_info[0] >= 3
__all__ = (
"red",
"green",
"yellow",
"blue",
"black",
"magenta",
... | 24.552239 | 81 | 0.613982 |
795129c42bbde563f6643398aaa67a5593d36874 | 20,542 | py | Python | qgitc/mergewidget.py | timxx/qgitc | 514333c80ce79c795ebe7c70ef74cfa91a9f529b | [
"Apache-2.0"
] | 2 | 2020-05-06T19:56:15.000Z | 2022-02-08T01:02:19.000Z | qgitc/mergewidget.py | timxx/qgitc | 514333c80ce79c795ebe7c70ef74cfa91a9f529b | [
"Apache-2.0"
] | null | null | null | qgitc/mergewidget.py | timxx/qgitc | 514333c80ce79c795ebe7c70ef74cfa91a9f529b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from PySide6.QtGui import *
from PySide6.QtWidgets import *
from PySide6.QtCore import *
from .gitutils import Git, GitProcess
from .stylehelper import dpiScaled
from .conflictlog import (
ConflictLogExcel,
ConflictLogXlsx,
HAVE_EXCEL_API,
HAVE_XLSX_WRITER,
MergeInfo)
from .... | 34.582492 | 104 | 0.587285 |
79512bd8dcda8ddf1e1029dfa070c2e791fce916 | 3,817 | py | Python | app/equipment_type/routes.py | kid-kodi/BioBank | 27c7cb7286dcae737fa53c245456d60857fe949f | [
"MIT"
] | null | null | null | app/equipment_type/routes.py | kid-kodi/BioBank | 27c7cb7286dcae737fa53c245456d60857fe949f | [
"MIT"
] | null | null | null | app/equipment_type/routes.py | kid-kodi/BioBank | 27c7cb7286dcae737fa53c245456d60857fe949f | [
"MIT"
] | null | null | null | from datetime import datetime
from flask import render_template, flash, redirect, url_for, request, g, \
jsonify, current_app
from flask_login import current_user, login_required
from flask_babel import _, get_locale
from guess_language import guess_language
from app import db
from app.equipment_type.forms import E... | 38.17 | 87 | 0.653655 |
79512cb9149491e8e325c294dc06fc126ca13e56 | 4,077 | py | Python | vint/ast/parsing.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 538 | 2015-01-03T18:54:53.000Z | 2020-01-11T01:34:51.000Z | vint/ast/parsing.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 235 | 2015-01-01T06:20:01.000Z | 2020-01-17T11:32:39.000Z | vint/ast/parsing.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 43 | 2015-01-23T16:59:49.000Z | 2019-12-27T10:56:12.000Z | from typing import Dict, Any # noqa: F401
import re
from vint._bundles import vimlparser
from vint.ast.traversing import traverse
from vint.encodings.decoder import Decoder
from vint.encodings.decoding_strategy import default_decoding_strategy
from vint.linting.lint_target import AbstractLintTarget
class Parser(obje... | 33.418033 | 81 | 0.590385 |
79512e3fdd0749567f943a81625f02d4b71c9138 | 3,240 | py | Python | main.py | n0vuh/antizon | bc9b8765add79a5a4f9f225f8e14a79aa3e10291 | [
"BSD-3-Clause"
] | 3 | 2021-08-13T21:30:47.000Z | 2021-11-21T23:40:06.000Z | main.py | n0vuh/antizon | bc9b8765add79a5a4f9f225f8e14a79aa3e10291 | [
"BSD-3-Clause"
] | 1 | 2021-08-12T21:53:50.000Z | 2021-08-12T21:56:24.000Z | main.py | n0vuh/antizon | bc9b8765add79a5a4f9f225f8e14a79aa3e10291 | [
"BSD-3-Clause"
] | null | null | null | # developed by novuh (github.com/n0vuh)
# AntiZon is intended for the purpose of getting a consumer a better price for a product.
# AntiZon is not intended to be used as financial advice.
# source code, p.s: ignore lazy code, it'll be fixed
import json
import os
from colorama import Back, Fore, Style
from ... | 34.105263 | 123 | 0.587346 |
79512f31d9a702aa7d3cacd949fcd92b5eaa25ef | 1,277 | py | Python | jsonfmt.py | r15ch13/scoops | 82da457b00f583627ad83512c0de68f54c615083 | [
"MIT"
] | null | null | null | jsonfmt.py | r15ch13/scoops | 82da457b00f583627ad83512c0de68f54c615083 | [
"MIT"
] | null | null | null | jsonfmt.py | r15ch13/scoops | 82da457b00f583627ad83512c0de68f54c615083 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" @todo add docstring """
# ### imports ###
from __future__ import (
absolute_import,
division,
print_function # ,
# unicode_literals
)
from jsoncomment import JsonComment
# from jsonschema import validate
import json
import os
import sys
def decod... | 18.779412 | 64 | 0.618637 |
79512fe05d993ffaabcea1e53f67931b5550932e | 17,292 | py | Python | cube_algorithm/cube.py | Khja/CubeAlgAddon | 84961f3dadbccfeed208169776dee35e0a7e969d | [
"MIT"
] | 4 | 2020-07-23T19:39:12.000Z | 2022-01-16T15:52:01.000Z | cube_algorithm/cube.py | Khja/CubeAlgAddon | 84961f3dadbccfeed208169776dee35e0a7e969d | [
"MIT"
] | null | null | null | cube_algorithm/cube.py | Khja/CubeAlgAddon | 84961f3dadbccfeed208169776dee35e0a7e969d | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2020 Khja
# Please read before using this piece of software.
css = """\
.card {
font-family: arial;
font-size: 30px;
text-align: center;
color: black;
background-color: white;
}
:root {
--thickness: 4;
--size: 20;
--G: #39EA5C;
--W: #FFFFFF;
--R: #DC0010;
--O: #FF9E00;
--Y: ... | 29.558974 | 104 | 0.446623 |
7951300735316b86476229d4a28cbf569ac524f6 | 397 | py | Python | rimproject/wsgi.py | mostateresnet/rimproject | ef1952ee386b62ea7b49c139a3c66c718fb310d0 | [
"MIT"
] | null | null | null | rimproject/wsgi.py | mostateresnet/rimproject | ef1952ee386b62ea7b49c139a3c66c718fb310d0 | [
"MIT"
] | 55 | 2018-04-18T19:57:56.000Z | 2021-09-22T18:51:16.000Z | rimproject/wsgi.py | mostateresnet/rimproject | ef1952ee386b62ea7b49c139a3c66c718fb310d0 | [
"MIT"
] | null | null | null | """
WSGI config for rimproject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 23.352941 | 78 | 0.788413 |
79513118d1365989722c33e13c769768443be583 | 344 | py | Python | src/utils/outliers.py | Hydrapse/pytorch-template | d7ea2f19bbdc032b8663ca432c1ef9012fe6180b | [
"MIT",
"Unlicense"
] | null | null | null | src/utils/outliers.py | Hydrapse/pytorch-template | d7ea2f19bbdc032b8663ca432c1ef9012fe6180b | [
"MIT",
"Unlicense"
] | null | null | null | src/utils/outliers.py | Hydrapse/pytorch-template | d7ea2f19bbdc032b8663ca432c1ef9012fe6180b | [
"MIT",
"Unlicense"
] | null | null | null | import math
import torch
def replace_nan(val, nan_to=0., inf_to=1.):
val = torch.where(torch.isinf(val), torch.full_like(val, nan_to), val)
return torch.where(torch.isnan(val), torch.full_like(val, inf_to), val)
def clip_int(val, lower, upper):
val = 0 if math.isnan(val) else round(val)
return max(... | 24.571429 | 75 | 0.69186 |
795131ae170c11d294ae427dbeebeaf1d4b452a8 | 346 | py | Python | hammock_example.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 2 | 2015-06-01T18:33:38.000Z | 2018-11-21T19:40:37.000Z | hammock_example.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 102 | 2015-01-20T17:26:52.000Z | 2017-12-28T17:32:51.000Z | hammock_example.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 3 | 2020-03-02T06:54:18.000Z | 2021-01-07T16:36:35.000Z |
from hammock import Hammock as Github
github = Github('https://api.github.com')
headers = {'Accept': 'application/vnd.github.preview'}
resp = github.search.repositories.GET(params={'q': 'language:python', 'sort': 'stars', 'per_page': 10, 'page': 1}, headers=headers)
res = resp.json()
print res['items'][0]['full_name'... | 34.6 | 131 | 0.696532 |
7951320e962063cabd7ef45ebee81d8768cc2366 | 22,908 | py | Python | core/tests/tests_forms.py | mbaitelman/babybuddy | ea6476f9cac83959470a2fdfdd2d40441bfde061 | [
"BSD-2-Clause"
] | null | null | null | core/tests/tests_forms.py | mbaitelman/babybuddy | ea6476f9cac83959470a2fdfdd2d40441bfde061 | [
"BSD-2-Clause"
] | null | null | null | core/tests/tests_forms.py | mbaitelman/babybuddy | ea6476f9cac83959470a2fdfdd2d40441bfde061 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.core.management import call_command
from django.test import TestCase
from django.test import Client as HttpClient
from django.utils import timezone
from django.utils.formats import get_format
from faker import Factory
from core import mod... | 35.849765 | 79 | 0.579492 |
795133ac7c51cc9421f5dbe95cf8b7c9b0e242fc | 1,766 | py | Python | test/test_feature_extraction.py | kyledecker/project_ksd15_wjl11 | f17b62ce1affaaaec65cdb0ea16c376ae00027d0 | [
"MIT"
] | 2 | 2017-03-29T06:06:49.000Z | 2017-06-11T22:04:59.000Z | test/test_feature_extraction.py | kyledecker/project_ksd15_wjl11 | f17b62ce1affaaaec65cdb0ea16c376ae00027d0 | [
"MIT"
] | null | null | null | test/test_feature_extraction.py | kyledecker/project_ksd15_wjl11 | f17b62ce1affaaaec65cdb0ea16c376ae00027d0 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.insert(0, os.path.abspath('./src/'))
def test_calc_mode():
from feature_extraction import calc_mode
import numpy as np
hist = np.zeros(256)
hist[5] = 0.4
hist[20] = 0.5
hist[100] = 0.2
actual = calc_mode(hist)
expected = 20
assert actual == expected... | 21.277108 | 76 | 0.603624 |
7951341f439b8f790edb531621dce45c8df11cad | 637 | py | Python | server/ui/admin/pces/urls.py | elise-baumgartner/onramp | beb3c807264fcb70d8069ff2e3990b0ce3f59912 | [
"BSD-3-Clause"
] | 2 | 2016-09-09T04:19:01.000Z | 2019-02-15T20:28:13.000Z | server/ui/admin/pces/urls.py | elise-baumgartner/onramp | beb3c807264fcb70d8069ff2e3990b0ce3f59912 | [
"BSD-3-Clause"
] | 67 | 2016-06-02T19:37:56.000Z | 2018-02-22T05:23:45.000Z | server/ui/admin/pces/urls.py | elise-baumgartner/onramp | beb3c807264fcb70d8069ff2e3990b0ce3f59912 | [
"BSD-3-Clause"
] | 9 | 2015-06-22T22:10:22.000Z | 2016-04-26T15:35:45.000Z | from django.conf.urls import url
import views
urlpatterns = [
url(r'GetAll/$', views.get_all_pces),
url(r'Modules/$', views.get_pce_modules),
url(r'Module/Add/$', views.add_pce_module),
url(r'Module/Edit/$', views.edit_pce_module),
url(r'Module/Delete/$', views.delete_pce_module),
url(r'Module/... | 33.526316 | 53 | 0.660911 |
7951347e2f67a50c020dfa873b5f3d4cd20285da | 927 | py | Python | ioflo/base/test/_testServing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 128 | 2015-01-14T12:26:56.000Z | 2021-11-06T07:09:29.000Z | ioflo/base/test/_testServing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17 | 2015-01-28T18:26:50.000Z | 2020-11-19T22:08:06.000Z | ioflo/base/test/_testServing.py | BradyHammond/ioflo | 177ac656d7c4ff801aebb0d8b401db365a5248ce | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2015-01-27T23:28:31.000Z | 2021-05-04T16:37:30.000Z | def TestOpenStuff():
""" """
import ioflo.base.storing as storing
storing.Store.Clear() #clear registry
s1 = ServerTask(store = storing.Store())
s2 = ServerTask(store = storing.Store())
print(s1.server.reopen())
print(s2.server.reopen())
def Test(verbose = False):
"""Module self ... | 18.918367 | 74 | 0.597627 |
795134d7fb28a97c4dbc051effb6f36b34559e9d | 1,028 | py | Python | test/typedlist_test.py | DamavandiKamali/TinCanPython | a3fb50babcb09eb87999aea67b4a266a58b02949 | [
"Apache-2.0"
] | 2 | 2018-08-01T18:50:36.000Z | 2019-04-17T15:24:16.000Z | test/typedlist_test.py | DamavandiKamali/TinCanPython | a3fb50babcb09eb87999aea67b4a266a58b02949 | [
"Apache-2.0"
] | 5 | 2019-03-22T23:14:19.000Z | 2020-07-02T14:43:49.000Z | test/typedlist_test.py | DamavandiKamali/TinCanPython | a3fb50babcb09eb87999aea67b4a266a58b02949 | [
"Apache-2.0"
] | 2 | 2018-07-19T09:54:24.000Z | 2020-02-12T12:03:31.000Z | # Copyright 2014 Rustici Software
#
# 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... | 31.151515 | 77 | 0.73249 |
795135b09cfbea7fc12ba338e77551aa658829b4 | 1,324 | py | Python | tensorflow_datasets/text/pg19_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,380 | 2018-09-11T05:03:31.000Z | 2022-03-31T20:04:57.000Z | tensorflow_datasets/text/pg19_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 3,142 | 2018-09-14T10:09:00.000Z | 2022-03-31T18:25:44.000Z | tensorflow_datasets/text/pg19_test.py | jvishnuvardhan/datasets | b8e38187058f1221e67c6291b3f29385ebb35fa2 | [
"Apache-2.0"
] | 1,438 | 2018-09-16T13:58:22.000Z | 2022-03-31T11:19:54.000Z | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets 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 appl... | 28.170213 | 74 | 0.702417 |
795137205fa5e1e34c71b16dce76bf7de63de1c7 | 886 | py | Python | unreleased/azure-mgmt-intune/azure/mgmt/intune/models/application_paged.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:16:34.000Z | 2018-11-09T06:16:34.000Z | unreleased/azure-mgmt-intune/azure/mgmt/intune/models/application_paged.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | null | null | null | unreleased/azure-mgmt-intune/azure/mgmt/intune/models/application_paged.py | azuresdkci1x/azure-sdk-for-python-1722 | e08fa6606543ce0f35b93133dbb78490f8e6bcc9 | [
"MIT"
] | 1 | 2018-11-09T06:17:41.000Z | 2018-11-09T06:17:41.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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 31.642857 | 76 | 0.563205 |
795138ea891126576d3124ad0c9655f5fe1b33cd | 1,764 | py | Python | nipype/interfaces/camino/tests/test_auto_SFLUTGen.py | lucindasisk/nipype | d037ed577615feb11cab20d66a06a8ecd63e5034 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/camino/tests/test_auto_SFLUTGen.py | lucindasisk/nipype | d037ed577615feb11cab20d66a06a8ecd63e5034 | [
"Apache-2.0"
] | 2 | 2018-04-17T19:18:16.000Z | 2020-03-04T22:05:02.000Z | nipype/interfaces/camino/tests/test_auto_SFLUTGen.py | oesteban/nipype | c14f24eba1da08711bbb894e049ee858ed740096 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..calib import SFLUTGen
def test_SFLUTGen_inputs():
input_map = dict(
args=dict(argstr='%s', ),
binincsize=dict(
argstr='-binincsize %d',
units='NA',
),
direct... | 27.138462 | 67 | 0.520975 |
795139a349552a4b3b1dae5abc3ac265e6a518fc | 1,833 | py | Python | python/281_zigzag_iterator.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/281_zigzag_iterator.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/281_zigzag_iterator.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | 1 | 2019-11-22T19:28:11.000Z | 2019-11-22T19:28:11.000Z | """
Given two 1d vectors, implement an iterator to return their elements
alternately.
For example, given two 1d vectors:
v1 = [1, 2]
v2 = [3, 4, 5, 6]
By calling next repeatedly until hasNext returns false, the order of
elements returned by next should be: [1, 3, 2, 4, 5, 6].
Follow up: What if you a... | 26.955882 | 72 | 0.546645 |
79513af29d2839e0633dd44a8917cb93a1a6ea0e | 49,467 | py | Python | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI discovery API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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,... | 29.064042 | 307 | 0.709887 |
79513d233eab518d227b47f1a7b12d4b8aafee9a | 2,677 | py | Python | sip/execution_control/processing_block_controller/tests/test_processing_block_controller.py | SKA-ScienceDataProcessor/integration-prototype | 5875dc0489f707232534ce75daf3707f909bcd15 | [
"BSD-3-Clause"
] | 3 | 2016-11-08T02:27:05.000Z | 2018-01-22T13:26:11.000Z | sip/execution_control/processing_block_controller/tests/test_processing_block_controller.py | SKA-ScienceDataProcessor/integration-prototype | 5875dc0489f707232534ce75daf3707f909bcd15 | [
"BSD-3-Clause"
] | 87 | 2016-11-24T11:09:01.000Z | 2021-03-25T22:23:59.000Z | sip/execution_control/processing_block_controller/tests/test_processing_block_controller.py | SKA-ScienceDataProcessor/integration-prototype | 5875dc0489f707232534ce75daf3707f909bcd15 | [
"BSD-3-Clause"
] | 10 | 2016-05-18T09:41:36.000Z | 2019-07-04T10:19:24.000Z | # coding=utf-8
"""Unit tests of the Processing Block Controller.
http://docs.celeryproject.org/en/latest/userguide/testing.html
FIXME(BMo) At the moment these tests require that the PBC has started.
Its possible that this requirement is not needed using some
Celery testing magic.
"""
import jso... | 32.646341 | 77 | 0.692193 |
79513d3e73de790c57df097eafeae26964ff282c | 1,451 | py | Python | setup.py | MihaiBojin/python-cli-project-template | 0caef1d48e6d428f793ccbe91a30670a8c2620d9 | [
"Apache-2.0"
] | null | null | null | setup.py | MihaiBojin/python-cli-project-template | 0caef1d48e6d428f793ccbe91a30670a8c2620d9 | [
"Apache-2.0"
] | null | null | null | setup.py | MihaiBojin/python-cli-project-template | 0caef1d48e6d428f793ccbe91a30670a8c2620d9 | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
import setuptools
from src.pkg.version import __version__, __title__
with open("README.md", "r", encoding='utf8') as fh:
long_description = fh.read()
# Parse requirements.txt
packages = list()
with open('requirements/prod.txt') as fh:
for line in fh.readlines():
dep = ... | 25.910714 | 65 | 0.592006 |
79513d5c4a03ddefdd0c36260d0e50ecb46d4eef | 10,105 | py | Python | scripts/rev_version.py | skallaher/RevEng_PAJ7620 | 3165e9953f4845e050d0daad023529c2d410bc02 | [
"MIT"
] | 8 | 2021-02-16T16:39:09.000Z | 2021-09-17T01:30:56.000Z | scripts/rev_version.py | skallaher/RevEng_PAJ7620 | 3165e9953f4845e050d0daad023529c2d410bc02 | [
"MIT"
] | 38 | 2020-12-21T08:13:14.000Z | 2021-02-16T08:54:50.000Z | scripts/rev_version.py | skallaher/RevEng_PAJ7620 | 3165e9953f4845e050d0daad023529c2d410bc02 | [
"MIT"
] | 5 | 2020-12-22T05:25:32.000Z | 2021-09-30T15:35:21.000Z | #!/usr/bin/env python
"""Rev Version
Updates the version of the library in the following files
- Doxyfile # Doxygen
- library.properties # Arduino
Also updates the version of any examples which have been updated
since the last version (in <path to examples>/examples.doc)
"""
import os
import re
i... | 41.929461 | 108 | 0.66858 |
79513dee3364d4b596b7a4fe17f4f9211297bbb2 | 3,283 | py | Python | torchFI/modules/linear.py | bfgoldstein/torchfi | 6a735ecf81c39bfdfa770e6a41a66e4f88ea808b | [
"Apache-2.0"
] | 6 | 2019-10-17T17:52:43.000Z | 2020-08-12T09:08:45.000Z | torchFI/modules/linear.py | bfgoldstein/torchfi | 6a735ecf81c39bfdfa770e6a41a66e4f88ea808b | [
"Apache-2.0"
] | 1 | 2021-05-04T02:57:38.000Z | 2021-05-04T02:57:38.000Z | torchFI/modules/linear.py | bfgoldstein/torchfi | 6a735ecf81c39bfdfa770e6a41a66e4f88ea808b | [
"Apache-2.0"
] | 1 | 2020-08-12T09:08:47.000Z | 2020-08-12T09:08:47.000Z | ###############################################################
# This file was created using part of Distiller project developed by:
# NervanaSystems https://github.com/NervanaSystems/distiller
#
# Changes were applied to satisfy torchFI project needs
###############################################################
... | 37.735632 | 88 | 0.531831 |
79513e55f7625ed7448cfb04b651a6129c72aa02 | 9,927 | py | Python | mnist_4.0_batchnorm_five_layers_sigmoid.py | hughkong/asstarer | ed331aa2b4c7665f10214117510cfee099216ede | [
"Apache-2.0"
] | 1 | 2021-06-20T11:44:05.000Z | 2021-06-20T11:44:05.000Z | mnist_4.0_batchnorm_five_layers_sigmoid.py | hughkong/asstarer | ed331aa2b4c7665f10214117510cfee099216ede | [
"Apache-2.0"
] | null | null | null | mnist_4.0_batchnorm_five_layers_sigmoid.py | hughkong/asstarer | ed331aa2b4c7665f10214117510cfee099216ede | [
"Apache-2.0"
] | 1 | 2020-05-05T17:21:15.000Z | 2020-05-05T17:21:15.000Z | # encoding: UTF-8
# Copyright 2016 Google.com
#
# 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... | 46.825472 | 153 | 0.676639 |
79513e5a37a266822c68841af92a103880eed399 | 1,252 | py | Python | main.py | itsnikhil/tnb-analysis | c14bff7b0b17ae0cb49a3d23720632d1329d2bdc | [
"MIT"
] | 25 | 2020-12-04T01:40:14.000Z | 2021-12-16T13:10:20.000Z | main.py | itsnikhil/tnb-analysis | c14bff7b0b17ae0cb49a3d23720632d1329d2bdc | [
"MIT"
] | 3 | 2021-06-06T12:40:03.000Z | 2022-01-10T14:20:50.000Z | main.py | itsnikhil/tnb-analysis | c14bff7b0b17ae0cb49a3d23720632d1329d2bdc | [
"MIT"
] | 6 | 2021-03-28T16:34:09.000Z | 2021-07-31T22:27:28.000Z | import os
from datetime import datetime
from thenewboston.constants.network import MAX_POINT_VALUE
from thenewboston.utils.network import fetch
from utils.files import write_json
from utils.format_results import format_results
PRIMARY_VALIDATOR_IP = '54.219.234.129'
def fetch_account_data():
"""
Fetch all ... | 19.5625 | 58 | 0.639776 |
79513e949943ac9e7656cca2c5431b1415205ecb | 780 | py | Python | src/models/model.py | evanaze/captcha | 62d226742be7f4091e54a7ea960703812bd44fd5 | [
"MIT"
] | null | null | null | src/models/model.py | evanaze/captcha | 62d226742be7f4091e54a7ea960703812bd44fd5 | [
"MIT"
] | 3 | 2021-03-26T18:14:39.000Z | 2021-09-20T14:09:05.000Z | src/models/model.py | evanaze/captcha | 62d226742be7f4091e54a7ea960703812bd44fd5 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 32, 5, 2)
self.conv2 = nn.Conv2d(32, 64, 7, 3)
self.dropout1 = nn.Dropout2d(0.25)
self.dropout2 = nn.Dropout2d(0... | 26.896552 | 44 | 0.528205 |
79513e961b4549f94402760f10315c38cbfc605b | 17,069 | py | Python | qiskit_experiments/library/characterization/fine_amplitude.py | yoshida-ryuhei/qiskit-experiments | 82561acf86b407dcda0a9ec69fe18de2b0a592a2 | [
"Apache-2.0"
] | null | null | null | qiskit_experiments/library/characterization/fine_amplitude.py | yoshida-ryuhei/qiskit-experiments | 82561acf86b407dcda0a9ec69fe18de2b0a592a2 | [
"Apache-2.0"
] | null | null | null | qiskit_experiments/library/characterization/fine_amplitude.py | yoshida-ryuhei/qiskit-experiments | 82561acf86b407dcda0a9ec69fe18de2b0a592a2 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# 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 modifications or derivative wo... | 39.603248 | 100 | 0.635948 |
79513eeb499b2e5f0077364077eda705ac684812 | 993 | py | Python | moex/migrations/0035_auto_20201129_2111.py | ghostforpy/bonds-docker | fda77225b85264cb4ba06b15ff63bc807858425a | [
"MIT"
] | 2 | 2020-09-08T12:51:56.000Z | 2021-08-18T15:27:52.000Z | moex/migrations/0035_auto_20201129_2111.py | ghostforpy/bonds-docker | fda77225b85264cb4ba06b15ff63bc807858425a | [
"MIT"
] | 1 | 2021-12-13T20:43:35.000Z | 2021-12-13T20:43:35.000Z | moex/migrations/0035_auto_20201129_2111.py | ghostforpy/bonds-docker | fda77225b85264cb4ba06b15ff63bc807858425a | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-11-29 18:11
from django.db import migrations
from decimal import Decimal
from ..models import SecurityPortfolios,Security
def refresh_total_cost_in_rub(apps, schema_editor):
s_p = SecurityPortfolios.objects.\
select_related('security').\
select_related('port... | 30.090909 | 59 | 0.643505 |
79513f12efe5e747361181458ea2794fcc5ae115 | 8,797 | py | Python | ucscsdk/mometa/adaptor/AdaptorMenloHostPortStatsHist.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/adaptor/AdaptorMenloHostPortStatsHist.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/adaptor/AdaptorMenloHostPortStatsHist.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for AdaptorMenloHostPortStatsHist ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class AdaptorMenloHostPortStatsHistConsts():
MOST_RECENT_FALSE = "false"
... | 71.520325 | 259 | 0.689781 |
79513f1eacf0b08d6f373e50d327514b98fdf7e2 | 2,297 | py | Python | src/install_venv_app.py | muravjov/fablib | e64ba200651fa92555af6bc2a2f74606ac6495fe | [
"MIT"
] | null | null | null | src/install_venv_app.py | muravjov/fablib | e64ba200651fa92555af6bc2a2f74606ac6495fe | [
"MIT"
] | null | null | null | src/install_venv_app.py | muravjov/fablib | e64ba200651fa92555af6bc2a2f74606ac6495fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
#
# install_venv_app - утилита прописывания пути к приложению посредством механизма .pth/site.py
#
# Причина: для конечных web-приложений на Python не требуется полноценная упаковка в пакеты для virtualenv,
# так как они только потребители кода других библиотек; однако прописаться... | 34.283582 | 117 | 0.659991 |
79513fac9ff47c3aebaaa2425e05b686ee952104 | 1,225 | py | Python | manualtest/kuafu_mem.py | haosulab/SAPIEN | 6bc3f4e2be910199b793f185aea5791d9f193e4c | [
"MIT"
] | 21 | 2021-10-13T11:56:45.000Z | 2022-03-30T16:09:21.000Z | manualtest/kuafu_mem.py | haosulab/SAPIEN | 6bc3f4e2be910199b793f185aea5791d9f193e4c | [
"MIT"
] | 25 | 2021-10-20T20:14:37.000Z | 2022-03-30T05:55:15.000Z | manualtest/kuafu_mem.py | haosulab/SAPIEN | 6bc3f4e2be910199b793f185aea5791d9f193e4c | [
"MIT"
] | 5 | 2021-10-31T17:43:52.000Z | 2022-03-01T09:45:53.000Z | # A minimal example of using KuafuRenderer
#
# By Jet <i@jetd.me>
#
import sapien.core as sapien
import numpy as np
def main():
sim = sapien.Engine()
sapien.KuafuRenderer.set_log_level("debug")
config = sapien.KuafuConfig()
config.use_viewer = True
config.spp = 1
renderer = sapien.KuafuRend... | 23.557692 | 84 | 0.638367 |
79513fe0e38eb905f0efffedb478ff4f3a314d11 | 6,209 | py | Python | vit_pytorch/vit.py | rocke2020/vit-pytorch | a1f828da0c952fa56a90a71f7c88c8e0025c1d42 | [
"MIT"
] | null | null | null | vit_pytorch/vit.py | rocke2020/vit-pytorch | a1f828da0c952fa56a90a71f7c88c8e0025c1d42 | [
"MIT"
] | null | null | null | vit_pytorch/vit.py | rocke2020/vit-pytorch | a1f828da0c952fa56a90a71f7c88c8e0025c1d42 | [
"MIT"
] | null | null | null | import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange, repeat
from einops.layers.torch import Rearrange
# helpers
def pair(t):
return t if isinstance(t, tuple) else (t, t)
# classes
class PreNorm(nn.Module):
def __init__(self, dim, fn):
super().__ini... | 35.278409 | 139 | 0.568691 |
79514130475e9f190c083c6272011b4579940bfa | 5,284 | py | Python | examples/pyopencap/pyscf/cap_trajectory.py | trex47/opencap | fd641133b2abaab22c13912d97fe1fe64b132dd7 | [
"MIT"
] | null | null | null | examples/pyopencap/pyscf/cap_trajectory.py | trex47/opencap | fd641133b2abaab22c13912d97fe1fe64b132dd7 | [
"MIT"
] | null | null | null | examples/pyopencap/pyscf/cap_trajectory.py | trex47/opencap | fd641133b2abaab22c13912d97fe1fe64b132dd7 | [
"MIT"
] | null | null | null | import os
import numpy as np
import functools
from numpy import linalg as LA
import matplotlib.pyplot as plt
import argparse
#########################################
# Alter these values to suit your purposes
ref_energy = -1.1738730219803575
guess = 13.1
eta_list = np.linspace(0,10000,1001)
##########################... | 28.562162 | 113 | 0.672218 |
79514177db332a6e0db5a798c31983cac75fa3eb | 1,562 | py | Python | test.py | mudathirlawal/python-playground | db405904fc83f5ad0caedccbf08c2fe7f62abf0b | [
"MIT"
] | null | null | null | test.py | mudathirlawal/python-playground | db405904fc83f5ad0caedccbf08c2fe7f62abf0b | [
"MIT"
] | null | null | null | test.py | mudathirlawal/python-playground | db405904fc83f5ad0caedccbf08c2fe7f62abf0b | [
"MIT"
] | null | null | null | def pig_latin(text):
say = " "
# Separate the text into words
words = text.split()
new_words_list = []
for word in words:
# Create the pig latin word and add it to the list
new_words_list.append('{}{}{}'.format(word[1:], word[0], 'ay'))
# Turn the list back into a phrase
new_text = say.join(new... | 31.877551 | 116 | 0.650448 |
7951428aab3ff47b78666dacdd5263c055c8b1c5 | 1,158 | py | Python | setup.py | EliasCampos/minorm | ed0eea4b448eed2a7ffedf41301c7f226e938dfd | [
"MIT"
] | 2 | 2020-12-20T08:07:32.000Z | 2022-02-25T18:49:08.000Z | setup.py | EliasCampos/minorm | ed0eea4b448eed2a7ffedf41301c7f226e938dfd | [
"MIT"
] | null | null | null | setup.py | EliasCampos/minorm | ed0eea4b448eed2a7ffedf41301c7f226e938dfd | [
"MIT"
] | null | null | null | from pathlib import Path
from setuptools import setup
def get_version(root_path):
version_file = root_path / 'minorm' / '__init__.py'
with version_file.open() as f:
for line in f:
if line.startswith('__version__'):
return line.split('=')[1].strip().strip('"').strip("'")
R... | 30.473684 | 71 | 0.630397 |
7951436a3c5c9513cee4d685b40ae9c85b96b4e5 | 1,552 | py | Python | config/wsgi.py | misael1999/taximil-api | 7c69a7ee27cb0223c7ba61aa08116faf0f95da46 | [
"MIT"
] | null | null | null | config/wsgi.py | misael1999/taximil-api | 7c69a7ee27cb0223c7ba61aa08116faf0f95da46 | [
"MIT"
] | null | null | null | config/wsgi.py | misael1999/taximil-api | 7c69a7ee27cb0223c7ba61aa08116faf0f95da46 | [
"MIT"
] | null | null | null | """
WSGI config for Comparte Ride 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_APPLICAT... | 41.945946 | 79 | 0.79317 |
7951436e30a57826ae0379cd8681c5286b78abb6 | 4,022 | py | Python | tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 applicable ... | 36.563636 | 96 | 0.701144 |
7951449f13b4cd597030b6462fadf2c181c117c4 | 809 | py | Python | setup.py | topicaxis/text-analysis-service | e94dfd3ea4e9e2259ba61f135e77c6d702c440e6 | [
"MIT"
] | 1 | 2020-01-07T00:08:40.000Z | 2020-01-07T00:08:40.000Z | setup.py | pmatigakis/text-analysis-service | e94dfd3ea4e9e2259ba61f135e77c6d702c440e6 | [
"MIT"
] | 1 | 2019-11-02T15:41:28.000Z | 2019-11-02T15:41:28.000Z | setup.py | pmatigakis/text-analysis-service | e94dfd3ea4e9e2259ba61f135e77c6d702c440e6 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
def get_requirements():
with open("requirements.txt") as f:
requirements = [
line.strip()
for line in f
if not line.startswith("-e")
]
return requirements
def get_test_requirements():
with open("requirements... | 21.289474 | 52 | 0.613103 |
7951478782d8e34effe06bdad0b23b6fc2dd0a4f | 4,884 | py | Python | teuthology/contextutil.py | shrek-github/teuthology | 5a89fb217aaf2cd7948f7419f431230ab25053c6 | [
"MIT"
] | null | null | null | teuthology/contextutil.py | shrek-github/teuthology | 5a89fb217aaf2cd7948f7419f431230ab25053c6 | [
"MIT"
] | 1 | 2020-03-05T03:00:08.000Z | 2020-03-05T03:00:08.000Z | teuthology/contextutil.py | shrek-github/teuthology | 5a89fb217aaf2cd7948f7419f431230ab25053c6 | [
"MIT"
] | 1 | 2020-03-04T03:04:06.000Z | 2020-03-04T03:04:06.000Z | import contextlib
import sys
import logging
import time
import itertools
from teuthology.config import config
from teuthology.exceptions import MaxWhileTries
from six import reraise
log = logging.getLogger(__name__)
@contextlib.contextmanager
def nested(*managers):
"""
Like contextlib.nested but takes calla... | 33.22449 | 79 | 0.59869 |
795148dd80fc92a0199d6c5937f92fc2dab57954 | 3,666 | py | Python | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | second/builder/dataset_builder.py | zhb0920/second.pytorch | f980f3d18749b7a2830983222d1695b5cb321dae | [
"MIT"
] | null | null | null | from second.protos import input_reader_pb2
from second.data.dataset import KittiDataset
from second.data.preprocess import prep_pointcloud
import numpy as np
from second.builder import dbsampler_builder
from functools import partial
from second.utils import config_tool
def build(input_reader_config,
model_co... | 42.137931 | 111 | 0.743317 |
7951490c0d2695e682766ac457b586dbc2e538a2 | 3,080 | py | Python | pg_copy.py | ollieglass/sqlalchemy-pg-copy | 882747b7a4764631c6c5c4217a28ceb15f13ac4f | [
"MIT"
] | 2 | 2019-12-18T16:41:49.000Z | 2020-07-31T18:09:31.000Z | pg_copy.py | ollieglass/sqlalchemy-pg-copy | 882747b7a4764631c6c5c4217a28ceb15f13ac4f | [
"MIT"
] | null | null | null | pg_copy.py | ollieglass/sqlalchemy-pg-copy | 882747b7a4764631c6c5c4217a28ceb15f13ac4f | [
"MIT"
] | null | null | null | import json
import io
import datetime as dt
# ------------------------------------------------------------------------------
# CSV pre-processing
def string_to_pg_csv_string(v):
v = v.replace('\\', '\\\\') # replace single \ with \\
v = v.replace('\n', '\\n')
v = v.replace('\r', '\\r')
v = v.replace... | 26.324786 | 93 | 0.520455 |
7951497d1bde555444080015e51aeaf7dd26effe | 547 | py | Python | python/9th/test_2.py | Elendeer/homework | b17db0dddc8ce23ce047cb764f759d9ec47f6a8b | [
"MIT"
] | 1 | 2020-10-14T03:45:24.000Z | 2020-10-14T03:45:24.000Z | python/9th/test_2.py | Elendeer/homework | b17db0dddc8ce23ce047cb764f759d9ec47f6a8b | [
"MIT"
] | null | null | null | python/9th/test_2.py | Elendeer/homework | b17db0dddc8ce23ce047cb764f759d9ec47f6a8b | [
"MIT"
] | null | null | null | '''
Author : Daniel_Elendeer
Date : 2020-11-21 18:33:18
LastEditors : Daniel_Elendeer
LastEditTime : 2020-11-21 18:55:46
Description :
'''
if __name__ == '__main__':
n, k = map(int, input().split())
lst = list(range(1, n + 1))
print(lst)
idx = 0
count = k
while len(lst) != 1:
... | 18.233333 | 36 | 0.47532 |
795149baf617c7d31780bf1b40d91a07ae35b243 | 2,482 | py | Python | benchmarks/benchmarks/signal_filtering.py | smola/scipy | ff8b9d9e87a585a820846d7f459d6156ba621c4d | [
"BSD-3-Clause"
] | 2 | 2020-06-20T14:11:14.000Z | 2020-10-12T07:11:36.000Z | benchmarks/benchmarks/signal_filtering.py | smola/scipy | ff8b9d9e87a585a820846d7f459d6156ba621c4d | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmarks/signal_filtering.py | smola/scipy | ff8b9d9e87a585a820846d7f459d6156ba621c4d | [
"BSD-3-Clause"
] | 1 | 2021-10-20T08:10:46.000Z | 2021-10-20T08:10:46.000Z | from __future__ import division, absolute_import, print_function
import numpy as np
import timeit
from concurrent.futures import ThreadPoolExecutor, wait
try:
from scipy.signal import lfilter, firwin, decimate, butter, sosfilt
except ImportError:
pass
from .common import Benchmark
class Decimate(Benchmark):... | 28.204545 | 82 | 0.616035 |
79514ac8aaf153c1a4bc7e7dba08e9a507ad15fa | 1,031 | py | Python | python/test/test_inference_service_list.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 6 | 2021-02-18T14:37:54.000Z | 2022-01-13T13:27:43.000Z | python/test/test_inference_service_list.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 14 | 2021-01-04T16:32:03.000Z | 2021-12-13T17:53:59.000Z | python/test/test_inference_service_list.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 7 | 2021-03-17T09:05:55.000Z | 2022-01-05T10:39:56.000Z | # coding: utf-8
"""
Seldon Deploy API
API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501
OpenAPI spec version: v1alpha1
Contact: hello@seldon.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future... | 25.146341 | 122 | 0.734239 |
79514bea4a06e27854cdd81f2a682b80f6c6fa3d | 1,916 | py | Python | TUI/PlaySound.py | ApachePointObservatory/TUI | 8f130368254161a2748167b7c8260cc24170c28c | [
"BSD-3-Clause"
] | 1 | 2020-01-28T06:28:00.000Z | 2020-01-28T06:28:00.000Z | TUI/PlaySound.py | ApachePointObservatory/TUI | 8f130368254161a2748167b7c8260cc24170c28c | [
"BSD-3-Clause"
] | 1 | 2017-06-05T22:53:58.000Z | 2017-06-05T22:53:58.000Z | TUI/PlaySound.py | r-owen/TUI | 8f130368254161a2748167b7c8260cc24170c28c | [
"BSD-3-Clause"
] | 1 | 2020-01-28T06:28:02.000Z | 2020-01-28T06:28:02.000Z | #!/usr/bin/env python
"""Play each of the standard sounds for TUI.
Gets the sounds from TUI preferences.
2003-04-28 ROwen Minimal implementation.
2003-10-30 ROwen Added msgReceived.
2003-11-24 ROwen Moved to TUI.Sounds; changed to use sound prefs.
2003-12-03 ROwen Added exposureBegins, exposureEnds, guidi... | 25.891892 | 84 | 0.7119 |
79514c332631574ac04f6a851b3e3e7f51959d91 | 2,088 | py | Python | apps/contact/views.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 32 | 2017-02-22T13:38:38.000Z | 2022-03-31T23:29:54.000Z | apps/contact/views.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 694 | 2017-02-15T23:09:52.000Z | 2022-03-31T23:16:07.000Z | apps/contact/views.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 35 | 2017-09-02T21:13:09.000Z | 2022-02-21T11:30:30.000Z | import logging
from django.contrib import messages
from django.core.mail import EmailMessage
from django.shortcuts import redirect, render
from apps.contact.forms import ContactForm
# Index page
def index(request):
context = {"form": ContactForm}
return render(request, "contact/index.html", context)
def c... | 29.828571 | 90 | 0.566092 |
79514dc63cefb88fa908e188c15efb3d20f5fd3f | 26,829 | py | Python | CountyMapbook/CountyMapbook_v2.py | adambreznicky/smudge_python | af7ba221890253ac6fe7f38691b351861f8b3d96 | [
"MIT"
] | 1 | 2017-05-24T02:05:20.000Z | 2017-05-24T02:05:20.000Z | CountyMapbook/CountyMapbook_v2.py | adambreznicky/smudge_python | af7ba221890253ac6fe7f38691b351861f8b3d96 | [
"MIT"
] | null | null | null | CountyMapbook/CountyMapbook_v2.py | adambreznicky/smudge_python | af7ba221890253ac6fe7f38691b351861f8b3d96 | [
"MIT"
] | null | null | null | __file__ = 'CountyMapbook_v1'
__date__ = '6/18/2014'
__author__ = 'ABREZNIC'
import os, arcpy,datetime
from arcpy import env
from reportlab.lib import colors
from reportlab.lib.units import inch
from reportlab.platypus import BaseDocTemplate, Paragraph, frames, Table, TableStyle, Frame, flowables, Flowable, PageTemplat... | 53.021739 | 202 | 0.523948 |
79514e09e1d51f8e7065d45bcfab6dc44035c06a | 11,386 | py | Python | auth0/v3/management/users.py | emfloyd2/auth0-python | c99e7fccb050740051f13785775a116684cf0006 | [
"MIT"
] | null | null | null | auth0/v3/management/users.py | emfloyd2/auth0-python | c99e7fccb050740051f13785775a116684cf0006 | [
"MIT"
] | null | null | null | auth0/v3/management/users.py | emfloyd2/auth0-python | c99e7fccb050740051f13785775a116684cf0006 | [
"MIT"
] | null | null | null | from .rest import RestClient
class Users(object):
"""Auth0 users endpoints
Args:
domain (str): Your Auth0 domain, e.g: 'username.auth0.com'
token (str): Management API v2 Token
telemetry (bool, optional): Enable or disable Telemetry
(defaults to True)
"""
def _... | 34.192192 | 93 | 0.589232 |
79514f822ed57b90a3ac05a7838024972a9877ea | 76,582 | py | Python | nova/tests/network/test_neutronv2.py | citrix-openstack-build/nova | e5fc28adda4b95325f74402fe63ea969e816e6c3 | [
"Apache-2.0"
] | null | null | null | nova/tests/network/test_neutronv2.py | citrix-openstack-build/nova | e5fc28adda4b95325f74402fe63ea969e816e6c3 | [
"Apache-2.0"
] | null | null | null | nova/tests/network/test_neutronv2.py | citrix-openstack-build/nova | e5fc28adda4b95325f74402fe63ea969e816e6c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 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 requi... | 44.55032 | 79 | 0.584889 |
79515123dae0695a6504167d5adb4253989226f5 | 886 | py | Python | pygmsh/opencascade/box.py | jorgensd/pygmsh | 64fa6dbc78c6270241c1576b80370123436cd07b | [
"MIT"
] | 1 | 2022-03-13T04:39:03.000Z | 2022-03-13T04:39:03.000Z | pygmsh/opencascade/box.py | kurtsansom/pygmsh | 9c2cfe1c6c7f80943f61f3e695a453e343544619 | [
"MIT"
] | null | null | null | pygmsh/opencascade/box.py | kurtsansom/pygmsh | 9c2cfe1c6c7f80943f61f3e695a453e343544619 | [
"MIT"
] | null | null | null | from .volume_base import VolumeBase
class Box(VolumeBase):
"""
Creates a box.
Parameters
----------
x0 : array-like[3]
List containing the x, y, z values of the start point.
extends : array-like[3]
List of the 3 extents of the box edges.
char_length : float
Charact... | 24.611111 | 67 | 0.551919 |
79515210babf07fcb797cec5475cafbc2f0e44e6 | 735 | py | Python | ecg/examples/cinc17/entry/evaler.py | yanagiragi/ECG-acquisition-classification | 1c84211a304dacd18232c86fe38811a7bb4b7b77 | [
"Apache-2.0"
] | 35 | 2019-05-15T16:11:00.000Z | 2022-01-12T03:29:10.000Z | ecg/examples/cinc17/entry/evaler.py | HabibMrad/ECG-acquisition-classification | d50985c8a774d8f6eebcc2a9750fe3485b389815 | [
"Apache-2.0"
] | 9 | 2020-01-28T22:44:44.000Z | 2022-02-10T00:09:38.000Z | ecg/examples/cinc17/entry/evaler.py | HabibMrad/ECG-acquisition-classification | d50985c8a774d8f6eebcc2a9750fe3485b389815 | [
"Apache-2.0"
] | 26 | 2019-05-21T06:23:20.000Z | 2022-03-10T17:35:13.000Z | import json
import keras
import numpy as np
import scipy.io as sio
import scipy.stats as sst
import load
import network
import util
def predict(record):
ecg = load.load_ecg(record +".mat")
preproc = util.load(".")
x = preproc.process_x([ecg])
params = json.load(open("config.json"))
params.update(... | 22.272727 | 67 | 0.657143 |
79515322ebad3fb53310683ab29ba78b416618b4 | 5,960 | py | Python | syntropy_sdk/models/user_data_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | 1 | 2020-12-17T17:30:12.000Z | 2020-12-17T17:30:12.000Z | syntropy_sdk/models/user_data_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | syntropy_sdk/models/user_data_response.py | SyntropyNet/syntropy-python-sdk | 27b7756b136f83886fd2a6e342fa4d4073779ff7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
syntropy-auth-service
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
i... | 28.792271 | 119 | 0.574161 |
795153994b28df8d73264f3cd68bd874c69e86e9 | 13,739 | py | Python | extract_color_mesh.py | U-sepSick/NeRF | c5910f84321eb5f72e3332507b0384f1b23f51f7 | [
"MIT"
] | 993 | 2020-04-20T02:32:58.000Z | 2022-03-31T15:51:51.000Z | extract_color_mesh.py | U-sepSick/NeRF | c5910f84321eb5f72e3332507b0384f1b23f51f7 | [
"MIT"
] | 142 | 2020-04-20T15:15:30.000Z | 2022-03-31T11:54:27.000Z | extract_color_mesh.py | U-sepSick/NeRF | c5910f84321eb5f72e3332507b0384f1b23f51f7 | [
"MIT"
] | 210 | 2020-05-03T06:16:24.000Z | 2022-03-30T06:30:57.000Z | import torch
import os
import numpy as np
import cv2
from PIL import Image
from collections import defaultdict
from tqdm import tqdm
import mcubes
import open3d as o3d
from plyfile import PlyData, PlyElement
from argparse import ArgumentParser
from models.rendering import *
from models.nerf import *
from utils import... | 45.796667 | 105 | 0.594803 |
7951549885efb88bc1edb83caae759ffad5ff681 | 794 | py | Python | firstapp/firstapp/urls.py | aiegoo/django | 2f508a318edd26403509a61eb44e99fda8b7ed64 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | firstapp/firstapp/urls.py | aiegoo/django | 2f508a318edd26403509a61eb44e99fda8b7ed64 | [
"bzip2-1.0.6",
"MIT"
] | 8 | 2020-02-12T03:14:20.000Z | 2022-03-11T23:59:53.000Z | firstapp/firstapp/urls.py | aiegoo/django | 2f508a318edd26403509a61eb44e99fda8b7ed64 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | """firstapp 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.521739 | 77 | 0.701511 |
795155ed2440b3ec0207c8d5c044c269d9b27057 | 10,940 | py | Python | linux/bin/dmenu-frecency.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | 4 | 2020-04-07T14:45:02.000Z | 2021-12-28T22:43:16.000Z | linux/bin/dmenu-frecency.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | null | null | null | linux/bin/dmenu-frecency.py | nevesnunes/env | 7a5e3816334337e04a87e1a2e4dc322215901744 | [
"MIT"
] | 2 | 2020-04-08T03:12:06.000Z | 2021-03-04T20:33:03.000Z | #!/usr/bin/env python
"""Dmenu launcher with history sorted by frecency.
Usage:
dmenu-frecency [--read-apps]
Options:
--read-apps rereads all .desktop files.
"""
from docopt import docopt
import os
import sys
import xdg.BaseDirectory
from xdg.DesktopEntry import DesktopEntry
from subprocess import Po... | 33.25228 | 100 | 0.543601 |
7951566bdd729b13d1042abd4eb51e249413f327 | 452 | py | Python | clusterapp/features/TimeParameters/StartTimeParameter.py | ealmuina/thesis | d436ae0c6f775c56b2072889ceafae1507291c74 | [
"MIT"
] | 1 | 2018-02-11T07:36:31.000Z | 2018-02-11T07:36:31.000Z | clusterapp/features/TimeParameters/StartTimeParameter.py | ealmuina/thesis | d436ae0c6f775c56b2072889ceafae1507291c74 | [
"MIT"
] | null | null | null | clusterapp/features/TimeParameters/StartTimeParameter.py | ealmuina/thesis | d436ae0c6f775c56b2072889ceafae1507291c74 | [
"MIT"
] | null | null | null | import numpy as np
from .TimeParameter import TimeParameter
from .__init__ import *
class StartTimeParameter(TimeParameter):
name = 'StartTime'
"""docstring for StartTimeParameter"""
def __init__(self):
super(TimeParameter, self).__init__()
def measure(self, segment):
value = segme... | 22.6 | 74 | 0.70354 |
7951568f8bb478a934e278554c4b65789cd0c5f2 | 7,973 | py | Python | OnlineJudge/account/views/admin.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | 2 | 2020-03-07T02:26:00.000Z | 2020-06-01T15:03:17.000Z | OnlineJudge/account/views/admin.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | null | null | null | OnlineJudge/account/views/admin.py | FrozenWhalePP/OnlineJudge | aec81292046b4a0896ff164565b490dc37bd91cb | [
"MIT"
] | null | null | null | import os
import re
import xlsxwriter
from django.db import transaction, IntegrityError
from django.db.models import Q
from django.http import HttpResponse
from django.contrib.auth.hashers import make_password
from submission.models import Submission
from utils.api import APIView, validate_serializer
from ... | 39.275862 | 116 | 0.598269 |
79515834f7dfae204a53de88d3192612ce8acb78 | 2,181 | py | Python | run.py | eric-sentient/MIDI-reAE-chords | ac16210bbeb822cb4babb95974a4a05d527763cc | [
"MIT"
] | null | null | null | run.py | eric-sentient/MIDI-reAE-chords | ac16210bbeb822cb4babb95974a4a05d527763cc | [
"MIT"
] | null | null | null | run.py | eric-sentient/MIDI-reAE-chords | ac16210bbeb822cb4babb95974a4a05d527763cc | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from keras.callbacks import EarlyStopping, ModelCheckpoint
from keras import models
import model
import load_train
from random import randrange
BATCH_SIZE = 400
EPOCHS = 100
VERBOSE = True
LOAD = Fal... | 24.784091 | 101 | 0.659789 |
7951589169affccbe27ad8c97ce896cd3d70f086 | 26,486 | py | Python | tests/test_cli.py | alandtse/python-semantic-release | b58fbc16bf5145bc512ccce71561ed6fada68b90 | [
"MIT"
] | 3 | 2019-09-30T12:47:32.000Z | 2020-06-15T14:55:16.000Z | tests/test_cli.py | alandtse/python-semantic-release | b58fbc16bf5145bc512ccce71561ed6fada68b90 | [
"MIT"
] | null | null | null | tests/test_cli.py | alandtse/python-semantic-release | b58fbc16bf5145bc512ccce71561ed6fada68b90 | [
"MIT"
] | 1 | 2019-09-30T12:47:49.000Z | 2019-09-30T12:47:49.000Z | from click.testing import CliRunner
import semantic_release
from semantic_release.cli import changelog, main, publish, version
from semantic_release.errors import GitError, ImproperConfigurationError
from . import mock, pytest, reset_config
from .mocks import mock_version_file
assert reset_config
@pytest.fixture
d... | 47.808664 | 97 | 0.708941 |
795158bc3d98d0b60da961b8d2ff0a91e982952d | 73,097 | py | Python | examples/pytorch_pretrained_bert/modeling_conv.py | ankit-ai/BertQA-Attention-on-Steroids | 49c3de360f88f55c8442b9f8153af56c28a689a9 | [
"Apache-2.0"
] | 122 | 2019-03-21T05:47:45.000Z | 2021-12-16T06:57:37.000Z | examples/pytorch_pretrained_bert/modeling_conv.py | TigerMachineLearning/BertQA-Attention-on-Steroids | 49c3de360f88f55c8442b9f8153af56c28a689a9 | [
"Apache-2.0"
] | 2 | 2019-06-10T03:35:06.000Z | 2020-04-16T07:23:23.000Z | examples/pytorch_pretrained_bert/modeling_conv.py | TigerMachineLearning/BertQA-Attention-on-Steroids | 49c3de360f88f55c8442b9f8153af56c28a689a9 | [
"Apache-2.0"
] | 16 | 2019-03-21T12:21:10.000Z | 2021-12-16T06:47:59.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
# Copyright (c) 2018, 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... | 49.557288 | 145 | 0.686198 |
795159781025b9c3bf600d1d006e88ef620ca937 | 5,909 | py | Python | src/3-postprocess/peaks.py | DirkEilander/compound_hotspots | f9d7960633be80e8e24d2f2563df367cc3f060c6 | [
"BSD-3-Clause"
] | 1 | 2022-01-17T07:02:13.000Z | 2022-01-17T07:02:13.000Z | src/3-postprocess/peaks.py | DirkEilander/compound_hotspots | f9d7960633be80e8e24d2f2563df367cc3f060c6 | [
"BSD-3-Clause"
] | null | null | null | src/3-postprocess/peaks.py | DirkEilander/compound_hotspots | f9d7960633be80e8e24d2f2563df367cc3f060c6 | [
"BSD-3-Clause"
] | 1 | 2022-01-17T02:48:28.000Z | 2022-01-17T02:48:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Dirk Eilander (contact: dirk.eilander@vu.nl)
# Created: Nov 2nd 2018
import xarray as xr
import numpy as np
import scipy
__all__ = ['get_peaks', 'peaks_over_threshold', 'annual_max']
def get_peaks(ts, min_dist=1, dim='time', chunks={}):
"""Re... | 37.636943 | 118 | 0.636994 |
79515a5b7fa0aea185bc44cdb12a87246824ca6a | 12,386 | py | Python | nipype/utils/config.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | null | null | null | nipype/utils/config.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 2 | 2018-04-26T12:09:32.000Z | 2018-04-27T06:36:49.000Z | nipype/utils/config.py | PAmcconnell/nipype | 39fbd5411a844ce7c023964d3295eb7643b95af5 | [
"Apache-2.0"
] | 1 | 2019-11-14T14:16:57.000Z | 2019-11-14T14:16:57.000Z | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
'''
Created on 20 Apr 2010
logging options : INFO, DEBUG
hash_method : content, timestamp
@author: Chris Filo Gorgolewski
'''
import os
import sys
import errno
import atexit
from w... | 34.121212 | 79 | 0.591313 |
79515bdb18c08bbced49fbaf4464b1d47a1db895 | 6,434 | py | Python | furnace/engine/evaluator.py | lxxue/cil-road-segmentation-2019 | c6477556dc3d6d9c8ed2f2a3f185b4d986a03bb4 | [
"MIT"
] | null | null | null | furnace/engine/evaluator.py | lxxue/cil-road-segmentation-2019 | c6477556dc3d6d9c8ed2f2a3f185b4d986a03bb4 | [
"MIT"
] | null | null | null | furnace/engine/evaluator.py | lxxue/cil-road-segmentation-2019 | c6477556dc3d6d9c8ed2f2a3f185b4d986a03bb4 | [
"MIT"
] | 1 | 2020-06-08T02:09:18.000Z | 2020-06-08T02:09:18.000Z | import os
import os.path as osp
import cv2
import numpy as np
import time
from tqdm import tqdm
import torch
import torch.nn.functional as F
import torch.multiprocessing as mp
from engine.logger import get_logger
from utils.pyt_utils import load_model, link_file, ensure_dir
from utils.img_utils import pad_image_to_sh... | 34.042328 | 77 | 0.580199 |
79515c155a33611319d9e17abf536a7e050a3441 | 15,510 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 36.153846 | 106 | 0.655255 |
79515c9cac1a0457daf2ae4d45c2a78f723e64f1 | 6,991 | py | Python | multiagent/core.py | Latronists/Two-Layer-Reinforcement-Learning | 91dbadf1a385e42c0eeea8a6329ed164edddb41b | [
"MIT"
] | null | null | null | multiagent/core.py | Latronists/Two-Layer-Reinforcement-Learning | 91dbadf1a385e42c0eeea8a6329ed164edddb41b | [
"MIT"
] | null | null | null | multiagent/core.py | Latronists/Two-Layer-Reinforcement-Learning | 91dbadf1a385e42c0eeea8a6329ed164edddb41b | [
"MIT"
] | null | null | null | import numpy as np
# physical/external base state of all entites
class EntityState(object):
def __init__(self):
# physical position
self.p_pos = None
# physical velocity
self.p_vel = None
# state of agents (including communication and internal/mental state)
class AgentState(EntityS... | 35.48731 | 118 | 0.602918 |
79515d2f037a3eec6a827a2696f87ca8b9a82a69 | 98 | py | Python | fibonacci-serisi.py | melihcemipek/python | a0e6e8e5fbffb481c158f19181c10de6e58a8a13 | [
"MIT"
] | null | null | null | fibonacci-serisi.py | melihcemipek/python | a0e6e8e5fbffb481c158f19181c10de6e58a8a13 | [
"MIT"
] | null | null | null | fibonacci-serisi.py | melihcemipek/python | a0e6e8e5fbffb481c158f19181c10de6e58a8a13 | [
"MIT"
] | null | null | null | maks = 100
a, b = 1, 1
print(a)
for i in range(maks):
print(b)
t = b
b += a
a = t | 10.888889 | 21 | 0.44898 |
79515ddfdb84ae73131a49d896ea33ace93c571b | 2,834 | py | Python | 0608.Labour & Income - European Union - Eurostat - Labour Market - Unemployment Rate.py | alphacastio/connectors-eurostats | 297c92f667649469def9b1d140eab0aecb86fa89 | [
"MIT"
] | null | null | null | 0608.Labour & Income - European Union - Eurostat - Labour Market - Unemployment Rate.py | alphacastio/connectors-eurostats | 297c92f667649469def9b1d140eab0aecb86fa89 | [
"MIT"
] | null | null | null | 0608.Labour & Income - European Union - Eurostat - Labour Market - Unemployment Rate.py | alphacastio/connectors-eurostats | 297c92f667649469def9b1d140eab0aecb86fa89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import requests
import numpy as np
import pandas as pd
from alphacast import Alphacast
from dotenv import dotenv_values
API_KEY = dotenv_values(".env").get("API_KEY")
alphacast = Alphacast(API_KEY)
# In[2]:
df = pd.read_csv('https://ec.europa.eu/eurostat/databrowser... | 32.574713 | 133 | 0.632322 |
79515e47eb5124f52dec27a29f8af3c5dd927343 | 27,136 | py | Python | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"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 ... | 51.103578 | 99 | 0.621315 |
79515e4e562fb7390476bdcffeb32decbf7ee83b | 1,853 | py | Python | behavior_analysis/apps/utils/table_subjects.py | Tauffer-Consulting/behavior-analysis | 2286354d733e1ff947ba9bbc410aa51aaa85340b | [
"MIT"
] | null | null | null | behavior_analysis/apps/utils/table_subjects.py | Tauffer-Consulting/behavior-analysis | 2286354d733e1ff947ba9bbc410aa51aaa85340b | [
"MIT"
] | null | null | null | behavior_analysis/apps/utils/table_subjects.py | Tauffer-Consulting/behavior-analysis | 2286354d733e1ff947ba9bbc410aa51aaa85340b | [
"MIT"
] | null | null | null | from ...models import Experiment, Group, Subject
import dash
import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, State, ALL
from dash.dash import no_update
import random
import string
class SubjectsTable(dbc.Table)... | 31.40678 | 117 | 0.562331 |
79515e70ffeb688736deadf3743e6e19f3b7b77d | 10,701 | py | Python | filter/filter.py | CRAWLZSTAGE/infra | d0f4d60a63cabf424f76dfbeba33dd64b48c7c98 | [
"MIT"
] | null | null | null | filter/filter.py | CRAWLZSTAGE/infra | d0f4d60a63cabf424f76dfbeba33dd64b48c7c98 | [
"MIT"
] | null | null | null | filter/filter.py | CRAWLZSTAGE/infra | d0f4d60a63cabf424f76dfbeba33dd64b48c7c98 | [
"MIT"
] | null | null | null | import os, sys
import pika
import json
import time
import traceback
from peewee import *
from datetime import datetime
MQTT_HOST = os.environ.get('MQTT_HOST')
MQTT_USER = os.environ.get('MQTT_USER')
MQTT_PASSWORD = os.environ.get('MQTT_PASSWORD')
DB_HOST = os.environ.get('DB_HOST')
DB_PASSWORD = os.environ.get('DB_PA... | 34.298077 | 122 | 0.59387 |
79515f4ed96d0b75eedf24bf6631955c7498b999 | 1,608 | py | Python | byceps/services/ticketing/dbmodels/archived_attendance.py | homeworkprod/byceps | cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e | [
"BSD-3-Clause"
] | 23 | 2015-08-03T23:28:54.000Z | 2018-12-12T20:11:45.000Z | byceps/services/ticketing/dbmodels/archived_attendance.py | homeworkprod/byceps | cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e | [
"BSD-3-Clause"
] | 1 | 2018-09-30T18:18:24.000Z | 2018-09-30T18:18:24.000Z | byceps/services/ticketing/dbmodels/archived_attendance.py | homeworkprod/byceps | cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e | [
"BSD-3-Clause"
] | 9 | 2015-08-06T16:41:36.000Z | 2018-09-25T11:17:31.000Z | """
byceps.services.ticketing.dbmodels.archived_attendance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import datetime
from ....database import db
from ....typing import PartyID, UserID
from... | 34.212766 | 87 | 0.682836 |
795160b511a4ad501525fe77bb37ed063e487a72 | 3,116 | py | Python | src/graphql/utilities/value_from_ast_untyped.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | 590 | 2015-10-06T18:22:49.000Z | 2022-03-22T16:32:17.000Z | src/graphql/utilities/value_from_ast_untyped.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | 300 | 2015-10-06T18:58:11.000Z | 2022-03-22T14:01:44.000Z | src/graphql/utilities/value_from_ast_untyped.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | 270 | 2015-10-08T19:47:38.000Z | 2022-03-10T04:17:51.000Z | from math import nan
from typing import Any, Callable, Dict, Optional, Union
from ..language import (
ValueNode,
BooleanValueNode,
EnumValueNode,
FloatValueNode,
IntValueNode,
ListValueNode,
NullValueNode,
ObjectValueNode,
StringValueNode,
VariableNode,
)
from ..pyutils import ... | 28.072072 | 88 | 0.64249 |
795161216b55a848c6544b630313a9a7c9ec5eed | 3,780 | py | Python | clients/python/openapi_client/api/search_api.py | Soluto/tweek-openapi-clients | feee32006743ea4bb815f2608bd95950439388c3 | [
"Apache-2.0"
] | null | null | null | clients/python/openapi_client/api/search_api.py | Soluto/tweek-openapi-clients | feee32006743ea4bb815f2608bd95950439388c3 | [
"Apache-2.0"
] | null | null | null | clients/python/openapi_client/api/search_api.py | Soluto/tweek-openapi-clients | feee32006743ea4bb815f2608bd95950439388c3 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Tweek
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2... | 30.983607 | 124 | 0.607937 |
795163f7738e16cd3c27c8c3f0469c4324e77114 | 81 | py | Python | chobo/week3/10818.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | 3 | 2022-01-24T03:06:32.000Z | 2022-01-30T08:43:58.000Z | chobo/week3/10818.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | null | null | null | chobo/week3/10818.py | Kwak-JunYoung/154Algoritm-5weeks | fa18ae5f68a1ee722a30a05309214247f7fbfda4 | [
"MIT"
] | 2 | 2022-01-24T02:27:40.000Z | 2022-01-30T08:57:03.000Z | input()
nums = list(map(int, input().split()))
print(f'{min(nums)} {max(nums)}')
| 20.25 | 38 | 0.604938 |
7951641b6f30250d91b693fda49f1bfd1072509d | 1,459 | py | Python | allennlp/common/testing/test_case.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | 1 | 2020-02-24T10:21:37.000Z | 2020-02-24T10:21:37.000Z | allennlp/common/testing/test_case.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | null | null | null | allennlp/common/testing/test_case.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import pathlib
import shutil
import tempfile
from unittest import TestCase
from allennlp.common.checks import log_pytorch_version_info
TEST_DIR = tempfile.mkdtemp(prefix="allennlp_tests")
class AllenNlpTestCase(TestCase):
"""
A custom subclass of `unittest.TestCase` that disables so... | 33.930233 | 98 | 0.697738 |
795164b26388a35bad25c9f4a102944a758b997a | 18,797 | py | Python | consolidation.py | frc1678/server-2019 | 5ccf17945cbed9dd9587d55349a59a73ed06063c | [
"MIT"
] | 2 | 2019-07-31T14:18:11.000Z | 2019-11-19T14:16:36.000Z | consolidation.py | frc1678/server-2019 | 5ccf17945cbed9dd9587d55349a59a73ed06063c | [
"MIT"
] | null | null | null | consolidation.py | frc1678/server-2019 | 5ccf17945cbed9dd9587d55349a59a73ed06063c | [
"MIT"
] | 3 | 2019-07-30T21:57:21.000Z | 2020-01-01T16:03:06.000Z | """Functions that are used for the consolidation of tempTIMDs into one TIMD.
The main function in this file is consolidate_temp_timds(), which is
called in calculate_timd.py."""
# External imports
import collections
import numpy as np
# No internal imports
def consolidate_times(times):
"""Takes in multiple time o... | 45.293976 | 79 | 0.63026 |
795164e9b019d5e0233e60502428b4c2cb401ddf | 4,647 | py | Python | scripts/scrape_cgc.py | eklipse2009/ZX-Pokemaster | 113bf2e242347b475cca9eadbae4f1b67f498466 | [
"MIT"
] | 8 | 2018-11-18T00:37:25.000Z | 2020-12-06T13:17:53.000Z | scripts/scrape_cgc.py | eklipse2009/ZX-Pokemaster | 113bf2e242347b475cca9eadbae4f1b67f498466 | [
"MIT"
] | 8 | 2017-08-21T10:07:58.000Z | 2020-03-29T18:23:37.000Z | scripts/scrape_cgc.py | eklipse2009/ZX-Pokemaster | 113bf2e242347b475cca9eadbae4f1b67f498466 | [
"MIT"
] | 1 | 2021-03-04T17:43:36.000Z | 2021-03-04T17:43:36.000Z | import os
import glob
import shutil
import zipfile
from functions.game_name_functions import *
if (os.getcwd().endswith('scripts')):
os.chdir('..')
from classes.scraper import *
def scrape_csscgc():
# if os.path.exists('tosec\\CSSCGC Games'):
# shutil.rmtree('tosec\\CSSCGC Games')
s = Scraper()
... | 49.967742 | 114 | 0.497095 |
795165d401ebb174438275a9ed6fbb6232480959 | 53,255 | py | Python | python/ccxt/async_support/bittrex.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 1 | 2021-03-01T17:45:33.000Z | 2021-03-01T17:45:33.000Z | python/ccxt/async_support/bittrex.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 4 | 2020-09-07T00:20:58.000Z | 2021-05-10T09:04:56.000Z | python/ccxt/async_support/bittrex.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 1 | 2019-11-08T12:36:13.000Z | 2019-11-08T12:36:13.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 41.540562 | 156 | 0.489738 |
795165d849e9147efabacf6e1a21c6ee5e001e71 | 2,609 | py | Python | cogs/utils/activity.py | keyb0ards/reaction-light | 7297c6b9aad9c1fd06480f93f0edd1e59922f5a5 | [
"MIT"
] | 123 | 2019-12-07T02:32:50.000Z | 2022-03-15T14:38:13.000Z | cogs/utils/activity.py | keyb0ards/reaction-light | 7297c6b9aad9c1fd06480f93f0edd1e59922f5a5 | [
"MIT"
] | 72 | 2020-01-21T06:45:13.000Z | 2022-03-27T01:41:54.000Z | cogs/utils/activity.py | keyb0ards/reaction-light | 7297c6b9aad9c1fd06480f93f0edd1e59922f5a5 | [
"MIT"
] | 80 | 2019-11-11T13:55:10.000Z | 2022-03-18T21:44:20.000Z | """
MIT License
Copyright (c) 2019-present eibex
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | 32.6125 | 80 | 0.653124 |
795166d065cee9e4322604c4ab94b5f40733aad8 | 5,538 | py | Python | tanit/master/client/user_service.py | yassineazzouz/kraken | 30d536eae2583e6fff51becbff836301058b8e69 | [
"MIT"
] | 1 | 2020-09-01T15:16:11.000Z | 2020-09-01T15:16:11.000Z | tanit/master/client/user_service.py | yassineazzouz/kraken | 30d536eae2583e6fff51becbff836301058b8e69 | [
"MIT"
] | null | null | null | tanit/master/client/user_service.py | yassineazzouz/kraken | 30d536eae2583e6fff51becbff836301058b8e69 | [
"MIT"
] | null | null | null | import abc
import logging as lg
import json
from thrift.protocol import TBinaryProtocol
from thrift.protocol.TMultiplexedProtocol import TMultiplexedProtocol
from thrift.transport import TSocket
from thrift.transport import TTransport
import six
from ..core.worker.worker import WorkerStats
from ...common.thrift.util... | 29.935135 | 106 | 0.670639 |
795167846abefd942dbedb043c952ea8e794be24 | 4,655 | py | Python | CWS/binance.py | aktasr/CWS | 9829e5fcca958e5c875d8ffdeeffe5d9b1ac68a6 | [
"MIT"
] | 2 | 2021-04-21T21:31:52.000Z | 2021-09-10T00:43:04.000Z | CWS/binance.py | aktasr/CWS | 9829e5fcca958e5c875d8ffdeeffe5d9b1ac68a6 | [
"MIT"
] | null | null | null | CWS/binance.py | aktasr/CWS | 9829e5fcca958e5c875d8ffdeeffe5d9b1ac68a6 | [
"MIT"
] | null | null | null | #Author : Ramazan AKTAS
#Date : 20.02.2021 22:30
from base.exchange import exchange
import time
class binance(exchange):
"""description of class"""
# user can be subscribe one or more market(symbol). F.e: suscriber_trade = ['BTCTRY', 'BTCUSDT']
# also user can be subscribe all markets(symbols). F.e: s... | 35.807692 | 137 | 0.533405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.