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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1f3a1a459e4429145178dc359b6f5b22d51211 | 22,844 | py | Python | ue4docker/build.py | jonghyunho/ue4-docker | 9e18e139c17ae09475df64f59f8ad5fbb3d32626 | [
"MIT"
] | 579 | 2018-05-05T04:39:46.000Z | 2022-03-29T10:22:21.000Z | ue4docker/build.py | jonghyunho/ue4-docker | 9e18e139c17ae09475df64f59f8ad5fbb3d32626 | [
"MIT"
] | 221 | 2018-07-01T20:30:18.000Z | 2022-03-28T14:56:52.000Z | ue4docker/build.py | jonghyunho/ue4-docker | 9e18e139c17ae09475df64f59f8ad5fbb3d32626 | [
"MIT"
] | 132 | 2018-05-06T16:28:31.000Z | 2022-03-16T12:44:19.000Z | import argparse, getpass, humanfriendly, json, os, shutil, sys, tempfile, time
from .infrastructure import *
from .version import __version__
from os.path import join
def _getCredential(args, name, envVar, promptFunc):
# Check if the credential was specified via the command-line
if getattr(args, name, None) ... | 40.21831 | 138 | 0.516065 |
4a1f3a62bafc3b97a993a12a5bfe0fb8109ec257 | 2,840 | py | Python | tests/functional/scripts/pyi_lib_requests.py | hawkhai/pyinstaller | 016a24479b34de161792c72dde455a81ad4c78ae | [
"Apache-2.0"
] | 9,267 | 2015-01-01T04:08:45.000Z | 2022-03-31T11:42:38.000Z | tests/functional/scripts/pyi_lib_requests.py | hawkhai/pyinstaller | 016a24479b34de161792c72dde455a81ad4c78ae | [
"Apache-2.0"
] | 5,150 | 2015-01-01T12:09:56.000Z | 2022-03-31T18:06:12.000Z | tests/functional/scripts/pyi_lib_requests.py | hawkhai/pyinstaller | 016a24479b34de161792c72dde455a81ad4c78ae | [
"Apache-2.0"
] | 2,101 | 2015-01-03T10:25:27.000Z | 2022-03-30T11:04:42.000Z | # -----------------------------------------------------------------------------
# Copyright (c) 2014-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.tx... | 30.212766 | 116 | 0.640493 |
4a1f3a7b7afdf23c5694093baa462cd077e281f9 | 2,000 | py | Python | ML/Pytorch/Basics/pytorch_init_weights.py | xuyannus/Machine-Learning-Collection | 6d5dcd18d4e40f90e77355d56a2902e4c617ecbe | [
"MIT"
] | 3,094 | 2020-09-20T04:34:31.000Z | 2022-03-31T23:59:46.000Z | ML/Pytorch/Basics/pytorch_init_weights.py | xkhainguyen/Machine-Learning-Collection | 425d196e9477dbdbbd7cc0d19d29297571746ab5 | [
"MIT"
] | 79 | 2020-09-24T08:54:17.000Z | 2022-03-30T14:45:08.000Z | ML/Pytorch/Basics/pytorch_init_weights.py | xkhainguyen/Machine-Learning-Collection | 425d196e9477dbdbbd7cc0d19d29297571746ab5 | [
"MIT"
] | 1,529 | 2020-09-20T16:21:21.000Z | 2022-03-31T21:16:25.000Z | """
Example code of how to initialize weights for a simple CNN network.
Video explanation: https://youtu.be/xWQ-p_o0Uik
Got any questions leave a comment on youtube :)
Programmed by Aladdin Persson <aladdin.persson at hotmail dot com>
* 2020-04-10 Initial coding
"""
# Imports
import torch.nn as nn # All neural ... | 28.571429 | 100 | 0.567 |
4a1f3b29d83ab19c1f0f1f31419de477df76699e | 79 | py | Python | keeper.py | Mkn-yskz/Commandy | e360306f41112534ae71102658f560fd974a1f45 | [
"MIT"
] | null | null | null | keeper.py | Mkn-yskz/Commandy | e360306f41112534ae71102658f560fd974a1f45 | [
"MIT"
] | null | null | null | keeper.py | Mkn-yskz/Commandy | e360306f41112534ae71102658f560fd974a1f45 | [
"MIT"
] | null | null | null | from keepercommander.__main__ import main
if __name__ == '__main__':
main() | 26.333333 | 41 | 0.746835 |
4a1f3bd92de07f93d8534c62db3c2d95012b23ad | 57 | py | Python | acmicpc/10699/10699.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 3 | 2019-03-09T05:19:23.000Z | 2019-04-06T09:26:36.000Z | acmicpc/10699/10699.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2020-02-23T10:38:04.000Z | 2020-02-23T10:38:04.000Z | acmicpc/10699/10699.py | love-adela/algorithm | 4ccd02173c96f8369962f1fd4e5166a221690fa2 | [
"MIT"
] | 1 | 2019-05-22T13:47:53.000Z | 2019-05-22T13:47:53.000Z | import datetime
print(str(datetime.datetime.now())[:10])
| 19 | 40 | 0.754386 |
4a1f3bf34f9aba2cd44144acea1bcb7bd1e22ecc | 553 | py | Python | etl/load_parties_from_csv.py | The-Animals/data-pipeline | 57c46dfe42807743d07d9f33bb29a2247afe8aff | [
"MIT"
] | null | null | null | etl/load_parties_from_csv.py | The-Animals/data-pipeline | 57c46dfe42807743d07d9f33bb29a2247afe8aff | [
"MIT"
] | null | null | null | etl/load_parties_from_csv.py | The-Animals/data-pipeline | 57c46dfe42807743d07d9f33bb29a2247afe8aff | [
"MIT"
] | null | null | null | from pkgutil import get_data
from pandas import read_csv
from io import StringIO
from storage_clients import MySqlClient, DbSchema
"""
load MLA data from data/parties.csv
"""
def load_parties():
table = DbSchema.parties
print('reading party data from csv')
data = StringIO(str(get_data('data', 'parties.... | 21.269231 | 73 | 0.705244 |
4a1f3c73eb2d0088f4261e1c181d6ad917a4006a | 776 | py | Python | plugins/qualys_ssl/komand_qualys_ssl/actions/status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/qualys_ssl/komand_qualys_ssl/actions/status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/qualys_ssl/komand_qualys_ssl/actions/status/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "Retrieve status codes"
class Input:
pass
class Output:
STATUSDETAILS = "statusDetails"
class StatusInput(komand.Input):
schema = json.loads("""
{}
""")
def __init__(self):
sup... | 16.510638 | 57 | 0.597938 |
4a1f3d59a36d2f37a96d2c9f3c056a99eaf2aa4d | 13,984 | py | Python | devel/lib/python2.7/dist-packages/yolov3_pytorch_ros/msg/_BoundingBoxes.py | elmexx/eWolf-Jetson | 34242b1cea360c1e81d0e26a9e8cb70cf9ca354e | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/yolov3_pytorch_ros/msg/_BoundingBoxes.py | elmexx/eWolf-Jetson | 34242b1cea360c1e81d0e26a9e8cb70cf9ca354e | [
"MIT"
] | null | null | null | devel/lib/python2.7/dist-packages/yolov3_pytorch_ros/msg/_BoundingBoxes.py | elmexx/eWolf-Jetson | 34242b1cea360c1e81d0e26a9e8cb70cf9ca354e | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from yolov3_pytorch_ros/BoundingBoxes.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import std_msgs.msg
import yolov3_pytorch_ros.msg
class BoundingBoxes(... | 39.502825 | 145 | 0.660898 |
4a1f3deda29119f80674e2c22b3ffbd0802e4ddf | 2,587 | py | Python | ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/health.py | eetumans/api-catalog | a32a52c48425be8b71d83c60c93b26db7787e632 | [
"MIT"
] | null | null | null | ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/health.py | eetumans/api-catalog | a32a52c48425be8b71d83c60c93b26db7787e632 | [
"MIT"
] | null | null | null | ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/health.py | eetumans/api-catalog | a32a52c48425be8b71d83c60c93b26db7787e632 | [
"MIT"
] | null | null | null | import ckan.lib.base as base
import pylons.config as config
import urllib2
import logging
import ckan.logic as logic
import datetime
from pprint import pformat
import ckan.model as model
get_action = logic.get_action
log = logging.getLogger(__name__)
SITE_URL_FAILURE_LOGMESSAGE = "Site URL '%s' failed to respond durin... | 36.957143 | 107 | 0.614612 |
4a1f3e323abde038ea308713e75edf7e6f16bc5d | 32,126 | py | Python | cupid/pilib.py | iinnovations/iicontrollibs | 94af26a61405f1ad928d36e36602ebb859a2e44f | [
"Apache-2.0"
] | 11 | 2015-06-22T21:38:15.000Z | 2021-03-10T11:24:21.000Z | cupid/pilib.py | iinnovations/iicontrollibs | 94af26a61405f1ad928d36e36602ebb859a2e44f | [
"Apache-2.0"
] | null | null | null | cupid/pilib.py | iinnovations/iicontrollibs | 94af26a61405f1ad928d36e36602ebb859a2e44f | [
"Apache-2.0"
] | 12 | 2015-03-05T00:19:40.000Z | 2020-12-18T15:21:44.000Z | #!/usr/bin/python3
__author__ = "Colin Reese"
__copyright__ = "Copyright 2016, Interface Innovations"
__credits__ = ["Colin Reese"]
__license__ = "Apache 2.0"
__version__ = "1.0"
__maintainer__ = "Colin Reese"
__email__ = "support@interfaceinnovations.org"
__status__ = "Development"
import os
import sys
import inspec... | 35.033806 | 182 | 0.61209 |
4a1f3fab0e0526b26e43b95b32bb7593ad9018b7 | 81,434 | py | Python | widget/vessel_core_axial_view.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 7 | 2017-04-21T05:35:16.000Z | 2022-02-28T20:14:42.000Z | widget/vessel_core_axial_view.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 2 | 2019-02-27T15:25:34.000Z | 2021-05-26T17:01:59.000Z | widget/vessel_core_axial_view.py | CASL/VERAview | 89b18f239ca5228185b80d5392068981d7733d3b | [
"BSD-3-Clause"
] | 3 | 2019-07-09T08:31:34.000Z | 2022-03-08T03:18:48.000Z | #!/usr/bin/env python
# $Id$
#------------------------------------------------------------------------
# NAME: vessel_core_axial_view.py -
# HISTORY: -
# 2019-01-18 leerw@ornl.gov ... | 38.071061 | 119 | 0.547609 |
4a1f3fd0de8790a9d889edb92d8563c71e697f82 | 681 | py | Python | djangoxtermjs/wsgi.py | MahmoudAlyy/docker-django-ui | 1175aa06527e27c6f529afa6616165fddafd6290 | [
"MIT"
] | 1 | 2021-05-10T05:10:41.000Z | 2021-05-10T05:10:41.000Z | djangoxtermjs/wsgi.py | MahmoudAlyy/docker-django-ui | 1175aa06527e27c6f529afa6616165fddafd6290 | [
"MIT"
] | null | null | null | djangoxtermjs/wsgi.py | MahmoudAlyy/docker-django-ui | 1175aa06527e27c6f529afa6616165fddafd6290 | [
"MIT"
] | 1 | 2021-02-17T11:15:12.000Z | 2021-02-17T11:15:12.000Z | """
WSGI config for djangoxtermjs 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
os.environ['DJANGO_SETTINGS_MODULE'] = 'djangoxtermjs.settings'
import socketio
... | 23.482759 | 78 | 0.800294 |
4a1f3fe8887ffea80dd1ac02a056c166f30f84f8 | 4,671 | py | Python | pyfos/utils/extension/extension_ip_route_create.py | brocade/pyfos | 33565cfc1401f5dc54a9a9fb70913c9a670cb322 | [
"Apache-2.0"
] | 44 | 2017-11-17T12:03:11.000Z | 2022-02-03T20:57:56.000Z | pyfos/utils/extension/extension_ip_route_create.py | brocade/pyfos | 33565cfc1401f5dc54a9a9fb70913c9a670cb322 | [
"Apache-2.0"
] | 13 | 2018-10-09T15:34:15.000Z | 2022-02-24T20:03:17.000Z | pyfos/utils/extension/extension_ip_route_create.py | brocade/pyfos | 33565cfc1401f5dc54a9a9fb70913c9a670cb322 | [
"Apache-2.0"
] | 23 | 2017-12-14T18:08:33.000Z | 2022-02-03T15:33:40.000Z | #!/usr/bin/env python3
# Copyright © 2018 Broadcom. All Rights Reserved. The term “Broadcom” refers to
# Broadcom Inc. and/or its subsidiaries.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may also obtain a copy of the Lice... | 33.604317 | 80 | 0.633055 |
4a1f403cdc4b00d42d52e62b5118c937bbc66ca0 | 8,183 | py | Python | sigpy/wavelet.py | Phillistan16/sigpy | 4f83c7b7d4560f9f6fc169de301011f541a9be68 | [
"BSD-3-Clause"
] | null | null | null | sigpy/wavelet.py | Phillistan16/sigpy | 4f83c7b7d4560f9f6fc169de301011f541a9be68 | [
"BSD-3-Clause"
] | null | null | null | sigpy/wavelet.py | Phillistan16/sigpy | 4f83c7b7d4560f9f6fc169de301011f541a9be68 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Wavelet transform functions.
"""
import numpy as np
import pywt
from sigpy import backend
__all__ = ['fwt', 'iwt']
def get_wavelet_shape(shape, wave_name, axes, level):
input = np.zeros(shape)
tmp = fwt(input, wave_name=wave_name, axes=axes, level=level)
return tmp.shape
def... | 33.4 | 79 | 0.582427 |
4a1f40c67476927f55498537edaeaf10fa08ffa6 | 7,344 | py | Python | polyaxon/db/models/utils.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | polyaxon/db/models/utils.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | polyaxon/db/models/utils.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | import uuid
from django.contrib.postgres.fields import ArrayField, JSONField
from django.core.cache import cache
from django.core.validators import validate_slug
from django.db import models
from django.utils.functional import cached_property
from libs.blacklist import validate_blacklist_name
from libs.spec_validatio... | 25.411765 | 90 | 0.663263 |
4a1f42bfb6af3b37472ac44074549577cd4e3690 | 1,012 | py | Python | tests/test_garner_dates.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 4,163 | 2015-10-03T07:37:21.000Z | 2022-03-31T03:52:32.000Z | tests/test_garner_dates.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 878 | 2015-09-30T20:03:33.000Z | 2022-03-28T11:06:15.000Z | tests/test_garner_dates.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 249 | 2015-10-04T12:21:27.000Z | 2022-02-28T22:13:11.000Z | """Test garner.dates."""
from proselint.checks.dates_times import dates
from .check import Check
class TestCheck(Check):
"""Test class for garner.dates."""
__test__ = True
def test_50s_hyphenation(self):
"""Find unneeded hyphen in 50's."""
text = """The 50's were swell."""
erro... | 29.764706 | 76 | 0.624506 |
4a1f42efdbf20f87fdb3bf6da8d13dfb1bdb1fcc | 41,264 | py | Python | FusionIIIT/applications/visitor_hostel/views.py | ssaksham9/Fusion | f1e405b457dba399411a2ddb79a9068746c05057 | [
"bzip2-1.0.6"
] | 2 | 2020-01-24T16:34:54.000Z | 2020-08-01T05:09:24.000Z | FusionIIIT/applications/visitor_hostel/views.py | ssaksham9/Fusion | f1e405b457dba399411a2ddb79a9068746c05057 | [
"bzip2-1.0.6"
] | null | null | null | FusionIIIT/applications/visitor_hostel/views.py | ssaksham9/Fusion | f1e405b457dba399411a2ddb79a9068746c05057 | [
"bzip2-1.0.6"
] | 5 | 2020-01-21T11:27:06.000Z | 2020-02-07T13:53:49.000Z | import datetime
from datetime import date
import xlrd
import os
from applications.visitor_hostel.models import RoomDetail
from django.contrib.auth.models import User
from django.contrib import messages
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from djang... | 44.322234 | 551 | 0.599821 |
4a1f439900b9d7b922e727721943eff86fadfec5 | 24 | py | Python | test/__init__.py | alphagov/service-manager | fa507758b5376a528658f32728427407fe87aaf3 | [
"Apache-2.0"
] | null | null | null | test/__init__.py | alphagov/service-manager | fa507758b5376a528658f32728427407fe87aaf3 | [
"Apache-2.0"
] | null | null | null | test/__init__.py | alphagov/service-manager | fa507758b5376a528658f32728427407fe87aaf3 | [
"Apache-2.0"
] | 2 | 2019-08-29T11:38:05.000Z | 2021-04-10T20:07:03.000Z | __author__ = 'vsharman'
| 12 | 23 | 0.75 |
4a1f44511dbe83789502f175ada52ff603363b14 | 2,058 | py | Python | Liquid-job-benchmarks/scripts/tf_cnn_benchmarks/all_reduce_benchmark_test.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-job-benchmarks/scripts/tf_cnn_benchmarks/all_reduce_benchmark_test.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-job-benchmarks/scripts/tf_cnn_benchmarks/all_reduce_benchmark_test.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | # 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... | 38.830189 | 81 | 0.664723 |
4a1f4458dd00aba852b2c48a6aae722ff94339c1 | 6,736 | py | Python | trafficgen/PyTgen/config.py | SalikLP/classification-of-encrypted-traffic | 3c86e098aab58941f9339bb64945c1112ab556ef | [
"MIT"
] | 35 | 2018-05-25T16:48:23.000Z | 2022-03-15T14:35:07.000Z | trafficgen/PyTgen/config.py | SalikLP/classification-of-encrypted-traffic | 3c86e098aab58941f9339bb64945c1112ab556ef | [
"MIT"
] | 3 | 2018-03-18T13:03:09.000Z | 2020-01-17T12:09:12.000Z | trafficgen/PyTgen/config.py | SalikLP/classification-of-encrypted-traffic | 3c86e098aab58941f9339bb64945c1112ab556ef | [
"MIT"
] | 14 | 2018-05-25T16:48:24.000Z | 2022-01-04T12:56:31.000Z | '''
Config file adaptation/modification of the PyTgen generator config.py
'''
import logging
#
# This is a default configuration for the classification of encrypted traffic project
#
class Conf(object):
# maximum number of worker threads that can be used to execute the jobs.
# the program will start using 3 ... | 62.37037 | 155 | 0.513955 |
4a1f44dcd6c5b6007f9a3c5361a2f8d6bbe47df0 | 630 | py | Python | database.py | FissionCat/cherrypy-practice | a35d78d770109731dd5b0f63d088e8ed6405106f | [
"MIT"
] | 1 | 2016-08-06T03:10:16.000Z | 2016-08-06T03:10:16.000Z | database.py | FissionCat/cherrypy-practice | a35d78d770109731dd5b0f63d088e8ed6405106f | [
"MIT"
] | null | null | null | database.py | FissionCat/cherrypy-practice | a35d78d770109731dd5b0f63d088e8ed6405106f | [
"MIT"
] | null | null | null | from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Session = sessionmaker()
engine = create_engine("postgresql+pg8000://postgres:master@localhost/cherrypy", echo=True)
Session.configure(bind=engine)
Base = declarative_base()
class User(Base):
__ta... | 27.391304 | 91 | 0.780952 |
4a1f44fe436231ecd984d7d7005440a7e7bf09f1 | 28,112 | py | Python | xgcm/test/test_grid.py | albernsrya/xgcm | 9bd495bbfc14a0c9e68cce880e2303c7c744d2c8 | [
"MIT"
] | 1 | 2021-07-03T14:07:47.000Z | 2021-07-03T14:07:47.000Z | xgcm/test/test_grid.py | albernsrya/xgcm | 9bd495bbfc14a0c9e68cce880e2303c7c744d2c8 | [
"MIT"
] | null | null | null | xgcm/test/test_grid.py | albernsrya/xgcm | 9bd495bbfc14a0c9e68cce880e2303c7c744d2c8 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import xarray as xr
from xgcm.grid import Axis, Grid
from .datasets import all_2d # noqa: F401
from .datasets import all_datasets # noqa: F401
from .datasets import datasets # noqa: F401
from .datasets import datasets_grid_metric # noqa: F401
from .datasets import nonperiodic_1d ... | 34.366748 | 88 | 0.64115 |
4a1f452c2c4c38185c394af33b0463bb03fd5fd1 | 3,864 | py | Python | mmaction/datasets/rawframe_dataset_contrastive.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | mmaction/datasets/rawframe_dataset_contrastive.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | mmaction/datasets/rawframe_dataset_contrastive.py | lambert-x/video_semisup | 8ff44343bb34485f8ad08d50ca4d8de22e122c1d | [
"Apache-2.0"
] | null | null | null | import copy
import numpy as np
import torch
from .pipelines import Compose
from .rawframe_dataset import RawframeDataset
from .builder import DATASETS
@DATASETS.register_module()
class RawframeDataset_Contrastive(RawframeDataset):
"""Rawframe dataset for action recognition.
Unlabeled: return strong/weak a... | 40.25 | 112 | 0.631211 |
4a1f4668f9f5fa13041040bae456e10f161942a9 | 873 | py | Python | setup.py | maryletteroa/biodemo | 470dccac212505cbd9791b6e24889070ef1247c4 | [
"MIT"
] | null | null | null | setup.py | maryletteroa/biodemo | 470dccac212505cbd9791b6e24889070ef1247c4 | [
"MIT"
] | null | null | null | setup.py | maryletteroa/biodemo | 470dccac212505cbd9791b6e24889070ef1247c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
LONG_DESCRIPTION = \
'''The program reads one or more input FASTA files.
For each file it computes a variety of statistics, and then
prints a summary of the statistics as output.
The goal is to provide a solid foundation for new bioinformatics command line tools... | 29.1 | 84 | 0.710195 |
4a1f478a9c6fbf18528c8d86b1cf22d210ca1677 | 7,890 | py | Python | docs/conf.py | chen23/f5-azure-saca | 5edb5a95defadc702d1360e44862d50149b8c57d | [
"MIT"
] | null | null | null | docs/conf.py | chen23/f5-azure-saca | 5edb5a95defadc702d1360e44862d50149b8c57d | [
"MIT"
] | null | null | null | docs/conf.py | chen23/f5-azure-saca | 5edb5a95defadc702d1360e44862d50149b8c57d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
#
# BEGIN CONFIG
# ------------
#
# REQUIRED: Your class/lab name
classname = "F5 Azure SACA"
# OPTIONAL: The URL to the GitHub Repository for this class
github_repo = "https://github.com/f5devcentral/f5-azure-saca"
# OPTIONAL: Google Analytics
# googleanalytics_id = 'UA-85156643-4'
#
# END... | 30.114504 | 94 | 0.676806 |
4a1f47a21c9acc1d62a0685376bc229c25b2811b | 1,411 | py | Python | test/test_markdown_transform_to_gfm.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | 20 | 2021-01-14T17:39:09.000Z | 2022-03-14T08:35:22.000Z | test/test_markdown_transform_to_gfm.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | 304 | 2020-08-15T23:24:00.000Z | 2022-03-31T23:34:03.000Z | test/test_markdown_transform_to_gfm.py | scop/pymarkdown | 562ba8f7857d99ba09e86e42de5a37ec6d9b2c30 | [
"MIT"
] | 3 | 2021-08-11T10:26:26.000Z | 2021-11-02T20:41:27.000Z | """
https://github.github.com/gfm/#lists
"""
import pytest
from pymarkdown.markdown_token import (
EndMarkdownToken,
MarkdownToken,
MarkdownTokenClass,
)
from pymarkdown.transform_to_gfm import TransformToGfm
@pytest.mark.gfm
def test_gfm_bad_token():
"""
Test to ensure that a bad markdown token ... | 23.131148 | 97 | 0.673281 |
4a1f486efca49905579a71bad170d7031e9f84b2 | 6,670 | py | Python | cinder/tests/fixtures.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/tests/fixtures.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/tests/fixtures.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright 2016 IBM Corp.
# Copyright 2017 Rackspace Australia
# Copyright 2018 Michael Still and Aptira
#
# 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.apach... | 35.860215 | 79 | 0.68006 |
4a1f48db441b71b50c50da329db7d935ba10476d | 503 | py | Python | luna/gateware/interface/serdes_phy/__init__.py | shrine-maiden-heavy-industries/luna | 6e737ea004d64c0b81de13e68657fecb45f93c1b | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/interface/serdes_phy/__init__.py | shrine-maiden-heavy-industries/luna | 6e737ea004d64c0b81de13e68657fecb45f93c1b | [
"BSD-3-Clause"
] | null | null | null | luna/gateware/interface/serdes_phy/__init__.py | shrine-maiden-heavy-industries/luna | 6e737ea004d64c0b81de13e68657fecb45f93c1b | [
"BSD-3-Clause"
] | null | null | null | #
# This file is part of LUNA.
#
# Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com>
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
#
# Code adapted from ``litex`` and ``usb3_pipe``.
# SPDX-License-Identifier: BSD-3-Clause
""" SerDes-based USB3 PIPE PHY. """
#
# Quick-use aliases
#... | 26.473684 | 69 | 0.741551 |
4a1f498f8e228ba4d301b9865fcc19076299891c | 236,438 | py | Python | fabric_sky130_v1_generator/fabric_gen_nobuf.py | FPGA-Research-Manchester/FabricGenerator | f58178ecc0818ae61f9c04b515a4a713b7c82ce0 | [
"Apache-2.0"
] | 5 | 2020-12-25T00:43:15.000Z | 2021-02-01T17:45:35.000Z | fabric_sky130_v1_generator/fabric_gen_nobuf.py | FPGA-Research-Manchester/FabricGenerator | f58178ecc0818ae61f9c04b515a4a713b7c82ce0 | [
"Apache-2.0"
] | 1 | 2020-12-25T00:43:08.000Z | 2020-12-25T00:43:08.000Z | fabric_sky130_v1_generator/fabric_gen_nobuf.py | FPGA-Research-Manchester/FabricGenerator | f58178ecc0818ae61f9c04b515a4a713b7c82ce0 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python3
# Copyright 2021 University of Manchester
#
# 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... | 57.851236 | 325 | 0.580427 |
4a1f4a354a2c9e1022c4e8d15291c537fd1e1e6d | 741 | py | Python | Company-Based/roblox/word_compression.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | Company-Based/roblox/word_compression.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | Company-Based/roblox/word_compression.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | def compressWord(word: str, k: int):
# Lets define a stack to maintain stream of letters.
from collections import deque
stck = deque([])
for c in word:
if stck:
old_c, val = stck[-1]
if old_c == c:
stck.append((c, val+1))
else:
... | 28.5 | 79 | 0.503374 |
4a1f4ad85d8a7552854d8f3d4e6153edac9f280c | 230 | py | Python | docs/en/doclanguage.py | babab/DisPass | 9563ddeef60fc580ce13fa3bfdedea56225ea099 | [
"0BSD"
] | 3 | 2015-02-03T05:49:40.000Z | 2016-06-24T01:44:38.000Z | sphinx-doc/en/doclanguage.py | ryuslash/DisPass | d19962377457b4106355fa236d2cc8e0b039ad9f | [
"0BSD"
] | 56 | 2016-01-25T17:44:15.000Z | 2018-11-02T18:05:51.000Z | sphinx-doc/en/doclanguage.py | ryuslash/DisPass | d19962377457b4106355fa236d2cc8e0b039ad9f | [
"0BSD"
] | 1 | 2016-01-25T17:58:53.000Z | 2016-01-25T17:58:53.000Z | import sys
import os
# Import from dispass for versionStr
sys.path.insert(0, os.path.abspath('../../'))
from dispass import dispass
# language specific settings
language = 'en'
html_title = dispass.versionStr + ' documentation'
| 20.909091 | 50 | 0.747826 |
4a1f4b1b147fbc2000308981fa1cc1cc5b58f87b | 759 | py | Python | Gds/src/fprime_gds/common/templates/data_template.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 5 | 2019-10-22T03:41:02.000Z | 2022-01-16T12:48:31.000Z | Gds/src/fprime_gds/common/templates/data_template.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 27 | 2019-02-07T17:58:58.000Z | 2019-08-13T00:46:24.000Z | Gds/src/fprime_gds/common/templates/data_template.py | chrisdonlan/fprime | 0cab90e238cff1b50c20f1e148a44cf8827a5bf8 | [
"Apache-2.0"
] | 3 | 2019-01-01T18:44:37.000Z | 2019-08-01T01:19:39.000Z | '''
@brief Base data template class.
Data templates are classes whose instances describe a specific class of data
items. For example, a data template instance could describe the AF_ASSERT_0
event or the channel FR_CycleTime.
@date Created July 2, 2018
@author R. Joseph Paetz
@bug No known bugs
'''
class DataTempla... | 21.083333 | 76 | 0.673254 |
4a1f4b8dc8d39737a2eda189d554f89df95b8697 | 6,413 | py | Python | markdown_generator/pubsFromBib.py | ThomasDeb/ThomasDeb.github.io | 646689b0dd92244999c5acea1bb0d7faead97b52 | [
"MIT"
] | null | null | null | markdown_generator/pubsFromBib.py | ThomasDeb/ThomasDeb.github.io | 646689b0dd92244999c5acea1bb0d7faead97b52 | [
"MIT"
] | null | null | null | markdown_generator/pubsFromBib.py | ThomasDeb/ThomasDeb.github.io | 646689b0dd92244999c5acea1bb0d7faead97b52 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Publications markdown generator for academicpages
#
# Takes a set of bibtex of publications and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.... | 36.645714 | 273 | 0.51801 |
4a1f4bb0226765188e68e6fb59309d63a0e26ff2 | 5,969 | py | Python | Past_experiments/E12C4.py | abogdanova/FedMed | 72f238c31b6714c664e1b0e40204f9528f764182 | [
"MIT"
] | 5 | 2019-07-23T14:49:46.000Z | 2022-03-30T13:54:22.000Z | Past_experiments/E12C4.py | abogdanova/FedMed | 72f238c31b6714c664e1b0e40204f9528f764182 | [
"MIT"
] | null | null | null | Past_experiments/E12C4.py | abogdanova/FedMed | 72f238c31b6714c664e1b0e40204f9528f764182 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import collections
import numpy as np
from six.moves import range
import tensorflow as tf
import datetime
from tensorflow_federated import python as tff
from tensorflow.python.keras.optimizer_v2 import gradient_descent
from tensorflow.keras import layer... | 34.906433 | 113 | 0.681354 |
4a1f4bdffa14661370e4815c5eefb7172de1c50c | 5,996 | py | Python | agn_utils/bbh_population_generators/calculate_extra_bbh_parameters.py | avivajpeyi/agn_phenomenological_model | 94d2e39f43cb11986d0abcb33769ee1aa501ca85 | [
"MIT"
] | null | null | null | agn_utils/bbh_population_generators/calculate_extra_bbh_parameters.py | avivajpeyi/agn_phenomenological_model | 94d2e39f43cb11986d0abcb33769ee1aa501ca85 | [
"MIT"
] | null | null | null | agn_utils/bbh_population_generators/calculate_extra_bbh_parameters.py | avivajpeyi/agn_phenomenological_model | 94d2e39f43cb11986d0abcb33769ee1aa501ca85 | [
"MIT"
] | 1 | 2021-08-22T07:05:15.000Z | 2021-08-22T07:05:15.000Z | """
Module to help convert parameters to our AGN formalism
"""
import bilby
import lalsimulation
import numpy as np
from bilby.gw.conversion import (
component_masses_to_chirp_mass, total_mass_and_mass_ratio_to_component_masses,
chirp_mass_and_mass_ratio_to_total_mass, generate_all... | 27.888372 | 168 | 0.653936 |
4a1f4c6be3b9c1f74fc1037c8b22db49e482779f | 1,984 | py | Python | docs/conf.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | 4 | 2020-12-22T11:12:35.000Z | 2021-12-15T13:30:02.000Z | docs/conf.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | 4 | 2021-01-16T07:34:22.000Z | 2021-08-14T06:56:07.000Z | docs/conf.py | tma15/bunruija | 64a5c993a06e9de75f8f382cc4b817f91965223f | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 34.206897 | 79 | 0.664315 |
4a1f4e883ee98be13f0c2970723e5a35ca16742a | 377 | py | Python | run-fetch-boxscores.py | slinden2/player-follower | 7db8ffbd4af3c8cfb394492689d448e0e697c19d | [
"MIT"
] | null | null | null | run-fetch-boxscores.py | slinden2/player-follower | 7db8ffbd4af3c8cfb394492689d448e0e697c19d | [
"MIT"
] | 17 | 2020-02-10T11:27:00.000Z | 2022-02-26T11:52:12.000Z | run-fetch-boxscores.py | slinden2/player-follower | 7db8ffbd4af3c8cfb394492689d448e0e697c19d | [
"MIT"
] | null | null | null | import os
import datetime
# move to correct path
FILE_PATH = os.path.join(os.path.dirname(
os.path.realpath(__file__)), "backend")
os.chdir(FILE_PATH)
# day before first fetch date
date = datetime.datetime(2019, 3, 10)
for i in range(0, 20):
date += datetime.timedelta(days=1)
dateStr = date.strftime('%Y-... | 23.5625 | 48 | 0.69496 |
4a1f4e9f6e8adbb2ec3ca57f186e3f78893d0b11 | 966 | py | Python | project_manager_pro/exec.py | FullDungeon/project_manager | cc3906c13b3d83eb2e78f6b8b197d0aed1f2a414 | [
"MIT"
] | null | null | null | project_manager_pro/exec.py | FullDungeon/project_manager | cc3906c13b3d83eb2e78f6b8b197d0aed1f2a414 | [
"MIT"
] | null | null | null | project_manager_pro/exec.py | FullDungeon/project_manager | cc3906c13b3d83eb2e78f6b8b197d0aed1f2a414 | [
"MIT"
] | null | null | null | import json
import os
from colorama import init, Style, Fore
from project_manager_pro._meta import cache_commands, cache_projects
init(autoreset=True)
def _exec(alias, name):
# loading command
file = open(cache_commands, 'r', encoding='utf-8')
commands = json.load(file)
if alias in commands:
... | 25.421053 | 81 | 0.594203 |
4a1f4f0832cac8cf9964fff3f967b7d2b3ca3c02 | 9,629 | py | Python | qiskit/opflow/state_fns/operator_state_fn.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 11 | 2019-06-27T09:53:29.000Z | 2021-03-02T04:40:30.000Z | qiskit/opflow/state_fns/operator_state_fn.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 12 | 2018-09-21T12:02:18.000Z | 2018-09-25T09:14:59.000Z | qiskit/opflow/state_fns/operator_state_fn.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 4 | 2019-08-05T15:35:33.000Z | 2020-09-18T18:55:02.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 44.786047 | 100 | 0.636515 |
4a1f4f2367cd8ef1e8f90d7e2d48211cc5da3fa8 | 5,711 | py | Python | examples/applications/clustering/fast_clustering.py | sourcery-ai-bot/sentence-transformers | 9541056f0d37677f3b978a1267260d6586ce89cc | [
"Apache-2.0"
] | null | null | null | examples/applications/clustering/fast_clustering.py | sourcery-ai-bot/sentence-transformers | 9541056f0d37677f3b978a1267260d6586ce89cc | [
"Apache-2.0"
] | null | null | null | examples/applications/clustering/fast_clustering.py | sourcery-ai-bot/sentence-transformers | 9541056f0d37677f3b978a1267260d6586ce89cc | [
"Apache-2.0"
] | null | null | null | """
This is a more complex example on performing clustering on large scale dataset.
This examples find in a large set of sentences local communities, i.e., groups of sentences that are highly
similar. You can freely configure the threshold what is considered as similar. A high threshold will
only find extremely simila... | 39.937063 | 143 | 0.709158 |
4a1f4f3d91982d2ea80d4f5e58037fd0d77bdd1f | 2,571 | py | Python | calculateRanking.py | ConorMaley/Catan | c16f1a1d1eb286b13322a8b50ef319dd079ef01c | [
"Apache-2.0"
] | null | null | null | calculateRanking.py | ConorMaley/Catan | c16f1a1d1eb286b13322a8b50ef319dd079ef01c | [
"Apache-2.0"
] | null | null | null | calculateRanking.py | ConorMaley/Catan | c16f1a1d1eb286b13322a8b50ef319dd079ef01c | [
"Apache-2.0"
] | null | null | null | import googleSheetsApi
import eloCalculator
def main():
masterSheet = googleSheetsApi.getMasterSheet()
Elos = {}
playersArray = []
highestELO = {}
highestELO['score'] = 1200
lowestELO = {}
lowestELO['score'] = 1200
for line_count, row in enumerate(masterSheet):
if line_count == 0:
for name in row[1:]:... | 30.975904 | 132 | 0.614936 |
4a1f50ad03f7a6627765530eb74786a9747d78f0 | 3,564 | py | Python | ndsys/optimizers/da.py | slagosz/ndsys | 9ef9e47a20fdf93fe2ea3f6c3647e373152e8d9f | [
"MIT"
] | null | null | null | ndsys/optimizers/da.py | slagosz/ndsys | 9ef9e47a20fdf93fe2ea3f6c3647e373152e8d9f | [
"MIT"
] | null | null | null | ndsys/optimizers/da.py | slagosz/ndsys | 9ef9e47a20fdf93fe2ea3f6c3647e373152e8d9f | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.base import BaseEstimator
from sklearn.utils.validation import check_X_y, check_array, check_is_fitted
class EntropicDualAveraging(BaseEstimator):
"""The variant of the Dual Averaging algorithm based on the negative entropy function
Parameters
----------
l1_constraint ... | 29.94958 | 107 | 0.588664 |
4a1f50f11d854ae4eb1a83473396cddecc4f589c | 315 | py | Python | exercises/templatetags/form_widgets.py | rattletat/homework-server | abfac831ed45cc567a6a1610edee934200ffada7 | [
"Unlicense"
] | 1 | 2020-06-03T14:54:38.000Z | 2020-06-03T14:54:38.000Z | exercises/templatetags/form_widgets.py | rattletat/homework-server | abfac831ed45cc567a6a1610edee934200ffada7 | [
"Unlicense"
] | null | null | null | exercises/templatetags/form_widgets.py | rattletat/homework-server | abfac831ed45cc567a6a1610edee934200ffada7 | [
"Unlicense"
] | null | null | null | from django.template import Library
register = Library()
@register.filter
def add_classes(widget, classes):
widget.field.widget.attrs['class'] = classes
return widget
@register.filter
def add_placeholder(widget, placeholder):
widget.field.widget.attrs['placeholder'] = placeholder
return widget
| 21 | 58 | 0.755556 |
4a1f52b30392ebc6491e741567ded1b4be3db371 | 2,529 | py | Python | decision_tree.py | jkleve/Presidential-Prediction | 5a9f7b0d5e954eb7c7f59a3a7f9081257c7f0268 | [
"MIT"
] | null | null | null | decision_tree.py | jkleve/Presidential-Prediction | 5a9f7b0d5e954eb7c7f59a3a7f9081257c7f0268 | [
"MIT"
] | null | null | null | decision_tree.py | jkleve/Presidential-Prediction | 5a9f7b0d5e954eb7c7f59a3a7f9081257c7f0268 | [
"MIT"
] | null | null | null | from sklearn.naive_bayes import GaussianNB
from sklearn import tree
import numpy as np
import matplotlib.pyplot as plt
import sys
def read_data(file_name, n_features, n_samples):
n = n_features
m = n_samples
y = np.zeros(shape=(m,1))
arr = np.zeros(shape=(m,n))
i = 0
with open(file_name) ... | 25.039604 | 82 | 0.552392 |
4a1f5304f5072466944a11d8ea6e7bc783fb29a8 | 5,289 | py | Python | dbutils.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | dbutils.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | dbutils.py | workforce-data-initiative/etp-warehouse | 5713a9a196d48954023bc97cb79c929e637810e8 | [
"Apache-2.0"
] | null | null | null | import logging
import yaml
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, Session
logger = logging.getLogger(__name__)
class DbConfValidator(object):
@staticmethod
def validate_conf(db_conf):
pass
class DbConnectionUri(object):
@classmethod
def build_conn_ur... | 29.220994 | 91 | 0.673284 |
4a1f534f96b10e15980d6e7db7bf87318539cd6b | 748 | py | Python | spid_cie_oidc/entity/migrations/0013_alter_federationentityconfiguration_metadata.py | peppelinux/spid-cie-oidc-authority | 816636fece10f410f5d6fce85fd79bb409d0c8b8 | [
"Apache-2.0"
] | 4 | 2022-03-08T09:05:13.000Z | 2022-03-16T17:59:43.000Z | spid_cie_oidc/entity/migrations/0013_alter_federationentityconfiguration_metadata.py | peppelinux/spid-cie-oidc-authority | 816636fece10f410f5d6fce85fd79bb409d0c8b8 | [
"Apache-2.0"
] | 64 | 2022-03-08T01:11:40.000Z | 2022-03-31T17:23:49.000Z | spid_cie_oidc/entity/migrations/0013_alter_federationentityconfiguration_metadata.py | peppelinux/spid-cie-oidc-authority | 816636fece10f410f5d6fce85fd79bb409d0c8b8 | [
"Apache-2.0"
] | 8 | 2022-03-09T12:00:08.000Z | 2022-03-31T13:52:14.000Z | # Generated by Django 4.0.2 on 2022-03-13 00:41
from django.db import migrations, models
import spid_cie_oidc.entity.validators
class Migration(migrations.Migration):
dependencies = [
('spid_cie_oidc_entity', '0012_delete_publicjwk'),
]
operations = [
migrations.AlterField(
... | 37.4 | 337 | 0.691176 |
4a1f54728b6dcf3d211418f777de5ccfe734f29d | 605 | py | Python | models/backbone/__init__.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 126 | 2019-10-30T00:58:02.000Z | 2022-01-26T06:29:10.000Z | models/backbone/__init__.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 14 | 2019-11-05T15:10:22.000Z | 2022-02-08T09:05:53.000Z | models/backbone/__init__.py | shiyutang/CAG_UDA | c3eda799e2edbd2dd0b6ab6bd8b12727167c9c91 | [
"MIT"
] | 26 | 2019-12-02T09:41:11.000Z | 2022-01-29T10:46:41.000Z | from models.backbone import resnet, xception, drn, mobilenet
def build_backbone(backbone, output_stride, BatchNorm):
if backbone == 'resnet101':
return resnet.ResNet101(output_stride, BatchNorm)
elif backbone == 'resnet50':
return resnet.ResNet50(output_stride, BatchNorm)
elif backbone == '... | 37.8125 | 65 | 0.710744 |
4a1f54d0c77258b6365a847d7323882a8f25a8a5 | 560 | py | Python | planemo/commands/cmd_profile_list.py | gmauro/planemo | 574088f356a7b9f49191daf15437c2973c7318d8 | [
"CC-BY-3.0"
] | 73 | 2015-01-03T15:09:26.000Z | 2022-03-30T23:52:55.000Z | planemo/commands/cmd_profile_list.py | gmauro/planemo | 574088f356a7b9f49191daf15437c2973c7318d8 | [
"CC-BY-3.0"
] | 958 | 2015-01-02T08:27:45.000Z | 2022-03-23T14:51:51.000Z | planemo/commands/cmd_profile_list.py | gmauro/planemo | 574088f356a7b9f49191daf15437c2973c7318d8 | [
"CC-BY-3.0"
] | 84 | 2015-01-06T18:27:28.000Z | 2021-11-18T01:58:17.000Z | """Module describing the planemo ``profile_list`` command."""
from __future__ import print_function
import click
from planemo.cli import command_function
from planemo.galaxy import profiles
from planemo.io import info
@click.command('profile_list')
@command_function
def cli(ctx, **kwds):
"""List configured prof... | 28 | 76 | 0.741071 |
4a1f551e0b3c0ca2cf54b07c3a71b3d713327da7 | 5,175 | py | Python | sdk/python/pulumi_azure_native/recoveryservices/v20200202/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/recoveryservices/v20200202/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/recoveryservices/v20200202/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 34.966216 | 174 | 0.644831 |
4a1f5661c5688b7b0d9e4bc5f271f4d305d3ed43 | 2,081 | py | Python | blog/views.py | JochenFM/art_prints_ms4 | 61fd8a06aa398ac97ce32ac9627d3ece113af85f | [
"PostgreSQL"
] | null | null | null | blog/views.py | JochenFM/art_prints_ms4 | 61fd8a06aa398ac97ce32ac9627d3ece113af85f | [
"PostgreSQL"
] | null | null | null | blog/views.py | JochenFM/art_prints_ms4 | 61fd8a06aa398ac97ce32ac9627d3ece113af85f | [
"PostgreSQL"
] | 1 | 2021-09-02T09:48:19.000Z | 2021-09-02T09:48:19.000Z | from django.shortcuts import render, get_object_or_404
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.auth.models import User
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
DeleteView
)
from .models import Post
... | 25.072289 | 88 | 0.677559 |
4a1f5751fbd4d6b44d99c69a74ad89a8496f8648 | 1,792 | py | Python | sympy/codegen/futils.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/codegen/futils.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/codegen/futils.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | from itertools import chain
from sympy.codegen.fnodes import Module
from sympy.core.symbol import Dummy
from sympy.printing.fortran import FCodePrinter
""" This module collects utilities for rendering Fortran code. """
def render_as_module(definitions, name, declarations=(), printer_settings=None):
""" Creates a... | 43.707317 | 123 | 0.662946 |
4a1f578dda292e6f1e9a5dfa6289089a5e76466e | 6,902 | py | Python | daisy_workflows/image_import/inspection/src/boot_inspect/inspection.py | a-zakem/compute-image-tools | 28138fd8e1a6c245125b744a7d912720d7239b2c | [
"Apache-2.0"
] | 1 | 2020-06-04T20:31:26.000Z | 2020-06-04T20:31:26.000Z | daisy_workflows/image_import/inspection/src/boot_inspect/inspection.py | a-zakem/compute-image-tools | 28138fd8e1a6c245125b744a7d912720d7239b2c | [
"Apache-2.0"
] | 1 | 2021-08-18T19:00:35.000Z | 2021-08-18T19:00:35.000Z | daisy_workflows/image_import/inspection/src/boot_inspect/inspection.py | a-zakem/compute-image-tools | 28138fd8e1a6c245125b744a7d912720d7239b2c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020 Google Inc. 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 ... | 33.342995 | 78 | 0.687627 |
4a1f57db4929e392386256739d393287c1d608fd | 339 | py | Python | nodes/0.7.x/python/RoomSequence.ToDoorSequence.py | jdehotin/Clockworkfordynamo | 59226ea8292c57acfa1aa476efd40f0e78c9b965 | [
"MIT"
] | 147 | 2016-02-24T16:37:03.000Z | 2022-02-18T12:10:34.000Z | nodes/0.7.x/python/RoomSequence.ToDoorSequence.py | jdehotin/Clockworkfordynamo | 59226ea8292c57acfa1aa476efd40f0e78c9b965 | [
"MIT"
] | 269 | 2016-02-25T14:04:14.000Z | 2022-03-26T07:30:53.000Z | nodes/0.7.x/python/RoomSequence.ToDoorSequence.py | jdehotin/Clockworkfordynamo | 59226ea8292c57acfa1aa476efd40f0e78c9b965 | [
"MIT"
] | 89 | 2016-03-16T18:21:56.000Z | 2022-02-03T14:34:30.000Z | import clr
rooms = IN[0]
doors = IN[1]
fromroom = IN[2]
toroom = IN[3]
elementlist = list()
i = 0
while i < (len(rooms)-1):
j = 0
while j < len(doors):
if (rooms[i] == fromroom[j] and rooms[i+1] == toroom[j]) or (rooms[i+1] == fromroom[j] and rooms[i] == toroom[j]):
elementlist.append(doors[j])
j += 1
i += ... | 19.941176 | 116 | 0.59587 |
4a1f5a23a977994e6019bb7f5ebbd7dff7a1e4da | 2,048 | py | Python | docs/conf.py | arpitshahi227/browser-history | 4a84a2dbd5a5a05eea1b0d167d723cd518a0f3f4 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | arpitshahi227/browser-history | 4a84a2dbd5a5a05eea1b0d167d723cd518a0f3f4 | [
"Apache-2.0"
] | 27 | 2021-05-10T09:52:18.000Z | 2022-03-28T15:10:56.000Z | docs/conf.py | arpitshahi227/browser-history | 4a84a2dbd5a5a05eea1b0d167d723cd518a0f3f4 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.57377 | 79 | 0.665527 |
4a1f5a6a58568754cf5ce8eb196568f21b29acc3 | 3,783 | py | Python | djangoecommerce/settings.py | ThalesLeal/appdjangoecommercee | 816f31117996c23d87d224f3eebe1195ee215400 | [
"CC0-1.0"
] | null | null | null | djangoecommerce/settings.py | ThalesLeal/appdjangoecommercee | 816f31117996c23d87d224f3eebe1195ee215400 | [
"CC0-1.0"
] | null | null | null | djangoecommerce/settings.py | ThalesLeal/appdjangoecommercee | 816f31117996c23d87d224f3eebe1195ee215400 | [
"CC0-1.0"
] | null | null | null | """
Django settings for djangoecommerce project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import ... | 27.215827 | 91 | 0.706846 |
4a1f5a7a8d3c5c086af3980e035ec9048052d3fa | 586 | py | Python | glue/__init__.py | brean/arduino-kivy-bluetooth | 651126e11e6d44723a07609234e976f93a8084a1 | [
"MIT"
] | 13 | 2016-05-13T05:59:55.000Z | 2022-01-07T00:05:57.000Z | glue/__init__.py | brean/arduino-kivy-bluetooth | 651126e11e6d44723a07609234e976f93a8084a1 | [
"MIT"
] | null | null | null | glue/__init__.py | brean/arduino-kivy-bluetooth | 651126e11e6d44723a07609234e976f93a8084a1 | [
"MIT"
] | 4 | 2016-11-01T06:22:56.000Z | 2020-02-09T17:45:48.000Z | # -*- coding: utf-8 -*-
"""
board connection - provide classes to connect to some robotic board like arduino or raspberry py
directly via bluetooth or over TCP/IP
"""
from glue.protocols import protocols
from glue.systems import systems
def connect(data):
"""
connect to system using protocol
:param data:... | 26.636364 | 96 | 0.713311 |
4a1f5a9246076d38e2117c7da17d6009350304ed | 31 | py | Python | thermo-env/lib/python3.5/keyword.py | ndebuhr/thermoModelingAlpha | 9e1a0f9ac4caabf386c1e3103ec69f269131a6b9 | [
"MIT"
] | 4 | 2017-09-24T21:30:46.000Z | 2019-06-01T13:37:44.000Z | thermo-env/lib/python3.5/keyword.py | ndebuhr/thermo-state-solver | 9e1a0f9ac4caabf386c1e3103ec69f269131a6b9 | [
"MIT"
] | 19 | 2020-01-28T21:41:50.000Z | 2022-03-11T23:17:39.000Z | thermo-env/lib/python3.5/keyword.py | ndebuhr/thermo-state-solver | 9e1a0f9ac4caabf386c1e3103ec69f269131a6b9 | [
"MIT"
] | null | null | null | /usr/lib64/python3.5/keyword.py | 31 | 31 | 0.806452 |
4a1f5bb8cfd7f227ca1a6938ea727fac348b970d | 388 | py | Python | instance/models.py | devopsconsulting/webvirtmgr | cc35978cae4a1a53b93056df946896ae992fe176 | [
"Apache-2.0"
] | 1 | 2019-07-16T20:32:44.000Z | 2019-07-16T20:32:44.000Z | instance/models.py | normaldotcom/webvirtmgr | 8d822cb94105abf82eb0ff6651a36c43b0911d2a | [
"Apache-2.0"
] | null | null | null | instance/models.py | normaldotcom/webvirtmgr | 8d822cb94105abf82eb0ff6651a36c43b0911d2a | [
"Apache-2.0"
] | null | null | null | from django.db import models
from servers.models import Compute
class Instance(models.Model):
compute = models.ForeignKey(Compute)
name = models.CharField(max_length=20)
uuid = models.CharField(max_length=36)
# display_name = models.CharField(max_length=50)
# display_description = models.CharField(m... | 27.714286 | 59 | 0.742268 |
4a1f5bbc5a9ce98718c82f8f783b65f3e5e2860d | 1,395 | py | Python | kornia/utils/misc.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 418 | 2018-10-02T22:31:36.000Z | 2019-01-16T14:15:45.000Z | kornia/utils/misc.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 94 | 2019-01-17T22:10:45.000Z | 2019-05-22T23:47:58.000Z | kornia/utils/misc.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2018-10-02T22:50:04.000Z | 2019-01-13T18:14:11.000Z | import torch
def eye_like(n: int, input: torch.Tensor) -> torch.Tensor:
r"""Return a 2-D tensor with ones on the diagonal and zeros elsewhere with the same batch size as the input.
Args:
n: the number of rows :math:`(N)`.
input: image tensor that will determine the batch size of the output ma... | 31.704545 | 112 | 0.630824 |
4a1f5e3fc7a89703c5296d8f776563475183499a | 3,516 | py | Python | level_13.py | katsukaree/chapter-weasel | fa9a6c890eb6bca1f25dd89a97ef10ea7b62c2b7 | [
"MIT"
] | null | null | null | level_13.py | katsukaree/chapter-weasel | fa9a6c890eb6bca1f25dd89a97ef10ea7b62c2b7 | [
"MIT"
] | null | null | null | level_13.py | katsukaree/chapter-weasel | fa9a6c890eb6bca1f25dd89a97ef10ea7b62c2b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import requests
import base64
import re
import tempfile
import urllib.parse
from bs4 import BeautifulSoup
from levels_credentials import credentials, folder
level_url = credentials[13]["url"]
level_username = credentials[13]["level"]
level_password = credentials[13]["password"]
next_level_url... | 74.808511 | 1,872 | 0.742036 |
4a1f6028964148dcc46c1ff12bbb3ff8d2b421b7 | 1,159 | py | Python | relocate_xaltjson.py | adityakavalur/slurm-docker-cluster | d54703ddcab9d456be4743dae0f51daf3d549df5 | [
"MIT"
] | null | null | null | relocate_xaltjson.py | adityakavalur/slurm-docker-cluster | d54703ddcab9d456be4743dae0f51daf3d549df5 | [
"MIT"
] | null | null | null | relocate_xaltjson.py | adityakavalur/slurm-docker-cluster | d54703ddcab9d456be4743dae0f51daf3d549df5 | [
"MIT"
] | null | null | null | import grp
import pwd
import os
import json
import fnmatch
from glob import glob
org_dir="/data/xalt2_json"
reloc_dir="/data/xalt2_json_moved"
xalt_dir=glob(org_dir+"/*")
user=pwd.getpwuid(os.getuid()).pw_uid
#move dir at the end of the run
for slurmjobs in xalt_dir:
stat_info = os.stat(slurmjobs)
uid = stat_i... | 28.268293 | 76 | 0.623814 |
4a1f60f66c03890564d050fd681dadc2f607e8f5 | 37,267 | py | Python | veppy/features.py | solvebio/veppy | 75d581d562a6d50fd6181b2870feda26ff50115c | [
"MIT"
] | 13 | 2016-10-04T19:41:48.000Z | 2021-01-14T15:38:28.000Z | veppy/features.py | solvebio/veppy | 75d581d562a6d50fd6181b2870feda26ff50115c | [
"MIT"
] | 7 | 2016-10-05T18:58:50.000Z | 2020-07-15T13:01:07.000Z | veppy/features.py | solvebio/veppy | 75d581d562a6d50fd6181b2870feda26ff50115c | [
"MIT"
] | 5 | 2016-10-05T12:51:32.000Z | 2016-11-14T19:26:28.000Z | import sys
import re
import logging
from intervaltree import IntervalTree
from bisect import bisect
from collections import defaultdict, namedtuple
from . import errors
logger = logging.getLogger('veppy')
def intersects(start0, stop0, start1, stop1):
return \
overlaps(start0, stop0, start1, stop1) or \... | 32.349826 | 118 | 0.50919 |
4a1f6109b7ed4e99d15b4d4e1e14467e14af5a1b | 657 | py | Python | setup.py | stephen-david-evans/execs | 96397ee381f2d6d37dccf6dc9001ac83aab346db | [
"MIT"
] | null | null | null | setup.py | stephen-david-evans/execs | 96397ee381f2d6d37dccf6dc9001ac83aab346db | [
"MIT"
] | null | null | null | setup.py | stephen-david-evans/execs | 96397ee381f2d6d37dccf6dc9001ac83aab346db | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="execs",
version="0.0.1",
author="Stephen Evans",
author_email="evans.stephen.david@gmail.com",
description="Experimental Entity Component System",
long_description=long_description,
... | 28.565217 | 55 | 0.665145 |
4a1f61e6fd199d2394225dac0a2ba8678678a115 | 15,814 | py | Python | toontown/hood/QuietZoneState.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 99 | 2019-11-02T22:25:00.000Z | 2022-02-03T03:48:00.000Z | toontown/hood/QuietZoneState.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 42 | 2019-11-03T05:31:08.000Z | 2022-03-16T22:50:32.000Z | toontown/hood/QuietZoneState.py | TheFamiliarScoot/open-toontown | 678313033174ea7d08e5c2823bd7b473701ff547 | [
"BSD-3-Clause"
] | 57 | 2019-11-03T07:47:37.000Z | 2022-03-22T00:41:49.000Z | from pandac.PandaModules import *
from direct.showbase.PythonUtil import Functor, PriorityCallbacks
from direct.task import Task
from toontown.distributed.ToontownMsgTypes import *
from otp.otpbase import OTPGlobals
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import StateData
from direct.fsm impo... | 41.725594 | 147 | 0.652333 |
4a1f63002d19f6d62d374f34d0e2a69418352e45 | 2,596 | py | Python | Google Scholar Crawler/main.py | yuezih/Yuezih-Playground | 82bc5b09ed2748cee42185763ea9fbaab9b79f86 | [
"MIT"
] | 1 | 2022-03-06T04:43:52.000Z | 2022-03-06T04:43:52.000Z | Google Scholar Crawler/main.py | yuezih/Yuezih-Playground | 82bc5b09ed2748cee42185763ea9fbaab9b79f86 | [
"MIT"
] | null | null | null | Google Scholar Crawler/main.py | yuezih/Yuezih-Playground | 82bc5b09ed2748cee42185763ea9fbaab9b79f86 | [
"MIT"
] | null | null | null | import urllib.parse
import urllib.request
import re
import operator
class Author(object):
def __init__(self):
self.name = ''
self.artNum = 0
self.artTitle = []
authors = []
authorDict = {}
index = 0
data = ""
author_list = []
def getData(url):
header_dict={'Host': 'scholar.google.com... | 30.904762 | 148 | 0.641757 |
4a1f6393afc0c1602de77252c9b400adba146aad | 14,158 | py | Python | src/cmds/wallet.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | src/cmds/wallet.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | src/cmds/wallet.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | import click
import sys
import time
from datetime import datetime
from typing import Tuple, Optional, Callable, List
import aiohttp
import asyncio
from src.rpc.wallet_rpc_client import WalletRpcClient
from src.server.start_wallet import SERVICE_NAME
from src.util.bech32m import encode_puzzle_hash
from src.util.byte_t... | 44.662461 | 119 | 0.651575 |
4a1f63b43ea4ad051fa4826b728ab8c6817145b1 | 53,713 | py | Python | trestle/core/control_io.py | jayhawk87/compliance-trestle | d0262826f30e0c7f89f8a3551b93142669fa2c66 | [
"Apache-2.0"
] | null | null | null | trestle/core/control_io.py | jayhawk87/compliance-trestle | d0262826f30e0c7f89f8a3551b93142669fa2c66 | [
"Apache-2.0"
] | null | null | null | trestle/core/control_io.py | jayhawk87/compliance-trestle | d0262826f30e0c7f89f8a3551b93142669fa2c66 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 46.145189 | 164 | 0.587828 |
4a1f6444e2b8537d0e12f4b812b194e85c7c4869 | 127 | py | Python | FaceDetectionModule/helper_types/vector.py | Bricktheworld/rhombus-api-examples-python | b4778c3a635786070ee10a3131b1a1f7f6ebac36 | [
"MIT"
] | null | null | null | FaceDetectionModule/helper_types/vector.py | Bricktheworld/rhombus-api-examples-python | b4778c3a635786070ee10a3131b1a1f7f6ebac36 | [
"MIT"
] | 20 | 2021-06-08T22:29:20.000Z | 2022-01-15T19:51:46.000Z | FaceDetectionModule/helper_types/vector.py | Bricktheworld/rhombus-api-examples-python | b4778c3a635786070ee10a3131b1a1f7f6ebac36 | [
"MIT"
] | 9 | 2021-06-08T22:15:35.000Z | 2022-03-03T05:19:58.000Z | class Vec2:
x: float
y: float
def __init__(self, x:float, y:float) -> None:
self.x = x
self.y = y
| 15.875 | 49 | 0.503937 |
4a1f64cf521fe09b168f544cdd194dd0b5234608 | 13,129 | py | Python | doc/sphinxext/tests/test_docscrape.py | willgrass/pandas | 137fe223d1cf0663c924344473033b84750888bb | [
"BSD-3-Clause"
] | 2 | 2020-07-03T12:00:29.000Z | 2021-04-18T06:54:30.000Z | doc/sphinxext/tests/test_docscrape.py | willgrass/pandas | 137fe223d1cf0663c924344473033b84750888bb | [
"BSD-3-Clause"
] | null | null | null | doc/sphinxext/tests/test_docscrape.py | willgrass/pandas | 137fe223d1cf0663c924344473033b84750888bb | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding:utf-8 -*-
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from docscrape import NumpyDocString, FunctionDoc
from docscrape_sphinx import SphinxDocString
from nose.tools import *
doc_txt = '''\
numpy.multivariate_normal(mean, cov, shape=None)
Draw values from a multiv... | 25.642578 | 80 | 0.619697 |
4a1f65c128c3aa0027e7a9e1938d90e083280c8f | 1,199 | py | Python | CLRS/Chapter 15/Dynamic Programming/15.2/cut_rod.py | pablotrinidad/competitive-programming | de16d007ca276330cd0a92bd5b75ce4e9e75fb59 | [
"MIT"
] | null | null | null | CLRS/Chapter 15/Dynamic Programming/15.2/cut_rod.py | pablotrinidad/competitive-programming | de16d007ca276330cd0a92bd5b75ce4e9e75fb59 | [
"MIT"
] | null | null | null | CLRS/Chapter 15/Dynamic Programming/15.2/cut_rod.py | pablotrinidad/competitive-programming | de16d007ca276330cd0a92bd5b75ce4e9e75fb59 | [
"MIT"
] | null | null | null | """Rod cutting.
Recursive top-down implementation.
"""
import cProfile
from random import randint
def cut_rod(p, n):
"""Cut rod.
Implements the computation in the equation 15.2 (r_n = max_{i <= i <= n}(p_i + r_{n-1})).
Where p is the array of prices by length and n the length of the rod.
"""
i... | 22.203704 | 93 | 0.51543 |
4a1f663e88483911aa4b30fead0272e8dce84bc7 | 4,943 | py | Python | gerrychain/constraints/validity.py | rwbogl/GerryChain | e7254ea62df5dc2c6eb6c60d0437d7152bb9649a | [
"BSD-3-Clause"
] | null | null | null | gerrychain/constraints/validity.py | rwbogl/GerryChain | e7254ea62df5dc2c6eb6c60d0437d7152bb9649a | [
"BSD-3-Clause"
] | null | null | null | gerrychain/constraints/validity.py | rwbogl/GerryChain | e7254ea62df5dc2c6eb6c60d0437d7152bb9649a | [
"BSD-3-Clause"
] | null | null | null | from ..updaters import CountySplit
from .bounds import Bounds
class Validator:
"""A single callable for checking that a partition passes a collection of
constraints. Intended to be passed as the ``is_valid`` parameter when
instantiating :class:`~gerrychain.MarkovChain`.
This class is meant to be call... | 35.818841 | 92 | 0.688448 |
4a1f6680436c6800c973e4e6ef0624168968d7bf | 2,518 | py | Python | schema-test.py | azaroth42/iiif-v3-validator | 7a8e763bf7f2c033e647948c66757de148511160 | [
"Apache-2.0"
] | 2 | 2018-06-21T15:30:57.000Z | 2018-12-20T16:01:50.000Z | schema-test.py | azaroth42/iiif-v3-validator | 7a8e763bf7f2c033e647948c66757de148511160 | [
"Apache-2.0"
] | 1 | 2018-12-07T14:00:17.000Z | 2018-12-07T14:00:17.000Z | schema-test.py | azaroth42/iiif-v3-validator | 7a8e763bf7f2c033e647948c66757de148511160 | [
"Apache-2.0"
] | null | null | null |
import json
import jsonschema
import os
from jsonschema import validate, Draft6Validator
from jsonschema.exceptions import ValidationError
import json
from iiif_prezi_upgrader import Upgrader
fh = file('schema/Manifest.json')
schema = json.load(fh)
fh.close()
v = Draft6Validator(schema)
fh = file('data/spec-exampl... | 20.639344 | 59 | 0.650913 |
4a1f679455c0bb1778d5821d9e0f93bd58a15af6 | 1,803 | py | Python | tests/tests/test_docker_inspect.py | housewares/agent | ba54bf145038e7fec723a44299e85869b8600ce1 | [
"Apache-2.0"
] | null | null | null | tests/tests/test_docker_inspect.py | housewares/agent | ba54bf145038e7fec723a44299e85869b8600ce1 | [
"Apache-2.0"
] | null | null | null | tests/tests/test_docker_inspect.py | housewares/agent | ba54bf145038e7fec723a44299e85869b8600ce1 | [
"Apache-2.0"
] | 2 | 2021-01-10T13:27:22.000Z | 2021-01-11T14:19:50.000Z | from common import delete_container, docker_client, event_test
def test_inspect_by_name(agent):
delete_container('/inspect_test')
client = docker_client()
c = client.create_container('ibuildthecloud/helloworld',
name='inspect_test')
inspect = docker_client().inspect_co... | 32.196429 | 76 | 0.647255 |
4a1f686c01e29b744fed561a9edeccdae868a21a | 9,340 | py | Python | healthyways/vbz_training.py | frederiksemmel/VersusVirus-HealthyWays | 056b26430e3aca395f1e536b4dd74ddc5edc6567 | [
"MIT"
] | 1 | 2020-06-03T07:31:37.000Z | 2020-06-03T07:31:37.000Z | healthyways/vbz_training.py | frederiksemmel/VersusVirus-HealthyWays | 056b26430e3aca395f1e536b4dd74ddc5edc6567 | [
"MIT"
] | null | null | null | healthyways/vbz_training.py | frederiksemmel/VersusVirus-HealthyWays | 056b26430e3aca395f1e536b4dd74ddc5edc6567 | [
"MIT"
] | null | null | null | from datetime import datetime
import numpy as np
import pandas as pd
from sklearn.kernel_ridge import KernelRidge
from sklearn.linear_model import Ridge, LinearRegression
from sklearn.preprocessing import OneHotEncoder, PolynomialFeatures, normalize
from sklearn.model_selection import train_test_split
from tensorflow.... | 32.430556 | 130 | 0.625161 |
4a1f6a07eeabdd51bdc9e06142e7fcf9db17a135 | 3,861 | py | Python | wcit2bib/get_raw_tex.py | lucascr91/word2tex | a1dcba237aec276e5e024740f6c458715822b234 | [
"MIT"
] | null | null | null | wcit2bib/get_raw_tex.py | lucascr91/word2tex | a1dcba237aec276e5e024740f6c458715822b234 | [
"MIT"
] | null | null | null | wcit2bib/get_raw_tex.py | lucascr91/word2tex | a1dcba237aec276e5e024740f6c458715822b234 | [
"MIT"
] | null | null | null | print("Creating a TEX file from the word document")
import docx
import sys
import os
import pandas as pd
import numpy as np
from tqdm import tqdm
from docx.enum.text import WD_ALIGN_PARAGRAPH
try:
doc = docx.Document(sys.argv[1])
except:
raise ValueError("Please, add word document")
try:
new_path=sys.arg... | 36.771429 | 182 | 0.650091 |
4a1f6a25595d5a8b4ee49ea8fb0404097e9a3fa4 | 4,152 | py | Python | testproject/fiber_test/tests/test_views/test_fibertemplateview.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 143 | 2015-01-06T01:15:22.000Z | 2017-07-08T04:10:08.000Z | testproject/fiber_test/tests/test_views/test_fibertemplateview.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 44 | 2015-01-22T14:21:32.000Z | 2017-05-31T16:59:23.000Z | testproject/fiber_test/tests/test_views/test_fibertemplateview.py | bsimons/django-fiber | 0f4b03217a4aeba6b48908825507fbe8c5732c8d | [
"Apache-2.0"
] | 53 | 2015-01-21T21:48:49.000Z | 2017-06-12T07:33:13.000Z | from django.contrib.auth.models import User
from django.test import TestCase, RequestFactory
from django.test.utils import override_settings
from fiber.models import Page, ContentItem, PageContentItem
from fiber.views import FiberTemplateView
class TestFiberTemplateView(TestCase):
def setUp(self):
self.f... | 43.705263 | 126 | 0.688825 |
4a1f6abd8e981bf18a4247a3576c893419408672 | 297 | py | Python | samples/advanced/sources/route.py | bernardocouto/bottle-postgresql | e1b5a9d09565ebb21f59ae0d41ea2f67319ee53f | [
"MIT"
] | 10 | 2021-03-23T19:49:05.000Z | 2022-01-04T18:15:32.000Z | samples/advanced/sources/route.py | bernardocouto/bottle-postgresql | e1b5a9d09565ebb21f59ae0d41ea2f67319ee53f | [
"MIT"
] | null | null | null | samples/advanced/sources/route.py | bernardocouto/bottle-postgresql | e1b5a9d09565ebb21f59ae0d41ea2f67319ee53f | [
"MIT"
] | null | null | null | from bottle import Bottle
from samples.advanced.sources.log import get_logger
from samples.advanced.sources.resources.entity.resource import entity_resource
logger = get_logger(__name__)
route = Bottle()
resources = [
entity_resource
]
for resource in resources:
route.merge(resource)
| 19.8 | 78 | 0.794613 |
4a1f6c20ff0c65002ae690e35c8d998db183a4f9 | 1,660 | py | Python | notion_extensions/base/props/block/link_to_page.py | yuta0306/notion-extensions | 8a26f8c2abeef03a55c4d433439ce35ae5728a75 | [
"MIT"
] | 1 | 2022-01-12T15:53:43.000Z | 2022-01-12T15:53:43.000Z | notion_extensions/base/props/block/link_to_page.py | yuta0306/notion-extensions | 8a26f8c2abeef03a55c4d433439ce35ae5728a75 | [
"MIT"
] | 1 | 2022-03-24T01:38:42.000Z | 2022-03-24T01:38:42.000Z | notion_extensions/base/props/block/link_to_page.py | yuta0306/notion-extensions | 8a26f8c2abeef03a55c4d433439ce35ae5728a75 | [
"MIT"
] | null | null | null | import sys
from typing import Dict, Union
if sys.version_info >= (3, 8): # "from typing" in Python 3.9 and earlier
from typing import Literal
else:
from typing_extensions import Literal
from .block import Block
from ...utils import parse_id
__all__ = [
"LinkToPage",
]
class LinkToPage(Block):
"""
... | 23.714286 | 85 | 0.565663 |
4a1f6ca7dd16d24e2ac94203d7e79e70f907f754 | 2,256 | py | Python | src/VideoToAudioConverter.py | NagabhushanSN95/VideoToAudioConverter | 964459047b96a71db2078288c71e45a43eaefa27 | [
"Apache-2.0"
] | null | null | null | src/VideoToAudioConverter.py | NagabhushanSN95/VideoToAudioConverter | 964459047b96a71db2078288c71e45a43eaefa27 | [
"Apache-2.0"
] | null | null | null | src/VideoToAudioConverter.py | NagabhushanSN95/VideoToAudioConverter | 964459047b96a71db2078288c71e45a43eaefa27 | [
"Apache-2.0"
] | null | null | null | # Shree KRISHNAya Namaha
# Converts videos to mp3 files and saved them. Optionally adds meta data to the audio files.
# Author: Nagabhushan S N
# Last Modified: 06/03/22
import eyed3
import os
import time
import datetime
import traceback
from pathlib import Path
from tqdm import tqdm
this_filepath = Path(__file__)
t... | 33.671642 | 92 | 0.638741 |
4a1f6d8b313af7b94e9b2bf5801fd9c7f62535ac | 2,311 | py | Python | tensorflow/models/image/cifar10/cifar10_input_test.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | 680 | 2016-12-03T14:38:28.000Z | 2022-02-16T04:06:45.000Z | tensorflow/models/image/cifar10/cifar10_input_test.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | 38 | 2016-11-17T08:43:51.000Z | 2019-11-12T12:27:04.000Z | tensorflow/models/image/cifar10/cifar10_input_test.py | danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | [
"Apache-2.0"
] | 250 | 2016-12-05T10:37:17.000Z | 2022-03-18T21:26:55.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.492537 | 80 | 0.648204 |
4a1f6db005ec53654d0dc60c6f5f5be185a5fa0e | 664 | py | Python | Data/lambda/bin/rst2xml.py | Diegod96/AWS-Reddit-Application | 39830514ed02c88119ce4f6ff70b4fbb084db3ef | [
"MIT"
] | null | null | null | Data/lambda/bin/rst2xml.py | Diegod96/AWS-Reddit-Application | 39830514ed02c88119ce4f6ff70b4fbb084db3ef | [
"MIT"
] | null | null | null | Data/lambda/bin/rst2xml.py | Diegod96/AWS-Reddit-Application | 39830514ed02c88119ce4f6ff70b4fbb084db3ef | [
"MIT"
] | null | null | null | #!C:\Users\diego\development\AWS-Reddit-Application\Data\venv\Scripts\python.exe
# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Docutils XML.
... | 27.666667 | 80 | 0.746988 |
4a1f6e4e20a11ee6e4af4880705c42205b9607e3 | 5,733 | py | Python | tf_tpu_models/official/detection/dataloader/input_reader.py | hrsma2i/kaggle-imaterialist2020-model | 7822b52f743afb3367a4448a303ac1ee0f869e1d | [
"Apache-2.0"
] | 2 | 2021-07-06T04:41:53.000Z | 2022-03-11T00:22:18.000Z | tf_tpu_models/official/detection/dataloader/input_reader.py | hrsma2i/kaggle-imaterialist2020-model | 7822b52f743afb3367a4448a303ac1ee0f869e1d | [
"Apache-2.0"
] | 7 | 2021-09-01T05:29:35.000Z | 2022-01-17T10:49:59.000Z | tf_tpu_models/official/detection/dataloader/input_reader.py | hrsma2i/kaggle-imaterialist2020-model | 7822b52f743afb3367a4448a303ac1ee0f869e1d | [
"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.056604 | 81 | 0.651317 |
4a1f709edf528d3c85da18b3b4f20c4bdf130ea7 | 12,942 | py | Python | beaver/utils.py | Affirm/python-beaver | 5da2eba14c8420141f16f2728e67c0704b56f2a5 | [
"MIT"
] | null | null | null | beaver/utils.py | Affirm/python-beaver | 5da2eba14c8420141f16f2728e67c0704b56f2a5 | [
"MIT"
] | null | null | null | beaver/utils.py | Affirm/python-beaver | 5da2eba14c8420141f16f2728e67c0704b56f2a5 | [
"MIT"
] | 1 | 2018-05-11T19:47:44.000Z | 2018-05-11T19:47:44.000Z | # -*- coding: utf-8 -*-
import argparse
import glob2
import itertools
import logging
import logging.config
from logging.handlers import RotatingFileHandler
import platform
import re
import os
import os.path
import sys
import yaml
import json
import beaver
MAGIC_BRACKETS = re.compile('({([^}]+)})')
IS_GZIPPED_FILE = r... | 37.29683 | 130 | 0.559496 |
4a1f71afb360ebc6b8d8c71bfc6a1d37cf74d4b9 | 3,431 | py | Python | test/page_form.py | Dibyadarshan/mezzanine | 6bc046f086c70c1f6bda3458eafbbe2da54df0c8 | [
"BSD-2-Clause"
] | null | null | null | test/page_form.py | Dibyadarshan/mezzanine | 6bc046f086c70c1f6bda3458eafbbe2da54df0c8 | [
"BSD-2-Clause"
] | null | null | null | test/page_form.py | Dibyadarshan/mezzanine | 6bc046f086c70c1f6bda3458eafbbe2da54df0c8 | [
"BSD-2-Clause"
] | null | null | null | from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
driver = webdr... | 49.014286 | 119 | 0.767706 |
4a1f73fb1501c63fea7314a403172eda52abaf46 | 6,694 | py | Python | regexbot.py | davidxiao93/regexbot | e9821f9c7e719214ac811fbef1d0b7b28dab7ab1 | [
"MIT"
] | null | null | null | regexbot.py | davidxiao93/regexbot | e9821f9c7e719214ac811fbef1d0b7b28dab7ab1 | [
"MIT"
] | null | null | null | regexbot.py | davidxiao93/regexbot | e9821f9c7e719214ac811fbef1d0b7b28dab7ab1 | [
"MIT"
] | null | null | null |
import time
import re
from slackclient import SlackClient
from sheetclient import SheetClient
import pprint
pp = pprint.PrettyPrinter(indent=4)
import random
RTM_READ_DELAY = 0.1 # 0.1 second delay between reading from RTM
MAX_LENGTH = 2048
SNIPPET_CHAR_THRESHOLD = 512
SNIPPET_LINE_THRESHOLD = 8
RETRY_SENDS = 10
cl... | 41.320988 | 141 | 0.569764 |
4a1f75b8394cc3784997c0c9de5174039d2953b3 | 17,728 | py | Python | code/learn_vs_true_loss_scatter.py | cpoptic/hypernet-hypertraining | 3a4fd37e021921d5426723d0782a9cb746f6e700 | [
"MIT"
] | 19 | 2018-03-23T22:33:56.000Z | 2021-05-12T05:15:44.000Z | code/learn_vs_true_loss_scatter.py | cpoptic/hypernet-hypertraining | 3a4fd37e021921d5426723d0782a9cb746f6e700 | [
"MIT"
] | 2 | 2021-01-26T23:51:08.000Z | 2021-01-27T02:31:44.000Z | code/learn_vs_true_loss_scatter.py | cpoptic/hypernet-hypertraining | 3a4fd37e021921d5426723d0782a9cb746f6e700 | [
"MIT"
] | 7 | 2018-08-19T13:54:57.000Z | 2021-05-04T07:52:08.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
"""Run the main body of this code to execute experiments."""
from __future__ import absolute_import
from __future__ import print_function
import os
import os.path
import autograd.numpy as np
import autograd.numpy.random as npr
import pickle
from autograd import grad
from autog... | 51.685131 | 124 | 0.688008 |
4a1f77c4d7d09adc1312e8c4409ac7501b2279a5 | 1,435 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/boot_diagnostics.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 37.763158 | 79 | 0.6223 |
4a1f7885f54cfe81004a9025139e118ef6a92314 | 1,167 | py | Python | app/flags.py | CircuitsBots/Starboard-2 | 0c5510f210a387d1173ff20743648a47e4110780 | [
"MIT"
] | 16 | 2021-01-19T19:12:00.000Z | 2021-12-21T12:00:04.000Z | app/flags.py | Davi-the-Mudkip/Starboard-2 | 4de3c689ffef007e4f4a279251d107d890b69b15 | [
"MIT"
] | 15 | 2021-04-02T16:58:48.000Z | 2022-03-28T06:09:49.000Z | app/flags.py | Davi-the-Mudkip/Starboard-2 | 4de3c689ffef007e4f4a279251d107d890b69b15 | [
"MIT"
] | 13 | 2021-01-21T14:26:00.000Z | 2021-09-29T18:55:17.000Z | from discord.ext import flags
from discord.ext.flags import * # noqa F401
class FlagCommand(flags.FlagCommand):
def __init__(self, *args, **kwargs):
self._help = kwargs.pop("help", None)
super().__init__(*args, **kwargs)
@property
def help(self):
return str(self._help)
@help... | 23.816327 | 47 | 0.615253 |
4a1f7967e8cf27cd91aace9b50d012b030b4b08b | 4,980 | py | Python | mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py | fcakyon/sahi-benchmark | 8ffa43afb23adb914f2ba8b4bb45dd9ce1284c42 | [
"MIT"
] | 7 | 2021-12-20T05:22:56.000Z | 2022-03-28T01:57:10.000Z | mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py | fcakyon/sahi-benchmark | 8ffa43afb23adb914f2ba8b4bb45dd9ce1284c42 | [
"MIT"
] | 1 | 2022-03-19T14:52:38.000Z | 2022-03-21T13:19:05.000Z | mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py | fcakyon/sahi-benchmark | 8ffa43afb23adb914f2ba8b4bb45dd9ce1284c42 | [
"MIT"
] | 3 | 2022-02-23T12:26:18.000Z | 2022-03-27T14:06:58.000Z | _base_ = ["../vfnet/vfnet_r50_fpn_1x_coco.py"]
EXP_NAME = "vfnet_crop_300_500_cls_60"
DATA_ROOT = "data/xview/"
BATCH_MULTIPLIER = 8
LR_MULTIPLIER = 1
EVAL_INTERVAL = 3
NUM_CLASSES = 60
DATASET_REPEAT = 50
TAGS = ["vfnet", "crop=300_500", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"]
CLASSES = (
... | 27.213115 | 133 | 0.603213 |
4a1f7a353c385041bf0d6a2fd6635d00bb480730 | 5,625 | py | Python | TFT_Gizmo_Snowglobe/snowglobe_fancy/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | TFT_Gizmo_Snowglobe/snowglobe_fancy/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | TFT_Gizmo_Snowglobe/snowglobe_fancy/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2019 Carter Nelson for Adafruit Industries
#
# SPDX-License-Identifier: MIT
from random import randrange
import board
import busio
import displayio
from adafruit_gizmo import tft_gizmo
import adafruit_imageload
import adafruit_lis3dh
#---| User Config |---------------
BACKGROUND = "/blinka_d... | 37.251656 | 85 | 0.610311 |
4a1f7a703480261ceb5adca7af5d305bb3272907 | 28,804 | py | Python | code/MultiKE_model.py | DuanXu-97/MultiKE | a210a0c638ef4d91562bf098acb7153028dd74fc | [
"MIT"
] | 1 | 2020-06-23T07:32:31.000Z | 2020-06-23T07:32:31.000Z | code/MultiKE_model.py | DuanXu-97/MultiKE | a210a0c638ef4d91562bf098acb7153028dd74fc | [
"MIT"
] | null | null | null | code/MultiKE_model.py | DuanXu-97/MultiKE | a210a0c638ef4d91562bf098acb7153028dd74fc | [
"MIT"
] | null | null | null | import math
import random
import multiprocessing as mp
import base.batch as bat
from utils import *
from base.initializers import xavier_init
from attr_batch import generate_attribute_triple_batch_queue
from utils import save_embeddings
from losses import relation_logistic_loss, attribute_logistic_loss, relation_logi... | 60.767932 | 125 | 0.60259 |
4a1f7a78b6e4b2cd4817d5369393e5bea5682eb1 | 138 | py | Python | control/simulation/state.py | oholsen/hagedag | 4e2881fa1f636228e5cbe76e61fb4b224f0b1e4a | [
"Apache-2.0"
] | null | null | null | control/simulation/state.py | oholsen/hagedag | 4e2881fa1f636228e5cbe76e61fb4b224f0b1e4a | [
"Apache-2.0"
] | null | null | null | control/simulation/state.py | oholsen/hagedag | 4e2881fa1f636228e5cbe76e61fb4b224f0b1e4a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
@dataclass
class State:
x: float
y: float
theta: float
speed: float
omega: float
| 11.5 | 33 | 0.65942 |
4a1f7aef028afe9632f01dede332782f2024cd7e | 5,427 | py | Python | zscomm/vary_play_param_experiment.py | DylanCope/zero-shot-comm | ff92981392ec94ad8d6873ce1e8be19add9c6627 | [
"MIT"
] | null | null | null | zscomm/vary_play_param_experiment.py | DylanCope/zero-shot-comm | ff92981392ec94ad8d6873ce1e8be19add9c6627 | [
"MIT"
] | null | null | null | zscomm/vary_play_param_experiment.py | DylanCope/zero-shot-comm | ff92981392ec94ad8d6873ce1e8be19add9c6627 | [
"MIT"
] | 1 | 2021-08-31T20:16:49.000Z | 2021-08-31T20:16:49.000Z | from pathlib import Path
import json
import tensorflow as tf
from .loss import *
from .meta_experiment import MetaExperiment
class VaryPlayParamExperiment(MetaExperiment):
def __init__(self,
param_vals = None,
param_name = 'p_mutate',
save_location=None, ... | 35.940397 | 76 | 0.544315 |
4a1f7b2be503079581a7bb5e4ff04a706223d3e1 | 13,937 | py | Python | frappe/auth.py | puspita-sari/frappe | 68d28442c23b55350c2c28abaada47f4da64a2e8 | [
"MIT"
] | null | null | null | frappe/auth.py | puspita-sari/frappe | 68d28442c23b55350c2c28abaada47f4da64a2e8 | [
"MIT"
] | null | null | null | frappe/auth.py | puspita-sari/frappe | 68d28442c23b55350c2c28abaada47f4da64a2e8 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import datetime
from frappe import _
import frappe
import frappe.database
import frappe.utils
from frappe.utils import cint, flt, get_datetime, datetime, date_diff, today
import ... | 33.26253 | 129 | 0.747291 |
4a1f7c0f89b6e45b67a8c013c2ed04ebe589bcbd | 1,724 | py | Python | frontend/ajaxform.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | null | null | null | frontend/ajaxform.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | 3 | 2021-03-19T23:45:25.000Z | 2022-03-21T22:21:12.000Z | frontend/ajaxform.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | null | null | null | '''
This module provides back-end Django utilities that make it
easier to interact with the front-end ajaxform component.
This module is tightly coupled to ajaxform.js.
'''
from django.core.urlresolvers import reverse
from django.http import JsonResponse, HttpResponse, HttpResponseRedirect
from django.tem... | 33.153846 | 73 | 0.701856 |
4a1f7cac2a0de6d38254e4a7c29292fb5c855dcf | 19,757 | py | Python | tests/tests_twobody/test_perturbations.py | zkl2/poliastro | 360817d2e74e15306c02aa05d80d4861cccf1cc2 | [
"MIT"
] | null | null | null | tests/tests_twobody/test_perturbations.py | zkl2/poliastro | 360817d2e74e15306c02aa05d80d4861cccf1cc2 | [
"MIT"
] | null | null | null | tests/tests_twobody/test_perturbations.py | zkl2/poliastro | 360817d2e74e15306c02aa05d80d4861cccf1cc2 | [
"MIT"
] | null | null | null | import functools
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import Angle, solar_system_ephemeris
from astropy.tests.helper import assert_quantity_allclose
from astropy.time import Time
from numpy.linalg import norm
from poliastro.bodies import Earth, Moon, Sun
from polias... | 28.842336 | 116 | 0.531305 |
4a1f7dfda3ee440f98ffc7df92580b3f29f36b86 | 2,933 | py | Python | Great Clips (US)/great_clips_store_urls.py | CAVIND46016/Locational-Data-Scraping | 234cee509a0d52fb1b2feebdd2400ea451fa7357 | [
"MIT"
] | 3 | 2020-04-18T03:13:52.000Z | 2020-06-18T03:55:52.000Z | Great Clips (US)/great_clips_store_urls.py | CAVIND46016/Locational-Data-Scraping | 234cee509a0d52fb1b2feebdd2400ea451fa7357 | [
"MIT"
] | null | null | null | Great Clips (US)/great_clips_store_urls.py | CAVIND46016/Locational-Data-Scraping | 234cee509a0d52fb1b2feebdd2400ea451fa7357 | [
"MIT"
] | null | null | null | import pickle
import json
from http.client import RemoteDisconnected
import time
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait, Select
from selenium.webdriver.support import expected_cond... | 36.209877 | 110 | 0.662121 |
4a1f7e9b68ad14590b609ce183d50263a7e99b63 | 858 | py | Python | pyroomacoustics/tests/test_issue_87.py | Womac/pyroomacoustics | af452ea42686eb12df34dd7ffdb0c833b64b27f9 | [
"MIT"
] | 915 | 2016-02-08T08:10:37.000Z | 2022-03-31T17:33:21.000Z | pyroomacoustics/tests/test_issue_87.py | zha80052/pyroomacoustics | 15a86425b68969b2109860ca3614f0cbf92b1bd0 | [
"MIT"
] | 212 | 2017-02-06T13:06:30.000Z | 2022-03-28T14:32:15.000Z | pyroomacoustics/tests/test_issue_87.py | zha80052/pyroomacoustics | 15a86425b68969b2109860ca3614f0cbf92b1bd0 | [
"MIT"
] | 513 | 2016-11-15T05:41:49.000Z | 2022-03-29T15:41:09.000Z | import unittest
import numpy as np
import pyroomacoustics as pra
def make_filters(n_mics):
# Location of original source
azimuth = 61.0 / 180.0 * np.pi # 60 degrees
# algorithms parameters
c = 343.0
fs = 16000
# circular microphone array, 6 mics, radius 15 cm
R = pra.circular_2D_array(... | 22.578947 | 78 | 0.666667 |
4a1f7ec4e8f3f15edbe79d334cda444ec27185bd | 3,384 | py | Python | feeds/migrations/0001_initial.py | StevenMonty/django-feed-reader | 95731a4178f028f6539c55dce77928a377a9cdd9 | [
"MIT"
] | 21 | 2019-06-21T09:17:32.000Z | 2022-03-04T06:55:36.000Z | feeds/migrations/0001_initial.py | StevenMonty/django-feed-reader | 95731a4178f028f6539c55dce77928a377a9cdd9 | [
"MIT"
] | 7 | 2020-09-07T12:21:55.000Z | 2020-10-27T17:39:58.000Z | feeds/migrations/0001_initial.py | StevenMonty/django-feed-reader | 95731a4178f028f6539c55dce77928a377a9cdd9 | [
"MIT"
] | 15 | 2019-09-01T03:58:17.000Z | 2022-01-16T05:25:40.000Z | # Generated by Django 2.2.1 on 2019-06-02 17:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Source',
fields=[
... | 49.043478 | 114 | 0.573877 |
4a1f7f5dc9900ca0fbf2c450e14dc5e839febe39 | 111,333 | py | Python | python/paddle/tensor/manipulation.py | wwjiang007/Paddle | bdeb479c0edd1ab9bb5f696df3573dad63d67885 | [
"Apache-2.0"
] | 1 | 2022-02-07T05:37:49.000Z | 2022-02-07T05:37:49.000Z | python/paddle/tensor/manipulation.py | wwjiang007/Paddle | bdeb479c0edd1ab9bb5f696df3573dad63d67885 | [
"Apache-2.0"
] | null | null | null | python/paddle/tensor/manipulation.py | wwjiang007/Paddle | bdeb479c0edd1ab9bb5f696df3573dad63d67885 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.010584 | 457 | 0.565825 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.