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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797bd185baf4c80493c431cd0113d0f235fc5b9b | 12,994 | py | Python | google/cloud/automl_v1/types/image.py | aribray/python-automl | 6674115ead995fe258cc0908de8bd2cb686131cc | [
"Apache-2.0"
] | null | null | null | google/cloud/automl_v1/types/image.py | aribray/python-automl | 6674115ead995fe258cc0908de8bd2cb686131cc | [
"Apache-2.0"
] | null | null | null | google/cloud/automl_v1/types/image.py | aribray/python-automl | 6674115ead995fe258cc0908de8bd2cb686131cc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | 49.219697 | 98 | 0.64145 |
797bd1a40255df393adc5eb49ab34285ac236254 | 726 | py | Python | getGameServer.py | NikTink/DZquery | fb1672c8c3b12d68d306abf9e1f41241c17f1af5 | [
"Unlicense"
] | null | null | null | getGameServer.py | NikTink/DZquery | fb1672c8c3b12d68d306abf9e1f41241c17f1af5 | [
"Unlicense"
] | 1 | 2019-07-08T15:05:57.000Z | 2019-07-08T15:05:57.000Z | getGameServer.py | NicTink/DZquery | fb1672c8c3b12d68d306abf9e1f41241c17f1af5 | [
"Unlicense"
] | null | null | null | #responsible for sniffing the DayZ client UDP-traffic at port 2304
from scapy.all import *
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
def getServerIp():
try:
packet=sniff(filter='udp and port 2304', count=1)
dstIP=packet[0][IP].dst
dstPORT=packet[0][UDP].dport
return([... | 24.2 | 84 | 0.657025 |
797bd450d7a4ecdf68f10ea18821d8f841bea2bb | 15,549 | py | Python | corehq/apps/api/resources/v0_5.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/api/resources/v0_5.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/api/resources/v0_5.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | from tastypie import http
from tastypie.authorization import ReadOnlyAuthorization
from tastypie.exceptions import BadRequest, ImmediateHttpResponse
from tastypie.paginator import Paginator
from tastypie.resources import convert_post_to_patch, ModelResource
from tastypie.utils import dict_strip_unicode_keys
from colle... | 42.953039 | 132 | 0.609235 |
797bd4c5c6c84e383421250f419d7a636c2800b0 | 17,533 | py | Python | Tools/ecl_ekf/plotting/pdf_report.py | tiralonghipol/Firmware | 1d562aaf4a0f7351d64fa6c5ec3372d9cb7755c8 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T00:07:16.000Z | 2020-09-25T18:51:27.000Z | Tools/ecl_ekf/plotting/pdf_report.py | sherlocksho/Firmware | 1d562aaf4a0f7351d64fa6c5ec3372d9cb7755c8 | [
"BSD-3-Clause"
] | 3 | 2020-09-11T11:55:22.000Z | 2020-09-29T08:34:43.000Z | Tools/ecl_ekf/plotting/pdf_report.py | sherlocksho/Firmware | 1d562aaf4a0f7351d64fa6c5ec3372d9cb7755c8 | [
"BSD-3-Clause"
] | 1 | 2020-10-17T15:23:14.000Z | 2020-10-17T15:23:14.000Z | #! /usr/bin/env python3
"""
function collection for plotting
"""
# matplotlib don't use Xwindows backend (must be before pyplot import)
import matplotlib
matplotlib.use('Agg')
import numpy as np
from matplotlib.backends.backend_pdf import PdfPages
from pyulog import ULog
from analysis.post_processing import magnetic... | 48.567867 | 114 | 0.602464 |
797bd5ee6e1ff7455ce861e3c5ee967ed8a66805 | 4,037 | py | Python | ucscentralsdk/mometa/sysfile/SysfileMutationFsmStage.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/sysfile/SysfileMutationFsmStage.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/sysfile/SysfileMutationFsmStage.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for SysfileMutationFsmStage ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class SysfileMutationFsmStageConsts():
LAST_UPDATE_TIME_ = ... | 53.826667 | 267 | 0.652712 |
797bd7211f51ee7e45ef03e818b88e2db849a3b4 | 451 | py | Python | scons_gbd_docs/Gbd/Docs/Doxygen/__init__.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | scons_gbd_docs/Gbd/Docs/Doxygen/__init__.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | scons_gbd_docs/Gbd/Docs/Doxygen/__init__.py | ASoftTech/Scons.Gbd.Docs | 4d9fb7585d9565f57306774efb4342fe9b8822f2 | [
"MIT"
] | null | null | null | """
__init__.py
If the user requests "Gbd.Docs.Doxygen"
then this will call this script as a tool
In which case we include all the builders
"""
from . import Doxygen, DoxygenDefaultTemplate
def generate(env):
Doxygen.generate(env)
DoxygenDefaultTemplate.generate(env)
def exists(env):
if... | 20.5 | 46 | 0.694013 |
797bd74adf3857d02aa054b2dbee89f0328f27a8 | 8,463 | py | Python | sdk/python/pulumi_openstack/sharedfilesystem/share_access.py | ederst/pulumi-openstack | e11af3f9ade3bc0de8b3feb9db5a9e86ad5ba989 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_openstack/sharedfilesystem/share_access.py | ederst/pulumi-openstack | e11af3f9ade3bc0de8b3feb9db5a9e86ad5ba989 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-03-11T09:01:32.000Z | 2021-03-11T09:01:32.000Z | sdk/python/pulumi_openstack/sharedfilesystem/share_access.py | ederst/pulumi-openstack | e11af3f9ade3bc0de8b3feb9db5a9e86ad5ba989 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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
from .. import _utilitie... | 45.745946 | 134 | 0.640435 |
797bd74eb4e4c6cb01dfce1b4bc4f07ea75e2651 | 518 | py | Python | powerdns/migrations/0028_auto_20160901_0235.py | mike-johnson-jr/django-powerdns-dnssec | c96973ad1d619e03299fb9f26eb43064a584711b | [
"BSD-2-Clause"
] | 32 | 2015-06-12T12:26:40.000Z | 2021-11-11T13:43:29.000Z | powerdns/migrations/0028_auto_20160901_0235.py | mike-johnson-jr/django-powerdns-dnssec | c96973ad1d619e03299fb9f26eb43064a584711b | [
"BSD-2-Clause"
] | 160 | 2015-07-09T11:53:51.000Z | 2019-10-17T05:21:30.000Z | powerdns/migrations/0028_auto_20160901_0235.py | mike-johnson-jr/django-powerdns-dnssec | c96973ad1d619e03299fb9f26eb43064a584711b | [
"BSD-2-Clause"
] | 20 | 2015-06-29T12:32:47.000Z | 2019-11-21T16:53:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('powerdns', '0027_auto_20160915_0349'),
]
operations = [
migrations.AlterField(
model_name='record',
... | 25.9 | 165 | 0.646718 |
797bd91e622ff33e5df62d8002f7077ba33b05cc | 115 | py | Python | docs/.mocks/cx_Oracle.py | enfold/relstorage | 9fcd526b537cb6537cc2ae33154b63096550f210 | [
"ZPL-2.1"
] | 40 | 2015-10-08T05:35:13.000Z | 2022-03-28T23:50:06.000Z | docs/.mocks/cx_Oracle.py | enfold/relstorage | 9fcd526b537cb6537cc2ae33154b63096550f210 | [
"ZPL-2.1"
] | 364 | 2015-03-23T15:25:42.000Z | 2022-03-17T08:41:34.000Z | docs/.mocks/cx_Oracle.py | enfold/relstorage | 9fcd526b537cb6537cc2ae33154b63096550f210 | [
"ZPL-2.1"
] | 33 | 2015-06-08T23:03:22.000Z | 2022-03-21T08:25:53.000Z | class OperationalError(Exception): pass
class InterfaceError(Exception): pass
class DatabaseError(Exception): pass
| 28.75 | 39 | 0.843478 |
797bd95c0bbf9cfd3bbc00a850e0bf6ebc77f361 | 5,677 | py | Python | reinforcement_learning/crypto_market_regressor/choose_best_15min_data.py | xSakix/AI_playground | 17587583ecfc8fd9e92d9d3f643da6d37ac5cffd | [
"Apache-2.0"
] | 1 | 2022-01-26T01:36:33.000Z | 2022-01-26T01:36:33.000Z | reinforcement_learning/crypto_market_regressor/choose_best_15min_data.py | xSakix/AI_playground | 17587583ecfc8fd9e92d9d3f643da6d37ac5cffd | [
"Apache-2.0"
] | null | null | null | reinforcement_learning/crypto_market_regressor/choose_best_15min_data.py | xSakix/AI_playground | 17587583ecfc8fd9e92d9d3f643da6d37ac5cffd | [
"Apache-2.0"
] | null | null | null | import os
from datetime import datetime
import sys
from reinforcement_learning.crypto_market.util import State
from reinforcement_learning.crypto_market_regressor.crypto_trader_regression_agent import CryptoRegressionAgent
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
np.warnings.filterwarn... | 32.815029 | 114 | 0.62991 |
797bda2d61de4e737d95245487d49e2ab3219253 | 1,622 | py | Python | pulsar/managers/queued_drmaa_xsede.py | bgruening/pulsar | 272812e88606e7e3e4cab2d0a82c9d2e1e693f05 | [
"Apache-2.0"
] | 1 | 2021-05-18T02:27:00.000Z | 2021-05-18T02:27:00.000Z | pulsar/managers/queued_drmaa_xsede.py | bgruening/pulsar | 272812e88606e7e3e4cab2d0a82c9d2e1e693f05 | [
"Apache-2.0"
] | null | null | null | pulsar/managers/queued_drmaa_xsede.py | bgruening/pulsar | 272812e88606e7e3e4cab2d0a82c9d2e1e693f05 | [
"Apache-2.0"
] | null | null | null | from subprocess import check_call, Popen, PIPE, CalledProcessError
from .queued_drmaa import DrmaaQueueManager
import logging
log = logging.getLogger(__name__)
class XsedeDrmaaQueueManager(DrmaaQueueManager):
"""
DRMAA backed queue manager for XSEDE (to run the XSEDE job/user reporting
script after subm... | 32.44 | 119 | 0.635018 |
797bdab910112f45a37a07650d5abfd4f54160f8 | 30,411 | py | Python | data/p102.py | joetache4/ProjectEuler | f101e927d73dbafa11af1b208992bf0d830c88b1 | [
"MIT"
] | null | null | null | data/p102.py | joetache4/ProjectEuler | f101e927d73dbafa11af1b208992bf0d830c88b1 | [
"MIT"
] | null | null | null | data/p102.py | joetache4/ProjectEuler | f101e927d73dbafa11af1b208992bf0d830c88b1 | [
"MIT"
] | null | null | null | def get_data():
return [
(-340,495,-153,-910,835,-947),
(-175,41,-421,-714,574,-645),
(-547,712,-352,579,951,-786),
(419,-864,-83,650,-399,171),
(-429,-89,-357,-930,296,-29),
(-734,-702,823,-745,-684,-62),
(-971,762,925,-776,-663,-157),
(162,570,628,485,-807,-896),
(641,91,-65,700,887,759),
(215,-496,46,-931... | 30.289841 | 33 | 0.571109 |
797bdb448272823a2133c63c9ff2abdce75f1e3c | 2,467 | py | Python | py/scrn.py | sehagler/OrorbiaMikolovReitter2017 | e3717abdf7140b557843d24fef4a0948fedc5216 | [
"Unlicense"
] | null | null | null | py/scrn.py | sehagler/OrorbiaMikolovReitter2017 | e3717abdf7140b557843d24fef4a0948fedc5216 | [
"Unlicense"
] | null | null | null | py/scrn.py | sehagler/OrorbiaMikolovReitter2017 | e3717abdf7140b557843d24fef4a0948fedc5216 | [
"Unlicense"
] | null | null | null | # Delta Recurrent Neural Network (Delta-RNN) Framework
#
# This gives an implementation of the Delta-RNN framework given in Ororbia et al. 2017, arXiv:1703.08864 [cs.CL],
# https://arxiv.org/abs/1703.08864 using Python and Tensorflow.
#
# This code implements a variety of RNN models using the Delta-RNN Framework
#
# S... | 45.685185 | 114 | 0.648156 |
797bdb8471904b25e5da02e3f08099ffa13530e4 | 96,071 | py | Python | Lib/test/test_doctest.py | bukzor/cpython-1 | 7843caeb909bd907e903606414e238db4082315a | [
"PSF-2.0"
] | 1 | 2018-06-04T11:01:23.000Z | 2018-06-04T11:01:23.000Z | Lib/test/test_doctest.py | bukzor/cpython-1 | 7843caeb909bd907e903606414e238db4082315a | [
"PSF-2.0"
] | null | null | null | Lib/test/test_doctest.py | bukzor/cpython-1 | 7843caeb909bd907e903606414e238db4082315a | [
"PSF-2.0"
] | null | null | null | """
Test script for doctest.
"""
from test import support
import doctest
import functools
import os
import sys
import importlib
import unittest
import tempfile
# NOTE: There are some additional tests relating to interaction with
# zipimport in the test_zipimport_support test module.
###########################... | 32.16304 | 117 | 0.550437 |
797bdbd49c9abcd7a58da259d882d6acba36832a | 10,825 | py | Python | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | 1 | 2020-11-21T19:23:51.000Z | 2020-11-21T19:23:51.000Z | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | null | null | null | pytest_inobject/plugin.py | alfredodeza/pytest-inobject | 8ae09e74d9cfcaf84fda9660231a3a02f9643062 | [
"MIT"
] | null | null | null | from difflib import SequenceMatcher, Differ, IS_CHARACTER_JUNK
from difflib import get_close_matches as difflib_close_matches
def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK):
return FullContextDiffer(linejunk, charjunk).compare(a, b)
def get_close_matches(left, right):
if isinstance(right, (str, ... | 36.204013 | 93 | 0.578661 |
797bdc0f7902f50795e25aa1aa0575be41520dbb | 1,207 | py | Python | imageview.py | RKrahl/photo-tools | 0bf0b4405e5cd6e5fcab9a64ac1591ea097dcf27 | [
"Apache-2.0"
] | null | null | null | imageview.py | RKrahl/photo-tools | 0bf0b4405e5cd6e5fcab9a64ac1591ea097dcf27 | [
"Apache-2.0"
] | 46 | 2016-01-03T15:11:18.000Z | 2020-05-09T19:46:03.000Z | imageview.py | RKrahl/photo-tools | 0bf0b4405e5cd6e5fcab9a64ac1591ea097dcf27 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
import sys
import argparse
from PySide import QtGui
import photo.index
import photo.idxfilter
from photo.qt import ImageViewer
argparser = argparse.ArgumentParser()
argparser.add_argument('-d', '--directory', help="image directory", default=".")
argparser.add_argument('--scale', help="scale factor... | 30.948718 | 80 | 0.675228 |
797bdc296d514f040f71d5897174bd77b2ee4254 | 3,755 | py | Python | kmip/tests/unit/services/test_auth.py | vbnmmnbv/PyKMIP | 4617ae528006178c466fe3945a477f568b596940 | [
"Apache-2.0"
] | 12 | 2016-09-14T21:59:10.000Z | 2020-03-11T07:37:25.000Z | kmip/tests/unit/services/test_auth.py | vbnmmnbv/PyKMIP | 4617ae528006178c466fe3945a477f568b596940 | [
"Apache-2.0"
] | null | null | null | kmip/tests/unit/services/test_auth.py | vbnmmnbv/PyKMIP | 4617ae528006178c466fe3945a477f568b596940 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | 30.282258 | 76 | 0.623435 |
797bdc7e3a87cd4352cf8afa22408e278b0fc222 | 560 | py | Python | src/forums/migrations/0004_post_topic.py | earth-emoji/august | 065d4b449a138ead1557293bffcb20cd2db90a41 | [
"BSD-2-Clause"
] | null | null | null | src/forums/migrations/0004_post_topic.py | earth-emoji/august | 065d4b449a138ead1557293bffcb20cd2db90a41 | [
"BSD-2-Clause"
] | 10 | 2021-03-19T10:47:13.000Z | 2022-03-12T00:28:30.000Z | src/forums/migrations/0004_post_topic.py | earth-emoji/august | 065d4b449a138ead1557293bffcb20cd2db90a41 | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 2.2.12 on 2020-05-19 02:43
from django.db import migrations, models
import django.db.models.fields.related
class Migration(migrations.Migration):
dependencies = [
('forums', '0003_auto_20200519_0005'),
]
operations = [
migrations.AddField(
model_name='p... | 26.666667 | 154 | 0.646429 |
797bdcde6545c6056420810bf4dcbbbea37b9a11 | 13,177 | py | Python | lib/spack/external/ruamel/yaml/main.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | lib/spack/external/ruamel/yaml/main.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/external/ruamel/yaml/main.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # coding: utf-8
from __future__ import absolute_import
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.tokens import * # NOQA
from ruamel.yaml.events import * # NOQA
from ruamel.yaml.nodes import * ... | 33.275253 | 91 | 0.644077 |
797bdd889c159e07a3d17cbdd98661475965da4c | 583 | py | Python | pandas/rank-and-sort.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | pandas/rank-and-sort.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | pandas/rank-and-sort.py | LucasHelal/data-science | 9b243be1dea23a521e6ebb49dc358708a9b17dbd | [
"MIT"
] | null | null | null | import numpy as np
from numpy.random import randn
from pandas import Series, DataFrame
import pandas as pd
# Sorting by index
ser1 = Series(range(3), index=['C', 'A', 'B'])
# Now sort_index
ser1.sort_index()
# Can sort a Series by its values
ser1.order()
# Lets see how ranking works
ser2 = Series(randn(10))
# Thi... | 20.103448 | 71 | 0.722127 |
797bdd8c9258e449f37bca093313974d9c9558ae | 144 | py | Python | conversate/__init__.py | radiac/django-conversate | dd302ce30c345c40b5b482b03bf6962a3663eb6e | [
"BSD-3-Clause"
] | 14 | 2015-08-07T16:12:36.000Z | 2022-01-19T13:10:15.000Z | conversate/__init__.py | radiac/django-conversate | dd302ce30c345c40b5b482b03bf6962a3663eb6e | [
"BSD-3-Clause"
] | 2 | 2018-12-23T09:44:59.000Z | 2020-09-13T13:04:38.000Z | conversate/__init__.py | radiac/django-conversate | dd302ce30c345c40b5b482b03bf6962a3663eb6e | [
"BSD-3-Clause"
] | 3 | 2017-11-22T16:41:44.000Z | 2021-12-09T00:40:17.000Z | """
Django Conversate - Persistant chat for Django
"""
__version__ = "0.3.0"
__license__ = "BSD"
__author__ = "Richard Terry"
__credits__ = []
| 16 | 46 | 0.694444 |
797bdebd3726b93dc3559e3de4aa05ccd0147a85 | 2,462 | py | Python | tests/sentry/eventstream/kafka/test_protocol.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/eventstream/kafka/test_protocol.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/eventstream/kafka/test_protocol.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import pytest
import pytz
from datetime import datetime
from sentry.eventstream.kafka.protocol import (
InvalidPayload,
InvalidVersion,
UnexpectedOperation,
get_task_kwargs_for_message,
)
from sentry.utils import json
def test_get_task_kwargs_for_message_invali... | 31.164557 | 98 | 0.701462 |
797be00d5309ded5c4cf66b2d2974cd958acaac2 | 20,135 | py | Python | pydiscord/audit_logs.py | AryamanSrii/PyDiscord | 3366d20e2725672ae7e6b29335119cac1aee76f9 | [
"MIT"
] | null | null | null | pydiscord/audit_logs.py | AryamanSrii/PyDiscord | 3366d20e2725672ae7e6b29335119cac1aee76f9 | [
"MIT"
] | null | null | null | pydiscord/audit_logs.py | AryamanSrii/PyDiscord | 3366d20e2725672ae7e6b29335119cac1aee76f9 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2021 The PyDiscord Developers
Copyright (c) 2015-2021 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitat... | 38.279468 | 141 | 0.62811 |
797be01f988183d8fd1c70ebde63193d5a44943b | 5,537 | py | Python | ghpghx/views.py | NREL/REopt_Lite_API | 7cd3afeb135ef89cb65dde1b305e53fe321b2488 | [
"BSD-3-Clause"
] | 41 | 2020-02-21T08:25:17.000Z | 2022-01-14T23:06:42.000Z | ghpghx/views.py | NREL/reopt_api | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 167 | 2020-02-17T17:26:47.000Z | 2022-01-20T20:36:54.000Z | ghpghx/views.py | NREL/REopt_Lite_API | 7cd3afeb135ef89cb65dde1b305e53fe321b2488 | [
"BSD-3-Clause"
] | 31 | 2020-02-20T00:22:51.000Z | 2021-12-10T05:48:08.000Z | # *********************************************************************************
# REopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions a... | 39.269504 | 138 | 0.687195 |
797be1d553fb63d215211e2b63017103abf00720 | 3,242 | py | Python | tests/test_0315-integerindex.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 2 | 2019-09-12T03:07:23.000Z | 2019-09-27T05:32:07.000Z | tests/test_0315-integerindex.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 1 | 2019-09-26T17:57:45.000Z | 2019-09-26T17:57:45.000Z | tests/test_0315-integerindex.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import pytest # noqa: F401
import numpy as np # noqa: F401
import awkward as ak # noqa: F401
def test_integerindex_null():
a = ak.Array([[0, 1, 2], None, [5, 6], [7]])
b = ak.Array([[0, 1, 2], [3, 4], [5, 6], [7]])
... | 36.426966 | 87 | 0.481801 |
797be20d3e1a0efad3ba66320460d87a01e88226 | 1,540 | py | Python | python/load_fry.py | COMBINE-lab/usefulaf | d7758772f3371dc3221aa9c3d939cf666a88cd77 | [
"BSD-3-Clause"
] | 7 | 2021-07-09T09:09:26.000Z | 2022-03-25T10:54:51.000Z | python/load_fry.py | COMBINE-lab/usefulaf | d7758772f3371dc3221aa9c3d939cf666a88cd77 | [
"BSD-3-Clause"
] | 2 | 2021-05-27T13:43:37.000Z | 2021-07-07T01:18:17.000Z | python/load_fry.py | COMBINE-lab/usefulaf | d7758772f3371dc3221aa9c3d939cf666a88cd77 | [
"BSD-3-Clause"
] | 1 | 2021-05-27T01:06:28.000Z | 2021-05-27T01:06:28.000Z | import scanpy
def load_fry(frydir, which_counts=['S','A'], verbose=False):
import json
import os
import pandas as pd
fpath = os.path.sep.join([frydir, "quant.json"])
if !os.path.exists(fpath):
fpath = os.path.sep.join([frydir, "meta_info.json"])
meta_info = json.load(open(fpath))
... | 34.222222 | 115 | 0.596753 |
797be231b7abf474bc7083365e04c5c19d5e82a2 | 3,391 | py | Python | alipay/aop/api/domain/AlipayOpenMiniInnerversionGrayPublishModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 1 | 2022-03-07T06:11:10.000Z | 2022-03-07T06:11:10.000Z | alipay/aop/api/domain/AlipayOpenMiniInnerversionGrayPublishModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenMiniInnerversionGrayPublishModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 1 | 2021-10-05T03:01:09.000Z | 2021-10-05T03:01:09.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenMiniInnerversionGrayPublishModel(object):
def __init__(self):
self._app_origin = None
self._app_version = None
self._bundle_id = None
self._gray_strategy... | 29.232759 | 77 | 0.586553 |
797be283467ef70e911400b35027e87d26b485c5 | 843 | py | Python | python/test.py | araobp/ai-server | cc254c7255c16e9c2de6f23cd7e420c1bf26dfc9 | [
"Apache-2.0"
] | null | null | null | python/test.py | araobp/ai-server | cc254c7255c16e9c2de6f23cd7e420c1bf26dfc9 | [
"Apache-2.0"
] | null | null | null | python/test.py | araobp/ai-server | cc254c7255c16e9c2de6f23cd7e420c1bf26dfc9 | [
"Apache-2.0"
] | null | null | null | import cv2 as cv
import argparse
from detecto.core import Model
parser = argparse.ArgumentParser()
parser.add_argument("file", help="file name", type=str)
args = parser.parse_args()
FILENAME = 'model_weights.pth'
labels = ['outlet', 'mouth', 'earth terminal']
saved_model = Model.load(FILENAME, labels)
def infer(img... | 26.34375 | 85 | 0.635824 |
797be2f1915091229b8a644461b3624383b102d9 | 5,519 | py | Python | contrib/seeds/makeseeds.py | Pirontechv/Bitchain | 7ca7b6a8090f221d6982b09891c19ca5b7ace1d0 | [
"MIT"
] | 1 | 2020-03-13T14:59:52.000Z | 2020-03-13T14:59:52.000Z | contrib/seeds/makeseeds.py | Pirontechv/Bitchain | 7ca7b6a8090f221d6982b09891c19ca5b7ace1d0 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | Pirontechv/Bitchain | 7ca7b6a8090f221d6982b09891c19ca5b7ace1d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.087209 | 186 | 0.567132 |
797be2f90d6d34ff2c14d5c13f8b63947f25c765 | 4,818 | py | Python | pdinstall/pdinstall/snappy.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 76 | 2015-08-24T18:15:20.000Z | 2021-12-06T20:03:19.000Z | pdinstall/pdinstall/snappy.py | leilei1881/Paradrop | 546464e075f8a226b9eb4fe444390dc5c8527ad9 | [
"Apache-2.0"
] | 35 | 2015-07-07T22:27:49.000Z | 2022-03-01T17:13:40.000Z | pdinstall/pdinstall/snappy.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 27 | 2016-02-03T22:00:09.000Z | 2021-09-26T16:59:38.000Z | from __future__ import print_function
import os
import re
import shutil
import subprocess
import urllib
SNAP_FILENAME_RE = re.compile("(\S+)_(\S+)_(\S+).snap")
class Snap(object):
def __init__(self, source):
self.source = source
self.path, self.filename = os.path.split(source)
match = ... | 28.011628 | 79 | 0.613325 |
797be35d789cbe9f6e59ffd0e2faa2c8794aaef0 | 4,905 | py | Python | ibmsecurity/isam/base/date_time.py | charlie-cadmv/ibmsecurity | 53ee96c293806d988af83d4735c350687ad92af1 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/date_time.py | charlie-cadmv/ibmsecurity | 53ee96c293806d988af83d4735c350687ad92af1 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/date_time.py | charlie-cadmv/ibmsecurity | 53ee96c293806d988af83d4735c350687ad92af1 | [
"Apache-2.0"
] | null | null | null | import logging
import ibmsecurity.utilities.tools
logger = logging.getLogger(__name__)
requires_model="Appliance"
def get(isamAppliance, check_mode=False, force=False):
"""
Retrieving the current date and time settings
"""
return isamAppliance.invoke_get("Retrieving the current date and time settings... | 35.80292 | 130 | 0.620591 |
797be3d4c932f4be3b200f02d8f6cf0e2abc28e4 | 592 | py | Python | SimpleScripts/ComputBMI.py | lytranp/Tutoring-PythonIntroduction | 90b02d2ccfcca50d299a54d8cad9c29dd491e1bf | [
"MIT"
] | null | null | null | SimpleScripts/ComputBMI.py | lytranp/Tutoring-PythonIntroduction | 90b02d2ccfcca50d299a54d8cad9c29dd491e1bf | [
"MIT"
] | null | null | null | SimpleScripts/ComputBMI.py | lytranp/Tutoring-PythonIntroduction | 90b02d2ccfcca50d299a54d8cad9c29dd491e1bf | [
"MIT"
] | null | null | null | # Check a person is underweight, normal or obese given your weight and height
import math
weight = eval(input("What is your weight in pounds?: "))
height = eval(input("What is your height in inches?:" ))
KILOGRAMS_PER_POUND = 0.45359237
METERS_PER_INCH = 0.0254
weightInKilograms = weight * KILOGRAMS_PER_POUND
height... | 24.666667 | 77 | 0.709459 |
797be3d7479f1696bb54dfae3a4c3e54249d3f7b | 1,845 | py | Python | abitly/services/link/bp.py | AlexisNava/ABitly-Services | 5fd0edb4ea9ec64b058a616d64965674480023e3 | [
"Apache-2.0"
] | null | null | null | abitly/services/link/bp.py | AlexisNava/ABitly-Services | 5fd0edb4ea9ec64b058a616d64965674480023e3 | [
"Apache-2.0"
] | null | null | null | abitly/services/link/bp.py | AlexisNava/ABitly-Services | 5fd0edb4ea9ec64b058a616d64965674480023e3 | [
"Apache-2.0"
] | null | null | null | """Define the Blueprint for the Link Service"""
from flask import Blueprint, request, jsonify, redirect
from werkzeug.exceptions import BadRequest, InternalServerError, NotFound
from flask_cors import cross_origin
# Controller
from abitly.services.link.controller import (validate_request_body,
... | 29.758065 | 73 | 0.603794 |
797be3e1e7c81e1a8e9e1951bfd51a5422f3a25d | 30,652 | py | Python | google/analytics/data_v1alpha/services/alpha_analytics_data/client.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | google/analytics/data_v1alpha/services/alpha_analytics_data/client.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | google/analytics/data_v1alpha/services/alpha_analytics_data/client.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | 40.923899 | 106 | 0.636989 |
797be3ffec47ba1a1bf1c4b32656b1f7e86dd4d2 | 1,527 | py | Python | tests/levels_plugin_test.py | hyperevo/mee6_python_api | 2fd542fd76b1bb77c71c36723847ab3d9351dcf5 | [
"MIT"
] | 14 | 2020-06-01T19:31:52.000Z | 2022-02-13T21:45:40.000Z | tests/levels_plugin_test.py | hyperevo/mee6_python_api | 2fd542fd76b1bb77c71c36723847ab3d9351dcf5 | [
"MIT"
] | 4 | 2021-05-01T17:46:08.000Z | 2021-11-26T13:01:31.000Z | tests/levels_plugin_test.py | hyperevo/mee6_python_api | 2fd542fd76b1bb77c71c36723847ab3d9351dcf5 | [
"MIT"
] | 9 | 2020-01-08T18:15:23.000Z | 2022-01-22T00:10:47.000Z | from mee6_py_api.api import API
import asyncio
from pprint import pprint
from mee6_py_api.utils.logging import setup_logger
class TestClass:
def __init__(self):
self.mee6API = API()
async def run_tests(self):
#await self.test_get_leaderboard_page()
#await self.test_get_all_leaderboar... | 31.163265 | 105 | 0.729535 |
797be411b3e9ef1a912133df3c98c2f8c8ff6ea5 | 4,273 | py | Python | signup.py | patrickmonaghan56/Bluebox | cbbfc61ac739967a4f390df208e01827e2500d4a | [
"MIT"
] | null | null | null | signup.py | patrickmonaghan56/Bluebox | cbbfc61ac739967a4f390df208e01827e2500d4a | [
"MIT"
] | null | null | null | signup.py | patrickmonaghan56/Bluebox | cbbfc61ac739967a4f390df208e01827e2500d4a | [
"MIT"
] | null | null | null | from tkinter import*
import tkinter as tk
from tkinter import ttk
import sqlite3
#sqlite database
from sqlite3 import Error
#classes for the database
from database_class import Customer
class SignupGUI:
def __init__(self,master,conn):
self.master = master
master.co... | 34.739837 | 105 | 0.612684 |
797be443b0d7c9ad284008946d57a8a690692a36 | 7,551 | py | Python | src/prefect/cli/describe.py | andykawabata/prefect | a11061c19847beeea26616ccaf4b404ad939676b | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-09-04T10:05:55.000Z | 2020-09-04T10:06:32.000Z | src/prefect/cli/describe.py | andykawabata/prefect | a11061c19847beeea26616ccaf4b404ad939676b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/prefect/cli/describe.py | andykawabata/prefect | a11061c19847beeea26616ccaf4b404ad939676b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-09-25T01:24:02.000Z | 2020-09-25T01:24:02.000Z | import json
import click
from prefect.client import Client
from prefect.utilities.graphql import EnumValue, with_args
output_option = click.option(
"--output", "-o", type=click.Choice(["json", "yaml"]), hidden=True, default="json"
)
def display_output(obj, output="json"):
"""Display `obj` in a selected fo... | 29.381323 | 90 | 0.473977 |
797be4ade9a5b5e9927c93f0804c7fd58def1c5d | 640 | py | Python | src/tiden/apps/profiler/__init__.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | 14 | 2020-06-05T09:30:42.000Z | 2022-01-19T00:26:48.000Z | src/tiden/apps/profiler/__init__.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | 6 | 2020-06-09T14:05:21.000Z | 2021-03-18T13:55:15.000Z | src/tiden/apps/profiler/__init__.py | mshonichev/example_pkg | 556a703fe8ea4a7737b8cae9c5d4d19c1397a70b | [
"Apache-2.0"
] | 1 | 2020-06-09T13:53:15.000Z | 2020-06-09T13:53:15.000Z | #!/usr/bin/env python3
#
# Copyright 2017-2020 GridGain Systems.
#
# 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 applicab... | 33.684211 | 74 | 0.765625 |
797be4c55a23fb9fb87149ae1be5c38da1bd2bb3 | 763 | py | Python | configs/distill_max/resnet50_resnet101_gfl_max.py | duzhixing/mmdetection | 839517cb98aa0d1926d9e1eb512d273c8905546a | [
"Apache-2.0"
] | null | null | null | configs/distill_max/resnet50_resnet101_gfl_max.py | duzhixing/mmdetection | 839517cb98aa0d1926d9e1eb512d273c8905546a | [
"Apache-2.0"
] | null | null | null | configs/distill_max/resnet50_resnet101_gfl_max.py | duzhixing/mmdetection | 839517cb98aa0d1926d9e1eb512d273c8905546a | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../gfl/gfl_r50_fpn_1x_coco.py'
]
model = dict(
type='Distilling_Max',
distill = dict(
teacher_cfg='./configs/gfl/gfl_r101_fpn_mstrain_2x_coco.py',
teacher_model_path='/lustre/S/duzhixing//workspace/model/gfl_r101_fpn_mstrain_2x_coco_20200629_200126-dd12f847.pth',
... | 25.433333 | 128 | 0.652687 |
797be4ec3a0e4f72c1527b845026e09ad4e14f74 | 33,545 | py | Python | qa/rpc-tests/fundrawtransaction.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | r3vcoin-project/r3vcoin | 6f72edb47bae7011a08c9e2621c3955d3bb7ed26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def ge... | 43.678385 | 223 | 0.568281 |
797be53560ed5d1e9fdf545b07e69f8ecd0c1d9a | 2,514 | py | Python | venv/Lib/site-packages/pandas/tests/series/test_duplicates.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | 1 | 2021-02-06T21:00:00.000Z | 2021-02-06T21:00:00.000Z | venv/Lib/site-packages/pandas/tests/series/test_duplicates.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/series/test_duplicates.py | Jos33y/student-performance-knn | 4e965434f52dd6a1380904aa257df1edfaebb3c4 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from pandas import Categorical, Series
import pandas._testing as tm
from pandas.core.construction import create_series_with_explicit_dtype
def test_nunique():
# basics.rst doc example
series = Series(np.random.randn(500))
series[20:500] = np.nan
series[10:... | 27.032258 | 86 | 0.581543 |
797be5695aec3aa7e1edda5f4317bb3fd36952d8 | 711 | py | Python | esg/_types.py | mtag-dev/esg | f01e8caef23abb54ebc0db5279cbee3006dffa05 | [
"BSD-3-Clause"
] | 3 | 2022-01-11T19:04:37.000Z | 2022-01-12T16:03:10.000Z | esg/_types.py | mtag-dev/esg | f01e8caef23abb54ebc0db5279cbee3006dffa05 | [
"BSD-3-Clause"
] | 4 | 2022-01-07T11:46:36.000Z | 2022-01-31T00:23:41.000Z | esg/_types.py | mtag-dev/esg | f01e8caef23abb54ebc0db5279cbee3006dffa05 | [
"BSD-3-Clause"
] | 1 | 2022-01-11T19:07:17.000Z | 2022-01-11T19:07:17.000Z | import types
import typing
# WSGI
Environ = typing.MutableMapping[str, typing.Any]
ExcInfo = typing.Tuple[
typing.Type[BaseException], BaseException, typing.Optional[types.TracebackType]
]
StartResponse = typing.Callable[
[str, typing.Iterable[typing.Tuple[str, str]], typing.Optional[ExcInfo]], None
]
WSGIApp ... | 30.913043 | 83 | 0.7609 |
797be62b4d9c8f0dceb0ec94089715d0e0f45589 | 2,519 | py | Python | extensions/utilities/amiibo.py | Cearaj/XJ9 | 7ae81c28ce46969d2115993d0602cb42173971f3 | [
"WTFPL"
] | 7 | 2022-01-26T13:31:17.000Z | 2022-03-11T16:34:07.000Z | extensions/utilities/amiibo.py | Cearaj/XJ9 | 7ae81c28ce46969d2115993d0602cb42173971f3 | [
"WTFPL"
] | null | null | null | extensions/utilities/amiibo.py | Cearaj/XJ9 | 7ae81c28ce46969d2115993d0602cb42173971f3 | [
"WTFPL"
] | 2 | 2022-01-26T06:05:44.000Z | 2022-03-07T18:48:32.000Z | import lightbulb
import hikari
from lightbulb.ext import filament
amiibo_plugin = lightbulb.Plugin("amiibo", "For Nintendo's Amiibo related command")
@amiibo_plugin.command()
@lightbulb.option("query", "The amiibo you want to look up", str, required=True, modifier = lightbulb.commands.OptionModifier.CONSUME_REST)
@li... | 48.442308 | 139 | 0.642318 |
797be6d1371215382df6d0f59d8266ba0a13df54 | 21,757 | py | Python | test/darwinize_header_tests.py | VertNet/bels | 5d3a2424e14d54e620fb45e05b4a9733996510cf | [
"Apache-2.0"
] | 6 | 2020-12-19T06:19:25.000Z | 2022-02-20T18:44:47.000Z | test/darwinize_header_tests.py | VertNet/bels | 5d3a2424e14d54e620fb45e05b4a9733996510cf | [
"Apache-2.0"
] | 26 | 2021-01-07T15:48:10.000Z | 2021-09-27T15:47:24.000Z | test/darwinize_header_tests.py | VertNet/bels | 5d3a2424e14d54e620fb45e05b4a9733996510cf | [
"Apache-2.0"
] | 1 | 2020-12-29T23:12:40.000Z | 2020-12-29T23:12:40.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 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... | 51.802381 | 134 | 0.675323 |
797be8022f147f764d0b0e765b6ea0b9cf1e0cc5 | 638 | py | Python | setup.py | rbrown256/heavenlyglory | 579a674aebc74694153541360d9bb23f3d6922b5 | [
"MIT"
] | 3 | 2018-10-22T21:07:24.000Z | 2022-03-17T10:24:49.000Z | setup.py | rbrown256/heavenlyglory | 579a674aebc74694153541360d9bb23f3d6922b5 | [
"MIT"
] | 4 | 2019-02-13T10:34:21.000Z | 2019-11-29T14:16:08.000Z | setup.py | rbrown256/heavenlyglory | 579a674aebc74694153541360d9bb23f3d6922b5 | [
"MIT"
] | 1 | 2019-11-29T14:07:04.000Z | 2019-11-29T14:07:04.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="heavenlyglory",
version="1.0",
author="LambdaFunction",
author_email="datlambdafunction@gmail.com",
description="Perform a masscan and send the results to nmap",
long_description=long_... | 29 | 65 | 0.677116 |
797be82c591d1d1d7300a15705fbc351c50bfeeb | 4,418 | py | Python | ax/modelbridge/tests/test_convert_metric_names.py | gbmarc1/Ax | 9428fa64a621cf4562c7e2c63881a0ca2fa2780b | [
"MIT"
] | null | null | null | ax/modelbridge/tests/test_convert_metric_names.py | gbmarc1/Ax | 9428fa64a621cf4562c7e2c63881a0ca2fa2780b | [
"MIT"
] | null | null | null | ax/modelbridge/tests/test_convert_metric_names.py | gbmarc1/Ax | 9428fa64a621cf4562c7e2c63881a0ca2fa2780b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from copy import copy
from ax.core.observation import observations_from_data
from ax.modelbridge.transforms.convert_metric_names import (
ConvertMetricNames,
convert_mt_observations,
tconfig_from_mt_experiment,
... | 37.440678 | 87 | 0.650747 |
797be8cecff9d7d954d827ebc1b777071d38dc96 | 1,216 | py | Python | integration-test/484-include-state-pois.py | rinnyB/vector-datasource | 024909ed8245a4ad4a25c908413ba3602de6c335 | [
"MIT"
] | null | null | null | integration-test/484-include-state-pois.py | rinnyB/vector-datasource | 024909ed8245a4ad4a25c908413ba3602de6c335 | [
"MIT"
] | 2 | 2021-03-31T20:22:37.000Z | 2021-12-13T20:50:11.000Z | integration-test/484-include-state-pois.py | rinnyB/vector-datasource | 024909ed8245a4ad4a25c908413ba3602de6c335 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from shapely.wkt import loads as wkt_loads
import dsl
from . import FixtureTest
class IncludeStatePois(FixtureTest):
def test_proposed_stations(self):
# Antioch Station
self.generate_fixtures(dsl.way(3353451464, wkt_loads('POINT (-121.785229642994 37.99688077243528)'), {u... | 55.272727 | 408 | 0.659539 |
797be9e83959d805184e44f05c2d516622de7b7b | 827 | py | Python | next_steps/operations/ml_ops_ds_sdk/lambda/stepfunction_select-recipe_create-solution.py | kamoljan/amazon-personalize-samples | c07042dc14d4094d828bb48f384645378e1d4473 | [
"MIT-0"
] | 442 | 2018-12-04T05:17:30.000Z | 2022-03-30T10:52:31.000Z | next_steps/operations/ml_ops_ds_sdk/lambda/stepfunction_select-recipe_create-solution.py | kamoljan/amazon-personalize-samples | c07042dc14d4094d828bb48f384645378e1d4473 | [
"MIT-0"
] | 66 | 2019-01-03T00:32:33.000Z | 2022-03-31T17:49:23.000Z | next_steps/operations/ml_ops_ds_sdk/lambda/stepfunction_select-recipe_create-solution.py | kamoljan/amazon-personalize-samples | c07042dc14d4094d828bb48f384645378e1d4473 | [
"MIT-0"
] | 311 | 2018-11-29T22:16:09.000Z | 2022-03-28T09:48:09.000Z | import json
import boto3
import base64
personalize = boto3.client('personalize')
personalize_runtime = boto3.client('personalize-runtime')
def lambda_handler(event, context):
list_recipes_response = personalize.list_recipes()
recipe_arn = "arn:aws:personalize:::recipe/aws-hrnn" # aws-hrnn selected for demo p... | 25.84375 | 94 | 0.706167 |
797bec90605a780669c39c717db37d48330e90f1 | 6,943 | py | Python | recipes/msys2/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2021-11-11T03:07:13.000Z | 2021-11-11T03:07:13.000Z | recipes/msys2/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2022-03-09T06:33:41.000Z | 2022-03-09T06:33:41.000Z | recipes/msys2/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | from conans import ConanFile, tools
from conans.errors import ConanInvalidConfiguration, ConanException
import fnmatch
import os
import shutil
import subprocess
try:
import ctypes
from ctypes import wintypes
except ImportError:
pass
except ValueError:
pass
class lock:
def __init__(self):
s... | 37.52973 | 138 | 0.582745 |
797bed5dc50cdf81e50d064bb7ca6adc3b64697d | 3,835 | py | Python | tests/test_vectors.py | poikilos/kivy3 | e3364b39ec61a69aa31bf88e77fadaa148359ec6 | [
"MIT"
] | 20 | 2017-04-21T18:26:53.000Z | 2021-09-29T12:23:51.000Z | tests/test_vectors.py | poikilos/kivy3 | e3364b39ec61a69aa31bf88e77fadaa148359ec6 | [
"MIT"
] | 8 | 2020-04-27T11:12:38.000Z | 2022-03-13T16:31:28.000Z | tests/test_vectors.py | poikilos/kivy3 | e3364b39ec61a69aa31bf88e77fadaa148359ec6 | [
"MIT"
] | 8 | 2017-05-27T15:57:26.000Z | 2021-07-29T10:43:13.000Z |
import unittest
import math
from kivy3 import Vector3, Vector4, Vector2
# good values for vector 3, 4, 12, 84
class Vector3Test(unittest.TestCase):
def test_create(self):
v = Vector3(1, 2, 3)
self.assertEquals(v[0], 1)
self.assertEquals(v[1], 2)
self.assertEquals(v[2], 3)
... | 24.902597 | 63 | 0.496219 |
797bed8de49127026762400bdc95c0546773de83 | 6,503 | py | Python | code/language_model.py | frizman04/language-style-transfer-python3 | 9110eb9d5b72d2926f805ac258915c0f1a369638 | [
"Apache-2.0"
] | 3 | 2018-07-11T07:41:58.000Z | 2022-02-10T09:34:32.000Z | code/language_model.py | frizman04/language-style-transfer-python3 | 9110eb9d5b72d2926f805ac258915c0f1a369638 | [
"Apache-2.0"
] | null | null | null | code/language_model.py | frizman04/language-style-transfer-python3 | 9110eb9d5b72d2926f805ac258915c0f1a369638 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import ipdb
import random
import numpy as np
import tensorflow as tf
from vocab import Vocabulary, build_vocab
from options import load_arguments
from file_io import load_sent
from utils import *
from nn import *
class Model(object):
def __init__(self, args, vocab... | 35.730769 | 86 | 0.526834 |
797bedb8d627bf119121e5066015f1710eeba2b3 | 544 | py | Python | selfbot.py | ExothDE/MASS-DM-selfbot | e0fd2e41a184983d640ea07f43378dcf9bd31918 | [
"Apache-2.0"
] | null | null | null | selfbot.py | ExothDE/MASS-DM-selfbot | e0fd2e41a184983d640ea07f43378dcf9bd31918 | [
"Apache-2.0"
] | null | null | null | selfbot.py | ExothDE/MASS-DM-selfbot | e0fd2e41a184983d640ea07f43378dcf9bd31918 | [
"Apache-2.0"
] | null | null | null | import discord
import asyncio
from discord.ext import commands
token = 'YOUR TOKEN GOES HERE'
client = commands.Bot(command_prefix = '++')
client.remove_command('help')
@client.event
async def on_ready():
print('Online')
@client.command()
async def dmall(ctx, *, message):
for user in list(ctx.guild.memb... | 20.148148 | 57 | 0.617647 |
797beedb2c87face80fb3dfec4c9cd1601e91bcb | 543 | py | Python | build_readme.py | kimvanwyk/document-containers | 237302929c1f24f1b31ab4bfe80f6d71c8a38a31 | [
"MIT"
] | 1 | 2021-08-06T16:15:52.000Z | 2021-08-06T16:15:52.000Z | build_readme.py | kimvanwyk/document-containers | 237302929c1f24f1b31ab4bfe80f6d71c8a38a31 | [
"MIT"
] | null | null | null | build_readme.py | kimvanwyk/document-containers | 237302929c1f24f1b31ab4bfe80f6d71c8a38a31 | [
"MIT"
] | null | null | null | import glob
import os.path
INCLUDE_PREFIX = 'include_'
order = {}
for inc_file in glob.glob(f'*/{INCLUDE_PREFIX}*'):
(repo_dir, i) = inc_file.split('/')
order[int(i[len(INCLUDE_PREFIX):])] = repo_dir
with open('README.md', 'w') as fout:
with open('base.md', 'r') as fin:
fout.write(fin.read())
... | 24.681818 | 69 | 0.563536 |
797bf0813f6412b0af9ee43dc378b0a2c42967f3 | 16,056 | py | Python | tests/test_utils.py | uk-gov-mirror/alphagov.notifications-functional-tests | 899032ff637161c1ab8d058555cb0326ec04b1be | [
"MIT"
] | null | null | null | tests/test_utils.py | uk-gov-mirror/alphagov.notifications-functional-tests | 899032ff637161c1ab8d058555cb0326ec04b1be | [
"MIT"
] | null | null | null | tests/test_utils.py | uk-gov-mirror/alphagov.notifications-functional-tests | 899032ff637161c1ab8d058555cb0326ec04b1be | [
"MIT"
] | null | null | null | import functools
import os
import tempfile
import csv
import re
import logging
import uuid
from datetime import datetime
from retry import retry
from notifications_python_client.notifications import NotificationsAPIClient
from selenium.common.exceptions import NoSuchElementException, TimeoutException
from config impo... | 36.741419 | 120 | 0.740409 |
797bf1da221deb91bce4a870fca711a00aa531ed | 4,167 | py | Python | huaweicloud-sdk-swr/huaweicloudsdkswr/v2/model/delete_user_repository_auth_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-swr/huaweicloudsdkswr/v2/model/delete_user_repository_auth_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-swr/huaweicloudsdkswr/v2/model/delete_user_repository_auth_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class DeleteUserRepositoryAuthRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
... | 25.881988 | 82 | 0.568994 |
797bf2ee5109ecbd4dca4c2f1d93cab9619e29c9 | 5,483 | py | Python | tldap/modlist.py | Karaage-Cluster/python-tldap-debian | 9d3d7a28df61d9cf97c0c0f62a5eea9d5767c213 | [
"BSD-3-Clause"
] | null | null | null | tldap/modlist.py | Karaage-Cluster/python-tldap-debian | 9d3d7a28df61d9cf97c0c0f62a5eea9d5767c213 | [
"BSD-3-Clause"
] | null | null | null | tldap/modlist.py | Karaage-Cluster/python-tldap-debian | 9d3d7a28df61d9cf97c0c0f62a5eea9d5767c213 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2012-2014 Brian May
#
# This file is part of python-tldap.
#
# python-tldap is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | 35.836601 | 78 | 0.653839 |
797bf43f25e57af5dde122dc26114e32e6e62290 | 1,251 | py | Python | var/spack/repos/builtin/packages/r-bumphunter/package.py | whitfin/spack | aabd2be31a511d0e00c1017f7311a421659319d9 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/r-bumphunter/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/r-bumphunter/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 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 RBumphunter(RPackage):
"""Tools for finding bumps in genomic data"""
homepage = "http... | 40.354839 | 73 | 0.657874 |
797bf66b230fd1285fd22178f6f60c3d5e96c2f7 | 777 | py | Python | users/migrations/0001_initial.py | NoMeNoMeMe/Django-Blog | 77fd99ea940c3b66704bed7223b4042fc810fb32 | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | NoMeNoMeMe/Django-Blog | 77fd99ea940c3b66704bed7223b4042fc810fb32 | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | NoMeNoMeMe/Django-Blog | 77fd99ea940c3b66704bed7223b4042fc810fb32 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-15 16:01
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 29.884615 | 121 | 0.646075 |
797bf673da91fbd09bf64e73e0cbe8621bc374e6 | 3,495 | py | Python | ucscentralsdk/mometa/initiator/InitiatorRequestorGrpEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/initiator/InitiatorRequestorGrpEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/initiator/InitiatorRequestorGrpEp.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for InitiatorRequestorGrpEp ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class InitiatorRequestorGrpEpConsts():
ALLOC_STATE_ALLOCATE... | 50.652174 | 249 | 0.654363 |
797bf75de264b2e6e9ce1bab588d313ee5ed3b24 | 5,292 | py | Python | main.py | 240400968/SoftMaskedBert-PyTorch | 50cdd74ea7101f0043fdb532bfdd2381e1630105 | [
"MIT"
] | null | null | null | main.py | 240400968/SoftMaskedBert-PyTorch | 50cdd74ea7101f0043fdb532bfdd2381e1630105 | [
"MIT"
] | null | null | null | main.py | 240400968/SoftMaskedBert-PyTorch | 50cdd74ea7101f0043fdb532bfdd2381e1630105 | [
"MIT"
] | null | null | null | """
@Time : 2021-01-12 15:23:56
@File : main.py
@Author : Abtion
@Email : abtion{at}outlook.com
"""
import argparse
import os
import torch
from transformers import BertTokenizer
from src.dataset import get_corrector_loader
from src.models import SoftMaskedBertModel
from src.data_processor import preproc
fr... | 44.1 | 111 | 0.60223 |
797bf8176f303bd5214376d4af348645f64113bb | 1,940 | py | Python | src/tor/scripts/maint/locatemissingdoxygen.py | mattt21/zcoin | 730f0c39ba47f762627f13a1e9ea66d76b57a57d | [
"MIT"
] | 159 | 2020-11-09T22:39:58.000Z | 2022-03-29T21:14:57.000Z | src/tor/scripts/maint/locatemissingdoxygen.py | mattt21/zcoin | 730f0c39ba47f762627f13a1e9ea66d76b57a57d | [
"MIT"
] | 188 | 2020-11-09T09:47:18.000Z | 2022-03-27T09:08:07.000Z | src/tor/scripts/maint/locatemissingdoxygen.py | mattt21/zcoin | 730f0c39ba47f762627f13a1e9ea66d76b57a57d | [
"MIT"
] | 58 | 2020-11-17T14:40:13.000Z | 2022-03-19T09:45:58.000Z | #!/usr/bin/python
"""
This script parses the stderr output of doxygen and looks for undocumented
stuff. By default, it just counts the undocumented things per file. But with
the -A option, it rewrites the files to stick in /*DOCDOC*/ comments
to highlight the undocumented stuff.
"""
import os
import re
impo... | 25.866667 | 80 | 0.602577 |
797bf8719119fad31cd4ee17fe68dfc47cf2c279 | 1,712 | py | Python | examples/hello_module.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 13 | 2017-09-28T07:05:18.000Z | 2021-05-21T04:52:05.000Z | examples/hello_module.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 74 | 2017-09-17T17:35:13.000Z | 2021-09-07T18:42:59.000Z | examples/hello_module.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 7 | 2018-03-05T23:51:28.000Z | 2020-05-31T20:55:04.000Z | import coreir
from bit_vector import BitVector
context = coreir.Context()
coreir_primitives = context.get_namespace("coreir")
counter_type = context.Record({
"out": context.Array(16, context.Bit()),
"clk": context.named_types[("coreir", "clkIn")]
})
counter = context.global_namespace.new_module("counter", cou... | 27.174603 | 73 | 0.733061 |
797bf8ffe71c9b8d9b1f19c94495e0f47659ff70 | 2,423 | py | Python | setup.py | mfaafm/dasher | 723e06b6da9b735eccf240e8f5405dffb84a478f | [
"MIT"
] | 12 | 2019-04-04T07:20:09.000Z | 2020-12-13T15:43:36.000Z | setup.py | mfaafm/dasher | 723e06b6da9b735eccf240e8f5405dffb84a478f | [
"MIT"
] | 1 | 2019-07-15T11:53:11.000Z | 2019-07-16T20:58:34.000Z | setup.py | mfaafm/dasher | 723e06b6da9b735eccf240e8f5405dffb84a478f | [
"MIT"
] | 1 | 2020-11-12T18:44:11.000Z | 2020-11-12T18:44:11.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
fro... | 29.54878 | 80 | 0.598432 |
797bf9abf81e81ac1dee2ed515ee748ea640bb21 | 4,719 | py | Python | model_validation_studies/rotor_validation/rotor_validation.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | null | null | null | model_validation_studies/rotor_validation/rotor_validation.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | null | null | null | model_validation_studies/rotor_validation/rotor_validation.py | jomorlier/eVTOL | 753b9261ebb3180bdc344120766c0190f355be90 | [
"MIT"
] | 1 | 2020-05-25T17:20:24.000Z | 2020-05-25T17:20:24.000Z | #Validation of rotor model against test data
import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../..'))
import numpy as np
from gpkit import Variable, Model, Vectorize, ureg
from matplotlib import pyplot as plt
from aircraft_models import Rotors, FlightState, RotorsAero
#Test data, f... | 33.468085 | 92 | 0.70587 |
797bfa9a9b554b228bb5a92e77b673e7f5f1d24a | 1,438 | py | Python | upwork/namespaces.py | alexandru-grajdeanu/python-upwork | ffe7994c084c88c455a386791e4ec62a93bb7b6a | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-05-17T17:13:28.000Z | 2020-05-17T17:13:28.000Z | upwork/namespaces.py | frolenkov-nikita/python-upwork | d052f5caedc632c73ad770b1f822a8a494f6b34b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | upwork/namespaces.py | frolenkov-nikita/python-upwork | d052f5caedc632c73ad770b1f822a8a494f6b34b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Python bindings to Upwork API
# python-upwork version 0.5
# (C) 2010-2015 Upwork
from .compatibility import urlparse
from .config import BASE_URL
__all__ = ['Namespace', 'GdsNamespace']
class Namespace(object):
"""
A special 'proxy' class to keep API methods organized.
Use this class for defining new ... | 24.793103 | 71 | 0.622392 |
797bfb014c9e2982aee4e2a8753e2fe32f3fda48 | 1,752 | py | Python | test/test_parsing_utils.py | sjones-hep-ph-liv-ac-uk/apel | 1dcd3b809e445b0c2284017339638cfaab44892e | [
"Apache-2.0"
] | null | null | null | test/test_parsing_utils.py | sjones-hep-ph-liv-ac-uk/apel | 1dcd3b809e445b0c2284017339638cfaab44892e | [
"Apache-2.0"
] | null | null | null | test/test_parsing_utils.py | sjones-hep-ph-liv-ac-uk/apel | 1dcd3b809e445b0c2284017339638cfaab44892e | [
"Apache-2.0"
] | null | null | null | import unittest
from apel.common import parse_fqan
class ParsingUtilsTest(unittest.TestCase):
'''
Test case for test_parse_fqan method
'''
def test_parse_fqan(self):
self.assertEqual((None, None, 'role=2'), parse_fqan('role=2'))
self.assertEqual(('role=some', '/Test', 'Test'), parse_... | 44.923077 | 324 | 0.666667 |
797bfb19196db5c65743e835ff656696050d9b2b | 16,725 | py | Python | salt/client/mixins.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/client/mixins.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/client/mixins.py | belvedere-trading/salt | 0ab0aa4d79237e9309dda6f685b34e55fda06258 | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # coding: utf-8
'''
A collection of mixins useful for the various *Client interfaces
'''
# Import Python libs
from __future__ import absolute_import, print_function
import copy
import logging
import weakref
import traceback
import collections
import multiprocessing
# Import Salt libs
import salt.exceptions
import sal... | 34.272541 | 117 | 0.528729 |
797bfcfcc7436f349e4ca43b8cd7b09191f72a36 | 35,512 | py | Python | train_senet_cpn_onebyone.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | null | null | null | train_senet_cpn_onebyone.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | null | null | null | train_senet_cpn_onebyone.py | middleprince/fashionAi | c512936b4983c2fb093008f06e04753180af0a90 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Changan Wang
# 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, so... | 55.228616 | 490 | 0.643585 |
797bfd058ead042d97f51f5217468cd59ab252f8 | 185 | py | Python | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | homes_agent/urls.py | Xtuden-com/django-property | 6656d469a5d06c103a34c2e68b9f1754413fb3ba | [
"MIT"
] | null | null | null | from django.conf.urls import url
from .views import AgentBranchHomePageView
urlpatterns = [
url(r'^branch/(?P<slug>[-\w]+)/$', AgentBranchHomePageView.as_view(), name='branch')
]
| 23.125 | 88 | 0.713514 |
797bfd273a578ce108893bec5cad9dd7203ee4ed | 2,894 | py | Python | src/deadlink/_replace_redirects.py | nschloe/deadlink | 8a97d4e3e4436859795b489535627c71e8bd6013 | [
"MIT"
] | 64 | 2021-06-22T16:48:37.000Z | 2022-03-25T07:09:51.000Z | src/deadlink/_replace_redirects.py | nschloe/urli | 8a97d4e3e4436859795b489535627c71e8bd6013 | [
"MIT"
] | 6 | 2021-06-22T14:52:45.000Z | 2022-03-09T12:55:01.000Z | src/deadlink/_replace_redirects.py | nschloe/urli | 8a97d4e3e4436859795b489535627c71e8bd6013 | [
"MIT"
] | 1 | 2022-01-17T00:20:38.000Z | 2022-01-17T00:20:38.000Z | import random
from pathlib import Path
from ._main import (
categorize_urls,
find_files,
find_urls,
is_allowed,
plural,
print_to_screen,
read_config,
replace_in_file,
)
def replace_redirects(args):
# get non-hidden files in non-hidden directories
files = find_files(args.paths)... | 30.145833 | 85 | 0.64029 |
797bfeb8cdec142cd9c482d8a770955a4a13c45f | 2,038 | py | Python | data/external/repositories_2to3/136714/kaggle-plankton-master/scripts/train_base.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/136714/kaggle-plankton-master/scripts/train_base.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/136714/kaggle-plankton-master/scripts/train_base.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | # Script to train base model
import argparse
from time import time
import numpy as np
from plankton import utils
from plankton import get_net
parser = argparse.ArgumentParser()
parser.add_argument('net_name')
parser.add_argument('--X_train_train_npy', default='data/X_train_train')
parser.add_argument... | 39.960784 | 150 | 0.709028 |
797bfef30e1ca08d7731ae7d33877b26ed0c1bbf | 17,200 | py | Python | vk_api/vk_api.py | curly-brace/VkCheckerPy | 46083304a8cb7b0fd85394e4396b0d590863bf6e | [
"MIT"
] | 1 | 2021-03-24T11:54:18.000Z | 2021-03-24T11:54:18.000Z | vk_api/vk_api.py | curly-brace/VkCheckerPy | 46083304a8cb7b0fd85394e4396b0d590863bf6e | [
"MIT"
] | null | null | null | vk_api/vk_api.py | curly-brace/VkCheckerPy | 46083304a8cb7b0fd85394e4396b0d590863bf6e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Kirill Python
@contact: https://vk.com/python273
@license Apache License, Version 2.0, see LICENSE file
Copyright (C) 2016
"""
import re
import threading
import time
import requests
import jconfig
from .utils import code_from_number, search_re, clean_string
DELAY = 0.34 # ~3... | 29.809359 | 91 | 0.565698 |
797bff8f3a0c76eebafea87777175842b146e305 | 11,361 | py | Python | pyleecan/Classes/OptiSolver.py | tobsen2code/pyleecan | 5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9 | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/OptiSolver.py | tobsen2code/pyleecan | 5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9 | [
"Apache-2.0"
] | null | null | null | pyleecan/Classes/OptiSolver.py | tobsen2code/pyleecan | 5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File generated according to Generator/ClassesRef/Optimization/OptiSolver.csv
# WARNING! All changes made in this file will be lost!
"""Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Optimization/OptiSolver
"""
from os import linesep
from sys imp... | 36.886364 | 115 | 0.582783 |
797bff9fe7b1a0fd7112a5aa8a4978d499c1d796 | 3,463 | py | Python | src/modlunky2/sprites/sprite_fetcher.py | Gugubo/modlunky2 | 915a829f610b393bfe50e69d542d4d39c283fcad | [
"Apache-2.0"
] | null | null | null | src/modlunky2/sprites/sprite_fetcher.py | Gugubo/modlunky2 | 915a829f610b393bfe50e69d542d4d39c283fcad | [
"Apache-2.0"
] | null | null | null | src/modlunky2/sprites/sprite_fetcher.py | Gugubo/modlunky2 | 915a829f610b393bfe50e69d542d4d39c283fcad | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from typing import Callable, Dict, List, Optional, Tuple
from PIL import Image
from modlunky2.constants import BASE_DIR
from modlunky2.sprites.base_classes import (
AbstractBiome,
BaseSpriteLoader,
BaseJsonSpriteLoader,
DEFAULT_BASE_PATH,
)
from modlunky2.sprites.tilecode_extr... | 36.452632 | 88 | 0.638175 |
797c00aff36e3c15304763b79c96553aa672decd | 13,633 | py | Python | main.py | SomeMinecraftModder/collegesim | d0c14879ac7894cfaf42f0b0059a40907c1947a3 | [
"MIT"
] | null | null | null | main.py | SomeMinecraftModder/collegesim | d0c14879ac7894cfaf42f0b0059a40907c1947a3 | [
"MIT"
] | null | null | null | main.py | SomeMinecraftModder/collegesim | d0c14879ac7894cfaf42f0b0059a40907c1947a3 | [
"MIT"
] | null | null | null | from random import choice, randint, seed
from colorama import Fore, Back, Style
print("whaou bienvenue à collège simulator !!!")
print("v 0.3.0 version public")
a = input("whaou c'est quoi ton nom ???")
seed(a) # can't wait for speedrun set-seed
print("erreur: ton nom est maintenant jean-pierre decrochage")
... | 49.039568 | 121 | 0.430793 |
797c011f16abebb6b3b85a24fe7c4c78e9702b22 | 8,407 | py | Python | tests/utils/ReferenceData.py | ExesiosPB/libm | 09c2638d895a4ba69e0d7f4f0e353f27d4b7911f | [
"MIT"
] | 25 | 2018-12-14T22:17:09.000Z | 2020-04-14T16:14:11.000Z | tests/utils/ReferenceData.py | davidlenz/pygrams | 8cb05bd9704c77e700fd2462e032cefd9a3ef475 | [
"MIT"
] | 250 | 2018-12-14T09:52:58.000Z | 2020-05-13T08:33:45.000Z | tests/utils/ReferenceData.py | davidlenz/pygrams | 8cb05bd9704c77e700fd2462e032cefd9a3ef475 | [
"MIT"
] | 13 | 2018-12-12T10:51:59.000Z | 2020-04-20T11:35:58.000Z | import pandas as pd
generated_date_year = 1900
cold_abstracts = [
('1', '''A refrigerator including a main body provided with a refrigerating chamber at an upper
section and with a freezing chamber at a lower section, an ice making tray disposed in an upper space
of an ice making chamber ined in ... | 75.738739 | 113 | 0.717497 |
797c03669cc0f2003183b6b24c272805b0656fb0 | 30 | py | Python | ChatConnector/Config/discordConfig.py | Micadurp/SHODAN | c54b3d1f58c9f54dd6ba3031ef4a1d30032be5f7 | [
"MIT"
] | null | null | null | ChatConnector/Config/discordConfig.py | Micadurp/SHODAN | c54b3d1f58c9f54dd6ba3031ef4a1d30032be5f7 | [
"MIT"
] | null | null | null | ChatConnector/Config/discordConfig.py | Micadurp/SHODAN | c54b3d1f58c9f54dd6ba3031ef4a1d30032be5f7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
TOKEN = ''
| 10 | 18 | 0.6 |
797c0391f83c98386fbaaaa6bf367682dc839165 | 338 | py | Python | todo/migrations/0002_remove_todolist_desc.py | beshrkayali/fbmtodo | a7e82edd8d59a83c92bcef412954f05ba2e8a34e | [
"MIT"
] | null | null | null | todo/migrations/0002_remove_todolist_desc.py | beshrkayali/fbmtodo | a7e82edd8d59a83c92bcef412954f05ba2e8a34e | [
"MIT"
] | null | null | null | todo/migrations/0002_remove_todolist_desc.py | beshrkayali/fbmtodo | a7e82edd8d59a83c92bcef412954f05ba2e8a34e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('todo', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='todolist',
name='desc',... | 17.789474 | 40 | 0.585799 |
797c03c869c621938678c14435d63124ed8370a4 | 10,762 | py | Python | test/base/test_returns.py | ClarenceYC/tianshou | 39f8391cfb4f219a267c1040e2d463be91c645b0 | [
"MIT"
] | 1 | 2021-12-18T12:20:59.000Z | 2021-12-18T12:20:59.000Z | test/base/test_returns.py | ClarenceYC/tianshou | 39f8391cfb4f219a267c1040e2d463be91c645b0 | [
"MIT"
] | null | null | null | test/base/test_returns.py | ClarenceYC/tianshou | 39f8391cfb4f219a267c1040e2d463be91c645b0 | [
"MIT"
] | null | null | null | from timeit import timeit
import numpy as np
import torch
from tianshou.data import Batch, ReplayBuffer, to_numpy
from tianshou.policy import BasePolicy
def compute_episodic_return_base(batch, gamma):
returns = np.zeros_like(batch.rew)
last = 0
for i in reversed(range(len(batch.rew))):
returns[i... | 34.273885 | 87 | 0.551756 |
797c0523e06bdf0ee7d8167ac39b471a67be0442 | 1,964 | py | Python | tests/tests/test_cli.py | michaelatmender/inventory-1 | 53c1971eb297a288adf08889723a59912c955640 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/tests/test_cli.py | michaelatmender/inventory-1 | 53c1971eb297a288adf08889723a59912c955640 | [
"ECL-2.0",
"Apache-2.0"
] | 42 | 2020-08-03T07:11:05.000Z | 2022-03-28T16:01:20.000Z | tests/tests/test_cli.py | michaelatmender/inventory-1 | 53c1971eb297a288adf08889723a59912c955640 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2019 Mender Software AS
#
# 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... | 32.733333 | 77 | 0.693483 |
797c05248c6cf24e9efe1e47cb7397e5692aeca1 | 1,439 | py | Python | _deprecated/drewfustin/pelicanconf.py | drewfustin/pelican-sites | dba18b10f68f6c95450562d09e807e08690af4b6 | [
"MIT"
] | null | null | null | _deprecated/drewfustin/pelicanconf.py | drewfustin/pelican-sites | dba18b10f68f6c95450562d09e807e08690af4b6 | [
"MIT"
] | null | null | null | _deprecated/drewfustin/pelicanconf.py | drewfustin/pelican-sites | dba18b10f68f6c95450562d09e807e08690af4b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
AUTHOR = u'Drew Fustin'
SITENAME = u'Drew Fustin'
SITEURL = 'http://www.drewfustin.com'
TIMEZONE = 'America/Chicago'
THEME = './theme/notebook-simpler'
SUMMARY_MAX_LENGTH = 50
AVATAR = '/theme/images/avatar.jpg'
DESCRIPTION = "Data Scientist: <a href='http://spothero.com... | 28.215686 | 282 | 0.701181 |
797c0525560618060c8a8a49b51e68b39edf4070 | 4,696 | py | Python | affordance_gym/src/affordance_gym/remote_interface.py | gamleksi/affordance_gym | e2e6eeafd4d725c5c912ac97d4d5ad1cf318af5f | [
"MIT"
] | 15 | 2019-03-11T15:12:36.000Z | 2022-01-13T17:35:58.000Z | affordance_gym/src/affordance_gym/remote_interface.py | gamleksi/AffordanceGym | e2e6eeafd4d725c5c912ac97d4d5ad1cf318af5f | [
"MIT"
] | null | null | null | affordance_gym/src/affordance_gym/remote_interface.py | gamleksi/AffordanceGym | e2e6eeafd4d725c5c912ac97d4d5ad1cf318af5f | [
"MIT"
] | 7 | 2019-07-14T13:27:05.000Z | 2022-01-13T17:34:08.000Z | import rospy
import numpy as np
import cv_bridge
from sensor_msgs.msg import Image
import tf
from std_srvs import srv
from affordance_gym.srv import RobotTrajectory, ChangePose, JointValues, JointNames, CurrentPose
'''
This Moveit Commander Interface communicates with the mc_interface node (mc_interface.py).
This ... | 31.306667 | 127 | 0.646934 |
797c0589049de6308eaac72b9160f22e5ecf52e3 | 12,882 | py | Python | sdk/core/azure-core/tests/test_basic_transport.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | sdk/core/azure-core/tests/test_basic_transport.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | sdk/core/azure-core/tests/test_basic_transport.py | srinathnarayanan/azure-sdk-for-python | 2fc8a56afccfe9facd46e788b4b31b9ba6eb4b3d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# -------------------------------------------------------------------------
from six.mo... | 33.201031 | 149 | 0.627154 |
797c05a5a71e7a875bf63bdd626fc69c422ae374 | 1,614 | py | Python | p2ner/components/ui/gtkgui/gtkgui/options/statistics.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | 2 | 2015-06-01T22:04:34.000Z | 2017-07-06T09:35:00.000Z | p2ner/components/ui/gtkgui/gtkgui/options/statistics.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | null | null | null | p2ner/components/ui/gtkgui/gtkgui/options/statistics.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | 1 | 2019-11-26T10:22:35.000Z | 2019-11-26T10:22:35.000Z | # Copyright 2012 Loris Corazza, Sakis Christakidis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 31.038462 | 76 | 0.679058 |
797c05d6504592abf775e5cfd9f6fa54f1b483a8 | 1,266 | py | Python | coding patterns/dynamic programming/longest_common_substring/longest_bitonic_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null | coding patterns/dynamic programming/longest_common_substring/longest_bitonic_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null | coding patterns/dynamic programming/longest_common_substring/longest_bitonic_subsequence_bottomUpTabu.py | mkoryor/Python | 837ec4c03130dc4cb919fb5f1eeb4d31206790e4 | [
"Unlicense"
] | null | null | null |
"""
Given a number sequence, find the length of its Longest Bitonic Subsequence (LBS).
A subsequence is considered bitonic if it is monotonically increasing and then
monotonically decreasing.
Example 1:
Input: {4,2,3,6,10,1,12}
Output: 5
Explanation: The LBS is {2,3,6,10,1}.
Example 2:
Input: {4,2,5,9,7,6,10,3,1... | 22.607143 | 83 | 0.620063 |
797c0639ce61566f796d203982100d7ac42c41db | 13,270 | py | Python | emulated_hue/config.py | alexyao2015/hass_emulated_hue | 2459daed47d0537f703d504f6fa4dba5c7c77d0f | [
"Apache-2.0"
] | null | null | null | emulated_hue/config.py | alexyao2015/hass_emulated_hue | 2459daed47d0537f703d504f6fa4dba5c7c77d0f | [
"Apache-2.0"
] | null | null | null | emulated_hue/config.py | alexyao2015/hass_emulated_hue | 2459daed47d0537f703d504f6fa4dba5c7c77d0f | [
"Apache-2.0"
] | null | null | null | """Hold configuration variables for the emulated hue bridge."""
import datetime
import hashlib
import logging
import os
import uuid
from typing import TYPE_CHECKING, Any, Optional
from getmac import get_mac_address
from .utils import async_save_json, get_local_ip, load_json
if TYPE_CHECKING:
from emulated_hue im... | 38.242075 | 98 | 0.613715 |
797c06e766e308d260e2bfd5d5ffd8bab6d46e05 | 480 | py | Python | blog/admin.py | dafi-um/dafi-system | 0aaaed1f1664667170a4f1c2146caa136a787a43 | [
"MIT"
] | 7 | 2019-08-03T12:25:18.000Z | 2021-11-02T12:51:33.000Z | blog/admin.py | dafi-um/dafi-system | 0aaaed1f1664667170a4f1c2146caa136a787a43 | [
"MIT"
] | 11 | 2019-08-20T17:07:37.000Z | 2021-11-23T14:26:07.000Z | blog/admin.py | dafi-um/dafi-system | 0aaaed1f1664667170a4f1c2146caa136a787a43 | [
"MIT"
] | 4 | 2020-04-06T11:33:02.000Z | 2021-10-31T09:10:53.000Z | from django.contrib import admin
from django.db import models
from pagedown.widgets import AdminPagedownWidget
from .models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ('title', 'slug', 'pub_date')
list_filter = ['pub_date']
autocomplete_fields = ('author',)
... | 20 | 48 | 0.670833 |
797c083e9b0ccfa54729a7c1e7dc3576d6da27ba | 31,891 | py | Python | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_block_diag.py | npfp/probability | 3911f4463cdcca6cc118633742430885fb0c88cb | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_block_diag.py | npfp/probability | 3911f4463cdcca6cc118633742430885fb0c88cb | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_block_diag.py | npfp/probability | 3911f4463cdcca6cc118633742430885fb0c88cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Probability Authors. All Rights Reserved.
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# THIS FILE IS AUTO-GENERATED BY `gen_linear_operators.py`.
# DO NOT MODIFY DIRECTLY.
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... | 41.202842 | 106 | 0.679314 |
797c097867987c995519862f376d671a4c453da5 | 3,772 | py | Python | .local/share/OpenSCAD/libraries/NopSCADlib/scripts/plateup.py | IlyaMZP/dotfiles | b55e0cd63117c09778ea917b02313da74f7c1067 | [
"MIT"
] | null | null | null | .local/share/OpenSCAD/libraries/NopSCADlib/scripts/plateup.py | IlyaMZP/dotfiles | b55e0cd63117c09778ea917b02313da74f7c1067 | [
"MIT"
] | null | null | null | .local/share/OpenSCAD/libraries/NopSCADlib/scripts/plateup.py | IlyaMZP/dotfiles | b55e0cd63117c09778ea917b02313da74f7c1067 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# NopSCADlib Copyright Chris Palmer 2018
# nop.head@gmail.com
# hydraraptor.blogspot.com
#
# This file is part of NopSCADlib.
#
# NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundatio... | 33.981982 | 94 | 0.581124 |
797c09888662e640d0d7de1a2a1c0fc702e6117f | 5,641 | py | Python | resnet50/main_resnet50.py | TerenceChen95/Bladder-Cancer-Stage-Detection | 1f97c6835629c7fe82def0e8dba3d7a941ee3a2c | [
"MIT"
] | 5 | 2019-10-15T04:05:58.000Z | 2022-03-05T02:09:14.000Z | resnet50/main_resnet50.py | TerenceChen95/Bladder-Cancer-Stage-Detection | 1f97c6835629c7fe82def0e8dba3d7a941ee3a2c | [
"MIT"
] | 1 | 2019-12-10T10:41:56.000Z | 2019-12-11T02:54:22.000Z | resnet50/main_resnet50.py | TerenceChen95/Bladder-Cancer-Stage-Detection | 1f97c6835629c7fe82def0e8dba3d7a941ee3a2c | [
"MIT"
] | 1 | 2020-12-04T08:50:17.000Z | 2020-12-04T08:50:17.000Z | # -*- coding: utf-8 -*-
from torchvision import transforms,models
import torch
import torch.optim as optim
import torch.nn as nn
from collections import OrderedDict
from train import train_function, save_checkpoint
from test import test_function
from dataset import Dataset
from PIL import Image, ImageFilter,... | 39.173611 | 118 | 0.585889 |
797c0c1c76d7fea9eb2344bdcc68a82a0ce90438 | 9,883 | py | Python | TD3_ori_noise_v1.py | yifan-you-37/GRAC-1 | 22b2cde651ae4416475d9594b93ad1c430090144 | [
"MIT"
] | null | null | null | TD3_ori_noise_v1.py | yifan-you-37/GRAC-1 | 22b2cde651ae4416475d9594b93ad1c430090144 | [
"MIT"
] | null | null | null | TD3_ori_noise_v1.py | yifan-you-37/GRAC-1 | 22b2cde651ae4416475d9594b93ad1c430090144 | [
"MIT"
] | null | null | null | import copy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# Implementation of Twin Delayed Deep Deterministic Policy Gradients (TD3)
# Paper: https://arxiv.org/abs/1802.09477
class Actor(nn.Module):
def __init__(self, state_dim, action_dim, max_action):
super(Actor, self)._... | 36.876866 | 115 | 0.738035 |
797c0c6af2d7e5538c20605c0bb3f0aaebc5616c | 33 | py | Python | jdaviz/configs/default/plugins/gaussian_smoothing/__init__.py | mariobuikhuizen/jdaviz | 1757f49b2ea8c679c23f5925d754798a1deb0c96 | [
"BSD-3-Clause"
] | null | null | null | jdaviz/configs/default/plugins/gaussian_smoothing/__init__.py | mariobuikhuizen/jdaviz | 1757f49b2ea8c679c23f5925d754798a1deb0c96 | [
"BSD-3-Clause"
] | null | null | null | jdaviz/configs/default/plugins/gaussian_smoothing/__init__.py | mariobuikhuizen/jdaviz | 1757f49b2ea8c679c23f5925d754798a1deb0c96 | [
"BSD-3-Clause"
] | null | null | null | from .gaussian_smoothing import * | 33 | 33 | 0.848485 |
797c0d27ab179b8a38ffee96fe68308d1d86be27 | 32,941 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_failover_groups_operations.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 47.87936 | 230 | 0.678152 |
797c0d32c54531dc158963327945019d5d896a03 | 167 | py | Python | pymatgen/ext/__init__.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | 6 | 2015-02-06T08:27:09.000Z | 2021-02-28T14:42:52.000Z | pymatgen/ext/__init__.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | null | null | null | pymatgen/ext/__init__.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | 3 | 2015-10-21T08:04:40.000Z | 2019-03-19T23:11:15.000Z | """
This package implements interfaces to various external data sources and
utilities. For example, the Materials Project, the Crystallography Open
Database, etc.
"""
| 27.833333 | 71 | 0.796407 |
797c0dd423fdd75d7ee06c1378e250b092d15be2 | 9,595 | py | Python | convframe/maindialog.py | bh1428/convframe | 0db48946fee353090d78fc71f0d8e3e66c1c35f4 | [
"MIT"
] | null | null | null | convframe/maindialog.py | bh1428/convframe | 0db48946fee353090d78fc71f0d8e3e66c1c35f4 | [
"MIT"
] | null | null | null | convframe/maindialog.py | bh1428/convframe | 0db48946fee353090d78fc71f0d8e3e66c1c35f4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""main dialog for converterframework
converterframework is a PyQt based framework for simple text converters
"""
import pathlib as pl
from PySide6 import QtCore, QtWidgets
from .ui_maindialog import Ui_MainDialog
class Converter(QtWidgets.QLayout):
... | 37.33463 | 112 | 0.617822 |
797c0eaf9c58a1dd41e302705403edc9eda78ab3 | 1,580 | py | Python | share/rpcauth/rpcauth.py | BenCryptoKing/stephanpower | 53b6820c95d9fc93529806844db80979bbaf6d66 | [
"MIT"
] | null | null | null | share/rpcauth/rpcauth.py | BenCryptoKing/stephanpower | 53b6820c95d9fc93529806844db80979bbaf6d66 | [
"MIT"
] | null | null | null | share/rpcauth/rpcauth.py | BenCryptoKing/stephanpower | 53b6820c95d9fc93529806844db80979bbaf6d66 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from argparse import ArgumentParser
from base64 import urlsafe_b64encode
from binascii import hexlify
fro... | 33.617021 | 134 | 0.71519 |
797c0fafba53d45f2dd1b320329ac4e4a30f7ab2 | 6,619 | py | Python | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_vm_facts.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_vm_facts.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_vm_facts.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
... | 32.605911 | 105 | 0.62094 |
797c100b998411bb24a2406b7a3640f858f540e9 | 10,403 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_switchcontroller_securitypolicy_captiveportal.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_switchcontroller_securitypolicy_captiveportal.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_switchcontroller_securitypolicy_captiveportal.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2021 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | 33.666667 | 153 | 0.559935 |
797c1013a3c95458a159614aefd8e95f8073b287 | 2,198 | py | Python | mmedit/models/backbones/encoder_decoders/gl_encoder_decoder.py | Yshuo-Li/mmediting-test | ff8349a183b3d266495a53be0c8ad8e342e8b461 | [
"Apache-2.0"
] | 2 | 2021-04-20T11:31:37.000Z | 2021-05-27T13:04:40.000Z | mmedit/models/backbones/encoder_decoders/gl_encoder_decoder.py | Yshuo-Li/mmediting-test | ff8349a183b3d266495a53be0c8ad8e342e8b461 | [
"Apache-2.0"
] | 1 | 2021-08-05T16:20:39.000Z | 2021-08-05T16:20:39.000Z | mmedit/models/backbones/encoder_decoders/gl_encoder_decoder.py | Yshuo-Li/mmediting-test | ff8349a183b3d266495a53be0c8ad8e342e8b461 | [
"Apache-2.0"
] | 2 | 2021-04-22T12:10:14.000Z | 2021-05-19T02:09:48.000Z | import torch.nn as nn
from mmcv.runner import auto_fp16, load_checkpoint
from mmedit.models.builder import build_component
from mmedit.models.registry import BACKBONES
from mmedit.utils import get_root_logger
@BACKBONES.register_module()
class GLEncoderDecoder(nn.Module):
"""Encoder-Decoder used in Global&Local ... | 31.4 | 78 | 0.617379 |
797c114cd07e6ba28adbbfa76dffb05d9debe46b | 6,141 | py | Python | python/pacsign/pacsign/terminal.py | peturingi/opae-sdk | c9da064787e670925cf6030909ba4ac496c80437 | [
"BSD-3-Clause"
] | 220 | 2017-09-02T20:07:11.000Z | 2022-03-01T03:53:35.000Z | python/pacsign/pacsign/terminal.py | peturingi/opae-sdk | c9da064787e670925cf6030909ba4ac496c80437 | [
"BSD-3-Clause"
] | 1,335 | 2017-11-05T03:02:55.000Z | 2022-03-29T23:14:06.000Z | python/pacsign/pacsign/terminal.py | peturingi/opae-sdk | c9da064787e670925cf6030909ba4ac496c80437 | [
"BSD-3-Clause"
] | 80 | 2017-09-01T21:28:16.000Z | 2022-03-09T08:04:05.000Z | # Copyright(c) 2019, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the followi... | 27.172566 | 77 | 0.594854 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.