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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b23570c217e3063a89eec461f7ca7f7b3d5f7a30 | 651 | py | Python | venv/bin/rst2html.py | waynshang/python_debug_module | c8e0d24b675e849757709ae41ecee6772af40dea | [
"MIT"
] | null | null | null | venv/bin/rst2html.py | waynshang/python_debug_module | c8e0d24b675e849757709ae41ecee6772af40dea | [
"MIT"
] | null | null | null | venv/bin/rst2html.py | waynshang/python_debug_module | c8e0d24b675e849757709ae41ecee6772af40dea | [
"MIT"
] | null | null | null | #!/Users/wayneshang/Documents/project/python_debug_package/venv/bin/python3
# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML.
"""
try:
... | 27.125 | 78 | 0.74808 |
411bd4a1843d85b30c25685310378c045469adc3 | 4,463 | py | Python | sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleList.py | Carlangueitor/pulumi-kubernetes | 859ccaaeb8291de49128dbc202fbac1358b2a25a | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleList.py | Carlangueitor/pulumi-kubernetes | 859ccaaeb8291de49128dbc202fbac1358b2a25a | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/rbac/v1beta1/ClusterRoleList.py | Carlangueitor/pulumi-kubernetes | 859ccaaeb8291de49128dbc202fbac1358b2a25a | [
"Apache-2.0"
] | null | null | null | # *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
from typing import Optional
import pulumi
import pulumi.runtime
from pulumi import Input, ResourceOptions
from ... import tables, version
... | 40.572727 | 107 | 0.678467 |
ee372692d5de0fc8fee12e13ff17ff697f5b3a41 | 5,063 | py | Python | docs/source/conf.py | keleustes/oslc-operator | 3a61657da5718eb9804528ffb2a1c72b5f6333a0 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | keleustes/oslc-operator | 3a61657da5718eb9804528ffb2a1c72b5f6333a0 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | keleustes/oslc-operator | 3a61657da5718eb9804528ffb2a1c72b5f6333a0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# shipyard documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 16 03:40:50 2017.
#
# 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
# autogenerated file.
#
# ... | 30.317365 | 81 | 0.691092 |
533af34802bddbc6df5469dd53a4599d446a83c5 | 38,002 | py | Python | model.py | JaywongWang/DenseVideoCaptioning | db31ca2b597840494eee31547d3bf3215a995846 | [
"MIT"
] | 150 | 2018-10-06T15:51:30.000Z | 2022-03-22T08:23:24.000Z | model.py | xiaoxinlong/DenseVideoCaptioning | 27f315da7c90f6bb6d7a3fc8038159f7a54ec5bb | [
"MIT"
] | 38 | 2018-10-08T07:19:59.000Z | 2021-05-06T21:13:43.000Z | model.py | xiaoxinlong/DenseVideoCaptioning | 27f315da7c90f6bb6d7a3fc8038159f7a54ec5bb | [
"MIT"
] | 54 | 2018-10-22T07:33:37.000Z | 2022-03-23T04:56:25.000Z | """
Model definition
Implementation of dense captioning model in the paper "Bidirectional Attentive Fusion with Context Gating for Dense Video Captioning" by Jingwen Wang et al. in CVPR, 2018.
The code looks complicated since we need to handle some "dynamic" part of the graph
"""
import tensorflow as tf
class... | 52.780556 | 264 | 0.607179 |
36052f7bae909c400475eafd4049bfc9620955c6 | 4,546 | py | Python | scripts/stats/cluster/get_articles_bow_stats.py | foobar999/Wikipedia-Cluster-Analysis | 4dc8166fb01f9b3ab6d7557de331cfc95298ff0c | [
"MIT"
] | null | null | null | scripts/stats/cluster/get_articles_bow_stats.py | foobar999/Wikipedia-Cluster-Analysis | 4dc8166fb01f9b3ab6d7557de331cfc95298ff0c | [
"MIT"
] | null | null | null | scripts/stats/cluster/get_articles_bow_stats.py | foobar999/Wikipedia-Cluster-Analysis | 4dc8166fb01f9b3ab6d7557de331cfc95298ff0c | [
"MIT"
] | null | null | null | import argparse
from pprint import pformat
from gensim.corpora import Dictionary, MmCorpus
from gensim.parsing.preprocessing import STOPWORDS
from scripts.cluster.articles_to_bow import get_filtered_articles_data_from_path
from scripts.utils.utils import init_logger, read_lines
from scripts.utils.documents import is_ma... | 59.815789 | 251 | 0.75143 |
e6077fe9f935bc04c3461860d9b8137d8b019bc5 | 1,522 | py | Python | simdeblur/model/backbone/edvr/dcn/setup.py | ljzycmd/SimDeblur | dd2f60c41176b75c4eaf80d740f547c206aa8227 | [
"MIT"
] | 190 | 2021-03-22T13:59:42.000Z | 2022-03-08T21:14:41.000Z | simdeblur/model/backbone/edvr/dcn/setup.py | Wang-jiahao/SimDeblur | 31d88e1fbec91d5cc9062f4a46538e4ba806ab29 | [
"MIT"
] | 9 | 2021-04-26T06:44:40.000Z | 2022-03-25T07:48:30.000Z | simdeblur/model/backbone/edvr/dcn/setup.py | Wang-jiahao/SimDeblur | 31d88e1fbec91d5cc9062f4a46538e4ba806ab29 | [
"MIT"
] | 27 | 2021-03-23T03:11:00.000Z | 2022-03-19T21:26:02.000Z | #!/usr/bin/env python
from setuptools import find_packages, setup
import os
import subprocess
import sys
import time
import torch
from torch.utils.cpp_extension import (BuildExtension, CppExtension,
CUDAExtension)
def make_cuda_ext(name, sources, sources_cuda=None):
if sou... | 26.241379 | 72 | 0.600526 |
5b65e47822199e2562c1c3b764af577d65003994 | 15,649 | py | Python | tf2rl/algos/dqn.py | Chenaah/RAMCO | 746424c14b697e2944dde2ba7aae230f60016001 | [
"MIT"
] | 1 | 2020-10-12T23:44:04.000Z | 2020-10-12T23:44:04.000Z | tf2rl/algos/dqn.py | Utschie/tf2rl | cd8b25a8fdccaa581afebc659cee5d2f509cf1f5 | [
"MIT"
] | null | null | null | tf2rl/algos/dqn.py | Utschie/tf2rl | cd8b25a8fdccaa581afebc659cee5d2f509cf1f5 | [
"MIT"
] | 1 | 2022-02-25T08:02:23.000Z | 2022-02-25T08:02:23.000Z | import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import Dense
from tf2rl.algos.policy_base import OffPolicyAgent
from tf2rl.networks.noisy_dense import NoisyDense
from tf2rl.envs.atari_wrapper import LazyFrames
from tf2rl.misc.target_update_ops import update_target_variables
from tf2rl.misc.hube... | 43.590529 | 107 | 0.57026 |
18ec92d318b53fba68ee3216e0f5fc73ea3e89f5 | 1,694 | py | Python | cls_pdb_atom_pair_distance.py | naotohori/cafysis | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | 2 | 2022-02-25T17:32:41.000Z | 2022-03-31T14:38:55.000Z | cls_pdb_atom_pair_distance.py | naotohori/cafysis | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | 2 | 2020-05-03T08:36:10.000Z | 2021-01-27T12:40:50.000Z | cls_pdb_atom_pair_distance.py | naotohori/life-of-py | 9d8534121c01ea75ae965cf39a1e307052ff8523 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
from file_pdb import PdbFile
if len(sys.argv) != 5 :
print ('\n Usage: SCRIPT [list file] [input PDB1] [input PDB2] [output]\n')
sys.exit(2)
f_list = open(sys.argv[1],'r')
f_pdb = PdbFile(sys.argv[2])
f_pdb.open_to_read()
chains1 = f_pdb.read_all()
f_pdb.close
f_pdb = P... | 26.888889 | 107 | 0.569067 |
a3308e66598a352844d9f4c82794cfa6c353574a | 5,456 | py | Python | setup.py | cmeyer/nionui-tool | 78d699308abda509d19da4b4be8365f6d55513b0 | [
"Apache-2.0"
] | null | null | null | setup.py | cmeyer/nionui-tool | 78d699308abda509d19da4b4be8365f6d55513b0 | [
"Apache-2.0"
] | null | null | null | setup.py | cmeyer/nionui-tool | 78d699308abda509d19da4b4be8365f6d55513b0 | [
"Apache-2.0"
] | null | null | null | import os
import pathlib
import setuptools
import sys
tool_id = "nionui"
version = "0.4.7"
launcher = "NionUILauncher"
def package_files(directory, prefix, prefix_drop):
# note: Windows setup does not work with Path
prefixes = dict()
for (path, directories, filenames) in os.walk(directory):
for f... | 33.679012 | 133 | 0.648644 |
bbc483ced6ed16060a6581162c75420459d4e6f0 | 5,633 | py | Python | src/claimtrie/libclaimtrie_test.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | 1 | 2020-03-30T14:27:31.000Z | 2020-03-30T14:27:31.000Z | src/claimtrie/libclaimtrie_test.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | null | null | null | src/claimtrie/libclaimtrie_test.py | FihlaTV/lbrycrd | c54af21ce2758490ae3f8340c73cf0f2401801cc | [
"MIT"
] | null | null | null |
from libclaimtrie import *
import unittest
class CacheIterateCallback(CIterateCallback):
def __init__(self, names):
CIterateCallback.__init__(self)
self.names = names
def apply(self, name):
assert(name in self.names), "Incorrect trie names"
class TestClaimTrieTypes(unittest.TestCase)... | 51.678899 | 165 | 0.690396 |
9c93eb9a7c7e794d6818a4dc8e3cda0709235706 | 16,094 | py | Python | tests/components/honeywell/test_climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-01-21T18:09:09.000Z | 2022-01-17T08:06:03.000Z | tests/components/honeywell/test_climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | tests/components/honeywell/test_climate.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """The test the Honeywell thermostat module."""
import unittest
from unittest import mock
import voluptuous as vol
import requests.exceptions
import somecomfort
import pytest
from homeassistant.const import (
CONF_USERNAME,
CONF_PASSWORD,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
)
from homeassistant.components.... | 37.168591 | 88 | 0.627315 |
4fa6b14fb28e16d7a94d28fde77a13af788ca8f1 | 404 | py | Python | tests/test_config/test_prep.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 26 | 2019-03-04T20:08:57.000Z | 2022-01-22T13:40:00.000Z | tests/test_config/test_prep.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 379 | 2019-03-03T12:16:05.000Z | 2022-03-29T13:44:46.000Z | tests/test_config/test_prep.py | jspaaks/vak | 581ec4869d342e5d52bc057de54c10901f06d343 | [
"BSD-3-Clause"
] | 12 | 2019-11-22T21:19:19.000Z | 2022-03-14T17:44:59.000Z | """tests for vak.config.prep module"""
import vak.config.prep
def test_parse_prep_config_returns_PrepConfig_instance(
all_generated_configs_toml_path_pairs,
):
for config_toml, toml_path in all_generated_configs_toml_path_pairs:
prep_section = config_toml["PREP"]
config = vak.config.prep.PrepC... | 33.666667 | 72 | 0.769802 |
c9f5e2236d8b8d17954946a3912b5e07c6081bac | 5,891 | py | Python | contrib/seeds/makeseeds.py | minblock/Bindcoin | 6b36875dcddd81aa2d0641d33bda74902ec8f694 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | minblock/Bindcoin | 6b36875dcddd81aa2d0641d33bda74902ec8f694 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | minblock/Bindcoin | 6b36875dcddd81aa2d0641d33bda74902ec8f694 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
import re
import sys
import dns.resolver
import collect... | 34.052023 | 258 | 0.57817 |
7ac29181c2f59380e240903a896d5c9e82fd1857 | 593 | py | Python | frontend/debug.py | Hanabiraa/Boolean-function-interpreter | 6704cff478cafe8f7e659e18ce988b2cf4358ccb | [
"MIT"
] | 1 | 2021-10-23T00:31:09.000Z | 2021-10-23T00:31:09.000Z | frontend/debug.py | Hanabiraa/Boolean-function-interpreter | 6704cff478cafe8f7e659e18ce988b2cf4358ccb | [
"MIT"
] | null | null | null | frontend/debug.py | Hanabiraa/Boolean-function-interpreter | 6704cff478cafe8f7e659e18ce988b2cf4358ccb | [
"MIT"
] | null | null | null | def debug_func(raw_expr=None, word_tokens=None,
semantic_tokens_lst=None, object_tokens_lst=None):
"""
output all variables, which used for create AST
:param raw_expr: str
:param word_tokens: [[str]]
:param semantic_tokens_list: [[str]]
:param object_tokens: [[TokenType]]
:re... | 34.882353 | 65 | 0.623946 |
85b9dcde44b201501e3d20be34b51984b86d13c5 | 22,777 | py | Python | api/tools/icd/idcardocr.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null | api/tools/icd/idcardocr.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null | api/tools/icd/idcardocr.py | kiddestiny/Darks | 4727004a0e42728ded9bed015b37990a2f34a782 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PIL import Image
import pytesseract
import cv2
import numpy as np
import re
from multiprocessing import Pool, Queue, Lock, Process, freeze_support
import time
#pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'
x = 1280.00 / 3840.00
pixel_x = in... | 42.733583 | 133 | 0.606533 |
c71a90f803db185bae38173155ac33924f09c686 | 1,573 | py | Python | util/buildtoc.py | cezarlz/diveintohtml5 | 2ef63a18cfbc88aa50bc13151b0ee7d6c56268a0 | [
"CC-BY-2.0",
"CC-BY-3.0",
"Apache-2.0"
] | 80 | 2015-01-05T23:35:37.000Z | 2021-02-05T23:55:12.000Z | util/buildtoc.py | sigy/diveintohtml5 | e89af9137ffbd91ad897e99cb2a8f9e1c4dfbdda | [
"CC-BY-2.0",
"CC-BY-3.0",
"Apache-2.0"
] | 3 | 2015-01-05T23:38:07.000Z | 2018-02-23T17:21:07.000Z | util/buildtoc.py | sigy/diveintohtml5 | e89af9137ffbd91ad897e99cb2a8f9e1c4dfbdda | [
"CC-BY-2.0",
"CC-BY-3.0",
"Apache-2.0"
] | 44 | 2015-01-01T21:56:14.000Z | 2019-07-27T15:13:22.000Z | #!/usr/bin/python3
import re
import roman
# get list of chapters
chapters = []
for line in open('index.html'):
if not line.count('<li') or not line.count('<a href'): continue
chapters.append(line.split('<a href=', 1)[1].split('>', 1)[0])
sections = {}
for filename in chapters:
chapter_id = filename.split... | 39.325 | 169 | 0.590591 |
032f6865856fc5c22e277c9cc7dcdf3da71825d0 | 523 | py | Python | codesamples/managers.py | akondasif/Clone-test-repo | 8a6fc17dc904015db76d4fe81965765466adfc55 | [
"Apache-2.0"
] | null | null | null | codesamples/managers.py | akondasif/Clone-test-repo | 8a6fc17dc904015db76d4fe81965765466adfc55 | [
"Apache-2.0"
] | 1 | 2019-03-28T22:12:58.000Z | 2019-03-28T22:12:58.000Z | codesamples/managers.py | akondasif/Clone-test-repo | 8a6fc17dc904015db76d4fe81965765466adfc55 | [
"Apache-2.0"
] | 1 | 2019-04-03T20:26:54.000Z | 2019-04-03T20:26:54.000Z | from django.db.models import Manager
from django.db.models.query import QuerySet
class CodeSampleQuerySet(QuerySet):
def draft(self):
return self.filter(is_published=False)
def published(self):
return self.filter(is_published=True)
class CodeSampleManager(Manager):
def get_queryset(self... | 23.772727 | 61 | 0.709369 |
faccb25850836b9f05de2215d8b37bc66df4ee6c | 854 | py | Python | open-hackathon-client/src/client/views/route_template.py | chensong2000/open-hackathon | e2d162995fc4b55ea96b21e4c3cb0c8388cdc25f | [
"MIT"
] | null | null | null | open-hackathon-client/src/client/views/route_template.py | chensong2000/open-hackathon | e2d162995fc4b55ea96b21e4c3cb0c8388cdc25f | [
"MIT"
] | null | null | null | open-hackathon-client/src/client/views/route_template.py | chensong2000/open-hackathon | e2d162995fc4b55ea96b21e4c3cb0c8388cdc25f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This file is covered by the LICENSING file in the root of this project.
"""
import sys
sys.path.append("..")
from client import app
from . import render
from flask_login import login_required
@app.route("/template")
def template_index():
return render("/template/index.html")
@app.... | 20.829268 | 71 | 0.735363 |
ba5e0416e6b4cfb878a405870045a54aad543390 | 3,306 | py | Python | Crawlers/news_sites/items.py | Lasith-Niro/fact-Bounty | aadfcb21d18a547ab23ea9b7fd750b9bdfcd6fcf | [
"Apache-2.0"
] | null | null | null | Crawlers/news_sites/items.py | Lasith-Niro/fact-Bounty | aadfcb21d18a547ab23ea9b7fd750b9bdfcd6fcf | [
"Apache-2.0"
] | null | null | null | Crawlers/news_sites/items.py | Lasith-Niro/fact-Bounty | aadfcb21d18a547ab23ea9b7fd750b9bdfcd6fcf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class NewsSitesItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
class NFItem(scrapy.Item):
... | 25.828125 | 51 | 0.672716 |
3a67b67fa5eb2c6d96fe6278db375dbfd9f485ee | 4,884 | py | Python | atomate/utils/database.py | jordanpburns/atomate | 95bbdeb8fd5d1721688ab5947befc5d50ce1137f | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-09-02T00:55:26.000Z | 2019-09-02T00:55:26.000Z | atomate/utils/database.py | jordanpburns/atomate | 95bbdeb8fd5d1721688ab5947befc5d50ce1137f | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/utils/database.py | jordanpburns/atomate | 95bbdeb8fd5d1721688ab5947befc5d50ce1137f | [
"BSD-3-Clause-LBNL"
] | null | null | null | # coding: utf-8
from __future__ import division, print_function, unicode_literals, absolute_import
"""
This module defines a base class for derived database classes that store calculation data.
"""
import datetime
from abc import ABCMeta, abstractmethod
import six
from pymongo import MongoClient, ReturnDocument
fro... | 35.391304 | 100 | 0.570844 |
bd42267473381a9224bd1922e471eec1d6afb0d8 | 13,241 | py | Python | src/m1.py | wangtianlinrosehulman/05a-Debugging | 7c90a7f924d600a9af152bc2a100e7241ec36db8 | [
"MIT"
] | null | null | null | src/m1.py | wangtianlinrosehulman/05a-Debugging | 7c90a7f924d600a9af152bc2a100e7241ec36db8 | [
"MIT"
] | null | null | null | src/m1.py | wangtianlinrosehulman/05a-Debugging | 7c90a7f924d600a9af152bc2a100e7241ec36db8 | [
"MIT"
] | null | null | null | """
This module lets you practice DEBUGGING when RUN-TIME EXCEPTIONS occur.
Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder,
their colleagues and Tianlin Wang.
""" # Done: 1. PUT YOUR NAME IN THE ABOVE LINE.
import rosegraphics as rg
#################################################... | 37.089636 | 76 | 0.56529 |
74027d8fc9a13570850450c2df5140d899fc5a79 | 114 | py | Python | news/admin.py | hussienalbared/NewsWebsite | c29f4081c15e93117603021f7ca0a536366bd663 | [
"MIT"
] | null | null | null | news/admin.py | hussienalbared/NewsWebsite | c29f4081c15e93117603021f7ca0a536366bd663 | [
"MIT"
] | null | null | null | news/admin.py | hussienalbared/NewsWebsite | c29f4081c15e93117603021f7ca0a536366bd663 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import news
admin.site.register(news)
# Register your models here.
| 19 | 32 | 0.798246 |
5dc03aa4a757d91e8c3c10e5797acbcf76d6f05c | 6,653 | py | Python | Python/klampt/model/create/primitives.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | null | null | null | Python/klampt/model/create/primitives.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | null | null | null | Python/klampt/model/create/primitives.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | null | null | null | """Utilities for creating geometric primitives (and world entities made out
of them).
"""
from klampt import Geometry3D,GeometricPrimitive
from klampt.math import vectorops
def box(width,depth,height,center=None,R=None,t=None,world=None,name=None,mass=float('inf'),type='TriangleMesh'):
"""Makes a box with dimensi... | 43.769737 | 143 | 0.643319 |
640e78eaac01c5d769a106a46940848fe2309424 | 6,298 | py | Python | meeting_scheduler/meeting_scheduler/settings.py | HulewiczKamil/kpz-2021-meeting-scheduler | f17227ff8f3b8450cbbb6a8b285972054f577b94 | [
"MIT"
] | 3 | 2021-03-15T16:14:12.000Z | 2021-03-15T16:15:48.000Z | meeting_scheduler/meeting_scheduler/settings.py | HulewiczKamil/kpz-2021-meeting-scheduler | f17227ff8f3b8450cbbb6a8b285972054f577b94 | [
"MIT"
] | 8 | 2021-03-24T23:51:23.000Z | 2021-04-15T18:22:41.000Z | meeting_scheduler/meeting_scheduler/settings.py | HulewiczKamil/kpz-2021-meeting-scheduler | f17227ff8f3b8450cbbb6a8b285972054f577b94 | [
"MIT"
] | 1 | 2021-09-07T17:59:48.000Z | 2021-09-07T17:59:48.000Z | """
Django settings for meeting_scheduler project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from... | 28.757991 | 91 | 0.67704 |
032aac751897585d6411284050d5982be496a591 | 2,947 | py | Python | oss/GameElements/map.py | m4reQ/Oss-2.0 | 225011f8aa50c7219f00f85d03a1bc7964798c0d | [
"MIT"
] | 2 | 2019-08-13T13:54:20.000Z | 2021-07-11T05:52:54.000Z | oss/GameElements/map.py | m4reQ/Oss-2.0 | 225011f8aa50c7219f00f85d03a1bc7964798c0d | [
"MIT"
] | 14 | 2019-08-10T23:10:46.000Z | 2020-04-13T21:49:18.000Z | oss/GameElements/map.py | m4reQ/Oss-2.0 | 225011f8aa50c7219f00f85d03a1bc7964798c0d | [
"MIT"
] | null | null | null | if __name__ == '__main__':
quit()
from Utils.graphics import TranslateCoord, TranslationMode
from Utils.game import GetMaxPoints
from Utils.debug import Log, LogLevel
def ParseMap(filepath):
data = []
lineCount = 0
try:
with open(filepath, "r") as f:
for line in f.readlines():
lineCount += 1
if lin... | 23.204724 | 113 | 0.642348 |
2076f44a6175269618c7ec6652ef5bcd1ca5eb30 | 666 | py | Python | src/utils/data_mgmt.py | sharad28/ANN_implementation | 93a9107408da1745dd73b2a11a7137ba1eae79ff | [
"MIT"
] | 1 | 2022-01-26T20:41:13.000Z | 2022-01-26T20:41:13.000Z | src/utils/data_mgmt.py | sharad28/ANN_implementation | 93a9107408da1745dd73b2a11a7137ba1eae79ff | [
"MIT"
] | null | null | null | src/utils/data_mgmt.py | sharad28/ANN_implementation | 93a9107408da1745dd73b2a11a7137ba1eae79ff | [
"MIT"
] | null | null | null | import tensorflow as tf
def get_data(validation_datasize):
mnist = tf.keras.datasets.mnist
(X_train_full, y_train_full), (X_test, y_test) = mnist.load_data()
# create a validation data set from the full training data
# Scale the data between 0 to 1 by dividing it by 255. as its an unsigned data betwe... | 41.625 | 107 | 0.731231 |
2ede97076a16f8b7e5cb1199b61169b6122c3e3f | 2,653 | py | Python | test/test_pipeline/test_metrics.py | LMZimmer/Auto-PyTorch_refactor | ac7a9ce35e87a428caca2ac108b362a54d3b8f3a | [
"Apache-2.0"
] | null | null | null | test/test_pipeline/test_metrics.py | LMZimmer/Auto-PyTorch_refactor | ac7a9ce35e87a428caca2ac108b362a54d3b8f3a | [
"Apache-2.0"
] | 34 | 2020-10-06T08:06:46.000Z | 2021-01-21T13:23:34.000Z | test/test_pipeline/test_metrics.py | LMZimmer/Auto-PyTorch_refactor | ac7a9ce35e87a428caca2ac108b362a54d3b8f3a | [
"Apache-2.0"
] | 1 | 2020-10-14T12:25:47.000Z | 2020-10-14T12:25:47.000Z | import unittest
import unittest.mock
import numpy as np
from autoPyTorch.constants import STRING_TO_TASK_TYPES
from autoPyTorch.pipeline.components.training.metrics.base import autoPyTorchMetric
from autoPyTorch.pipeline.components.training.metrics.utils import calculate_score, get_metrics
class MetricsTest(unittes... | 45.741379 | 118 | 0.684885 |
3e1682631c9ed0a76659b24770912b34d0b7701b | 3,285 | py | Python | tests/failure/failure_fixture.py | amittbose/peloton | 679ac0946f35f6ea17bd73b97e1a115530941f6e | [
"Apache-2.0"
] | null | null | null | tests/failure/failure_fixture.py | amittbose/peloton | 679ac0946f35f6ea17bd73b97e1a115530941f6e | [
"Apache-2.0"
] | null | null | null | tests/failure/failure_fixture.py | amittbose/peloton | 679ac0946f35f6ea17bd73b97e1a115530941f6e | [
"Apache-2.0"
] | null | null | null | import logging
from tests.failure.framework import components, framework
from tests.integration.common import wait_for_condition
from tests.integration import job as tjob
class FailureFixture(object):
"""
Fixture for failure tests. It is responsible for creating
and initializing the failure-testing frame... | 33.865979 | 71 | 0.624353 |
baf22e195dd363d37ec1b54fef066b7e8f146734 | 649 | py | Python | steps/step58.py | timwuu/deep-learning-from-scratch-3 | 6f18dee8c1d764e16275ed68f90966bc85f0ae66 | [
"MIT"
] | null | null | null | steps/step58.py | timwuu/deep-learning-from-scratch-3 | 6f18dee8c1d764e16275ed68f90966bc85f0ae66 | [
"MIT"
] | null | null | null | steps/step58.py | timwuu/deep-learning-from-scratch-3 | 6f18dee8c1d764e16275ed68f90966bc85f0ae66 | [
"MIT"
] | null | null | null | import os, sys; sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
from PIL import Image
import dezero
from dezero.models import VGG16
from dezero.dataset import preprocess_vgg
from dezero.datasets import get_imagenet_labels
url = 'https://github.com/oreilly-japan/deep-learning-from-scra... | 30.904762 | 90 | 0.767334 |
7d43e9b3bde41ab79351f2cf004fdb4a9395c1bb | 2,149 | py | Python | setup.py | sjayellis/molssi_devops_old_example | 8645a5d931bd59598227d1ef062664d06bcf53ce | [
"BSD-3-Clause"
] | null | null | null | setup.py | sjayellis/molssi_devops_old_example | 8645a5d931bd59598227d1ef062664d06bcf53ce | [
"BSD-3-Clause"
] | 1 | 2020-04-13T18:24:58.000Z | 2020-04-13T18:25:08.000Z | setup.py | sjayellis/molssi_devops_old_example | 8645a5d931bd59598227d1ef062664d06bcf53ce | [
"BSD-3-Clause"
] | null | null | null | """
molssi_devops
A sample repository for the MolSSI devops workshop
"""
import sys
from setuptools import setup
import versioneer
short_description = __doc__.split("\n")
# from https://github.com/pytest-dev/pytest-runner#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_r... | 35.816667 | 118 | 0.684039 |
4c7376061b8024108bd2d5c8ce46ebb1cfc018b6 | 377 | py | Python | cloverly/resources/estimate.py | cloverly/cloverly-python-module | 773736db6713919c80be288a7875f41c37feaeba | [
"MIT"
] | 1 | 2021-08-10T02:54:19.000Z | 2021-08-10T02:54:19.000Z | cloverly/resources/estimate.py | cloverly/cloverly-python-module | 773736db6713919c80be288a7875f41c37feaeba | [
"MIT"
] | null | null | null | cloverly/resources/estimate.py | cloverly/cloverly-python-module | 773736db6713919c80be288a7875f41c37feaeba | [
"MIT"
] | null | null | null | """
Author: Zain Lakhani
Date: 08/06/2021
Title: Cloverly Resource Estimate Model
Description: Relates to /estimates endpoint. For creating and
viewing estimates
"""
from ..base import CloverlyResource
class Estimate(CloverlyResource):
"""Relates to /estimates endpoint. For creating and
... | 20.944444 | 65 | 0.70557 |
a3dcc41a7d7392d4b830df92e204b241672c55fa | 2,178 | py | Python | examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-one-vs-all.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #
# Copyright 2019 The FATE 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 appli... | 29.835616 | 85 | 0.676309 |
ad5ac9c2187d5967505433ec3b8c619e1b3b8c7f | 13,805 | py | Python | env/Lib/site-packages/pylint/checkers/spelling.py | aammjian/cotton | f72b814f795f79a4054688e465c8b0ae5560f3b7 | [
"Apache-2.0"
] | 33 | 2020-10-05T01:04:55.000Z | 2021-06-24T01:52:31.000Z | env/Lib/site-packages/pylint/checkers/spelling.py | aammjian/cotton | f72b814f795f79a4054688e465c8b0ae5560f3b7 | [
"Apache-2.0"
] | 14 | 2020-10-07T03:15:12.000Z | 2021-01-15T11:53:29.000Z | env/Lib/site-packages/pylint/checkers/spelling.py | aammjian/cotton | f72b814f795f79a4054688e465c8b0ae5560f3b7 | [
"Apache-2.0"
] | 11 | 2020-07-31T08:20:43.000Z | 2020-08-21T04:08:29.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2014-2019 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Michal Nowikowski <godfryd@gmail.com>
# Copyright (c) 2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2015 Pavel Roskin <proski@gnu.org>
# Copyright (c) 2015 Ionel Cristian Maries <contact@... | 33.185096 | 88 | 0.547917 |
c5e9c6a6589ab2e4e7f7da4905d07ddb45ccedc8 | 8,232 | py | Python | qa/rpc-tests/test_framework/test_framework.py | alexandergaldones/bitcoin | 6206252e5073c1cde2e313f2e5a3ca17582c5823 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/test_framework.py | alexandergaldones/bitcoin | 6206252e5073c1cde2e313f2e5a3ca17582c5823 | [
"MIT"
] | 1 | 2017-03-10T16:37:46.000Z | 2017-03-10T16:37:46.000Z | qa/rpc-tests/test_framework/test_framework.py | PETER-ITPE/bitcoin_pjt | 53c300fb525ab3e21206d47d8353f5246b4f24d1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import logging
import optparse
import os
import sys
import shutil
impor... | 37.589041 | 142 | 0.609815 |
a00ceb90211e371c3b2f2b32f2042d1556158595 | 20,975 | py | Python | tensorflow/python/training/session_manager.py | mohammadzainabbas/tensorflow | 352142267a1a151b04c6198de83b40b7e979d1d8 | [
"Apache-2.0"
] | 6 | 2017-08-07T14:05:41.000Z | 2020-02-28T03:57:56.000Z | tensorflow/python/training/session_manager.py | mohammadzainabbas/tensorflow | 352142267a1a151b04c6198de83b40b7e979d1d8 | [
"Apache-2.0"
] | 6 | 2020-04-21T20:38:18.000Z | 2020-06-16T01:00:15.000Z | tensorflow/python/training/session_manager.py | mohammadzainabbas/tensorflow | 352142267a1a151b04c6198de83b40b7e979d1d8 | [
"Apache-2.0"
] | 3 | 2018-04-11T03:08:18.000Z | 2021-05-09T21:51:42.000Z | # 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... | 38.415751 | 80 | 0.678236 |
63d34de50cb089056652dfd88a3c167e8ac6ee87 | 29,547 | py | Python | lib/rucio/core/permission/generic.py | sahiljajodia01/rucio | e8c957953b0864c0f4e1e27678efdf3aef2b2df1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/permission/generic.py | sahiljajodia01/rucio | e8c957953b0864c0f4e1e27678efdf3aef2b2df1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/permission/generic.py | sahiljajodia01/rucio | e8c957953b0864c0f4e1e27678efdf3aef2b2df1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 35.25895 | 155 | 0.693167 |
23d195cb83a5fed64c038221fdf793c9a71a0448 | 23,636 | py | Python | src/prefect/agent/agent.py | pcieslinski/prefect | d934da5c9abe65f9cbb8f95d263ef336f3e53f6f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-08-01T15:44:32.000Z | 2020-08-01T15:44:32.000Z | src/prefect/agent/agent.py | pcieslinski/prefect | d934da5c9abe65f9cbb8f95d263ef336f3e53f6f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/agent/agent.py | pcieslinski/prefect | d934da5c9abe65f9cbb8f95d263ef336f3e53f6f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-04T13:22:11.000Z | 2020-05-04T13:22:11.000Z | import functools
import logging
import math
import os
import signal
import sys
import threading
import time
from concurrent.futures import Future, ThreadPoolExecutor
from contextlib import contextmanager
from typing import Any, Generator, Iterable, Set, Optional, cast
from urllib.parse import urlparse
import pendulum
... | 38 | 97 | 0.549839 |
b47779674eff0bb5df2e75ea3b3c1ba6427db391 | 6,920 | py | Python | src/model/model_helper.py | dimanbeliy1/script-server | 1eebaeeca24bb2b6161275b97859a96b0ffb5391 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/model/model_helper.py | dimanbeliy1/script-server | 1eebaeeca24bb2b6161275b97859a96b0ffb5391 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/model/model_helper.py | dimanbeliy1/script-server | 1eebaeeca24bb2b6161275b97859a96b0ffb5391 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | import logging
import os
import re
import utils.env_utils as env_utils
from config.constants import FILE_TYPE_DIR, FILE_TYPE_FILE
from utils.string_utils import is_blank
ENV_VAR_PREFIX = '$$'
SECURE_MASK = '*' * 6
LOGGER = logging.getLogger('script_server.model_helper')
def resolve_env_vars(value, *, full_match=Fa... | 27.03125 | 117 | 0.655202 |
2779cabc9c4450910f1951481d98406bcc5c838d | 17,520 | py | Python | spexxy/weight/fromgrid.py | thusser/spexxy | 14a8d121076b9e043bdf2e27222a65088f771ff9 | [
"MIT"
] | 4 | 2019-05-13T21:36:31.000Z | 2021-09-06T01:56:36.000Z | spexxy/weight/fromgrid.py | thusser/spexxy | 14a8d121076b9e043bdf2e27222a65088f771ff9 | [
"MIT"
] | 2 | 2020-02-12T14:36:39.000Z | 2020-07-14T11:43:10.000Z | spexxy/weight/fromgrid.py | thusser/spexxy | 14a8d121076b9e043bdf2e27222a65088f771ff9 | [
"MIT"
] | 1 | 2019-11-08T09:26:23.000Z | 2019-11-08T09:26:23.000Z | import os
import numpy as np
import pandas as pd
from typing import List, Union, Tuple
from .weight import Weight
from .fromgridnearest import WeightFromGridNearest
from ..data import Spectrum
class WeightFromGrid(Weight):
"""
This class loads the weights from a grid depending on the initial values of the f... | 38.33698 | 125 | 0.557763 |
3608024ce81f9c424686172ab9d789549b379e65 | 4,518 | py | Python | Code/YOLO/darkflow/darkflow/net/yolo/misc.py | dnyaneshb25/dnyaneshbhonde | d4d253107ca3d15a8b20705a0b2bd782a47ae38b | [
"Apache-2.0"
] | 49 | 2018-02-28T21:50:06.000Z | 2022-03-14T15:18:44.000Z | Code/YOLO/darkflow/darkflow/net/yolo/misc.py | dnyaneshb25/dnyaneshbhonde | d4d253107ca3d15a8b20705a0b2bd782a47ae38b | [
"Apache-2.0"
] | 13 | 2020-01-28T22:23:29.000Z | 2022-03-11T23:26:27.000Z | Code/YOLO/darkflow/darkflow/net/yolo/misc.py | dnyaneshb25/dnyaneshbhonde | d4d253107ca3d15a8b20705a0b2bd782a47ae38b | [
"Apache-2.0"
] | 22 | 2021-03-24T10:21:51.000Z | 2022-03-30T06:30:29.000Z | import pickle
import numpy as np
import cv2
import os
labels20 = ["aeroplane", "bicycle", "bird", "boat", "bottle",
"bus", "car", "cat", "chair", "cow", "diningtable", "dog",
"horse", "motorbike", "person", "pottedplant", "sheep", "sofa",
"train", "tvmonitor"]
# 8, 14, 15, 19
voc_models = ['yolo-full', '... | 34.48855 | 71 | 0.501992 |
f4654039f689ac2701894762814f6855442623e5 | 199 | py | Python | admitad/__init__.py | Picasel/django-admitad | 7df25dffa5bb7b8c57a53afaa274ea4dca3bc420 | [
"MIT"
] | 3 | 2019-01-29T05:45:42.000Z | 2020-09-22T14:42:33.000Z | admitad/__init__.py | Picasel/django-admitad | 7df25dffa5bb7b8c57a53afaa274ea4dca3bc420 | [
"MIT"
] | 8 | 2018-11-27T11:39:39.000Z | 2019-06-29T07:55:02.000Z | admitad/__init__.py | k0t3n/django-admitad | 7df25dffa5bb7b8c57a53afaa274ea4dca3bc420 | [
"MIT"
] | null | null | null | default_app_config = 'admitad.apps.AdmitadConfig'
REQUIRED_SETTINGS = ['ADMITAD_COMPAIN_CODE', 'ADMITAD_POSTBACK_URL', 'ADMITAD_POSTBACK_KEY']
DOCS_URL = 'https://github.com/Picasel/django-admitad'
| 39.8 | 92 | 0.809045 |
016236f4ac716c1dfdfeea345f75657d33d15359 | 178 | py | Python | app/main/__init__.py | hwc0919/TsyDigitalRailway | 34d682f698b0b8bf066719c06fa431d2ab1436a0 | [
"CC0-1.0"
] | null | null | null | app/main/__init__.py | hwc0919/TsyDigitalRailway | 34d682f698b0b8bf066719c06fa431d2ab1436a0 | [
"CC0-1.0"
] | null | null | null | app/main/__init__.py | hwc0919/TsyDigitalRailway | 34d682f698b0b8bf066719c06fa431d2ab1436a0 | [
"CC0-1.0"
] | null | null | null | # 不能更改代码顺序!!!请勿使用IDE的代码格式化功能!!!
from flask import Blueprint # 第一行
main = Blueprint('main', __name__) # 第二行
if True:
from . import views, errors # 第三行
| 19.777778 | 46 | 0.606742 |
a4378aa624b873c50cc704af592a0e957abb6ce3 | 609 | py | Python | src/utilities/common.py | choobinejad/beltway-wifi | 5489807e4368a85dbeb59f4df509bec2c60d05bd | [
"MIT"
] | null | null | null | src/utilities/common.py | choobinejad/beltway-wifi | 5489807e4368a85dbeb59f4df509bec2c60d05bd | [
"MIT"
] | 9 | 2019-02-15T15:17:10.000Z | 2019-03-11T15:24:55.000Z | src/utilities/common.py | choobinejad/beltway-wifi | 5489807e4368a85dbeb59f4df509bec2c60d05bd | [
"MIT"
] | null | null | null | import sys
def progress(count, total, status='', visual=True):
bar_len = 100
filled_len = int(round(bar_len * count / float(total)))
percents = round(100.0 * count / float(total), 1)
bar = '=' * filled_len + '-' * (bar_len - filled_len)
if visual:
sys.stdout.write('[{}] {}{} ...{}\r'.for... | 27.681818 | 80 | 0.563218 |
60d0a5abf7eea0dc75e48536f49072d8202f55c7 | 850 | py | Python | ssd_keras/testing_utils/videotest_example.py | shingte/CarND-Vehicle-Detection | 38b0f9645f1300836f5877a33c612f004e0aaa5b | [
"MIT"
] | 4 | 2020-03-24T02:16:08.000Z | 2021-11-25T17:47:49.000Z | ssd_keras/testing_utils/videotest_example.py | shingte/CarND-Vehicle-Detection | 38b0f9645f1300836f5877a33c612f004e0aaa5b | [
"MIT"
] | null | null | null | ssd_keras/testing_utils/videotest_example.py | shingte/CarND-Vehicle-Detection | 38b0f9645f1300836f5877a33c612f004e0aaa5b | [
"MIT"
] | 4 | 2020-09-18T01:08:25.000Z | 2021-11-25T17:48:47.000Z | import keras
import pickle
from videotest import VideoTest
import sys
sys.path.append("..")
from ssd import SSD300 as SSD
input_shape = (300,300,3)
# Change this if you run with other classes than VOC
class_names = ["background", "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chai... | 34 | 225 | 0.695294 |
e66e1ea7d3ca9e7f5292259f785a79db7eb455b0 | 1,157 | py | Python | programming_languages/plc_script/tests/addition_multiplication_chain_test.py | playandlearntocode/main | 2f2374b92b9af3fc11e2aedf13bf8c2240ece906 | [
"MIT"
] | 2 | 2022-01-25T10:34:08.000Z | 2022-03-16T17:17:09.000Z | programming_languages/plc_script/tests/addition_multiplication_chain_test.py | playandlearntocode/main | 2f2374b92b9af3fc11e2aedf13bf8c2240ece906 | [
"MIT"
] | null | null | null | programming_languages/plc_script/tests/addition_multiplication_chain_test.py | playandlearntocode/main | 2f2374b92b9af3fc11e2aedf13bf8c2240ece906 | [
"MIT"
] | 3 | 2022-01-24T23:56:22.000Z | 2022-02-24T20:46:11.000Z | from parsing.ll1 import LL1
def test():
s = '''
2 + 3 * 4 +7;
'''
ll1 = LL1(s)
ast = ll1.parse()
expected = {
'type': 'addition_expression',
'content': {
'left': {
'type': 'addition_expression',
'content': {
... | 22.686275 | 60 | 0.242869 |
c57ba1c1451f6db9567d4126bf9d6cac81db26e9 | 869 | py | Python | src/openbiolink/graph_creation/metadata_infile/onto/inMetaOntoUberonIsA.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 97 | 2019-11-26T09:53:18.000Z | 2022-03-19T10:33:10.000Z | src/openbiolink/graph_creation/metadata_infile/onto/inMetaOntoUberonIsA.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 67 | 2019-12-09T21:01:52.000Z | 2021-12-21T15:19:41.000Z | src/openbiolink/graph_creation/metadata_infile/onto/inMetaOntoUberonIsA.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 20 | 2020-01-13T23:02:25.000Z | 2022-03-16T21:43:31.000Z | from openbiolink.edgeType import EdgeType
from openbiolink.graph_creation.metadata_infile.infileMetadata import InfileMetadata
from openbiolink.graph_creation.types.infileType import InfileType
from openbiolink.namespace import *
from openbiolink.nodeType import NodeType
class InMetaOntoUberonIsA(InfileMetadata):
... | 34.76 | 97 | 0.7687 |
d7290eced4b9408849085c8cf486e217bf9e574c | 857 | py | Python | torrt/trackers/test.py | st7105/torrt | 97a3cb20a8caec5bba2132543343a82eb13aa182 | [
"BSD-3-Clause"
] | null | null | null | torrt/trackers/test.py | st7105/torrt | 97a3cb20a8caec5bba2132543343a82eb13aa182 | [
"BSD-3-Clause"
] | null | null | null | torrt/trackers/test.py | st7105/torrt | 97a3cb20a8caec5bba2132543343a82eb13aa182 | [
"BSD-3-Clause"
] | null | null | null | from typing import List
from ..base_tracker import GenericPublicTracker
class TestTracker(GenericPublicTracker):
alias: str = 'test.st7105.ru'
def get_id_from_link(self, url: str) -> str:
"""Returns forum thread identifier from full thread URL."""
splitted = url.rstrip('/').split('/')
... | 28.566667 | 97 | 0.631272 |
4aff2a6f91a6211050b7af4971c19ef152ded31d | 73 | py | Python | testing/sonar_test.py | hmallen/SonarMap | fb0dfad87af6834f0d96b4b4376cc21432ea1416 | [
"MIT"
] | null | null | null | testing/sonar_test.py | hmallen/SonarMap | fb0dfad87af6834f0d96b4b4376cc21432ea1416 | [
"MIT"
] | null | null | null | testing/sonar_test.py | hmallen/SonarMap | fb0dfad87af6834f0d96b4b4376cc21432ea1416 | [
"MIT"
] | null | null | null | from gpiozero import DistanceSensor
if __name__ == '__main__':
pass | 14.6 | 35 | 0.739726 |
5ac7a3fe3088d40a8eba1a29e5cb5e758ce5520f | 8,567 | py | Python | trace-viewer/tracing/third_party/tvcm/tvcm/module.py | RSB4760/apq8016_external_chromium-trace | 45b575bb05b3714142a9d67b9bd153740ef99226 | [
"BSD-3-Clause"
] | null | null | null | trace-viewer/tracing/third_party/tvcm/tvcm/module.py | RSB4760/apq8016_external_chromium-trace | 45b575bb05b3714142a9d67b9bd153740ef99226 | [
"BSD-3-Clause"
] | null | null | null | trace-viewer/tracing/third_party/tvcm/tvcm/module.py | RSB4760/apq8016_external_chromium-trace | 45b575bb05b3714142a9d67b9bd153740ef99226 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module contains the Module class and other classes for resources.
The Module class represents a module in the trace viewer system. A module has
a na... | 32.206767 | 80 | 0.698844 |
d38161d7e8d89422b5aa58476c8c44edb5813e00 | 2,746 | py | Python | userena/tests/tests_middleware.py | jdavidagudelo/django-userena-ce | 970ca25ca367112625933bd61a0ba745b052692e | [
"BSD-3-Clause"
] | 86 | 2018-03-09T22:24:39.000Z | 2021-12-12T22:30:33.000Z | userena/tests/tests_middleware.py | jdavidagudelo/django-userena-ce | 970ca25ca367112625933bd61a0ba745b052692e | [
"BSD-3-Clause"
] | 113 | 2018-02-25T12:24:13.000Z | 2022-02-22T17:59:51.000Z | userena/tests/tests_middleware.py | jdavidagudelo/django-userena-ce | 970ca25ca367112625933bd61a0ba745b052692e | [
"BSD-3-Clause"
] | 19 | 2018-08-16T18:13:48.000Z | 2021-12-11T18:14:30.000Z | from django.contrib.auth import get_user_model
from django.http import HttpRequest
from django.test import TestCase
from userena.tests.profiles.models import Profile
from userena.middleware import UserenaLocaleMiddleware
from userena import settings as userena_settings
from userena.utils import get_user_profile, get_p... | 32.690476 | 81 | 0.671886 |
afdbb10ad7b4559ed0188dc18f85f27700cb637d | 53 | py | Python | factoids/__init__.py | micole/slackbucket | e3cd4cd8db086011548a4c3bfeb233d4ded2270a | [
"MIT"
] | 2 | 2018-02-12T19:11:05.000Z | 2018-02-15T14:35:03.000Z | factoids/__init__.py | micole/slackbucket | e3cd4cd8db086011548a4c3bfeb233d4ded2270a | [
"MIT"
] | 1 | 2021-06-01T21:52:25.000Z | 2021-06-01T21:52:25.000Z | factoids/__init__.py | micole/slackbucket | e3cd4cd8db086011548a4c3bfeb233d4ded2270a | [
"MIT"
] | 1 | 2018-02-12T19:17:54.000Z | 2018-02-12T19:17:54.000Z | from .plugin import Factoids
__all__ = ['Factoids']
| 13.25 | 28 | 0.735849 |
5ae2d9263e6dc5035f538d58c970586b132bd1a2 | 5,362 | py | Python | molar/backend/api/api_v1/endpoints/database.py | aspuru-guzik-group/molar | a3e0c337bd8a41c94b2c25831c95048cc7614f04 | [
"BSD-3-Clause"
] | 4 | 2021-07-20T18:49:44.000Z | 2021-10-15T00:58:12.000Z | molar/backend/api/api_v1/endpoints/database.py | aspuru-guzik-group/molar | a3e0c337bd8a41c94b2c25831c95048cc7614f04 | [
"BSD-3-Clause"
] | null | null | null | molar/backend/api/api_v1/endpoints/database.py | aspuru-guzik-group/molar | a3e0c337bd8a41c94b2c25831c95048cc7614f04 | [
"BSD-3-Clause"
] | 2 | 2022-01-07T17:57:42.000Z | 2022-01-13T21:00:20.000Z | # std
from typing import List
# external
import alembic
from fastapi import APIRouter, BackgroundTasks, Depends, HTTPException
import sqlalchemy
from sqlalchemy.orm import Session
# molar
from molar import install
from molar.backend import alembic_utils, database, schemas
from molar.backend.api import deps
from molar... | 35.045752 | 93 | 0.723051 |
2edef990ae39ad66a9cdc1b9a98a3ccde60a48e0 | 660 | py | Python | shapes/arc_brezenhem.py | dimayasha7123/CGLabs | f56ee6ab1170b24467e5c3ee9782aeb6087cbe08 | [
"WTFPL"
] | null | null | null | shapes/arc_brezenhem.py | dimayasha7123/CGLabs | f56ee6ab1170b24467e5c3ee9782aeb6087cbe08 | [
"WTFPL"
] | null | null | null | shapes/arc_brezenhem.py | dimayasha7123/CGLabs | f56ee6ab1170b24467e5c3ee9782aeb6087cbe08 | [
"WTFPL"
] | null | null | null | import math
def arc_brezenhem(x0, y0, r, angF, angS):
if angF > angS:
angF, angS = angS, angF
angF *= math.pi / 180
angS *= math.pi / 180
x = int(r * math.cos(angS))
y = int(r * math.sin(angS))
delta = 2 * (1 - r)
output = []
while y >= int(r * math.sin(angF)):
output.a... | 25.384615 | 53 | 0.409091 |
2600bee0a7f45b6c44ac77911a2225b87abef8bf | 3,108 | py | Python | fastNLP/modules/decoder/utils.py | sleepy-owl/fastNLP | 22c6e6d59ccea011e325606ef10201ccb61cdc7a | [
"Apache-2.0"
] | 2,693 | 2018-03-08T03:09:20.000Z | 2022-03-30T07:38:42.000Z | fastNLP/modules/decoder/utils.py | stratoes/fastNLP | a8a458230489710ab945b37ec22e93315230f2de | [
"Apache-2.0"
] | 291 | 2018-07-21T07:43:17.000Z | 2022-03-07T13:06:58.000Z | fastNLP/modules/decoder/utils.py | stratoes/fastNLP | a8a458230489710ab945b37ec22e93315230f2de | [
"Apache-2.0"
] | 514 | 2018-03-09T06:54:25.000Z | 2022-03-26T20:11:44.000Z | r"""undocumented"""
__all__ = [
"viterbi_decode"
]
import torch
def viterbi_decode(logits, transitions, mask=None, unpad=False):
r"""
给定一个特征矩阵以及转移分数矩阵,计算出最佳的路径以及对应的分数
:param torch.FloatTensor logits: batch_size x max_len x num_tags,特征矩阵。
:param torch.FloatTensor transitions: n_tags x n_tags,[i,... | 38.85 | 103 | 0.651223 |
8e90ea4e385a8a80d6b8417f107b3a896ee4f7ec | 3,727 | py | Python | cryptfiles/tests/test_crypter.py | wlsouza/cryptfiles | 1fe22a081f2d89a1f14c95107b01891ead60aada | [
"MIT"
] | 1 | 2021-11-29T20:08:55.000Z | 2021-11-29T20:08:55.000Z | cryptfiles/tests/test_crypter.py | wlsouza/cryptfiles | 1fe22a081f2d89a1f14c95107b01891ead60aada | [
"MIT"
] | null | null | null | cryptfiles/tests/test_crypter.py | wlsouza/cryptfiles | 1fe22a081f2d89a1f14c95107b01891ead60aada | [
"MIT"
] | null | null | null | import pytest
from unittest import mock
from cryptfiles.tests.utils import create_a_random_test_file
from cryptfiles.app import Crypter
@pytest.fixture
def encryptmode_crypter(testfiles_path) -> Crypter:
return Crypter(mode="encrypt",target=testfiles_path,key_scan=False)
@pytest.fixture
def decryptmode_crypter(t... | 45.45122 | 178 | 0.821572 |
21018eb479152c66ba82c9d4310d81494755757c | 3,980 | py | Python | allure-pytest/test/steps/nested_steps_test.py | vdsbenoit/allure-python | 7b56b031c42369dd73844105382e9ceb9a88d6cd | [
"Apache-2.0"
] | null | null | null | allure-pytest/test/steps/nested_steps_test.py | vdsbenoit/allure-python | 7b56b031c42369dd73844105382e9ceb9a88d6cd | [
"Apache-2.0"
] | null | null | null | allure-pytest/test/steps/nested_steps_test.py | vdsbenoit/allure-python | 7b56b031c42369dd73844105382e9ceb9a88d6cd | [
"Apache-2.0"
] | null | null | null | """
>>> getfixture('inject_matchers')
>>> allure_report = getfixture('allure_report')
>>> assert_that(allure_report,
... all_of(
... has_property('test_cases', has_length(32)),
... has_property('test_groups', has_length(0))
... )) # doctest: +SKIP
>>> for test_... | 40.612245 | 116 | 0.654271 |
f9ca47f116bf07dfb1bfc5f547ceda115862f284 | 8,217 | py | Python | tests/web/classes/test_elements.py | DavidCain/python-slackclient | 687695be8527fd0a864a87a2b03066e508c6588a | [
"MIT"
] | null | null | null | tests/web/classes/test_elements.py | DavidCain/python-slackclient | 687695be8527fd0a864a87a2b03066e508c6588a | [
"MIT"
] | 1 | 2019-10-03T13:53:08.000Z | 2019-10-03T13:53:08.000Z | tests/web/classes/test_elements.py | DavidCain/python-slackclient | 687695be8527fd0a864a87a2b03066e508c6588a | [
"MIT"
] | null | null | null | import unittest
from slack.errors import SlackObjectFormationError
from slack.web.classes.elements import (
ButtonElement,
ChannelSelectElement,
ConversationSelectElement,
ExternalDataSelectElement,
ImageElement,
LinkButtonElement,
SelectElement,
UserSelectElement,
)
from slack.web.clas... | 34.52521 | 88 | 0.515517 |
b2f7fb8b602bfdd673abb75e7f89ca8dc32301c9 | 1,400 | py | Python | coretabs ATM py/withdraw.py | attia7/Test | c74f09816ba2e0798b0533e31ea8b72249dec598 | [
"MIT"
] | null | null | null | coretabs ATM py/withdraw.py | attia7/Test | c74f09816ba2e0798b0533e31ea8b72249dec598 | [
"MIT"
] | 11 | 2020-03-24T17:40:26.000Z | 2022-01-13T01:42:38.000Z | coretabs ATM py/withdraw.py | attia7/AttiaGit | c74f09816ba2e0798b0533e31ea8b72249dec598 | [
"MIT"
] | null | null | null | balance = 700
papers=[100, 50, 10, 5,4,3,2,1]
def withdraw(balance, request):
if balance < request :
print('Sorry, you are try withdraw: {0}, but Your balance just : {1}'.format(request, balance))
else:
print ('your balance >>', balance)
orgnal_request = request
while request > ... | 30.434783 | 103 | 0.512857 |
22f17720d9d324a4e80ec0068131433036c82c68 | 53,929 | py | Python | Bio/Emboss/Applications.py | bneron/biopython | 2c52e57661c8f6cdf4a191850b2f6871f8582af7 | [
"PostgreSQL"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Bio/Emboss/Applications.py | bneron/biopython | 2c52e57661c8f6cdf4a191850b2f6871f8582af7 | [
"PostgreSQL"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Bio/Emboss/Applications.py | bneron/biopython | 2c52e57661c8f6cdf4a191850b2f6871f8582af7 | [
"PostgreSQL"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # Copyright 2001-2009 Brad Chapman.
# Revisions copyright 2009-2010 by Peter Cock.
# Revisions copyright 2009 by David Winter.
# Revisions copyright 2009-2010 by Leighton Pritchard.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that ... | 42.564325 | 134 | 0.541341 |
1b387bf13fd27f6c7f0caca5558378790be870c8 | 22,373 | py | Python | contrib/devtools/copyright_header.py | SigxChain/sigx | 793d43fcd913853c3ed64ed8a5b9e42edc30d6fb | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | SigxChain/sigx | 793d43fcd913853c3ed64ed8a5b9e42edc30d6fb | [
"MIT"
] | 1 | 2019-09-27T08:26:37.000Z | 2019-09-27T08:26:37.000Z | contrib/devtools/copyright_header.py | anonymouszar/vestx | 466a8e2fd4c1b544e72051115908f3384fedbbe3 | [
"MIT"
] | 9 | 2019-04-03T19:31:36.000Z | 2019-11-24T22:19:03.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
########################... | 36.497553 | 92 | 0.600679 |
7415bc832b540beb2d4de23e5036c732e0852aa2 | 16,102 | py | Python | icdar2013_eval.py | outsidercsy/PeleeNet_Detection_pytorch | 675b5c0bd75ff880e47d605df0dc944db0756873 | [
"MIT"
] | 3 | 2019-10-30T00:43:46.000Z | 2020-01-10T13:32:45.000Z | icdar2013_eval.py | outsidercsy/PeleeNet_Detection_pytorch | 675b5c0bd75ff880e47d605df0dc944db0756873 | [
"MIT"
] | null | null | null | icdar2013_eval.py | outsidercsy/PeleeNet_Detection_pytorch | 675b5c0bd75ff880e47d605df0dc944db0756873 | [
"MIT"
] | 2 | 2019-11-19T01:56:15.000Z | 2020-05-24T01:44:44.000Z | """Adapted from:
@longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch
@rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn
Licensed under The MIT License [see LICENSE for details]
"""
from __future__ import print_function
import torch
import torch.nn as nn
import to... | 34.259574 | 120 | 0.550491 |
1cce0638b2241e788a43951c2ed4fa252db27334 | 3,554 | py | Python | wagtail/admin/widgets/datetime.py | wgarlock/wagtail | 1bfc13952f5ffc0e40a4435d15a5aefd70984430 | [
"BSD-3-Clause"
] | 2 | 2021-03-18T21:41:05.000Z | 2021-03-18T21:41:08.000Z | wagtail/admin/widgets/datetime.py | wgarlock/wagtail | 1bfc13952f5ffc0e40a4435d15a5aefd70984430 | [
"BSD-3-Clause"
] | 13 | 2015-05-08T12:27:10.000Z | 2020-01-23T14:45:57.000Z | wagtail/admin/widgets/datetime.py | wgarlock/wagtail | 1bfc13952f5ffc0e40a4435d15a5aefd70984430 | [
"BSD-3-Clause"
] | 1 | 2021-02-15T18:59:53.000Z | 2021-02-15T18:59:53.000Z | import json
from django import forms
from django.conf import settings
from django.forms import widgets
from django.utils.formats import get_format
from wagtail.admin.datetimepicker import to_datetimepicker_format
from wagtail.admin.staticfiles import versioned_static
DEFAULT_DATE_FORMAT = '%Y-%m-%d'
DEFAULT_DATETIM... | 31.451327 | 87 | 0.647721 |
d0d306fe5fb3c08912755f0024976b2f2c967f53 | 1,400 | py | Python | radloggerpy/tests/cli/device/test_device.py | Dantali0n/RadLoggerPy | c630ce730519001ee39fb3a02dd3652943a23067 | [
"Apache-2.0"
] | null | null | null | radloggerpy/tests/cli/device/test_device.py | Dantali0n/RadLoggerPy | c630ce730519001ee39fb3a02dd3652943a23067 | [
"Apache-2.0"
] | null | null | null | radloggerpy/tests/cli/device/test_device.py | Dantali0n/RadLoggerPy | c630ce730519001ee39fb3a02dd3652943a23067 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright (c) 2020 Dantali0n
#
# 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 ... | 30.434783 | 75 | 0.699286 |
232688ba3287c238bbdee33b1efb3faac73f2a7f | 1,678 | py | Python | examples/ElasticsearchDomain.py | mng12689/troposphere | f0c6c7be8963de2ad3537b1864b62b02a7b486fc | [
"BSD-2-Clause"
] | 1 | 2021-04-03T22:24:36.000Z | 2021-04-03T22:24:36.000Z | examples/ElasticsearchDomain.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | null | null | null | examples/ElasticsearchDomain.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | 5 | 2020-05-10T13:50:32.000Z | 2021-09-09T09:06:54.000Z | # Converted from Elasticsearch Domain example located at:
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticsearch-domain.html#d0e51519
from troposphere import Template, constants
from troposphere.elasticsearch import Domain, EBSOptions, VPCOptions
from troposphere.elasticsearch impor... | 35.702128 | 111 | 0.634684 |
a120ab8b7dfcba7c55fd79fd56645e4b95e5c202 | 6,707 | py | Python | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_bypass_bypass_lsp_extensive/output/bypass_lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_bypass_bypass_lsp_extensive/output/bypass_lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_mpls_rpc/show_mpls_bypass_bypass_lsp_extensive/output/bypass_lsp/show_mpls_lsp_extensive_info/show_mpls_lsp_sec_path_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 54.08871 | 582 | 0.733115 |
58e4fdd8a631a0cee39152ec20f3987a801b5de8 | 2,759 | py | Python | frappe/email/test_smtp.py | ssuda777/frappe | d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e | [
"MIT"
] | 3 | 2019-01-01T10:46:15.000Z | 2019-01-01T10:46:18.000Z | frappe/email/test_smtp.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 5 | 2021-04-28T06:55:26.000Z | 2022-02-10T07:59:06.000Z | frappe/email/test_smtp.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 2 | 2021-08-24T00:57:20.000Z | 2021-08-24T01:30:40.000Z | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# License: The MIT License
import unittest
import frappe
from frappe.email.smtp import SMTPServer
from frappe.email.doctype.email_account.email_account import EmailAccount
class TestSMTP(unittest.TestCase):
def test_smtp_ssl_session(self):
for po... | 34.924051 | 139 | 0.757521 |
2af4a0f962f40710e849feb05b869999f4263c78 | 3,075 | py | Python | lib/python3.6/site-packages/conda/_vendor/auxlib/path.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | 2 | 2021-11-28T12:47:01.000Z | 2021-12-04T16:58:16.000Z | lib/python3.6/site-packages/conda/_vendor/auxlib/path.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | 2 | 2021-12-04T12:51:07.000Z | 2021-12-04T16:49:18.000Z | lib/python3.6/site-packages/conda/_vendor/auxlib/path.py | PhonPhey/Magnezi | bf96246d69edc6882653ba5e1332c0eff8d10294 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from distutils.sysconfig import get_python_lib
from logging import getLogger
from os import chdir, getcwd
from os.path import abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join, sep
try:
import pkg_resources
... | 30.147059 | 99 | 0.685854 |
4e19762657bd7c55dc69fc95d9e901f355dd9770 | 2,654 | py | Python | test/test_searchuniversalabsolute_api.py | yumimobi/graylog.py | 3118f4a49c91c2cbbd660523b0ab99e56fbfd861 | [
"Apache-2.0"
] | 10 | 2016-09-27T08:13:22.000Z | 2018-09-04T13:15:42.000Z | test/test_searchuniversalabsolute_api.py | yumimobi/graylog.py | 3118f4a49c91c2cbbd660523b0ab99e56fbfd861 | [
"Apache-2.0"
] | 1 | 2019-08-28T16:16:09.000Z | 2019-08-28T16:16:09.000Z | test/test_searchuniversalabsolute_api.py | yumimobi/graylog.py | 3118f4a49c91c2cbbd660523b0ab99e56fbfd861 | [
"Apache-2.0"
] | 5 | 2016-11-03T07:45:18.000Z | 2021-08-19T14:21:49.000Z | # coding: utf-8
"""
No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.1.1+01d50e5
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you m... | 25.76699 | 104 | 0.678598 |
a3cd7ad708ec564f8cf3e81a7edea7fa57751671 | 429 | py | Python | urllib-learn/encode-quote.py | pfcstyle/spider-learn | dc53a1de03ba27d5f785cb558571b40ee61f3052 | [
"Apache-2.0"
] | 1 | 2020-05-30T15:33:05.000Z | 2020-05-30T15:33:05.000Z | urllib-learn/encode-quote.py | pfcstyle/spider-learn | dc53a1de03ba27d5f785cb558571b40ee61f3052 | [
"Apache-2.0"
] | null | null | null | urllib-learn/encode-quote.py | pfcstyle/spider-learn | dc53a1de03ba27d5f785cb558571b40ee61f3052 | [
"Apache-2.0"
] | null | null | null | import urllib.request
import urllib.parse
url = 'https://movie.douban.com/'
data = {
'value': 'true',
}
# 数据处理
data = urllib.parse.urlencode(data).encode('utf-8')
req = urllib.request.urlopen(url, data=data)
# 解决中文问题
url = '%2523%25E7%25BC%2596%25E7%25A8%258B%2523'
# 第一次解码
first = urllib.parse.unquote(url)
print(... | 20.428571 | 51 | 0.689977 |
2e5c938ecfdb67905a66b3fd3103096f06ffa52a | 2,789 | py | Python | pyro/poutine/plate_messenger.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | 1 | 2021-02-08T22:53:23.000Z | 2021-02-08T22:53:23.000Z | pyro/poutine/plate_messenger.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | null | null | null | pyro/poutine/plate_messenger.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | 1 | 2021-04-11T21:37:25.000Z | 2021-04-11T21:37:25.000Z | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
from contextlib import contextmanager
from .broadcast_messenger import BroadcastMessenger
from .messenger import block_messengers
from .subsample_messenger import SubsampleMessenger
class PlateMessenger(SubsampleMessenger):
... | 35.303797 | 79 | 0.637863 |
37a9ed5cc0de554ff492d80f336382e0c97de93f | 3,321 | py | Python | nova/api/openstack/compute/schemas/v3/cells.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/api/openstack/compute/schemas/v3/cells.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 9 | 2015-05-20T11:20:17.000Z | 2017-07-27T08:21:33.000Z | nova/api/openstack/compute/schemas/v3/cells.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 13 | 2015-05-05T09:34:04.000Z | 2017-11-08T02:03:46.000Z | # Copyright 2014 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 33.21 | 78 | 0.502559 |
462327c8f588a5b263b1d2f59cc669c310460329 | 29,532 | py | Python | python/ccxt/okcoinusd.py | sleepingAnt/ccxt | 3c8d62f48726d217e06b252800ca36950208bc47 | [
"MIT"
] | 1 | 2018-07-06T08:14:13.000Z | 2018-07-06T08:14:13.000Z | python/ccxt/okcoinusd.py | sleepingAnt/ccxt | 3c8d62f48726d217e06b252800ca36950208bc47 | [
"MIT"
] | null | null | null | python/ccxt/okcoinusd.py | sleepingAnt/ccxt | 3c8d62f48726d217e06b252800ca36950208bc47 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
import json
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Aut... | 40.733793 | 385 | 0.494582 |
e2b0db54519397e03a5085fe76fcc0e0b7ec9526 | 4,577 | py | Python | Text-Code/text-to-code/code/dataset.py | ywen666/CodeXGLUE | f75c9628d8a29daedd5953474fb38e24c30d7349 | [
"CC0-1.0",
"MIT"
] | 613 | 2020-09-28T08:49:25.000Z | 2022-03-31T10:57:34.000Z | Text-Code/text-to-code/code/dataset.py | ywen666/CodeXGLUE | f75c9628d8a29daedd5953474fb38e24c30d7349 | [
"CC0-1.0",
"MIT"
] | 95 | 2020-10-01T07:46:04.000Z | 2022-03-31T03:54:42.000Z | Text-Code/text-to-code/code/dataset.py | ywen666/CodeXGLUE | f75c9628d8a29daedd5953474fb38e24c30d7349 | [
"CC0-1.0",
"MIT"
] | 178 | 2020-09-29T05:15:29.000Z | 2022-03-31T07:14:22.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from __future__ import absolute_import, division, print_function
import argparse
import glob
import logging
import os
import pickle
import random
import re
import gc
import shutil
import json
import numpy as np
import torch
from torch.utils.data... | 39.119658 | 143 | 0.594494 |
0a4d2ec87c3aed4fef6e7805f8bfbe19f4d3fd0e | 949 | py | Python | parlai/tasks/fvqa/build.py | ysglh/ParlAI | e0f16e9168839be12f72d3431b9819cf3d51fe10 | [
"BSD-3-Clause"
] | 2 | 2017-09-30T23:23:44.000Z | 2021-07-08T17:12:58.000Z | parlai/tasks/fvqa/build.py | ysglh/ParlAI | e0f16e9168839be12f72d3431b9819cf3d51fe10 | [
"BSD-3-Clause"
] | 1 | 2018-03-08T20:44:39.000Z | 2018-03-08T23:49:29.000Z | parlai/tasks/fvqa/build.py | ysglh/ParlAI | e0f16e9168839be12f72d3431b9819cf3d51fe10 | [
"BSD-3-Clause"
] | 1 | 2018-03-08T20:42:57.000Z | 2018-03-08T20:42:57.000Z | # This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import parlai.core.build_data as build_data
import os
def build(opt):
dpath = os.path.joi... | 37.96 | 125 | 0.695469 |
d1166ae341404c1881588a5cc84594c9e30b980e | 11,754 | py | Python | mlrun/runtimes/local.py | rpatil524/mlrun | bb2259a959f871d7a479834ddc55ad1470e6c2c0 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/local.py | rpatil524/mlrun | bb2259a959f871d7a479834ddc55ad1470e6c2c0 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/local.py | rpatil524/mlrun | bb2259a959f871d7a479834ddc55ad1470e6c2c0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Iguazio
#
# 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, softwa... | 32.469613 | 110 | 0.611707 |
907a44142ba4f9781f1a23e140e44c128ae86f7f | 101 | py | Python | python/testData/inspections/PyStringFormatInspection/UnsupportedFormatSpecifierNewStyleFormatting.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyStringFormatInspection/UnsupportedFormatSpecifierNewStyleFormatting.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyStringFormatInspection/UnsupportedFormatSpecifierNewStyleFormatting.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | print(<warning descr="Unsupported format character 'q'">'{:+q}; {:+f}'</warning>.format(3.14, -3.14)) | 101 | 101 | 0.643564 |
a509432f0086fe9e36384eea1ee00b090d2cd462 | 444 | py | Python | __init__.py | airflow-plugins/trello_plugin | a2ce09b5763d99b38617ce60321918d887b64048 | [
"Apache-2.0"
] | 5 | 2018-01-16T18:29:39.000Z | 2019-01-31T02:09:38.000Z | __init__.py | airflow-plugins/trello_plugin | a2ce09b5763d99b38617ce60321918d887b64048 | [
"Apache-2.0"
] | null | null | null | __init__.py | airflow-plugins/trello_plugin | a2ce09b5763d99b38617ce60321918d887b64048 | [
"Apache-2.0"
] | 3 | 2018-06-26T20:37:31.000Z | 2021-03-24T11:32:36.000Z | from airflow.plugins_manager import AirflowPlugin
from trello_plugin.operators.trello_to_s3_operator import TrelloToS3Operator
from trello_plugin.hooks.trello_hook import TrelloHook
class trello_plugin(AirflowPlugin):
name = "trello_plugin"
operators = [TrelloToS3Operator]
hooks = [TrelloHook]
# Leav... | 26.117647 | 76 | 0.740991 |
bf510617b403689e84275f660cd2a8894888e7a2 | 8,130 | py | Python | wofrysrw/storage_ring/light_sources/srw_gaussian_light_source.py | lucarebuffi/wofrysrw | 174bedd7f9fc9711af371743f1b13577dbf838bb | [
"MIT"
] | null | null | null | wofrysrw/storage_ring/light_sources/srw_gaussian_light_source.py | lucarebuffi/wofrysrw | 174bedd7f9fc9711af371743f1b13577dbf838bb | [
"MIT"
] | null | null | null | wofrysrw/storage_ring/light_sources/srw_gaussian_light_source.py | lucarebuffi/wofrysrw | 174bedd7f9fc9711af371743f1b13577dbf838bb | [
"MIT"
] | 2 | 2019-02-14T09:46:35.000Z | 2019-04-03T07:39:18.000Z | from wofrysrw.propagator.wavefront2D.srw_wavefront import WavefrontParameters, SRWWavefront
from wofrysrw.storage_ring.srw_light_source import SRWLightSource
from wofrysrw.storage_ring.srw_electron_beam import SRWElectronBeam
from oasys_srw.srwlib import *
'''
x = 0.0, #Transverse Coordinates of Gaussian Beam Center ... | 47.823529 | 189 | 0.621525 |
84904d61ce2b18d9f642368a7ff378e76331cfc1 | 2,764 | py | Python | build/merge_libs.py | TeamNuclear/external_chromium_org_third_party_webrtc | 5bd5c72d7c01872fea80698dac196ff9a01dfcba | [
"DOC",
"BSD-3-Clause"
] | null | null | null | build/merge_libs.py | TeamNuclear/external_chromium_org_third_party_webrtc | 5bd5c72d7c01872fea80698dac196ff9a01dfcba | [
"DOC",
"BSD-3-Clause"
] | 2 | 2019-01-16T13:52:47.000Z | 2019-02-03T11:34:44.000Z | build/merge_libs.py | TeamNuclear/external_chromium_org_third_party_webrtc | 5bd5c72d7c01872fea80698dac196ff9a01dfcba | [
"DOC",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All ... | 31.409091 | 80 | 0.660637 |
b89ffd2e83e0f81f7a9b209b16ca471d3bc8535d | 4,043 | py | Python | tests/fetch/test_base.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | tests/fetch/test_base.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | tests/fetch/test_base.py | thesamesam/pkgcore | be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf | [
"BSD-3-Clause"
] | null | null | null | import os
from functools import partial
import pytest
from pkgcore.fetch import base, errors, fetchable
from snakeoil import data_source
from snakeoil.chksum import get_handlers
repeating_str = 'asdf'
data = repeating_str * 4000
handlers = get_handlers()
from snakeoil.mappings import LazyValDict
def _callback(chf... | 35.156522 | 89 | 0.606975 |
f7c4c1cd066beac316649ce9327bb6970311e6b3 | 39,487 | py | Python | python/tvm/relay/op/strategy/generic.py | ZihengJiang/tvm-hago | 6e71860aeb502de2366ff6c39f513f16dbaf0924 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2021-06-21T06:54:58.000Z | 2021-06-21T06:54:58.000Z | python/tvm/relay/op/strategy/generic.py | ZihengJiang/tvm-hago | 6e71860aeb502de2366ff6c39f513f16dbaf0924 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2021-09-01T15:21:49.000Z | 2021-09-01T15:21:49.000Z | python/tvm/relay/op/strategy/generic.py | ZihengJiang/tvm-hago | 6e71860aeb502de2366ff6c39f513f16dbaf0924 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2021-07-03T08:09:32.000Z | 2021-07-03T08:09:32.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... | 41.829449 | 99 | 0.700813 |
e80dd85cca51ec7619e25b31762d2b433514bf81 | 496 | py | Python | Ejercicio 3/ejercicio3.py | migueliiin/Grupo | e027fbd99399a7481da14c6f9345b8ef58e50b6f | [
"Apache-2.0"
] | null | null | null | Ejercicio 3/ejercicio3.py | migueliiin/Grupo | e027fbd99399a7481da14c6f9345b8ef58e50b6f | [
"Apache-2.0"
] | null | null | null | Ejercicio 3/ejercicio3.py | migueliiin/Grupo | e027fbd99399a7481da14c6f9345b8ef58e50b6f | [
"Apache-2.0"
] | null | null | null |
from tkinter import Y
compra = float(input("compra:"))
sapo = False
while sapo == True and float(compra) > 0:
if float(compra) in range(100,500):
(compra) == compra - (compra)*(1/20)
print (compra)
sapo==True
if float(compra) >500 :
(compra) == compra -... | 23.619048 | 48 | 0.489919 |
d502d6bd7429985499035aa8a413d206a517ed7f | 2,113 | py | Python | clickhouse_sqlalchemy/alembic/toimpl.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/alembic/toimpl.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/alembic/toimpl.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | from alembic.operations import Operations
from sqlalchemy.sql.ddl import CreateColumn
from . import operations
@Operations.implementation_for(operations.CreateMatViewOp)
def create_mat_view(operations, operation):
impl = operations.impl
ddl_compiler = impl.dialect.ddl_compiler(impl.dialect, None)
text =... | 26.4125 | 74 | 0.665878 |
5f6141397f125896218271edd266c2d6aa087580 | 2,247 | py | Python | main.py | HellishMadonna/winter2020practice | db72558881ad53f66aaba138a4496188e7d7b5c0 | [
"MIT"
] | 51 | 2019-01-19T12:00:13.000Z | 2022-01-22T12:50:25.000Z | main.py | HellishMadonna/winter2020practice | db72558881ad53f66aaba138a4496188e7d7b5c0 | [
"MIT"
] | 2 | 2019-06-06T09:50:17.000Z | 2021-02-03T08:50:47.000Z | main.py | HellishMadonna/winter2020practice | db72558881ad53f66aaba138a4496188e7d7b5c0 | [
"MIT"
] | 14 | 2019-02-05T21:43:02.000Z | 2022-03-31T13:52:05.000Z | import serial, time
import datetime as dt
import numpy as np
import cv2
# function to get Emissivity from MCU
def get_emissivity():
ser.write(serial.to_bytes([0xA5,0x55,0x01,0xFB]))
read = ser.read(4)
return read[2]/100
# function to get temperatures from MCU (Celsius degrees x 100)
def get_temp_array(... | 26.75 | 127 | 0.6413 |
d6249dcb61fb1ac8cf760dfb5009404c17f6bb80 | 113 | py | Python | Code/main.py | vinicioscunha/ValidarIP | dfcc3f0d844649284e900dd40ab2d613fc25034f | [
"MIT"
] | null | null | null | Code/main.py | vinicioscunha/ValidarIP | dfcc3f0d844649284e900dd40ab2d613fc25034f | [
"MIT"
] | null | null | null | Code/main.py | vinicioscunha/ValidarIP | dfcc3f0d844649284e900dd40ab2d613fc25034f | [
"MIT"
] | null | null | null | from endereco_IP import fn_VerifyIP
str_word = input("Enter with an IP address: ")
print(fn_VerifyIP(str_word))
| 22.6 | 46 | 0.787611 |
de55e8d7b28de3261528f6bbb60db223ba02076e | 270 | py | Python | project_name/__main__.py | paulovitorweb/flask-project-template | dfe9c08b75f84fea0f2330545b72df2ea8f36757 | [
"Unlicense"
] | 41 | 2021-08-17T13:48:51.000Z | 2022-03-17T19:57:54.000Z | project_name/__main__.py | paulovitorweb/flask-project-template | dfe9c08b75f84fea0f2330545b72df2ea8f36757 | [
"Unlicense"
] | 1 | 2021-11-02T17:18:08.000Z | 2021-11-02T17:18:08.000Z | project_name/__main__.py | paulovitorweb/flask-project-template | dfe9c08b75f84fea0f2330545b72df2ea8f36757 | [
"Unlicense"
] | 10 | 2021-09-11T15:36:42.000Z | 2022-03-28T21:53:11.000Z | import click
from flask.cli import FlaskGroup
from . import create_app_wsgi
@click.group(cls=FlaskGroup, create_app=create_app_wsgi)
def main():
"""Management script for the project_name application."""
if __name__ == "__main__": # pragma: no cover
main()
| 19.285714 | 61 | 0.737037 |
0c7dc4e728eca11bec37fa09c44d44bf03a3e2cd | 4,340 | py | Python | benchmarks/benchmarks/bench_shape_base.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 20,453 | 2015-01-02T09:00:47.000Z | 2022-03-31T23:35:56.000Z | benchmarks/benchmarks/bench_shape_base.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 14,862 | 2015-01-01T01:28:34.000Z | 2022-03-31T23:48:52.000Z | benchmarks/benchmarks/bench_shape_base.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 9,362 | 2015-01-01T15:49:43.000Z | 2022-03-31T21:26:51.000Z | from .common import Benchmark
import numpy as np
class Block(Benchmark):
params = [1, 10, 100]
param_names = ['size']
def setup(self, n):
self.a_2d = np.ones((2 * n, 2 * n))
self.b_1d = np.ones(2 * n)
self.b_2d = 2 * self.a_2d
self.a = np.ones(3 * n)
self.b = np.... | 31.678832 | 95 | 0.491244 |
7582859c724ed1887125fdbc750a4490c26674da | 355 | py | Python | login/setup.py | Yurzs/L2py | 49d4f35920e0ae1c13cb494f8ae6d9c4a037c583 | [
"MIT"
] | 7 | 2020-09-01T21:52:37.000Z | 2022-02-25T16:00:08.000Z | login/setup.py | Yurzs/L2py | 49d4f35920e0ae1c13cb494f8ae6d9c4a037c583 | [
"MIT"
] | 4 | 2021-09-10T22:15:09.000Z | 2022-03-25T22:17:43.000Z | login/setup.py | Yurzs/L2py | 49d4f35920e0ae1c13cb494f8ae6d9c4a037c583 | [
"MIT"
] | 9 | 2020-09-01T21:53:39.000Z | 2022-03-30T12:03:04.000Z | from setuptools import find_packages, setup
VERSION = "0.1"
def read_requirements():
req = []
with open("requirements.txt") as requirements:
for module in requirements.readlines():
req.append(module.strip())
return req
setup(
name="login",
packages=find_packages(),
insta... | 18.684211 | 50 | 0.664789 |
8a8377f20a1b5c9a732c35b7ba82b9ec008c96aa | 7,050 | py | Python | tools/tcpconnlat.py | figozhang/bcc | 0abd93e5f908a930f87007937f4028aecc13975b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-04-30T05:05:53.000Z | 2021-04-30T05:05:53.000Z | tools/tcpconnlat.py | Agares/bcc | 0abd93e5f908a930f87007937f4028aecc13975b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tools/tcpconnlat.py | Agares/bcc | 0abd93e5f908a930f87007937f4028aecc13975b | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2018-10-30T07:57:13.000Z | 2021-06-15T02:29:44.000Z | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# tcpconnlat Trace TCP active connection latency (connect).
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: tcpconnlat [-h] [-t] [-p PID]
#
# This uses dynamic tracing of kernel functions, and will need to be updated
# to match kernel... | 30.652174 | 78 | 0.642837 |
09fd29039a704affdf58bf8bf3f74687f3c01eb6 | 2,392 | py | Python | Tests/varLib/builder_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 240 | 2021-01-11T14:49:24.000Z | 2022-03-29T22:33:49.000Z | Tests/varLib/builder_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 77 | 2021-01-12T20:23:30.000Z | 2022-03-28T12:14:34.000Z | Tests/varLib/builder_test.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 28 | 2021-01-17T05:44:11.000Z | 2022-01-11T19:58:46.000Z | from __future__ import print_function, division, absolute_import
from fontTools.varLib.builder import buildVarData
import pytest
@pytest.mark.parametrize("region_indices, items, expected_num_shorts", [
([], [], 0),
([0], [[1]], 0),
([0], [[128]], 1),
([0, 1, 2], [[128, 1, 2], [3, -129, 5], [6, 7, 8]],... | 35.176471 | 78 | 0.571488 |
0f98da06c4756c9e11af6ffa4b778e4dc354db6b | 4,272 | py | Python | scraper/get_info/query_info.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | scraper/get_info/query_info.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | scraper/get_info/query_info.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | # query_info.py - queries data from website
import requests
import bs4
from . import parse_info
def get_page_html(url):
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0'}
res = requests.get(url, headers=headers)
res.raise_for_status()
soup = b... | 35.6 | 146 | 0.702481 |
9197d779c07bee16121d3f0db4f009223772b823 | 6,356 | py | Python | opennode/cli/helpers.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 4 | 2015-05-21T20:21:26.000Z | 2020-12-18T06:50:06.000Z | opennode/cli/helpers.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | null | null | null | opennode/cli/helpers.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 1 | 2016-02-08T00:43:44.000Z | 2016-02-08T00:43:44.000Z | import types
import re
from opennode.cli import actions
from snack import Textbox, Entry, Button, Listbox, Grid, Scale, Form
from snack import ButtonBar, TextboxReflowed, CheckboxTree, GridFormHelp
from snack import ButtonChoiceWindow, ListboxChoiceWindow
class DownloadMonitor():
def __init__(self, screen, tit... | 38.756098 | 100 | 0.599748 |
d881de5972206db4d6ec919980ab6201de2d2d6c | 308 | py | Python | day04/day4_b.py | AdamKinnell/AdventOfCode2017 | 28f506a39245198489d3da9535b190e6f98e92d1 | [
"MIT"
] | null | null | null | day04/day4_b.py | AdamKinnell/AdventOfCode2017 | 28f506a39245198489d3da9535b190e6f98e92d1 | [
"MIT"
] | null | null | null | day04/day4_b.py | AdamKinnell/AdventOfCode2017 | 28f506a39245198489d3da9535b190e6f98e92d1 | [
"MIT"
] | null | null | null | def is_valid(phrase):
words = phrase.split()
word_letters = list(map("".join, map(sorted, words)))
return len(set(word_letters)) == len(words)
passphrases = open("day4.txt").readlines()
valid_phrases = list(filter(is_valid, passphrases))
print('Valid Passphrases:', len(valid_phrases)) # = 231
| 30.8 | 57 | 0.698052 |
f13ba21550ab70cad014e6b74fe05ec25854a165 | 5,243 | py | Python | bootcamp/questions/models.py | mohammed00101/newSignet | ddde897f3d01a6d91cf679f37d1eedf7b19944e9 | [
"MIT"
] | null | null | null | bootcamp/questions/models.py | mohammed00101/newSignet | ddde897f3d01a6d91cf679f37d1eedf7b19944e9 | [
"MIT"
] | null | null | null | bootcamp/questions/models.py | mohammed00101/newSignet | ddde897f3d01a6d91cf679f37d1eedf7b19944e9 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
import markdown
from bootcamp.activities.models import Activity
from bootcamp import settings
@python_2_unicode_compatible
class Question(models.Model):
user = models.Fo... | 33.825806 | 79 | 0.621019 |
a066d2de7da1b02271485e4bb1bf44086f0788c8 | 964 | py | Python | vqe_playground/utils/fonts.py | ulitoo/vqe-playground | 6a11f14e0f6a022688a4f58ea0ff68625022ed7c | [
"Apache-2.0"
] | 19 | 2019-04-12T11:11:39.000Z | 2021-09-16T18:17:59.000Z | vqe_playground/utils/fonts.py | ulitoo/vqe-playground | 6a11f14e0f6a022688a4f58ea0ff68625022ed7c | [
"Apache-2.0"
] | 8 | 2019-04-18T11:12:50.000Z | 2020-12-18T20:33:37.000Z | vqe_playground/utils/fonts.py | ulitoo/vqe-playground | 6a11f14e0f6a022688a4f58ea0ff68625022ed7c | [
"Apache-2.0"
] | 11 | 2019-04-18T10:06:57.000Z | 2021-02-03T11:28:51.000Z | #!/usr/bin/env python
#
# Copyright 2019 the original author or 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 require... | 35.703704 | 74 | 0.746888 |
bee05767e938a2497add74b5ea7986a56aff1c88 | 10,412 | py | Python | app.py | Roshanmahes/Adaptive-Schedule | 9995cf24ea6bf4279ed681c6b0a9dc6a55b634a3 | [
"MIT"
] | null | null | null | app.py | Roshanmahes/Adaptive-Schedule | 9995cf24ea6bf4279ed681c6b0a9dc6a55b634a3 | [
"MIT"
] | null | null | null | app.py | Roshanmahes/Adaptive-Schedule | 9995cf24ea6bf4279ed681c6b0a9dc6a55b634a3 | [
"MIT"
] | 2 | 2021-06-03T10:32:49.000Z | 2022-03-12T03:55:12.000Z | # imports
from logging import PlaceHolder
import dash
import dash_table as dt
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from markdown_helper import markdown_popup
import numpy as np
import pandas as pd
from adaptive_scheduling import Transi... | 47.327273 | 153 | 0.441126 |
82a2727a34d0bd4125c878228ae371f8b88abf5a | 1,277 | py | Python | Server.py | Yuwin24/Music-Sharing-App-Stage-3 | 00667d53a4ec7dd9285c993b8533744942cddd36 | [
"MIT"
] | null | null | null | Server.py | Yuwin24/Music-Sharing-App-Stage-3 | 00667d53a4ec7dd9285c993b8533744942cddd36 | [
"MIT"
] | null | null | null | Server.py | Yuwin24/Music-Sharing-App-Stage-3 | 00667d53a4ec7dd9285c993b8533744942cddd36 | [
"MIT"
] | null | null | null | import socket
from threading import Thread
import time
import os
IP_ADDRESS = '127.0.0.1'
PORT = 8050
SERVER = None
BUFFER_SIZE = 4096
clients = {}
is_dir_exists = os.path.isdir('shared_files')
print(is_dir_exists)
if(not is_dir_exists):
os.makedirs('shared_files')
def acceptConnections():
... | 21.644068 | 74 | 0.606891 |
3aec13f6c94bc913399d51f764bec22f50bfc9e2 | 1,295 | py | Python | model_map.py | bobenxia/Centripetal-SGD | e33350464504085a641a2a969d3c06e3d5cc4765 | [
"Apache-2.0"
] | 767 | 2019-10-08T01:32:47.000Z | 2022-03-27T14:39:44.000Z | model_map.py | ShawnDing1994/ACNet | 9586a269d7065805aafb8f1d69d425e84cec55f1 | [
"MIT"
] | 48 | 2019-11-04T12:05:15.000Z | 2021-11-28T06:50:30.000Z | model_map.py | ShawnDing1994/ACNet | 9586a269d7065805aafb8f1d69d425e84cec55f1 | [
"MIT"
] | 140 | 2019-10-29T07:49:24.000Z | 2022-03-27T13:01:22.000Z | from base_model.mobilenetv1 import *
from base_model.stagewise_resnet import *
from base_model.vgg import *
from base_model.lenet5 import create_lenet5bn
from base_model.wrn import create_wrnc16plain
from base_model.resnet import create_ResNet18, create_ResNet34
from base_model.cfqk import create_CFQKBNC
IMAGENET_STAN... | 29.431818 | 88 | 0.763707 |
62e32402fe64571029a5eb94e652a101e505e9c8 | 4,430 | py | Python | electrum_grs/contacts.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 9 | 2016-09-15T10:10:36.000Z | 2019-08-01T09:08:30.000Z | electrum_grs/contacts.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-10-28T08:46:00.000Z | 2019-03-15T00:59:01.000Z | electrum_grs/contacts.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-08-24T03:44:27.000Z | 2019-03-03T20:42:25.000Z | # Electrum - Lightweight Bitcoin Client
# Copyright (c) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights t... | 32.814815 | 86 | 0.573815 |
570f64394a4169a0658d6eec246415a71a43f3df | 4,215 | py | Python | test/test_static_mount.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | null | null | null | test/test_static_mount.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | null | null | null | test/test_static_mount.py | afxcn/unit | a336928e1027af92d0c9bb2ccb369a3f9b53abae | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
from pathlib import Path
import pytest
from unit.applications.proto import TestApplicationProto
class TestStaticMount(TestApplicationProto):
prerequisites = {'features': ['chroot']}
@pytest.fixture(autouse=True)
def setup_method_fixture(self, is_su, temp_dir):
if not... | 29.893617 | 76 | 0.491815 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.