hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32390574078c22a929abd1f5d6de9e9a77027363 | 19,445 | py | Python | src/framework/vm2vmLib.py | securedataplane/mts | 9ffe415ce586600e558e7a2855348c9cd1651f49 | [
"MIT"
] | 1 | 2022-03-10T13:00:25.000Z | 2022-03-10T13:00:25.000Z | src/framework/vm2vmLib.py | securedataplane/mts | 9ffe415ce586600e558e7a2855348c9cd1651f49 | [
"MIT"
] | 1 | 2019-07-23T08:49:09.000Z | 2019-07-23T08:49:09.000Z | src/framework/vm2vmLib.py | securedataplane/mts | 9ffe415ce586600e558e7a2855348c9cd1651f49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 9 10:30:56 2018
@author: saad
"""
import expLib as exp
from datetime import datetime
###############################################################################
DpdkMem="1024,0"
#Destination MAC (needed for Flow Rules)
outDestMac="00:00:00:00... | 36.619586 | 98 | 0.475546 |
4d5733dc21b2dd7bb8e9d525da478e5b9cfa9d15 | 1,166 | py | Python | filterconfig.py | bpmbank/xiaohuangji-new | 3eafcbdbf4379eee3064bd6cbb1c7807d8d54b2d | [
"MIT"
] | 311 | 2015-01-15T10:09:41.000Z | 2022-02-25T04:32:52.000Z | filterconfig.py | larusx/xiaohuangji-new | bae882487416483af0ef94206a232d93f843d85d | [
"MIT"
] | 5 | 2015-11-07T12:50:53.000Z | 2017-12-06T07:25:54.000Z | filterconfig.py | larusx/xiaohuangji-new | bae882487416483af0ef94206a232d93f843d85d | [
"MIT"
] | 129 | 2015-06-26T02:30:46.000Z | 2021-09-11T05:58:48.000Z | #-*-coding:utf-8-*-
"""
Copyright (c) 2012 Qijiang Fan <fqj1994@gmail.com>
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, cop... | 37.612903 | 70 | 0.786449 |
8814ce443df24387952f3781612a4cacebe6c241 | 31,668 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 36.823256 | 191 | 0.655962 |
b100138aefddba8738737c3b970841dcbba9b6a1 | 74 | py | Python | Lib/site-packages/amf/Util/Body.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/amf/Util/Body.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/amf/Util/Body.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | class Body:
target = ""
value = ""
response = ""
type = "" | 14.8 | 17 | 0.432432 |
f9b144fa493902408cf2e346393a2e2b19decfc2 | 542 | py | Python | abyssal_market/settings/local.template.py | kimnnmadsen/eve-abyssal-market | 1e07498b98be9282b969badff51d55258c72e7ed | [
"MIT"
] | 13 | 2018-08-23T14:27:22.000Z | 2020-12-07T12:35:38.000Z | abyssal_market/settings/local.template.py | kimnnmadsen/eve-abyssal-market | 1e07498b98be9282b969badff51d55258c72e7ed | [
"MIT"
] | 25 | 2018-10-09T14:37:33.000Z | 2020-05-15T20:21:48.000Z | abyssal_market/settings/local.template.py | kimnnmadsen/eve-abyssal-market | 1e07498b98be9282b969badff51d55258c72e7ed | [
"MIT"
] | 4 | 2021-08-12T05:34:05.000Z | 2022-01-06T05:28:36.000Z | # flake8: noqa
import os
from .base import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'dev'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
... | 20.074074 | 87 | 0.684502 |
899d070414c57c1ac862f2ada05f62a0230ef8e3 | 2,704 | py | Python | parlai/agents/drqa/config.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 1 | 2021-03-03T12:22:38.000Z | 2021-03-03T12:22:38.000Z | parlai/agents/drqa/config.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 3 | 2021-09-08T03:20:02.000Z | 2022-03-12T00:58:14.000Z | parlai/agents/drqa/config.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 1 | 2020-09-05T20:25:13.000Z | 2020-09-05T20:25:13.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.build_data import modelzoo_path
from parlai.utils.io import PathManager
def set_defaults(opt):
ini... | 36.540541 | 84 | 0.587278 |
4d0d5be2e081928b3f2fc7551a8b3e215b2dac67 | 6,665 | py | Python | PhysicsTools/HeppyCore/python/statistics/tree.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | PhysicsTools/HeppyCore/python/statistics/tree.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | PhysicsTools/HeppyCore/python/statistics/tree.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import numpy
from ROOT import TTree
import ROOT
class Tree(object):
def __init__(self, name, title, defaultFloatType="D", defaultIntType="I"):
self.vars = {}
self.vecvars = {}
self.tree = TTree(name, title)
self.defaults = {}
self.vecdefaults = {}
self.defaultFl... | 50.112782 | 270 | 0.593548 |
1cc9fac68b4d69ceb5ad2bb7cabb66cb74507105 | 1,189 | py | Python | src/old/QtableEnemy.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | 1 | 2019-05-04T07:28:19.000Z | 2019-05-04T07:28:19.000Z | src/old/QtableEnemy.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | 3 | 2019-04-29T09:20:11.000Z | 2019-04-29T09:23:22.000Z | src/old/QtableEnemy.py | Blackdevil132/machineLearning | de048bb1473994052f8ed1afb11a15b7833b506d | [
"MIT"
] | null | null | null | import numpy as np
from src.qrl.Qtable import Qtable
# Qtable for 2-dim storing
class QtableEnemy(Qtable):
def __init__(self, action_space, observation_space_1, observation_space_2):
Qtable.__init__(self)
self.action_space = action_space
self.observation_space = (observation_space_1, obser... | 36.030303 | 122 | 0.607233 |
8667f9b304d57627c0fd801338b5bb68d7d4f426 | 21,872 | py | Python | qa/rpc-tests/replace-by-fee.py | Plorark/KORE | 35685f0a1ce898e883ba4c80e0c6de3c3535767d | [
"MIT"
] | null | null | null | qa/rpc-tests/replace-by-fee.py | Plorark/KORE | 35685f0a1ce898e883ba4c80e0c6de3c3535767d | [
"MIT"
] | null | null | null | qa/rpc-tests/replace-by-fee.py | Plorark/KORE | 35685f0a1ce898e883ba4c80e0c6de3c3535767d | [
"MIT"
] | 1 | 2018-04-16T17:11:15.000Z | 2018-04-16T17:11:15.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Kore Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_framework.test_framework import KoreTestFramework
from test_framew... | 37.324232 | 105 | 0.600951 |
bbe3ef9331a19b1f71353c011f5d3db2ff57a4a6 | 904 | py | Python | test/test_potrace.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | 1 | 2021-04-04T15:25:06.000Z | 2021-04-04T15:25:06.000Z | test/test_potrace.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | null | null | null | test/test_potrace.py | beesandbombs/coldtype | d02c7dd36bf1576fa37dc8c50d5c1a6e47b1c5ea | [
"Apache-2.0"
] | null | null | null | from coldtype import *
import coldtype.filtering as fl
import skia
co = Font.Cacheable("assets/ColdtypeObviously-VF.ttf")
@animation(bg=bw(0), storyboard=[0], timeline=Timeline(30))
def render(f):
raw = (StyledString("COLD",
Style(co, 700, wdth=0.5, tu=-155*f.a.progress(f.i).e, r=1, ro=1, rotate=10))
... | 30.133333 | 84 | 0.530973 |
06999b312202850f61a989a61ef33197bce7f733 | 560 | py | Python | src/models/user.py | ramasubbaiya/flask-api-starter-kit | 3f00769f349908ffa5ccc7acb332d70e1f2c6f6f | [
"MIT"
] | 393 | 2016-11-21T10:52:01.000Z | 2022-03-28T13:37:27.000Z | src/models/user.py | trenchmortar/flask-api-starter-kit | 4a9bcbb37c4e81aacf2aef2df4ed28e8662e6d07 | [
"MIT"
] | 10 | 2019-09-04T03:43:35.000Z | 2019-09-11T06:35:22.000Z | src/models/user.py | trenchmortar/flask-api-starter-kit | 4a9bcbb37c4e81aacf2aef2df4ed28e8662e6d07 | [
"MIT"
] | 127 | 2017-04-20T11:33:00.000Z | 2022-03-28T06:28:44.000Z | """
Define the User model
"""
from . import db
from .abc import BaseModel, MetaBaseModel
class User(db.Model, BaseModel, metaclass=MetaBaseModel):
""" The User model """
__tablename__ = "user"
first_name = db.Column(db.String(300), primary_key=True)
last_name = db.Column(db.String(300), primary_key=... | 25.454545 | 60 | 0.6625 |
620c5515d62a7d90d4b6d68bc6c02f9b3a4d6ae2 | 416 | py | Python | scripts/dev/metrics-filter.py | braveheart12/insolar-31-08-19 | 0e58bb01fa38faee3205d0bdedc6a3cfb82d778f | [
"Apache-2.0"
] | null | null | null | scripts/dev/metrics-filter.py | braveheart12/insolar-31-08-19 | 0e58bb01fa38faee3205d0bdedc6a3cfb82d778f | [
"Apache-2.0"
] | null | null | null | scripts/dev/metrics-filter.py | braveheart12/insolar-31-08-19 | 0e58bb01fa38faee3205d0bdedc6a3cfb82d778f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import csv
import sys
seen = {}
with open(sys.argv[1], 'r') if len(sys.argv) > 1 else sys.stdin as f:
csv_in = csv.DictReader(f)
csv_out = csv.DictWriter(sys.stdout, fieldnames=csv_in.fieldnames)
csv_out.writeheader()
for row in csv_in:
if seen.get(row['name']):
... | 26 | 70 | 0.612981 |
ccce59e754c87bca2370b61ad3a565b76db9e241 | 8,144 | py | Python | tests/components/test_ffmpeg.py | lupin-de-mid/home-assistant | 35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe | [
"Apache-2.0"
] | 1 | 2021-01-02T14:13:46.000Z | 2021-01-02T14:13:46.000Z | tests/components/test_ffmpeg.py | lupin-de-mid/home-assistant | 35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe | [
"Apache-2.0"
] | null | null | null | tests/components/test_ffmpeg.py | lupin-de-mid/home-assistant | 35f6dbc9dc0fb12d1d04837acbf09dabb325f4fe | [
"Apache-2.0"
] | null | null | null | """The tests for Home Assistant ffmpeg."""
import asyncio
from unittest.mock import patch, MagicMock
import homeassistant.components.ffmpeg as ffmpeg
from homeassistant.bootstrap import setup_component
from homeassistant.util.async import (
run_callback_threadsafe, run_coroutine_threadsafe)
from tests.common impo... | 35.719298 | 79 | 0.673379 |
ab2ef97b07f0789be246f2d714f662a7feec8881 | 141,571 | py | Python | scipy/stats/tests/test_distributions.py | idan-david/scipy | 2cc09f55687eef3343442387b6beec701ca79fd6 | [
"FSFAP"
] | null | null | null | scipy/stats/tests/test_distributions.py | idan-david/scipy | 2cc09f55687eef3343442387b6beec701ca79fd6 | [
"FSFAP"
] | null | null | null | scipy/stats/tests/test_distributions.py | idan-david/scipy | 2cc09f55687eef3343442387b6beec701ca79fd6 | [
"FSFAP"
] | null | null | null | """ Test functions for stats module
"""
from __future__ import division, print_function, absolute_import
import warnings
import re
import sys
import pickle
import os
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_array_almost_equal,
... | 38.190181 | 159 | 0.577936 |
934bb9f336f3d858730e70dc41abaff2c7239800 | 3,075 | py | Python | saleor/dashboard/customer/urls.py | glosoftgroup/KahawaHardware | 893e94246583addf41c3bb0d58d2ce6bcd233c4f | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/customer/urls.py | glosoftgroup/KahawaHardware | 893e94246583addf41c3bb0d58d2ce6bcd233c4f | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/customer/urls.py | glosoftgroup/KahawaHardware | 893e94246583addf41c3bb0d58d2ce6bcd233c4f | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.contrib.auth.decorators import login_required, permission_required
from . import views, sales
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^$', permission_required('customer.view_customer', login_url='account_lo... | 60.294118 | 121 | 0.673496 |
87d4150936e92f8319e89907fe39a028cc3a377f | 5,253 | py | Python | app.py | TurconiAndrea/water-footprint-reducer-rs | 1f1b734bc2037bf4ac2dcef75db85438403d8a42 | [
"MIT"
] | null | null | null | app.py | TurconiAndrea/water-footprint-reducer-rs | 1f1b734bc2037bf4ac2dcef75db85438403d8a42 | [
"MIT"
] | null | null | null | app.py | TurconiAndrea/water-footprint-reducer-rs | 1f1b734bc2037bf4ac2dcef75db85438403d8a42 | [
"MIT"
] | null | null | null | """
Module containing the Streamlit app to explore the project.
"""
import pandas as pd
import streamlit as st
from cb_recommender import CBRecommender
from cf_recommender import CFRecommender
from configuration import load_configuration
content_bases_algo = "Content Based"
collaborative_filtering_algo = "Collaborat... | 34.788079 | 88 | 0.630687 |
847f543ebca4de6c36de9ee22fd8dc07f36454e2 | 61,871 | py | Python | pandas/core/internals/managers.py | rebecca-palmer/pandas | 7c94949dc89c62cae1bc647acd87266d6c3a0468 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-01-21T17:05:14.000Z | 2020-01-21T17:05:14.000Z | pandas/core/internals/managers.py | rebecca-palmer/pandas | 7c94949dc89c62cae1bc647acd87266d6c3a0468 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/internals/managers.py | rebecca-palmer/pandas | 7c94949dc89c62cae1bc647acd87266d6c3a0468 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-19T09:48:37.000Z | 2021-01-19T09:48:37.000Z | from collections import defaultdict
from functools import partial
import itertools
import operator
import re
from typing import List, Optional, Sequence, Tuple, Union
import numpy as np
from pandas._libs import Timedelta, Timestamp, internals as libinternals, lib
from pandas.util._validators import validate_bool_kwar... | 30.997495 | 88 | 0.568699 |
0ace1099b0c9dcc1f6b98d9e7dd7eedbe75b8af9 | 3,021 | py | Python | wikipedia_for_humans/util.py | JarbasAl/wikipedia_for_humans | b5a4c308e9c83d650d3593d39eba13d21a433a97 | [
"MIT"
] | 39 | 2020-04-11T22:06:39.000Z | 2020-05-16T11:22:16.000Z | wikipedia_for_humans/util.py | JarbasAl/wikipedia_for_humans | b5a4c308e9c83d650d3593d39eba13d21a433a97 | [
"MIT"
] | 1 | 2021-02-09T20:13:36.000Z | 2021-02-25T22:47:17.000Z | wikipedia_for_humans/util.py | JarbasAl/wikipedia_for_humans | b5a4c308e9c83d650d3593d39eba13d21a433a97 | [
"MIT"
] | 4 | 2020-08-11T17:12:16.000Z | 2021-10-08T04:03:19.000Z | from difflib import SequenceMatcher
import re
from inflection import singularize as _singularize_en
from quebra_frases import sentence_tokenize, flatten
def singularize(word, lang="en"):
if lang.startswith("en"):
return _singularize_en(word)
return word.rstrip("s")
def split_sentences(text, new_line... | 26.043103 | 70 | 0.588878 |
ed3a447d0e5ac15886a0bf3c2289032d1ef83e66 | 7,666 | py | Python | curequests/cuhttp.py | guyskk/curequests | 731e1996ebd57aec4bd36e728a5a0f7edb83933e | [
"MIT"
] | 262 | 2017-10-29T13:48:23.000Z | 2022-02-22T08:11:32.000Z | curequests/cuhttp.py | guyskk/curequests | 731e1996ebd57aec4bd36e728a5a0f7edb83933e | [
"MIT"
] | 41 | 2017-10-29T17:15:02.000Z | 2020-04-01T11:11:01.000Z | curequests/cuhttp.py | guyskk/curequests | 731e1996ebd57aec4bd36e728a5a0f7edb83933e | [
"MIT"
] | 9 | 2017-10-30T08:42:33.000Z | 2020-06-15T03:24:13.000Z | import zlib
from collections import namedtuple
import httptools
from curio import timeout_after, TaskTimeout
from curio.io import StreamBase
from requests.structures import CaseInsensitiveDict
from requests import ReadTimeout as ReadTimeoutError
from urllib3.response import GzipDecoder as GzipDecoderBase
from urllib3.r... | 30.181102 | 79 | 0.59653 |
42aad51994083de1541e03763974ae0196f307b8 | 635 | py | Python | setup.py | Mrucznik/django-workers | 938fb7ff804532c2b1b6e965e162f28db2c4094a | [
"MIT"
] | null | null | null | setup.py | Mrucznik/django-workers | 938fb7ff804532c2b1b6e965e162f28db2c4094a | [
"MIT"
] | null | null | null | setup.py | Mrucznik/django-workers | 938fb7ff804532c2b1b6e965e162f28db2c4094a | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="django-workers",
version="0.1.3",
author="Gavin Vickery",
author_email="gavin@geekforbrains.com",
description="Simple background tasks for Django",
long_description=long_description,
... | 28.863636 | 53 | 0.674016 |
b4ac3afb4636e883081df208c755e55b31271b61 | 5,925 | py | Python | online.py | AMshoka/Local-Client-Server-Search-engine | 4357e42757cc46fbe078ca2fee7eadd693431add | [
"MIT"
] | null | null | null | online.py | AMshoka/Local-Client-Server-Search-engine | 4357e42757cc46fbe078ca2fee7eadd693431add | [
"MIT"
] | null | null | null | online.py | AMshoka/Local-Client-Server-Search-engine | 4357e42757cc46fbe078ca2fee7eadd693431add | [
"MIT"
] | null | null | null | from difflib import get_close_matches
import ast
import io
import math
import numpy as np
import json
class QueryNotFoundException(Exception):
pass
def get_result(index_body, index_title, data,q):
# with io.open("index_title.txt", "r", encoding="utf-8") as f:
# text = f.read()
# index... | 35.692771 | 89 | 0.474599 |
8e27ffcda4bd6499803344cfbb2439cc7fe2f9b3 | 1,704 | py | Python | test/base.py | schlosser/flask-seed | 0c0dbca87391692087a0a4ab280635f493e8998b | [
"MIT"
] | 4 | 2017-01-13T13:28:48.000Z | 2019-05-10T16:54:12.000Z | test/base.py | schlosser/flask-seed | 0c0dbca87391692087a0a4ab280635f493e8998b | [
"MIT"
] | null | null | null | test/base.py | schlosser/flask-seed | 0c0dbca87391692087a0a4ab280635f493e8998b | [
"MIT"
] | 1 | 2018-03-06T20:20:10.000Z | 2018-03-06T20:20:10.000Z | """
.. module:: base
:synopsis: This defines common functionality in our test suite, in the base
class :class:`TestingTemplate`, which should be inherited by all test
suite classes.
.. moduleauthor:: Dan Schlosser <dan@dan@schlosser.io>
"""
import unittest
import mongoengine
from app import create_app
c... | 32.769231 | 79 | 0.626761 |
6d2cbe99c7d5e1d60be75f46ad89d493ecabcdd2 | 89 | py | Python | contrib/bitflip_env/rlgraph/environments/custom/openai/envs/__init__.py | RLGraph/RLGraph | 428fc136a9a075f29a397495b4226a491a287be2 | [
"Apache-2.0"
] | 290 | 2018-07-29T15:30:57.000Z | 2022-03-19T02:46:53.000Z | contrib/bitflip_env/rlgraph/environments/custom/openai/envs/__init__.py | RLGraph/RLGraph | 428fc136a9a075f29a397495b4226a491a287be2 | [
"Apache-2.0"
] | 76 | 2018-10-19T08:42:01.000Z | 2020-05-03T08:34:21.000Z | contrib/bitflip_env/rlgraph/environments/custom/openai/envs/__init__.py | RLGraph/RLGraph | 428fc136a9a075f29a397495b4226a491a287be2 | [
"Apache-2.0"
] | 41 | 2018-10-30T07:05:05.000Z | 2022-03-01T08:28:24.000Z | from contrib.bitflip_env.rlgraph.environments.custom.openai.envs.bit_flip import BitFlip
| 44.5 | 88 | 0.876404 |
0cde9826eeb22f5bd958c43a548d45d05a9b1e51 | 605 | py | Python | tests/test_change_title_to_str.py | igormorgado/litcorpt | 669c1852d42231f563fe0cdcf315f4fd66cf719b | [
"MIT"
] | null | null | null | tests/test_change_title_to_str.py | igormorgado/litcorpt | 669c1852d42231f563fe0cdcf315f4fd66cf719b | [
"MIT"
] | null | null | null | tests/test_change_title_to_str.py | igormorgado/litcorpt | 669c1852d42231f563fe0cdcf315f4fd66cf719b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""An example in how to change a field in model. Not for regular use"""
import litcorpt
def main():
"""Program entrypoint"""
corpus_db = litcorpt.corpus_load()
booksdir = litcorpt.utils.book_dir(litcorpt.utils.get_corpus_datapath())
for document in iter(corpus_db):
docume... | 31.842105 | 76 | 0.667769 |
06e5fcb9b65e8b7b94cb6f78d36ed428b9f15dd9 | 10,765 | py | Python | perses/analysis/load_simulations.py | hannahbrucemacdonald/perses | 6b43d200501e587b352dce5aaefef38e4145048b | [
"MIT"
] | null | null | null | perses/analysis/load_simulations.py | hannahbrucemacdonald/perses | 6b43d200501e587b352dce5aaefef38e4145048b | [
"MIT"
] | null | null | null | perses/analysis/load_simulations.py | hannahbrucemacdonald/perses | 6b43d200501e587b352dce5aaefef38e4145048b | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import sys
from openeye import oechem, oegraphsim
import logging
_logger = logging.getLogger("analysis")
class Molecule(object):
def __init__(self, i, string):
from perses.utils.openeye import smiles_to_oemol
self.line = string
details =... | 34.614148 | 139 | 0.591547 |
b245a1128751ee40095502cf5b592f17c7b861d1 | 25,424 | py | Python | tests/serialization/test_dag_serialization.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2019-01-14T16:39:27.000Z | 2019-01-24T21:53:13.000Z | tests/serialization/test_dag_serialization.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2018-10-05T18:00:01.000Z | 2019-03-27T22:17:44.000Z | tests/serialization/test_dag_serialization.py | harishmk/airflow | 5abce471e0690c6b8d06ca25685b0845c5fd270f | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2018-09-26T19:37:33.000Z | 2019-03-01T21:28:04.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 41.678689 | 106 | 0.599158 |
240edd3679b8559ce96b35d822b8b68a3f89e2f7 | 8,756 | py | Python | gui/pages/groups.py | arbeitsgruppe-digitale-altnordistik/Sammlung-Toole | 502d6128e55622b760c245b03d973574f0adab4c | [
"MIT"
] | null | null | null | gui/pages/groups.py | arbeitsgruppe-digitale-altnordistik/Sammlung-Toole | 502d6128e55622b760c245b03d973574f0adab4c | [
"MIT"
] | 36 | 2021-08-29T20:04:31.000Z | 2022-03-19T12:10:47.000Z | gui/pages/groups.py | arbeitsgruppe-digitale-altnordistik/Sammlung-Toole | 502d6128e55622b760c245b03d973574f0adab4c | [
"MIT"
] | null | null | null | from logging import Logger
from typing import Set
from uuid import UUID
import streamlit as st
from util import utils
from util.datahandler import DataHandler
from util.groups import Group, GroupType
from util.stateHandler import StateHandler, Step
from util.utils import SearchOptions
@st.experimental_singleton # ty... | 46.328042 | 137 | 0.644244 |
e1fe991ff28a270649df59b91c5432a74aac3ccd | 10,718 | py | Python | test/python/basicaer/test_qasm_simulator.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 11 | 2019-06-27T09:53:29.000Z | 2021-03-02T04:40:30.000Z | test/python/basicaer/test_qasm_simulator.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 12 | 2018-09-21T12:02:18.000Z | 2018-09-25T09:14:59.000Z | test/python/basicaer/test_qasm_simulator.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 4 | 2019-08-05T15:35:33.000Z | 2020-09-18T18:55:02.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... | 36.332203 | 91 | 0.590129 |
27541d5dd28ce2eceb129aa064776106744db92d | 1,428 | py | Python | Pygame/Game/study/game1.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | Pygame/Game/study/game1.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | Pygame/Game/study/game1.py | danghohuuphuc/Code_Python | 4aee488bc0c4a7bf2c110bbfad3c8fd48b31a070 | [
"Apache-2.0"
] | null | null | null | # import library
from dis import dis
import re
import pygame, sys
from pygame.locals import *
# Khởi tạo
pygame.init()
# Khởi tạo khung hình game
DISPLAYSURF = pygame.display.set_mode((500, 400), 0, 32)
# Thay đổi caption
pygame.display.set_caption("game 1")
# Thay đổi icon khung game
icongame1 = pygame.image.load... | 23.032258 | 63 | 0.671569 |
2d798582c9aae66597138a9e7145af104df235eb | 8,410 | py | Python | asynchronous_qiwi/call/P2P.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | 3 | 2021-05-20T02:36:30.000Z | 2021-11-28T16:00:15.000Z | asynchronous_qiwi/call/P2P.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | null | null | null | asynchronous_qiwi/call/P2P.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | 1 | 2021-11-28T16:00:20.000Z | 2021-11-28T16:00:20.000Z | from typing import Optional, Dict, Set, List, Any
from ..data_types.QIWIP2P import (
PaySourcesTypes
)
from .API.QIWIP2P import (
CreateInvoiceAPI, CheckInvoiceAPI, RejectInvoiceAPI, RefundInvoiceAPI, RefundStatusAPI
)
from .ADDONS.QIWIP2P import (
PublicFormGenerator
)
from ..models.QIWIP2P import (
In... | 58.811189 | 116 | 0.551605 |
a3a1617b650def583bebf056cb29979e0b210eb5 | 3,103 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/aio/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 47.738462 | 134 | 0.696423 |
676aaea8d94d16202d51ba9ee969f20cb22dc552 | 5,846 | py | Python | quantumclient/tests/unit/test_cli20_port.py | danwent/python-quantumclient | d16e00a056bbe7ba576c4b7195180bfc383bbfad | [
"Apache-2.0"
] | 1 | 2017-06-02T22:33:11.000Z | 2017-06-02T22:33:11.000Z | quantumclient/tests/unit/test_cli20_port.py | danwent/python-quantumclient | d16e00a056bbe7ba576c4b7195180bfc383bbfad | [
"Apache-2.0"
] | null | null | null | quantumclient/tests/unit/test_cli20_port.py | danwent/python-quantumclient | d16e00a056bbe7ba576c4b7195180bfc383bbfad | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack 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 required by... | 39.768707 | 79 | 0.572186 |
76d4396ad21efd874f4f073fc56ae2c0bf961b3e | 29,252 | py | Python | core/plugins/openstack/__init__.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | core/plugins/openstack/__init__.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | core/plugins/openstack/__init__.py | aserdean/hotsos | a0f17a7ee2f08a4da0a269d478dec7ebb8f12493 | [
"Apache-2.0"
] | null | null | null | import os
import re
from core.issues import (
issue_types,
issue_utils,
)
from core import (
checks,
constants,
host_helpers,
plugintools,
)
from core.ycheck.events import YEventCheckerBase
from core.checks import DPKGVersionCompare
from core.log import log
from core.cli_helpers import CmdBase,... | 32.793722 | 79 | 0.538527 |
dc0d300cdaea724c3e28548250e520e1f7643933 | 847 | py | Python | samples/client/petstore/python-experimental/test/test_grandparent_animal.py | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 4 | 2020-07-24T07:02:57.000Z | 2022-01-08T17:37:38.000Z | samples/client/petstore/python-experimental/test/test_grandparent_animal.py | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 7 | 2021-05-12T00:00:20.000Z | 2022-02-27T11:23:35.000Z | samples/client/petstore/python-experimental/test/test_grandparent_animal.py | MalcolmScoffable/openapi-generator | 73605a0c0e0c825286c95123c63678ba75b44d5c | [
"Apache-2.0"
] | 2 | 2020-04-24T15:18:41.000Z | 2021-12-07T09:39:40.000Z | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 22.289474 | 174 | 0.689492 |
7bb0f62a4e51c3dd425f20a004921ad663758f62 | 3,216 | py | Python | pvanalytics/quality/outliers.py | kanderso-nrel/pvanalytics | 27ea3fdddaf0e885cce8b56438256b7e51e9bdea | [
"MIT",
"BSD-3-Clause"
] | 1 | 2022-01-04T14:26:06.000Z | 2022-01-04T14:26:06.000Z | pvanalytics/quality/outliers.py | kanderso-nrel/pvanalytics | 27ea3fdddaf0e885cce8b56438256b7e51e9bdea | [
"MIT",
"BSD-3-Clause"
] | null | null | null | pvanalytics/quality/outliers.py | kanderso-nrel/pvanalytics | 27ea3fdddaf0e885cce8b56438256b7e51e9bdea | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-02-22T23:12:25.000Z | 2021-02-22T23:12:25.000Z | """Functions for identifying and labeling outliers."""
import pandas as pd
from scipy import stats
from statsmodels import robust
def tukey(data, k=1.5):
r"""Identify outliers based on the interquartile range.
A value `x` is considered an outlier if it does *not* satisfy the
following condition
.. m... | 29.777778 | 78 | 0.631841 |
2f571d7eecc6dfdf9c91c9e0445283f07f2619cf | 35,903 | py | Python | Lib/site-packages/mypy/plugin.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/mypy/plugin.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/mypy/plugin.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """Plugin system for extending mypy.
At large scale the plugin system works as following:
* Plugins are collected from the corresponding mypy config file option
(either via paths to Python files, or installed Python modules)
and imported using importlib.
* Every module should get an entry point function (called ... | 41.362903 | 99 | 0.687463 |
0a38f96a395a7887fea46451cf005cb8e5ff8f70 | 583 | py | Python | app/controllers/Unidade_medida_controller.py | amandapersampa/FastFrango | 23a69d80576f6cef754e9d3acacf9908a4da30cd | [
"MIT"
] | null | null | null | app/controllers/Unidade_medida_controller.py | amandapersampa/FastFrango | 23a69d80576f6cef754e9d3acacf9908a4da30cd | [
"MIT"
] | null | null | null | app/controllers/Unidade_medida_controller.py | amandapersampa/FastFrango | 23a69d80576f6cef754e9d3acacf9908a4da30cd | [
"MIT"
] | null | null | null | from app import app
from app.dao.Unidade_medida_dao import Unidade_medida_dao
from app.service.Unidade_medida_service import Unidade_medida_service
from flask import jsonify
import json
service = Unidade_medida_service()
@app.route("/unidadeMedida")
def salva_unidade_medida():
unidade = Unidade_medida_d... | 25.347826 | 70 | 0.746141 |
6c312a3cecfbf5d985cf3096e2a306e4d2d3c059 | 1,253 | py | Python | benchmarks/asv_bench/benchmarks/import.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | benchmarks/asv_bench/benchmarks/import.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | benchmarks/asv_bench/benchmarks/import.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2022 Alibaba Group Holding Ltd.
#
# 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 a... | 30.560976 | 80 | 0.71668 |
b47e0baed684bba42a5130c1ba862fdcde0b72db | 545 | py | Python | src/detect_related_url/css_selectors.py | myuunews/myuunews-bot | 44b00fd24fa51ce7b5145947490851d86379a44d | [
"MIT"
] | 6 | 2019-06-15T07:05:32.000Z | 2019-09-29T08:08:09.000Z | src/detect_related_url/css_selectors.py | myuunews/myuunews-bot | 44b00fd24fa51ce7b5145947490851d86379a44d | [
"MIT"
] | 5 | 2019-06-30T19:09:39.000Z | 2019-12-11T07:12:13.000Z | src/detect_related_url/css_selectors.py | myuunews/myuunews-bot | 44b00fd24fa51ce7b5145947490851d86379a44d | [
"MIT"
] | 3 | 2019-06-15T07:28:07.000Z | 2019-09-09T16:24:22.000Z | # -*- coding: utf-8 -*-
import re
from typing import Dict, List, Optional
class Selectors:
def __init__(self, selectors: Dict[str, str], ignored_urls: List[str]):
self._selectors = selectors
self._ignored_urls = ignored_urls
def get_selector(self, url: str) -> Optional[str]:
for u in... | 27.25 | 75 | 0.59633 |
363c05d2a4fa3d1a752c4b6458f4ac8dfe7a6085 | 19,443 | py | Python | SCons/Tool/ninja/__init__.py | bquistorff/scons | 271b7dde7a937cf38d4cf8d25c0958a83e891b62 | [
"MIT"
] | 2 | 2021-11-08T02:51:47.000Z | 2021-11-08T09:40:47.000Z | SCons/Tool/ninja/__init__.py | bquistorff/scons | 271b7dde7a937cf38d4cf8d25c0958a83e891b62 | [
"MIT"
] | null | null | null | SCons/Tool/ninja/__init__.py | bquistorff/scons | 271b7dde7a937cf38d4cf8d25c0958a83e891b62 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright 2020 MongoDB Inc.
#
# 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, pub... | 43.015487 | 146 | 0.698915 |
b77f20e34fdc1d2904d297bb66a0886626e3e694 | 6,957 | py | Python | tests/test_context.py | escamez/slackviews | 0d5ea936c546a071eb6167cf9a8a8cf2fdaf922b | [
"MIT"
] | 2 | 2021-08-20T14:51:03.000Z | 2021-08-23T17:57:35.000Z | tests/test_context.py | escamez/slackviews | 0d5ea936c546a071eb6167cf9a8a8cf2fdaf922b | [
"MIT"
] | 2 | 2020-09-23T18:40:35.000Z | 2021-12-14T09:46:31.000Z | tests/test_context.py | escamez/slackviews | 0d5ea936c546a071eb6167cf9a8a8cf2fdaf922b | [
"MIT"
] | null | null | null | """
Class with nosetests for Context AbstractBlock in slack_view library
"""
from nose.tools import raises
from slackviews.view import Context, Image, MarkDown
__author__ = 'Agustin Escamez'
__email__ = 'aech22@gmail.com'
class TestContext:
def setup(self):
self.expected_block_id = 'any block id'
... | 39.305085 | 117 | 0.672416 |
755ea7c04d7ac5b29052ad7ae61e5f6f2cd3b5ae | 382 | py | Python | tests/core_tests/test_scheduler.py | GaloisInc/csaf | 553013fe507f77169ca303366c48176d44396b6a | [
"BSD-3-Clause"
] | 6 | 2021-08-17T23:31:13.000Z | 2022-02-19T22:23:15.000Z | tests/core_tests/test_scheduler.py | GaloisInc/csaf | 553013fe507f77169ca303366c48176d44396b6a | [
"BSD-3-Clause"
] | 29 | 2021-08-24T17:32:39.000Z | 2022-02-28T16:28:35.000Z | tests/core_tests/test_scheduler.py | GaloisInc/csaf | 553013fe507f77169ca303366c48176d44396b6a | [
"BSD-3-Clause"
] | 3 | 2021-09-15T14:20:30.000Z | 2021-12-06T22:03:26.000Z | from csaf.core.scheduler import Scheduler
from csaf_f16.components import F16PlantComponent, F16GcasComponent
def test_scheduler():
a = F16PlantComponent()
b = F16GcasComponent()
a.check()
b.check()
s = Scheduler({"a": a, "b": b}, ["a", "b"])
assert len(s.get_schedule_tspan([1.0-1/30.0, 1.0]))... | 29.384615 | 67 | 0.651832 |
6f88456ee1031860d893bbf1dfcf4ff1dc450c63 | 6,728 | py | Python | gennghttpxfun.py | codebytere/nghttp2 | fa7a916ef3b6e518d7a65e6256a9ebab1bab83ce | [
"MIT"
] | null | null | null | gennghttpxfun.py | codebytere/nghttp2 | fa7a916ef3b6e518d7a65e6256a9ebab1bab83ce | [
"MIT"
] | null | null | null | gennghttpxfun.py | codebytere/nghttp2 | fa7a916ef3b6e518d7a65e6256a9ebab1bab83ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from gentokenlookup import gentokenlookup
OPTIONS = [
"private-key-file",
"private-key-passwd-file",
"certificate-file",
"dh-param-file",
"subcert",
"backend",
"frontend",
"workers",
"http2-max-concurrent-streams",
"log-level",
"daemon",
"http2-pr... | 28.033333 | 161 | 0.646849 |
602460c6d694b93979d2cb88251f2d49bdb84f5c | 2,623 | py | Python | tests/test_core.py | TieWei/molecule | 67372aa5db84b1a14f6d75bb60b05aa54244f57f | [
"MIT"
] | 1 | 2016-05-18T19:05:25.000Z | 2016-05-18T19:05:25.000Z | tests/test_core.py | TieWei/molecule | 67372aa5db84b1a14f6d75bb60b05aa54244f57f | [
"MIT"
] | null | null | null | tests/test_core.py | TieWei/molecule | 67372aa5db84b1a14f6d75bb60b05aa54244f57f | [
"MIT"
] | null | null | null | # Copyright (c) 2015 Cisco Systems
#
# 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, ... | 41.634921 | 87 | 0.645444 |
c179562d3b2e090ed6e9336c785a3de62d24ea7b | 11,581 | py | Python | tests/unit/test_solvers/test_processed_symbolic_variable.py | NunoEdgarGFlowHub/PyBaMM | 4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190 | [
"BSD-3-Clause"
] | 1 | 2021-03-06T15:10:34.000Z | 2021-03-06T15:10:34.000Z | tests/unit/test_solvers/test_processed_symbolic_variable.py | NunoEdgarGFlowHub/PyBaMM | 4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_solvers/test_processed_symbolic_variable.py | NunoEdgarGFlowHub/PyBaMM | 4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190 | [
"BSD-3-Clause"
] | null | null | null | #
# Tests for the Processed Variable class
#
import pybamm
import casadi
import numpy as np
import unittest
import tests
class TestProcessedSymbolicVariable(unittest.TestCase):
def test_processed_variable_0D(self):
# without inputs
y = pybamm.StateVector(slice(0, 1))
var = 2 * y
v... | 37 | 88 | 0.585269 |
c5f4e03338e4640524b6b8f26e26647c280f6315 | 561,555 | py | Python | tests/examples/minlplib/portfol_robust100_09.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 2 | 2021-07-03T13:19:10.000Z | 2022-02-06T10:48:13.000Z | tests/examples/minlplib/portfol_robust100_09.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 1 | 2021-07-04T14:52:14.000Z | 2021-07-15T10:17:11.000Z | tests/examples/minlplib/portfol_robust100_09.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | null | null | null | # MINLP written by GAMS Convert at 04/21/18 13:53:49
#
# Equation counts
# Total E G L N X C B
# 307 203 0 104 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 96.107308 | 120 | 0.537507 |
b9129792f8b6e792ba2e421edb63a9165f50120a | 405 | py | Python | env/Lib/site-packages/plotly/validators/ohlc/_customdata.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/ohlc/_customdata.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/ohlc/_customdata.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="customdata", parent_name="ohlc", **kwargs):
super(CustomdataValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 33.75 | 79 | 0.681481 |
3539c821615db7989a55f7d4a55ad58e25a6612d | 6,199 | py | Python | models/DeformableConvNets/faster_rcnn/config/config.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | models/DeformableConvNets/faster_rcnn/config/config.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | models/DeformableConvNets/faster_rcnn/config/config.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Modified by Yuwen Xiong, Bin Xiao
# --------------------------------------------------------
# Based on:
# MX-RCNN
# Copyright (c) 20... | 32.119171 | 98 | 0.695273 |
d22220a8ca808e765159f350ab44dceaabe632d4 | 352 | py | Python | reviewboard/scmtools/evolutions/repository_hosting_accounts.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | reviewboard/scmtools/evolutions/repository_hosting_accounts.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | reviewboard/scmtools/evolutions/repository_hosting_accounts.py | pombredanne/reviewboard | 15f1d7236ec7a5cb4778ebfeb8b45d13a46ac71d | [
"MIT"
] | null | null | null | from django_evolution.mutations import AddField
from django.db import models
from djblets.db.fields import JSONField
MUTATIONS = [
AddField('Repository', 'extra_data', JSONField, null=True),
AddField('Repository', 'hosting_account',
models.ForeignKey, null=True,
related_model='hostin... | 29.333333 | 63 | 0.730114 |
e8b77eb6f3d90662212133d3e1b8f2a2bf5a4503 | 3,500 | py | Python | freefeeds/migrations/0001_initial.py | ilvar/mokumdon | 8f63a68708e33c6fe3579471716e3f31ec58fec4 | [
"MIT"
] | null | null | null | freefeeds/migrations/0001_initial.py | ilvar/mokumdon | 8f63a68708e33c6fe3579471716e3f31ec58fec4 | [
"MIT"
] | null | null | null | freefeeds/migrations/0001_initial.py | ilvar/mokumdon | 8f63a68708e33c6fe3579471716e3f31ec58fec4 | [
"MIT"
] | null | null | null | # Generated by Django 3.0 on 2019-12-14 20:57
from django.db import migrations, models
import django.db.models.deletion
import freefeeds.models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="User",
fi... | 35.353535 | 88 | 0.433429 |
fe285403bacb511cb2bef6599fdcc9e7bae58833 | 29,379 | py | Python | sphinx/builders/_epub_base.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 1 | 2021-06-17T13:38:42.000Z | 2021-06-17T13:38:42.000Z | sphinx/builders/_epub_base.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/_epub_base.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.builders._epub_base
~~~~~~~~~~~~~~~~~~~~~~~~~~
Base class of epub2/epub3 builders.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import re
from collections import namedtuple
from os import ... | 40.974895 | 91 | 0.558596 |
7f3f0d62002859c20f63abe9e2ad36c7d7fcf360 | 21,019 | py | Python | pysnmp/SNMP553S-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/SNMP553S-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/SNMP553S-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SNMP553S-MGMT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNMP553S-MGMT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:00:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 136.487013 | 3,925 | 0.77468 |
688e4c4b3845532ba72c323b82b7f6e03e5691e2 | 5,764 | py | Python | sendSMSSkillLambda/package/ask_sdk_model/events/skillevents/permission_accepted_request.py | shneydor/aws-alexa-lambda-workshop | 0fa6b7067b04fc85c46b9ce1c2cc04554ed5baf4 | [
"Apache-2.0"
] | null | null | null | sendSMSSkillLambda/package/ask_sdk_model/events/skillevents/permission_accepted_request.py | shneydor/aws-alexa-lambda-workshop | 0fa6b7067b04fc85c46b9ce1c2cc04554ed5baf4 | [
"Apache-2.0"
] | null | null | null | sendSMSSkillLambda/package/ask_sdk_model/events/skillevents/permission_accepted_request.py | shneydor/aws-alexa-lambda-workshop | 0fa6b7067b04fc85c46b9ce1c2cc04554ed5baf4 | [
"Apache-2.0"
] | 1 | 2019-10-11T17:15:20.000Z | 2019-10-11T17:15:20.000Z | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 40.027778 | 182 | 0.646773 |
87a8999de9c5738e1817ba8a8a3b93dcffcd8dee | 9,838 | py | Python | wandb/run-20210411_184444-3qt4iwcn/files/code/main.py | ccoltong1215/simple-lenet5-torch-mnist | 3eaa25160525f89dd6b9fe1db5de26a2bfda2fea | [
"MIT"
] | null | null | null | wandb/run-20210411_184444-3qt4iwcn/files/code/main.py | ccoltong1215/simple-lenet5-torch-mnist | 3eaa25160525f89dd6b9fe1db5de26a2bfda2fea | [
"MIT"
] | 5 | 2021-09-08T03:09:50.000Z | 2022-03-12T00:56:43.000Z | wandb/run-20210411_184444-3qt4iwcn/files/code/main.py | ccoltong1215/simple-lenet5-torch-mnist | 3eaa25160525f89dd6b9fe1db5de26a2bfda2fea | [
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from dataset import Dataset
from model import LeNet5, CustomMLP
import numpy as np
import matplotlib.pyplot as plt
import wandb
def train(model, trn_loader, device, criterion, optimizer,epoch,modelname):
""" Tr... | 41.86383 | 190 | 0.634275 |
2890c794bad8c5f8e6a540e5f6c96aad6fd0c504 | 18,162 | py | Python | tests/collection.py | IvanMalison/invoke | 322718d7f38ce04fc2bde947ba67ab4002f669b6 | [
"BSD-2-Clause"
] | null | null | null | tests/collection.py | IvanMalison/invoke | 322718d7f38ce04fc2bde947ba67ab4002f669b6 | [
"BSD-2-Clause"
] | null | null | null | tests/collection.py | IvanMalison/invoke | 322718d7f38ce04fc2bde947ba67ab4002f669b6 | [
"BSD-2-Clause"
] | 1 | 2021-02-17T12:08:40.000Z | 2021-02-17T12:08:40.000Z | import operator
from spec import Spec, eq_, ok_, raises, assert_raises
from invoke.collection import Collection
from invoke.tasks import task, Task
from invoke.vendor import six
from invoke.vendor.six.moves import reduce
from _util import load, support_path
@task
def _mytask(ctx):
six.print_("woo!")
def _func... | 36.989817 | 78 | 0.557483 |
d4dba390e797c7f415cfe225c68975bd26a32df3 | 14,549 | py | Python | rastervision/protos/label_source_pb2.py | AirbusAerial/raster-vision | cfa7826169392e497fb57a540eb952fc6cee3a98 | [
"Apache-2.0"
] | 2 | 2019-04-17T13:04:23.000Z | 2020-10-04T10:28:27.000Z | rastervision/protos/label_source_pb2.py | Yochengliu/raster-vision | f5badc387df86ce02d84e0e274a08026dbf65bd6 | [
"Apache-2.0"
] | null | null | null | rastervision/protos/label_source_pb2.py | Yochengliu/raster-vision | f5badc387df86ce02d84e0e274a08026dbf65bd6 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rastervision/protos/label_source.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf im... | 50.342561 | 1,430 | 0.797374 |
fe8ee41f200ccefb5af350b34fe49885e69e0f7e | 56 | py | Python | keycloak_api_client/exceptions.py | masterplandev/python-keycloak-api-client | 60406dace35a4c9b2a0fd149823c09fd993d5b8b | [
"MIT"
] | 1 | 2021-07-16T11:40:03.000Z | 2021-07-16T11:40:03.000Z | keycloak_api_client/exceptions.py | masterplandev/python-keycloak-api-client | 60406dace35a4c9b2a0fd149823c09fd993d5b8b | [
"MIT"
] | 2 | 2021-07-29T14:42:15.000Z | 2021-11-25T16:35:39.000Z | keycloak_api_client/exceptions.py | masterplandev/python-keycloak-api-client | 60406dace35a4c9b2a0fd149823c09fd993d5b8b | [
"MIT"
] | null | null | null |
class KeycloakApiClientException(Exception):
pass
| 11.2 | 44 | 0.785714 |
7e81022bce5e8a5f29f569464336a5addd759631 | 6,175 | py | Python | data/prepare_data.py | huitangtang/DisClusterDA | 55268343623a119d058e07f92714f96bdb806463 | [
"MIT"
] | 4 | 2020-09-02T14:51:24.000Z | 2021-12-26T18:59:04.000Z | data/prepare_data.py | huitangtang/DisClusterDA | 55268343623a119d058e07f92714f96bdb806463 | [
"MIT"
] | 1 | 2022-03-15T15:27:17.000Z | 2022-03-15T15:27:17.000Z | data/prepare_data.py | huitangtang/DisClusterDA | 55268343623a119d058e07f92714f96bdb806463 | [
"MIT"
] | null | null | null | import os
import shutil
#import sys
#sys.path.append("..")
import torch
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import torch.nn.functional as F
from utils.folder import ImageFolder
import numpy as np
import cv2
def generate_dataloader(args):
# data loading
traindir =... | 44.42446 | 173 | 0.682429 |
fbbf428102feb1d0b3a75d3457afb77bb90616ba | 4,872 | py | Python | detail_test.py | hukish/P_Locker | 451c00185e6cdd91f607fa4460a05dd8e2d6fd68 | [
"MIT"
] | null | null | null | detail_test.py | hukish/P_Locker | 451c00185e6cdd91f607fa4460a05dd8e2d6fd68 | [
"MIT"
] | null | null | null | detail_test.py | hukish/P_Locker | 451c00185e6cdd91f607fa4460a05dd8e2d6fd68 | [
"MIT"
] | null | null | null | import unittest # Importing the unittest module
import pyperclip
from detail import Detail # Importing the detail class
class TestDetail(unittest.TestCase):
# import pyperclip
'''
Test class that defines test cases for the detail class behaviours.
Args:
unittest.TestCase: TestCase class th... | 31.843137 | 89 | 0.597906 |
c958511c4228e9eb382572223b35fca7b6ad7770 | 1,730 | py | Python | planning_and_simulation_modules/Tjulia/checks/JuliaOutputChecker.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 2 | 2020-04-07T03:43:33.000Z | 2021-03-23T13:17:42.000Z | planning_and_simulation_modules/Tjulia/checks/JuliaOutputChecker.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:56:13.000Z | 2020-07-22T10:26:06.000Z | planning_and_simulation_modules/Tjulia/checks/JuliaOutputChecker.py | Planheat/Planheat-Tool | 9764fcb86d3898b232c4cc333dab75ebe41cd421 | [
"MIT"
] | 1 | 2020-07-20T09:40:15.000Z | 2020-07-20T09:40:15.000Z | import os
import os.path
from .JuliaErrorVisualizer import JuliaErrorVisualizer
class JuliaOutputChecker:
def __init__(self, dr):
self.work_directory = dr
self.file_starts_string = "Result_"
self.file_ends_string = ".csv"
self.h8760 = 8760
self.report = {}
self.REP... | 32.037037 | 105 | 0.547977 |
80d7333a07ab6cbc513d92e5bca4f131285935d4 | 55,646 | py | Python | tests/test_datasets/test_dataset_functions.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | 1 | 2019-09-02T00:28:26.000Z | 2019-09-02T00:28:26.000Z | tests/test_datasets/test_dataset_functions.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | null | null | null | tests/test_datasets/test_dataset_functions.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | 1 | 2019-09-02T00:29:32.000Z | 2019-09-02T00:29:32.000Z | import os
import random
from itertools import product
from unittest import mock
import arff
import pytest
import numpy as np
import pandas as pd
import scipy.sparse
from oslo_concurrency import lockutils
import openml
from openml import OpenMLDataset
from openml.exceptions import OpenMLCacheException, OpenMLHashExce... | 41.495899 | 98 | 0.587679 |
2e5948cf2a3e73516a0d9f3ee5b658d39ba324ec | 9,753 | py | Python | CarlaWorld.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | null | null | null | CarlaWorld.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | null | null | null | CarlaWorld.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | null | null | null | import sys
import os
import settings
sys.path.append(settings.CARLA_EGG_PATH)
import carla
import random
import time
import numpy as np
from spawn_npc import NPCClass
from client_bounding_boxes import ClientSideBoundingBoxes
from set_synchronous_mode import CarlaSyncMode
from bb_filter import apply_filters_to_3d_bb
fr... | 48.522388 | 130 | 0.660412 |
b399eca8d4001215d3ae161f4bbdad8582d0fb0e | 2,141 | py | Python | src/foremast/utils/deep_chain_map.py | gitter-badger/foremast | 33530438ba5893a1d5cf822a63e03d7ab49dfcd7 | [
"Apache-2.0"
] | null | null | null | src/foremast/utils/deep_chain_map.py | gitter-badger/foremast | 33530438ba5893a1d5cf822a63e03d7ab49dfcd7 | [
"Apache-2.0"
] | null | null | null | src/foremast/utils/deep_chain_map.py | gitter-badger/foremast | 33530438ba5893a1d5cf822a63e03d7ab49dfcd7 | [
"Apache-2.0"
] | null | null | null | # Foremast - Pipeline Tooling
#
# Copyright 2016 Gogo, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 36.288136 | 79 | 0.607193 |
7495a42a6f9dd430051cc291f3e6a20122fb0961 | 8,390 | py | Python | kakao/request.py | minionsong/korea-covid-19-remaining-vaccine-macro | 154ac0f1b5ba4bcc3f270255b38ed270a54febad | [
"MIT"
] | null | null | null | kakao/request.py | minionsong/korea-covid-19-remaining-vaccine-macro | 154ac0f1b5ba4bcc3f270255b38ed270a54febad | [
"MIT"
] | null | null | null | kakao/request.py | minionsong/korea-covid-19-remaining-vaccine-macro | 154ac0f1b5ba4bcc3f270255b38ed270a54febad | [
"MIT"
] | null | null | null | import json
import re
import time
from datetime import datetime
import requests
import urllib3
from kakao.common import close, count_json_response
urllib3.disable_warnings()
header_map = {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=utf-8",
"Origin": "https://... | 44.391534 | 146 | 0.59559 |
983298d7530b47d9b5187a87123587b291df2704 | 789 | py | Python | main.py | akshay-1612/Twitter_Bot | aa527d28252a77a6ca47a9dc4c29d13d3723bae6 | [
"MIT"
] | null | null | null | main.py | akshay-1612/Twitter_Bot | aa527d28252a77a6ca47a9dc4c29d13d3723bae6 | [
"MIT"
] | null | null | null | main.py | akshay-1612/Twitter_Bot | aa527d28252a77a6ca47a9dc4c29d13d3723bae6 | [
"MIT"
] | 2 | 2021-01-20T06:09:59.000Z | 2021-10-06T04:13:05.000Z | import tweepy
import time
api_key = ''
api_key_secreat = ''
access_token = ''
access_token_secreat =''
auth = tweepy.OAuthHandler(api_key,api_key_secreat)
auth.set_access_token(access_token,access_token_secreat)
api = tweepy.API(auth,wait_on_rate_limit=True,wait_on_rate_limit_notify=True)
user = api.me()
#search ... | 19.243902 | 77 | 0.674271 |
c3ddc761b71e57f7d84a44d606d052327407f56b | 761 | py | Python | step13_secret_manager/Python/example01_rotate_secret_with_lambda/lambda/index.py | fullstackwebdev/full-stack-serverless-cdk | 798c98300b89cfb5eac6004cd348fa60d05f813b | [
"MIT"
] | 192 | 2020-11-01T17:45:01.000Z | 2022-03-16T08:14:58.000Z | step13_secret_manager/Python/example01_rotate_secret_with_lambda/lambda/index.py | fullstackwebdev/full-stack-serverless-cdk | 798c98300b89cfb5eac6004cd348fa60d05f813b | [
"MIT"
] | 16 | 2020-11-26T19:15:49.000Z | 2020-12-27T00:26:21.000Z | step13_secret_manager/Python/example01_rotate_secret_with_lambda/lambda/index.py | fullstackwebdev/full-stack-serverless-cdk | 798c98300b89cfb5eac6004cd348fa60d05f813b | [
"MIT"
] | 101 | 2020-11-02T08:03:05.000Z | 2022-03-29T00:55:40.000Z |
from __future__ import print_function
import os
import json
import boto3
import secrets
secretsManager = boto3.client('secretsmanager', region_name= os.environ['REGION'])
secretName = os.environ['SECRET_NAME']
keyInSecret = os.environ['KEY_IN_SECRET_NAME']
def handler(event, context):
print(event)
session ... | 26.241379 | 82 | 0.634691 |
93e0491304c58836491adaf2eefe355f62d8e62e | 2,304 | py | Python | PyBank/main-bank.py | gocurry1/python_challenge | 15717fec6b179ea0a40725fc6d859f995f87c9a2 | [
"MIT"
] | null | null | null | PyBank/main-bank.py | gocurry1/python_challenge | 15717fec6b179ea0a40725fc6d859f995f87c9a2 | [
"MIT"
] | null | null | null | PyBank/main-bank.py | gocurry1/python_challenge | 15717fec6b179ea0a40725fc6d859f995f87c9a2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
import csv
total_months = 0
net_amount = 0
monthly_change = []
month_count = []
greatest_increase = 0
greatest_increase_month = 0
greatest_decrease = 0
greatest_decrease_month = 0
csvpath = os.path.join('.', 'Resources', 'budget_data.csv')
with open(csvp... | 24.252632 | 94 | 0.624132 |
40cdfc331000d9f7ddf122ce575146e3abf699ba | 6,148 | py | Python | dsmr_parser/clients/protocol.py | mjkl-gh/dsmr_parser | 63338fbf06fe96444c814b224f6aaca3d78f4581 | [
"MIT"
] | null | null | null | dsmr_parser/clients/protocol.py | mjkl-gh/dsmr_parser | 63338fbf06fe96444c814b224f6aaca3d78f4581 | [
"MIT"
] | null | null | null | dsmr_parser/clients/protocol.py | mjkl-gh/dsmr_parser | 63338fbf06fe96444c814b224f6aaca3d78f4581 | [
"MIT"
] | null | null | null | """Asyncio protocol implementation for handling telegrams."""
from functools import partial
import asyncio
import logging
from serial_asyncio import create_serial_connection
from dsmr_parser import telegram_specifications
from dsmr_parser.clients.telegram_buffer import TelegramBuffer
from dsmr_parser.exceptions impo... | 37.950617 | 117 | 0.675992 |
6e38d1e07486bbd81e80de1f3b3d8a5d30c05618 | 5,376 | py | Python | nipyapi/registry/models/extension_repo_artifact.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 199 | 2017-08-24T12:19:41.000Z | 2022-03-20T14:50:17.000Z | nipyapi/registry/models/extension_repo_artifact.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 275 | 2017-08-28T21:21:49.000Z | 2022-03-29T17:57:26.000Z | nipyapi/registry/models/extension_repo_artifact.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 73 | 2017-09-07T10:13:56.000Z | 2022-02-28T10:37:21.000Z | # coding: utf-8
"""
Apache NiFi Registry REST API
The REST API provides an interface to a registry with operations for saving, versioning, reading NiFi flows and components.
OpenAPI spec version: 1.15.0
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
... | 25.6 | 127 | 0.567894 |
10bde5119dead7aef2e791df1241d226f176e8cd | 49 | py | Python | tests/__init__.py | ahmed-shariff/acm-dl-hci-searcher- | 0c2b683d0440fe6240e2a660ccc1c92461180f1e | [
"MIT"
] | null | null | null | tests/__init__.py | ahmed-shariff/acm-dl-hci-searcher- | 0c2b683d0440fe6240e2a660ccc1c92461180f1e | [
"MIT"
] | null | null | null | tests/__init__.py | ahmed-shariff/acm-dl-hci-searcher- | 0c2b683d0440fe6240e2a660ccc1c92461180f1e | [
"MIT"
] | null | null | null | """Unit test package for acm_dl_hci_searcher."""
| 24.5 | 48 | 0.755102 |
2a8c2657da3340e273f57686ff8417e6dc429390 | 9,509 | py | Python | romp/lib/maps_utils/centermap.py | iory/ROMP | d50bab681b5a60d15526fbeec1ed98cb020864b2 | [
"MIT"
] | null | null | null | romp/lib/maps_utils/centermap.py | iory/ROMP | d50bab681b5a60d15526fbeec1ed98cb020864b2 | [
"MIT"
] | null | null | null | romp/lib/maps_utils/centermap.py | iory/ROMP | d50bab681b5a60d15526fbeec1ed98cb020864b2 | [
"MIT"
] | null | null | null | import torch
import sys,os
import numpy as np
sys.path.append(os.path.abspath(__file__).replace('maps_utils/centermap.py',''))
from config import args
class CenterMap(object):
def __init__(self,style='heatmap_adaptive_scale'):
self.style=style
self.size = args().centermap_size
self.max_per... | 41.524017 | 148 | 0.637712 |
e44981d07c3ec290b13a182112575fa864d94fe7 | 6,576 | py | Python | scripts/plot_hotfilm_stress_exp1.py | sustain-lab/asist-nsf-2018 | 2691bf7dc9d411e35db4e5a6c28d98f71730bee8 | [
"MIT"
] | 1 | 2018-10-09T22:18:16.000Z | 2018-10-09T22:18:16.000Z | scripts/plot_hotfilm_stress_exp1.py | sustain-lab/asist-nsf-2018 | 2691bf7dc9d411e35db4e5a6c28d98f71730bee8 | [
"MIT"
] | null | null | null | scripts/plot_hotfilm_stress_exp1.py | sustain-lab/asist-nsf-2018 | 2691bf7dc9d411e35db4e5a6c28d98f71730bee8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Processes raw hotfilm voltages to velocities.
"""
from asist_nsf_2018.experiments import experiments
from asist_nsf_2018.process_level2 import clean_hotfilm_exp1
from asist.utility import binavg, limit_to_percentile_range, running_mean
from asist.hotfilm import effective_velocity, hotfilm_vel... | 32.078049 | 112 | 0.663321 |
a23f3f21958bd85503b67fb5a60a8d74bd5472b8 | 2,060 | py | Python | src/scheduler/srt_scheduler.py | PatrickShaw/University-FIT2070-Assignment3 | c45ed79ef35abb740b9591ef712a2d0eb1627592 | [
"MIT"
] | 2 | 2021-05-14T08:30:06.000Z | 2021-05-14T08:30:08.000Z | src/scheduler/srt_scheduler.py | PatrickShaw/scheduling-simulator | c45ed79ef35abb740b9591ef712a2d0eb1627592 | [
"MIT"
] | null | null | null | src/scheduler/srt_scheduler.py | PatrickShaw/scheduling-simulator | c45ed79ef35abb740b9591ef712a2d0eb1627592 | [
"MIT"
] | null | null | null | from scheduler.fcfs_scheduler import FirstComeFirstServedScheduler
from scheduler.process import Process
class ShortestRemainingTimeScheduler(FirstComeFirstServedScheduler):
"""
A preemptive scheduler that executes whichever process is estimated to finish first.
Note that the FCFS scheduler's increase_ti... | 50.243902 | 118 | 0.674272 |
3d165cc5d512dcfb88319e529b19655783e6a0bb | 5,928 | py | Python | tourism_train.py | sanowar-raihan/nerf-meta | dbb97431b613acb3dfdc7075344c6e1fd1b6cf51 | [
"MIT"
] | 60 | 2021-05-10T20:06:10.000Z | 2022-02-22T09:25:56.000Z | tourism_train.py | sanowar-raihan/nerf-meta | dbb97431b613acb3dfdc7075344c6e1fd1b6cf51 | [
"MIT"
] | 3 | 2021-05-21T02:21:47.000Z | 2021-05-27T20:32:00.000Z | tourism_train.py | sanowar-raihan/nerf-meta | dbb97431b613acb3dfdc7075344c6e1fd1b6cf51 | [
"MIT"
] | 8 | 2021-05-14T01:43:34.000Z | 2022-01-26T22:58:27.000Z | import argparse
import json
import copy
import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
from datasets.phototourism import build_tourism
from models.nerf import build_nerf
from models.rendering import get_rays_tourism, sample_points, volume_render
def inner_loop(model, optim, img, ... | 38.245161 | 99 | 0.65081 |
ce7944f454fdfdfd0876dd9115c3e19165f61eae | 1,120 | py | Python | python_code_tips/misc/example1.py | zdh45222/2021MyDevNet | d9b739675e1550d488b42af74f70a283c8fc9554 | [
"MIT"
] | 156 | 2018-07-19T06:56:58.000Z | 2022-03-20T19:30:57.000Z | python_code_tips/misc/example1.py | zdh45222/2021MyDevNet | d9b739675e1550d488b42af74f70a283c8fc9554 | [
"MIT"
] | 4 | 2021-04-07T23:22:30.000Z | 2021-09-23T23:29:58.000Z | python_code_tips/misc/example1.py | zdh45222/2021MyDevNet | d9b739675e1550d488b42af74f70a283c8fc9554 | [
"MIT"
] | 130 | 2018-09-13T09:26:38.000Z | 2022-03-20T19:34:48.000Z | #! /usr/bin/env python
"""Example Python script.
Copyright (c) 2018 Cisco and/or its affiliates."""
import os
def say_hello(name):
"""Function that will say hello to someone.
"""
# Print out a hello message to the name given
print("Hello there {name}. It's great to see you.".format(name = name))
... | 26.046512 | 101 | 0.654464 |
2108ef1f85af5f5daf2c39855b2c64ed825311b7 | 3,773 | py | Python | test/functional/p2p_dos_header_tree.py | TriCron/shirecoin | 50ab7e5b7dc32350e4bcbe33ad728b3926212e5a | [
"MIT"
] | null | null | null | test/functional/p2p_dos_header_tree.py | TriCron/shirecoin | 50ab7e5b7dc32350e4bcbe33ad728b3926212e5a | [
"MIT"
] | null | null | null | test/functional/p2p_dos_header_tree.py | TriCron/shirecoin | 50ab7e5b7dc32350e4bcbe33ad728b3926212e5a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that we reject low difficulty headers to prevent our block tree from filling up with useless bloat"""
... | 42.875 | 120 | 0.672939 |
0d03e91654bd945f38e4da3900ecbacc5605fd5b | 52 | py | Python | chunkedimage/__init__.py | ambrosejcarr/chunkedimage | 635ef44feeb28b8b9d4cdb895fc1a0dd37c22d1e | [
"MIT"
] | null | null | null | chunkedimage/__init__.py | ambrosejcarr/chunkedimage | 635ef44feeb28b8b9d4cdb895fc1a0dd37c22d1e | [
"MIT"
] | null | null | null | chunkedimage/__init__.py | ambrosejcarr/chunkedimage | 635ef44feeb28b8b9d4cdb895fc1a0dd37c22d1e | [
"MIT"
] | null | null | null | from .tile import Tile
from .tileset import TileSet
| 17.333333 | 28 | 0.807692 |
ba9121902170bc605733e082c53fb2ac7366a9d0 | 131,645 | py | Python | mne/viz/_3d.py | High-East/mne-python | 5b45394a3a0c16097ceda56ee2500348b9b1827a | [
"BSD-3-Clause"
] | 1 | 2021-11-15T06:11:51.000Z | 2021-11-15T06:11:51.000Z | mne/viz/_3d.py | High-East/mne-python | 5b45394a3a0c16097ceda56ee2500348b9b1827a | [
"BSD-3-Clause"
] | null | null | null | mne/viz/_3d.py | High-East/mne-python | 5b45394a3a0c16097ceda56ee2500348b9b1827a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Functions to make 3D plots with M/EEG data."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Mainak Jas <maina... | 40.90895 | 105 | 0.57333 |
bc204992002033aede1b719e8b519315cac7c322 | 200 | py | Python | mongoenginetest/serializers.py | jonwhuang/diana-api | 7872f0358d15312333bae42ffb3fd4bd9633297f | [
"MIT"
] | null | null | null | mongoenginetest/serializers.py | jonwhuang/diana-api | 7872f0358d15312333bae42ffb3fd4bd9633297f | [
"MIT"
] | null | null | null | mongoenginetest/serializers.py | jonwhuang/diana-api | 7872f0358d15312333bae42ffb3fd4bd9633297f | [
"MIT"
] | null | null | null | from rest_framework_mongoengine import serializers
from mongoenginetest.models import Test
class TestSerializer(serializers.DocumentSerializer):
class Meta:
model = Test
fields = '__all__'
| 25 | 53 | 0.805 |
6eea670b8363788843cfd729ca9f02b6432ece8c | 24,463 | py | Python | statsmodels/discrete/tests/test_sandwich_cov.py | Aziiz1989/statsmodels | 4c4a235f98aeba743517dd35b01da824594cb43c | [
"BSD-3-Clause"
] | null | null | null | statsmodels/discrete/tests/test_sandwich_cov.py | Aziiz1989/statsmodels | 4c4a235f98aeba743517dd35b01da824594cb43c | [
"BSD-3-Clause"
] | null | null | null | statsmodels/discrete/tests/test_sandwich_cov.py | Aziiz1989/statsmodels | 4c4a235f98aeba743517dd35b01da824594cb43c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 09 21:29:20 2013
Author: Josef Perktold
"""
import os
import numpy as np
import pandas as pd
import statsmodels.discrete.discrete_model as smd
from statsmodels.genmod.generalized_linear_model import GLM
from statsmodels.genmod import families
from statsmodels.genmod.fam... | 33.695592 | 118 | 0.601194 |
3dcd840b94e6994551f604c5a7877d66ec70141d | 1,411 | py | Python | mine/mine.py | Oyekunle-Mark/roaming-serpent | c9433234d42e4fc7ab2a36e6186a962e201ce1c1 | [
"MIT"
] | null | null | null | mine/mine.py | Oyekunle-Mark/roaming-serpent | c9433234d42e4fc7ab2a36e6186a962e201ce1c1 | [
"MIT"
] | null | null | null | mine/mine.py | Oyekunle-Mark/roaming-serpent | c9433234d42e4fc7ab2a36e6186a962e201ce1c1 | [
"MIT"
] | null | null | null | import requests
import time
import hashlib
from decouple import config
TOKEN = config("TOKEN")
auth = {"Authorization": "Token " + TOKEN}
def get_last_proof():
res = requests.get(
"https://lambda-treasure-hunt.herokuapp.com/api/bc/last_proof/",
headers=auth
)
return res.json()
def mine... | 22.396825 | 82 | 0.656272 |
8cf6a05a9545562378220792b7a91ee31b2fc19d | 4,431 | py | Python | chatbot/mybot-basic.py | LiamFraney/foodbot | f7805e0bc4d72287321342486cec1092dbc0eb61 | [
"MIT"
] | null | null | null | chatbot/mybot-basic.py | LiamFraney/foodbot | f7805e0bc4d72287321342486cec1092dbc0eb61 | [
"MIT"
] | null | null | null | chatbot/mybot-basic.py | LiamFraney/foodbot | f7805e0bc4d72287321342486cec1092dbc0eb61 | [
"MIT"
] | null | null | null | import spoonacular as sp
import json, requests, os
import aiml
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from xml.etree import ElementTree as ET
import tensorflow as tf
from tensorflow.k... | 31.425532 | 96 | 0.582938 |
12c98f78375b8a1d57d6593c328cfb6cfe9f7898 | 474 | py | Python | shell/redirect.py | utep-cs-systems-courses/os-shell-Joshua-Zamora | e550935fae4ca1855706722736b380dbbfef6d61 | [
"BSD-3-Clause"
] | null | null | null | shell/redirect.py | utep-cs-systems-courses/os-shell-Joshua-Zamora | e550935fae4ca1855706722736b380dbbfef6d61 | [
"BSD-3-Clause"
] | null | null | null | shell/redirect.py | utep-cs-systems-courses/os-shell-Joshua-Zamora | e550935fae4ca1855706722736b380dbbfef6d61 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
def redirect(arg, symbol):
if symbol == '<' and arg.count("<") == 1:
os.close(0)
os.open(arg[arg.index(symbol) + 1], os.O_RDONLY)
os.set_inheritable(0, True)
elif symbol == '>' and arg.count(">") == 1:
os.close(1)
os.open(arg[arg.index(symbol) + 1]... | 24.947368 | 69 | 0.552743 |
3aa2bb85ff3fe26e6d2fe6094d146588de9da827 | 2,588 | py | Python | qiskit/providers/ibmq/credentials/__init__.py | mtreinish/qiskit-ibmq-provider | 3ace23a40a9a049c08b140bf0a16c68ed5647f74 | [
"Apache-2.0"
] | 1 | 2020-07-14T20:09:52.000Z | 2020-07-14T20:09:52.000Z | qiskit/providers/ibmq/credentials/__init__.py | mtreinish/qiskit-ibmq-provider | 3ace23a40a9a049c08b140bf0a16c68ed5647f74 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/credentials/__init__.py | mtreinish/qiskit-ibmq-provider | 3ace23a40a9a049c08b140bf0a16c68ed5647f74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# 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... | 35.452055 | 77 | 0.696291 |
da7ac750647286e82468b2a3d27a38ace10538ca | 4,810 | py | Python | benchmarking/bridge/db.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | 1 | 2019-08-09T07:50:21.000Z | 2019-08-09T07:50:21.000Z | benchmarking/bridge/db.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | null | null | null | benchmarking/bridge/db.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... | 31.032258 | 89 | 0.543451 |
ffedeeed0b866cc7ec953acea9737b88432086bd | 59 | py | Python | tda/__init__.py | imxly2/chinese_text_aug | 141d6717292d93da5a1f964cb26150725cffd9d5 | [
"MIT"
] | null | null | null | tda/__init__.py | imxly2/chinese_text_aug | 141d6717292d93da5a1f964cb26150725cffd9d5 | [
"MIT"
] | null | null | null | tda/__init__.py | imxly2/chinese_text_aug | 141d6717292d93da5a1f964cb26150725cffd9d5 | [
"MIT"
] | null | null | null | from .translate import back_translate
from .eda import eda
| 19.666667 | 37 | 0.830508 |
d00d1926d5fdebe448777ecedfddce7b6cfa0e7a | 98 | py | Python | boxsdk/version.py | dtrodger/box-python-sdk | dba132e347e7b5a4a20feb148f316d0b145684a5 | [
"Apache-2.0"
] | null | null | null | boxsdk/version.py | dtrodger/box-python-sdk | dba132e347e7b5a4a20feb148f316d0b145684a5 | [
"Apache-2.0"
] | null | null | null | boxsdk/version.py | dtrodger/box-python-sdk | dba132e347e7b5a4a20feb148f316d0b145684a5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, absolute_import
__version__ = '2.7.1'
| 14 | 56 | 0.765306 |
286f89c52c18a75bf8c8b3146148906d9ebd1a1e | 3,284 | py | Python | studio/gcloud_artifact_store.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/gcloud_artifact_store.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/gcloud_artifact_store.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | import time
import calendar
from .tartifact_store import TartifactStore
from . import logs
STORAGE_CLIENT_EXPIRATION = 3600
class GCloudArtifactStore(TartifactStore):
def __init__(self, config,
measure_timestamp_diff=False,
compression=None,
verbose=10):
... | 29.854545 | 79 | 0.589525 |
d240071c8b335853274a9867fbd9ffff23324af4 | 8,144 | py | Python | pdb2pqr/utilities.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | pdb2pqr/utilities.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | pdb2pqr/utilities.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | """Utilities for the PDB2PQR software suite.
.. todo:
The functions in this module are great examples of why PDB2PQR needs
:mod:`numpy`.
More efforts should be made to subsitute with :mod:`numpy` data types and
functions wherever possible throughout the code base.
.. codeauthor:: Todd Dolinsky
.. cod... | 30.616541 | 79 | 0.63998 |
503506b0fb3d1ced4547ebf19a8d442e6ffe7304 | 51,610 | py | Python | src/twisted/internet/base.py | nielsavonds/twisted | 64506ce3bb578d708372237872aa6b8b90890cb6 | [
"Unlicense",
"MIT"
] | null | null | null | src/twisted/internet/base.py | nielsavonds/twisted | 64506ce3bb578d708372237872aa6b8b90890cb6 | [
"Unlicense",
"MIT"
] | null | null | null | src/twisted/internet/base.py | nielsavonds/twisted | 64506ce3bb578d708372237872aa6b8b90890cb6 | [
"Unlicense",
"MIT"
] | null | null | null | # -*- test-case-name: twisted.test.test_internet,twisted.internet.test.test_core -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Very basic functionality for a Reactor implementation.
"""
from abc import ABC, abstractmethod
import builtins
from heapq import heappush, heappop, heapify
... | 35.716263 | 97 | 0.605464 |
0cdc16ae9a1af59912e9c98eb3671e10e3c5d211 | 9,975 | py | Python | contrib/spendfrom/spendfrom.py | aitracoinofficial/AITRA | b047e796c2352a30a12139ef562f29efd4db7578 | [
"MIT"
] | 4 | 2020-12-11T15:34:15.000Z | 2021-11-26T14:51:33.000Z | contrib/spendfrom/spendfrom.py | aitracoinofficial/AITRA | b047e796c2352a30a12139ef562f29efd4db7578 | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | aitracoinofficial/AITRA | b047e796c2352a30a12139ef562f29efd4db7578 | [
"MIT"
] | 1 | 2020-10-28T18:10:38.000Z | 2020-10-28T18:10:38.000Z | #!/usr/bin/env python
#
# Use the raw transactions API to spend AITRAs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a aitrad or aitra-Q... | 37.220149 | 111 | 0.630376 |
73430249b4ea605eeeab111db3cde0be50989f44 | 600 | py | Python | nicos_virt_mlz/treff/setups/special/daemon.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_virt_mlz/treff/setups/special/daemon.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_virt_mlz/treff/setups/special/daemon.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'setup for the execution daemon'
group = 'special'
devices = dict(
Auth = device('nicos.services.daemon.auth.list.Authenticator',
# the hashing maybe 'md5' or 'sha1'
hashing = 'md5',
passwd = [('guest', '', 'guest'),
('user', 'd3bde5ce3e546626df42771c58986d4e... | 31.578947 | 73 | 0.551667 |
85dbeb03e27c793bd7832cf22412dcafed8236ae | 9,715 | py | Python | backend/flaskr/api_upload.py | TavonL/Question-Bank-Management-System | 83116e347adb31b7294e70da7ec38b5d7e2d7cc1 | [
"MIT"
] | null | null | null | backend/flaskr/api_upload.py | TavonL/Question-Bank-Management-System | 83116e347adb31b7294e70da7ec38b5d7e2d7cc1 | [
"MIT"
] | 2 | 2020-12-04T17:52:38.000Z | 2022-01-15T01:29:14.000Z | backend/flaskr/api_upload.py | TavonL/Question-Bank-Management-System | 83116e347adb31b7294e70da7ec38b5d7e2d7cc1 | [
"MIT"
] | null | null | null | import functools
import json
import os
import re
from flask import (
Blueprint, g, request, session, url_for, jsonify, make_response
)
from flaskr.db import (
get_db, excute_select, excute_delete, excute_insert, excute_procedure, excute_update
)
from python_script.md2word import (
convertFile, addHeader, createMdF... | 32.491639 | 88 | 0.660319 |
49e942c2fe96e8d8001a933dd6f088836f593afe | 5,645 | py | Python | dev/local/vision/learner.py | vguerra/fastai_docs | 95df902ef5cd08bcd58d5ca64bc8a6ea3f297531 | [
"Apache-2.0"
] | null | null | null | dev/local/vision/learner.py | vguerra/fastai_docs | 95df902ef5cd08bcd58d5ca64bc8a6ea3f297531 | [
"Apache-2.0"
] | null | null | null | dev/local/vision/learner.py | vguerra/fastai_docs | 95df902ef5cd08bcd58d5ca64bc8a6ea3f297531 | [
"Apache-2.0"
] | null | null | null | #AUTOGENERATED! DO NOT EDIT! File to edit: dev/22_vision_learner.ipynb (unless otherwise specified).
__all__ = ['has_pool_type', 'create_body', 'in_channels', 'num_features_model', 'create_head', 'create_cnn_model',
'model_meta', 'cnn_learner']
#Cell
from ..torch_basics import *
from ..test import *
from .... | 43.423077 | 140 | 0.672099 |
4adece2bc1614bd527df674b2eb9059bd844cadb | 1,215 | py | Python | lib/surface/compute/sole_tenancy/node_templates/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/sole_tenancy/node_templates/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/sole_tenancy/node_templates/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.96875 | 76 | 0.772016 |
2704473b585c0ac0d3e41c954ce9be58dcca7cc0 | 141 | py | Python | Exercicios/ex034.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | Exercicios/ex034.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | Exercicios/ex034.py | mauroalbuquerque/Python-CursoEmVideo | 5a9fcbd878af49d7b8aa3f7d904b1f22e643edd8 | [
"MIT"
] | null | null | null | salario = float(input('Qual é o seu salário: R$ ').strip())
aumento = (salario * 1.10 if salario > 1250 else salario * 1.15)
print(aumento) | 28.2 | 64 | 0.673759 |
462009eada33103417da568d9135ea499cbbbb65 | 7,548 | py | Python | tests/test_blast/test_bioblast/test_bioblast.py | jvrana/pyblast | 0f7ee7575e97470bfd05a2373d9c68247ec4ead0 | [
"MIT"
] | null | null | null | tests/test_blast/test_bioblast/test_bioblast.py | jvrana/pyblast | 0f7ee7575e97470bfd05a2373d9c68247ec4ead0 | [
"MIT"
] | 8 | 2017-10-19T22:02:05.000Z | 2020-04-09T20:45:23.000Z | tests/test_blast/test_bioblast/test_bioblast.py | jvrana/pyblast | 0f7ee7575e97470bfd05a2373d9c68247ec4ead0 | [
"MIT"
] | null | null | null | import json
from os.path import join
import pytest
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from pyblast import BioBlast
from pyblast.exceptions import PyBlastException
from pyblast.utils import force_unique_record_ids
from pyblast.utils import load_genbank_glob
from pyblast.utils import make_linea... | 35.772512 | 902 | 0.729597 |
dfa94cfff7c4d5fd16ce4da22a4bd240d6e8312d | 96 | py | Python | NN/layerversions/__init__.py | nayyarv/CodeANet | 30c8d95fff96bdca72b49de551f38e33cd59a5f6 | [
"MIT"
] | null | null | null | NN/layerversions/__init__.py | nayyarv/CodeANet | 30c8d95fff96bdca72b49de551f38e33cd59a5f6 | [
"MIT"
] | null | null | null | NN/layerversions/__init__.py | nayyarv/CodeANet | 30c8d95fff96bdca72b49de551f38e33cd59a5f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "Varun Nayyar <nayyarv@gmail.com>"
| 24 | 47 | 0.645833 |
9ed5614d4d491d8416c421182bd15a17c3fa2114 | 2,642 | py | Python | scripts/bnftp_client.py | dkuwahara/bncs.py | ca88ae244df4d39316d81d1e894c657e1a980a6e | [
"MIT"
] | 1 | 2020-02-09T11:02:28.000Z | 2020-02-09T11:02:28.000Z | scripts/bnftp_client.py | dkuwahara/bncs.py | ca88ae244df4d39316d81d1e894c657e1a980a6e | [
"MIT"
] | null | null | null | scripts/bnftp_client.py | dkuwahara/bncs.py | ca88ae244df4d39316d81d1e894c657e1a980a6e | [
"MIT"
] | null | null | null |
from bnftp import BnftpClient
import argparse
from datetime import datetime
import hashlib
parser = argparse.ArgumentParser(description="Downloads a file from the Battle.net FTP service.")
parser.add_argument("file", help="The name of the file to download.")
parser.add_argument("--server", default="useast.battle.ne... | 38.289855 | 114 | 0.682059 |
305b318be47ab62eb64842bb01c784c6a1c0623e | 8,596 | py | Python | tensorflow_estimator/python/estimator/keras_premade_model_test.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/keras_premade_model_test.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/keras_premade_model_test.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | # 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... | 40.54717 | 85 | 0.727897 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.