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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f384fd02141c82a931f276ad65c77605c1db9f8e | 9,149 | py | Python | DeepLearningExamples/TensorFlow2/Segmentation/UNet_Medical/data_loading/data_loader.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow2/Segmentation/UNet_Medical/data_loading/data_loader.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | DeepLearningExamples/TensorFlow2/Segmentation/UNet_Medical/data_loading/data_loader.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 41.586364 | 116 | 0.648923 |
7944e35d8abf604e7f09702fc50c7e62cc4d009c | 49,372 | py | Python | django/db/models/sql/compiler.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | null | null | null | django/db/models/sql/compiler.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | null | null | null | django/db/models/sql/compiler.py | doismellburning/django | 039465a6a7a18f48ea77ceadb6949990c0ec92e1 | [
"BSD-3-Clause"
] | null | null | null | from itertools import chain
import re
import warnings
from django.core.exceptions import FieldError
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import OrderBy, Random, RawSQL, Ref
from django.db.models.query_utils import select_related_descend, QueryWrapper
from django.db.models... | 43.270815 | 98 | 0.5812 |
806b00d5480162c622b51b2d090e4b6e8ffd5d36 | 307 | py | Python | saefportal/datasets/migrations/0028_delete_historicaldataset.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datasets/migrations/0028_delete_historicaldataset.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datasets/migrations/0028_delete_historicaldataset.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | 1 | 2020-12-16T15:02:52.000Z | 2020-12-16T15:02:52.000Z | # Generated by Django 3.1.6 on 2021-09-04 06:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('datasets', '0027_auto_20210904_0559'),
]
operations = [
migrations.DeleteModel(
name='HistoricalDataset',
),
]
| 18.058824 | 48 | 0.618893 |
99b5cc3e1c092f828f80b63f67390c4de80a8c3b | 1,711 | py | Python | lib/ovirtsdk4/http.py | oliel/python-ovirt-engine-sdk4 | c0b13982b45dee664ebc063bda7686124b402c14 | [
"Apache-2.0"
] | 3 | 2022-01-14T00:37:58.000Z | 2022-03-26T12:26:32.000Z | lib/ovirtsdk4/http.py | oliel/python-ovirt-engine-sdk4 | c0b13982b45dee664ebc063bda7686124b402c14 | [
"Apache-2.0"
] | 29 | 2021-07-20T12:42:44.000Z | 2022-03-28T13:01:33.000Z | lib/ovirtsdk4/http.py | oliel/python-ovirt-engine-sdk4 | c0b13982b45dee664ebc063bda7686124b402c14 | [
"Apache-2.0"
] | 12 | 2021-07-20T12:27:07.000Z | 2022-02-24T11:10:12.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, 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 applicabl... | 26.734375 | 75 | 0.647575 |
0497d8c9b0dcbd4c37320407646fe3f267287433 | 610 | py | Python | users/forms.py | badruu/mathsz | 60392d07ecdbb85c19e0a528124fec9e76103012 | [
"MIT"
] | null | null | null | users/forms.py | badruu/mathsz | 60392d07ecdbb85c19e0a528124fec9e76103012 | [
"MIT"
] | 7 | 2020-02-12T00:31:25.000Z | 2022-03-11T23:49:43.000Z | users/forms.py | badruu/mathsz | 60392d07ecdbb85c19e0a528124fec9e76103012 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import *
from django.db import models
class UserRegisterForm(UserCreationForm):
email = forms.EmailField()
class Meta:
model = User
fields = ['username', 'e... | 24.4 | 64 | 0.681967 |
b312a09026444831aa68e529bd1b58a90ecbe6b2 | 1,994 | py | Python | test/functional/feature_listmyassets.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | test/functional/feature_listmyassets.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | test/functional/feature_listmyassets.py | rishabhworking/kringleprojectcoin | 8bb8b0f038f12d1e6ccd7e0aedfcef3c51387fc0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Copyright (c) 2017 The Raven Core developers
# Copyright (c) 2018 The Rito Core developers
# Copyright (c) 2020 The KringleProjectCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www... | 33.233333 | 113 | 0.681043 |
4f5ed8f131fa36d0e862458c0458d58200b32371 | 3,557 | py | Python | transformer/Beam.py | delldu/Transformer | 5e2ef01c85d4d09deec0b0e88505e64c8c7cc9da | [
"Apache-2.0"
] | 3 | 2018-12-05T06:16:56.000Z | 2019-03-01T23:16:07.000Z | transformer/Beam.py | delldu/Transformer | 5e2ef01c85d4d09deec0b0e88505e64c8c7cc9da | [
"Apache-2.0"
] | 1 | 2019-08-06T07:46:21.000Z | 2019-08-06T07:46:21.000Z | transformer/Beam.py | delldu/Transformer | 5e2ef01c85d4d09deec0b0e88505e64c8c7cc9da | [
"Apache-2.0"
] | 1 | 2019-09-16T07:09:57.000Z | 2019-09-16T07:09:57.000Z | """ Manage beam search info structure.
Heavily borrowed from OpenNMT-py.
For code in OpenNMT-py, please check the following link:
https://github.com/OpenNMT/OpenNMT-py/blob/master/onmt/Beam.py
"""
import pdb
import torch
# import numpy as np
import transformer.Constants as Constants
class Beam():
'''... | 31.201754 | 92 | 0.606972 |
cb3580c9be95292afb3d234ff68b7c5fedc3eecb | 5,058 | py | Python | Packages/Anaconda/listeners/linting.py | prisis/sublime-text-packages | 99ae8a5496613e27a75e5bd91723549b21476e60 | [
"MIT"
] | null | null | null | Packages/Anaconda/listeners/linting.py | prisis/sublime-text-packages | 99ae8a5496613e27a75e5bd91723549b21476e60 | [
"MIT"
] | 1 | 2016-02-10T09:50:09.000Z | 2016-02-10T09:50:09.000Z | Packages/Anaconda/listeners/linting.py | prisis/sublime-text-packages | 99ae8a5496613e27a75e5bd91723549b21476e60 | [
"MIT"
] | null | null | null |
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org>
# This program is Free Software see LICENSE file for details
import time
import sublime
import sublime_plugin
from ..anaconda_lib.helpers import (
check_linting, get_settings, check_linting_behaviour,
ONLY_CODE, NOT_SCRATCH, LINTING_ENABLED, ... | 33.946309 | 77 | 0.61724 |
4309f69fcebb558b915fc4a8e2fb9758f532d505 | 4,644 | py | Python | rayvision_clarisse/utils.py | foxrenderfarm/rayvision_clarisse | d2f2dd4ef5394899b1b2e9ecc0d56c943ce56b1c | [
"Apache-2.0"
] | 1 | 2021-01-14T08:06:39.000Z | 2021-01-14T08:06:39.000Z | rayvision_clarisse/utils.py | renderbus/rayvision_clarisse | 7971e4178a85ab9b98c7dd626a5c5fc655f67f8a | [
"Apache-2.0"
] | null | null | null | rayvision_clarisse/utils.py | renderbus/rayvision_clarisse | 7971e4178a85ab9b98c7dd626a5c5fc655f67f8a | [
"Apache-2.0"
] | null | null | null | """Common method for rayvision_clarisse API."""
import sys
def get_encode(encode_str, py_version=3):
"""Get the encoding of the string decoding.
Args:
encode_str (str, unicode): String.
py_version (int): Python version, default is 3.
Returns:
str: Coding.
"""
if ((py_ve... | 32.93617 | 78 | 0.540698 |
f59f138c01128b792f3916ba9454dc1e6190b1f3 | 3,195 | py | Python | src/sample.py | RatJuggler/gpt-2 | bcbf47528c846c70305649c07701ac7228aad39e | [
"MIT"
] | null | null | null | src/sample.py | RatJuggler/gpt-2 | bcbf47528c846c70305649c07701ac7228aad39e | [
"MIT"
] | null | null | null | src/sample.py | RatJuggler/gpt-2 | bcbf47528c846c70305649c07701ac7228aad39e | [
"MIT"
] | null | null | null | import tensorflow as tf
import model
def top_k_logits(logits, k):
if k == 0:
# no truncation
return logits
def _top_k():
values, _ = tf.nn.top_k(logits, k=k)
min_values = values[:, -1, tf.newaxis]
return tf.where(
logits < min_values,
tf.ones_l... | 32.938144 | 122 | 0.578091 |
6a953193f3ca4bd4f24e4ef1bcdf473e173630a7 | 3,417 | py | Python | covid19/scrape.py | jimmytran16/covid-19-us-data | cbeaa303d88a895e5dc123623b6fd31ec534b812 | [
"MIT"
] | null | null | null | covid19/scrape.py | jimmytran16/covid-19-us-data | cbeaa303d88a895e5dc123623b6fd31ec534b812 | [
"MIT"
] | null | null | null | covid19/scrape.py | jimmytran16/covid-19-us-data | cbeaa303d88a895e5dc123623b6fd31ec534b812 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
from pprint import pprint
class COVID:
def __init__(self):
pass
#UPDATED ON 8/7/2020
def get_covid_data(self):
"""
GIVES YOU DATA ON YESTERDAYS COVID STATUS
This script will scrap data off the worldometers website to attain e... | 44.376623 | 168 | 0.658472 |
96ba58339a5c289138db37ab2b7992cfa53837b4 | 5,894 | py | Python | electrumsv/gui/qt/status_bar.py | CherryDT/electrumsv | 6b778b1c363e22286c3e3ef1bc5a2fa56955ac48 | [
"MIT"
] | null | null | null | electrumsv/gui/qt/status_bar.py | CherryDT/electrumsv | 6b778b1c363e22286c3e3ef1bc5a2fa56955ac48 | [
"MIT"
] | null | null | null | electrumsv/gui/qt/status_bar.py | CherryDT/electrumsv | 6b778b1c363e22286c3e3ef1bc5a2fa56955ac48 | [
"MIT"
] | null | null | null | from typing import Optional, Tuple
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import (QGridLayout, QHBoxLayout, QLabel, QLineEdit, QSizePolicy, QStatusBar,
QToolButton, QWidget, QWidgetAction)
from electrumsv.i18n import _
from .util import icon_path
class BalancePopup(QWi... | 40.369863 | 99 | 0.688836 |
609bc596781c02a702b30be33b012b8075d29112 | 5,358 | py | Python | docs/conf.py | tongwu2020/adversarial-robustness-toolbox | d9958493a96244476867bcf5970e7877f1b05dc8 | [
"MIT"
] | 1 | 2019-04-14T23:18:02.000Z | 2019-04-14T23:18:02.000Z | docs/conf.py | tongwu2020/adversarial-robustness-toolbox | d9958493a96244476867bcf5970e7877f1b05dc8 | [
"MIT"
] | null | null | null | docs/conf.py | tongwu2020/adversarial-robustness-toolbox | d9958493a96244476867bcf5970e7877f1b05dc8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 31.704142 | 102 | 0.659201 |
1d721a3d6e4939477a63a5ddfd2d0e2c5424ee56 | 121 | py | Python | comments/admin.py | orionblastar/K666-OB | 2ee3ffa01d4dea799ac6946881dcf5f76d787168 | [
"MIT"
] | 8 | 2016-05-21T20:48:02.000Z | 2018-02-19T22:57:15.000Z | comments/admin.py | orionblastar/K666 | 2ee3ffa01d4dea799ac6946881dcf5f76d787168 | [
"MIT"
] | 35 | 2016-05-23T06:34:43.000Z | 2020-07-10T05:56:44.000Z | comments/admin.py | orionblastar/K666 | 2ee3ffa01d4dea799ac6946881dcf5f76d787168 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Comment
admin.site.register(Comment)
# Register your models here.
| 17.285714 | 32 | 0.801653 |
12be9e70d7d79e456d97ae16c644897284c15215 | 1,522 | py | Python | src/gui_tool/VideoCaptureManager.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 3 | 2020-02-12T01:24:46.000Z | 2020-02-13T00:50:46.000Z | src/gui_tool/VideoCaptureManager.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 32 | 2020-02-20T10:20:56.000Z | 2022-02-10T01:42:46.000Z | src/gui_tool/VideoCaptureManager.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 1 | 2020-02-22T02:47:19.000Z | 2020-02-22T02:47:19.000Z | import numpy as np
from ..data.VideoFile import VideoFile
"""
Video capture manager, specific for the GUI tool
Note:
This class is 0 indexed
"""
class VideoCaptureManager(object):
def __init__(self, file_loc: str, start_index=None, end_index=None):
self.file_loc = file_loc
self.vfm = VideoFile(... | 29.843137 | 87 | 0.586728 |
bc77ca271b4390e4bc197a373acd3d92cfa54afb | 4,200 | py | Python | tools/mm2ports.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | 4 | 2020-05-14T22:27:08.000Z | 2021-07-23T18:56:04.000Z | tools/mm2ports.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | null | null | null | tools/mm2ports.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | 1 | 2021-05-14T09:33:07.000Z | 2021-05-14T09:33:07.000Z |
""" Minsky Machine to Ports translator
This is a proof that Ports is Turing-complete !
"""
from ports import run_source
from generate_text import generate
REGISTER = """ ii{R}|o
{{
m* o:pl|p{R} o:ml|m{R} o:0l|0{R} pl-lpl ml-lml vlp-frec vlm-0l e-1.1*. # init
fp* lpl* vlp* lp* fp3-2.2*.
fm* lml* vlm* fm1-3.3*.
fb... | 25 | 107 | 0.512857 |
490a93ad4036516644cfd9feaced6f0d89ce3373 | 23,719 | py | Python | tests/test_likelihoods.py | lexxx233/GPflow | 7285baa5201de7e2e71dd5f903b228132a310edc | [
"Apache-2.0"
] | 1 | 2018-08-22T06:34:59.000Z | 2018-08-22T06:34:59.000Z | tests/test_likelihoods.py | lexxx233/GPflow | 7285baa5201de7e2e71dd5f903b228132a310edc | [
"Apache-2.0"
] | null | null | null | tests/test_likelihoods.py | lexxx233/GPflow | 7285baa5201de7e2e71dd5f903b228132a310edc | [
"Apache-2.0"
] | 2 | 2019-03-09T11:46:11.000Z | 2021-12-20T10:22:34.000Z | # Copyright 2017 the GPflow authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 43.282847 | 117 | 0.587967 |
88edc7019cc9ba092355d995e9170628996dc3d7 | 4,116 | py | Python | bot/cogs/moderation_cog.py | HerbyZ/CubeGod | d2b94b5ad29521258b220e47116a778fa0070693 | [
"MIT"
] | 1 | 2021-07-02T11:10:27.000Z | 2021-07-02T11:10:27.000Z | bot/cogs/moderation_cog.py | HerbyZ/CubeGod | d2b94b5ad29521258b220e47116a778fa0070693 | [
"MIT"
] | null | null | null | bot/cogs/moderation_cog.py | HerbyZ/CubeGod | d2b94b5ad29521258b220e47116a778fa0070693 | [
"MIT"
] | null | null | null | from discord.ext import commands
import discord
from database.managers import UserManager
from ..webhooks.log_hook import log
class ModerationCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command('clear')
@commands.has_permissions(manage_messages=True)
async def clear... | 34.588235 | 114 | 0.629495 |
f1f94f610abfcdc3c570aed78cf4dcac844ec9c2 | 2,698 | py | Python | toontown/coghq/DistributedLawbotBossGavelAI.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | toontown/coghq/DistributedLawbotBossGavelAI.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/coghq/DistributedLawbotBossGavelAI.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from direct.directnotify import DirectNotifyGlobal
from panda3d.core import *
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPGlobals
from direct.fsm import FSM
class DistributedLawbotBossGavelAI(DistributedObjectAI, FSM.FS... | 27.252525 | 88 | 0.613788 |
0325a2716a72b06c470eef132129dc61366e4ff4 | 1,379 | py | Python | core/dns_utils.py | exatel/ph0neutria | 38ee193f994c8f6408238b13b7e6cd66c4f4dbad | [
"Apache-2.0"
] | 277 | 2017-02-02T14:26:20.000Z | 2021-12-26T13:54:30.000Z | core/dns_utils.py | exatel/ph0neutria | 38ee193f994c8f6408238b13b7e6cd66c4f4dbad | [
"Apache-2.0"
] | 27 | 2016-11-30T12:50:36.000Z | 2020-04-12T06:47:09.000Z | core/dns_utils.py | exatel/ph0neutria | 38ee193f994c8f6408238b13b7e6cd66c4f4dbad | [
"Apache-2.0"
] | 65 | 2016-11-30T12:43:34.000Z | 2021-05-21T21:04:30.000Z | #!/usr/bin/python3
from .config_utils import get_base_config
from .log_utils import get_module_logger
import DNS
import os
import sys
import time
import validators
CDIR = os.path.dirname(os.path.realpath(__file__))
ROOTDIR = os.path.abspath(os.path.join(CDIR, os.pardir))
BASECONFIG = get_base_config(ROOTDIR)
LOGGI... | 20.893939 | 70 | 0.655547 |
de38cc41b034e827bf4c113b3a89b43d5899df59 | 242 | py | Python | giftrun-0.1/setup.py | olemb/giftrun | 003248357e3b632afee61f64d4feede2db59665d | [
"MIT"
] | 4 | 2017-02-23T13:10:20.000Z | 2019-05-27T18:25:13.000Z | giftrun-0.1/setup.py | olemb/giftrun | 003248357e3b632afee61f64d4feede2db59665d | [
"MIT"
] | null | null | null | giftrun-0.1/setup.py | olemb/giftrun | 003248357e3b632afee61f64d4feede2db59665d | [
"MIT"
] | 1 | 2021-12-07T11:57:35.000Z | 2021-12-07T11:57:35.000Z | import sys
import os
from distutils.core import setup
setup(name='giftrun',
url='http://www.cs.uit.no/~olemb/',
author='Ole Martin Bjorndalen',
author_email='olemb@stud.cs.uit.no',
version='0.1',
license='MIT')
| 22 | 42 | 0.640496 |
e3c5be8b04b0c052846f77f5bd718004c7db596a | 3,563 | py | Python | infer.py | ssktotoro/neuro | 2d6d4cd060ee368d67c3437cac2b64eeb7d7180c | [
"Apache-2.0"
] | null | null | null | infer.py | ssktotoro/neuro | 2d6d4cd060ee368d67c3437cac2b64eeb7d7180c | [
"Apache-2.0"
] | 3 | 2020-11-09T06:07:13.000Z | 2021-05-12T03:16:38.000Z | infer.py | ssktotoro/neuro | 2d6d4cd060ee368d67c3437cac2b64eeb7d7180c | [
"Apache-2.0"
] | null | null | null | import nibabel as nib
import numpy as np
from training.generator_coords import CoordsGenerator
import torch
class Predictor:
"""Only useful for serving... other methods would use a dataloader"""
def __init__(
self, model, volume_shape, subvolume_shape, n_subvolumes, n_classes
):
"""Docs.... | 35.989899 | 79 | 0.521471 |
b8cef1da21f93fc9f82b34bf5cbdc39e707046fd | 773 | py | Python | almc/src/utils/scripts/wiki_scraper.py | almeswe/almc | 0a9238b5844d2fd4c03e56453df7b59111a000b5 | [
"MIT"
] | 1 | 2022-01-01T22:18:57.000Z | 2022-01-01T22:18:57.000Z | almc/src/utils/scripts/wiki_scraper.py | almeswe/almc | 0a9238b5844d2fd4c03e56453df7b59111a000b5 | [
"MIT"
] | null | null | null | almc/src/utils/scripts/wiki_scraper.py | almeswe/almc | 0a9238b5844d2fd4c03e56453df7b59111a000b5 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
url = 'https://en.wikipedia.org/wiki/X86_instruction_listings'
response = requests.get(url, headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36'
})
if response.status_code != 200:
... | 30.92 | 131 | 0.69599 |
355ef0cb84e6ba6c8d47dacef569b86b81d0556a | 132 | py | Python | pyrevolve/tol/__init__.py | braj29/robo_swimmers | b3c3fa91976884095eb6b5e67844167598ec573d | [
"Apache-1.1"
] | 24 | 2017-06-19T20:25:15.000Z | 2022-01-03T16:27:34.000Z | pyrevolve/tol/__init__.py | Ravi-Bossema/revolve | 46ece6f7dc137afcc0ddcde163ffcfe9548bd1ad | [
"Apache-1.1"
] | 51 | 2016-04-19T16:01:34.000Z | 2021-09-17T19:07:10.000Z | pyrevolve/tol/__init__.py | Ravi-Bossema/revolve | 46ece6f7dc137afcc0ddcde163ffcfe9548bd1ad | [
"Apache-1.1"
] | 37 | 2017-02-21T23:20:44.000Z | 2022-01-18T16:40:17.000Z | from __future__ import absolute_import
from .logger import logger
from .logger import output_console
from .logger import log_debug
| 22 | 38 | 0.848485 |
73b51f521a9559489c7c1be410a78847cabe4e91 | 6,788 | py | Python | Proper/proper/prop_rectangle.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 1 | 2021-06-25T17:35:56.000Z | 2021-06-25T17:35:56.000Z | Proper/proper/prop_rectangle.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | null | null | null | Proper/proper/prop_rectangle.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 2 | 2018-12-08T15:05:13.000Z | 2019-08-08T17:28:24.000Z | # Copyright 2016, 2017 California Institute of Technology
# Users must agree to abide by the restrictions listed in the
# file "LegalStuff.txt" in the PROPER library directory.
#
# PROPER developed at Jet Propulsion Laboratory/California Inst. Technology
# Original IDL version by John Krist
# Python transla... | 30.303571 | 102 | 0.551414 |
c4ebee7bd1533648ebc8a85449968a0c4ef863b5 | 196,919 | py | Python | neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancerv2.py | mail2nsrajesh/neutron-lbaas | 997a4556a07f1c830c4d1d84ae0c54570ceab169 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancerv2.py | mail2nsrajesh/neutron-lbaas | 997a4556a07f1c830c4d1d84ae0c54570ceab169 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancerv2.py | mail2nsrajesh/neutron-lbaas | 997a4556a07f1c830c4d1d84ae0c54570ceab169 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 OpenStack Foundation.
#
# 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... | 45.010057 | 93 | 0.537764 |
d670709c8374b8a90ec39a424bcd0315902095c7 | 10,689 | py | Python | util/visualizer.py | supri-a/TXM2SEM | 300dbbbad6996d025381551bf968759b56d35d4d | [
"MIT"
] | 1 | 2021-08-13T06:13:21.000Z | 2021-08-13T06:13:21.000Z | util/visualizer.py | supri-a/TXM2SEM | 300dbbbad6996d025381551bf968759b56d35d4d | [
"MIT"
] | null | null | null | util/visualizer.py | supri-a/TXM2SEM | 300dbbbad6996d025381551bf968759b56d35d4d | [
"MIT"
] | null | null | null | import numpy as np
import os
import sys
import ntpath
import time
from . import util, html
from subprocess import Popen, PIPE
from skimage.transform import resize
if sys.version_info[0] == 2:
VisdomExceptionBase = Exception
else:
VisdomExceptionBase = ConnectionError
def save_images(webpage, visuals, image_p... | 46.881579 | 139 | 0.567499 |
d5c9e59d6e15e05d472c3a74e268a3a69668c95d | 14,461 | py | Python | wpc/models.py | paked/WPC-fix | bca46731bce6a76f6b7eb79123b79b9c6377bc52 | [
"MIT"
] | null | null | null | wpc/models.py | paked/WPC-fix | bca46731bce6a76f6b7eb79123b79b9c6377bc52 | [
"MIT"
] | null | null | null | wpc/models.py | paked/WPC-fix | bca46731bce6a76f6b7eb79123b79b9c6377bc52 | [
"MIT"
] | null | null | null | from wpc import db, app, login_manager
from wpc.utils import requests_get_with_retries
from flask.ext.login import UserMixin, current_user
from sqlalchemy.orm.properties import ColumnProperty
import humanize
from datetime import datetime, timedelta
@login_manager.user_loader
def load_user(reddit_username):
... | 38.256614 | 206 | 0.599889 |
1cf8d1430c578400d1a93d62790a3f2c7305156f | 886 | py | Python | examples/sample_pandas_type_check.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | examples/sample_pandas_type_check.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | examples/sample_pandas_type_check.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | from typing import Dict, Any
import gokart
import pandas as pd
# Please define a class which inherits `gokart.PandasTypeConfig`.
# **In practice, please import `SamplePandasTypeConfig` in `__init__`.**
class SamplePandasTypeConfig(gokart.PandasTypeConfig):
task_namespace = 'sample_pandas_type_check'
@classm... | 28.580645 | 111 | 0.697517 |
275df02d92a3e83bf35d3a51c03bf43e2eed629a | 513 | py | Python | src/main/python/karellen/kombu/transport/django/migrations/__init__.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 6 | 2017-01-27T22:13:22.000Z | 2017-11-23T17:22:46.000Z | src/main/python/karellen/kombu/transport/django/migrations/__init__.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 7 | 2016-12-19T03:53:22.000Z | 2018-09-24T14:29:12.000Z | src/main/python/karellen/kombu/transport/django/migrations/__init__.py | jonashaag/karellen-kombu-ext | edabd7e17b5565d9d4c1861c35bc9d6852a0a061 | [
"Apache-2.0"
] | 4 | 2016-12-17T05:07:14.000Z | 2018-02-20T10:49:38.000Z | from __future__ import absolute_import, unicode_literals
SOUTH_ERROR_MESSAGE = """
For South support, customize the SOUTH_MIGRATION_MODULES setting
to point to the correct migrations module:
SOUTH_MIGRATION_MODULES = {
'karellen_kombu_transport_django': 'karellen.kombu.transport.django.south_migrations',
... | 30.176471 | 94 | 0.791423 |
1845499d05da93f8af09966ee987cd2975e5209c | 7,056 | py | Python | LAUNCHER.py | EinKung/AI-Image-Denoising | e679091b0bd21c5259da2804b5c6de79b6f1ba4c | [
"Apache-2.0"
] | null | null | null | LAUNCHER.py | EinKung/AI-Image-Denoising | e679091b0bd21c5259da2804b5c6de79b6f1ba4c | [
"Apache-2.0"
] | null | null | null | LAUNCHER.py | EinKung/AI-Image-Denoising | e679091b0bd21c5259da2804b5c6de79b6f1ba4c | [
"Apache-2.0"
] | null | null | null | from UI import UI
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys,os,shutil,torch
import UTILS as utils
import PIL.Image as Image
import numpy as np
from NETWORK import *
class Launcher(QWidget,UI):
def __init__(self):
utils.logMaker('INFO','APPLICA... | 40.786127 | 146 | 0.6053 |
4981676803b3df1bc71cdc7bbd6b7826c814f9f9 | 2,258 | py | Python | oauth_provider/runtests/settings.py | TimSC/django-oauth10a-mod | 3b9786b33cbd3d2ab6de7a667f9737167b349db0 | [
"BSD-3-Clause"
] | null | null | null | oauth_provider/runtests/settings.py | TimSC/django-oauth10a-mod | 3b9786b33cbd3d2ab6de7a667f9737167b349db0 | [
"BSD-3-Clause"
] | null | null | null | oauth_provider/runtests/settings.py | TimSC/django-oauth10a-mod | 3b9786b33cbd3d2ab6de7a667f9737167b349db0 | [
"BSD-3-Clause"
] | null | null | null | import os
import django
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DEBUG = DEBUG = True
MANAGERS = ADMINS = ()
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'testdb.sqlite', # Or path... | 28.225 | 108 | 0.658547 |
d9439c09fbc12500a002359d22ce39f2ecbb7f5f | 150 | py | Python | docs/plots/plot_400m2.py | simontorres/goodman-lamps-lib | 895a3835123e078b781d77a9d22a7a0d956563ba | [
"BSD-3-Clause"
] | null | null | null | docs/plots/plot_400m2.py | simontorres/goodman-lamps-lib | 895a3835123e078b781d77a9d22a7a0d956563ba | [
"BSD-3-Clause"
] | 1 | 2019-07-19T14:51:29.000Z | 2019-08-12T21:00:33.000Z | docs/plots/plot_400m2.py | simontorres/goodman-lamps-lib | 895a3835123e078b781d77a9d22a7a0d956563ba | [
"BSD-3-Clause"
] | 1 | 2021-09-20T03:30:39.000Z | 2021-09-20T03:30:39.000Z | from __future__ import absolute_import
from goodman_lamps.goodman_lamps import create_plot
if __name__ == '__main__':
create_plot(mode='400M2')
| 21.428571 | 51 | 0.8 |
d7e77cd920114a0a30bf8b16f8bbed6e5e2d3491 | 76 | py | Python | ocrd_olahd_client/__init__.py | OCR-D/ocrd_olahd_client | 9809d0c1d7008deb55ba4210ae373ec264b68701 | [
"Apache-2.0"
] | 1 | 2022-01-26T10:05:36.000Z | 2022-01-26T10:05:36.000Z | ocrd_olahd_client/__init__.py | OCR-D/ocrd_olahd_client | 9809d0c1d7008deb55ba4210ae373ec264b68701 | [
"Apache-2.0"
] | 1 | 2020-09-21T16:36:42.000Z | 2020-09-21T16:36:42.000Z | ocrd_olahd_client/__init__.py | OCR-D/ocrd_olahd_client | 9809d0c1d7008deb55ba4210ae373ec264b68701 | [
"Apache-2.0"
] | 1 | 2020-10-08T08:30:17.000Z | 2020-10-08T08:30:17.000Z | from .client import OlaHdClient
from .processor import OlaHdClientProcessor
| 25.333333 | 43 | 0.868421 |
774ee97185a52cca5e743225c7623adb64395ab1 | 614 | py | Python | study/chainer_study/chainer_study-2.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | 2 | 2020-04-06T09:09:19.000Z | 2020-07-24T03:59:55.000Z | study/chainer_study/chainer_study-2.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | null | null | null | study/chainer_study/chainer_study-2.py | strawsyz/straw | db313c78c2e3c0355cd10c70ac25a15bb5632d41 | [
"MIT"
] | null | null | null | from chainer import Variable
import numpy as np
from chainer import Chain, Variable
import chainer.links as L
# Defining your own neural networks using `Chain` class
class MyChain(Chain):
def __init__(self):
super(MyChain, self).__init__()
with self.init_scope():
self.l1 = L.Linear(2, ... | 22.740741 | 58 | 0.609121 |
12165ff9bb97ab8dcadf92bd17bb032500609509 | 638 | py | Python | eelbrain/_trf/tests/test_error_functions.py | reddigari/Eelbrain | 6c02b99955d4b5dc7e3054042c182e1a4629b13c | [
"BSD-3-Clause"
] | null | null | null | eelbrain/_trf/tests/test_error_functions.py | reddigari/Eelbrain | 6c02b99955d4b5dc7e3054042c182e1a4629b13c | [
"BSD-3-Clause"
] | null | null | null | eelbrain/_trf/tests/test_error_functions.py | reddigari/Eelbrain | 6c02b99955d4b5dc7e3054042c182e1a4629b13c | [
"BSD-3-Clause"
] | null | null | null | # Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
from nose.tools import assert_almost_equal
import numpy as np
from eelbrain._trf._boosting_opt import l1, l2
PRECISION = 10
# numpy-based error functions
#############################
def np_l2(x):
return np.dot(x, x[:, None])[0]
def np_l1(x):
retur... | 22 | 58 | 0.647335 |
7d7d5e9a2e2f3aa6427d638ad9264991cf02b6a8 | 707 | py | Python | src/action/migrations/0007_auto_20171206_2221.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | 3 | 2018-08-24T10:48:40.000Z | 2020-05-29T06:33:23.000Z | src/action/migrations/0007_auto_20171206_2221.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | null | null | null | src/action/migrations/0007_auto_20171206_2221.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-06 11:21
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('action', '0006_action_columns'),
]
operations =... | 27.192308 | 156 | 0.630835 |
1b125acb4853d3b0d787f27a4a2f17eea6df7a4e | 7,089 | py | Python | lib/gzMyModule/gzMyModuleClient.py | Polygrant/gzMyModule | 9d334c07b4179ad5f05abdbbca65571baa369d80 | [
"MIT"
] | null | null | null | lib/gzMyModule/gzMyModuleClient.py | Polygrant/gzMyModule | 9d334c07b4179ad5f05abdbbca65571baa369d80 | [
"MIT"
] | null | null | null | lib/gzMyModule/gzMyModuleClient.py | Polygrant/gzMyModule | 9d334c07b4179ad5f05abdbbca65571baa369d80 | [
"MIT"
] | null | null | null | ############################################################
#
# Autogenerated by the KBase type compiler -
# any changes made here will be overwritten
#
############################################################
try:
import json as _json
except ImportError:
import sys
sys.path.append('simplejson-2.3.3')... | 39.383333 | 110 | 0.572436 |
2dca1b3dfa8b9cad2e6dedab6b168f6c197962fe | 12,236 | py | Python | fastai/medical/imaging.py | raphaelr/fastai | 0eec9f87e10d0095220c1460e8b80bb66aed3460 | [
"Apache-2.0"
] | null | null | null | fastai/medical/imaging.py | raphaelr/fastai | 0eec9f87e10d0095220c1460e8b80bb66aed3460 | [
"Apache-2.0"
] | null | null | null | fastai/medical/imaging.py | raphaelr/fastai | 0eec9f87e10d0095220c1460e8b80bb66aed3460 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/60_medical.imaging.ipynb (unless otherwise specified).
__all__ = ['DcmDataset', 'DcmTag', 'DcmMultiValue', 'dcmread', 'get_dicom_files', 'get_dicom_files', 'TensorDicom',
'PILDicom', 'pixels', 'scaled_px', 'array_freqhist_bins', 'dicom_windows', 'TensorCTScan'... | 32.892473 | 134 | 0.666558 |
ea4d4f40c164f0566dadf25e7dbfad215e9dd6fb | 5,514 | py | Python | apsdocs/source/conf.py | dgursoy/apsdocs | c4e1f74dda98d49f470e5861a4b5b658765dabc4 | [
"BSD-3-Clause"
] | null | null | null | apsdocs/source/conf.py | dgursoy/apsdocs | c4e1f74dda98d49f470e5861a4b5b658765dabc4 | [
"BSD-3-Clause"
] | null | null | null | apsdocs/source/conf.py | dgursoy/apsdocs | c4e1f74dda98d49f470e5861a4b5b658765dabc4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# apsdocs documentation build configuration file, created by
# sphinx-quickstart on Sat May 11 13:26:24 2019.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# au... | 29.174603 | 79 | 0.679362 |
478a6931151350d535b019d0787ff01041b12887 | 5,185 | py | Python | AprioriAlgorithm/Apriori.py | AvisenaAlwi/DataMining | 5a2dc404c7c120a3ff99f93b9a4627804cd1486a | [
"Apache-2.0"
] | 2 | 2019-03-22T12:29:08.000Z | 2019-04-05T06:27:01.000Z | AprioriAlgorithm/Apriori.py | AvisenaAlwi/DataMining | 5a2dc404c7c120a3ff99f93b9a4627804cd1486a | [
"Apache-2.0"
] | null | null | null | AprioriAlgorithm/Apriori.py | AvisenaAlwi/DataMining | 5a2dc404c7c120a3ff99f93b9a4627804cd1486a | [
"Apache-2.0"
] | null | null | null | class Apriori:
def __init__(self, minimum_support=3):
"""
Konstruktor class
:param minimum_support: minimum support, default = 3
"""
self.__minimum_support = minimum_support
self.__transaction = dict()
self.__items = set()
def add_transaction(self, items... | 34.337748 | 102 | 0.502797 |
f6dc3daf31589353c4a8c13d5ff652f7648700d4 | 1,280 | py | Python | localstack/mock/apis/dynamodbstreams_api.py | WesleyCharlesBlake/localstack | 7402ce0edae4f314538ced4a84b4bbb5b0ade0dd | [
"Apache-2.0"
] | 1 | 2017-05-03T12:17:59.000Z | 2017-05-03T12:17:59.000Z | localstack/mock/apis/dynamodbstreams_api.py | WesleyCharlesBlake/localstack | 7402ce0edae4f314538ced4a84b4bbb5b0ade0dd | [
"Apache-2.0"
] | null | null | null | localstack/mock/apis/dynamodbstreams_api.py | WesleyCharlesBlake/localstack | 7402ce0edae4f314538ced4a84b4bbb5b0ade0dd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import json
import uuid
import logging
from flask import Flask, jsonify, request
from localstack.utils.aws import aws_stack
APP_NAME = 'ddb_streams_mock'
app = Flask(APP_NAME)
DDB_STREAMS = []
def add_dynamodb_stream(table_name, view_type='NEW_AND_OLD_IMAGES', enabled=True):
if... | 24.615385 | 82 | 0.650781 |
87e127b12471b83d3bf79066ac981346502d0161 | 5,636 | py | Python | top_block.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | 2 | 2021-11-30T02:35:48.000Z | 2021-11-30T02:53:02.000Z | top_block.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | null | null | null | top_block.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
# Generated: Fri Aug 10 08:11:40 2018
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.sta... | 41.138686 | 122 | 0.649042 |
a187a89f90aa4b860effbeef276000b0dff8557f | 1,345 | py | Python | ScrappingData.py | Harshit161999/Air_Quality_Index | 17acc726ccf6fe19fcc1294966b886bb7bdb0b0f | [
"MIT"
] | 1 | 2020-12-31T10:47:11.000Z | 2020-12-31T10:47:11.000Z | ScrappingData.py | Harshit161999/Air_Quality_Index | 17acc726ccf6fe19fcc1294966b886bb7bdb0b0f | [
"MIT"
] | null | null | null | ScrappingData.py | Harshit161999/Air_Quality_Index | 17acc726ccf6fe19fcc1294966b886bb7bdb0b0f | [
"MIT"
] | 5 | 2021-01-13T18:47:13.000Z | 2021-08-03T11:33:51.000Z | from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
import os
import sys
years = list(range(2010,2019))
months = ["%02d"%x for x in range(1, 13)]
for year in years:
for month in months:
file_html = open('Data/Html_Data/{}/{}.html'.format(year,month), 'rb')
plain_text = file_html.r... | 37.361111 | 136 | 0.600743 |
35300795bf44e47b49b460b6d3a8707caa0a4894 | 12,501 | py | Python | report_merger.py | xenoxine/GyoiThon | 94567e18261be5152bb809b5b6f056a60c710122 | [
"Apache-2.0"
] | 666 | 2018-03-14T04:54:49.000Z | 2022-03-31T07:54:55.000Z | report_merger.py | FDlucifer/GyoiThon | 3abd7032905b718fb04eeba9c4658799fc748336 | [
"Apache-2.0"
] | 47 | 2018-03-23T08:39:31.000Z | 2021-07-11T06:56:07.000Z | report_merger.py | FDlucifer/GyoiThon | 3abd7032905b718fb04eeba9c4658799fc748336 | [
"Apache-2.0"
] | 261 | 2018-03-14T00:44:25.000Z | 2022-03-28T08:06:38.000Z | #!/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import traceback
import re
import codecs
import glob
import configparser
import pandas as pd
from util import Utilty
# Type of printing.
OK = 'ok' # [*]
NOTE = 'note' # [+]
FAIL = 'fail' # [-]
WARNING = 'warn' # [!]
NONE = 'none' # No ... | 43.70979 | 130 | 0.553476 |
c79f278fc5d1bc6610f0866272d80b643d665158 | 1,531 | py | Python | SoundOff-seperate_files_classes/Testing/interface_testing.py | DuquesneS22CPMA536/SoundOff | f36dd4be13abe964a1a0407515fe29afe5852e3b | [
"MIT"
] | null | null | null | SoundOff-seperate_files_classes/Testing/interface_testing.py | DuquesneS22CPMA536/SoundOff | f36dd4be13abe964a1a0407515fe29afe5852e3b | [
"MIT"
] | 48 | 2022-03-17T18:07:59.000Z | 2022-03-31T18:52:40.000Z | SoundOff-seperate_files_classes/Testing/interface_testing.py | DuquesneS22CPMA536/SoundOff | f36dd4be13abe964a1a0407515fe29afe5852e3b | [
"MIT"
] | null | null | null | # Using pyautogui to go through a simple run of using the app on Gabbie's computer to compare a file to all platforms, LUFS and peak
# all coordinates were found using an example program from https://pyautogui.readthedocs.io/en/latest/mouse.html
import pyautogui as gui, time
screenWidth, screenHeight = gui.size() # ... | 36.452381 | 133 | 0.744611 |
c1c1d45fa6f7b21219892043ec9cd24f2dee886f | 488 | py | Python | tests/integration/test_scroll_to_element.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | null | null | null | tests/integration/test_scroll_to_element.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | 1 | 2021-06-02T04:21:17.000Z | 2021-06-02T04:21:17.000Z | tests/integration/test_scroll_to_element.py | vkarpenko/selene | 4776357430c940be38f38be9981006dd156f9730 | [
"MIT"
] | null | null | null | import logging
import os
from selene import config
from selene.browser import open_url, driver
from selene.support.jquery_style_selectors import s
start_page = 'file://' + os.path.abspath(os.path.dirname(__file__)) + '/../resources/start_page.html'
def setup_module(m):
config.browser_name = "chrome"
def test_... | 24.4 | 101 | 0.743852 |
c390c33eec2a0bba1a490400cf744ae92060ac32 | 2,317 | py | Python | cmake/scripts/convert.py | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 49 | 2017-02-07T15:10:04.000Z | 2021-11-12T06:00:30.000Z | cmake/scripts/convert.py | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 104 | 2016-10-31T01:42:59.000Z | 2021-08-28T13:29:09.000Z | cmake/scripts/convert.py | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 36 | 2016-11-01T11:25:34.000Z | 2022-03-09T22:38:51.000Z | #!/usr/bin/env python
# coding: utf-8
# originally from:
# http://www.warp1337.com/content/how-use-ctest-jenkins-xunit-or-junit-plugin
# improved by:
# Jorge Araya Navarro <elcorreo@deshackra.com>
# Veni, Sancte Spiritus.
from lxml import etree
import argparse
from os.path import expanduser
... | 30.893333 | 79 | 0.649115 |
33cdd692e161c973c063793c401294425feaded4 | 3,595 | py | Python | fuze/angr-modified/concretization_strategies/__init__.py | Xelentra1/Linux_kernel_exploits | 5b52fb0fe5210bb9103c57158fe5c4016ca06105 | [
"MIT"
] | 444 | 2018-05-13T00:16:03.000Z | 2022-03-30T01:31:50.000Z | fuze/angr-modified/concretization_strategies/__init__.py | Xelentra1/Linux_kernel_exploits | 5b52fb0fe5210bb9103c57158fe5c4016ca06105 | [
"MIT"
] | 6 | 2019-04-19T00:20:16.000Z | 2022-01-19T02:04:00.000Z | fuze/angr-modified/concretization_strategies/__init__.py | Xelentra1/Linux_kernel_exploits | 5b52fb0fe5210bb9103c57158fe5c4016ca06105 | [
"MIT"
] | 97 | 2018-07-23T02:44:29.000Z | 2022-03-31T10:18:07.000Z | class SimConcretizationStrategy(object):
"""
Concretization strategies control the resolution of symbolic memory indices
in SimuVEX. By subclassing this class and setting it as a concretization strategy
(on state.memory.read_strategies and state.memory.write_strategies), SimuVEX's
memory index concr... | 39.076087 | 99 | 0.679277 |
fa8a217c77baab4068a7bb5b5460a98255fa7a26 | 16,109 | py | Python | twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 1,362 | 2015-01-04T10:25:18.000Z | 2022-03-24T10:07:08.000Z | twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 299 | 2015-01-30T09:52:39.000Z | 2022-03-31T23:03:02.000Z | env/lib/python3.9/site-packages/twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py | giannicrivello/AudioShack_BE | b50ba91b6904ac069fc37c98a691729932297b6a | [
"MIT"
] | 622 | 2015-01-03T04:43:09.000Z | 2022-03-29T14:11:00.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | 36.363431 | 150 | 0.638711 |
a8b55a9d94fe23f767f45db6a7bca99528ab3c34 | 2,848 | py | Python | src/oci/blockchain/models/peer_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/blockchain/models/peer_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/blockchain/models/peer_summary.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 27.921569 | 245 | 0.636938 |
123829feb5acb422658c566e80a68e9d65016264 | 1,097 | py | Python | hard-gists/3181989/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/3181989/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/3181989/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import StringIO
import requests
import PIL.Image
import tesserwrap
#: https://github.com/gregjurman/tesserwrap
tesseract = tesserwrap.tesseract()
def distinguish_captcha(image_url, show_origin_image=True):
#: preprocess
image_bytes = requests.get(imag... | 24.377778 | 68 | 0.652689 |
913e65e98f353c782d908b60b3a496b5e11de0c0 | 2,706 | py | Python | fserver/util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | 1 | 2020-08-06T01:25:14.000Z | 2020-08-06T01:25:14.000Z | fserver/util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | 1 | 2020-07-26T09:27:01.000Z | 2020-07-26T09:27:01.000Z | fserver/util.py | Carrotor116/fserver | 86934023fb080088854b4bae7867ad3667561111 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import re
import sys
from fserver import conf
def debug(*args):
if conf.DEBUG:
pretty_print(sys.stdout, 'debug', *args)
def warning(*args):
pretty_print(sys.stderr, 'warning', *args)
def pretty_print(file, level, *args):
... | 27.06 | 120 | 0.539542 |
75c936e7858d5f7d0e582b87aebbbc08107d9123 | 7,899 | py | Python | projects/tutorials/running_inference_tutorial.py | Aakash-Roy/allenact | 3da8c72bcd32e33036c6b6ea32010c6b391be757 | [
"MIT"
] | null | null | null | projects/tutorials/running_inference_tutorial.py | Aakash-Roy/allenact | 3da8c72bcd32e33036c6b6ea32010c6b391be757 | [
"MIT"
] | null | null | null | projects/tutorials/running_inference_tutorial.py | Aakash-Roy/allenact | 3da8c72bcd32e33036c6b6ea32010c6b391be757 | [
"MIT"
] | null | null | null | # literate: tutorials/running-inference-on-a-pretrained-model.md
# %%
"""# Tutorial: Inference with a pre-trained model."""
# %%
"""
In this tutorial we will run inference on a pre-trained model for the PointNav task
in the RoboTHOR environment. In this task the agent is tasked with going to a specific location
within... | 39.893939 | 171 | 0.745284 |
a826c2c2a30ce8e8923d5ebda73945230a98309f | 5,866 | py | Python | model_vsrl4hico.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | model_vsrl4hico.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | model_vsrl4hico.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from attention import Attention, NewAttention
from language_model import WordEmbedding, QuestionEmbedding
from classifier import SimpleClassifier
from fc import FCNet
import torch.nn.functional as F
import torchvision as tv
import utils
import numpy as np
import model_verb_directcnn
i... | 32.955056 | 130 | 0.620525 |
9a4b73e18784c648d5a663bc348ee884f9243c48 | 1,020 | py | Python | myproject/myproject/urls.py | natchakorn19156/myrepo2 | 5113575d47745441c0df777c1ce51e450a0dd1c7 | [
"BSD-2-Clause"
] | null | null | null | myproject/myproject/urls.py | natchakorn19156/myrepo2 | 5113575d47745441c0df777c1ce51e450a0dd1c7 | [
"BSD-2-Clause"
] | null | null | null | myproject/myproject/urls.py | natchakorn19156/myrepo2 | 5113575d47745441c0df777c1ce51e450a0dd1c7 | [
"BSD-2-Clause"
] | null | null | null | """myproject 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-... | 39.230769 | 80 | 0.716667 |
96c41becc4e4f3f51687918206e29dae2533126c | 2,626 | py | Python | tests/config/test_config.py | duruyi/pycasbin | a16bfaa669c37ac1598684e36b0319430ab749e5 | [
"Apache-2.0"
] | null | null | null | tests/config/test_config.py | duruyi/pycasbin | a16bfaa669c37ac1598684e36b0319430ab749e5 | [
"Apache-2.0"
] | null | null | null | tests/config/test_config.py | duruyi/pycasbin | a16bfaa669c37ac1598684e36b0319430ab749e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The casbin Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 39.19403 | 84 | 0.634044 |
6cc9d1eac90c3bd64a5354287fb70d47d7de88a5 | 1,516 | py | Python | xlsxwriter/test/comparison/test_chart_axis13.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_axis13.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_chart_axis13.py | hugovk/XlsxWriter | e97cc66637d9895480ee32cfb5e561d652d3787b | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 24.451613 | 79 | 0.53628 |
cca8cc94fc2218c9952104210c727dd01a3f1a42 | 10,362 | py | Python | tests/test_wallet.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 3 | 2020-05-02T02:48:16.000Z | 2021-06-15T16:50:11.000Z | tests/test_wallet.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | null | null | null | tests/test_wallet.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 1 | 2019-03-08T12:04:19.000Z | 2019-03-08T12:04:19.000Z | from datetime import datetime
from decimal import Decimal
import unittest
import warnings
from monero.wallet import Wallet
from monero.account import Account
from monero.address import address
from monero.numbers import PaymentID
from monero.transaction import IncomingPayment, Transaction
class FiltersTestCase(unitte... | 52.333333 | 141 | 0.62073 |
b5b3d82529a573395cd05894956ea8bbc5f68957 | 3,197 | py | Python | member/models.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | member/models.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | member/models.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.contrib.auth.hashers import PBKDF2PasswordHasher
from django.contrib.auth.models import User
from django.utils.crypto import get_random_string
import progress
class Expertise(models.Model):
"""Bidang keahlian supervisor"""
name = models.CharField(max_length=100)
de... | 38.518072 | 80 | 0.640601 |
67c59d46f6dfafa3295ef5bf59702024d3f2b4da | 886 | py | Python | tests/test_iters.py | cwstryker/skidl | b5854ecd71e9da70d5391ad67ab30a8985a61ee8 | [
"MIT"
] | null | null | null | tests/test_iters.py | cwstryker/skidl | b5854ecd71e9da70d5391ad67ab30a8985a61ee8 | [
"MIT"
] | null | null | null | tests/test_iters.py | cwstryker/skidl | b5854ecd71e9da70d5391ad67ab30a8985a61ee8 | [
"MIT"
] | null | null | null | import pytest
from skidl import *
from .setup_teardown import *
def test_iters_1():
"""Test bus iterator."""
b_size = 4
b = Bus("chplx", b_size)
for hi in b:
for lo in b:
if hi != lo:
led = Part("device", "LED")
hi += led["A"]
lo +=... | 20.136364 | 43 | 0.419865 |
1b498ab44512aeda880e2eddbdb83852176e7dda | 4,556 | py | Python | plugins/elasticsearch/unit_test/test_search_documents.py | rapid7/insightconnect-plugins | b4732be7716bc949264c09526de6b9afbf9f705f | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/elasticsearch/unit_test/test_search_documents.py | rapid7/insightconnect-plugins | b4732be7716bc949264c09526de6b9afbf9f705f | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/elasticsearch/unit_test/test_search_documents.py | rapid7/insightconnect-plugins | b4732be7716bc949264c09526de6b9afbf9f705f | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import sys
import os
from unittest.mock import patch
from komand_elasticsearch.actions import SearchDocuments
from insightconnect_plugin_runtime.exceptions import PluginException
from komand_elasticsearch.actions.search_documents.schema import Input, Output
from unit_test.util import Util
from unittest import TestCase
... | 36.741935 | 120 | 0.530509 |
7084b0161e3e90da86988ef6a4f9bd895da55c97 | 187 | py | Python | tests/utils.py | CuriBio/curibio.sdk | 09384eac0defe1ec835d2e6a3f926eaa72b6a923 | [
"MIT"
] | null | null | null | tests/utils.py | CuriBio/curibio.sdk | 09384eac0defe1ec835d2e6a3f926eaa72b6a923 | [
"MIT"
] | 106 | 2020-05-29T14:21:10.000Z | 2021-11-10T00:44:00.000Z | tests/utils.py | CuriBio/curibio.sdk | 09384eac0defe1ec835d2e6a3f926eaa72b6a923 | [
"MIT"
] | 1 | 2021-07-01T16:26:49.000Z | 2021-07-01T16:26:49.000Z | # -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
def get_cell_value(sheet, zero_based_row, zero_based_col):
return sheet.cell(row=zero_based_row + 1, column=zero_based_col + 1).value
| 31.166667 | 78 | 0.68984 |
fddf54f3c86c304fcd99a5912ec38c988e8023a0 | 1,175 | py | Python | rwio/reader.py | viciouspetal/time-machine-py | 906b5cba479e2d80df8108b14dcbb1a95b5458bd | [
"Apache-2.0"
] | null | null | null | rwio/reader.py | viciouspetal/time-machine-py | 906b5cba479e2d80df8108b14dcbb1a95b5458bd | [
"Apache-2.0"
] | null | null | null | rwio/reader.py | viciouspetal/time-machine-py | 906b5cba479e2d80df8108b14dcbb1a95b5458bd | [
"Apache-2.0"
] | null | null | null | class Reader:
def __init__(self, filename):
self.filename = filename
self.f = None
try:
self.f = open(self.filename, 'rt')
except FileNotFoundError as err:
print("Could not locate" + self.filename + ". Ensure that it exists.")
def close(self):
if ... | 30.128205 | 83 | 0.538723 |
5732171973a3b1b0d612685d39683323ab6126b3 | 4,899 | py | Python | facesdk/retinaface/models/retinaface.py | foamliu/FaceSDK | af83d440eafe8523e4323df7c4c8dc5370fb3d70 | [
"MIT"
] | null | null | null | facesdk/retinaface/models/retinaface.py | foamliu/FaceSDK | af83d440eafe8523e4323df7c4c8dc5370fb3d70 | [
"MIT"
] | null | null | null | facesdk/retinaface/models/retinaface.py | foamliu/FaceSDK | af83d440eafe8523e4323df7c4c8dc5370fb3d70 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models._utils as _utils
from facesdk.retinaface.models.net import FPN as FPN
from facesdk.retinaface.models.net import MobileNetV1 as MobileNetV1
from facesdk.retinaface.models.net import SSH as SSH
class ClassHead(nn.Module):
... | 38.273438 | 118 | 0.62972 |
22617986b82f8c89c96bcda10438ae78e3af19e5 | 394 | py | Python | terrascript/resource/pagerduty.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/pagerduty.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/pagerduty.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/pagerduty.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:24:19 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.resource.pagerduty
#
# instead of
#
# >>> import terrascript.resource.PagerDuty.pagerduty
#
# This is only available for 'official' and 'pa... | 26.266667 | 73 | 0.753807 |
e7fcd0146935fb8e42a6c7b2cd9b0d4691df9360 | 135 | py | Python | urlabridge/app/urls.py | kaitlinlogie/url-abridge | dc50f1862de3303edeb4e90d3b75f336e808117b | [
"MIT"
] | null | null | null | urlabridge/app/urls.py | kaitlinlogie/url-abridge | dc50f1862de3303edeb4e90d3b75f336e808117b | [
"MIT"
] | null | null | null | urlabridge/app/urls.py | kaitlinlogie/url-abridge | dc50f1862de3303edeb4e90d3b75f336e808117b | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('<str:path>/', views.page_redirect, name='page_redirect')
] | 19.285714 | 66 | 0.711111 |
6222cd4912205c27e4e6687fad4047a0180b53a2 | 5,787 | py | Python | haystack/views.py | gthb/django-haystack | 41814ab4c2b2942f8229658a76749a1fe2889ef8 | [
"BSD-3-Clause"
] | null | null | null | haystack/views.py | gthb/django-haystack | 41814ab4c2b2942f8229658a76749a1fe2889ef8 | [
"BSD-3-Clause"
] | null | null | null | haystack/views.py | gthb/django-haystack | 41814ab4c2b2942f8229658a76749a1fe2889ef8 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.core.paginator import Paginator, InvalidPage
from django.http import Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from haystack.forms import ModelSearchForm
from haystack.query import EmptySearchQuerySet
RESULTS_PER_PAG... | 29.52551 | 171 | 0.609988 |
67b69a42fa8706284d84c7017eef3eb3b0581239 | 459 | py | Python | sitewebapp/migrations/0013_auto_20210130_0409.py | deucaleon18/debsoc-nitdgp-website | 41bd6ade7f4af143ef34aff01848f830cc533add | [
"MIT"
] | 2 | 2020-12-05T05:34:56.000Z | 2020-12-09T10:27:43.000Z | sitewebapp/migrations/0013_auto_20210130_0409.py | deucaleon18/debsoc-nitdgp-website | 41bd6ade7f4af143ef34aff01848f830cc533add | [
"MIT"
] | 3 | 2021-06-28T16:47:23.000Z | 2021-06-28T16:48:51.000Z | sitewebapp/migrations/0013_auto_20210130_0409.py | deucaleon18/debsoc-nitdgp-website | 41bd6ade7f4af143ef34aff01848f830cc533add | [
"MIT"
] | 9 | 2021-01-29T17:06:30.000Z | 2021-08-21T18:23:26.000Z | # Generated by Django 2.2.15 on 2021-01-29 22:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sitewebapp', '0012_auto_20210130_0352'),
]
operations = [
migrations.AlterField(
model_name='auditionrounds',
name=... | 24.157895 | 108 | 0.638344 |
3da526205a2fbd524c296cf02a37c719b8119863 | 1,186 | py | Python | postgresql/importcsv.py | williamszostak/discogs-xml2db | b637a3944320c32e3d44328a6f00420ffc1f8c17 | [
"Apache-2.0"
] | 133 | 2015-01-23T15:57:08.000Z | 2022-03-13T13:38:58.000Z | postgresql/importcsv.py | williamszostak/discogs-xml2db | b637a3944320c32e3d44328a6f00420ffc1f8c17 | [
"Apache-2.0"
] | 82 | 2015-01-06T13:52:40.000Z | 2021-11-16T12:33:34.000Z | postgresql/importcsv.py | williamszostak/discogs-xml2db | b637a3944320c32e3d44328a6f00420ffc1f8c17 | [
"Apache-2.0"
] | 64 | 2015-03-20T22:16:15.000Z | 2021-11-06T17:15:37.000Z | #!/usr/bin/env python
import bz2
import sys
import os
import pathlib
from psycopg2 import sql
from dbconfig import connect_db, Config
# since we run this as a script, we need to add the parent folder
# so we can import discogsxml2db from it
parent_path = str(pathlib.Path(__file__).absolute().parent.parent)
sys.path.... | 27.581395 | 76 | 0.668634 |
01dfb038b664c5762aea2cb78924b0f788b6953b | 1,604 | py | Python | dotviewer/graphpage.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | dotviewer/graphpage.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | dotviewer/graphpage.py | m4sterchain/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | [
"Apache-2.0",
"OpenSSL"
] | 30 | 2018-08-20T03:16:34.000Z | 2022-01-12T17:39:22.000Z |
class GraphPage(object):
"""Base class for the client-side content of one of the 'pages'
(one graph) sent over to and displayed by the external process.
"""
save_tmp_file = None
def __init__(self, *args, **kwds):
self.args = args
self.kwds = kwds
def content(self):
"""... | 30.846154 | 76 | 0.581671 |
a866f3a1f4ffb1458ae2a7368fc215ef629682a1 | 11,405 | py | Python | bikeshed/biblio.py | dontcallmedom/bikeshed | ae3b4eaa941e5ea380931f30ba9a0086026a44aa | [
"CC0-1.0"
] | 2 | 2016-07-21T16:44:51.000Z | 2019-04-29T15:04:51.000Z | bikeshed/biblio.py | dontcallmedom/bikeshed | ae3b4eaa941e5ea380931f30ba9a0086026a44aa | [
"CC0-1.0"
] | null | null | null | bikeshed/biblio.py | dontcallmedom/bikeshed | ae3b4eaa941e5ea380931f30ba9a0086026a44aa | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division, unicode_literals
import re
import copy
from collections import defaultdict, deque
from .messages import *
from .htmlhelpers import *
class BiblioEntry(object):
def __init__(self, preferredURL="dated", **kwargs):
self.linkText = None
self.tit... | 29.24359 | 126 | 0.485401 |
98d2a716f36f69782e6d4ff042dc258619f7a21f | 528 | py | Python | setup.py | marksteve/flask-redisconfig | 2ccbd63d83df3582df574fcfaaaf8804a001a980 | [
"MIT"
] | 1 | 2015-05-16T16:21:00.000Z | 2015-05-16T16:21:00.000Z | setup.py | marksteve/flask-redisconfig | 2ccbd63d83df3582df574fcfaaaf8804a001a980 | [
"MIT"
] | null | null | null | setup.py | marksteve/flask-redisconfig | 2ccbd63d83df3582df574fcfaaaf8804a001a980 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='Flask-RedisConfig',
version='0.2.0',
url='https://github.com/marksteve/flask-redisconfig',
license='MIT',
author='Mark Steve Samson',
author_email='hello@marksteve.com',
description='Redis-backed config for Flask applications',
long_description=... | 24 | 61 | 0.642045 |
c24b4c13939eefb8ab43b963c679dcfe34d2d452 | 1,418 | py | Python | test/test_basic.py | Lukasa/certitude | 33845ae0a6b123f084f10c7dd27f11485dd73ca6 | [
"MIT"
] | 22 | 2015-12-23T22:30:13.000Z | 2019-02-09T02:49:53.000Z | test/test_basic.py | Lukasa/certitude | 33845ae0a6b123f084f10c7dd27f11485dd73ca6 | [
"MIT"
] | 12 | 2015-12-23T22:31:15.000Z | 2020-10-27T21:05:34.000Z | test/test_basic.py | Lukasa/certitude | 33845ae0a6b123f084f10c7dd27f11485dd73ca6 | [
"MIT"
] | 1 | 2016-04-25T13:12:31.000Z | 2016-04-25T13:12:31.000Z | # -*- coding: utf-8 -*-
"""
Test basic Certitude functionality.
"""
import certitude
class TestValidation(object):
def test_basic_validation(self, certifi_chain):
"""
We can safely validate a good certificate chain.
Note that this certificate chain belongs to certifi.io, and will expire
... | 27.803922 | 79 | 0.614245 |
dab5307ea6e7d0223a2af7408f5fbbe88e22cbba | 6,195 | py | Python | backend/lambdas/data_mappers/handlers.py | dkmeena/amazon-s3-find-and-forget | 8af4791e3f7f78373553c21afd680633a973434f | [
"Apache-2.0"
] | 165 | 2020-05-29T08:12:17.000Z | 2022-03-30T22:35:57.000Z | backend/lambdas/data_mappers/handlers.py | dkmeena/amazon-s3-find-and-forget | 8af4791e3f7f78373553c21afd680633a973434f | [
"Apache-2.0"
] | 101 | 2020-06-24T12:59:49.000Z | 2022-03-28T13:32:15.000Z | backend/lambdas/data_mappers/handlers.py | dkmeena/amazon-s3-find-and-forget | 8af4791e3f7f78373553c21afd680633a973434f | [
"Apache-2.0"
] | 23 | 2020-06-18T10:53:49.000Z | 2022-03-29T03:38:04.000Z | """
DataMapper handlers
"""
import json
import os
import boto3
from boto_utils import DecimalEncoder, get_user_info, running_job_exists
from decorators import (
with_logging,
request_validator,
catch_errors,
add_cors_headers,
json_body_loader,
load_schema,
)
dynamodb_resource = boto3.resource... | 34.226519 | 110 | 0.664407 |
fdc79055badbe970b76b4d7981f049bd071e0f4f | 1,076 | py | Python | Chapter13_code/ch13_r03_consume_parameters_passed_to_your_handlers/models/ir_http.py | PacktPublishing/Odoo-Development-Cookbook | 5553110c0bc352c4541f11904e236cad3c443b8b | [
"MIT"
] | 55 | 2016-05-23T16:05:50.000Z | 2021-07-19T00:16:46.000Z | Chapter13_code/ch13_r03_consume_parameters_passed_to_your_handlers/models/ir_http.py | kogkog098/Odoo-Development-Cookbook | 166c9b98efbc9108b30d719213689afb1f1c294d | [
"MIT"
] | 1 | 2016-12-09T02:14:21.000Z | 2018-07-02T09:02:20.000Z | Chapter13_code/ch13_r03_consume_parameters_passed_to_your_handlers/models/ir_http.py | kogkog098/Odoo-Development-Cookbook | 166c9b98efbc9108b30d719213689afb1f1c294d | [
"MIT"
] | 52 | 2016-06-01T20:03:59.000Z | 2020-10-31T23:58:25.000Z | # -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import werkzeug
from openerp import api, fields, models
from openerp.http import request
class ModelNameSearchConverter(werkzeug.routing.BaseConverter):
def __init__(self, url_map, mode... | 31.647059 | 75 | 0.637546 |
3ef3370df30f81c9d08582bdea08934321bb429c | 328 | py | Python | project_root/restaurant/migrations/0005_auto_20190807_1217.py | saharisrael31/marketing-service-api | 1fb6c016c2bf65134bf43da5b245a78bbcdc5294 | [
"bzip2-1.0.6"
] | null | null | null | project_root/restaurant/migrations/0005_auto_20190807_1217.py | saharisrael31/marketing-service-api | 1fb6c016c2bf65134bf43da5b245a78bbcdc5294 | [
"bzip2-1.0.6"
] | null | null | null | project_root/restaurant/migrations/0005_auto_20190807_1217.py | saharisrael31/marketing-service-api | 1fb6c016c2bf65134bf43da5b245a78bbcdc5294 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-07 09:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('restaurant', '0004_auto_20190807_1150'),
]
operations = [
migrations.RenameModel(
old_name='Tags',
new_name='Tag',
)... | 18.222222 | 50 | 0.591463 |
2d3959561386c83bd4dc0435e18dae998a447d8e | 687 | py | Python | cameo/clipboardtool.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | cameo/clipboardtool.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | cameo/clipboardtool.py | muchu1983/104_cameo | 8c7f78de198a5bd8d870589402e3b7e8b59f520a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license
<https://opensource.org/licenses/BSD-3-Clause>
"""
import win32clipboard as cb
import win32con
#剪貼簿存取
class ClipboardTool:
#將 unicode 字串放入剪貼簿
def setUnicodeText(self, s... | 25.444444 | 64 | 0.663755 |
8fd5e84b8774f1886548c4691d00c843b1c45008 | 1,384 | py | Python | venv/Lib/site-packages/plotnine/themes/theme_linedraw.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/plotnine/themes/theme_linedraw.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/plotnine/themes/theme_linedraw.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | null | null | null | from .elements import element_line, element_rect, element_text, element_blank
from .theme import theme
from .theme_gray import theme_gray
class theme_linedraw(theme_gray):
"""
A theme with only black lines of various widths on white backgrounds
Parameters
----------
base_size : int, optional
... | 39.542857 | 77 | 0.651734 |
3524ba851a7d5c87d4c4f73fa78da2b9553042f0 | 5,202 | py | Python | sportsreference/fb/fb_utils.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | sportsreference/fb/fb_utils.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | sportsreference/fb/fb_utils.py | atklaus/sportsreference | 22a45ea83ce1608c3176f00d4f414d5b9463605c | [
"MIT"
] | null | null | null | from difflib import get_close_matches
from .squad_ids import SQUAD_IDS
def _parse_squad_name(team_id):
"""
Parse and clean the team's name.
To try and match requested team names with the master squad ID list, passed
names should be parsed to remove the common 'FC' and 'CF' tags, as well as
force ... | 40.015385 | 79 | 0.681276 |
933bd705f6fc7001439d3f5d097cad74587129e2 | 5,218 | py | Python | tensorflow/python/training/adagrad.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/adagrad.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/adagrad.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"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... | 39.233083 | 81 | 0.680529 |
a71cea7a5428d5408679f83023bba2cb3e153756 | 8,730 | py | Python | check_project.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 3 | 2021-06-16T22:36:03.000Z | 2022-02-11T11:13:14.000Z | check_project.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 6 | 2021-06-23T15:10:10.000Z | 2022-03-09T08:36:55.000Z | check_project.py | sw360/sw360python | bb0a249561016fb8637c3a8fdf0b1d00ecfbf345 | [
"MIT"
] | 1 | 2022-03-07T06:57:52.000Z | 2022-03-07T06:57:52.000Z | # -------------------------------------------------------------------------------
# (c) 2019-2020 Siemens AG
# All Rights Reserved.
# Author: thomas.graf@siemens.com
#
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# -------------------------------------------------------------------------------
"""
... | 33.968872 | 96 | 0.541466 |
347cafdb78021568e092a461aa66ae3368629afb | 348 | py | Python | neobank/users/urls.py | ovallesgustavo/neobank | dcb9df023d10d8bfc0930976af1f245eb9b58c7b | [
"MIT"
] | null | null | null | neobank/users/urls.py | ovallesgustavo/neobank | dcb9df023d10d8bfc0930976af1f245eb9b58c7b | [
"MIT"
] | null | null | null | neobank/users/urls.py | ovallesgustavo/neobank | dcb9df023d10d8bfc0930976af1f245eb9b58c7b | [
"MIT"
] | null | null | null | from django.urls import path
from neobank.users.views import user_detail_view, user_redirect_view, user_update_view
app_name = "users"
urlpatterns = [
path("~redirect/", view=user_redirect_view, name="redirect"),
path("~update/", view=user_update_view, name="update"),
path("<str:username>/", view=user_det... | 31.636364 | 86 | 0.735632 |
9207e015bb44ac3e3f5156082b8ce61c4bf2055b | 945 | py | Python | sudoku_solver/contrib/sites/migrations/0002_set_site_domain_and_name.py | d3prof3t/django_sudoku_solver | 275c7ed358a93d55f52e29723c43df54c11b554e | [
"BSD-3-Clause"
] | null | null | null | sudoku_solver/contrib/sites/migrations/0002_set_site_domain_and_name.py | d3prof3t/django_sudoku_solver | 275c7ed358a93d55f52e29723c43df54c11b554e | [
"BSD-3-Clause"
] | null | null | null | sudoku_solver/contrib/sites/migrations/0002_set_site_domain_and_name.py | d3prof3t/django_sudoku_solver | 275c7ed358a93d55f52e29723c43df54c11b554e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings.SITE_ID... | 23.04878 | 72 | 0.614815 |
55dc1d6087096752f6f2b78432a1258e6b8c530a | 1,939 | py | Python | authors/apps/articles/tests/test_social_share.py | SilasKenneth/ah-technocrats | c199e6dd432bdb4a5e1152f90cb1716b09af2c4e | [
"BSD-3-Clause"
] | 1 | 2018-12-04T15:29:57.000Z | 2018-12-04T15:29:57.000Z | authors/apps/articles/tests/test_social_share.py | SilasKenneth/ah-technocrats | c199e6dd432bdb4a5e1152f90cb1716b09af2c4e | [
"BSD-3-Clause"
] | 52 | 2018-11-27T08:00:25.000Z | 2021-06-10T20:58:16.000Z | authors/apps/articles/tests/test_social_share.py | SilasKenneth/ah-technocrats | c199e6dd432bdb4a5e1152f90cb1716b09af2c4e | [
"BSD-3-Clause"
] | 4 | 2019-07-15T10:24:22.000Z | 2020-02-04T19:15:12.000Z | from django.urls import reverse
from authors.apps.authentication.models import User
from .base_test import BaseTestCase
from rest_framework import status
class TestSocialSharingArticles(BaseTestCase):
def test_get_fb_share_link(self):
share_to_facebook, token = self.get_share_endpoint('facebook')
r... | 47.292683 | 99 | 0.728726 |
e6f96913332720a17b5070cdcbfb54d8f8a4b659 | 4,647 | py | Python | Config.py | shenlong95/SSL-NAG | c8ce6cbb2cca3ccd24649d78fe653b786eb524a8 | [
"MIT"
] | 1 | 2021-08-09T10:32:22.000Z | 2021-08-09T10:32:22.000Z | Config.py | shenlong95/SSL-NAG | c8ce6cbb2cca3ccd24649d78fe653b786eb524a8 | [
"MIT"
] | null | null | null | Config.py | shenlong95/SSL-NAG | c8ce6cbb2cca3ccd24649d78fe653b786eb524a8 | [
"MIT"
] | 2 | 2020-08-25T00:57:48.000Z | 2021-07-29T02:57:01.000Z | import re
import argparse
__all__ = ['parse_cmd_args', 'parse_dict_args']
def create_parser():
parser = argparse.ArgumentParser(description='PyTorch ImageNet Training')
# Technical details
parser.add_argument('-j', '--workers', default=4, type=int, metavar='N',
help='n... | 44.682692 | 123 | 0.560362 |
9c28050429b1d3c4949de38e57c3f2be413a46ab | 264 | py | Python | examples/spot/stream/isolated_margin/new_isolated_margin_listen_key.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 512 | 2021-06-15T08:52:44.000Z | 2022-03-31T09:49:53.000Z | examples/spot/stream/isolated_margin/new_isolated_margin_listen_key.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 75 | 2021-06-20T13:49:50.000Z | 2022-03-30T02:45:31.000Z | examples/spot/stream/isolated_margin/new_isolated_margin_listen_key.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 156 | 2021-06-18T11:56:36.000Z | 2022-03-29T16:34:22.000Z | #!/usr/bin/env python
import logging
from binance.spot import Spot as Client
from binance.lib.utils import config_logging
config_logging(logging, logging.DEBUG)
key = ""
client = Client(key)
logging.info(client.new_isolated_margin_listen_key(symbol="BTCUSDT"))
| 22 | 69 | 0.799242 |
f5e8578ce0e567e41bfef6c64729d22705952827 | 1,721 | py | Python | data_preparation/main.py | Iddoyadlin/hebrew-w2v | c887d3dd3bc427289f1c07a4e71c1672604db92b | [
"Apache-2.0"
] | 7 | 2022-03-21T17:46:55.000Z | 2022-03-26T19:46:42.000Z | data_preparation/main.py | Iddoyadlin/hebrew-w2v | c887d3dd3bc427289f1c07a4e71c1672604db92b | [
"Apache-2.0"
] | 1 | 2022-03-22T13:44:59.000Z | 2022-03-22T14:13:32.000Z | data_preparation/main.py | Iddoyadlin/hebrew-w2v | c887d3dd3bc427289f1c07a4e71c1672604db92b | [
"Apache-2.0"
] | null | null | null | from base import get_absolute_path
from create_corpus import download_corpus, corpus_to_text
import split_corpus
from postprocess_hebpipe import process_files
from tokenize_hebpipe import run_hebpipe_command
config = {
"WIKIFILE": "hewiki-latest-pages-articles.xml.bz2",
"CORPUS_OUTPUT": get_absolute_path("wiki... | 43.025 | 110 | 0.687391 |
f61a8b8155bf7d2e89d88b68401c70d9bef70b3a | 1,340 | py | Python | terraform/terraform.py | Ersandeep977/Arth-2.0-Python-Menu-project | 1f317e7d70bdabe04442f0ea2b7e1b318cb4ac59 | [
"Apache-2.0"
] | null | null | null | terraform/terraform.py | Ersandeep977/Arth-2.0-Python-Menu-project | 1f317e7d70bdabe04442f0ea2b7e1b318cb4ac59 | [
"Apache-2.0"
] | null | null | null | terraform/terraform.py | Ersandeep977/Arth-2.0-Python-Menu-project | 1f317e7d70bdabe04442f0ea2b7e1b318cb4ac59 | [
"Apache-2.0"
] | null | null | null | import os
import time
print("...."*80)
print("hello....WELCOME TO 'terraform WORLD'...by SANDEEP KUMAR Patel..")
print("...."*80)
while True:
print('''
Enter "yes" for run terraform command
or
Enter "No" for exit terraform
''')
ch = input('Enter your choice "yes/no" :- ')
if ch == 'yes':
... | 28.510638 | 94 | 0.500746 |
64f608df3bbc60bf25e2597d7c43e045c1b9da0c | 9,293 | py | Python | PyFlow/__init__.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | PyFlow/__init__.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | null | null | null | PyFlow/__init__.py | QuentinTournier40/AnimationFreeCAD | 8eaff8356ec68b948a721b83a6888b652278db8a | [
"Apache-2.0"
] | 1 | 2022-02-03T08:03:30.000Z | 2022-02-03T08:03:30.000Z | ## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera
## 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... | 36.876984 | 115 | 0.660605 |
0d09137eaa0f2bd55bfda14761e85ae5146d4642 | 3,493 | py | Python | deepchem/molnet/load_function/qm9_datasets.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 3 | 2017-10-07T13:48:48.000Z | 2021-06-13T09:09:03.000Z | deepchem/molnet/load_function/qm9_datasets.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 1 | 2017-08-29T22:08:24.000Z | 2017-08-29T22:08:24.000Z | deepchem/molnet/load_function/qm9_datasets.py | rbharath/deepchem | 8c3bcdd557abdbb380b64c2d460a73aff76fb303 | [
"MIT"
] | 5 | 2017-03-19T01:48:13.000Z | 2019-02-22T01:12:03.000Z | """
qm9 dataset loader.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import deepchem
def load_qm9(featurizer='CoulombMatrix', split='random', reload=True):
"""Load qm9 datasets."""
# Featurize qm9 dataset
print("About ... | 34.584158 | 89 | 0.65846 |
478a8d8800d49d7dcfd43b464684c7df83569538 | 565 | py | Python | tests/test_pymd_helper.py | tbnorth/pymd_helper | 088583bc08e71056387fdcba3c2cbeb37b7b336e | [
"MIT"
] | null | null | null | tests/test_pymd_helper.py | tbnorth/pymd_helper | 088583bc08e71056387fdcba3c2cbeb37b7b336e | [
"MIT"
] | null | null | null | tests/test_pymd_helper.py | tbnorth/pymd_helper | 088583bc08e71056387fdcba3c2cbeb37b7b336e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests for `pymd_helper` package."""
import pytest
from pymd_helper import pymd_helper
@pytest.fixture
def response():
"""Sample pytest fixture.
See more at: http://doc.pytest.org/en/latest/fixture.html
"""
# import requests
# return requests.get('https://github.com/au... | 22.6 | 78 | 0.713274 |
881c0d0c5b0205a6f68d642f89fce61fe1c000d3 | 207 | py | Python | mposp_root/wordcount/urls.py | hanshendrickx/gitDP002 | 9703791a2270495830142917a7b12ba1eb2ca3f5 | [
"CC0-1.0"
] | null | null | null | mposp_root/wordcount/urls.py | hanshendrickx/gitDP002 | 9703791a2270495830142917a7b12ba1eb2ca3f5 | [
"CC0-1.0"
] | null | null | null | mposp_root/wordcount/urls.py | hanshendrickx/gitDP002 | 9703791a2270495830142917a7b12ba1eb2ca3f5 | [
"CC0-1.0"
] | null | null | null |
from django.urls import path
from . import views
urlpatterns = [
path('', views.homepage, name='home'),
path('count/', views.count, name='count'),
path('about/', views.about, name='about'),
]
| 18.818182 | 46 | 0.63285 |
8f9f6448f0f3e948b6ca1d1b6676bb77fe9d5ae7 | 283 | py | Python | simple_3dviz/io/utils.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 66 | 2020-03-31T14:33:20.000Z | 2022-03-25T15:48:06.000Z | simple_3dviz/io/utils.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 6 | 2020-04-05T18:20:10.000Z | 2021-12-17T19:54:54.000Z | simple_3dviz/io/utils.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 9 | 2020-04-03T14:31:28.000Z | 2022-03-15T19:16:41.000Z | def _get_file(filename, mode="r"):
if isinstance(filename, str):
return open(filename, mode)
return filename
def _close_file(filename, f):
"""Close the file if filename is a string."""
if hasattr(f, "close") and isinstance(filename, str):
f.close()
| 25.727273 | 57 | 0.646643 |
7c0ce5726ecb942e126237485c03180b8e3f7b26 | 585 | py | Python | src/cltk/phonology/enm/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 757 | 2015-11-20T00:58:52.000Z | 2022-03-31T06:34:24.000Z | src/cltk/phonology/enm/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 950 | 2015-11-17T05:38:29.000Z | 2022-03-14T16:09:34.000Z | src/cltk/phonology/enm/phonology.py | yelircaasi/cltk | 1583aa24682543a1f33434a21918f039ca27d60c | [
"MIT"
] | 482 | 2015-11-22T18:13:02.000Z | 2022-03-20T21:22:02.000Z | """Middle English phonology tools
"""
from typing import List
from cltk.phonology.syllabify import Syllabifier
__author__ = ["Clément Besnier <clem@clementbesnier.fr>"]
class MiddleEnglishSyllabifier:
"""
Middle English syllabifier
"""
def __init__(self):
self.syllabifier = Syllabifier(lang... | 22.5 | 57 | 0.68547 |
3b2f848b62343d06f2496cf37e4adcdd65b261e5 | 3,834 | py | Python | PyForge/FolderTree.py | sgthakare20/Pyforge | e3ce15586ccc07f39e0faf18885b472baa60ff5d | [
"MIT"
] | 1 | 2020-04-13T13:02:43.000Z | 2020-04-13T13:02:43.000Z | PyForge/FolderTree.py | sgthakare20/Pyforge | e3ce15586ccc07f39e0faf18885b472baa60ff5d | [
"MIT"
] | null | null | null | PyForge/FolderTree.py | sgthakare20/Pyforge | e3ce15586ccc07f39e0faf18885b472baa60ff5d | [
"MIT"
] | 2 | 2021-06-22T14:39:53.000Z | 2021-06-22T15:28:21.000Z | # -*- coding: utf-8 -*-
"""Module containing classes to implementing and navigating data structures from Autodesk Forge BIM360 platform."""
from PyForge.ForgeFolders import FoldersApi
class FolderTree():
"""This class sets up a simple folder tree with children and parent folders linked to the BIM360 API."""
... | 35.174312 | 140 | 0.632499 |
2f9eb89b67bbeedc992b6d393f494d616767af45 | 1,790 | py | Python | novaclient/v1_1/fping.py | CiscoSystems/python-novaclient | df8db07495984c6158e4c1e1d218c10594439c5e | [
"Apache-1.1"
] | null | null | null | novaclient/v1_1/fping.py | CiscoSystems/python-novaclient | df8db07495984c6158e4c1e1d218c10594439c5e | [
"Apache-1.1"
] | null | null | null | novaclient/v1_1/fping.py | CiscoSystems/python-novaclient | df8db07495984c6158e4c1e1d218c10594439c5e | [
"Apache-1.1"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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/... | 26.716418 | 78 | 0.603352 |
74fb25fb5d5b051dd38c0964cb494ea2efaa1e5c | 2,046 | py | Python | geekcomputers/ping_subnet.py | enyaooshigaolo/MyPython | 67dc3f6ff596545ab70e11a573a6031232128711 | [
"Apache-2.0"
] | 12 | 2018-05-11T22:35:32.000Z | 2021-04-07T13:44:51.000Z | ping_subnet.py | rajasree-r/Python | 3d4ee06249cf5697c72bae4e2732e814dde97dec | [
"MIT"
] | 1 | 2018-11-15T01:54:25.000Z | 2018-11-15T01:54:25.000Z | ping_subnet.py | rajasree-r/Python | 3d4ee06249cf5697c72bae4e2732e814dde97dec | [
"MIT"
] | 3 | 2020-04-19T19:39:34.000Z | 2022-03-18T19:21:16.000Z | # Script Name : ping_subnet.py
# Author : Craig Richards
# Created : 12th January 2012
# Last Modified :
# Version : 1.0
# Modifications :
# Description : After supplying the first 3 octets it will scan the final range for available addresses
import os # Load the Library Module
import subprocess ... | 49.902439 | 140 | 0.57087 |
66dd4d47e5284c2ca3afd1a7fc97ab195c4ca668 | 2,182 | py | Python | pydesktime/desktime.py | utek/pydesktime | 69563b66034920fb1f7f6c16f2ddaee82c92f5d0 | [
"MIT"
] | null | null | null | pydesktime/desktime.py | utek/pydesktime | 69563b66034920fb1f7f6c16f2ddaee82c92f5d0 | [
"MIT"
] | null | null | null | pydesktime/desktime.py | utek/pydesktime | 69563b66034920fb1f7f6c16f2ddaee82c92f5d0 | [
"MIT"
] | null | null | null | import requests
import datetime
import calendar
class DeskTime(object):
MAIN_URL = 'https://desktime.com/api/2/json/?{params}'
def __init__(self, app_key, username, password):
self.api_key = self._login(app_key, username, password)
if self.api_key is None:
raise Excepti... | 37.62069 | 87 | 0.57516 |
3c22c66a79ea06a0ff9d8b5a4e2777efa04935d4 | 2,894 | py | Python | pyxplr/explore_missing.py | UBC-MDS/pyxplr | 7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8 | [
"MIT"
] | 1 | 2020-02-25T23:47:18.000Z | 2020-02-25T23:47:18.000Z | pyxplr/explore_missing.py | UBC-MDS/pyxplr | 7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8 | [
"MIT"
] | 46 | 2020-02-25T23:43:52.000Z | 2020-03-27T01:24:24.000Z | pyxplr/explore_missing.py | UBC-MDS/pyxplr | 7e0d94316bce7b3ed343a6a6b5c3afce5c71afd8 | [
"MIT"
] | null | null | null | """
Created on February 28, 2020
@author: Braden Tam
Implementation of the explore_missing function in the pyxplr package.
"""
import pandas as pd
import numpy as np
def explore_missing(df, num_rows=0, df_type="location"):
"""
explore_missing will identify missing observations within df. It will
return 1 ... | 31.802198 | 75 | 0.62405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.