hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2c78b7efdd194e516ae812f551f6e716de7980d0 | 2,462 | py | Python | utils/exact_shapley.py | marcoancona/DASP | cbd82b36443199f11fa04ecb0322fa68f5505b2c | [
"MIT"
] | 47 | 2019-04-29T19:14:10.000Z | 2022-02-28T13:37:21.000Z | utils/exact_shapley.py | marcoancona/DASP | cbd82b36443199f11fa04ecb0322fa68f5505b2c | [
"MIT"
] | 5 | 2019-06-05T13:41:12.000Z | 2022-03-08T05:31:02.000Z | utils/exact_shapley.py | marcoancona/DASP | cbd82b36443199f11fa04ecb0322fa68f5505b2c | [
"MIT"
] | 13 | 2019-06-07T12:07:18.000Z | 2021-12-20T02:02:20.000Z | import numpy as np
from itertools import chain, combinations
import scipy.special
fact = scipy.special.factorial
def f_max(inputs):
return np.max(inputs)
def f_linear_relu(x, w, b):
y = np.sum(x*w, -1) + b
return np.maximum(0, y)
def powerset(iterable):
"""
powerset([1,2,3]) --> () (1,) (2,) (... | 34.194444 | 100 | 0.623071 |
d5466d0d6ae28f217e320e69a50f86d00f66d62a | 20,515 | py | Python | adafruit_progressbar/__init__.py | lesamouraipourpre/Adafruit_CircuitPython_ProgressBar | 17f1290869db1cd8beb03e7640635eb4d9483734 | [
"Unlicense",
"MIT-0",
"MIT"
] | 5 | 2020-04-14T20:50:30.000Z | 2021-10-19T18:49:46.000Z | adafruit_progressbar/__init__.py | lesamouraipourpre/Adafruit_CircuitPython_ProgressBar | 17f1290869db1cd8beb03e7640635eb4d9483734 | [
"Unlicense",
"MIT-0",
"MIT"
] | 25 | 2020-07-17T03:05:56.000Z | 2022-01-06T16:00:51.000Z | adafruit_progressbar/__init__.py | lesamouraipourpre/Adafruit_CircuitPython_ProgressBar | 17f1290869db1cd8beb03e7640635eb4d9483734 | [
"Unlicense",
"MIT-0",
"MIT"
] | 10 | 2020-01-07T20:14:56.000Z | 2021-11-14T20:34:43.000Z | # SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_progressbar`
================================================================================
Dynamic progress bar widget for CircuitPython displays
* Author(s): Brent Rubell and Hugo Dahl
Implementat... | 34.248748 | 98 | 0.601852 |
1f4d2ac36f75b79a5ff4f6b2051e73a0fa2de684 | 721 | py | Python | main.py | MCAR43/PyAudit | e0bea458648deb29df0ef3bdad210a1cc6de8f71 | [
"Beerware"
] | null | null | null | main.py | MCAR43/PyAudit | e0bea458648deb29df0ef3bdad210a1cc6de8f71 | [
"Beerware"
] | null | null | null | main.py | MCAR43/PyAudit | e0bea458648deb29df0ef3bdad210a1cc6de8f71 | [
"Beerware"
] | null | null | null | #!/usr/bin/python3
import argparse
import sys
from app.parser.device import Device
def parseInputArgs(argv):
parser = argparse.ArgumentParser(description="Python Cisco CIS Auditor")
parser.add_argument('config', help='Path to the config file')
parser.add_argument('benchmark', help='Path to the benchmark JSO... | 26.703704 | 91 | 0.710125 |
7e78045b706a75c8c1f558dceea88a6091775dad | 454 | py | Python | pydis_site/apps/home/migrations/0002_auto_now_on_repository_metadata.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 700 | 2018-11-17T15:56:51.000Z | 2022-03-30T22:53:17.000Z | pydis_site/apps/home/migrations/0002_auto_now_on_repository_metadata.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 542 | 2018-11-17T13:39:42.000Z | 2022-03-31T11:24:00.000Z | pydis_site/apps/home/migrations/0002_auto_now_on_repository_metadata.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 178 | 2018-11-21T09:06:56.000Z | 2022-03-31T07:43:28.000Z | # Generated by Django 3.0.11 on 2020-12-21 22:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='repositorymetadata',
name='last_updated... | 23.894737 | 113 | 0.627753 |
f064cbd4dbb855d6f69c4a471c771d48487ec55b | 2,171 | py | Python | desktop/libs/libopenid/src/libopenid/views.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | desktop/libs/libopenid/src/libopenid/views.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/libs/libopenid/src/libopenid/views.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2 | 2019-12-05T17:24:36.000Z | 2021-11-22T21:21:32.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 36.183333 | 104 | 0.771994 |
d468f29a5dbe27fc6f84b9ad1831d10ade9eb944 | 2,196 | py | Python | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/ReportTerrorismJobResultRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/ReportTerrorismJobResultRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-mts/aliyunsdkmts/request/v20140618/ReportTerrorismJobResultRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.272727 | 83 | 0.764117 |
9c1bcd16332cae19eee426f22272016e10031410 | 48,851 | py | Python | made.py | var-skip/var-skip | 0b19994466cd2a690ed8bfeefd78dbf36ea85410 | [
"Apache-2.0"
] | 5 | 2020-07-15T13:37:23.000Z | 2021-05-03T07:25:12.000Z | made.py | var-skip/var-skip | 0b19994466cd2a690ed8bfeefd78dbf36ea85410 | [
"Apache-2.0"
] | null | null | null | made.py | var-skip/var-skip | 0b19994466cd2a690ed8bfeefd78dbf36ea85410 | [
"Apache-2.0"
] | 3 | 2020-07-15T18:22:43.000Z | 2021-03-18T14:30:08.000Z | import time
import numpy as np
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
# try:
# from typing_extensions import Final
# except:
# # If you don't have `typing_extensions` installed, you can use a
# # polyfill from `torch.jit`.
# from torch.jit import Final
# fro... | 41.646206 | 98 | 0.513234 |
b02b8a84c5c9c793a224678fd7450679afcf7aff | 55,132 | py | Python | scipy/stats/tests/test_hypotests.py | khavernathy/scipy | f09a01721a3859240a8b69f42df8a45508da86d7 | [
"BSD-3-Clause"
] | null | null | null | scipy/stats/tests/test_hypotests.py | khavernathy/scipy | f09a01721a3859240a8b69f42df8a45508da86d7 | [
"BSD-3-Clause"
] | 2 | 2015-01-06T19:51:42.000Z | 2015-12-04T21:54:44.000Z | scipy/stats/tests/test_hypotests.py | khavernathy/scipy | f09a01721a3859240a8b69f42df8a45508da86d7 | [
"BSD-3-Clause"
] | 1 | 2021-12-12T12:01:36.000Z | 2021-12-12T12:01:36.000Z | from __future__ import division, print_function, absolute_import
from itertools import product
import numpy as np
import pytest
from numpy.testing import (assert_, assert_equal, assert_allclose,
assert_almost_equal) # avoid new uses
from pytest import raises as assert_raises
import scipy.... | 42.540123 | 79 | 0.563085 |
004d6dbb27ae1d41434587989afce92811f1f943 | 798 | py | Python | PHASEfilter/lib/constants/version.py | ibigen/PHASEfilter | 669729f408b9c23d5db2ba72e74195b2228669da | [
"MIT"
] | null | null | null | PHASEfilter/lib/constants/version.py | ibigen/PHASEfilter | 669729f408b9c23d5db2ba72e74195b2228669da | [
"MIT"
] | null | null | null | PHASEfilter/lib/constants/version.py | ibigen/PHASEfilter | 669729f408b9c23d5db2ba72e74195b2228669da | [
"MIT"
] | null | null | null | """Version of PHASEfilter"""
# MAJOR.MINOR.MAINTENANCE numbering scheme, where the project author increments:
# MAJOR version when they make incompatible API changes,
# MINOR version when they add functionality in a backwards-compatible manner, and
# MAINTENANCE version when they make backwards-compatible bug fixes... | 36.272727 | 81 | 0.701754 |
b5a0305d06bc565cb667f83904986bca004f1a25 | 1,962 | py | Python | tenth/tenth/apps/gathering/migrations/0001_initial.py | TanDeemo/Tenth | 52f721d4433edfa336e989e6eeedd288d4e38674 | [
"MIT"
] | null | null | null | tenth/tenth/apps/gathering/migrations/0001_initial.py | TanDeemo/Tenth | 52f721d4433edfa336e989e6eeedd288d4e38674 | [
"MIT"
] | null | null | null | tenth/tenth/apps/gathering/migrations/0001_initial.py | TanDeemo/Tenth | 52f721d4433edfa336e989e6eeedd288d4e38674 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2020-08-10 21:30
import ckeditor_uploader.fields
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
oper... | 47.853659 | 123 | 0.611621 |
baadc73f57104c95c040ccdf6307a241c9a0cd0c | 1,158 | py | Python | python/__init__.py | HavoK-at/gr-shared_memory | e5ba535e5346c9806f052bed9038868da1bb8875 | [
"MIT"
] | null | null | null | python/__init__.py | HavoK-at/gr-shared_memory | e5ba535e5346c9806f052bed9038868da1bb8875 | [
"MIT"
] | null | null | null | python/__init__.py | HavoK-at/gr-shared_memory | e5ba535e5346c9806f052bed9038868da1bb8875 | [
"MIT"
] | null | null | null | #
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This application is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This application is di... | 33.085714 | 74 | 0.771157 |
739edbfdbcf4b4710f65751e1c7135cb51281432 | 17,156 | py | Python | keras/legacy_tf_layers/normalization.py | shantanusharma/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | 3 | 2021-03-15T05:32:36.000Z | 2021-12-14T07:29:53.000Z | keras/legacy_tf_layers/normalization.py | bluemap19/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | 1 | 2021-03-01T13:50:34.000Z | 2021-03-01T13:50:34.000Z | keras/legacy_tf_layers/normalization.py | bluemap19/keras | 662f6c5bb82b54d90ec8e863ac7a44c3b8c1b938 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 49.583815 | 138 | 0.688855 |
3c4e6e7785af14bf6431137a8efb29e654b65cbf | 1,403 | py | Python | show_weather.py | AMARTYA2020/Weather_Forecast | 019c073c9801fe30c07f2e012e8f8d0e3fca2812 | [
"MIT"
] | 2 | 2021-02-03T10:39:18.000Z | 2021-02-18T12:56:06.000Z | show_weather.py | AMARTYA2020/Weather_Forecast | 019c073c9801fe30c07f2e012e8f8d0e3fca2812 | [
"MIT"
] | null | null | null | show_weather.py | AMARTYA2020/Weather_Forecast | 019c073c9801fe30c07f2e012e8f8d0e3fca2812 | [
"MIT"
] | 1 | 2021-02-07T07:20:36.000Z | 2021-02-07T07:20:36.000Z | import requests
import json
from datetime import datetime
api_key = 'cbb6b8a7a93022bfe48120a12e239d34'
city_name = input('\nEnter the city name : ').strip()
# api.openweathermap.org/data/2.5/weather?q={city name}&appid={API key}
complete_api_link = 'https://api.openweathermap.org/data/2.5/weather?q=' + city_name + '... | 40.085714 | 106 | 0.560941 |
438c0a61a62db2cc6815863a317abed4409c2025 | 589 | py | Python | core/poc/struts2/make.py | YLingChuan/Wrath-Hemera | a5143f136107bd9f49e265b1e351585e07a02ad4 | [
"MIT"
] | 1 | 2021-03-26T13:54:48.000Z | 2021-03-26T13:54:48.000Z | core/poc/struts2/make.py | YLingChuan/Wrath-Hemera | a5143f136107bd9f49e265b1e351585e07a02ad4 | [
"MIT"
] | null | null | null | core/poc/struts2/make.py | YLingChuan/Wrath-Hemera | a5143f136107bd9f49e265b1e351585e07a02ad4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
#PATH
path = os.getcwd()
syscache = (path+'/cache')
struts2 = (path+'/core/poc/struts2')
os.system("cp %s/standard %s/final_execute"%(struts2,struts2))
target = open(syscache + '/url.log','r')
target = target.read()
print("[+] Target:",target)
port = input("[+] Please i... | 21.814815 | 68 | 0.646859 |
b29babe06c294b866763164ce25e9ce707157525 | 3,123 | py | Python | model/cpn/ablation_study/pcontext.cpn.R101_v1c/config.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | null | null | null | model/cpn/ablation_study/pcontext.cpn.R101_v1c/config.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | 1 | 2021-06-08T20:36:43.000Z | 2021-06-08T20:36:43.000Z | model/cpn/ablation_study/pcontext.cpn.R101_v1c/config.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | null | null | null | # encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path as osp
import sys
import time
import numpy as np
from easydict import EasyDict as edict
import argparse
import torch.utils.model_zoo as model_zoo
C = edict()
config = C
cfg =... | 27.156522 | 103 | 0.722062 |
547661a734a80d0bba2de12eb0e0e682f930e6e0 | 1,083 | py | Python | Awwards/urls.py | collinsbett29/Awwards | 85fca973fccd5a84a4c8da6feaab8dd4452c1103 | [
"MIT"
] | null | null | null | Awwards/urls.py | collinsbett29/Awwards | 85fca973fccd5a84a4c8da6feaab8dd4452c1103 | [
"MIT"
] | 7 | 2020-02-12T03:20:53.000Z | 2022-03-12T00:06:11.000Z | Awwards/urls.py | collinsbett29/Awwards | 85fca973fccd5a84a4c8da6feaab8dd4452c1103 | [
"MIT"
] | null | null | null | """awards URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | 41.653846 | 79 | 0.704524 |
4ce13aa9008e7d7b813e16b649e29852f0072ac5 | 387 | py | Python | allauth/urls.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | allauth/urls.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | allauth/urls.py | Cairnica/django-allauth | 43ddfc81f7fd06fc6502d425bf78833d5dbf49d0 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from allauth.socialaccount import providers
from . import app_settings
urlpatterns = [url(r'^', include('allauth.account.urls'))]
if app_settings.SOCIALACCOUNT_ENABLED:
urlpatterns += [url(r'^social/', include('allauth.socialaccount.urls'))]
for provider in providers.... | 25.8 | 76 | 0.75969 |
7145bfc83e25ff66cad105596a25c6d0786a48d3 | 9,908 | py | Python | test/mitmproxy/addons/test_view.py | johnsoft/mitmproxy | d133b8baeeefa04fa6bdf43c39be822def013a6b | [
"MIT"
] | null | null | null | test/mitmproxy/addons/test_view.py | johnsoft/mitmproxy | d133b8baeeefa04fa6bdf43c39be822def013a6b | [
"MIT"
] | null | null | null | test/mitmproxy/addons/test_view.py | johnsoft/mitmproxy | d133b8baeeefa04fa6bdf43c39be822def013a6b | [
"MIT"
] | 1 | 2020-11-07T08:54:29.000Z | 2020-11-07T08:54:29.000Z | import pytest
from mitmproxy.test import tflow
from mitmproxy.addons import view
from mitmproxy import flowfilter
from mitmproxy import options
from mitmproxy.test import taddons
def tft(*, method="get", start=0):
f = tflow.tflow()
f.request.method = method
f.request.timestamp_start = start
return f... | 24.048544 | 88 | 0.603654 |
ccb44eda2f35164bdd20d1768a948c928fbd40eb | 20,268 | py | Python | tools/mo/openvino/tools/mo/back/preprocessing.py | artkuli/openvino | eb2fb5bf7df36ae55e3251816999b801ce053335 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/openvino/tools/mo/back/preprocessing.py | artkuli/openvino | eb2fb5bf7df36ae55e3251816999b801ce053335 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/openvino/tools/mo/back/preprocessing.py | tuxedcat/openvino | 5939cb1b363ebb56b73c2ad95d8899961a084677 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import logging as log
from openvino.tools.mo.utils.error import Error
from openvino.tools.mo.utils.utils import refer_to_faq_msg
import numpy as np
from openvino.preprocess import PrePostProcessor # pylint: disa... | 47.35514 | 120 | 0.626159 |
89059ef1c38bff2a4967f0b2e3ab7080ea74bf89 | 5,393 | py | Python | openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0055.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0055.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0055.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 34.132911 | 84 | 0.603004 |
bed1d43919380ca58e5d6cdd88033fee919124e0 | 2,035 | py | Python | day9.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null | day9.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null | day9.py | mmertama/advent-of-code-2021 | 21475bb7ab8f59b3173cf1e9440e07df63b70a3e | [
"MIT"
] | null | null | null |
example = '''2199943210
3987894921
9856789892
8767896789
9899965678'''
def get_height_map(data):
height_map = []
width = len(data[0])
height = len(data)
for ln in data:
height_map.append([int(x) for x in list(ln.rstrip())])
min_list = []
for y in range(height):
for x in range(... | 30.833333 | 72 | 0.566585 |
ac00bedee79c8a25d1e0387f0b144429d59cd980 | 1,944 | py | Python | backend/notebook-preprocess/slice.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null | backend/notebook-preprocess/slice.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null | backend/notebook-preprocess/slice.py | WatVis/EDAssistant | a4be2849a65abcf2f81f9c01a2172ec67aa38853 | [
"BSD-3-Clause"
] | null | null | null |
import subprocess
import os
from os.path import join
import shutil
from tqdm import tqdm, trange
import sys
import multiprocessing.dummy as mp
notebooks_path = "../notebooks-full"
slice_output_path = "../notebooks-locset"
parse_output_path = "../notebooks-noMD"
devnull = open(os.devnull, 'w')
def sl... | 33.517241 | 111 | 0.686214 |
981262a6d2c6c2363c3226857f4ec633346996fb | 352 | py | Python | dark/__init__.py | UdoGi/dark-matter | 3d49e89fa5e81f83144119f6216c5774176d203b | [
"MIT"
] | null | null | null | dark/__init__.py | UdoGi/dark-matter | 3d49e89fa5e81f83144119f6216c5774176d203b | [
"MIT"
] | null | null | null | dark/__init__.py | UdoGi/dark-matter | 3d49e89fa5e81f83144119f6216c5774176d203b | [
"MIT"
] | null | null | null | import sys
if sys.version_info < (2, 7):
raise Exception('The dark matter code needs Python 2.7 or later.')
# Note that the version string must have the following format, otherwise it
# will not be found by the version() function in ../setup.py
#
# Remember to update ../CHANGELOG.md describing what's new in each ... | 32 | 75 | 0.727273 |
43e41f446733e5ff112391fe55950a0487249b62 | 1,971 | py | Python | pdf_reader/app.py | fhightower/pdf-reader | caa6c562b823d67368d7188ddd5ccd7d584bd01c | [
"MIT"
] | null | null | null | pdf_reader/app.py | fhightower/pdf-reader | caa6c562b823d67368d7188ddd5ccd7d584bd01c | [
"MIT"
] | null | null | null | pdf_reader/app.py | fhightower/pdf-reader | caa6c562b823d67368d7188ddd5ccd7d584bd01c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" standard """
import sys
""" third-party """
""" custom """
from tcex import TcExLocal
"""
Copy this python script to your app base directory to use the tcex_local module.
Example Usage:
Install all the required libraries defined in setup.py. These will be the same packages
with the same ... | 32.85 | 96 | 0.747336 |
469455752a4f2c33b87be5eeb4333bb67b4c750d | 41,244 | py | Python | tabs_extra.py | maheshwaghmare/TabsExtra | 093ca19db5fb7129f23c5b98b8f87e941cda39e6 | [
"MIT"
] | null | null | null | tabs_extra.py | maheshwaghmare/TabsExtra | 093ca19db5fb7129f23c5b98b8f87e941cda39e6 | [
"MIT"
] | null | null | null | tabs_extra.py | maheshwaghmare/TabsExtra | 093ca19db5fb7129f23c5b98b8f87e941cda39e6 | [
"MIT"
] | null | null | null | """
TabsExtra.
Copyright (c) 2014 - 2016 Isaac Muse <isaacmuse@gmail.com>
License: MIT
"""
import sublime_plugin
import sublime
import time
import sys
from TabsExtra import tab_menu
import os
import functools
from operator import itemgetter
import sublime_api
from urllib.parse import urljoin
from urllib.request impor... | 34.542714 | 173 | 0.55482 |
bc533b486121cd78fe8d1cc13522902c417063ad | 1,155 | py | Python | Code/odooerp/odoo-8.0/openerp/addons/payment_buckaroo/controllers/main.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | null | null | null | Code/odooerp/odoo-8.0/openerp/addons/payment_buckaroo/controllers/main.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | null | null | null | Code/odooerp/odoo-8.0/openerp/addons/payment_buckaroo/controllers/main.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
try:
import simplejson as json
except ImportError:
import json
import logging
import pprint
import werkzeug
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
class BuckarooController(http.Controller):
_return_url = '/pa... | 32.083333 | 130 | 0.683983 |
a4e28a70b2e59b0ac3cf7186f9a66620fd87e72a | 12,685 | py | Python | tape/__main__.py | cthoyt/TAPE | 70d9364f6d67fd8b5574eed729af48d4f0694019 | [
"MIT"
] | 2 | 2020-12-06T15:41:03.000Z | 2021-06-18T10:25:23.000Z | tape/__main__.py | cthoyt/TAPE | 70d9364f6d67fd8b5574eed729af48d4f0694019 | [
"MIT"
] | null | null | null | tape/__main__.py | cthoyt/TAPE | 70d9364f6d67fd8b5574eed729af48d4f0694019 | [
"MIT"
] | null | null | null | from typing import List, Union, Sequence, Tuple, Optional
from glob import glob
from collections import defaultdict
import atexit
import os
import shutil
import pickle as pkl
import tensorflow as tf
from tape.tasks import TaskBuilder, Task, AbstractLanguageModelingTask
from tape.models import ModelBuilder
from tape.e... | 36.139601 | 113 | 0.671502 |
b20be4c7aded3df7419797a9c56f9b7e0993e946 | 8,321 | py | Python | docs/conflib/release_mapping.py | trevor-vaughan/simp-doc | 6c544cab47dc69fc5965a867ec22cb4a7101f007 | [
"Apache-2.0"
] | 1 | 2015-10-29T19:10:46.000Z | 2015-10-29T19:10:46.000Z | docs/conflib/release_mapping.py | jeannegreulich/simp-doc | 838d36e72739ad3fb0511e0978e1590c4e1c8865 | [
"Apache-2.0"
] | null | null | null | docs/conflib/release_mapping.py | jeannegreulich/simp-doc | 838d36e72739ad3fb0511e0978e1590c4e1c8865 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import base64
import copy
import glob
import json
import os
import re
import sys
import time
import urllib2
from textwrap import dedent
import yaml
sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
from conflib.constants import *
def github_api_get(url... | 37.481982 | 115 | 0.602331 |
677ebdaf24196214002686c2ceb286a637f3817d | 1,625 | py | Python | meiduo_mall/meiduo_mall/apps/verifications/views.py | amour-lee/MeiDuoProject | 72bae3886d5db79f63725d3aa1a6b4bad294572e | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/verifications/views.py | amour-lee/MeiDuoProject | 72bae3886d5db79f63725d3aa1a6b4bad294572e | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/verifications/views.py | amour-lee/MeiDuoProject | 72bae3886d5db79f63725d3aa1a6b4bad294572e | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView
import random, logging
from django_redis import get_redis_connection
from . import constants
from meiduo_mall.libs.yuntongxun.sms import CCP
from rest_framework.response import Response
from rest_framework import status
from celery_tasks.sms.t... | 28.508772 | 96 | 0.669538 |
b75f75b8c124c11ff7e017cbe5bc91fe84dfbd44 | 12,256 | py | Python | build/lib/GML/AUTO_FEATURE_ENGINEERING/autofeatlight.py | mehrankamal/GML | ee36ba502293236bf90bf6056c76f106c8dad00c | [
"MIT"
] | 89 | 2020-02-29T15:23:34.000Z | 2020-11-26T07:46:09.000Z | build/lib/GML/AUTO_FEATURE_ENGINEERING/autofeatlight.py | mehrankamal/GML | ee36ba502293236bf90bf6056c76f106c8dad00c | [
"MIT"
] | 8 | 2020-11-30T16:56:01.000Z | 2021-05-13T09:29:18.000Z | build/lib/GML/AUTO_FEATURE_ENGINEERING/autofeatlight.py | mehrankamal/GML | ee36ba502293236bf90bf6056c76f106c8dad00c | [
"MIT"
] | 23 | 2020-11-30T14:06:54.000Z | 2021-06-25T09:28:05.000Z | import sys
import numpy as np
import pandas as pd
from collections import defaultdict
from sklearn.base import BaseEstimator
from sklearn.utils.validation import check_array, check_is_fitted
from sklearn.preprocessing import StandardScaler, PowerTransformer
def _check_features(df, corrthr=0.995, verbose=0):
"""
... | 48.634921 | 154 | 0.639768 |
07e1fe0898e12966e20a3fd0b17889b7c7238d61 | 10,614 | py | Python | devol/devol.py | eladmintzer/devol | 73a0839b7164dde26a5e1f6c2eb692f7061947a5 | [
"MIT"
] | null | null | null | devol/devol.py | eladmintzer/devol | 73a0839b7164dde26a5e1f6c2eb692f7061947a5 | [
"MIT"
] | null | null | null | devol/devol.py | eladmintzer/devol | 73a0839b7164dde26a5e1f6c2eb692f7061947a5 | [
"MIT"
] | null | null | null | """
Run a genetic algorithm to find an appropriate architecture for some image
classification task with Keras+TF.
To use, define a `GenomeHandler` defined in genomehandler.py. Then pass it, with
training data, to a DEvol instance to run the genetic algorithm. See the readme
for more detailed instructions.
"""
from __... | 36.982578 | 104 | 0.573394 |
84122b70d7f0be23507a51695beb753d765a37a3 | 1,389 | py | Python | scripts/pa_delete_scheduled_task.py | pythonanywhere/helper-scripts | a1f4b5c060b15515c71fa8cbfb65bb3409c8416a | [
"MIT"
] | 27 | 2017-09-13T20:44:03.000Z | 2022-01-13T19:09:07.000Z | scripts/pa_delete_scheduled_task.py | pythonanywhere/helper-scripts | a1f4b5c060b15515c71fa8cbfb65bb3409c8416a | [
"MIT"
] | 30 | 2017-01-18T16:55:52.000Z | 2022-02-14T16:15:15.000Z | scripts/pa_delete_scheduled_task.py | pythonanywhere/helper-scripts | a1f4b5c060b15515c71fa8cbfb65bb3409c8416a | [
"MIT"
] | 9 | 2017-09-26T19:01:53.000Z | 2021-11-08T01:18:05.000Z | #!/usr/bin/python3.6
"""Delete scheduled task(s) by id or nuke'em all.
Usage:
pa_delete_scheduled_task.py id <num>...
pa_delete_scheduled_task.py nuke [--force]
Options:
-h, --help Prints this message
-f, --force Turns off user confirmation before deleting tasks
Note:
Task ... | 26.207547 | 99 | 0.672426 |
5cd1adeed5715dd4d64af11661cdb36222e86ad6 | 3,492 | py | Python | maths/fibonacci.py | MOHAK7488/Python-3-Master | 36dbc5a62d7bfb12ddec27efb22dd7853e408fd0 | [
"MIT"
] | null | null | null | maths/fibonacci.py | MOHAK7488/Python-3-Master | 36dbc5a62d7bfb12ddec27efb22dd7853e408fd0 | [
"MIT"
] | null | null | null | maths/fibonacci.py | MOHAK7488/Python-3-Master | 36dbc5a62d7bfb12ddec27efb22dd7853e408fd0 | [
"MIT"
] | null | null | null | # fibonacci.py
"""
1. Calculates the iterative fibonacci sequence
2. Calculates the fibonacci sequence with a formula
an = [ Phin - (phi)n ]/Sqrt[5]
reference-->Su, Francis E., et al. "Fibonacci Number Formula." Math Fun Facts.
<http://www.math.hmc.edu/funfacts>
"""
import math
import functools
import time... | 26.656489 | 86 | 0.601661 |
359ab6b5f0900d51b8199e6d2b001486d0d8df07 | 228 | py | Python | mundo1/D14.py | KayanOkagawa/Cursoemvideo-Python3-Exercicios | 10c8386102cc0928f8f090070eb3218deb3d60fe | [
"MIT"
] | null | null | null | mundo1/D14.py | KayanOkagawa/Cursoemvideo-Python3-Exercicios | 10c8386102cc0928f8f090070eb3218deb3d60fe | [
"MIT"
] | null | null | null | mundo1/D14.py | KayanOkagawa/Cursoemvideo-Python3-Exercicios | 10c8386102cc0928f8f090070eb3218deb3d60fe | [
"MIT"
] | null | null | null | #-*-coding:utf8;-*-
#qpy:console
print(5 * '-', 'CONVERSOR DE TEMPERATURA', 5 * '-')
print('\n')
c = float(input('Digite o valor em Graus Celsius: '))
f = 1.8 * c + 32
print('O valor de {}°C em Farenheit é {}°F.'.format(c, f))
| 25.333333 | 58 | 0.583333 |
17dc4b1d3e427440624f9dab678917134223f897 | 3,925 | py | Python | ProtoToLua/protoToPb.py | Githaojiejie/proto2cs | b1e4308101d92bdf3269e4442a3e453905a336a7 | [
"MIT"
] | null | null | null | ProtoToLua/protoToPb.py | Githaojiejie/proto2cs | b1e4308101d92bdf3269e4442a3e453905a336a7 | [
"MIT"
] | null | null | null | ProtoToLua/protoToPb.py | Githaojiejie/proto2cs | b1e4308101d92bdf3269e4442a3e453905a336a7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/python3
import configparser
import os
import os.path
import pprint
import re
class MsgInfo(object):
def __init__(self,msgid,msgname,comment):
self.msgid = msgid
self.msgname = msgname
self.comment = comment
msgid = ""
msgname = ""
comment = ""
class WrapFile:
fs = Non... | 25.160256 | 103 | 0.684076 |
bf83ed903938c3db7f26d148d3f788648faff435 | 863 | py | Python | scripts/api/workflow_import.py | mjakubczak/galaxy | 77c1d328d45c98881d5b310d3461d2b116363daf | [
"CC-BY-3.0"
] | 1 | 2019-11-03T11:45:43.000Z | 2019-11-03T11:45:43.000Z | scripts/api/workflow_import.py | vazovn/galaxy | 8b538f17feb17eba11b3025a2dfb3ba35414a78e | [
"CC-BY-3.0"
] | null | null | null | scripts/api/workflow_import.py | vazovn/galaxy | 8b538f17feb17eba11b3025a2dfb3ba35414a78e | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
"""
Import workflows from the command line.
Example calls:
python workflow_import.py <api_key> <galaxy_url> '/path/to/workflow/file [--add_to_menu]'
"""
from __future__ import print_function
import os
import sys
from common import submit
def main():
api_key = sys.argv[1]
api_base_url = ... | 26.96875 | 89 | 0.65701 |
78b7f0c95ae8faa2079023c004a01a2eaa630f38 | 819 | py | Python | 102_user_display_and_settings_module/main/migrations/0016_auto_20200313_0942.py | Ampel2Go/community | 08759509287efef08218a4eb6e6e2b029b862b4a | [
"Apache-2.0"
] | 2 | 2020-08-08T15:38:08.000Z | 2020-11-18T13:13:45.000Z | 102_user_display_and_settings_module/main/migrations/0016_auto_20200313_0942.py | Ampel2Go/community | 08759509287efef08218a4eb6e6e2b029b862b4a | [
"Apache-2.0"
] | 1 | 2021-09-22T19:46:49.000Z | 2021-09-22T19:46:49.000Z | 102_user_display_and_settings_module/main/migrations/0016_auto_20200313_0942.py | Ampel2Go/community | 08759509287efef08218a4eb6e6e2b029b862b4a | [
"Apache-2.0"
] | 1 | 2022-02-16T09:52:31.000Z | 2022-02-16T09:52:31.000Z | # Generated by Django 2.1.1 on 2020-03-13 09:42
import datetime
from django.db import migrations, models
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('main', '0015_auto_20200312_1835'),
]
operations = [
migrations.AlterField(
model_name='wik... | 26.419355 | 94 | 0.593407 |
c9bcbfa19233933b87205af30bbf3926099311e6 | 181 | py | Python | code_challenges/sum_matrix/sum_matrix.py | eugenemonnier/data-structures-and-algorithms | 90177c2543e5a3e40a0bffe76ad2aeafba7574a6 | [
"MIT"
] | null | null | null | code_challenges/sum_matrix/sum_matrix.py | eugenemonnier/data-structures-and-algorithms | 90177c2543e5a3e40a0bffe76ad2aeafba7574a6 | [
"MIT"
] | null | null | null | code_challenges/sum_matrix/sum_matrix.py | eugenemonnier/data-structures-and-algorithms | 90177c2543e5a3e40a0bffe76ad2aeafba7574a6 | [
"MIT"
] | null | null | null | def sum_matrix(matrix):
result = list()
for idx, arr in enumerate(matrix):
result.append(0)
for val in arr:
result[idx] += val
return result
| 22.625 | 38 | 0.569061 |
a3982ab3e4bfef371c60899a2226f1f145df19a1 | 35,279 | py | Python | python/paddle/fluid/tests/unittests/test_initializer.py | zhenlin-work/Paddle | ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b | [
"Apache-2.0"
] | 2 | 2018-12-27T07:13:55.000Z | 2021-06-16T09:30:09.000Z | python/paddle/fluid/tests/unittests/test_initializer.py | zhenlin-work/Paddle | ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_initializer.py | zhenlin-work/Paddle | ed7a21dea0ddcffb6f7f33ce21c5c368f5c7866b | [
"Apache-2.0"
] | 1 | 2020-11-25T10:41:52.000Z | 2020-11-25T10:41:52.000Z | # Copyright (c) 2018 PaddlePaddle 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 app... | 38.346739 | 80 | 0.61127 |
9d9f4df75bf2f5cddcf3bbc817874f1b95adcbc8 | 541 | py | Python | test/strings_test.py | jonDuke/lambdata-jduke | 712495aca7870398b24388c9e1388bfedf48dad2 | [
"MIT"
] | null | null | null | test/strings_test.py | jonDuke/lambdata-jduke | 712495aca7870398b24388c9e1388bfedf48dad2 | [
"MIT"
] | 2 | 2021-04-01T08:17:59.000Z | 2021-04-01T08:20:37.000Z | test/strings_test.py | jonDuke/lambdata-jduke | 712495aca7870398b24388c9e1388bfedf48dad2 | [
"MIT"
] | null | null | null | # test/strings_test.py
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self... | 24.590909 | 67 | 0.654344 |
70fbdb36b833e3541d2accae10a51866e2b06818 | 11,927 | py | Python | mx_platform_python/model/managed_member_create_request.py | mxenabled/mx-platform-python | 060dae7ddb02fdcf41fa7f7aebfa4b8a0273afac | [
"MIT"
] | null | null | null | mx_platform_python/model/managed_member_create_request.py | mxenabled/mx-platform-python | 060dae7ddb02fdcf41fa7f7aebfa4b8a0273afac | [
"MIT"
] | 14 | 2021-11-30T21:56:19.000Z | 2022-02-07T18:47:10.000Z | mx_platform_python/model/managed_member_create_request.py | mxenabled/mx-platform-python | 060dae7ddb02fdcf41fa7f7aebfa4b8a0273afac | [
"MIT"
] | 1 | 2022-01-12T14:59:39.000Z | 2022-01-12T14:59:39.000Z | """
MX Platform API
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. # noqa: E501
The version of the OpenAPI document: 0.1.0
... | 43.529197 | 242 | 0.571141 |
d61c5b8492e3a80c086fc065f27ff7b7071e5197 | 350 | py | Python | kale/tests/test_settings.py | ORIGINALLIFE/ndkale | 759a7132afdfcabd2de658a7701673a928992827 | [
"BSD-2-Clause"
] | null | null | null | kale/tests/test_settings.py | ORIGINALLIFE/ndkale | 759a7132afdfcabd2de658a7701673a928992827 | [
"BSD-2-Clause"
] | null | null | null | kale/tests/test_settings.py | ORIGINALLIFE/ndkale | 759a7132afdfcabd2de658a7701673a928992827 | [
"BSD-2-Clause"
] | null | null | null | """Module for kale settings for unit tests."""
from __future__ import absolute_import
import os
QUEUE_CONFIG = os.path.join(os.path.split(os.path.abspath(__file__))[0],
'test_queue_config.yaml')
QUEUE_CLASS = 'kale.test_utils.TestQueueClass'
QUEUE_SELECTOR = 'kale.test_utils.TestQueueSelec... | 31.818182 | 72 | 0.722857 |
97ee0ea0efebb0f559521ce0ebd840b502490bf8 | 60 | py | Python | src/__init__.py | lelis-research/PyGames-synthesis | 0c597243c04ce511d8ae5cfd52b1c043267b4503 | [
"MIT"
] | 1 | 2021-06-03T15:54:16.000Z | 2021-06-03T15:54:16.000Z | src/__init__.py | olivier-vadiaval/catcher-synthesis | 0c597243c04ce511d8ae5cfd52b1c043267b4503 | [
"MIT"
] | 3 | 2021-07-26T19:58:31.000Z | 2021-07-27T17:35:51.000Z | src/__init__.py | olivier-vadiaval/catcher-synthesis | 0c597243c04ce511d8ae5cfd52b1c043267b4503 | [
"MIT"
] | null | null | null | import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = 'hide' | 20 | 49 | 0.783333 |
a6bb222e64d076b8c269fc80649f936054a5c617 | 2,600 | py | Python | controllers/device/image/images.py | gbf-labs/rh-api | 317a812164ad8943ab638c06f61723cb928bfd12 | [
"Apache-2.0"
] | null | null | null | controllers/device/image/images.py | gbf-labs/rh-api | 317a812164ad8943ab638c06f61723cb928bfd12 | [
"Apache-2.0"
] | 6 | 2020-03-30T23:11:27.000Z | 2022-03-12T00:21:45.000Z | controllers/device/image/images.py | gbf-labs/rh-api | 317a812164ad8943ab638c06f61723cb928bfd12 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=too-many-locals, ungrouped-imports
"""Device Images"""
from flask import request
from library.common import Common
from library.postgresql_queries import PostgreSQL
from library.couch_queries import Queries
from library.aws_s3 import AwsS3
class DeviceImages(Common):
"""Class for Device... | 29.545455 | 84 | 0.546538 |
2526c2e772d96790f1c1962b49fefff9cab567f6 | 415 | py | Python | manage.py | michael760odhiambo/News-Highlight | 2c7585e49d342bd85d8acd9a1f056ba4bffdaace | [
"MIT"
] | null | null | null | manage.py | michael760odhiambo/News-Highlight | 2c7585e49d342bd85d8acd9a1f056ba4bffdaace | [
"MIT"
] | null | null | null | manage.py | michael760odhiambo/News-Highlight | 2c7585e49d342bd85d8acd9a1f056ba4bffdaace | [
"MIT"
] | null | null | null | from app import create_app
from flask_script import Manager,Server
# Creating app instance
app = create_app('development')
manager = Manager(app)
manager.add_command('server',Server)
@manager.command
def test():
"""Run the unit tests."""
import unittest
tests = unittest.TestLoader().discover('tests')
... | 21.842105 | 51 | 0.727711 |
5300fd5cec7ab1ea6cb3a461d584970f8cc58bed | 7,605 | py | Python | modules/Registry/lv1_os_win_reg_os_info.py | naaya17/carpe | fa2e3cfebe20f8839c985e5b9b78b538800172a1 | [
"Apache-2.0"
] | null | null | null | modules/Registry/lv1_os_win_reg_os_info.py | naaya17/carpe | fa2e3cfebe20f8839c985e5b9b78b538800172a1 | [
"Apache-2.0"
] | null | null | null | modules/Registry/lv1_os_win_reg_os_info.py | naaya17/carpe | fa2e3cfebe20f8839c985e5b9b78b538800172a1 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
import binascii
import modules.Registry.convert_util as cu
class OS_Information:
par_id = ''
case_id = ''
evd_id = ''
operating_system = ''
release_id = ''
version_number = ''
install_time = ''
product_key = ''
owner = ''
display_comput... | 58.053435 | 177 | 0.583958 |
1af805e157506f68f564dac2549f6d6692a2575c | 250 | py | Python | giico/drilling_water_well_service/doctype/mud_data/mud_data.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/drilling_water_well_service/doctype/mud_data/mud_data.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/drilling_water_well_service/doctype/mud_data/mud_data.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class MudData(Document):
pass
| 22.727273 | 49 | 0.768 |
36fd5342117d9d0ef0a6129a480b19cc2904d5fe | 281 | py | Python | pendium/plugins/rest.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | 5 | 2015-05-07T21:26:06.000Z | 2016-07-27T11:41:49.000Z | pendium/plugins/rest.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | 9 | 2017-12-21T20:22:16.000Z | 2019-07-24T13:04:35.000Z | pendium/plugins/rest.py | LuRsT/Pendium | f71b3db987853df919c14f0be4238df00852a9a7 | [
"Apache-2.0"
] | null | null | null | from docutils.core import publish_string
from flask import Markup
from pendium.plugins import IRenderPlugin
class Rest(IRenderPlugin):
name = "Rest"
def render(self, content):
content = publish_string(content, writer_name="html")
return Markup(content)
| 21.615385 | 61 | 0.733096 |
ee6c5bdfbe47a670ff04b7be922fcf91c434bbb0 | 19,156 | py | Python | python/ray/data/grouped_dataset.py | Sertingolix/ray | 4850ddc00f5cb3ac9f10095b69f37bf2ae6c8fdd | [
"Apache-2.0"
] | 1 | 2022-01-10T07:39:50.000Z | 2022-01-10T07:39:50.000Z | python/ray/data/grouped_dataset.py | Sertingolix/ray | 4850ddc00f5cb3ac9f10095b69f37bf2ae6c8fdd | [
"Apache-2.0"
] | 227 | 2021-10-01T08:00:01.000Z | 2021-12-28T16:47:26.000Z | python/ray/data/grouped_dataset.py | bladesaber/ray | 107001d8b8bea0672d5e987341bd6bfcc4a1420e | [
"Apache-2.0"
] | null | null | null | from typing import Union, Callable, Generic, Tuple, List, Optional
import numpy as np
import ray
from ray.util.annotations import PublicAPI
from ray.data.dataset import Dataset
from ray.data.impl import sort
from ray.data.aggregate import AggregateFn, Count, Sum, Max, Min, \
Mean, Std, AggregateOnT
from ray.data.bl... | 41.643478 | 100 | 0.551107 |
71e556fa4139675d98d27bf9ea3b1e86e9a1dd14 | 271 | py | Python | odoo-13.0/addons/l10n_de_skr03/migrations/9.0.2.0/pre-set_tags_and_taxes_updatable.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/l10n_de_skr03/migrations/9.0.2.0/pre-set_tags_and_taxes_updatable.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/l10n_de_skr03/migrations/9.0.2.0/pre-set_tags_and_taxes_updatable.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import odoo
def migrate(cr, version):
registry = odoo.registry(cr.dbname)
from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_de_skr03')
| 30.111111 | 94 | 0.771218 |
d9ae0355547a5275d21a8cc83d3d4546010688ae | 7,478 | py | Python | scripts/priorities.py | MorganHamm/gs541-phylogeography | ebb0916685894de0ee1ce7a78b32337defbeee8b | [
"MIT"
] | null | null | null | scripts/priorities.py | MorganHamm/gs541-phylogeography | ebb0916685894de0ee1ce7a78b32337defbeee8b | [
"MIT"
] | null | null | null | scripts/priorities.py | MorganHamm/gs541-phylogeography | ebb0916685894de0ee1ce7a78b32337defbeee8b | [
"MIT"
] | null | null | null | """
Mask initial bases from alignment FASTA
"""
import argparse
from random import shuffle
from collections import defaultdict
import Bio
import numpy as np
from Bio.SeqIO.FastaIO import SimpleFastaParser
from Bio.Seq import Seq
from Bio import AlignIO, SeqIO
from scipy import sparse
def compactify_sequences(sparse_m... | 41.776536 | 153 | 0.678122 |
97e50a9c9c2ba7973295383dbb11375950fdc74c | 1,240 | py | Python | chapter3/Readercoin_/test/functional/p2p-mempool.py | MyawBug/Blockchain-By-Example | 2d0495a130d1a9f91b7fb99359cbb8e9f7b9763d | [
"MIT"
] | 51 | 2018-12-14T09:09:20.000Z | 2022-03-28T03:25:45.000Z | chapter3/Readercoin_/test/functional/p2p-mempool.py | MyawBug/Blockchain-By-Example | 2d0495a130d1a9f91b7fb99359cbb8e9f7b9763d | [
"MIT"
] | 4 | 2019-08-02T18:23:17.000Z | 2022-02-12T04:33:25.000Z | chapter3/Readercoin_/test/functional/p2p-mempool.py | xiaqingdoc/--- | b15448739983b0787ffc963811294bcf44487303 | [
"MIT"
] | 42 | 2018-12-14T09:09:24.000Z | 2022-03-31T01:49:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Readercoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test p2p mempool message.
Test that nodes are disconnected if they send mempool messages when bloom... | 32.631579 | 75 | 0.708871 |
cffeb7e915a06a513e96e1ed60beabf6b79b6518 | 8,899 | py | Python | tensorflow/python/tpu/training_loop.py | Sonata-Wang/tensorflow | 8bbef0cd77879d05ed69bf30e76087847a8ca4a2 | [
"Apache-2.0"
] | 36 | 2016-12-17T15:25:25.000Z | 2022-01-29T21:50:53.000Z | tensorflow/python/tpu/training_loop.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 30 | 2016-10-04T15:38:08.000Z | 2020-07-16T12:09:33.000Z | tensorflow/python/tpu/training_loop.py | shekharpalit/tensorflow | 6aa83398ab03bfae822f36772757097bcb98b6ed | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # 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 applica... | 39.90583 | 80 | 0.674907 |
3a0e71ef4b879969e8624f5cd31f98b0ec96dbb2 | 2,738 | py | Python | Weinstein2019/create_lidar_annotations.py | weecology/NeonTreeEvaluation_analysis | a426a1a6a621b67f11dc4e6cc46eb9df9d0fc677 | [
"MIT"
] | 1 | 2020-05-18T07:14:31.000Z | 2020-05-18T07:14:31.000Z | Weinstein2019/create_lidar_annotations.py | weecology/NeonTreeEvaluation_analysis | a426a1a6a621b67f11dc4e6cc46eb9df9d0fc677 | [
"MIT"
] | 4 | 2019-11-12T02:48:19.000Z | 2020-02-07T18:01:25.000Z | Weinstein2019/create_lidar_annotations.py | weecology/NeonTreeEvaluation_analysis | a426a1a6a621b67f11dc4e6cc46eb9df9d0fc677 | [
"MIT"
] | null | null | null | import glob
import os
import Lidar
import laspy
def write_label(point_cloud, path):
#Create laspy object
inFile = laspy.file.File("/Users/Ben/Desktop/test.laz", header=point_cloud.data.header, mode="w")
for dim in point_cloud.data.points:
setattr(inFile, dim, point_cloud.data.point... | 31.837209 | 113 | 0.647553 |
386162ee7010ffd52d9babc2ec2d5bbd3c8c757b | 2,454 | py | Python | language/google/cloud/language/sentence.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | 1 | 2021-07-06T23:38:06.000Z | 2021-07-06T23:38:06.000Z | language/google/cloud/language/sentence.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | null | null | null | language/google/cloud/language/sentence.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | 1 | 2022-03-24T01:37:10.000Z | 2022-03-24T01:37:10.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.565217 | 78 | 0.674002 |
c78498056fc6a846a4817c5c1e1c243b8256d8ed | 1,456 | py | Python | lhotse/bin/modes/recipes/ksponspeech.py | goodatlas/lhotse | c3e2f0012629776a70ec95a1fb8973e73903973a | [
"Apache-2.0"
] | null | null | null | lhotse/bin/modes/recipes/ksponspeech.py | goodatlas/lhotse | c3e2f0012629776a70ec95a1fb8973e73903973a | [
"Apache-2.0"
] | null | null | null | lhotse/bin/modes/recipes/ksponspeech.py | goodatlas/lhotse | c3e2f0012629776a70ec95a1fb8973e73903973a | [
"Apache-2.0"
] | 1 | 2022-03-29T01:15:32.000Z | 2022-03-29T01:15:32.000Z | import click
from lhotse.bin.modes import download, prepare
from lhotse.recipes.ksponspeech import prepare_ksponspeech
from lhotse.utils import Pathlike
__all__ = ['ksponspeech']
@prepare.command(context_settings=dict(show_default=True))
@click.argument('corpus_dir', type=click.Path(exists=True, dir_okay=True))
@cl... | 37.333333 | 88 | 0.690934 |
bbf2c1de8181547c0a03b7f01ec6ca2d3d9c2fa8 | 3,767 | py | Python | analises/xavierUtils.py | gabinete-compartilhado-acredito/100-dias-congresso | ab2138fa2975818a6ea04c0d67dba174e09849b2 | [
"MIT"
] | 1 | 2021-01-25T19:14:42.000Z | 2021-01-25T19:14:42.000Z | analises/xavierUtils.py | gabinete-compartilhado-acredito/100-dias-congresso | ab2138fa2975818a6ea04c0d67dba174e09849b2 | [
"MIT"
] | null | null | null | analises/xavierUtils.py | gabinete-compartilhado-acredito/100-dias-congresso | ab2138fa2975818a6ea04c0d67dba174e09849b2 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import datetime as dt
import matplotlib.pyplot as pl
### Auxiliary functions ###
def Bold(text):
"""
Takes a string and returns it bold.
"""
return '\033[1m'+text+'\033[0m'
def unique(series):
"""
Takes a pandas series as input and print all unique va... | 32.196581 | 129 | 0.607114 |
513b3e597f56c6aeff909b585cb763b31d856c20 | 45,132 | py | Python | QA_api.py | alsmeirelles/QuickAnnotator | ffca5df537ca031543f1a311b0923619611554a5 | [
"BSD-3-Clause-Clear"
] | null | null | null | QA_api.py | alsmeirelles/QuickAnnotator | ffca5df537ca031543f1a311b0923619611554a5 | [
"BSD-3-Clause-Clear"
] | null | null | null | QA_api.py | alsmeirelles/QuickAnnotator | ffca5df537ca031543f1a311b0923619611554a5 | [
"BSD-3-Clause-Clear"
] | null | null | null | import base64
import glob
import os, re, sys, ast, shutil
from datetime import datetime
import logging
import multiprocessing
import PIL.Image
import cv2
import numpy as np
from skimage.measure import label
from flask import Blueprint, send_from_directory, jsonify
from flask import current_app, url_for, request, make_... | 42.901141 | 161 | 0.675906 |
d06833db2bcaa438139b385cba35e0cedf6a1911 | 2,140 | py | Python | api/controllers.py | iasmini/planet | 710fc11d992145d41c32bdff3edd917db6e21837 | [
"MIT"
] | null | null | null | api/controllers.py | iasmini/planet | 710fc11d992145d41c32bdff3edd917db6e21837 | [
"MIT"
] | null | null | null | api/controllers.py | iasmini/planet | 710fc11d992145d41c32bdff3edd917db6e21837 | [
"MIT"
] | null | null | null | from sqlalchemy.exc import OperationalError
from sqlalchemy.sql import text
from flask import request, Blueprint, current_app
from flask_restful import Resource
from app.planet.models import Planet
bp = Blueprint('api', __name__)
class ApiResource(Resource):
@bp.route('/api/planets/')
def get(self):
... | 28.533333 | 93 | 0.557009 |
34580aeba3d4dd995a0970b15174ffe440cd2eff | 55 | py | Python | core/model/__init__.py | rezmond/images_sort | a50630d5ee8be276452cfca0cec30d59cb8612b7 | [
"MIT"
] | null | null | null | core/model/__init__.py | rezmond/images_sort | a50630d5ee8be276452cfca0cec30d59cb8612b7 | [
"MIT"
] | null | null | null | core/model/__init__.py | rezmond/images_sort | a50630d5ee8be276452cfca0cec30d59cb8612b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .model import MoverModel
| 13.75 | 29 | 0.636364 |
ace7f6c57189a154de750e3dd6cfdbd7e204e294 | 611 | py | Python | openpifpaf_hand/__init__.py | DuncanZauss/openpifpaf_hand | bea3529d46e859060681a4ba180a8e8cee6a3f7b | [
"MIT"
] | null | null | null | openpifpaf_hand/__init__.py | DuncanZauss/openpifpaf_hand | bea3529d46e859060681a4ba180a8e8cee6a3f7b | [
"MIT"
] | null | null | null | openpifpaf_hand/__init__.py | DuncanZauss/openpifpaf_hand | bea3529d46e859060681a4ba180a8e8cee6a3f7b | [
"MIT"
] | null | null | null | import openpifpaf
from .freihand import Freihand
from .rhd import RHD
from .cifonly import CifOnly
def register():
openpifpaf.DATAMODULES['freihand'] = Freihand
openpifpaf.DATAMODULES['rhd'] = RHD
openpifpaf.DECODERS.add(CifOnly)
openpifpaf.CHECKPOINT_URLS['shufflenetv2k16-hand'] = 'https://github.com... | 38.1875 | 95 | 0.754501 |
d418c69c7d07f39b7c96a1e2ac08cbb0e7cf0e29 | 29,658 | py | Python | source/lib/blueprints/byom/pipeline_definitions/templates_parameters.py | Snehitha12345/mlops-workload-orchestrator | d19d34f3ce2ed2b65abaaf0c7750b8be7cb369b3 | [
"Apache-2.0"
] | 10 | 2022-01-28T23:48:11.000Z | 2022-03-31T14:38:06.000Z | source/lib/blueprints/byom/pipeline_definitions/templates_parameters.py | Snehitha12345/mlops-workload-orchestrator | d19d34f3ce2ed2b65abaaf0c7750b8be7cb369b3 | [
"Apache-2.0"
] | 1 | 2022-01-24T21:21:55.000Z | 2022-01-24T21:21:55.000Z | source/lib/blueprints/byom/pipeline_definitions/templates_parameters.py | Snehitha12345/mlops-workload-orchestrator | d19d34f3ce2ed2b65abaaf0c7750b8be7cb369b3 | [
"Apache-2.0"
] | 6 | 2022-01-31T04:55:19.000Z | 2022-03-10T08:37:29.000Z | # #####################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 39.126649 | 217 | 0.59677 |
ffba28891e664b68f644fdef865a68f35d23ce4f | 848 | py | Python | Day-3/aocd/2.py | karthikmurakonda/advents-of-2021 | 2dcfc994eeccb34e26a04d38afcf1d68374a84cd | [
"MIT"
] | null | null | null | Day-3/aocd/2.py | karthikmurakonda/advents-of-2021 | 2dcfc994eeccb34e26a04d38afcf1d68374a84cd | [
"MIT"
] | null | null | null | Day-3/aocd/2.py | karthikmurakonda/advents-of-2021 | 2dcfc994eeccb34e26a04d38afcf1d68374a84cd | [
"MIT"
] | null | null | null | def recfuncO2(lines,i):
zeroes = []
ones = []
if len(lines) == 1:
return lines[0]
for line in lines:
if line[i] == '0':
zeroes.append(line)
else:
ones.append(line)
if len(zeroes) > len(ones):
return recfuncO2(zeroes, i+1)
else:
retu... | 23.555556 | 38 | 0.518868 |
1f6b83f9ba61cfaabbd3e1ab8ab276c79a6c17c6 | 4,176 | py | Python | pirates/effects/SmokePillar.py | ksmit799/POTCO-PS | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 8 | 2017-01-24T04:33:29.000Z | 2020-11-01T08:36:24.000Z | pirates/effects/SmokePillar.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 1 | 2017-03-02T18:05:17.000Z | 2017-03-14T06:47:10.000Z | pirates/effects/SmokePillar.py | ksmit799/Pirates-Online-Remake | 520d38935ae8df4b452c733a82c94dddac01e275 | [
"Apache-2.0"
] | 11 | 2017-03-02T18:46:07.000Z | 2020-11-01T08:36:26.000Z | # File: S (Python 2.4)
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.particles import ParticleEffect
from direct.particles import Particles
from direct.particles import ForceGroup
from EffectController import EffectController
from PooledEffect import PooledEffect
import ran... | 43.5 | 267 | 0.695163 |
8bc62bf2c490498ea1dff6a417dc9c3797b16563 | 148 | py | Python | app/grandchallenge/policies/views.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | 101 | 2018-04-11T14:48:04.000Z | 2022-03-28T00:29:48.000Z | app/grandchallenge/policies/views.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | 1,733 | 2018-03-21T11:56:16.000Z | 2022-03-31T14:58:30.000Z | app/grandchallenge/policies/views.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | 42 | 2018-06-08T05:49:07.000Z | 2022-03-29T08:43:01.000Z | from django.views.generic import DetailView
from grandchallenge.policies.models import Policy
class PolicyDetail(DetailView):
model = Policy
| 18.5 | 49 | 0.810811 |
620231064fec8bef87a94b6fb0bf8045722c72bc | 2,420 | py | Python | apps/empleabilidad/models.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | apps/empleabilidad/models.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | apps/empleabilidad/models.py | osw4l/villas-de-san-pablo | 89f00dfbbfbfee5111bd9852ddfbdb8727d10ed2 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse_lazy
from . import constants
# Create your models here.
class Vacante(models.Model):
cargo = models.CharField(max_length=255)
salario = models.PositiveIntegerField()
fecha = models.DateField()
class Meta:
verbose_name = 'Vacante'
... | 26.304348 | 74 | 0.611157 |
7418ef242e1d4aaeeb30493420c6e069e91d3c69 | 7,615 | py | Python | registration/api.py | chikko80/Insomniac | 2d49a6d4e5a15eb63bddd9aace3cc872cf40b01a | [
"MIT"
] | null | null | null | registration/api.py | chikko80/Insomniac | 2d49a6d4e5a15eb63bddd9aace3cc872cf40b01a | [
"MIT"
] | null | null | null | registration/api.py | chikko80/Insomniac | 2d49a6d4e5a15eb63bddd9aace3cc872cf40b01a | [
"MIT"
] | null | null | null | # This file provides the way of getting a phone number and an SMS confirmation code in "registration" process.
# The only two methods that should be exposed from this file are "get_phone_number" and "get_confirmation_code".
# You can find them at the end of this file. Choose one of ready-to-use implementations or creat... | 36.090047 | 128 | 0.645174 |
115216faa348cfe3e805cf6d5a6501cdddd4f685 | 6,863 | py | Python | tests/unit/bokeh/application/handlers/test_code_runner.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-06-03T13:13:21.000Z | 2021-06-03T13:13:21.000Z | tests/unit/bokeh/application/handlers/test_code_runner.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-04-21T19:44:07.000Z | 2021-04-21T19:44:07.000Z | tests/unit/bokeh/application/handlers/test_code_runner.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 37.298913 | 94 | 0.485502 |
c428193a9f89653283e7316d53985e33b0ba8b61 | 183 | py | Python | Django_Intershala/feedback/urls.py | samir321-pixel/Django_Intershala | 77aaa24a34873dab4c3302727d5f43986a99809e | [
"MIT"
] | 7 | 2021-03-08T17:09:39.000Z | 2021-12-30T09:44:44.000Z | Django_Intershala/feedback/urls.py | samir321-pixel/Django_Intershala | 77aaa24a34873dab4c3302727d5f43986a99809e | [
"MIT"
] | null | null | null | Django_Intershala/feedback/urls.py | samir321-pixel/Django_Intershala | 77aaa24a34873dab4c3302727d5f43986a99809e | [
"MIT"
] | 2 | 2021-03-03T11:35:05.000Z | 2021-03-22T17:00:16.000Z | from django.urls import path
from .views import *
urlpatterns = [
path('post_feedback/', FeedBackViewsets.as_view()),
path('all_feedback/', AllFeedBackViewSets.as_view()),
]
| 22.875 | 57 | 0.721311 |
65c759b16543ecfb33b597692b79aa4500f0ab73 | 2,317 | py | Python | app/core/config.py | chenyg0911/hxa-gloin | afd572ad653baadb93ff9cabc168e19125f402af | [
"MIT"
] | null | null | null | app/core/config.py | chenyg0911/hxa-gloin | afd572ad653baadb93ff9cabc168e19125f402af | [
"MIT"
] | null | null | null | app/core/config.py | chenyg0911/hxa-gloin | afd572ad653baadb93ff9cabc168e19125f402af | [
"MIT"
] | 1 | 2021-11-22T02:21:04.000Z | 2021-11-22T02:21:04.000Z | from starlette.config import Config
import pytz
timezone = pytz.timezone('Asia/Shanghai')
config = Config("config")
project_name: str = config('project_name', cast=str, default='fastapi')
host: str = config('host', cast=str, default='0.0.0.0')
port: int = config('port', cast=int, default=8000)
debug: bool = config('d... | 50.369565 | 99 | 0.744929 |
eb2f845f844e0d8354152498895be6eb1c6db1cc | 69,513 | py | Python | research/object_detection/core/losses_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 82,518 | 2016-02-05T12:07:23.000Z | 2022-03-31T23:09:47.000Z | research/object_detection/core/losses_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 9,021 | 2016-03-08T01:02:05.000Z | 2022-03-31T08:06:35.000Z | research/object_detection/core/losses_test.py | akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | [
"Apache-2.0"
] | 54,341 | 2016-02-06T17:19:55.000Z | 2022-03-31T10:27:44.000Z | # 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 applica... | 44.616816 | 80 | 0.411606 |
fbf3ed2e3ce223cd64db89189a866251d81dd38a | 9,453 | py | Python | src/tools/gyp/pylib/gyp/MSVSUtil.py | zzilla/gbreakpad | 02fd5a078bda4eb2fd7ee881c8d301bea2bf87fe | [
"BSD-3-Clause"
] | 33 | 2015-11-20T23:33:50.000Z | 2022-02-25T21:28:41.000Z | deps/gyp/pylib/gyp/MSVSUtil.py | free1978/mapbox-gl-native | 2a50fccd24e762d0de5a53bac358e5ddfea8d213 | [
"BSD-2-Clause"
] | 5 | 2016-09-28T11:37:41.000Z | 2022-02-05T11:08:44.000Z | deps/gyp/pylib/gyp/MSVSUtil.py | free1978/mapbox-gl-native | 2a50fccd24e762d0de5a53bac358e5ddfea8d213 | [
"BSD-2-Clause"
] | 11 | 2020-07-04T03:03:18.000Z | 2022-03-17T10:19:19.000Z | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions shared amongst the Windows generators."""
import copy
import os
_TARGET_TYPE_EXT = {
'executable': '.exe',
'loadable_module': '.dll',
... | 35.141264 | 80 | 0.698614 |
7a4b5f251565c7ea9d8fb1510a8a35adf9ad8604 | 2,233 | py | Python | udp_handshake.py | Gavitron/pipulator | ca6e134451bc1d1f073aa965df4fa4877bf43311 | [
"BSD-3-Clause"
] | 4 | 2015-11-28T17:45:56.000Z | 2020-05-09T10:48:40.000Z | udp_handshake.py | Gavitron/pipulator | ca6e134451bc1d1f073aa965df4fa4877bf43311 | [
"BSD-3-Clause"
] | null | null | null | udp_handshake.py | Gavitron/pipulator | ca6e134451bc1d1f073aa965df4fa4877bf43311 | [
"BSD-3-Clause"
] | null | null | null | # udp listener
#
# Run this in the background, and you will appear to the pipboy app as an instance of Fallout4
import socket
import struct
import sys
import time
import json
# debouncer magic number
min_delta=100
#return current millis
def now():
return time.time()*1000000
#return millis since 'then'
def dif(the... | 29.773333 | 145 | 0.727273 |
96f0dab6169d9969725df9c060061c10bfc2e64b | 2,156 | py | Python | zthumbor/loaders/zloader.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | zthumbor/loaders/zloader.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-06-06T00:51:42.000Z | 2022-02-10T21:38:40.000Z | zthumbor/loaders/zloader.py | yakkl/yakkl | 89ecf4ee8998554a0634667067e16f428e4c480c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # See https://yakkl.readthedocs.io/en/latest/subsystems/thumbnailing.html
from __future__ import absolute_import
from six.moves import urllib
from tornado.concurrent import return_future
from thumbor.loaders import LoaderResult, file_loader, https_loader
from tc_aws.loaders import s3_loader
from thumbor.context import... | 39.2 | 122 | 0.719852 |
f1b7794396071f0e63502282f9d184a2955716c9 | 2,416 | py | Python | 002-pyopengl/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/proesch/nurbsCurve/nurbsCircle.py | lhl/vrdev | fc1a9af2b51d159c99c8779349ef3392a70ed9ed | [
"Apache-2.0"
] | 12 | 2015-12-02T02:36:36.000Z | 2020-09-20T17:14:24.000Z | 002-pyopengl/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/proesch/nurbsCurve/nurbsCircle.py | lhl/vrdev | fc1a9af2b51d159c99c8779349ef3392a70ed9ed | [
"Apache-2.0"
] | null | null | null | 002-pyopengl/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/proesch/nurbsCurve/nurbsCircle.py | lhl/vrdev | fc1a9af2b51d159c99c8779349ef3392a70ed9ed | [
"Apache-2.0"
] | 8 | 2016-11-02T11:17:04.000Z | 2021-10-21T07:42:19.000Z | #!/usr/bin/python2.4
# Plot a circle using NURBS
#
# Copyright (C) 2007 "Peter Roesch" <Peter.Roesch@fh-augsburg.de>
#
# This code is licensed under the PyOpenGL License.
# Details are given in the file license.txt included in this distribution.
import sys
import math
from time import sleep
try:
from OpenGL.GLUT ... | 24.16 | 75 | 0.701987 |
2b7b80ca5e3810a1867fef0c2245644acda0a538 | 37 | py | Python | venv/lib/python3.6/encodings/cp874.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-04-17T13:35:50.000Z | 2021-12-21T00:11:36.000Z | venv/lib/python3.6/encodings/cp874.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2021-03-31T19:51:24.000Z | 2021-06-10T23:05:09.000Z | venv/lib/python3.6/encodings/cp874.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-10-01T08:47:35.000Z | 2020-07-11T06:32:16.000Z | /usr/lib/python3.6/encodings/cp874.py | 37 | 37 | 0.810811 |
ce2e156e20ad5f91ebd14f6139de4bbaf7a7606a | 11,289 | py | Python | grr/gui/api_call_handler_utils_test.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | 2 | 2019-06-02T13:11:16.000Z | 2019-06-25T13:30:46.000Z | grr/gui/api_call_handler_utils_test.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | null | null | null | grr/gui/api_call_handler_utils_test.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Contains tests for api_call_handler_utils."""
import hashlib
import os
import tarfile
import zipfile
import yaml
from grr.gui import api_call_handler_utils
from grr.lib import aff4
from grr.lib import flags
from grr.lib import test_lib
from grr.lib... | 34.522936 | 80 | 0.679422 |
3444df11adbec00693842a0bafb1c5259d9769a3 | 12,459 | py | Python | tofu/_plot.py | Louwrensth/tofu | df2841d24eaf223ae07d862ffaa33fdb2fc079d3 | [
"MIT"
] | 1 | 2020-12-18T16:25:18.000Z | 2020-12-18T16:25:18.000Z | tofu/_plot.py | Louwrensth/tofu | df2841d24eaf223ae07d862ffaa33fdb2fc079d3 | [
"MIT"
] | 1 | 2020-12-18T16:35:08.000Z | 2020-12-18T16:35:08.000Z | tofu/_plot.py | lasofivec/tofu | dbb9f433290e3058dfd04d67fbca157761b0a105 | [
"MIT"
] | null | null | null | """ Module providing a basic routine for plotting a shot overview """
# Common
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
# tofu
try:
from tofu.version import __version__
import tofu.utils as utils
except Exception:
from tofu.version import __version__
... | 35.495726 | 87 | 0.468497 |
901ccdc53d7f3ba0b324d8b04476ecd40287ef62 | 2,604 | py | Python | rdr_service/alembic/versions/eff24ee0e4da_add_fphh_to_ps.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/alembic/versions/eff24ee0e4da_add_fphh_to_ps.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/alembic/versions/eff24ee0e4da_add_fphh_to_ps.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | """add_FPHH_to_ps
Revision ID: eff24ee0e4da
Revises: 4fa9a3846491, 88ea1bb98358
Create Date: 2021-10-20 12:55:54.689433
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_se... | 40.061538 | 172 | 0.796851 |
ebde26d442251ecf0523cd3625d1e9cc88cdab2f | 10,500 | py | Python | ansible/roles/test/files/ptftests/py3/ip_in_ip_tunnel_test.py | congh-nvidia/sonic-mgmt | 05094321ed58270ac06d1a0ef575a4ab9ea3ddd6 | [
"Apache-2.0"
] | null | null | null | ansible/roles/test/files/ptftests/py3/ip_in_ip_tunnel_test.py | congh-nvidia/sonic-mgmt | 05094321ed58270ac06d1a0ef575a4ab9ea3ddd6 | [
"Apache-2.0"
] | null | null | null | ansible/roles/test/files/ptftests/py3/ip_in_ip_tunnel_test.py | congh-nvidia/sonic-mgmt | 05094321ed58270ac06d1a0ef575a4ab9ea3ddd6 | [
"Apache-2.0"
] | null | null | null | '''
Description: This file contains the IPinIP test for dualtor testbed
Usage: Examples of how to start this script
/usr/bin/ptf --test-dir ptftests ip_in_ip_tunnel_test.IpinIPTunnelTest --platform-dir ptftests --qlen=2000 --platform remote -t hash_key_list=['src-port', 'dst-port', 'src-mac... | 44.871795 | 563 | 0.603333 |
3175e16cfde23cf8d114dfc9b298b9e0eda20d89 | 3,361 | py | Python | tests/test_models.py | EDS-APHP/pylivy | 0714e4e74e27c1a13b74228700bb3e800e9646fe | [
"MIT"
] | null | null | null | tests/test_models.py | EDS-APHP/pylivy | 0714e4e74e27c1a13b74228700bb3e800e9646fe | [
"MIT"
] | null | null | null | tests/test_models.py | EDS-APHP/pylivy | 0714e4e74e27c1a13b74228700bb3e800e9646fe | [
"MIT"
] | 1 | 2020-02-05T09:31:01.000Z | 2020-02-05T09:31:01.000Z | import pytest
from livy.models import (
Version,
Session,
SessionKind,
SessionState,
Statement,
StatementState,
Output,
OutputStatus,
SparkRuntimeError,
)
@pytest.mark.parametrize(
"earlier, later",
[
("0.1.0", "0.2.0"),
("0.1.1", "0.2.0"),
("1.9.0"... | 22.557047 | 78 | 0.60726 |
a9f4deea3b9f9fcd25abd402392c2541e0b77a51 | 9,857 | py | Python | excelexporters/metertrend.py | 823914102/myems-api | 4684aa71266a4f7ec93f7a9ebc08cbccd2e9bca3 | [
"MIT"
] | null | null | null | excelexporters/metertrend.py | 823914102/myems-api | 4684aa71266a4f7ec93f7a9ebc08cbccd2e9bca3 | [
"MIT"
] | null | null | null | excelexporters/metertrend.py | 823914102/myems-api | 4684aa71266a4f7ec93f7a9ebc08cbccd2e9bca3 | [
"MIT"
] | null | null | null | import base64
import uuid
import os
from openpyxl.chart import (
PieChart,
BarChart,
Reference,
)
from openpyxl.styles import PatternFill, Border, Side, Alignment, Font
from openpyxl.drawing.image import Image
from openpyxl import Workbook
from openpyxl.chart.label import DataLabelList
###################... | 37.337121 | 120 | 0.474891 |
7b0936ae1c4daf8405dfbf470a4810ef72de2247 | 10,710 | py | Python | bpython/test/test_manual_readline.py | niloct/bpython | c94c8f833bbccc4124f2c836d1e248166a4facfe | [
"PSF-2.0"
] | null | null | null | bpython/test/test_manual_readline.py | niloct/bpython | c94c8f833bbccc4124f2c836d1e248166a4facfe | [
"PSF-2.0"
] | null | null | null | bpython/test/test_manual_readline.py | niloct/bpython | c94c8f833bbccc4124f2c836d1e248166a4facfe | [
"PSF-2.0"
] | null | null | null | from bpython.curtsiesfrontend.manual_readline import (
left_arrow,
right_arrow,
beginning_of_line,
forward_word,
back_word,
end_of_line,
delete,
last_word_pos,
backspace,
delete_from_cursor_back,
delete_from_cursor_forward,
delete_rest_of_word,
delete_word_to_cursor,
... | 31.22449 | 79 | 0.569188 |
f96b727d1d66289c6fa5e33d7922c2b5679883f8 | 858 | py | Python | pcg_gazebo/parsers/sdf/length.py | TForce1/pcg_gazebo | 9ff88016b7b6903236484958ca7c6ed9f8ffb346 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-02-04T18:16:49.000Z | 2022-02-22T11:36:34.000Z | pcg_gazebo/parsers/sdf/length.py | awesomebytes/pcg_gazebo | 4f335dd460ef7c771f1df78b46a92fad4a62cedc | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2020-01-23T13:40:50.000Z | 2022-02-09T07:26:01.000Z | pcg_gazebo/parsers/sdf/length.py | GimpelZhang/gazebo_world_generator | eb7215499d0ddc972d804c988fadab1969579b1b | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2020-09-10T06:35:41.000Z | 2022-02-20T19:08:17.000Z | # Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... | 34.32 | 74 | 0.744755 |
32239ede9768337363b6e385360720160d2c5f13 | 7,895 | py | Python | app/api/spotify.py | janaSunrise/Spotify-Twitter-Banner | a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0 | [
"MIT"
] | 20 | 2021-12-21T17:46:33.000Z | 2022-01-22T15:23:24.000Z | app/api/spotify.py | janaSunrise/Spotify-Twitter-Banner | a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0 | [
"MIT"
] | null | null | null | app/api/spotify.py | janaSunrise/Spotify-Twitter-Banner | a3b5fc636ef4e79f3f96cc3dd5569eaff7d8a6c0 | [
"MIT"
] | null | null | null | import base64
import json
import sys
import time
import typing as t
import requests
from loguru import logger
from .route import Route
from ..config import Config
from ..utils import generate_oauth_url
PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
class Spotify:
... | 31.834677 | 127 | 0.581127 |
92c58e696e9225edce9fbbe8a03f6d80720e9823 | 297 | py | Python | opwen_email_server/constants/sendgrid.py | tezzytezzy/opwen-cloudserver | c3ebfe93d778cd789ab3df25c4580eedc0ae9b4a | [
"Apache-2.0"
] | null | null | null | opwen_email_server/constants/sendgrid.py | tezzytezzy/opwen-cloudserver | c3ebfe93d778cd789ab3df25c4580eedc0ae9b4a | [
"Apache-2.0"
] | null | null | null | opwen_email_server/constants/sendgrid.py | tezzytezzy/opwen-cloudserver | c3ebfe93d778cd789ab3df25c4580eedc0ae9b4a | [
"Apache-2.0"
] | null | null | null | from typing_extensions import Final # noqa: F401
MAILBOX_URL = 'https://api.sendgrid.com/v3/user/webhooks/parse/settings' # type: Final # noqa: E501 # yapf: disable
INBOX_URL = 'https://mailserver.lokole.ca/api/email/sendgrid/{}' # type: Final
MX_RECORD = 'mx.sendgrid.net' # type: Final
| 37.125 | 118 | 0.717172 |
7230d4a4fbbe572197cb4f2e24330be5d786cbdc | 1,511 | py | Python | utils/data_labeler.py | Taher-Dohadwala/better-job-finder | 607fec96c57a49feb8179db0bcae1f5969bcb0cd | [
"MIT"
] | null | null | null | utils/data_labeler.py | Taher-Dohadwala/better-job-finder | 607fec96c57a49feb8179db0bcae1f5969bcb0cd | [
"MIT"
] | null | null | null | utils/data_labeler.py | Taher-Dohadwala/better-job-finder | 607fec96c57a49feb8179db0bcae1f5969bcb0cd | [
"MIT"
] | null | null | null | """
This script is used to add labels to data for initial training
"""
"""
Data format for binary classifier
{
"text": "string",
"label": [
"neg",
"pos"
]
}
"""
import pandas as pd
import numpy as np
from curtsies.fmtfuncs import red, bold, green, on_blue, yellow, blue
PATH = "../data/raw/combined_dat... | 23.609375 | 69 | 0.649239 |
388c58802ad81ee77d68d276b7d797e33175eeea | 68 | py | Python | macaroni/types.py | rudineirk/py-macaroni | 7b350478754fe9484d28535ea55e641b87a12b81 | [
"MIT"
] | null | null | null | macaroni/types.py | rudineirk/py-macaroni | 7b350478754fe9484d28535ea55e641b87a12b81 | [
"MIT"
] | null | null | null | macaroni/types.py | rudineirk/py-macaroni | 7b350478754fe9484d28535ea55e641b87a12b81 | [
"MIT"
] | null | null | null | class Error:
def __init__(self, data):
self.data = data
| 17 | 29 | 0.602941 |
09f7965bac524cf212d217592198280d0187e7e4 | 2,399 | py | Python | docsrc/conf.py | synamedia-jenni/Jenni | 44a25453d3f7dc08ca22f75b4d817dfa5c141904 | [
"Apache-2.0"
] | 2 | 2021-05-11T15:47:52.000Z | 2021-06-24T21:55:04.000Z | docsrc/conf.py | synamedia-jenni/Jenni | 44a25453d3f7dc08ca22f75b4d817dfa5c141904 | [
"Apache-2.0"
] | 2 | 2021-05-19T07:24:41.000Z | 2021-06-24T21:54:19.000Z | docsrc/conf.py | synamedia-jenni/Jenni | 44a25453d3f7dc08ca22f75b4d817dfa5c141904 | [
"Apache-2.0"
] | 1 | 2021-05-14T10:37:53.000Z | 2021-05-14T10:37:53.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.418919 | 79 | 0.659441 |
41f6bb205cb87ea9fe6745fd8e031895ea83cec3 | 9,252 | py | Python | pandaharvester/harvesterfifo/sqlite_fifo.py | nikmagini/panda-harvester | 707955e7717bc6a15e722e857668b496d9563b85 | [
"Apache-2.0"
] | 2 | 2017-04-13T10:39:53.000Z | 2018-10-13T22:00:47.000Z | pandaharvester/harvesterfifo/sqlite_fifo.py | nikmagini/panda-harvester | 707955e7717bc6a15e722e857668b496d9563b85 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvesterfifo/sqlite_fifo.py | nikmagini/panda-harvester | 707955e7717bc6a15e722e857668b496d9563b85 | [
"Apache-2.0"
] | null | null | null | import os
import time
import re
import sqlite3
try:
from threading import get_ident
except ImportError:
from thread import get_ident
from pandaharvester.harvestercore.plugin_base import PluginBase
from pandaharvester.harvesterconfig import harvester_config
try:
memoryviewOrBuffer = buffer
except NameErr... | 37.156627 | 104 | 0.585927 |
fee12e55ced97bf46acdfb28dfda0dfb11a83ca4 | 680 | py | Python | custom_model_runner/datarobot_drum/drum/exceptions.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | null | null | null | custom_model_runner/datarobot_drum/drum/exceptions.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | 9 | 2021-11-10T20:16:41.000Z | 2022-03-12T00:59:05.000Z | custom_model_runner/datarobot_drum/drum/exceptions.py | amperie/user-models | 5236c50d0f20a7bac81acc5d1936a3502de2f5f3 | [
"Apache-2.0"
] | 1 | 2021-06-17T22:05:33.000Z | 2021-06-17T22:05:33.000Z | class DrumException(Exception):
"""Base drum exception"""
pass
class DrumCommonException(DrumException):
"""Raised in case of common errors in drum"""
pass
class DrumPerfTestTimeout(DrumException):
"""Raised when the perf-test case takes too long"""
pass
class DrumPerfTestOOM(DrumExcept... | 20.606061 | 104 | 0.725 |
47cc0d9b9ce18ced2eefc84ee73e64bb2b0a855d | 8,220 | py | Python | picassos_palette/picassos_palette.py | Young-Picasso/AlgorithmicTrading | 7a59b5980b4287394014f6630dab7aa3490e0a01 | [
"MIT"
] | null | null | null | picassos_palette/picassos_palette.py | Young-Picasso/AlgorithmicTrading | 7a59b5980b4287394014f6630dab7aa3490e0a01 | [
"MIT"
] | null | null | null | picassos_palette/picassos_palette.py | Young-Picasso/AlgorithmicTrading | 7a59b5980b4287394014f6630dab7aa3490e0a01 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Wilhem Kornhauser
"""
class BaseBacktest:
"""Class for basic event based backtesting of trading strategies.
Attributes
==========
symbol: str
financial instrument to work with
start: str
start date for data selection
end:... | 41.1 | 163 | 0.576277 |
93c626cbd7802e1784ff464373615be2aaa36386 | 2,328 | py | Python | tests/test_crack_main.py | nialov/ALSA | 65204bb43bba03daf600de9ed4825c4602ea73af | [
"MIT"
] | null | null | null | tests/test_crack_main.py | nialov/ALSA | 65204bb43bba03daf600de9ed4825c4602ea73af | [
"MIT"
] | null | null | null | tests/test_crack_main.py | nialov/ALSA | 65204bb43bba03daf600de9ed4825c4602ea73af | [
"MIT"
] | null | null | null | """
Tests for crack_main.py.
"""
import os
from pathlib import Path
import geopandas as gpd
import pytest
from shapely.geometry import LineString, MultiLineString
import tests
from alsa import crack_cls, crack_main
@pytest.mark.skipif(
os.environ.get("CI") is not None, reason="Tensorflow crashes on Github Actio... | 29.468354 | 87 | 0.734107 |
3d9520231e0a2e37edf2d0b0b14f2604e5fc68cd | 1,874 | py | Python | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/UpdateAppPackageRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/UpdateAppPackageRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/UpdateAppPackageRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.464286 | 75 | 0.756137 |
3fc8c98b5517b0e58839c92a594c29338887e804 | 7,460 | py | Python | Python_Files/hydrolibs/data_download.py | montimaj/HydroSAR | c76022a914bd095ecae41d56a2a1dff5c1c1a970 | [
"MIT"
] | 1 | 2022-03-01T08:46:46.000Z | 2022-03-01T08:46:46.000Z | Python_Files/hydrolibs/data_download.py | xyt556/HydroSAR | 2142c300e4cf48065626832fdeb9c4aa472627dc | [
"MIT"
] | null | null | null | Python_Files/hydrolibs/data_download.py | xyt556/HydroSAR | 2142c300e4cf48065626832fdeb9c4aa472627dc | [
"MIT"
] | null | null | null | # Author: Sayantan Majumdar
# Email: smxnv@mst.edu
import ee
import requests
import zipfile
import os
import xmltodict
import geopandas as gpd
from glob import glob
from Python_Files.hydrolibs.sysops import copy_file
def download_gee_data(year_list, start_month, end_month, aoi_shp_file, outdir):
"""
Download... | 42.628571 | 118 | 0.599732 |
4e18464b9e33d10d5634b6b8ba7aa550e0d9aefc | 6,921 | py | Python | reformer_fastai/configs.py | tyoc213-contrib/reformer_fastai | a14de3d44e6983e34d462a3b4ec355436b701f9b | [
"MIT"
] | null | null | null | reformer_fastai/configs.py | tyoc213-contrib/reformer_fastai | a14de3d44e6983e34d462a3b4ec355436b701f9b | [
"MIT"
] | null | null | null | reformer_fastai/configs.py | tyoc213-contrib/reformer_fastai | a14de3d44e6983e34d462a3b4ec355436b701f9b | [
"MIT"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/21_experiment-configs.ipynb (unless otherwise specified).
__all__ = ['update_sig', 'ConfigBase', 'SyntheticConfig', 'TransformerLMConfigEnwik8', 'ReversibleLMConfigEnwik8',
'NHashesConfig', 'NLayersConfig']
# Cell
from fastcore.all import *
from fastai.basics... | 26.825581 | 114 | 0.566681 |
ac5ea71ba02662a1dfe7807b8b7abb271cd24f36 | 869 | py | Python | src/user/models.py | mohdfayed/blog-django-ar | d966fe45dfabf9e757fe04ba406a98b2d699dbe9 | [
"bzip2-1.0.6"
] | null | null | null | src/user/models.py | mohdfayed/blog-django-ar | d966fe45dfabf9e757fe04ba406a98b2d699dbe9 | [
"bzip2-1.0.6"
] | 9 | 2021-03-18T23:57:19.000Z | 2022-03-12T00:16:13.000Z | src/user/models.py | mohdfayed/blog-django-ar | d966fe45dfabf9e757fe04ba406a98b2d699dbe9 | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from PIL import Image # PIL is Pillow library
class Profile(models.Model):
image = models.ImageField(default='avatar.png', upload_to='profile_pics')
user = models.OneToOneField(User, on_del... | 28.966667 | 77 | 0.675489 |
6a48c7735eac0a7bf3a8343830301d89450940fb | 1,120 | py | Python | str/isValid.py | hikair/leetcode_py | f917fd619fa25960e5d046aa512ac0d582f2084a | [
"Apache-2.0"
] | null | null | null | str/isValid.py | hikair/leetcode_py | f917fd619fa25960e5d046aa512ac0d582f2084a | [
"Apache-2.0"
] | null | null | null | str/isValid.py | hikair/leetcode_py | f917fd619fa25960e5d046aa512ac0d582f2084a | [
"Apache-2.0"
] | null | null | null | # 有效的括号
# https://leetcode-cn.com/problems/valid-parentheses/
class Solution:
# 方法1
def isValid2(self, s):
stack = Stack()
for i in s:
if stack.isEmpty() == False and ord(i) - ord(stack.peek()) in [1, 2]:
stack.pop()
else:
stack.push(i)
... | 22.857143 | 81 | 0.491071 |
9a8576f070d9500958e0bee863d55041cb274867 | 3,649 | py | Python | samples/client/petstore/python/petstore_api/models/array_of_number_only.py | VinayaSathyanarayana/swagger-codegen | dd1ed1231884f08804fd5726ab5beabac59d7abd | [
"Apache-2.0"
] | 1 | 2017-10-17T09:53:15.000Z | 2017-10-17T09:53:15.000Z | samples/client/petstore/python/petstore_api/models/array_of_number_only.py | VinayaSathyanarayana/swagger-codegen | dd1ed1231884f08804fd5726ab5beabac59d7abd | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/python/petstore_api/models/array_of_number_only.py | VinayaSathyanarayana/swagger-codegen | dd1ed1231884f08804fd5726ab5beabac59d7abd | [
"Apache-2.0"
] | 3 | 2018-09-03T12:58:01.000Z | 2021-02-19T06:00:30.000Z | # coding: utf-8
"""
Swagger 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: \" \\
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/sw... | 28.732283 | 160 | 0.583722 |
717dd6fca421bf2f99cd398c847f6532933c834c | 1,048 | py | Python | src/PyAutoMaker/input.py | boa9448/PyAutoMaker | 146ca57aeec999e2663c124ca5c189aabf066b7f | [
"MIT"
] | 6 | 2022-03-15T08:51:32.000Z | 2022-03-30T05:07:34.000Z | src/PyAutoMaker/input.py | boa9448/PyAutoMaker | 146ca57aeec999e2663c124ca5c189aabf066b7f | [
"MIT"
] | null | null | null | src/PyAutoMaker/input.py | boa9448/PyAutoMaker | 146ca57aeec999e2663c124ca5c189aabf066b7f | [
"MIT"
] | null | null | null | from typing import Union
from .input_base import *
from .arduino import ArduinoUtil
from .class_dd import DDUtil
class InputUtil:
def __init__(self, backend : Union[ArduinoUtil, DDUtil], args : tuple) -> None:
self.backend = backend(*args)
def key(self, key_code : int, key_status : int) -> None:
... | 30.823529 | 83 | 0.673664 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.