hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a11c3b7310a7b1fe080a25625b730286991b423 | 1,618 | py | Python | tonguetwister/gui/chunkviews/memorymap.py | lham/tonguetwister | ae8cd1555782f2e551a5d4156d8d247e08e354e1 | [
"MIT"
] | 4 | 2021-03-06T19:26:27.000Z | 2022-02-07T16:00:01.000Z | tonguetwister/gui/chunkviews/memorymap.py | lham/tonguetwister | ae8cd1555782f2e551a5d4156d8d247e08e354e1 | [
"MIT"
] | null | null | null | tonguetwister/gui/chunkviews/memorymap.py | lham/tonguetwister | ae8cd1555782f2e551a5d4156d8d247e08e354e1 | [
"MIT"
] | null | null | null | from tonguetwister.disassembler.mappings.chunks import ChunkType
from tonguetwister.gui.chunkview import ResourceLink
from tonguetwister.gui.widgets.generic.labels import FixedSizeLinkLabel, FixedSizeLabel, InactiveFixedSizeLabel
from tonguetwister.gui.widgets.entrylistview import EntryListView, EntryView
class Memor... | 35.173913 | 111 | 0.65513 |
4a11c47573f02a66af5dac22e971ad7cc69c99f7 | 1,508 | py | Python | tests/importer/test_simple_loader.py | madman-bob/python-custom-imports | e9d6979865bfde5f149a2190d8f2895d333ab219 | [
"MIT"
] | null | null | null | tests/importer/test_simple_loader.py | madman-bob/python-custom-imports | e9d6979865bfde5f149a2190d8f2895d333ab219 | [
"MIT"
] | 1 | 2020-05-21T02:36:07.000Z | 2020-05-21T12:55:24.000Z | tests/importer/test_simple_loader.py | madman-bob/python-custom-imports | e9d6979865bfde5f149a2190d8f2895d333ab219 | [
"MIT"
] | null | null | null | import sys
from dataclasses import dataclass
from unittest import TestCase
from custom_imports.importer import Module, ModuleSpec, SimpleLoader
PY_36 = sys.version_info[:2] == (3, 6)
class TestSimpleLoader(TestCase):
def test_simple_loader(self):
@dataclass
class SimpleModule:
value:... | 29.568627 | 75 | 0.605438 |
4a11c496d40f241232e1318ce2568f8d4169443f | 2,918 | py | Python | tests/skip_test_velomesh.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | 5 | 2018-10-26T07:08:16.000Z | 2019-05-10T06:47:37.000Z | tests/skip_test_velomesh.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | 9 | 2018-11-09T08:50:48.000Z | 2019-06-06T20:11:12.000Z | tests/skip_test_velomesh.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | null | null | null | import unittest
import sys
sys.path.append('python')
import numpy as np
import plasmatools as plasma
class Params:
mins = None
maxs = None
lens = None
def cellID2index(cellID, dvs):
cellID -= 1
k = np.int( ( cellID / (dvs[0] * dvs[1]) ) )
j = np.int( ( cellID / dvs[0] ) % dvs[1] )
... | 21.614815 | 79 | 0.53427 |
4a11c5156a6d7468d88c1730648d6f3e7faab9cf | 18,946 | py | Python | tools/grit/grit/node/base.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T15:35:17.000Z | 2016-05-08T15:35:17.000Z | tools/grit/grit/node/base.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | tools/grit/grit/node/base.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2.4
# Copyright (c) 2006-2008 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.
'''Base types for nodes in a GRIT resource tree.
'''
import os
import types
from xml.sax import saxutils
from grit import exc... | 36.087619 | 81 | 0.649425 |
4a11c53e53027d30026380006f70834ae292e1e3 | 245 | py | Python | map_matching/map_match.py | ianberg-volpe/map_matching | 5f3db9f9adae0320dfbb7b39b8f0f9dc0ebe82a5 | [
"Apache-2.0"
] | 30 | 2017-05-15T01:43:36.000Z | 2022-03-30T14:11:08.000Z | map_matching/map_match.py | ianberg-volpe/map_matching | 5f3db9f9adae0320dfbb7b39b8f0f9dc0ebe82a5 | [
"Apache-2.0"
] | 7 | 2018-01-06T08:11:57.000Z | 2020-08-26T04:24:52.000Z | map_matching/map_match.py | ianberg-volpe/map_matching | 5f3db9f9adae0320dfbb7b39b8f0f9dc0ebe82a5 | [
"Apache-2.0"
] | 7 | 2018-01-14T21:28:15.000Z | 2022-03-22T07:11:29.000Z | from find_stops import find_stops
from finding_network_links import find_network_links
from finding_routes import find_route
def map_match(trip, network):
find_stops(trip)
find_network_links(trip, network)
find_route(trip, network) | 27.222222 | 52 | 0.816327 |
4a11c7ec3999e399036183173f4825d6496e7188 | 565 | py | Python | molsysmt/item/mdtraj_Trajectory/to_mdtraj_Topology.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/item/mdtraj_Trajectory/to_mdtraj_Topology.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | molsysmt/item/mdtraj_Trajectory/to_mdtraj_Topology.py | uibcdf/MolModMTs | 4f6b6f671a9fa3e73008d1e9c48686d5f20a6573 | [
"MIT"
] | null | null | null | from molsysmt._private.digestion import digest_item, digest_atom_indices, digest_structure_indices
def to_mdtraj_Topology(item, atom_indices='all', check=True):
if check:
digest_item(item, 'mdtraj.Trajectory')
atom_indices = digest_atom_indices(atom_indices)
structure_indices = digest_str... | 31.388889 | 98 | 0.780531 |
4a11ca051e41910990713008f3efa645e7405a08 | 7,472 | py | Python | esprima/tokenizer.py | SeaHOH/esprima-python | a72db2895a991b88141ee2ee4870f9d41d344220 | [
"BSD-2-Clause"
] | 174 | 2017-07-18T12:02:37.000Z | 2022-03-10T21:04:41.000Z | esprima/tokenizer.py | SeaHOH/esprima-python | a72db2895a991b88141ee2ee4870f9d41d344220 | [
"BSD-2-Clause"
] | 17 | 2017-08-15T14:50:34.000Z | 2022-02-05T22:51:27.000Z | esprima/tokenizer.py | SeaHOH/esprima-python | a72db2895a991b88141ee2ee4870f9d41d344220 | [
"BSD-2-Clause"
] | 43 | 2017-08-17T06:15:14.000Z | 2022-02-05T23:02:27.000Z | # -*- coding: utf-8 -*-
# Copyright JS Foundation and other contributors, https://js.foundation/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# ... | 38.515464 | 106 | 0.54644 |
4a11cab9f2dbb435f508413de0aad50366fc5dfc | 3,858 | py | Python | histogram/scripts/3_estimateResults.py | KastnerRG/spector | a24a9cc1e25128430adbea0481b5d223e5cf649c | [
"BSD-3-Clause"
] | 45 | 2017-03-31T07:28:08.000Z | 2022-02-08T20:28:33.000Z | histogram/scripts/3_estimateResults.py | kongqi-best/spector | a24a9cc1e25128430adbea0481b5d223e5cf649c | [
"BSD-3-Clause"
] | 4 | 2017-05-17T19:35:51.000Z | 2018-05-23T18:09:10.000Z | histogram/scripts/3_estimateResults.py | kongqi-best/spector | a24a9cc1e25128430adbea0481b5d223e5cf649c | [
"BSD-3-Clause"
] | 21 | 2016-11-25T02:40:00.000Z | 2021-09-06T09:29:37.000Z | #!/usr/bin/python
# ----------------------------------------------------------------------
# Copyright (c) 2016, The Regents of the University of California All
# rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | 31.884298 | 133 | 0.659668 |
4a11ceb0d4e69ee0b072bbc770c7452057d25d43 | 983 | py | Python | dfas/migrations/0001_initial.py | sumeyyekilic/FoursquareAPI_DjangoApp | 91e9376cd6a47bcf090e27181df562a38883e93a | [
"PostgreSQL"
] | 1 | 2020-02-23T20:11:11.000Z | 2020-02-23T20:11:11.000Z | dfas/migrations/0001_initial.py | sumeyyekilic/FoursquareAPI_DjangoApp | 91e9376cd6a47bcf090e27181df562a38883e93a | [
"PostgreSQL"
] | 10 | 2019-12-08T19:27:10.000Z | 2021-06-10T19:31:02.000Z | dfas/migrations/0001_initial.py | sumeyyekilic/FoursquareAPI_DjangoApp | 91e9376cd6a47bcf090e27181df562a38883e93a | [
"PostgreSQL"
] | null | null | null | # Generated by Django 2.2.4 on 2019-11-29 09:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 35.107143 | 141 | 0.645982 |
4a11ceb966bca89316308899f5e637f080d2b1ca | 4,057 | py | Python | src/biokbase/narrative/handlers/authhandlers.py | pranjan77/narrative | 5714d199c7ca3d65cbfc1110b3d0641e250e62f9 | [
"MIT"
] | null | null | null | src/biokbase/narrative/handlers/authhandlers.py | pranjan77/narrative | 5714d199c7ca3d65cbfc1110b3d0641e250e62f9 | [
"MIT"
] | 220 | 2020-07-13T11:13:03.000Z | 2022-03-28T11:01:18.000Z | src/biokbase/narrative/handlers/authhandlers.py | pranjan77/narrative | 5714d199c7ca3d65cbfc1110b3d0641e250e62f9 | [
"MIT"
] | null | null | null | from tornado.escape import url_escape
from notebook.base.handlers import IPythonHandler
from traitlets.config import Application
from notebook.auth.login import LoginHandler
from notebook.auth.logout import LogoutHandler
from biokbase.narrative.common.kblogging import (
get_logger, log_event
)
from biokbase.narrati... | 31.695313 | 109 | 0.640868 |
4a11cfef817bb462c45702f37739585785621eb4 | 10,574 | py | Python | vissl/utils/extract_features_utils.py | dmitryvinn/vissl-1 | 1d8befefbbeabf9fec6a34b4581080d4221fde9d | [
"MIT"
] | null | null | null | vissl/utils/extract_features_utils.py | dmitryvinn/vissl-1 | 1d8befefbbeabf9fec6a34b4581080d4221fde9d | [
"MIT"
] | null | null | null | vissl/utils/extract_features_utils.py | dmitryvinn/vissl-1 | 1d8befefbbeabf9fec6a34b4581080d4221fde9d | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import re
from typing import List, NamedTuple
import numpy as np
from iopath.common.file_io import g_pathmgr
from vi... | 36.843206 | 95 | 0.610365 |
4a11d09f6ffe7aa94ba4032abb78b66f619c3da4 | 10,235 | py | Python | crf-seq/sets/sets/4/seq_detect_1i.py | roma-patel/lstm-crf | 25012b1218b60090f467fe5ed5a15d7a28b3134c | [
"Apache-2.0"
] | 1 | 2020-02-24T06:25:17.000Z | 2020-02-24T06:25:17.000Z | crf-seq/sets/sets/4/seq_detect_1i.py | roma-patel/lstm-crf | 25012b1218b60090f467fe5ed5a15d7a28b3134c | [
"Apache-2.0"
] | null | null | null | crf-seq/sets/sets/4/seq_detect_1i.py | roma-patel/lstm-crf | 25012b1218b60090f467fe5ed5a15d7a28b3134c | [
"Apache-2.0"
] | null | null | null | import pycrfsuite
import sklearn
from itertools import chain
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.preprocessing import LabelBinarizer
import re
import json
annotypes = ['Participants', 'Intervention', 'Outcome']
annotype = annotypes[1]
path = '/nlp/data/romap/crf/'
#path = '... | 37.907407 | 130 | 0.575965 |
4a11d0e1870f4cdd24111b8a58401e82ead5dbd9 | 384 | py | Python | munge_image_windows.py | tobyriddell/self-driving-car | 48d2ef0590fed9201a6c59fb44db6b7e913d7130 | [
"MIT"
] | null | null | null | munge_image_windows.py | tobyriddell/self-driving-car | 48d2ef0590fed9201a6c59fb44db6b7e913d7130 | [
"MIT"
] | null | null | null | munge_image_windows.py | tobyriddell/self-driving-car | 48d2ef0590fed9201a6c59fb44db6b7e913d7130 | [
"MIT"
] | null | null | null | import os
import cv2
import numpy as np
path = 'C:\\Users\\toby\\Downloads\\self-driving-car\\training_images_3'
os.chdir(path)
img = cv2.imread("training_image_1502733794000_left.png")
img = img[240:480, 0:640]
img = cv2.blur(img, (5, 5))
b,g,r = cv2.split(img)
img = b
retval, img = cv2.threshold... | 19.2 | 73 | 0.669271 |
4a11d0fb0ca0a24db2947d0fcb8c76dedef5db7c | 6,390 | py | Python | tests/python/unittest/test_auto_scheduler_layout_rewrite.py | cgerum/incubator-tvm | 01b98c1d9c59c1b75078599248bfc5cae3f93974 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | tests/python/unittest/test_auto_scheduler_layout_rewrite.py | cgerum/incubator-tvm | 01b98c1d9c59c1b75078599248bfc5cae3f93974 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | tests/python/unittest/test_auto_scheduler_layout_rewrite.py | cgerum/incubator-tvm | 01b98c1d9c59c1b75078599248bfc5cae3f93974 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # 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... | 37.368421 | 100 | 0.658216 |
4a11d18cac545e74e72448b3a2de99c549c511ca | 792 | pyde | Python | class05-06/paint/paint.pyde | Wuradclan/programming-course | d87f9f5567d9f46d2213079e061bde8820cd5712 | [
"MIT"
] | 7 | 2019-11-26T18:23:08.000Z | 2020-06-14T17:56:33.000Z | class05-06/paint/paint.pyde | Wuradclan/programming-course | d87f9f5567d9f46d2213079e061bde8820cd5712 | [
"MIT"
] | null | null | null | class05-06/paint/paint.pyde | Wuradclan/programming-course | d87f9f5567d9f46d2213079e061bde8820cd5712 | [
"MIT"
] | 4 | 2019-12-10T20:01:01.000Z | 2020-02-25T18:12:07.000Z | stroke_width = 5
def setup():
size(400, 400)
background(255)
def draw():
global stroke_width
delta = .5
if keyPressed:
if keyCode == DOWN:
stroke_width = stroke_width - delta
if keyCode == UP:
stroke_width = stroke_width + delta
if stroke_w... | 22 | 61 | 0.510101 |
4a11d1f769fb0278c23e2d8ef56a076fbec26e6e | 923 | py | Python | release/stubs.min/System/ComponentModel/__init___parts/ComponentEditor.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/ComponentModel/__init___parts/ComponentEditor.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/ComponentModel/__init___parts/ComponentEditor.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class ComponentEditor(object):
""" Provides the base class for a custom component editor. """
def EditComponent(self, *__args):
"""
EditComponent(self: ComponentEditor,context: ITypeDescriptorContext,component: object) -> bool
Edits the component and returns a value indicating whethe... | 24.945946 | 102 | 0.696641 |
4a11d396bdd831fb625f524d6aeb06524351c98a | 2,983 | py | Python | contrib/testgen/base58.py | bitcoin-black/bitcoinblack | ad87d315c635ef439d4664da46e6672153f91b79 | [
"MIT"
] | null | null | null | contrib/testgen/base58.py | bitcoin-black/bitcoinblack | ad87d315c635ef439d4664da46e6672153f91b79 | [
"MIT"
] | null | null | null | contrib/testgen/base58.py | bitcoin-black/bitcoinblack | ad87d315c635ef439d4664da46e6672153f91b79 | [
"MIT"
] | null | null | null | # Copyright (c) 2012-2017 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
DigiByte base58 encoding and decoding.
Based on https://digibytetalk.org/index.php?topic=1026.0 (public domain)
'''
import ... | 27.878505 | 97 | 0.639625 |
4a11d4025591dc0e69f2c3e25faea8cc04a01783 | 800 | py | Python | mysite/urls.py | Amos-lii/404Lab04 | fe7dc13ef033b8e43ff2d5354734c2112c4befe1 | [
"Apache-2.0"
] | null | null | null | mysite/urls.py | Amos-lii/404Lab04 | fe7dc13ef033b8e43ff2d5354734c2112c4befe1 | [
"Apache-2.0"
] | null | null | null | mysite/urls.py | Amos-lii/404Lab04 | fe7dc13ef033b8e43ff2d5354734c2112c4befe1 | [
"Apache-2.0"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 33.333333 | 77 | 0.7025 |
4a11d41c7b42d9f4de45cd62103d793a861b32b3 | 395 | py | Python | test/test_block.py | micetti/TweetsOnBlocks | e9355a0d35c0bfe1755d80fc64ae2d781c762e30 | [
"MIT"
] | null | null | null | test/test_block.py | micetti/TweetsOnBlocks | e9355a0d35c0bfe1755d80fc64ae2d781c762e30 | [
"MIT"
] | null | null | null | test/test_block.py | micetti/TweetsOnBlocks | e9355a0d35c0bfe1755d80fc64ae2d781c762e30 | [
"MIT"
] | null | null | null | from blockchain.block import Block
class TestBlock:
def test_block_setup(self):
previous_hash = '0000000000000000000000000000000000000000000000000000000000000000'
block = Block(0, previous_hash, 'TestBlock')
assert block.index == 0
assert block.previous_hash == previous_hash
... | 26.333333 | 90 | 0.696203 |
4a11d490759fc42486cda38198fe65ad3dd32a52 | 1,657 | py | Python | sina_login/sina_login_by_selenium.py | wtus/smart_login | 436b43a36f1a9e50c2ca38ab3488ff670edde88f | [
"MIT"
] | 1 | 2017-09-01T07:11:33.000Z | 2017-09-01T07:11:33.000Z | sina_login/sina_login_by_selenium.py | wtus/smart_login | 436b43a36f1a9e50c2ca38ab3488ff670edde88f | [
"MIT"
] | null | null | null | sina_login/sina_login_by_selenium.py | wtus/smart_login | 436b43a36f1a9e50c2ca38ab3488ff670edde88f | [
"MIT"
] | 1 | 2019-10-28T15:39:57.000Z | 2019-10-28T15:39:57.000Z | import re
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
def login(account, passwd, url):
... | 26.301587 | 105 | 0.71213 |
4a11d4a355143fb2ef3ccb4981fe7f03124fa2c8 | 48,643 | py | Python | labelfactory/labeling/datamanager.py | Orieus/one_def_classification | 3269290e1fa06ec104a38810c5dffa5401f34ef1 | [
"MIT"
] | null | null | null | labelfactory/labeling/datamanager.py | Orieus/one_def_classification | 3269290e1fa06ec104a38810c5dffa5401f34ef1 | [
"MIT"
] | null | null | null | labelfactory/labeling/datamanager.py | Orieus/one_def_classification | 3269290e1fa06ec104a38810c5dffa5401f34ef1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python libraries
from __future__ import print_function
import os
import sys
# import cPickle as pickle
import pickle
import json
import shutil
import pandas as pd
import numpy as np
# import copy
import time
from datetime import datetime
from pymongo ... | 40.16763 | 80 | 0.509816 |
4a11d4ac72167965bae7590b44f1a621c792e1eb | 506 | py | Python | setup.py | nhuthai/SAN | f35ab6b48947ad8663b722a13a60c8769357893e | [
"MIT"
] | null | null | null | setup.py | nhuthai/SAN | f35ab6b48947ad8663b722a13a60c8769357893e | [
"MIT"
] | null | null | null | setup.py | nhuthai/SAN | f35ab6b48947ad8663b722a13a60c8769357893e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='SAN',
version='0.0',
author='Nhut Hai Huynh',
author_email='nhut.h.huynh@fh-kiel.de',
packages=find_packages(),
install_requires=[
'click',
'colorama',
'matplotlib',
'natsort',
... | 18.071429 | 43 | 0.533597 |
4a11d5009d5bb312d284002e2c59ce212109531d | 1,624 | py | Python | alipay/aop/api/response/MybankPaymentTradeNormalpayTransferResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/MybankPaymentTradeNormalpayTransferResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/MybankPaymentTradeNormalpayTransferResponse.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class MybankPaymentTradeNormalpayTransferResponse(AlipayResponse):
def __init__(self):
super(MybankPaymentTradeNormalpayTransferResponse, self).__init__()
self._order_no = ... | 29 | 116 | 0.676724 |
4a11d5857cea1f9b0e2951b5de9a348cf4dfd27b | 2,406 | py | Python | edward2/tensorflow/losses_test.py | google/edward2 | 5574e773ca4ff5f36a5d9bf3b75ac8505973aa4b | [
"Apache-2.0"
] | 591 | 2019-08-13T20:48:00.000Z | 2022-03-31T03:34:32.000Z | edward2/tensorflow/losses_test.py | google/edward2 | 5574e773ca4ff5f36a5d9bf3b75ac8505973aa4b | [
"Apache-2.0"
] | 162 | 2019-08-15T00:39:09.000Z | 2022-03-25T07:19:15.000Z | edward2/tensorflow/losses_test.py | google/edward2 | 5574e773ca4ff5f36a5d9bf3b75ac8505973aa4b | [
"Apache-2.0"
] | 78 | 2019-08-13T20:45:13.000Z | 2022-03-10T11:54:18.000Z | # coding=utf-8
# Copyright 2021 The Edward2 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 o... | 34.371429 | 79 | 0.692436 |
4a11d624c369e7e52d4025f1e90770267d1b2a6b | 2,041 | py | Python | profiles_api/models.py | vasicbre/profiles-rest-api | 6487199e70ed05a6f8a3786b0a543a0414167163 | [
"MIT"
] | null | null | null | profiles_api/models.py | vasicbre/profiles-rest-api | 6487199e70ed05a6f8a3786b0a543a0414167163 | [
"MIT"
] | 8 | 2019-12-04T23:48:45.000Z | 2022-02-10T15:58:17.000Z | profiles_api/models.py | vasicbre/profiles-rest-api | 6487199e70ed05a6f8a3786b0a543a0414167163 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def cr... | 30.462687 | 66 | 0.682999 |
4a11d624d88df1b7ce9b546957f89cc1b088f47d | 15,357 | py | Python | nltk/inference/prover9.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | 3 | 2017-03-07T10:54:56.000Z | 2019-10-18T20:36:56.000Z | nltk/inference/prover9.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | null | null | null | nltk/inference/prover9.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: Interface to the Prover9 Theorem Prover
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Dan Garrette <dhgarrette@gmail.com>
# Ewan Klein <ewan@inf.ed.ac.uk>
#
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
A theorem prover that makes use of the extern... | 35.880841 | 101 | 0.573094 |
4a11d653bc58e03daf03e07b4ac573455efce68b | 1,855 | py | Python | jet_bridge/utils/settings.py | kingemma0430/jet-bridge | 7cb68a0232850c28ebf9c474b031db507845feb5 | [
"MIT"
] | 2 | 2020-07-27T22:18:42.000Z | 2021-11-15T10:03:14.000Z | jet_bridge/utils/settings.py | kingemma0430/jet-bridge | 7cb68a0232850c28ebf9c474b031db507845feb5 | [
"MIT"
] | null | null | null | jet_bridge/utils/settings.py | kingemma0430/jet-bridge | 7cb68a0232850c28ebf9c474b031db507845feb5 | [
"MIT"
] | null | null | null | import os
from six.moves import configparser
from tornado.options import Error
def parse_environment(self, final=True):
for name in os.environ:
normalized = self._normalize_name(name)
normalized = normalized.lower()
if normalized in self._options:
option = self._options[normal... | 37.1 | 83 | 0.568733 |
4a11d831e8def86905738dc15ddebd7faaba21cd | 638 | py | Python | NotificationSystem/manage.py | ValentinaRodrigues/notification-system | 35dbcea4e72d5e1f8cd5d4f5a435d83905611f31 | [
"MIT"
] | 2 | 2020-03-14T22:03:48.000Z | 2020-04-07T14:04:50.000Z | NotificationSystem/manage.py | ValentinaRodrigues/notification-system | 35dbcea4e72d5e1f8cd5d4f5a435d83905611f31 | [
"MIT"
] | null | null | null | NotificationSystem/manage.py | ValentinaRodrigues/notification-system | 35dbcea4e72d5e1f8cd5d4f5a435d83905611f31 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'NotificationSystem.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
r... | 29 | 82 | 0.688088 |
4a11d8600507902864884470a5d40861fe7551e1 | 853 | py | Python | shopping_app/db/managers/manager.py | gr1d99/flask-shopping-list | de5aa20b3378eb63e040440da77afd79c48f2fd6 | [
"MIT"
] | 1 | 2017-10-16T17:09:30.000Z | 2017-10-16T17:09:30.000Z | shopping_app/db/managers/manager.py | gr1d99/flask-shopping-list | de5aa20b3378eb63e040440da77afd79c48f2fd6 | [
"MIT"
] | 5 | 2017-09-19T07:50:11.000Z | 2021-06-01T21:54:45.000Z | shopping_app/db/managers/manager.py | gr1d99/flask-shopping-list | de5aa20b3378eb63e040440da77afd79c48f2fd6 | [
"MIT"
] | 1 | 2017-09-29T07:37:37.000Z | 2017-09-29T07:37:37.000Z | """Contain User class managers"""
from ..user import User
from .base_manager import BaseUserManager
class UserManager(BaseUserManager):
"""a manager class for User class, responsible for creation of user instances"""
def __init__(self):
super(UserManager, self).__init__()
self.model = User()
... | 31.592593 | 84 | 0.644783 |
4a11d92706ff48f356d251b9a8a902bfdd3d6374 | 9,973 | py | Python | official/vision/beta/modeling/retinanet_model_test.py | agentmorris/models | f2d90e1a1e146420dceff439cf1ecc2162c7a103 | [
"Apache-2.0"
] | 2 | 2017-10-26T06:23:51.000Z | 2020-09-11T21:09:41.000Z | official/vision/beta/modeling/retinanet_model_test.py | whittyman98/models | 3dacd474364813781c0154d881055502ce09d79c | [
"Apache-2.0"
] | 2 | 2018-06-18T17:08:12.000Z | 2021-04-12T05:39:04.000Z | official/vision/beta/modeling/retinanet_model_test.py | whittyman98/models | 3dacd474364813781c0154d881055502ce09d79c | [
"Apache-2.0"
] | 2 | 2020-04-11T19:31:17.000Z | 2021-04-07T12:53:28.000Z | # Copyright 2021 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... | 33.80678 | 80 | 0.652762 |
4a11d9a7e669ca3a5cc23d51b2487250e6f4c09e | 2,165 | py | Python | python-client/test/test_deleted.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | 2 | 2017-03-02T13:12:24.000Z | 2017-10-22T10:31:09.000Z | python-client/test/test_deleted.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | python-client/test/test_deleted.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
kinto
Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ... | 40.092593 | 938 | 0.725635 |
4a11da0857aa04533906984d1f9e8bb4859219a6 | 711 | py | Python | diamond_agent/tests/test.py | cloudify-cosmo/cloudify-diamond-plugin | 2d5cd1bbb8e5b272d13b26e3ddd45759cde5e8a7 | [
"Apache-2.0"
] | 4 | 2016-02-28T17:01:34.000Z | 2019-07-15T08:01:19.000Z | diamond_agent/tests/test.py | cloudify-cosmo/cloudify-diamond-plugin | 2d5cd1bbb8e5b272d13b26e3ddd45759cde5e8a7 | [
"Apache-2.0"
] | 5 | 2015-10-06T14:46:24.000Z | 2020-09-10T05:49:43.000Z | diamond_agent/tests/test.py | cloudify-cosmo/cloudify-diamond-plugin | 2d5cd1bbb8e5b272d13b26e3ddd45759cde5e8a7 | [
"Apache-2.0"
] | 10 | 2015-01-21T17:10:36.000Z | 2019-07-22T06:30:28.000Z | #########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... | 33.857143 | 77 | 0.745429 |
4a11db681d16eb178c4c9000e616df78c3ead4d5 | 8,053 | py | Python | openpeerpower/helpers/storage.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/helpers/storage.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/helpers/storage.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Helper to help store data."""
from __future__ import annotations
import asyncio
from contextlib import suppress
from json import JSONEncoder
import logging
import os
from typing import Any, Callable
from openpeerpower.const import EVENT_OPENPEERPOWER_FINAL_WRITE
from openpeerpower.core import CALLBACK_TYPE, CoreSt... | 32.869388 | 88 | 0.637402 |
4a11dc0cf42f1592a46c0600f2b230d7174e4baf | 6,624 | py | Python | zerver/templatetags/app_filters.py | Wowol/zulip | b46d1c8d07279987fc0cbf06aec419c43b830e44 | [
"Apache-2.0"
] | null | null | null | zerver/templatetags/app_filters.py | Wowol/zulip | b46d1c8d07279987fc0cbf06aec419c43b830e44 | [
"Apache-2.0"
] | null | null | null | zerver/templatetags/app_filters.py | Wowol/zulip | b46d1c8d07279987fc0cbf06aec419c43b830e44 | [
"Apache-2.0"
] | 1 | 2020-07-06T11:43:28.000Z | 2020-07-06T11:43:28.000Z | from typing import Any, Dict, List, Optional
import markdown
import markdown.extensions.admonition
import markdown.extensions.codehilite
import markdown.extensions.extra
import markdown.extensions.toc
from django.template import Library, engines
from django.utils.safestring import mark_safe
from jinja2.exceptions impo... | 41.660377 | 98 | 0.695954 |
4a11df11c2df455410fb8ef2d3816bca436db696 | 278 | py | Python | Design Lab/designLab09/tk.py | huangyz0918/MIT-EECS-6.01 | 4856cc17a306760d6e79b7dc22696a795b518c2c | [
"MIT"
] | 1 | 2021-04-22T09:39:17.000Z | 2021-04-22T09:39:17.000Z | Design Lab/designLab09/tk.py | huangyz0918/MIT-EECS-6.01 | 4856cc17a306760d6e79b7dc22696a795b518c2c | [
"MIT"
] | null | null | null | Design Lab/designLab09/tk.py | huangyz0918/MIT-EECS-6.01 | 4856cc17a306760d6e79b7dc22696a795b518c2c | [
"MIT"
] | 2 | 2020-06-19T11:17:55.000Z | 2020-11-12T08:43:57.000Z | import Tkinter
if not globals().has_key('__tk_inited'):
global __tk_inited
__tk_inited = False
def init():
global __tk_inited
if not __tk_inited:
w = Tkinter.Tk()
w.withdraw()
def setInited():
global __tk_inited
__tk_inited = True
| 17.375 | 40 | 0.643885 |
4a11dfdce27c518e2c082d303c1ca51c05d23eca | 157 | py | Python | py/t2/demo2.py | firekyrin/train-demo | a949a461bb9324fc2732cdf80c42c26379442c96 | [
"MIT"
] | null | null | null | py/t2/demo2.py | firekyrin/train-demo | a949a461bb9324fc2732cdf80c42c26379442c96 | [
"MIT"
] | null | null | null | py/t2/demo2.py | firekyrin/train-demo | a949a461bb9324fc2732cdf80c42c26379442c96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import re
sentence = "from 12/22/1629 to 11/14/1643"
a2 = re.sub(r'(\d{2})/(\d{2})/(\d{4})', r'\3-\1-\2', sentence)
print "a2=", a2
| 17.444444 | 62 | 0.56051 |
4a11e00821b6764b79f67b2617996595e985c165 | 2,408 | py | Python | src/main/python/rpcserver/server.py | iottyys/ttyys-core | 241942245c3d1bcf46c533a6fb221df4a0eddfc7 | [
"MIT"
] | null | null | null | src/main/python/rpcserver/server.py | iottyys/ttyys-core | 241942245c3d1bcf46c533a6fb221df4a0eddfc7 | [
"MIT"
] | null | null | null | src/main/python/rpcserver/server.py | iottyys/ttyys-core | 241942245c3d1bcf46c533a6fb221df4a0eddfc7 | [
"MIT"
] | null | null | null | # -*-coding:utf-8-*-
import psutil
import time
from threading import Thread
import socketserver
from socketserver import TCPServer, ThreadingMixIn
from typing import Tuple
from enum import Enum, unique
from rpcserver.avro.proxy import AvroProxyFactory
from rpcserver.logger import logger
from rpcserver.protobuf import... | 30.481013 | 86 | 0.658638 |
4a11e0345f6dde948bf8d03296dfa83ae98a612e | 2,382 | py | Python | aiohttp_devtools/start/main.py | Dreamsorcerer/aiohttp-devtools | b5e9ffa9a9077d224640e6aad92cc5e0798d4ab7 | [
"MIT"
] | null | null | null | aiohttp_devtools/start/main.py | Dreamsorcerer/aiohttp-devtools | b5e9ffa9a9077d224640e6aad92cc5e0798d4ab7 | [
"MIT"
] | null | null | null | aiohttp_devtools/start/main.py | Dreamsorcerer/aiohttp-devtools | b5e9ffa9a9077d224640e6aad92cc5e0798d4ab7 | [
"MIT"
] | null | null | null | import base64
import os
import re
from pathlib import Path
from ..exceptions import AiohttpDevConfigError
from ..logs import main_logger as logger
THIS_DIR = Path(__file__).parent
TEMPLATE_DIR = THIS_DIR / 'template'
def check_dir_clean(d: Path):
if d.exists():
existing_paths = {p.name for p in d.iterdi... | 35.029412 | 107 | 0.601175 |
4a11e06767dad48d13e9726c97daa19157063ab7 | 360 | py | Python | codebase/Exposure Fusion/MRB/utils.py | SecretMG/NTIRE21 | 1d22afc46a792f56693e32ed5df484fd910aa056 | [
"MIT"
] | null | null | null | codebase/Exposure Fusion/MRB/utils.py | SecretMG/NTIRE21 | 1d22afc46a792f56693e32ed5df484fd910aa056 | [
"MIT"
] | null | null | null | codebase/Exposure Fusion/MRB/utils.py | SecretMG/NTIRE21 | 1d22afc46a792f56693e32ed5df484fd910aa056 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
INF = 255
def readImageSeq(locations):
assert len(locations) > 1 # 至少要读到多于1张图片
imgs = []
for loc in locations:
img = cv.imread(loc, 1)
# img = cv.resize(img, (1024, 512))
# cv.imwrite(loc, img)
imgs.append(img)
imgs = np.asarray(im... | 17.142857 | 44 | 0.591667 |
4a11e10c5e26b44e9feb1dabc3664ddf0410685a | 12,252 | py | Python | plasTeX/Renderers/ManPage/__init__.py | perfectbark/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | 23 | 2019-06-16T06:00:39.000Z | 2022-03-29T14:44:32.000Z | plasTeX/Renderers/ManPage/__init__.py | hao-han/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | null | null | null | plasTeX/Renderers/ManPage/__init__.py | hao-han/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | 12 | 2019-05-27T06:32:06.000Z | 2022-03-15T10:22:07.000Z | #!/usr/bin/env python
from plasTeX.Renderers import Renderer as BaseRenderer
import textwrap, re, string
class ManPageRenderer(BaseRenderer):
""" Renderer for UNIX man pages """
outputType = unicode
fileExtension = '.man'
aliases = {
'superscript': 'active::^',
'subscript': 'acti... | 27.046358 | 118 | 0.550522 |
4a11e163090f18dd2f82d7219e74f1fb6a891b92 | 2,579 | py | Python | telegram_bot/buttons.py | brain4tech/b4t-python-telegram-bot | f7b9e300ab25ecf5a6ee05976c42034d12fe93e3 | [
"MIT"
] | null | null | null | telegram_bot/buttons.py | brain4tech/b4t-python-telegram-bot | f7b9e300ab25ecf5a6ee05976c42034d12fe93e3 | [
"MIT"
] | null | null | null | telegram_bot/buttons.py | brain4tech/b4t-python-telegram-bot | f7b9e300ab25ecf5a6ee05976c42034d12fe93e3 | [
"MIT"
] | null | null | null | # classes for inline and reply keyboards
class InlineButton:
def __init__(self, text_, callback_data_ = "", url_=""):
self.text = text_
self.callback_data = callback_data_
self.url = url_
if not self.callback_data and not self.url:
raise TypeError("Either callback_data ... | 29.988372 | 98 | 0.625436 |
4a11e24837291efd30ace0220238b4a375920855 | 4,841 | py | Python | user_mgmt/handler.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | 1 | 2021-09-23T14:39:36.000Z | 2021-09-23T14:39:36.000Z | user_mgmt/handler.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | 38 | 2020-08-31T22:53:09.000Z | 2022-03-28T20:55:39.000Z | user_mgmt/handler.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | null | null | null | from collections import defaultdict
import logging
from tornado.web import HTTPError
from tornado.escape import json_decode, json_encode
from rest_tools.server import RestHandler
import krs.email
from krs.users import user_info
class MyHandler(RestHandler):
def initialize(self, db=None, krs_client=None, group_c... | 40.008264 | 109 | 0.587482 |
4a11e282864d953baa87ba0d3d6f0a1c9a7dc90a | 170 | py | Python | scripts/item/consume_2435430.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2435430.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/item/consume_2435430.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | # Blue Fire Damage Skin
success = sm.addDamageSkin(2435430)
if success:
sm.chat("The Blue Fire Damage Skin has been added to your account's damage skin collection.")
| 34 | 97 | 0.758824 |
4a11e2b4ef0ee87c11936fd54319aea26366481f | 1,365 | py | Python | JobGenie/urls.py | atharvaze/Algorithm-6.0 | 2f47a5e0b260b128195f23b6a722cad5aa591134 | [
"MIT"
] | null | null | null | JobGenie/urls.py | atharvaze/Algorithm-6.0 | 2f47a5e0b260b128195f23b6a722cad5aa591134 | [
"MIT"
] | 2 | 2020-06-06T01:33:51.000Z | 2021-06-10T22:38:26.000Z | JobGenie/urls.py | atharvaze/Algorithm-6.0 | 2f47a5e0b260b128195f23b6a722cad5aa591134 | [
"MIT"
] | null | null | null | """JobGenie URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 39 | 91 | 0.732601 |
4a11e3a65d55cec50cf4815daa3d96b88f96d98d | 3,481 | py | Python | third-party/thrift/src/thrift/compiler/test/compiler_test.py | hkirsman/hhvm_centos7_builds | 2a1fd6de0d2d289c1575f43f10018f3bec23bb13 | [
"PHP-3.01",
"Zend-2.0"
] | 5 | 2015-11-23T00:26:06.000Z | 2020-07-31T12:56:08.000Z | third-party/thrift/src/thrift/compiler/test/compiler_test.py | hkirsman/hhvm_centos7_builds | 2a1fd6de0d2d289c1575f43f10018f3bec23bb13 | [
"PHP-3.01",
"Zend-2.0"
] | 2 | 2017-05-10T15:43:34.000Z | 2018-01-04T22:36:04.000Z | third-party/thrift/src/thrift/compiler/test/compiler_test.py | hkirsman/hhvm_centos7_builds | 2a1fd6de0d2d289c1575f43f10018f3bec23bb13 | [
"PHP-3.01",
"Zend-2.0"
] | 7 | 2017-09-01T01:30:25.000Z | 2019-02-04T17:46:24.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import re
import unittest
import shlex
import shutil
import subprocess
import sys
import tempfile
def ascend_find_exe(path, target):
if not os.path.isdir(p... | 31.080357 | 75 | 0.599253 |
4a11e4210371f706fee2eeab0d40340f24d56530 | 205 | py | Python | Mundo 1/ex011.py | RafaelSdm/Curso-de-Python | ae933ba80ee00ad5160bd5d05cf4b21007943fd4 | [
"MIT"
] | 1 | 2021-03-10T21:53:38.000Z | 2021-03-10T21:53:38.000Z | Mundo 1/ex011.py | RafaelSdm/Curso-de-Python | ae933ba80ee00ad5160bd5d05cf4b21007943fd4 | [
"MIT"
] | null | null | null | Mundo 1/ex011.py | RafaelSdm/Curso-de-Python | ae933ba80ee00ad5160bd5d05cf4b21007943fd4 | [
"MIT"
] | null | null | null | altura =float(input("altura da parede:"))
largura = float(input("largura:"))
area = float(largura*altura)
tinta = float(area/2)
print("a area é {:.2f} e gasta {:.2f} litrso de tinta".format(area,tinta)) | 25.625 | 74 | 0.682927 |
4a11e4bdd0ff5ea166538ba2d3e18e643f49e010 | 3,124 | py | Python | tests/test_basic_auth.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | tests/test_basic_auth.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | tests/test_basic_auth.py | rra/aiohttp-remotes | a1aa6916c1713af40688370ab48bfffb350574fd | [
"MIT"
] | null | null | null | import base64
import aiohttp
from aiohttp import web
from aiohttp_remotes import BasicAuth
from aiohttp_remotes import setup as _setup
async def test_basic_auth_ok(aiohttp_client):
async def handler(request):
return web.Response()
app = web.Application()
app.router.add_get('/', handler)
awa... | 31.877551 | 76 | 0.672855 |
4a11e4e2b0e16e5885dcacf273518f57e22da2b7 | 15,044 | py | Python | trafficdb/blueprint/api.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | 1 | 2016-12-12T21:23:26.000Z | 2016-12-12T21:23:26.000Z | trafficdb/blueprint/api.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | null | null | null | trafficdb/blueprint/api.py | rjw57/trafficdb | 7c895e14a52c8c313981243e36732a5e8dcc909a | [
"MIT"
] | null | null | null | """API to access and modify traffic data records.
"""
import base64
import datetime
try:
from urllib.parse import urljoin, urlencode, parse_qs
except ImportError:
from urlparse import urljoin, parse_qs
from urllib import urlencode
import uuid
from flask import *
import six
from sqlalchemy import func
from... | 33.730942 | 102 | 0.667974 |
4a11e59fdd65f55af3f7f6ad53b678579975e44e | 4,279 | py | Python | oscar/apps/catalogue/reviews/views.py | LUKKIEN/django-oscar | e3a418e07910806b0605a591106eff2a51d27c83 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/catalogue/reviews/views.py | LUKKIEN/django-oscar | e3a418e07910806b0605a591106eff2a51d27c83 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/catalogue/reviews/views.py | LUKKIEN/django-oscar | e3a418e07910806b0605a591106eff2a51d27c83 | [
"BSD-3-Clause"
] | null | null | null | from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.views.generic import ListView, DetailView, CreateView, View
from django.contrib import messages
from django.db.models import get_model
from django.utils.translation import ugettext_lazy as _
from oscar.core.loading ... | 37.867257 | 77 | 0.681701 |
4a11e6864168cae82f5d91621afcf41538df5851 | 460 | py | Python | config.py | Gluuz/architecture-patterns-with-python | c5ff170c8079c8bb302e4a4f83ff0cb29130a742 | [
"MIT"
] | 1 | 2022-03-07T03:14:42.000Z | 2022-03-07T03:14:42.000Z | config.py | Gluuz/architecture-patterns-with-python | c5ff170c8079c8bb302e4a4f83ff0cb29130a742 | [
"MIT"
] | null | null | null | config.py | Gluuz/architecture-patterns-with-python | c5ff170c8079c8bb302e4a4f83ff0cb29130a742 | [
"MIT"
] | null | null | null | import os
def get_postgres_uri():
host = os.environ.get("DB_HOST", "localhost")
port = 54321 if host == "localhost" else 5432
password = os.environ.get("DB_PASSWORD", "abc123")
user, db_name = "allocation", "allocation"
return f"postgresql://{user}:{password}@{host}:{port}/{db_name}"
def get_api... | 30.666667 | 68 | 0.647826 |
4a11ea0104d511ea6fc4a34483f8fa19caacffba | 7,240 | py | Python | jina/peapods/runtimes/__init__.py | tadej-redstone/jina | 07f341e791e011a4eb3f13fd7718caadb164a512 | [
"Apache-2.0"
] | 1 | 2020-12-23T08:58:49.000Z | 2020-12-23T08:58:49.000Z | jina/peapods/runtimes/__init__.py | 4un98737/jina | 199445efe66f9fea307dc4cb49edaec5f2149ea9 | [
"Apache-2.0"
] | null | null | null | jina/peapods/runtimes/__init__.py | 4un98737/jina | 199445efe66f9fea307dc4cb49edaec5f2149ea9 | [
"Apache-2.0"
] | null | null | null | import argparse
import multiprocessing
import threading
from multiprocessing.synchronize import Event
from typing import Dict, Union
from jina.peapods.zmq import send_ctrl_message, Zmqlet
from jina.enums import PeaRoleType
from jina.excepts import PeaFailToStart
from jina.helper import typename
from jina.logging impo... | 36.2 | 143 | 0.60663 |
4a11eac3933a4c01904989b2d5ef48b358ef548a | 3,288 | py | Python | enaml/wx/wx_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 11 | 2015-03-14T14:30:51.000Z | 2022-03-15T13:01:44.000Z | enaml/wx/wx_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 3 | 2015-01-31T11:12:56.000Z | 2022-03-14T00:53:25.000Z | enaml/wx/wx_date_selector.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | 4 | 2015-01-27T01:56:14.000Z | 2021-02-23T07:21:20.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 27.864407 | 79 | 0.512165 |
4a11eb3b2ce06d47461203438d052865b52c7f7c | 25,339 | py | Python | facemap_flask_backend/.venv/Lib/site-packages/engineio/asyncio_client.py | PuneethRegonda/realtime_surveillance_system | bf0f7a80c8a0f8bbaaf3dcb6fd7ee419708a5f4f | [
"Apache-2.0"
] | 2 | 2021-07-05T03:53:41.000Z | 2021-07-09T02:03:16.000Z | facemap_flask_backend/.venv/Lib/site-packages/engineio/asyncio_client.py | PuneethRegonda/realtime_surveillance_system | bf0f7a80c8a0f8bbaaf3dcb6fd7ee419708a5f4f | [
"Apache-2.0"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/engineio/asyncio_client.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 4 | 2020-10-18T05:37:47.000Z | 2022-03-25T12:28:06.000Z | import asyncio
import signal
import ssl
import threading
try:
import aiohttp
except ImportError: # pragma: no cover
aiohttp = None
from . import client
from . import exceptions
from . import packet
from . import payload
async_signal_handler_set = False
def async_signal_handler():
"""SIGINT handler.
... | 41.539344 | 79 | 0.548127 |
4a11eb6902e0e7f17698ae5fb98d1baaaf322a78 | 3,002 | py | Python | harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/cli.py | snowyrainkun/webdevelop | 9792d8d05b70f35586616a95ba26ed0daf1f72b3 | [
"MIT"
] | 22 | 2015-03-18T20:33:59.000Z | 2021-05-13T15:01:33.000Z | passwordmeter/cli.py | vsajip/passwordmeter | 72c7f4b0ff69149fa0dd221a938d0ac3ec72bc52 | [
"MIT"
] | 2 | 2015-04-03T19:48:46.000Z | 2015-10-01T23:23:19.000Z | passwordmeter/cli.py | vsajip/passwordmeter | 72c7f4b0ff69149fa0dd221a938d0ac3ec72bc52 | [
"MIT"
] | 10 | 2015-06-19T03:21:56.000Z | 2021-08-31T15:02:58.000Z | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/10/26
# copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved.
#-----------------------------------------------------------------------... | 28.865385 | 79 | 0.542305 |
4a11ebda9f52480574d9f4d8b3a5e22d3d4ae09b | 2,634 | py | Python | training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | rylezhou/sunet-pytorch | 46473f4ba6ce442335f318b45aee50a357af92bf | [
"Apache-2.0"
] | null | null | null | training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | rylezhou/sunet-pytorch | 46473f4ba6ce442335f318b45aee50a357af92bf | [
"Apache-2.0"
] | null | null | null | training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | rylezhou/sunet-pytorch | 46473f4ba6ce442335f318b45aee50a357af92bf | [
"Apache-2.0"
] | null | null | null | import torch
from network_architecture.generic_UNet import Generic_UNet
from network_architecture.initialization import InitWeights_He
from training.network_training.nnUNet_variants.data_augmentation.nnUNetTrainerV2_insaneDA import \
nnUNetTrainerV2_insaneDA
from utilities.nd_softmax import softmax_helper
from torc... | 43.180328 | 117 | 0.655657 |
4a11ec80522bcdaf2d8215d671ba2f989c7dddfb | 6,807 | py | Python | src/python/ilp_common_classes.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:00.000Z | 2021-09-12T23:15:02.000Z | src/python/ilp_common_classes.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | null | null | null | src/python/ilp_common_classes.py | hhelm10/distPURL | 735480bceff38b7a10ea618c13fe93a5b3d26910 | [
"MIT"
] | 2 | 2021-04-27T15:26:33.000Z | 2021-09-13T12:32:24.000Z | """
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
"""
import json
from typing import *
from typing import List
from enum import Enum
from copy import copy
from ilp_common import *
class ILPError(Exception):
'''
ILPError Exception class.
'''
def __init__(self, *args):
i... | 38.241573 | 123 | 0.56486 |
4a11ef769f05d791559c74286390c221e9096330 | 1,011 | py | Python | boardom/imaging/tone_map.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | 2 | 2021-10-05T15:52:50.000Z | 2021-11-22T00:05:03.000Z | boardom/imaging/tone_map.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | null | null | null | boardom/imaging/tone_map.py | dmarnerides/boardom | b7eec437b43398ac8dd8d2755dca9bbe7a8ff8a3 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
import cv2
import boardom as bd
# These functions assume inputs are hdr images in range [0, 1] with linear luminance
# Outputs are scaled to [0,1]
def culling(x, low=10, high=90, gamma=2.2):
low, high = np.percentile(x, (low, high))
return bd.map_range(np.clip(x, low, high)) ** (1 / gamma)... | 28.083333 | 84 | 0.673591 |
4a11f01759ae0b785f550c0bd4335ba56b57d615 | 30,120 | py | Python | networking_oneview/tests/unit/ml2/drivers/oneview/test_oneview_mech_driver.py | HewlettPackard/networking-oneview | 21881596eeb39565a027022921d4ec4f71e3278b | [
"Apache-2.0"
] | 6 | 2018-02-02T17:37:15.000Z | 2018-09-20T14:06:16.000Z | networking_oneview/tests/unit/ml2/drivers/oneview/test_oneview_mech_driver.py | HewlettPackard/networking-oneview | 21881596eeb39565a027022921d4ec4f71e3278b | [
"Apache-2.0"
] | 18 | 2018-02-06T14:54:22.000Z | 2018-02-27T13:34:37.000Z | networking_oneview/tests/unit/ml2/drivers/oneview/test_oneview_mech_driver.py | HewlettPackard/networking-oneview | 21881596eeb39565a027022921d4ec4f71e3278b | [
"Apache-2.0"
] | 2 | 2020-04-28T14:36:12.000Z | 2020-07-22T13:09:44.000Z | # Copyright 2017 Hewlett Packard Enterprise Development LP.
# Copyright 2017 Universidade Federal de Campina Grande
# 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 Licens... | 41.717452 | 79 | 0.7 |
4a11f05c23237defd1221c2f4a7d36b41989b72a | 49,325 | py | Python | spyder/app/tour.py | StefRe/spyder | 210495f5b691cc2986a437c237cce8de4ab06b79 | [
"MIT"
] | 3 | 2019-09-27T21:00:00.000Z | 2021-03-07T23:28:32.000Z | spyder/app/tour.py | StefRe/spyder | 210495f5b691cc2986a437c237cce8de4ab06b79 | [
"MIT"
] | 3 | 2020-10-13T21:15:23.000Z | 2020-10-13T21:15:24.000Z | spyder/app/tour.py | StefRe/spyder | 210495f5b691cc2986a437c237cce8de4ab06b79 | [
"MIT"
] | 2 | 2021-04-30T01:18:22.000Z | 2021-09-19T06:31:42.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""Spyder interactive tours"""
# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201
# Standard library impor... | 36.700149 | 84 | 0.545241 |
4a11f17c6aeb04a417493d0b1fe0b228cbaf7e38 | 12,644 | py | Python | awp5/api/pool.py | ThomasWaldinger/py_awp5 | 10077ab81eab506bea58a67242c2d550988ec18c | [
"Apache-2.0"
] | 2 | 2019-04-10T16:46:19.000Z | 2020-08-18T21:57:59.000Z | awp5/api/pool.py | ThomasWaldinger/py_awp5 | 10077ab81eab506bea58a67242c2d550988ec18c | [
"Apache-2.0"
] | null | null | null | awp5/api/pool.py | ThomasWaldinger/py_awp5 | 10077ab81eab506bea58a67242c2d550988ec18c | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Thomas Waldinger. All rights reserved.
# Licensed under the Apache License, Version 2.0. See
# License.txt in the project root for license
# information.
# ---------------
"""
Pool
This resource tracks volume pools. Volume pool... | 36.755814 | 80 | 0.630101 |
4a11f2f4f970acafd14d6e9572833d214604b12b | 951 | py | Python | lhotse/bin/modes/recipes/rir_noise.py | rosrad/lhotse | 177ce3a6b963d4ac56a87843a0130ccfc74b3a57 | [
"Apache-2.0"
] | 353 | 2020-10-31T10:38:51.000Z | 2022-03-30T05:22:52.000Z | lhotse/bin/modes/recipes/rir_noise.py | rosrad/lhotse | 177ce3a6b963d4ac56a87843a0130ccfc74b3a57 | [
"Apache-2.0"
] | 353 | 2020-10-27T23:25:12.000Z | 2022-03-31T22:16:05.000Z | lhotse/bin/modes/recipes/rir_noise.py | rosrad/lhotse | 177ce3a6b963d4ac56a87843a0130ccfc74b3a57 | [
"Apache-2.0"
] | 66 | 2020-11-01T06:08:08.000Z | 2022-03-29T02:03:07.000Z | import click
from lhotse.bin.modes import download, prepare
from lhotse.recipes import download_rir_noise, prepare_rir_noise
from lhotse.utils import Pathlike
from typing import Sequence, Union
__all__ = ["rir_noise"]
@prepare.command()
@click.argument("corpus_dir", type=click.Path(exists=True, dir_okay=True))
@cl... | 26.416667 | 80 | 0.724501 |
4a11f472b7795f1c8fa3a16d97d21dc9695df4c8 | 234 | py | Python | sandbox/finetuning/envs/mujoco/gather/ant_half_gravity_gather_env.py | andrewli77/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 23 | 2020-04-27T23:53:44.000Z | 2022-03-10T03:13:16.000Z | sandbox/finetuning/envs/mujoco/gather/ant_half_gravity_gather_env.py | WeiChengTseng/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 1 | 2021-11-14T13:30:22.000Z | 2021-11-14T13:30:22.000Z | sandbox/finetuning/envs/mujoco/gather/ant_half_gravity_gather_env.py | WeiChengTseng/rllab-finetuning | 2dae9141d0fdc284d04f18931907131d66b43023 | [
"MIT"
] | 8 | 2020-06-17T03:28:34.000Z | 2022-03-09T03:13:03.000Z | from rllab.envs.mujoco.gather.gather_env import GatherEnv
from sandbox.finetuning.envs.mujoco.half_gravity_ant import HalfGravityAntEnv
class HalfGravityAntGatherEnv(GatherEnv):
MODEL_CLASS = HalfGravityAntEnv
ORI_IND = 3
| 23.4 | 77 | 0.824786 |
4a11f50c099f3fae533e5fff4f0276ca31dc3cb6 | 409 | py | Python | backend/click_time_28533/wsgi.py | crowdbotics-apps/click-time-28533 | 89f4f7e05bf04623b2822899677b6c3606968151 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/click_time_28533/wsgi.py | crowdbotics-apps/click-time-28533 | 89f4f7e05bf04623b2822899677b6c3606968151 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/click_time_28533/wsgi.py | crowdbotics-apps/click-time-28533 | 89f4f7e05bf04623b2822899677b6c3606968151 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for click_time_28533 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJA... | 24.058824 | 78 | 0.794621 |
4a11f5dc99161ce6ed7ef01bff03084d88d675a0 | 435 | py | Python | project/Support/Code/Sheets/models/components/settings.py | fael07/Django-Helper | bcc9de58f0453452b017b2e219130fbf5a3d48d7 | [
"MIT"
] | null | null | null | project/Support/Code/Sheets/models/components/settings.py | fael07/Django-Helper | bcc9de58f0453452b017b2e219130fbf5a3d48d7 | [
"MIT"
] | null | null | null | project/Support/Code/Sheets/models/components/settings.py | fael07/Django-Helper | bcc9de58f0453452b017b2e219130fbf5a3d48d7 | [
"MIT"
] | null | null | null | from abc import ABC
class AppSettings(ABC):
def register_app(self):
self.settings.insert_code(' # My apps', f" '{self.app}.{self.app.title()}Config',")
self.response('app foi registrado')
def register_abstract_user(self):
self.settings.add_in_end(f"\nAUTH_USER_MODEL... | 31.071429 | 97 | 0.597701 |
4a11f6a3a00ff3d08d4770ee5bcfebfbe9a2dd66 | 4,691 | py | Python | tiled/structures/structured_array.py | AustralianSynchrotron/tiled | 307d2f3b7e9b841afdf5af716f218584e4c3d530 | [
"BSD-3-Clause"
] | null | null | null | tiled/structures/structured_array.py | AustralianSynchrotron/tiled | 307d2f3b7e9b841afdf5af716f218584e4c3d530 | [
"BSD-3-Clause"
] | null | null | null | tiled/structures/structured_array.py | AustralianSynchrotron/tiled | 307d2f3b7e9b841afdf5af716f218584e4c3d530 | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
import json
from typing import Tuple, List, Union, Optional
import numpy
from .array import MachineDataType as BuiltinType, ArrayMacroStructure
from ..media_type_registration import serialization_registry
@dataclass
class Field:
name: str
dtype: Union[BuiltinType, "StructDt... | 29.136646 | 96 | 0.646557 |
4a11f6c15694735007ea726608b3e3d7663b2e68 | 2,293 | py | Python | kubernetes/test/test_io_xk8s_cluster_v1alpha4_cluster_class_spec_control_plane_machine_infrastructure_ref.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_v1alpha4_cluster_class_spec_control_plane_machine_infrastructure_ref.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_v1alpha4_cluster_class_spec_control_plane_machine_infrastructure_ref.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... | 38.864407 | 217 | 0.737462 |
4a11f700ac03162bdee7baa4b33ca642e852cfa7 | 11,306 | py | Python | examples/HED/hed.py | awesome-archive/tensorpack | 55f640f70e19d538e5082a4712241ee966fcb201 | [
"Apache-2.0"
] | 2 | 2021-01-31T11:18:49.000Z | 2021-02-24T14:42:16.000Z | examples/HED/hed.py | yangxue0827/tensorpack | e5e54e07bb47f85fc7efe9c78bde3e153ef0d49b | [
"Apache-2.0"
] | null | null | null | examples/HED/hed.py | yangxue0827/tensorpack | e5e54e07bb47f85fc7efe9c78bde3e153ef0d49b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: hed.py
# Author: Yuxin Wu
import argparse
import numpy as np
import os
import cv2
import tensorflow as tf
from six.moves import zip
from tensorpack import *
from tensorpack.dataflow import dataset
from tensorpack.tfutils import gradproc, optimizer
from tensorpack.... | 35.553459 | 118 | 0.56669 |
4a11f72e3871c2b40155b036cac14c43a296b3e6 | 3,212 | py | Python | recommendation_system_demos/Basic-CMN-Demo/util/evaluation.py | sweetpand/tensorflow_mri | 7a483cbbbe515ad395928311759505707bd72503 | [
"MIT"
] | 2 | 2021-02-06T11:27:17.000Z | 2021-05-29T10:45:22.000Z | recommendation_system_demos/Basic-CMN-Demo/util/evaluation.py | sweetpand/tensorflow_mri | 7a483cbbbe515ad395928311759505707bd72503 | [
"MIT"
] | null | null | null | recommendation_system_demos/Basic-CMN-Demo/util/evaluation.py | sweetpand/tensorflow_mri | 7a483cbbbe515ad395928311759505707bd72503 | [
"MIT"
] | 1 | 2020-10-23T20:26:36.000Z | 2020-10-23T20:26:36.000Z | import numpy as np
import tensorflow as tf
from tqdm import tqdm
def get_model_scores(sess, test_data, neighborhood, input_user_handle, input_item_handle,
input_neighborhood_handle, input_neighborhood_length_handle,
dropout_handle, score_op, max_neighbors, return_scores=False... | 36.5 | 112 | 0.56538 |
4a11f73e01157fb86d2cd1fbcc1c489543df10e1 | 3,049 | py | Python | api/app/schemas/weather_models.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 19 | 2020-01-31T21:51:31.000Z | 2022-01-07T14:40:03.000Z | api/app/schemas/weather_models.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 1,680 | 2020-01-24T23:25:08.000Z | 2022-03-31T23:50:27.000Z | api/app/schemas/weather_models.py | bcgov/wps | 71df0de72de9cd656dc9ebf8461ffe47cfb155f6 | [
"Apache-2.0"
] | 6 | 2020-04-28T22:41:08.000Z | 2021-05-05T18:16:06.000Z | """ This module contains pydandict schemas relating to weather models for the API.
"""
from datetime import datetime
from typing import List
from pydantic import BaseModel
from app.schemas.stations import WeatherStation
class WeatherPredictionModel(BaseModel):
""" The full name & acronym for a weather prediction ... | 30.188119 | 108 | 0.750738 |
4a11f8301f99df641f1f2ca48e5ba6caac918ade | 636 | py | Python | LeetCode/1-1000/101-200/101-125/108. Convert Sorted Array to Binary Search Tree/solution-python3.py | adubois85/coding_challenge_websites | 7867a05847a216661eff3b24b1cb1480fb7d3030 | [
"Apache-2.0"
] | null | null | null | LeetCode/1-1000/101-200/101-125/108. Convert Sorted Array to Binary Search Tree/solution-python3.py | adubois85/coding_challenge_websites | 7867a05847a216661eff3b24b1cb1480fb7d3030 | [
"Apache-2.0"
] | null | null | null | LeetCode/1-1000/101-200/101-125/108. Convert Sorted Array to Binary Search Tree/solution-python3.py | adubois85/coding_challenge_websites | 7867a05847a216661eff3b24b1cb1480fb7d3030 | [
"Apache-2.0"
] | null | null | null | from typing import List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def sortedArrayToBST(self, nums: List[int]) -> TreeNode:
# Without lots of temp va... | 26.5 | 78 | 0.591195 |
4a11f8e0cb33d375563084a254c988e470ee01ce | 8,012 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_operation_body.py | denisoliveirac/polyaxon | 21d33e50bbbd4bfbe474683f977eecf0b741ddd4 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_operation_body.py | denisoliveirac/polyaxon | 21d33e50bbbd4bfbe474683f977eecf0b741ddd4 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_operation_body.py | denisoliveirac/polyaxon | 21d33e50bbbd4bfbe474683f977eecf0b741ddd4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 27.251701 | 173 | 0.594358 |
4a11f930a29e412b67508cfc443a5835528407d3 | 90 | py | Python | abc/abc150/abc150a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | abc/abc150/abc150a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | abc/abc150/abc150a.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | K, X = map(int, input().split())
if 500 * K >= X:
print('Yes')
else:
print('No')
| 12.857143 | 32 | 0.488889 |
4a11f9cb44e71d13aac99dfc0edd05445ff1b823 | 9,887 | py | Python | jackal/config.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | 10 | 2018-01-17T20:11:30.000Z | 2022-02-20T21:31:37.000Z | jackal/config.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | null | null | null | jackal/config.py | mwgielen/jackal | 7fe62732eb5194b7246215d5277fb37c398097bf | [
"MIT"
] | 1 | 2018-06-21T16:47:16.000Z | 2018-06-21T16:47:16.000Z | """
Configuration of jackal
"""
from builtins import input
from os.path import expanduser
import os
import configparser
def input_with_default(question, default):
"""
Helper function to return default value if string is empty.
"""
return input(question + ' [{}] '.format(default)) or default
d... | 39.234127 | 148 | 0.59472 |
4a11fb62a3439a5bfa28bf234b2690933707d0db | 75 | py | Python | src/__main__.py | navneet-arya/Boomerang | fc6cba31ed59956b7ab535d60115f8e96a09d02d | [
"MIT"
] | 3 | 2020-11-05T09:16:34.000Z | 2021-04-15T17:29:26.000Z | src/__main__.py | navneet-arya/Witcher | fc6cba31ed59956b7ab535d60115f8e96a09d02d | [
"MIT"
] | null | null | null | src/__main__.py | navneet-arya/Witcher | fc6cba31ed59956b7ab535d60115f8e96a09d02d | [
"MIT"
] | null | null | null | import sys
from witcher import main
if __name__ == "__main__":
main()
| 12.5 | 26 | 0.693333 |
4a11fcab662234682f673e1bc65a25bdb677dcd7 | 7,512 | py | Python | modules/unit_tests/s3/s3crud.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | 1 | 2019-08-20T16:32:33.000Z | 2019-08-20T16:32:33.000Z | modules/unit_tests/s3/s3crud.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | null | null | null | modules/unit_tests/s3/s3crud.py | andygimma/eden | 716d5e11ec0030493b582fa67d6f1c35de0af50d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# S3CRUD Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/tests/unit_tests/modules/s3/s3crud.py
#
import unittest
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
# ======================================================... | 35.267606 | 88 | 0.538072 |
4a11fce2c8e99af60098e8967d6807ee57b4a275 | 4,123 | py | Python | runtime/python/Tools/scripts/find_recursionlimit.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | runtime/python/Tools/scripts/find_recursionlimit.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 8 | 2019-06-29T14:18:51.000Z | 2022-02-19T07:30:27.000Z | runtime/python/Tools/scripts/find_recursionlimit.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | #! /usr/bin/env python3
"""Find the maximum recursion limit that prevents interpreter termination.
This script finds the maximum safe recursion limit on a particular
platform. If you need to change the recursion limit on your system,
this script will tell you a safe upper bound. To use the new limit,
call sys.... | 31.96124 | 77 | 0.670871 |
4a11feb9ae79deace303ce46e5f30de0d65a419f | 1,061 | py | Python | opsdroid/cli/logs.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 712 | 2016-08-09T21:30:07.000Z | 2022-03-24T09:38:21.000Z | opsdroid/cli/logs.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 1,767 | 2016-07-27T13:01:25.000Z | 2022-03-29T04:25:10.000Z | opsdroid/cli/logs.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 536 | 2016-07-31T14:23:41.000Z | 2022-03-22T17:35:15.000Z | """The logs subcommand for opsdroid cli."""
import click
import tailer
from opsdroid.const import DEFAULT_LOG_FILENAME
@click.group(invoke_without_command=True)
@click.option("-f", "follow", is_flag=True, help="Print the logs in real time")
@click.pass_context
def logs(ctx, follow):
"""Print the content of the l... | 31.205882 | 89 | 0.663525 |
4a11ff40bddb03bd4d44f2d08cf22f63a96fcc26 | 2,931 | py | Python | jupiter/domain/metrics/metric.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | 15 | 2019-05-05T14:34:58.000Z | 2022-02-25T09:57:28.000Z | jupiter/domain/metrics/metric.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | 3 | 2020-02-22T16:09:39.000Z | 2021-12-18T21:33:06.000Z | jupiter/domain/metrics/metric.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | null | null | null | """A metric."""
from dataclasses import dataclass
from typing import Optional
from jupiter.domain.entity_name import EntityName
from jupiter.domain.metrics.metric_key import MetricKey
from jupiter.domain.metrics.metric_unit import MetricUnit
from jupiter.domain.recurring_task_gen_params import RecurringTaskGenParams
f... | 33.689655 | 113 | 0.683385 |
4a11ffe51f80d835ff06ea68b1bafbcb0f2fe959 | 2,951 | py | Python | models/CNN_custom_global.py | JRC1995/CapsuleRoutingEncoders | a99c666f33a2ea98f60b944df19d699ee3f3b009 | [
"MIT"
] | null | null | null | models/CNN_custom_global.py | JRC1995/CapsuleRoutingEncoders | a99c666f33a2ea98f60b944df19d699ee3f3b009 | [
"MIT"
] | null | null | null | models/CNN_custom_global.py | JRC1995/CapsuleRoutingEncoders | a99c666f33a2ea98f60b944df19d699ee3f3b009 | [
"MIT"
] | null | null | null | # Adapted from: https://github.com/castorini/hedwig/tree/master/models/kim_cnn
import torch as T
import torch.nn as nn
import torch.nn.functional as F
from models.modules.custom import routing
class Classifier(nn.Module):
def __init__(self, embeddings, pad_idx, classes_num,
config, device):
... | 31.393617 | 98 | 0.584209 |
4a1200112c2ee742bb9b9a7360ab5a60cfdbe118 | 699 | py | Python | 200914/02.lists.py | Inclementia/python-basics | 0b327ad7ef121d5d5483b092907b970ec19adf9c | [
"MIT"
] | null | null | null | 200914/02.lists.py | Inclementia/python-basics | 0b327ad7ef121d5d5483b092907b970ec19adf9c | [
"MIT"
] | null | null | null | 200914/02.lists.py | Inclementia/python-basics | 0b327ad7ef121d5d5483b092907b970ec19adf9c | [
"MIT"
] | null | null | null | # # data read
# student_marks = []
# while True:
# mark = input('введите оценку студента:\n')
# if mark:
# student_marks.append(int(mark))
# else:
# break
#
# print('ввод завершен')
# print(student_marks)
# mock_student_marks = ['5', '4', '3', '2', '5'] # wrong mock
mock_student_marks = [5... | 22.548387 | 62 | 0.635193 |
4a12005ef66725aa2c52c76b12ef45a6ed1cc29e | 694 | py | Python | xmltok/setup.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | 2 | 2021-02-24T13:59:02.000Z | 2021-04-06T22:25:03.000Z | xmltok/setup.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | null | null | null | xmltok/setup.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | 3 | 2021-02-24T12:16:11.000Z | 2022-01-04T08:35:59.000Z | import sys
# Remove current dir from sys.path, otherwise setuptools will peek up our
# module instead of system's.
sys.path.pop(0)
from setuptools import setup
sys.path.append("..")
import sdist_upip
setup(name='micropython-xmltok',
version='0.2',
description='xmltok module for MicroPython',
long_des... | 33.047619 | 73 | 0.707493 |
4a12017bbce2d8cfb854353b562d9235c3de7816 | 16,993 | py | Python | tensorflow/compiler/tf2xla/python/xla.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 9 | 2019-06-05T06:48:07.000Z | 2020-09-29T07:08:02.000Z | tensorflow/compiler/tf2xla/python/xla.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 2 | 2021-11-10T20:21:47.000Z | 2022-02-10T04:12:28.000Z | tensorflow/compiler/tf2xla/python/xla.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 3 | 2019-06-28T02:28:27.000Z | 2021-07-06T08:16:19.000Z | # Copyright 2018 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... | 33.7833 | 81 | 0.7569 |
4a12023489009d092f293805e331424f50ae339b | 2,616 | py | Python | ava/commands/set_user_title.py | MCYBA/m-cyba | 9051674a0e5192e0c8f0235f725311baadd187ec | [
"MIT"
] | 1 | 2020-04-23T14:18:16.000Z | 2020-04-23T14:18:16.000Z | ava/commands/set_user_title.py | MCYBA/m-cyba | 9051674a0e5192e0c8f0235f725311baadd187ec | [
"MIT"
] | null | null | null | ava/commands/set_user_title.py | MCYBA/m-cyba | 9051674a0e5192e0c8f0235f725311baadd187ec | [
"MIT"
] | 1 | 2021-02-09T22:27:30.000Z | 2021-02-09T22:27:30.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
.. module:: set_user_title
:platform: Unix
:synopsis: the top-level submodule of Dragonfire.commands that contains the classes related to Dragonfire's simple if-else struct of setting
user title ability.
.. moduleauthors:: Mehmet Mert Yıldıran <mert.yildiran@... | 44.338983 | 144 | 0.559251 |
4a1203aec46a82e5760742c1b8a16105464a99cd | 12,374 | py | Python | vtscan.py | JavaScriptDude/vtscan | 790d9a0e8b9beb5cb53400e4f6e600cf18b66fa7 | [
"MIT"
] | 1 | 2020-03-07T06:35:45.000Z | 2020-03-07T06:35:45.000Z | vtscan.py | JavaScriptDude/vtscan | 790d9a0e8b9beb5cb53400e4f6e600cf18b66fa7 | [
"MIT"
] | null | null | null | vtscan.py | JavaScriptDude/vtscan | 790d9a0e8b9beb5cb53400e4f6e600cf18b66fa7 | [
"MIT"
] | null | null | null | from __future__ import print_function
#########################################
# .: vtscan :.
# Verifies a file using VirusTotal API
# .: install dependencies :.
# python3 -m pip install -r requirements.txt
# .: Sample :.
# export VT_API_KEY=<virus_total_api_key>
# .: usage :.
# vtscan <path_to_file>
# -or-
# python3 ... | 33.263441 | 145 | 0.598513 |
4a12044422e52e01d2a3d30d80cb298e815d623f | 48,192 | py | Python | opensfm/dataset.py | whuaegeanse/OpenSfM | 1c261fbd1330f9a4483597ceb5cb1098fcdbd97f | [
"BSD-2-Clause"
] | null | null | null | opensfm/dataset.py | whuaegeanse/OpenSfM | 1c261fbd1330f9a4483597ceb5cb1098fcdbd97f | [
"BSD-2-Clause"
] | null | null | null | opensfm/dataset.py | whuaegeanse/OpenSfM | 1c261fbd1330f9a4483597ceb5cb1098fcdbd97f | [
"BSD-2-Clause"
] | null | null | null | import gzip
import json
import logging
import os
import pickle
from abc import ABC, abstractmethod
from io import BytesIO
from typing import Dict, List, Tuple, Optional, IO, Any
import cv2
import numpy as np
from opensfm import config, features, geo, io, upright, pygeometry, types, pymap
logger = logging.getLogger(__... | 36.18018 | 87 | 0.624523 |
4a1204a8f26338359303db9f151743171801e27f | 678 | py | Python | GenyTreeApp/migrations/0004_auto_20190607_1620.py | carlos-el/ETSIIT_TFG_2019 | 0a3d65c5ae5abc3ec0af80e24c9eb9f257761e87 | [
"MIT"
] | null | null | null | GenyTreeApp/migrations/0004_auto_20190607_1620.py | carlos-el/ETSIIT_TFG_2019 | 0a3d65c5ae5abc3ec0af80e24c9eb9f257761e87 | [
"MIT"
] | 1 | 2021-06-09T18:18:24.000Z | 2021-06-09T18:18:24.000Z | GenyTreeApp/migrations/0004_auto_20190607_1620.py | carlos-el/ETSIIT_TFG_2019 | 0a3d65c5ae5abc3ec0af80e24c9eb9f257761e87 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-06-07 14:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('GenyTreeApp', '0003_auto_20190607_1619'),
]
operations = [
migrations.AlterField(
model_name='person',
name='child',
... | 28.25 | 119 | 0.620944 |
4a1204ebd3575d4e644e6e26cb16404259e91684 | 2,084 | py | Python | autofit/tools/util.py | jonathanfrawley/PyAutoFit | 818384a6eb3926b18247e16efcf0db6008193bd4 | [
"MIT"
] | null | null | null | autofit/tools/util.py | jonathanfrawley/PyAutoFit | 818384a6eb3926b18247e16efcf0db6008193bd4 | [
"MIT"
] | null | null | null | autofit/tools/util.py | jonathanfrawley/PyAutoFit | 818384a6eb3926b18247e16efcf0db6008193bd4 | [
"MIT"
] | null | null | null | import numpy as np
from contextlib import contextmanager
import sys, os
import json
@contextmanager
def suppress_stdout():
with open(os.devnull, "w") as devnull:
old_stdout = sys.stdout
sys.stdout = devnull
try:
yield
finally:
sys.stdout = old_st... | 27.421053 | 116 | 0.609885 |
4a12056f9d6757537f67ebb21ca386921f58b599 | 7,218 | py | Python | src/buspirate_uart_monitor/bp_monitor.py | e28eta/buspirate-uart-monitor | 31aa50058405beb3272d98ae4355195e368de124 | [
"MIT"
] | null | null | null | src/buspirate_uart_monitor/bp_monitor.py | e28eta/buspirate-uart-monitor | 31aa50058405beb3272d98ae4355195e368de124 | [
"MIT"
] | null | null | null | src/buspirate_uart_monitor/bp_monitor.py | e28eta/buspirate-uart-monitor | 31aa50058405beb3272d98ae4355195e368de124 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
Connect to a Bus Pirate, put it into UART mode compatible with esphome logger, and print everything received
"""
import argparse
import sys
from typing import Optional
import serial
from serial.tools.list_ports_common import ListPortInfo
from serial.tools.miniterm import key... | 32.958904 | 124 | 0.630784 |
4a12057a81e2fa63e1069be8f802fcb4a762d8b6 | 4,237 | py | Python | octavia_tempest_plugin/tests/api/v2/test_availability_zone_capabilities.py | NeCTAR-RC/octavia-tempest-plugin | 5506c00b8d8972e6223499dd5a5da4c85c1ff836 | [
"Apache-2.0"
] | null | null | null | octavia_tempest_plugin/tests/api/v2/test_availability_zone_capabilities.py | NeCTAR-RC/octavia-tempest-plugin | 5506c00b8d8972e6223499dd5a5da4c85c1ff836 | [
"Apache-2.0"
] | null | null | null | octavia_tempest_plugin/tests/api/v2/test_availability_zone_capabilities.py | NeCTAR-RC/octavia-tempest-plugin | 5506c00b8d8972e6223499dd5a5da4c85c1ff836 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Rackspace US Inc. All rights reserved.
# Copyright 2019 Verizon Media
#
# 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/licens... | 45.074468 | 78 | 0.67359 |
4a1205888907386fc637052a76f3963e3861ce04 | 2,302 | py | Python | app/db.py | LambdaTheda/final_CitySpire_TeamC | 8c2a2fa76464633b9520c929ecdfc28fe30c41b2 | [
"MIT"
] | null | null | null | app/db.py | LambdaTheda/final_CitySpire_TeamC | 8c2a2fa76464633b9520c929ecdfc28fe30c41b2 | [
"MIT"
] | 4 | 2021-01-25T04:01:05.000Z | 2021-03-03T02:24:38.000Z | app/db.py | LambdaTheda/final_CitySpire_TeamC | 8c2a2fa76464633b9520c929ecdfc28fe30c41b2 | [
"MIT"
] | 4 | 2021-01-28T02:16:06.000Z | 2021-03-10T03:31:50.000Z | #app/db.py
"""Database functions"""
#Imports
import os
from dotenv import load_dotenv
from fastapi import APIRouter, Depends
import sqlalchemy
import psycopg2
from psycopg2.extras import execute_values
import json
# Router
router = APIRouter()
# Load environment variables aka secrets f... | 25.577778 | 91 | 0.694179 |
4a12059bac27b4bb5fa455c940461a21fb65eaaa | 8,777 | py | Python | back-end/shiftapp/serializers.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | null | null | null | back-end/shiftapp/serializers.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | 6 | 2022-02-12T15:59:53.000Z | 2022-03-08T22:53:17.000Z | back-end/shiftapp/serializers.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | 4 | 2018-09-10T16:13:48.000Z | 2021-01-30T20:04:37.000Z | from django.contrib.auth.models import User, Group, Permission
from rest_framework.serializers import ModelSerializer, ChoiceField
from rest_framework import serializers
from django.core.exceptions import ValidationError
from django.contrib.auth.password_validation import validate_password, get_password_validators
from... | 34.968127 | 111 | 0.632335 |
4a12064334bfffb954c7f9f1b58ea5a718da85f1 | 795 | py | Python | visuals/periodogram.py | randompirate/tempesp | 8b933ed3d9805f340858d2da08460b93cb7706e2 | [
"MIT"
] | null | null | null | visuals/periodogram.py | randompirate/tempesp | 8b933ed3d9805f340858d2da08460b93cb7706e2 | [
"MIT"
] | null | null | null | visuals/periodogram.py | randompirate/tempesp | 8b933ed3d9805f340858d2da08460b93cb7706e2 | [
"MIT"
] | null | null | null | import temp_plots as tp
import scipy.signal as sig
import matplotlib.pyplot as plt
import numpy as np
t = tp.time_array_epoch
t = (t - t[0]) / (60*60*24) # Time passed in days
y = tp.temp_array
y = y - np.mean(y)
N_samples = len(t)
max_daily_freq = 4 # At most 4 times a day (sampling rate)
max_daily_period = 10 # A p... | 26.5 | 115 | 0.715723 |
4a1206e83f92f38134c4670652ba903d55870a16 | 7,456 | py | Python | test/kitchen/tasks/kitchen.py | bai/datadog-agent | 091aeb213df1568aec9edf18a728d69740042237 | [
"Apache-2.0"
] | null | null | null | test/kitchen/tasks/kitchen.py | bai/datadog-agent | 091aeb213df1568aec9edf18a728d69740042237 | [
"Apache-2.0"
] | 52 | 2021-05-01T01:52:30.000Z | 2022-02-01T22:03:12.000Z | test/kitchen/tasks/kitchen.py | bai/datadog-agent | 091aeb213df1568aec9edf18a728d69740042237 | [
"Apache-2.0"
] | null | null | null | import glob
import json
import os.path
import re
import traceback
import requests
from invoke import task
from invoke.exceptions import Exit
@task(iterable=['platlist'])
def genconfig(
ctx,
platform=None,
provider=None,
osversions="all",
testfiles=None,
uservars=None,
platformfile=None,
... | 34.359447 | 138 | 0.571218 |
4a120732e81002c493e0862779855b81a4d3d239 | 8,829 | py | Python | adversarial_models.py | laurensalvarez/Fooling-LIME-SHAP | e7505795b239406e11f838f27b2ca5da09139d6b | [
"MIT"
] | null | null | null | adversarial_models.py | laurensalvarez/Fooling-LIME-SHAP | e7505795b239406e11f838f27b2ca5da09139d6b | [
"MIT"
] | null | null | null | adversarial_models.py | laurensalvarez/Fooling-LIME-SHAP | e7505795b239406e11f838f27b2ca5da09139d6b | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import sklearn
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
from sklearn.model_selection import train_test_split
from copy import deepcopy
import shap
class Adversarial_Model(object):
"... | 32.94403 | 159 | 0.740854 |
4a1207390f6bc7c246b17a75e6f694587cfd4df9 | 5,547 | py | Python | mars/services/scheduling/supervisor/tests/test_manager.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | 1 | 2021-09-03T18:52:06.000Z | 2021-09-03T18:52:06.000Z | mars/services/scheduling/supervisor/tests/test_manager.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | mars/services/scheduling/supervisor/tests/test_manager.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.993151 | 91 | 0.718406 |
4a1207d1cafec203c3f8c68063e5d065204ca7ef | 1,552 | py | Python | cogdl/tasks/__init__.py | kwyoke/cogdl | df919b4fc7db40f8b035665edbcc7ed59f9d448e | [
"MIT"
] | 1 | 2020-07-20T07:14:50.000Z | 2020-07-20T07:14:50.000Z | cogdl/tasks/__init__.py | LONG-9621/cogdl | 5e1d70240a3bced319b0f0e04af79acb72f65bed | [
"MIT"
] | null | null | null | cogdl/tasks/__init__.py | LONG-9621/cogdl | 5e1d70240a3bced319b0f0e04af79acb72f65bed | [
"MIT"
] | 1 | 2021-06-17T02:44:09.000Z | 2021-06-17T02:44:09.000Z | import argparse
import importlib
import os
import torch.nn as nn
from .base_task import BaseTask
TASK_REGISTRY = {}
def register_task(name):
"""
New task types can be added to cogdl with the :func:`register_task`
function decorator.
For example::
@register_task('node_classification')
... | 28.218182 | 80 | 0.657216 |
4a1208909e78ca0e6337e10cf7fb06c8082b5306 | 556 | py | Python | midRevisao/produto.py | vitorkaio/python-revision | f62937c829355cb5a46725ff14fc79ee8be1796d | [
"MIT"
] | null | null | null | midRevisao/produto.py | vitorkaio/python-revision | f62937c829355cb5a46725ff14fc79ee8be1796d | [
"MIT"
] | null | null | null | midRevisao/produto.py | vitorkaio/python-revision | f62937c829355cb5a46725ff14fc79ee8be1796d | [
"MIT"
] | null | null | null | #coding: utf-8
class Produto:
def __init__(self, name, des, value):
self.__name = name
self.__des = des
self.__value = value
def setName(self, name):
self.__name = name
def getName(self):
return self.__name
def setDes(self, des):
self.__des = des
def getDes(se... | 19.857143 | 74 | 0.607914 |
4a1208a0ea17b5672f5567b8d3494c11525203ce | 5,660 | py | Python | Lab_5/webservice.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | Lab_5/webservice.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | Lab_5/webservice.py | Milka03/Linux-for-Embedded-Systems | 447a4a833f28cb8b1e2674126f546d6d40973369 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Flask, flash, request, redirect, url_for, send_from_directory
from werkzeug.utils import secure_filename
from mpd import MPDClient
import os
import threading
ALLOWED_EXTENSIONS = {'mp3'}
app = Flask(__name__)
app.secret_key = 'LINES'
path = '/root/music/'
stopped = False
cl... | 27.211538 | 109 | 0.566784 |
4a1209671932e1b46c2413888793a005408acab6 | 2,502 | py | Python | hubmap/create_minimal_dataset.py | hubmapconsortium/cross_modality_query | 9d38359a02c0ee7c8f74a24bfad4ff19530df6ea | [
"MIT"
] | null | null | null | hubmap/create_minimal_dataset.py | hubmapconsortium/cross_modality_query | 9d38359a02c0ee7c8f74a24bfad4ff19530df6ea | [
"MIT"
] | 29 | 2021-01-05T16:37:42.000Z | 2022-03-29T17:57:08.000Z | hubmap/create_minimal_dataset.py | hubmapconsortium/cross_modality_query | 9d38359a02c0ee7c8f74a24bfad4ff19530df6ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from argparse import ArgumentParser
from pathlib import Path
from typing import List
import pandas as pd
if __name__ == "__main__":
import django
django.setup()
def make_mini_cell_df(file):
with pd.HDFStore(file) as store:
cell_df = store.get("cell")
mini_cell_df ... | 27.8 | 78 | 0.610312 |
4a1209a9c491053cea3157070a72d2573442c045 | 1,147 | py | Python | auth-api/migrations/versions/422daf97fd19_added_content_type_to_docs.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/422daf97fd19_added_content_type_to_docs.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/422daf97fd19_added_content_type_to_docs.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | 1 | 2019-07-25T18:20:41.000Z | 2019-07-25T18:20:41.000Z | """added content type to docs
Revision ID: 422daf97fd19
Revises: 598dd27fc660
Create Date: 2020-06-09 07:58:20.103049
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.sql import column, table
from sqlalchemy import Integer, String
# revision identifiers, used by Alembic.
revision = '422daf97fd19'
d... | 27.309524 | 110 | 0.646033 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.