hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0559ce0268c3861b8529e2e8da2e29fb2de9a8bf | 3,964 | py | Python | api/src/opentrons/protocol_engine/state/state_store.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | null | null | null | api/src/opentrons/protocol_engine/state/state_store.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | null | null | null | api/src/opentrons/protocol_engine/state/state_store.py | Axel-Jacobsen/opentrons | c543d95c25003f2e784560efaa6a91f051d4cd33 | [
"Apache-2.0"
] | null | null | null | """Protocol engine state management."""
from __future__ import annotations
from typing import List
from opentrons_shared_data.deck.dev_types import DeckDefinitionV2
from .. import command_models as cmd
from .substore import CommandReactive
from .commands import CommandStore, CommandState
from .labware import LabwareS... | 30.96875 | 77 | 0.664985 |
16fcab785641bce936762e6b4ac3dd655474a1dc | 2,822 | py | Python | utils/common.py | ombreprojects/OmbreGUIWallet | d1d6526956a80be0453370c103dfe54c70a09973 | [
"BSD-3-Clause"
] | 1 | 2018-03-05T03:51:13.000Z | 2018-03-05T03:51:13.000Z | utils/common.py | ombreprojects/OmbreGUIWallet | d1d6526956a80be0453370c103dfe54c70a09973 | [
"BSD-3-Clause"
] | 5 | 2018-03-05T19:03:04.000Z | 2018-10-11T20:08:49.000Z | utils/common.py | ombreprojects/OmbreGUIWallet | d1d6526956a80be0453370c103dfe54c70a09973 | [
"BSD-3-Clause"
] | 7 | 2018-03-06T04:02:30.000Z | 2020-03-05T10:04:14.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
## Copyright (c) 2017, The Sumokoin Project (www.sumokoin.org)
'''
Misc utility classes/functions for application
'''
import os, sys, string
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
class DummyStream:
''' dummyStream ... | 27.134615 | 88 | 0.629341 |
c589607b418261024373540077434971eaeccf20 | 7,932 | py | Python | sphinx/source/conf.py | PLanB2008/pysmb | ec7a237619a7a6444512c98c388b1c2988f11600 | [
"Zlib"
] | null | null | null | sphinx/source/conf.py | PLanB2008/pysmb | ec7a237619a7a6444512c98c388b1c2988f11600 | [
"Zlib"
] | null | null | null | sphinx/source/conf.py | PLanB2008/pysmb | ec7a237619a7a6444512c98c388b1c2988f11600 | [
"Zlib"
] | null | null | null | # -*- coding: utf-8 -*-
#
# pysmb documentation build configuration file, created by
# sphinx-quickstart on Sun Dec 18 15:54:40 2011.
#
# 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.
#
# All c... | 32.37551 | 100 | 0.71407 |
3c17a572b01bdaffc37013a138623495bed29b2b | 299 | py | Python | integration/tests/post_multilines.py | youhavethewrong/hurl | 91cc14882a5f1ef7fa86be09a9f5581cef680559 | [
"Apache-2.0"
] | 1,013 | 2020-08-27T12:38:48.000Z | 2022-03-31T23:12:23.000Z | integration/tests/post_multilines.py | youhavethewrong/hurl | 91cc14882a5f1ef7fa86be09a9f5581cef680559 | [
"Apache-2.0"
] | 217 | 2020-08-31T11:18:10.000Z | 2022-03-30T17:50:30.000Z | integration/tests/post_multilines.py | youhavethewrong/hurl | 91cc14882a5f1ef7fa86be09a9f5581cef680559 | [
"Apache-2.0"
] | 54 | 2020-09-02T09:41:06.000Z | 2022-03-19T15:33:05.000Z | from flask import request
from tests import app
@app.route('/post-multilines', methods=['POST'])
def post_multilines():
s = request.data.decode("utf-8")
assert s == "name,age\nbob,10\nbill,22\n"
return ''
@app.route('/get-bob-age', methods=['GET'])
def get_bob_age():
return '10'
| 21.357143 | 48 | 0.655518 |
d3b619bf8b8fdbc1c0627fa74bd159cb7f9ea65c | 10,299 | py | Python | tensorboard/uploader/util_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | 1 | 2021-01-07T14:58:47.000Z | 2021-01-07T14:58:47.000Z | tensorboard/uploader/util_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | null | null | null | tensorboard/uploader/util_test.py | hongxu-jia/tensorboard | 98d4dadc61fd5a0580bed808653c59fb37748893 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.136842 | 80 | 0.604331 |
07eb32bc8bb73a6c5a4f922c776940a22120917a | 746 | py | Python | codigo/Live139/exemplo_01.py | cassiasamp/live-de-python | 00b5e51793097544ba9b75c97a0d30e63970bf45 | [
"MIT"
] | 572 | 2018-04-03T03:17:08.000Z | 2022-03-31T19:05:32.000Z | codigo/Live139/exemplo_01.py | cassiasamp/live-de-python | 00b5e51793097544ba9b75c97a0d30e63970bf45 | [
"MIT"
] | 176 | 2018-05-18T15:56:16.000Z | 2022-03-28T20:39:07.000Z | codigo/Live139/exemplo_01.py | cassiasamp/live-de-python | 00b5e51793097544ba9b75c97a0d30e63970bf45 | [
"MIT"
] | 140 | 2018-04-18T13:59:11.000Z | 2022-03-29T00:43:49.000Z | from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///test.db', echo=True)
Session = sessionmaker(bind=engine)
session = Session()
Base = declarative_base()
class Pessoa(Base):
... | 20.162162 | 61 | 0.738606 |
e8ad8a11f5baa98bbae7434e75d36a765e06b37b | 179 | py | Python | mp4box/parsing/iods.py | abhijeetbhagat/mp4box | 841ff0ef70c7f5a96548f47414bba69c00aa2f5e | [
"BSD-3-Clause"
] | 7 | 2019-08-14T03:03:51.000Z | 2021-11-14T19:10:00.000Z | mp4box/parsing/iods.py | wanyhamo/mp4box | c5c73cd37c01bd9d637f1f3ed82221065dc86d6f | [
"BSD-3-Clause"
] | 10 | 2019-08-03T16:27:08.000Z | 2019-09-10T10:05:23.000Z | mp4box/parsing/iods.py | abhijeetbhagat/mp4box | 841ff0ef70c7f5a96548f47414bba69c00aa2f5e | [
"BSD-3-Clause"
] | 7 | 2019-08-19T17:58:03.000Z | 2021-03-03T07:25:54.000Z | def parse_iods(reader, my_size):
# TODO abhi: skip iods parsing for now
reader.skip(my_size - 8) # -8 since we have already parse the length and box name
return None
| 35.8 | 86 | 0.703911 |
2d32ce06452218a563c2f2f11f0c2f0d333a918c | 2,159 | py | Python | oscar/apps/dashboard/catalogue/tables.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/dashboard/catalogue/tables.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/dashboard/catalogue/tables.py | ahmetdaglarbas/e-commerce | ff190244ccd422b4e08d7672f50709edcbb6ebba | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django_tables2 import Table, Column, LinkColumn, TemplateColumn, A
from oscar.core.loading import get_class, get_model
DashboardTable = get_class('dashboard.tables', 'DashboardTable')
P... | 35.983333 | 95 | 0.674386 |
bce0f870b20ef83e42362e0f36e28588afc70ae9 | 3,370 | py | Python | src/evidencegraph/resources.py | peldszus/evidencegraph | 1720b74d801e738d08996f22e8be676114426408 | [
"MIT"
] | 3 | 2019-07-31T14:48:59.000Z | 2021-09-01T07:26:15.000Z | src/evidencegraph/resources.py | peldszus/evidencegraph | 1720b74d801e738d08996f22e8be676114426408 | [
"MIT"
] | 7 | 2019-07-30T23:22:15.000Z | 2021-05-22T14:11:02.000Z | src/evidencegraph/resources.py | peldszus/evidencegraph | 1720b74d801e738d08996f22e8be676114426408 | [
"MIT"
] | 1 | 2019-09-16T07:23:04.000Z | 2019-09-16T07:23:04.000Z | from collections import defaultdict
from lxml import etree
def loadDimlex(filename):
discourse_markers = {}
print("Loading German DimLex ...")
dimlex_tree = etree.parse(filename)
# iterate over all lexicon entries
for entry in dimlex_tree.iter("eintrag"):
# get all continous orthographies ... | 37.444444 | 78 | 0.61632 |
4b9e35f607ee1dedb6fbdcaad19cdba20e64b275 | 2,448 | py | Python | extractors/koper_extractor.py | flclain/master | a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8 | [
"MIT"
] | null | null | null | extractors/koper_extractor.py | flclain/master | a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8 | [
"MIT"
] | null | null | null | extractors/koper_extractor.py | flclain/master | a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8 | [
"MIT"
] | 1 | 2020-12-15T07:34:39.000Z | 2020-12-15T07:34:39.000Z | import scipy.io as sio
import helpers
import csv
import sys
import json
#TODO self.get_bb
class KoperExtractor():
def __init__(self, data_path,param_path):
'Initializing parameters'
data = json.load(open(data_path))
param = json.load(open(param_path))
self.dataset = param[... | 29.853659 | 80 | 0.576797 |
e28f0f357309f12893a7e222df8aca75e8550748 | 4,414 | py | Python | igov/settings.py | morrisedu/igov_africa | d1a96c18e22034a32f122b2369940583e6719194 | [
"MIT"
] | null | null | null | igov/settings.py | morrisedu/igov_africa | d1a96c18e22034a32f122b2369940583e6719194 | [
"MIT"
] | null | null | null | igov/settings.py | morrisedu/igov_africa | d1a96c18e22034a32f122b2369940583e6719194 | [
"MIT"
] | null | null | null | """
Django settings for igov project.
Generated by 'django-admin startproject' using Django 3.2.7.
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/
"""
import os
impor... | 26.914634 | 121 | 0.69121 |
f37650eba034fc05c3aca1ae779756c9548fa37e | 25,689 | py | Python | test/functional/test_runner.py | guldenpay/gulden-official | 4ae4cc4143ed9c1c15896fe81ad5b64f43829e1b | [
"MIT"
] | 1 | 2015-09-27T07:07:57.000Z | 2015-09-27T07:07:57.000Z | test/functional/test_runner.py | guldenpay/gulden-official | 4ae4cc4143ed9c1c15896fe81ad5b64f43829e1b | [
"MIT"
] | null | null | null | test/functional/test_runner.py | guldenpay/gulden-official | 4ae4cc4143ed9c1c15896fe81ad5b64f43829e1b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 39.339969 | 205 | 0.625054 |
138aa22f3fee7691c2b504c5abb11e038ce170f3 | 4,590 | py | Python | tests/cli/test_view_parameter.py | lucasvieirasilva/aws-ssm-secrets-cli | 861779099dd5a77c7166d69cad90bba5a1145001 | [
"MIT"
] | 4 | 2021-05-18T16:11:26.000Z | 2022-01-10T14:23:11.000Z | tests/cli/test_view_parameter.py | lucasvieirasilva/aws-ssm-secrets-cli | 861779099dd5a77c7166d69cad90bba5a1145001 | [
"MIT"
] | 45 | 2020-09-14T08:57:53.000Z | 2021-09-16T16:13:58.000Z | tests/cli/test_view_parameter.py | lucasvieirasilva/aws-ssm-secrets-cli | 861779099dd5a77c7166d69cad90bba5a1145001 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from aws_secrets.cli.cli import cli
KEY_ARN = 'arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab'
@patch('aws_secrets.miscellaneous.kms.decrypt')
def test_view_parameter_cli(
mock_decrypt,
mock_cli_runner
):
"""
Should echo the plain text... | 25.081967 | 87 | 0.618954 |
f52b8949e03abed72db6ce4aa600df0774c59c5e | 6,067 | py | Python | ex4_flow_timeout.py | knetsolutions/ryu-exercises | 339755ea78ab820440def9dcc1393ca4d587b145 | [
"Apache-2.0"
] | 5 | 2019-02-10T07:20:51.000Z | 2021-05-15T13:33:50.000Z | ex4_flow_timeout.py | knetsolutions/ryu-exercises | 339755ea78ab820440def9dcc1393ca4d587b145 | [
"Apache-2.0"
] | null | null | null | ex4_flow_timeout.py | knetsolutions/ryu-exercises | 339755ea78ab820440def9dcc1393ca4d587b145 | [
"Apache-2.0"
] | 4 | 2019-10-11T08:53:29.000Z | 2021-10-11T09:11:05.000Z | # Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
#
# 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... | 41.554795 | 181 | 0.628152 |
bc6dd29262ed40a4f4a766760b3f6998b1393cf4 | 563 | py | Python | piezo_cav_lock/example.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | piezo_cav_lock/example.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | piezo_cav_lock/example.py | ColdMatter/PhotonBEC | c6bcf9bdefd267c8adde0d299cf5920b010c5022 | [
"MIT"
] | null | null | null | import sys
sys.path.append("D:\\Control\\PythonPackages\\")
import pbec_ipc
#### Example of how to externally (via IPC) check if second loop correction is activated
cavity_second_loop_server_port = pbec_ipc.PORT_NUMBERS["cavity lock second loop"]
cavity_second_loop_server_host = 'localhost'
def is_second_cavity... | 29.631579 | 117 | 0.825933 |
c646e79839a90602c1b27ac4d8ef49bc3743b276 | 430 | py | Python | movie/migrations/0005_user_status.py | 122333211121/movies | 138bcc0ebd667cc2f4f105a3d35980fbbe63a343 | [
"Unlicense"
] | 1 | 2021-07-12T03:40:12.000Z | 2021-07-12T03:40:12.000Z | movie/migrations/0005_user_status.py | 122333211121/movies | 138bcc0ebd667cc2f4f105a3d35980fbbe63a343 | [
"Unlicense"
] | null | null | null | movie/migrations/0005_user_status.py | 122333211121/movies | 138bcc0ebd667cc2f4f105a3d35980fbbe63a343 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-22 15:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('movie', '0004_comment'),
]
operations = [
migrations.AddField(
model_name='user',
name='status',
... | 22.631579 | 94 | 0.553488 |
0f550ca2bd698f495eb363880c4a2c6efdc7c5ed | 5,522 | py | Python | kubernetes/test/test_io_cert_manager_v1alpha3_certificate_request.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_cert_manager_v1alpha3_certificate_request.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_cert_manager_v1alpha3_certificate_request.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... | 43.825397 | 166 | 0.495473 |
ce8943bf6b7aba942fe15aaffade5aad6266711c | 5,184 | py | Python | tests/python/pants_test/option/test_custom_types.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/option/test_custom_types.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/option/test_custom_types.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from textwrap import dedent
from pants.option.custom_types import ListVa... | 40.5 | 98 | 0.549576 |
060ff2230394c5195b15700f656639ddc0279560 | 14,495 | py | Python | src/wormhole/_interfaces.py | Baeumla/magic-wormhole | 1197e5fb6d37aef7c57872df71d42ebf1785fd53 | [
"MIT"
] | 3 | 2017-07-20T11:26:02.000Z | 2021-09-01T22:36:26.000Z | src/wormhole/_interfaces.py | Baeumla/magic-wormhole | 1197e5fb6d37aef7c57872df71d42ebf1785fd53 | [
"MIT"
] | null | null | null | src/wormhole/_interfaces.py | Baeumla/magic-wormhole | 1197e5fb6d37aef7c57872df71d42ebf1785fd53 | [
"MIT"
] | 1 | 2021-07-13T17:35:02.000Z | 2021-07-13T17:35:02.000Z | from zope.interface import Interface
# These interfaces are private: we use them as markers to detect
# swapped argument bugs in the various .wire() calls
class IWormhole(Interface):
"""Internal: this contains the methods invoked 'from below'."""
def got_welcome(welcome):
pass
def got_code(code):
... | 36.78934 | 77 | 0.658848 |
a4a073cced563e395d0f7f697ca7e447d07a256e | 674 | py | Python | certbot/examples/plugins/certbot_example_plugins.py | vivithemage/certbot | 828be0071ea1fd41808b56d3a0024637091198bd | [
"Apache-2.0"
] | 16,789 | 2016-05-06T19:49:59.000Z | 2022-03-31T20:01:47.000Z | certbot/examples/plugins/certbot_example_plugins.py | vivithemage/certbot | 828be0071ea1fd41808b56d3a0024637091198bd | [
"Apache-2.0"
] | 5,737 | 2016-05-06T19:26:43.000Z | 2022-03-31T20:27:38.000Z | certbot/examples/plugins/certbot_example_plugins.py | vivithemage/certbot | 828be0071ea1fd41808b56d3a0024637091198bd | [
"Apache-2.0"
] | 2,974 | 2016-05-06T19:51:23.000Z | 2022-03-31T21:01:36.000Z | """Example Certbot plugins.
For full examples, see `certbot.plugins`.
"""
from certbot import interfaces
from certbot.plugins import common
class Authenticator(common.Plugin, interfaces.Authenticator):
"""Example Authenticator."""
description = "Example Authenticator plugin"
# Implement all methods fr... | 25.923077 | 66 | 0.727003 |
c7fc08d90885f17670b56f39eee710e3ce9a4dff | 1,033 | py | Python | nova/db/sqlalchemy/migrate_repo/versions/332_keypair_in_extra.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/db/sqlalchemy/migrate_repo/versions/332_keypair_in_extra.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/db/sqlalchemy/migrate_repo/versions/332_keypair_in_extra.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # 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, software
# d... | 35.62069 | 78 | 0.71152 |
cf2f4d0e0dffeb167b309f2421220dbc13949642 | 1,621 | py | Python | test/unit/cli/test_loadlimitformatter.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | test/unit/cli/test_loadlimitformatter.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | 5 | 2016-11-28T16:59:44.000Z | 2017-03-18T17:10:40.000Z | test/unit/cli/test_loadlimitformatter.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# test/unit/cli/test_loadlimitformatter.py
# Copyright (C) 2016 authors and contributors (see AUTHORS file)
#
# This module is released under the MIT License.
"""Test LoadLimitFormatter"""
# ============================================================================
# Imports
# ==============... | 27.474576 | 78 | 0.468229 |
fba0bbeb4cf1bb142d162af2ce8535bd6554c8e4 | 10,605 | py | Python | paper/MNIST/negative_reasoning/full_size_CBC_mnist.py | cbc-authors/cbc_networks | b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03 | [
"BSD-3-Clause"
] | 15 | 2019-10-23T15:47:39.000Z | 2022-03-16T20:56:21.000Z | paper/MNIST/negative_reasoning/full_size_CBC_mnist.py | cbc-authors/cbc_networks | b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03 | [
"BSD-3-Clause"
] | 1 | 2020-03-18T04:47:01.000Z | 2020-03-24T10:07:36.000Z | paper/MNIST/negative_reasoning/full_size_CBC_mnist.py | saralajew/cbc_networks | b65a7967fa1f6ac2cec23503a9f01fa7bf04ae03 | [
"BSD-3-Clause"
] | 4 | 2019-11-08T18:16:13.000Z | 2020-04-03T15:09:39.000Z | # -*- coding: utf-8 -*-
"""Implementation of the full size CBC on MNIST from the paper.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
from keras.layers import *
from keras.models import Model
from keras.datasets import mnist
... | 38.147482 | 79 | 0.637812 |
f3f90d2ce5b8df81bc5bd9c3a8b61fe973ab9d34 | 11,624 | py | Python | tencentcloud/tse/v20201207/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/tse/v20201207/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/tse/v20201207/models.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... | 29.427848 | 128 | 0.587491 |
f40288611082cebce58e9aafc0b3e6c225f6210a | 11,858 | py | Python | detectron/roi_data/fast_rcnn.py | fyangneil/DSFPN | 95ba534d451598db7af05b009aec9b40ac675182 | [
"Apache-2.0"
] | null | null | null | detectron/roi_data/fast_rcnn.py | fyangneil/DSFPN | 95ba534d451598db7af05b009aec9b40ac675182 | [
"Apache-2.0"
] | null | null | null | detectron/roi_data/fast_rcnn.py | fyangneil/DSFPN | 95ba534d451598db7af05b009aec9b40ac675182 | [
"Apache-2.0"
] | 1 | 2020-12-09T08:32:37.000Z | 2020-12-09T08:32:37.000Z | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 40.749141 | 80 | 0.68224 |
f44e7280dbf7db40845635f171bf29572553678a | 669 | py | Python | lang/py/pylib/code/sqlite3/sqlite3_argument_positional.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | lang/py/pylib/code/sqlite3/sqlite3_argument_positional.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | lang/py/pylib/code/sqlite3/sqlite3_argument_positional.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Query tasks in the database.
"""
#end_pymotw_header
import sqlite3
import sys
db_filename = 'todo.db'
project_name = sys.argv[1]
with sqlite3.connect(db_filename) as conn:
cursor = conn.cursor()
query = ... | 23.068966 | 71 | 0.632287 |
050fbd0ab5f8d4ebec9a14bf738a975e6eda1171 | 1,198 | py | Python | sc2env/xai_replay/ui/viz/js/file_extraction.py | khlam/sc2env | af0d181dd78b09e6bedda7b0e9c98064adb05641 | [
"MIT"
] | 1 | 2019-01-22T23:36:49.000Z | 2019-01-22T23:36:49.000Z | sc2env/xai_replay/ui/viz/js/file_extraction.py | khlam/sc2env | af0d181dd78b09e6bedda7b0e9c98064adb05641 | [
"MIT"
] | 2 | 2019-07-19T21:28:57.000Z | 2022-03-25T19:14:05.000Z | sc2env/xai_replay/ui/viz/js/file_extraction.py | khlam/sc2env | af0d181dd78b09e6bedda7b0e9c98064adb05641 | [
"MIT"
] | 1 | 2019-06-26T01:21:14.000Z | 2019-06-26T01:21:14.000Z | import sys
import os
import json
# looks at particular relative dir to see all files with appropriate extension - .xai - and
# returns a list of those filenames (not pathnames) for use in the browser dropdown list
def get_xai_replay_filenames():
print("Do nothing for now")
if (len(sys.argv) != 2):
... | 31.526316 | 92 | 0.631052 |
13538199d2a685eefb83154dec6c6e1aa2b6640b | 794 | py | Python | apps/erp/views.py | samsagaz/pyerp | db61bca307f73c13f4ad5a2ffb4531132ea5b605 | [
"MIT"
] | 1 | 2020-02-26T19:36:08.000Z | 2020-02-26T19:36:08.000Z | apps/erp/views.py | samsagaz/pyerp | db61bca307f73c13f4ad5a2ffb4531132ea5b605 | [
"MIT"
] | null | null | null | apps/erp/views.py | samsagaz/pyerp | db61bca307f73c13f4ad5a2ffb4531132ea5b605 | [
"MIT"
] | 2 | 2020-02-26T19:36:12.000Z | 2020-03-16T16:30:57.000Z | from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import redirect, render
from django.urls import reverse
@login_required(login_url="/erp/login")
def erp_home(request):
return render(requ... | 25.612903 | 70 | 0.724181 |
5b65012c8b00bc9b914edfa3c6fdc5aec1b19470 | 2,753 | py | Python | tests/test_nn.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | tests/test_nn.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | tests/test_nn.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | import torch
from torchelie.nn import *
import torchelie.nn.functional as tnnf
def test_adain():
m = torch.jit.script(AdaIN2d(16, 8))
m(torch.randn(5, 16, 8, 8), torch.randn(5, 8))
m = torch.jit.script(AdaIN2d(16, 8))
m.condition(torch.randn(5, 8))
m(torch.randn(5, 16, 8, 8))
def test_film():
... | 22.382114 | 76 | 0.561932 |
395a794df31aa9c5ec1b5978b5e6019c7d8f053f | 2,599 | py | Python | notebooks/mnist_train.py | daiwk/grace_t | f83fa4f3110e4f01ea323ff918c1369533a798be | [
"Apache-2.0"
] | 2 | 2019-10-21T17:59:46.000Z | 2020-07-24T15:42:37.000Z | notebooks/mnist_train.py | daiwk/grace_t | f83fa4f3110e4f01ea323ff918c1369533a798be | [
"Apache-2.0"
] | null | null | null | notebooks/mnist_train.py | daiwk/grace_t | f83fa4f3110e4f01ea323ff918c1369533a798be | [
"Apache-2.0"
] | null | null | null | import os
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import mnist_inference
BATCH_SIZE = 100
LEARNING_RATE_BASE = 0.8
LEARNING_RATE_DECAY = 0.99
REGULARIZATION_RATE = 0.0001
TRAINING_STEPS = 30000
MOVING_AVERAGE_DECAY = 0.99
MODEL_SAVE_PATH = "./mnist/model/"
MODEL_NAME = "m... | 32.898734 | 101 | 0.686418 |
d5987379dd7b5fdb82163736ea0a8b6aae9254b7 | 1,181 | py | Python | BSTU App/BSTU App/Database/DatabaseManagement/NavigationDB/Map/GUK/Stage_4.py | alextar04/BSTU-APP | ff9df53335be4a94a1e04d4d4072b3bba18ba08b | [
"MIT"
] | null | null | null | BSTU App/BSTU App/Database/DatabaseManagement/NavigationDB/Map/GUK/Stage_4.py | alextar04/BSTU-APP | ff9df53335be4a94a1e04d4d4072b3bba18ba08b | [
"MIT"
] | null | null | null | BSTU App/BSTU App/Database/DatabaseManagement/NavigationDB/Map/GUK/Stage_4.py | alextar04/BSTU-APP | ff9df53335be4a94a1e04d4d4072b3bba18ba08b | [
"MIT"
] | null | null | null | import io
import os
import sqlite3
from peewee import *
from NavigationDB.Map.MapDB import *
from NavigationDB.MapRoadDot.GUK.Stage4 import *
def MapAdd():
result = searchShortestWays(roadDotsArray, connectedDots)
matrixBestDistance = result[0]
matrixBestWays = result[1]
Map.create(id=4, idCorp=0, sto... | 35.787879 | 145 | 0.522439 |
1f75d1f936e4dc4dcba3e38adcecbe4c76acafef | 3,398 | py | Python | tests/testmain.py | rsnakamura/iperflexer | 68f6ac5b3833e0053d6a5ca87bdb605ebbe6e665 | [
"MIT"
] | null | null | null | tests/testmain.py | rsnakamura/iperflexer | 68f6ac5b3833e0053d6a5ca87bdb605ebbe6e665 | [
"MIT"
] | null | null | null | tests/testmain.py | rsnakamura/iperflexer | 68f6ac5b3833e0053d6a5ca87bdb605ebbe6e665 | [
"MIT"
] | null | null | null | from unittest import TestCase
from mock import MagicMock, patch
import iperflexer
PUDB = MagicMock()
SAMPLE = """
------------------------------------------------------------
Client connecting to 192.168.20.50, TCP port 5001
TCP window size: 16.0 KByte (default)
----------------------------------------------------... | 36.934783 | 75 | 0.581813 |
3184c7c9c0757fef3a1df1c4281d3e67596564ba | 798 | py | Python | examples/undocumented/python/distance_sparseeuclidean.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 1 | 2019-10-02T11:10:08.000Z | 2019-10-02T11:10:08.000Z | examples/undocumented/python/distance_sparseeuclidean.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | null | null | null | examples/undocumented/python/distance_sparseeuclidean.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 1 | 2020-06-02T09:15:40.000Z | 2020-06-02T09:15:40.000Z | #!/usr/bin/env python
import shogun as sg
traindat = '../data/fm_train_sparsereal.dat'
testdat = '../data/fm_test_sparsereal.dat'
parameter_list = [[traindat,testdat],[traindat,testdat]]
def distance_sparseeuclidean (train_fname=traindat,test_fname=testdat):
from shogun import SparseRealFeatures
import shogun as sg... | 29.555556 | 71 | 0.813283 |
032161ca96cf540a24d754f40a7fd9c37bf7d94a | 10,645 | py | Python | masp/shoebox_room_sim/image_source_method.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | 19 | 2020-06-07T10:58:11.000Z | 2022-02-10T08:48:15.000Z | masp/shoebox_room_sim/image_source_method.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | null | null | null | masp/shoebox_room_sim/image_source_method.py | andresperezlopez/masp | c6385b6635b5e86233152ccfea2df15caee6acc7 | [
"BSD-3-Clause"
] | 5 | 2020-06-29T07:12:03.000Z | 2021-11-06T12:25:47.000Z | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Copyright (c) 2019, Eurecat / UPF
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of... | 34.11859 | 95 | 0.585439 |
6a497b9e1294c3db1e85cefcc82c4183a5ed0a83 | 632 | py | Python | core/migrations/0051_auto_20210617_0219.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 1 | 2021-05-28T05:22:54.000Z | 2021-05-28T05:22:54.000Z | core/migrations/0051_auto_20210617_0219.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 3 | 2021-05-31T15:44:14.000Z | 2021-06-29T07:48:13.000Z | core/migrations/0051_auto_20210617_0219.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 1 | 2021-05-30T07:42:54.000Z | 2021-05-30T07:42:54.000Z | # Generated by Django 3.2.3 on 2021-06-17 02:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0050_auto_20210616_1426'),
]
operations = [
migrations.RemoveField(
model_name='designa... | 25.28 | 114 | 0.613924 |
6a8545fae2c3d357182056fa6aaf5779bd34d7d4 | 243 | py | Python | wlke/index/urls.py | HAUDRAUFHAUN/wlke | 87a90343ac00d94912094ca06e7c8dbdafae442d | [
"MIT"
] | 2 | 2020-05-19T10:15:43.000Z | 2020-07-15T20:21:31.000Z | wlke/index/urls.py | HAUDRAUFHAUN/wlke | 87a90343ac00d94912094ca06e7c8dbdafae442d | [
"MIT"
] | 4 | 2020-05-20T18:44:47.000Z | 2021-05-07T18:20:25.000Z | wlke/index/urls.py | HAUDRAUFHAUN/wlke | 87a90343ac00d94912094ca06e7c8dbdafae442d | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name="index"),
path('jumbo/<int:jumbo_id>/', views.jumbo_detail, name="jumbodetail"),
path('impressum/', views.impressum, name="impressum")
]
| 24.3 | 74 | 0.679012 |
a58ff386d6fd43315ed2ace84c058e570357d7b1 | 2,294 | py | Python | test/1.2.0/urls/_R_C_/test_1_2_0_urls__R_C__schemaorg_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 40 | 2018-06-13T21:38:35.000Z | 2022-03-19T18:34:37.000Z | test/1.2.0/urls/_R_C_/test_1_2_0_urls__R_C__schemaorg_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 135 | 2018-03-20T09:35:39.000Z | 2022-03-16T14:57:08.000Z | test/1.2.0/urls/_R_C_/test_1_2_0_urls__R_C__schemaorg_object.py | zmoon/cff-converter-python | ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d | [
"Apache-2.0"
] | 14 | 2018-06-12T20:17:25.000Z | 2022-02-02T13:58:58.000Z | import os
import pytest
from test.contracts.schemaorg_object import Contract
from cffconvert.behavior_1_2_x.schemaorg_object import SchemaorgObject
from cffconvert import Citation
@pytest.fixture(scope="module")
def schemaorg_object():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with ope... | 37 | 111 | 0.71796 |
5be44e40ee4a2e4d6d5d30d555dbd76abdd20f5d | 915 | py | Python | data_structures/array/array.py | ro6ley/MyPy | e2db5d77c86914f036b24c840c8d985482c53e31 | [
"MIT"
] | 1 | 2020-03-19T07:36:09.000Z | 2020-03-19T07:36:09.000Z | data_structures/array/array.py | ro6ley/MyPy | e2db5d77c86914f036b24c840c8d985482c53e31 | [
"MIT"
] | null | null | null | data_structures/array/array.py | ro6ley/MyPy | e2db5d77c86914f036b24c840c8d985482c53e31 | [
"MIT"
] | null | null | null | class MyArray:
# Initialize the array we will be manipulating
def __init__(self):
self.array = []
# Insert an item in the array at a specific index
def insert(self, item, index):
self.array.insert(index, item)
# Traverse the array and print all the items
def traverse(self):... | 28.59375 | 67 | 0.631694 |
84523ec88a766028f11737b81ddd45e7148104f3 | 72 | py | Python | run.py | PatrickCmd/Yummy-Recipe-RestAPI | 8911678be501d233e39f1b5c5a46aa3e82e5c844 | [
"MIT"
] | null | null | null | run.py | PatrickCmd/Yummy-Recipe-RestAPI | 8911678be501d233e39f1b5c5a46aa3e82e5c844 | [
"MIT"
] | 41 | 2017-11-07T00:39:02.000Z | 2019-10-21T15:09:58.000Z | run.py | PatrickCmd/Yummy-Recipe-RestAPI | 8911678be501d233e39f1b5c5a46aa3e82e5c844 | [
"MIT"
] | 3 | 2017-11-18T16:03:34.000Z | 2017-12-20T19:49:59.000Z | # run.py
from api import app
if __name__ == '__main__':
app.run()
| 10.285714 | 26 | 0.625 |
fed203580f898f03a5ebbde06acd2fcd21a8bfdc | 10,237 | py | Python | pibooth/pictures/concatenate.py | kboghdady/pibooth | 6058b1cc6ef764ba8c4b7b57dd0a35f10f916a3d | [
"MIT"
] | null | null | null | pibooth/pictures/concatenate.py | kboghdady/pibooth | 6058b1cc6ef764ba8c4b7b57dd0a35f10f916a3d | [
"MIT"
] | null | null | null | pibooth/pictures/concatenate.py | kboghdady/pibooth | 6058b1cc6ef764ba8c4b7b57dd0a35f10f916a3d | [
"MIT"
] | 1 | 2021-05-11T00:23:34.000Z | 2021-05-11T00:23:34.000Z | # -*- coding: utf-8 -*-
from PIL import Image, ImageDraw, ImageFont
from pibooth import fonts
from pibooth.pictures import sizing
def new_image_with_background(width, height, background):
"""Create a new image with the given background. The background can be
a RGB color tuple ora PIL image.
"""
if is... | 44.125 | 144 | 0.578978 |
248b1d5344a2dc9de8fa3293a9cf94a738dac1ee | 711 | py | Python | tests/test_github_model_provider.py | brisu/spleeter | 7e2ce1457bcb7f06cb5196a640afbd49358ad0cb | [
"MIT"
] | 3 | 2019-11-26T19:02:14.000Z | 2021-08-28T10:50:41.000Z | tests/test_github_model_provider.py | brisu/spleeter | 7e2ce1457bcb7f06cb5196a640afbd49358ad0cb | [
"MIT"
] | 1 | 2020-02-04T10:01:08.000Z | 2020-02-04T10:01:08.000Z | tests/test_github_model_provider.py | brisu/spleeter | 7e2ce1457bcb7f06cb5196a640afbd49358ad0cb | [
"MIT"
] | 1 | 2021-10-31T16:13:19.000Z | 2021-10-31T16:13:19.000Z | #!/usr/bin/env python
# coding: utf8
""" TO DOCUMENT """
from pytest import raises
from spleeter.model.provider import get_default_model_provider
def test_checksum():
""" Test archive checksum index retrieval. """
provider = get_default_model_provider()
assert provider.checksum('2stems') == \
'... | 32.318182 | 74 | 0.749648 |
f3ae81f96f0b3d3129df5f1b2b2f471a280014b4 | 17,233 | py | Python | backend/src/manage-demo.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | 1 | 2021-11-11T17:55:54.000Z | 2021-11-11T17:55:54.000Z | backend/src/manage-demo.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | null | null | null | backend/src/manage-demo.py | KittyMcMitty/spiritumDuoDocker | b546a30c5a116123c9955b3f0cdea53ec705cd01 | [
"MIT"
] | null | null | null | import asyncio
import sys
from common import DataCreatorInputErrors
from models import (
Pathway,
Patient,
DecisionPoint,
Milestone,
MilestoneType,
User,
Session,
OnPathway,
Role,
RolePermission, UserRole,
PathwayMilestoneType,
UserPathway
)
from containers import SDConta... | 34.674044 | 113 | 0.58945 |
a3dcac464928fcde934008707ef66fd5145df7af | 1,136 | py | Python | molsysmt/tests/basic/convert/test_convert_from_file_msmpk.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/tests/basic/convert/test_convert_from_file_msmpk.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/tests/basic/convert/test_convert_from_file_msmpk.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | """
Unit and regression test for the convert module of the molsysmt package.
"""
# Import package, test suite, and other packages as needed
import molsysmt as msm
import numpy as np
import os
# Whole systems (selection='all' and structure_indices='all')
def test_file_msmpk_to_molsysmt_MolSys():
molsys = msm.demo... | 35.5 | 82 | 0.751761 |
9c48ca5897048d8d4909fe4361c7219beea5b062 | 38,170 | py | Python | scripts/venv/lib/python2.7/site-packages/cogent/struct/rna2d.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 3 | 2015-11-20T08:44:42.000Z | 2016-12-14T01:40:03.000Z | scripts/venv/lib/python2.7/site-packages/cogent/struct/rna2d.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | 1 | 2017-09-04T14:04:32.000Z | 2020-05-26T19:04:00.000Z | scripts/venv/lib/python2.7/site-packages/cogent/struct/rna2d.py | sauloal/cnidaria | fe6f8c8dfed86d39c80f2804a753c05bb2e485b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Code for handling RNA secondary structure.
RNA secondary structures can be represented in many different ways. The
representation makes a large difference to the efficiency of different
algorithms, so several different structural representations (and the means
to interconvert them) are provide... | 36.879227 | 80 | 0.585407 |
9e3f8b167b4c96ee9e07b756e9b93ade967c90ae | 1,729 | py | Python | var/spack/repos/builtin/packages/treelite/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/treelite/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/treelite/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Treelite(CMakePackage):
"""Treelite is a model compiler for efficient deployment of
de... | 35.285714 | 97 | 0.637941 |
46d9e967e1d0938a6c97b9fc5f2c6f621e8c7672 | 2,198 | py | Python | src/pyotp/utils.py | tmartin357/pyotp | e8c49c636124ff724d2809364c3324f4b35edba6 | [
"MIT"
] | 1 | 2016-11-11T11:01:28.000Z | 2016-11-11T11:01:28.000Z | src/pyotp/utils.py | selboo/pyotp | 55ee6f621ce5c1a6824093e03f212d2af1eb00a1 | [
"MIT"
] | null | null | null | src/pyotp/utils.py | selboo/pyotp | 55ee6f621ce5c1a6824093e03f212d2af1eb00a1 | [
"MIT"
] | null | null | null | import urllib
def build_uri(secret, name, initial_count=None, issuer_name=None):
"""
Returns the provisioning URI for the OTP; works for either TOTP or HOTP.
This can then be encoded in a QR Code and used to provision the Google
Authenticator app.
For module-internal use.
See also:
... | 30.109589 | 76 | 0.651501 |
fa2aef50ac84accbdde199bb3988ad49da178047 | 8,539 | py | Python | check.py | DHTC-Tools/connect-monitors | 913eaddf705a556f81fe1fbeb43cf6dee56aa998 | [
"Apache-2.0"
] | null | null | null | check.py | DHTC-Tools/connect-monitors | 913eaddf705a556f81fe1fbeb43cf6dee56aa998 | [
"Apache-2.0"
] | null | null | null | check.py | DHTC-Tools/connect-monitors | 913eaddf705a556f81fe1fbeb43cf6dee56aa998 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import hashlib
import sys
import os
import subprocess
import socket
import argparse
import json
import requests
import paramiko
ADMIN_MESG_LOCATION = "/tmp/admin_message"
def test_login(service, host, user):
result = {'service': service,
'status': "green",
'not... | 34.57085 | 87 | 0.571027 |
10d683170ae24468bcc57400fe9abe34b037b5f9 | 6,489 | py | Python | lib/SequenceSetUtils/featureset.py | arwyer/SequenceSetUtils | ed64dd1dcd664e971cd6405c6125c45804698564 | [
"MIT"
] | 1 | 2019-07-20T05:53:22.000Z | 2019-07-20T05:53:22.000Z | lib/SequenceSetUtils/featureset.py | man4ish/SequenceSetUtils | 8880e24a8bdbb0eeaa6213fa1e367ae46e768702 | [
"MIT"
] | null | null | null | lib/SequenceSetUtils/featureset.py | man4ish/SequenceSetUtils | 8880e24a8bdbb0eeaa6213fa1e367ae46e768702 | [
"MIT"
] | 1 | 2019-07-19T04:47:37.000Z | 2019-07-19T04:47:37.000Z | import logging
import os
from datetime import datetime
from Bio import SeqIO
from installed_clients.WorkspaceClient import Workspace
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.AssemblyUtilClient import AssemblyUtil
def strstandard(dirtystr):
return str(dirtystr).strip().... | 41.33121 | 109 | 0.532285 |
4060c613734bfdc559ff0f60614875bd406a8e09 | 4,060 | py | Python | examples/quantized_net/tutorial_quanconv_mnist.py | Windaway/tensorlayer | 7afd8f0a39a4f1864a82e508f7a326fc998dc033 | [
"Apache-2.0"
] | 1 | 2019-12-30T03:16:26.000Z | 2019-12-30T03:16:26.000Z | examples/quantized_net/tutorial_quanconv_mnist.py | Helilysyt/tensorlayer | 2dc4482a13aff3833a246b4d85b69a5d9079f01d | [
"Apache-2.0"
] | null | null | null | examples/quantized_net/tutorial_quanconv_mnist.py | Helilysyt/tensorlayer | 2dc4482a13aff3833a246b4d85b69a5d9079f01d | [
"Apache-2.0"
] | 1 | 2021-04-13T06:34:48.000Z | 2021-04-13T06:34:48.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
import time
import tensorflow as tf
import tensorlayer as tl
tf.logging.set_verbosity(tf.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.DEBUG)
X_train, y_train, X_val, y_val, X_test, y_test = tl.files.load_mnist_dataset(shape=(-1, 28, 28, 1))
# X_train, y_train, X_tes... | 37.592593 | 103 | 0.659113 |
2bd37202cb28d7f8b611d09cd5d1f0c84ed65a36 | 3,033 | py | Python | cloudhands/identity/ldap_account.py | cedadev/cloudhands-web | 2e83df3111c286a54ef3957e873c9ea29c523366 | [
"BSD-3-Clause"
] | null | null | null | cloudhands/identity/ldap_account.py | cedadev/cloudhands-web | 2e83df3111c286a54ef3957e873c9ea29c523366 | [
"BSD-3-Clause"
] | null | null | null | cloudhands/identity/ldap_account.py | cedadev/cloudhands-web | 2e83df3111c286a54ef3957e873c9ea29c523366 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: UTF-8
import argparse
import logging
import subprocess
import sys
import ldap3
from cloudhands.common.discovery import providers
from cloudhands.common.discovery import settings
from cloudhands.identity.registration import from_pool
from cloudhands.web import __version__
__doc__ = ... | 27.825688 | 73 | 0.641279 |
4d110c63a84ad8a3d610de962c80f26daad470fd | 22,323 | py | Python | ENV/lib/python2.7/site-packages/django_tables2/columns/base.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/lib/python2.7/site-packages/django_tables2/columns/base.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/lib/python2.7/site-packages/django_tables2/columns/base.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import, unicode_literals
import warnings
from collections import OrderedDict
from itertools import islice
import six
from django import VERSION as django_version
from django.db.models.fields import FieldDoesNotExist
from django_tables2.templatetags.django_tables2 import... | 34.343077 | 97 | 0.606952 |
241a6b31f2bd3449a8b23a3c8c72c8655ea4ed99 | 31,091 | py | Python | Lib/test/test_context.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | Lib/test/test_context.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | Lib/test/test_context.py | rng-dynamics/RustPython | 6165aadcc4e80e0f48f3e784e17b3c7f80d21a8a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | import concurrent.futures
import contextvars
import functools
import gc
import random
import time
import unittest
import weakref
try:
from _testcapi import hamt
except ImportError:
hamt = None
def isolated_context(func):
"""Needed to make reftracking test mode work."""
@functools.wraps(func)
def ... | 27.984698 | 78 | 0.51806 |
65ec046a44e8e0051dacde503c37d7ccb88e7570 | 3,798 | py | Python | openpathsampling/engines/topology.py | bdice/openpathsampling | 8c7ab8cb1bd7f6ae388a49d441423e2332c8301b | [
"MIT"
] | 64 | 2016-07-06T13:38:51.000Z | 2022-03-30T15:58:01.000Z | openpathsampling/engines/topology.py | bdice/openpathsampling | 8c7ab8cb1bd7f6ae388a49d441423e2332c8301b | [
"MIT"
] | 601 | 2016-06-13T10:22:01.000Z | 2022-03-25T00:10:40.000Z | openpathsampling/engines/topology.py | dwhswenson/openpathsampling | 72fedad9ba8bc60d17c7cc73c641129898d5d530 | [
"MIT"
] | 45 | 2016-11-10T11:17:53.000Z | 2022-02-13T11:50:26.000Z | import numpy as np
import pandas as pd
from openpathsampling.netcdfplus import StorableNamedObject
from openpathsampling.integration_tools import error_if_no_mdtraj, md
import logging
logger = logging.getLogger(__name__)
class Topology(StorableNamedObject):
"""
Topology is the object that contains all infor... | 33.026087 | 77 | 0.558452 |
a4bc55e6b9259898d1f84e7c6d200334191046e3 | 1,200 | py | Python | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | null | null | null | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | 287 | 2021-05-14T21:25:26.000Z | 2022-03-30T12:02:51.000Z | tests/performance/index_hashing_performance.py | mabel-dev/mabel | 4b06e9e5ce108e8a3267e44685fd61fc9802eb0a | [
"Apache-2.0"
] | null | null | null | import os, sys
sys.path.insert(1, os.path.join(sys.path[0], "../.."))
from mabel.data import Reader
from mabel.data.internals.index import IndexBuilder
from mabel.logging import get_logger
from timer import Timer
import orjson
get_logger().setLevel(100)
def _inner_file_reader(
file_name: str, chunk_size: int = ... | 29.268293 | 80 | 0.6525 |
5b4499854271f2ea2d7c5d4b94e42fadb88d4d1d | 1,305 | py | Python | getdates.py | webclinic017/Backtrader-Samples | dc3744e9543a38eb91be213cddd35b435b67ac87 | [
"0BSD"
] | 1 | 2021-12-17T14:14:45.000Z | 2021-12-17T14:14:45.000Z | getdates.py | webclinic017/Backtrader-Samples | dc3744e9543a38eb91be213cddd35b435b67ac87 | [
"0BSD"
] | null | null | null | getdates.py | webclinic017/Backtrader-Samples | dc3744e9543a38eb91be213cddd35b435b67ac87 | [
"0BSD"
] | null | null | null | import datetime
from datetime import timedelta
def gen_dates(b_date, days):
day = timedelta(days=1)
# print(day)
for i in range(days):
# print(b_date + day*i)
yield b_date + day*i
def get_date_list(start_date, end_date): #end_date=None
"""
获取日期列表
:param start: 开始日期
:par... | 25.096154 | 78 | 0.584674 |
cd7aaaa2a3633ccd6e16599573e7637038b96320 | 185 | py | Python | stocks/guess/views.py | TylerYep/stock-backend | e34ed152f76857dfef53cd372a7986f40e5c8e89 | [
"MIT"
] | null | null | null | stocks/guess/views.py | TylerYep/stock-backend | e34ed152f76857dfef53cd372a7986f40e5c8e89 | [
"MIT"
] | null | null | null | stocks/guess/views.py | TylerYep/stock-backend | e34ed152f76857dfef53cd372a7986f40e5c8e89 | [
"MIT"
] | null | null | null | from django.http import HttpRequest, HttpResponse
def index(request: HttpRequest) -> HttpResponse:
del request
return HttpResponse("Hello, world. You're at the polls index.")
| 26.428571 | 67 | 0.751351 |
653557f37100a1331a1d54035ebdee5554edab75 | 53 | py | Python | orthoani/__main__.py | althonos/orthoani | f2bfe917d9450b87a610a762d7ce81a5d8c94fcf | [
"MIT"
] | 4 | 2020-06-15T15:07:40.000Z | 2022-03-08T08:07:09.000Z | orthoani/__main__.py | althonos/orthoani | f2bfe917d9450b87a610a762d7ce81a5d8c94fcf | [
"MIT"
] | 1 | 2020-06-19T02:54:37.000Z | 2020-06-19T03:30:20.000Z | orthoani/__main__.py | althonos/orthoani | f2bfe917d9450b87a610a762d7ce81a5d8c94fcf | [
"MIT"
] | 1 | 2021-11-24T21:45:26.000Z | 2021-11-24T21:45:26.000Z | import sys
from ._main import main
sys.exit(main())
| 10.6 | 23 | 0.735849 |
f9f046033f950ed0e370fad59ed5f6b14e5750cb | 1,943 | py | Python | brandfolder/brandfolder.py | brandfolder/sdk-python | ce30ad3d3ec761ce3228e8c24e3d5e1a6f88ef0a | [
"MIT"
] | 1 | 2021-08-29T08:24:11.000Z | 2021-08-29T08:24:11.000Z | brandfolder/brandfolder.py | brandfolder/sdk-python | ce30ad3d3ec761ce3228e8c24e3d5e1a6f88ef0a | [
"MIT"
] | 1 | 2020-07-21T20:40:43.000Z | 2020-07-21T20:40:43.000Z | brandfolder/brandfolder.py | brandfolder/brandfolder-sdk-python | ce30ad3d3ec761ce3228e8c24e3d5e1a6f88ef0a | [
"MIT"
] | null | null | null | from typing import Optional
from brandfolder.resource import Resource
from brandfolder.resource_container import ResourceContainer
from brandfolder.asset import Asset
from brandfolder.attachment import Attachment
from brandfolder.collection import Collection
from brandfolder.section import Section
class Brandfolder(... | 31.852459 | 89 | 0.623263 |
7adfed04431efb8af17c32adda8cc26536423233 | 26,345 | py | Python | Lib/site-packages/web/application.py | vikramjeet007/epochconverter123 | f104d65d4de12c46a60e3c16748714c0c374b05e | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/web/application.py | vikramjeet007/epochconverter123 | f104d65d4de12c46a60e3c16748714c0c374b05e | [
"bzip2-1.0.6"
] | 7 | 2020-06-05T20:53:51.000Z | 2021-09-22T18:31:25.000Z | Lib/site-packages/web/application.py | vikramjeet007/epochconverter123 | f104d65d4de12c46a60e3c16748714c0c374b05e | [
"bzip2-1.0.6"
] | null | null | null | """
Web application
(from web.py)
"""
from __future__ import print_function
from . import webapi as web
from . import wsgi, utils, browser
from .debugerror import debugerror
from . import httpserver
from .utils import lstrips
from .py3helpers import iteritems, string_types, is_iter, PY2
import sys
import traceback
im... | 31.588729 | 114 | 0.533801 |
4ef2bbc6c2d90dcf2e27885289b0f0f3708abf8a | 23,330 | py | Python | src/container/kube-manager/kube_manager/vnc/vnc_kubernetes.py | zhongyangni/controller | 439032d46767dd033ba55c1e5c34e7f2213da8b3 | [
"Apache-2.0"
] | null | null | null | src/container/kube-manager/kube_manager/vnc/vnc_kubernetes.py | zhongyangni/controller | 439032d46767dd033ba55c1e5c34e7f2213da8b3 | [
"Apache-2.0"
] | 2 | 2018-12-04T02:20:52.000Z | 2018-12-22T06:16:30.000Z | src/container/kube-manager/kube_manager/vnc/vnc_kubernetes.py | zhongyangni/controller | 439032d46767dd033ba55c1e5c34e7f2213da8b3 | [
"Apache-2.0"
] | 1 | 2018-12-04T02:07:47.000Z | 2018-12-04T02:07:47.000Z | #
# Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
#
"""
VNC management for kubernetes
"""
import gevent
from gevent.queue import Empty
import requests
import argparse
import uuid
from cStringIO import StringIO
from cfgm_common import importutils
from cfgm_common import vnc_cgitb
from cfgm_common.ex... | 41.073944 | 90 | 0.61736 |
caecf1ab27f9a36203e25696d1fec5a360ad76f2 | 2,015 | py | Python | hypixelio/models/player.py | GrandMoff100/HypixelIO | b3d9fc0c34caff43df12f8392b5ebe035ffbb4ea | [
"MIT"
] | null | null | null | hypixelio/models/player.py | GrandMoff100/HypixelIO | b3d9fc0c34caff43df12f8392b5ebe035ffbb4ea | [
"MIT"
] | 1 | 2022-03-24T11:40:53.000Z | 2022-03-24T11:40:53.000Z | hypixelio/models/player.py | GrandMoff100/HypixelIO | b3d9fc0c34caff43df12f8392b5ebe035ffbb4ea | [
"MIT"
] | null | null | null | import typing as t
from hypixelio.utils.time import unix_time_to_datetime
class Player:
def __init__(self, data: dict) -> None:
"""
Parameters
----------
data: dict
The JSON data received from the Hypixel API.
"""
self.hypixel_id = data["_id"]
s... | 32.5 | 118 | 0.630273 |
2beccd12a744c2ac621a61bafb075040a7345ff2 | 195 | py | Python | insta_clone/admin.py | AlexKarari/Instagram | c77823b9862fc1040b3dd050d940c665fa74b985 | [
"MIT"
] | null | null | null | insta_clone/admin.py | AlexKarari/Instagram | c77823b9862fc1040b3dd050d940c665fa74b985 | [
"MIT"
] | null | null | null | insta_clone/admin.py | AlexKarari/Instagram | c77823b9862fc1040b3dd050d940c665fa74b985 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Profile, Comments, Image
# Register your models here.
admin.site.register(Profile)
admin.site.register(Comments)
admin.site.register(Image)
| 21.666667 | 44 | 0.805128 |
b041959be902a19ea2da45a74dcc47a472bcd5fc | 530 | py | Python | hindex/utils.py | akx/hindex | 03f4966f2d599a634e11241e73773dc723a2b69f | [
"MIT"
] | null | null | null | hindex/utils.py | akx/hindex | 03f4966f2d599a634e11241e73773dc723a2b69f | [
"MIT"
] | null | null | null | hindex/utils.py | akx/hindex | 03f4966f2d599a634e11241e73773dc723a2b69f | [
"MIT"
] | null | null | null | import os
import re
import unicodedata
punctuation_chars = set()
whitespace_chars = set()
for cp in range(65535):
ch = chr(cp)
cat = unicodedata.category(ch)
if cat[0] == "P" or cat[0] == "S":
punctuation_chars.add(ch)
elif cat[0] == "Z":
whitespace_chars.add(ch)
strip_set = "".join(s... | 24.090909 | 79 | 0.662264 |
02e2cf08716d8d71cec40c6e7cefe9b12588d2a9 | 9,888 | py | Python | contrib/spendfrom/spendfrom.py | CryptoGeekJD/Phore | f830d263f93ee6751f2899a77b5edf0883e903a6 | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | CryptoGeekJD/Phore | f830d263f93ee6751f2899a77b5edf0883e903a6 | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | CryptoGeekJD/Phore | f830d263f93ee6751f2899a77b5edf0883e903a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Use the raw transactions API to spend CDIs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a cdid or cdi-Qt runn... | 36.895522 | 111 | 0.627124 |
78e3ef3099e0aca9268b383cc55216e4525cc9a0 | 24 | py | Python | lipanampesa.py | kenedy0001/mpesa | ea842810958a6fdf0ebda3220ea6c1d282a7c1ed | [
"MIT"
] | null | null | null | lipanampesa.py | kenedy0001/mpesa | ea842810958a6fdf0ebda3220ea6c1d282a7c1ed | [
"MIT"
] | null | null | null | lipanampesa.py | kenedy0001/mpesa | ea842810958a6fdf0ebda3220ea6c1d282a7c1ed | [
"MIT"
] | null | null | null | print("kombo in django") | 24 | 24 | 0.75 |
e38e023c41c3db1c42f3dc0165bde9547f725658 | 16,711 | py | Python | reorg_kobold/kobold_scripts/map_potential_methods_to_mach-ports.py | malus-security/kobold | 2ae23b75ec503ef3702ad297ddbb7824ac4da53c | [
"BSD-3-Clause"
] | 3 | 2020-06-26T19:44:46.000Z | 2021-03-25T07:00:04.000Z | reorg_kobold/kobold_scripts/map_potential_methods_to_mach-ports.py | malus-security/kobold | 2ae23b75ec503ef3702ad297ddbb7824ac4da53c | [
"BSD-3-Clause"
] | null | null | null | reorg_kobold/kobold_scripts/map_potential_methods_to_mach-ports.py | malus-security/kobold | 2ae23b75ec503ef3702ad297ddbb7824ac4da53c | [
"BSD-3-Clause"
] | 1 | 2020-09-14T23:46:31.000Z | 2020-09-14T23:46:31.000Z | #three input files, 1) mach-port to exec mapping, 2) protocol to exec mapping, 3) list of accessible mach-ports
#one output file, mapping of protocols that might be related to accessible mach-ports
#bonus output, mapping of specific methods to try for each accessible mach-port
import pickle
import re
import random
imp... | 39.044393 | 184 | 0.65783 |
af11c6c0133705862406ee59996a5dc696da58da | 3,393 | py | Python | sahara_tempest_plugin/tests/clients/test_node_group_templates.py | mail2nsrajesh/sahara-tests | b13eb256bcc87d6a72272c9ffd348d5076a92c56 | [
"Apache-2.0"
] | null | null | null | sahara_tempest_plugin/tests/clients/test_node_group_templates.py | mail2nsrajesh/sahara-tests | b13eb256bcc87d6a72272c9ffd348d5076a92c56 | [
"Apache-2.0"
] | null | null | null | sahara_tempest_plugin/tests/clients/test_node_group_templates.py | mail2nsrajesh/sahara-tests | b13eb256bcc87d6a72272c9ffd348d5076a92c56 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 44.064935 | 78 | 0.677866 |
88f41bb59571fb7fca7e2341e65d787fe35e63dd | 8,716 | py | Python | influxdb_client/service/write_service.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | influxdb_client/service/write_service.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | influxdb_client/service/write_service.py | rhajek/influxdb-client-python | 852e6f1b1161df4d67eabc19cdb6b323a46b88e2 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F40... | 49.522727 | 242 | 0.663951 |
a7947da8a66f601e3d3458875e8f8053b2320ab9 | 17,630 | py | Python | Document/ResourceTools/ResourceTool2.py | pili-engineering/PLMediaStreamingKit-ByteDance | 6596226ca11a603cb8447f55a4d138f19c7e8d92 | [
"Apache-2.0"
] | 13 | 2020-04-15T02:23:20.000Z | 2021-01-25T03:56:22.000Z | Document/ResourceTools/ResourceTool2.py | pili-engineering/PLMediaStreamingKit-ByteDance | 6596226ca11a603cb8447f55a4d138f19c7e8d92 | [
"Apache-2.0"
] | 2 | 2020-04-26T02:47:46.000Z | 2020-06-18T08:36:29.000Z | Document/ResourceTools/ResourceTool2.py | pili-engineering/PLMediaStreamingKit-ByteDance | 6596226ca11a603cb8447f55a4d138f19c7e8d92 | [
"Apache-2.0"
] | 9 | 2020-03-11T02:25:06.000Z | 2021-03-16T01:44:56.000Z | # -*- coding: UTF-8 -*-
# #!/usr/bin/python2
import json
import os
import shutil
import sys
# 下面的变量分别对应美颜、微整形、美体、美妆、滤镜特效的初始强度
beauty_intensity = 0.5
reshape_intensity = 0.5
body_intensity = 0.5
makeup_intensity = 0.5
filter_intensity = 0.5
filter_file_name_dict = {'Filter_28_Po6': 'soft', 'Filter_16_13': '胶片', 'Filte... | 48.169399 | 124 | 0.614691 |
5afc1dad435cb17f93abaf60226434e2b0b4e9e6 | 776 | py | Python | Python/minimum-cost-for-tickets.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | Python/minimum-cost-for-tickets.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | Python/minimum-cost-for-tickets.py | black-shadows/LeetCode-Solutions | b1692583f7b710943ffb19b392b8bf64845b5d7a | [
"Fair",
"Unlicense"
] | null | null | null | # Time: O(n)
# space: O(1)
class Solution(object):
def mincostTickets(self, days, costs):
"""
:type days: List[int]
:type costs: List[int]
:rtype: int
"""
durations = [1, 7, 30]
W = durations[-1]
dp = [float("inf") for i in xrange(W)]
... | 32.333333 | 73 | 0.448454 |
e94d0e4626f94b7a93a68cb36d6d95319fe9e736 | 3,098 | py | Python | examples/03-Circuit/Create_Netlist.py | pyansys/pyaedt | c7b045fede6bc707fb20a8db7d5680c66d8263f6 | [
"MIT"
] | 38 | 2021-10-01T23:15:26.000Z | 2022-03-30T18:14:41.000Z | examples/03-Circuit/Create_Netlist.py | pyansys/pyaedt | c7b045fede6bc707fb20a8db7d5680c66d8263f6 | [
"MIT"
] | 362 | 2021-09-30T17:11:55.000Z | 2022-03-31T13:36:20.000Z | examples/03-Circuit/Create_Netlist.py | pyansys/pyaedt | c7b045fede6bc707fb20a8db7d5680c66d8263f6 | [
"MIT"
] | 15 | 2021-09-30T20:21:02.000Z | 2022-02-21T20:22:03.000Z | """
Circuit: Netlist to Schematic Import
------------------------------------
# This example shows how to import Netlist data into a
# Circuit design. Supported Netlist files are HSPICE and,
# partially, Mentor.
"""
# sphinx_gallery_thumbnail_path = 'Resources/schematic.png'
import os
################################... | 32.270833 | 92 | 0.526469 |
6a6fde4dfa2b4560271fdb265f8042814653a5e0 | 3,350 | py | Python | kubernetes_asyncio/client/models/v1beta1_custom_resource_validation.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_custom_resource_validation.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_custom_resource_validation.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"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
OpenAPI spec version: v1.13.5
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1beta1Cus... | 29.646018 | 124 | 0.607761 |
399a5f92a38a9f6f9f39cd91bfeb14819dcb104f | 11,752 | py | Python | evaluation/evalCorr/getResults.py | Pandinosaurus/RANSAC-Flow | fd333a1465ec0c537f39bb6f0065bfde4d58a1f5 | [
"MIT"
] | 336 | 2020-04-05T23:27:07.000Z | 2022-03-29T02:27:46.000Z | evaluation/evalCorr/getResults.py | Pandinosaurus/RANSAC-Flow | fd333a1465ec0c537f39bb6f0065bfde4d58a1f5 | [
"MIT"
] | 14 | 2020-06-04T08:12:51.000Z | 2021-11-17T01:41:18.000Z | evaluation/evalCorr/getResults.py | Pandinosaurus/RANSAC-Flow | fd333a1465ec0c537f39bb6f0065bfde4d58a1f5 | [
"MIT"
] | 66 | 2020-04-06T07:49:59.000Z | 2022-03-11T06:23:11.000Z | import numpy as np
import torch
import kornia.geometry as tgm
import pickle
import os
from PIL import Image
from torchvision import transforms
from torch.nn import functional as F
import cv2
from pathlib import Path
from tqdm import tqdm
import argparse
import pandas as pd
def alignmentError(wB, hB, wA, hA, XA, YA, ... | 39.436242 | 279 | 0.603387 |
529c105dd6250960d255a9f3790e71cad7393fa3 | 43,533 | py | Python | sphinx_gallery/gen_rst.py | mchaaler/sphinx-gallery | 1997acca6f7de041ee373c7703f73676fe2cb601 | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/gen_rst.py | mchaaler/sphinx-gallery | 1997acca6f7de041ee373c7703f73676fe2cb601 | [
"BSD-3-Clause"
] | null | null | null | sphinx_gallery/gen_rst.py | mchaaler/sphinx-gallery | 1997acca6f7de041ee373c7703f73676fe2cb601 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
RST file generator
==================
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'.
"""
from __future__ import division, print_function, absolute_impor... | 35.508157 | 79 | 0.635587 |
b0f8e2e74d4b68d2539c48c4d41c9d1e318701a8 | 1,860 | py | Python | main.py | tuuna/py_script | abb881f466970c0fe28380f82bd7b223bca615c1 | [
"MIT"
] | null | null | null | main.py | tuuna/py_script | abb881f466970c0fe28380f82bd7b223bca615c1 | [
"MIT"
] | null | null | null | main.py | tuuna/py_script | abb881f466970c0fe28380f82bd7b223bca615c1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from faker import Faker
import random
import logging
import time
import json
import os
faker = Faker("zh-CN")
# print("尝试连接mongodb数据库...")
#
# client = pymongo.MongoClient(host="localhost", port=20000)
# db = client.testdb
#
# print("连接数据库成功.")
#
# col =... | 23.846154 | 90 | 0.544624 |
9884884f203d6e43995773a2336efe1c46f3b4fc | 4,697 | py | Python | scripts/boinc_acc.py | yhshin/apel | 0206bab1a1eafd5d77e71438fc3c6f9966643071 | [
"Apache-2.0"
] | null | null | null | scripts/boinc_acc.py | yhshin/apel | 0206bab1a1eafd5d77e71438fc3c6f9966643071 | [
"Apache-2.0"
] | null | null | null | scripts/boinc_acc.py | yhshin/apel | 0206bab1a1eafd5d77e71438fc3c6f9966643071 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
Create BLAHP or BATCH log file to be processed by 'apelparser' for the jobs completed in given time period
'''
from __future__ import print_function
import os
import sys
import platform
from datetime import datetime
from functools import partial
#from configparser import ConfigParser # p... | 33.791367 | 120 | 0.569725 |
2356042a9d83106d3b4c113094dc2cdaba1beb5d | 12,128 | py | Python | sklearn/impute/_knn.py | SkuaD01/scikit-learn | bea07c0f02d79d7cc28d1903dcd72221a8dd5a4f | [
"BSD-3-Clause"
] | 1 | 2021-09-10T17:19:14.000Z | 2021-09-10T17:19:14.000Z | sklearn/impute/_knn.py | SkuaD01/scikit-learn | bea07c0f02d79d7cc28d1903dcd72221a8dd5a4f | [
"BSD-3-Clause"
] | 3 | 2021-03-07T16:07:11.000Z | 2021-04-05T02:43:10.000Z | sklearn/impute/_knn.py | SkuaD01/scikit-learn | bea07c0f02d79d7cc28d1903dcd72221a8dd5a4f | [
"BSD-3-Clause"
] | 1 | 2021-09-10T17:19:33.000Z | 2021-09-10T17:19:33.000Z | # Authors: Ashim Bhattarai <ashimb9@gmail.com>
# Thomas J Fan <thomasjpfan@gmail.com>
# License: BSD 3 clause
import numpy as np
from multiprocessing import cpu_count
from joblib import Parallel, delayed, effective_n_jobs
from ._base import _BaseImputer
from ..utils.validation import FLOAT_DTYPES
from ..metr... | 38.624204 | 128 | 0.618816 |
455d3e4e25a15cef3c970e3f9707b55be5b41911 | 209 | py | Python | src/sentry/plugins/utils.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/plugins/utils.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/utils.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.plugins import IssueTrackingPlugin2
class TestIssuePlugin2(IssueTrackingPlugin2):
"""This is only used in tests."""
slug = "issuetrackingplugin2"
| 20.9 | 47 | 0.784689 |
c7140070379b05988a83d9de631ac8ad9cc11890 | 9,276 | py | Python | boring_flutter.py | 0x13f8/boring-flutter | 0544218f784631011bb528fd08da8695becd30f9 | [
"MIT"
] | 2 | 2021-09-19T17:42:23.000Z | 2021-09-21T09:47:11.000Z | boring_flutter.py | 0x13f8/boring-flutter | 0544218f784631011bb528fd08da8695becd30f9 | [
"MIT"
] | null | null | null | boring_flutter.py | 0x13f8/boring-flutter | 0544218f784631011bb528fd08da8695becd30f9 | [
"MIT"
] | null | null | null | import r2pipe
import time
import sys
import os
import subprocess
search_scalar_verify_cert_chain = '0x186'
search_scalar_verify_peer_cert = '0x121' # SSL_R_OCSP_CB_ERROR
def argument_parsing():
if len(sys.argv) < 2:
print('❌ Usage: python3 {} [libflutter.so | Flutter]'.format(sys.argv[0]))
e... | 36.519685 | 130 | 0.609638 |
f4bb75ac910d0e90bcc7c0e990707ac600adc3c5 | 433 | py | Python | fahmunge/__init__.py | choderalab/FAHMunge | ff8cb4eb26b79fd6e3fd1e466869c71322faa6b5 | [
"MIT"
] | 1 | 2015-01-08T08:02:42.000Z | 2015-01-08T08:02:42.000Z | fahmunge/__init__.py | choderalab/fahmunge | ff8cb4eb26b79fd6e3fd1e466869c71322faa6b5 | [
"MIT"
] | 21 | 2016-04-21T01:28:06.000Z | 2019-01-23T22:00:17.000Z | fahmunge/__init__.py | choderalab/FAHMunge | ff8cb4eb26b79fd6e3fd1e466869c71322faa6b5 | [
"MIT"
] | 4 | 2015-08-06T18:15:26.000Z | 2016-04-04T04:58:56.000Z | """
fahmunge
A tool for automated processing of Folding@home data to produce [mdtraj](http://mdtraj.org)-compatible trajectory sets.
"""
# Make Python 2 and 3 imports work the same
# Safe to remove with Python 3-only code
from __future__ import absolute_import
from . import fah
from . import automation
from . import ... | 24.055556 | 119 | 0.778291 |
bb10e043f5f91880d9a1bc66a6aab9af0dd52bf1 | 2,334 | py | Python | src/trunk/apps/python/arclink2inv.py | yannikbehr/seiscomp3 | ebb44c77092555eef7786493d00ac4efc679055f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-08-04T00:20:17.000Z | 2021-08-04T00:20:17.000Z | src/trunk/apps/python/arclink2inv.py | yannikbehr/seiscomp3 | ebb44c77092555eef7786493d00ac4efc679055f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/trunk/apps/python/arclink2inv.py | yannikbehr/seiscomp3 | ebb44c77092555eef7786493d00ac4efc679055f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-09-15T08:13:27.000Z | 2021-09-15T08:13:27.000Z | #!/usr/bin/env python
############################################################################
# Copyright (C) by GFZ Potsdam #
# #
# You can redistribute and/or modify this program under the ... | 28.463415 | 76 | 0.485861 |
77777f68c1f6ede3cfdd98c5b7e138d9debf76be | 1,552 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/ARB/fragment_shader.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/ARB/fragment_shader.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/ARB/fragment_shader.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''OpenGL extension ARB.fragment_shader
This module customises the behaviour of the
OpenGL.raw.GL.ARB.fragment_shader to provide a more
Python-friendly API
Overview (from the spec)
This extension adds functionality to define fragment shader objects. A
fragment shader object is a shader object (see the ... | 41.945946 | 73 | 0.790593 |
022445cf7a0bdfc9214ab8f7bd5f8b550f02fa8c | 1,056 | py | Python | ipc/workers/terminal.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | ipc/workers/terminal.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | ipc/workers/terminal.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | import ipc
class parser(ipc.daemon.Demonize):
LAST_COMMAND_LINE = ''
def _update_ethernet(self):
print("Executando _update_ethernet")
def _update_wifi(self):
print("Executando _update_wifi")
def _update_bluetooth(self):
print("Executando _update_bluetooth")
def _update_touch(self):
print(... | 21.55102 | 44 | 0.726326 |
a9cc11413d83e1731798df0f9dcd373b39684f34 | 208 | py | Python | satisfactory_planning/components/steel_pipe.py | danjsouther/satisfactory-planning | 77bc703e15407acc26d087422f61015e059a5eda | [
"MIT"
] | 1 | 2022-01-04T00:02:07.000Z | 2022-01-04T00:02:07.000Z | satisfactory_planning/components/steel_pipe.py | danjsouther/satisfactory-planning | 77bc703e15407acc26d087422f61015e059a5eda | [
"MIT"
] | null | null | null | satisfactory_planning/components/steel_pipe.py | danjsouther/satisfactory-planning | 77bc703e15407acc26d087422f61015e059a5eda | [
"MIT"
] | null | null | null | from ..component import Component
from ..machine import Constructor
from .ingot import Steel
class SteelPipe(Component):
production = Constructor(
inputs = [
Steel(1)
],
output = 1,
rate = 15
)
| 16 | 33 | 0.697115 |
69296aa7cd4ec5512273f780a68ff363a55b437c | 25,177 | py | Python | raiden/tests/integration/api/test_restapi.py | anmolshl/raiden | f1cecb68cb43a2c00b2f719eadbe83137611a92a | [
"MIT"
] | null | null | null | raiden/tests/integration/api/test_restapi.py | anmolshl/raiden | f1cecb68cb43a2c00b2f719eadbe83137611a92a | [
"MIT"
] | null | null | null | raiden/tests/integration/api/test_restapi.py | anmolshl/raiden | f1cecb68cb43a2c00b2f719eadbe83137611a92a | [
"MIT"
] | null | null | null | import os
from http import HTTPStatus
import pytest
import grequests
from flask import url_for
from eth_utils import to_checksum_address, to_canonical_address
from raiden.api.v1.encoding import (
AddressField,
HexAddressConverter,
)
from raiden.constants import NETTINGCHANNEL_SETTLE_TIMEOUT_MIN, NETTINGCHANNE... | 32.278205 | 98 | 0.681416 |
420cf7b27c36efc81d808ccda121059eb20fac43 | 5,079 | py | Python | hyperion/bin_deprec/torch-train-resnet1d-dvae.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 14 | 2021-12-19T04:24:15.000Z | 2022-03-18T03:24:04.000Z | hyperion/bin_deprec/torch-train-resnet1d-dvae.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | null | null | null | hyperion/bin_deprec/torch-train-resnet1d-dvae.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 5 | 2021-12-14T20:41:27.000Z | 2022-02-24T14:18:11.000Z | #!/usr/bin/env python
"""
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import sys
import os
import argparse
import time
import logging
import numpy as np
import torch
import torch.nn as nn
from hyperion.hyp_defs import config_logger,... | 31.159509 | 87 | 0.693247 |
1032cb8d4aa5efb9beb769c127f4fc7a835d324e | 757 | py | Python | tb.py | PratikMunot/Stress-detection-app | 5e7a80a7ed75bd51073e171bc5c11d4a04b0f14c | [
"MIT"
] | null | null | null | tb.py | PratikMunot/Stress-detection-app | 5e7a80a7ed75bd51073e171bc5c11d4a04b0f14c | [
"MIT"
] | null | null | null | tb.py | PratikMunot/Stress-detection-app | 5e7a80a7ed75bd51073e171bc5c11d4a04b0f14c | [
"MIT"
] | null | null | null | from textblob import TextBlob
fields = ['text', 'timestamp', 'polarity', 'subjectivity', 'sentiment'] # field names
#writer.writerow(fields) # writes field
data_python = ["I am feeling very happy today","I am sad","Good Night","I am feeling very stress","I am very frustrated","Fuck off"]
def get_label(analysis, thre... | 37.85 | 132 | 0.689564 |
f429fcd9de3d8e1b528abdcd2e9923b4449ce42c | 2,411 | py | Python | src/main.py | paopaoer/experiment | 8543487833d48e39d87a606607c7b01e58e370a5 | [
"Apache-2.0"
] | null | null | null | src/main.py | paopaoer/experiment | 8543487833d48e39d87a606607c7b01e58e370a5 | [
"Apache-2.0"
] | null | null | null | src/main.py | paopaoer/experiment | 8543487833d48e39d87a606607c7b01e58e370a5 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import torch
import torch.optim as optim
from torch.optim import lr_scheduler
from torchvision import models
import torch.nn as nn
import model.all_view as av
import train
if __name__ == '__main__':
model_name = 'all_view_batch10_pre_weight_sgd'
if not os.path.exists('result/' + mod... | 32.581081 | 107 | 0.649108 |
b302fee8d3f6961b46e8dcee16c3055207310294 | 4,096 | py | Python | download_coinbase_data.py | marckirschner/CoinbaseDataDownloader | 9903f1f8e691e22be3d8fc64a277dc661cbea3e4 | [
"Apache-2.0"
] | 2 | 2020-06-03T17:07:29.000Z | 2021-04-06T04:26:21.000Z | download_coinbase_data.py | marckirschner/CoinbaseDataDownloader | 9903f1f8e691e22be3d8fc64a277dc661cbea3e4 | [
"Apache-2.0"
] | 1 | 2020-05-25T04:36:37.000Z | 2020-05-25T04:36:37.000Z | download_coinbase_data.py | marckirschner/CoinbaseDataDownloader | 9903f1f8e691e22be3d8fc64a277dc661cbea3e4 | [
"Apache-2.0"
] | null | null | null | """Usage:
download_coinbase.py <api> <secret> <pass> --market=<market> --granularity=granularity --num_days=num_days [--filename=filename] [-v]
download_coinbase.py -h | --help | --version
"""
__author__ = "Marc J Kirschner"
__copyright__ = "Copyright (C) 2020 Marc J Kirschner"
__license__ = "Public Domain"
__vers... | 40.156863 | 135 | 0.601318 |
87bd55ea41a1118528243be18955b3c2941173de | 651 | py | Python | Donation/migrations/0005_auto_20210708_0249.py | donorgrid/donorgrid | 4139df3ceaf767b9696aa4208e3721472f03592a | [
"MIT"
] | 8 | 2021-09-01T03:38:45.000Z | 2021-12-23T20:00:37.000Z | Donation/migrations/0005_auto_20210708_0249.py | donorgrid/donorgrid | 4139df3ceaf767b9696aa4208e3721472f03592a | [
"MIT"
] | 41 | 2021-10-22T03:16:50.000Z | 2022-03-28T03:13:24.000Z | Donation/migrations/0005_auto_20210708_0249.py | raunakhajela/DonorGrid | 5218951d395bae9fd722835634a1998a6015d756 | [
"MIT"
] | 4 | 2021-08-13T15:05:41.000Z | 2022-01-03T09:40:19.000Z | # Generated by Django 3.2.5 on 2021-07-08 02:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Donation', '0004_donation_currency'),
]
operations = [
migrations.AddField(
model_name='donation',
name='provider',
... | 27.125 | 148 | 0.583717 |
febee607688b0b80e232ccf9b89985c96af9b1c2 | 676 | py | Python | pasteapp/migrations/0001_initial.py | Mukundan314/gci-pastebin | bb07fcb0eaf6c7890084fe37afb9f3009f32142a | [
"MIT"
] | 2 | 2019-12-30T19:22:20.000Z | 2021-05-29T04:27:58.000Z | pasteapp/migrations/0001_initial.py | Mukundan314/gci-pastebin | bb07fcb0eaf6c7890084fe37afb9f3009f32142a | [
"MIT"
] | null | null | null | pasteapp/migrations/0001_initial.py | Mukundan314/gci-pastebin | bb07fcb0eaf6c7890084fe37afb9f3009f32142a | [
"MIT"
] | null | null | null | # Generated by Django 3.0.1 on 2019-12-24 05:03
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Paste',
fields=[
('id', models.... | 26 | 112 | 0.569527 |
8c9e239df8389f78a77eeb7d1b86b104fe610abe | 8,296 | py | Python | Archived/P3_01_01_002.py | FN404NF/CarND-Behavioral-Cloning-P3 | 1c00511b67688de9eb1852f6d5691b59b45ad153 | [
"MIT"
] | 1 | 2020-05-17T04:17:13.000Z | 2020-05-17T04:17:13.000Z | Archived/P3_01_01_002.py | FN404NF/CarND-Behavioral-Cloning-P3 | 1c00511b67688de9eb1852f6d5691b59b45ad153 | [
"MIT"
] | null | null | null | Archived/P3_01_01_002.py | FN404NF/CarND-Behavioral-Cloning-P3 | 1c00511b67688de9eb1852f6d5691b59b45ad153 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import os
import csv
import pandas as pd
import cv2
import numpy as np
import tensorflow as tf
import math
import matplotlib.pyplot as plt
import sklearn
from keras.utils import normalize
from sklearn.model_selection import train_test_split
from keras.layers import Input, MaxPooli... | 32.533333 | 129 | 0.622951 |
03ddbb533216911076339ac5dbf3e1a51f6dc965 | 9,986 | py | Python | discovery-provider/src/queries/get_health_test.py | mikedotexe/audius-protocol | 04743c727b2ae244c9e72b172291b1ce968c5af0 | [
"Apache-2.0"
] | 1 | 2020-11-10T04:04:47.000Z | 2020-11-10T04:04:47.000Z | discovery-provider/src/queries/get_health_test.py | mikedotexe/audius-protocol | 04743c727b2ae244c9e72b172291b1ce968c5af0 | [
"Apache-2.0"
] | null | null | null | discovery-provider/src/queries/get_health_test.py | mikedotexe/audius-protocol | 04743c727b2ae244c9e72b172291b1ce968c5af0 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import MagicMock
from hexbytes import HexBytes
from src.utils.redis_constants import \
latest_block_hash_redis_key, latest_block_redis_key, \
most_recent_indexed_block_hash_redis_key, most_recent_indexed_block_redis_key
from src.models import Block
from src.queries.get_health import get_healt... | 32.109325 | 94 | 0.645704 |
556f974d72d970f96b92e5462f49fe7f30c5ec3d | 3,240 | py | Python | ui/service/label_user_defined_categories_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | null | null | null | ui/service/label_user_defined_categories_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | null | null | null | ui/service/label_user_defined_categories_service.py | ctwardy/sitehound | 0f928a82f761e3d0335d1d4d01f6105b726fd889 | [
"Apache-2.0"
] | null | null | null | import logging
import pymongo
from bson import ObjectId
from ui.singleton import Singleton
__author__ = 'tomas'
def get_seeds_urls(workspace_id, categories, last_id, limit, _source_exclude=["result.crawlResultDto.image", "result.crawlResultDto.html"]):
categories_search_condition = {}
if categories is not No... | 38.117647 | 159 | 0.674074 |
39e4eace834df9d0a5b53929478a3f8fc46a691f | 5,404 | py | Python | fs_patches_of_hybrid_cloud/cherry_for_111T/nova_cascaded/nova/virt/vcloudapi/vcenter_utils.py | Hybrid-Cloud/badam | 390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb | [
"Apache-2.0"
] | 2 | 2015-06-15T02:16:33.000Z | 2022-02-23T07:10:38.000Z | fs_patches_of_hybrid_cloud/cherry_for_111T/nova_cascaded/nova/virt/vcloudapi/vcenter_utils.py | Hybrid-Cloud/badam | 390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb | [
"Apache-2.0"
] | 7 | 2016-05-13T06:39:45.000Z | 2016-05-20T02:55:31.000Z | fs_patches_of_hybrid_cloud/cherry_for_111T/nova_cascaded/nova/virt/vcloudapi/vcenter_utils.py | Hybrid-Cloud/badam | 390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb | [
"Apache-2.0"
] | 4 | 2015-11-02T04:02:50.000Z | 2021-05-13T17:06:00.000Z | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.788079 | 79 | 0.643412 |
955e72eb5fe8c3336e270e3d1a0d738a1daee1d0 | 765 | py | Python | Trakttv.bundle/Contents/Libraries/Shared/plugin/scrobbler/handlers/paused.py | disrupted/Trakttv.bundle | 24712216c71f3b22fd58cb5dd89dad5bb798ed60 | [
"RSA-MD"
] | 1,346 | 2015-01-01T14:52:24.000Z | 2022-03-28T12:50:48.000Z | Trakttv.bundle/Contents/Libraries/Shared/plugin/scrobbler/handlers/paused.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 474 | 2015-01-01T10:27:46.000Z | 2022-03-21T12:26:16.000Z | Trakttv.bundle/Contents/Libraries/Shared/plugin/scrobbler/handlers/paused.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 191 | 2015-01-02T18:27:22.000Z | 2022-03-29T10:49:48.000Z | from plugin.scrobbler.core import SessionEngine, SessionHandler
@SessionEngine.register
class PausedHandler(SessionHandler):
__event__ = 'paused'
__src__ = ['pause', 'start', 'stop']
__dst__ = ['pause', 'stop']
@classmethod
def process(cls, session, payload):
# Handle media change
... | 30.6 | 91 | 0.615686 |
984f23ce685231e83195d51e7892492af3a2509c | 792 | py | Python | pylxd/models/virtual_machine.py | jonans/pylxd | c0045b06473f35c72ed98991a2a3c8192d5c5b75 | [
"Apache-2.0"
] | 247 | 2015-05-26T21:39:38.000Z | 2022-03-23T23:56:12.000Z | pylxd/models/virtual_machine.py | jonans/pylxd | c0045b06473f35c72ed98991a2a3c8192d5c5b75 | [
"Apache-2.0"
] | 417 | 2015-05-31T12:57:55.000Z | 2022-03-28T14:35:09.000Z | pylxd/models/virtual_machine.py | jonans/pylxd | c0045b06473f35c72ed98991a2a3c8192d5c5b75 | [
"Apache-2.0"
] | 170 | 2015-05-31T11:10:59.000Z | 2022-01-18T01:36:17.000Z | # Copyright (c) 2020 Canonical 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 ... | 37.714286 | 78 | 0.72601 |
682b321c6da1ba34cf894936bb72b97dadd90233 | 319 | py | Python | portfolio/urls.py | mahbd/portfolio | 4348657e295052b7c43e72acf5650fcfeabdabab | [
"MIT"
] | null | null | null | portfolio/urls.py | mahbd/portfolio | 4348657e295052b7c43e72acf5650fcfeabdabab | [
"MIT"
] | null | null | null | portfolio/urls.py | mahbd/portfolio | 4348657e295052b7c43e72acf5650fcfeabdabab | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('main.urls')),
path('admin/', admin.site.urls),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
| 26.583333 | 78 | 0.758621 |
338d9fde717ddfa3d0bd5e0983f2074a53254a4c | 1,845 | py | Python | Section 5 - Numpy and Pandas/Introduction to Numpy.py | kungfumas/bahasa-alami | 24ad2cb0c537ece11a0f7af376ef778a3c2839ca | [
"MIT"
] | 169 | 2018-04-18T16:01:59.000Z | 2022-03-27T13:10:21.000Z | Section 5 - Numpy and Pandas/Introduction to Numpy.py | kungfumas/bahasa-alami | 24ad2cb0c537ece11a0f7af376ef778a3c2839ca | [
"MIT"
] | 3 | 2018-08-27T18:16:33.000Z | 2019-10-16T02:28:46.000Z | Section 5 - Numpy and Pandas/Introduction to Numpy.py | kungfumas/bahasa-alami | 24ad2cb0c537ece11a0f7af376ef778a3c2839ca | [
"MIT"
] | 221 | 2018-04-26T07:32:53.000Z | 2022-03-27T13:10:51.000Z | # Natural Language Processing using Python
# Introduction to numpy
# Importing Libraries
import numpy as np
# arange()
# np.arange([start,] stop[, step,], dtype=None)
np.arange(10)
np.arange(1,10)
np.arange(1,10,2)
np.arange(1,10,0.5)
np.arange(1,10,dtype='float64')
# Examining the ndarray
arr = np.arange(1,10)
... | 18.45 | 68 | 0.678049 |
bdd244e1a96794db714bdf5722193f3c8c539478 | 3,114 | py | Python | app/__init__.py | ShantalRipa/portfolio-team4 | 3bca6cca76c82af78926818d0a5e7343ed9f537b | [
"MIT"
] | null | null | null | app/__init__.py | ShantalRipa/portfolio-team4 | 3bca6cca76c82af78926818d0a5e7343ed9f537b | [
"MIT"
] | null | null | null | app/__init__.py | ShantalRipa/portfolio-team4 | 3bca6cca76c82af78926818d0a5e7343ed9f537b | [
"MIT"
] | null | null | null | import os
from flask import (
Flask,
request,
render_template,
send_from_directory,
Response,
jsonify,
)
# from dotenv import load_dotenv
from werkzeug.security import check_password_hash, generate_password_hash
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
# from .... | 27.078261 | 84 | 0.645151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.